/* The setup is a choice of visible cards: no closed menus hide its rules. */
#ui .founding-start {
  width: min(920px, calc(100vw - 32px)); max-width: 920px; min-width: 0;
  max-height: min(94dvh, calc(100dvh - 32px)); padding: 0 !important; gap: 0; text-align: left; overflow: hidden;
}
#ui .founding-body { display: flex; flex-direction: column; gap: 17px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px 30px 18px; scrollbar-width: thin; scrollbar-color: #a28454 #281c13; }
#ui .founding-body > * { flex-shrink: 0; }
#ui .founding-heading { display: flex; align-items: center; gap: 22px; min-width: 0; }
#ui .founding-miniature {
  width: 104px; height: 94px; flex: 0 0 104px; display: flex; align-items: center; justify-content: center;
  position: relative; color: #d0b77e; border-bottom: 1px solid #a8915866;
  background: radial-gradient(ellipse at 50% 75%, #c3a15625, transparent 67%);
}
#ui .founding-miniature img { width: 112px; height: 104px; object-fit: contain; filter: drop-shadow(0 5px 4px #0009); }
#ui .founding-miniature > svg { width: 65px !important; height: 65px !important; }
#ui .founding-heading-copy { min-width: 0; }
#ui .founding-kicker { margin: 0 0 7px; letter-spacing: 1.7px; }
/* THE HERO LINE IS NOT A MODAL TITLE AND MUST NOT BE SIZED LIKE ONE. Folding this into the
   shared 25px gold h2 took it from 34px pale parchment to 25px in the same gold as the
   kicker, the card names, the selected rims and the primary button on this very panel - so
   on a screen built around a castle illustration, the one line that is supposed to carry it
   stopped carrying anything. Unifying chrome is right; flattening a hero into the body of
   its own page is not what unifying means. */
#ui .founding-start h2 { margin: 0; color: #f0e0bc; font: 700 clamp(26px, 3vw, 34px)/1.18 var(--font-display); letter-spacing: 0; }
#ui .founding-intro { color: #c7c5b2; font: var(--fs-body)/1.5 var(--font-body); margin: 8px 0 0; }
#ui .founding-name-row { display: grid; grid-template-columns: 165px minmax(0, 1fr); align-items: center; gap: 18px; padding: 11px 0 14px; border-bottom: 1px solid #9b845d33; }
#ui .founding-label { font: 600 13px var(--font-body); color: #ded4b9; margin: 0; }
#ui .founding-start .kname-field { min-width: 0; width: 100%; font-size: var(--fs-h2); padding: 10px 14px; margin: 0; line-height: 1.2; letter-spacing: .6px; border-width: 1px; border-color: #8e7c52; border-radius: var(--r-ctl); background: #21160f; color: #f1e3bf; }
#ui .founding-start .kname-field::placeholder { opacity: 1; color: #b1b5a0; }
#ui .founding-section { min-width: 0; }
#ui .founding-section-title { font: 600 13px var(--font-body); color: #ded4b9; margin: 0 0 10px; }
#ui .founding-burdens { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
#ui .founding-stories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
#ui .founding-choice {
  --choice-tone: #d7bc7d; position: relative; min-width: 0; color: #ece5d1; cursor: pointer;
  font-family: var(--font-body); text-align: left; transition: border-color .13s, background .13s, box-shadow .13s;
}
#ui .founding-choice:hover { border-color: var(--choice-tone); background: linear-gradient(140deg, #5a402b90, #35241a); }
/* AND THE CHOSEN CARD HAS TO BE UNMISTAKABLE. The shared --surf-card-sel is a faint
   luminance step plus a thin rim, which is fine on a settings row and not fine here: this is
   the first choice the game asks anyone to make, four cards sit side by side, and 'did that
   register' has to be answerable at a glance from across a desk. A/B'd live at the same
   viewport - the warm red reads instantly, the token does not. Consistency is not worth
   buying with clarity on the one screen where clarity is the entire job. */
/* (Scoped through .founding-start on purpose. heritage.css's shared card rule is
   `#ui :is(... , .court-body .ruler-card, ... , .founding-choice, ...)`, and :is() takes the
   specificity of its MOST specific argument - so that descendant selector lifts the whole
   list to (1,2,0), exactly tying a plain `#ui .founding-choice[aria-checked]`, and heritage
   is linked twelve lines later so it won the tie and the chosen card came out with no
   background at all. One more class settles it without an !important.) */
