@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&family=Jost:wght@300;400;500&display=swap');

/* ── Tokens ───────────────────────────────────────────────── */
:root {
  --charcoal: #1c1a18;
  --warm:     #2c2820;
  --ember:    #c4632e;
  --ash:      #8a8278;
  --cream:    #f5f0e8;
  --light:    #faf7f2;
  --mid:      #e8e0d4;
  --success:  #4a7a5c;
  --success-bg: #eef4f0;
  --error:    #a84444;
  --error-bg: #f5eaea;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }
button:focus { outline: none; }
button:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }

body {
  font-family: 'Jost', sans-serif;
  background: var(--light);
  color: var(--charcoal);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease;
}

body.dark-bg { background: var(--charcoal); }

/* ── Screens ──────────────────────────────────────────────── */
.screen { display: none; min-height: 100vh; min-height: 100dvh; }
.screen.active { display: flex; flex-direction: column; }

/* ── Layout ───────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

/* ── Labels ───────────────────────────────────────────────── */
.section-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 0.75rem;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
  display: block;
  width: 100%;
  padding: 1rem;
  background: var(--charcoal);
  color: var(--cream);
  border: 0.5px solid transparent;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: background 0.2s ease;
}
.btn-primary:hover { background: var(--warm); }
.btn-primary.btn-ember { background: var(--ember); }
.btn-primary.btn-ember:hover { background: #b05828; }
.btn-primary:disabled { opacity: 0.35; cursor: default; }

.btn-audio-test {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.8rem 1rem;
  background: transparent;
  border: 1px solid var(--mid);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ash);
  transition: border-color 0.2s, color 0.2s;
}
.btn-audio-test:hover { border-color: var(--ash); color: var(--charcoal); }
.btn-audio-test .audio-test-icon { display: flex; align-items: center; }
.btn-audio-test .audio-test-icon svg { width: 13px; height: 13px; }
.btn-audio-test.speaking { color: var(--ember); border-color: var(--ember); }

.btn-ghost {
  display: block;
  width: 100%;
  padding: 1rem;
  background: transparent;
  color: var(--ash);
  border: 0.5px solid var(--mid);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: all 0.2s ease;
  margin-top: 0.75rem;
}
.btn-ghost:hover { border-color: var(--ash); color: var(--charcoal); }


/* ═══════════════════════════════════════════════════════════
   HOME SCREEN
═══════════════════════════════════════════════════════════ */
#screen-home .container { padding-top: 0; }

.home-header {
  padding: 3rem 0 2rem;
  border-bottom: 0.5px solid var(--mid);
  margin-bottom: 2rem;
}

.app-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 56px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--charcoal);
}

.app-subtitle {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ash);
  margin-top: 8px;
}

/* Mastery block */
.mastery-block {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 0.5px solid var(--mid);
}

.mastery-caret {
  color: var(--mid);
  flex-shrink: 0;
  line-height: 0;
}

.mastery-caret svg {
  width: 14px;
  height: 14px;
  display: block;
}

.mastery-fraction {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 52px;
  line-height: 1;
  color: var(--charcoal);
  letter-spacing: -0.01em;
}

.mastery-total {
  font-size: 32px;
  color: var(--ash);
}

.mastery-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ash);
  margin-top: 6px;
  margin-bottom: 1rem;
}

.mastery-bar-track {
  position: relative;
  height: 3px;
  background: var(--mid);
  border-radius: 2px;
  overflow: hidden;
}

.mastery-bar-practicing,
.mastery-bar-mastered {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  border-radius: 2px;
  width: 0%;
  transition: width 0.6s ease;
}

.mastery-bar-practicing { background: #ddb99a; } /* muted ember — practicing */
.mastery-bar-mastered   { background: var(--ember); } /* full ember — mastered */

.mastery-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.6rem;
  min-height: 1rem;
}

.mastery-sub {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: var(--ash);
}
.mastery-sub.has-due { color: var(--ember); }

.streak-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--ash);
}
.streak-icon {
  display: flex;
  align-items: center;
  color: var(--ember);
}
.streak-icon svg { width: 13px; height: 13px; }

