@font-face{font-family:BlenderTerminal;src:url('./assets/terminal-font.ttf') format('truetype');font-display:swap}*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#080c09;color:#b9e5ae;font-family:BlenderTerminal,monospace}body{height:100dvh;overflow:hidden}header{position:absolute;z-index:5;top:0;right:0;padding:16px 24px}header nav{display:flex;gap:22px;align-items:center}button,input,a{font:inherit;color:inherit}button{border:0;background:transparent;cursor:pointer;padding:5px 0}button:hover,button[aria-pressed=true]{color:#e2ffcb}button:focus-visible,input:focus-visible,a:focus-visible{outline:2px solid currentColor;outline-offset:3px}header button{font-size:14px}#stage{position:relative;height:100dvh;width:100%;overflow:hidden}#world{display:block;width:100%;height:100%;outline:0}#loading{position:absolute;inset:0;display:grid;place-items:center;background:#080c09;z-index:9}#loading[hidden]{display:none}#screen-ui{width:960px;height:800px;padding:40px 48px;background:transparent;pointer-events:auto;position:relative;color:#9dfca3;font-size:30px;display:flex;flex-direction:column;text-shadow:0 0 5px #6cf78370;overflow:hidden}#screen-ui:after,#loading:after{content:'';position:absolute;inset:0;pointer-events:none;z-index:10;background:repeating-linear-gradient(0deg,#0007 0px,#0007 1px,transparent 2px,transparent 4px),repeating-linear-gradient(90deg,#002b0b30 0px,#002b0b30 1px,transparent 1px,transparent 3px);box-shadow:inset 0 0 90px 15px #0007}.screen-head{border-bottom:2px solid #497b4b;padding-bottom:15px;min-height:90px;font-size:27px;display:flex;flex-direction:column;gap:10px}#meta{font-size:24px;color:#88bb81}#story-view{flex:1;min-height:0;position:relative;padding-top:26px}#text{white-space:pre-wrap;font-size:49px;line-height:1.05;overflow:hidden;max-height:370px}#status{font-size:22px;color:#9fc392;margin-top:15px}.screen-bottom{margin-top:auto;position:relative;z-index:2;font-size:24px}#record{color:#7cb477;font-size:21px;margin-bottom:8px}.screen-bottom nav{display:flex;justify-content:space-between;gap:12px}.screen-bottom button{white-space:nowrap}.command{display:flex;gap:12px;align-items:center;margin:12px 0;border-top:1px solid #37623c;padding-top:8px}.command input{min-width:0;width:100%;background:none;border:0;outline:0}.command input:disabled{opacity:.5}.secondary{font-size:20px;color:#89b984}.credits{font-size:19px;color:#88b682}#index-view,#help-view{flex:1;overflow:auto;font-size:29px;line-height:1.35;padding-top:20px;position:relative;z-index:2}#archive-list button{width:100%;display:flex;justify-content:space-between;border-bottom:1px solid #37623c;padding:18px 0;text-align:left}#index-view input{background:#08170e;border:1px solid #37623c;width:100%;padding:6px}[hidden]{display:none!important}#accessible-host{display:none}@media(max-width:640px){header{padding:12px}header nav{gap:15px}header button{font-size:12px}.accessible #screen-ui{padding:15px}.accessible .screen-head{font-size:20px}.accessible .screen-bottom{font-size:18px}}
#stage{overflow:clip}

