:root {
  color-scheme: light;
  --paper:#f8f4ec;
  --panel:#fffcf6;
  --rail:#f1eadf;
  --ink:#2e2924;
  --muted:#75695a;
  --rule:#e5dac9;
  --red:#9b3027;
  --red-dark:#75251f;
  --gold:#ad7937;
  --green:#45664d;
  --heading:"Songti SC","Noto Serif CJK SC","Source Han Serif SC","SimSun",serif;
  --body:"PingFang SC","Microsoft YaHei","Noto Sans CJK SC",sans-serif;
}
* { box-sizing:border-box; }
body { margin:0; background:var(--paper); color:var(--ink); font:14px/1.65 var(--body); }
button, input { font:inherit; }
button { cursor:pointer; }
a { color:inherit; }
button:focus-visible, a:focus-visible { outline:2px solid var(--red); outline-offset:4px; }
h1,h2,h3,p { margin:0; }
h1,h2,h3 { font-family:var(--heading); font-weight:900; line-height:1.22; }
h1:focus, h2:focus { outline:none; }
.icon { width:20px; height:20px; flex:none; vertical-align:middle; }
.sidebar { position:fixed; inset:0 auto 0 0; width:236px; background:var(--rail); border-right:1px solid var(--rule); display:flex; flex-direction:column; padding:28px 21px 24px; z-index:2; }
.brand { text-decoration:none; display:flex; gap:12px; align-items:center; padding:0 2px; width:max-content; }
.seal { display:grid; align-content:center; justify-content:center; gap:0; width:49px; height:49px; color:#fff3df; background:var(--red); border-radius:6px; border:1px solid #81291f; box-shadow:inset 0 0 0 3px var(--red), inset 0 0 0 4px #eac1a099; font:bold 16px/.98 var(--heading); letter-spacing:1px; padding-left:1px; }
.brand-text { display:grid; }
.brand strong { font:900 24px/1.1 var(--heading); letter-spacing:.08em; }
.brand small { color:var(--muted); font-size:10px; margin-top:6px; letter-spacing:.08em; }
nav { display:grid; gap:6px; margin-top:43px; }
.nav-button { display:flex; align-items:center; gap:12px; width:100%; color:#5e5348; text-align:left; background:none; border:1px solid transparent; padding:12px 11px; border-radius:7px; font-weight:650; white-space:nowrap; }
.nav-button:hover { background:#eee2d4; }
.nav-button.active { color:var(--red); background:#ecddd0; border-color:#e3ccbb; }
.nav-count { margin-left:auto; font-size:11px; color:inherit; opacity:.82; }
.side-bottom { margin-top:auto; border:1px solid #dfd1be; background:#f8f1e7; border-radius:9px; padding:16px 13px; }
.side-caption { display:flex; align-items:center; gap:7px; color:var(--muted); font-size:12px; }
.side-caption .icon,.side-bottom small .icon { width:15px; height:15px; }
.side-bottom strong { display:block; margin:8px 0; font:900 29px/1.15 var(--heading); }
.side-bottom strong span { font:12px var(--body); color:var(--muted); }
.side-bottom small { display:flex; align-items:center; gap:6px; color:var(--muted); font-size:11px; }
.side-bottom small .icon { color:var(--gold); }
.completion-bar { height:5px; background:#e6d9c9; border-radius:9px; margin:11px 0 12px; overflow:hidden; }
.completion-bar span { display:block; height:100%; background:var(--red); }
.main-shell { margin-left:236px; min-height:100vh; display:flex; flex-direction:column; }
.topbar { min-height:65px; padding:0 35px; border-bottom:1px solid var(--rule); display:flex; justify-content:space-between; align-items:center; gap:12px; }
.breadcrumbs { display:flex; align-items:center; gap:12px; color:var(--muted); font-size:13px; }
.crumb-book { display:flex; align-items:center; gap:8px; white-space:nowrap; }
.crumb-book .icon { width:16px; height:16px; color:#a1513b; }
.slash { color:#a69987; }
.breadcrumbs strong { color:var(--ink); font-weight:650; }
.ghost { display:inline-flex; align-items:center; gap:7px; padding:7px 9px; color:#685748; border:1px solid transparent; border-radius:6px; background:transparent; }
.ghost:hover { color:var(--red); background:#f1e7da; }
.help-button { padding:7px 10px; border-color:#e6dac9; font-size:12px; white-space:nowrap; }
.help-glyph { display:inline-grid; place-items:center; border:1px solid currentColor; border-radius:50%; width:15px; height:15px; font:700 10px/1 var(--body); }
#view { width:100%; max-width:1440px; margin:0 auto; padding:27px 34px 36px; flex:1; }
.hero-banner { --banner:url("./assets/v1/banner-ensemble.webp"); position:relative; isolation:isolate; border:1px solid #d7b893; border-radius:13px; min-height:318px; display:flex; align-items:center; overflow:hidden; background:#f0ddbe var(--banner) center right / cover no-repeat; }
.hero-banner::after { content:""; pointer-events:none; position:absolute; z-index:-1; inset:0; background:linear-gradient(90deg,#f4e6d2 0%,#f4e6d2d9 16%,#f4e6d23d 42%,transparent 56%); }
.hero-copy { padding:34px clamp(26px,4vw,60px); }
.hero-label { display:flex; align-items:center; color:var(--red-dark); gap:10px; font-weight:750; font-size:12px; letter-spacing:.16em; }
.hero-label span { width:6px; height:6px; transform:rotate(45deg); background:var(--red); }
.hero-copy h1 { font-size:clamp(43px,5.05vw,80px); letter-spacing:.055em; line-height:1.12; margin:14px 0 15px; color:#342820; }
.hero-sub { color:#534133; font-size:14px; font-weight:550; line-height:1.8; }
.primary,.secondary { display:inline-flex; align-items:center; justify-content:center; gap:9px; border-radius:7px; padding:9px 16px; min-height:42px; border:1px solid transparent; font-weight:700; white-space:nowrap; }
.primary { color:#fff8eb; background:var(--red); border-color:var(--red-dark); }
.primary:hover { background:var(--red-dark); }
.primary .icon,.secondary .icon { width:17px; height:17px; }
.secondary { color:#514338; background:#faf2e6; border-color:#decdb7; }
.secondary:hover { color:var(--red); background:#f2e5d5; }
.hero-button { margin-top:22px; padding:11px 19px; box-shadow:0 3px 9px #581a1a22; }
.map { margin-top:32px; }
.section-head { display:flex; align-items:flex-end; justify-content:space-between; gap:14px; margin-bottom:17px; }
.section-head h1,.section-head h2 { font-size:32px; letter-spacing:.06em; }
.section-head p { color:var(--muted); font-size:13px; margin-top:6px; }
.progress-pill { display:flex; align-items:center; gap:6px; padding:6px 10px; background:#f2e9dc; border:1px solid #e7d8c4; border-radius:5px; white-space:nowrap; align-self:center; color:#675440; font-size:12px; }
.progress-pill .icon { width:15px; height:15px; color:#8e5941; }
.chapter-grid,.collection-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:17px; }
.chapter-card { border:1px solid var(--rule); background:var(--panel); border-radius:10px; overflow:hidden; box-shadow:0 2px 3px #61462d07; }
.chapter-card.current { border-color:#ba7461; box-shadow:0 2px 8px #74231912; }
.chapter-card.available:hover { border-color:#ba7461; }
.chapter-art { position:relative; aspect-ratio:2.05; overflow:hidden; background:#e7dbca; }
.chapter-art::after { content:""; position:absolute; inset:0; background:linear-gradient(#22181038,transparent 40%); pointer-events:none; }
.chapter-art img { display:block; width:100%; height:100%; object-fit:cover; object-position:center 46%; }
.chapter-card:nth-child(3) img { object-position:center 34%; }
.chapter-card.locked img { filter:saturate(.76) brightness(.92); }
.chapter-number,.chapter-status { position:absolute; z-index:1; top:11px; padding:3px 8px; border-radius:4px; font-size:11px; white-space:nowrap; }
.chapter-number { left:11px; background:#2b231fe8; color:#fff4e6; letter-spacing:.06em; }
.chapter-status { right:11px; display:flex; align-items:center; gap:4px; color:#f9ecda; background:#2b2522eb; }
.chapter-status.ready { background:#faefde; color:#7a3028; }
.chapter-status i { width:6px; height:6px; background:var(--red); border-radius:50%; }
.chapter-status .icon { width:12px; height:12px; }
.chapter-content { padding:13px 14px 8px; }
.chapter-period { color:#84533d; font-size:11px; font-weight:700; letter-spacing:.02em; }
.chapter-period span { margin:0 2px; color:#a58368; }
.chapter-content h3 { letter-spacing:.015em; font-size:clamp(21px,2.1vw,28px); margin:4px 0 5px; }
.chapter-line,.muted { color:var(--muted); font-size:12px; }
.chapter-bottom { display:flex; align-items:center; justify-content:space-between; min-height:36px; margin-top:9px; padding-top:4px; border-top:1px solid #efe6d8; gap:5px; }
.stars { display:inline-flex; align-items:center; gap:3px; color:#baaa96; }
.stars span { display:inline-flex; }
.stars .icon { width:15px; height:15px; }
.stars .earned { color:#9e6929; }
.stars .earned .icon { fill:#d9a654; }
.chapter-link { display:inline-flex; align-items:center; gap:4px; color:var(--red); border:0; background:transparent; font-size:12px; font-weight:750; padding:6px 0; white-space:nowrap; }
.chapter-link:hover { color:var(--red-dark); text-decoration:underline; text-underline-offset:4px; }
.chapter-link .icon { width:15px; height:15px; }
.lock-note { font-size:11px; }
.footer { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 34px 18px; border-top:1px solid var(--rule); color:var(--muted); font-size:11px; }
.collection-head { margin:8px 0 22px; }
.portrait-card { border:1px solid var(--rule); border-radius:10px; overflow:hidden; background:var(--panel); }
.portrait-art,.profile-art { position:relative; display:grid; place-items:center; background:radial-gradient(ellipse at 50% 56%, #fff8e8 8%, #e9dcc5 78%); overflow:hidden; isolation:isolate; }
.portrait-art::before,.profile-art::before { content:""; position:absolute; z-index:-1; inset:11% 0 auto; width:min(55%,154px); aspect-ratio:1; margin:auto; border-radius:50%; background:var(--character); opacity:.15; }
.portrait-art { min-height:200px; }
.portrait-tag { position:absolute; top:12px; left:12px; display:flex; align-items:center; gap:4px; background:#f8efdf; padding:4px 7px; border:1px solid #d9c9ae; border-radius:5px; color:#695747; font-size:11px; }
.portrait-tag .icon { width:13px; height:13px; }
.portrait-copy { padding:12px 15px 14px; }
.portrait-copy h2 { font-size:26px; }
.portrait-copy p { font-size:12px; color:var(--muted); margin-top:2px; }
.portrait-copy .chapter-link { margin-top:4px; }
.sprite { display:inline-block; width:var(--sprite-size,182px); aspect-ratio:1; flex:none; background-image:var(--sprite); background-size:400% 100%; background-repeat:no-repeat; background-position:0 0; }
.owned .sprite,.profile-art .sprite,.reward .sprite { animation:stance 1.65s steps(1,end) infinite; }
@keyframes stance {
  0%,100% { background-position:0 0; }
  25% { background-position:33.3333% 0; }
  50% { background-position:66.6667% 0; }
  75% { background-position:100% 0; }
}
.unowned .sprite { filter:brightness(0) sepia(1) saturate(.4); opacity:.23; }
.quiz-header { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; color:var(--muted); font-size:12px; }
.return-button { padding-left:0; }
.return-button .icon { width:16px; height:16px; }
.type-chip { display:flex; align-items:center; gap:6px; border:1px solid #e9d9c4; background:#f5e9db; border-radius:6px; padding:3px 8px; color:#834637; font-weight:700; }
.type-chip .icon { width:15px; height:15px; }
.answer-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:20px; }
.answer { display:flex; align-items:center; text-align:left; min-height:58px; gap:10px; background:#fcf7ee; border:1px solid #e4d6c3; border-radius:7px; padding:10px; color:var(--ink); font-size:15px; font-weight:650; }
.answer:not(:disabled):hover { border-color:#b97660; background:#f9eee0; }
.answer:disabled { cursor:default; }
.answer-letter { display:inline-grid; place-items:center; flex:none; width:26px; height:26px; border-radius:4px; background:#eddeca; color:#614936; font-size:12px; font-weight:750; }
.answer .icon { margin-left:auto; width:17px; height:17px; }
.answer.right { background:#eaf0e6; color:#356046; border-color:#96b29b; }
.answer.wrong { background:#f4e0da; color:#8f352a; border-color:#c18678; }
.answer.right .answer-letter { background:#d6e5d4; color:#356046; }
.answer.wrong .answer-letter { background:#edc9bf; color:#8f352a; }
.feedback { margin-top:16px; border-left:3px solid #b97953; background:#f7ebda; padding:10px 13px; border-radius:0 5px 5px 0; }
.feedback.good { border-color:#598064; background:#edf1e7; }
.feedback.good strong { color:#315b3e; }
.feedback.review strong { color:#83372b; }
.feedback p { color:#5d5246; }
.feedback a { display:inline-block; color:var(--red); margin-left:5px; font-size:12px; text-underline-offset:3px; }
.quiz-actions { margin-top:14px; display:flex; justify-content:flex-end; }
.compass-guide { display:grid; grid-template-columns:repeat(3,26px); grid-template-rows:repeat(3,20px); place-items:center; width:max-content; margin:12px auto 0; color:#805747; font-size:12px; }
.compass-guide .north { grid-area:1 / 2; }
.compass-guide .west { grid-area:2 / 1; }
.compass-guide .needle { grid-area:2 / 2; font-size:25px; }
.compass-guide .east { grid-area:2 / 3; }
.compass-guide .south { grid-area:3 / 2; }
.result-card { max-width:650px; margin:14px auto; padding:28px 25px 32px; display:grid; justify-items:center; text-align:center; background:var(--panel); border:1px solid var(--rule); border-radius:12px; }
.result-kicker { color:var(--red); font-size:12px; font-weight:750; }
.result-card .stars { margin:14px 0 9px; gap:8px; }
.result-card .stars .icon { width:30px; height:30px; }
.result-card h1 { font-size:46px; letter-spacing:.06em; }
.score { margin-top:9px; color:#4e4137; }
.score strong { color:var(--red); font-size:21px; }
.result-note { margin-top:4px; color:var(--muted); }
.reward { display:flex; align-items:center; gap:10px; text-align:left; background:#f7ebda; color:#593e2f; border:1px solid #e5d1b6; border-radius:8px; padding:2px 13px 2px 1px; margin-top:16px; }
.reward:hover { border-color:#b8755a; }
.reward .sprite { --sprite-size:86px; }
.reward > span:not(.sprite) { display:grid; }
.reward > span > span { font-size:12px; color:var(--muted); }
.reward strong { font:900 23px/1.1 var(--heading); }
.reward small { color:var(--red); font-size:10px; font-weight:750; }
.result-actions,.save-actions { display:flex; justify-content:center; flex-wrap:wrap; gap:8px; margin-top:18px; }
dialog { max-width:min(500px,calc(100% - 28px)); max-height:90vh; padding:0; border:1px solid #d8c4a9; border-radius:12px; background:var(--panel); color:var(--ink); }
dialog::backdrop { background:#2419158c; }
.dialog-content { padding:20px 22px 21px; }
.dialog-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:10px; }
.dialog-heading h2 { font-size:28px; }
.close-button { padding:5px; }
.rules { padding-left:22px; margin:0 0 14px; }
.rules li + li { margin-top:6px; }
.save-box { background:#f6ecde; padding:12px 14px; border-radius:7px; }
.save-box p { color:var(--muted); font-size:12px; }
.save-box .save-actions { justify-content:flex-start; margin-top:8px; }
.save-box #import-status:not(:empty) { margin-top:8px; }
.profile-modal { width:400px; }
.profile-art { min-height:235px; border-radius:6px; }
.profile-art .sprite { --sprite-size:min(225px,100%); }
.profile-title { margin-top:10px; color:var(--muted); font-size:12px; }
.profile-weapon { color:var(--red); font-weight:750; font-size:17px; margin:2px 0 5px; }
.profile-description,.dialog-message { color:#5c4c3d; }
@media(max-width:1090px) {
  .sidebar { width:198px; padding-inline:16px; }
  .main-shell { margin-left:198px; }
  #view,.topbar,.footer { padding-inline:25px; }
  .hero-banner { min-height:280px; }
  .chapter-content { padding-inline:10px; }
}
@media(max-width:860px) {
  .sidebar { position:static; width:auto; display:flex; flex-direction:row; justify-content:space-between; align-items:center; gap:10px; padding:13px 20px; border-right:0; border-bottom:1px solid var(--rule); }
  .main-shell { margin:0; min-height:calc(100vh - 75px); }
  nav { display:flex; gap:4px; margin-top:0; }
  .nav-button { width:auto; gap:5px; padding:7px 9px; }
  .nav-button .icon { width:17px; height:17px; }
  .side-bottom { display:none; }
  .topbar { min-height:46px; }
  #view { padding-top:17px; }
  .hero-banner { min-height:268px; }
}
@media(max-width:630px) {
  #view,.topbar,.footer { padding-inline:14px; }
  .sidebar { padding:10px 12px; gap:6px; }
  .brand { gap:7px; }
  .brand strong { font-size:19px; }
  .brand small { display:none; }
  .seal { width:36px; height:36px; font-size:12px; }
  .nav-button { font-size:12px; padding:6px; }
  .nav-count { display:none; }
  .nav-button .icon { width:15px; height:15px; }
  .topbar { min-height:43px; }
  .breadcrumbs { gap:7px; font-size:11px; }
  .crumb-book { gap:4px; }
  .help-button { padding:4px 6px; font-size:11px; }
  .hero-banner { display:block; min-height:0; background:#f4e6d2; }
  .hero-banner::after { position:static; display:block; height:clamp(142px,43vw,225px); background:linear-gradient(#f4e6d2,transparent 23%),var(--banner) right 31% / 190% auto no-repeat; }
  .hero-copy { padding:22px 15px; }
  .hero-copy h1 { font-size:clamp(35px,9.6vw,51px); letter-spacing:.01em; }
  .hero-sub { font-size:12px; }
  .hero-button { margin-top:15px; }
  .map { margin-top:23px; }
  .section-head { gap:7px; margin-bottom:13px; }
  .section-head h1,.section-head h2 { font-size:25px; }
  .section-head p { font-size:12px; }
  .progress-pill { font-size:10px; padding:4px 5px; gap:4px; }
  .progress-pill .icon { width:12px; height:12px; }
  .chapter-grid,.collection-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
  .chapter-art { aspect-ratio:1.57; }
  .chapter-content { padding:8px 8px 5px; }
  .chapter-content h3 { font-size:clamp(17px,4.7vw,24px); }
  .chapter-period,.chapter-line { font-size:10px; }
  .chapter-number,.chapter-status { top:6px; padding:2px 4px; font-size:9px; }
  .chapter-number { left:6px; }
  .chapter-status { right:6px; }
  .chapter-status .icon { width:10px; height:10px; }
  .chapter-bottom { margin-top:5px; gap:4px; min-height:30px; }
  .chapter-bottom .stars { gap:1px; }
  .chapter-bottom .stars .icon { width:11px; height:11px; }
  .chapter-link,.lock-note { font-size:10px; }
  .chapter-link .icon { width:11px; height:11px; }
  .portrait-art { min-height:150px; }
  .portrait-art .sprite { --sprite-size:min(145px,100%); }
  .answer-grid { grid-template-columns:1fr; gap:7px; margin-top:13px; }
  .answer { min-height:44px; padding:7px; font-size:14px; }
  .answer-letter { width:24px; height:24px; }
  .result-card { padding-inline:14px; }
}
@media(prefers-reduced-motion:reduce) { .owned .sprite,.profile-art .sprite,.reward .sprite { animation:none; } }
[hidden] { display:none !important; }
.combat-layout { max-width:1080px; margin:0 auto; }
.combat-top { margin-bottom:4px; }
.combat-heading { display:flex; align-items:end; justify-content:space-between; gap:13px; margin:8px 0 13px; }
.combat-heading h1 { font-size:clamp(31px,4vw,48px); letter-spacing:.035em; color:#35271f; }
.combat-heading p { color:var(--muted); font-size:13px; margin:4px 0 0; }
.combat-count { flex:none; border:1px solid #e2d0b8; border-radius:5px; padding:3px 9px; background:#efe2d1; color:#794633; font-size:12px; font-weight:750; }
.combat-route { display:flex; gap:6px; margin:0 0 12px; padding:0; list-style:none; flex-wrap:wrap; }
.combat-route li { display:inline-flex; align-items:center; gap:5px; border:1px solid #e5d8c7; border-radius:5px; padding:4px 8px; background:#f9f1e5; color:#786a59; font-size:11px; }
.combat-route li span { font-variant-numeric:tabular-nums; color:#947e67; }
.combat-route .present { background:#9b3027; border-color:#9b3027; color:#fff5e6; font-weight:750; }
.combat-route .present span { color:#f3d1ba; }
.combat-route .complete { color:#3f624a; }
.combat-route .complete span { color:#597b5f; }
.combat-frame { overflow:hidden; border-radius:10px; border:1px solid #80634b; background:#382d25; box-shadow:0 5px 17px #3724121c; }
.combat-hud,.combat-objective { display:flex; align-items:center; justify-content:space-between; gap:9px; color:#f8eddd; padding:8px 12px; }
.combat-hud { border-bottom:1px solid #887055; }
.combat-hero { display:flex; gap:9px; align-items:baseline; color:#f8e2c4; }
.combat-hero strong { font:900 23px/1.15 var(--heading); }
.combat-hero span { font-size:11px; color:#debea0; }
.combat-hero .combat-mount { padding:1px 5px; border:1px solid #a78454; border-radius:3px; color:#ffe0a6; white-space:nowrap; }
.combat-health { position:relative; width:clamp(85px,26%,245px); height:20px; background:#211d17; border:1px solid #856747; border-radius:3px; margin-left:auto; text-align:center; overflow:hidden; }
.combat-health-fill { position:absolute; inset:0 auto 0 0; background:linear-gradient(90deg,#426e51,#729760); }
.combat-health-value { display:block; position:relative; color:#fff9e8; font-size:11px; font-weight:800; line-height:18px; text-shadow:0 1px 2px #161612; }
.combat-pause-button { border:1px solid #94795b; color:#f9e9d2; background:#4c3b2f; border-radius:4px; padding:3px 8px; font-size:12px; }
.combat-pause-button:hover { background:#5d4637; }
.combat-screen { position:relative; background:#2e2620; }
.combat-screen canvas { display:block; width:100%; height:auto; touch-action:pan-y; }
.combat-overlay { position:absolute; inset:0; z-index:1; display:grid; justify-items:center; align-content:center; gap:7px; background:#271c13bd; color:#fff1da; padding:12px; text-align:center; }
.combat-overlay strong { font:900 clamp(24px,4vw,45px)/1.1 var(--heading); }
.combat-overlay p { font-size:13px; }
.combat-overlay button { margin-top:5px; }
.combat-objective { min-height:40px; padding-block:5px; font-size:12px; font-weight:650; border-top:1px solid #725a45; }
.supply-button { background:#f6e0b6; border:1px solid #dfbc83; color:#64432c; border-radius:5px; padding:5px 8px; font-size:12px; font-weight:750; white-space:nowrap; }
.supply-button:hover { background:#fae9c9; }
.supply-button:disabled { opacity:.62; cursor:default; }
.combat-controls,.combat-controls-group { display:flex; gap:8px; }
.combat-controls { justify-content:space-between; align-items:end; padding-top:11px; }
.combat-dpad { display:grid; grid-template-areas:". up ." "left down right"; gap:4px; }
.combat-dpad [data-control="up"] { grid-area:up; }
.combat-dpad [data-control="left"] { grid-area:left; }
.combat-dpad [data-control="down"] { grid-area:down; }
.combat-dpad [data-control="right"] { grid-area:right; }
.combat-dpad .combat-input { min-width:65px; min-height:35px; gap:5px; padding:4px 7px; }
.combat-input { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-width:82px; min-height:52px; padding:7px 13px; border:1px solid #d5c2a8; border-radius:7px; background:#f4e8d7; color:#493629; font-weight:800; touch-action:none; user-select:none; -webkit-user-select:none; box-shadow:0 2px 0 #e5d6c3; }
.combat-input span { font-size:18px; }
.combat-input kbd { font:750 11px/1.15 var(--body); padding:3px 5px; border-radius:3px; border:1px solid currentColor; opacity:.78; }
.combat-input:hover,.combat-input.pressed { background:#ecdbc3; }
.combat-input.pressed { transform:translateY(1px); }
.combat-attack { background:#9b3027; color:#fff4e3; border-color:#79251e; box-shadow:0 2px 0 #76251e; }
.combat-attack:hover,.combat-attack.pressed { background:#79251e; }
.combat-hint { font-size:12px; color:var(--muted); margin-top:10px; }
.supply-modal { width:540px; max-width:min(540px,calc(100% - 24px)); }
.supply-heading { display:flex; gap:9px; align-items:center; font-size:12px; color:var(--muted); }
.supply-question { margin-top:11px; font:750 20px/1.4 var(--body); }
.supply-modal .answer-grid { margin-top:13px; }
@media(max-width:630px) {
  .combat-heading { margin:6px 0 8px; align-items:center; }
  .combat-heading h1 { font-size:30px; }
  .combat-heading p,.combat-objective,.supply-button { font-size:11px; }
  .combat-count { padding:2px 5px; font-size:10px; }
  .combat-route { gap:4px; margin-bottom:8px; }
  .combat-route li { gap:3px; padding:2px 5px; font-size:10px; }
  .combat-hud,.combat-objective { padding-inline:7px; }
  .combat-hud { padding-block:5px; }
  .combat-hero { gap:4px; }
  .combat-hero strong { font-size:18px; }
  .combat-hero span { font-size:9px; }
  .combat-screen canvas { aspect-ratio:960 / 430; }
  .combat-controls { padding-top:9px; }
  .combat-controls,.combat-controls-group { gap:5px; }
  .combat-input { min-width:58px; min-height:48px; padding:6px 7px; gap:5px; }
  .combat-input span { font-size:16px; }
  .combat-input kbd { font-size:9px; padding:2px 4px; }
  .combat-dpad .combat-input { min-width:43px; min-height:42px; padding:3px 5px; }
  .combat-dpad .combat-input kbd { display:none; }
  .combat-pause-button { font-size:11px; padding:3px 5px; white-space:nowrap; }
}
@media(max-height:580px) and (orientation:landscape) and (pointer:coarse) {
  .combat-screen canvas { height:51vh; width:auto; max-width:100%; margin:auto; }
}
@media(max-width:420px) {
  .combat-hero .combat-weapon { display:none; }
}
