
  :root { color-scheme: light; font-family: "Avenir Next", Avenir, system-ui, sans-serif; }
  * { box-sizing: border-box; }
  body { margin: 0; }
  button { font: inherit; }
  button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; }
  [hidden] { display: none !important; }
  #design {
    min-height: 100vh; padding: 0 clamp(16px, 4vw, 56px) 42px;
    --page: #5f2937; --stage: #4b1f2c; --paper: #f0dfc7; --ink: #3a2024;
    --cream: #fff0d6; --faint: #ead1bc; --accent: #9c493b; --border: #ad776c;
    --track: #ba986f; --track-active: #843c47; --button: #5c2735; --button-ink: #fff0d6; --focus: #dc9847;
    background: var(--page); color: var(--cream);
  }
  #design[data-theme="lab"] {
    --page: #0d2932; --stage: #081d26; --paper: #e8f0ef; --ink: #102933;
    --cream: #f4f3e8; --faint: #bfd5d6; --accent: #9b430f; --border: #52747b;
    --track: #77979d; --track-active: #a85224; --button: #123b44; --button-ink: #fff5e4; --focus: #edaa71;
  }
  #design[data-theme="arcade"] {
    --page: #30202d; --stage: #1c1420; --paper: #f7e25e; --ink: #271521;
    --cream: #fff4d6; --faint: #f8d0bb; --accent: #a62d08; --border: #bd6747;
    --track: #a47845; --track-active: #8e2611; --button: #241525; --button-ink: #ffed8e; --focus: #ef7320;
  }
  .shell { max-width: 1200px; margin: auto; }
  .top {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 15px;
    padding: 20px 0; border-bottom: 1px solid var(--border);
  }
  .brand { font-weight: 800; font-size: 16px; letter-spacing: .15em; }
  .tablist { display: flex; flex-wrap: wrap; gap: 5px; }
  .tablist button {
    color: var(--cream); background: transparent; border: 1px solid transparent;
    padding: 8px 13px; border-radius: 4px; cursor: pointer; font-size: 14px;
  }
  .tablist button[aria-selected="true"] { border-color: var(--border); background: var(--stage); font-weight: 650; }
  .tablist button:hover { border-color: var(--border); }
  .stage {
    display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center;
    min-height: 453px; gap: clamp(20px, 4.5vw, 62px); background: var(--stage);
    border: 1px solid var(--border); padding: clamp(20px, 4vw, 48px); margin-top: 25px;
    position: relative;
  }
  .lead { min-width: 0; }
  .campaign-sticker {
    display: table; margin: 2px 0 18px; padding: 7px 15px 8px;
    background: #d32f2f; color: #fffff0; border: 2px solid #fff0d6;
    border-radius: 5px; box-shadow: 2px 5px 0 #3a1620;
    font-weight: 900; font-size: clamp(24px, 2.8vw, 39px); line-height: 1;
    letter-spacing: -.035em; white-space: nowrap; transform: rotate(-3deg);
  }
  [data-theme="archive"] .campaign-sticker {
    position: absolute; top: 26px; right: 25px; z-index: 2;
    margin: 0; transform: rotate(5deg);
  }
  .event { display: inline-block; margin: 0 0 16px; color: var(--cream); font-size: 13px; font-weight: 750; letter-spacing: .10em; text-transform: uppercase; }
  h1 { font: 500 clamp(46px, 6.8vw, 97px)/.89 Georgia, serif; letter-spacing: -.074em; margin: 0; text-wrap: balance; }
  .lead p { margin: 24px 0 0; line-height: 1.5; max-width: 28em; color: var(--faint); }
  .lead .deadline { font-size: 13px; font-weight: 600; margin-top: 17px; }
  figure { margin: 0; min-width: 0; background: #debea1; border: 1px solid var(--border); }
  figure img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
  [data-theme="archive"] figure {
    padding: 10px; box-shadow: 10px 11px 0 #3b1823; transform: rotate(-1deg);
  }
  [data-theme="lab"] .stage { align-items: stretch; padding: 0; gap: 0; }
  [data-theme="lab"] .lead { padding: clamp(24px, 4vw, 53px); align-self: center; }
  [data-theme="lab"] h1 { font: 680 clamp(40px, 6vw, 83px)/.93 "Avenir Next", Avenir, system-ui, sans-serif; letter-spacing: -.07em; }
  [data-theme="lab"] figure { border: 0; border-left: 1px solid var(--border); }
  [data-theme="lab"] figure img { height: 100%; object-position: 56% center; }
  [data-theme="arcade"] .stage { border-top: 7px solid #f1702d; }
  [data-theme="arcade"] h1 { font: 900 clamp(44px, 6.6vw, 91px)/.87 Impact, "Arial Black", system-ui, sans-serif; text-transform: uppercase; letter-spacing: -.025em; }
  [data-theme="arcade"] figure { border: 3px solid #ef742c; box-shadow: 7px 7px 0 #130b12; }
  .game {
    color: var(--ink); background: var(--paper); border: 1px solid var(--border);
    padding: clamp(20px, 3.5vw, 40px); margin: 20px 0 15px; position: relative;
  }
  [data-theme="archive"] .game { border-radius: 0 0 9px 9px; border-top: 4px solid #a65847; }
  [data-theme="arcade"] .game { border: 4px solid #241525; box-shadow: inset 0 0 0 1px #745129; }
  .game-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 22px; }
  .game h2 { font-size: clamp(23px, 4vw, 34px); margin: 0; letter-spacing: -.045em; }
  [data-theme="archive"] .game h2 { font-family: Georgia, serif; font-weight: 500; }
  .game-intro { margin: 6px 0 15px; line-height: 1.45; }
  .attempts { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
  .range-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 0; font-weight: 650; }
  .selected { min-width: 3em; text-align: right; font-variant-numeric: tabular-nums; }
  .range-control {
    accent-color: var(--track-active); background: transparent; margin: 0; display: block;
    width: 100%; min-height: 44px; -webkit-appearance: none; appearance: none; cursor: ew-resize;
  }
  .range-control::-webkit-slider-runnable-track { height: 8px; border-radius: 3px; background: var(--track); }
  .range-control::-moz-range-track { height: 8px; border-radius: 3px; background: var(--track); }
  .range-control::-webkit-slider-thumb {
    -webkit-appearance: none; width: 30px; height: 29px; margin-top: -10.5px; border-radius: var(--thumb-radius, 3px);
    background: var(--button); border: 2px solid var(--button-ink); box-shadow: 0 0 0 1px var(--button);
  }
  .range-control::-moz-range-thumb {
    width: 27px; height: 26px; border-radius: var(--thumb-radius, 3px); background: var(--button);
    border: 2px solid var(--button-ink); box-shadow: 0 0 0 1px var(--button);
  }
  [data-theme="archive"] .range-control { --thumb-radius: 2px 2px 8px 8px; }
  [data-theme="lab"] .range-control { --thumb-radius: 50%; }
  [data-theme="arcade"] .range-control { --thumb-radius: 45% 45% 35% 35%; }
  .range-control:disabled { cursor: default; opacity: .7; }
  .ticks {
    display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); padding: 0 4px;
    margin: 0 0 16px; text-align: center; font-variant-numeric: tabular-nums; font-size: 12px;
  }
  .ticks span::before { content: ""; width: 1px; height: 4px; display: block; margin: 0 auto 4px; background: var(--track-active); }
  .ticks .here { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
  .game-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 13px 23px; }
  .estimate { flex: 1 0 235px; }
  .estimate span { display: block; font-size: 13px; }
  .estimate strong { font-size: clamp(23px, 4vw, 37px); font-variant-numeric: tabular-nums; letter-spacing: -.045em; }
  .action {
    background: var(--button); color: var(--button-ink); cursor: pointer; border: 0; border-radius: 4px;
    padding: 11px 17px; min-height: 44px; font-weight: 720;
  }
  .action:hover { text-decoration: underline; text-underline-offset: 3px; }
  .action:disabled { cursor: default; opacity: .6; text-decoration: none; }
  .feedback { font-weight: 650; margin: 0; line-height: 1.5; overflow-wrap: break-word; }
  .feedback:not(:empty) { margin-top: 16px; }
  .fallback { margin-top: 14px; }
  .mo-footer { display: flex; gap: 12px 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
  .mo-footer p { margin: 0; font-size: 13px; color: var(--faint); }
  .reset { color: var(--cream); border: 1px solid var(--border); border-radius: 4px; background: transparent; cursor: pointer; padding: 7px 11px; }
  @media (max-width: 760px) {
    .stage { min-height: 0; grid-template-columns: minmax(0, 1fr); }
    .lead p { margin-top: 16px; }
    [data-theme="archive"] .campaign-sticker {
      position: relative; top: auto; right: auto; margin: 4px auto 20px; transform: rotate(3deg);
    }
    [data-theme="lab"] figure { border-left: 0; border-top: 1px solid var(--border); }
    [data-theme="lab"] figure img { height: auto; }
    [data-theme="archive"] figure { padding: 6px; box-shadow: 5px 6px 0 #3b1823; }
    .tablist button { padding: 7px 8px; font-size: 12px; }
  }
  @media (prefers-reduced-motion: no-preference) {
    .range-control::-webkit-slider-thumb { transition: border-radius .16s ease; }
  }

#message:not(:empty) { margin: 11px 0; font-weight: 650; }
.proposal-form, .buttons { display: flex; flex-wrap: wrap; gap: 9px; margin: 12px 0; }
.proposal-form input, textarea {
  color: var(--ink); background: #fff9ea; border: 1px solid var(--track);
  border-radius: 4px; font: inherit; padding: 7px 10px; min-height: 44px;
}
textarea { display: block; width: min(100%, 500px); margin: 7px 0; }
#proposal { max-width: 90px; }
.secondary {
  cursor: pointer; min-height: 40px; border: 1px solid var(--track); border-radius: 4px;
  background: transparent; padding: 7px 10px; color: var(--ink);
}
.table-scroll { overflow: auto; }
table { border-collapse: collapse; width: 100%; min-width: 560px; }
td, th { padding: 9px; border-bottom: 1px solid var(--track); text-align: left; }
td:last-child > * { display: inline-block; margin: 3px 8px 3px 0; }
td a { color: var(--ink); }