/* Settings toggle & panel */
.settings-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  margin-top: 0.9rem;
  background: none;
  border: none;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ash);
  cursor: pointer;
  transition: color 0.15s ease;
}
.settings-toggle:hover { color: var(--charcoal); }

.settings-caret {
  display: flex;
  align-items: center;
  transition: transform 0.3s ease;
}
.settings-caret svg { width: 12px; height: 12px; display: block; }
.settings-toggle.open .settings-caret { transform: rotate(180deg); }

.settings-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.settings-panel.open { max-height: 500px; }

.settings-inner {
  padding-top: 1.5rem;
}

.settings-divider {
  height: 0.5px;
  background: var(--mid);
  margin: 1.25rem 0;
}

.btn-reset {
  background: none;
  border: none;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ash);
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease;
}
.btn-reset:hover { color: var(--error); }

/* Length picker */
.length-picker {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  background: var(--cream);
  border: 0.5px solid var(--mid);
  border-radius: 4px;
  overflow: hidden;
}

.length-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.6rem 0.5rem;
  background: transparent;
  border: none;
  border-right: 0.5px solid var(--mid);
  cursor: pointer;
  transition: background 0.15s ease;
  gap: 2px;
}
.length-option:last-child { border-right: none; }
.length-option:hover:not(.active) { background: var(--light); }

.length-option.active {
  background: var(--charcoal);
}

.length-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ash);
  transition: color 0.15s ease;
}
.length-option.active .length-label { color: var(--ash); }

.length-number {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 18px;
  line-height: 1;
  color: var(--charcoal);
  transition: color 0.15s ease;
}
.length-option.active .length-number { color: var(--cream); }

/* Category pills */
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 2rem;
}

.category-pill {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--warm);
  background: var(--cream);
  border: 0.5px solid var(--mid);
  border-radius: 2px;
  padding: 6px 12px;
  transition: all 0.15s ease;
}
.category-pill:hover { border-color: var(--ash); color: var(--charcoal); }
.category-pill.active { background: var(--charcoal); border-color: var(--charcoal); color: var(--cream); }


/* ═══════════════════════════════════════════════════════════
   QUIZ SCREEN
═══════════════════════════════════════════════════════════ */
#screen-quiz { background: var(--light); }

.quiz-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  border-bottom: 0.5px solid var(--mid);
  background: var(--light);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}

.quit-btn {
  background: none;
  border: none;
  color: var(--ash);
  padding: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.quit-btn svg { width: 20px; height: 20px; display: block; }
.quit-btn:hover { color: var(--charcoal); }

.progress-track {
  flex: 1;
  height: 2px;
  background: var(--mid);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--ember);
  border-radius: 2px;
  transition: width 0.4s ease;
  width: 0%;
}

.progress-label {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--ash);
  flex-shrink: 0;
  min-width: 38px;
  text-align: right;
}

.quiz-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* Question card */
.question-card {
  background: var(--cream);
  border: 0.5px solid var(--mid);
  border-radius: 4px;
  padding: 2rem 1.5rem;
  text-align: center;
  margin-bottom: 1.25rem;
}

.question-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 0.75rem;
}

.question-text {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-style: italic;
  font-size: 30px;
  letter-spacing: 0.02em;
  color: var(--charcoal);
  line-height: 1.25;
}

/* Options */
.options-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.option-card {
  width: 100%;
  padding: 0.9rem 1.25rem;
  background: var(--cream);
  border: 0.5px solid var(--mid);
  border-left: 3px solid transparent; /* fixed width — no layout shift on state change */
  border-radius: 4px;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--warm);
  text-align: left;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, opacity 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.option-card:hover:not(:disabled),
.option-card:focus-visible:not(:disabled) {
  border-color: var(--ember);
  border-left-color: var(--ember);
}
.option-card.correct {
  background: var(--success-bg);
  border-color: var(--success);
  border-left-color: var(--success);
  color: var(--success);
}
.option-card.wrong {
  background: var(--error-bg);
  border-color: var(--error);
  border-left-color: var(--error);
  color: var(--error);
  opacity: 0.85;
}
.option-card:disabled { cursor: default; }
.option-card.dimmed { opacity: 0.38; }

