@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/Montserrat.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/Montserrat-Italic.ttf") format("truetype");
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #182748;
  --muted: #526687;
  --navy: #101941;
  --blue: #2256cc;
  --blue-dark: #143b9b;
  --paper: #f4f7fd;
  --line: #dce5f3;
  --gold: #ffda68;
  --shadow: 0 10px 28px #253e7010;
  --motion-ease: cubic-bezier(.22, 1, .36, 1);
  --title-font: "Montserrat", system-ui, sans-serif;
  font-family: var(--title-font);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html:has(dialog[open]) { overflow: hidden; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #2165dc; outline-offset: 4px; }
.space-section :focus-visible { outline-color: #aeeeff; }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  z-index: 3;
  left: 16px;
  top: 10px;
  border-radius: 8px;
  background: white;
  padding: 10px 14px;
}
.wrap { width: min(1224px, calc(100% - 72px)); margin-inline: auto; }
[id="library"], [id="practice"], [id="progress"] { scroll-margin-top: 20px; }

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 800;
  font-size: .875rem;
  line-height: 1.2;
  text-align: center;
  transition: background .18s, transform .18s, box-shadow .18s;
}
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:active:not(:disabled) { transform: translateY(0); }
.button-gold {
  background: linear-gradient(180deg, #ffe793, #ffcf52);
  border-color: #ffeaa8;
  color: #30213b;
  box-shadow: 0 4px 0 #bc7a28, 0 10px 24px #f9b03d3c;
}
.button-gold:hover { box-shadow: 0 6px 0 #bc7a28, 0 12px 28px #f9b03d52; }
.button-ghost { background: #ffffff0c; color: #f1f5ff; border-color: #9fb1eb64; }
.button-ghost:hover { background: #ffffff1b; }
.button-blue { background: var(--blue); color: white; }
.button-blue:hover { background: var(--blue-dark); }
.button-soft { background: #eef3ff; border-color: #dce6fb; color: var(--blue-dark); }
.button-soft:hover { background: #e2ecff; }

.space-section {
  position: relative;
  isolation: isolate;
  color: white;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 76% 60%, #2d54bd 0, #253e94 23%, transparent 61%),
    radial-gradient(ellipse at 12% 110%, #202f66 2%, transparent 64%),
    linear-gradient(128deg, #111838 0%, #101b49 62%, #132764 100%);
}
.space-section::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .55;
  background:
    radial-gradient(circle, #c8e8ff 1px, transparent 1.7px) 16px 7px / 117px 102px,
    radial-gradient(circle, #d5c0ff 1px, transparent 1.8px) 44px 29px / 193px 149px,
    radial-gradient(circle, #fff 1.3px, transparent 2px) 63px 50px / 317px 191px;
  mask-image: linear-gradient(100deg, #0003, #000 70%);
  pointer-events: none;
}
.site-header { border-bottom: 1px solid #a7b4f024; }
.nav-wrap { min-height: 76px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.brand { width: 146px; }
.brand img { width: 100%; height: auto; }
.top-nav { display: flex; align-items: center; gap: 7px; }
.top-nav a {
  padding: 10px 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #e0e8ff;
  font-size: .88rem;
  font-weight: 700;
  white-space: nowrap;
}
.top-nav a:hover, .top-nav .nav-primary { background: #7993ff22; border-color: #8ca3f735; color: white; }
.button-add { justify-self: end; background: #fafbff; color: #192e61; }
.button-add span { font-size: 1.25rem; line-height: .9; color: #2458cc; }
.button-add:hover { background: #e8efff; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  min-height: 440px;
  padding-block: 38px 77px;
}
.hero-copy { position: relative; z-index: 2; }
.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 17px;
  color: #cfddff;
  font-weight: 850;
  font-size: .72rem;
  letter-spacing: .13em;
}
.eyebrow span { color: var(--gold); font-size: 1.05rem; }
.hero h1 {
  display: grid;
  justify-items: start;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  font-family: var(--title-font);
  font-size: clamp(3.85rem, 6.85vw, 6.3rem);
  font-weight: 900;
  line-height: .96;
  letter-spacing: -.065em;
  transform-origin: left center;
  transition: transform .42s var(--motion-ease);
}
.hero-title-line {
  display: block;
  color: var(--title-color);
  filter: drop-shadow(0 4px 6px #0613327a) drop-shadow(0 0 9px var(--title-glow));
  transition: filter .42s var(--motion-ease);
}
.hero-title-silver {
  --title-color: #f4f8ff;
  --title-metal: linear-gradient(180deg, #fff 12%, #f6faff 37%, #d3e2f8 55%, #bfceed 61%, #f0f6ff 86%, #dce7fa);
  --title-glow: #c8e3ff2b;
  --title-hover-glow: #c1e4ff85;
  --title-sheen: #fff;
}
.hero-title-gold {
  --title-color: var(--gold);
  --title-metal: linear-gradient(180deg, #fff1a6 8%, #ffe386 32%, #ffca52 53%, #eaa333 59%, #ffdb71 82%, #ffc24c);
  --title-glow: #ffca592b;
  --title-hover-glow: #ffd15c8c;
  --title-sheen: #fff5c3;
}
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .hero-title-line {
    background-image: linear-gradient(112deg, transparent 46%, var(--title-sheen) 50%, transparent 54%), var(--title-metal);
    background-size: 280% 100%, 100% 100%;
    background-position: 120% 0, 0 0;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: title-shimmer 3.7s cubic-bezier(.36, .08, .5, 1) infinite;
  }
  .hero-title-gold { animation-delay: .14s; }
}
@keyframes title-shimmer {
  0%, 10% { background-position: 120% 0, 0 0; }
  43%, 100% { background-position: -20% 0, 0 0; }
}
.hero-description {
  color: #dce6ff;
  max-width: 410px;
  margin: 20px 0 24px;
  font-size: 1.04rem;
  line-height: 1.65;
}
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-actions .button { min-height: 48px; padding-inline: 16px; }
.hero-actions .button-gold span { font-size: 1.18rem; margin-left: 4px; }
.hero-art { position: relative; align-self: stretch; min-height: 320px; }
.hero-planet {
  position: absolute;
  left: 50%;
  top: 48%;
  width: min(68%, 360px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid #77baff70;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 26% 22%, #77dafa66, transparent 48%),
    radial-gradient(ellipse at 66% 75%, #2949b3, #192663 73%);
  box-shadow: inset 14px 10px 44px #64cefd46, inset -29px -11px 53px #0c184cb5, 0 0 57px #5899f45c;
}
.hero-orbit {
  position: absolute;
  left: 50%;
  top: 69%;
  width: 82%;
  height: 32%;
  transform: translate(-50%, -50%) rotate(-13deg);
  border: 1.5px solid #95d9ff90;
  border-radius: 50%;
  box-shadow: 0 0 14px #54b6ff56, inset 0 0 15px #59d7ff46;
  pointer-events: none;
}
.orbit-front { z-index: 2; border-color: #9ddcffbc; clip-path: inset(60% 0 -20%); }
.hero-sparkle {
  position: absolute;
  z-index: 1;
  color: #fff0a6;
  text-shadow: 0 0 18px #ffd762;
  font-size: 1.9rem;
  line-height: 1;
  animation: twinkle 4s ease-in-out infinite;
}
.sparkle-one { top: 17%; left: 12%; }
.sparkle-two { top: 64%; right: 11%; font-size: 2.3rem; animation-delay: -1.4s; }
.sparkle-three { top: 5%; left: 66%; color: #dffaff; font-size: 1.3rem; animation-delay: -2.8s; }
.sparkle-four { bottom: 10%; left: 21%; color: #dffaff; font-size: 1.25rem; animation-delay: -2s; }
@keyframes twinkle { 50% { opacity: .55; scale: .81; } }

.epoik {
  display: block;
  flex-shrink: 0;
  aspect-ratio: var(--pose-ratio);
  background-image: url("assets/epoik-poses.png");
  background-repeat: no-repeat;
  background-size: var(--pose-size) auto;
  background-position: var(--pose-position);
}
.epoik--guide { --pose-ratio: 351 / 480; --pose-size: 480.62678%; --pose-position: 1.49701% 4.16667%; }
.epoik--hearts { --pose-ratio: 332 / 321; --pose-size: 508.13253%; --pose-position: 42.50923% 1.33333%; }
.epoik--yes { --pose-ratio: 336 / 321; --pose-size: 502.08333%; --pose-position: 70.68838% 1.6%; }
.epoik--think { --pose-ratio: 275 / 322; --pose-size: 613.45455%; --pose-position: 95.75071% 1.3369%; }
.epoik--surprise { --pose-ratio: 327 / 342; --pose-size: 515.90214%; --pose-position: 55.58824% 93.22034%; }
.epoik--cool { --pose-ratio: 287 / 338; --pose-size: 587.80488%; --pose-position: 81.5% 92.73743%; }
.hero-epoik {
  position: absolute;
  z-index: 1;
  left: 47%;
  bottom: -4%;
  width: min(49%, 257px);
  translate: -50% 0;
  filter: drop-shadow(0 18px 18px #081442a6) drop-shadow(0 0 18px #61d7ff48);
  animation: float-epoik 5.4s ease-in-out infinite;
}
@keyframes float-epoik { 50% { translate: -50% -9px; } }
.hero-greeting {
  position: absolute;
  z-index: 3;
  top: 22%;
  right: 3%;
  margin: 0;
  color: #1a2f68;
  padding: 10px 15px;
  border-radius: 15px 15px 15px 4px;
  background: #f7f9ff;
  box-shadow: 0 5px 18px #0b174b6b;
  font-weight: 850;
  font-size: .86rem;
  transform: rotate(4deg);
}

.summary-bar {
  position: relative;
  z-index: 2;
  margin-top: -43px;
  display: grid;
  grid-template-columns: minmax(170px, 1.45fr) repeat(3, minmax(110px, 1fr));
  align-items: center;
  min-height: 104px;
  gap: 18px;
  padding: 17px 24px;
  border: 1px solid #e3eafa;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 13px 30px #1f387722;
}
.progress-intro h2 { margin: 0 0 10px; font-size: .95rem; font-weight: 850; }
.progress-line { display: flex; align-items: center; gap: 10px; }
.progress-line progress {
  appearance: none;
  width: 100%;
  height: 9px;
  border: 0;
  border-radius: 30px;
  background: #e9effb;
  color: #3a69eb;
}
progress::-webkit-progress-bar { background: #e9effb; border-radius: 30px; }
progress::-webkit-progress-value { background: linear-gradient(90deg, #575ee7, #3699df); border-radius: 30px; transition: width .3s; }
progress::-moz-progress-bar { background: linear-gradient(90deg, #575ee7, #3699df); border-radius: 30px; }
.progress-line strong { min-width: 3em; color: var(--blue-dark); font-size: .8rem; }
.summary-metric { display: flex; align-items: center; gap: 10px; padding-left: 17px; border-left: 1px solid #e6ecf7; }
.metric-symbol { flex: 0 0 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; font-size: 1.3rem; font-weight: 850; }
.metric-total .metric-symbol { background: #edf0ff; color: #4746b7; }
.metric-learned .metric-symbol { background: #e6f7ec; color: #187c50; }
.metric-review .metric-symbol { background: #fff1d8; color: #a05e17; }
.summary-metric strong { display: block; font-size: 1.44rem; line-height: 1.12; }
.summary-metric div span { display: block; color: var(--muted); font-size: .76rem; margin-top: 3px; font-weight: 650; }

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 25px;
  align-items: start;
  margin: 38px 0 44px;
}
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin: 0 0 15px; }
.section-kicker { color: #4b61a0; font-size: .69rem; font-weight: 850; letter-spacing: .14em; margin: 0 0 5px; }
.section-heading h2 { margin: 0; font: 850 clamp(1.75rem, 3.3vw, 2.45rem)/1.15 var(--title-font); letter-spacing: -.035em; }
.results-pill { border: 1px solid #dce6fc; background: #eaf0ff; color: #3658a4; padding: 6px 11px; border-radius: 999px; white-space: nowrap; font-size: .78rem; font-weight: 800; }
.filters-card { background: #fff; border: 1px solid var(--line); border-radius: 17px; padding: 12px; margin-bottom: 15px; box-shadow: var(--shadow); }
.search-control {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f5f8ff;
  border: 1px solid #e0e8f6;
  border-radius: 10px;
  padding: 0 11px;
}
.search-control:focus-within { outline: 2px solid #5283e9; outline-offset: 1px; }
.search-control svg { width: 19px; height: 19px; flex: 0 0 19px; fill: none; stroke: #5169a2; stroke-width: 2; stroke-linecap: round; }
.search-control input { width: 100%; min-width: 0; height: 42px; border: 0; background: transparent; color: var(--ink); outline: none; font-size: .89rem; }
.search-control input::placeholder { color: #627596; }
.toolbar-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.tab-group { display: flex; flex-wrap: wrap; gap: 3px; }
.tab { min-height: 37px; border: 1px solid transparent; border-radius: 9px; background: transparent; padding: 6px 10px; color: #4c6082; font-size: .8rem; font-weight: 800; }
.tab:hover, .tab.active { background: #eaf0ff; border-color: #dce6fc; color: #234baa; }
.status-select { min-height: 37px; border: 1px solid #e1e8f5; border-radius: 9px; padding: 5px 10px; background: #f6f8fc; color: #415574; font-size: .8rem; font-weight: 700; }

.word-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.word-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--shadow);
  transition: box-shadow .32s var(--motion-ease), transform .32s var(--motion-ease);
}
.word-card:hover { box-shadow: 0 13px 28px #213b7124; }
.word-card.theme-ocean { border-color: #d2e5f2; }
.theme-ocean { --animal-bg: #d7efff; --animal-light: #f4fbff; --badge-bg: #f3fbff; --badge-ink: #23609a; }
.theme-forest { --animal-bg: #def1d9; --animal-light: #fbfff1; --badge-bg: #f1fbef; --badge-ink: #396b35; }
.theme-other { --animal-bg: #ebe2fe; --animal-light: #fdf7ff; --badge-bg: #fcf6ff; --badge-ink: #62469c; }
.word-art-frame {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1.58;
  min-height: 137px;
  border-radius: 16px 16px 0 0;
  background: radial-gradient(ellipse at 50% 58%, var(--animal-light) 0%, var(--animal-bg) 100%);
}
.theme-ocean .word-art-frame {
  background:
    radial-gradient(ellipse at 49% 46%, #f8feff 0%, #e9faffc9 28%, #ddf7ff53 54%, transparent 75%),
    linear-gradient(180deg, #d8f5ff 0%, #bae5f6 54%, #93cce6 100%);
}
.theme-forest .word-art-frame {
  background:
    radial-gradient(ellipse at 49% 48%, #fffff8 0%, #f6fff0c9 29%, #eaf8de66 55%, transparent 75%),
    linear-gradient(151deg, #eff9e8 0%, #ddf0d8 51%, #cce5c7 100%);
}
.card-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}
.card-scene::before,
.card-scene > span { position: absolute; }
.card-scene::before {
  content: "";
  inset: -8% -6%;
  opacity: .10;
  translate: var(--scene-light-x, 0) var(--scene-light-y, 0);
  transition: translate .68s var(--motion-ease);
}
.scene-details {
  translate: var(--scene-detail-x, 0) var(--scene-detail-y, 0);
  transition: translate .58s var(--motion-ease);
}
.scene-edge {
  translate: var(--scene-edge-x, 0) var(--scene-edge-y, 0);
  transition: translate .76s var(--motion-ease);
}

/* Ocean light rays, bubble rings and the curves near the waterline. */
.theme-ocean .card-scene::before {
  background: conic-gradient(from 114deg at 18% 0%,
    transparent 0deg 4deg, #fff 9deg 13deg, transparent 19deg 24deg,
    #fff 29deg 32deg, transparent 38deg 45deg, #fff 48deg 51deg, transparent 57deg);
  mask-image: linear-gradient(#000 12%, transparent 79%);
  opacity: .12;
}
.theme-ocean .scene-details {
  inset: 0;
  opacity: .12;
  background:
    radial-gradient(circle at 12% 54%, transparent 3px, #246487 3.6px 4.2px, transparent 4.8px),
    radial-gradient(circle at 20% 68%, transparent 1.7px, #246487 2.3px 2.9px, transparent 3.5px),
    radial-gradient(circle at 83% 42%, transparent 5.1px, #246487 5.7px 6.5px, transparent 7.2px),
    radial-gradient(circle at 90% 56%, transparent 2px, #246487 2.6px 3.1px, transparent 3.8px),
    radial-gradient(circle at 85% 66%, transparent 2.8px, #246487 3.4px 4px, transparent 4.7px),
    radial-gradient(circle at 7% 75%, transparent 4px, #246487 4.6px 5.2px, transparent 5.8px);
}
.theme-ocean .scene-edge {
  inset: auto -10% -29%;
  height: 46%;
  border-top: 1.5px solid currentColor;
  border-radius: 51% 48% 0 0;
  color: #175879;
  opacity: .11;
  rotate: -4deg;
}
.theme-ocean .scene-edge::before,
.theme-ocean .scene-edge::after {
  content: "";
  position: absolute;
  inset: 5px -4% auto;
  height: 86%;
  border-top: 1.5px solid currentColor;
  border-radius: 55% 42% 0 0;
  rotate: 6deg;
}
.theme-ocean .scene-edge::after { inset-block-start: 11px; rotate: 9deg; }

/* Forest bokeh and two small branches at the edges of the frame. */
.theme-forest .card-scene::before {
  background:
    radial-gradient(circle at 17% 32%, #fff 0 7px, transparent 14px),
    radial-gradient(circle at 84% 25%, #fffae5 0 11px, transparent 19px),
    radial-gradient(circle at 76% 36%, #6b9c59 0 3px, transparent 6px),
    radial-gradient(circle at 12% 49%, #6b9c59 0 3.5px, transparent 7px),
    radial-gradient(circle at 93% 46%, #6b9c59 0 5px, transparent 9px),
    radial-gradient(circle at 23% 17%, #6b9c59 0 2px, transparent 5px);
}
.theme-forest .scene-details,
.theme-forest .scene-edge {
  width: clamp(22px, 13%, 46px);
  height: 54%;
  border-left: 1.5px solid currentColor;
  border-radius: 63% 0 0;
  color: #2e6235;
  opacity: .10;
}
.theme-forest .scene-details { left: 10%; bottom: -11%; rotate: -23deg; }
.theme-forest .scene-edge { right: 8%; bottom: -14%; height: 63%; transform: rotate(25deg) scaleX(-1); }
.theme-forest :is(.scene-details, .scene-edge)::before,
.theme-forest :is(.scene-details, .scene-edge)::after {
  content: "";
  position: absolute;
  width: 64%;
  height: 21%;
  border: 1.25px solid currentColor;
  border-radius: 96% 8% 93% 10%;
}
.theme-forest :is(.scene-details, .scene-edge)::before { top: 17%; left: 14%; rotate: -14deg; }
.theme-forest :is(.scene-details, .scene-edge)::after { top: 43%; left: -49%; transform: rotate(10deg) scaleX(-1); }
.theme-forest .word-art-frame::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 2;
  border-radius: inherit;
  border: 1px solid #ffffff8c;
  box-shadow: inset 0 0 16px #f9fff466;
  pointer-events: none;
}
.word-visual {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 27px 13px 10px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  overflow: hidden;
}
.theme-ocean .word-visual::before {
  content: "";
  position: absolute;
  inset: auto 18% 6%;
  height: 14%;
  background: radial-gradient(ellipse, #123d6660, #123d661c 45%, transparent 72%);
  filter: blur(3px);
  opacity: .78;
  scale: var(--art-shadow-scale, 1) 1;
  transition: scale .5s var(--motion-ease);
}
.word-visual > .word-art {
  position: relative;
  translate: 0 var(--art-lift, 0);
  rotate: var(--art-tilt, 0deg);
  scale: var(--art-zoom, 1);
  transition: translate .5s var(--motion-ease), rotate .5s var(--motion-ease), scale .5s var(--motion-ease);
}
.word-art, .study-image, .book-animal, .quiz-animal {
  height: 100%;
  width: 100%;
  min-height: 0;
  min-width: 0;
  object-fit: contain;
  filter: drop-shadow(0 8px 8px #24426b29);
  transform: translate(var(--art-x, 0), var(--art-y, 0)) scale(var(--art-scale, 1));
  transition: scale .2s;
}
[data-animal="fish"] { --art-scale: 1.4; --art-y: -10%; }
[data-animal="dolphin"] { --art-scale: 1.19; --art-y: -5%; --art-x: 4%; }
[data-animal="monkey"] { --art-scale: 1.08; --art-x: 4%; --art-y: -3%; }
[data-animal="bear"] { --art-x: 4%; }
.emoji-art { display: grid; place-items: center; font-size: clamp(3rem, 6vw, 5rem); line-height: 1; }
.word-badge {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 9px;
  max-width: calc(100% - 56px);
  border-radius: 6px;
  background: var(--badge-bg);
  color: var(--badge-ink);
  font-size: .66rem;
  font-weight: 850;
  padding: 5px 7px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .055em;
  pointer-events: none;
}
.favorite-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #d7e5f6;
  background: #fff;
  color: #435d8a;
  font-size: 1.38rem;
  line-height: 1;
}
.word-art-frame .favorite-btn { position: absolute; z-index: 3; top: 7px; right: 7px; }
.favorite-btn:hover, .favorite-btn[aria-pressed="true"] { background: #fff2c7; border-color: #f6db87; color: #895b07; }
.word-card:is(.theme-ocean, .theme-forest) .word-art-frame :is(.word-badge, .favorite-btn) {
  -webkit-backdrop-filter: blur(7px) saturate(1.2);
  backdrop-filter: blur(7px) saturate(1.2);
  box-shadow: inset 0 1px 0 #fff9, 0 2px 6px #204b6d13;
}
.word-card:is(.theme-ocean, .theme-forest) .word-badge,
.word-card:is(.theme-ocean, .theme-forest) .word-art-frame .favorite-btn:not([aria-pressed="true"]):not(:hover) {
  border: 1px solid #ffffffd9;
  background: #ffffffb5;
}
.word-content { display: flex; flex-direction: column; flex: 1; min-width: 0; padding: 13px; }
.word-name { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.word-name h3 {
  margin: 0;
  color: #182a57;
  font: 850 clamp(1.15rem, 2.3vw, 1.58rem)/1.06 var(--title-font);
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .word-card.theme-ocean .word-name h3 {
    background-image:
      linear-gradient(112deg, transparent 44%, #86c9f4 50%, transparent 56%),
      linear-gradient(180deg, #325e8e 0%, #214573 33%, #112854 52%, #102449 62%, #254f7d 100%);
    background-size: 280% 100%, 100% 100%;
    background-position: 120% 0, 0 0;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}
@keyframes word-shimmer {
  from { background-position: 120% 0, 0 0; }
  to { background-position: -20% 0, 0 0; }
}
.word-phonetic { margin: 5px 0 0; font-size: .77rem; color: var(--muted); overflow-wrap: anywhere; }
.word-meaning { margin: 9px 0 5px; font-size: .9rem; font-weight: 800; overflow-wrap: anywhere; }
.word-example {
  margin: 0;
  color: #50627d;
  font-size: .76rem;
  line-height: 1.52;
  font-style: italic;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.word-sound {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  height: 38px;
  padding: 2px;
  border: 0;
  border-radius: 50%;
  background: #eaf4ff;
  transition: transform .28s var(--motion-ease), background .28s, box-shadow .28s;
}
.word-sound:hover { background: #d1e7ff; }
.word-card.theme-ocean .word-sound:focus-visible {
  background: #d7edff;
  box-shadow: 0 0 0 3px #a8d9ff75, 0 0 14px #389afb72;
}
.sound-icon, .result-icon {
  flex: 0 0 auto;
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-image: url("assets/control-icons.jpg");
  background-repeat: no-repeat;
  vertical-align: middle;
}
.sound-icon { background-size: 448.29721% 334.15385%; background-position: 64.88889% 27.33246%; }
.word-sound .sound-icon { width: 32px; height: 32px; }

@media (hover: hover) and (pointer: fine) {
  .hero h1:hover .hero-title-line {
    filter: drop-shadow(0 5px 8px #07133191) drop-shadow(0 0 16px var(--title-hover-glow));
    animation-duration: 1.85s;
  }
  .word-card.theme-ocean:hover .word-sound {
    background: #d7edff;
    box-shadow: 0 0 0 3px #a8d9ff75, 0 0 14px #389afb72;
  }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  :root:not(.motion-off) .hero h1:hover { transform: scale(1.018); }
  :root:not(.motion-off) .word-card:hover { transform: translateY(-2px); }
  :root:not(.motion-off) .word-card.theme-ocean:hover {
    --art-zoom: 1.058;
    --art-tilt: -2deg;
    --art-lift: -2px;
    --art-shadow-scale: .91;
    --scene-light-x: 5px;
    --scene-light-y: 2px;
    --scene-detail-x: -3px;
    --scene-detail-y: -6px;
    --scene-edge-x: 6px;
    --scene-edge-y: 2px;
  }
  :root:not(.motion-off) .word-card.theme-ocean:hover .word-name h3 {
    animation: word-shimmer .72s cubic-bezier(.33, .1, .37, 1) both;
  }
  :root:not(.motion-off) .word-card.theme-forest:hover {
    --art-zoom: 1.055;
    --art-lift: -2px;
    --scene-light-x: 4px;
    --scene-light-y: -4px;
    --scene-detail-x: -3px;
    --scene-detail-y: 2px;
    --scene-edge-x: 3px;
    --scene-edge-y: 2px;
  }
  :root:not(.motion-off) .word-card.theme-other .word-visual:hover { --art-zoom: 1.045; }
  :root:not(.motion-off) .word-sound:hover { transform: scale(1.08); }
}
@media (forced-colors: active) {
  .hero-title-line, .word-card.theme-ocean .word-name h3 {
    background: none;
    color: CanvasText;
    -webkit-text-fill-color: currentColor;
    filter: none;
    animation: none;
  }
}
.word-footer { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding-top: 11px; margin-top: auto; }
.learn-control {
  min-height: 34px;
  border: 1px solid #e1e7f3;
  border-radius: 8px;
  background: #f4f7fc;
  color: #4c5f80;
  padding: 5px 8px;
  font-size: .74rem;
  font-weight: 800;
}
.learn-control:hover { border-color: #9fc5af; }
.learn-control[aria-pressed="true"] { background: #e4f7eb; color: #166841; border-color: #c3e6cf; }
.text-button { border: 0; background: none; color: var(--blue-dark); padding: 7px 4px; border-radius: 5px; font-size: .8rem; font-weight: 800; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.word-edit { min-height: 34px; }
.empty-state { padding: 30px 20px; border: 1px dashed #c7d4ed; border-radius: 16px; background: #fff; text-align: center; }
.empty-epoik { width: 66px; margin: 0 auto 8px; }
.empty-state h3 { margin: 0; font-size: 1.1rem; }
.empty-state p { color: var(--muted); margin: 6px 0 13px; font-size: .89rem; }

.sidebar { display: grid; gap: 14px; min-width: 0; }
.side-card { border: 1px solid var(--line); border-radius: 18px; background: #fff; padding: 16px; box-shadow: var(--shadow); }
.side-card h2 { font: 850 1.17rem/1.22 var(--title-font); margin: 0; letter-spacing: -.015em; }
.side-card p { color: var(--muted); font-size: .81rem; line-height: 1.5; margin: 6px 0 0; }
.practice-card { border-color: #cdd9fc; background: linear-gradient(145deg, #eaf0ff, #f8faff 72%); }
.practice-head { position: relative; min-height: 81px; display: flex; justify-content: space-between; align-items: center; gap: 7px; }
.practice-head h2 { font-size: 1.37rem; line-height: 1.08; }
.practice-epoik { width: 65px; margin-right: 2px; filter: drop-shadow(0 3px 7px #163a7d31); }
.practice-links { display: grid; gap: 7px; margin-top: 10px; }
.practice-link {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 10px;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 55px;
  text-align: left;
  border: 1px solid #e0e8f8;
  border-radius: 10px;
  padding: 7px 8px;
  background: #fff;
  color: var(--ink);
  transition: background .18s, border-color .18s;
}
.practice-link:hover { background: #f4f7ff; border-color: #b4c8f5; }
.practice-link strong, .practice-link small { display: block; }
.practice-link strong { font-size: .83rem; line-height: 1.2; }
.practice-link small { color: var(--muted); font-size: .71rem; line-height: 1.3; margin-top: 3px; }
.practice-cover, .practice-icon { width: 42px; height: 38px; border-radius: 7px; }
.practice-cover { object-fit: cover; object-position: 18% center; }
.practice-icon { display: grid; place-items: center; font-size: 1.15rem; font-weight: 850; }
.practice-icon-flash { background: #eee5ff; color: #7042b0; }
.practice-icon-quiz { background: #fff0cb; color: #9c5f12; }
.practice-icon-speaking { background: #e5efff; color: #31549f; }
.practice-arrow { font-size: 1.35rem; color: #576da3; }

.awards-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; padding: 0; list-style: none; margin: 11px 0 0; }
.awards-list li { display: grid; justify-items: center; align-content: start; padding: 6px 2px; border-radius: 10px; background: #f7f9fe; text-align: center; }
.awards-list li img { height: 55px; width: 100%; object-fit: contain; filter: grayscale(.95) opacity(.52); transition: filter .26s; }
.awards-list li.unlocked img { filter: drop-shadow(0 2px 6px #0bb9fb51); }
.awards-list li.unlocked { background: #eefaff; }
.awards-list strong { margin-top: 4px; font-size: .71rem; }
.awards-list li span { color: var(--muted); font-size: .66rem; margin-top: 2px; }
.settings-card summary { cursor: pointer; font-size: .88rem; font-weight: 850; }
.settings-card[open] summary { margin-bottom: 8px; }
.backup-buttons { display: flex; flex-wrap: wrap; gap: 7px; margin: 11px 0 5px; }
.backup-buttons .button { flex: 1; font-size: .75rem; padding: 7px 9px; min-height: 36px; }
.settings-link { display: block; background: none; border: 0; border-radius: 6px; min-height: 35px; color: #365589; text-align: left; padding: 5px 2px; font-size: .76rem; font-weight: 750; }
.settings-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.site-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 9px; border-top: 1px solid #dbe5f4; color: var(--muted); padding: 20px 0 26px; font-size: .78rem; }
.site-footer a { color: #29457c; font-weight: 850; }
.site-footer a span { color: #674fbd; margin-right: 3px; }

.modal {
  position: fixed;
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  max-width: calc(100% - 28px);
  width: 620px;
  overflow: auto;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 21px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 23px 70px #040c38a8;
}
.modal::backdrop { background: #07122bbd; backdrop-filter: blur(6px); }
.modal-panel { padding: 22px; }
.modal[open] { animation: dialog-enter .19s ease-out; }
@keyframes dialog-enter { from { opacity: .7; scale: .985; } }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; }
.dialog-head h2 { margin: 0; font: 850 clamp(1.3rem, 3vw, 1.7rem)/1.17 var(--title-font); letter-spacing: -.025em; }
.close-btn { display: grid; place-items: center; flex: 0 0 39px; width: 39px; height: 39px; border: 1px solid #dfe8f7; border-radius: 10px; background: #f3f7ff; color: #34547f; font-size: 1.45rem; line-height: 1; }
.close-btn:hover { background: #e7efff; }
.dialog-tip { color: var(--muted); font-size: .75rem; line-height: 1.5; text-align: center; margin: 12px 0 0; }
.page-arrow { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border: 1px solid #dae5fd; border-radius: 11px; background: #edf3ff; color: #214ca9; font-size: 1.55rem; line-height: 1; font-weight: 850; }
.page-arrow:hover:not(:disabled) { background: #dce9ff; }

.form-modal { width: 670px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-field { display: grid; align-content: start; gap: 5px; min-width: 0; color: #30496e; font-size: .8rem; font-weight: 800; }
.form-field em { color: #ad244e; }
.form-field :is(input, select, textarea) { width: 100%; min-height: 42px; border: 1px solid #d6e1f4; border-radius: 9px; background: #f8faff; padding: 8px 10px; color: var(--ink); font-size: .9rem; font-weight: 550; }
.form-field textarea { resize: vertical; }
.full { grid-column: 1 / -1; }
.image-options { display: flex; align-items: end; gap: 10px; }
.upload-area { flex: 1; align-self: stretch; display: grid; align-content: center; gap: 4px; min-height: 61px; background: #f4f8ff; border: 1px dashed #8aa9e0; border-radius: 9px; color: #21478d; padding: 8px 10px; cursor: pointer; font-size: .81rem; }
.upload-area small { font-size: .68rem; color: var(--muted); }
.image-options:has(input[type="file"]:focus-visible) .upload-area { outline: 3px solid #2165dc; outline-offset: 3px; }
.emoji-field { width: 103px; }
.image-preview { display: grid; place-items: center; flex: 0 0 60px; width: 60px; height: 60px; overflow: hidden; background: #eaf3ff; border: 1px solid #d7e4f5; border-radius: 10px; font-size: 1.65rem; }
.image-preview img { max-height: 55px; width: 100%; object-fit: contain; }
.check-row { display: flex; align-items: center; gap: 8px; color: #345071; font-size: .84rem; font-weight: 750; }
.check-row input { width: 18px; height: 18px; accent-color: var(--blue); }
.form-error { min-height: 1em; font-size: .82rem; color: #a82743; font-weight: 750; margin: 8px 0; }
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; align-items: center; gap: 8px; border-top: 1px solid #e6eef8; padding-top: 12px; }
.delete-btn { margin-right: auto; padding: 8px 4px; background: none; border: 0; color: #a42546; border-radius: 6px; font-weight: 800; font-size: .82rem; }
.confirm-modal { width: 420px; }
.confirm-text { color: var(--muted); margin: 0 0 16px; line-height: 1.55; overflow-wrap: anywhere; }

.book-modal { width: 870px; }
.book-panel { background: #f5f8ff; }
.book-meta, .study-progress, .quiz-progress { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 0 9px; color: #455d87; font-size: .79rem; font-weight: 800; }
.book-spread {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: .94fr 1.06fr;
  min-height: 350px;
  background: #fffefa;
  border: 5px solid #fff;
  border-radius: 13px 17px 17px 13px;
  perspective: 1500px;
  box-shadow: 0 2px 0 #d7c9a8, 0 5px 0 #c6bda8, 0 12px 24px #192e682c;
}
.book-spread::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: calc(47% - 8px);
  width: 16px;
  background: linear-gradient(90deg, transparent, #1e2f5422 45%, #fff8 68%, transparent);
  pointer-events: none;
}
.book-page { position: relative; min-width: 0; }
.book-page-left { display: grid; place-items: center; border-radius: 9px 0 0 9px; overflow: hidden; background: radial-gradient(ellipse at 45% 45%, var(--animal-light), var(--animal-bg)); }
.book-image { width: 100%; height: 100%; min-height: 220px; display: grid; place-items: center; padding: 14px; }
.book-animal { height: clamp(160px, 36vw, 257px); }
.book-animal.emoji-art { font-size: clamp(4.3rem, 15vw, 8rem); }
.book-page-right {
  padding: 20px 23px;
  border-radius: 0 12px 12px 0;
  background: repeating-linear-gradient(180deg, #fffefa 0 28px, #edf0ed 29px, #fffefa 30px);
  overflow-wrap: anywhere;
}
.book-word-line { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.book-word-line h3 { margin: 0; font: 850 clamp(1.65rem, 5vw, 3.1rem)/1.03 var(--title-font); letter-spacing: -.035em; }
.book-favorite { flex: 0 0 38px; }
.book-phonetic { margin: 5px 0 0; font-size: .93rem; color: #4a6285; }
.book-meaning { margin: 8px 0 10px; font-size: 1.06rem; font-weight: 850; }
.book-listen { min-height: 38px; padding: 5px 9px; }
.book-listen .sound-icon { width: 25px; height: 25px; }
.book-example-block { border-top: 1px solid #dbdfdf; margin-top: 15px; padding-top: 11px; }
.book-ex-label { font-size: .75rem; color: #4a6586; font-weight: 850; margin: 0 0 5px; }
.book-example, .book-translation { line-height: 1.5; margin: 0; }
.book-example { font-weight: 750; font-size: .92rem; }
.book-translation { color: #536784; margin-top: 3px; font-size: .82rem; }
.book-example-block .text-button { margin-top: 2px; padding-left: 0; }
.book-bottom, .study-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 15px; }
.book-bottom .learn-control, .study-actions .learn-control { min-height: 42px; padding: 7px 12px; }
.book-flip-leaf { display: none; position: absolute; z-index: 3; inset: 0 0 0 47%; transform-style: preserve-3d; transform-origin: left center; pointer-events: none; }
.book-leaf-front, .book-leaf-back {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  backface-visibility: hidden;
  border-radius: 0 10px 10px 0;
  border: 1px solid #e6e7df;
  background: linear-gradient(90deg, #f5f2e4, #fffdf4 85%, #e9e2d0);
  box-shadow: 7px 8px 18px #041e453b;
}
.book-leaf-back { transform: rotateY(180deg); border-radius: 10px 0 0 10px; background: #fffcf1; }
.book-flip-leaf span { color: #98b0d1; font-size: 2.6rem; }
.book-flip-leaf i { display: block; width: min(160px, 25vw); height: 2px; border-radius: 3px; background: #e1e7ef; }
.turn-next .book-flip-leaf { display: block; animation: page-turn-forward .62s cubic-bezier(.35, .02, .35, 1) both; }
.turn-prev .book-flip-leaf { display: block; inset: 0 53% 0 0; transform-origin: right center; animation: page-turn-backward .62s cubic-bezier(.35, .02, .35, 1) both; }
@keyframes page-turn-forward { to { transform: rotateY(-180deg); } }
@keyframes page-turn-backward { to { transform: rotateY(180deg); } }

.study-modal { width: 560px; }
.flashcard {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  width: 100%;
  min-height: 275px;
  border: 1px solid #c4defa;
  border-radius: 16px;
  background: radial-gradient(ellipse at 50% 49%, #f8fdff, #dfedff);
  color: #203e73;
  padding: 12px;
  backface-visibility: hidden;
}
.flashcard.revealed { background: radial-gradient(ellipse at 50% 49%, #fffdf5, #fff0cc); border-color: #f0ddac; }
.flashcard-top, .flashcard-prompt { font-size: .83rem; font-weight: 800; }
.flashcard-prompt { color: #4c6188; font-size: .76rem; }
.flashcard-art { display: grid; place-items: center; width: 100%; min-height: 151px; overflow: hidden; }
.study-image { height: clamp(142px, 24vw, 200px); max-width: 92%; }
.study-image.emoji-art { font-size: 5rem; }
.flashcard-answer strong { display: block; font: 850 clamp(1.3rem, 5vw, 1.75rem)/1.05 var(--title-font); overflow-wrap: anywhere; }
.flashcard-answer span { display: block; margin-top: 5px; font-size: .84rem; overflow-wrap: anywhere; }
.flashcard.flipping { animation: flash-flip .44s ease-in-out; }
@keyframes flash-flip { 48%, 52% { transform: perspective(850px) rotateY(-90deg); } }
.flashcard.slide-next { animation: slide-card .31s ease-in-out; --slide-direction: 1; }
.flashcard.slide-prev { animation: slide-card .31s ease-in-out; --slide-direction: -1; }
@keyframes slide-card {
  48% { translate: calc(-11% * var(--slide-direction)) 0; opacity: 0; }
  52% { translate: calc(11% * var(--slide-direction)) 0; opacity: 0; }
}
.study-actions { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; }
.study-actions .button-blue { padding: 7px 9px; min-height: 42px; }
.study-actions .sound-icon { width: 25px; height: 25px; }
.meaning-clue { font: 850 clamp(1.15rem, 4vw, 1.7rem)/1.2 var(--title-font); overflow-wrap: anywhere; }

.quiz-modal { width: 580px; }
.quiz-guide { display: flex; justify-content: center; align-items: center; gap: 13px; min-height: 83px; margin-bottom: 12px; padding: 9px 13px; border-radius: 13px; background: #eff4ff; }
.quiz-guide .epoik { width: 62px; }
.quiz-guide p { font-size: .91rem; line-height: 1.5; font-weight: 750; }
.quiz-modes, .quiz-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.quiz-mode { flex-direction: column; align-items: start; border-color: #d9e4fc; background: #f6f9ff; color: #1e458d; padding: 13px; text-align: left; gap: 5px; }
.quiz-mode:hover { background: #e9f1ff; }
.quiz-mode strong { font-size: .95rem; }
.quiz-mode span { color: var(--muted); font-size: .78rem; font-weight: 650; }
.quiz-display { padding: 9px 10px 11px; border-radius: 14px; background: #eaf4ff; text-align: center; }
.quiz-display p { color: #234879; font-size: .88rem; font-weight: 850; margin: 5px 0 0; }
.quiz-image { position: relative; isolation: isolate; display: grid; place-items: center; height: clamp(108px, 25vh, 175px); overflow: hidden; }
.quiz-animal { height: clamp(105px, 24vh, 165px); max-width: 86%; }
.quiz-animal.emoji-art { font-size: 5rem; }
.quiz-image.listening { height: 78px; }
.quiz-image .epoik { width: 62px; }
#quiz-listen { min-height: 37px; padding: 5px 10px; margin-top: 8px; }
#quiz-listen .sound-icon { width: 24px; height: 24px; }
.quiz-options { margin-top: 11px; }
.quiz-choice {
  min-width: 0;
  min-height: 47px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  border: 1px solid #d8e4f8;
  border-radius: 10px;
  background: #f6f9ff;
  color: #203d70;
  padding: 7px;
  font-size: .86rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}
.quiz-choice:hover:not(:disabled) { background: #e8f1ff; border-color: #b8cdf6; }
.quiz-choice:disabled { opacity: .72; }
.quiz-letter { flex: 0 0 24px; display: grid; place-items: center; height: 24px; border-radius: 7px; background: #e6eeff; color: #355ba4; font-size: .73rem; font-weight: 850; }
.quiz-choice.correct { opacity: 1; background: #e6f8eb; color: #155d3a; border-color: #a8dabb; }
.quiz-choice.wrong { opacity: 1; background: #ffedf0; color: #9c2640; border-color: #ebbac7; }
.quiz-choice.correct .quiz-letter { background: #c9ecd5; color: #155d3a; }
.quiz-choice.wrong .quiz-letter { background: #f8d7df; color: #9c2640; }
.quiz-feedback {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 5px 9px;
  border-radius: 10px;
  font-size: .85rem;
  line-height: 1.4;
  font-weight: 800;
}
.quiz-feedback.correct { background: #e7f8ee; color: #1a5e42; }
.quiz-feedback.wrong { background: #fff2ee; color: #8c3441; }
.quiz-feedback .epoik { width: 45px; }
.quiz-feedback .result-icon { width: 21px; height: 21px; }
.quiz-feedback.correct .result-icon { background-size: 445.53846% 327.10843%; background-position: 3.82903% 74.40318%; }
.quiz-feedback.wrong .result-icon { background-size: 442.81346% 327.10843%; background-position: 34.34434% 74.40318%; }
.quiz-next { display: flex; margin: 10px 0 0 auto; }
.quiz-finish { text-align: center; }
.quiz-finish-art { display: flex; align-items: end; justify-content: center; gap: 9px; margin-bottom: 7px; }
.quiz-finish-art .epoik { width: 99px; }
.quiz-perfect-star { color: #f8bc42; font-size: 2.65rem; line-height: 1; text-shadow: 0 0 15px #ffce6a91; }
.quiz-finish h3 { margin: 0; font: 850 1.75rem var(--title-font); }
.quiz-finish p { margin: 6px 0 13px; color: var(--muted); font-size: .92rem; }
.quiz-review { max-width: 380px; margin: 0 auto 14px; text-align: left; padding: 10px 12px; background: #f3f7ff; border-radius: 10px; }
.quiz-review h4 { font-size: .86rem; margin: 0 0 5px; }
.quiz-review ul { margin: 0; padding-left: 19px; font-size: .84rem; line-height: 1.5; overflow-wrap: anywhere; }
.quiz-finish-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.speaking-display { padding: 10px 12px 13px; border-radius: 14px; background: #eef4ff; text-align: center; }
.speaking-display h3 { margin: 5px 0 0; font: 850 clamp(1.3rem, 5vw, 1.8rem)/1.13 var(--title-font); overflow-wrap: anywhere; }
.speaking-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.speaking-actions .sound-icon { width: 25px; height: 25px; }
.magic-spark { pointer-events: none; position: absolute; left: 50%; top: 50%; z-index: 2; font-size: 1.25rem; color: #e6a414; text-shadow: 0 0 9px #ffeeb1; animation: burst .7s ease-out both; }
@keyframes burst { to { translate: var(--dx) var(--dy); opacity: 0; scale: 1.2; } }

.toast {
  position: fixed;
  z-index: 3;
  right: 16px;
  bottom: 16px;
  max-width: min(390px, calc(100% - 32px));
  border: 1px solid #667bc1;
  border-radius: 12px;
  background: #1c3065;
  color: #fff;
  padding: 10px 13px;
  box-shadow: 0 8px 26px #0b19485d;
  font-size: .84rem;
  line-height: 1.5;
  font-weight: 700;
  opacity: 0;
  translate: 0 10px;
  pointer-events: none;
  transition: opacity .18s, translate .18s;
}
.toast.show { opacity: 1; translate: 0 0; }

@media (max-width: 1060px) {
  .wrap { width: min(1224px, calc(100% - 48px)); }
  .workspace { grid-template-columns: minmax(0, 1fr) 255px; gap: 16px; }
  .word-grid { gap: 11px; }
  .word-content { padding: 10px; }
  .side-card { padding: 13px; }
}

@media (max-width: 860px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 235px; }
  .word-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-bar { padding-inline: 16px; gap: 10px; }
  .summary-metric { padding-left: 10px; }
  .metric-symbol { flex-basis: 33px; height: 33px; font-size: 1.03rem; }
  .hero { min-height: 393px; }
  .hero-art { min-height: 265px; }
  .hero-epoik { width: min(58%, 231px); bottom: 1%; }
  .hero-greeting { right: 0; top: 17%; }
}

@media (max-width: 690px) {
  .wrap { width: calc(100% - 32px); }
  .nav-wrap { gap: 7px; min-height: 65px; }
  .brand { width: 112px; }
  .top-nav { gap: 2px; }
  .top-nav a { padding: 7px 5px; font-size: .73rem; }
  .button-add { min-height: 39px; padding-inline: 8px; white-space: nowrap; font-size: .74rem; }
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, .72fr);
    min-height: 340px;
    padding-block: 23px 65px;
  }
  .hero h1 { font-size: clamp(2.85rem, 9.4vw, 4.1rem); }
  .eyebrow { margin-bottom: 10px; font-size: .65rem; }
  .hero-description { font-size: .91rem; margin: 12px 0 15px; }
  .hero-actions { gap: 8px; }
  .hero-actions .button { min-height: 40px; padding: 7px 9px; font-size: .75rem; }
  .hero-art { min-height: 208px; }
  .hero-planet { width: 91%; }
  .hero-epoik { width: 77%; bottom: 10%; }
  .hero-orbit { width: 108%; }
  .hero-greeting { padding: 6px 8px; top: 14%; right: -3%; font-size: .68rem; }
  .hero-sparkle { font-size: 1.15rem; }
  .sparkle-two { right: 2%; }
  .summary-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 7px; padding: 12px; border-radius: 16px; }
  .progress-intro { grid-column: 1 / -1; }
  .progress-intro h2 { margin-bottom: 4px; }
  .summary-metric { padding-left: 0; border-left: 0; gap: 5px; }
  .summary-metric strong { font-size: 1.16rem; }
  .summary-metric div span { font-size: .65rem; }
  .workspace { grid-template-columns: 1fr; margin-top: 24px; }
  .sidebar { grid-template-columns: 1fr 1fr; align-items: start; }
  .settings-card { grid-column: 1 / -1; }
}

@media (max-width: 495px) {
  .nav-wrap { grid-template-columns: 1fr 1fr; padding-block: 3px 6px; }
  .top-nav { grid-column: 1 / -1; grid-row: 2; justify-content: center; flex-wrap: wrap; gap: 3px; }
  .top-nav a { font-size: .75rem; padding: 6px clamp(4px, 1.55vw, 8px); }
  .hero { grid-template-columns: 1fr; padding-top: 24px; padding-bottom: 57px; }
  .hero h1 { font-size: clamp(2.9rem, 14.4vw, 4.1rem); }
  .hero-description { max-width: 305px; }
  .hero-art { min-height: 214px; margin-top: 2px; }
  .hero-planet { width: 198px; top: 54%; }
  .hero-epoik { width: 147px; bottom: 1%; }
  .hero-orbit { width: min(88%, 295px); }
  .hero-greeting { top: 20%; right: 5%; }
  .sparkle-one { left: 18%; }
  .sparkle-two { right: 9%; }
  .sidebar { grid-template-columns: 1fr; }
  .modal { max-width: calc(100% - 16px); max-height: calc(100dvh - 16px); border-radius: 16px; }
  .modal-panel { padding: 12px; }
  .book-spread { grid-template-columns: 1fr; min-height: 0; }
  .book-spread::after { display: none; }
  .book-page-left { border-radius: 8px 8px 0 0; }
  .book-page-right { padding: 12px; }
  .book-image { min-height: 132px; padding: 7px; }
  .book-animal { height: 125px; }
  .book-flip-leaf { inset: 0 0 0 50%; }
  .turn-prev .book-flip-leaf { inset: 0 50% 0 0; }
  .form-grid { gap: 8px; }
}

@media (max-width: 370px) {
  .wrap { width: calc(100% - 22px); }
  .hero-greeting { right: 1%; }
  .tab { padding-inline: 6px; }
  .word-grid { gap: 7px; }
  .word-art-frame { min-height: 114px; }
  .word-content { padding: 8px; }
  .word-sound { flex-basis: 32px; height: 32px; }
  .word-sound .sound-icon { width: 27px; height: 27px; }
  .metric-symbol { flex-basis: 27px; height: 27px; }
}

.motion-off, .motion-off *, .motion-off *::before, .motion-off *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