/* Keep text on the physical screen, including accessible mode. */
#text{overflow:auto;scrollbar-width:thin;scrollbar-color:#65975e #07130a;overscroll-behavior:contain}
#text{scroll-behavior:auto}
.zoom-arrow{position:fixed;bottom:26px;right:28px;z-index:6;width:88px;height:88px;padding:18px;border:1px solid #7fbb83;border-radius:50%;background:radial-gradient(ellipse at 45% 40%,#183d20ed,#07140bf5 78%);color:#acffb2;box-shadow:0 4px 25px #0007,0 0 16px #76ec8526,inset 0 0 15px #70e98020;isolation:isolate}
.zoom-arrow:after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:repeating-linear-gradient(0deg,#0006 0px,#0006 1px,transparent 2px,transparent 4px),repeating-linear-gradient(90deg,#002b0b26 0px,#002b0b26 1px,transparent 1px,transparent 3px);box-shadow:inset 0 0 18px #0009}
.zoom-arrow svg{display:block;width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:5;stroke-linecap:square;stroke-linejoin:miter;filter:drop-shadow(0 0 3px #79ff8b90);animation:arrow-phosphor 4s ease-in-out infinite}
.zoom-arrow:hover{color:#dcffcf;box-shadow:0 4px 25px #0007,0 0 20px #76ec8540,inset 0 0 15px #70e98030}
@keyframes arrow-phosphor{0%,100%{opacity:1}50%{opacity:.86}}
@media(prefers-reduced-motion:reduce){.zoom-arrow svg{animation:none}}
.zoom-arrow[data-close=true] svg{transform:rotate(180deg)}
.accessible #screen-ui{color:#d4ffd0;text-shadow:none}
.accessible #screen-ui:after{display:none}
.accessible #text{font-size:var(--reading-size,49px);line-height:1.08}
.accessible #screen-ui .screen-head{color:#d4ffd0}
.accessible .zoom-arrow{display:none}
#access-settings{padding-top:10px;font-size:22px}
#access-settings input{width:220px}
.fallback{overflow:auto}
.fallback #stage{display:none}
.fallback #accessible-host{padding:65px 20px;display:block}
.fallback #screen-ui{position:relative!important;transform:none!important;width:100%!important;max-width:960px;height:auto!important;min-height:80dvh;margin:auto;background:#0a1c0d}
@media(max-width:640px){.zoom-arrow{width:74px;height:74px;right:16px;bottom:18px;padding:16px}}

#screen-power{display:none}.accessible #screen-power{display:inline-block}

#ambience-panel{position:fixed;top:58px;right:24px;width:min(320px,calc(100vw - 32px));z-index:8;padding:20px;background:#10180ff5;border:1px solid #7b8a62;box-shadow:0 8px 32px #0009;color:#d5e3b9;font-size:16px;max-height:calc(100dvh - 80px);overflow:auto}
.ambience-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.ambience-heading button{font-size:26px;padding:0 5px}
#ambience-panel label:not(.ambience-check){display:flex;justify-content:space-between;margin-top:16px}
#ambience-panel input[type=range]{width:100%;accent-color:#e0a766;margin:10px 0 5px;cursor:pointer}
#ambience-panel .ambience-check{display:flex;align-items:center;gap:10px;margin-top:18px;cursor:pointer}
#ambience-panel input[type=checkbox]{width:18px;height:18px;accent-color:#e0a766}
#ambience-note{font-size:14px;line-height:1.5;color:#b3bea0;margin:18px 0 10px}#ambience-reset{border-bottom:1px solid #7b8a62}
@media(max-width:640px){header nav{gap:10px;flex-wrap:wrap;justify-content:flex-end}#ambience-panel{right:16px;top:72px;max-height:calc(100dvh - 90px)}}

#help-view p[data-en]{white-space:pre-line}

/* The phone controls live on the held tablet, inside the same CRT surface. */
.tablet header,.tablet #view{display:none}
.tablet #screen-ui{width:720px;height:var(--tablet-screen-height,1220px);padding:44px 36px 55px;font-size:28px;clip-path:var(--tablet-screen-clip,inset(3%))}
.tablet .screen-head{font-size:27px;min-height:100px;gap:9px}
.tablet #meta{font-size:25px}
.tablet #story-view{padding-top:24px;display:flex;flex-direction:column}
.tablet #text{font-size:37px;line-height:1.12;max-height:none;min-height:0;flex:1}
.tablet #status{font-size:24px}
.tablet .screen-bottom{font-size:26px;padding-top:18px}
.tablet .screen-bottom nav{gap:12px;flex-wrap:wrap}
.tablet .screen-bottom button{min-height:72px}
.tablet #record{font-size:24px}
.tablet .command{min-height:72px;margin:8px 0}
.tablet .command input{font-size:30px}
.tablet #help-view,.tablet #index-view{font-size:30px;line-height:1.4;overscroll-behavior:contain;touch-action:pan-y pinch-zoom}
.tablet #text{overscroll-behavior:contain;touch-action:pan-y pinch-zoom}
.tablet #world{touch-action:none}
.tablet #tablet-tools{display:flex;justify-content:space-between;align-items:center;flex:none;min-height:76px;padding-right:10%;border-bottom:1px solid #37623c}
.tablet #tablet-menu{font-size:29px;min-width:120px;min-height:76px}
.tablet #tablet-preferences{padding:14px 0 20px;border-bottom:1px solid #37623c;flex:none}
.tablet #tablet-preferences nav{display:grid;grid-template-columns:1fr 1fr;gap:12px 20px}
.tablet #tablet-preferences button{font-size:28px;min-height:80px;text-align:left;border-bottom:1px solid #294c2d}
.tablet #tablet-preferences #screen-power{display:none}
#tablet-handle{touch-action:manipulation}
.tablet.accessible #text{font-size:var(--reading-size,37px)}
.tablet #access-settings{font-size:28px}
.tablet-help{display:none}.tablet .tablet-help{display:block}.tablet .desktop-help{display:none}

/* Initial loading uses the same font, green phosphor and CRT overlay. */
#loading{position:fixed;inset:auto;left:0;top:0;width:100vw;height:100dvh;display:flex;align-items:center;justify-content:center;text-align:center;isolation:isolate;overflow:hidden;background:radial-gradient(ellipse at 50% 45%,#163b22,#102c18 42%,#010503 100%);color:#9dfca3;text-shadow:0 0 5px #6cf78370}
.loading-line{margin:0;font-size:clamp(20px,4.5vw,36px);line-height:1.2;white-space:nowrap;flex:none}
.loading-cursor{animation:loading-cursor .6666667s steps(1,end) infinite}
@keyframes loading-cursor{0%,100%{opacity:1}50%{opacity:0}}
@media(prefers-reduced-motion:reduce){.loading-cursor{animation:none}#loading:after{display:none}#loading{text-shadow:none}}
/* Green scrollbars for every reader pane, in Firefox and WebKit/Blink. */
#text,#help-view,#index-view{scrollbar-width:thin;scrollbar-color:#75d980 #07130a}
#text::-webkit-scrollbar,#help-view::-webkit-scrollbar,#index-view::-webkit-scrollbar{width:12px;height:12px;background:#07130a}
#text::-webkit-scrollbar-thumb,#help-view::-webkit-scrollbar-thumb,#index-view::-webkit-scrollbar-thumb{background:#75d980;border:2px solid #07130a;border-radius:0}
#text::-webkit-scrollbar-thumb:hover,#help-view::-webkit-scrollbar-thumb:hover,#index-view::-webkit-scrollbar-thumb:hover{background:#b0ffb7}
#text::-webkit-scrollbar-corner,#help-view::-webkit-scrollbar-corner,#index-view::-webkit-scrollbar-corner{background:#07130a}
.accessible #text,.accessible #help-view,.accessible #index-view{scrollbar-color:#b6f5ab #112217}

.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.sound-toggle{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px}
.sound-toggle svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:square;stroke-linejoin:miter;filter:drop-shadow(0 0 3px #79ff8b70)}
.sound-toggle[aria-pressed=false] .sound-waves,.sound-toggle[aria-pressed=true] .sound-muted-mark{display:none}
.tablet #tablet-tools .sound-toggle{min-width:80px;min-height:76px}
.tablet #tablet-tools .sound-toggle svg{width:42px;height:42px}

/* A single soft phosphor reveal on pickup, without a white flash. */
.tablet #screen-ui[data-tablet-boot=true]> *{animation:tablet-phosphor-on .5s ease-out both}
.tablet #screen-ui[data-tablet-boot=true]:before{content:'';position:absolute;z-index:8;pointer-events:none;left:8%;right:8%;top:50%;height:2px;background:#9dfca3;box-shadow:0 0 12px #6cf78370;animation:tablet-start-line .5s ease-out both}
@keyframes tablet-phosphor-on{from{opacity:0;clip-path:inset(49% 0)}to{opacity:1;clip-path:inset(0)}}
@keyframes tablet-start-line{0%{opacity:0;transform:scaleX(.2)}30%{opacity:.5}100%{opacity:0;transform:scaleX(1)}}
@media(prefers-reduced-motion:reduce){.tablet #screen-ui[data-tablet-boot=true]> *{animation:none}.tablet #screen-ui[data-tablet-boot=true]:before{display:none}}
.accessible #screen-ui[data-tablet-boot=true]> *{animation:none}.accessible #screen-ui[data-tablet-boot=true]:before{display:none}
