/* Full page settings and message-local action menus. */
dialog.settings-page[open]:not(#voice-call):not(#photo-viewer){position:fixed;inset:0;margin:0;width:100%;height:100dvh;max-width:none;max-height:none;box-sizing:border-box;border:0!important;border-radius:0!important;padding:calc(env(safe-area-inset-top) + 78px) max(22px,calc((100vw - 760px)/2)) calc(32px + env(safe-area-inset-bottom))!important;background:#111815!important;box-shadow:none!important;backdrop-filter:none!important;overflow:auto;}
html[data-theme=light] dialog.settings-page[open]:not(#voice-call):not(#photo-viewer){background:#f6f9f7!important;color:#18271f;}
.settings-page::backdrop{background:transparent!important;backdrop-filter:none!important;}
.page-topbar{position:fixed;top:0;left:0;right:0;padding:calc(12px + env(safe-area-inset-top)) max(16px,calc((100vw - 800px)/2)) 12px;display:flex;align-items:center;gap:14px;background:inherit;border-bottom:1px solid #80808025;z-index:3;}
.page-topbar button{width:44px;height:44px;padding:10px;border-radius:50%;flex:none;}
.page-topbar svg{width:24px;height:24px;}
.page-topbar strong{font-size:20px;}
.settings-page>header,.settings-page>h2,.settings-page>form>h2{display:none!important;}
.settings-page label{margin-bottom:20px;}
.settings-page .glass-choice{min-height:58px;}
.message-context-menu{position:fixed;z-index:10000;width:238px;max-width:calc(100vw - 24px);padding:6px;border-radius:18px;background:#18201cf5;color:#edf5ef;border:1px solid #ffffff18;box-shadow:0 12px 40px #0005;backdrop-filter:blur(24px);overflow:auto;box-sizing:border-box;}
html[data-theme=light] .message-context-menu{background:#f8fcf9f5;color:#17271e;border-color:#18271f20;}
.message-context-menu .tool-choices{display:flex;flex-direction:column;gap:2px;}
.message-context-menu .tool-choices>button{display:flex;align-items:center;gap:12px;background:transparent;color:inherit;border:0;box-shadow:none;border-radius:11px;text-align:left;padding:11px 12px;min-height:42px;font-size:14px;font-weight:500;}
.message-context-menu button:hover,.message-context-menu button:focus-visible{background:#80808022;outline:2px solid #20c466;outline-offset:-2px;}
.message-context-menu svg{width:19px;height:19px;flex:none;}
.message-context-menu .reaction-picker{margin:2px 0 7px!important;gap:0!important;padding-bottom:8px;border-bottom:1px solid #80808033;}
.message-context-menu .reaction-picker button{padding:5px 2px;font-size:22px!important;background:transparent;}
.message-context-menu .danger{color:#f07883!important;}
/* Story creation and viewing share the full-page navigation pattern. */
#story-dialog.settings-page #story-form{display:grid;gap:20px;max-width:640px;margin:0 auto;}
#story-dialog.settings-page #story-form label{margin:0;}
#story-dialog.settings-page #story-form p{font-size:13px;color:var(--muted,#95a49c);margin:0;}
#story-dialog.settings-page #story-preview{width:100%;max-height:48dvh;object-fit:contain;border-radius:20px;background:#80808012;}
#story-dialog.settings-page.story-view>img{display:block;width:100%;height:auto;max-height:calc(100dvh - 230px);object-fit:contain;border-radius:18px;margin:0 auto;}
#story-dialog.settings-page.story-view>p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;}
#story-dialog.settings-page #story-form>button{min-height:48px;border-radius:24px;}
