:root {
  color-scheme: light;
  font: 100%/1.55 "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --paper: #f7f2e7;
  --cream: #fffaf0;
  --ink: #272b23;
  --muted: #665e4e;
  --subtle: #766e5e;
  --line: #d7cbb6;
  --green: #263e31;
  --gain: #24583a;
  --loss: #a1402c;
  --rust: #9d422d;
  --serif: Georgia, "Noto Serif KR", "Noto Serif CJK KR", "Batang", serif;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background: radial-gradient(ellipse at 50% 0%, #fdf9ef, var(--paper) 60%, #eee6d5);
}
h1, h2, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: #735039; text-underline-offset: .22em; overflow-wrap: anywhere; }
a:hover { color: var(--rust); }
.noscript { padding: 2rem; text-align: center; }

.page {
  width: min(100%, 35rem);
  min-height: min(52rem, 100svh);
  margin: 0 auto;
  padding: 1.6rem 1.45rem max(1.4rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}
.story-page { gap: 1rem; min-height: min(46rem, 100svh); }
.setup-page { min-height: min(41rem, 100svh); }
.illustration {
  position: relative;
  width: 100%;
  height: clamp(9rem, 26vw, 13.75rem);
  border: 1px solid #81725d;
  border-radius: .48rem;
  background: #60554a;
  overflow: hidden;
  box-shadow: 0 .35rem 1.25rem #5040241b;
}
.illustration::after {
  position: absolute;
  inset: .38rem;
  content: "";
  border: 1px solid #f6ead65c;
  border-radius: .26rem;
  pointer-events: none;
}
.illustration img { object-position: center 54%; }
.compact-art { height: clamp(5.55rem, 19vw, 10rem); }
.outcome-art { height: clamp(6rem, 19vw, 9rem); }

.home {
  justify-content: center;
  align-items: center;
  gap: 1.55rem;
  min-height: 100svh;
}
.cover-art { height: auto; aspect-ratio: 1.68; }
.cover-art::after { inset: .55rem; }
.cover-art img { object-position: center 57%; }
.intro { text-align: center; }
.wordmark {
  color: #263b2d;
  font: 700 clamp(1.8rem, 7.35vw, 3.1rem)/1.05 var(--serif);
  letter-spacing: -.04em;
  word-break: keep-all;
}
.home-wordmark { line-height: 1.13; text-wrap: balance; }
.home-wordmark span { display: block; color: var(--rust); }
.intro p {
  margin-top: .85rem;
  color: var(--muted);
  font-size: clamp(.94rem, 4vw, 1.11rem);
  line-height: 1.65;
  word-break: keep-all;
}
.machine-note {
  margin: .67rem auto;
  color: var(--ink);
  font-size: clamp(.94rem, 4vw, 1.09rem);
  font-weight: 650;
  line-height: 1.6;
  word-break: keep-all;
}
.intro .mission { margin-top: .45rem; color: var(--muted); }
.actions { min-width: 0; }
.home-actions { width: 100%; }
.aux-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem .75rem; }
.aux-actions .back { margin-inline: 0; }

.status { display: flex; justify-content: space-between; align-items: center; gap: .7rem; padding: .1rem 0 .02rem; }
.progress { display: grid; gap: .34rem; font-size: .875rem; font-weight: 650; color: var(--muted); }
.progress strong { color: var(--ink); }
.counter-divider { color: var(--subtle); }
.progress-track { display: flex; gap: .2rem; }
.progress-track i { width: .76rem; height: .19rem; background: #d7cbb5; border-radius: 1rem; }
.progress-track .reached { background: var(--rust); }
.balance { display: flex; align-items: baseline; gap: .44rem; white-space: nowrap; color: var(--green); }
.balance-label { color: var(--muted); font-size: .83rem; font-weight: 600; }
.balance strong { font: 700 clamp(1.35rem, 5.7vw, 1.75rem)/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.unit { margin-inline-start: .2em; font-size: .7em; }
.place { color: var(--rust); font-size: .86rem; font-weight: 720; letter-spacing: .005em; }
.scene h2, .outcome h1 {
  margin-top: .28rem;
  color: #30362b;
  font: 740 clamp(1.4rem, 6.3vw, 2.05rem)/1.21 var(--serif);
  letter-spacing: -.052em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.scene-text, .outcome-text, .history p, .type-line {
  color: var(--muted);
  line-height: 1.57;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.story-page .scene { margin-top: auto; }
.scene-text { margin-top: .5rem; }
.arrival-context + .market-situation { margin-top: .85rem; }
.market-situation { color: var(--ink); line-height: 1.68; }
.compact-scene { text-align: center; padding: .32rem 0 .76rem; }
.selected-choice { font-weight: 730; font-size: clamp(1.02rem, 4.6vw, 1.23rem); margin-top: .25rem; word-break: keep-all; }
.selected-stake { margin-top: .2rem; color: var(--muted); font-size: .92rem; }
.story-page .actions { margin-top: auto; }
.story-page:is(.stake-page, .checkpoint-page) :is(.scene, .actions) { margin-top: 0; }
.question { font-size: 1.09rem; margin-bottom: .48rem; letter-spacing: -.027em; }
.choice-stack { display: grid; gap: .44rem; }
.choice, .primary {
  display: flex;
  width: 100%;
  align-items: center;
  gap: .4rem;
  min-height: 3rem;
  border-radius: .43rem;
  border: 1px solid var(--line);
  padding: .48rem .85rem;
  font-size: .98rem;
  font-weight: 690;
  line-height: 1.35;
  text-align: left;
  word-break: keep-all;
  overflow-wrap: anywhere;
  transition: background .16s, border-color .16s;
}
.choice {
  justify-content: space-between;
  color: var(--ink);
  background: var(--cream);
  box-shadow: 0 1px 1px #493b1e0b;
}
.choice:hover { border-color: #a89878; background: #f0e7d5; }
.choice:active { background: #e9dcc4; }
.choice strong { font-size: 1.03rem; }
.stake-label, .option-detail { color: var(--muted); font-size: .86rem; }
.stake-label { margin-inline-start: .25rem; }
.option-detail { flex: none; font-variant-numeric: tabular-nums; }
.trade-figures { display: block; text-align: end; }
.trade-figures small { display: block; font-size: .8rem; }
.primary {
  min-height: 3.25rem;
  justify-content: center;
  text-align: center;
  color: #fff9ec;
  font-weight: 730;
  border-color: var(--green);
  background: var(--green);
  box-shadow: 0 .21rem .55rem #29392d24;
}
.primary:hover { background: #36523f; }
.primary:active { background: #1d3025; }
.back {
  display: block;
  min-height: 2.75rem;
  margin: .27rem auto -.23rem;
  padding: .25rem .8rem;
  border: 0;
  border-radius: .38rem;
  background: none;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 650;
}
.back:hover { background: #ede3d0; }

.outcome { display: flex; align-items: center; flex-direction: column; text-align: center; }
.change { color: var(--green); font: 700 clamp(2.35rem, 10vw, 3.7rem)/1.06 var(--serif); font-variant-numeric: lining-nums tabular-nums; margin-top: .28rem; }
.trade-return { margin-top: .24rem; color: var(--muted); font-size: .88rem; }
.trade-return strong { margin-inline-start: .2rem; font-size: 1rem; font-variant-numeric: tabular-nums; }
.settled-choice { margin-top: .5rem; font-size: .88rem; font-weight: 650; word-break: keep-all; }
.settled-choice span { color: var(--muted); font-weight: 500; }
.outcome-text { margin-top: .54rem; }
.gain { color: var(--gain); }
.loss { color: var(--loss); }
.history {
  border-top: 1px solid var(--line);
  padding: .8rem 0 .3rem;
}
.history h2 { font-size: 1rem; margin-bottom: .3rem; }
.history p { font-size: .94rem; }
.source-links { display: flex; flex-wrap: wrap; gap: .2rem .8rem; margin-top: .52rem; font-size: .78rem; }
.source-links a { min-height: 1.5rem; display: inline-flex; align-items: center; }
.footer-actions { margin-top: .85rem; width: 100%; }

.end-page { min-height: 100svh; justify-content: center; gap: .65rem; }
.end-page .footer-actions { display: grid; gap: .46rem; }
.end-page .footer-actions .choice { justify-content: center; text-align: center; }
.shared-caption { color: var(--green); font-weight: 720; }
.preview-note { color: var(--muted); font-size: .9rem; font-weight: 700; }
.preview-home { display: grid; place-items: center; }
.result-ad-slot:not([hidden]) {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 6.25rem;
  margin-top: 3rem;
  padding: .9rem;
  border: 1px dashed var(--line);
  border-radius: .45rem;
  color: var(--muted);
  font-size: .84rem;
  text-align: center;
}
.share-card {
  --card-accent: #915238;
  overflow: hidden;
  border: 1px solid #c8ae86;
  border-radius: .68rem;
  background: #fff8e8;
  box-shadow: 0 .65rem 1.6rem #4d3e2820;
  text-align: center;
}
.share-contrary, .share-contrary-patient { --card-accent: #78516c; }
.share-careful, .share-careful-quick, .share-careful-patient, .share-flexible, .share-balanced { --card-accent: #475b3e; }
.share-patient, .share-quick { --card-accent: #53636e; }
.share-illustration { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; height: clamp(6.6rem, 24vw, 10.5rem); gap: 2px; background: #c6ab84; }
.share-illustration img { object-position: center 53%; }
.share-content { padding: clamp(1.15rem, 5vw, 2rem) 1rem 1.45rem; }
.share-brand { font-size: .88rem; letter-spacing: .035em; margin-bottom: .63rem; }
.share-card h1 {
  color: var(--card-accent);
  font: 750 clamp(1.35rem, 6.15vw, 2.31rem)/1.18 var(--serif);
  letter-spacing: -.054em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.type-line { margin-top: .55rem; font-size: .97rem; }
.final-asset {
  display: grid;
  justify-items: center;
  gap: .17rem;
  width: min(100%, 16rem);
  border-top: 1px solid #d8c3a0;
  padding-top: .75rem;
  margin: .9rem auto 0;
  font-size: .86rem;
  color: var(--muted);
}
.final-asset strong { color: var(--green); font: 700 clamp(2.2rem, 9.4vw, 3.6rem)/1.12 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.result-performance {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 17rem);
  margin: .75rem auto 0;
  padding: .55rem .15rem;
  border: 1px solid #e2cfad;
  border-radius: .45rem;
  background: #fbefd8;
}
.result-performance div + div { border-left: 1px solid #e2cfad; }
.result-performance dt { color: var(--muted); font-size: .84rem; }
.result-performance dd { margin: .12rem 0 0; font-weight: 760; font-size: 1.18rem; overflow-wrap: anywhere; }
.trip-memoir {
  width: min(100%, 26rem);
  margin: 1.05rem auto 0;
  padding: .85rem .85rem .15rem;
  border: 1px solid #d8c3a0;
  border-radius: .48rem;
  background: var(--cream);
  text-align: left;
}
.trip-memoir h2 { color: var(--green); font: 700 1.15rem/1.4 var(--serif); }
.memoir-intro { margin-top: .3rem; color: var(--muted); font-size: .9rem; }
.trip-memoir summary {
  min-height: 2.75rem;
  padding-block: .6rem;
  color: var(--green);
  cursor: pointer;
  font-weight: 700;
}
.memoir-chapters { margin: 0; padding-left: 1.3rem; }
.memoir-chapters > li { padding: .85rem 0; border-top: 1px solid var(--line); }
.memoir-chapters > li::marker { color: var(--rust); font-weight: 700; }
.memoir-era { display: flex; align-items: center; gap: .55rem; }
.memoir-era img { flex: 0 0 3.25rem; width: 3.25rem; height: 2.5rem; border-radius: .25rem; }
.memoir-era h3 { margin: 0; color: var(--green); font-size: .98rem; line-height: 1.3; word-break: keep-all; }
.memoir-era p { color: var(--muted); font-size: .81rem; }
.memoir-chapters > li > p { margin-top: .38rem; font-size: .9rem; overflow-wrap: anywhere; }
.memoir-reason { color: var(--muted); }
.memoir-ending { border-top: 1px solid var(--line); padding-block: .75rem; font-size: .9rem; }
.travel-benchmark { width: min(100%, 22rem); margin: .8rem auto 0; }
.benchmark-score { display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: .1rem .55rem; }
.benchmark-score span, .travel-benchmark details { color: var(--muted); font-size: .87rem; }
.benchmark-score strong { color: var(--green); font-size: 1.28rem; }
.travel-benchmark details { margin-top: .24rem; }
.travel-benchmark summary { width: fit-content; margin-inline: auto; padding: .2rem .35rem; cursor: pointer; }
.travel-benchmark details p { margin-top: .35rem; }
.trip-highlights { width: min(100%, 22rem); margin: .95rem auto 0; text-align: left; }
.trip-highlights div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .6rem;
  align-items: center;
  padding: .5rem 0;
  border-top: 1px solid var(--line);
  font-size: .89rem;
}
.trip-highlights dt { word-break: keep-all; overflow-wrap: anywhere; }
.trip-highlights dt small { display: block; color: var(--muted); font-size: .75rem; }
.trip-highlights dd { margin: 0; font-weight: 720; white-space: nowrap; }

@media (max-width: 37.5rem) {
  .page { min-height: 100svh; padding: .87rem .97rem max(.87rem, env(safe-area-inset-bottom)); }
  .home { gap: 1.3rem; }
  .story-page { gap: .72rem; }
  .illustration:not(.cover-art, .compact-art, .outcome-art) { height: clamp(9rem, 52vw, 13rem); }
  .compact-art { height: clamp(7rem, 39vw, 10rem); }
  .scene-text { margin-top: .4rem; font-size: .96rem; }
  .choice { min-height: 2.95rem; }
  .result-actions {
    position: sticky;
    z-index: 1;
    bottom: 0;
    padding: .55rem 0 max(.55rem, env(safe-area-inset-bottom));
    background: linear-gradient(transparent, var(--paper) .55rem);
  }
}
@media (max-width: 30rem) and (max-height: 44rem) {
  .page { padding-block-start: .64rem; }
  .illustration:not(.cover-art, .compact-art, .outcome-art) { height: 6.95rem; }
  .compact-art, .outcome-art { height: 5.7rem; }
  .story-page { gap: .58rem; }
  .choice-stack { gap: .34rem; }
  .choice { min-height: 2.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

button:disabled { cursor: wait; opacity: .68; }
.game-message { color: var(--loss); margin: 0 0 .45rem; font-size: .88rem; }
#leaderboard, #result-share, #era-catalog, #leave-journey {
  width: min(calc(100% - 1.6rem), 31rem);
  max-height: 88svh;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: .68rem;
  color: var(--ink);
  background: var(--cream);
  box-shadow: 0 .5rem 3rem #2a241c48;
}
#leaderboard::backdrop, #result-share::backdrop, #era-catalog::backdrop, #leave-journey::backdrop {
  background: #272b2368;
}
#leave-journey { width: min(calc(100% - 1.6rem), 24rem); }
#leave-title { font: 740 1.33rem/1.3 var(--serif); }
#leave-warning { margin-top: .45rem; color: var(--muted); word-break: keep-all; }
.leave-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem;
  margin-top: 1rem;
}
.leave-actions .choice { min-height: 3rem; justify-content: center; text-align: center; }
.board-header { display: flex; justify-content: space-between; align-items: center; gap: .55rem; }
.board-header h2 { font: 740 1.4rem/1.25 var(--serif); }
.board-close {
  display: grid; place-items: center;
  flex: none; width: 2.75rem; height: 2.75rem;
  padding: 0; border: 1px solid var(--line); border-radius: .35rem;
  background: var(--paper); font-size: 1.4rem;
}
#era-catalog[open] { display: flex; flex-direction: column; }
.era-guide { margin-top: .6rem; color: var(--muted); font-size: .94rem; word-break: keep-all; }
.era-list { min-height: 0; margin-top: .8rem; padding-inline: .25rem; overflow-y: auto; overscroll-behavior: contain; }
.era-entry { border-top: 1px solid var(--line); }
.era-entry summary {
  position: relative;
  display: grid;
  gap: .1rem;
  padding: .62rem 2rem .62rem .2rem;
  cursor: pointer;
  list-style: none;
  word-break: keep-all;
}
.era-entry summary::-webkit-details-marker { display: none; }
.era-entry summary::after {
  content: "";
  position: absolute;
  inset: .95rem .48rem auto auto;
  width: .8rem;
  height: .8rem;
  background:
    linear-gradient(var(--muted), var(--muted)) center / 100% 2px no-repeat,
    linear-gradient(var(--muted), var(--muted)) center / 2px 100% no-repeat;
}
.era-entry[open] summary::after { background-size: 100% 2px, 0 0; }
.era-entry summary:hover, .era-entry summary:focus-visible { color: var(--green); background: var(--paper); }
.era-entry summary:focus-visible { outline: 2px solid var(--rust); outline-offset: -2px; }
.era-entry summary span, .era-dates dt { color: var(--muted); font-size: .875rem; }
.era-entry-content { padding: .1rem .2rem .85rem; }
.era-entry-content img { aspect-ratio: 2.4; height: auto; border-radius: .35rem; background: var(--paper); }
.era-entry-content h3 { margin: .7rem 0 .25rem; font-size: .96rem; }
.era-dates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; margin: 0; }
.era-dates div { padding: .35rem; border-radius: .35rem; background: var(--paper); }
.era-dates dd { margin: 0; font-size: .875rem; font-weight: 650; }
.era-entry-content ul { margin: 0; padding-inline-start: 1.2rem; }
.era-entry-content li + li { margin-top: .13rem; }
.board-guide {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline;
  gap: .15rem .55rem; margin-top: .7rem; color: var(--muted); font-size: .82rem;
}
.board-count { font-weight: 720; white-space: nowrap; }
.board-count:empty { display: none; }
.board-identity, .board-device { color: var(--muted); font-size: .8rem; margin-top: .6rem; }
.board-identity { color: var(--green); font-weight: 680; }
.board-identity:empty { display: none; }
.rankings .own-tag { color: var(--green); font-weight: 720; }
#result-share { width: min(calc(100% - 1.6rem), 26rem); }
.share-image-frame {
  display: grid;
  place-items: center;
  width: min(100%, 16rem, 26svh);
  aspect-ratio: 9 / 16;
  margin: .7rem auto .85rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .4rem;
  background: var(--paper);
  color: var(--muted);
  text-align: center;
  box-shadow: 0 .3rem .8rem #272b2319;
}
.share-image-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.share-card-actions { display: flex; gap: .45rem; }
.share-card-actions .choice { flex: 1; justify-content: center; text-align: center; }
.share-image-help { margin-top: .45rem; color: var(--muted); font-size: .88rem; text-align: center; word-break: keep-all; }
#leaderboard .board-header {
  position: sticky;
  top: -1rem;
  z-index: 1;
  padding-block: .3rem;
  background: var(--cream);
}
.score-form { margin-top: .85rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: .3rem; }
.result-score { width: min(100%, 22rem); margin: .85rem auto 0; text-align: left; }
.score-note { margin: .85rem auto 0; color: var(--muted); font-size: .88rem; }
.admin-score-note { color: var(--muted); font-size: .82rem; }
.score-form label { color: var(--muted); font-size: .88rem; font-weight: 650; }
.score-form > div { display: flex; min-width: 0; gap: .38rem; }
.score-form input {
  width: 0; min-width: 0; flex: 1 1 0; padding: .45rem .55rem; font: inherit;
  border: 1px solid var(--line); border-radius: .35rem; background: #fffef9; color: var(--ink);
}
.score-form input:focus-visible { outline: 2px solid var(--rust); outline-offset: 1px; }
.score-form .primary { width: auto; min-height: 2.82rem; padding-inline: .7rem; white-space: nowrap; }
.board-message { margin-top: .48rem; color: var(--green); font-size: .9rem; }
.board-rows { margin-top: .8rem; }
.board-empty { padding: .6rem .2rem; color: var(--muted); }
.rankings { margin: 0; padding: 0; list-style: none; }
.rankings > li { border-bottom: 1px solid var(--line); }
.rankings > li.mine { background: #eee9da; }
.rank-row {
  display: grid; grid-template-columns: 1.4rem minmax(0, 1fr) auto .55rem; align-items: center;
  gap: .48rem; min-height: 2.75rem; padding: .47rem .4rem;
  cursor: pointer; overflow-wrap: anywhere; list-style: none;
}
.rank-row::-webkit-details-marker, summary.my-rank::-webkit-details-marker { display: none; }
.rank-row::after {
  content: ""; width: .41rem; height: .41rem; border: solid var(--muted); border-width: 0 1px 1px 0;
  transform: translateY(-.12rem) rotate(45deg);
}
.rankings details[open] .rank-row::after { transform: translateY(.08rem) rotate(225deg); }
.rank-row:focus-visible, summary.my-rank:focus-visible { outline: 2px solid var(--rust); outline-offset: -2px; }
.rank-row > strong:last-of-type { white-space: nowrap; font-variant-numeric: tabular-nums; }
.rank { color: var(--rust); font-family: var(--serif); }
.rankings small { color: var(--muted); }
.rank-percent { display: block; margin-top: .08rem; font-size: .76rem; font-variant-numeric: tabular-nums; }
.rank-eras { padding: .1rem .55rem .58rem; color: var(--muted); font-size: .84rem; }
.rank-eras ol { margin: 0; padding: 0; list-style: none; counter-reset: era; }
.rank-eras li {
  display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); align-items: baseline;
  gap: .39rem; padding: .39rem 0; border-top: 1px solid var(--line); counter-increment: era;
}
.rank-eras li::before { content: counter(era, decimal-leading-zero); color: var(--rust); font-variant-numeric: tabular-nums; }
.rank-eras li > span { color: var(--ink); word-break: keep-all; overflow-wrap: anywhere; }
.my-rank {
  display: flex; justify-content: space-between; gap: .5rem; margin-bottom: .58rem;
  padding: .55rem .65rem; border: 1px solid var(--line); border-radius: .42rem; background: var(--paper);
  font-size: .91rem; font-variant-numeric: tabular-nums;
}
.my-rank > span { min-width: 0; overflow-wrap: anywhere; }
.my-rank > span:last-child { text-align: right; }
.my-rank small { display: block; color: var(--muted); font-size: .77rem; }
summary.my-rank { cursor: pointer; min-height: 2.75rem; align-items: center; list-style: none; }
.my-rank-details[open] .my-rank { margin-bottom: 0; }

.counterfactual {
  border: 1px solid var(--line);
  border-radius: .5rem;
  padding-inline: .7rem;
  background: var(--cream);
}
.counterfactual summary {
  min-height: 2.75rem;
  padding-block: .65rem;
  cursor: pointer;
  color: var(--green);
  font-weight: 650;
}
.counterfactual summary:focus-visible { outline: 2px solid var(--rust); outline-offset: 2px; }
.counterfactual dl { margin: 0; padding-block: .15rem .6rem; }
.counterfactual dl div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .55rem;
  padding-block: .25rem;
}
.counterfactual dt { min-width: 0; color: var(--muted); font-size: .87rem; overflow-wrap: anywhere; }
.counterfactual dd { margin: 0; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
.comparison-reason {
  margin: 0 0 .7rem;
  border-top: 1px solid var(--line);
  padding-top: .5rem;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.history .place { color: var(--rust); font-weight: 720; font-size: .8rem; margin-bottom: .23rem; }

.admin-entry .primary[hidden] { display: none; }

.game-toolbar {
  display: flex;
  align-items: center;
  width: min(100%, 35rem);
  margin-inline: auto;
  padding: .4rem 1.45rem 0;
}
.language-picker { display: flex; gap: .25rem; margin-inline-start: auto; }
.game-toolbar button {
  min-height: 2.5rem;
  padding: .15rem .6rem;
  border: 1px solid transparent;
  border-radius: .32rem;
  background: transparent;
  color: var(--muted);
  font-size: .875rem;
}
.game-toolbar .toolbar-home, .language-picker button[aria-pressed="true"] {
  border-color: var(--line);
  background: var(--cream);
  color: var(--green);
  font-weight: 700;
}
.game-toolbar button:hover { border-color: var(--line); background: var(--cream); }
.game-toolbar + #game .page.home { min-height: calc(100svh - 2.9rem); }
@media (max-width: 37.5rem) {
  .game-toolbar { padding-inline: 1rem; }
}
