[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.wrap, .site-switch { width: min(1060px, calc(100% - 32px)); }
.game-header { margin-top: 25px; }
.title-line { display: flex; align-items: center; gap: 25px; }
.eyebrow { font-size: .82rem; letter-spacing: .12em; margin: 0 0 6px; }
.game-header .eyebrow { color: #f2d698; }
.seal { border: 2px solid #e9c893; border-radius: 7px; padding: 7px 9px; line-height: 1.3; letter-spacing: .12em; color: #ffebbf; background: #914d35; transform: rotate(6deg); font-family: serif; font-size: 1rem; }
.campaign { border-radius: 25px; overflow: hidden; border: 3px solid #d6b873; background: #f8efd8; box-shadow: 0 8px 0 #243d2b; }
.mission-top { padding: 23px 25px 5px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; }
h2 { margin: 0; font-size: 1.5rem; }
.mission-top .eyebrow { color: #7e5c35; }
.mission-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.mission-tools select { font-size: .9rem; }
.mission-tools button { font-size: .9rem; }
.mission-brief { font-size: .95rem; line-height: 1.6; padding: 0 25px; margin: 10px 0 19px; color: #655237; }
.battle-map { position: relative; background: #b2c292; border-top: 1px solid #c4c69d; }
.landscape { width: 100%; height: auto; display: block; }
.map-tag { position: absolute; bottom: 14px; border-radius: 6px; padding: 5px 10px; font-size: .76rem; background: #f9efcd; color: #496344; border: 1px solid #fff3c9; }
.map-tag.ours { left: 6%; }
.map-tag.enemy { right: 10%; color: #894c32; }
.battle-stamp { position: absolute; top: 38%; left: 42%; border: 3px solid currentColor; font-family: serif; font-size: clamp(1.6rem, 4.5vw, 3rem); padding: 8px 13px; transform: rotate(-9deg); border-radius: 7px; color: #2d5837; background: #fff1c9ed; opacity: 0; pointer-events: none; }
.battle-map.success .battle-stamp, .battle-map.failure .battle-stamp { opacity: 1; animation: stamp .35s ease-out; }
.battle-map.failure .battle-stamp { color: #9a4f30; }
.battle-map.success .enemy-flag { fill: #477547; }
.battle-map.success #armyFigures { animation: march .5s ease-out; }
@keyframes stamp { from { transform: scale(1.3) rotate(-9deg); opacity: 0; } to { transform: scale(1) rotate(-9deg); opacity: 1; } }
@keyframes march { from { transform: translateX(-18px); } to { transform: translateX(0); } }
.war-ledger { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 22px; padding: 20px 25px 23px; border-top: 3px solid #d1bd87; }
.war-ledger > div { min-width: 0; }
.war-ledger > div > span:first-child { font-size: .85rem; color: #715a37; }
.war-ledger p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 6px 0 10px; }
.war-ledger strong { font-size: 2.5rem; line-height: 1; color: #3b6647; font-family: ui-rounded, "Arial Rounded MT Bold", sans-serif; }
.war-ledger small { color: #806945; font-size: .8rem; }
.defense-stat { border-left: 1px dashed #baa77e; padding-left: 22px; }
.defense-stat strong { color: #965c37; }
.ledger-note { font-size: .75rem; color: #776446; line-height: 1.5; }
.meter { height: 7px; background: #e4d9b8; overflow: hidden; border-radius: 9px; }
.meter > span { display: block; height: 100%; background: #c49a3d; width: 100%; transition: width .2s; }
.meter.power > span { width: 0; background: #568461; }
.recruitment { margin-top: 30px; padding: 25px; background: #fff6df; border: 3px solid #d6b873; border-radius: 25px; box-shadow: 0 8px 0 #243d2b; }
.section-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.section-heading .eyebrow { color: #7d6142; }
.counter-rule { max-width: 340px; margin: 0; background: #e8ecd3; color: #3f6749; border-radius: 11px; padding: 10px 13px; font-size: .88rem; line-height: 1.6; }
.mobile-ledger { display: none; }
.troop-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
.troop-card { border: 2px solid #decda3; border-radius: 18px; padding: 16px; background: #f3e8cc; min-width: 0; position: relative; }
.troop-card.counter { border-color: #6e946c; background: #eef0d8; }
.troop-heading { display: flex; align-items: center; gap: 10px; }
.troop-portrait { width: 62px; height: 64px; flex: 0 0 62px; border-radius: 12px; background: #dfd6b5; }
.counter .troop-portrait { background: #d6dfbc; }
.troop-card h3 { font-size: 1.2rem; margin: 0 0 3px; }
.troop-heading p { margin: 0; font-size: .76rem; color: #6a6243; }
.troop-cost { font-size: .85rem; color: #6a5436; margin: 14px 0 4px; }
.troop-cost b { font-size: 1.25rem; color: #8b6426; }
.troop-power { font-size: .85rem; margin: 5px 0; line-height: 1.6; }
.troop-power b { color: #365f40; font-size: 1.05rem; }
.power-note { font-size: .74rem; color: #685b3e; min-height: 2.8em; line-height: 1.5; margin: 6px 0 9px; }
.counter .power-note { color: #38603f; }
.troop-picker { display: flex; align-items: center; justify-content: space-between; gap: 6px; border-top: 1px dashed #c6b990; padding-top: 12px; }
.troop-picker button { border-radius: 11px; padding: 0; width: 44px; height: 44px; font-size: 1.7rem; }
.troop-picker output { font-size: 1.55rem; font-weight: 700; min-width: 28px; text-align: center; }
button:disabled { cursor: default; filter: none; opacity: .4; }
.supply-note { font-size: .73rem; text-align: center; color: #796449; margin: 11px 0 0; }
.command-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 23px; padding-top: 20px; border-top: 1px solid #dccb9e; }
.step-label { font-size: .78rem; color: #775d37; }
.order-summary p { margin: 7px 0 0; font-size: 1rem; font-weight: 600; line-height: 1.6; }
.go-button { border-radius: 14px; min-height: 60px; font-size: 1.18rem; padding: 10px 23px; white-space: nowrap; background: #8f4d30; box-shadow: 0 5px 0 #603c28; }
.go-button > span { margin-left: 12px; }
.battle-report { margin-top: 20px; border-radius: 14px; line-height: 1.7; }
.battle-report:not(:empty) { padding: 16px 18px; background: #eee5c9; }
.battle-report[data-kind="success"] { background: #e1ebd0; color: #2e5438; border: 1px solid #a5bc8b; }
.battle-report[data-kind="failure"] { background: #f3e1ce; color: #7c472f; }
.battle-report strong { display: block; font-size: 1.08rem; }
.stars { color: #9b721f; font-size: 1.3rem; letter-spacing: .12em; }
.support-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 20px 0; }
.support-actions button { font-size: .9rem; }
.text-button { color: #675339; border: 1px dashed #aa986e; background: transparent; box-shadow: none; }
.text-button:active { box-shadow: none; }
.calculation, .how-to { padding: 13px 0; border-top: 1px dashed #cfbd94; line-height: 1.7; font-size: .85rem; }
summary { cursor: pointer; color: #675135; font-weight: 600; min-height: 44px; padding: 7px 0; }
.calculation p { margin: 10px 0 0; }
.how-to ol { padding-left: 24px; margin-bottom: 0; }
.how-to li { margin: 8px 0; }
.afterword { margin: 30px 0 10px; color: #f3e8c9; text-align: center; font-size: .82rem; line-height: 1.8; }
button:focus-visible, a:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #b97f22; outline-offset: 4px; }
@media (max-width: 700px) {
  .wrap, .site-switch { width: min(100% - 24px,1060px); }
  .site-switch a { font-size: .8rem; padding: 10px 3px; min-width: 0; }
  .game-header { margin-top: 18px; }
  .title-line { gap: 18px; }
  .subtitle { font-size: .9rem; line-height: 1.6; }
  .mission-top { padding: 18px 15px 2px; gap: 13px; }
  .mission-top h2 { font-size: 1.28rem; }
  .mission-tools { width: 100%; gap: 8px; }
  .mission-tools select { min-width: 0; max-width: 100%; flex: 1; padding: 8px 10px; font-size: .8rem; }
  .mission-tools button { padding: 8px 12px; font-size: .85rem; }
  .mission-brief { padding: 0 15px; font-size: .83rem; margin-bottom: 15px; }
  .landscape { min-height: 175px; object-fit: cover; object-position: center; }
  .map-tag { font-size: .62rem; padding: 3px 5px; bottom: 8px; }
  .map-tag.enemy { right: 4%; }
  .war-ledger { gap: 12px; padding: 17px 14px; grid-template-columns: 1fr 1fr; }
  .war-ledger strong { font-size: 2.1rem; }
  .war-ledger small { font-size: .75rem; }
  .defense-stat { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 7px 12px; border-left: 0; border-top: 1px dashed #c8b78f; padding: 12px 0 0; }
  .defense-stat p { margin: 0; }
  .defense-stat strong { font-size: 1.6rem; }
  .defense-stat .ledger-note { width: 100%; }
  .recruitment { margin-top: 23px; padding: 18px 13px; }
  .section-heading h2 { font-size: 1.28rem; }
  .counter-rule { max-width: none; width: 100%; font-size: .83rem; }
  .mobile-ledger { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 13px; margin: 0 0 12px; position: sticky; top: 8px; z-index: 4; background: #314e38; color: #f6eacd; box-shadow: 0 3px 0 #b5ac80; border-radius: 11px; font-size: .83rem; }
  .mobile-ledger b { font-size: 1.15rem; margin: 0 3px; color: #ffe2a0; }
  .troop-cards { gap: 11px; grid-template-columns: 1fr; }
  .troop-card { padding: 13px; display: grid; grid-template-columns: 1fr auto; gap: 0 10px; }
  .troop-heading { grid-column: 1; gap: 9px; }
  .troop-portrait { width: 50px; height: 54px; flex-basis: 50px; }
  .troop-cost { grid-column: 1; margin-top: 9px; }
  .troop-power { grid-column: 1; margin: 0; }
  .power-note { grid-column: 1 / -1; min-height: 0; margin: 7px 0 0; }
  .troop-picker { grid-column: 2; grid-row: 1 / 4; align-self: center; border: 0; padding: 0; flex-direction: column-reverse; gap: 4px; }
  .troop-picker button { width: 44px; height: 44px; }
  .troop-picker output { font-size: 1.25rem; }
  .supply-note { grid-column: 1 / -1; text-align: left; margin-top: 8px; }
  .command-panel { flex-direction: column; align-items: stretch; gap: 15px; margin-top: 18px; }
  .go-button { width: 100%; }
  .support-actions { gap: 10px; }
  .support-actions button { padding: 9px 11px; font-size: .82rem; }
  .battle-report:not(:empty) { padding: 13px; font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
