#booster {
  --boost-ink: #174538;
  --boost-paper: #fffdf7;
  --boost-tint: #edf4dc;
  width: min(100%, 960px);
  margin: 28px auto 44px;
  min-width: 0;
}
#booster [hidden], .booster-storage-note[hidden] { display: none; }
#booster :is(h1,h2,h3,p) { margin: 0; overflow-wrap: anywhere; }
#booster h1 { font-size: clamp(2rem, 6vw, 3.5rem); line-height: 1.06; }
#booster h2 { font-size: clamp(1.42rem, 3.5vw, 2rem); line-height: 1.2; }
#booster h3 { font-size: 1.2rem; line-height: 1.25; }
#booster :is(button,input,select,a) { scroll-margin-block: 100px; }
#booster :is(button,a,input,select):focus-visible { outline: 3px solid #176754; outline-offset: 3px; }
#booster :is(h1,h2,.booster-help):focus { outline: none; }
#booster :is(.button,input,select) { min-height: 48px; max-width: 100%; }
#booster .button { min-width: 44px; padding: 8px 16px; line-height: 1.2; white-space: normal; text-align: center; }
#booster .button[aria-disabled="true"] { opacity: .6; cursor: default; }
#booster .booster-heading { display: grid; gap: 9px; margin: 20px 0; }
.booster-heading > p, #booster .booster-muted { color: #485e54; }
#booster .booster-meta { color: #1c614f; font-weight: 700; }

.booster-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
#booster .booster-card {
  --card: #e7f0d2;
  --card-deep: #b7ca98;
  gap: 8px;
  min-height: 162px;
  padding: 15px;
  overflow-wrap: anywhere;
}
#booster .booster-card:nth-child(2) { --card: #e0eff7; --card-deep: #b6d0e0; }
#booster .booster-card:nth-child(3) { --card: #f7e6ce; --card-deep: #dfbe94; }
#booster .booster-card:nth-child(4) { --card: #e1ecce; --card-deep: #b7c99f; }
#booster .booster-card:nth-child(5) { --card: #ffe8e8; --card-deep: #e2b9bb; }
#booster .booster-card:nth-child(6) { --card: #eee7f8; --card-deep: #cbbcdf; }
.booster-card-icon { display: block; font-size: 2.05rem; line-height: 1.15; }
#booster .booster-card strong { font-size: clamp(1.12rem, 3vw, 1.5rem); }
#booster .booster-card p { margin: 0; }
.booster-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; }
.booster-stage-picker, .booster-work { background: var(--boost-paper); padding: clamp(14px, 4vw, 30px); }
.booster-stage-picker { display: grid; gap: 12px; }
.booster-stage-picker > label { font-weight: 700; }
#booster :is(input,select) {
  width: 100%;
  min-width: 0;
  padding: 8px;
  font: inherit;
  font-size: max(16px, 1em);
  color: var(--boost-ink);
  background: #fff;
  border: 2px solid #82998d;
  border-radius: 10px;
}
#booster .booster-stage-picker > select { max-width: 385px; }
.booster-recommendation { display: flex; gap: 10px 18px; flex-wrap: wrap; align-items: center; padding: 12px; background: var(--boost-tint); border-radius: 14px; }
.booster-stage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
#booster .booster-stage { display: grid; justify-content: stretch; align-content: center; text-align: left; justify-items: start; padding: 12px; gap: 4px; }
.booster-stage small { font: 500 .86rem/1.3 'DM Sans', sans-serif; }

