*{box-sizing:border-box}body{margin:0;color:#f4efdf;background:#181a20;font-family:"Songti SC","Noto Serif CJK SC",serif}main{height:100svh;min-height:310px;position:relative;overflow:hidden;background:#181a20}#world{position:absolute;inset:0;overflow:hidden}#field{position:absolute;touch-action:none;image-rendering:pixelated}main:after{content:"";position:absolute;pointer-events:none;inset:0;background:linear-gradient(#111319d9 0%,transparent 19%,transparent 65%,#151519e5 100%)}header,footer,#squad{position:absolute;z-index:1}header,footer{display:flex;justify-content:space-between;align-items:flex-start;left:2.3%;right:2.3%;gap:12px;pointer-events:none}header{top:2.8%}footer{bottom:3%;align-items:flex-end}header>*,footer>*{pointer-events:auto}.brand,.wallet,nav,.row,.tabs,.controls,.actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.brand b{font-size:24px;background:#8b3e2a;border:1px solid #d8b68a;box-shadow:inset 0 0 0 2px #682d25;padding:3px 5px}.brand strong{font-size:23px;letter-spacing:3px}.brand small,small{display:block;color:#cbbb91;font-size:12px}.wallet{padding:7px 12px;background:#181a20eb;border:1px solid #79673c;font-size:13px}.wallet span+span{border-left:1px solid #514b39;padding-left:9px}button,select,input{font:inherit;color:inherit}button,select,input{background:#27292e;border:1px solid #66604b;padding:7px 10px;border-radius:2px}button{cursor:pointer}button:hover,button:focus-visible{background:#38382f;border-color:#f0b90b}button:disabled{opacity:.44;cursor:default}button.gold,.active{background:#f0b90b;color:#211d12;border-color:#ffdc6b;font-weight:bold}.title img{width:clamp(130px,15vw,220px);display:block;margin-top:7px}.title small{letter-spacing:3px}nav{justify-content:flex-end;background:#181a20ec;padding:6px;border:1px solid #8b7853}nav button{font-weight:bold;min-height:38px}#squad{top:13%;left:2.3%;display:grid;gap:4px;pointer-events:none}.unit{display:flex;gap:6px;align-items:center;padding:3px 6px;background:#181a20dd;border-left:2px solid #f0b90b;font-size:13px}.unit img{width:26px;height:34px;object-fit:contain}.unit small{font-size:10px}.unit progress{display:block;height:5px;width:62px;accent-color:#85c9a1}.controls{max-width:55vw;justify-content:center;gap:3px}.controls button{font-size:13px}.controls small{font-size:9px}.hudline{font-size:12px;text-shadow:1px 1px #000;margin:4px 0}dialog{width:min(780px,94vw);max-height:86svh;padding:0;background:#202226;color:#f3efdf;border:1px solid #af8b32;box-shadow:0 18px 90px #000b}dialog::backdrop{background:#101116ba}.bookhead{position:sticky;top:0;background:#1a1c21;z-index:1;border-bottom:1px solid #665938;padding:14px 18px;display:flex;align-items:center;justify-content:space-between}.bookhead h1{font-size:24px;letter-spacing:4px;margin:4px 0 0}#panel{padding:15px 18px 22px;line-height:1.55}h2{font-size:17px;margin:15px 0 7px}p{margin:7px 0;color:#d4d0c1}.row{justify-content:space-between;border-bottom:1px solid #44443d;padding:8px 0}.tabs{margin-bottom:10px}.roster{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.roster button{padding:4px;display:grid;justify-items:center}.roster img{height:70px;width:100%;object-fit:contain}.roster small{font-size:10px}.row strong{color:#f6d875}.hint{font-size:13px;color:#d4c7a7}.actions{padding:8px 0}.actions label{display:grid;font-size:12px;gap:2px}.actions input{max-width:145px}.scroll{max-height:310px;overflow:auto}#notice{position:fixed;left:50%;top:12%;transform:translateX(-50%);background:#171f1ef2;border:1px solid #c49b38;color:#fae5b6;z-index:9;padding:9px 16px;display:none}#book .msg{position:sticky;bottom:0;background:#433827;color:#ffe4a0;padding:7px}button[hidden],div[hidden]{display:none!important}@media(max-width:700px){.wallet{padding:4px;font-size:11px;gap:4px}.wallet span+span{padding-left:4px}header{top:12px}.brand strong{font-size:17px}.brand small{font-size:10px}.title img{width:120px}#squad{top:74px}.unit img{height:25px}.roster img{height:48px}footer{flex-wrap:wrap}.controls{max-width:96vw}.actions input{max-width:115px}nav{margin-left:auto}nav button{min-height:34px;padding:4px 8px}.bookhead,#panel{padding:10px}.roster{gap:3px}}@media(orientation:portrait){.title{width:100%}main:after{background:linear-gradient(#14161de6,transparent 26%,transparent 62%,#18191d 92%)}#world{bottom:9%}footer{bottom:2%}}@media(max-height:470px){#squad{top:50px;gap:2px}.unit{padding:1px 4px}.unit img{height:19px}.unit small{display:none}.title img{width:90px}footer{bottom:5px}.controls{max-width:58vw}.wallet{font-size:11px}}

[hidden]{display:none!important}

.pass-banner{display:block;width:100%;max-height:180px;object-fit:cover;border-radius:8px}.brand img{object-fit:contain;border-radius:50%}.wallet{flex-wrap:wrap}nav [data-tab=pass]{color:#ffe08a;border-color:#99761e}.title img{max-height:92px;object-fit:contain}#book progress{accent-color:#f0b90b}@media(max-width:650px){header .wallet{max-width:53vw;font-size:11px}footer nav{display:grid;grid-template-columns:repeat(4,1fr)}footer nav button{min-width:0}}
#presence{position:absolute;bottom:100%;right:0;padding:5px 9px;background:#191b20e8;color:#e0d6b7;border-radius:4px;font-size:12px;max-width:94vw}.preview{padding:14px 4px;border-bottom:1px solid #786543}.preview summary{cursor:pointer;color:#f4dda6}nav{flex-wrap:wrap}@media(max-width:650px){footer nav{width:100%}footer nav button{min-height:40px}}

.roster:has(button:nth-child(17)) {
  max-height: min(36vh, 320px);
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding: 1px 4px 3px 1px;
}

.roster button.active {
  background: #f0b90b;
  color: #211d12;
}

:root{--hud-gold:#f0b90b;--hud-ink:#181a20}
.brand img,.title img{filter:drop-shadow(0 2px 4px #100e0c)}
.brand strong,.bookhead h1{color:#ffe8ac}
.brand small,.bookhead small{letter-spacing:.08em;color:#dfbf72}
header{align-items:flex-start}
.wallet,nav,.unit,.controls,#region{box-shadow:0 3px 12px #10101555}
.wallet,nav,.controls,.tabs,.actions,button,input,select,#squad,#presence,#region{font-family:system-ui,"PingFang SC",sans-serif}
.wallet,nav,.controls{border-radius:5px}
.wallet button{color:#ffda64;font-weight:650}
nav button.gold,button.active,.roster button.active{background:var(--hud-gold);color:#231e10}
button:focus-visible,summary:focus-visible{outline:2px solid #ffe2a1;outline-offset:2px}
.bookhead{border-top:2px solid var(--hud-gold)}
.bookhead h1{letter-spacing:.12em}
dialog{border-radius:7px}
dialog::backdrop{backdrop-filter:blur(3px)}
.controls{background:#181a20e8;padding:5px;border:1px solid #756541}
#battle:has(.controls){margin-inline:auto}
.hudline{display:table;margin:0 auto 4px;background:#181a20d9;padding:5px 10px;color:#ffdf83;border-radius:3px}
#region{position:absolute;z-index:1;right:2.3%;top:clamp(75px,11%,120px);width:174px;border:1px solid #827044;background:#181a20e8;border-radius:4px;font-size:12px;overflow:hidden}
#region summary{cursor:pointer;padding:7px 10px;color:#ffe29c;font-weight:650}
#region:not([open]){width:auto}
#minimap{position:static;display:block;width:calc(100% - 14px);height:auto;margin:0 auto;border:1px solid #59523e}
#region .map-key{display:flex;gap:8px;padding:5px 8px 0;font-size:10px;color:#e8e0cc}
.map-key span:before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;margin-right:3px;background:#f0b90b}
.map-key span:nth-child(2):before{background:#80d1de}.map-key span:nth-child(3):before{background:#ff8069}
#region p{font-size:11px;padding:4px 8px 8px;margin:0}
@media(max-width:700px){#region{top:82px;width:151px}.unit{border-radius:2px}.wallet{justify-content:flex-end}.bookhead h1{font-size:21px}}
@media(max-height:470px){#region{top:50px;width:140px}}

#world{background:#181a20 url('/assets/jianghu/dispatch-preview.webp') center/cover no-repeat}
#scene-loading{position:absolute;z-index:1;left:50%;top:50%;transform:translate(-50%,-50%);padding:9px 14px;border:1px solid #aa8c46;border-radius:4px;background:#181a20ec;color:#ffe4a0;white-space:nowrap;font-size:14px}

/* In-game instrument panels */
:root{--brass:#9f8652;--seam:#514630;--panel:linear-gradient(155deg,#354055f5,#1d293eef 48%,#131c2ded);--paper:#f7e5bb}
body{background:#182638}main{height:100dvh}main:after{background:linear-gradient(180deg,#101a292b,transparent 14%,transparent 86%,#16213661)}#world{inset:0}
.frame,.wallet,.unit .vitals,.small-slots,.brand,.float-action,.detail,.map-crumb button{background:var(--panel);border:1px solid var(--brass);box-shadow:inset 0 0 0 2px #172234,inset 0 0 0 3px #6e6145,0 3px 7px #11182980;color:var(--paper);border-radius:5px}
header{inset:12px 14px auto;align-items:start}header .brand{flex:none;padding:6px 12px 6px 7px}header .brand img{width:38px;height:38px}.brand strong{font-size:19px}.brand small{font:11px system-ui}.fighting .brand{display:none}
.wallet{margin-left:auto;flex-wrap:nowrap;border-radius:18px;padding:4px 7px 4px 13px;font:12px system-ui;gap:8px}.wallet span{white-space:nowrap;color:#dfb660}.wallet span:first-child{color:#90cfcf}.wallet span:last-of-type{color:#d28c63}.wallet b{color:#fff0d3;font-variant-numeric:tabular-nums}.wallet button{border:0;border-radius:14px;padding:2px 8px;background:#55513c}
#region,#region:not([open]){right:14px;top:51px;width:205px;padding:6px;background:var(--panel);border:1px solid var(--brass);text-align:left}
#mini-toggle{display:none}#mini-open{display:block;width:100%;border:0;padding:0;background:none;text-align:inherit}
#objective{display:grid;grid-template-columns:1fr auto;gap:2px 6px;align-items:center;margin:1px 3px 5px;font-size:11px;color:#c8cfd9}#objective strong{color:#ffdf92}#objective small{font:9px system-ui;color:#c8c5b1;text-align:right}#objective b{font-size:10px;font-weight:500}
#minimap{width:100%;border-color:#7d7962}#region .map-key{justify-content:center;font:9px system-ui;gap:6px;padding:4px 0 0}.map-key i{font-style:normal}.map-key i:before{content:'●';margin-right:2px;color:#ffd064}.map-key i:nth-child(2):before{color:#79b7ff}.map-key i:nth-child(3):before{color:#ff8570}.map-key i:nth-child(4):before{color:#88efe5}
#squad{left:14px;top:14px;gap:4px}.unit{padding:0;border:0;background:none;box-shadow:none;gap:4px}.vitals{display:flex;gap:7px;align-items:center;padding:6px;font:11px system-ui;color:var(--paper)}.face{position:relative;align-self:stretch;width:58px;overflow:hidden;background:linear-gradient(125deg,#393448,#202c42);border:1px solid #a8946b;border-radius:2px}.face img,.unit .face img{width:100%;height:100%;position:absolute;object-fit:cover}.face b{position:absolute;left:0;top:0;padding:1px 3px;color:#ffe8a6;background:#1e253cda;font:bold italic 11px Georgia}
.meters{flex:1;min-width:0}.meters strong{display:block;line-height:1.15;margin-bottom:3px}.meter{position:relative;isolation:isolate;display:flex;justify-content:space-between;align-items:center;font:9px system-ui;height:12px;margin:2px 0 0;background:#111b2c;box-shadow:inset 0 0 0 1px #7a715544;color:white;text-shadow:0 1px 2px #000,0 0 2px #000;padding:0 3px;overflow:hidden}.meter i{position:absolute;z-index:-1;left:0;inset-block:1px;background:linear-gradient(#a4c279,#577f40)}.m1 i{background:linear-gradient(#63b9e8,#376ca4)}.m2 i{background:linear-gradient(#eed485,#aa873c)}.m3 i{background:linear-gradient(#cb9ce0,#885aa1)}.meter b{font-variant-numeric:tabular-nums}.unit .vitals{width:166px;gap:4px}.unit .face{width:42px}.unit .meter{height:8px;font-size:7px}
footer{left:14px;right:14px;bottom:12px;display:grid;grid-template-columns:minmax(160px,242px) minmax(0,1fr) auto;align-items:end;gap:8px}
#player{padding:4px}#battle{display:flex;gap:6px;justify-self:center;align-items:center;max-width:100%;padding:6px;min-width:0;overflow:auto;scrollbar-width:thin}
.slots,.supplies{display:grid;gap:3px;grid-template-columns:repeat(var(--cols),var(--slot,42px))}.small-slots{--slot:27px;padding:4px;max-width:34vw;overflow:auto}.supplies{--cols:2;border-left:1px solid #76664a;padding-left:6px}
.slot,#nav button,.extra-menu button{position:relative;background:linear-gradient(145deg,#37435a,#1d293c);border:1px solid #756c55;color:#ecdec1;border-radius:2px;text-align:center;box-shadow:inset 0 0 0 1px #121b2f;padding:0}
.slot{display:grid;place-items:center;aspect-ratio:1;border-color:color-mix(in srgb,var(--tint) 66%,#344057);background:radial-gradient(at 36% 30%,color-mix(in srgb,var(--tint) 32%,#2a354c),#172133 85%);overflow:hidden}.slot svg,.slot img{width:72%;height:72%;object-fit:contain;filter:drop-shadow(1px 2px 1px #101421)}.slot kbd,.slot em{position:absolute;right:2px;bottom:0;color:white;font:bold 10px monospace;text-shadow:0 1px 2px black}.slot em{bottom:auto;top:1px;left:2px;right:auto;color:#ffdf87}.cool{position:absolute;inset:0;display:grid;place-items:center;background:#0e1728b8;color:white;font:bold 15px Georgia}
#nav,.extra-menu{display:grid;grid-template-columns:repeat(4,44px);gap:3px;padding:6px;margin:0;width:auto}#nav button,.extra-menu button{height:43px;min-height:0;font:10px system-ui;display:grid;align-content:center;justify-items:center;gap:1px}#nav svg,.extra-menu svg{width:20px;height:20px}#nav sup{position:absolute;right:-1px;top:-3px;background:#a93d3b;color:white;padding:0 3px;border-radius:7px}
#floatbar{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:4px;pointer-events:none}#floatbar:empty{display:none}#floatbar button,#floatbar small,#presence{background:#192638ed;border:1px solid #91805b;color:#f0ddb0;border-radius:3px;padding:4px 8px;font:11px system-ui}#floatbar button{pointer-events:auto;margin-right:2px}#floatbar small{max-width:44%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#presence{z-index:1;left:16px;bottom:112px;right:auto}
#book[data-view=map]{width:min(1150px,96vw);background:linear-gradient(125deg,#283549,#192434);border:2px ridge #a78e54}#book[data-view=map] .bookhead{background:#1d293b;padding:9px 18px;border-top:none}#book[data-view=map] .bookhead small{font:10px system-ui;letter-spacing:2px}.bookhead h1{font-size:21px}
.extra-menu{grid-template-columns:repeat(4,1fr)}
@media(max-width:740px){
 header{inset:6px 6px auto}.wallet{max-width:100%!important;padding:3px 6px;gap:3px;font-size:10px}header .brand{flex:0 1 auto;padding:3px 5px}header .brand strong{font-size:15px}
 #region,#region:not([open]){top:36px;right:6px;width:128px;padding:4px}#mini-toggle{display:block;width:100%;padding:1px;border:0;background:none;font-size:10px;text-align:right;color:#edcf89}#mini-toggle:after{content:' −'}#region.collapsed #mini-toggle:after{content:' ＋'}#region.collapsed #mini-open{display:none}#objective{display:block;text-align:right;margin:0 1px 2px}#objective strong{display:none}#objective small{font-size:8px}#region .map-key{font-size:8px;gap:3px}
 #squad{left:5px;top:6px;gap:2px}.unit{gap:2px}.unit .vitals{width:99px;gap:3px;padding:4px}.unit .face{width:29px}.unit .face b{font-size:8px}.unit .meter{font-size:0;height:3px;margin-top:2px}.unit .meters strong{font-size:10px}.small-slots{--slot:18px;gap:1px;padding:2px;max-width:calc(100vw - 255px)}.small-slots .cool{font-size:9px}
 footer{inset:auto 5px max(4px,env(safe-area-inset-bottom));grid-template-columns:minmax(90px,1fr) minmax(0,2.2fr);gap:3px}#player{padding:2px}.vitals{padding:3px;gap:3px}#player .face{width:30px}#player .face b{font-size:8px}.meter{height:9px;font-size:7px}.meter span{display:none}
 #battle{width:100%;justify-content:space-between;gap:3px;padding:4px}.main-slots{--slot:clamp(24px,7.5vw,36px);max-width:calc(100% - 62px);overflow:auto;gap:2px}.supplies{--slot:26px;gap:2px;padding-left:3px}
 #nav{grid-column:1/-1;grid-template-columns:repeat(8,minmax(0,1fr));width:100%;gap:2px;padding:3px}#nav button{height:34px;font-size:9px}#nav svg{height:15px;width:15px}#floatbar button,#floatbar small{font-size:9px;padding:4px}#floatbar small{max-width:36%}#presence{bottom:117px;left:6px;font-size:9px}
 .slot kbd,.slot em{font-size:8px}
}
@media (min-width:741px) and (max-width:1030px){footer{grid-template-columns:180px minmax(0,1fr) auto}.main-slots{--slot:34px;overflow:auto}.supplies{--slot:34px}#nav{grid-template-columns:repeat(4,35px)}}
@media(max-width:740px){
 footer{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"float float" "lead menu" "skills menu";align-items:stretch}
 #floatbar{grid-area:float}#player{grid-area:lead}#battle{grid-area:skills;justify-self:stretch}
 #nav{grid-area:menu;grid-template-columns:repeat(4,clamp(27px,8vw,40px));align-content:center}
 #nav button{height:clamp(30px,9vw,42px);font-size:9px}#nav svg{width:18px;height:18px}
 #player .vitals{align-items:center;height:100%}#player .face{width:38px;min-height:37px}
 #player .meters{display:grid;grid-template-columns:1fr 1fr;gap:2px 4px}#player .meters strong{grid-column:1/-1}#player .meter{margin:0}
 #player .meter span{display:inline}#battle{--slot:26px}.main-slots{--slot:clamp(24px,7.5vw,34px)}
 #presence{bottom:138px}
}
.slot .engraving{width:87%;height:87%;image-rendering:pixelated;filter:drop-shadow(0 1px 2px #090f1a)}
.small-slots{pointer-events:auto;scrollbar-width:thin}
@media(max-width:740px){#objective strong{display:block;font-size:9px}}
.map-key i{white-space:nowrap}#mini-open .map-key{flex-wrap:nowrap}
@media(max-width:740px){#mini-open .map-key i:last-child{display:none}#mini-open .map-key{font-size:8px}}
.wallet .coin,.wallet .asset-token{display:inline-block;vertical-align:-1px;width:12px;height:12px;border-radius:50%;background:radial-gradient(at 32% 23%,#ffef9b,#c99c3a 74%);border:1px solid #a97f31;box-shadow:inset 0 0 0 1px #fbde78,1px 1px 0 #614d32}
.wallet .coin:after{content:'◆';display:block;text-align:center;font:7px/10px serif;color:#977133}.wallet .coin.copper{filter:hue-rotate(-18deg) saturate(.8)}.wallet .asset-token{width:10px;height:10px;border-radius:2px;transform:rotate(45deg);border-color:#67a8b2;background:linear-gradient(135deg,#c8f1e1,#379ca7);box-shadow:inset 0 0 0 1px #79bab5}

#action-combo{position:fixed;pointer-events:none;top:23%;left:50%;transform:translateX(-50%) skew(-8deg);color:#ffdd83;font:bold italic clamp(20px,3vw,40px) Georgia,serif;letter-spacing:.06em;text-shadow:2px 2px #6b2913,-1px -1px #331c14,0 3px 7px #18100e;white-space:nowrap}

.circuit{display:grid;grid-template-columns:repeat(auto-fit,minmax(215px,1fr));gap:8px;margin:8px 0}
.circuit fieldset{border:1px solid #5c5744;padding:8px 10px;background:#1b1d22;min-width:0;margin:0}
.circuit legend{color:#f0c66b;font-size:12px;letter-spacing:1px;padding:0 5px}
.circuit label{display:grid;gap:3px;font-size:12px;margin:6px 0;color:#d9d2bd}
.circuit label.check{display:flex;align-items:center;gap:7px;font-size:12px}
.circuit label.check input{width:auto;padding:0}
.circuit input[type=number],.circuit select{max-width:100%;width:100%}
.circuit small{margin-top:4px}
@media(max-width:700px){.circuit{grid-template-columns:1fr 1fr}.circuit fieldset{padding:6px 7px}.circuit label{font-size:11px}}


#tutorial{width:min(720px,94vw);max-height:88svh;padding:0}
.tut-body{padding:0 20px 18px;line-height:1.65;max-height:calc(88svh - 72px);overflow:auto}
.tut-body h2{font-size:16px;margin:16px 0 6px;color:#f3d98d}
.tut-body p{font-size:14px}
.tut-keys{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.tut-keys span{background:#1b1d22;border:1px solid #4f4a3c;padding:7px 9px;font-size:13px;color:#e7dfc8}
.tut-body kbd{display:inline-block;min-width:18px;padding:0 5px;margin:0 1px;border:1px solid #7b6a44;border-bottom-width:2px;border-radius:3px;background:#2a2b2d;color:#ffe6a4;font:12px/18px system-ui;text-align:center}
.tut-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;margin-top:12px;position:sticky;bottom:-2px;background:#202226;padding:10px 0 4px;border-top:1px solid #3e3b30}
.tut-actions button{padding:9px 26px;font-weight:bold}
@media(max-width:700px){.tut-keys{grid-template-columns:1fr}.tut-body{padding:0 12px 14px}}


/* The ferry's departure board keeps destination selection visible at phone sizes. */
#town-expedition,
#book[data-view=map] {
  --voyage-ground: #11272b;
  --voyage-card: #1b3437;
  --voyage-line: #4d706b;
  --voyage-text: #f1eedb;
  --voyage-muted: #bfd3cb;
  --voyage-accent: #f4d38d;
  font-family: system-ui, "PingFang SC", sans-serif;
  color: var(--voyage-text);
}

#town-expedition {
  grid-column: 2;
  justify-self: center;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 26px;
  width: min(100%, 530px);
  padding: 12px 15px;
  border: 1px solid var(--voyage-line);
  border-radius: 9px;
  background: linear-gradient(105deg, #17373af5, #122629f5);
  box-shadow: 0 5px 24px #0b17198c;
}

#town-expedition strong,
#town-expedition small {
  display: block;
}
#town-expedition small {
  margin-top: 3px;
  color: var(--voyage-muted);
}
#town-expedition button,
.voyage-recommend button,
.voyage-start [data-act=launch] {
  min-height: 42px;
  font-weight: 700;
}
#town-expedition button + button { margin-inline-start: 6px; }
#town-expedition [data-act=worldMap],
.voyage-recommend button,
.voyage-start [data-act=launch] {
  border: 1px solid var(--voyage-accent);
  background: var(--voyage-accent);
  color: #242719;
}
#nav button[data-tab=map] { color: #f7dc95; border-color: #bd9a57; }

#book[data-view=map] {
  width: min(1000px, calc(100vw - 22px));
  max-height: min(91dvh, 800px);
  border: 1px solid var(--voyage-line);
  border-radius: 12px;
  background: var(--voyage-ground);
}
#book[data-view=map] .bookhead {
  border-bottom: 1px solid var(--voyage-line);
  background: var(--voyage-ground);
}
#book[data-view=map] .bookhead h1 {
  color: var(--voyage-text);
  letter-spacing: .07em;
}
#book[data-view=map] #panel {
  max-height: calc(min(91dvh, 800px) - 63px);
  padding: 16px 18px 20px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}

.voyage-recommend,
.voyage-destination {
  background: linear-gradient(115deg, #284847, var(--voyage-card));
  border-radius: 8px;
  padding: 14px;
}
.voyage-recommend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--voyage-line);
}
.voyage-recommend strong,
.voyage-recommend small,
.voyage-recommend span { display: block; }
.voyage-recommend strong { font-size: clamp(18px, 3vw, 25px); margin: 4px 0; }
.voyage-recommend small,
.voyage-recommend span,
.voyage-detail small,
.voyage-detail p { color: var(--voyage-muted); }
.voyage-subtitle { margin: 17px 0 9px; font-size: 15px; }
.voyage-map-banner { height: 190px; margin: 10px 0 14px; border: 1px solid var(--voyage-line); background-size: cover; background-position: center; image-rendering: pixelated; box-shadow: inset 0 0 40px #081113cc; }
.voyage-map-banner.region { height: 150px; }
.voyage-chapters,
.voyage-stops { display: grid; gap: 7px; }
.voyage-chapters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.voyage-stops { grid-template-columns: minmax(0, 1fr); }
.voyage-region {
  display: grid;
  grid-template-columns: minmax(210px, .8fr) minmax(0, 1.5fr);
  gap: 14px;
  align-items: start;
}
.voyage-chapter,
.voyage-stop {
  display: flex;
  min-width: 0;
  min-height: 56px;
  margin: 0;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 1px solid var(--voyage-line);
  border-radius: 6px;
  text-align: left;
  background: var(--voyage-card);
}
.voyage-chapter small,
.voyage-stop small { display: block; color: var(--voyage-muted); font-size: 11px; }
.voyage-chapter strong,
.voyage-stop strong { display: block; margin: 3px 0; color: var(--voyage-text); }
.voyage-index {
  flex: none;
  min-width: 23px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: #a6c7bd;
}
.voyage-stop[aria-pressed=true] {
  background: #345650;
  border-color: var(--voyage-accent);
}
.voyage-stop[aria-pressed=true] .voyage-index { color: var(--voyage-accent); }

#book[data-view=map] .map-crumb {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 10px;
}
#book[data-view=map] .map-crumb button { margin: 0; min-height: 36px; }
.voyage-detail {
  padding: 9px;
  border: 1px solid var(--voyage-line);
  border-radius: 8px;
  background: #142d30;
}
.voyage-destination h2 { margin: 3px 0 6px; font-size: 22px; }
.voyage-destination p { margin: 0; font-size: 13px; }
.voyage-start {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 7px 12px;
  margin-top: 7px;
}
.voyage-start label { margin: 0; font-size: 13px; }
.voyage-start select { margin-inline-start: 6px; }
.voyage-control { justify-self: end; }
.voyage-start [data-act=launch],
.voyage-start small,
.voyage-start .msg { grid-column: 1 / -1; }
.voyage-start [data-act=launch] { margin: 0; }
.voyage-start [data-act=launch]:disabled {
  background: #243b3b;
  color: var(--voyage-muted);
  border-color: var(--voyage-line);
}
.voyage-start small[role=status] { color: var(--voyage-accent); }
.voyage-detail details {
  padding: 8px 0;
  border-top: 1px solid var(--voyage-line);
  font-size: 13px;
}
.voyage-detail details:first-of-type { margin-top: 12px; }
.voyage-detail summary { cursor: pointer; }
.voyage-detail select { max-width: 100%; }
.voyage-detail .secondary { display: flex; gap: 7px; }
.voyage-detail .secondary button { flex: 1; }
.receipt-next { margin: 12px 0; }

@media (max-width: 740px) {
  body:not(.fighting) footer {
    grid-template-areas: "depart depart" "lead menu";
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }
  #town-expedition { grid-area: depart; width: 100%; gap: 6px; padding: 7px 9px; }
  #town-expedition strong { font-size: 13px; }
  #town-expedition small { font-size: 10px; }
  #town-expedition button { min-height: 36px; margin: 0; padding: 4px 7px; font-size: 11px; }
  body:not(.fighting) #presence { bottom: 150px; }
  #book[data-view=map] #panel { padding: 11px 9px 14px; }
  .voyage-chapters,
  .voyage-stops { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .voyage-region { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .voyage-chapter,
  .voyage-stop { min-height: 49px; padding: 5px; gap: 5px; font-size: 13px; }
  .voyage-chapter small,
  .voyage-stop small { font-size: 10px; }
  .voyage-recommend,
  .voyage-destination { padding: 9px; }
  .voyage-recommend button { min-height: 38px; }
}
