:root{color-scheme:light;--paper:#f6ecd8;--ink:#35281c;--gold:#d99738;--rust:#9c452a;--line:#d9c6a5;font-family:system-ui,-apple-system,sans-serif;color:var(--ink);background:var(--paper)}*{box-sizing:border-box}body{margin:0}button,select{font:inherit;color:inherit;min-height:44px;cursor:pointer}button{border:0}button:focus-visible,select:focus-visible{outline:3px solid #098387;outline-offset:3px}button:disabled{cursor:default;opacity:.55}[hidden]{display:none!important}header{height:76px;display:flex;align-items:center;gap:24px;padding:0 3.3%;border-bottom:1px solid var(--line);background:var(--paper)}.brand{color:inherit;text-decoration:none;font-weight:850;letter-spacing:2px;font-size:20px}.brand span{color:var(--rust)}.edition{font-size:10px;letter-spacing:2px;flex:1}nav{display:flex;gap:9px;align-items:center}nav button,nav select,.hud button{background:transparent;border:1px solid var(--line);border-radius:50%;width:44px;font-size:23px}nav select{width:60px;border-radius:8px;font-size:12px;padding:0 7px}#sound[aria-pressed=true]{background:var(--rust);color:#fff4df}main{max-width:1920px;margin:auto}h1,h2{font-family:Georgia,serif}h2{font-size:clamp(28px,4vw,50px);font-weight:500;margin:12px 0 24px}.eyebrow{font-size:11px;letter-spacing:2.5px;font-weight:750;color:var(--rust)}.home{min-height:calc(100svh - 76px);position:relative;display:flex;align-items:center;background:linear-gradient(90deg,#f7e5bded 0%,#f7e5bdbb 24%,#f7e5bd00 55%),url('./art/village-landscape-v3.png') center/cover;overflow:hidden}.home-copy{padding:4% 7%;position:relative;z-index:1}h1{font-size:clamp(66px,8vw,125px);font-weight:500;line-height:.94;letter-spacing:-5px;margin:28px 0;color:#472b19;text-shadow:0 2px #fff2d5}h1 strong{font-weight:800}h1 span{display:block;font-size:27px;margin-top:22px;color:var(--rust)}.subtitle{font-family:Georgia,serif;font-size:clamp(20px,2vw,28px);margin:24px 0}.primary,.outline{padding:16px 25px;border-radius:7px;font-weight:650;transition:transform .15s,background .15s}.primary{background:var(--rust);color:#fff4df;box-shadow:0 4px 0 #61351f}.primary:hover{background:#80341e;transform:translateY(-1px)}.outline{border:1px solid var(--line);background:#fff8e8a0}.fine{font-size:12px;max-width:250px;line-height:1.7;margin-top:25px}.home-stamp{position:absolute;bottom:38px;right:40px;border:1px solid #ffeac3;border-radius:50%;width:105px;height:105px;padding:23px 8px;text-align:center;color:#fff1cd;letter-spacing:2px;font-size:9px;background:#56351e77;transform:rotate(-12deg)}.home-stamp b{line-height:2;font-size:13px}.map{padding:38px 4% 28px;min-height:calc(100svh - 76px);background:radial-gradient(ellipse at 80% 90%,#ddc59588,transparent 60%)}.map-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.villages{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;counter-reset:chapter}.village-card{position:relative;background:#fff7e6;border:1px solid #dfcaa2;border-radius:12px;overflow:hidden;box-shadow:0 12px 30px #5b3b1912}.village-card img{width:100%;height:clamp(210px,31vh,360px);object-fit:cover;display:block}.card-copy{padding:24px}.card-copy h3{font:30px Georgia,serif;margin:12px 0}.card-copy p{font-size:13px;line-height:1.6;margin:12px 0 22px;min-height:40px}.card-copy .primary{width:100%;font-size:13px}.chapter{position:absolute;top:16px;left:16px;background:#fff2d5ed;padding:9px 13px;border-radius:4px;font-size:10px;font-weight:800;letter-spacing:2px}.card-status{font-size:11px;color:#766249;letter-spacing:1px}.map-footer{display:flex;justify-content:space-between;align-items:center;font-size:12px;margin-top:26px;color:#7a694f}.text-button{background:transparent;text-decoration:underline;font-size:12px}.game{background:#30291f}.hud{height:62px;padding:8px 3%;display:flex;align-items:center;justify-content:space-between;color:#ffedc6;background:#30291f;font-size:14px}.hud small{display:block;font-size:10px;letter-spacing:1px;opacity:.7;margin-top:4px}.hud-right{display:flex;align-items:center;gap:22px}#lives{color:#f3a76b;letter-spacing:4px}#score{font-variant-numeric:tabular-nums}.hud button{border-color:#766249;color:#ffe4b7;font-size:19px}.stage{position:relative;height:calc(100svh - 176px);min-height:350px;overflow:hidden;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}canvas{display:block;width:100%;height:100%;outline:none;touch-action:none}.hint{margin:0;padding:12px;text-align:center;font-size:11px;color:#d5bf9e;height:38px}.boss-bar{position:absolute;top:12px;left:35%;width:30%;color:#fff6e4;font-size:12px;text-shadow:0 1px 3px #000;text-align:center}progress{display:block;width:100%;height:7px;margin-top:5px;accent-color:#bd3b24}.notice{position:absolute;top:20%;left:15%;right:15%;text-align:center;font:28px Georgia,serif;color:#fff1d1;text-shadow:0 2px 6px #231b15;pointer-events:none}.touch-controls{position:absolute;inset:auto 20px 16px;display:flex;justify-content:space-between;align-items:flex-end;pointer-events:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.touch-controls>*{pointer-events:auto}#joystick{display:none;width:126px;height:126px;border:2px solid #ffedc48c;border-radius:50%;position:relative;background:#3d33244d;touch-action:none;backdrop-filter:blur(3px)}#stick{position:absolute;width:53%;height:53%;left:23.5%;top:23.5%;border:2px solid #fff2d0;border-radius:50%;background:linear-gradient(#f3e1bd,#a18a67);box-shadow:0 4px 12px #39200b66;z-index:1}#joystick i{position:absolute;inset:0;display:grid;place-items:center;font-style:normal;font-size:110px;color:#ffeccb44}.touch-actions{display:flex;align-items:flex-end;gap:16px}.touch-actions button{border:2px solid #ffe7b7aa;border-radius:50%;width:55px;height:55px;color:#fff5dd;background:#784228d9;box-shadow:0 4px 0 #43291366;font-size:30px;touch-action:none}.touch-actions small{font:12px system-ui}.fire-group{display:flex;gap:8px}.fire.center{background:#306878df;width:64px;height:64px}.touch .stage{height:calc(100svh - 138px)}.touch #joystick{display:block}.touch .hint{display:none}.veil{position:fixed;inset:0;display:grid;place-items:center;background:#201b15aa;backdrop-filter:blur(7px);z-index:10;padding:20px}.paper{background:var(--paper);padding:38px;border:1px solid #dfc798;box-shadow:0 24px 90px #120e1755;border-radius:13px;max-width:480px;width:100%;text-align:center}.paper h2{font-size:36px;margin:14px 0}.paper p{font-size:14px;line-height:1.6}.paper button{display:block;width:100%;margin-top:16px}.seal{font-size:44px;color:var(--rust)}:fullscreen{background:var(--paper);max-width:none;width:100%}:fullscreen .stage{height:calc(100svh - 100px)}:fullscreen .touch .stage{height:calc(100svh - 62px)}body.immersive header{display:none}body.immersive main{position:fixed;inset:0;z-index:3;overflow:auto}body.immersive .stage{height:calc(100svh - 100px)}@media(max-width:700px){header{height:62px;padding:0 16px;gap:10px}.edition{display:none}.brand{flex:1;font-size:16px}nav{gap:6px}.home{min-height:calc(100svh - 62px);background-image:linear-gradient(0deg,#f7e5bdf5 0%,#f7e5bdc9 38%,#f7e5bd00 85%),url('./art/village-portrait-v3.png');align-items:flex-end}.home-copy{padding:30px 8% 45px}h1{font-size:76px}.home-stamp{right:20px;top:22px;width:85px;height:85px;padding:15px 5px}.map{padding:20px}.map-heading{align-items:flex-start}.map-heading h2{font-size:30px;max-width:220px}.villages{grid-template-columns:1fr}.village-card img{height:210px}.card-copy{padding:20px}.map-footer{gap:15px;align-items:flex-start}.hud{height:56px;font-size:12px;padding:6px 14px}.hud-right{gap:10px}#lives{letter-spacing:1px}.touch .stage,.stage{height:calc(100svh - 118px);min-height:250px}.touch-controls{inset:auto 12px max(14px,env(safe-area-inset-bottom))}.touch-actions{gap:8px;flex-direction:column;align-items:flex-end}.touch-actions button{width:48px;height:48px}.fire.center{width:55px;height:55px}.fire-group{gap:6px}#joystick{width:116px;height:116px}.boss-bar{left:25%;width:50%}.paper{padding:28px}.paper h2{font-size:30px}.hint{display:none}}@media(max-height:520px) and (orientation:landscape){header{height:48px}.hud{height:48px}.stage,.touch .stage{height:calc(100svh - 96px);min-height:180px}#joystick{width:90px;height:90px}.touch-actions{flex-direction:row}.hint{display:none}.home{min-height:calc(100svh - 48px)}.home-copy{padding:16px 6%}h1{font-size:55px;margin:12px 0}.subtitle{margin:10px 0}.fine,h1 span{display:none}.paper{padding:18px}.paper .seal{font-size:25px}.paper h2{margin:8px 0;font-size:28px}.paper button{padding:12px}.map{padding:16px 4%}.villages{grid-template-columns:repeat(3,minmax(0,1fr))}.village-card img{height:130px}.card-copy{padding:15px}.card-copy h3{font-size:23px}}

.fire.pressed{transform:translateY(3px);filter:brightness(1.2)}

.card-copy p{white-space:pre-line}.paper h2{text-wrap:balance}

/* One viewport budget for windowed, native fullscreen and iPhone fallback. */
body{--header-height:76px;--hud-height:62px;--hint-height:38px;padding-top:env(safe-area-inset-top)}
body.touch{--hint-height:0px}
.stage,.touch .stage,:fullscreen .stage,:fullscreen .touch .stage,body.immersive .stage{height:calc(100svh - var(--header-height) - var(--hud-height) - var(--hint-height) - env(safe-area-inset-top))}
body.immersive{--header-height:0px}body.immersive main{top:env(safe-area-inset-top)}
@media(max-width:700px){body{--header-height:62px;--hud-height:56px;--hint-height:0px}}
@media(max-height:520px) and (orientation:landscape){body{--header-height:48px;--hud-height:48px;--hint-height:0px}}

/* Five consecutive stages, retaining the Premium paper and western palette. */
.villages{grid-template-columns:repeat(3,minmax(0,1fr))}.village-card.ride-card{background:#f1e5cb}.route-preview{object-fit:cover;object-position:center 45%;height:220px!important}#campaign-status{margin:0 0 20px}#wanted-face{width:160px;height:120px;object-fit:cover;border-radius:50%;background:#e7c78e;margin:0 auto 8px}#dialog-detail{white-space:pre-line}
@media(max-width:900px){.villages{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.villages{grid-template-columns:1fr}}

.veil{overflow-y:auto}.paper{max-height:calc(100svh - 32px);overflow:auto}#wanted-face{flex-shrink:0}@media(max-height:520px){#wanted-face{width:100px;height:75px}.paper p{margin:8px 0}}

/* Frontier map and wanted-poster entrance, Premium 6. */
.frontier-layout{display:grid;grid-template-columns:minmax(240px,480px) minmax(220px,380px);gap:32px;justify-content:center;align-items:center}.frontier-map{position:relative;max-height:72svh;aspect-ratio:2/3;justify-self:center;width:100%;max-width:48svh;border-radius:20px;overflow:hidden;box-shadow:0 10px 32px #53321433}.frontier-map>img{width:100%;height:100%;object-fit:cover}.frontier-nodes{position:absolute;inset:0}.map-node{position:absolute;transform:translate(-50%,-50%);padding:10px 12px;border-radius:8px;background:#fff3d7;color:#442719;box-shadow:0 3px 12px #30201566;font-weight:800;white-space:nowrap;min-height:44px}.map-node[aria-current=step]{outline:3px solid #a44926;outline-offset:3px}.map-node:disabled{opacity:.85;background:#e4d7bd}.mission-brief{padding:28px;background:#fff5df;border:1px solid var(--line);border-radius:12px}.mission-brief h3{font:30px Georgia,serif;margin:12px 0}.mission-brief p{line-height:1.65;white-space:pre-line}.mission-brief .primary{width:100%}#wanted-name{font:800 27px Georgia,serif;margin:4px 0}#wanted-face{border-radius:0;background:none;width:200px;height:150px}#dialog-title{margin:10px 0}.home .fine{max-width:360px}button,canvas,#touch-controls{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:none}
html[data-device=mobile] body.native .game{width:100%!important;height:auto!important}.native #language{display:none}.native .edition{font-size:9px}
@media(max-width:700px){.frontier-layout{grid-template-columns:1fr;gap:18px}.frontier-map{max-height:none;max-width:350px}.mission-brief{padding:20px}.map-heading h2{font-size:27px}.map-node{font-size:12px}.map{padding:20px 5%}.map-heading{gap:12px}}

.native #map{height:calc(100svh - var(--header-height));overflow-y:auto;-webkit-overflow-scrolling:touch}.native header{position:relative}.native .home{min-height:calc(100svh - var(--header-height))}
@media(min-width:701px){.frontier-map{max-height:58svh;max-width:38.666svh}.map-heading{margin-bottom:8px}.map-heading h2{margin-bottom:10px}}
@media(max-width:700px){.mission-brief{grid-row:1;padding:16px}.mission-brief p{margin:6px 0;font-size:13px}.mission-brief h3{font-size:25px;margin:6px 0}.mission-brief .primary{padding:12px 18px;margin-top:10px}.map-heading{margin-bottom:4px}.map-heading h2{margin-bottom:10px}#campaign-status{margin-bottom:12px}.paper{padding:18px}.paper .seal{font-size:24px;margin:0}.paper .eyebrow{margin:8px 0}.paper h2{font-size:28px;margin:8px 0}.paper p{font-size:13px;line-height:1.5;margin:10px 0}#wanted-face{width:160px;height:120px}#wanted-name{font-size:23px}.paper .primary,.paper .outline{padding:12px 18px}}

body.in-game{touch-action:none}body.in-game .veil{touch-action:pan-y}

#defeat-face{display:block;width:clamp(130px,24vw,230px);height:min(28svh,250px);object-fit:contain;margin:0 auto 10px;filter:drop-shadow(0 5px 7px #75451b22)}
