/* Shared base for the D-114 prototypes. Fonts are SIL OFL 1.1 copies from Marketing/tools/fonts. */
@font-face { font-family: "Pixelify Sans"; src: url("fonts/PixelifySans.woff2") format("woff2"), url("fonts/PixelifySans.ttf") format("truetype"); /* PERF: lossless WOFF2, 77 -> 23 KB */ font-weight: 400 700; font-display: swap; }
/* Inter (OFL, the D-053 wordmark family) is in fonts/ but NOT loaded: unsubsetted it is 856 KB. Production subsets it to a ~40-60 KB woff2; the prototypes use the system UI face for reading text and the wordmark (placeholder for the approved SVG lockup). */
@font-face { font-family: "Silkscreen"; src: url("fonts/Silkscreen-Regular.woff2") format("woff2"), url("fonts/Silkscreen-Regular.ttf") format("truetype"); font-display: swap; }

:root {
  /* Night anchor: Lantern Rain theme (world.json) */
  --night: #0B1022; --night-text: #EFE8DB; --gold: #FFC867; --gold-glow: #FFE6A8;
  /* Day anchor: The Quiet Isle villa theme (world.json) */
  --villa: #E7E1D6; --villa-shade: #CFC6B6; --ink: #18292B; --teal: #1B5A5C; --teal-glow: #86D2C8;
  --pixel: "Pixelify Sans", "Silkscreen", ui-monospace, monospace;
  --tiny: "Silkscreen", ui-monospace, monospace;
  --body: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); font-size: 17px; line-height: 1.5; }
img, video, canvas { display: block; }
button { font: inherit; color: inherit; }
a { color: inherit; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 1000; padding: 10px 14px; background: var(--gold); color: #1a1206; font-weight: 600; border-radius: 6px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--focus, var(--gold)); outline-offset: 3px; }

/* Pixel stages: an art-resolution canvas scaled by whole numbers with nearest-neighbour (see sw.js). */
.pw { position: relative; overflow: hidden; }
.pw-canvas { position: absolute; left: 0; top: 0; image-rendering: pixelated; image-rendering: crisp-edges; }
.pw-fallback { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.js .pw-fallback { display: none; }
.pw-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; display: none;
  font-family: var(--tiny); font-size: 13px; letter-spacing: .08em; padding: 10px 16px; border: 0; border-radius: 4px;
  background: rgba(10, 12, 24, .82); color: #fff; cursor: pointer; }
.reduced .pw-play { display: block; }
.reduced .pw.playing-by-user .pw-play { display: none; }

/* Placeholder labels: anything that needs the real app or new art says so, plainly. */
.placeholder-tag { position: absolute; z-index: 20; font-family: var(--tiny); font-size: 11px; line-height: 1.3;
  letter-spacing: .06em; text-transform: uppercase; padding: 4px 7px; background: #FFE04A; color: #241c00;
  border: 1px solid #241c00; pointer-events: none; max-width: 280px; }
.draft { border-bottom: 1px dashed currentColor; }
.draft-note { font-family: var(--tiny); font-size: 11px; letter-spacing: .06em; opacity: .75; }

/* Review bar (prototype only). */
.review { position: fixed; right: 10px; bottom: 10px; z-index: 9999; font: 11px/1.35 ui-monospace, Menlo, monospace;
  background: rgba(20, 20, 24, .92); color: #e8e8e8; border-radius: 8px; max-width: 300px; box-shadow: 0 6px 24px rgba(0,0,0,.35); }
.review summary { cursor: pointer; padding: 7px 10px; list-style: none; }
.review summary::-webkit-details-marker { display: none; }
.review .rb { padding: 0 10px 10px; display: grid; gap: 6px; }
.review button, .review a { background: #333; color: #fff; border: 0; border-radius: 4px; padding: 4px 7px; font: inherit; cursor: pointer; text-decoration: none; }
.review button[aria-pressed="true"] { background: #b98a2a; }
.review .row { display: flex; flex-wrap: wrap; gap: 5px; }
.review output { white-space: pre-wrap; color: #bfc6d0; }
.snapshot .review { display: none; }

/* Shared world view (B and C). */
.sw-view { position: fixed; inset: 0; z-index: 90; display: none; background: var(--v-bg, #000); }
.sw-view.open { display: block; }
.sw-view-stage { position: absolute; inset: 0; }
.sw-view-ui { position: absolute; z-index: 5; left: clamp(12px, 3vw, 40px); right: clamp(12px, 3vw, 40px); bottom: clamp(12px, 3vw, 36px); display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.sw-plate { background: var(--v-bg); color: var(--v-text); padding: 14px 18px; border-radius: 12px; max-width: 520px; }
.sw-plate h2 { margin: 0 0 4px; font-family: var(--pixel); font-weight: 500; font-size: 30px; color: var(--v-title); }
.sw-plate p { margin: 0 0 10px; font-size: 15px; }
.sw-plate .sw-status { margin: 10px 0 0; font-family: var(--tiny); font-size: 11px; letter-spacing: .06em; }
.sw-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.sw-btns button { border: 0; border-radius: 999px; padding: 9px 14px; font-family: var(--tiny); font-size: 11px; letter-spacing: .06em; cursor: pointer; background: var(--v-bg); color: var(--v-text); box-shadow: inset 0 0 0 1.5px var(--v-text); }
.sw-btns button[aria-pressed="true"] { background: var(--v-text); color: var(--v-bg); }

/* Same-site page changes crossfade where the browser supports it (the home page's step-through-the-window ends in it). */
@view-transition { navigation: auto; }
/* Phones and touch screens use their own short fade between pages (shared/lite.js); the browser's crossfade would run
   on top of it and stutter. */
@media (max-width: 900px), (hover: none) and (pointer: coarse) { @view-transition { navigation: none; } }