.option-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: none;
}
.option-icon svg { width: 20px; height: 20px; display: block; }
.option-card.correct .option-icon,
.option-card.wrong   .option-icon { display: block; }
.option-card.correct .option-icon { color: var(--success); }
.option-card.wrong   .option-icon { color: var(--error); }

/* Feedback */
.feedback {
  display: none;
  flex-direction: column;
  gap: 0.9rem;
  animation: fadeUp 0.2s ease;
}
.feedback.visible { display: flex; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.feedback-text {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.03em;
  color: var(--ash);
  text-align: center;
  line-height: 1.5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.feedback-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
}
.feedback-icon svg { width: 20px; height: 20px; display: block; }
.feedback.correct .feedback-text { color: var(--success); }
.feedback.wrong   .feedback-text { color: var(--error); }
.feedback-text em {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 16px;
  color: var(--charcoal);
  font-weight: 400;
}

.btn-continue {
  width: 100%;
  padding: 1rem;
  background: var(--charcoal);
  color: var(--cream);
  border: 0.5px solid transparent;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: background 0.2s ease;
}
.btn-continue:hover { background: var(--warm); }

/* ── Flashcard ───────────────────────────────────────────── */
.options-grid--flashcard { gap: 0; }

.flashcard-container {
  perspective: 900px;
  width: 100%;
  margin-bottom: 1.25rem;
  cursor: pointer;
}

.flashcard-inner {
  position: relative;
  width: 100%;
  height: 118px;
  transform-style: preserve-3d;
  transition: transform 0.45s ease;
}
.flashcard-inner.flipped { transform: rotateY(180deg); }

.flashcard-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  border: 0.5px solid var(--mid);
  border-radius: 4px;
  padding: 1.5rem;
  text-align: center;
  transition: border-color 0.15s;
}
.flashcard-container:hover .flashcard-face { border-color: var(--ash); }

.flashcard-hint {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ash);
  line-height: 1.7;
}

.flashcard-back {
  transform: rotateY(180deg);
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 300;
  font-style: italic;
  color: var(--charcoal);
  letter-spacing: 0.02em;
}

