/* Sauna Vocabulary. Brand tokens match styles.css. */
:root {
  --night: #1c2606; --night-2: #141b04; --olive: #394615; --moss: #626927; --lime: #a4a340; --lime-hi: #c9c84a;
  --cedar: #ae7244; --cream: #f2e7d5; --sand: #bba693; --plunge: #9cc3bd; --ink: #26310a; --ink-2: #4c5524;
  --serif: "Sulphur Point", "Avenir Next", "Segoe UI", sans-serif;
  --sans: "Inconsolata", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 40px);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100svh; background: var(--night); color: var(--cream); font: 400 1.0625rem/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: 1.05; margin: 0; }
:focus-visible { outline: 3px solid var(--lime-hi); outline-offset: 3px; border-radius: 8px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1.5px solid transparent; font: 700 1rem/1 var(--sans); text-decoration: none; cursor: pointer; }
.btn-sage { background: var(--lime); color: var(--night); }
.btn-sage:hover { background: var(--lime-hi); }
.btn-ghost { background: transparent; border-color: rgba(242, 231, 213, 0.4); color: var(--cream); }
.btn-ghost:hover { border-color: var(--cream); }

.vbar { display: flex; align-items: center; gap: 16px; padding: 10px var(--gutter); background: var(--night-2); border-bottom: 1px solid rgba(242, 231, 213, 0.08); }
.vbrand img { height: 40px; width: auto; }
.vbar-title { font: 400 1.1rem/1 var(--serif); color: var(--lime-hi); }
.vbar-link { margin-left: auto; font-weight: 600; color: var(--cream); text-decoration-color: var(--lime); text-underline-offset: .2em; }
@media (max-width: 560px) { .vbar-link { display: none; } .vbrand img { height: 34px; } }

.vocab { max-width: 980px; margin: 0 auto; padding: clamp(28px, 5vw, 56px) var(--gutter) 40px; }
.vocab-head { text-align: center; margin-bottom: 26px; }
.vocab-head h1 { font-size: clamp(2.4rem, 1.6rem + 3vw, 3.8rem); }
.vocab-head p { max-width: 38rem; margin: 12px auto 20px; color: rgba(242, 231, 213, 0.82); }
.modes { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(242, 231, 213, 0.08); }
.modes button { min-height: 42px; padding: 0 20px; border: 0; border-radius: 999px; background: transparent; font-weight: 700; cursor: pointer; }
.modes button[aria-selected="true"] { background: var(--cream); color: var(--night); }

.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 22px; }
.filters button { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid rgba(242, 231, 213, 0.25); background: transparent; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--lime); color: var(--night); border-color: var(--lime); }

.deck { display: grid; grid-template-columns: auto minmax(0, 520px) auto; justify-content: center; align-items: center; gap: 14px; }
.deck-nav { width: 50px; height: 50px; border-radius: 50%; border: 1.5px solid rgba(242, 231, 213, 0.35); background: transparent; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.deck-nav:hover { border-color: var(--cream); }
.card-wrap { position: relative; perspective: 1400px; }
.card { position: relative; height: clamp(300px, 46vw, 360px); cursor: pointer; transform-style: preserve-3d; transition: transform .55s cubic-bezier(.3, .7, .2, 1); border-radius: 26px; }
.card.flipped { transform: rotateY(180deg); }
.face {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 28px 26px 70px; border-radius: 26px; backface-visibility: hidden; -webkit-backface-visibility: hidden; text-align: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}
.front { background: radial-gradient(circle at 50% 30%, #4a5a1c, var(--olive) 70%); }
.back { background: var(--cream); color: var(--ink); transform: rotateY(180deg); }
.tag { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); padding: 4px 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.22); font-size: 0.8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.back .tag { background: rgba(57, 70, 21, 0.12); color: var(--olive); }
.word { margin: 0; font: 400 clamp(2.4rem, 1.6rem + 3vw, 3.6rem)/1.05 var(--serif); overflow-wrap: anywhere; }
.word.small { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem); color: var(--olive); }
.say { margin: 0; font-weight: 700; color: var(--cedar); letter-spacing: .03em; }
.def { margin: 0; font-size: 1.02rem; line-height: 1.5; color: var(--ink-2); max-width: 30rem; }
.hint { margin: 0; font-size: 0.85rem; opacity: 0.6; }
.speak {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 3;
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 0; background: var(--lime); color: var(--night); font-weight: 700;
}
.speak:hover { background: var(--lime-hi); }
.speak.small { position: static; transform: none; margin: 0 auto 18px; }
.speak.playing { animation: pulse .9s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(201, 200, 74, 0.25); } }
.count { text-align: center; margin: 16px 0 6px; color: rgba(242, 231, 213, 0.7); }
.deck-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }
@media (max-width: 620px) {
  .deck { grid-template-columns: 1fr; }
  .deck-nav { display: none; }
}

