/* Stage 2: components (spec §7). Loaded after the older stylesheets so they win. */
.btn, .button { min-height: var(--tap); border-radius: var(--r-m); font-weight: 800; touch-action: manipulation; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); padding: 0 var(--s4); border: 0; cursor: pointer; font: var(--t-headline); }
.btn-primary, .button:not(.secondary):not(.danger-quiet):not(.toast-action) {
  min-height: var(--btn-h); background: var(--pine); color: var(--on-pine); border: 2px solid color-mix(in srgb, var(--pine) 70%, #000);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--pine) 55%, #000);
}
.btn-primary:active, .button:not(.secondary):not(.danger-quiet):not(.toast-action):active { transform: translateY(3px); box-shadow: 0 1px 0 color-mix(in srgb, var(--pine) 55%, #000); }
.btn-game { background: linear-gradient(#FFD969, var(--yellow)); color: #3D2A00; font-weight: 1000; border: 2.5px solid var(--ink-outline); box-shadow: var(--lip-ink); min-height: var(--btn-h); }
.btn-game.green { background: linear-gradient(#2FB57F, #149266); color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .3); }
.btn-game:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink-outline); }
.btn-secondary, .button.secondary { background: var(--surface-2); color: var(--pine); border: 1.5px solid transparent; box-shadow: none; }
.btn-secondary:active, .button.secondary:active { filter: brightness(.94); transform: scale(.98); }
.btn-text { background: none; color: var(--pine); box-shadow: none; } .btn-text.danger { color: var(--red); } .btn-text:active { opacity: .5; }
.btn.sm { min-height: 44px; border-radius: var(--r-s); font: var(--t-sub); font-weight: 800; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--sh-card); display: inline-grid; place-items: center; cursor: pointer; }
.icon-btn:active { transform: scale(.92); }
.button:disabled, .btn:disabled { opacity: .5; box-shadow: none; transform: none; cursor: not-allowed; }
:where(button, a, input, select, textarea, summary):focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
/* lists and rows */
.group-label { font: var(--t-caption); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: var(--s5) var(--s2) var(--s2); }
.list { background: var(--surface); border-radius: var(--r-m); box-shadow: var(--sh-card); overflow: hidden; }
.row { display: flex; align-items: center; gap: var(--s3); min-height: 56px; padding: var(--s2) var(--s4); width: 100%; border: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; font: var(--t-headline); }
.row + .row { border-top: 1px solid var(--line); }
.row .chev { margin-left: auto; color: var(--muted); font-weight: 800; }
/* fields */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]), select, textarea { border-radius: var(--r-s); }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--pine); outline-offset: 0; }
/* sheets and toast */
dialog[open]:not(.onboarding) { border-radius: var(--r-sheet); box-shadow: var(--sh-sheet); }
@media (max-width: 600px) {
  dialog[open]:not(.onboarding):not(.v11-story) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; margin-bottom: 0; }
}
.toast { top: auto; bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom)); border-radius: var(--r-m); box-shadow: var(--sh-float); animation-name: toast-in; }