.flashcard-grade {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.btn-grade {
  flex: 1;
  padding: 0.875rem;
  border-radius: 4px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-grade--good { color: var(--success); border-color: var(--success); }
.btn-grade--good:hover { background: var(--success); color: var(--cream); }
.btn-grade--hard { color: var(--error); border-color: var(--error); }
.btn-grade--hard:hover { background: var(--error); color: var(--cream); }

/* ── Type the English ────────────────────────────────────── */
.options-grid--type { gap: 0.75rem; }

.type-input {
  width: 100%;
  padding: 1rem 1.1rem;
  background: var(--cream);
  border: 0.5px solid var(--mid);
  border-radius: 4px;
  font-family: 'Jost', sans-serif;
  font-size: 15px;
  font-weight: 300;
  color: var(--charcoal);
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.type-input::placeholder { color: var(--ash); }
.type-input:focus { border-color: var(--ash); }
.type-input:disabled { opacity: 0.6; }

/* ── Matching pairs ──────────────────────────────────────── */
.options-grid--matching {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.matching-tile {
  width: 100%;
  padding: 0.9rem 0.6rem;
  background: var(--cream);
  border: 1.5px solid var(--mid);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.01em;
  color: var(--warm);
  text-align: center;
  line-height: 1.35;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.2s;
}
.matching-tile--sanskrit {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  font-style: italic;
}
.matching-tile:hover:not(:disabled):not(.matched),
.matching-tile:focus-visible:not(:disabled):not(.matched) {
  border-color: var(--ember);
}
.matching-tile.selected {
  border-color: var(--ember);
  background: rgba(196, 99, 46, 0.07);
  color: var(--ember);
}
.matching-tile.matched {
  border-color: var(--success);
  background: var(--success-bg);
  color: var(--success);
  opacity: 0.65;
  cursor: default;
}
@keyframes wrongFlash {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-5px); }
  75%       { transform: translateX(5px); }
}
.matching-tile.wrong-flash {
  border-color: var(--error);
  background: var(--error-bg);
  color: var(--error);
  animation: wrongFlash 0.4s ease;
}

/* ── Tile build ───────────────────────────────────────────── */
.options-grid--tilebuild {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.tilebuild-instruction {
  font-size: 12px;
  text-align: center;
  color: var(--ash);
  letter-spacing: 0.02em;
  margin-bottom: 0.6rem;
}

.tilebuild-answer {
  min-height: 62px;
  border: 1px dashed var(--mid);
  border-radius: 12px;
  padding: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-content: flex-start;
  margin-bottom: 1.25rem;
}

.tilebuild-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  min-height: 44px;
  margin-bottom: 1.5rem;
}

.build-tile {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  font-style: italic;
  color: var(--charcoal);
  background: var(--cream);
  border: 1.5px solid var(--mid);
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  line-height: 1.2;
  transition: background 0.15s, border-color 0.15s, transform 0.1s, opacity 0.15s;
}

.build-tile:hover:not(:disabled):not(.ghost) {
  border-color: var(--ash);
  background: white;
}

.build-tile:active:not(:disabled):not(.ghost) {
  transform: scale(0.94);
}

.build-tile.ghost {
  background: var(--mid);
  border-color: var(--mid);
  color: transparent;
  opacity: 0.3;
  pointer-events: none;
}

.build-tile--placed {
  background: white;
  border-color: var(--charcoal);
}

.build-tile.correct {
  border-color: var(--success);
  background: var(--success-bg);
  color: var(--success);
}

.build-tile.wrong {
  border-color: var(--error);
  background: var(--error-bg);
  color: var(--error);
}

@keyframes tilePop {
  from { transform: scale(0.7); opacity: 0.4; }
  to   { transform: scale(1);   opacity: 1; }
}

.build-tile.popping {
  animation: tilePop 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.hidden { display: none !important; }


/* ═══════════════════════════════════════════════════════════
   INSIGHT SCREEN
═══════════════════════════════════════════════════════════ */
@keyframes insightFadeOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-12px); }
}

.insight-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  background: var(--light);
  animation: resultFade 0.35s ease forwards;
}

#screen-insight.exiting .insight-panel {
  animation: insightFadeOut 0.3s ease forwards;
}

.insight-inner {
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.insight-prelude {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 2rem;
}

.insight-root {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 60px;
  letter-spacing: 0.08em;
  color: var(--charcoal);
  line-height: 1;
  margin-bottom: 1.25rem;
}

.insight-rule {
  width: 28px;
  height: 2px;
  background: var(--ember);
  border-radius: 1px;
  margin: 0 auto 1.25rem;
}

.insight-meaning {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-style: italic;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--ember);
  margin-bottom: 1.75rem;
}

.insight-body {
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--ash);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.insight-poses-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 0.75rem;
}