#ui .founding-start .founding-choice[aria-checked="true"] { border-color: #e2c180; background: linear-gradient(140deg, #774536bb, #422820); box-shadow: var(--sel-ring), 0 3px 12px #0003; }
#ui .founding-choice:focus-visible { outline:var(--focus-ring); outline-offset:var(--focus-off); }
#ui .founding-choice b { display: block; font: 650 var(--fs-lead)/1.3 var(--font-head); color: #f1e4c4; }
#ui .founding-choice-mark { position: absolute; top: 10px; right: 10px; width: 17px; height: 17px; border: 1px solid #91947c; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #111810; color: #152016; }
#ui .founding-choice-mark svg { width: 12px !important; height: 12px !important; visibility: hidden; }
#ui .founding-choice[aria-checked="true"] .founding-choice-mark { background: #ebcf90; border-color: #ebcf90; }
#ui .founding-choice[aria-checked="true"] .founding-choice-mark svg { visibility: visible; }
#ui .founding-burden { display: flex; flex-direction: column; align-items: flex-start; padding: 13px 14px 12px; }
#ui .founding-device { width: 29px; height: 29px; color: var(--choice-tone); margin-bottom: 7px; }
#ui .founding-device svg { width: 100%; height: 100%; }
#ui .founding-choice-tag { display: block; color: var(--choice-tone); font-size: var(--fs-micro); line-height: 1.4; margin-top: 4px; }
#ui .founding-choice-desc { display: block; color: #c9cbb9; font: var(--fs-small)/1.45 var(--font-body); margin-top: 7px; }
#ui .founding-story { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 13px; padding: 15px 32px 15px 15px; align-items: center; }
#ui .founding-story-device { color: #c9b583; width: 36px; height: 36px; }
#ui .founding-story-device svg { width: 100%; height: 100%; }
#ui .founding-story .founding-choice-desc { margin-top: 5px; }
#ui .founding-footer { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 30px; background: #261910; border-top: 1px solid #98744877; }
#ui .founding-footer #kn-back { color: #c7c5b2; border: 1px solid #85876b55; border-radius: var(--r-card); margin: 0; min-height: 42px; font-family: var(--font-body); letter-spacing: 0; }
#ui .founding-footer #kn-go { display: inline-flex; align-items: center; justify-content: center; gap: 30px; min-width: 235px; min-height: 46px; font-size: var(--fs-lead); letter-spacing: .3px; border-radius: var(--r-card); background: linear-gradient(#b19452, #7a6334); color: #fff1c9; }
#ui .founding-footer #kn-go:hover { background: linear-gradient(#c2a45c, #8b703a); }
@media (max-height: 650px) and (min-width: 701px) {
  #ui .founding-body { padding: 18px 25px 12px; gap: 12px; }
  #ui .founding-footer { padding: 10px 25px; }
  #ui .founding-heading { gap: 18px; }
  #ui .founding-miniature { width: 83px; height: 66px; flex-basis: 83px; }
  #ui .founding-miniature img { width: 87px; height: 78px; }
  #ui .founding-intro { margin-top: 5px; }
  #ui .founding-name-row { padding: 4px 0 10px; }
  #ui .founding-burden { display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 9px; padding: 11px 12px; }
  #ui .founding-device { width: 24px; height: 24px; margin: 0; grid-row: span 2; }
  #ui .founding-burden b { padding-right: 12px; font-size: var(--fs-body); }
  #ui .founding-burden .founding-choice-tag { font-size: var(--fs-nano); margin-top: 3px; }
  #ui .founding-burden .founding-choice-desc { grid-column: 1 / -1; }
  #ui .founding-burden .founding-choice-mark { top: 7px; right: 6px; width: 13px; height: 13px; }
  #ui .founding-burden .founding-choice-mark svg { width: 10px !important; height: 10px !important; }
  #ui .founding-story { padding-top: 11px; padding-bottom: 11px; }
}
@media (max-width: 700px) {
  #ui .founding-start { width: calc(100vw - 24px); }
  #ui .founding-body { padding: 20px 20px 14px; gap: 15px; }
  #ui .founding-footer { padding: 12px 20px; }
  #ui .founding-heading { gap: 13px; }
  #ui .founding-miniature { width: 66px; height: 76px; flex-basis: 66px; }
  #ui .founding-miniature img { width: 78px; height: 78px; }
  #ui .founding-intro { font-size: var(--fs-small); }
  #ui .founding-name-row { grid-template-columns: 1fr; gap: 9px; padding-top: 0; }
  #ui .founding-burdens { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #ui .founding-burden { padding: 12px; }
  #ui .founding-stories { grid-template-columns: 1fr; gap: 10px; }
  #ui .founding-story { padding-top: 12px; padding-bottom: 12px; }
  #ui .founding-footer #kn-go { min-width: 0; flex: 1; gap: 10px; font-size: var(--fs-body); }
  #ui .founding-footer { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  #ui .founding-choice, #ui .founding-footer .title-btn { transition: none; }
}
