/* Warmer — a thermometer on warm paper: every guess is a bar that runs from icy blue
   (far off in meaning) to red-hot (nearly there). Scoped under .wm. */
.wm, .wm-toast {
  --paper: #fbf4ea; --ink: #2a1d17; --muted: #8a7468; --line: #eadccb;
  --hot: #ff4d2e; --warm: #ff9f1c; --mild: #ffd166; --cool: #8ecae6; --cold: #4f8fc0;
  --display: 'Fraunces', Georgia, serif; --body: 'Nunito', system-ui, sans-serif;
}
.wm {
  max-width: 520px; margin: 0 auto; padding: 16px 16px 28px; color: var(--ink); font-family: var(--body);
  text-align: left; -webkit-tap-highlight-color: transparent;
}
.wm-page { background: radial-gradient(90% 30% at 50% 0%, rgba(255,159,28,.16), transparent 70%), #fbf4ea; padding-bottom: 24px; }
.wm *, .wm *::before, .wm *::after { box-sizing: border-box; }
.wm [hidden] { display: none !important; }
.wm button { font-family: var(--body); cursor: pointer; margin: 0; }
.wm button:focus-visible, .wm input:focus-visible { outline: 3px solid var(--warm); outline-offset: 2px; }

.wm-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.wm-title { font: 900 46px/0.9 var(--display); margin: 0; letter-spacing: -.02em; }
.wm-title span { background: linear-gradient(90deg, var(--cold), var(--warm) 55%, var(--hot)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wm-meta { text-align: right; font-weight: 800; font-size: 13px; color: var(--muted); line-height: 1.35; }
.wm-meta b { color: var(--ink); font-size: 18px; }
.wm-how { margin: 10px 0 12px; font-weight: 800; font-size: 14.5px; color: var(--muted); line-height: 1.4; }
.wm-how b { color: var(--ink); }

.wm-banner { background: #fff; border: 2px dashed var(--warm); border-radius: 14px; padding: 10px 14px; font-weight: 800; margin-bottom: 12px; line-height: 1.4; }
.wm-banner b { color: var(--hot); }
.wm-mode { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #f1e6d7; border-radius: 12px; padding: 8px 12px; font-weight: 800; font-size: 14px; margin-bottom: 12px; }
.wm-mode button { font: 900 14px var(--body); color: var(--hot); background: none; border: 0; text-decoration: underline; padding: 0; }

.wm-thermo { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.wm-thermo .tube { flex: 1; height: 14px; border-radius: 99px; background: linear-gradient(90deg, var(--cold), var(--cool) 30%, var(--mild) 60%, var(--warm) 80%, var(--hot)); position: relative; box-shadow: inset 0 2px 3px rgba(0,0,0,.12); }
.wm-thermo .bead { position: absolute; top: 50%; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 4px solid var(--ink); transform: translate(-50%, -50%); left: 0%; transition: left .6s cubic-bezier(.2,1.3,.4,1); box-shadow: 0 3px 8px rgba(0,0,0,.25); }
.wm-thermo .lab { font: 900 13px var(--body); min-width: 92px; text-align: right; color: var(--muted); }

.wm-form { display: flex; gap: 8px; position: sticky; top: 8px; z-index: 5; }
.wm-form input { flex: 1; min-width: 0; font: 800 20px var(--body); padding: 14px 16px; border-radius: 16px; border: 2px solid var(--line); background: #fff; color: var(--ink); outline: none; box-shadow: 0 6px 18px rgba(42,29,23,.08); }
.wm-form input:focus { border-color: var(--warm); }
.wm-form input:disabled { background: #f1e6d7; }
.wm-form button { font: 900 16px var(--body); border: 0; border-radius: 16px; padding: 0 18px; background: var(--ink); color: #fff; box-shadow: 0 4px 0 #000; }
.wm-form button:active { transform: translateY(2px); box-shadow: 0 2px 0 #000; }
.wm-form button:disabled { opacity: .4; }
@keyframes wm-shake { 0%,100% { transform: none; } 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
.wm-form.bad input { animation: wm-shake .35s; border-color: var(--hot); }
.wm-msg { min-height: 22px; margin: 8px 2px 4px; font-weight: 800; font-size: 14px; color: var(--muted); }
.wm-msg.loading { color: var(--ink); }

.wm-last { margin-bottom: 10px; }
.wm-list { display: flex; flex-direction: column; gap: 6px; }
.wm-row { position: relative; display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 14px; border-radius: 12px; background: #f1e6d7; overflow: hidden; font: 900 17px var(--body); }
.wm-row .fill { position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--col); border-radius: 12px; transition: width .7s cubic-bezier(.2,1,.3,1); }
.wm-row .w, .wm-row .r { position: relative; }
.wm-row .w small { font-size: 11px; font-weight: 900; opacity: .65; margin-left: 6px; text-transform: uppercase; letter-spacing: .06em; }
.wm-row .r { font-variant-numeric: tabular-nums; font-size: 15px; }
.wm-row.latest { outline: 3px solid var(--ink); outline-offset: 1px; }
.wm-row.enter .fill { width: 0; }
.wm-row.win { background: var(--hot); color: #fff; }
.wm-listhead { font: 900 12px var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 2px 6px; display: flex; justify-content: space-between; }

.wm-tools { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 16px 0 0; }
.wm-tool { font: 800 14px var(--body); color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 9px 14px; }
.wm-tool:disabled { opacity: .4; cursor: default; }
.wm-tool.armed { border-color: var(--hot); color: var(--hot); }

.wm-win { margin: 14px 0; background: var(--ink); color: #fff; border-radius: 20px; padding: 20px 18px; text-align: center; box-shadow: 0 16px 34px rgba(42,29,23,.25); animation: wm-rise .4s cubic-bezier(.2,1.4,.4,1); }
@keyframes wm-rise { from { transform: translateY(16px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.wm-win h2 { font: 800 15px var(--body); color: #d9c8bc; margin: 0; }
.wm-win .word { font: 900 48px/1.05 var(--display); margin: 4px 0 6px; background: linear-gradient(90deg, var(--mild), var(--warm), var(--hot)); -webkit-background-clip: text; background-clip: text; color: transparent; overflow-wrap: anywhere; }
.wm-win .sub { font-weight: 800; color: #d9c8bc; margin-bottom: 12px; }
.wm-win .sub b { color: #fff; }
.wm-win .vs { font-weight: 900; font-size: 17px; margin: 0 0 12px; color: var(--mild); }
.wm-win .bars { display: inline-flex; flex-direction: column; gap: 4px; text-align: left; font-size: 15px; font-weight: 900; margin-bottom: 12px; }
.wm-chips { display: flex; justify-content: center; gap: 8px; margin: 0 0 14px; flex-wrap: wrap; }
.wm-chips span { background: rgba(255,255,255,.1); border-radius: 12px; padding: 7px 11px; font-weight: 800; font-size: 13px; color: #d9c8bc; }
.wm-chips b { color: #fff; font-size: 16px; display: block; }
.wm-name { display: block; text-align: left; font-weight: 800; font-size: 13px; color: #d9c8bc; }
.wm-name input { display: block; width: 100%; margin-top: 6px; font: 800 17px var(--body); padding: 11px 13px; border-radius: 12px; border: 0; background: rgba(255,255,255,.12); color: #fff; outline: none; }
.wm-name input::placeholder { color: rgba(255,255,255,.4); }
.wm-big { display: block; width: 100%; font: 900 17px var(--body); border: 0; border-radius: 14px; padding: 14px; margin-top: 10px; background: linear-gradient(90deg, var(--warm), var(--hot)); color: #fff; box-shadow: 0 4px 0 #a32a12; }
.wm-big:active { transform: translateY(2px); box-shadow: 0 2px 0 #a32a12; }
.wm-big.alt { background: rgba(255,255,255,.12); box-shadow: none; }
.wm-win .near { font-size: 13px; font-weight: 800; color: #d9c8bc; margin-top: 14px; line-height: 1.55; }
.wm-win .near b { color: #fff; }
.wm-next { font-weight: 800; font-size: 13px; color: #d9c8bc; margin: 12px 0 0; }

.wm-archive { margin-top: 14px; background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 14px; }
.wm-archive h2 { font: 900 20px var(--display); margin: 0 0 10px; }
.wm-archive .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.wm-archive button { font: 900 15px var(--body); border: 2px solid var(--line); background: #fbf4ea; color: var(--ink); border-radius: 10px; padding: 8px 4px; }
.wm-archive button.won { background: #ffe1d6; border-color: var(--hot); }
.wm-archive button.lost { background: #e4eef6; border-color: var(--cool); }
.wm-archive button small { display: block; font-size: 11px; font-weight: 800; color: var(--muted); }

.wm-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: #fff; font: 900 15px var(--body); padding: 11px 16px; border-radius: 12px; z-index: 60; transition: opacity .2s, transform .2s; pointer-events: none; box-shadow: 0 10px 24px rgba(0,0,0,.3); }
.wm-toast.on { opacity: 1; transform: translate(-50%, 0); }

.wm-content { max-width: 520px; margin: 0 auto; padding: 0 16px; display: flex; flex-direction: column; gap: 14px; color: #2a1d17; font-family: 'Nunito', system-ui, sans-serif; }
.wm-card { background: #fff; border: 2px solid #eadccb; border-radius: 18px; padding: 18px; line-height: 1.55; font-weight: 700; }
.wm-card h2 { font: 900 24px 'Fraunces', Georgia, serif; margin: 0 0 8px; }
.wm-card h3 { font: 900 17px 'Nunito', system-ui, sans-serif; margin: 14px 0 6px; }
.wm-card details { border-top: 1px solid #eadccb; padding: 10px 0; }
.wm-card summary { font-weight: 900; cursor: pointer; }
.wm-card p, .wm-card li { color: #4a3a31; }

@media (prefers-reduced-motion: reduce) {
  .wm-row .fill, .wm-thermo .bead { transition: none; }
  .wm-win, .wm-form.bad input { animation: none; }
}
