/* Native-style supplementary actions; existing page controls remain visible. */
:root{--press-background:#f2f2f7;--press-surface:#fff;--press-text:#1c1c1e;--press-secondary:#636366;--press-blue:#0066cc;--press-danger:#c62828;--press-divider:#e5e5ea}
[data-press-photo],.device-review-preview,.viewer-overview-photo,.moment-photo,.album-photo-card,.photo-card{-webkit-touch-callout:none}
.press-pending{transition:opacity .15s ease;opacity:.86}
.press-menu{position:fixed;inset:auto 0 0;width:min(100%,540px);max-width:100%;max-height:85dvh;box-sizing:border-box;margin:0 auto;padding:20px 16px max(16px,env(safe-area-inset-bottom));border:0;border-radius:24px 24px 0 0;background:var(--press-background);color:var(--press-text);font-family:-apple-system,BlinkMacSystemFont,'Noto Sans TC',sans-serif;overflow-y:auto}
.press-menu::backdrop,.press-peek::backdrop{background:rgba(0,0,0,.28)}
.press-menu h2{font-size:17px;font-weight:600;line-height:1.4;margin:0 8px 16px;overflow-wrap:anywhere}
.press-menu-items{background:var(--press-surface);border-radius:16px;overflow:hidden}
.press-menu button{display:block;width:100%;min-height:50px;padding:14px 16px;border:0;background:var(--press-surface);color:var(--press-blue);font:inherit;font-size:17px;text-align:left;overflow-wrap:anywhere}
.press-menu-items button+button{border-top:1px solid var(--press-divider)}
.press-menu button:disabled{color:var(--press-secondary);opacity:.65}
.press-menu button.press-menu-danger{color:var(--press-danger)}
.press-menu button.press-menu-hover,.press-menu button:active{background:#eaf3ff}
.press-menu button.press-menu-cancel{margin-top:10px;border-radius:16px;text-align:center;font-weight:600}
.press-peek{position:fixed;inset:0;margin:0;padding:24px 16px;box-sizing:border-box;width:100%;height:100dvh;max-width:none;max-height:none;border:0;background:rgba(20,20,22,.95);color:#fff;overflow:hidden}
.press-peek[open]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px}
.press-peek canvas{display:block;max-width:100%;max-height:72dvh;object-fit:contain;border-radius:14px}
.press-peek p{margin:0;font-size:15px;max-width:100%;overflow-wrap:anywhere;text-align:center}
.press-peek-close{min-height:44px;padding:8px 20px;border:0;border-radius:12px;background:rgba(255,255,255,.12);color:#fff;font:inherit}
.press-status{position:fixed;z-index:10001;inset:auto 16px max(86px,env(safe-area-inset-bottom));margin:0 auto;max-width:500px;width:max-content;max-width:calc(100% - 32px);box-sizing:border-box;background:#1c1c1e;color:#fff;border-radius:12px;padding:12px 16px;font-size:15px;pointer-events:none}
.press-status:empty{display:none}
.press-more{min-width:44px;min-height:44px;border:0;background:transparent;color:var(--press-blue);font-size:17px;padding:8px 12px;border-radius:10px}
.press-selected{outline:3px solid var(--press-blue);outline-offset:-3px}
.press-selected::after{content:'✓';position:absolute;right:8px;top:8px;background:var(--press-blue);color:#fff;border-radius:50%;width:24px;height:24px;display:grid;place-items:center;font-size:16px}
.press-search-selection{position:sticky;bottom:0;z-index:8;background:var(--press-surface);border-top:1px solid var(--press-divider);padding:12px max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom));display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.press-search-selection[hidden]{display:none}
.press-cover-photo{object-fit:cover!important;border-radius:50%}
@media(prefers-reduced-motion:reduce){.press-pending{transition:none}}

.press-album-cover-holder{display:inline-flex;width:44px;height:44px;flex-shrink:0;margin-right:12px}.press-album-cover-holder img,.album-card-emoji img.press-cover-photo{display:block;width:44px;height:44px;object-fit:cover}.press-share-status{margin:12px 8px 20px;font-size:16px;line-height:1.5}.press-task-selection{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:12px;background:var(--press-surface)}

/* Management state follows the new hold Golden; ordinary reading keeps its brand. */
.storybook-page:is(.select-mode,.moment-select-mode) .selection-bar,.storybook-page:is(.select-mode,.moment-select-mode) .moment-selection-bar{background:#fff;border:1px solid #e5e5ea;border-radius:18px;color:#1c1c1e;box-shadow:0 -2px 12px #00000008}
.storybook-page:is(.select-mode,.moment-select-mode) .selection-bar button{background:#fff;color:var(--press-blue);border-color:#e5e5ea;font-size:15px;min-height:44px}
.storybook-page:is(.select-mode,.moment-select-mode) .selection-bar .btn-danger{color:#c62828;background:#fff}
.storybook-page.select-mode .moment-photo-container{border:1px solid #e5e5ea;border-radius:8px}
.storybook-page.select-mode .moment-photo-container.selected{border-color:var(--press-blue);outline:2px solid var(--press-blue);outline-offset:-2px}
.storybook-page.select-mode .timeline-photo-select{left:auto;top:auto;right:4px;bottom:4px;width:32px;height:32px;border-radius:50%;border:2px solid #fff;background:#ffffffd9;color:#636366;font-size:17px;box-shadow:0 0 0 6px #ffffff00}
.storybook-page.select-mode .timeline-photo-select[aria-pressed="true"]{background:var(--press-blue);color:#fff}
.storybook-page.select-mode .album-photo-card.selected{outline:2px solid var(--press-blue);outline-offset:-2px}
.storybook-page.select-mode .album-photo-card .select-checkbox{left:auto;top:auto;right:5px;bottom:5px;width:28px;height:28px;border:2px solid #fff}
.storybook-page.select-mode .album-photo-card.selected .select-checkbox{background:var(--press-blue);border-color:#fff}
.storybook-page.select-mode .album-photo-card.selected .select-checkbox::after{color:#fff}
/* Isolate these new surfaces from the older all-dialog/card presentation rules. */
html body dialog.press-menu[open]{display:block!important;position:fixed!important;inset:auto 0 0!important;top:auto!important;bottom:0!important;left:0!important;right:0!important;margin:0 auto!important;transform:none!important;width:min(100%,540px)!important;max-width:100%!important;max-height:85dvh!important;height:auto!important;padding:20px 16px max(16px,env(safe-area-inset-bottom))!important;border:0!important;border-radius:24px 24px 0 0!important;background:#f2f2f7!important;color:#1c1c1e!important;overflow-y:auto!important;box-sizing:border-box!important}
html body dialog.press-menu h2{font-size:20px!important;line-height:1.4!important;font-weight:600!important;margin:0 8px 18px!important;padding:0!important;color:#1c1c1e!important}
html body dialog.press-menu .press-menu-items{padding:0!important;margin:0!important;background:#fff!important;border:0!important;border-radius:16px!important;overflow:hidden!important}
html body dialog.press-menu button{display:block!important;width:100%!important;min-height:50px!important;height:auto!important;margin:0!important;padding:14px 16px!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:#fff!important;color:var(--press-blue)!important;font-family:-apple-system,BlinkMacSystemFont,'Noto Sans TC',sans-serif!important;font-size:17px!important;font-weight:400!important;line-height:1.4!important;text-align:left!important;white-space:normal!important}
html body dialog.press-menu .press-menu-items button+button{border-top:1px solid #e5e5ea!important}
html body dialog.press-menu button.press-menu-cancel{margin-top:12px!important;border-radius:16px!important;text-align:center!important;font-weight:600!important}
html body dialog.press-menu button.press-menu-danger{color:#c62828!important}
html body dialog.press-menu button:disabled{color:#636366!important;opacity:.65!important}
html body dialog.press-menu button.press-menu-hover,html body dialog.press-menu button:active{background:#eaf3ff!important}
html body dialog.press-peek[open]{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;inset:0!important;top:0!important;left:0!important;right:0!important;bottom:0!important;margin:0!important;transform:none!important;width:100%!important;height:100dvh!important;max-width:none!important;max-height:none!important;padding:24px 16px!important;border:0!important;border-radius:0!important;background:#171719!important;color:#fff!important;overflow:hidden!important;box-sizing:border-box!important}
html body dialog.press-peek canvas{display:block!important;width:auto!important;height:auto!important;max-width:100%!important;max-height:72dvh!important;object-fit:contain!important;border-radius:14px!important}
html body dialog.press-peek p{color:#fff!important;font-size:16px!important;text-align:center!important;line-height:1.4!important}
html body dialog.press-peek button{background:#ffffff25!important;color:#fff!important;border:0!important;box-shadow:none!important;border-radius:999px!important;min-height:44px!important;padding:8px 20px!important;font-size:16px!important}

html body.storybook-page.select-mode .timeline-photo-select{display:flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;width:32px!important;min-width:32px!important;max-width:32px!important;height:32px!important;min-height:32px!important;max-height:32px!important;padding:0!important;border-radius:50%!important;line-height:1!important}

html body dialog.press-peek canvas{width:min(100%,480px)!important}

.child-card .child-emoji img.press-cover-photo{object-fit:cover!important;border-radius:14px!important}

.child-card .avatar-emoji img.press-cover-photo{display:block;width:64px;height:64px;border-radius:14px!important;object-fit:cover!important}

html body dialog.press-peek canvas{flex:0 1 auto;min-height:0;max-height:calc(100dvh - 160px)!important}html body dialog.press-peek p{flex:0 1 auto;max-height:18dvh;overflow:auto;overflow-wrap:anywhere}html body dialog.press-peek button{flex-shrink:0}
html body dialog.press-menu button:focus{outline:0!important}html body dialog.press-menu button:focus-visible{outline:2px solid var(--press-blue)!important;outline-offset:-4px!important}
html body dialog.press-peek button:focus{outline:0!important}html body dialog.press-peek button:focus-visible{outline:2px solid #fff!important;outline-offset:3px!important}

/* WKWebView image callouts otherwise replace the app menu during a real hold. */
#modalImage,.moment-photo-container[data-photo-id],.album-photo-card[data-id],#resultsGrid .photo-card[data-photo-id],.device-review-preview,.viewer-overview-photo,.memory-card[data-photo-id],.profile-btn[data-child],.sidebar-album-card[data-child],.child-card[data-child-index] {
    -webkit-touch-callout:none;
}

/* A held album button opens its own action sheet. */
.profile-btn[data-child], .sidebar-album-card[data-child], .child-card[data-child-index],
#settings-album-list [data-album-id], dialog.press-menu {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
