/* Shared visual language: obsidian, antique gold, ivory, restrained heraldry. */
:root{--parchment:#141720;--ink:#f2e6cf;--brass:#d5b274;--blue:#121722;--gold:#d5b274;--panel:linear-gradient(135deg,#20202aee,#0d121df7);--muted:#bbb4a8;--edge:#c7a56766;color:#f3e9d7;color-scheme:dark}
body{background:#0d111b}button,input,select{font-family:inherit}button:focus-visible,a:focus-visible,select:focus-visible{outline:2px solid #f0cd8a;outline-offset:4px}input[type=checkbox]{accent-color:#d5b274}
header .brand{font-family:Georgia,serif;letter-spacing:1.4px;color:#f3e6cd}header .brand b{color:#d5b274}.header-actions button{background:#101620e8;border-color:var(--edge);color:#f0d7a6}.header-actions button:hover{background:#39303a}
body[data-menu-phase="armory"] #menuShade{background:linear-gradient(90deg,#0d111bf0,transparent 72%),linear-gradient(0deg,#0d111b95,transparent 60%)}#menuShade:after{border-color:#c7a56744}
#menu,.modal-card,.dialogue-card,.beast-copy,.map-panel,#heroLabel{background:var(--panel);color:#f3e9d7;border:1px solid var(--edge);border-top:2px solid #c5a064;border-radius:3px;clip-path:none;box-shadow:inset 0 0 0 5px #b88c4210,0 18px 60px #0007}
#menu{max-height:calc(100svh - 125px);overflow:auto;scrollbar-width:thin;scrollbar-color:#a78b55 #12151f}#menu:before{content:'✧';color:#d7b575;font-style:normal}#menu h1{font-style:normal;font-weight:500;color:#f3e6cf;letter-spacing:-1px}#menu h1 em{font-style:normal;color:#d9b777}#menu .lede,#menu .ranked-note{color:var(--muted)}#menu .back-link{color:#dcc599;min-height:36px}#menu .eyebrow,.armory-title{color:#d5b274;letter-spacing:1.5px}#menu #connectedKnightName{color:#e3c28a;border-block:1px solid var(--edge);padding:9px 0}
#armors button{background:#222631;border-color:#8e785244;border-radius:2px;box-shadow:none}#armors button:hover{background:#39333a}#armors button.selected{background:linear-gradient(135deg,#554431,#25222a);border:2px solid #e4c18a;box-shadow:0 0 20px #d9b77716}#armors button small{color:#f3e6cf;font-family:Georgia,serif;letter-spacing:.3px;font-size:9px}#armors button.selected:after{background:#dfc18b;color:#131723;border-color:#dfc18b}.armor-caption{border-color:var(--edge)}.armor-caption strong{font-style:normal;font-weight:500;color:#e5c693}.armor-traits small{color:#bdb4a4}.armor-traits b{color:#f6e9d4}.armor-traits i{background:linear-gradient(90deg,#c4a065 var(--fill),#36313a var(--fill));height:4px}.menu-links button{color:#c7b38e}
.primary,#modal[data-result="pause"] .primary,.beast-nav button:nth-child(2){background:linear-gradient(110deg,#d4ae6c,#f1d59b);color:#171820;border:1px solid #f1d59b;border-radius:2px;box-shadow:inset 0 0 0 3px #2b233020,0 5px 18px #0003;font-family:Georgia,serif;font-weight:600;letter-spacing:.8px;min-height:44px}.primary:hover,#modal[data-result="pause"] .primary:hover{background:#f5dfb0;box-shadow:0 0 18px #d6b57430;transform:none}.continue,.text-button{color:#dbc599;background:#141923;border-color:var(--edge);font-size:12px;min-height:40px}.text-button{background:transparent}.close{color:#e7cf9f;border:1px solid var(--edge);background:#171c28;width:36px;height:36px}.close:hover{background:#41333a;color:white}
#heroLabel strong{color:#ebce96;font-style:normal;font-weight:500}#heroLabel small{color:#d6b57d}#heroLabel p{color:#c5bfb4}
.overlay{background:#060911bd;backdrop-filter:blur(7px)}.modal-card{padding:34px;max-height:90svh;overflow:auto;scrollbar-width:thin;scrollbar-color:#b19661 #12151f}.modal-card h2,.map-panel>h2,.beast-copy h2{color:#f0d5a1;font-style:normal;font-weight:500;letter-spacing:-.6px}.modal-card .eyebrow,.beast-copy .eyebrow,.map-panel>.eyebrow{color:#c9a96e}.modal-card p,.profile-card .profile-note,.settings-card .settings-note,.control-guide p{color:#c4bfb5}.modal-crest{border-color:#b9975c;background:radial-gradient(#d5ad6d20,transparent);box-shadow:none}.modal-card .primary:disabled{background:#34343b;color:#a5a09a;border-color:#6c6252}
#modal[data-result="pause"]{background:linear-gradient(90deg,#070a1110,#070a11dd)}#modal[data-result="pause"] .modal-card{background:var(--panel);border:1px solid var(--edge);border-left:3px solid #d5b274}#modal[data-result="pause"] h2{color:#f0d5a1}#modal[data-result="pause"] p,#modal[data-result="pause"] .text-button{color:#c4bfb5}#modal[data-result="dead"] .modal-card{background:linear-gradient(135deg,#2f2028,#111520);border-top-color:#b47576}#modal[data-result="dead"] h2{color:#e5b1a7}#modal[data-result="clear"] h2{color:#e4c58d}
.setting-row{border-color:var(--edge);color:#eee1c9;font-size:13px;padding:13px 0}.setting-row select{background:#202330;border:1px solid var(--edge);color:#f4e4c5;padding:8px}.control-guide b{color:#d8b777}.control-guide p{font-size:12px;line-height:1.7}#resultStats{border-color:var(--edge)}#resultStats>div+div{border-color:var(--edge)}#resultStats b{font-style:normal;color:#ebcc91}#resultStats small{color:#c5baaa}
#dialogue{background:linear-gradient(0deg,#080b15ed,transparent 55%)}.dialogue-card{border-left:3px solid #d5b274}.dialogue-content h2{font-style:normal;font-weight:500;color:#e7c58a}.dialogue-content .eyebrow{color:#c6a56d}.dialogue-content p{color:#f0e7d8}.dialogue-content>small{color:#c6b897}.dialogue-content .primary{font-size:12px;min-height:40px}
.beast-copy strong{color:#d5b274}.beast-copy p{color:#cbc1b2}.beast-nav button{background:#1d222e;border-color:var(--edge);color:#efddbb}.map-card{background:#171d29;border-color:var(--edge)}.map-copy h3{color:#e9ce99;font-style:normal;font-weight:500}.map-copy p,.map-intro{color:#c2b9aa}.map-copy button{background:#2d2730;color:#e8ca91;border:1px solid var(--edge)}.map-copy button+button{color:#cfbf9f}
.player-info,.level-info,#bossHud,#tutorial{background:#111722ed;border:1px solid var(--edge);border-radius:3px;box-shadow:inset 0 0 0 3px #d5b27408,0 4px 16px #0004}.player-info>div:nth-child(2)>small{color:#e4cda2}.level-info>strong,#bossName,#tutorial b{font-style:normal;font-weight:500;color:#f0d6a6}.level-info>small,#bossTitle{color:#c7ad7f}.level-info>span,#bossCue,#tutorial span{color:#d1c4ac}.count b{color:#ecd19d}.count small{color:#bfb3a1}.hud-divider{background:var(--edge)}#hearts i{background:#cc6f79}#hearts i.empty{background:#53414b}.progress-track{background:#504437}.progress-track i{background:#d7b575}.boss-track{background:#392630}.boss-track i{background:linear-gradient(90deg,#a74666,#e49d8c)}#keysHelp,kbd{color:#ead8b6}kbd{background:#121723e8;border-color:var(--edge)}
#controls button,#controls #attack,#controls #dash{background:#151b28eb;color:#ecd5a6;border-color:#bd9a61!important;border-radius:5px!important;box-shadow:0 3px #080d15}#controls #jump{background:linear-gradient(#e8c78c,#bd9659);color:#171a24;border-radius:5px!important;box-shadow:0 3px #66502f}#toast{background:#161b28f5;border:1px solid var(--edge);border-left:3px solid #dec086;color:#f2dfb9;box-shadow:0 8px 24px #0005}#worldIntro strong{font-style:normal;font-weight:500;color:#fff0d2}#worldIntro small{color:#e9c886}
#knightQuip{background:#141a26f2;color:#f3e7ce;border:1px solid #bd9d68;border-radius:3px;box-shadow:0 6px 16px #0006;font:15px/1.5 Georgia,serif}#knightQuip small{color:#d7b478}#knightQuip:after{border-top-color:#141a26}#boostHud span{background:#141a26eb;border-radius:2px;color:#f4e3c6}#counselHud{border-color:var(--edge);color:#e3c9a2}
.rank-status{background:#272630;border:1px solid var(--edge);border-radius:2px}.rank-status strong{color:#f0d6a6}.rank-status span{color:#c6bdaf}.leaderboard-card .leaderboard-rule,.leaderboard-table{color:#eee2cd}.leaderboard-table th,.leaderboard-table td{border-color:var(--edge)}.leaderboard-card #rankSetup,.profile-note strong{color:#cabb9e}.profile-card #profileError{color:#ffb4b4}
.mika-announcement #modalText{color:#e3d7c5}.mika-announcement #mikaFollow{color:#ebd1a0;border-color:var(--edge);background:#1c202d}.cinema-caption{background:#0d121dd9;border-color:var(--edge)}.cinema-caption p{font-style:normal;color:#f7e8ca}.cinema-top button,.cinema-caption button{background:#171d29;color:#eed3a1;border-color:var(--edge)}#boot{background:#0c111c}#boot strong{font-style:normal;font-weight:500;color:#e2c18b}
.sign-out{border:1px solid #b6976455;background:#141923;color:#dfc595;font:12px Georgia,serif;letter-spacing:.7px;padding:9px 15px;min-height:40px;border-radius:2px;cursor:pointer}.sign-out:hover{background:#3c2933;color:#ffe4bb;border-color:#d9b274}.sign-out:disabled{opacity:.5;cursor:wait}#titleScreen #titleSignOut{order:4;align-self:center;min-height:34px;padding:6px 20px;margin:0;font-size:11px;background:#101621c9}#titleScreen .profile-link{padding:5px 0;min-height:27px}.account-row{display:flex;justify-content:space-between;align-items:center;gap:14px;border:1px solid var(--edge);background:#20212c;padding:12px;margin:18px 0;color:#e6ce9e;font-size:12px}.account-row span{overflow-wrap:anywhere}.account-row button{flex-shrink:0}.account-row[hidden],.sign-out[hidden]{display:none!important}
@media(max-width:700px){.modal-card{padding:28px 23px}.modal-card h2{font-size:32px;margin-right:25px}.dialogue-content h2{position:static;width:auto}.dialogue-content{padding:20px}.dialogue-content p{font-size:16px;line-height:1.6}#menu{max-height:calc(100svh - 100px);padding:20px}#menu h1{font-size:35px}#menu .lede{font-size:12px}#armors button small{font-size:8px}.player-info{padding:8px 10px}.account-row{padding:10px;gap:8px}.setting-row{font-size:12px}.control-guide p{font-size:11px}.beast-copy{width:88%;left:6%}#titleScreen #titleSignOut{min-height:40px}.ranked-note{font-size:10px}}
@media(max-height:500px){#menu{max-height:calc(100svh - 70px);padding:14px 20px}#menu h1{font-size:27px}.modal-card{max-height:90svh;padding:24px}.modal-card h2{font-size:30px}#titleScreen #titleSignOut{min-height:24px;padding:3px 12px;font-size:10px}.dialogue-content p{font-size:14px}}

#titleScreen .title-links{display:flex;flex-direction:column}#titleScreen #titleGuide{order:0}#titleScreen #leaderboardOpen{order:1}#titleScreen .title-links button{width:100%}
#menu h1,#heroLabel strong,.armor-caption strong,.modal-card h2,.dialogue-content h2,.beast-copy h2,.map-panel>h2,.map-copy h3,.level-info>strong,#bossName,#tutorial b,#worldIntro strong{font-family:Georgia,'Times New Roman',serif;text-shadow:none}#heroLabel p{display:block}.header-actions button{border-radius:3px}#menu:before{display:block}
/* The title-screen crest replaces the small utility wordmark. */
header{padding:8px 3.6%;align-items:center}.brand{display:block;width:180px;line-height:0}.brand .header-logo{display:block;width:100%;height:auto;max-height:90px;object-fit:contain;filter:drop-shadow(0 2px 5px #090c18a0)}#hud{top:116px}#boostHud{top:184px}
@media(max-width:700px){header{padding:6px 5%}.brand{width:148px}.brand .header-logo{max-height:74px}#hud{top:96px}#boostHud{top:163px}}
@media(max-height:500px){header{padding:5px 4%}.brand{width:112px}.brand .header-logo{max-height:56px}#hud{top:72px}#boostHud{top:124px}}

#musicToggle{position:fixed;z-index:150;right:calc(3.6% + 160px);top:34px;min-height:38px;padding:8px 12px;border:1px solid #b99b6266;border-radius:3px;background:#101620e8;color:#f0d7a6;font:12px Georgia,serif;cursor:pointer}#musicToggle:hover{background:#39303a}#musicToggle:focus-visible{outline:2px solid #f0d7a6;outline-offset:4px}body[data-mode="menu"][data-menu-phase="title"] #musicToggle{right:3.6%}@media(max-width:700px){#musicToggle{top:auto;bottom:12px;right:16px;font-size:11px}}@media(max-height:500px){#musicToggle{top:14px;bottom:auto}}

#boot{z-index:200;gap:0;background:radial-gradient(ellipse at 50% 44%,#171722 0%,#0c1019 48%,#06090f 100%);padding:24px;text-align:center}#boot:before{content:'';position:absolute;inset:22px;border:1px solid #c4a46b25;pointer-events:none}#boot .boot-logo{display:block;width:min(560px,78vw);max-height:48vh;object-fit:contain;filter:drop-shadow(0 8px 35px #d6a65820)}.boot-rule{height:1px;width:min(320px,55vw);margin:24px 0;background:linear-gradient(90deg,transparent,#c5a56b,transparent)}#boot small{color:#dbc395;font:11px Georgia,serif;letter-spacing:5px;padding-left:5px}.boot-track{width:150px;height:2px;background:#b4965d25;margin-top:24px;overflow:hidden}.boot-track i{display:block;width:45%;height:100%;background:linear-gradient(90deg,transparent,#e6c68d,transparent);animation:boot-travel 1.7s ease-in-out infinite}#boot p{color:#9c9487;font:12px Georgia,serif;margin:15px 0 0;letter-spacing:.6px}@keyframes boot-travel{from{transform:translateX(-110%)}to{transform:translateX(330%)}}@media(prefers-reduced-motion:reduce){.boot-track i{animation:none;width:100%;opacity:.6}}

/* Illustrated rescue film: camera moves are driven by the game timeline. */
#cinematic{z-index:120;background:transparent;overflow:hidden}.rescue-film{position:absolute;inset:0;background:#06090e;overflow:hidden}.rescue-frame{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 45%;opacity:0;will-change:transform,opacity}.rescue-film-veil{position:absolute;inset:0;z-index:5;background:linear-gradient(#03060af5 0 7%,transparent 7% 62%,#05080bd9 82%,#03060a 94%),radial-gradient(ellipse,transparent 35%,#04070b77 100%)}.rescue-mote{position:absolute;z-index:6;display:block;border-radius:50%;background:#ffe3a2;box-shadow:0 0 9px #ffc76f;pointer-events:none}.rescue-victory{position:absolute;z-index:7;left:7%;top:28%;text-shadow:0 3px 25px #000;pointer-events:none}.rescue-victory small{display:block;color:#ebcc92;font:10px Georgia,serif;letter-spacing:4px}.rescue-victory strong{display:block;margin-top:12px;font:clamp(34px,5vw,76px)/1.1 Georgia,serif;color:#fff1d5}#cinematic .cinema-top{z-index:10;top:2%;font:10px Georgia,serif;color:#d7c39b;letter-spacing:3px}#cinematic .cinema-caption{z-index:10;background:none;border:0;left:12%;right:12%;bottom:5%;padding:0}#cinematic .cinema-caption small{color:#d9bc83;font:10px Georgia,serif;letter-spacing:3px}#cinematic .cinema-caption p{font:clamp(18px,2.1vw,28px)/1.5 Georgia,serif;color:#fff0d6;margin:12px auto 16px;max-width:850px}#cinematic button{background:#0e141bbb;border:1px solid #c9a87166;border-radius:2px;color:#e5c99b;font:10px Georgia,serif;letter-spacing:1px}.cinema-progress{position:absolute;bottom:0;left:0;right:0;height:2px;background:#bda26a22;z-index:12}.cinema-progress i{display:block;height:100%;background:#d1af74;transform-origin:left;transform:scaleX(0)}body[data-mode="rescue"] header{visibility:hidden}body[data-mode="rescue"] #musicToggle{top:auto;bottom:18px;right:20px}body[data-mode="win"] .mika-announcement{background:linear-gradient(90deg,#080c16ee,#080c1677),url('art/ending-freedom.webp') center/cover}body[data-mode="win"] .mika-announcement .modal-card{background:#0d131ee8;box-shadow:0 25px 100px #0009}@media(max-width:700px){.rescue-frame{object-fit:contain;background:#080c12}.rescue-victory{top:20%;left:8%}.rescue-victory strong{font-size:36px}#cinematic .cinema-top{font-size:7px;letter-spacing:1px}#cinematic .cinema-caption{bottom:10%;left:7%;right:7%}#cinematic .cinema-caption p{font-size:17px}}