#booster progress { display: block; width: 100%; height: 12px; margin: 8px 0 16px; accent-color: #286c4b; }
.booster-work { display: grid; gap: 14px; min-width: 0; max-width: 100%; }
.booster-instruction { display: grid; justify-items: start; gap: 12px; }
.booster-work .booster-actions { margin-top: 0; }
.booster-models, .booster-help, .booster-form { min-width: 0; display: grid; gap: 12px; }
#booster :is(.booster-models,.booster-help,.booster-actions):empty { display: none; }
#booster .booster-status:empty { position: absolute; }
.booster-option[aria-pressed="true"], #booster .booster-object[aria-pressed="true"] {
  border-color: #286c4b;
  box-shadow: 0 0 0 2px #286c4b;
}
.booster-options { display: flex; flex-wrap: wrap; gap: 10px; }
#booster .booster-option { min-width: 60px; font-size: 1.16rem; }
.booster-form > .button { justify-self: start; }
.booster-field { display: grid; gap: 5px; min-width: 0; font-weight: 700; }
.booster-form > .booster-field { max-width: 460px; }
.booster-pair, .booster-builder-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.booster-pair { max-width: 300px; }
.booster-story-form { border: 2px solid #cedbcf; border-radius: 14px; min-inline-size: 0; margin: 0; padding: 12px; }
.booster-story-form legend { padding: 0 6px; font-weight: 700; }
.booster-equation-fields { display: grid; grid-template-columns: 1fr 1.3fr 1fr 1fr; gap: 8px; }
.booster-status[data-tone], .booster-cue { padding: 10px 12px; border-radius: 12px; background: var(--boost-tint); }
.booster-status[data-tone="retry"] { background: #fff0cc; color: #503909; }
.booster-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.booster-storage-note { margin: 15px auto; max-width: 960px; }

.booster-builder { display: grid; gap: 10px; width: min(100%, 560px); margin-inline: auto; }
.booster-builder-control { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 4px; align-items: center; text-align: center; }
#booster .booster-builder-control .button { padding: 0; font-size: 1.4rem; }
.booster-builder-control strong { line-height: 1.15; }
.booster-preview { min-height: 96px; display: grid; place-items: center; border-radius: 14px; background: #f8f6ed; padding: 10px; }
.booster-blocks .booster-preview { border: 2px dashed #91a691; }
.booster-drag-palette { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.booster-drag-palette .ten-bar { width: 9px; height: 28px; }
.booster-drag-palette .one-cube { width: 13px; height: 13px; }
#booster .base-ten { margin: 6px auto; gap: 9px; }
#booster .base-ten :is(.ten-group,.one-group) { gap: 4px; }
#booster .base-ten .ten-bar { width: 15px; height: 55px; }
#booster .base-ten .one-cube { width: 14px; height: 14px; }
.booster-abacus {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-self: center;
  width: min(100%, 244px);
  padding: 8px 20px 0;
  border-bottom: 10px solid #745137;
  border-radius: 8px;
  background: #f5ebd7;
}
.booster-rod { display: grid; justify-items: center; line-height: 1.25; }
.booster-spike { position: relative; display: flex; flex-direction: column-reverse; align-items: center; justify-content: flex-start; min-height: 138px; width: 48px; }
.booster-spike::before { content: ''; position: absolute; top: 10px; bottom: 0; width: 5px; border-radius: 6px 6px 0 0; background: #76553c; }
.booster-bead { position: relative; height: 13px; flex: 0 0 13px; width: 42px; background: #297259; border: 2px solid #174538; border-radius: 9px; }
.booster-rod:last-child .booster-bead { background: #e8a737; border-color: #745137; }

.booster-marked { justify-self: start; display: flex; gap: .15em; font: 600 2.6rem/1.2 Fredoka, sans-serif; }
.booster-marked mark { color: var(--boost-ink); background: #ffde75; border-radius: 8px; padding-inline: .12em; text-decoration: underline; }
#booster .number-line { margin: 0; gap: 5px; }
#booster .line-stop { min-width: 32px; min-height: 40px; font-size: 1rem; }
#booster .rounding-model { width: min(100%, 520px); margin-inline: auto; }
#booster .rounding-model .number-line { gap: 0; }
#booster .rounding-model .line-stop { min-width: 0; }
.booster-jump-path { display: flex; gap: 5px; flex-wrap: wrap; align-items: flex-end; }
.booster-jump, .booster-jump-start { display: grid; text-align: center; }
.booster-jump b, .booster-jump-start { padding: 3px 6px; border-radius: 6px; background: var(--boost-tint); }
.booster-jump small { font-size: .83rem; }
.booster-arithmetic { display: grid; gap: 10px; justify-items: center; width: 100%; }
#booster .place-board { margin: 0 auto; width: min(100%, 300px); }
.booster-manipulatives { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 10px; border-radius: 12px; background: #f3f5e7; width: min(100%, 570px); }
.booster-block-group { text-align: center; }
.booster-traded { animation: booster-trade .32s ease-out; }
@keyframes booster-trade { from { opacity: .52; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .booster-traded { animation: none; } }
.booster-symbol { font-size: 1.25rem; }
.booster-objects { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; }
#booster .booster-object { position: relative; min-height: 45px; min-width: 45px; border-radius: 11px; padding: 2px; }
#booster .booster-object.button { min-height: 48px; }
.booster-object.is-crossed .booster-symbol { opacity: .42; }
.booster-object.is-crossed::after { content: ''; position: absolute; width: 36px; border-top: 3px solid #7e3026; transform: rotate(-40deg); inset: 50% auto auto calc(50% - 18px); }
.booster-known { margin: 0; padding: 10px 10px 10px 28px; border-radius: 12px; background: var(--boost-tint); }

.booster-dashboard { display: grid; gap: 16px; }
.booster-report-card { display: grid; gap: 12px; margin-bottom: 0; padding: clamp(14px, 3vw, 23px); }
.booster-suggestion { background: var(--boost-tint); justify-items: start; }
.booster-dashboard-grid, .booster-trend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.booster-skill-card { display: grid; gap: 6px; min-width: 0; border: 1px solid #cedbcf; border-radius: 14px; padding: 12px; }
.booster-skill-list, .booster-report-list { margin: 0; padding-left: 22px; }
.booster-skill-list li > span { display: block; }
#booster .booster-estimate { color: #255a3e; font-weight: 700; }
.booster-review-item { display: grid; gap: 4px; justify-items: start; padding-top: 12px; border-top: 1px solid #d0dccd; }
.booster-review-item > .button { margin-top: 5px; }

#booster .booster-result {
  grid-template: 'icon title metrics' auto / auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 16px;
  padding: clamp(12px, 3vw, 22px);
  margin: 0;
  border: 1px solid #b6c99f;
  border-radius: 22px;
  background: linear-gradient(110deg, #e7f0d3, #f5f7e8);
}
#booster .booster-result h1 { grid-area: title; font-size: clamp(1.65rem, 4vw, 2.5rem); }
.booster-result-icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 44px;
  aspect-ratio: 1;
  border-radius: 14px;
  background: #fff8de;
  font-size: 1.45rem;
}
.booster-result-metrics { grid-area: metrics; display: grid; gap: 2px; }
.booster-result-score { color: var(--boost-ink); font-weight: 700; }
.booster-result-accuracy { color: #435b47; font-size: .9rem; }

.booster-review { display: grid; gap: 12px; margin-top: 24px; }
.booster-review-grid { display: grid; align-items: start; gap: 14px; }
.booster-review-card {
  --review-state-ink: #28543a;
  --review-state-fill: #e8f2db;
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: clamp(12px, 2.5vw, 19px);
  border: 1px solid #cddbd0;
  border-radius: 18px;
  background: var(--boost-paper);
  box-shadow: 0 2px 0 #dce7db;
}
.booster-review-card[data-state="retried"] { --review-state-ink: #28516d; --review-state-fill: #e5eff8; }
.booster-review-card[data-state="incorrect"] { --review-state-ink: #843a27; --review-state-fill: #fff0e4; }
.booster-review-card[data-state="skipped"] { --review-state-ink: #4d5b55; --review-state-fill: #edf0ed; }
.booster-review-card-head { display: flex; align-items: start; flex-wrap: wrap; gap: 8px 12px; justify-content: space-between; }
.booster-review-card-head h3 { scroll-margin-block-start: 90px; }
.booster-review-state {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  background: var(--review-state-fill);
  color: var(--review-state-ink);
  font-size: .84rem;
  font-weight: 700;
}
.booster-review-symbol { font-size: 1.1rem; line-height: 1; }
.booster-review-prompt { font-weight: 700; }
.booster-answer-pair { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.booster-answer-pair > div { flex: 1 1 112px; min-width: 0; border-radius: 10px; padding: 7px 10px; }
.booster-answer-first { background: #eeeee8; }
.booster-answer-correct { background: #e8f2db; color: var(--boost-ink); }
.booster-answer-pair dt { font-size: .82rem; font-weight: 700; }
.booster-answer-pair dd { margin: 1px 0 0; font: 600 1.14rem/1.3 Fredoka, sans-serif; overflow-wrap: anywhere; }
.booster-review-how { display: grid; gap: 8px; min-width: 0; font-size: .94rem; }
.booster-review-card:not([data-state="correct"]) .booster-review-how {
  padding: 9px;
  border: 1px solid #dce6d7;
  border-radius: 12px;
  background: #f6f8ef;
}
#booster .booster-review-card > .button { justify-self: start; }
#booster .booster-review-how .base-ten { margin: 0 auto; }
#booster .booster-review-how .ten-bar { width: 11px; height: 39px; }
#booster .booster-review-how .one-cube { width: 11px; height: 11px; }
.booster-review-how .booster-abacus { width: min(100%, 170px); border-bottom-width: 6px; padding-inline: 12px; }
.booster-review-how .booster-spike { min-height: 90px; width: 37px; }
.booster-review-how .booster-bead { height: 9px; flex-basis: 9px; width: 30px; }
.booster-review-how .booster-marked { font-size: 1.8rem; justify-self: center; }
#booster .booster-review-how .place-board { font-size: 1rem; }
.booster-review-how .place-board th, .booster-review-how .place-board td { padding: 4px 8px; }
.booster-review-how .forest-sequence { gap: 5px; margin: 0; }
.booster-review-how .forest-sequence > span { min-height: 32px; min-width: 32px; padding: 2px 5px; font-size: 1rem; }
#booster .booster-review-how .booster-review-filled { outline: 2px solid #28543a; outline-offset: -2px; background: #ddedcb; }
.booster-review-how .rounding-track { margin-top: 28px; }
.booster-review-how .rounding-frog { font-size: 1.25rem; }
#booster .booster-review-how .target-number { margin: 0; font-size: 1.25rem; line-height: 1.2; text-align: center; }
#booster .booster-review-how .rounding-model .line-stop { min-height: 28px; font-size: .8rem; }
.booster-review-objects { gap: 3px; margin: 0; }
#booster .booster-review-objects .booster-object {
  display: grid;
  place-items: center;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  font-size: .85rem;
  line-height: 1;
}
.booster-review-objects .is-crossed::after { width: 17px; inset-inline-start: calc(50% - 8px); border-width: 2px; }

@media (min-width: 740px) {
  .booster-review-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
  .booster-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .booster-dashboard-grid, .booster-equation-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #booster .booster-result { grid-template: 'icon title' auto 'metrics metrics' auto / auto minmax(0, 1fr); }
  .booster-result-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
  #booster .booster-result-actions > .button { padding-inline: 8px; font-size: 1rem; justify-content: center; }
  .booster-result-actions > :nth-child(3) { grid-column: 1 / -1; }
}
@media (max-width: 430px) {
  #booster { margin-top: 16px; }
  #booster .booster-card { min-height: 144px; padding: 11px; border-radius: 18px; }
  .booster-stage-grid, .booster-dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .booster-builder-controls { gap: 7px; }
  .booster-builder-control { grid-template-columns: 44px 1fr 44px; gap: 2px; font-size: .82rem; }
  .booster-review-item button { justify-self: stretch; }
}
