@import url('./cutscenes/typography.css');
/* Period media deck and 4:3 dossiers. Inline project playback. */
body.project-page .screen-inner { font-size: .72cqw; }
body.project-page #content { gap: .45cqw; }
body.project-page .chapter-top { min-height: 1.5cqw; }
body.project-page .project-dossier {
  flex: 1; min-height: 0; display: grid; grid-template-columns: 54% 1fr; grid-template-rows: minmax(0, 1fr);
  gap: 4%; align-items: center; padding: .25cqw 0;
  font: 400 1em/1.3 MenuText, Pixel, monospace;
}
.dossier-picture { align-self: stretch; min-height: 0; container-type: size; display: grid; place-items: center; }
.dossier-picture .media-deck { width: min(100cqw, calc((100cqh - 5.8em) * 4 / 3)); }
.dossier-story { min-width: 0; }
.dossier-logo { display: block; width: 4.2cqw; height: 1.8cqw; object-fit: contain; object-position: left; margin: 0 0 .6cqw; }
.dossier-logo.afia, .dossier-logo.courier { filter: brightness(0) invert(.8); }
.dossier-title { font: 400 1.05cqw/1.08 MenuDisplay, Pixel, monospace; color: #c2cba6; margin-bottom: .65cqw; }
.dossier-story ol { margin: 0; padding: 0; list-style: none; counter-reset: story; color: #9cae93; font-size: .67cqw; line-height: 1.35; }
.dossier-story li { position: relative; padding-left: 1.4em; counter-increment: story; }
.dossier-story li + li { margin-top: .7em; }
.dossier-story li::before { content: '0' counter(story); position: absolute; left: 0; top: .15em; color: #73866f; font: 400 .65em/1.5 Pixel, monospace; }

/* Hard edges, physical keys and a recessed LCD. No decorative controls. */
.media-deck {
  min-width: 0; background: #30392f; color: #bac6a2;
  border: 1px solid; border-color: #839078 #151e18 #151e18 #839078;
  box-shadow: 1px 1px 0 #030b07; padding: .22em;
  font: 400 1em/1.15 MenuText, Pixel, monospace;
  text-shadow: none;
}
.deck-title { height: 1.65em; display: flex; align-items: center; gap: .45em; padding: 0 .25em .15em; font-size: .8em; letter-spacing: .02em; }
.deck-title > span:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.deck-indicator { width: .5em; height: .5em; background: #667156; box-shadow: inset 1px 1px #202a22; flex: none; }
.is-playing .deck-indicator { background: #bbc99b; }
.media-picture { position: relative; width: 100%; aspect-ratio: 4/3; background: #030806; outline: 1px solid #111a14; overflow: hidden; }
.media-picture video { display: block; width: 100%; height: 100%; object-fit: contain; filter: none; }
.deck-panel { padding: .15em .15em .05em; }
.deck-transport { display: flex; align-items: center; gap: .4em; min-height: 2.15em; }
.deck-keys { display: flex; gap: .15em; }
.deck-key { display: flex; align-items: center; justify-content: center; flex: none; width: 2.15em; height: 1.9em; padding: .3em; background: #69735c; color: #17241b; border: 1px solid; border-color: #a4ad8f #17221a #17221a #a4ad8f; box-shadow: inset -1px -1px #45513f; }
.deck-key svg { width: 1.15em; height: 1.15em; stroke: none; fill: currentColor; flex: none; shape-rendering: crispEdges; }
.deck-key:active { border-color: #17221a #a4ad8f #a4ad8f #17221a; box-shadow: inset 1px 1px #45513f; }
.deck-key.game-selected { background: #c2cda3; color: #0b1710; }
.deck-key:disabled { opacity: .45; }
.deck-title .deck-key { width: 1.55em; height: 1.4em; padding: .1em; }
.deck-title .deck-key svg { width: 1em; height: 1em; }
.deck-clock { margin-left: auto; display: block; flex: none; white-space: nowrap; background: #0d1710; color: #bfd599; padding: .35em .4em .25em; box-shadow: inset 1px 1px #071009, 1px 1px #718064; font: 400 .73em/1 Pixel, monospace; font-variant-numeric: tabular-nums; }
.deck-total { color: #6f8265; }
.deck-seek { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 1.15em; margin: 0; padding: 0; background: transparent; cursor: pointer; }
.deck-seek::-webkit-slider-runnable-track { height: .3em; border: 1px solid; border-color: #17221b #7a876b #7a876b #17221b; background: #1c281e; }
.deck-seek::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: .75em; height: .85em; margin-top: calc(-.275em - 1px); border: 1px solid; border-color: #b6bea2 #17221a #17221a #b6bea2; border-radius: 0; background: repeating-linear-gradient(90deg,#7e8b70 0 2px,#485441 2px 3px); }
.deck-seek::-moz-range-track { height: .3em; border: 1px solid; border-color: #17221b #7a876b #7a876b #17221b; background: #1c281e; }
.deck-seek::-moz-range-thumb { width: .75em; height: .85em; border: 1px solid #a3af8f; border-radius: 0; background: #7e8b70; }
.deck-seek.game-selected::-webkit-slider-thumb { background: #d8e6b5; border-color: #edf5d0 #526341 #526341 #edf5d0; box-shadow: 0 0 3px #d8e6b580; }
.deck-seek.game-selected::-moz-range-thumb { background: #d8e6b5; border-color: #edf5d0; box-shadow: 0 0 3px #d8e6b580; }
.deck-sr { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }

/* Fit the complete 4:3 picture AND its dock into the CRT's usable height. */
.native-frame, #afia-native-stage { position: absolute; inset: 0; }
#afia-native-stage canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
#native-caption { position: absolute; left: 4%; right: 4%; bottom: 4%; padding: .2em .3em; text-align: center; color: #ddd5b3; background: linear-gradient(90deg,transparent,#0b1716b3,transparent); font: 400 1em/1.2 MenuText, Pixel, monospace; text-shadow: 1px 1px #102018; pointer-events: none; }
#native-caption:empty, #film-error:empty { display: none; }
body.project-page #film-error { flex: none; font: 400 .65cqw/1.3 MenuText, monospace; color: #e2be95; }

@media (max-width: 700px), (max-height: 500px) {
  body.zoomed.project-page .screen-inner { font-size: 14px; }
  body.zoomed.project-page #content { padding: 8px 0; gap: 8px; }
  body.zoomed.project-page .chapter-top { min-height: 28px; }
  body.zoomed.project-page .project-dossier { display: flex; flex-direction: column; gap: 16px; padding: 0; flex: 0 0 auto; font-size: 14px; }
  body.zoomed .dossier-picture { width: 100%; container-type: normal; }
  body.zoomed .dossier-picture .media-deck { width: 100%; }
  body.zoomed .dossier-story { width: 100%; padding: 0 2px 4px; }
  body.zoomed .dossier-logo { width: 74px; height: 28px; margin-bottom: 10px; }
  body.zoomed .dossier-title { font-size: 24px; margin-bottom: 10px; }
  body.zoomed .dossier-story ol { font-size: 16px; line-height: 1.35; }
  body.zoomed .dossier-story li + li { margin-top: 12px; }
  body.zoomed .deck-transport { min-height: 44px; }
  body.zoomed .deck-keys { gap: 4px; }
  body.zoomed .deck-key { min-width: 44px; height: 40px; }
  body.zoomed .deck-title { height: 32px; font-size: 13px; }
  body.zoomed .deck-title .deck-key { min-width: 44px; height: 28px; }
  body.zoomed .deck-key svg { width: 18px; height: 18px; }
  body.zoomed .deck-seek { height: 28px; }
  body.zoomed .deck-clock { font-size: 9px; padding: 8px 5px; }
  body.zoomed.project-page #film-error { font-size: 14px; }
}
/* Landscape phones keep the 4:3 picture large; the controls dock beside it. */
@media (max-height: 500px) and (min-width: 701px) {
  body.zoomed.project-page .screen-inner { font-size: 12px; }
  body.zoomed.project-page .project-dossier { display: grid; grid-template-columns: 45% 1fr; gap: 24px; }
  body.zoomed .dossier-picture { container-type: normal; }
  /* Keep a usable 4:3 deck and controls; the enlarged phone may scroll. */
  body.zoomed .dossier-picture .media-deck { width: 100%; }
  body.zoomed .dossier-story ol { font-size: 13px; }
  body.zoomed .dossier-logo { width: 60px; height: 22px; margin-bottom: 8px; }
  body.zoomed .dossier-title { font-size: 20px; margin-bottom: 10px; }
}
