/* The Campaign */
.intro-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 860px) { .intro-grid { grid-template-columns: 1.3fr 1fr; } }
.intro-art { max-width: 420px; margin-inline: auto; width: 100%; }
.how { padding-left: 1.2rem; margin: 0 0 1.4rem; }
.how li { margin-bottom: .45rem; }
.label-like { font-weight: 600; font-size: .92rem; display: block; margin-bottom: .4rem; }

/* status bar */
.statusbar {
  position: sticky; top: 58px; z-index: 30;
  background: var(--paper); border-bottom: 1px solid var(--line);
  display: grid; gap: .5rem 1.2rem; padding: .7rem 0;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .statusbar { grid-template-columns: auto 1.2fr 2fr; align-items: center; }
}
@media (max-width: 700px) { .statusbar { position: static; } }
.status-date { display: flex; flex-direction: column; line-height: 1.2; }
.status-date strong { font-family: var(--font-display); font-size: 1.05rem; }
.sd-week { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--copper); font-weight: 700; }
.fund-top { display: flex; align-items: baseline; gap: .2rem; font-size: .95rem; }
.fund-top strong { font-family: var(--font-display); font-size: 1.35rem; }
.bar { position: relative; height: 12px; background: var(--paper-3); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--copper), var(--gold-bright) 60%, var(--verd-2)); transition: width .8s ease; }
.status-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
@media (max-width: 560px) { .status-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.stat-k { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.stat-v { font-weight: 700; font-family: var(--font-display); font-size: 1.1rem; }
.stat-v.small { font-size: .8rem; font-family: var(--font-body); color: var(--muted); }
.meter { display: block; height: 8px; border-radius: 999px; background: var(--paper-3); overflow: hidden; border: 1px solid var(--line); }
.meter span { display: block; height: 100%; width: 0; background: var(--verd); transition: width .6s ease; }
.meter-red span { background: var(--copper); }
.meter-red.danger span { background: var(--red); animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: 1; } to { opacity: .55; } }

/* game grid */
.game-grid { display: grid; gap: 1.5rem; padding: 1.2rem 0 2rem; grid-template-columns: 1fr; }
@media (min-width: 980px) { .game-grid { grid-template-columns: 1.35fr 1fr; align-items: start; } .side { position: sticky; top: 150px; } }

.slot { border: 0; padding: 0; margin: 0 0 1.4rem; min-width: 0; }
.slot legend { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin-bottom: .6rem; display: flex; align-items: center; gap: .5rem; padding: 0; }
.step { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--paper); font: 700 .9rem var(--font-body); }
.opts { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.opts.letters { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.opt { position: relative; display: block; cursor: pointer; margin: 0; font-weight: 400; font-size: .92rem; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt-body {
  display: flex; flex-direction: column; gap: .3rem; height: 100%;
  background: var(--paper-2); border: 2px solid var(--line); border-radius: var(--radius);
  padding: .75rem .8rem; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.opt:hover .opt-body { border-color: var(--verd-2); transform: translateY(-2px); }
.opt input:checked + .opt-body { border-color: var(--verd); box-shadow: 0 0 0 3px var(--verd-soft), var(--shadow); background: var(--paper); }
.opt input:focus-visible + .opt-body { outline: 3px solid var(--gold-bright); outline-offset: 2px; }
.opt-top { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.opt-title { font-family: var(--font-display); font-size: 1.05rem; line-height: 1.2; }
.opt-blurb { color: var(--muted); font-size: .86rem; line-height: 1.4; }
.opt-place { font-size: .8rem; color: var(--copper); font-weight: 600; }
.opt-letter .opt-blurb { font-family: var(--font-display); font-style: italic; color: var(--ink); font-size: .95rem; }
.amt { margin-left: auto; font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.tag { font: 700 .62rem/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; padding: .28rem .45rem; border-radius: 4px; background: var(--paper-3); color: var(--ink); }
.tag-people { background: #d6ebe3; color: #1f5c50; }
.tag-shame { background: #e8dccb; color: #4a3b24; }
.tag-children { background: #f6e3b6; color: #6d4c00; }
.tag-nation { background: #e1dcf0; color: #46387a; }
.tag-france { background: #d8e3f3; color: #1f4f8a; }
.tag-rival { background: #f3d6cf; color: #8c2a1a; }
.tag-progress { background: #f1d8c4; color: #8a4520; }
.tag-patriot { background: #dbe8f0; color: #1c4b66; }
.tag-humor { background: #f4e7c8; color: #765211; }
.tag-spectacle { background: #efdcea; color: #7a2f68; }
.hist { font: 700 .62rem/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; padding: .28rem .45rem; border-radius: 4px; border: 1px solid var(--copper); color: var(--copper); }
.invented { font: 600 .62rem/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; padding: .28rem .45rem; border-radius: 4px; border: 1px dashed var(--line); color: var(--muted); }
.fxs { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: auto; padding-top: .2rem; }
.fx { font: 600 .72rem/1 var(--font-body); padding: .28rem .42rem; border-radius: 999px; background: var(--paper-3); }
.fx-good { background: var(--verd-soft); color: var(--verd); }
.fx-bad { background: #f3d6cf; color: #8c2a1a; }
[data-theme="dark"] .fx-bad { background: #3d211b; color: var(--red); }
.fx-cash { background: #f6e3b6; color: #6d4c00; }
[data-theme="dark"] .fx-cash { background: #3a2f12; color: var(--gold); }
.tired { font-size: .74rem; color: var(--red); font-weight: 600; }

/* front page preview */
.frontpage { border-radius: 4px; }
.frontpage .masthead { font-size: clamp(2rem, 7vw, 3rem); }
.pv-headline { font-family: var(--font-display); font-size: clamp(1.3rem, 4vw, 1.8rem); text-align: center; line-height: 1.1; margin: .2rem 0 .8rem; text-transform: uppercase; }
.pv-headline.empty { color: #9a8f7a; font-style: italic; text-transform: none; font-weight: 400; }
.pv-cols { display: grid; grid-template-columns: 1fr 1.3fr; gap: .8rem; border-top: 1px solid #1c1914; padding-top: .7rem; }
.pv-cartoon { border-right: 1px solid #c4b48f; padding-right: .7rem; }
.pv-cartoon-art { aspect-ratio: 12 / 7; background: #e8dec5; border: 1px solid #c4b48f; margin-bottom: .4rem; }
.pv-cartoon-art img { display: block; width: 100%; height: 100%; }
.pv-cartoon p { font-family: var(--font-display); font-style: italic; font-size: .82rem; margin: 0; line-height: 1.3; }
.pv-benefit { font-size: .82rem; line-height: 1.4; margin-bottom: .6rem; }
.pv-letter { margin: 0; font-family: var(--font-display); font-style: italic; font-size: .88rem; line-height: 1.35; border-left: 3px solid #a8562a; padding-left: .6rem; }
.pv-letter cite { display: block; font-style: normal; font-family: var(--font-body); font-size: .74rem; color: #5a5144; margin-top: .3rem; }
.pv-harmony { margin: .8rem 0 0; padding: .5rem .7rem; background: #d6ebe3; color: #1f5c50; font-size: .8rem; font-weight: 600; border-radius: 4px; }
.press-btn { width: 100%; margin: 1rem 0; font-size: 1.05rem; }
.press-btn:not([disabled]) { animation: ready 1.6s ease-in-out infinite; }
@keyframes ready { 0%, 100% { box-shadow: 0 0 0 0 rgba(233,169,42,.55); } 50% { box-shadow: 0 0 0 8px rgba(233,169,42,0); } }
.pedestal-card { padding: .6rem; }

/* scene */
.pd-svg { display: block; width: 100%; height: auto; border-radius: 8px; }
.pd-sky { fill: #dfe9e6; }
[data-theme="dark"] .pd-sky { fill: #12232c; }
.pd-water { fill: #6c9fa6; }
[data-theme="dark"] .pd-water { fill: #24505a; }
.pd-wave { stroke: rgba(255,255,255,.6); fill: none; stroke-width: 1.5; }
.pd-land { fill: #8d9b6a; }
[data-theme="dark"] .pd-land { fill: #3f4d33; }
.pd-fort { fill: #b6a988; }
[data-theme="dark"] .pd-fort { fill: #6b6450; }
.pd-ghost { fill: none; stroke: var(--muted); stroke-dasharray: 3 3; stroke-width: 1; opacity: .7; }
.pd-ped { fill: #cdbf9d; stroke: #8f8264; stroke-width: 1; }
[data-theme="dark"] .pd-ped { fill: #a59a7c; }
.pd-course { stroke: #8f8264; stroke-width: .6; }
.pd-crate { fill: #b07c47; stroke: #6d4a25; stroke-width: 1; }
.pd-crate-line { stroke: #6d4a25; stroke-width: .8; }
.pd-ship path, .pd-ship rect { fill: #3b342a; }
.pd-ship .pd-sail { fill: #f4eddc; }
.pd-statue { transition: transform 2.6s cubic-bezier(.2,.8,.2,1); }
.pd-glow { fill: rgba(233,169,42,.35); animation: glow 1.8s ease-in-out infinite alternate; }
@keyframes glow { from { opacity: .3; } to { opacity: 1; } }

/* dialogs */
.overlay {
  position: fixed; inset: 0; z-index: 120; background: rgba(15,12,8,.6);
  display: grid; place-items: center; padding: 1rem; overflow-y: auto;
}
.overlay[hidden] { display: none; }
.dialog { width: min(560px, 100%); border-radius: 8px; padding: 1.4rem; animation: drop .35s ease; max-height: calc(100vh - 2rem); overflow-y: auto; }
.dialog h2 { margin-top: .6rem; }
.dialog.report { background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
@keyframes drop { from { transform: translateY(-14px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.ev-choices { display: grid; gap: .6rem; margin: 1rem 0; }
.ev-choice { justify-content: space-between; flex-wrap: wrap; text-align: left; border-radius: 10px; border-color: #1c1914; color: #1c1914; }
.ev-choice:hover { color: #1c1914; background: #e8dec5; }
.ev-check { padding: .6rem .8rem; border-radius: 6px; font-weight: 600; font-size: .92rem; }
.ev-check.pass { background: #d6ebe3; color: #1f5c50; }
.ev-check.fail { background: #f3d6cf; color: #8c2a1a; }
.ev-result { font-style: italic; font-family: var(--font-display); font-size: 1.05rem; }
.rp-lines { list-style: none; padding: 0; margin: 0 0 1rem; }
.rp-lines li { display: grid; grid-template-columns: 1fr auto; gap: 0 .8rem; padding: .45rem 0; border-bottom: 1px dashed var(--line); }
.rp-lines li em { grid-column: 1 / -1; font-style: normal; font-size: .8rem; color: var(--muted); }
.rp-lines li em:empty { display: none; }
.rp-lines .rp-deltas { display: flex; flex-wrap: wrap; gap: .4rem; border: 0; }
.rp-deltas span { font-size: .82rem; font-weight: 700; padding: .25rem .5rem; border-radius: 999px; }
.rp-deltas .up { background: var(--verd-soft); color: var(--verd); }
.rp-deltas .down { background: #f3d6cf; color: #8c2a1a; }
[data-theme="dark"] .rp-deltas .down { background: #3d211b; color: var(--red); }
.rp-lines .rp-syn { display: block; font-size: .85rem; color: var(--verd); font-weight: 600; border: 0; }
.rp-lines .rp-warn { display: block; color: var(--red); font-weight: 700; border: 0; }
.rp-names { font-family: var(--font-display); font-size: .9rem; line-height: 1.5; padding: .7rem; background: var(--paper-2); border-radius: 6px; margin-bottom: 1rem; }

/* result */
.final { padding: 1.4rem; }
.final-headline { font-family: var(--font-display); font-size: clamp(1.8rem, 6vw, 3.2rem); text-align: center; line-height: 1.05; margin: .4rem 0 .5rem; }
.final-deck { text-align: center; font-family: var(--font-display); font-style: italic; font-size: 1.15rem; border-bottom: 1px solid #1c1914; padding-bottom: .8rem; }
.final-cols { display: grid; gap: 1.2rem; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 700px) { .final-cols { grid-template-columns: 300px 1fr; } }
.final-art { max-width: 300px; margin-inline: auto; width: 100%; }
.stamp {
  display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; text-transform: uppercase;
  border: 3px solid #2a7566; color: #2a7566; padding: .25rem .7rem; transform: rotate(-3deg); margin: 0 0 .6rem;
}
.final.lose .stamp { border-color: #9b2d1c; color: #9b2d1c; }
.final-note { font-weight: 700; }
.result-stats { margin-top: 1rem; }
.stat-card { display: flex; flex-direction: column; gap: .2rem; padding: .8rem 1rem; }
.stat-card strong { font-family: var(--font-display); font-size: 1.3rem; }
.result-canvas { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; display: block; }
.history { padding-left: 1.2rem; margin: 0; }
.history li { margin-bottom: .45rem; }
