/* GTA: Getting Their Attention. Screen furniture for the game.
   Inter and Caveat are Role Trackr's own faces, served from this folder. */

@font-face { font-family: Inter; src: url(fonts/inter-latin-wght-normal.woff2) format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: Inter; src: url(fonts/inter-latin-wght-italic.woff2) format('woff2'); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: Caveat; src: url(fonts/caveat-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --purple: #8B5CF6;
  --action: #7C3AED;
  --deep: #6D28D9;
  --lav: #EDE9FE;
  --ink: #111827;
  --orange: #F97316;
  --green: #10B981;
  --red: #EF4444;
  --yellow: #FDE047;
  --night: #0b0f1a;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--night); overscroll-behavior: none; }
body { font-family: Inter, "Helvetica Neue", Arial, sans-serif; color: #fff; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, a { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
kbd { font: inherit; }
[hidden] { display: none !important; }

#game { position: fixed; inset: 0; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: none; font-size: clamp(11px, 0.52vw + 0.92vh, 17px); }
#c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; transition: filter 0.9s ease; }
#game.fx-gray #c { filter: grayscale(1) contrast(1.1) brightness(0.86); }
#game.fx-warm #c { filter: saturate(1.15); }

/* ------------------------------------------------------------------ HUD */
#hud { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 1; transition: opacity 0.5s ease; }
#game.is-title #hud, #game.is-intro #hud, #game.is-end #hud { opacity: 0; }
#game.is-cutscene #hud-tr, #game.is-cutscene #hud-bl, #game.is-cutscene #hud-tl, #game.is-cutscene #prompt, #game.is-cutscene #hud-br { opacity: 0; }
#hud-tr, #hud-bl, #hud-tl, #hud-br, #prompt { transition: opacity 0.4s ease; }
.shadowed, #hud { text-shadow: 0 0.08em 0 rgba(0, 0, 0, 0.9), 0 0 0.5em rgba(0, 0, 0, 0.6); }

#hud-tl { position: absolute; z-index: 4; left: calc(1.1em + var(--sal)); top: calc(1em + var(--sat)); display: flex; gap: 0.5em; align-items: center; pointer-events: auto; }
.chip { display: inline-flex; align-items: center; gap: 0.45em; height: 2.3em; padding: 0 0.75em; border-radius: 0.6em; background: rgba(17, 24, 39, 0.55); border: 1px solid rgba(255, 255, 255, 0.22); font-weight: 700; font-size: 0.82em; text-decoration: none; text-shadow: none; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.chip:hover { background: rgba(17, 24, 39, 0.8); }
#btn-pause { width: 2.3em; justify-content: center; padding: 0; letter-spacing: 0.08em; }
#badge img { height: 1.05em; width: auto; display: block; }

#mission-card { position: absolute; left: calc(1.2em + var(--sal)); top: calc(4.4em + var(--sat)); opacity: 0; transform: translateX(-1.2em); transition: opacity 0.45s ease, transform 0.45s ease; }
#mission-card.show { opacity: 1; transform: none; }
#mission-no { font-size: 0.86em; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.92; }
#mission-title { font-size: 2.7em; font-weight: 900; font-style: italic; line-height: 1; letter-spacing: -0.02em; color: var(--yellow); -webkit-text-stroke: 0.07em #0b0f1a; paint-order: stroke fill; text-shadow: 0.06em 0.07em 0 #0b0f1a; margin-top: 0.12em; max-width: 13em; }

#hud-tr { position: absolute; right: calc(1.2em + var(--sar)); top: calc(0.9em + var(--sat)); text-align: right; }
#counter { font-weight: 900; font-style: italic; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
#count { font-size: 3.1em; color: #fff; -webkit-text-stroke: 0.06em #0b0f1a; paint-order: stroke fill; display: inline-block; transition: transform 0.08s ease; }
#count.bump { transform: scale(1.09); color: var(--yellow); }
#count-goal { font-size: 1.25em; opacity: 0.85; -webkit-text-stroke: 0.05em #0b0f1a; paint-order: stroke fill; }
#count-label { font-size: 0.72em; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.9; margin-top: 0.25em; }
#stars { display: flex; gap: 0.22em; justify-content: flex-end; margin-top: 0.55em; opacity: 0; transition: opacity 0.3s; }
#stars.live { opacity: 1; }
#stars i { width: 1.25em; height: 1.25em; background: rgba(255, 255, 255, 0.22); clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); filter: drop-shadow(0 1px 0 #000); }
#stars i.on { background: #fff; }
#stars.hot i.on { animation: starblink 0.5s steps(2) infinite; }
@keyframes starblink { 50% { background: var(--orange); } }
#weapon { display: inline-block; margin-top: 0.6em; padding: 0.25em 0.6em; border-radius: 0.4em; background: rgba(11, 15, 26, 0.62); font: 600 0.8em/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-shadow: none; max-width: 30em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#weapon b { color: var(--yellow); font-weight: 700; }
#weapon.jam b { color: #fca5a5; }
#weapon.shep { background: #fff; color: var(--ink); }
#weapon.shep b { color: var(--action); }
#clock { margin-top: 0.4em; font-size: 0.85em; font-weight: 700; font-variant-numeric: tabular-nums; opacity: 0.92; }

#attention { position: absolute; left: 50%; top: calc(12vh + var(--sat)); transform: translateX(-50%); text-align: center; opacity: 0; transition: opacity 0.3s; }
#attention.show { opacity: 1; }
#attention-label { font-size: 0.85em; font-weight: 900; letter-spacing: 0.22em; color: var(--red); }
#attention-bar { width: 22em; max-width: 60vw; height: 0.7em; margin: 0.45em auto 0.3em; border: 2px solid #fff; border-radius: 0.5em; background: rgba(0, 0, 0, 0.5); overflow: hidden; }
#attention-bar i { display: block; height: 100%; width: 100%; background: var(--red); transform-origin: left center; }
#attention-time { font-size: 2.2em; font-weight: 900; font-style: italic; font-variant-numeric: tabular-nums; -webkit-text-stroke: 0.06em #0b0f1a; paint-order: stroke fill; }

#radio-toast { position: absolute; left: 50%; top: calc(1.1em + var(--sat)); transform: translate(-50%, -0.6em); opacity: 0; transition: opacity 0.35s, transform 0.35s; text-align: center; font-weight: 800; font-size: 1.02em; white-space: nowrap; }
#radio-toast.show { opacity: 1; transform: translate(-50%, 0); }
#radio-toast small { display: block; font-size: 0.78em; font-weight: 600; opacity: 0.9; font-style: italic; }

#banner { position: absolute; left: 0; right: 0; top: 27%; text-align: center; opacity: 0; transform: scale(1.12); pointer-events: none; }
#banner.show { opacity: 1; transform: none; transition: opacity 0.25s ease, transform 0.5s cubic-bezier(0.2, 1.4, 0.4, 1); }
#banner.out { opacity: 0; transition: opacity 0.7s ease; }
#banner-main { font-size: 5.4em; font-weight: 900; font-style: italic; line-height: 0.95; letter-spacing: -0.03em; text-transform: uppercase; color: var(--yellow); -webkit-text-stroke: 0.055em #0b0f1a; paint-order: stroke fill; text-shadow: 0.05em 0.06em 0 #0b0f1a; padding: 0 0.3em; }
#banner[data-kind='ghosted'] #banner-main { color: #d1d5db; }
#banner[data-kind='filtered'] #banner-main { color: var(--red); }
#banner[data-kind='seen'] #banner-main { color: #34d399; }
#banner[data-kind='plain'] #banner-main { color: #fff; }
#banner[data-kind='shep'] #banner-main { color: #c4b5fd; }
#banner-sub { font-size: 1.4em; font-weight: 800; margin-top: 0.5em; padding: 0 1em; }
#banner-extra { font-size: 1em; font-weight: 700; margin-top: 0.45em; color: #fdba74; letter-spacing: 0.02em; }

#hud-bl { position: absolute; left: calc(1.2em + var(--sal)); bottom: calc(1.1em + var(--sab)); }
#minimap { width: 10.8em; height: 10.8em; display: block; border-radius: 0.8em; border: 2px solid rgba(255, 255, 255, 0.9); box-shadow: 0 0.3em 1.2em rgba(0, 0, 0, 0.45); background: #1f2937; }
#zone { font-size: 0.86em; font-weight: 800; margin-bottom: 0.5em; min-height: 1.2em; opacity: 0; transition: opacity 0.5s; }
#zone.show { opacity: 1; }
#zone small { display: block; font-weight: 600; opacity: 0.85; font-size: 0.88em; }

#hud-bc { position: absolute; z-index: 3; left: 50%; bottom: calc(1.5em + var(--sab)); transform: translateX(-50%); width: min(46em, 62vw); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.55em; }
#attention, #mission-card, #banner { z-index: 3; }
#objective { font-size: 1.14em; font-weight: 700; line-height: 1.3; min-height: 1.3em; opacity: 0; transition: opacity 0.35s; }
#objective.show { opacity: 1; }
#objective b, #subtitle b.hi { color: #fdba74; font-weight: 800; }
#objective b.shep { color: #c4b5fd; }
#subtitle { font-size: 1.22em; font-weight: 600; line-height: 1.3; min-height: 1.3em; opacity: 0; transition: opacity 0.2s; }
#subtitle.show { opacity: 1; }
#subtitle .who { font-weight: 800; color: var(--yellow); margin-right: 0.4em; }
#subtitle.shep .who { color: #c4b5fd; }
#subtitle.shep .who::before { content: ''; display: inline-block; width: 0.85em; height: 0.85em; margin-right: 0.3em; background: url(art/paw-white.svg) center / contain no-repeat; vertical-align: -0.05em; filter: drop-shadow(0 1px 0 #000); }
#subtitle.yell { font-size: 1.9em; font-weight: 900; font-style: italic; color: #fff; letter-spacing: -0.01em; -webkit-text-stroke: 0.05em #0b0f1a; paint-order: stroke fill; }
#subtitle.yell .who { display: none; }
#subtitle.aside { font-style: italic; font-weight: 500; opacity: 0.95; }
#prompt { display: inline-flex; align-items: center; gap: 0.55em; padding: 0.45em 0.9em 0.45em 0.5em; border-radius: 0.7em; background: rgba(17, 24, 39, 0.82); border: 1px solid rgba(255, 255, 255, 0.25); font-weight: 700; font-size: 1em; text-shadow: none; opacity: 0; transform: translateY(0.4em); transition: opacity 0.18s, transform 0.18s; }
#prompt.show { opacity: 1; transform: none; }
kbd, #prompt kbd { display: inline-block; min-width: 1.7em; padding: 0.12em 0.45em; border-radius: 0.35em; background: #fff; color: var(--ink); font-weight: 800; font-size: 0.86em; text-align: center; text-shadow: none; box-shadow: 0 0.12em 0 rgba(0, 0, 0, 0.35); }

#hud-br { position: absolute; right: calc(1.2em + var(--sar)); bottom: calc(1.1em + var(--sab)); width: 20em; max-width: 44vw; display: flex; flex-direction: column; align-items: flex-end; gap: 0.5em; }
#vehicle-name { font-size: 0.9em; font-weight: 800; font-style: italic; text-align: right; opacity: 0; transition: opacity 0.5s; }
#vehicle-name.show { opacity: 1; }
#phone { width: 100%; display: flex; flex-direction: column; gap: 0.45em; }
.note { display: grid; grid-template-columns: 2.1em 1fr; gap: 0.2em 0.65em; padding: 0.7em 0.8em; border-radius: 1em; background: rgba(17, 24, 39, 0.93); border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: 0 0.5em 1.6em rgba(0, 0, 0, 0.4); text-shadow: none; animation: note-in 0.35s cubic-bezier(0.2, 1.2, 0.4, 1) both; }
.note.out { animation: note-out 0.4s ease both; }
@keyframes note-in { from { opacity: 0; transform: translateY(1.2em) scale(0.96); } }
@keyframes note-out { to { opacity: 0; transform: translateX(1.5em); } }
.note .ico { grid-row: span 2; width: 2.1em; height: 2.1em; border-radius: 0.55em; display: grid; place-items: center; font-weight: 900; font-size: 1em; color: #fff; background: #4b5563; }
.note .app { font-size: 0.72em; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.75; display: flex; justify-content: space-between; }
.note .msg { font-size: 0.94em; font-weight: 500; line-height: 1.32; }
.note[data-app='LinkedIn'] .ico { background: #0a66c2; }
.note[data-app='Mom'] .ico { background: #34c759; }
.note[data-app='Recruiter'] .ico { background: #b45309; }
.note[data-app='Unknown'] .ico { background: #6b7280; }
.note[data-app='Calendar'] .ico { background: #ef4444; }
.note[data-app='Careers Portal'] .ico { background: #0f766e; }
.note[data-app='Corporate Bro'] .ico { background: #1f2a44; }
.note.reject .ico { background: var(--red); }
.note.shep { background: #fff; color: var(--ink); border-color: #ddd6fe; }
.note.shep .app { color: var(--action); opacity: 1; }
.note.shep .ico { background: var(--lav) url(art/paw-purple.svg) center / 62% no-repeat; }
.note.human { background: #fff; color: var(--ink); border-color: #a7f3d0; }
.note.human .ico { background: var(--green); }
.note.human .app { color: #047857; opacity: 1; }

#world-layer { position: absolute; inset: 0; overflow: hidden; }
.wl { position: absolute; left: 0; top: 0; will-change: transform; white-space: nowrap; }
.bubble { transform-origin: 50% 100%; padding: 0.38em 0.7em; border-radius: 0.8em; background: #fff; color: var(--ink); font-size: 0.84em; font-weight: 600; line-height: 1.25; text-shadow: none; white-space: normal; width: max-content; max-width: 17em; box-shadow: 0 0.2em 0.8em rgba(0, 0, 0, 0.3); }
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -0.38em; width: 0.8em; height: 0.8em; background: inherit; transform: translateX(-50%) rotate(45deg); border-radius: 0.12em; }
.bubble.machine { background: #111827; color: #fca5a5; font-weight: 800; letter-spacing: 0.04em; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.bubble.aside { background: rgba(17, 24, 39, 0.85); color: #fff; font-style: italic; font-weight: 500; }
.pop { font-weight: 900; font-style: italic; font-size: 1.35em; color: #fff; -webkit-text-stroke: 0.07em #0b0f1a; paint-order: stroke fill; }
.pop.gold { color: var(--yellow); font-size: 1.9em; }
.pop.no { color: #fca5a5; font-size: 1.05em; }
.pop.yes { color: #6ee7b7; font-size: 1.25em; font-style: normal; }
.pop.shep { color: #ddd6fe; font-size: 1.2em; font-style: normal; }
.tag { font-size: 0.74em; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.2em 0.55em; border-radius: 0.4em; background: rgba(17, 24, 39, 0.72); text-shadow: none; }
.tag.shep { background: #fff; color: var(--action); }
.mark { font-size: 0.8em; font-weight: 800; text-align: center; line-height: 1.2; }
.mark b { display: block; }
.mark span { display: block; font-weight: 600; font-size: 0.92em; opacity: 0.9; }
.mark i { display: block; width: 0; height: 0; margin: 0 auto 0.15em; border-left: 0.5em solid transparent; border-right: 0.5em solid transparent; border-top: 0.75em solid var(--orange); filter: drop-shadow(0 1px 0 #000); font-style: normal; }
.mark.shep i { border-top-color: var(--purple); }
.mark.gold i { border-top-color: var(--yellow); }

#bars i { position: absolute; left: 0; right: 0; height: 0; background: #000; transition: height 0.55s ease; }
#bars i:first-child { top: 0; }
#bars i:last-child { bottom: 0; }
#game.is-cutscene #bars i { height: 11vh; }

#captcha { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity 0.18s; }
#captcha.show { opacity: 1; }
.cap-card { width: 17em; background: #fff; color: var(--ink); border-radius: 0.4em; box-shadow: 0 1em 3em rgba(0, 0, 0, 0.5); text-shadow: none; overflow: hidden; transform: rotate(-1.5deg); }
.cap-head { background: #4a90e2; color: #fff; padding: 0.8em 0.9em; font-weight: 700; font-size: 1em; line-height: 1.25; }
.cap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 3px; }
.cap-grid i { aspect-ratio: 1; background: #d1d5db; }
.cap-grid i:nth-child(3n + 1) { background: #c4cad3; }
.cap-grid i:nth-child(4n) { background: #b9c0cb; }
.cap-foot { display: flex; align-items: center; gap: 0.6em; padding: 0.7em 0.8em; font-size: 0.8em; font-weight: 600; line-height: 1.25; border-top: 1px solid #e5e7eb; }
.cap-box { flex: none; width: 1.5em; height: 1.5em; border: 2px solid #9ca3af; border-radius: 0.2em; }

/* --------------------------------------------------------- touch controls */
#touch { position: absolute; inset: 0; z-index: 2; display: none; pointer-events: none; }
#game.has-touch.is-playing #touch { display: block; }
#stick-zone { position: absolute; left: 0; bottom: 0; width: 46%; height: 62%; pointer-events: auto; }
#stick { position: absolute; left: calc(2.4em + var(--sal)); bottom: calc(2.2em + var(--sab)); width: 8em; height: 8em; border-radius: 50%; background: rgba(255, 255, 255, 0.1); border: 2px solid rgba(255, 255, 255, 0.35); opacity: 0.75; transform: translate(0, 0); }
#stick i { position: absolute; left: 50%; top: 50%; width: 3.6em; height: 3.6em; margin: -1.8em 0 0 -1.8em; border-radius: 50%; background: rgba(255, 255, 255, 0.85); box-shadow: 0 0.2em 0.6em rgba(0, 0, 0, 0.35); }
#game.has-touch { font-size: clamp(12px, 0.6vw + 1.1vh, 17px); }
#game.has-touch #hud-bl { bottom: auto; top: calc(4.2em + var(--sat)); }
#game.has-touch #minimap { width: 7.6em; height: 7.6em; }
#game.has-touch #zone { display: none; }
/* on a phone the notifications drop from the top, the way they do on a phone */
#game.has-touch #hud-br { bottom: auto; top: calc(0.7em + var(--sat)); right: auto; left: 50%; transform: translateX(-50%); width: 19em; max-width: 46vw; align-items: stretch; }
#game.has-touch #vehicle-name { display: none; }
#game.has-touch .pause-keys, #game.has-touch .pause-hint { display: none; }
#game.has-touch #hud-bc { bottom: calc(0.7em + var(--sab)); width: min(40em, 44vw); }
#game.has-touch #objective { font-size: 1.02em; }
#game.has-touch #subtitle { font-size: 1.06em; }
#game.has-touch #subtitle.yell { font-size: 1.6em; }
#game.has-touch #mission-card { top: auto; bottom: calc(5.4em + var(--sab)); left: 50%; transform: translate(-50%, 0.8em); text-align: center; width: 60vw; }
#game.has-touch #mission-card.show { transform: translate(-50%, 0); }
#game.has-touch #mission-title { font-size: 2em; max-width: none; }
.tbtn { position: absolute; pointer-events: auto; border-radius: 50%; display: grid; place-items: center; font-weight: 900; letter-spacing: 0.06em; color: #fff; background: rgba(17, 24, 39, 0.5); border: 2px solid rgba(255, 255, 255, 0.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); touch-action: none; text-shadow: none; }
.tbtn span { font-size: 0.74em; line-height: 1.05; text-align: center; pointer-events: none; }
.tbtn.down { background: rgba(255, 255, 255, 0.85); color: var(--ink); }
#t-fire { right: calc(1.6em + var(--sar)); bottom: calc(1.8em + var(--sab)); width: 7em; height: 7em; background: rgba(249, 115, 22, 0.62); }
#t-fire span { font-size: 1.1em; }
#t-act { right: calc(9.4em + var(--sar)); bottom: calc(1.4em + var(--sab)); width: 5.4em; height: 5.4em; background: rgba(253, 224, 71, 0.9); color: var(--ink); border-color: #fff; display: none; padding: 0.3em; }
#t-act.show { display: grid; }
#t-brake { right: calc(9.8em + var(--sar)); bottom: calc(7.6em + var(--sab)); width: 4.6em; height: 4.6em; }
#t-horn { right: calc(2.2em + var(--sar)); bottom: calc(9.6em + var(--sab)); width: 4em; height: 4em; }
#t-radio { right: calc(6.4em + var(--sar)); bottom: calc(12.6em + var(--sab)); width: 4em; height: 4em; }
#game:not(.in-car) #t-brake, #game:not(.in-car) #t-horn, #game:not(.in-car) #t-radio { display: none; }

#fade { position: absolute; inset: 0; z-index: 3; background: #000; opacity: 0; pointer-events: none; transition: opacity 0.6s ease; }
#fade.on { opacity: 1; }
#fade.fast { transition-duration: 0.18s; }

/* ------------------------------------------------------------------ intro */
#intro { position: absolute; inset: 0; z-index: 4; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6em; padding: 2em; text-align: center; }
#intro-text { font-size: 2em; font-weight: 700; letter-spacing: -0.01em; min-height: 1.3em; max-width: 22em; }
#intro-text::after { content: ''; display: inline-block; width: 0.5em; height: 1em; margin-left: 0.12em; background: #fff; vertical-align: -0.12em; animation: caret 0.9s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }
#intro-phone { width: min(24em, 86vw); min-height: 5em; text-align: left; }
#intro-skip { position: absolute; right: calc(1.4em + var(--sar)); bottom: calc(1.2em + var(--sab)); font-size: 0.9em; font-weight: 700; opacity: 0.6; padding: 0.6em 0.9em; }
#intro-skip:hover { opacity: 1; }

/* ------------------------------------------------------------------ title */
#title { position: absolute; inset: 0; z-index: 4; transition: opacity 0.6s ease; }
#game:not(.is-title) #title { opacity: 0; pointer-events: none; }
.title-scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 10, 25, 0.86) 0%, rgba(8, 10, 25, 0.62) 34%, rgba(8, 10, 25, 0.08) 68%, rgba(8, 10, 25, 0) 100%), linear-gradient(0deg, rgba(8, 10, 25, 0.7) 0%, rgba(8, 10, 25, 0) 30%); }
.title-block { position: absolute; left: calc(6.5vw + var(--sal)); top: 50%; transform: translateY(-52%); max-width: min(44em, 88vw); }
.eyebrow { font-size: 0.9em; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: #c4b5fd; }
#title h1 { margin: 0.25em 0 0; font-weight: 900; line-height: 1; }
.gta { display: block; font-size: min(11.5em, 40vw); font-style: italic; font-weight: 900; line-height: 0.82; letter-spacing: -0.05em; color: #fff; -webkit-text-stroke: 0.028em #0b0f1a; paint-order: stroke fill; text-shadow: 0.045em 0.05em 0 var(--purple); margin-left: -0.05em; }
.gta.small { display: inline; font-size: 2.2em; margin: 0 0.35em 0 0; text-shadow: 0.05em 0.06em 0 var(--purple); }
.expansion { display: block; font-size: 2.15em; letter-spacing: -0.01em; text-transform: uppercase; margin-top: 0.42em; }
.where { margin: 0.7em 0 0; font-size: 1.15em; font-weight: 500; opacity: 0.88; }
.tagline { margin: 0.3em 0 0; font-size: 1.42em; font-weight: 800; letter-spacing: -0.01em; }
.title-actions { display: flex; gap: 0.8em; align-items: center; margin-top: 1.7em; flex-wrap: wrap; }
#btn-play { min-width: 10.5em; padding: 0.82em 2em; border-radius: 0.7em; background: var(--action); color: #fff; font-size: 1.28em; font-weight: 800; letter-spacing: 0.01em; box-shadow: 0 0.35em 0 #4c1d95, 0 0.9em 2em rgba(0, 0, 0, 0.35); transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s; }
#btn-play:not(:disabled):hover { background: #8b4dff; }
#btn-play:not(:disabled):active { transform: translateY(0.2em); box-shadow: 0 0.15em 0 #4c1d95; }
#btn-play:disabled { opacity: 0.65; cursor: default; }
.ghost { padding: 0.7em 1.15em; border-radius: 0.7em; border: 1.5px solid rgba(255, 255, 255, 0.5); font-weight: 700; font-size: 0.95em; text-decoration: none; text-align: center; }
.ghost:hover { background: rgba(255, 255, 255, 0.12); }
#load-line { margin-top: 1.25em; min-height: 3.2em; transition: opacity 0.4s; }
#load-bar { width: 15em; height: 0.3em; border-radius: 1em; background: rgba(255, 255, 255, 0.22); overflow: hidden; }
#load-bar i { display: block; height: 100%; width: 0%; background: #fff; transition: width 0.3s ease; }
#load-tip { margin-top: 0.7em; font-size: 0.92em; font-weight: 500; line-height: 1.35; opacity: 0.85; max-width: 32em; min-height: 2.6em; }
.keys { list-style: none; margin: 0.9em 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5em 1.4em; font-size: 0.86em; font-weight: 600; opacity: 0.92; }
.keys kbd { margin-right: 0.22em; }
.title-foot { position: absolute; left: calc(6.5vw + var(--sal)); right: calc(2em + var(--sar)); bottom: calc(1.3em + var(--sab)); display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5em; font-size: 0.8em; }
#parody { opacity: 0.62; }
#parody a, .pause-parody a, #end-parody a { text-underline-offset: 0.2em; }
#title-link { font-weight: 700; text-underline-offset: 0.2em; text-align: right; }

/* ------------------------------------------------------------------ pause */
#pause { position: absolute; inset: 0; z-index: 5; background: rgba(8, 10, 25, 0.8); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: grid; place-items: center; padding: 1.5em; overflow: auto; }
.pause-card { width: min(50em, 100%); }
.pause-head { display: flex; align-items: baseline; font-size: 1.5em; font-weight: 900; font-style: italic; margin-bottom: 1.1em; }
.pause-cols { display: grid; grid-template-columns: 17em 1fr; gap: 2.4em; }
.pause-cols > div:first-child { display: flex; flex-direction: column; gap: 0.6em; }
#btn-resume { padding: 0.85em 1.2em; border-radius: 0.7em; background: var(--action); font-weight: 800; font-size: 1.05em; }
.linklike { display: block; }
.pause-card h3 { margin: 0 0 0.6em; font-size: 0.8em; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.7; }
#stats { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 0.42em 1.4em; font-size: 0.98em; }
#stats dt { opacity: 0.85; }
#stats dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.pause-keys { margin: 1.8em 0 0; font-size: 0.82em; opacity: 0.85; line-height: 2.1; }
.pause-hint { margin: 0.9em 0 0; font-size: 0.86em; font-style: italic; opacity: 0.8; }
.pause-parody { margin: 0.8em 0 0; font-size: 0.76em; opacity: 0.55; }

/* -------------------------------------------------------------------- end */
#end { position: absolute; inset: 0; z-index: 5; background: rgba(8, 10, 25, 0.5); display: grid; place-items: center; padding: 1.2em; overflow: auto; animation: fadein 0.9s ease both; }
@keyframes fadein { from { opacity: 0; } }
.end-card { width: min(56em, 100%); border-radius: 1.5em; padding: 2.3em 2.5em 1.5em; background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 48%, #6D28D9 100%); box-shadow: 0 2em 5em rgba(0, 0, 0, 0.45); display: grid; grid-template-columns: 12.5em 1fr; gap: 0 2.3em; align-items: start; animation: endin 0.8s cubic-bezier(0.2, 1, 0.3, 1) both; }
@keyframes endin { from { opacity: 0; transform: translateY(1.6em); } }
.end-shep { width: 12.5em; height: 12.5em; border-radius: 50%; background: var(--lav); overflow: hidden; }
.end-shep canvas { width: 100%; height: 100%; display: block; }
.end-eyebrow { font-size: 0.8em; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--lav); }
.end-card h2 { margin: 0.35em 0 0; font-size: 2.45em; font-weight: 900; line-height: 1.04; letter-spacing: -0.03em; text-wrap: balance; }
#end-b { color: var(--lav); }
#end-body { margin: 0.9em 0 0; font-size: 1.07em; line-height: 1.55; max-width: 35em; }
#end-honest { margin: 0.7em 0 0; font-size: 0.95em; line-height: 1.5; opacity: 0.9; max-width: 35em; }
.end-actions { display: flex; flex-wrap: wrap; gap: 0.8em; margin-top: 1.4em; align-items: center; }
#end-cta { display: inline-block; padding: 0.9em 1.7em; border-radius: 0.7em; background: #fff; color: var(--deep); font-weight: 800; font-size: 1.12em; text-decoration: none; box-shadow: 0 0.3em 0 rgba(0, 0, 0, 0.18); transition: transform 0.1s; }
#end-cta:hover { transform: translateY(-0.08em); }
#end-again { padding: 0.85em 1.3em; border-radius: 0.7em; border: 1.5px solid rgba(255, 255, 255, 0.6); font-weight: 700; }
#end-again:hover { background: rgba(255, 255, 255, 0.14); }
.end-close { margin-top: 1.5em; display: flex; align-items: center; gap: 1.1em; flex-wrap: wrap; }
#end-closer { font-size: 1.2em; font-weight: 800; letter-spacing: -0.01em; }
#end-signoff { font-family: Caveat, cursive; font-weight: 600; font-size: 2.05em; line-height: 1; transform: rotate(-3deg); display: inline-block; }
.end-foot { grid-column: 1 / -1; margin-top: 1.6em; padding-top: 1em; border-top: 1px solid rgba(255, 255, 255, 0.28); display: grid; grid-template-columns: 1fr auto; gap: 0.6em 1.5em; align-items: center; font-size: 0.84em; }
#end-run { font-weight: 600; font-variant-numeric: tabular-nums; }
.end-share { display: flex; gap: 0.5em; flex-wrap: wrap; justify-content: flex-end; }
.end-share a, .end-share button { padding: 0.45em 0.8em; border-radius: 0.55em; background: rgba(255, 255, 255, 0.16); font-weight: 700; text-decoration: none; }
.end-share a:hover, .end-share button:hover { background: rgba(255, 255, 255, 0.28); }
#end-parody { grid-column: 1 / -1; opacity: 0.7; font-size: 0.9em; }

#rotate { position: absolute; z-index: 6; left: 50%; top: calc(0.8em + var(--sat)); transform: translateX(-50%); padding: 0.5em 0.9em; border-radius: 0.7em; background: rgba(17, 24, 39, 0.9); font-size: 0.86em; font-weight: 700; white-space: nowrap; }
.noscript { position: absolute; inset: auto 1.5em 1.5em; font-size: 1.1em; }
.noscript a { color: #c4b5fd; }

/* ------------------------------------------------------- small screens */
@media (max-aspect-ratio: 1/1) {
  .title-block { left: 50%; transform: translate(-50%, -54%); width: 86vw; }
  .expansion { font-size: 1.62em; }
  #game.has-touch #mission-card { bottom: calc(24em + var(--sab)); width: 86vw; }
  #game.has-touch #hud-br { top: calc(12.8em + var(--sat)); width: 92vw; max-width: 92vw; }
  #rotate { top: 44%; }
  .title-scrim { background: linear-gradient(0deg, rgba(8, 10, 25, 0.9) 0%, rgba(8, 10, 25, 0.62) 55%, rgba(8, 10, 25, 0.25) 100%); }
  .title-foot { flex-direction: column; align-items: flex-start; gap: 0.4em; left: 7vw; }
  #title-link { text-align: left; }
  .end-card { grid-template-columns: 1fr; padding: 1.6em 1.4em 1.2em; }
  .end-shep { width: 7.5em; height: 7.5em; margin-bottom: 1em; }
  .end-card h2 { font-size: 1.85em; }
  .end-foot { grid-template-columns: 1fr; }
  .end-share { justify-content: flex-start; }
  .pause-cols { grid-template-columns: 1fr; gap: 1.4em; }
  #hud-bc { width: 92vw; bottom: calc(15.5em + var(--sab)); }
  #game.has-touch #hud-bc { width: 92vw; bottom: calc(17em + var(--sab)); }
  #banner-main { font-size: 3.6em; }
  #hud-br { max-width: 62vw; }
  #count { font-size: 2.5em; }
}
@media (max-height: 460px) {
  .gta { font-size: 7.6em; }
  .expansion { font-size: 1.6em; }
  .title-actions { margin-top: 1em; }
  .keys, #load-tip { display: none; }
  #load-line { min-height: 0.6em; margin-top: 0.8em; }
  .end-card { padding: 1.3em 1.6em 1em; grid-template-columns: 7.5em 1fr; gap: 0 1.4em; }
  .end-shep { width: 7.5em; height: 7.5em; }
  .end-card h2 { font-size: 1.7em; }
  #end-body { font-size: 0.96em; line-height: 1.4; margin-top: 0.5em; }
  #end-honest { font-size: 0.8em; line-height: 1.3; margin-top: 0.4em; max-width: none; }
  .end-actions { margin-top: 0.8em; }
  .end-close { margin-top: 0.7em; }
  .end-foot { margin-top: 0.8em; padding-top: 0.6em; }
}
@media (prefers-reduced-motion: reduce) {
  #banner.show, .note, .end-card, #end { animation: none; transition: none; }
}