.insight-poses {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.insight-pose-chip {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  font-family: inherit;
  color: var(--warm);
  background: var(--cream);
  border: 0.5px solid var(--mid);
  border-radius: 2px;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.insight-pose-chip:hover {
  background: var(--mid);
  border-color: var(--ash);
}

/* Staggered entrance */
.insight-prelude,
.insight-root,
.insight-rule,
.insight-meaning,
.insight-body,
.insight-poses-label,
.insight-poses,
#insight-continue-btn { opacity: 0; }

#screen-insight.active .insight-prelude    { animation: resultSlideUp 0.4s ease forwards; animation-delay: 0.05s; }
#screen-insight.active .insight-root       { animation: resultSlideUp 0.5s ease forwards; animation-delay: 0.18s; }
#screen-insight.active .insight-rule       { animation: resultSlideUp 0.4s ease forwards; animation-delay: 0.32s; }
#screen-insight.active .insight-meaning    { animation: resultSlideUp 0.4s ease forwards; animation-delay: 0.38s; }
#screen-insight.active .insight-body       { animation: resultSlideUp 0.4s ease forwards; animation-delay: 0.5s;  }
#screen-insight.active .insight-poses-label{ animation: resultSlideUp 0.4s ease forwards; animation-delay: 0.6s;  }
#screen-insight.active .insight-poses      { animation: resultSlideUp 0.4s ease forwards; animation-delay: 0.68s; }
#screen-insight.active #insight-continue-btn{ animation: resultSlideUp 0.4s ease forwards; animation-delay: 0.78s; }


/* ── Quiz screen fade-out before result ──────────────────────── */
@keyframes screenFadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

#screen-quiz.exiting {
  animation: screenFadeOut 0.25s ease forwards;
  pointer-events: none;
}


/* ═══════════════════════════════════════════════════════════
   RESULT SCREEN
═══════════════════════════════════════════════════════════ */
#screen-result,
#screen-mastery-summary,
#screen-streak-milestone {
  background: var(--charcoal);
}

/* ── End-session flow: fixed footer wrapper ──────────────────── */
.end-flow-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
  background: var(--charcoal);
  z-index: 10;
}

.result-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem 5rem;
  animation: resultFade 0.35s ease forwards;
}

@keyframes resultFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.result-inner {
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.result-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 0.25rem;
}

.result-score {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 72px;
  letter-spacing: 0.06em;
  color: var(--cream);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.result-message {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-style: italic;
  font-size: 19px;
  letter-spacing: 0.03em;
  color: var(--ash);
  margin-bottom: 2.5rem;
  line-height: 1.4;
}

.result-dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 2.5rem;
}

.result-icon {
  display: flex;
  width: 18px;
  height: 18px;
}
.result-icon svg { width: 18px; height: 18px; display: block; }
.result-icon.correct { color: var(--success); }
.result-icon.wrong   { color: var(--error); opacity: 0.7; }


/* ── Result screen: staggered entrance ─────────────────────── */
@keyframes resultSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-streak {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--ember);
  margin-top: 0.2rem;
  margin-bottom: 1.25rem;
}
.result-streak .streak-icon svg { width: 13px; height: 13px; }

.result-label,
.result-streak,
.result-score,
.result-message,
.result-dots {
  opacity: 0;
}

#screen-result.active .result-label   { animation: resultSlideUp 0.45s ease forwards; animation-delay: 0.05s; }
#screen-result.active .result-streak  { animation: resultSlideUp 0.45s ease forwards; animation-delay: 0.15s; }
#screen-result.active .result-score   { animation: resultSlideUp 0.5s  ease forwards; animation-delay: 0.28s; }
#screen-result.active .result-message { animation: resultSlideUp 0.45s ease forwards; animation-delay: 0.44s; }
#screen-result.active .result-dots    { animation: resultSlideUp 0.45s ease forwards; animation-delay: 0.58s; }


/* ═══════════════════════════════════════════════════════════
   MASTERY SUMMARY SCREEN
═══════════════════════════════════════════════════════════ */
.mastery-summary-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.5rem 5rem;
  animation: resultFade 0.35s ease forwards;
}

.mastery-summary-container {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mastery-summary-header {
  text-align: center;
  margin-bottom: 1rem;
}

.mastery-summary-count {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 96px;
  letter-spacing: 0.04em;
  color: var(--cream);
  line-height: 1;
  margin-bottom: 1rem;
}

.mastery-summary-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ash);
}

.mastery-summary-scene {
  width: 100%;
}

#mastery-summary-card {
  width: 100%;
}

.mastery-summary-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.mastery-summary-counter {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--ash);
}

/* ── Mastery summary: staggered entrance ─────────────────────── */
.mastery-summary-count,
.mastery-summary-label,
#mastery-summary-card,
.mastery-summary-nav {
  opacity: 0;
}

