:root {
  --ink: #2a1a13;
  --ink-soft: #6f5d50;
  --night: #120c09;
  --night-2: #241710;
  --cream: #f7f1e5;
  --paper: #fffaf0;
  --mint: #a8e7b1;
  --mint-deep: #579a67;
  --coral: #ff7658;
  --lilac: #86d7d4;
  --gold: #ffd36a;
  --line: rgba(42, 26, 19, .12);
  --shadow: 0 24px 70px rgba(5, 8, 20, .25);
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --body: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { background: var(--night); color: var(--cream); font-family: var(--body); overflow-x: hidden; }
button { border: 0; font: inherit; cursor: pointer; }
button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
[hidden] { display: none !important; }

.grain { position: fixed; inset: 0; pointer-events: none; z-index: 20; opacity: .12; mix-blend-mode: screen; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E"); }
.app-shell { position: relative; min-height: 100vh; padding: 0 clamp(18px, 4vw, 66px); background: radial-gradient(circle at 70% 8%, rgba(255, 118, 88, .14), transparent 28rem), radial-gradient(circle at 15% 92%, rgba(168, 231, 177, .08), transparent 25rem), linear-gradient(135deg, #120c09 0%, #241710 58%, #302017 100%); }
.site-header { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; max-width: 1440px; margin: 0 auto; padding: 28px 0 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; padding: 0; color: var(--cream); background: transparent; text-align: left; }
.brand img { width: 38px; height: 38px; filter: drop-shadow(0 5px 10px rgba(0,0,0,.24)); }
.brand span { display: grid; line-height: 1; gap: 4px; }
.brand strong { font-size: 13px; letter-spacing: .2em; }
.brand small { color: #8f9ab8; font-size: 9px; letter-spacing: .23em; }
.header-status { display: flex; align-items: center; gap: 9px; color: #8791ac; font-size: 10px; letter-spacing: .16em; }
.header-status b { color: var(--mint); font-size: 10px; font-weight: 600; border: 1px solid rgba(157,229,196,.28); border-radius: 99px; padding: 6px 9px; }
.status-dot, .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 5px rgba(157,229,196,.1), 0 0 16px var(--mint); }
.screen { position: relative; z-index: 1; max-width: 1440px; margin: 0 auto; }
.home-screen { padding: clamp(28px, 6vh, 84px) 0 40px; }
.hero-panel { display: grid; grid-template-columns: minmax(340px, .8fr) minmax(420px, 1.2fr); min-height: 570px; overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-radius: 30px; background: linear-gradient(120deg, rgba(247,241,229,.98) 0 48%, rgba(247,241,229,.88) 48% 100%); box-shadow: var(--shadow); color: var(--ink); animation: rise .7s ease both; }
.hero-copy { position: relative; z-index: 1; align-self: center; padding: clamp(38px, 6vw, 92px); }
.eyebrow { margin: 0 0 20px; color: var(--mint-deep); font-size: 10px; font-weight: 800; letter-spacing: .2em; line-height: 1.4; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 24px; font-family: var(--display); font-size: clamp(61px, 8vw, 116px); font-weight: 400; letter-spacing: -.08em; line-height: .8; }
h1 em { color: var(--coral); font-style: normal; white-space: nowrap; }
.hero-lede { max-width: 430px; margin-bottom: 31px; color: #59637a; font-size: 15px; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 50px; padding: 0 20px; border-radius: 11px; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--ink); color: var(--paper); box-shadow: 0 12px 20px rgba(16,23,43,.18); }
.button-primary:hover { box-shadow: 0 16px 28px rgba(16,23,43,.24); }
.button-primary kbd { color: var(--mint); font-size: 16px; }
.button-quiet { background: transparent; color: var(--ink-soft); }
.button-quiet:hover { background: rgba(16,23,43,.06); }
.hero-note { margin: 36px 0 0; color: #9a8e7c; font-size: 11px; letter-spacing: .06em; }
.note-mark { color: var(--coral); margin-right: 6px; }
.hero-art { position: relative; min-height: 570px; overflow: hidden; background: linear-gradient(142deg, #3b2118 0%, #24140f 50%, #0e0907 100%); }
.hero-art::after { content: ""; position: absolute; z-index: 1; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(10,16,35,.62), rgba(10,16,35,.08) 44%, rgba(10,16,35,.28)); }
.hero-background { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; filter: saturate(.9) brightness(.78); }
.moon-glow { position: absolute; top: -8%; right: 7%; width: 390px; height: 390px; border-radius: 50%; background: radial-gradient(circle, rgba(255,211,106,.18), rgba(255,211,106,.04) 46%, transparent 69%); }
.window-grid { position: absolute; inset: 10% 9% 20% 13%; opacity: .38; background: linear-gradient(90deg, transparent 24%, rgba(168,231,177,.2) 24.4%, transparent 25%), linear-gradient(0deg, transparent 24%, rgba(255,211,106,.14) 24.4%, transparent 25%); background-size: 83px 76px; transform: perspective(500px) rotateY(-8deg) rotateX(2deg); }
.window-grid::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,16,32,.9), transparent 30%, transparent 72%, rgba(11,16,32,.55)); }
.hero-character { position: absolute; z-index: 4; left: 36%; bottom: 8%; width: min(31%, 230px); min-width: 126px; filter: drop-shadow(0 22px 20px rgba(0,0,0,.5)); animation: float 5s ease-in-out infinite; }
.hero-character[src$="worker-keyart.png"] { object-fit: contain; object-position: center bottom; }
.hero-desk { position: absolute; z-index: 3; left: 22%; right: 5%; bottom: 7%; height: 19%; border-radius: 16px 16px 4px 4px; background: linear-gradient(#dfc69f, #af8d71); box-shadow: 0 -5px 0 rgba(247,241,229,.16), 0 30px 40px rgba(0,0,0,.34); transform: perspective(500px) rotateX(9deg); }
.hero-desk::before { content: ""; position: absolute; left: 19%; top: -22%; width: 30%; height: 34%; border: 6px solid #5d3328; border-bottom-width: 10px; border-radius: 5px; background: linear-gradient(135deg, #ff9f73, #86d7d4); box-shadow: 0 5px 0 #79513e; }
.hero-desk::after { content: ""; position: absolute; left: 25%; right: 9%; bottom: -280%; height: 280%; background: linear-gradient(90deg, transparent 0 12%, rgba(9,14,29,.48) 12% 15%, transparent 15% 83%, rgba(9,14,29,.42) 83% 86%, transparent 86%); }
.hero-lamp { position: absolute; z-index: 5; left: 12%; bottom: 25%; width: 22%; height: 3px; background: var(--gold); box-shadow: 0 0 36px 12px rgba(245,199,107,.4); transform: rotate(-12deg); }
.hero-lamp::before { content: ""; position: absolute; left: 4%; top: -52px; width: 3px; height: 55px; background: #c2a66f; transform: rotate(12deg); }
.hero-lamp::after { content: ""; position: absolute; left: -22px; top: -58px; width: 51px; height: 19px; border-radius: 50% 50% 8px 8px; background: #f5c76b; box-shadow: 0 0 35px 11px rgba(245,199,107,.28); }
.hero-paper { position: absolute; z-index: 5; right: 14%; bottom: 28%; width: 86px; height: 96px; padding: 12px 10px; color: #51627a; font-size: 11px; letter-spacing: .12em; line-height: 1.1; background: #f7f1e5; box-shadow: 10px 12px 0 rgba(0,0,0,.14); transform: rotate(8deg); }
.hero-paper strong { display: block; margin-top: 9px; color: var(--coral); font-size: 14px; }
.art-caption { position: absolute; z-index: 5; top: 12%; left: 12%; display: grid; gap: 3px; color: var(--cream); font-family: var(--display); font-size: 32px; }
.art-caption small { color: var(--mint); font-family: var(--body); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; }
.hero-shadow { position: absolute; left: 18%; right: 2%; bottom: 1%; height: 80px; border-radius: 50%; background: rgba(0,0,0,.32); filter: blur(20px); }
.hero-desk, .hero-lamp { display: none; }
.home-lower { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; margin-top: 18px; animation: rise .7s .12s ease both; }
.brief-card, .quote-card { min-height: 180px; border: 1px solid rgba(255,255,255,.12); border-radius: 21px; background: rgba(255,255,255,.06); }
.brief-card { padding: 25px 27px; }
.card-label { margin-bottom: 19px; color: var(--mint); font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.brief-row { display: grid; grid-template-columns: 35px 1fr auto; align-items: center; gap: 13px; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.08); }
.brief-icon { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 10px; color: var(--ink); background: var(--mint); font-size: 18px; }
.icon-eye { color: var(--paper); background: #6eaa7b; }
.icon-exit { color: var(--ink); background: var(--gold); }
.brief-row div { display: grid; gap: 2px; }
.brief-row strong { font-size: 13px; font-weight: 650; }
.brief-row small { color: #8993ac; font-size: 11px; }
.brief-row > b { color: var(--cream); font-family: var(--display); font-size: 18px; font-weight: 400; }
.quote-card { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 32px 38px; background: linear-gradient(135deg, rgba(255,118,88,.94), rgba(168,231,177,.9)); color: var(--ink); overflow: hidden; }
.quote-mark { position: absolute; top: 8px; right: 22px; color: rgba(16,23,43,.18); font-family: Georgia, serif; font-size: 100px; line-height: 1; }
.quote-card p { position: relative; margin-bottom: 28px; font-family: var(--display); font-size: clamp(22px, 3vw, 31px); letter-spacing: -.03em; line-height: 1.1; }
.quote-card footer { display: flex; align-items: center; gap: 8px; color: rgba(16,23,43,.7); font-size: 10px; letter-spacing: .08em; }
.quote-card footer i { margin-left: auto; font-size: 9px; opacity: .72; }
.avatar-dot { width: 17px; height: 17px; border-radius: 50%; background: var(--ink); }
.level-section { margin-top: 34px; padding-bottom: 8px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 13px; }
.section-heading span { display: grid; gap: 4px; }.section-heading b { color: var(--mint); font-size: 10px; letter-spacing: .2em; }.section-heading small { color: #8791ac; font-size: 11px; }.section-heading em { color: #7f8ba8; font-size: 9px; font-style: normal; letter-spacing: .14em; }
.level-rail { display: grid; grid-template-columns: repeat(8, minmax(96px, 1fr)); gap: 8px; overflow-x: auto; padding: 3px 1px 10px; scrollbar-width: thin; }
.level-card { position: relative; min-height: 94px; padding: 14px 12px; border: 1px solid rgba(255,255,255,.11); border-radius: 13px; color: var(--cream); background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.03)); text-align: left; transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.level-card:hover:not(:disabled) { border-color: rgba(157,229,196,.6); background: rgba(157,229,196,.1); transform: translateY(-3px); }.level-card:disabled { cursor: not-allowed; opacity: .36; }.level-card.is-current { border-color: rgba(157,229,196,.42); }.level-card .level-no { display: block; margin-bottom: 12px; color: var(--mint); font-size: 9px; letter-spacing: .17em; }.level-card strong { display: block; min-height: 33px; font-family: var(--display); font-size: 16px; font-weight: 400; line-height: 1.05; }.level-card small { display: block; margin-top: 7px; color: #7f89a5; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.level-card .lock { position: absolute; top: 13px; right: 12px; color: #8b95ae; font-size: 11px; }

.site-footer { display: flex; justify-content: space-between; max-width: 1440px; margin: 0 auto; padding: 20px 0 26px; color: #6d7893; font-size: 9px; letter-spacing: .15em; }
body.in-game .site-footer { display: none; }

.game-screen { padding: 12px 0 35px; }
body.in-game .game-screen { padding-bottom: 33px; }
.game-toolbar { display: flex; justify-content: space-between; align-items: center; min-height: 45px; }
.game-title { display: flex; align-items: center; gap: 10px; color: #c4ccdb; font-size: 11px; font-weight: 700; letter-spacing: .16em; }
.game-profile-name { max-width: 150px; overflow: hidden; color: var(--mint); font-size: 9px; letter-spacing: .08em; text-overflow: ellipsis; white-space: nowrap; }
.game-toolbar-actions { display: flex; gap: 8px; }
.icon-button { display: grid; width: 37px; height: 37px; place-items: center; border: 1px solid rgba(255,255,255,.13); border-radius: 10px; color: #cdd4e2; background: rgba(255,255,255,.06); }
.icon-button:hover { border-color: rgba(157,229,196,.55); color: var(--mint); }
.icon-button.is-muted { color: #7e899f; }
.game-stage { position: relative; height: min(78vh, 780px); min-height: 470px; overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-radius: 22px; background: #090706; box-shadow: 0 30px 80px rgba(0,0,0,.32); }
#gameCanvas { display: block; width: 100%; height: 100%; }
.hud { position: absolute; z-index: 2; pointer-events: none; }
.hud-left { left: 23px; top: 22px; }
.hud-right { right: 23px; top: 22px; text-align: right; }
.hud-kicker, .clock-label { color: #8a96b1; font-size: 9px; font-weight: 800; letter-spacing: .2em; }
.hud-kpi { display: flex; align-items: baseline; gap: 5px; margin: 4px 0 8px; color: var(--cream); font-family: var(--display); font-size: 32px; }
.hud-kpi i { color: #7f89a5; font-family: var(--body); font-size: 13px; font-style: normal; }
.hud-kpi small { margin-left: 3px; color: var(--mint); font-family: var(--body); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.hud-progress { width: 135px; height: 4px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.13); }
.hud-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--mint), var(--gold)); transition: width .35s ease; }
.hud-exit { margin-top: 7px; color: #8792a7; font-size: 8px; letter-spacing: .1em; }
.hud-exit.is-ready { color: var(--mint); }
.hud-balance-label { margin-top: 7px; color: #8f99ad; font-size: 8px; letter-spacing: .14em; text-transform: uppercase; }
.hud-balance { margin-top: 3px; color: var(--coral); font-size: 12px; letter-spacing: .14em; text-shadow: 0 0 14px rgba(255,121,105,.4); }
.hud-clock { margin-top: 3px; color: var(--paper); font-family: var(--display); font-size: 27px; }
.deadline-label { margin-top: 2px; color: #7f8ba5; font-size: 8px; letter-spacing: .14em; }
.deadline-label strong { color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.hud-alert { display: inline-flex; align-items: center; gap: 6px; margin-top: 5px; padding: 5px 8px; border-radius: 99px; color: #9ca8c0; background: rgba(10,15,31,.52); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.hud-alert.is-hot { color: #ffd3c9; background: rgba(156,50,54,.56); }
.hud-alert.is-deadline { color: #fff0b8; background: rgba(126,82,42,.62); }
.alert-pip { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); }
.is-hot .alert-pip { background: var(--coral); box-shadow: 0 0 10px var(--coral); }
.is-deadline .alert-pip { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.hud-message { position: absolute; z-index: 2; left: 50%; bottom: 26px; max-width: min(80%, 510px); padding: 10px 15px; border: 1px solid rgba(255,255,255,.1); border-radius: 99px; color: #dce2ed; background: rgba(9,14,28,.7); font-size: 11px; letter-spacing: .04em; opacity: .82; transform: translateX(-50%); transition: background .25s ease, color .25s ease; }
.hud-message.is-hot { color: #ffe4da; background: rgba(101,38,46,.82); }
.touch-rail { position: absolute; z-index: 3; right: 24px; bottom: 24px; display: grid; grid-template: repeat(3, 36px) / repeat(3, 36px); gap: 5px; opacity: .88; }
.touch-button { display: grid; place-items: center; border: 1px solid rgba(255,255,255,.15); border-radius: 10px; color: #dce2ed; background: rgba(11,16,32,.58); backdrop-filter: blur(8px); font-size: 18px; user-select: none; touch-action: manipulation; }
.touch-button:active { color: var(--ink); background: var(--mint); transform: scale(.94); }
.touch-up { grid-area: 1 / 2; }.touch-left { grid-area: 2 / 1; }.touch-dash { grid-area: 2 / 2; color: var(--gold); }.touch-right { grid-area: 2 / 3; }.touch-down { grid-area: 3 / 2; }
.dash-meter { position: absolute; z-index: 3; left: 24px; bottom: 27px; display: flex; align-items: center; gap: 8px; color: #8c97af; font-size: 8px; letter-spacing: .15em; }
.dash-meter > div { width: 70px; height: 4px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.12); }.dash-meter i { display: block; width: 100%; height: 100%; background: var(--gold); transition: width .2s ease; }

.overlay { position: fixed; z-index: 15; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(5,8,19,.68); backdrop-filter: blur(16px); animation: fade .2s ease both; }
.overlay-card { position: relative; width: min(560px, 100%); padding: 42px; border: 1px solid rgba(255,255,255,.16); border-radius: 23px; background: linear-gradient(140deg, #fff4dc, #e1f3dd); box-shadow: 0 30px 100px rgba(0,0,0,.38); color: var(--ink); }
.overlay-close { position: absolute; top: 16px; right: 18px; display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; color: #727c91; background: rgba(16,23,43,.06); font-size: 21px; }
.overlay-card h2 { margin-bottom: 17px; font-family: var(--display); font-size: clamp(40px, 7vw, 64px); font-weight: 400; letter-spacing: -.06em; line-height: .9; }
.overlay-body { color: #5c667b; font-size: 14px; line-height: 1.8; }
.overlay-body strong { color: var(--ink); }.overlay-body .brief-map { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 20px 0; }.brief-map div { padding: 12px; border: 1px solid rgba(16,23,43,.1); border-radius: 12px; background: rgba(255,255,255,.42); }.brief-map b { display: block; margin-bottom: 4px; color: var(--coral); font-family: var(--display); font-size: 20px; }.brief-map small { font-size: 10px; }
.overlay-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 27px; }.overlay-actions .button { min-height: 46px; }.button-secondary { color: var(--ink); background: rgba(16,23,43,.08); }
.result-card { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; }.result-stat { padding: 12px; border-radius: 11px; background: rgba(255,255,255,.5); }.result-stat small { display: block; color: #788196; font-size: 9px; letter-spacing: .1em; }.result-stat strong { display: block; margin-top: 4px; font-family: var(--display); font-size: 22px; font-weight: 400; }
.toast { position: fixed; z-index: 18; left: 50%; bottom: 29px; padding: 11px 17px; border: 1px solid rgba(255,255,255,.15); border-radius: 99px; color: var(--paper); background: rgba(9,14,28,.9); box-shadow: 0 14px 30px rgba(0,0,0,.24); font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: opacity .2s ease, transform .2s ease; }.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

@media (max-width: 880px) { .hero-panel { grid-template-columns: 1fr; }.hero-copy { padding-bottom: 42px; }.hero-art { min-height: 390px; }.home-lower { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .app-shell { padding: 0 15px; }.site-header { padding-top: 18px; }.header-status { font-size: 8px; }.header-status b { padding: 5px 7px; }.home-screen { padding-top: 22px; }.hero-panel { min-height: auto; border-radius: 22px; }.hero-copy { padding: 38px 28px 34px; }.hero-lede { font-size: 13px; }.hero-art { min-height: 300px; }.hero-character { left: 38%; bottom: 14%; }.hero-desk { left: 12%; }.hero-paper { right: 8%; bottom: 31%; transform: scale(.78) rotate(8deg); }.art-caption { top: 10%; left: 9%; font-size: 24px; }.brief-card, .quote-card { padding: 21px; }.site-footer { display: none; }.game-screen, body.in-game .game-screen { padding-top: 0; padding-bottom: 0; }.game-stage { height: calc(100svh - 121px); min-height: 0; border-radius: 17px; }.hud-left { left: 16px; top: 16px; }.hud-right { right: 16px; top: 16px; }.touch-rail { right: 16px; bottom: 16px; }.dash-meter { left: 16px; bottom: 19px; }.hud-message { bottom: 17px; max-width: 58%; text-align: center; }.overlay-card { padding: 35px 24px 25px; border-radius: 18px; }.overlay-body .brief-map { grid-template-columns: 1fr; }.overlay-actions .button { flex: 1 1 auto; }.level-section { margin-top: 25px; }.level-rail { grid-template-columns: repeat(8, 118px); } }

/* The home screen is a product landing dashboard, not a scrolling article. */
@media (min-width: 621px) {
  body:not(.in-game) { overflow: hidden; }
  body:not(.in-game) .app-shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100svh; min-height: 100svh; overflow: hidden; }
  body:not(.in-game) .site-header { width: 100%; padding-top: 19px; padding-bottom: 12px; }
  body:not(.in-game) .home-screen { min-height: 0; height: auto; display: grid; grid-template-rows: minmax(0, 1fr) auto auto; gap: 10px; overflow: hidden; padding: 10px 0 7px; }
  body:not(.in-game) .hero-panel { min-height: 0; height: auto; }
  body:not(.in-game) .hero-copy { display: flex; min-height: 0; align-self: stretch; flex-direction: column; justify-content: center; overflow: hidden; padding: 22px clamp(24px, 3.8vw, 55px); }
  body:not(.in-game) .hero-copy .eyebrow { margin-bottom: 10px; }
  body:not(.in-game) .hero-copy h1 { max-width: 5.8em; margin-bottom: 10px; font-size: clamp(42px, 4.7vw, 68px); line-height: .88; }
  body:not(.in-game) .hero-lede { max-width: 385px; margin-bottom: 12px; font-size: 12px; line-height: 1.5; }
  body:not(.in-game) .hero-actions .button { min-height: 42px; }
  body:not(.in-game) .hero-note { margin-top: 10px; }
  body:not(.in-game) .hero-art { min-height: 0; }
  body:not(.in-game) .home-lower { height: 116px; min-height: 116px; margin-top: 0; }
  body:not(.in-game) .brief-card, body:not(.in-game) .quote-card { height: 116px; min-height: 0; overflow: hidden; }
  body:not(.in-game) .brief-card { padding: 10px 14px; }
  body:not(.in-game) .card-label { margin-bottom: 2px; }
  body:not(.in-game) .brief-row { grid-template-columns: 27px minmax(0, 1fr) auto; gap: 8px; padding: 2px 0; }
  body:not(.in-game) .brief-icon { width: 25px; height: 25px; border-radius: 8px; font-size: 14px; }
  body:not(.in-game) .brief-row div { min-width: 0; gap: 1px; }
  body:not(.in-game) .brief-row small { overflow: hidden; color: #a6adbd; font-size: 8px; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
  body:not(.in-game) .brief-row > b { font-size: 15px; }
  body:not(.in-game) .quote-card { padding: 14px 25px; }
  body:not(.in-game) .quote-card p { margin-bottom: 12px; font-size: clamp(17px, 2vw, 24px); }
  body:not(.in-game) .level-section { min-height: 0; margin-top: 0; padding-bottom: 0; }
  body:not(.in-game) .section-heading { margin-bottom: 5px; }
  body:not(.in-game) .level-rail { max-height: 77px; padding-bottom: 3px; }
  body:not(.in-game) .level-card { min-height: 70px; padding: 8px 10px; }
  body:not(.in-game) .level-card .level-no { margin-bottom: 5px; }
  body:not(.in-game) .level-card strong { min-height: 21px; font-size: 13px; }
  body:not(.in-game) .level-card small { margin-top: 3px; font-size: 8px; }
  body:not(.in-game) .site-footer { padding: 8px 0 10px; }
}

@media (max-width: 620px) {
  body:not(.in-game) { overflow: hidden; }
  body:not(.in-game) .app-shell { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100svh; min-height: 100svh; overflow: hidden; }
  body:not(.in-game) .site-header { padding-top: 13px; padding-bottom: 8px; }
  body:not(.in-game) .home-screen { min-width: 0; min-height: 0; height: auto; display: grid; grid-template-rows: minmax(0, 1fr) auto auto; gap: 8px; overflow: hidden; padding: 8px 0 7px; }
  body:not(.in-game) .hero-panel { min-width: 0; min-height: 0; height: auto; grid-template-rows: minmax(0, 1fr) 39%; border-radius: 19px; }
  body:not(.in-game) .hero-copy { min-height: 0; padding: 21px 20px 14px; }
  body:not(.in-game) .hero-copy .eyebrow { margin-bottom: 12px; font-size: 8px; }
  body:not(.in-game) .hero-copy h1 { max-width: none; margin-bottom: 11px; font-size: clamp(39px, 10.8vw, 53px); line-height: .9; }
  body:not(.in-game) .hero-lede { max-width: 100%; max-height: 34px; margin-bottom: 12px; overflow: hidden; font-size: 10px; line-height: 1.45; }
  body:not(.in-game) .hero-actions { gap: 6px; }
  body:not(.in-game) .hero-actions .button { min-height: 37px; padding: 0 12px; font-size: 12px; }
  body:not(.in-game) .hero-note { margin-top: 10px; font-size: 9px; }
  body:not(.in-game) .hero-art { min-height: 0; }
  body:not(.in-game) .hero-character { left: 38%; bottom: 10%; width: min(32%, 155px); min-width: 96px; }
  body:not(.in-game) .art-caption { top: 10%; left: 9%; font-size: 21px; }
  body:not(.in-game) .art-caption small { font-size: 7px; }
  body:not(.in-game) .home-lower { min-width: 0; min-height: 78px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 0; }
  body:not(.in-game) .brief-card, body:not(.in-game) .quote-card { min-height: 78px; border-radius: 14px; }
  body:not(.in-game) .brief-card { padding: 9px 11px; }
  body:not(.in-game) .card-label { margin-bottom: 3px; font-size: 8px; }
  body:not(.in-game) .brief-row { grid-template-columns: 21px 1fr auto; gap: 5px; padding: 3px 0; }
  body:not(.in-game) .brief-icon { width: 20px; height: 20px; border-radius: 6px; font-size: 11px; }
  body:not(.in-game) .brief-row div { min-width: 0; gap: 1px; }
  body:not(.in-game) .brief-row strong { font-size: 9px; }
  body:not(.in-game) .brief-row small { display: block; overflow: hidden; color: #a6adbd; font-size: 7px; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
  body:not(.in-game) .brief-row > b { font-size: 11px; }
  body:not(.in-game) .quote-card { padding: 10px 12px; }
  body:not(.in-game) .quote-card p { margin-bottom: 7px; font-size: 15px; }
  body:not(.in-game) .quote-card footer { gap: 4px; font-size: 7px; }
  body:not(.in-game) .quote-card footer i { display: none; }
  body:not(.in-game) .quote-mark { top: -2px; right: 10px; font-size: 58px; }
  body:not(.in-game) .level-section { min-width: 0; min-height: 0; margin-top: 0; padding-bottom: 0; }
  body:not(.in-game) .section-heading { margin-bottom: 3px; }
  body:not(.in-game) .section-heading b { font-size: 8px; }
  body:not(.in-game) .section-heading small, body:not(.in-game) .section-heading em { font-size: 7px; }
  body:not(.in-game) .level-rail { width: 100%; min-width: 0; max-height: 67px; grid-template-columns: repeat(8, 86px); gap: 5px; padding: 1px 0 2px; }
  body:not(.in-game) .level-card { min-height: 63px; padding: 6px 7px; border-radius: 9px; }
  body:not(.in-game) .level-card .level-no { margin-bottom: 3px; font-size: 7px; }
  body:not(.in-game) .level-card strong { min-height: 17px; font-size: 10px; }
  body:not(.in-game) .level-card small { margin-top: 2px; font-size: 7px; }
}

/* Tools and the first-level guide live in the toolbar, never over the map. */
.game-toolbar { gap: 12px; }
.game-toolbar-actions { align-items: center; }
.tool-rail { display: flex; gap: 6px; }
.tool-button { display: inline-flex; align-items: center; gap: 7px; min-width: 105px; min-height: 37px; padding: 5px 8px; border: 1px solid rgba(255,255,255,.13); border-radius: 10px; color: #e6dccb; background: rgba(255,255,255,.06); text-align: left; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.tool-button:hover, .tool-button[data-guide-focus="true"] { border-color: rgba(168,231,177,.75); background: rgba(168,231,177,.14); }
.tool-button[data-guide-focus="true"] { animation: tool-pulse 1.1s ease-in-out infinite; }
.tool-button kbd { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 6px; color: var(--ink); background: var(--gold); font-size: 10px; font-weight: 800; }
.tool-button strong, .tool-button small { display: block; white-space: nowrap; }
.tool-button strong { font-size: 10px; letter-spacing: .04em; }
.tool-button small { margin-top: 2px; color: #8eaa9a; font-size: 8px; letter-spacing: .08em; }
.tool-button .tool-hint { color: #7d8a9a; letter-spacing: .02em; }
.tool-button.is-active { border-color: rgba(168,231,177,.8); background: rgba(168,231,177,.16); }
.tool-button.is-active kbd { background: var(--mint); }
.tool-button.is-cooling { opacity: .62; }
.mission-guide { display: grid; grid-template-columns: auto auto minmax(160px, 1fr) auto; align-items: center; gap: 8px; min-width: 0; padding: 6px 9px; border: 1px solid rgba(255,211,106,.35); border-radius: 10px; color: #f7f1e5; background: rgba(53,34,20,.84); box-shadow: 0 8px 22px rgba(0,0,0,.16); }
.mission-guide-step { color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .09em; white-space: nowrap; }
.mission-guide strong { font-size: 11px; white-space: nowrap; }
.mission-guide [data-guide-text] { min-width: 0; overflow: hidden; color: #cbbfac; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.guide-skip { padding: 3px 5px; color: #b7aa96; background: transparent; font-size: 9px; }
.guide-skip:hover { color: var(--paper); }
@keyframes tool-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(168,231,177,0); } 50% { box-shadow: 0 0 0 4px rgba(168,231,177,.17); } }

@media (max-width: 900px) {
  .mission-guide { grid-template-columns: auto auto minmax(100px, 1fr) auto; }
  .mission-guide [data-guide-text] { font-size: 9px; }
  .tool-button { min-width: 84px; }
}

@media (max-width: 620px) {
  .game-toolbar { min-height: 44px; gap: 5px; }
  .game-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: center; }
  .game-title { max-width: 28%; overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
  .game-profile-name { max-width: 66px; font-size: 7px; }
  .game-toolbar-actions { gap: 4px; }
  .tool-rail { gap: 3px; }
  .tool-button { min-width: 66px; min-height: 34px; gap: 4px; padding: 4px 5px; }
  .tool-button kbd { width: 18px; height: 18px; font-size: 8px; }
  .tool-button strong { font-size: 8px; }
  .tool-button small { font-size: 7px; }
  .game-title { grid-column: 1; grid-row: 1; }
  .game-toolbar-actions { grid-column: 2; grid-row: 1; }
  .mission-guide { position: static; grid-column: 1 / -1; grid-row: 2; width: 100%; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 5px; padding: 6px 7px; border-radius: 8px; }
  .mission-guide-step, .mission-guide strong, .mission-guide [data-guide-text] { font-size: 8px; }
  .mission-guide [data-guide-text] { font-size: 8px; }
  .game-stage { height: calc(100svh - 164px); }
  .overlay-card { max-height: calc(100svh - 24px); overflow-y: auto; padding: 28px 18px 18px; }
  .overlay-card h2 { margin-bottom: 10px; font-size: clamp(34px, 12vw, 52px); }
  .overlay-body { font-size: 12px; line-height: 1.55; }
  .overlay-body .brief-map { gap: 5px; margin: 12px 0; }
  .overlay-body .brief-map div { padding: 8px; }
  .overlay-body .brief-map b { margin-bottom: 2px; font-size: 16px; }
  .overlay-actions { margin-top: 16px; }
}

/* At phone widths the task card gets the space it actually needs. A 50/50
   split makes Chinese helper copy unreadable; the quote becomes a narrow
   supporting rail instead of stealing half the task card. */
@media (max-width: 420px) {
  body:not(.in-game) .home-lower { grid-template-columns: minmax(0, 1.55fr) minmax(82px, .75fr); gap: 7px; }
  body:not(.in-game) .brief-card { padding-left: 9px; padding-right: 9px; }
  body:not(.in-game) .brief-row { grid-template-columns: 20px minmax(0, 1fr) auto; gap: 4px; }
  body:not(.in-game) .brief-row small { font-size: 7.5px; }
  body:not(.in-game) .quote-card { padding: 9px 8px; }
  body:not(.in-game) .quote-card p { font-size: 12px; line-height: 1.15; }
}

/* V0.2: tutorial is an interactive map overlay; ordinary event copy stays
   in the toolbar HUD slot so it never competes with the playable 3x3 view. */
.game-toolbar { position: relative; }
.game-toolbar > .hud-message {
  position: relative;
  z-index: 8;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  flex: 1 1 360px;
  align-self: center;
  width: auto;
  max-width: 430px;
  margin: 0 auto;
  padding: 7px 12px;
  border: 1px solid rgba(255,211,106,.3);
  border-radius: 9px;
  color: #f7f1e5;
  background: rgba(53,34,20,.94);
  box-shadow: 0 8px 22px rgba(0,0,0,.22);
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-5px);
  transition: opacity .18s ease, transform .18s ease;
}
.game-toolbar > .hud-message.is-visible { opacity: 1; transform: translateY(0); }
.mission-guide-map {
  position: absolute;
  z-index: 7;
  left: 50%;
  top: 50%;
  bottom: auto;
  display: grid;
  grid-template-columns: 1fr;
  width: min(390px, calc(100% - 24px));
  min-width: 0;
  gap: 6px;
  padding: 12px 13px 11px;
  border: 1px solid rgba(255,211,106,.55);
  border-radius: 14px;
  color: #f7f1e5;
  background: linear-gradient(135deg, rgba(53,34,20,.97), rgba(47,38,25,.94));
  box-shadow: 0 12px 30px rgba(0,0,0,.34), 0 0 0 3px rgba(255,211,106,.07);
  transform: translate(-50%, -50%);
  animation: guide-enter .24s ease both;
}
.mission-guide-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mission-guide-tag { color: #c7b89a; font-size: 8px; letter-spacing: .12em; text-transform: uppercase; }
.mission-guide-map .mission-guide-step { color: var(--gold); font-size: 9px; }
.mission-guide-map strong { color: var(--paper); font-family: var(--display); font-size: 18px; font-weight: 400; letter-spacing: -.02em; }
.mission-guide-map [data-guide-text] { display: block; overflow: visible; color: #d5c8b3; font-size: 10px; line-height: 1.45; white-space: normal; }
.mission-guide-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; margin-top: 2px; }
.mission-guide-actions button { min-height: 28px; border-radius: 7px; font-size: 10px; }
.guide-next { padding: 5px 12px; color: var(--ink); background: var(--gold); font-weight: 800; }
.guide-next:hover { background: #ffe09a; transform: translateY(-1px); }
.mission-guide-map .guide-skip { padding: 5px 6px; color: #b7aa96; }
@keyframes guide-enter { from { opacity: 0; transform: translate(-50%, calc(-50% + 8px)); } to { opacity: 1; transform: translate(-50%, -50%); } }

@media (max-width: 620px) {
  .game-toolbar { grid-template-rows: auto auto !important; }
  .game-toolbar > .hud-message {
    position: relative;
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    max-width: none;
    margin: 3px 0 0;
    font-size: 9px;
  }
  .mission-guide-map { top: 50%; bottom: auto; width: calc(100% - 20px); padding: 10px 11px 9px; transform: translate(-50%, -50%); }
  .mission-guide-map .mission-guide-step, .mission-guide-tag { font-size: 7px; }
  .mission-guide-map strong { font-size: 16px; }
  .mission-guide-map [data-guide-text] { font-size: 9px; }
  .game-stage { height: calc(100svh - 121px) !important; }
  body.in-game.has-hud-message .game-stage { height: calc(100svh - 151px) !important; }
}

/* V0.3 motion pass: the home screen and HUD should feel alive without
   turning the office into a slot machine. Canvas gameplay animation lives in
   canvasRenderer.js; these layers handle UI and hero-scene motion. */
.hero-art { isolation: isolate; }
.hero-background { animation: hero-background-breathe 18s ease-in-out infinite alternate; transform-origin: 58% 48%; }
.moon-glow { animation: moon-breathe 5.5s ease-in-out infinite; }
.window-grid { animation: window-drift 12s ease-in-out infinite alternate; }
.hero-character { animation: hero-worker-breathe 4.2s ease-in-out infinite; transform-origin: 50% 92%; }
.hero-paper { animation: paper-sway 5.6s ease-in-out infinite; transform-origin: 78% 90%; }
.hero-shadow { animation: shadow-breathe 4.2s ease-in-out infinite; }
.art-caption span { animation: clock-flicker 3.8s steps(2, end) infinite; }
.brief-icon { animation: icon-breathe 3.2s ease-in-out infinite; }
.brief-row:nth-child(3) .brief-icon { animation-delay: .35s; }
.brief-row:nth-child(4) .brief-icon { animation-delay: .7s; }
.quote-card::after { content: ""; position: absolute; inset: -30% auto -30% -20%; width: 22%; pointer-events: none; background: rgba(255,255,255,.18); filter: blur(16px); transform: rotate(18deg) translateX(-220%); animation: quote-shimmer 7.5s ease-in-out infinite; }
.live-dot, .status-dot { animation: live-pulse 2.2s ease-in-out infinite; }
.game-stage::before { content: ""; position: absolute; z-index: 1; inset: 0; pointer-events: none; border: 1px solid rgba(255,211,106,.08); border-radius: inherit; animation: stage-edge 5s ease-in-out infinite; }
.hud-alert.is-hot { animation: alert-pulse .72s ease-in-out infinite; }
.hud-alert.is-deadline { animation: deadline-pulse 1.1s ease-in-out infinite; }
.tool-button.is-active { animation: active-tool-pulse 1.4s ease-in-out infinite; }
.mission-guide-map { animation: guide-enter .24s ease both, guide-breathe 4.8s ease-in-out 1s infinite; }

@keyframes hero-background-breathe { from { transform: scale(1.02) translate3d(0, 0, 0); filter: saturate(.92) brightness(.78); } to { transform: scale(1.08) translate3d(-1.5%, -1%, 0); filter: saturate(1.02) brightness(.84); } }
@keyframes moon-breathe { 0%,100% { opacity: .66; transform: scale(.96); } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes window-drift { from { opacity: .25; transform: perspective(500px) rotateY(-8deg) rotateX(2deg) translate3d(0, 0, 0); } to { opacity: .48; transform: perspective(500px) rotateY(-8deg) rotateX(2deg) translate3d(-12px, 5px, 0); } }
@keyframes hero-worker-breathe { 0%,100% { transform: translate3d(0, 0, 0) rotate(-1deg); } 50% { transform: translate3d(0, -9px, 0) rotate(1deg); } }
@keyframes paper-sway { 0%,100% { transform: rotate(8deg) translate3d(0, 0, 0); } 50% { transform: rotate(5deg) translate3d(-4px, -3px, 0); } }
@keyframes shadow-breathe { 0%,100% { opacity: .7; transform: scaleX(.94); } 50% { opacity: .48; transform: scaleX(1.04); } }
@keyframes clock-flicker { 0%,88%,100% { opacity: 1; } 90% { opacity: .54; } 92% { opacity: .92; } }
@keyframes icon-breathe { 0%,100% { transform: translateY(0); box-shadow: none; } 50% { transform: translateY(-2px); box-shadow: 0 5px 13px rgba(168,231,177,.16); } }
@keyframes quote-shimmer { 0%,58% { transform: rotate(18deg) translateX(-220%); } 75%,100% { transform: rotate(18deg) translateX(720%); } }
@keyframes live-pulse { 0%,100% { opacity: .78; box-shadow: 0 0 0 4px rgba(157,229,196,.08), 0 0 12px var(--mint); } 50% { opacity: 1; box-shadow: 0 0 0 7px rgba(157,229,196,.14), 0 0 20px var(--mint); } }
@keyframes stage-edge { 0%,100% { opacity: .38; } 50% { opacity: .8; } }
@keyframes alert-pulse { 0%,100% { transform: translateX(0); } 50% { transform: translateX(2px); } }
@keyframes deadline-pulse { 0%,100% { box-shadow: none; } 50% { box-shadow: 0 0 0 3px rgba(255,211,106,.08); } }
@keyframes active-tool-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(168,231,177,0); } 50% { box-shadow: 0 0 0 4px rgba(168,231,177,.12); } }
@keyframes guide-breathe { 0%,100% { box-shadow: 0 12px 30px rgba(0,0,0,.34), 0 0 0 3px rgba(255,211,106,.07); } 50% { box-shadow: 0 14px 34px rgba(0,0,0,.4), 0 0 0 5px rgba(255,211,106,.11); } }

/* Player archive: four visual identities, many local save slots. */
.profile-status { display: inline-flex; align-items: center; gap: 7px; min-width: 0; padding: 3px 8px 3px 3px; border: 1px solid rgba(157,229,196,.2); border-radius: 99px; color: var(--cream); background: rgba(255,255,255,.05); text-align: left; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.in-game .profile-status { display: none; }
.profile-status:hover { border-color: rgba(157,229,196,.58); background: rgba(157,229,196,.1); transform: translateY(-1px); }
.profile-status img { width: 27px; height: 27px; object-fit: contain; object-position: center bottom; border-radius: 50%; background: rgba(255,211,106,.16); }
.profile-status span { display: grid; min-width: 0; gap: 1px; }
.profile-status small { color: #8490a7; font-size: 7px; letter-spacing: .12em; text-transform: uppercase; }
.profile-status strong { max-width: 86px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.profile-status em { max-width: 92px; overflow: hidden; color: #9ab5a5; font-size: 7px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.profile-manager { display: grid; gap: 17px; max-height: min(58vh, 490px); overflow-y: auto; padding-right: 3px; }
.profile-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: var(--ink); }
.profile-section-heading span { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.profile-section-heading small { color: #8b8c89; font-size: 10px; }
.profile-saved-list { display: grid; gap: 7px; }
.profile-saved-card { display: grid; grid-template-columns: 49px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 8px; border: 1px solid rgba(42,26,19,.1); border-radius: 12px; background: rgba(255,255,255,.4); transition: border-color .2s ease, transform .2s ease, background .2s ease; }
.profile-saved-card.is-active { border-color: rgba(87,154,103,.5); background: rgba(168,231,177,.18); }
.profile-saved-card:hover { border-color: rgba(255,118,88,.42); transform: translateY(-1px); }
.profile-saved-card > img { width: 49px; height: 58px; object-fit: contain; object-position: center bottom; border-radius: 9px; background: rgba(255,211,106,.16); }
.profile-saved-copy { display: grid; min-width: 0; gap: 2px; }
.profile-saved-copy strong { overflow: hidden; color: var(--ink); font-family: var(--display); font-size: 20px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.profile-saved-copy span { color: #6d7d6e; font-size: 10px; }
.profile-saved-copy small { overflow: hidden; color: #9a9185; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.profile-saved-actions { display: flex; align-items: center; gap: 5px; }
.profile-use, .profile-delete { min-height: 29px; padding: 0 9px; border-radius: 7px; font-size: 10px; }
.profile-use { color: var(--paper); background: var(--ink); }
.profile-delete { color: #9a594d; background: rgba(255,118,88,.1); }
.profile-empty { display: grid; gap: 4px; padding: 13px; border: 1px dashed rgba(42,26,19,.2); border-radius: 11px; color: #777c73; font-size: 11px; }
.profile-empty strong { color: var(--ink); }
.character-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.character-option { position: relative; display: grid; grid-template-columns: 57px minmax(0, 1fr) 18px; align-items: center; gap: 8px; min-width: 0; padding: 6px; border: 1px solid rgba(42,26,19,.11); border-radius: 12px; color: var(--ink); background: rgba(255,255,255,.32); text-align: left; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.character-option:hover { border-color: rgba(255,118,88,.45); transform: translateY(-2px); }
.character-option.is-selected { border-color: var(--coral); background: rgba(255,211,106,.2); box-shadow: 0 0 0 2px rgba(255,118,88,.12); }
.character-option img { width: 57px; height: 76px; object-fit: contain; object-position: center bottom; border-radius: 8px; background: rgba(255,211,106,.11); }
.character-option-copy { display: grid; min-width: 0; gap: 2px; }
.character-option-copy strong { color: var(--ink); font-size: 11px; }
.character-option-copy small { overflow: hidden; color: #6b786d; font-size: 8px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.character-option-copy em { overflow: hidden; color: #a18b78; font-size: 8px; font-style: normal; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.character-check { display: grid; width: 17px; height: 17px; place-items: center; border-radius: 50%; color: transparent; background: rgba(42,26,19,.08); font-size: 10px; font-style: normal; }
.character-option.is-selected .character-check { color: var(--paper); background: var(--coral); }
.profile-name-field { display: grid; gap: 6px; margin-top: 10px; color: var(--ink); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.profile-name-field input { width: 100%; min-height: 39px; padding: 0 12px; border: 1px solid rgba(42,26,19,.14); border-radius: 9px; outline: none; color: var(--ink); background: rgba(255,255,255,.58); font-size: 13px; letter-spacing: 0; }
.profile-name-field input:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(255,118,88,.12); }
.profile-preview { display: flex; align-items: center; gap: 9px; margin-top: 9px; padding: 7px 9px; border-radius: 10px; color: #627265; background: rgba(168,231,177,.17); }
.profile-preview img { width: 33px; height: 43px; object-fit: contain; object-position: center bottom; }
.profile-preview div { display: grid; gap: 2px; }
.profile-preview strong { color: var(--ink); font-size: 11px; }
.profile-preview span { font-size: 9px; }

@media (max-width: 900px) {
  .profile-status-copy { display: none; }
}

@media (max-width: 620px) {
  .header-status { gap: 5px; }
  .profile-status { padding-right: 5px; }
  .profile-status img { width: 24px; height: 24px; }
  .profile-status strong { max-width: 62px; font-size: 8px; }
  .profile-status em { max-width: 68px; }
  .profile-manager { max-height: calc(100svh - 230px); }
  .character-grid { grid-template-columns: 1fr; }
  .character-option { grid-template-columns: 48px minmax(0, 1fr) 18px; }
  .character-option img { width: 48px; height: 64px; }
  .profile-saved-card { grid-template-columns: 42px minmax(0, 1fr); }
  .profile-saved-card > img { width: 42px; height: 54px; }
  .profile-saved-actions { grid-column: 2; justify-content: flex-end; }
}

/* Frontend bug-fix pass: readable tutorial, content-driven task card, and a
   profile entry that reads like a real control instead of a tiny status label. */
.mission-guide-map {
  width: min(440px, calc(100% - 32px));
  gap: 10px;
  padding: 17px 18px 16px;
  border-color: rgba(255,211,106,.72);
  box-shadow: 0 16px 38px rgba(0,0,0,.42), 0 0 0 4px rgba(255,211,106,.1);
}
.mission-guide-map::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 14px;
  right: 14px;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--gold), var(--coral), var(--mint));
  background-size: 180% 100%;
  animation: guide-progress-sheen 3s ease-in-out infinite;
}
.mission-guide-map .mission-guide-step { font-size: 11px; letter-spacing: .12em; }
.mission-guide-map .mission-guide-tag { font-size: 10px; }
.mission-guide-map strong { font-size: clamp(24px, 3.2vw, 31px); line-height: 1.08; }
.mission-guide-map [data-guide-text] { color: #e4d9c6; font-size: 14px; line-height: 1.6; }
.mission-guide-actions { gap: 10px; margin-top: 4px; }
.mission-guide-actions button { min-height: 36px; font-size: 12px; }
.guide-next { padding: 6px 16px; box-shadow: 0 7px 15px rgba(255,211,106,.18); animation: guide-next-pulse 1.8s ease-in-out infinite; }
.mission-guide-map .guide-skip { padding: 6px 8px; font-size: 11px; }

body:not(.in-game) .home-lower {
  height: clamp(168px, 21vh, 218px);
  min-height: 168px;
}
body:not(.in-game) .brief-card,
body:not(.in-game) .quote-card {
  height: 100%;
  min-height: 168px;
  overflow: visible;
}
body:not(.in-game) .brief-card { padding: 16px 22px; }
body:not(.in-game) .card-label { margin-bottom: 8px; }
body:not(.in-game) .brief-row {
  grid-template-columns: 33px minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 35px;
  padding: 4px 0;
}
body:not(.in-game) .brief-row div { min-width: 0; }
body:not(.in-game) .brief-row strong,
body:not(.in-game) .brief-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body:not(.in-game) .brief-row strong { font-size: 14px; }
body:not(.in-game) .brief-row strong { line-height: 1.1; }
body:not(.in-game) .brief-row small { font-size: 10px; line-height: 1.1; }
body:not(.in-game) .brief-row > b { white-space: nowrap; font-size: 17px; }

.profile-status {
  min-height: 44px;
  gap: 10px;
  padding: 5px 12px 5px 5px;
  border-color: rgba(168,231,177,.42);
  background: rgba(255,255,255,.1);
  box-shadow: 0 7px 18px rgba(0,0,0,.16), inset 0 0 0 1px rgba(255,211,106,.05);
}
.profile-status:hover,
.profile-status:focus-visible { border-color: var(--mint); background: rgba(168,231,177,.16); box-shadow: 0 10px 22px rgba(0,0,0,.22), 0 0 0 3px rgba(168,231,177,.12); }
.profile-status img { width: 34px; height: 34px; }
.profile-status small { font-size: 8px; }
.profile-status strong { max-width: 112px; font-size: 12px; }
.profile-status em { max-width: 120px; font-size: 8px; }

@keyframes guide-progress-sheen { 0%,100% { background-position: 0% 50%; opacity: .72; } 50% { background-position: 100% 50%; opacity: 1; } }
@keyframes guide-next-pulse { 0%,100% { transform: translateY(0); box-shadow: 0 7px 15px rgba(255,211,106,.18); } 50% { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(255,211,106,.32); } }

@media (max-width: 620px) {
  .mission-guide-map { width: calc(100% - 20px); padding: 14px 15px 13px; }
  .mission-guide-map .mission-guide-step { font-size: 9px; }
  .mission-guide-map .mission-guide-tag { font-size: 8px; }
  .mission-guide-map strong { font-size: clamp(21px, 7vw, 26px); }
  .mission-guide-map [data-guide-text] { font-size: 12px; line-height: 1.55; }
  .mission-guide-actions button { min-height: 34px; font-size: 11px; }
  body:not(.in-game) .home-lower { height: clamp(142px, 25vh, 178px); min-height: 142px; }
  body:not(.in-game) .brief-card,
  body:not(.in-game) .quote-card { min-height: 142px; }
  body:not(.in-game) .brief-card { padding: 12px 14px; }
  body:not(.in-game) .brief-row { grid-template-columns: 24px minmax(0, 1fr) auto; gap: 6px; min-height: 33px; padding: 4px 0; }
  body:not(.in-game) .brief-icon { width: 24px; height: 24px; font-size: 13px; }
  body:not(.in-game) .brief-row strong { font-size: 11px; }
  body:not(.in-game) .brief-row small { font-size: 8px; }
  body:not(.in-game) .brief-row > b { font-size: 13px; }
  .profile-status { min-height: 39px; gap: 7px; padding-right: 8px; }
  .profile-status img { width: 30px; height: 30px; }
  .profile-status strong { max-width: 88px; font-size: 10px; }
  .profile-status em { max-width: 94px; font-size: 7px; }
}

@media (max-width: 420px) {
  body:not(.in-game) .home-lower { grid-template-columns: 1fr; }
  body:not(.in-game) .quote-card { display: none; }
  body:not(.in-game) .brief-card { width: 100%; }
  .profile-status { max-width: 154px; }
  .profile-status strong { max-width: 70px; }
  .profile-status em { max-width: 76px; }
}
