/* Shared comfort settings: modern site, 1999 mode, installed client, and ARG surfaces. */
html[data-comfort-motion="reduced"] { scroll-behavior: auto !important; }
html[data-comfort-motion="reduced"] *,
html[data-comfort-motion="reduced"] *::before,
html[data-comfort-motion="reduced"] *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
html[data-comfort-motion="reduced"] .mode-1999-gif-animated { display: none !important; }
html:not([data-comfort-motion="reduced"]) .mode-1999-gif-still { display: none; }

/* Shell-safe comfort controls: reading preferences must never reflow navigation or footer chrome. */
html[data-comfort-text="large"] :where(.book-story,.signal-article,.reader-entry-copy,.journal-post-body,.book-about,.account-content,.broadcast-content,.standard-copy) { --comfort-measure: 68ch; }
html[data-comfort-text="large"] :where(.book-story,.signal-article,.reader-entry-copy,.journal-post-body,.book-about,.account-content,.broadcast-content,.standard-copy) :where(p,li,blockquote) { max-width: var(--comfort-measure, 68ch); font-size: 1.1875em; }

html[data-comfort-contrast="high"] :where(a,button,input,select,textarea,summary):focus-visible { outline: 3px solid var(--accent, #fff) !important; outline-offset: 3px !important; }
html[data-comfort-contrast="high"] .site-main :where(input,select,textarea,button,.button,[role="button"]) { border-color: currentColor !important; }

html[data-comfort-patterns="off"] body { background-image: none !important; }
html[data-comfort-patterns="off"] :where(.screen-grid,.screen-scanlines,.lost-star-vignette,.mode-1999-stars,.site-noise) { display: none !important; }

html[data-comfort-justification="left"] :where(.book-story p,.signal-article p,.reader-entry-copy p,.journal-post-body p,.book-about p) { text-align: left !important; hyphens: none !important; word-spacing: normal !important; }

html[data-comfort-touch="large"] .site-main :where(button,.button,[role="button"],summary,input:not([type="hidden"]),select) { min-height: 48px; }
html[data-comfort-touch="large"] .site-main :where(button,.button,[role="button"],summary) { min-width: 48px; }

[data-transcript],.comfort-transcript { display: none; }
html[data-comfort-transcripts="on"] [data-transcript],
html[data-comfort-transcripts="on"] .comfort-transcript { display: block; }

.comfort-webgl-fallback { display: none; }
html[data-comfort-webgl="off"] canvas[data-webgl],
html[data-comfort-webgl="off"] .starduster-canvas,
html[data-comfort-webgl="off"] #view { display: none !important; }
html[data-comfort-webgl="off"] .comfort-webgl-fallback { display: grid; }
html[data-comfort-webgl="off"] :where(.starduster-fallback,.observatory-static-sky) { display: grid !important; }
.observatory-static-sky { position: fixed; inset: 50% auto auto 50%; translate: -50% -50%; z-index: 20; width: min(32rem,calc(100vw - 2rem)); gap: .75rem; padding: 1.25rem; background: #020506; border: 1px solid #8fffc1; color: #f4ecdc; }
.observatory-static-sky a { min-height: 44px; display: flex; align-items: center; padding: .4rem .7rem; color: #8fffc1; border: 1px solid #315755; text-decoration: none; }
.gate-screen > .comfort-webgl-fallback { position: absolute; inset: 1rem 1rem auto; z-index: 6; place-items: center; min-height: 3rem; padding: .75rem; background: #020506; border: 1px solid #315755; color: #f4ecdc; text-align: center; }

.comfort-panel { grid-column: 1 / -1; }
.comfort-setting-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(13rem,1fr)); gap: .65rem; margin-top: 1rem; }
.comfort-setting { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .75rem; min-height: 4.5rem; padding: .8rem 1rem; color: var(--ink); background: color-mix(in srgb,var(--surface) 88%,transparent); border: 1px solid var(--line); text-align: left; }
.comfort-setting strong,.comfort-setting small { display: block; }
.comfort-setting small { color: var(--muted); margin-top: .2rem; }
.comfort-setting::after { content: ""; width: .85rem; height: .85rem; border: 1px solid currentColor; border-radius: 50%; }
.comfort-setting[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.comfort-setting[aria-pressed="true"]::after { background: currentColor; box-shadow: inset 0 0 0 3px var(--surface); }
.comfort-group { border: 0; padding: 0; margin: 1.2rem 0 0; }
.comfort-group legend { font-weight: 800; margin-bottom: .35rem; }
.comfort-actions { margin-top: 1rem; }
@media (max-width: 620px) { .comfort-setting-grid { grid-template-columns: 1fr; } .comfort-setting { min-height: 4rem; } }