/* quiz */
.quiz, .q-done { max-width: 640px; margin: 0 auto; padding: clamp(20px, 4vw, 34px); border-radius: 26px; background: var(--cream); color: var(--ink); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35); }
.q-top { display: flex; justify-content: space-between; font-weight: 700; color: var(--ink-2); font-size: 0.92rem; }
.q-bar { height: 6px; margin: 10px 0 20px; border-radius: 3px; background: rgba(57, 70, 21, 0.15); overflow: hidden; }
.q-bar span { display: block; height: 100%; width: 0; background: var(--olive); transition: width .4s; }
.q-ask { margin: 0 0 6px; font-weight: 700; color: var(--cedar); text-align: center; }
.q-prompt { margin: 0 0 16px; text-align: center; font: 400 clamp(1.4rem, 1.1rem + 1.4vw, 2.1rem)/1.2 var(--serif); color: var(--olive); }
.q-prompt.big { font-size: clamp(2.2rem, 1.6rem + 2.6vw, 3.2rem); }
.q-opts { display: grid; gap: 10px; }
.q-opts button {
  min-height: 54px; padding: 10px 16px; border-radius: 16px; text-align: left; cursor: pointer;
  border: 1.5px solid rgba(57, 70, 21, 0.25); background: #fffaf1; color: var(--ink); font: 600 1rem/1.35 var(--sans);
}
.q-opts button:hover:not(:disabled) { border-color: var(--olive); }
.q-opts button.right { background: #e3efc7; border-color: #6a8a1e; }
.q-opts button.wrong { background: #f8ddd3; border-color: #b9532e; }
.q-opts button:disabled { cursor: default; }
.q-feedback { min-height: 1em; margin-top: 16px; text-align: center; }
.q-feedback .miss { margin: 0; color: #8a3a1c; font-weight: 600; }
.q-next { display: flex; margin: 14px auto 0; }
.cheer { display: grid; justify-items: center; gap: 4px; animation: pop .35s ease-out; }
.cheer svg { width: min(100%, 320px); height: auto; }
.cheer p { margin: 0; font: 400 clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem)/1 var(--serif); color: var(--olive); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
.q-done { text-align: center; }
.q-done h2 { font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem); color: var(--olive); }
.q-done p { color: var(--ink-2); }
.q-done .btn-ghost { color: var(--olive); border-color: rgba(57, 70, 21, 0.4); }

/* celebration art */
.drop { animation: fall 1s linear infinite; }
@keyframes fall { 0% { transform: translateY(-10px); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(40px); opacity: 0; } }
.steam { animation: steam 2.2s ease-out infinite; }
@keyframes steam { 0% { transform: translateY(10px) scale(.6); opacity: 0; } 30% { opacity: .8; } 100% { transform: translateY(-50px) scale(1.4); opacity: 0; } }
.v-ladle { transform-box: view-box; transform-origin: 46px 34px; animation: tip 2.4s ease-in-out infinite; }
@keyframes tip { 0%, 100% { transform: rotate(-6deg); } 45%, 70% { transform: rotate(10deg); } }
.flick { transform-box: fill-box; transform-origin: 50% 100%; animation: flick .45s ease-in-out infinite alternate; }
@keyframes flick { from { transform: scaleY(.85); } to { transform: scaleY(1.12); } }
.thumb { transform-box: view-box; transform-origin: 196px 122px; animation: thumb 1s ease-in-out infinite; }
@keyframes thumb { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-9deg) translateY(-4px); } }
.bob { animation: bob 2.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(5px) rotate(4deg); } }
.twinkle { transform-box: fill-box; transform-origin: 50% 50%; animation: twinkle 1.6s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { transform: scale(.5) rotate(0); opacity: .3; } 50% { transform: scale(1.1) rotate(45deg); opacity: 1; } }
.puff { animation: puffs 2s ease-out infinite; }
@keyframes puffs { 0% { transform: translate(0, 0) scale(.4); opacity: 0; } 25% { opacity: .9; } 100% { transform: translate(22px, -14px) scale(1.5); opacity: 0; } }
.wave { animation: wave 2.6s ease-in-out infinite; }
@keyframes wave { 50% { transform: translateX(-12px); } }

.vfoot { text-align: center; padding: 10px var(--gutter) 40px; }
.vfoot a { color: var(--cream); opacity: .75; }

@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .drop, .steam, .v-ladle, .flick, .thumb, .bob, .twinkle, .puff, .wave, .cheer, .speak.playing { animation: none !important; }
}
