

:root {
  --ink: #111a2e;
  --paper: #f2f1ea;
  --sky: #18233f;
  --card: #1c2744;
  --edge: #303c62;
  --go: #2f7d52;
  --quiet: #e3e2f2;
  --hot: #ffd37a;
  --bad: #ff9b8a;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--ink); color: var(--paper);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  
}

#app {
  max-width: 820px; margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 14px max(20px, env(safe-area-inset-bottom)) 14px;
}


.screen { display: none; }
.screen.is-on { display: block; }

.title { font-size: clamp(23px, 5vw, 36px); margin: 0 0 4px; line-height: 1.15; }
.sub { color: #9fb0dd; margin: 0 0 14px; font-size: clamp(15px, 2.6vw, 19px); }
.hint { color: #9fb0dd; font-size: clamp(14px, 2.2vw, 16px); margin: 4px 0; }
.msg { color: var(--hot); min-height: 1.3em; margin: 6px 0 0; font-size: 15px; }
.msg.bad { color: var(--bad); }

.card {
  background: var(--card); border: 1px solid var(--edge);
  border-radius: var(--radius); padding: 14px; margin: 0 0 14px;
}
.card h2 { font-size: clamp(17px, 3vw, 21px); margin: 0 0 6px; }


.btn {
  display: block; width: 100%; min-height: 56px; border: 0;
  border-radius: var(--radius); font: inherit; font-weight: 700;
  font-size: clamp(17px, 3vw, 21px); padding: 14px 18px; margin: 10px 0 0;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.btn-go { background: var(--go); color: #fff; }
.btn-quiet { background: var(--quiet); color: #1c2744; }
.btn-teach { background: #3a4a7d; color: #fff; margin: 0 0 14px; }

.binbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.btn-bin { margin: 0; background: #2f3c66; color: #fff; min-height: 64px; }
.btn-bin:active { background: #3e4f85; }


.players { display: grid; gap: 8px; }
.player-row { display: flex; gap: 8px; align-items: center; }
.player-row input {
  flex: 1 1 auto; min-width: 0; min-height: 50px; border-radius: 10px;
  border: 1px solid var(--edge); background: #101a33; color: var(--paper);
  font: inherit; font-size: 17px; padding: 8px 12px;
}
.player-drop {
  flex: 0 0 auto; min-width: 50px; min-height: 50px; border-radius: 10px;
  border: 1px solid var(--edge); background: #2b3658; color: var(--paper);
  font-size: 20px; cursor: pointer;
}

.choices { display: grid; gap: 8px; }
.choice {
  min-height: 54px; border-radius: 10px; border: 2px solid var(--edge);
  background: #101a33; color: var(--paper); font: inherit; font-weight: 700;
  font-size: 17px; padding: 10px 14px; text-align: left; cursor: pointer;
}
.choice.on { border-color: var(--hot); background: #2b3658; }
.claim-list .choice { min-height: 60px; font-size: clamp(16px, 2.6vw, 19px); }

.best-note { color: #9fb0dd; margin: 4px 0 0; font-size: 16px; min-height: 1.4em; }

.how { margin: 18px 0 0; color: #9fb0dd; }
.how summary { cursor: pointer; font-weight: 700; padding: 8px 0; }
.how ol { margin: 6px 0; padding-left: 1.3em; }
.how li { margin: 4px 0; }


.demo-card { text-align: center; }
.demo-text { font-size: clamp(16px, 2.8vw, 20px); min-height: 4.2em; margin: 0 0 8px; }
.how-canvas {
  display: block; width: 100%; height: min(30vh, 250px);
  border-radius: var(--radius); background: var(--sky);
}


.board-top { display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px; }
.whose { flex: 1 1 auto; font-weight: 700; font-size: clamp(17px, 3vw, 21px); margin: 0; }
.count { color: #9fb0dd; margin: 0; font-size: 16px; }

.chute {
  display: block; width: 100%; height: min(28vh, 240px);
  border-radius: var(--radius); background: var(--sky);
}
.verdict {
  text-align: center; margin: 8px 0 0; min-height: 1.8em;
  font-size: clamp(17px, 3vw, 22px); font-weight: 700;
}
.verdict.right { color: #8fe0b0; }
.verdict.wrong { color: var(--bad); }


.bins-head {
  color: #9fb0dd; font-size: clamp(14px, 2.2vw, 16px); font-weight: 400;
  margin: 18px 0 6px; text-align: center;
}
.bins { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bin { display: flex; flex-direction: column; }
.bin-label {
  margin: 0 0 4px; text-align: center; font-weight: 700;
  font-size: clamp(13px, 2.2vw, 16px); color: #cfd8f2;
}
.bin-canvas {
  display: block; width: 100%; height: min(26vh, 230px);
  border-radius: var(--radius); background: #101a33; border: 1px solid var(--edge);
}


.totals { display: grid; gap: 8px; margin: 10px 0 16px; }
.total-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--paper); color: #1c2744; border-radius: var(--radius);
  padding: 12px 16px; font-size: clamp(17px, 2.6vw, 22px);
}
.total-row.leading { outline: 3px solid var(--hot); }
.total-name { flex: 1 1 auto; font-weight: 700; }
.total-score { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 2.2em; text-align: right; }

@media (min-width: 620px) {
  .choices { grid-template-columns: repeat(3, 1fr); }
  .claim-list { grid-template-columns: 1fr; }
  .btn-go, .btn-quiet, .btn-teach { width: auto; min-width: 220px; display: inline-block; margin-right: 10px; }
  .btn-bin { width: 100%; }
}


.name-memory { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.name-memory .btn { flex: 1 1 auto; min-width: 8rem; min-height: 44px; }



@media (hover: hover) and (pointer: fine) {

    
    button,
    select,
    summary,
    [role="button"] {
        transition: filter 0.12s ease;
    }

    button:not(:disabled):hover,
    select:not(:disabled):hover,
    summary:hover,
    [role="button"]:not([aria-disabled="true"]):hover {
        filter: brightness(1.25);
        cursor: pointer;
    }

    
    button:not(:disabled):active,
    select:not(:disabled):active,
    [role="button"]:not([aria-disabled="true"]):active {
        filter: brightness(0.95);
    }
}