#screen-mastery-summary.active .mastery-summary-count { animation: resultSlideUp 0.5s  ease forwards; animation-delay: 0.05s; }
#screen-mastery-summary.active .mastery-summary-label { animation: resultSlideUp 0.4s  ease forwards; animation-delay: 0.2s;  }
#screen-mastery-summary.active #mastery-summary-card  { animation: resultSlideUp 0.45s ease forwards; animation-delay: 0.35s; }
#screen-mastery-summary.active .mastery-summary-nav   { animation: resultSlideUp 0.4s  ease forwards; animation-delay: 0.5s;  }


/* ═══════════════════════════════════════════════════════════
   STREAK MILESTONE SCREEN
═══════════════════════════════════════════════════════════ */
.milestone-panel {
  flex: 1;
  background: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem 5rem;
  animation: resultFade 0.35s ease forwards;
}

.milestone-inner {
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.milestone-icon {
  color: var(--ember);
  margin-bottom: 1.5rem;
}
.milestone-icon svg { width: 40px; height: 40px; display: block; margin: 0 auto; }

.milestone-number {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 96px;
  letter-spacing: 0.04em;
  color: var(--cream);
  line-height: 1;
  margin-bottom: 1rem;
}

.milestone-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 2rem;
}

.milestone-copy {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-style: italic;
  font-size: 19px;
  letter-spacing: 0.03em;
  color: var(--ash);
  line-height: 1.4;
  margin-bottom: 3rem;
}

.milestone-icon,
.milestone-number,
.milestone-label,
.milestone-copy {
  opacity: 0;
}

#screen-streak-milestone.active .milestone-icon   { animation: resultSlideUp 0.4s ease forwards; animation-delay: 0.05s; }
#screen-streak-milestone.active .milestone-number { animation: resultSlideUp 0.5s ease forwards; animation-delay: 0.2s; }
#screen-streak-milestone.active .milestone-label  { animation: resultSlideUp 0.4s ease forwards; animation-delay: 0.35s; }
#screen-streak-milestone.active .milestone-copy   { animation: resultSlideUp 0.4s ease forwards; animation-delay: 0.5s; }


/* ── Home footer links ────────────────────────────────────── */
.home-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 2.5rem;
  padding-bottom: 1rem;
}

.home-footer-link {
  background: none;
  border: none;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ash);
  cursor: pointer;
  transition: color 0.15s ease;
  padding: 0;
}
.home-footer-link:hover { color: var(--charcoal); }

.home-footer-sep {
  color: var(--mid);
  font-size: 10px;
  line-height: 1;
}

/* ── Onboarding modal ─────────────────────────────────────── */
.onboarding-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28, 26, 24, 0.65);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: resultFade 0.25s ease forwards;
}
.onboarding-modal.visible { display: flex; }

.onboarding-card {
  background: var(--light);
  border-radius: 6px;
  width: 100%;
  max-width: 340px;
  padding: 2rem 1.75rem 1.75rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  animation: resultSlideUp 0.3s ease forwards;
}

.onboarding-skip {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ash);
  cursor: pointer;
  transition: color 0.15s;
}
.onboarding-skip:hover { color: var(--charcoal); }

.onboarding-content {
  text-align: center;
  margin-bottom: 1.75rem;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.onboarding-content.fading {
  opacity: 0;
  transform: translateY(6px);
}

.onboarding-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--ember);
}
.onboarding-icon svg { width: 44px; height: 44px; }

.onboarding-heading {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-style: italic;
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--charcoal);
  margin-bottom: 0.75rem;
}

.onboarding-body {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--ash);
  line-height: 1.75;
}

.onboarding-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 1.25rem;
}

.onboarding-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mid);
  transition: background 0.2s ease;
}
.onboarding-dot.active { background: var(--ember); }

/* ═══════════════════════════════════════════════════════════
   GLOSSARY SCREEN
═══════════════════════════════════════════════════════════ */
#screen-glossary { background: var(--light); }

.glossary-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  border-bottom: 0.5px solid var(--mid);
  background: var(--light);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}

.glossary-header-title {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ash);
}

