:root {
  color-scheme: light;
  --landscape: url("assets/ink-landscape.webp");
  --paper: #f5efe3;
  --ivory: #fffaf0;
  --cream: #ece2ce;
  --ink: #242d25;
  --muted: #5e6355;
  --jade: #1a4338;
  --jade-deep: #14382f;
  --jade-bright: #2a5c4d;
  --gold: #c8a576;
  --line: #d8c9af;
  --red: #923c2f;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Avenir Next', Avenir, 'Segoe UI', system-ui, sans-serif;
  --shadow: 0 8px 20px #3027160a;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; }
p { line-height: 1.58; }
:focus-visible { outline: 3px solid #9a4d26; outline-offset: 3px; }
[data-page-title]:focus, #main:focus { outline: 0; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip-link { position: fixed; z-index: 5; top: .8rem; left: .8rem; padding: .7rem 1rem; color: var(--jade); background: white; }
.icon { width: 1.25rem; height: 1.25rem; flex: 0 0 auto; vertical-align: middle; }
.muted { color: var(--muted); }

.masthead { background: #fbf6eb; border-bottom: 1px solid #d7c7ab; }
.masthead-inner {
  max-width: 1440px; min-height: 70px; margin: 0 auto; padding: 0 clamp(1rem, 5.15vw, 4.75rem);
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
}
.wordmark, .text-button { border: 0; background: transparent; color: var(--jade-deep); }
.wordmark {
  display: inline-flex; align-items: center; gap: .72rem; font: 600 1.21rem var(--serif); padding: 0; white-space: nowrap;
}
.seal {
  width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid #823328;
  box-shadow: inset 0 0 0 2px #f4d6b555; background: #953f31; color: #fff3df; border-radius: 2px;
}
.seal svg { width: 28px; height: 28px; }
.top-actions { display: flex; align-items: center; gap: clamp(.15rem, 2vw, 1.5rem); }
.text-button { min-height: 42px; padding: .36rem .4rem; font-size: .91rem; font-weight: 650; white-space: nowrap; }
.text-button:hover, .quiet:hover { text-decoration: underline; text-underline-offset: 4px; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .42rem;
  min-height: 46px; padding: .69rem 1.17rem; border: 1px solid transparent; border-radius: 4px;
  color: var(--jade-deep); font-size: .93rem; font-weight: 700; line-height: 1.2; text-align: center;
  transition: background-color .14s, border-color .14s, box-shadow .14s;
}
.primary { background: var(--jade); color: #fff9eb; border-color: var(--jade); box-shadow: 0 3px 6px #132f2517; }
.primary:hover:not(:disabled) { background: var(--jade-bright); border-color: var(--jade-bright); }
.secondary { border-color: #9e9c81; background: #fffaf0a8; }
.secondary:hover:not(:disabled) { background: #fffaf0; border-color: var(--jade); }
.quiet { padding-inline: .1rem; background: transparent; text-decoration: underline; text-underline-offset: 4px; }
.quiet:hover { color: var(--red); }
.light { background: #f9eccd; color: var(--jade-deep); border-color: #e0c99d; }
.light:hover { background: #fff6df; }
.primary:disabled { background: #dfd9c9; border-color: #d1c8b3; color: #5e635a; box-shadow: none; }
.icon-button {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto;
  border: 1px solid transparent; border-radius: 99px; background: transparent; color: var(--jade);
}
.icon-button:hover { background: #eae1cd; border-color: var(--line); }

.eyebrow {
  color: var(--red); font-size: .81rem; font-weight: 750; letter-spacing: .125em; line-height: 1.4;
  text-transform: uppercase;
}
.cover {
  background-color: #f1e5d0;
  background-image: linear-gradient(90deg, #f7eddb 5%, #f7eddbeb 25%, #f7eddb40 53%, transparent 72%), var(--landscape);
  background-size: cover; background-position: center, center 58%; border-bottom: 1px solid #c5a77e;
}
.cover-inner {
  max-width: 1440px; min-height: clamp(520px, 67vh, 740px); margin: 0 auto;
  padding: clamp(3.1rem, 8vh, 7rem) clamp(1rem, 7vw, 6.3rem);
  display: flex; align-items: center;
}
.cover-copy { max-width: 600px; }
.cover-rule { width: 86px; border-top: 1px solid #a68154; display: flex; align-items: center; margin-bottom: 1.32rem; }
.cover-rule span { width: 7px; height: 7px; background: var(--red); transform: rotate(45deg); margin-top: -4px; }
.cover h1 {
  color: var(--jade-deep); font-size: clamp(4.55rem, 8.95vw, 9rem);
  letter-spacing: -.081em; line-height: .86; margin: 1rem 0 1.3rem; text-wrap: balance;
}
.title-period { color: var(--red); margin-left: .025em; }
.cover-description { max-width: 395px; font-size: 1.075rem; color: #3b4738; margin: 1rem 0 1.45rem; }
.cover-actions, .demo-link { display: flex; flex-wrap: wrap; gap: .65rem; }
.cover-actions .button { padding-inline: 1.55rem; min-height: 49px; }
.demo-link { gap: 1.25rem; margin-top: .45rem; }
.demo-link .button { min-height: 42px; }
.cover-units { background: var(--jade-deep); color: #fcf2de; }
.cover-units-inner {
  max-width: 1440px; margin: 0 auto; padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 7vw, 6.3rem);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem;
}
.cover-unit { display: flex; align-items: center; gap: .82rem; }
.cover-unit + .cover-unit { border-left: 1px solid #e5caa34d; padding-left: clamp(.8rem, 1.7vw, 1.65rem); }
.unit-numeral { color: #efd2a2; font: 1.01rem var(--serif); border: 1px solid #ba996779; min-width: 33px; height: 33px; display: grid; place-items: center; border-radius: 50%; }
.cover-unit p { color: #e4c69a; font-size: .77rem; line-height: 1.1; margin-bottom: .37rem; }
.cover-unit h2 { font-size: clamp(.95rem, 1.55vw, 1.37rem); line-height: 1.13; }
.cover-credit {
  max-width: 1440px; margin: 0 auto; padding: .75rem clamp(1rem, 7vw, 6.3rem);
  font-size: .94rem; font-weight: 650; color: var(--jade-deep);
}
body[data-screen="home"] .top-actions [data-action="help"],
body[data-offline-build] .preview-link { display: none; }
.preview-link { display: inline-flex; align-items: center; text-decoration: underline; text-underline-offset: .2em; }

.campaign-banner {
  color: #fff5de; background-color: var(--jade-deep);
  background-image: linear-gradient(90deg, #102f28f8 15%, #173d33e8 58%, #173d33c4 100%), var(--landscape);
  background-position: center, right 41%; background-size: cover; border-bottom: 2px solid #b28a54;
}
.campaign-inner, .game-shell { max-width: 1440px; margin: 0 auto; padding-inline: clamp(1rem, 5.15vw, 4.75rem); }
.campaign-inner { padding-block: 1.64rem 1.5rem; }
.campaign-heading { display: flex; justify-content: space-between; gap: .8rem 2rem; align-items: end; margin-bottom: 1.3rem; }
.section-title .eyebrow { margin-bottom: .35rem; }
.campaign-heading .eyebrow { color: #efca91; }
.section-title h1 { font-size: clamp(2.4rem, 5.1vw, 4.15rem); line-height: .98; letter-spacing: -.045em; }
.section-title h2 { font-size: clamp(1.95rem, 3.6vw, 2.9rem); line-height: 1.05; letter-spacing: -.035em; }
.section-intro { margin-top: .48rem; color: var(--muted); font-size: 1rem; }
.campaign-heading .section-intro { color: #e7deb9; }
.demo-badge { align-self: end; color: #fbdfb6; font-size: .82rem; border: 1px solid #bca1748a; padding: .32rem .65rem; white-space: nowrap; }

.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .55rem; }
.stat { background: #fffaf336; border: 1px solid #d5bb8950; border-radius: 3px; min-width: 0; padding: .64rem .7rem .54rem; }
.stats-dark .stat { background: #f8efd80c; }
.stat dt { display: flex; align-items: center; gap: .42rem; font-size: .84rem; line-height: 1.2; font-weight: 600; }
.stat dt .icon { width: 1rem; height: 1rem; }
.stats-dark .stat dt .icon { color: #edc98d; }
.stat-score { display: flex; gap: .2rem; align-items: baseline; margin-top: .19rem; line-height: 1; }
.stat-score strong { font: 1.8rem var(--serif); }
.stat-score > span { font-size: .83rem; }
.stat-score .stat-change { margin-left: auto; font-weight: 750; }
.stat-change.positive { color: #cceaae; }
.stat-change.negative { color: #ffbfad; }
meter { display: block; width: 100%; height: .42rem; margin-top: .34rem; appearance: none; }
meter::-webkit-meter-bar { border: 0; background: #988b705e; border-radius: 20px; height: .42rem; }
meter::-webkit-meter-optimum-value { background: var(--jade-bright); border-radius: 20px; }
meter::-moz-meter-bar { background: var(--jade-bright); border-radius: 20px; }
.stats-dark meter::-webkit-meter-optimum-value { background: #d3b479; }
.stats-dark meter::-moz-meter-bar { background: #d3b479; }

.game-shell { padding-bottom: 3rem; }
.round-nav {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line);
  background: var(--line); margin: 1rem 0 1.55rem; border-radius: 4px; overflow: hidden;
}
.round-tab {
  display: flex; align-items: center; gap: .6rem; min-height: 60px; text-align: left; white-space: normal; min-width: 0;
  background: #f7eedb; color: #4d5144; border: 0; padding: .52rem .7rem;
}
.round-tab:hover { background: #fff9eb; }
.round-tab:focus-visible { outline-offset: -4px; }
.round-tab.viewed { background: #fffcf3; color: var(--jade-deep); box-shadow: inset 0 -3px var(--red); }
.round-tab strong { font-family: var(--serif); font-size: 1.04rem; display: block; font-weight: 600; }
.round-tab small { display: block; color: var(--muted); font-size: .78rem; margin-top: .16rem; line-height: 1.1; }
.round-marker {
  color: #856038; border: 1px solid #c5aa81; background: #f3e5c8; border-radius: 50%;
  font: 1.02rem var(--serif); width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto;
}
.round-marker .icon { width: 1rem; height: 1rem; }
.round-tab.viewed .round-marker { color: #fff5e8; background: var(--red); border-color: var(--red); }

.turn-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(242px, 281px); align-items: start; gap: clamp(1rem, 2.1vw, 2rem); }
.market { min-width: 0; }
.market-heading { min-height: 44px; margin-bottom: .92rem; display: flex; align-items: end; justify-content: space-between; gap: .45rem 1rem; }
.market-heading h2, .ledger-heading h2, .profile-panel h2, .reflection h2 { font-size: clamp(1.59rem, 2.85vw, 2.28rem); letter-spacing: -.028em; color: var(--jade-deep); }
.market-heading p { font-size: .94rem; color: var(--muted); margin-top: .24rem; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .83rem; }
.institution {
  position: relative; min-width: 0; display: flex; flex-direction: column; border: 1px solid #d3c3a6;
  border-radius: 5px; overflow: hidden; box-shadow: var(--shadow); background: #fffbf2;
}
.card-art {
  --art: #e2dfce; --ink-art: #385344; color: var(--ink-art); background-color: var(--art);
  background-image: repeating-radial-gradient(ellipse at 70% 115%, transparent 0 10px, #233e2f15 11px 12px, transparent 13px 18px);
  height: 66px; position: relative; display: flex; align-items: start; justify-content: space-between;
  border-bottom: 1px solid #c3ae8a; padding: .46rem .55rem; overflow: hidden;
}
.card-art::after { content: ''; position: absolute; inset: 4px; border: 1px solid #665b443b; pointer-events: none; }
.art-seal { --art: #ebdcd2; --ink-art: #75403b; }
.art-coin { --art: #eadcb9; --ink-art: #725525; }
.art-banner { --art: #e8d4cc; --ink-art: #793d36; }
.art-book { --art: #e3dfcd; --ink-art: #3d554a; }
.art-temple { --art: #e8d8bf; --ink-art: #65502f; }
.art-boat, .art-bridge { --art: #dce3d8; --ink-art: #365c52; }
.card-emblem { position: absolute; top: 15px; left: 50%; transform: translateX(-50%); width: 48px; height: 48px; opacity: .75; }
.card-category { z-index: 1; padding: .15rem .31rem; font-size: .73rem; font-weight: 750; border-radius: 2px; background: var(--art); }
.cost {
  display: flex; align-items: baseline; gap: .19rem; padding: .13rem .32rem; z-index: 1;
  color: #fff8e5; background: var(--jade); border-radius: 2px; white-space: nowrap;
}
.cost strong { font: 1.17rem var(--serif); line-height: 1; }
.cost small { font-size: .66rem; font-weight: 750; }
.card-body { display: flex; flex-direction: column; flex: 1; min-width: 0; padding: .71rem .72rem .73rem; }
.card-body h3 { min-height: 2.16em; color: var(--jade-deep); font-size: 1.17rem; line-height: 1.08; }
.card-body p { flex: 1; font-size: .92rem; color: #4e5548; line-height: 1.38; margin: .27rem 0 .64rem; }
.card-effects, .event-effects, .history-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .28rem; }
.chip {
  padding: .2rem .38rem; font-size: .77rem; font-weight: 750; line-height: 1.13; border-radius: 2px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.chip.positive { background: #e4ebdb; color: #245132; }
.chip.negative { background: #f4ded6; color: #812f27; }
.chip.neutral { background: #eee6d6; color: #565d52; }
.card-button, .card-status {
  width: 100%; margin-top: .68rem; min-height: 37px; padding: .36rem .28rem;
  background: #f9f2e4; border: 1px solid #d6c7ab; color: var(--jade-deep); font-size: .88rem;
}
.card-button .icon, .card-status .icon { width: 1.04rem; height: 1.04rem; }
.card-button:hover:not(:disabled) { border-color: var(--jade); background: #e9eeeb; }
.selected { border-color: var(--jade); box-shadow: inset 0 0 0 1px var(--jade), 0 4px 15px #193e341c; }
.selected .card-button, .established .card-status { background: var(--jade); color: #fff5de; border-color: var(--jade); }
.selected .card-button:hover:not(:disabled) { background: var(--jade-bright); }
.unaffordable, .locked, .archived { background: #f4efe3; }
.unaffordable .card-button, .locked .card-status, .archived .card-status { background: #eae3d3; color: #5a5d52; }
.locked .card-art, .archived .card-art { filter: saturate(.25); }
.card-status { display: flex; align-items: center; justify-content: center; gap: .45rem; border-radius: 3px; font-weight: 700; }

.sidebar { position: sticky; top: 1rem; padding-top: .2rem; }
.council, .side-detail { background: #fff9ec; border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow); }
.council { padding: .83rem 1rem 1rem; border-top: 3px solid #b78b57; }
.council-top, .selection h3 { display: flex; justify-content: space-between; gap: .4rem; align-items: center; }
.council h2 { font-size: 1.31rem; color: var(--jade-deep); }
.info-button { width: 33px; height: 33px; font-weight: 750; background: #f2e9d6; border-color: #e1d3ba; }
.resource-count { display: flex; align-items: baseline; gap: .44rem; color: var(--jade-deep); }
.resource-count strong { font: 3.25rem/1.1 var(--serif); letter-spacing: -.05em; }
.resource-count span { color: var(--muted); font-size: .91rem; }
.resource-meter { margin-block: .4rem .96rem; }
.selection { border-top: 1px solid #e4d9c3; padding-top: .67rem; min-height: 80px; }
.selection h3 { font-size: 1rem; font-weight: 600; }
.selection h3 > span, .side-detail summary span { color: var(--jade); background: #ede4d0; padding: .15rem .43rem; border-radius: 9px; font: 700 .77rem var(--sans); }
.selection p, .end-note { color: var(--muted); font-size: .85rem; margin-top: .36rem; }
.selection-list { list-style: none; padding: 0; margin: .25rem 0 .35rem; font-size: .86rem; }
.selection-list li { display: flex; align-items: center; justify-content: space-between; gap: .3rem; min-height: 36px; line-height: 1.2; }
.selection-list .icon-button { width: 35px; height: 35px; }
.selection-list .icon { width: .95rem; height: .95rem; }
.end-turn { width: 100%; }
.end-note { line-height: 1.38; margin-top: .6rem; }
.side-detail { margin-top: .52rem; }
.side-detail summary { cursor: pointer; position: relative; font-size: .9rem; font-weight: 700; min-height: 43px; padding: .68rem 3rem .55rem .7rem; }
.side-detail summary span { position: absolute; right: .72rem; top: .62rem; }
.side-detail ul, .side-detail ol { margin: .1rem 0 .75rem; padding-inline: 1.9rem .6rem; }
.side-detail li { margin-bottom: .35rem; color: var(--muted); font-size: .83rem; }
.side-detail p { color: var(--muted); padding: .05rem .75rem .75rem; font-size: .84rem; }
.history-chips { margin: .35rem 0 .6rem; }
.mobile-turnbar { display: none; }

.reveal, .chronicle { padding-top: clamp(1.2rem, 3vw, 2.15rem); }
.reveal-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.reveal-summary {
  display: grid; grid-template-columns: 1.6fr 1fr; background: #fffaf0; border: 1px solid var(--line);
  border-radius: 4px; margin-bottom: 1rem;
}
.reveal-summary > div { padding: .96rem 1.07rem; min-width: 0; }
.reveal-summary h3 { color: var(--jade-deep); font-size: 1.23rem; margin-bottom: .54rem; }
.effect-ledger { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .56rem; margin-bottom: .38rem; }
.effect-ledger dt { font-size: .88rem; font-weight: 700; margin-bottom: .32rem; }
.effect-ledger dd { display: flex; gap: .27rem; flex-wrap: wrap; font-size: .8rem; }
.effect-ledger.compact { padding: .5rem 0; }
.allocation { background: #eae2cd; border-left: 1px solid var(--line); }
.allocation-number { font: clamp(1.65rem, 3.7vw, 2.35rem)/1.05 var(--serif); color: var(--jade-deep); margin: .25rem 0; }
.allocation-number span { font: 700 .95rem var(--sans); }
.allocation-label { font-weight: 750; }
.allocation p:not(.allocation-number) { font-size: .87rem; }
.allocation .quiet { min-height: 38px; padding-block: .15rem; }
.event-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: .83rem; }
.event-card {
  background: #fffaf1; border: 1px solid var(--line); border-top: 3px solid #b28a57;
  padding: .86rem .91rem .91rem; border-radius: 4px; position: relative; box-shadow: var(--shadow);
}
.reveal .event-card { animation: settle .27s ease-out both; }
@keyframes settle { from { opacity: .5; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.event-card.conflict { background: #fff4e9; border-top-color: var(--red); }
.event-card.synergy { background: #f3f6e9; border-top-color: var(--jade-bright); }
.event-card.synergy .eyebrow { color: var(--jade); }
.event-header { display: flex; gap: .28rem .5rem; flex-wrap: wrap; align-items: start; justify-content: space-between; }
.event-header .eyebrow { margin: .15rem 0 .35rem; }
.event-card h3 { color: var(--jade-deep); font-size: 1.34rem; line-height: 1.13; margin: .26rem 0 .18rem; }
.event-trigger { color: #565b4e; font-size: .83rem; font-weight: 700; margin-bottom: .43rem; }
.event-card > p:not(.event-trigger) { font-size: .95rem; line-height: 1.53; }
.evidence { border-top: 1px solid #d7c9ae; margin-top: .63rem; padding-top: .49rem; }
.evidence strong { display: block; font-size: .85rem; margin-bottom: .1rem; color: var(--jade-deep); }
.evidence p { font-size: .87rem; color: #444b3f; line-height: 1.5; }
.evidence .references { color: #555b4e; margin-top: .34rem; font-size: .8rem; font-style: italic; }
.bottom-actions { display: flex; justify-content: flex-end; margin-top: 1rem; }

.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.profile-panel { background: #f9f7e9; border: 1px solid var(--line); border-top: 3px solid var(--jade-bright); padding: .9rem 1.1rem; border-radius: 4px; }
.profile-panel.strains { background: #fff5ea; border-top-color: var(--red); }
.profile-panel h2 { font-size: 1.53rem; }
.profile-panel ul { padding-left: 1.2rem; margin: .4rem 0 0; line-height: 1.7; }
.profile-panel p { margin-top: .4rem; }
.ledger-section { margin-top: clamp(1.65rem, 4vw, 2.8rem); }
.ledger-heading { margin-bottom: .82rem; }
.timeline { display: grid; list-style: none; padding: 0; margin: 0; gap: .6rem; }
.timeline > li { display: grid; grid-template-columns: 37px minmax(0, 1fr); gap: .62rem; position: relative; }
.timeline > li:not(:last-child)::before { content: ''; position: absolute; border-left: 1px solid #b99564; top: 37px; bottom: -.6rem; left: 18px; }
.timeline-mark {
  align-self: start; display: grid; place-items: center; height: 37px; border: 1px solid #b99564; background: #eee0c1;
  color: #714826; border-radius: 50%; font: 1.07rem var(--serif);
}
.timeline-entry { border: 1px solid var(--line); border-radius: 4px; background: #fffaf0; }
.timeline-entry summary {
  display: flex; justify-content: space-between; align-items: center; gap: .55rem;
  cursor: pointer; min-height: 65px; padding: .55rem .75rem; color: var(--jade-deep);
}
.timeline-entry summary::-webkit-details-marker { display: none; }
.timeline-entry summary::after { content: '+'; flex: 0 0 auto; font-size: 1.15rem; color: var(--red); }
.timeline-entry[open] summary::after { content: '−'; }
.timeline-entry summary:hover { background: #f8eed8; }
.timeline-entry summary > span:first-child { margin-right: auto; }
.timeline-entry summary strong { display: block; font: 1.21rem/1.08 var(--serif); }
.timeline-entry summary small { display: block; font-size: .8rem; line-height: 1.2; color: var(--muted); margin-block: .16rem; }
.timeline-summary { text-align: right; white-space: nowrap; }
.timeline-summary strong { font-size: 1rem !important; }
.timeline-content { border-top: 1px solid var(--line); padding: .78rem .85rem .85rem; }
.timeline-content > p { font-size: .9rem; line-height: 1.5; margin-bottom: .25rem; }
.timeline-content > p > strong { color: var(--jade-deep); margin-right: .2rem; }
.reflection { margin-top: 2rem; padding: 1.15rem 1.2rem; background: #eee3ca; border: 1px solid var(--line); border-radius: 4px; }
.reflection h2 { margin: .2rem 0 .4rem; }
.reflection p { margin-top: .5rem; max-width: 72ch; }

dialog {
  background: #fff8ea; color: var(--ink); border: 1px solid #b79b71; border-top: 4px solid var(--jade);
  padding: 0; width: min(560px, calc(100% - 1.5rem)); max-height: calc(100% - 1.5rem);
  border-radius: 5px; box-shadow: 0 14px 60px #0b201d52;
}
dialog::backdrop { background: #132620a0; }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: .55rem; padding: 1.1rem 1rem .55rem 1.2rem; }
.dialog-head h2 { color: var(--jade-deep); font-size: 2rem; letter-spacing: -.03em; }
.dialog-body { padding: 0 1.2rem .95rem; }
.dialog-actions { display: flex; gap: .5rem; flex-wrap: wrap; padding: .75rem 1.2rem 1rem; border-top: 1px solid var(--line); }
.rules-steps { margin: 0 0 .8rem; padding-left: 1.25rem; line-height: 1.52; }
.rules-steps li { margin-bottom: .4rem; padding-left: .2rem; }
.budget-rules { margin-top: .8rem; }
.budget-rules div { background: #f6eddc; padding: .48rem .58rem; margin-top: .3rem; }
.budget-rules dt { font-weight: 750; }
.budget-rules dd { font-size: .9rem; }
.noscript { padding: 1rem; }

@media (max-width: 1050px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-body h3 { min-height: 0; }
  .event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 790px) {
  .cover-units-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cover-unit + .cover-unit { padding-left: 0; border: 0; }
  .cover-unit:nth-child(even) { border-left: 1px solid #e5caa34d; padding-left: .85rem; }
  .turn-layout { grid-template-columns: minmax(0, 1fr) minmax(200px, 230px); gap: .8rem; }
  .round-tab { gap: .38rem; padding-inline: .43rem; }
  .round-marker { width: 28px; height: 28px; }
  .round-tab strong { font-size: .94rem; }
}
@media (max-width: 630px) {
  .masthead-inner { min-height: 58px; }
  .top-actions { flex-wrap: wrap; justify-content: flex-end; }
  .wordmark { gap: .35rem; font-size: 1.02rem; }
  .seal { width: 28px; height: 28px; }
  .seal svg { width: 22px; height: 22px; }
  .text-button { font-size: .83rem; padding-inline: .27rem; }
  .cover {
    background-position: center, 57% center;
    background-image: linear-gradient(90deg, #f7eddbef, #f7eddbbc 61%, #f7eddb3b), var(--landscape);
  }
  .cover-inner { min-height: clamp(475px, 69vh, 590px); padding-block: 2rem; }
  .cover h1 { font-size: clamp(4rem, 14vw, 6.5rem); }
  .cover-description { max-width: 325px; }
  .cover-units-inner { gap: .8rem .5rem; }
  .cover-unit { gap: .42rem; }
  .unit-numeral { min-width: 28px; height: 28px; font-size: .87rem; }
  .campaign-inner { padding-block: 1rem .85rem; }
  .campaign-heading { flex-wrap: wrap; margin-bottom: .75rem; }
  .stats { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .3rem; }
  .stat { grid-column: span 2; padding: .39rem .43rem; }
  .stat:nth-child(n+4) { grid-column: span 3; }
  .stat dt { font-size: .77rem; gap: .22rem; }
  .stat dt .icon { width: .82rem; height: .82rem; }
  .stat-score strong { font-size: 1.4rem; }
  .stat-score > span { font-size: .73rem; }
  .round-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: .65rem 0 1rem; }
  .round-tab { min-height: 48px; }
  .turn-layout { display: block; }
  .market-heading { min-height: initial; align-items: start; margin-bottom: .65rem; }
  .sidebar { position: static; margin-top: .9rem; }
  .mobile-turnbar {
    display: flex; align-items: center; justify-content: space-between; gap: .6rem;
    position: sticky; bottom: 0; z-index: 2; background: #fff8e8; border-top: 1px solid #cdb58b;
    padding: .5rem 1rem calc(.5rem + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -6px 18px #3b321320;
  }
  .game-shell { padding-bottom: 1.6rem; }
  .reveal-summary { grid-template-columns: minmax(0, 1fr); }
  .allocation { border-left: 0; border-top: 1px solid var(--line); }
  .reveal-head { align-items: start; flex-direction: column; gap: .6rem; }
  .profile-grid { grid-template-columns: 1fr; }
  .chronicle-banner .campaign-heading .button { min-height: 37px; }
}
@media (max-width: 465px) {
  .event-grid { grid-template-columns: 1fr; }
  .card-grid { gap: .56rem; }
  .card-art { padding-inline: .36rem; height: 58px; }
  .card-body { padding-inline: .52rem; }
  .card-body h3 { font-size: 1.08rem; }
  .card-body p { font-size: .86rem; }
  .card-category { font-size: .69rem; }
  .card-emblem { top: 16px; width: 38px; height: 38px; }
  .effect-ledger { grid-template-columns: 1fr; gap: .32rem; }
  .effect-ledger > div { display: grid; grid-template-columns: 115px minmax(0, 1fr); align-items: baseline; gap: .32rem; }
  .effect-ledger dt { margin-bottom: 0; }
  .timeline > li { grid-template-columns: 28px minmax(0, 1fr); gap: .36rem; }
  .timeline-mark { height: 28px; }
  .timeline > li:not(:last-child)::before { left: 14px; top: 28px; }
  .timeline-entry summary { padding-inline: .48rem; }
}
@media (max-width: 350px) {
  .card-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  :root, .campaign-banner, .stats-dark .stat, .event-card, .reflection { color: #111; background: white; }
  .masthead, .button, .interactions-summary, .mobile-turnbar, dialog { display: none !important; }
  .campaign-inner, .game-shell { padding-inline: 0; }
  .campaign-heading .eyebrow, .campaign-heading .section-intro, .stats-dark .stat dt .icon, .stat-change.positive, .stat-change.negative { color: #292929; }
  .event-card, .profile-panel, .reflection { break-inside: avoid; box-shadow: none; }
  .timeline-entry summary::after { display: none; }
  .event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
