:root {
  --paper: #f5eedc;
  --paper2: #ebe1c8;
  --ink: #2a241d;
  --ink2: #6b5f50;
  --red: #c8402f;
  --red2: #a3301f;
  --sea: #1f3a52;
  --line: #cdbf9f;
  --good: #3f8a4a;
  --bad: #b5402f;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--sea); color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", system-ui, sans-serif; }
button { font: inherit; color: inherit; cursor: pointer; }
#app { position: fixed; inset: 0; user-select: none; -webkit-user-select: none; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; }

/* 上の帯 */
#hud { position: absolute; top: calc(8px + var(--safe-t)); left: 8px; right: 8px; display: flex; justify-content: space-between; gap: 6px; pointer-events: none; }
.hud-main, .hud-btns { display: flex; gap: 6px; flex-wrap: wrap; pointer-events: auto; }
.chip { background: rgba(245, 238, 220, .94); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; font-size: 13px; font-weight: 700; box-shadow: 0 2px 6px rgba(0,0,0,.18); white-space: nowrap; }
.chip b { color: var(--red); }
.icon-btn { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; min-width: 40px; height: 32px; padding: 0 12px; font-size: 14px; font-weight: 700; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.icon-btn.accent { background: var(--red); color: #fff; border-color: var(--red2); }
#log { position: absolute; top: calc(48px + var(--safe-t)); left: 8px; margin: 0; padding: 0; list-style: none; pointer-events: none; max-width: min(70vw, 360px); }
#log li { background: rgba(20, 30, 40, .72); color: #fff; font-size: 12px; padding: 4px 9px; border-radius: 6px; margin-bottom: 4px; animation: fadein .25s; }
#log li.hot { background: rgba(170, 40, 25, .85); }

/* 下のパネル */
#panel { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(8px + var(--safe-b)); width: min(560px, calc(100% - 16px));
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: 0 6px 22px rgba(0,0,0,.3); }
.p-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.p-sw { width: 14px; height: 14px; border-radius: 4px; flex: none; border: 1px solid rgba(0,0,0,.25); }
.p-title { font-size: 17px; font-weight: 800; }
.p-owner { font-size: 12px; color: var(--ink2); margin-left: auto; text-align: right; }
.p-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--ink2); margin: 2px 0 8px; }
.p-stats b { color: var(--ink); }
.p-hint { font-size: 14px; margin: 2px 0 10px; }
.p-btns { display: flex; gap: 8px; }
.p-btns button { flex: 1; border-radius: 10px; border: 1px solid var(--line); background: #fff8e8; padding: 10px 8px; font-weight: 700; font-size: 15px; }
.p-btns button.primary { background: var(--red); border-color: var(--red2); color: #fff; }
.p-btns button.go { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.p-btns button:disabled { opacity: .45; cursor: default; }
.vs { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; margin-bottom: 6px; }
.vs .arrow { color: var(--red); }
.slider-row { display: flex; align-items: center; gap: 10px; margin: 4px 0 8px; }
.slider-row input { flex: 1; accent-color: var(--red); height: 28px; }
.slider-row .n { min-width: 64px; text-align: right; font-weight: 800; font-size: 18px; }
.odds { height: 10px; background: var(--paper2); border-radius: 99px; overflow: hidden; margin: 0 0 4px; }
.odds i { display: block; height: 100%; background: var(--good); transition: width .15s; }
.odds-label { font-size: 13px; color: var(--ink2); margin-bottom: 10px; }
.odds-label b { font-size: 16px; }

/* タイトルとモーダル */
.screen { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 30, 45, .55); }
.screen[hidden] { display: none; }
#title { background: radial-gradient(ellipse at 50% 40%, rgba(31,58,82,.35), rgba(10,20,30,.8)); }
.title-card, .modal-card { background: var(--paper); border-radius: 18px; padding: 24px 22px 18px; width: min(420px, 100%); box-shadow: 0 12px 40px rgba(0,0,0,.45); border: 1px solid var(--line); max-height: calc(100% - 16px); overflow: auto; }
.title-card { text-align: center; }
.title-sub { margin: 0; color: var(--ink2); font-size: 13px; letter-spacing: .2em; }
h1 { margin: 4px 0 18px; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 46px; letter-spacing: .12em; color: var(--ink); text-shadow: 2px 2px 0 var(--paper2); }
h1::after { content: ""; display: block; width: 54px; height: 4px; background: var(--red); margin: 6px auto 0; border-radius: 2px; }
.opt { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.opt-label { width: 64px; font-size: 13px; font-weight: 700; color: var(--ink2); text-align: left; }
.seg { flex: 1; display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { flex: 1; padding: 8px 4px; border: 0; background: #fff8e8; font-size: 13px; font-weight: 700; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--ink); color: var(--paper); }
.vol-row input { flex: 1; min-width: 0; accent-color: var(--red); height: 26px; }
.vol-row .vol-n { width: 36px; text-align: right; font-size: 13px; font-weight: 800; color: var(--ink2); }
.vol-box { background: var(--paper2); border-radius: 10px; padding: 2px 12px; margin: 8px 0 4px; }
.big { display: block; width: 100%; margin-top: 14px; padding: 14px; border: 0; border-radius: 12px; background: var(--red); color: #fff; font-size: 17px; font-weight: 800; box-shadow: 0 3px 0 var(--red2); }
.big.sub { background: var(--ink); box-shadow: 0 3px 0 #000; margin-top: 10px; }
.big:active { transform: translateY(2px); box-shadow: none; }
.link { margin-top: 12px; background: none; border: 0; color: var(--ink2); text-decoration: underline; font-size: 13px; }
.modal-card h2 { margin: 0 0 10px; font-size: 22px; }
.modal-card p { margin: 6px 0; font-size: 14px; line-height: 1.6; }
.modal-card ul.rules { padding-left: 1.2em; margin: 6px 0 4px; font-size: 14px; line-height: 1.7; }
.rank { list-style: none; padding: 0; margin: 0 0 6px; }
.rank li { display: flex; align-items: center; gap: 8px; padding: 7px 4px; border-bottom: 1px solid var(--paper2); font-size: 14px; }
.rank li.dead { opacity: .45; }
.rank li.me { font-weight: 800; }
.rank .bar { flex: 1; height: 8px; background: var(--paper2); border-radius: 99px; overflow: hidden; }
.rank .bar i { display: block; height: 100%; }
.rank .num { width: 72px; text-align: right; font-size: 12px; color: var(--ink2); }
.rank .nm { width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-big { font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 40px; text-align: center; margin: 4px 0 8px; letter-spacing: .1em; }
.result-big.win { color: var(--red); }
.modal-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.modal-btns button { padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff8e8; font-weight: 700; font-size: 15px; }
.modal-btns button.primary { background: var(--red); color: #fff; border-color: var(--red2); }

/* 強化・兵種 */
.up-gold { display: flex; justify-content: space-between; align-items: baseline; background: var(--paper2); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; font-weight: 700; }
.up-gold b { font-size: 22px; color: #9a6a00; }
.up-h { font-size: 13px; color: var(--ink2); font-weight: 800; margin: 12px 0 4px; letter-spacing: .1em; }
.up-row { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--paper2); }
.up-row .up-main { flex: 1; min-width: 0; }
.up-row .up-name { font-weight: 800; font-size: 15px; }
.up-row .up-desc { font-size: 12px; color: var(--ink2); line-height: 1.45; }
.up-row .lv { color: var(--red); letter-spacing: 1px; font-size: 12px; margin-left: 4px; }
.up-row button { flex: none; min-width: 84px; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--red2); background: var(--red); color: #fff; font-weight: 800; font-size: 13px; }
.up-row button:disabled { background: #e6dcc6; color: #8a7e6c; border-color: var(--line); cursor: default; }
.up-row .tag { flex: none; font-size: 12px; font-weight: 800; padding: 4px 8px; border-radius: 99px; background: var(--paper2); color: var(--ink2); }
.up-row .tag.ok { background: #dcefd9; color: var(--good); }
.up-row.cur { background: #fff3cf; }
.unit-ico { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 6px; background: var(--ink); color: var(--paper); font-size: 12px; font-weight: 800; margin-right: 6px; vertical-align: middle; }
.p-march { display: flex; align-items: center; gap: 8px; font-size: 12px; background: #fff0c2; border: 1px solid #e6c766; border-radius: 8px; padding: 4px 4px 4px 8px; margin: -2px 0 8px; }
.p-march button { margin-left: auto; flex: none; border: 1px solid var(--line); background: #fff8e8; border-radius: 7px; padding: 3px 8px; font-size: 12px; font-weight: 700; }
.p-special { font-size: 12px; background: #fff3cf; border: 1px solid #ecd9a0; border-radius: 8px; padding: 4px 8px; margin: -2px 0 8px; }

/* 観戦 */
#battle { background: rgba(8, 14, 22, .82); z-index: 5; }
.battle-card { width: min(820px, 100%); background: #1d2630; border-radius: 14px; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
#battle-canvas { display: block; width: 100%; height: min(70vw, 58vh, 500px); touch-action: none; }
.battle-btns { display: flex; gap: 8px; padding: 10px; }
.battle-btns button { flex: 1; padding: 10px; border-radius: 10px; border: 1px solid #4a5868; background: #2c3946; color: #fff; font-weight: 800; font-size: 15px; }

.chip .shame { background: #6b2a1f; color: #fff; border-radius: 99px; padding: 1px 7px; font-size: 11px; margin-left: 4px; }
.p-warn { font-size: 12px; background: #fde3dc; border: 1px solid #e9a090; color: #8a2a1a; border-radius: 8px; padding: 5px 8px; margin: 0 0 8px; }
/* 外交 */
.dip-note { font-size: 12px !important; color: var(--ink2); line-height: 1.55 !important; }
.dip-row { border-bottom: 1px solid var(--paper2); padding: 8px 2px; }
.dip-head { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.dip-trait { font-size: 11px; background: var(--paper2); border-radius: 99px; padding: 2px 7px; color: var(--ink2); font-weight: 700; }
.dip-rel { font-size: 13px; margin: 3px 0 1px; }
.dip-sub { font-size: 12px; color: var(--ink2); }
.dip-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.dip-btns button { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--red2); background: var(--red); color: #fff; font-weight: 800; font-size: 13px; }
.dip-btns button.sub { background: #fff8e8; color: var(--ink); border-color: var(--line); }
.dip-btns button:disabled { background: #e6dcc6; color: #8a7e6c; border-color: var(--line); }
.dip-others { margin: 4px 0; padding-left: 1.2em; font-size: 13px; line-height: 1.7; }
.dip-mood { background: var(--paper2); border-radius: 10px; padding: 8px 12px; font-size: 14px; margin-top: 8px; border-left: 5px solid #999; }
.dip-mood.k4, .dip-mood.k3 { border-left-color: var(--good); }
.dip-mood.k2 { border-left-color: #c9962b; }
.dip-mood.k1, .dip-mood.k0 { border-left-color: var(--bad); }
.dip-mood ul { margin: 4px 0 0; padding-left: 0; list-style: none; font-size: 12px; }
.dip-mood li.good { color: var(--good); }
.dip-mood li.bad { color: var(--bad); }
.dip-say { font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 17px !important; background: #fffaf0; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.modal-card .opt .seg button { padding: 7px 2px; font-size: 12px; }
/* 記録・結果 */
.hist { display: block; width: 100%; height: 150px; background: #fffaf0; border-radius: 8px; }
.hist-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11px; color: var(--ink2); margin: 6px 0; }
.hist-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 3px; vertical-align: -1px; }
.rec-best { text-align: center; font-weight: 800; color: var(--ink2); }
.rec-best.new { color: var(--red); }
.rec-best small { display: block; font-weight: 400; font-size: 11px; }
.rec-list { list-style: none; padding: 0; margin: 0 0 4px; }
.rec-list li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 2px; border-bottom: 1px solid var(--paper2); font-size: 13px; }
.rec-list b.win { color: var(--red); }

#toast { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); pointer-events: none; text-align: center; }
#toast div { background: rgba(245, 238, 220, .97); border: 2px solid var(--ink); border-radius: 12px; padding: 10px 20px; font-size: 20px; font-weight: 800; box-shadow: 0 8px 26px rgba(0,0,0,.35); animation: pop .9s ease forwards; white-space: nowrap; }
#toast div.win { border-color: var(--red); color: var(--red); }
#toast div.lose { border-color: #555; color: #444; }
@keyframes pop { 0% { opacity: 0; transform: scale(.7); } 15% { opacity: 1; transform: scale(1.06); } 25% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
@keyframes fadein { from { opacity: 0; transform: translateY(-4px); } }

@media (max-width: 480px) {
  .chip { font-size: 12px; padding: 4px 9px; }
  h1 { font-size: 40px; }
  .p-title { font-size: 16px; }
}
/* 大名の顔・小さな地図 */
.face { border-radius: 50%; flex: none; display: block; box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0,0,0,.25); }
.face.sm { box-shadow: 0 0 0 1.5px #fff, 0 1px 2px rgba(0,0,0,.25); }
.p-owner small { display: block; font-size: 11px; color: var(--ink2); font-weight: 600; }
.say-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.say-row .dip-say { flex: 1; margin: 0; }
.who { display: flex; gap: 10px; align-items: center; background: var(--paper2); border-radius: 10px; padding: 8px; margin-bottom: 6px; }
.who-main { min-width: 0; flex: 1; }
.who-lord { font-size: 13px; font-weight: 700; margin: 2px 0; }
.mini { display: block; flex: none; border-radius: 6px; border: 1px solid var(--line); height: auto; }
.dip-top { display: flex; align-items: center; gap: 10px; }
.dip-main { flex: 1; min-width: 0; }
.dip-lord { font-size: 12px; margin-top: 2px; }
.dip-lord small { color: var(--ink2); }
.dip-feud { display: flex; flex-wrap: wrap; gap: 4px 10px; color: #8a2a1a; }
.me-chip { display: inline-flex; align-items: center; gap: 6px; }
.me-lord { display: flex; align-items: center; gap: 12px; margin: 4px 0 8px; }
.me-edit { flex: 1; min-width: 0; }
.me-edit input { width: 100%; box-sizing: border-box; font-size: 17px; font-weight: 800; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fffaf0; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; }
.me-btns { display: flex; gap: 6px; margin-top: 6px; }
.me-btns button { flex: 1; padding: 6px 4px; border-radius: 8px; border: 1px solid var(--line); background: #fff8e8; font-weight: 700; font-size: 13px; }
.rank li .nm small { display: block; font-size: 11px; color: var(--ink2); font-weight: 600; }
/* 兵種の配分 */
.mix-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: #e6dcc6; margin: 4px 0; }
.mix-bar i { display: block; height: 100%; }
#mx-bar .mix-bar { height: 16px; margin: 8px 0; }
.mix-mode { margin: 4px 0 2px; }
.mix-row { display: grid; grid-template-columns: 1fr 92px; align-items: center; gap: 2px 8px; padding: 6px 0; border-bottom: 1px solid var(--paper2); }
.mix-row input[type=range] { grid-column: 1 / -1; width: 100%; }
.mix-name { font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 2px; }
.mix-name small { color: var(--ink2); font-weight: 600; font-size: 11px; margin-left: 6px; }
.mix-n { text-align: right; font-size: 13px; font-weight: 800; grid-column: 2; grid-row: 1; }
.mix-lock { grid-column: 1 / -1; font-size: 11px; color: var(--ink2); }
.mix-sum { background: var(--paper2); border-radius: 8px; padding: 7px 10px; font-size: 13px; margin-top: 8px; }
/* 人物・恨み */
[data-lord] { cursor: pointer; }
.lord-top { display: flex; gap: 12px; align-items: center; margin-bottom: 4px; }
.lord-info { flex: 1; min-width: 0; font-size: 13px; line-height: 1.5; }
.lord-name { font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 20px; font-weight: 800; }
.gr-row { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--paper2); }
.gr-main { flex: 1; min-width: 0; }
.gr-nm { font-size: 13px; margin-bottom: 2px; }
.gr-feud { background: #8a2a1a; color: #fff; border-radius: 99px; padding: 1px 7px; font-size: 10px; font-weight: 800; margin-left: 6px; }
.gr-line { display: grid; grid-template-columns: 76px 1fr 54px; align-items: center; gap: 6px; font-size: 11px; color: var(--ink2); }
.gr-bar { height: 8px; background: #e6dcc6; border-radius: 4px; overflow: hidden; }
.gr-bar i { display: block; height: 100%; border-radius: 4px; }
.gr-v { text-align: right; font-weight: 700; }
/* 盟約（三国同盟など） */
.inv-chips { display: flex; flex-wrap: wrap; gap: 5px; flex: 1; }
.inv-chips button { display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px; border-radius: 99px; border: 1px solid var(--line); background: #fff8e8; font-size: 12px; font-weight: 700; color: var(--ink); }
.inv-chips button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.inv-chips button:disabled { opacity: .45; }
.inv-chips .p-sw { width: 10px; height: 10px; }
.lg-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; }
.lg-mood { margin-left: auto; font-size: 12px; font-weight: 800; }
.lg-mood.k3, .lg-mood.k4 { color: var(--good); }
.lg-mood.k2 { color: #a87a1b; }
.lg-mood.k0, .lg-mood.k1 { color: var(--bad); }
/* 謀略 */
.sc-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--paper2); }
.sc-main { flex: 1; min-width: 0; }
.sc-row > button { flex: none; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--red2); background: var(--red); color: #fff; font-weight: 800; font-size: 13px; max-width: 120px; }
.sc-row > button:disabled { background: #e6dcc6; color: #8a7e6c; border-color: var(--line); font-size: 11px; }
.sc-pick { margin: 6px 0 2px; }
.sc-odds { font-size: 12px; color: var(--ink2); margin-top: 3px; }
.st-line { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 3px 0; }
.st-chaos, .st-charm { border-radius: 99px; padding: 1px 8px; font-size: 11px; font-weight: 800; color: #fff; }
.st-chaos { background: #6b4f8a; }
.st-charm { background: #c2457a; }
/* 忠誠・親睦・戦況 */
.p-stats b.bad { color: var(--bad); }
.loy-line { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font-size: 12px; margin: 4px 0; }
.up-desc .neg { color: var(--bad); white-space: nowrap; }
.up-desc .pos { color: var(--good); white-space: nowrap; }
.gr-kin { display: inline-block; background: #c2457a; color: #fff; border-radius: 99px; padding: 1px 8px; font-size: 10px; font-weight: 800; margin-top: 3px; }
.modal-card.wide { width: min(960px, 100%); }
.war-view { position: relative; width: 100%; max-height: 66vh; min-height: 260px; border-radius: 10px; overflow: hidden; margin: 4px 0; background: rgb(52,72,92); touch-action: none; }
.war-view canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.war-view canvas:active { cursor: grabbing; }
.war-view.full { position: fixed; inset: 0; z-index: 50; max-height: none; aspect-ratio: auto !important; border-radius: 0; margin: 0; }
.war-zoom { position: absolute; right: 8px; top: 8px; display: flex; gap: 4px; align-items: center; }
.war-zoom button { min-width: 36px; height: 34px; padding: 0 8px; border-radius: 8px; border: 1px solid rgba(0,0,0,.25); background: rgba(255,248,232,.92); font-weight: 800; font-size: 14px; }
.war-zoom span { min-width: 34px; padding: 3px 6px; border-radius: 6px; background: rgba(0,0,0,.45); color: #fff; font-size: 12px; text-align: center; }
.war-legend.in-full { display: none; position: absolute; left: 8px; bottom: 8px; margin: 0; padding: 6px 10px; border-radius: 8px; background: rgba(255,248,232,.9); }
.war-view.full .war-legend.in-full { display: flex; }
.war-tip { font-size: 11px; color: var(--ink2); margin-bottom: 4px; }
.war-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; color: var(--ink2); margin-bottom: 6px; }
.war-legend i { display: inline-block; width: 18px; height: 0; border-top: 3px solid; vertical-align: middle; margin-right: 4px; }
.war-legend .lg-al { border-color: #4fcf72; }
.war-legend .lg-va { border-color: #f2c23a; }
.war-legend .lg-tr { border-top-style: dashed; border-color: #79c4f0; }
.war-legend .lg-war { border-top-style: dotted; border-color: #e0392c; }
.bloc { border: 1px solid var(--paper2); border-radius: 10px; padding: 7px 9px; margin: 5px 0; }
.bloc.me { border-color: var(--red); background: #fff6ee; }
.bloc-head { display: flex; justify-content: space-between; font-size: 13px; }
.bloc-bar { display: flex; height: 8px; background: #e6dcc6; border-radius: 4px; overflow: hidden; margin: 4px 0; }
.bloc-bar i { display: block; height: 100%; }
.bloc-mem { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; }
.bloc-mem span { display: inline-flex; align-items: center; gap: 4px; }
.war-list { list-style: none; padding: 0; margin: 4px 0; font-size: 13px; }
.war-list li { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; padding: 4px 0; border-bottom: 1px solid var(--paper2); }
.war-n { margin-left: auto; font-size: 11px; color: var(--ink2); }

/* 話しかけ（手切れ・領主の訴えなど） */
.talk { background: var(--paper2); border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.talk-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.talk-tag { font-size: 11px; font-weight: 800; color: #fff; background: var(--ink); border-radius: 6px; padding: 2px 6px; white-space: nowrap; }
.talk-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 14px; }
.talk-who span { font-size: 12px; color: var(--ink2); }
.talk .dip-note { margin: 4px 0 0; }
.talk .dip-btns { margin-top: 8px; }

/* 国の取引 */
.tr-map { display: block; width: 100%; height: auto; border-radius: 10px; margin: 6px 0 2px; cursor: pointer; }
.tr-chips button { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.tr-chips button small { font-size: 10px; color: var(--ink2); font-weight: 400; }
.tr-chips button.on small { color: inherit; opacity: .85; }
.tr-gold { gap: 8px; align-items: center; }
.tr-gold .tr-gl { width: 44px; font-size: 13px; font-weight: 700; color: var(--ink2); }
.tr-mood { margin-top: 8px; }
.dip-sub .neg { color: var(--bad); white-space: nowrap; }
.dip-sub .pos { color: var(--good); white-space: nowrap; }
.tr-gold .n { font-size: 15px; }
.war-legend .p-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 4px; }
.who-target { display: flex; align-items: center; gap: 8px; background: var(--paper2); border-radius: 10px; padding: 6px 10px; margin: 6px 0; font-size: 14px; }
.who-target small { display: block; font-size: 11px; color: var(--ink2); }
