/* Supporting surfaces follow the same web palette as the reading page. */
:root { --vscode-editorHoverWidget-background:var(--vscode-editor-background); --vscode-editorHoverWidget-foreground:var(--vscode-editor-foreground); }
:root { --vscode-editor-foreground:#25252c; --vscode-editor-background:#faf9f5; --vscode-font-family:system-ui,sans-serif; --vscode-textBlockQuote-background:#e8e7e0; --vscode-textCodeBlock-background:#e8e7e0; --vscode-descriptionForeground:#55545c; --vscode-panel-border:#aaa; --vscode-textLink-foreground:#165878; --vscode-editorWarning-foreground:#845300; --vscode-focusBorder:#145eb0; }
@media(prefers-color-scheme:dark){:root{--vscode-editor-foreground:#eee;--vscode-editor-background:#202126;--vscode-textBlockQuote-background:#30313a;--vscode-textCodeBlock-background:#30313a;--vscode-descriptionForeground:#c1c2cb;--vscode-panel-border:#747782;--vscode-textLink-foreground:#8dd1ff;--vscode-editorWarning-foreground:#f1c17b;--vscode-focusBorder:#8dd1ff;}}
header {max-width:44rem;margin:auto;padding:1rem 1.5rem 0;box-sizing:border-box;}
body > header {padding:.55rem 1rem 0;}
h1 {font-size:1.3rem;margin:.2rem 0;}
.book-heading {display:flex;align-items:center;gap:.75rem;}
.book-heading h1 {font-size:1.05rem;line-height:1.35;margin:0;flex:1;min-width:0;overflow-wrap:anywhere;}
#contents-toggle {font-size:.85rem;min-height:44px;flex-shrink:0;}
#contents {border:1px solid var(--vscode-panel-border);padding:.7rem;margin:.5rem 0;max-height:50vh;overflow:auto;}
#contents button {display:block;margin:.4rem 0;max-width:100%;min-height:44px;text-align:left;}
#contents [aria-current=true]{outline:2px solid var(--vscode-focusBorder);}summary{cursor:pointer;}
button{border-radius:.2rem;}[hidden]{display:none!important;}
.scene-context {margin:.3rem 0 .15rem;line-height:1.4;overflow-wrap:anywhere;}
.scene-context #scene-title {display:block;margin:0;font-size:.95rem;font-weight:600;line-height:1.4;}
.scene-context #status {display:block;margin:0;font-size:.78rem;color:var(--vscode-descriptionForeground);text-align:left;}
.compact-controls {justify-content:center;gap:.6rem;padding:.35rem 1rem .5rem;flex-wrap:nowrap;}
.icon-button {display:inline-flex;align-items:center;justify-content:center;min-width:48px;width:48px;min-height:48px;padding:.6rem;flex:0 0 auto;}
.icon-button svg {width:24px;height:24px;pointer-events:none;}
.icon-button:disabled {opacity:1;color:var(--vscode-descriptionForeground);background:var(--vscode-textBlockQuote-background);border-color:var(--vscode-panel-border);cursor:default;}
.icon-button[aria-pressed=true] {border:2px solid currentColor;}
#more-options {position:fixed;z-index:4;box-sizing:border-box;overflow:auto;overscroll-behavior:contain;padding:.65rem;border:1px solid var(--vscode-panel-border);border-radius:.35rem;background:var(--vscode-editor-background);color:var(--vscode-editor-foreground);box-shadow:0 4px 16px #0004;}
#more-options > button {display:block;text-align:left;width:100%;min-height:44px;margin:0 0 .4rem;}
#more-options .reader-preference {display:flex;justify-content:space-between;gap:.5rem;white-space:normal;min-height:44px;padding:.15rem 0;font-size:.9rem;}
#more-options select {font:inherit;min-height:44px;max-width:55%;color:var(--vscode-editor-foreground);background:var(--vscode-editor-background);border:1px solid var(--vscode-panel-border);border-radius:.2rem;}
#more-options input {width:24px;height:24px;flex-shrink:0;}
@media(max-width:480px){header{padding:.7rem 1rem 0;}.compact-controls{gap:.5rem;padding:.3rem .7rem .45rem;}.icon-button{width:44px;min-width:44px;min-height:44px;padding:.5rem;}#beat{padding:1rem;}}
@media(forced-colors:active){button,.supporting-panel,.supporting-preview,#more-options{border:1px solid ButtonText;}.icon-button:disabled{color:GrayText;border-color:GrayText;}}

/* CookieScript's small dark circular badge, using a local icon and no third-party UI script. */
.has-analytics-consent { padding-bottom:calc(72px + env(safe-area-inset-bottom, 0px)); }
.analytics-privacy { --privacy-left:max(10px, env(safe-area-inset-left, 0px)); --privacy-bottom:max(10px, env(safe-area-inset-bottom, 0px)); }
#analytics-privacy-button { position:fixed; z-index:5; left:var(--privacy-left); bottom:var(--privacy-bottom); display:flex; align-items:center; justify-content:center; width:46px; height:46px; min-height:46px; padding:9px; border:1px solid #777; border-radius:50%; background:#1c1c1c; color:#eee; box-shadow:1px 2px 8px #0003; }
#analytics-privacy-button svg { width:28px; height:28px; pointer-events:none; }
.analytics-privacy-label { display:none; position:fixed; z-index:6; left:calc(var(--privacy-left) + 54px); bottom:calc(var(--privacy-bottom) + 5px); max-width:calc(100vw - var(--privacy-left) - 72px); padding:4px 8px; border-radius:4px; background:#1c1c1c; color:#fff; font-size:.8rem; line-height:1.4; pointer-events:none; }
#analytics-privacy-button:is(:hover,:focus-visible)[aria-expanded=false] + .analytics-privacy-label { display:block; }
#analytics-consent-panel { position:fixed; z-index:6; box-sizing:border-box; left:var(--privacy-left); bottom:calc(var(--privacy-bottom) + 56px); width:320px; max-width:calc(100vw - var(--privacy-left) - max(10px, env(safe-area-inset-right, 0px))); max-height:calc(100dvh - var(--privacy-bottom) - 66px - env(safe-area-inset-top, 0px)); overflow:auto; overscroll-behavior:contain; padding:14px; border:1px solid var(--vscode-panel-border); border-radius:8px; background:var(--vscode-editor-background); color:var(--vscode-editor-foreground); box-shadow:1px 2px 12px #0004; font-size:.85rem; line-height:1.45; }
#analytics-consent-panel h2 { margin:0 44px 8px 0; font-size:1rem; }
#analytics-consent-panel p { margin:8px 0; }
#analytics-consent-choice { color:var(--vscode-descriptionForeground); }
.analytics-consent-close { position:absolute; right:4px; top:4px; width:44px; min-height:44px; padding:0; font-size:1.4rem; }
.analytics-consent-actions { display:flex; gap:8px; margin-top:12px; }
.analytics-consent-actions button { flex:1; min-width:0; min-height:44px; padding:6px; white-space:normal; font-size:inherit; }
/* Follow stays clear of the privacy badge, including short/narrow safe-area viewports. */
.has-analytics-consent #follow-story { right:max(10px, env(safe-area-inset-right, 0px)); bottom:max(10px, env(safe-area-inset-bottom, 0px)); max-width:calc(100vw - 82px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)); }
@media(forced-colors:active){#analytics-privacy-button,#analytics-consent-panel,.analytics-privacy-label{border:1px solid ButtonText;background:Canvas;color:CanvasText;}}
