/* Contextual surfaces extend the existing native dialog; no backdrop blur. */
#sheet[data-surface-theme]{--surface-bg:var(--surface);--surface-text:var(--ink);--surface-secondary:var(--muted);--surface-line:var(--border);--surface-accent:var(--action);--surface-button-text:var(--on-action);--surface-soft:var(--soft);background:var(--surface-bg);color:var(--surface-text);border-color:var(--surface-line);border-radius:var(--r-sheet) var(--r-sheet) 0 0;max-height:min(84dvh,760px);overflow:hidden;inset:auto 0 0;margin:0 auto;animation:none;box-shadow:0 -14px 55px #0004;}
#sheet[data-surface-theme][open]{display:flex;flex-direction:column;}
#sheet[data-surface-theme="midnight"]{--surface-bg:#0a192c;--surface-text:#f0f8ff;--surface-secondary:#bed0e4;--surface-line:#405974;--surface-accent:#9be8df;--surface-button-text:#092724;--surface-soft:#152d43;}
#sheet[data-surface-theme="coffee"]{--surface-bg:#fff8ed;--surface-text:#342b23;--surface-secondary:#685647;--surface-line:#cbb7a2;--surface-accent:#785333;--surface-button-text:#fff;--surface-soft:#f0e3d3;}
#sheet[data-surface-theme]::backdrop{background:#030b1859;backdrop-filter:none;}
#sheet[data-surface-theme] .sheet-head{flex:0 0 auto;position:relative;background:var(--surface-bg);color:var(--surface-text);border-color:var(--surface-line);touch-action:none;user-select:none;padding:18px 18px 10px;}
#sheet[data-surface-theme] .sheet-head::before{content:"";position:absolute;top:7px;left:calc(50% - 19px);width:38px;height:4px;border-radius:4px;background:var(--surface-secondary);opacity:.7;}
#sheet[data-surface-theme] .sheet-head button{color:var(--surface-text);flex-shrink:0;}
#sheet[data-surface-theme] #sheet-content{min-height:0;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y pinch-zoom;-webkit-overflow-scrolling:touch;padding:16px 18px max(24px,env(safe-area-inset-bottom));scroll-padding:16px;}
#sheet[data-surface-theme] :is(h2,h3,dd){color:var(--surface-text);}
#sheet[data-surface-theme] #sheet-content p,#sheet[data-surface-theme] :is(small,dt){color:var(--surface-secondary);}
#sheet[data-surface-theme] :is(.tag,.friend-row){background:var(--surface-soft);color:var(--surface-text);}
#sheet[data-surface-theme] :is(.outline,details,.hub-facts>div){border-color:var(--surface-line);color:var(--surface-text);}
#sheet[data-surface-theme] .primary{background:var(--surface-accent);color:var(--surface-button-text);}
#sheet[data-surface-theme] a:not(.primary){color:var(--surface-accent);}
#sheet[data-surface-theme] :focus-visible{outline:3px solid var(--surface-accent);outline-offset:3px;}
#sheet[data-surface-theme] .surface68-context{display:flex;gap:12px;align-items:center;padding-bottom:14px;border-bottom:1px solid var(--surface-line);margin-bottom:16px;}
.surface68-context img{width:42px;height:54px;border-radius:8px;object-fit:cover;}
#sheet[data-surface-theme] .surface68-footer{flex:0 0 auto;background:var(--surface-bg);border-top:1px solid var(--surface-line);padding:12px 18px max(16px,env(safe-area-inset-bottom));}
#sheet[data-surface-theme] .surface68-footer p{margin:7px 0 0;color:var(--surface-secondary);font-size:.75rem;}
#sheet[data-surface-theme] .surface68-footer .primary{display:block;text-align:center;text-decoration:none;padding:12px;border-radius:14px;min-height:48px;}
#sheet[data-surface-state="closing"]{pointer-events:none;}
@media(max-width:350px){#sheet[data-surface-theme] #sheet-content{padding-left:14px;padding-right:14px;}}
@media(prefers-reduced-motion:reduce){#sheet[data-surface-theme]{animation:none;transition:none;}}
