:root {
  --paper: #f3eee3;
  --card: #fffdf8;
  --ink: #26231e;
  --muted: #6d675c;
  --line: #d9d1c1;
  --accent: #1f3550;
  --accent-ink: #fffdf8;
  --ok: #2f7d4f;
  --danger: #a63d32;
  --water: #b9d0d9;
  --sea: #c9dce3;
  --sea-line: #93b2bd;
  --land: #ece4d1;
  --land-line: #8b7f68;
  --offboard: #d8d1c2;
  --offboard-line: #cbc3b2;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  --radius: 12px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--paper); color: var(--ink); font: 15px/1.6 var(--sans); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
input { font: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.3; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
h2 small, h3 small { font-weight: normal; color: var(--muted); font-size: 13px; margin-left: 6px; }
.note { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.muted { color: var(--muted); }
.kicker { font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.row { display: flex; gap: 8px; }
.row.wrap { flex-wrap: wrap; }

/* ---- ボタン ---- */
.btn { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 10px 16px; min-height: 44px; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.primary:disabled { opacity: .45; }
.btn.big { width: 100%; min-height: 52px; font-size: 16px; }
.btn.small { min-height: 34px; padding: 5px 12px; font-size: 13px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); padding-inline: 8px; }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.btn.done { background: color-mix(in srgb, var(--ok) 12%, var(--card)); border-color: var(--ok); color: var(--ok); font-weight: 600; }
.iconbtn { border: 0; background: transparent; width: 44px; height: 44px; border-radius: 10px; font-size: 20px; display: grid; place-items: center; }
.dots, .dots::before, .dots::after { width: 4px; height: 4px; border-radius: 2px; background: var(--ink); display: block; position: relative; }
.dots::before, .dots::after { content: ""; position: absolute; }
.dots::before { top: -7px; } .dots::after { top: 7px; }
.badge { display: inline-block; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 2px 10px; font-size: 12px; }
.badge.small { padding: 0 7px; font-size: 11px; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); }
.seg button { flex: 1; border: 0; background: transparent; padding: 10px 8px; min-height: 44px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.seg.small { flex-wrap: wrap; margin-top: 8px; }
.seg.small button { min-height: 36px; padding: 4px 6px; font-size: 13px; flex: 1 0 13%; }
.seg button:disabled { opacity: .5; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.card + .card { margin-top: 10px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.count { color: var(--muted); font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 4px; background: #c4bcab; display: inline-block; flex: none; }
.dot.on { background: var(--ok); }
.pchip { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.pchip::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--pc); }
.waiting { color: var(--muted); text-align: center; margin: 12px 0; }
.notice { background: #fff6dc; border: 1px solid #e8d49a; border-radius: 10px; padding: 8px 12px; font-size: 14px; margin-bottom: 10px; }
.qr svg { width: 100%; height: auto; display: block; background: #fff; border-radius: 8px; }
.url { font-size: 12px; color: var(--muted); word-break: break-all; margin: 6px 0 0; }

/* ---- トースト・接続 ---- */
#toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; opacity: 0; transition: .25s; pointer-events: none; z-index: 50; max-width: 90vw; font-size: 14px; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#conn { position: fixed; top: 0; left: 0; right: 0; background: var(--danger); color: #fff; text-align: center; font-size: 13px; padding: 4px; transform: translateY(-100%); transition: .2s; z-index: 60; }
#conn.show { transform: none; }

/* ---- ホーム・参加受付 ---- */
.home, .lobby { max-width: 560px; margin: 0 auto; padding: calc(24px + env(safe-area-inset-top)) 16px 40px; display: flex; flex-direction: column; gap: 14px; }
.brand { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.brand-mark { width: 52px; height: 52px; border-radius: 14px; background: var(--accent) url(/icon.svg) center/cover; flex: none; }
.brand h1 { font-family: var(--serif); font-size: 30px; letter-spacing: .04em; }
.brand h1 small { display: block; font-family: var(--sans); font-size: 13px; color: var(--muted); letter-spacing: .1em; font-weight: normal; }
.lead { margin: 0; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; color: var(--muted); }
.field input { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 46px; background: var(--card); font-size: 16px; }
.card h2 { margin-bottom: 10px; }
.card .btn { width: 100%; margin-top: 10px; }
.card .btn.small, .card-head .btn { width: auto; margin-top: 0; flex: none; }
.tabs[hidden] { display: none; }
.m-label.long { font-size: 7.4px; }
.lobby-head { display: flex; justify-content: space-between; align-items: center; }
.roomcode { font-family: var(--serif); font-size: 40px; letter-spacing: .12em; line-height: 1; }
.roomcode.big { font-size: 64px; }
.lobby-powers { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pcard { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 1px solid var(--line); border-left: 6px solid var(--pc); border-radius: 10px; background: var(--card); padding: 10px 12px; text-align: left; min-height: 60px; }
.pcard-name { font-weight: 700; font-size: 16px; }
.pcard-who { font-size: 12px; color: var(--muted); }
.pcard.mine { background: var(--pl); border-color: var(--pc); box-shadow: inset 0 0 0 1px var(--pc); }
.pcard.mine .pcard-who { color: var(--ink); font-weight: 600; }
.pcard.taken { opacity: .55; }
.settings { display: flex; flex-direction: column; gap: 6px; }
.switch { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.switch input { width: 20px; height: 20px; accent-color: var(--accent); }
.seats ul { list-style: none; margin: 8px 0 0; padding: 0; }
.seats li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.seats li:first-child { border-top: 0; }
.sname { font-weight: 600; }
.srole { margin-left: auto; color: var(--muted); font-size: 13px; }
.invite summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.invite .qr { max-width: 220px; margin: 8px auto 0; }

/* ---- 地図 ---- */
.dipmap { width: 100%; height: 100%; display: block; user-select: none; -webkit-user-select: none; }
.m-water { fill: var(--water); }
.m-prov { stroke-linejoin: round; transition: fill .4s; }
.m-prov.sea { fill: var(--sea); stroke: var(--sea-line); stroke-width: .6; }
.m-prov.land, .m-prov.coast { fill: var(--land); stroke: var(--land-line); stroke-width: .7; }
.m-offboard { fill: url(#hatch); stroke: #bfb6a3; stroke-width: .5; pointer-events: none; }
.m-hi { pointer-events: none; }
.m-cand { fill: rgba(255, 214, 92, .42); stroke: #c98d00; stroke-width: 1.6; animation: pulse 1.6s ease-in-out infinite; }
.m-focus { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-dasharray: 5 3; }
@keyframes pulse { 50% { fill: rgba(255, 214, 92, .2); } }
.m-scdot { fill: #fffdf8; stroke: var(--ink); stroke-width: 1.1; pointer-events: none; }
.m-label { font-size: 8.6px; text-anchor: middle; fill: #3b362d; paint-order: stroke; stroke: rgba(243, 238, 227, .85); stroke-width: 2.4px; stroke-linejoin: round; font-weight: 600; }
.m-label.sea { fill: #3f6371; stroke: rgba(201, 220, 227, .85); font-weight: 500; font-style: italic; }
.m-unit { cursor: pointer; }
.m-token { stroke: none; }
.m-plate { fill: #fffdf8; stroke-width: 2; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .4)); }
.m-occ { pointer-events: none; }
.m-occ-edge { fill: none; stroke-width: 5; stroke-linejoin: round; opacity: .85; }
.m-occ-edge.dashed { stroke-dasharray: 5 4; opacity: .6; }
.m-coasts { pointer-events: none; }
.m-coast-line { stroke: #4f6f7b; stroke-width: .8; }
.m-coast-dot { fill: #4f6f7b; }
.m-coast-tag { fill: #fffdf8; stroke: #4f6f7b; stroke-width: .8; }
.m-coast-text { font-size: 6.4px; font-weight: 700; fill: #2f4d58; text-anchor: middle; }
.m-unit-ring { fill: none; stroke: var(--danger); stroke-width: 2; stroke-dasharray: 3 2; }
.m-unit.pick .m-plate { stroke: #e0a800; stroke-width: 3.2; }
.m-unit.dislodged { opacity: .9; }
.m-order { fill: none; stroke-width: 2.6; stroke-linecap: round; pointer-events: none; }
.m-order.support { stroke-width: 2; }
.m-order.hold, .m-order.supportring { stroke-width: 1.8; fill: none; }
.m-order.failed { opacity: .75; }
.m-cross path { stroke: var(--danger); stroke-width: 2.4; stroke-linecap: round; }
.m-labels text { cursor: pointer; }

/* ---- プレイヤー端末 ---- */
.screen-player { height: 100dvh; display: flex; flex-direction: column; }
.bar { display: flex; align-items: center; gap: 8px; padding: calc(4px + env(safe-area-inset-top)) 8px 4px 14px; border-bottom: 1px solid var(--line); background: var(--card); flex: none; }
.bar-phase { font-weight: 700; font-size: 15px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-timer { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); }
.bar-timer.over { color: var(--danger); }
.tabs { display: flex; gap: 6px; padding: 6px 10px; background: var(--card); border-bottom: 1px solid var(--line); flex: none; }
.tab { flex: 1; border: 1px solid var(--line); border-bottom: 3px solid var(--line); background: var(--paper); border-radius: 8px; min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; }
.tab.on { border-color: var(--pc); background: var(--card); }
.mapwrap { flex: 1 1 46%; min-height: 0; position: relative; background: var(--water); }
.maphost { position: absolute; inset: 0; }
.mapbtns { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 6px; }
.mapbtn { border: 1px solid var(--line); background: rgba(255, 253, 248, .92); border-radius: 8px; min-height: 36px; padding: 0 12px; font-size: 13px; }
.listmode .mapwrap { display: none; }
.sheet { flex: 1 1 54%; min-height: 0; overflow-y: auto; padding: 12px 12px calc(16px + env(safe-area-inset-bottom)); border-top: 3px solid var(--pc); background: var(--paper); }
.listmode .sheet { flex: 1; }
.prompt { margin: 6px 0 10px; color: var(--muted); font-size: 14px; }
.stephead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.who { font-weight: 700; font-size: 16px; }
.actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
.act { display: flex; flex-direction: row; align-items: baseline; gap: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 12px 16px; min-height: 56px; text-align: left; }
.act b { font-size: 17px; }
.act small { color: var(--muted); font-size: 12px; }
.act:active { background: #f7f1e2; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 14px; min-height: 42px; display: inline-flex; align-items: center; gap: 6px; }
.chip.sea { border-style: dashed; }
.chip.strong { border-color: var(--accent); font-weight: 600; }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip.danger.on { background: var(--danger); border-color: var(--danger); }
.chip.danger { color: var(--danger); }
.chip.on.danger, .chip.danger.on { color: #fff; }
.chip:disabled { opacity: .45; }
.chip .tag { font-size: 11px; background: var(--sea); color: #2f5562; border-radius: 6px; padding: 0 6px; }
.chip .hint { font-size: 11px; color: var(--danger); }
.sw { width: 10px; height: 10px; border-radius: 3px; background: var(--pc); display: inline-block; flex: none; }
.orderlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.orow { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 10px 12px; min-height: 50px; }
.orow:disabled { opacity: .7; }
.otype { flex: none; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 2px 8px; background: #ece6d8; color: var(--muted); }
.otype.move { background: var(--pc); color: #fff; }
.otype.support { background: #e2ecf0; color: #2f5562; }
.otype.convoy { background: #dfe6f3; color: #2f4672; }
.otext { flex: 1; }
.readybar { position: sticky; bottom: calc(-16px - env(safe-area-inset-bottom)); margin: 14px -12px -16px; padding: 10px 12px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(to bottom, transparent, var(--paper) 18px); display: flex; flex-direction: column; gap: 8px; }
.lamps { display: flex; gap: 5px; justify-content: center; }
.lamp { width: 12px; height: 12px; border-radius: 6px; border: 2px solid var(--pc, #aaa); background: transparent; display: inline-block; }
.lamp.ok { background: var(--pc, var(--ok)); }
.tab .lamp { width: 10px; height: 10px; }
.lamps.big { flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.lampname { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.retreat { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 10px 12px; margin-bottom: 8px; }
.retreat .who { margin-bottom: 8px; font-size: 15px; }
.result { border-left: 4px solid var(--accent); margin-bottom: 10px; }
.results { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.results li { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; padding: 4px 0; border-top: 1px dashed var(--line); }
.results li:first-child { border-top: 0; }
.results li em { font-style: normal; font-size: 12px; color: var(--ok); font-weight: 600; }
.results li.ng em { color: var(--danger); }
.results li.ng > span { color: var(--muted); }
.results li.sc { color: var(--accent); font-weight: 600; }
.vote { border: 2px solid var(--accent); margin-bottom: 10px; }
.vote .row .btn { flex: 1; }
.ended { text-align: center; }
.endtext { font-family: var(--serif); font-size: 22px; margin: 6px 0 0; }

/* ---- メニュー ---- */
.overlay { position: fixed; inset: 0; background: rgba(38, 35, 30, .35); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.menu { background: var(--card); width: min(520px, 100%); border-radius: 16px 16px 0 0; padding: 8px 12px calc(16px + env(safe-area-inset-bottom)); max-height: 85dvh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.menu-head { display: flex; align-items: center; gap: 10px; padding: 4px 0 8px; border-bottom: 1px solid var(--line); }
.menu-head span { color: var(--muted); flex: 1; }
.mitem { text-align: left; border: 0; background: transparent; padding: 12px 6px; min-height: 48px; border-bottom: 1px solid #efe9dc; }
.mitem.quiet { color: var(--muted); }
.menu-sec { font-size: 12px; color: var(--muted); margin-top: 10px; letter-spacing: .08em; }
.hostctl { display: flex; flex-direction: column; gap: 8px; padding: 6px 0; }
.menu .invite { padding: 8px 6px; }

/* ---- 表示端末 ---- */
.screen-display { height: 100dvh; display: grid; grid-template-columns: 1fr minmax(300px, 360px); }
.d-main { position: relative; background: var(--water); min-width: 0; }
.d-maphost { position: absolute; inset: 0; }
.d-caption { position: absolute; left: 50%; top: 16px; transform: translate(-50%, -8px); background: rgba(38, 35, 30, .86); color: var(--paper); padding: 8px 18px; border-radius: 999px; font-size: 18px; font-weight: 600; opacity: 0; transition: .3s; pointer-events: none; white-space: nowrap; }
.d-caption.show { opacity: 1; transform: translate(-50%, 0); }
.d-side { border-left: 1px solid var(--line); background: var(--paper); overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.d-block { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.d-block.notice { background: #fff6dc; border-color: #e8d49a; }
.d-phase { font-family: var(--serif); font-size: 24px; font-weight: 700; }
.d-timer { font-size: 44px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent); line-height: 1.1; margin-top: 4px; }
.d-timer.over { color: var(--danger); font-size: 26px; }
.qrblock .qr { max-width: 240px; margin: 0 auto; }
.ptable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ptable th { font-size: 11px; color: var(--muted); font-weight: normal; text-align: left; padding: 0 4px 4px; }
.ptable td { padding: 6px 4px; border-top: 1px solid #efe9dc; vertical-align: middle; }
.ptable .num { text-align: right; font-variant-numeric: tabular-nums; width: 2.6em; }
.ptable .who { white-space: nowrap; display: flex; align-items: center; gap: 6px; font-size: 13px; min-height: 34px; }
.ptable tr.out { opacity: .45; }
.okpill { font-size: 11px; border-radius: 999px; padding: 1px 8px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.okpill.ok { background: var(--ok); border-color: var(--ok); color: #fff; font-weight: 700; }
.results-d summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-weight: 600; gap: 8px; }
.results-d .results li { font-size: 13px; }

@media (max-width: 760px) {
  .screen-display { grid-template-columns: 1fr; grid-template-rows: 55dvh auto; height: auto; }
}
@media (min-width: 900px) {
  .screen-player { flex-direction: row; flex-wrap: wrap; }
  .screen-player .bar, .screen-player .tabs { width: 100%; }
  .screen-player .mapwrap { flex: 1 1 60%; height: calc(100dvh - 56px); }
  .screen-player .sheet { flex: 0 0 420px; height: calc(100dvh - 56px); border-top: 0; border-left: 3px solid var(--pc); }
}

.results-d .results li { display: grid; grid-template-columns: 10px 1fr; column-gap: 8px; align-items: baseline; }
.results-d .results li em { grid-column: 2; }

/* ================================================================
   古地図のテーマ：生成りの羊皮紙、セピアの線、臙脂の革と真鍮の縁
   ================================================================ */
:root {
  --paper: #ebdfc3;
  --card: #f7eedb;
  --ink: #2b1e14;
  --muted: #6f5c47;
  --line: #cdb892;
  --accent: #6e1f1b;
  --accent-ink: #f6e9c8;
  --gold: #b48a3c;
  --gold-soft: #d6bb7e;
  --leather: #4a1513;
  --leather-2: #2c0c0a;
  --ok: #4d7a3c;
  --danger: #9b2f24;
  --water: #b4bfb8;
  --sea: #c2cbc1;
  --sea-line: #8a9b90;
  --land: #eadbb6;
  --land-line: #6b5034;
  --offboard: #c9b48d;
  --offboard-line: #b39c72;
  --serif: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
}
body { background: var(--paper) url(/paper.png); }
h1, h2, h3, .who, .act b, .pcard-name, .bar-phase, .d-phase, .roomcode, .endtext, .tab, .card-head h3, .menu-head b, .d-caption { font-family: var(--serif); }
h2, h3, .card-head h3 { font-weight: 700; letter-spacing: .03em; }

/* 羊皮紙のカード：金の細い二重線 */
.card, .d-block, .menu, .retreat {
  background: var(--card) url(/paper.png);
  border: 1px solid var(--gold);
  box-shadow: inset 0 0 0 3px var(--card), inset 0 0 0 4px rgba(180, 138, 60, .45), 0 1px 2px rgba(44, 12, 10, .15);
}
.orow, .act, .chip, .pcard, .seg, .field input, .mapbtn { background-color: var(--card); border-color: var(--line); }
.pcard { border-left-color: var(--pc); }
.pcard.mine { background: var(--pl); border-color: var(--pc); }
.act:active, .orow:active { background-color: #efe2c4; }

/* 臙脂の革のボタン */
.btn.primary, .chip.on, .seg button.on, .badge {
  background: linear-gradient(#7c2420, #5b1714);
  border-color: #3a0d0b;
  color: var(--accent-ink);
  box-shadow: inset 0 0 0 1px rgba(214, 187, 126, .55);
}
.btn.primary:disabled { opacity: .5; }
.btn.done { background: #e6dcc0; border-color: var(--ok); color: var(--ok); }
.chip.danger.on { background: linear-gradient(#a03428, #7d241b); }

/* 上部のバー：革に真鍮の線 */
.bar { background: linear-gradient(#5b1b17, #3b0f0d); border-bottom: 2px solid var(--gold); color: #f3e3bd; }
.bar-timer { color: #f0d79a; }
.bar .dots, .bar .dots::before, .bar .dots::after { background: #f0d79a; }
.tabs { background: #e9dcbd; border-bottom-color: var(--gold-soft); }
.tab { background: #f1e6cc; }
.tab.on { background: var(--card); }

/* 地図の外枠：革 */
.mapwrap, .d-main { background: var(--leather) url(/paper.png); }
.sheet { background: var(--paper) url(/paper.png); }
.readybar { background: linear-gradient(to bottom, transparent, var(--paper) 18px); }

/* 表示端末の側面：革に金の縁 */
.d-side { background: linear-gradient(#4f1714, #2c0c0a); border-left: 3px solid var(--gold); }
.d-side > .waiting, .d-side > p.waiting { color: #e9d6a9; }
.d-side > .btn.primary { border-color: var(--gold); }
.d-caption { background: rgba(44, 12, 10, .9); color: #f3e3bd; border: 1px solid var(--gold); }
.d-timer { color: var(--accent); }
.okpill.ok { background: var(--ok); border-color: var(--ok); }

/* ホーム */
.brand-mark { box-shadow: 0 0 0 2px var(--gold); }
.brand h1 { font-weight: 800; }

/* 地図の線と文字：セピアのインク */
.m-water { fill: var(--water); }
.m-prov.land, .m-prov.coast { stroke: var(--land-line); stroke-width: .75; }
.m-prov.sea { stroke: var(--sea-line); }
.m-paper { pointer-events: none; }
.m-label { font-family: var(--serif); font-weight: 700; fill: #3a2716; stroke: rgba(234, 219, 182, .88); }
.m-label.sea { fill: #4a5d55; stroke: rgba(194, 203, 193, .88); font-weight: 500; }
.m-scdot { stroke: #3a2716; fill: #f7eedb; }
.m-plate { fill: #f7eedb; }
.m-unit.pick .m-plate { stroke: #c08a1a; }
.m-coast-tag { fill: #f7eedb; stroke: #6b5034; }
.m-coast-line { stroke: #6b5034; }
.m-coast-dot { fill: #6b5034; }
.m-coast-text { fill: #3a2716; font-family: var(--serif); }
.m-compass { pointer-events: none; opacity: .9; }
.m-cand { fill: rgba(214, 160, 40, .38); stroke: #9c6a0e; }

/* メニュー：画面の端から浮かせて、枠が一周つながるようにする */
.overlay { background: rgba(44, 12, 10, .45); padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); }
.menu { border-radius: 16px; width: min(520px, 100%); max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); padding: 10px 16px 14px; }