.glossary-body {
  flex: 1;
  overflow-y: auto;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.glossary-section {
  margin-top: 2rem;
}

.glossary-category-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ash);
  padding-bottom: 0.6rem;
  border-bottom: 0.5px solid var(--mid);
  margin-bottom: 0;
}

.glossary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 0.5px solid var(--mid);
}

.glossary-mastered-tick {
  display: inline-flex;
  align-items: center;
  margin-left: 5px;
  color: var(--ember);
  vertical-align: middle;
}
.glossary-mastered-tick svg { width: 13px; height: 13px; }

.glossary-english {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--warm);
  flex-shrink: 0;
}

.glossary-sanskrit {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-style: italic;
  font-size: 16px;
  letter-spacing: 0.02em;
  color: var(--charcoal);
  text-align: right;
}

/* ═══════════════════════════════════════════════════════════
   POSE CARD
═══════════════════════════════════════════════════════════ */
.pose-card-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(28, 26, 24, 0.88);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.pose-card-overlay.visible {
  display: flex;
  animation: overlayFadeIn 0.25s ease forwards;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.pose-card-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 360px;
  margin-bottom: 1.25rem;
}

.pose-card-back {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.5);
  background: none;
  border: none;
  padding: 0.25rem 0;
  transition: color 0.15s;
}

.pose-card-back:hover { color: rgba(245, 240, 232, 0.85); }

.pose-card-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  color: rgba(245, 240, 232, 0.45);
  transition: color 0.15s;
  padding: 0;
}

.pose-card-nav-btn svg { width: 20px; height: 20px; }
.pose-card-nav-btn:hover { color: rgba(245, 240, 232, 0.85); }

.pose-card-scene {
  perspective: 900px;
  width: 100%;
  max-width: 360px;
}

.pose-card {
  position: relative;
  width: 100%;
  min-height: 380px;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.45), 0 4px 12px rgba(0,0,0,0.2);
  transform-style: preserve-3d;
  transition: transform 0.45s ease;
  cursor: default;
}

.pose-card.has-description { cursor: pointer; }
.pose-card.flipped { transform: rotateY(180deg); }

.pose-card-front,
.pose-card-back-face {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: var(--cream);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}


.pose-card-back-face {
  transform: rotateY(180deg);
  justify-content: center;
  gap: 1.5rem;
}

.pose-card-back-category {
  font-family: 'Jost', sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--ash);
}

.pose-card-description {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.55;
  color: var(--charcoal);
  letter-spacing: 0.01em;
  margin: 0;
  padding: 0 0.25rem;
}

.pose-card-flip-hint {
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--mid);
  min-height: 1em;
}

.pose-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

@keyframes cardRise {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.pose-card-category {
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ash);
  border: 1px solid var(--mid);
  border-radius: 20px;
  padding: 0.3rem 0.75rem;
}

.pose-card-sanskrit {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-style: italic;
  font-size: 42px;
  line-height: 1.1;
  letter-spacing: 0.03em;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
}

.pose-card-rule {
  width: 28px;
  height: 2px;
  background: var(--ember);
  border-radius: 1px;
  margin-bottom: 1.5rem;
}

.pose-card-english {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--charcoal);
}

.pose-card-pronunciation {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 15px;
  color: var(--ash);
  letter-spacing: 0.04em;
  margin-bottom: 1.75rem;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.15s;
}
.pose-card-pronunciation:hover { color: var(--charcoal); }
.pron-speaker { display: flex; align-items: center; flex-shrink: 0; margin-bottom: -4px;}
.pron-speaker svg { width: 13px; height: 13px; }

.pose-card-mastery {
  display: flex;
  gap: 6px;
  align-items: center;
}

.mastery-pip {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.5px solid var(--mid);
  background: transparent;
  transition: background 0.5s ease, border-color 0.5s ease;
}

.mastery-pip--filled {
  background: var(--ember);
  border-color: var(--ember);
}

/* Glossary rows tappable */
.glossary-hint {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ash);
  text-align: center;
  padding: 0.75rem 1.5rem 0rem;
  margin: 0;
  opacity: .5;
}

