/* Local editing surface: all measurements on album pages remain in millimetres. */
.toolbar #editToggle[aria-pressed="true"] { background:#176b74; color:white; border-color:#176b74; }
.toolbar #frameNumbersToggle { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; }
.toolbar #frameNumbersToggle[aria-pressed="true"] { background:#176b74; color:white; border-color:#176b74; }
.toolbar #actualSizeToggle[aria-pressed="true"] { color:#fff; border-color:#176b74; background:#176b74; }
.toolbar .source-audit-badge { max-width:215px; border-color:#d0a04e; color:#704908; background:#fff4d8; font:750 12px/1.2 "Segoe UI",Arial,sans-serif; white-space:normal; }
.toolbar .source-audit-badge.ready { border-color:#5a9a79; color:#1f6047; background:#e3f3e9; }
.toolbar .source-audit-badge.blocked { border-color:#c65e4d; color:#8d2f24; background:#ffebe7; box-shadow:0 0 0 3px #c65e4d26; }
.toolbar .source-audit-badge.checking { cursor:progress; }
.toolbar .share-album-button { display:inline-flex; align-items:center; gap:7px; border-color:#176b74; color:#fff; background:#176b74; font-weight:700; }
.toolbar .share-album-button:hover { color:#fff; background:#0f5961; }
.toolbar .share-album-button span { font-size:18px; line-height:1; }
.read-only-badge { display:inline-flex; width:max-content; margin-top:3px; padding:3px 8px; border-radius:999px; color:#176b74; background:#e7f4f0; font:700 11px/1.2 "Segoe UI",Arial,sans-serif; }
body.share-download-disabled img,body.share-download-disabled .photo-card,body.share-download-disabled .scene-button,body.share-download-disabled .gallery-photo-view { -webkit-user-drag:none; -webkit-touch-callout:none; user-select:none; }
.share-dialog-backdrop { position:fixed; z-index:400; inset:0; display:grid; padding:20px; place-items:center; background:#102f3b5c; backdrop-filter:blur(4px); }
.share-dialog-backdrop[hidden] { display:none; }
.share-dialog-panel { position:relative; width:min(560px,calc(100vw - 32px)); padding:28px; border:1px solid #b9cdc8; border-radius:24px; color:#173f47; background:#fffef9; box-shadow:0 24px 70px #102f3b52; }
.share-dialog-panel.share-management-panel { width:min(700px,calc(100vw - 32px)); max-height:min(880px,calc(100vh - 32px)); overflow:auto; }
.share-dialog-panel h2 { margin:8px 0 8px; font:750 25px/1.15 "Segoe UI",Arial,sans-serif; }
.share-dialog-panel p { margin:0 0 18px; color:#58706d; line-height:1.45; }
.share-dialog-panel label { display:block; margin-bottom:6px; font-weight:700; }
.share-dialog-close { position:absolute; top:12px; right:12px; width:38px; height:38px; padding:0; border:0; border-radius:50%; color:#46625f; background:#edf4f1; font-size:24px; cursor:pointer; }
.share-dialog-icon { display:grid; width:46px; height:46px; place-items:center; border-radius:15px; color:#fff; background:#176b74; font-size:27px; }
.share-link-row { display:flex; gap:8px; }
.share-link-row input { flex:1; min-width:0; padding:12px 13px; border:1px solid #a9beb9; border-radius:12px; color:#23484c; background:#f7fbf9; font:14px/1.3 "Segoe UI",Arial,sans-serif; }
.share-link-row button { flex:0 0 auto; padding:10px 16px; border:0; border-radius:12px; color:#fff; background:#176b74; font-weight:700; cursor:pointer; }
.share-link-row button:disabled { opacity:.45; cursor:default; }
.share-link-status { min-height:1.4em; margin:10px 0 0!important; font-size:13px; }
.share-expiry-toggle { display:flex!important; align-items:center; gap:9px; margin:16px 0!important; cursor:pointer; }
.share-expiry-toggle input { width:18px; height:18px; margin:0; accent-color:#176b74; }
.share-download-note { display:block; margin:-11px 0 12px; color:#6c807d; font-size:12px; line-height:1.35; }
.share-expiry-fields { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:7px 10px; margin:0 0 18px; padding:12px; border:1px solid #cfddd9; border-radius:12px; background:#f7fbf9; }
.share-expiry-fields[hidden] { display:none; }
.share-expiry-fields label { align-self:end; margin:0; }
.share-expiry-fields select,.share-expiry-fields input { width:100%; min-width:0; padding:10px 12px; border:1px solid #a9beb9; border-radius:10px; color:#23484c; background:#fff; font:14px/1.3 "Segoe UI",Arial,sans-serif; }
.share-dialog-actions { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 16px; }
.share-dialog-actions button { padding:10px 15px; border:0; border-radius:11px; color:#fff; background:#176b74; font-weight:700; cursor:pointer; }
.share-dialog-actions .share-revoke-button { color:#8a2d27; background:#f6e7e3; }
.share-dialog-actions button:disabled { opacity:.5; cursor:default; }
.share-expiry-status { min-height:1.4em; margin:8px 0 0!important; font-size:13px; }
.share-label-input { width:100%; min-height:42px; margin:0 0 4px; padding:10px 12px; border:1px solid #a9beb9; border-radius:11px; color:#23484c; background:#fff; }
.share-link-journal { margin-top:14px; border:1px solid #c9d8d4; border-radius:14px; background:#f7fbf9; }
.share-link-journal>summary { display:flex; min-height:58px; padding:10px 12px; align-items:center; gap:10px; cursor:pointer; list-style:none; -webkit-tap-highlight-color:transparent; }
.share-link-journal>summary::-webkit-details-marker { display:none; }
.share-link-journal>summary>span:first-child { display:grid; min-width:0; flex:1; gap:2px; }
.share-link-journal>summary strong { color:#23484c; font:750 15px/1.2 "Segoe UI",Arial,sans-serif; }
.share-link-journal>summary small { color:#607875; font:600 11px/1.25 "Segoe UI",Arial,sans-serif; }
.share-link-journal-count { flex:0 0 auto; padding:4px 8px; border-radius:999px; color:#315d5c; background:#e4efeb; font:700 11px/1.2 "Segoe UI",Arial,sans-serif; }
.share-link-journal-chevron { flex:0 0 auto; color:#315d5c; font-size:20px; transition:transform .18s ease; }
.share-link-journal[open] .share-link-journal-chevron { transform:rotate(180deg); }
.share-link-journal-body { padding:0 12px 12px; border-top:1px solid #d3dfdc; }
.share-link-journal-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:10px 0 11px; }
.share-link-journal-head p { margin:0; font-size:12px; }
.share-link-journal-head button { flex:0 0 auto; min-height:36px; padding:7px 11px; border:1px solid #a9beb9; border-radius:10px; color:#315d5c; background:#eef5f2; font-weight:700; }
.share-link-list { display:grid; gap:10px; }
.share-link-empty { margin:0!important; padding:15px; border-radius:11px; background:#f1f6f4; text-align:center; }
.share-link-card { padding:13px; border:1px solid #c9d8d4; border-radius:14px; background:#fbfdfb; }
.share-link-card.revoked { opacity:.72; background:#f5f3f1; }
.share-link-card.expired { background:#fff8ed; }
.share-link-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.share-link-card-title { min-width:0; }
.share-link-card-title strong { display:block; overflow:hidden; font:750 14px/1.3 "Segoe UI",Arial,sans-serif; text-overflow:ellipsis; white-space:nowrap; }
.share-link-card-title small { display:block; margin-top:3px; color:#607875; font-size:11px; }
.share-link-status-pill { flex:0 0 auto; padding:4px 8px; border-radius:999px; color:#24634a; background:#e2f2e8; font:750 11px/1.2 "Segoe UI",Arial,sans-serif; }
.share-link-card.expired .share-link-status-pill { color:#8a5c16; background:#f8e8c8; }
.share-link-card.revoked .share-link-status-pill { color:#874038; background:#f2deda; }
.share-link-card .share-link-row { margin-top:10px; }
.share-link-card .share-link-row input { font-size:12px; }
.share-link-card-actions { display:flex; flex-wrap:wrap; gap:7px; margin-top:9px; }
.share-link-card-actions button,.share-link-settings summary,.share-link-settings button { min-height:35px; padding:7px 10px; border:1px solid #a9beb9; border-radius:9px; color:#315d5c; background:#eef5f2; cursor:pointer; font:700 12px/1.2 "Segoe UI",Arial,sans-serif; }
.share-link-card-actions button.danger { color:#8a2d27; border-color:#dfb9b1; background:#f7e8e4; }
.share-link-settings { margin-top:9px; }
.share-link-settings summary { display:inline-flex; align-items:center; list-style:none; }
.share-link-settings summary::-webkit-details-marker { display:none; }
.share-link-settings-form { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px 10px; margin-top:9px; padding:11px; border-radius:10px; background:#edf4f1; }
.share-link-settings-form label { margin:0; font-size:12px; }
.share-link-settings-form input,.share-link-settings-form select { width:100%; min-height:38px; padding:7px 9px; border:1px solid #a9beb9; border-radius:8px; background:#fff; }
.share-link-settings-form .wide { grid-column:1/-1; }
.share-link-settings-form button { grid-column:1/-1; color:#fff; border-color:#176b74; background:#176b74; }
@media(max-width:600px) { .share-link-settings-form { grid-template-columns:1fr; } .share-link-settings-form .wide { grid-column:1; } }
.source-audit-panel { max-height:min(760px,calc(100vh - 32px)); overflow:auto; }
.source-audit-icon { color:#fff; background:#d0a04e; transition:background .18s ease,transform .18s ease; }
.source-audit-icon.ready { background:#3f956c; }
.source-audit-icon.blocked { background:#b54e40; }
.source-audit-icon.checking { background:#d0a04e; }
.source-audit-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(92px,1fr)); gap:7px; max-height:360px; margin:12px 0 18px; overflow:auto; }
.source-audit-list button { min-height:38px; padding:7px; border:1px solid #d39b8e; border-radius:9px; color:#8d2f24; background:#fff3f0; cursor:pointer; font:700 12px/1.2 "Segoe UI",Arial,sans-serif; }
.source-audit-list .source-audit-ok { grid-column:1/-1; padding:14px; border-radius:10px; color:#24634a; background:#e5f4ea; text-align:center; }
.source-audit-refresh { width:100%; min-height:42px; border:0; border-radius:12px; color:#fff; background:#176b74; font-weight:750; cursor:pointer; }
.actual-size-panel { width:min(620px,calc(100vw - 32px)); }
.actual-size-icon { width:54px; font-size:17px; font-weight:800; background:#176b74; }
.actual-size-calibration-stage { display:flex; min-height:245px; margin:14px 0; padding:18px; align-items:center; justify-content:center; overflow:auto; border:1px solid #c7d7d3; border-radius:14px; background:linear-gradient(145deg,#f1f6f3,#dce8e4); }
.actual-size-calibration-card { box-sizing:border-box; display:flex; flex:0 0 auto; padding:18px; flex-direction:column; align-items:flex-start; justify-content:flex-end; border:2px solid #176b74; border-radius:9%; color:#fff; background:linear-gradient(145deg,#2f777b,#174b55); box-shadow:0 9px 24px #17383f3f; }
.actual-size-calibration-card span { font-size:15px; font-weight:750; }
.actual-size-calibration-card small { margin-top:3px; opacity:.82; }
.actual-size-calibration-controls { display:grid; grid-template-columns:48px minmax(0,1fr) 48px; gap:9px; align-items:center; }
.actual-size-calibration-controls button { min-height:44px; border:1px solid #9db8b2; border-radius:12px; color:#174d55; background:#eef5f2; font-size:24px; }
.actual-size-calibration-controls output { color:#526c69; font:650 12px/1.3 "Segoe UI",Arial,sans-serif; text-align:center; }
.actual-size-actions { display:flex; justify-content:flex-end; gap:9px; margin-top:16px; }
.actual-size-actions button { min-height:42px; padding:9px 13px; border:1px solid #a9beb9; border-radius:11px; color:#315d5c; background:#eef5f2; font-weight:700; }
.actual-size-actions #actualSizeApply { color:#fff; border-color:#176b74; background:#176b74; }
.actual-size-note { margin:13px 0 0!important; font-size:11px; }
.book-wrap { transition:filter .2s ease; }
body.album-front-closed:not(.viewer-mode-single) .book,body.album-back-closed:not(.viewer-mode-single) .book { background:transparent; box-shadow:none; }
body.album-front-closed .book::after,body.album-back-closed .book::after { display:none; }
body.album-front-closed:not(.viewer-mode-single) .page-holder.left { display:none; }
body.album-front-closed:not(.viewer-mode-single) .page-holder.right { left:auto; right:0; width:50%; }
body.album-back-closed:not(.viewer-mode-single) .page-holder.right { display:none; }
body.album-back-closed:not(.viewer-mode-single) .page-holder.left { left:0; width:50%; }
body.viewer-mode-single.album-front-closed .page-holder.left { display:block; left:0; width:100%; }
body.viewer-mode-single.album-front-closed .page-holder.right { display:none; }
@media(min-width:901px) and (hover:hover) {
  body.actual-size-mode .stage { justify-content:flex-start; align-items:flex-start; overflow:auto; }
  body.actual-size-mode .book-wrap { flex:0 0 auto; width:var(--actual-spread-width)!important; height:var(--actual-page-height)!important; max-width:none!important; margin:auto; aspect-ratio:auto!important; }
}
body.access-pending #editToggle,body.access-pending #frameNumbersToggle,body.access-pending #sourceAuditBadge,body.access-pending #sourceAuditDialog,body.access-pending #aiEditorToggle,body.access-pending #shareAlbum,body.access-pending #editorPanel,body.access-pending #aiChatPanel,body.access-pending #aiChatBackdrop,body.access-pending .object-toolbar,body.access-pending .photo-correction-flyout,body.shared-view #editToggle,body.shared-view #frameNumbersToggle,body.shared-view #sourceAuditBadge,body.shared-view #sourceAuditDialog,body.shared-view #aiEditorToggle,body.shared-view #shareAlbum,body.shared-view #editorPanel,body.shared-view #aiChatPanel,body.shared-view #aiChatBackdrop,body.shared-view .object-toolbar,body.shared-view .photo-correction-flyout { display:none!important; }
body.shared-view .stage,body.shared-view .bottom-bar { margin-right:0!important; }
body.shared-view .book-wrap { width:min(88vw,calc((100vh - 178px)*2))!important; }
.mobile-viewer-menu { display:none; }
.mobile-viewer-menu { position:fixed; z-index:90; top:max(10px,env(safe-area-inset-top)); right:max(10px,env(safe-area-inset-right)); color:#173f47; }
.mobile-viewer-menu>summary { display:grid; width:44px; height:44px; padding:0; place-items:center; border:1px solid #b4cbc6; border-radius:50%; color:#173f47; background:#fffef5ed; box-shadow:0 5px 18px #102f3b4a; cursor:pointer; font-size:21px; list-style:none; -webkit-tap-highlight-color:transparent; }
.mobile-viewer-menu>summary::-webkit-details-marker { display:none; }
.mobile-viewer-menu-panel { position:absolute; top:51px; right:0; box-sizing:border-box; display:grid; width:min(320px,calc(100vw - 20px)); max-height:calc(100vh - 72px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); max-height:calc(100dvh - 72px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); gap:9px; padding:15px; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; border:1px solid #b4cbc6; border-radius:16px; background:#fffef8f7; box-shadow:0 14px 38px #102f3b4d; backdrop-filter:blur(12px); scrollbar-width:thin; scrollbar-color:#8caaa5 transparent; }
.mobile-viewer-menu-panel strong { font:750 16px/1.2 "Segoe UI",Arial,sans-serif; }
.mobile-viewer-menu-panel label,.mobile-viewer-menu-panel small { color:#5b716f; font:650 12px/1.3 "Segoe UI",Arial,sans-serif; }
.mobile-viewer-menu-panel select,.mobile-viewer-menu-panel button { width:100%; min-height:42px; padding:8px 11px; border:1px solid #a9beb9; border-radius:11px; color:#174d55; background:#fff; font:650 14px/1.2 "Segoe UI",Arial,sans-serif; }
.mobile-viewer-menu-panel button { color:#fff; border-color:#176b74; background:#176b74; }
.mobile-round-action,.mobile-quick-modes { display:none; }
.mobile-round-action { position:fixed; z-index:89; right:max(10px,env(safe-area-inset-right)); width:44px; height:44px; padding:0; place-items:center; border:1px solid #b4cbc6; border-radius:50%; color:#173f47; background:#fffef5dc; box-shadow:0 5px 18px #102f3b3f; backdrop-filter:blur(8px); font:700 20px/1 "Segoe UI",Arial,sans-serif; -webkit-tap-highlight-color:transparent; }
.mobile-orientation-button { top:calc(max(10px,env(safe-area-inset-top)) + 52px); }
.mobile-quick-modes-toggle { top:calc(max(10px,env(safe-area-inset-top)) + 104px); }
.mobile-quick-modes { position:fixed; z-index:88; top:max(10px,env(safe-area-inset-top)); left:max(10px,env(safe-area-inset-left)); right:calc(max(10px,env(safe-area-inset-right)) + 54px); box-sizing:border-box; width:max-content; max-width:calc(100vw - 78px); padding:7px; border:1px solid #d1dedb9c; border-radius:17px; background:#f8fbf7c9; box-shadow:0 8px 25px #102f3b38; opacity:0; pointer-events:none; transform:translateY(-8px); transition:opacity .18s ease,transform .18s ease; backdrop-filter:blur(13px); }
.mobile-quick-modes.open { opacity:1; pointer-events:auto; transform:translateY(0); }
.mobile-quick-mode-row,.mobile-photo-presentation { display:flex; flex-wrap:wrap; gap:5px; }
.mobile-photo-presentation { margin-top:6px; padding-top:6px; border-top:1px solid #a9beb96b; }
.mobile-photo-presentation[hidden] { display:none; }
.mobile-quick-modes button { min-height:34px; padding:6px 9px; border:1px solid #a8bdb8a6; border-radius:999px; color:#214e53; background:#fffdf3d4; font:700 11px/1.15 "Segoe UI",Arial,sans-serif; white-space:nowrap; }
.mobile-quick-modes button[aria-pressed="true"] { color:#fff; border-color:#176b74; background:#176b74e8; }
.mobile-quick-modes .mobile-quick-home { width:100%; margin-bottom:6px; color:#fff; border-color:#176b74; background:#176b74e8; }
.mobile-photo-option { display:none; align-items:center; gap:9px; min-height:40px; padding:7px 9px; border:1px solid #c4d4d0; border-radius:10px; background:#f6faf8; cursor:pointer; }
.mobile-photo-option input { width:18px; height:18px; margin:0; flex:0 0 auto; accent-color:#176b74; }
.mobile-photo-option span { color:#315d5c; font:650 12px/1.25 "Segoe UI",Arial,sans-serif; }
@media (max-width:900px),(hover:none) and (pointer:coarse) {
  body.access-pending,body.shared-view { overflow:hidden; overscroll-behavior:none; }
  body.access-pending .app,body.shared-view .app { width:100vw; height:100dvh; min-height:100dvh; overflow:hidden; }
  body.access-pending .toolbar,body.shared-view .toolbar,body.access-pending .bottom-bar,body.shared-view .bottom-bar { display:none!important; }
  body.access-pending .stage,body.shared-view .stage { width:100vw; height:100dvh; min-height:100dvh; padding:0!important; gap:0!important; margin:0!important; }
  body.access-pending .book-wrap,body.shared-view .book-wrap { width:var(--album-spread-edge-width,min(100vw,calc(100dvh * 2)))!important; max-width:none!important; aspect-ratio:var(--album-spread-aspect,2/1); filter:none; }
  body.shared-view.viewer-mode-book .stage { padding:18px!important; background:radial-gradient(ellipse at 50% 46%,#dce9e6,#9ebaba 72%,#78989b); }
  body.shared-view.viewer-mode-book .book-wrap { width:var(--album-spread-book-width,min(calc(100vw - 36px),calc((100dvh - 36px) * 2)))!important; filter:drop-shadow(0 16px 18px #102f3b75); }
  body.shared-view.viewer-mode-book .book { border-radius:5px 10px 10px 5px; box-shadow:0 0 0 2px #fffdf0b8,0 0 0 5px #31504d40; }
  body.shared-view.viewer-mode-edge .book-wrap { width:var(--album-spread-edge-width,min(100vw,calc(100dvh * 2)))!important; }
  body.shared-view.viewer-mode-edge .book { border-radius:0; }
  body.shared-view.viewer-mode-single .stage { padding:16px!important; background:radial-gradient(ellipse at 50% 46%,#dce9e6,#91b0b1 76%,#769597); }
  body.shared-view.viewer-mode-single .book-wrap { width:var(--album-single-width,min(calc(100vw - 32px),calc(100dvh - 32px)))!important; aspect-ratio:var(--album-page-aspect,1/1); filter:drop-shadow(0 15px 18px #102f3b6b); }
  body.shared-view.viewer-mode-single .book { border-radius:7px; background:#f7f2e9; box-shadow:0 0 0 2px #fffdf0c7,0 0 0 5px #31504d3d; }
  body.shared-view.viewer-mode-single .book::after { display:none; }
  body.shared-view.viewer-mode-single .page-holder.left { left:0; width:100%; }
  body.shared-view.viewer-mode-single .page-holder.right { display:none; }
  body.shared-view.viewer-mode-single .paper { box-shadow:inset 0 0 0 1px #777c7240; }
  body.shared-view.viewer-mode-photos .stage { padding:0!important; background:#0a0e10; }
  body.shared-view.viewer-mode-photos .book-wrap { width:100vw!important; height:100dvh; max-width:none!important; aspect-ratio:auto; filter:none; }
  body.shared-view.viewer-mode-photos .book { border-radius:0; background:#0a0e10; box-shadow:none; }
  body.shared-view.viewer-mode-photos .book::after { display:none; }
  body.shared-view.viewer-mode-photos .page-holder.left { left:0; width:100%; }
  body.shared-view.viewer-mode-photos .page-holder.right { display:none; }
  body.shared-view.viewer-mode-photos .mobile-photo-option { display:flex; }
  body.shared-view.viewer-mode-book.album-front-closed .book,body.shared-view.viewer-mode-book.album-back-closed .book { border-radius:0; background:transparent; box-shadow:none; }
  body.shared-view.viewer-mode-book.album-front-closed .page-holder.right,body.shared-view.viewer-mode-book.album-back-closed .page-holder.left { border-radius:7px; box-shadow:0 0 0 2px #fffdf0b8,0 0 0 5px #31504d40; }
  .gallery-photo-view { position:absolute; inset:0; display:grid; padding:max(14px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left)); box-sizing:border-box; place-items:center; overflow:hidden; color:#f7f7f3; background:#0a0e10; font:700 16px/1.4 "Segoe UI",Arial,sans-serif; text-align:center; }
  .gallery-photo-view>.gallery-raw-photo { display:block; width:min(100vw,calc(100dvh * var(--gallery-photo-ratio,1))); height:min(100dvh,calc(100vw / var(--gallery-photo-ratio,1))); max-width:100%; max-height:100%; object-fit:contain; object-position:center; opacity:0; transition:opacity .18s ease; }
  .gallery-photo-view>.gallery-raw-photo.photo-loaded { opacity:1; }
  .gallery-album-card { --accent:#f0c38e; position:relative!important; width:min(84vw,calc(78dvh * var(--gallery-frame-ratio,1)))!important; height:min(78dvh,calc(84vw / var(--gallery-frame-ratio,1)))!important; max-width:84vw; max-height:78dvh; overflow:visible!important; container-type:inline-size; transform:rotate(var(--gallery-frame-rotation,0deg))!important; }
  .gallery-album-card:hover { transform:rotate(var(--gallery-frame-rotation,0deg))!important; }
  .gallery-album-card>.photo-shadow-shell { pointer-events:none; }
  .gallery-album-card.gallery-background-item>.photo-shadow-shell { filter:drop-shadow(0 1.4cqw 2.1cqw #000a); }
  .gallery-album-card.gallery-background-item>.photo-shadow-shell::before { display:none; }
  .gallery-frame-wash { position:absolute; z-index:2; inset:0; display:block; background:linear-gradient(180deg,#082c40b8 0%,#082c4059 31%,transparent 55%,#082c40ab 100%); pointer-events:none; }
  .gallery-contained-label { z-index:5; color:#fff8e8; text-align:left; }
  .gallery-contained-label.tone-accent { color:var(--accent); }
  .gallery-contained-label.tone-ink { color:#173f47; text-shadow:0 1px 2px #fff9; }
  .gallery-photo-view:not(.source-missing):has(img:not(.photo-loaded))::after { content:""; position:absolute; left:50%; top:50%; width:32px; height:32px; margin:-16px; border:3px solid #ffffff38; border-top-color:#fff; border-radius:50%; animation:album-turn-spinner .75s linear infinite; }
  body.shared-view .nav-edge { position:fixed; z-index:72; top:50%; display:grid!important; width:34px; min-width:34px; height:68px; padding:0; place-items:center; border:1px solid #b4cbc6a6; border-radius:14px; color:#174d55; background:#fffef5b8; box-shadow:0 5px 18px #102f3b35; opacity:.58; font-size:31px; line-height:1; transform:translateY(-50%); transition:opacity .16s,background .16s; -webkit-tap-highlight-color:transparent; }
  body.shared-view .nav-edge.prev { left:max(4px,env(safe-area-inset-left)); }
  body.shared-view .nav-edge.next { right:max(4px,env(safe-area-inset-right)); }
  body.shared-view .nav-edge:active { opacity:1; background:#fffef5f2; }
  body.shared-view .nav-edge:disabled { display:none!important; }
  body.shared-view.viewer-mode-photos .nav-edge { display:none!important; }
  body.shared-view .mobile-viewer-menu { display:block; }
  body.shared-view .mobile-round-action { display:grid; }
  body.shared-view .mobile-quick-modes { display:block; }
  body.shared-view .stage,body.shared-view .book { touch-action:pan-y pinch-zoom; }
  body.shared-view.viewer-mode-photos .stage,body.shared-view.viewer-mode-photos .book { touch-action:pan-x pan-y pinch-zoom; }
  body.mobile-view-zoomed .nav-edge { opacity:0!important; pointer-events:none; }
}
.photo-viewport,.scene-button { background:#e5eeeb; }
.photo-viewport img,.scene-button>img { opacity:0; transition:opacity .18s ease; }
.photo-viewport img.photo-loaded,.scene-button>img.photo-loaded { opacity:1; }
.photo-card:not(.source-missing):has(img:not(.photo-loaded)) .photo-viewport::after,.scene-button:not(.source-missing):has(>img:not(.photo-loaded))::after { content:""; position:absolute; inset:0; background:linear-gradient(105deg,#e4ece9 30%,#f8fbfa 48%,#e4ece9 66%); background-size:220% 100%; animation:album-photo-loading 1.15s linear infinite; }
@keyframes album-photo-loading { to { background-position:-220% 0; } }
body.album-warming .book { opacity:0; }
body.album-warming .stage { position:relative; }
body.album-warming .stage::after { content:"Подготавливаю альбом…"; position:absolute; z-index:80; left:50%; top:50%; padding:12px 18px; border:1px solid #b7ccc7; border-radius:999px; color:#244d52; background:#fffef5f2; box-shadow:0 10px 32px #17333d2e; font:700 14px/1.2 "Segoe UI",Arial,sans-serif; transform:translate(-50%,-50%); }
.app.turn-preparing .nav-edge,.app.turn-preparing .toolbar .arrow { cursor:progress; }
.app.turn-preparing .book-wrap::before { content:""; position:absolute; z-index:95; left:50%; top:calc(50% - 18px); width:30px; height:30px; margin:-15px; border:3px solid #d7e6e1; border-top-color:#176b74; border-radius:50%; animation:album-turn-spinner .75s linear infinite; }
.app.turn-preparing .book-wrap::after { content:"Подготавливаю разворот…"; position:absolute; z-index:94; left:50%; top:50%; min-width:205px; padding:48px 18px 14px; border:1px solid #b7ccc7; border-radius:18px; color:#244d52; background:#fffef5f2; box-shadow:0 12px 40px #17333d3d; font:700 14px/1.2 "Segoe UI",Arial,sans-serif; text-align:center; transform:translate(-50%,-50%); }
body.viewer-mode-photos .app.turn-preparing .book-wrap::after { content:"Подготавливаю фотографию…"; }
@keyframes album-turn-spinner { to { transform:rotate(360deg); } }
.app.editing .stage { margin-right:345px; }
.app.editing .book-wrap { width:min(calc(100vw - 430px),calc((100vh - 178px)*2)); }
.app.editing .bottom-bar { margin-right:345px; }
.editor-panel { position:fixed; z-index:45; right:0; top:60px; bottom:0; width:345px; display:flex; flex-direction:column; color:#173d43; background:#f8f7f1; border-left:1px solid #a9bdb6; box-shadow:-9px 0 22px #153d4230; font-size:13px; }
.editor-panel[hidden] { display:none; }
.editor-head { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:12px 14px 7px; }
.editor-head strong { font:normal 20px Georgia,serif; }
.editor-head span { max-width:130px; text-align:right; color:#47716d; font-size:11px; }
.editor-head span.error { color:#a33e30; }
.editor-history,.editor-tabs,.editor-file-actions,.library-switch,.editor-actions { display:flex; gap:6px; }
.editor-history { padding:0 12px 9px; }
.editor-shortcuts { margin:0 12px 9px; border:1px solid #c6d2ca; border-radius:8px; background:#fffefa; }
.editor-shortcuts summary { padding:7px 9px; cursor:pointer; color:#315d5c; font-weight:650; }
.editor-shortcut-note { margin:0; padding:0 9px 7px; color:#526f6c; font-size:11px; }
.editor-shortcut-list { display:grid; grid-template-columns:max-content 1fr; gap:6px 9px; padding:2px 9px 10px; color:#526f6c; font-size:11px; line-height:1.4; }
.editor-shortcut-list>span:nth-child(odd) { color:#214f53; white-space:nowrap; }
.editor-shortcut-list kbd { display:inline-block; min-width:17px; padding:1px 4px; border:1px solid #aebdb7; border-bottom-width:2px; border-radius:4px; color:#244e51; background:#f3f6f2; font:600 10px/1.35 "Segoe UI",Arial,sans-serif; text-align:center; }
.editor-global-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; padding:0 12px 10px; }
.editor-global-actions button { min-width:0; padding:8px 4px; font-size:11.5px; font-weight:650; white-space:nowrap; }
.editor-tabs { padding:0 12px; border-bottom:1px solid #c6d2ca; }
.editor-tabs button { flex:1; border:0; border-radius:8px 8px 0 0; background:#e7eee8; padding:9px 4px; }
.editor-tabs button[hidden] { display:none; }
.editor-tabs button.active { background:#cee2dc; font-weight:650; }
.editor-scroll { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; padding:12px; }
.editor-section[hidden] { display:none; }
.editor-panel button,.editor-file-actions label,.import-label { cursor:pointer; }
.editor-panel button,.editor-file-actions label,.import-label { color:#1c4d52; border:1px solid #a2bcb4; border-radius:7px; background:#fffefa; padding:7px 9px; line-height:1.2; }
.editor-panel button:hover,.editor-file-actions label:hover,.import-label:hover { background:#e8f3ee; }
.editor-panel button:disabled { cursor:default; opacity:.4; }
.editor-panel button.danger { color:#933f35; border-color:#d2a49a; }
.editor-history button { flex:1; }
.editor-file-actions { padding:10px; border-top:1px solid #c6d2ca; flex-wrap:wrap; }
.editor-file-actions>* { flex:1; text-align:center; white-space:nowrap; }
.editor-hint { margin:4px 0 12px; color:#5c7572; line-height:1.45; font-size:12px; }
.editor-note { padding:9px; margin:10px 0; background:#e9f1ec; border-radius:7px; line-height:1.4; }
.field-label { display:block; margin:11px 0; font-weight:600; }
.field-label input,.field-label textarea,.field-label select { display:block; box-sizing:border-box; width:100%; margin-top:5px; padding:8px; border:1px solid #a6bdb7; border-radius:6px; color:#173d43; background:white; font:normal 13px "Segoe UI",Arial,sans-serif; }
.field-label textarea { resize:vertical; min-height:55px; }
.field-label textarea.text-caption-editor { min-height:170px; max-height:50vh; font-size:14px; line-height:1.5; }
.check-row { display:flex; gap:10px; align-items:flex-start; padding:9px 2px; cursor:pointer; }
.check-row input { margin-top:4px; accent-color:#176b74; }
.check-row small { display:block; margin-top:3px; color:#63807c; line-height:1.35; }
.editor-actions { margin:8px 0; flex-wrap:wrap; }
.editor-actions button { flex:1; min-width:105px; }
.editor-actions .field-label { flex:1; min-width:105px; margin:0; }
.library-switch { margin-bottom:10px; }
.library-switch button { flex:1; }
.library-switch button.active { background:#176b74; color:white; }
.library-date-filter { margin:10px 0; padding:8px 10px 10px; border:1px solid #b8cbc4; border-radius:8px; background:#f1f6f2; }
.library-date-filter[disabled] { opacity:.55; }
.library-date-filter legend { padding:0 5px; color:#315d5c; font-weight:650; font-size:12px; }
.library-date-filter .field-label { margin:4px 0; font-size:12px; }
.library-date-filter .check-row { padding:5px 0 8px; }
.library-date-filter>button { width:100%; }
.filter-status { min-height:16px; margin-top:7px; color:#52716d; font-size:11px; line-height:1.35; }
.photo-source-actions { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin:10px 0 12px; }
.photo-source-actions .import-label { display:flex; min-height:38px; margin:0; align-items:center; justify-content:center; box-sizing:border-box; text-align:center; }
.yandex-disk-open::before { content:'Я'; display:grid; width:19px; height:19px; margin-right:6px; place-items:center; border-radius:50%; color:#fff; background:#ff3333; font-weight:800; }
.yandex-disk-panel { margin:10px 0 14px; padding:10px; border:1px solid #b3c7c0; border-radius:10px; background:#f7faf7; }
.yandex-disk-panel[hidden] { display:none; }
.yandex-disk-head,.yandex-disk-path,.yandex-disk-footer { display:flex; align-items:center; gap:7px; }
.yandex-disk-head { justify-content:space-between; }
.yandex-disk-head h3 { margin:0; font:normal 19px Georgia,serif; }
.yandex-disk-head p { margin:3px 0 0; color:#5b7773; font-size:11px; }
.yandex-disk-head>button { width:31px; height:31px; padding:0; border-radius:50%; font-size:18px; }
.yandex-disk-path { margin:9px 0; }
.yandex-disk-path strong { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; }
.yandex-disk-path button { padding:6px 7px; font-size:11px; }
.yandex-disk-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; margin-top:8px; }
.yandex-disk-item { position:relative; min-width:0; padding:5px!important; text-align:left; }
.yandex-disk-item img { display:block; width:100%; height:90px; border-radius:4px; background:#dce7e1; object-fit:contain; }
.yandex-disk-item strong,.yandex-disk-item small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.yandex-disk-item strong { margin-top:4px; font-size:11px; }
.yandex-disk-item small { color:#617975; font-size:9px; }
.yandex-disk-item.selected { border-color:#176b74; background:#dcece6; box-shadow:0 0 0 1px #176b74; }
.yandex-disk-folder { min-height:70px; }
.yandex-disk-folder::before { content:'📁'; display:block; margin:5px 0; font-size:27px; }
.yandex-disk-footer { position:sticky; bottom:-12px; z-index:3; flex-wrap:wrap; margin:10px -10px -10px; padding:9px 10px; border-top:1px solid #c3d3cd; background:#f7faf7f2; }
.yandex-disk-footer span { flex:1; min-width:80px; font-size:11px; }
.yandex-disk-footer button { padding:6px 8px; font-size:11px; }
.library-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.library-item { min-width:0; display:flex; flex-direction:column; text-align:left; padding:5px!important; }
.library-item img { width:100%; height:96px; object-fit:contain; background:#dce7e1; border-radius:3px; }
.library-item strong { margin-top:4px; font-size:12px; }
.library-item small { display:block; color:#5d7672; font-size:10px; line-height:1.3; min-height:26px; }
.library-item.lowres { border-color:#d49b6e; }
.library-row { position:relative; min-width:0; }
.library-row .library-item { width:100%; }
.library-remove { position:absolute; top:7px; right:7px; width:27px; height:27px; padding:0!important; border:1px solid #9b5147!important; border-radius:50%!important; background:#fff4ed!important; color:#9b5147!important; font-size:19px!important; line-height:20px!important; box-shadow:0 2px 7px #203b3b55; }
.library-empty { grid-column:1/-1; color:#607772; line-height:1.45; padding:12px 2px; }
.property-title { font:normal 20px Georgia,serif; margin:3px 0 8px; }
.photo-correction-panel { margin:14px 0; padding:10px; border:1px solid #bfd0cc; border-radius:10px; background:#f8fbf9; }
.photo-correction-panel>summary { cursor:pointer; color:#174d55; font:600 15px "Segoe UI",Arial,sans-serif; }
.frame-shape-panel { margin:14px 0; padding:10px; border:1px solid #bfd0cc; border-radius:10px; background:#f8fbf9; }
.frame-shape-panel>summary { cursor:pointer; color:#174d55; font:600 15px "Segoe UI",Arial,sans-serif; }
.correction-group-title { margin:12px 0 5px; color:#456965; font:600 12px "Segoe UI",Arial,sans-serif; text-transform:uppercase; letter-spacing:.04em; }
.correction-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px 10px; }
.correction-control { min-width:0; color:#294c4e; font:600 11px "Segoe UI",Arial,sans-serif; }
.correction-control>span { display:flex; justify-content:space-between; gap:6px; }
.correction-control output { color:#176b74; font-variant-numeric:tabular-nums; }
.correction-control input { width:100%; margin:4px 0 0; accent-color:#176b74; }
.range-stepper { display:grid; grid-template-columns:30px minmax(0,1fr) 30px; gap:5px; align-items:center; width:100%; margin-top:5px; }
.field-label .range-stepper input,.correction-control .range-stepper input { min-width:0; width:100%; height:30px; margin:0; padding:0; border:0; background:transparent; accent-color:#176b74; }
.editor-panel button.range-step-button,.photo-correction-flyout button.range-step-button { display:grid; width:30px; min-width:30px; height:30px; padding:0; place-items:center; border-radius:7px; color:#176b74; background:#fffefa; font:700 19px/1 "Segoe UI",Arial,sans-serif; }
.editor-panel button.range-step-button:hover:not(:disabled),.photo-correction-flyout button.range-step-button:hover:not(:disabled) { border-color:#4f8d85; background:#dff0e9; }
.editor-panel button.range-step-button:focus-visible,.photo-correction-flyout button.range-step-button:focus-visible { outline:2px solid #e39e46; outline-offset:2px; }
.editor-panel button.range-step-button:disabled,.photo-correction-flyout button.range-step-button:disabled { color:#8aa19d; background:#edf1ed; opacity:.55; }
.compare-photo-button[aria-pressed="true"] { color:white; border-color:#176b74; background:#176b74; }
.property-meta { padding:8px; background:#eaf0e9; border-radius:6px; font-size:12px; line-height:1.45; }
.photo-recovery-card { margin:12px 0; padding:10px; border:1px solid #b9ccc8; border-radius:10px; background:#f8fbf9; }
.photo-recovery-card>summary { cursor:pointer; color:#174d55; font:700 14px/1.35 "Segoe UI",Arial,sans-serif; }
.recovery-status { margin:9px 0; padding:7px 9px; border-radius:7px; font:650 11px/1.35 "Segoe UI",Arial,sans-serif; }
.recovery-status.available { color:#22634d; background:#e1f2e8; }
.recovery-status.missing { color:#91472e; background:#fff0e4; }
.recovery-facts { display:grid; grid-template-columns:minmax(84px,.7fr) minmax(0,1.5fr); gap:5px 9px; margin:9px 0 12px; font:12px/1.35 "Segoe UI",Arial,sans-serif; }
.recovery-facts dt { color:#617a76; }
.recovery-facts dd { min-width:0; margin:0; color:#264c4f; overflow-wrap:anywhere; }
.recovery-facts small { display:block; margin-top:2px; color:#718883; }
.recovery-facts code { font:10px/1.35 Consolas,"Courier New",monospace; }
.recovery-hash { user-select:all; }
.recovery-description { min-height:96px; resize:vertical; }
.property-warning { color:#9b4d2f; font-weight:600; }
.editor-notice { position:fixed; z-index:130; left:50%; top:82px; max-width:min(520px,calc(100vw - 32px)); padding:11px 16px; border:1px solid #e0b66e; border-radius:11px; color:#704908; background:#fff8e8; box-shadow:0 10px 28px #122e3c38; font:650 13px/1.4 "Segoe UI",Arial,sans-serif; opacity:0; pointer-events:none; transform:translate(-50%,-12px); transition:opacity .18s ease,transform .18s ease; }
.editor-notice.show { opacity:1; transform:translate(-50%,0); }
.editor-notice.error { border-color:#dda39b; color:#8e332a; background:#fff2ef; }
.inline-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.inline-fields .field-label { margin:7px 0; }
.editor-mode-note { color:#5b7773; font-size:12px; line-height:1.4; }
.app.editing .paper[data-pageuid] { cursor:crosshair; }
.app.editing .scene-button { cursor:grab; touch-action:none; }
.app.editing .scene-button:active { cursor:grabbing; }
.app.editing .nav-edge { display:none; }
.paper.filler { background:#eee9dc; }
.crop-anchor-grid { display:grid; grid-template-columns:repeat(3,32px); gap:5px; margin:8px 0 12px; }
.crop-anchor-grid button { width:32px; height:32px; padding:0; border:1px solid #91ada8; border-radius:5px; background:#f6f7ef; color:#23565d; }
.crop-anchor-grid button.active { background:#1a7480; color:#fff; border-color:#1a7480; }
.app.editing .paper.active-page { box-shadow:inset 0 0 0 2px #e9ab55!important; }
.app.editing .paper.drop-target { box-shadow:inset 0 0 0 5px #27aa9c!important; }
.paper.file-drop-target { box-shadow:inset 0 0 0 7px #1f9f92,0 0 0 4px #fff8!important; filter:saturate(1.08) brightness(1.03); }
.photo-import-progress { position:fixed; z-index:145; left:50%; bottom:24px; display:grid; grid-template-columns:48px minmax(190px,1fr) auto; grid-template-rows:auto auto; column-gap:12px; row-gap:3px; width:min(430px,calc(100vw - 28px)); padding:13px 15px 11px; border:1px solid #94bdb5; border-radius:15px; color:#173d43; background:#fffef8f2; box-shadow:0 14px 38px #102f3b45; transform:translateX(-50%); backdrop-filter:blur(9px); }
.photo-import-progress[hidden] { display:none; }
.photo-import-animation { position:relative; grid-row:1/3; width:48px; height:40px; align-self:center; overflow:hidden; }
.photo-import-card,.photo-import-target { position:absolute; display:block; width:25px; height:30px; border-radius:4px; }
.photo-import-card { left:1px; top:5px; z-index:2; border:2px solid #fff; background:linear-gradient(145deg,#7fc2ba 0 43%,#e5b075 44% 66%,#4e7d7b 67%); box-shadow:0 3px 7px #173d4350; animation:photo-import-fly 1.15s ease-in-out infinite; }
.photo-import-target { right:1px; top:3px; border:2px solid #5b8f88; background:#e6eee8; transform:rotate(5deg); }
.photo-import-copy { min-width:0; }
.photo-import-copy strong,.photo-import-copy small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.photo-import-copy strong { font:700 14px/1.3 "Segoe UI",Arial,sans-serif; }
.photo-import-copy small { margin-top:2px; color:#54736f; font:500 12px/1.3 "Segoe UI",Arial,sans-serif; }
.photo-import-count { align-self:start; min-width:36px; padding:3px 7px; border-radius:999px; color:#fff; background:#176b74; font:700 11px/1.2 "Segoe UI",Arial,sans-serif; text-align:center; }
.photo-import-bar { grid-column:2/4; height:3px; margin-top:4px; overflow:hidden; border-radius:999px; background:#d9e5e0; }
.photo-import-bar span { display:block; width:38%; height:100%; border-radius:inherit; background:#1f8e84; animation:photo-import-bar 1.05s ease-in-out infinite; }
.photo-import-progress.success { border-color:#8eb7a0; background:#f3fff5f5; }
.photo-import-progress.success .photo-import-card { left:13px; top:5px; border:0; background:#2e8a62; animation:none; transform:none; }
.photo-import-progress.success .photo-import-card::after { content:'✓'; display:grid; height:100%; place-items:center; color:#fff; font-size:19px; font-weight:800; }
.photo-import-progress.success .photo-import-target,.photo-import-progress.success .photo-import-bar { display:none; }
.photo-import-progress.error { border-color:#d49d94; color:#8d342c; background:#fff5f2f5; }
.photo-import-progress.error .photo-import-card { left:13px; top:5px; border:0; background:#b65045; animation:none; transform:none; }
.photo-import-progress.error .photo-import-card::after { content:'!'; display:grid; height:100%; place-items:center; color:#fff; font-size:19px; font-weight:800; }
.photo-import-progress.error .photo-import-target,.photo-import-progress.error .photo-import-bar { display:none; }
.photo-import-page-progress { position:absolute; z-index:60; inset:0; display:grid; place-items:center; pointer-events:none; background:#0f38443b; animation:photo-import-page-pulse 1.4s ease-in-out infinite; }
.photo-import-page-progress span { max-width:82%; padding:9px 13px; border:1px solid #ffffffb8; border-radius:999px; color:#fff; background:#123f49e8; box-shadow:0 5px 18px #08252d66; font:700 clamp(10px,1.8cqw,16px)/1.25 "Segoe UI",Arial,sans-serif; text-align:center; }
@keyframes photo-import-fly { 0% { transform:translateX(0) rotate(-5deg) scale(.92); opacity:.72; } 55%,70% { transform:translateX(20px) rotate(5deg) scale(.78); opacity:1; } 100% { transform:translateX(25px) rotate(5deg) scale(.72); opacity:0; } }
@keyframes photo-import-bar { 0% { transform:translateX(-105%); } 100% { transform:translateX(365%); } }
@keyframes photo-import-page-pulse { 0%,100% { background:#0f384431; } 50% { background:#0f384451; } }
.photo-frame-definitions { position:absolute; overflow:hidden; pointer-events:none; }
.photo-card { overflow:visible; }
.photo-shadow-shell { position:absolute; z-index:1; inset:0; display:block; overflow:visible; isolation:isolate; pointer-events:none; filter:drop-shadow(0 .8cqw 1.1cqw #19343e70); transition:filter .2s; }
.photo-shadow-shell::before { content:""; position:absolute; z-index:-1; inset:calc(-1 * var(--photo-frame-width,.65cqw)); display:block; background:var(--photo-frame-color,#fff9ed); pointer-events:none; }
.paper.hero .photo-card>.photo-shadow-shell::before { display:none; }
.scene-button { overflow:hidden; }
.scene-button .scene-photo { position:absolute; max-width:none; }
.photo-viewport { position:absolute; inset:0; display:block; width:100%; height:100%; overflow:hidden; }
.photo-viewport img { position:absolute; display:block; max-width:none; pointer-events:none; }
.photo-card[data-frame-shape="rounded"]>.photo-shadow-shell::before,.photo-card[data-frame-shape="rounded"] .photo-viewport,.frame-shape-option[data-shape="rounded"] span { border-radius:var(--frame-radius,24%); }
.photo-card[data-frame-shape="circle"]>.photo-shadow-shell::before,.photo-card[data-frame-shape="ellipse"]>.photo-shadow-shell::before,.photo-card[data-frame-shape="circle"] .photo-viewport,.photo-card[data-frame-shape="ellipse"] .photo-viewport,.frame-shape-option[data-shape="circle"] span,.frame-shape-option[data-shape="ellipse"] span { border-radius:50%; }
.photo-card[data-frame-shape="pill"]>.photo-shadow-shell::before,.photo-card[data-frame-shape="pill"] .photo-viewport,.frame-shape-option[data-shape="pill"] span { border-radius:999px; }
.photo-card[data-frame-shape="diamond"]>.photo-shadow-shell::before,.photo-card[data-frame-shape="diamond"] .photo-viewport,.frame-shape-option[data-shape="diamond"] span { clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%); }
.photo-card[data-frame-shape="triangle"]>.photo-shadow-shell::before,.photo-card[data-frame-shape="triangle"] .photo-viewport,.frame-shape-option[data-shape="triangle"] span { clip-path:polygon(50% 0,100% 100%,0 100%); }
.photo-card[data-frame-shape="hexagon"]>.photo-shadow-shell::before,.photo-card[data-frame-shape="hexagon"] .photo-viewport,.frame-shape-option[data-shape="hexagon"] span { clip-path:polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%); }
.photo-card[data-frame-shape="octagon"]>.photo-shadow-shell::before,.photo-card[data-frame-shape="octagon"] .photo-viewport,.frame-shape-option[data-shape="octagon"] span { clip-path:polygon(29% 0,71% 0,100% 29%,100% 71%,71% 100%,29% 100%,0 71%,0 29%); }
.photo-card[data-frame-shape="star"]>.photo-shadow-shell::before,.photo-card[data-frame-shape="star"] .photo-viewport,.frame-shape-option[data-shape="star"] span { clip-path:polygon(50% 2%,65% 33%,98% 36%,73% 58%,80% 92%,50% 75%,20% 92%,27% 58%,2% 36%,35% 33%); }
.photo-card[data-frame-shape="heart"]>.photo-shadow-shell::before,.photo-card[data-frame-shape="heart"] .photo-viewport,.frame-shape-option[data-shape="heart"] span { clip-path:polygon(50% 94%,8% 62%,3% 37%,10% 16%,29% 6%,50% 22%,71% 6%,90% 16%,97% 37%,92% 62%); clip-path:url(#photo-frame-heart); }
.photo-card[data-frame-shape="arch"]>.photo-shadow-shell::before,.photo-card[data-frame-shape="arch"] .photo-viewport,.frame-shape-option[data-shape="arch"] span { border-radius:50% 50% 7% 7% / 42% 42% 7% 7%; }
.photo-card[data-frame-shape="shield"]>.photo-shadow-shell::before,.photo-card[data-frame-shape="shield"] .photo-viewport,.frame-shape-option[data-shape="shield"] span { clip-path:polygon(8% 5%,92% 5%,92% 57%,78% 79%,50% 98%,22% 79%,8% 57%); }
.photo-card[data-frame-shape="ticket"]>.photo-shadow-shell::before,.photo-card[data-frame-shape="ticket"] .photo-viewport,.frame-shape-option[data-shape="ticket"] span { clip-path:polygon(0 0,100% 0,100% 34%,92% 42%,100% 50%,92% 58%,100% 66%,100% 100%,0 100%,0 66%,8% 58%,0 50%,8% 42%,0 34%); }
.frame-shape-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; margin:8px 0 12px; }
.frame-shape-option { display:flex; min-width:0; height:58px; padding:5px 3px 4px; flex-direction:column; align-items:center; justify-content:center; gap:4px; border:1px solid #b9cfca; border-radius:9px; color:#174d55; background:#f7fbf9; cursor:pointer; font:600 10px/1.1 "Segoe UI",Arial,sans-serif; }
.frame-shape-option:hover { border-color:#347c7a; background:#eef8f4; }
.frame-shape-option.active { border-color:#175e68; box-shadow:0 0 0 2px #175e6828; background:#deeee8; }
.frame-shape-option span { display:block; width:25px; height:25px; background:linear-gradient(145deg,#66a9a4,#1d6670); }
.frame-shape-option[data-shape="ellipse"] span,.frame-shape-option[data-shape="pill"] span { width:34px; height:22px; }
.frame-number { position:absolute; z-index:18; display:none; flex-direction:column; align-items:flex-start; gap:.25cqw; min-height:3.4cqw; padding:.55cqw 1cqw .65cqw; border:1px solid #fff8e8d9; border-radius:1.35cqw; color:#fff; background:#123f49e8; box-shadow:0 .35cqw .9cqw #061d2675; font:700 clamp(10px,1.65cqw,18px)/1 "Segoe UI",Arial,sans-serif; letter-spacing:.015em; white-space:nowrap; pointer-events:none; text-shadow:0 1px 1px #07191e; }
.frame-number .frame-date { font:600 clamp(8px,1.15cqw,13px)/1 "Segoe UI",Arial,sans-serif; letter-spacing:.025em; opacity:.9; }
.app.show-frame-numbers .frame-number { display:inline-flex; }
.frame-number[data-frame-position="top-left"] { top:.8cqw; right:auto; bottom:auto; left:.8cqw; transform:none; }
.frame-number[data-frame-position="top-right"] { top:.8cqw; right:.8cqw; bottom:auto; left:auto; transform:none; }
.frame-number[data-frame-position="bottom-left"] { top:auto; right:auto; bottom:.8cqw; left:.8cqw; transform:none; }
.frame-number[data-frame-position="bottom-right"] { top:auto; right:.8cqw; bottom:.8cqw; left:auto; transform:none; }
.frame-number[data-frame-position="center"] { top:50%; right:auto; bottom:auto; left:50%; transform:translate(-50%,-50%); }
.frame-number-background { z-index:18; }
.frame-number-background[data-frame-position="top-left"] { top:2.5%; left:2.5%; }
.frame-number-background[data-frame-position="top-right"] { top:2.5%; right:2.5%; }
.frame-number-background[data-frame-position="bottom-left"] { bottom:2.5%; left:2.5%; }
.frame-number-background[data-frame-position="bottom-right"] { right:2.5%; bottom:2.5%; }
.app.editing .photo-card { cursor:grab; touch-action:none; }
.app.editing .photo-card:active { cursor:grabbing; }
.app.editing .photo-card.panning-photo { cursor:move; cursor:grabbing; }
.app.editing .photo-card.selected { outline-color:#f4b456; box-shadow:none; z-index:12!important; }
.app.editing .photo-card.selected>.photo-shadow-shell { filter:drop-shadow(0 0 .2cqw #123f4fd4) drop-shadow(0 1cqw 1.35cqw #19343e88); }
.app.editing .photo-card.selected:not(:has(.edit-handle)) { outline-color:#e1a85e; }
.app.editing .photo-card.swap-target { outline-color:#22a99a; box-shadow:none; }
.app.editing .photo-card.swap-target>.photo-shadow-shell { filter:drop-shadow(0 0 .35cqw #22a99add) drop-shadow(0 1cqw 1.35cqw #19343e88); }
.drag-ghost { position:fixed; z-index:90; width:112px; max-height:118px; object-fit:contain; pointer-events:none; border:3px solid #f9f6e9; box-shadow:0 8px 20px #19343e77; opacity:.9; background:#fff; }
.photo-card .edit-handle { display:none; }
.app.editing .photo-card.selected .edit-handle { display:block; }
.edit-handle { position:absolute; z-index:15; width:13px; height:13px; border:2px solid #195c68; background:#fffdfa; border-radius:3px; box-shadow:0 1px 4px #122e3c8a; touch-action:none; }
.edit-handle.corner { cursor:nwse-resize; }
.edit-handle.edge { border-radius:50%; background:#f6c77d; }
.edit-handle[data-handle="nw"] { left:-7px; top:-7px; }
.edit-handle[data-handle="ne"] { right:-7px; top:-7px; cursor:nesw-resize; }
.edit-handle[data-handle="sw"] { left:-7px; bottom:-7px; cursor:nesw-resize; }
.edit-handle[data-handle="se"] { right:-7px; bottom:-7px; }
.edit-handle[data-handle="n"] { top:-7px; left:calc(50% - 7px); cursor:ns-resize; }
.edit-handle[data-handle="s"] { bottom:-7px; left:calc(50% - 7px); cursor:ns-resize; }
.edit-handle[data-handle="e"] { right:-7px; top:calc(50% - 7px); cursor:ew-resize; }
.edit-handle[data-handle="w"] { left:-7px; top:calc(50% - 7px); cursor:ew-resize; }
.edit-handle[data-handle="rotate"] { right:16px; top:-27px; width:23px; height:23px; border-radius:50%; color:#145464; font-size:18px; line-height:18px; text-align:center; cursor:crosshair; }
.quick-object-actions { position:absolute; z-index:32; top:5px; right:5px; display:none; align-items:center; gap:4px; pointer-events:auto; }
.app.editing .photo-card.selected>.quick-object-actions,.app.editing .album-text.selected>.quick-object-actions,.app.editing .motif.selected>.quick-object-actions { display:flex; }
.album-text>.quick-object-actions,.motif>.quick-object-actions { top:-30px; right:-6px; }
.selection-quick-actions { top:1.5cqw; right:1.5cqw; display:flex; }
.quick-object-action { display:grid; place-items:center; width:25px; height:25px; border:1px solid #6f9593; border-radius:50%; color:#164e56; background:#fffefa; box-shadow:0 2px 7px #122e3c75; font:700 16px/1 "Segoe UI",Arial,sans-serif; cursor:pointer; user-select:none; }
.quick-object-action:hover { color:#fff; border-color:#176b74; background:#176b74; }
.native-photo-source-action { position:relative; overflow:hidden; cursor:pointer; }
.stable-photo-source-input { position:fixed; left:-10000px; top:-10000px; width:1px; height:1px; opacity:0; pointer-events:none; }
.native-photo-source-action.file-repair-target,.photo-card.file-repair-target,.scene-button.file-repair-target,.paper.file-repair-target { color:#fff!important; border-color:#1f9f92!important; box-shadow:0 0 0 4px #fff,0 0 0 8px #1f9f92!important; }
.native-photo-source-action small { font-size:10px; font-weight:600; opacity:.8; }
.editor-actions>.native-photo-source-action { flex:1; min-width:150px; box-sizing:border-box; text-align:center; }
.quick-object-action.danger { color:#a33f37; border:2px solid #a33f37; background:#fff4ed; font:bold 18px/1 Arial,sans-serif; }
.quick-object-action.danger:hover { color:#fff; background:#a33f37; }
.object-toolbar { position:fixed; z-index:170; display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:5px; max-width:min(700px,calc(100vw - 20px)); padding:6px; border:1px solid #acc8c2; border-radius:15px; background:#fffef9f4; box-shadow:0 10px 30px #102f3b42; backdrop-filter:blur(10px); transform-origin:center; }
.object-toolbar[hidden] { display:none; }
.object-toolbar .quick-object-action { width:31px; height:31px; border-radius:9px; font-size:17px; }
.object-toolbar .quick-object-action.wide { width:auto; min-width:31px; padding:0 8px; font-size:12px; }
.object-toolbar .object-toolbar-divider { width:1px; height:22px; margin:0 1px; background:#cddbd7; }
.object-toolbar-popover { position:absolute; z-index:2; top:calc(100% + 7px); left:50%; width:min(392px,calc(100vw - 22px)); max-height:min(430px,calc(100vh - 130px)); padding:10px; overflow:auto; border:1px solid #a8c5bf; border-radius:13px; color:#173f47; background:#fffef9; box-shadow:0 12px 34px #102f3b4d; transform:translateX(-50%); }
.object-toolbar-popover[hidden] { display:none; }
.object-toolbar-popover .frame-shape-grid { grid-template-columns:repeat(4,minmax(72px,1fr)); margin:0; }
.object-toolbar-more { display:grid; grid-template-columns:repeat(2,minmax(135px,1fr)); gap:7px; }
.object-toolbar-more button { min-height:38px; padding:7px 9px; border:1px solid #b4cbc6; border-radius:9px; color:#174d55; background:#f7fbf9; cursor:pointer; font:650 12px/1.2 "Segoe UI",Arial,sans-serif; text-align:left; }
.object-toolbar-more button:hover { color:#fff; border-color:#176b74; background:#176b74; }
.decor-choice-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.decor-choice-option { display:flex; min-width:0; min-height:70px; padding:7px 5px; flex-direction:column; align-items:center; justify-content:center; gap:4px; border:1px solid #b4cbc6; border-radius:9px; color:#175d64; background:#f7fbf9; cursor:pointer; font:650 11px/1.15 "Segoe UI",Arial,sans-serif; }
.decor-choice-option:hover { color:#fff; border-color:#176b74; background:#176b74; }
.decor-choice-option svg { width:34px; height:34px; flex:0 0 auto; }
.decor-picker-inline { margin:8px 0; border:1px solid #b4cbc6; border-radius:9px; background:#fffefa; }
.decor-picker-inline summary { padding:9px 10px; color:#1c4d52; cursor:pointer; font-weight:650; }
.decor-picker-inline[open] summary { border-bottom:1px solid #d2dfda; }
.decor-picker-inline .decor-choice-grid { padding:9px; }
.object-toolbar-decor .decor-choice-grid { grid-template-columns:repeat(5,minmax(58px,1fr)); }
.object-toolbar-label { max-width:150px; padding:0 6px; overflow:hidden; color:#536e6b; font:650 11px/1.2 "Segoe UI",Arial,sans-serif; text-overflow:ellipsis; white-space:nowrap; }
.photo-correction-flyout { position:fixed; z-index:169; display:flex; width:286px; max-width:calc(100vw - 16px); max-height:calc(100vh - 78px); flex-direction:column; overflow:hidden; border:1px solid #9dbcb5; border-radius:15px; color:#173f47; background:#fffef9f7; box-shadow:0 16px 42px #102f3b52; backdrop-filter:blur(11px); font:normal 12px/1.35 "Segoe UI",Arial,sans-serif; }
.photo-correction-flyout-head { display:flex; flex:0 0 auto; align-items:center; justify-content:space-between; gap:10px; padding:10px 10px 9px 13px; border-bottom:1px solid #ccdad5; background:#f2f8f5; }
.photo-correction-flyout-head strong,.photo-correction-flyout-head span { display:block; }
.photo-correction-flyout-head strong { font-size:13px; }
.photo-correction-flyout-head span { margin-top:2px; color:#607a76; font-size:10px; }
.photo-correction-flyout-head button { display:grid; flex:0 0 auto; width:29px; height:29px; padding:0; place-items:center; border:1px solid #a8c2bc; border-radius:8px; color:#315d5c; background:#fff; cursor:pointer; font:700 20px/1 Arial,sans-serif; }
.photo-correction-flyout-scroll { min-height:0; padding:10px; overflow:auto; overscroll-behavior:contain; }
.photo-correction-flyout .photo-correction-panel { margin:0; padding:0; border:0; background:transparent; }
.photo-correction-flyout .photo-correction-panel>summary { display:none; }
.photo-correction-flyout .correction-grid { grid-template-columns:1fr; gap:8px; }
.photo-correction-flyout .correction-control { font-size:11px; }
.photo-correction-flyout .editor-mode-note { margin:7px 0 10px; font-size:10px; }
.photo-correction-flyout .correction-group-title { margin:11px 0 6px; }
.photo-correction-flyout .editor-actions button { min-height:33px; padding:6px 8px; border:1px solid #a8c2bc; border-radius:8px; color:#174d55; background:#fff; cursor:pointer; font:650 11px/1.2 "Segoe UI",Arial,sans-serif; }
.photo-correction-flyout .editor-actions button:hover:not(:disabled) { color:#fff; border-color:#176b74; background:#176b74; }
.photo-correction-flyout .editor-actions button:disabled { cursor:default; opacity:.45; }
body.clean-preview #editorPanel,body.clean-preview #aiChatPanel,body.clean-preview #aiChatBackdrop,body.clean-preview .object-toolbar,body.clean-preview .photo-correction-flyout,body.clean-preview .edit-handle,body.clean-preview .quick-object-actions,body.clean-preview .selection-quick-actions,body.clean-preview .frame-number,body.clean-preview .editor-notice { display:none!important; }
body.clean-preview .app.editing .stage,body.clean-preview .app.editing .bottom-bar { margin-right:0; }
body.clean-preview .app.editing .book-wrap { width:min(88vw,calc((100vh - 178px)*2)); }
body.clean-preview .app.editing .paper.active-page { box-shadow:none!important; }
body.clean-preview .app.editing .photo-card.selected { box-shadow:none; }
body.clean-preview .app.editing .photo-card.selected>.photo-shadow-shell { filter:drop-shadow(0 .8cqw 1.1cqw #19343e70); }
body.clean-preview .app.editing .album-text.selected,body.clean-preview .app.editing .motif.selected { outline:0; }
@media(max-width:700px) { .object-toolbar { gap:4px; padding:5px; } .object-toolbar .quick-object-action { width:30px; height:30px; } .object-toolbar-label { display:none; } .object-toolbar-popover .frame-shape-grid { grid-template-columns:repeat(3,minmax(72px,1fr)); } .object-toolbar-decor .decor-choice-grid { grid-template-columns:repeat(3,minmax(64px,1fr)); } }
@media(max-width:480px) { .correction-grid { grid-template-columns:1fr; } }
.album-text { position:absolute; z-index:5; white-space:pre-line; overflow:visible; line-height:1.13; pointer-events:none; }
.album-text-content { display:block; min-height:1em; white-space:pre-wrap; }
.album-text.serif { font-family:Georgia,serif; }
.album-text.sans { font-family:"Segoe UI",Arial,sans-serif; }
.album-text.handwriting { font-family:"Segoe Print","Bradley Hand",cursive; }
.album-text.typewriter { font-family:"Courier New",Courier,monospace; }
.album-text.tone-light { color:#fff8e8; text-shadow:0 1px 4px #102f3c9a; }
.album-text.tone-accent { color:var(--accent); }
.album-text.tone-ink { color:inherit; }
.album-text.stamp { border:1px solid currentColor; border-radius:45%; padding:.8cqw 1.3cqw; transform:rotate(-6deg); text-align:center; opacity:.8; }
.app.editing .album-text { pointer-events:auto; cursor:move; }
.app.editing .album-text.inline-editing { z-index:30; cursor:text; outline:2px solid #f0a847; outline-offset:5px; background:#fffdf5e8; color:#173d43; text-shadow:none; }
.app.editing .album-text.inline-editing .album-text-content { min-width:100%; min-height:1.2em; padding:.7cqw; border-radius:.6cqw; outline:0; cursor:text; }
.app.editing .album-text.inline-editing>.quick-object-actions { display:none; }
.app.editing .album-text.selected,.app.editing .motif.selected { outline:2px dashed #f0a847; outline-offset:4px; }
.motif { cursor:default; }
.app.editing .motif { pointer-events:auto; cursor:move; }
.paper .page-number { position:absolute; right:7%; bottom:3.4%; z-index:5; font-size:2.05cqw; font-weight:600; }
.paper .footer-rule { position:absolute; z-index:4; left:7%; right:7%; bottom:5.8%; border-top:1px solid currentColor; opacity:.55; }
.paper.toc { background:#e8f0ec; color:#173e47; }
.toc-heading { position:absolute; left:9%; top:9%; font:normal 6.8cqw Georgia,serif; }
.toc-subtitle { position:absolute; left:9%; top:19%; font-size:2.4cqw; letter-spacing:.12em; text-transform:uppercase; }
.toc-list { position:absolute; left:9%; right:9%; top:29%; bottom:11%; display:flex; flex-direction:column; justify-content:space-between; gap:.12cqw; }
.toc-entry { display:flex; align-items:baseline; gap:5px; min-height:2.15cqw; width:100%; padding:0; border:0; background:none; text-align:left; color:inherit; font:normal 2.35cqw/1.08 Georgia,serif; cursor:pointer; }
.toc-entry:hover { color:#0d7885; }
.toc-entry .dots { flex:1; border-bottom:1px dotted #7d9993; }
.toc-entry strong { font:600 2.5cqw "Segoe UI",Arial,sans-serif; }
.toc-page-number { position:absolute; right:8%; bottom:5%; font-size:2.3cqw; }
.paper.cover .album-text { z-index:2; }
.app.editing .paper.cover { cursor:crosshair; }
@media(max-width:950px) {
  .editor-panel { width:100%; height:min(44vh,390px); top:auto; bottom:0; border-left:0; border-top:1px solid #a9bdb6; }
  .app.editing .stage { margin-right:0; padding-bottom:min(44vh,390px); }
  .app.editing .book-wrap { width:min(94vw,calc((56vh - 150px)*2)); }
  .app.editing .bottom-bar { margin-right:0; }
  .editor-head { padding:5px 10px; }
  .editor-scroll { padding:7px 12px; }
}
.toolbar .ai-editor-button { display:inline-flex!important; align-items:center; flex:0 0 auto; width:auto!important; height:auto!important; min-height:39px!important; padding:7px 14px!important; border-color:#242424; color:#fff; background:#242424; font-weight:650; line-height:1.2!important; white-space:nowrap!important; box-shadow:0 4px 14px #07191e2e; }
.toolbar .ai-editor-button:hover { border-color:#000; background:#000; }
.toolbar .ai-editor-button span { display:grid; width:23px; height:23px; margin-right:.45rem; place-items:center; border-radius:50%; color:#171717; background:#fff; font-size:14px; }
.ai-chat-backdrop { display:none!important; position:fixed; inset:0; z-index:118; pointer-events:none; background:transparent; backdrop-filter:none; }
.ai-chat-backdrop[hidden],.ai-chat-panel[hidden] { display:none; }
.ai-chat-panel { position:fixed; z-index:119; top:max(18px,4vh); right:max(18px,3vw); display:flex; flex-direction:column; width:min(720px,calc(100vw - 36px)); min-width:min(430px,calc(100vw - 36px)); max-width:calc(100vw - 36px); height:min(820px,calc(100vh - 36px)); min-height:360px; max-height:calc(100vh - 36px); overflow:hidden; border:1px solid #dededb; border-radius:20px; color:#0d0d0d; background:#fff; box-shadow:0 18px 55px #0b182c35,0 2px 8px #0b182c1f; font:normal 15px/1.55 ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
.ai-chat-resize-handle { position:absolute; z-index:5; display:block; touch-action:none; }
.ai-chat-resize-handle.left { top:18px; bottom:18px; left:-5px; width:10px; cursor:ew-resize; }
.ai-chat-resize-handle.bottom { right:18px; bottom:-5px; left:18px; height:10px; cursor:ns-resize; }
.ai-chat-resize-handle.bottom-left { bottom:-6px; left:-6px; width:20px; height:20px; cursor:nesw-resize; }
.ai-chat-panel.minimized { top:auto!important; right:18px!important; bottom:18px!important; width:min(430px,calc(100vw - 36px))!important; min-width:0; max-width:calc(100vw - 36px); height:67px!important; min-height:0; max-height:none; border-radius:15px; }
.ai-chat-panel.minimized .ai-chat-header { flex:1; border-bottom:0; }
.ai-chat-panel.minimized .ai-chat-messages,.ai-chat-panel.minimized .ai-chat-progress,.ai-chat-panel.minimized .ai-chat-composer-wrap,.ai-chat-panel.minimized .ai-chat-resize-handle,.ai-chat-panel.minimized .ai-chat-archive,.ai-chat-panel.minimized #aiChatClear,.ai-chat-panel.minimized #aiChatArchive { display:none!important; }
.ai-chat-header { display:flex; align-items:center; justify-content:space-between; gap:15px; min-height:67px; padding:10px 12px 10px 16px; border-bottom:1px solid #ececea; background:#fff; }
.ai-chat-identity { display:flex; min-width:0; align-items:center; gap:11px; }
.ai-chat-mark { display:grid; flex:0 0 auto; width:36px; height:36px; place-items:center; border-radius:50%; color:#fff; background:#0d0d0d; }
.ai-chat-mark svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.55; stroke-linecap:round; stroke-linejoin:round; }
.ai-chat-identity h2 { overflow:hidden; margin:0; font-size:15px; font-weight:600; line-height:1.3; letter-spacing:-.01em; text-overflow:ellipsis; white-space:nowrap; }
.ai-chat-identity p { display:flex; align-items:center; gap:6px; margin:2px 0 0; color:#6b6b6b; font-size:12px; }
.ai-chat-connection-dot { width:7px; height:7px; border-radius:50%; background:#1f9d69; box-shadow:0 0 0 3px #1f9d691c; }
.ai-chat-connection-dot.working { background:#d28b20; animation:ai-chat-pulse 1.25s infinite; }
.ai-chat-connection-dot.error { background:#d24336; }
.ai-chat-header-actions { display:flex; gap:5px; }
.ai-chat-header-actions button { display:grid; width:36px; height:36px; padding:0; place-items:center; border:0; border-radius:10px; color:#424242; background:transparent; cursor:pointer; }
.ai-chat-header-actions button:hover { color:#0d0d0d; background:#f3f3f1; }
.ai-chat-header-actions svg,.ai-chat-tool-button svg,.ai-chat-send svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.ai-chat-compact-mic { display:none!important; }
.ai-chat-panel.minimized .ai-chat-compact-mic { display:grid!important; color:#303030; }
.ai-chat-panel.minimized .ai-chat-compact-mic:hover { background:#ededeb; }
.ai-chat-archive[hidden] { display:none; }
.ai-chat-archive { position:absolute; z-index:6; top:67px; bottom:0; left:0; display:flex; flex-direction:column; width:min(370px,88%); padding:16px 12px 14px; overflow:hidden; border-right:1px solid #e4e4e1; background:#f7f7f5; box-shadow:14px 0 34px #17171717; }
.ai-chat-archive-header { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; padding:2px 5px 13px; }
.ai-chat-archive-header h3 { margin:0; font-size:18px; font-weight:650; letter-spacing:-.02em; }
.ai-chat-archive-header p { margin:3px 0 0; color:#70706c; font-size:11px; line-height:1.4; }
.ai-chat-archive-header button { display:grid; flex:0 0 auto; width:32px; height:32px; padding:0; place-items:center; border:0; border-radius:9px; color:#454542; background:transparent; cursor:pointer; }
.ai-chat-archive-header button:hover { background:#eaeae6; }
.ai-chat-archive-header svg,.ai-chat-archive-new svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.ai-chat-archive-new { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; min-height:41px; margin:0 0 11px; border:1px solid #d6d6d1; border-radius:11px; color:#20201f; background:#fff; cursor:pointer; font:600 13px/1.2 inherit; }
.ai-chat-archive-new:hover { border-color:#bdbdb7; background:#fdfdfc; }
.ai-chat-archive-new:disabled { cursor:default; opacity:.45; }
.ai-chat-archive-status { margin:8px 6px; color:#696965; font-size:12px; }
.ai-chat-archive-status[hidden] { display:none; }
.ai-chat-archive-status.error { color:#a02e26; }
.ai-chat-archive-list { min-height:0; overflow:auto; overscroll-behavior:contain; }
.ai-chat-archive-item { display:flex; position:relative; flex-direction:column; width:100%; margin:0 0 4px; padding:11px 12px 10px; overflow:hidden; border:0; border-radius:11px; color:#242422; background:transparent; cursor:pointer; text-align:left; }
.ai-chat-archive-item:hover { background:#eaeae6; }
.ai-chat-archive-item.current { background:#e5e5e0; }
.ai-chat-archive-item.current::before { content:''; position:absolute; top:10px; bottom:10px; left:3px; width:3px; border-radius:2px; background:#20201f; }
.ai-chat-archive-item-heading { display:flex; align-items:baseline; gap:8px; min-width:0; }
.ai-chat-archive-item-heading strong { flex:1; min-width:0; overflow:hidden; font-size:13px; font-weight:620; text-overflow:ellipsis; white-space:nowrap; }
.ai-chat-archive-item-heading time { flex:0 0 auto; color:#858580; font-size:10px; }
.ai-chat-archive-preview { display:-webkit-box; margin-top:3px; overflow:hidden; color:#666661; font-size:11px; line-height:1.35; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.ai-chat-archive-count { margin-top:5px; color:#8a8a84; font-size:10px; }
.ai-chat-archive-empty { margin:28px 12px; color:#73736e; font-size:12px; line-height:1.55; text-align:center; }
.ai-chat-messages { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; padding:28px clamp(20px,7vw,72px) 14px; scroll-behavior:smooth; }
.ai-chat-message { display:flex; gap:10px; margin:0 0 26px; align-items:flex-start; }
.ai-chat-message.user { justify-content:flex-end; }
.ai-chat-avatar { display:none; }
.ai-chat-message.user .ai-chat-avatar { display:none; }
.ai-chat-bubble { max-width:min(86%,560px); white-space:pre-wrap; overflow-wrap:anywhere; }
.ai-chat-message.user .ai-chat-bubble { padding:10px 16px; border-radius:18px; background:#f4f4f4; }
.ai-chat-message.assistant .ai-chat-bubble { width:100%; max-width:none; padding:2px 0 0; line-height:1.7; }
.ai-chat-message.system .ai-chat-bubble { max-width:100%; padding:10px 13px; border:1px solid #e5e5e5; border-radius:12px; color:#565656; background:#fafafa; font-size:13px; }
.ai-chat-message.error .ai-chat-bubble { border-color:#f0c5c0; color:#8d2c25; background:#fff4f2; }
.ai-chat-message-meta { margin-top:7px; color:#777; font-size:11px; }
.ai-chat-message-meta.success { color:#147b54; }
.ai-chat-message-meta.warning { color:#95640d; }
.ai-chat-message-actions { display:flex; min-height:26px; margin-top:8px; opacity:0; transition:opacity .15s ease; }
.ai-chat-message.assistant:hover .ai-chat-message-actions,.ai-chat-message-actions:focus-within { opacity:1; }
.ai-chat-copy { display:grid; width:28px; height:28px; padding:0; place-items:center; border:0; border-radius:7px; color:#606060; background:transparent; cursor:pointer; }
.ai-chat-copy:hover { color:#0d0d0d; background:#f2f2f2; }
.ai-chat-copy.copied { color:#147b54; }
.ai-chat-copy svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.ai-chat-retry { margin-top:9px; padding:6px 10px; border:1px solid #bbb; border-radius:8px; color:#242424; background:#fff; cursor:pointer; font:600 12px "Segoe UI",Arial,sans-serif; }
.ai-chat-retry:hover { background:#f4f4f2; }
.ai-chat-progress { display:flex; align-items:center; gap:9px; min-height:39px; margin:0 clamp(20px,7vw,72px) 8px; padding:7px 11px; border-radius:12px; color:#555; background:#f4f4f4; font-size:12px; }
.ai-chat-progress[hidden] { display:none; }
.ai-chat-progress time { margin-left:auto; color:#777; font-variant-numeric:tabular-nums; }
.ai-chat-progress.success { color:#147b54; background:#edf8f3; }
.ai-chat-progress.warning { color:#8b5e0c; background:#fff8e7; }
.ai-chat-progress.error { color:#a02e26; background:#fff1ef; }
.ai-chat-spinner { width:14px; height:14px; border:2px solid #b8b8b5; border-top-color:#222; border-radius:50%; animation:ai-chat-spin .85s linear infinite; }
.ai-chat-progress.success .ai-chat-spinner,.ai-chat-progress.warning .ai-chat-spinner,.ai-chat-progress.error .ai-chat-spinner { border:0; animation:none; }
.ai-chat-progress.success .ai-chat-spinner::before { content:'✓'; font-weight:800; }
.ai-chat-progress.warning .ai-chat-spinner::before { content:'!'; font-weight:800; }
.ai-chat-progress.error .ai-chat-spinner::before { content:'×'; font-weight:800; }
.ai-chat-composer-wrap { padding:8px clamp(14px,4vw,34px) 16px; background:linear-gradient(#ffffff00,#fff 20%); }
.ai-chat-recording { display:flex; align-items:center; gap:8px; margin:0 3px 7px; color:#9c2e28; font-size:12px; }
.ai-chat-recording[hidden] { display:none; }
.ai-chat-recording-dot { width:9px; height:9px; border-radius:50%; background:#d43e34; animation:ai-chat-pulse 1s infinite; }
.ai-chat-recording time { font-variant-numeric:tabular-nums; }
.ai-chat-recording span:last-child { margin-left:auto; color:#727272; }
.ai-chat-composer { display:flex; align-items:flex-end; gap:6px; padding:10px 10px 9px; border:1px solid transparent; border-radius:28px; background:#f4f4f4; box-shadow:none; }
.ai-chat-composer:focus-within { border-color:#d5d5d5; box-shadow:0 0 0 1px #00000008; }
.ai-chat-composer textarea { flex:1; min-width:0; min-height:76px; max-height:min(260px,35vh); padding:8px 4px; resize:vertical; overflow-y:auto; border:0; outline:0; color:#0d0d0d; background:transparent; font:normal 15px/1.5 ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
.ai-chat-composer textarea::placeholder { color:#8f8f8f; }
.ai-chat-tool-button,.ai-chat-send { display:grid; flex:0 0 auto; width:36px; height:36px; padding:0; place-items:center; border:0; border-radius:50%; cursor:pointer; }
.ai-chat-tool-button { color:#303030; background:transparent; }
.ai-chat-tool-button:hover { background:#e7e7e7; }
.ai-chat-send { color:#fff; background:#0d0d0d; }
.ai-chat-send:hover { background:#000; }
.ai-chat-send:disabled,.ai-chat-tool-button:disabled,.ai-chat-compact-mic:disabled { cursor:default; opacity:.36; }
.ai-chat-mic-icon { display:block; width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.85; stroke-linecap:round; stroke-linejoin:round; }
.ai-chat-tool-button.is-recording,.ai-chat-compact-mic.is-recording { color:#fff!important; background:#d43e34!important; }
.ai-chat-tool-button.is-recording .ai-chat-mic-icon,.ai-chat-compact-mic.is-recording .ai-chat-mic-icon { display:none; }
.ai-chat-tool-button.is-recording::after,.ai-chat-compact-mic.is-recording::after { content:''; display:block; width:11px; height:11px; border-radius:2px; background:#fff; }
.ai-chat-note { margin:8px 5px 0; color:#7d7d7d; text-align:center; font-size:10.5px; line-height:1.35; }
@keyframes ai-chat-spin { to { transform:rotate(360deg); } }
@keyframes ai-chat-pulse { 50% { opacity:.38; } }
@media(max-width:1750px) {
  .toolbar { flex-wrap:wrap; gap:8px; }
  .toolbar .brand { flex:1 0 100%; }
}
@media(max-width:760px) {
  .ai-chat-panel { inset:0; width:100%!important; min-width:0; max-width:none; height:100%!important; min-height:0; max-height:none; border:0; border-radius:0; }
  .ai-chat-panel.minimized { top:auto!important; right:10px!important; bottom:10px!important; left:10px!important; width:auto!important; height:58px!important; border:1px solid #d9d9d6; border-radius:14px; }
  .ai-chat-resize-handle { display:none; }
  .ai-chat-header { min-height:58px; padding:8px 10px 8px 13px; }
  .ai-chat-archive { top:58px; width:100%; border-right:0; }
  .ai-chat-mark { width:34px; height:34px; }
  .ai-chat-identity h2 { font-size:14px; }
  .ai-chat-messages { padding:18px 14px 8px; }
  .ai-chat-composer-wrap { padding:4px 10px 10px; }
  .ai-chat-composer textarea { min-height:58px; max-height:32vh; }
  .ai-chat-recording span:last-child { display:none; }
}
@media(prefers-reduced-motion:reduce) {
  .ai-chat-spinner,.ai-chat-recording-dot,.ai-chat-connection-dot.working,.photo-import-card,.photo-import-bar span,.photo-import-page-progress { animation-duration:.01s; }
  .ai-chat-messages { scroll-behavior:auto; }
}
@media print {
  #frameNumbersToggle,#aiEditorToggle,.frame-number,.ai-chat-panel,.ai-chat-backdrop,.photo-import-progress,.photo-import-page-progress,.mobile-editor-topbar,.mobile-editor-dock,.mobile-editor-sheet,.mobile-editor-backdrop { display:none!important; }
}

/* Mobile editor: the album remains the canvas, while detailed tools open as sheets. */
.mobile-editor-topbar,.mobile-editor-dock,.mobile-editor-sheet,.mobile-editor-backdrop,.mobile-editor-panel-close,.editor-panel>.mobile-editor-sheet-handle,.mobile-only-action { display:none; }
.mobile-editor-sheet-handle { width:42px; height:4px; margin:8px auto 3px; border-radius:999px; background:#9db2ad; }
@media (max-width:900px),(hover:none) and (pointer:coarse) {
  body.mobile-editor-mode:not(.shared-view) { overflow:hidden; overscroll-behavior:none; }
  body.mobile-editor-mode:not(.shared-view) .app { width:100vw; height:100dvh; min-height:100dvh; overflow:hidden; }
  body.mobile-editor-mode:not(.shared-view) .app.editing>.toolbar,
  body.mobile-editor-mode:not(.shared-view) .app.editing>.bottom-bar { display:none!important; }
  body.mobile-editor-mode:not(.shared-view) .app.editing .stage { width:100vw; height:100dvh; min-height:100dvh; margin:0!important; padding:58px 8px calc(128px + env(safe-area-inset-bottom))!important; gap:0; box-sizing:border-box; overflow:hidden; background:radial-gradient(ellipse at 50% 43%,#edf4f1,#bad0cd 70%,#8faeae); }
  body.mobile-editor-mode:not(.shared-view) .app.editing .book-wrap { width:min(calc(100vw - 16px),calc((100dvh - 194px - env(safe-area-inset-bottom)) * var(--album-page-ratio,1)))!important; max-width:none!important; max-height:calc(100dvh - 194px - env(safe-area-inset-bottom)); margin:auto; aspect-ratio:var(--album-page-aspect,1/1); filter:drop-shadow(0 12px 18px #102f3b55); }
  body.mobile-editor-mode:not(.shared-view) .app.editing .book { border-radius:7px; background:#f7f2e9; box-shadow:0 0 0 2px #fffdf0c7,0 0 0 5px #31504d3d; }
  body.mobile-editor-mode:not(.shared-view) .app.editing .book::after { display:none; }
  body.mobile-editor-mode:not(.shared-view) .app.editing .page-holder.left { left:0; width:100%; }
  body.mobile-editor-mode:not(.shared-view) .app.editing .page-holder.right { display:none; }
  body.mobile-editor-mode:not(.shared-view) .app.editing .paper { box-shadow:inset 0 0 0 1px #777c7240; }
  body.mobile-editor-mode:not(.shared-view) .app.editing .nav-edge { display:none!important; }

  body.mobile-editor-mode:not(.shared-view) .app.editing .mobile-editor-topbar { position:fixed; z-index:176; top:0; right:0; left:0; display:grid; grid-template-columns:44px minmax(0,1fr) 44px auto; align-items:center; gap:5px; min-height:52px; padding:max(5px,env(safe-area-inset-top)) max(7px,env(safe-area-inset-right)) 5px max(7px,env(safe-area-inset-left)); box-sizing:border-box; border-bottom:1px solid #afc6c0; background:#fbfdf9ed; box-shadow:0 4px 18px #102f3b22; backdrop-filter:blur(12px); }
  .mobile-editor-topbar button { min-width:42px; min-height:40px; padding:0 9px; border:1px solid #abc2bc; border-radius:12px; color:#174d55; background:#fff; font:750 14px/1 "Segoe UI",Arial,sans-serif; }
  .mobile-editor-topbar button>span { font-size:29px; line-height:.7; }
  .mobile-editor-topbar strong { min-width:0; overflow:hidden; color:#244e52; font:750 12px/1.2 "Segoe UI",Arial,sans-serif; text-align:center; text-overflow:ellipsis; white-space:nowrap; }
  .mobile-editor-topbar .mobile-editor-done { color:#fff; border-color:#176b74; background:#176b74; }

  body.mobile-editor-mode:not(.shared-view) .app.editing .mobile-editor-dock { position:fixed; z-index:176; right:0; bottom:0; left:0; display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); min-height:64px; padding:6px max(5px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(5px,env(safe-area-inset-left)); box-sizing:border-box; border-top:1px solid #a9c0ba; background:#fbfdf9f2; box-shadow:0 -6px 24px #102f3b2c; backdrop-filter:blur(13px); }
  .mobile-editor-dock button { display:flex; min-width:0; min-height:50px; padding:3px 1px; flex-direction:column; align-items:center; justify-content:center; gap:2px; border:0; border-radius:12px; color:#345e5e; background:transparent; -webkit-tap-highlight-color:transparent; }
  .mobile-editor-dock button:active,.mobile-editor-dock button[aria-pressed="true"] { color:#fff; background:#176b74; }
  .mobile-editor-dock button:disabled { opacity:.35; }
  .mobile-editor-dock button>span { display:grid; width:25px; height:25px; place-items:center; font:750 21px/1 "Segoe UI",Arial,sans-serif; }
  .mobile-editor-dock button>small { max-width:100%; overflow:hidden; font:700 9px/1.05 "Segoe UI",Arial,sans-serif; text-overflow:ellipsis; white-space:nowrap; }
  .mobile-editor-dock .mobile-editor-voice>span { width:28px; height:28px; border-radius:50%; color:#fff; background:#202523; font-size:12px; box-shadow:0 0 0 3px #dfe8e4; }

  body.mobile-editor-mode:not(.shared-view) .mobile-editor-backdrop { position:fixed; z-index:183; inset:0; display:block; width:100%; height:100%; padding:0; border:0; background:#0d252d52; backdrop-filter:blur(1.5px); }
  body.mobile-editor-mode:not(.shared-view) .mobile-editor-backdrop[hidden] { display:none; }
  body.mobile-editor-mode:not(.shared-view) .mobile-editor-sheet { position:fixed; z-index:191; right:0; bottom:0; left:0; display:block; max-height:min(68dvh,620px); padding:0 max(12px,env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left)); box-sizing:border-box; overflow:auto; border:1px solid #a9c0ba; border-bottom:0; border-radius:22px 22px 0 0; color:#173d43; background:#fbfcf8; box-shadow:0 -14px 42px #102f3b55; }
  body.mobile-editor-mode:not(.shared-view) .mobile-editor-sheet[hidden] { display:none; }
  .mobile-editor-sheet>header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:8px 1px 12px; }
  .mobile-editor-sheet>header strong,.mobile-editor-sheet>header small { display:block; }
  .mobile-editor-sheet>header strong { font:750 18px/1.2 "Segoe UI",Arial,sans-serif; }
  .mobile-editor-sheet>header small { margin-top:3px; color:#607976; font:600 11px/1.3 "Segoe UI",Arial,sans-serif; }
  .mobile-editor-sheet>header>button { flex:0 0 auto; width:38px; height:38px; padding:0; border:1px solid #abc2bc; border-radius:50%; color:#315d5c; background:#fff; font:700 24px/1 Arial,sans-serif; }
  .mobile-editor-add-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
  .mobile-editor-add-grid button { display:flex; min-width:0; min-height:88px; padding:10px 4px; flex-direction:column; align-items:center; justify-content:center; gap:6px; border:1px solid #b4cbc6; border-radius:14px; color:#174d55; background:#fff; }
  .mobile-editor-add-grid button>span { display:grid; width:34px; height:34px; place-items:center; border-radius:11px; color:#fff; background:#397973; font:750 21px/1 "Segoe UI",Arial,sans-serif; }
  .mobile-editor-add-grid button>strong { overflow:hidden; font:700 11px/1.15 "Segoe UI",Arial,sans-serif; text-overflow:ellipsis; }

  body.mobile-editor-mode:not(.shared-view) .editor-panel { z-index:191; top:auto; right:0; bottom:0; left:0; width:100%; height:min(72dvh,680px); max-height:calc(100dvh - 34px); border:1px solid #a9c0ba; border-bottom:0; border-radius:22px 22px 0 0; box-shadow:0 -14px 42px #102f3b55; transform:translateY(104%); transition:transform .22s cubic-bezier(.22,.75,.22,1); pointer-events:none; }
  body.mobile-editor-mode.mobile-editor-panel-open:not(.shared-view) .editor-panel { transform:translateY(0); pointer-events:auto; }
  body.mobile-editor-mode:not(.shared-view) .editor-panel>.mobile-editor-sheet-handle { display:block; flex:0 0 auto; }
  body.mobile-editor-mode:not(.shared-view) .editor-head { min-height:46px; padding:5px 10px 6px 13px; }
  body.mobile-editor-mode:not(.shared-view) .editor-head strong { font-size:18px; }
  body.mobile-editor-mode:not(.shared-view) .editor-head span { flex:1; max-width:none; }
  body.mobile-editor-mode:not(.shared-view) .mobile-editor-panel-close { display:grid; flex:0 0 auto; width:36px; height:36px; padding:0; place-items:center; border-radius:50%; font:700 23px/1 Arial,sans-serif; }
  body.mobile-editor-mode:not(.shared-view) .editor-history { padding-bottom:6px; }
  body.mobile-editor-mode:not(.shared-view) .editor-shortcuts { display:none; }
  body.mobile-editor-mode:not(.shared-view) .editor-global-actions { padding-bottom:7px; }
  body.mobile-editor-mode:not(.shared-view) .editor-tabs { overflow-x:auto; scrollbar-width:none; }
  body.mobile-editor-mode:not(.shared-view) .editor-tabs::-webkit-scrollbar { display:none; }
  body.mobile-editor-mode:not(.shared-view) .editor-tabs button { flex:0 0 auto; min-width:88px; min-height:42px; }
  body.mobile-editor-mode:not(.shared-view) .editor-scroll { padding:10px 12px calc(20px + env(safe-area-inset-bottom)); }
  body.mobile-editor-mode:not(.shared-view) .editor-file-actions { display:none; }

  body.mobile-editor-mode:not(.shared-view) .object-toolbar { right:8px; bottom:calc(69px + env(safe-area-inset-bottom)); left:8px!important; top:auto!important; z-index:179; max-width:none; min-height:48px; padding:5px 6px; justify-content:flex-start; flex-wrap:nowrap; overflow-x:auto; overflow-y:hidden; border-radius:15px; scroll-snap-type:x proximity; scrollbar-width:none; }
  body.mobile-editor-mode:not(.shared-view) .object-toolbar::-webkit-scrollbar { display:none; }
  body.mobile-editor-mode:not(.shared-view) .object-toolbar.popover-open { overflow:visible; }
  body.mobile-editor-mode:not(.shared-view) .object-toolbar .quick-object-action { display:grid; flex:0 0 auto; width:40px; height:40px; border-radius:11px; scroll-snap-align:center; }
  body.mobile-editor-mode:not(.shared-view) .object-toolbar .quick-object-action.wide { width:auto; min-width:56px; padding:0 10px; }
  body.mobile-editor-mode:not(.shared-view) .object-toolbar-label { display:block; flex:0 0 auto; max-width:92px; }
  body.mobile-editor-mode:not(.shared-view) .object-toolbar-divider { flex:0 0 auto; }
  body.mobile-editor-mode:not(.shared-view) .object-toolbar-popover { position:absolute; top:auto; bottom:calc(100% + 8px); left:50%; width:calc(100vw - 16px); max-height:min(52dvh,470px); box-sizing:border-box; border-radius:17px; }
  body.mobile-editor-mode:not(.shared-view) .object-toolbar-more { grid-template-columns:1fr; }
  body.mobile-editor-mode:not(.shared-view) .object-toolbar-more button { min-height:46px; font-size:14px; }
  body.mobile-editor-mode:not(.shared-view) .mobile-only-action { display:grid; }
  body.mobile-editor-mode:not(.shared-view) .mobile-only-action[aria-pressed="true"] { color:#fff; border-color:#176b74; background:#176b74; }

  body.mobile-editor-mode:not(.shared-view) .edit-handle { width:22px; height:22px; border-width:2px; border-radius:7px; }
  body.mobile-editor-mode:not(.shared-view) .edit-handle[data-handle="nw"] { left:-12px; top:-12px; }
  body.mobile-editor-mode:not(.shared-view) .edit-handle[data-handle="ne"] { right:-12px; top:-12px; }
  body.mobile-editor-mode:not(.shared-view) .edit-handle[data-handle="sw"] { left:-12px; bottom:-12px; }
  body.mobile-editor-mode:not(.shared-view) .edit-handle[data-handle="se"] { right:-12px; bottom:-12px; }
  body.mobile-editor-mode:not(.shared-view) .edit-handle[data-handle="n"] { top:-12px; left:calc(50% - 11px); }
  body.mobile-editor-mode:not(.shared-view) .edit-handle[data-handle="s"] { bottom:-12px; left:calc(50% - 11px); }
  body.mobile-editor-mode:not(.shared-view) .edit-handle[data-handle="e"] { right:-12px; top:calc(50% - 11px); }
  body.mobile-editor-mode:not(.shared-view) .edit-handle[data-handle="w"] { left:-12px; top:calc(50% - 11px); }
  body.mobile-editor-mode:not(.shared-view) .edit-handle[data-handle="rotate"] { right:12px; top:-34px; width:28px; height:28px; font-size:21px; }
  body.mobile-editor-mode.mobile-photo-crop-mode:not(.shared-view) .photo-card.selected { outline-style:solid; outline-color:#22a99a; cursor:move; }
  body.mobile-editor-mode.mobile-photo-crop-mode:not(.shared-view) .photo-card.selected::after { content:'Сдвигайте фото внутри рамки'; position:absolute; z-index:40; left:50%; bottom:5px; padding:5px 8px; border-radius:999px; color:#fff; background:#0d5f66e8; font:700 9px/1.1 "Segoe UI",Arial,sans-serif; white-space:nowrap; transform:translateX(-50%); pointer-events:none; }
  body.mobile-editor-mode.mobile-photo-multiselect:not(.shared-view) .photo-card { outline-color:#20a291; }

  body.mobile-editor-mode:not(.shared-view) .photo-correction-flyout { z-index:194; right:0; bottom:0; left:0!important; top:auto!important; width:100%; max-width:none; max-height:min(62dvh,620px); border-radius:22px 22px 0 0; }
  body.mobile-editor-mode:not(.shared-view) .photo-correction-flyout-scroll { padding-bottom:calc(15px + env(safe-area-inset-bottom)); }
  body.mobile-editor-mode:not(.shared-view) .photo-correction-flyout .correction-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:430px) {
  .mobile-editor-dock button>small { font-size:8px; }
  .mobile-editor-add-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.mobile-editor-mode:not(.shared-view) .photo-correction-flyout .correction-grid { grid-template-columns:1fr; }
}
.dashboard-link{display:inline-flex;align-items:center;padding:8px 12px;border-radius:999px;background:#f4faf8;color:#174f53;text-decoration:none;font-weight:700;font-size:13px;white-space:nowrap}.collab-presence{display:flex;gap:6px;align-items:center;max-width:330px;overflow:hidden}.collab-person{display:inline-flex;align-items:center;gap:5px;background:#eef4f2;border:1px solid #bfd0cc;border-radius:999px;padding:4px 8px 4px 4px;font-size:11px;white-space:nowrap}.collab-person b{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#4f7c78;color:white}.collab-person.same-page{background:#fff1dd;border-color:#e5ae65;color:#8a511c}.collab-person.same-page b{background:#c9782d}@media(max-width:900px){.toolbar .dashboard-link,.toolbar .collab-presence{display:none}}
