/* The only presentation layer after the base layout. No atlas crop overrides. */
:root {
  --ink: #fff4e9; --muted: #c8b9c8; --paper: #231d29;
  --accent: #e6a0b0; --accent-dark: #f2b9c6; --soft: #392c3b;
  --shadow: 0 24px 80px #0006;
}
body { background: #15121b; }
button:focus-visible { outline: 3px solid #ffd28a; outline-offset: 4px; }
.title-screen {
  padding: 28px 18px;
  background: radial-gradient(ellipse at top, #483045, #15121b 70%);
}
.title-card { width: min(860px, 100%); padding: 0; overflow: hidden; transform: none; border-radius: 18px; border: 1px solid #c7a47c66; }
.title-illustration {
  position: relative; aspect-ratio: 16 / 7; overflow: hidden;
  background-color: #392c3b; background-size: 300% 200%; background-repeat: no-repeat;
}
.title-illustration::after {
  content: ""; position: absolute; inset: 65% 0 0;
  background: linear-gradient(transparent, #231d29); pointer-events: none;
}
.title-copy { position: relative; padding: 24px 28px 30px; }
.title-copy h1 { font-family: Georgia, serif; font-weight: 500; letter-spacing: -.04em; font-size: clamp(2.9rem, 7vw, 4.2rem); color: #ffedcf; }
.title-kicker { font-size: clamp(1.1rem, 3vw, 1.5rem); letter-spacing: .02em; font-weight: 500; }
.eyebrow { font-size: .68rem; letter-spacing: .21em; color: #e7c796; }
.subtitle { margin: 16px auto 20px; font-size: .95rem; max-width: 420px; line-height: 1.55; }
.tiny-note { margin-top: 18px; font-size: .71rem; }
.primary-button, .next-button { border-radius: 8px; background: #efbcc1; color: #302130; box-shadow: 0 4px 0 #9f677c; }
.primary-button { min-width: 200px; padding: 13px 28px; }
.text-button { color: #f0c5ce; }
.birthday-seal {
  position: absolute; top: 22px; right: 24px; z-index: 3; width: 64px; height: 64px;
  border: 1px solid #eccc9f; border-radius: 50%; display: grid; align-content: center;
  font: 27px/1 Georgia, serif; color: #ffe7b6; background: #29202bcc; transform: rotate(9deg);
}
.birthday-seal small { font: 9px/1.8 system-ui; text-transform: uppercase; letter-spacing: .15em; }
.cover-character { position: absolute; bottom: 3%; height: 91%; z-index: 1; width: 25%; left: 23%; }
.cover-character[data-character="chris"] { left: 48%; height: 96%; }
.cover-character[data-character="booboo"] { left: 45%; height: 28%; width: 13%; z-index: 2; bottom: 2%; }
.cover-character canvas, .scene-character canvas, .scene-companion canvas {
  display: block; width: 100%; height: 100%; object-fit: contain; object-position: center bottom;
}
.game-screen { align-content: start; grid-template-rows: auto auto; padding: 18px; gap: 12px; background: radial-gradient(ellipse at top, #362636, #15121b 70%); }
.game-hud { font-size: .8rem; }
.hud-pill, .hud-button { border-radius: 7px; background: #28212e; border: 1px solid #ffffff20; color: #eadce6; box-shadow: none; }
.scene { grid-template-rows: auto auto; align-self: start; border-radius: 12px; background: #231d29; border: 1px solid #ffffff22; }
.scene-art { aspect-ratio: 16 / 9; min-height: 0; }
.scene-art.has-scene-art::before, .scene-art.has-scene-art::after { display: none; }
.scene-backdrop { position: absolute; inset: 0; z-index: 0; opacity: 0; background-repeat: no-repeat; background-size: 300% 200%; transition: opacity 160ms ease; pointer-events: none; }
.scene-backdrop.is-loaded { opacity: 1; }
[data-art="apartment"] { background-position: 0% 0%; }
[data-art="cvs"] { background-position: 50% 0%; }
[data-art="train"] { background-position: 100% 0%; }
[data-art="gym"] { background-position: 0% 100%; }
[data-art="birthday"] { background-position: 50% 100%; }
[data-art="street"] { background-position: 100% 100%; }
.scene-art[data-theme="strange"] .scene-backdrop { filter: saturate(.6) brightness(.7); }
.scene-art[data-theme="security"] .scene-backdrop { filter: grayscale(1) sepia(.35) brightness(.65); }
.scene-art[data-theme="rain"] .scene-backdrop { filter: saturate(.65) brightness(.85); }
.scene-character { position: absolute; bottom: 0; left: 7%; width: 25%; height: 83%; z-index: 2; opacity: 0; pointer-events: none; filter: drop-shadow(0 6px 6px #0006); transition: opacity 120ms ease; }
.scene-character[data-character="chris"], .scene-character[data-character="bad"] { left: auto; right: 7%; height: 88%; }
.scene-character[data-character="booboo"] { height: 35%; width: 22%; bottom: 2%; }
.scene-character[data-character="tom"],
.scene-character[data-character="boyd"],
.scene-character[data-character="rust"],
.scene-character[data-character="marty"] { left: auto; right: 7%; height: 88%; }
.scene-character[data-character="parrot"] { height: 42%; width: 24%; bottom: 7%; }
.scene-character.is-visible, .scene-companion.is-visible { opacity: 1; }
.scene-companion { position: absolute; bottom: 2%; right: 9%; height: 27%; width: 17%; z-index: 2; opacity: 0; pointer-events: none; }
.scene-companion.on-left { right: auto; left: 9%; }
.scene-label { z-index: 5; background: #211b27db; border: 1px solid #ffe4b833; border-radius: 6px; color: #f8dfb9; top: 14px; left: 14px; font-size: .66rem; letter-spacing: .12em; }
.hotspot { z-index: 4; width: 44px; height: 44px; border: 1px solid #fff0c5; border-radius: 9px; background: #21192ed9; color: #ffda8f; box-shadow: 0 0 0 4px #e7a2b533, 0 4px 12px #0005; font-size: 0; }
.hotspot::after { content: "✦"; font-size: 24px; }
.hotspot { animation: clue-glow 2s ease-in-out infinite; }
@keyframes clue-glow {
  50% { box-shadow: 0 0 0 6px #e7a2b550, 0 0 18px #ffda8f66; }
}
.hotspot.is-found::after { content: "✓"; }
.hotspot:hover, .hotspot:focus-visible { background: #694653; }
.dialogue-panel { border-top: 1px solid #d2a57d55; min-height: 185px; padding: 24px; gap: 20px; grid-template-columns: 82px 1fr; }
.portrait { border-radius: 10px; border: 1px solid #ffffff25; color: #efcba0; background: #382b3a; }
.portrait.has-sprite { background: linear-gradient(#66516a, #312536); }
.portrait canvas { width: 100%; height: 100%; object-fit: contain; display: block; }
.speaker { color: #f3b9c7; font-size: .74rem; text-transform: uppercase; letter-spacing: .13em; margin-bottom: 10px; }
.line { color: #f6edf0; font-size: clamp(1rem, 1.7vw, 1.12rem); line-height: 1.6; }
.choice-button { border-radius: 8px; background: #382c3d; border: 1px solid #b991aa55; color: #f6edf0; }
.choice-button:hover { background: #50394b; }
.choices:empty { display: none; }
.next-button { min-height: 44px; min-width: 112px; font-size: .86rem; }
.memory-toast { background: #241d2cf2; border: 1px solid #eccba666; border-radius: 8px; }
@media(max-width:640px) {
  .title-screen { padding: 12px; }
  .title-illustration { aspect-ratio: 16 / 10; }
  .title-copy { padding: 22px 18px 26px; }
  .birthday-seal { top: 12px; right: 12px; width: 48px; height: 48px; font-size: 22px; }
  .birthday-seal small { font-size: 7px; }
  .game-screen { padding: 10px; }
  .scene { border-radius: 9px; grid-template-rows: auto auto; }
  .scene-art { min-height: 0; }
  .scene-label { top: 8px; left: 8px; font-size: .54rem; padding: 6px 8px; }
  .dialogue-panel { grid-template-columns: 54px 1fr; gap: 12px; padding: 16px; min-height: 220px; }
  .portrait { width: 54px; }
  .speaker { font-size: .66rem; }
  .line { font-size: 1rem; line-height: 1.5; }
  .scene-character { left: 5%; height: 81%; }
}
@media(prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