.glossary-row { cursor: pointer; }
.glossary-row:hover { background: rgba(196, 99, 46, 0.04); }

/* ═══════════════════════════════════════════════════════════
   STATS SCREEN
═══════════════════════════════════════════════════════════ */
#screen-stats { background: var(--light); }

/* ── Roots screen ──────────────────────────────────────────── */
#screen-roots { background: var(--light); }

.roots-body {
  flex: 1;
  overflow-y: auto;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
}

.roots-count {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ash);
  text-align: center;
  margin-bottom: 0.3rem;
}

#roots-hint {
  padding: 0;
  margin-bottom: 1.5rem;
}

.roots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.roots-tile {
  border-radius: 8px;
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 72px;
  text-align: center;
}

.roots-tile--unlocked {
  background: var(--cream);
  border: 0.5px solid var(--mid);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.roots-tile--unlocked:hover {
  border-color: var(--ember);
}

.roots-tile--locked {
  background: var(--mid);
  opacity: 0.35;
}

.roots-tile-root {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 18px;
  color: var(--charcoal);
  letter-spacing: 0.02em;
}

.roots-tile-meaning {
  font-size: 10px;
  color: var(--ash);
  letter-spacing: 0.05em;
}

.roots-tile-lock {
  font-size: 18px;
  color: var(--ash);
}

.stats-body {
  flex: 1;
  overflow-y: auto;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.stats-section {
  margin-top: 2rem;
}

.stats-section:first-child {
  padding-bottom: 0.5rem;
}

.stats-section .mastery-sub {
  margin-top: 0.6rem;
}

.stats-section-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ash);
  padding-bottom: 0.6rem;
  border-bottom: 0.5px solid var(--mid);
  margin-bottom: 0;
}

.stats-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.75rem 0;
  border-bottom: 0.5px solid var(--mid);
}

.stats-row-label {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--warm);
}

.stats-row-value {
  font-size: 13px;
  font-weight: 400;
  color: var(--ash);
}

.stats-row-streak {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.stats-row-sanskrit {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 16px;
  font-weight: 400;
  color: var(--charcoal);
}

.stats-cat-row {
  padding: 0.85rem 0;
  border-bottom: 0.5px solid var(--mid);
}

.stats-cat-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.stats-cat-name {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--warm);
}

.stats-cat-count {
  font-size: 12px;
  color: var(--ash);
}

/* Mastery block on home is tappable */
.mastery-block { cursor: pointer; }

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 380px) {
  .app-title     { font-size: 42px; }
  .question-text { font-size: 26px; }
  .result-score  { font-size: 56px; }
}

/* ── Update overlay ───────────────────────────────────────── */
#update-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--mid);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
}

/* ═══════════════════════════════════════════════════════════
   DICE SCREEN
═══════════════════════════════════════════════════════════ */
#screen-dice { background: var(--light); }

.glossary-header-dice { margin-left: auto; }

.dice-body {
  flex: 1;
  overflow-y: auto;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  display: flex;
  flex-direction: column;
}

.dice-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 2.5rem;
  gap: 1.5rem;
  width: 100%;
}

.dice-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ash);
  margin: 0;
}

.dice-stepper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dice-step-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--ember);
  background: none;
  color: var(--ember);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.dice-step-btn svg { width: 18px; height: 18px; display: block; }
.dice-step-btn:hover {
  background: var(--ember);
  color: var(--cream);
}

.dice-count-input {
  width: 56px;
  text-align: center;
  font-size: 28px;
  font-weight: 300;
  color: var(--charcoal);
  background: none;
  border: none;
  border-bottom: 1.5px solid var(--mid);
  padding: 0.1rem 0;
  -moz-appearance: textfield;
}
.dice-count-input::-webkit-outer-spin-button,
.dice-count-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dice-count-input:focus { outline: none; border-bottom-color: var(--ember); }

.dice-roll-btn { margin-top: 0.5rem; }

.dice-results { margin-top: 2rem; width: 100%; }

