:root {
  --ink: #332b49;
  --muted: #867d99;
  --paper: #f9f6ff;
  --lilac: #dcd2ff;
  --sky: #ccecff;
  --pink: #f6c4d7;
  --gold: #eacb7d;
  --green: #bfe8d2;
  --line: rgba(88, 72, 127, .12);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "Avenir Next", "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --shadow-card: 0 12px 28px rgba(76, 57, 120, .16), 0 3px 8px rgba(76, 57, 120, .08);
}
* { box-sizing: border-box; }
html, body { width: 100%; min-width: 320px; min-height: 100%; margin: 0; color: var(--ink); background: #e8e3f5; }
body { overscroll-behavior: none; }
button, input, a { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #8b72d0; outline-offset: 3px; }
.icon-button svg, .goal-icon svg, .mic-orb svg, .practice-link svg, .list-state svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-shell { position: relative; width: min(100%, 500px); height: 100dvh; min-height: 570px; margin: 0 auto; display: flex; flex-direction: column; overflow: hidden; isolation: isolate; background: radial-gradient(ellipse at 82% -8%, rgba(255,255,255,.92), transparent 42%), linear-gradient(160deg, #f0eaff 0%, #e7eafb 52%, #f8e7f0 100%); }
.app-shell::before, .app-shell::after { position: absolute; z-index: -1; border: 1px solid rgba(255,255,255,.52); border-radius: 50%; content: ""; pointer-events: none; }
.app-shell::before { width: 310px; height: 310px; top: -212px; right: -168px; }
.app-shell::after { width: 280px; height: 280px; bottom: -214px; left: -186px; }
.page-header { position: relative; z-index: 3; flex: 0 0 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 850; letter-spacing: -.055em; text-decoration: none; font-size: 17px; }
.brand-mark { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 10px 10px 10px 4px; color: #fff; background: linear-gradient(145deg, #4d4168, #2d2642); box-shadow: 0 4px 10px rgba(47,39,70,.2); font: italic 800 18px Georgia, serif; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-button { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.82); border-radius: 14px; color: #675a85; background: rgba(255,255,255,.62); box-shadow: 0 4px 12px rgba(82,65,125,.07); text-decoration: none; cursor: pointer; }
.icon-button svg { width: 18px; height: 18px; }
.home-content { min-height: 0; flex: 1; display: flex; flex-direction: column; padding: 2px 15px 9px; overflow: hidden; }
.welcome { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.welcome-text { min-width: 0; }
.eyebrow { margin: 0 0 4px; color: #9185aa; font-size: 9px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.welcome h1 { margin: 0; font-size: 20px; line-height: 1.1; letter-spacing: -.04em; font-weight: 800; }
.streak { display: flex; align-items: center; gap: 6px; padding: 8px 11px; border: 1px solid rgba(255,255,255,.8); border-radius: 14px; color: #8d6d44; background: rgba(255,255,255,.52); font-size: 11px; font-weight: 800; white-space: nowrap; }
.streak b { color: #e49e69; font-size: 15px; }
.goal-strip { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; min-height: 43px; margin: 7px 0 9px; padding: 7px 11px; border: 1px solid rgba(255,255,255,.75); border-radius: 16px; background: linear-gradient(110deg, rgba(255,255,255,.7), rgba(250,245,255,.48)); box-shadow: 0 5px 15px rgba(87,67,131,.05); }
.goal-icon { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 10px; color: #8770b3; background: #eee8ff; font-size: 15px; }
.goal-copy { min-width: 0; flex: 1; font-size: 10px; font-weight: 750; }
.goal-copy small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 550; }
.goal-meter { flex: 0 0 52px; height: 5px; border-radius: 8px; background: rgba(129,110,172,.15); overflow: hidden; }
.goal-meter i { display: block; width: 38%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #dca7cb, #8c79ce); }
.section-heading { flex: 0 0 35px; display: flex; align-items: center; justify-content: space-between; }
.section-heading strong { font-size: 12px; font-weight: 850; }
.section-heading span { color: #968ca8; font-size: 9px; font-weight: 700; letter-spacing: .05em; }
.category-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); grid-template-rows: repeat(3, minmax(0,1fr)); gap: 10px; }
.category-tile { position: relative; min-width: 0; min-height: 0; display: block; overflow: hidden; border: 1px solid rgba(255,255,255,.98); border-radius: 21px; color: var(--ink); text-decoration: none; background: linear-gradient(145deg, #e5ddff, #cfe9f8 68%, #f6e2eb); box-shadow: var(--shadow-card), inset 0 0 0 1px rgba(255,255,255,.48); isolation: isolate; transition: transform .22s ease, box-shadow .22s ease; }
.category-tile::before { position: absolute; z-index: 2; inset: 5px; border: 1px solid rgba(255,255,255,.72); border-radius: 16px; content: ""; pointer-events: none; }
.category-tile::after { position: absolute; z-index: -1; width: 180px; height: 180px; top: -103px; right: -77px; border-radius: 50%; background: rgba(255,255,255,.34); filter: blur(1px); content: ""; }
.category-tile:active { transform: scale(.975); }
.category-tile.colors { background: linear-gradient(145deg, #f5d9e7, #e5dcff 60%, #cfeafb); }
.category-tile.food { background: linear-gradient(145deg, #ffebdb, #f8d7e7 58%, #eadfff); }
.category-tile.animals { background: linear-gradient(145deg, #d8f2e8, #d3eafe 58%, #e4dcff); }
.category-tile.numbers { background: linear-gradient(145deg, #e7dcff, #d5eaff 62%, #f7e2f1); }
.category-tile.transport { background: linear-gradient(145deg, #d5edff, #d7e2ff 56%, #f2d9eb); }
.category-tile.daily { background: linear-gradient(145deg, #fff0cc, #f7dfeb 56%, #ded7ff); }
.tile-top { position: absolute; z-index: 1; top: 10px; left: 12px; right: 11px; display: flex; align-items: center; justify-content: space-between; }
.tile-count { padding: 5px 7px; border: 1px solid rgba(255,255,255,.66); border-radius: 999px; color: #766c8c; background: rgba(255,255,255,.46); font-size: 8px; font-weight: 800; }
.tile-arrow { color: rgba(88,74,117,.58); font-size: 14px; font-weight: 800; }
.tile-art { position: absolute; inset: 7px 5px 36px; display: grid; place-items: center; filter: drop-shadow(0 8px 8px rgba(75,57,112,.13)); transform-origin: center; animation: float-card-art 4.5s ease-in-out infinite; }
.category-tile:nth-child(2) .tile-art { animation-delay: -.7s; }
.category-tile:nth-child(3) .tile-art { animation-delay: -1.4s; }
.category-tile:nth-child(4) .tile-art { animation-delay: -2.1s; }
.category-tile:nth-child(5) .tile-art { animation-delay: -.4s; }
.category-tile:nth-child(6) .tile-art { animation-delay: -1.8s; }
.tile-art svg { width: 100%; height: 100%; overflow: visible; }
.tile-art .category-art-asset { position: relative; display: grid; place-items: center; width: 100%; height: 100%; }
.tile-art .category-art-asset img { display: block; width: 86%; height: 86%; object-fit: contain; transform: translateY(-6%); filter: drop-shadow(0 8px 10px rgba(58,43,86,.16)); }
.tile-art .food-category-art img { width: 95%; height: 82%; transform: translateY(-5%); }
.tile-art .animals-category-art img { width: 82%; height: 82%; transform: translateY(-6%); }
.tile-art .colors-category-art img { width: 89%; height: 89%; transform: translateY(-4%); }
.food-showcase { position: relative; display: grid; place-items: center; width: 100%; height: 100%; }
.food-showcase img { position: relative; z-index: 1; width: 88%; height: 96%; object-fit: contain; filter: drop-shadow(0 9px 9px rgba(103,48,62,.2)); }
.food-halo { position: absolute; width: 78%; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.62); border-radius: 50%; box-shadow: 0 0 0 9px rgba(255,255,255,.13), inset 0 0 25px rgba(255,255,255,.32); }
.single-gem { position: relative; display: block; width: 47%; aspect-ratio: 1; border-radius: 48% 52% 48% 52%; background: radial-gradient(circle at 30% 22%, #fff 0 3%, color-mix(in srgb, var(--gem) 38%, white) 17%, var(--gem) 57%, color-mix(in srgb, var(--gem) 62%, #55405f) 100%); box-shadow: inset -12px -15px 20px rgba(60,43,78,.22), inset 5px 6px 12px rgba(255,255,255,.6), 0 18px 20px rgba(78,59,120,.2); transform: rotate(-9deg); }
.single-gem::before { position: absolute; inset: -15% -4%; border: 1px solid rgba(255,255,255,.72); border-radius: 50%; content: ""; transform: rotate(35deg); }
.single-gem i { position: absolute; top: 17%; left: 21%; width: 22%; height: 9%; border-radius: 50%; background: rgba(255,255,255,.84); filter: blur(4px); transform: rotate(-36deg); }
.single-gem b { position: absolute; right: -5%; bottom: 15%; width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px 4px rgba(255,255,255,.55); }
.tile-label { position: absolute; z-index: 2; right: 10px; bottom: 8px; left: 10px; display: flex; align-items: end; justify-content: space-between; gap: 4px; }
.tile-label strong { font: 850 14px/1.05 -apple-system, sans-serif; letter-spacing: -.035em; }
.tile-label small { display: block; margin-top: 3px; color: #756b87; font-size: 8px; font-weight: 650; }
.tile-progress { display: flex; align-items: center; gap: 4px; padding-bottom: 2px; color: #756b87; font-size: 8px; font-weight: 800; white-space: nowrap; }
.tile-progress i { display: block; width: 31px; height: 4px; border-radius: 9px; background: rgba(90,74,125,.14); overflow: hidden; }
.tile-progress i::before { display: block; width: var(--progress, 0%); height: 100%; border-radius: inherit; background: #9b80ce; content: ""; transition: width .32s; }
.bottom-nav { position: relative; z-index: 5; flex: 0 0 calc(63px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4,1fr); align-items: center; padding: 6px 7px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255,255,255,.78); background: rgba(255,255,255,.84); box-shadow: 0 -7px 25px rgba(80,62,124,.07); backdrop-filter: blur(18px); }
.nav-item { display: grid; justify-items: center; align-content: center; gap: 4px; min-width: 0; min-height: 48px; color: #938aa2; text-decoration: none; font-size: 9px; font-weight: 650; }
.nav-item svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-item.active { color: #8469bc; font-weight: 850; }
.nav-item.active svg { filter: drop-shadow(0 2px 4px rgba(133,103,191,.2)); stroke-width: 2.2; }

.subheader { flex: 0 0 52px; display: flex; align-items: center; gap: 9px; padding: 0 14px; }
.back-button { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.77); border-radius: 14px; color: #695e83; background: rgba(255,255,255,.55); text-decoration: none; font-size: 21px; }
.subheader-title { flex: 1; text-align: center; font-size: 14px; font-weight: 850; }
.subheader-end { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.77); border-radius: 14px; color: #806bb4; background: rgba(255,255,255,.55); }
.collection-content { min-height: 0; flex: 1; display: flex; flex-direction: column; padding: 0 14px 12px; overflow: hidden; }
.collection-title-row { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 2px 9px; }
.collection-title-row h1 { margin: 0; font-size: 24px; font-weight: 900; letter-spacing: -.055em; }
.collection-title-row p { margin: 3px 0 0; color: #817891; font-size: 10px; }
.collection-total { flex: 0 0 auto; padding: 8px 9px; border: 1px solid rgba(255,255,255,.75); border-radius: 13px; color: #756a89; background: rgba(255,255,255,.48); text-align: center; font-size: 9px; font-weight: 800; }
.collection-total strong { display: block; color: #604d86; font-size: 14px; }
.collection-progress { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.75); border-radius: 14px; background: rgba(255,255,255,.44); }
.collection-progress span { color: #766d86; font-size: 9px; font-weight: 750; white-space: nowrap; }
.collection-progress b { color: #856eb7; font-size: 9px; white-space: nowrap; }
.progress-line { height: 5px; flex: 1; overflow: hidden; border-radius: 8px; background: rgba(94,76,132,.12); }
.progress-line i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #d69ebe, #8d79ce); transition: width .3s; }
.word-grid-scroll { flex: 1; min-height: 0; overflow: auto; padding: 2px 1px 10px; scrollbar-width: thin; scrollbar-color: rgba(111,96,151,.26) transparent; }
.word-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.word-card { position: relative; display: flex; min-width: 0; min-height: 136px; flex-direction: column; align-items: center; justify-content: space-between; padding: 7px 5px 9px; overflow: hidden; border: 1px solid rgba(255,255,255,.91); border-radius: 18px; color: var(--ink); text-decoration: none; background: linear-gradient(150deg, rgba(255,255,255,.82), rgba(236,228,255,.72)); box-shadow: 0 5px 13px rgba(75,58,115,.11), inset 0 0 0 1px rgba(255,255,255,.42); transition: transform .2s; }
.word-card:active { transform: scale(.96); }
.word-card::before { position: absolute; inset: 4px; border: 1px solid rgba(211,194,150,.57); border-radius: 13px; content: ""; pointer-events: none; }
.word-card.learned { background: linear-gradient(150deg, #fff, #e2f5ed); }
.word-card.locked { border-color: rgba(255,255,255,.67); color: #928ba1; background: linear-gradient(150deg, #eeeaf4, #dfdeeb); }
.word-illustration { position: relative; z-index: 1; display: grid; place-items: center; width: 72px; height: 66px; }
.word-illustration svg { width: 100%; height: 100%; }
.mini-illustration { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid rgba(255,255,255,.85); border-radius: 17px; background: radial-gradient(circle at 28% 20%, #fff, color-mix(in srgb, var(--gem) 57%, white) 30%, color-mix(in srgb, var(--gem) 62%, #7f6a9b)); box-shadow: inset -7px -8px 12px rgba(60,45,80,.19), inset 4px 4px 9px rgba(255,255,255,.7), 0 6px 8px rgba(71,53,106,.14); transform: rotate(var(--turn)); }
.mini-illustration strong { color: rgba(255,255,255,.88); text-shadow: 0 2px 3px rgba(73,58,105,.25); font: 850 22px Georgia,serif; }
.word-symbol { position: relative; z-index: 1; font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif; font-size: 29px; line-height: 1; filter: drop-shadow(0 4px 3px rgba(71,53,106,.18)); }
.mini-illustration i { position: absolute; top: 8px; left: 10px; width: 10px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.95); filter: blur(2px); }
.mini-spark { position: absolute; top: -7px; right: -6px; color: #fff; font-size: 12px; text-shadow: 0 1px 4px #a492cf; }
.word-card-name { position: relative; z-index: 1; width: 100%; overflow: hidden; text-overflow: ellipsis; text-align: center; white-space: nowrap; font: 850 13px/1.1 Georgia,serif; }
.word-card-meta { position: relative; z-index: 1; display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 3px; color: #8e849d; font-size: 8px; }
.word-state { position: absolute; z-index: 1; top: 6px; right: 7px; color: #629d84; font-size: 9px; }
.locked-art { display: grid; place-items: center; width: 47px; height: 47px; margin: 7px 0 10px; border: 1px solid rgba(255,255,255,.85); border-radius: 16px; color: #a197af; background: rgba(255,255,255,.46); font-size: 21px; }
.locked-copy { text-align: center; font-size: 9px; font-weight: 800; }
.locked-copy small { display: block; margin-top: 3px; color: #aaa2b5; font-size: 8px; font-weight: 600; }
.free-note { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; padding: 8px 3px 0; color: #807590; font-size: 9px; line-height: 1.3; }
.free-note i { display: grid; flex: 0 0 17px; place-items: center; width: 17px; height: 17px; border-radius: 50%; color: #826bb3; background: rgba(255,255,255,.65); font-style: normal; }
.gate-note { min-height: 40px; margin-top: 2px; padding: 5px 10px; border: 1px solid rgba(255,255,255,.86); border-radius: 13px; color: #807590; background: rgba(255,255,255,.52); text-decoration: none; }
.gate-note i { width: 24px; height: 24px; flex-basis: 24px; font-size: 13px; }
.gate-copy { min-width: 0; flex: 1; }
.gate-copy strong { display: block; color: #71618e; font-size: 9px; }
.gate-copy small { display: block; margin-top: 2px; color: #958a9e; font-size: 8px; }
.gate-arrow { color: #9078b9; font-size: 20px; line-height: 1; }

.learn-shell { width: min(100%, 520px); }
.learn-header { flex: 0 0 54px; display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; gap: 6px; padding: 0 12px; }
.learn-header .icon-button { width: 38px; height: 38px; }
.learn-progress-label { display: grid; justify-items: center; gap: 3px; color: #827995; font-size: 9px; font-weight: 700; }
.learn-progress-label strong { color: var(--ink); font-size: 11px; letter-spacing: .05em; }
.learn-heart.is-saved { color: #d16f99; background: rgba(255,255,255,.9); }
.learn-content { min-height: 0; flex: 1; display: flex; flex-direction: column; padding: 0 10px 0; }
.learn-layout { min-height: 0; flex: 1; display: flex; }
.study-card { position: relative; min-height: 0; flex: 1; display: grid; grid-template-rows: 27px minmax(0, 1fr) auto; gap: 6px; padding: 12px 14px 13px; overflow: hidden; border: 2px solid rgba(255,255,255,.97); border-radius: 27px; background: linear-gradient(155deg, #fffdf9, #f7f2ff 56%, #fbeef4); box-shadow: 0 13px 32px rgba(76,57,120,.2), inset 0 0 0 1px rgba(231,205,148,.65), inset 0 0 0 5px rgba(255,255,255,.3); touch-action: pan-y; }
.study-card::before { position: absolute; inset: 6px; border: 1px solid rgba(219,193,133,.64); border-radius: 20px; content: ""; pointer-events: none; }
.study-kicker { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; color: #93869d; font-size: 8px; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.foil-pill { display: flex; align-items: center; gap: 4px; padding: 5px 8px; border: 1px solid rgba(228,201,135,.6); border-radius: 999px; color: #a48342; background: linear-gradient(100deg,#fff6d6,#f5e3af); font-size: 8px; letter-spacing: .04em; }
.word-art-stage { position: relative; min-height: 0; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(255,255,255,.87); border-radius: 21px; background: radial-gradient(circle at 50% 45%, #fff 0%, #f7f2ff 39%, #ebe6f6 100%); box-shadow: inset 0 0 26px rgba(141,119,194,.08); }
.word-art-stage::before, .word-art-stage::after { position: absolute; width: 72%; aspect-ratio: 1; border: 1px solid rgba(170,149,204,.14); border-radius: 50%; content: ""; }
.word-art-stage::after { width: 91%; border-color: rgba(226,208,161,.25); }
.word-art-stage .art-content { position: relative; z-index: 1; width: 74%; height: 95%; display: grid; place-items: center; animation: float-card-art 4s ease-in-out infinite; }
.word-art-stage .art-content img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 13px 12px rgba(86,49,61,.18)); }
.word-art-stage .art-content svg { width: 100%; height: 100%; overflow: visible; }
.word-art-stage .single-gem { width: 60%; }
.word-art-stage .mini-illustration { width: 145px; height: 145px; border-radius: 46px; }
.word-art-stage .mini-illustration strong { font-size: 66px; }
.word-art-stage .mini-illustration .word-symbol { font-size: 88px; }
.word-art-stage .mini-illustration i { top: 20px; left: 25px; width: 25px; height: 11px; }
.learn-main-stack { min-height: 0; display: grid; grid-template-rows: minmax(115px,1fr) auto auto auto; gap: 5px; }
.learn-info-side { min-height: 0; display: grid; grid-template-rows: auto minmax(54px,auto) auto auto; align-content: end; gap: 5px; }
.word-title-row { position: relative; z-index: 1; display: grid; justify-items: center; text-align: center; }
.word-part { color: #9a8ea5; font-size: 8px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.word-title { margin: 1px 0 3px; font: 900 clamp(35px, 10vw, 48px)/.95 Georgia,serif; letter-spacing: -.065em; }
.word-sound-row { display: flex; align-items: center; justify-content: center; gap: 8px; color: #81778f; font: 13px Georgia,serif; }
.sound-small { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid rgba(216,204,235,.8); border-radius: 50%; color: #9178c5; background: #f6f1ff; cursor: pointer; }
.meaning-line { position: relative; z-index: 1; text-align: center; color: #5f536f; font-size: 13px; font-weight: 800; }
.study-tools { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 7px; }
.tool-button { min-height: 32px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 10px; border: 1px solid rgba(215,204,231,.86); border-radius: 11px; color: #786b8e; background: rgba(255,255,255,.7); font-size: 9px; font-weight: 800; cursor: pointer; }
.tool-button.selected { color: #7460a2; border-color: #c9bae8; background: #f2edff; }
.rate-menu { position: relative; }
.rate-menu select { max-width: 70px; min-height: 32px; padding: 0 7px; border: 1px solid rgba(215,204,231,.86); border-radius: 11px; color: #786b8e; background: rgba(255,255,255,.75); font-size: 9px; }
.content-switcher { position: relative; z-index: 1; display: flex; gap: 4px; overflow-x: auto; padding: 2px 0; scrollbar-width: none; }
.content-switcher::-webkit-scrollbar { display: none; }
.content-tab { flex: 1 0 auto; min-height: 30px; padding: 0 7px; border: 1px solid transparent; border-radius: 10px; color: #92889e; background: rgba(235,230,245,.64); font-size: 8px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.content-tab[aria-selected="true"] { color: #6e5b98; border-color: rgba(200,181,230,.65); background: #fff; box-shadow: 0 2px 6px rgba(90,71,135,.08); }
.example-panel { position: relative; z-index: 1; min-height: 57px; display: grid; align-content: center; gap: 3px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.92); border-radius: 14px; background: rgba(255,255,255,.7); }
.example-panel small { color: #aa91ad; font-size: 7px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.example-panel p { margin: 0; color: #4b415d; font: 12px/1.25 Georgia,serif; }
.example-panel .example-translation { color: #827790; font: 10px/1.2 -apple-system,sans-serif; }
.practice-link { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 41px; border: 0; border-radius: 14px; color: #fff; background: linear-gradient(105deg,#7967b8,#a982ca 54%,#d394b4); box-shadow: 0 6px 14px rgba(120,91,168,.22); text-decoration: none; font-size: 11px; font-weight: 850; letter-spacing: .02em; cursor: pointer; }
.practice-link span:first-child { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 8px; color: #7964ad; background: rgba(255,255,255,.9); font-size: 12px; }
.learn-controls { flex: 0 0 67px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 9px; padding: 5px 16px calc(6px + env(safe-area-inset-bottom)); }
.learn-control { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 13px; border: 1px solid rgba(255,255,255,.86); border-radius: 15px; color: #786e8c; background: rgba(255,255,255,.58); text-decoration: none; font-size: 10px; font-weight: 800; cursor: pointer; }
.learn-control.next { justify-self: end; color: white; border-color: transparent; background: linear-gradient(110deg,#8270bd,#a88acb); box-shadow: 0 6px 14px rgba(105,80,156,.22); }
.learn-position { color: #8f849d; font-size: 8px; font-weight: 800; letter-spacing: .08em; white-space: nowrap; }

.practice-content { min-height: 0; flex: 1; display: flex; flex-direction: column; gap: 11px; overflow: auto; padding: 3px 17px 17px; }
.practice-word-card { position: relative; flex: 0 0 auto; display: grid; grid-template-columns: 77px 1fr auto; align-items: center; gap: 10px; min-height: 94px; padding: 11px; border: 1px solid rgba(255,255,255,.9); border-radius: 20px; background: linear-gradient(130deg,#fffdf8,#f2edff); box-shadow: 0 7px 18px rgba(75,58,115,.11); }
.practice-word-art { display: grid; place-items: center; width: 70px; height: 70px; overflow: hidden; border-radius: 16px; background: radial-gradient(circle,#fff,#ebe4fa); }
.practice-word-art img { width: 100%; height: 100%; object-fit: contain; }
.practice-word-art svg { width: 100%; height: 100%; }
.practice-word-info strong { display: block; font: 850 22px Georgia,serif; }
.practice-word-info span { display: block; margin-top: 5px; color: #82778f; font-size: 10px; }
.practice-play { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; color: white; background: #9279c4; cursor: pointer; }
.privacy-note { flex: 0 0 auto; padding: 11px 13px; border: 1px solid rgba(233,220,169,.7); border-radius: 15px; color: #756a7e; background: rgba(255,249,223,.72); font-size: 9px; line-height: 1.5; }
.privacy-note strong { color: #8c6d3c; }
.practice-sentence { padding: 11px 13px; border: 1px solid rgba(255,255,255,.84); border-radius: 15px; background: rgba(255,255,255,.58); }
.practice-sentence small { color: #9d8ba7; font-size: 8px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.practice-sentence p { margin: 5px 0 0; color: #4b415d; font: 14px/1.35 Georgia,serif; }
.practice-sentence .translation { color: #82778f; font: 10px/1.35 -apple-system,sans-serif; }
.practice-panel { flex: 1 0 196px; display: grid; justify-items: center; align-content: center; gap: 10px; min-height: 196px; padding: 14px; border: 1px solid rgba(255,255,255,.84); border-radius: 22px; background: rgba(255,255,255,.53); text-align: center; }
.practice-panel.completed { display: none; }
.mic-orb { position: relative; display: grid; place-items: center; width: 72px; height: 72px; border: 1px solid rgba(255,255,255,.9); border-radius: 50%; color: #866eb7; background: radial-gradient(circle at 30% 25%,#fff,#e6dcff 70%); box-shadow: 0 7px 20px rgba(99,77,149,.15); font-size: 25px; }
.practice-panel.recording .mic-orb { color: #fff; background: radial-gradient(circle at 35% 25%,#f7c6dd,#dc85b4); animation: mic-pulse 1s ease-in-out infinite alternate; }
.practice-panel h1 { margin: 0; font-size: 16px; font-weight: 850; }
.practice-panel p { max-width: 290px; margin: 0; color: #81778e; font-size: 10px; line-height: 1.45; }
.recording-stats { display: none; align-items: center; gap: 8px; color: #9a527d; font-size: 10px; font-weight: 850; }
.practice-panel.recording .recording-stats { display: flex; }
.recording-dot { width: 8px; height: 8px; border-radius: 50%; background: #dc658c; box-shadow: 0 0 0 5px rgba(220,101,140,.12); animation: dot-pulse .8s infinite alternate; }
.volume-bars { display: flex; align-items: center; gap: 3px; height: 24px; }
.volume-bars i { width: 3px; height: 8px; border-radius: 9px; background: #bf86b2; transition: height .06s linear, opacity .06s linear; }
.start-recording, .stop-recording, .retry-recording { min-height: 44px; width: min(100%, 285px); border: 0; border-radius: 14px; color: #fff; background: linear-gradient(110deg,#806ab8,#bd82ba); box-shadow: 0 6px 14px rgba(110,81,153,.2); font-size: 11px; font-weight: 850; cursor: pointer; }
.stop-recording { display: none; background: linear-gradient(110deg,#d37aa4,#bd668d); }
.practice-panel.recording .start-recording { display: none; }
.practice-panel.recording .stop-recording { display: block; }
.speech-result { display: none; flex: 1 0 auto; min-height: 170px; padding: 15px; border: 1px solid rgba(255,255,255,.86); border-radius: 22px; background: rgba(255,255,255,.69); }
.speech-result.visible { display: block; }
.score-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.score-title { font-size: 11px; font-weight: 850; }
.score-badge { padding: 5px 8px; border-radius: 999px; color: #75609c; background: #eee8fc; font-size: 8px; font-weight: 850; }
.score-layout { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 13px; margin: 14px 0; }
.score-ring { --score: 0; display: grid; place-items: center; width: 88px; height: 88px; border-radius: 50%; background: conic-gradient(#b28ac7 calc(var(--score) * 1%), #ece6f2 0); transition: background 900ms cubic-bezier(.2,.7,.2,1); }
.score-ring::before { grid-area: 1/1; width: 70px; height: 70px; border-radius: 50%; background: #fff; content: ""; }
.score-value { z-index: 1; grid-area: 1/1; text-align: center; font: 850 22px Georgia,serif; }
.score-value small { display: block; margin-top: 1px; color: #91869c; font: 750 7px sans-serif; }
.score-copy strong { display: block; font-size: 14px; }
.score-copy p { margin: 5px 0 0; color: #7e748e; font-size: 9px; line-height: 1.45; }
.transcript-box { display: grid; gap: 7px; padding: 10px; border-radius: 13px; background: #f7f3fb; }
.transcript-box small { color: #998da4; font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.transcript-box p { margin: 0; font-size: 10px; line-height: 1.45; }
.result-disclaimer { margin: 9px 0 0; color: #9a8fa1; font-size: 8px; line-height: 1.4; }
.feedback-actions { display: none; grid-template-columns: 1fr 1fr; gap: 8px; }
.feedback-actions.visible { display: grid; }
.feedback-actions button, .feedback-actions a { display: grid; place-items: center; min-height: 41px; border: 1px solid rgba(207,191,229,.8); border-radius: 13px; color: #79689a; background: rgba(255,255,255,.71); text-decoration: none; font-size: 9px; font-weight: 850; cursor: pointer; }
.feedback-actions .continue { color: #fff; border-color: transparent; background: linear-gradient(110deg,#806ab8,#bd82ba); }
.error-box { display: none; flex: 0 0 auto; padding: 12px; border: 1px solid rgba(232,192,203,.7); border-radius: 14px; color: #8a5e72; background: rgba(255,244,247,.74); font-size: 9px; line-height: 1.5; }
.error-box.visible { display: block; }

.reward-content { min-height: 0; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 10px 18px 24px; text-align: center; }
.reward-scene { position: relative; width: min(100%, 340px); height: min(58vh, 410px); display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(255,255,255,.62); border-radius: 28px; background: radial-gradient(ellipse at 50% 52%, rgba(219,193,255,.8), transparent 51%), linear-gradient(160deg,#65579b,#382d60 75%,#413556); box-shadow: 0 18px 38px rgba(61,46,97,.25), inset 0 0 0 1px rgba(255,255,255,.13); }
.reward-scene::before { position: absolute; inset: 10px; border: 1px solid rgba(245,225,168,.53); border-radius: 21px; content: ""; }
.reward-rays { position: absolute; width: 160%; aspect-ratio: 1; background: repeating-conic-gradient(from 3deg, rgba(255,232,164,.22) 0deg 7deg, transparent 7deg 18deg); mask-image: radial-gradient(circle, #000, transparent 70%); animation: ray-turn 28s linear infinite; }
.reward-stars { position: absolute; inset: 0; background-image: radial-gradient(2px 2px at 17% 25%,#fff,transparent),radial-gradient(2px 2px at 77% 22%,#fff1b8,transparent),radial-gradient(1.5px 1.5px at 82% 68%,#fff,transparent),radial-gradient(2px 2px at 21% 74%,#ffe9a5,transparent),radial-gradient(1px 1px at 63% 15%,#fff,transparent),radial-gradient(1px 1px at 37% 81%,#fff,transparent); background-size: 100% 100%; animation: twinkle 1.7s ease-in-out infinite alternate; }
.reward-pedestal { position: absolute; bottom: 20%; width: 58%; height: 19px; border-radius: 50%; background: radial-gradient(ellipse,#fff8df 0%,#c1a7e6 28%,rgba(199,167,230,0) 72%); filter: blur(3px); }
.reward-card { position: relative; z-index: 1; width: 50%; max-width: 170px; aspect-ratio: .72; perspective: 800px; animation: reward-rise 1s cubic-bezier(.15,.74,.19,1) both; }
.reward-card-inner { position: absolute; inset: 0; transform-style: preserve-3d; animation: reward-turn 1.4s .55s cubic-bezier(.2,.72,.2,1) both; }
.reward-face { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; border: 3px solid #e9ca81; border-radius: 19px; backface-visibility: hidden; background: linear-gradient(150deg,#3e376a,#7462a5 58%,#51426e); box-shadow: 0 0 0 4px rgba(241,220,157,.22), 0 0 29px rgba(255,225,143,.47), inset 0 0 0 4px rgba(255,255,255,.12); }
.reward-back-face { transform: rotateY(180deg); color: #f7e5ad; font-size: 39px; }
.reward-face .reward-art { display: grid; place-items: center; width: 91%; height: 88%; border-radius: 13px; background: radial-gradient(circle at 50% 40%,#fff3df,#d8c8f2 58%,#9b8dc3); }
.reward-face .mini-illustration { width: 88%; height: 88%; border: 0; border-radius: 0; background: transparent; box-shadow: none; transform: none; }
.reward-face .mini-illustration .word-symbol { font-size: clamp(48px, 19vw, 88px); filter: drop-shadow(0 9px 7px rgba(68,40,54,.2)); }
.reward-face img { width: 93%; height: 93%; object-fit: contain; filter: drop-shadow(0 9px 8px rgba(68,40,54,.2)); }
.reward-face svg { width: 90%; height: 90%; }
.reward-copy .eyebrow { color: #856c40; }
.reward-copy h1 { margin: 3px 0 4px; color: var(--ink); font-size: 24px; font-weight: 900; letter-spacing: -.04em; }
.reward-copy p { margin: 0; color: #766b86; font-size: 10px; line-height: 1.45; }
.reward-actions { display: grid; width: min(100%, 340px); grid-template-columns: 1fr 1fr; gap: 8px; }
.reward-actions button, .reward-actions a { display: grid; place-items: center; min-height: 43px; border: 1px solid rgba(255,255,255,.9); border-radius: 14px; color: #5d4a7c; background: rgba(255,255,255,.72); box-shadow: 0 4px 12px rgba(80,62,124,.08); text-decoration: none; font-size: 9px; font-weight: 850; cursor: pointer; }
.reward-actions .save-reward { border-color: transparent; color: #5b456f; background: linear-gradient(110deg,#f7e4a5,#f0ca7e); }

.list-content { flex: 1; min-height: 0; overflow: auto; padding: 8px 15px 90px; }
.simple-page-title { margin: 8px 0 13px; font-size: 24px; font-weight: 900; letter-spacing: -.05em; }
.list-card { display: flex; align-items: center; gap: 11px; min-height: 69px; margin-bottom: 8px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.9); border-radius: 17px; background: rgba(255,255,255,.72); box-shadow: 0 5px 14px rgba(76,57,120,.08); text-decoration: none; color: var(--ink); }
.list-card .mini-illustration { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 15px; }
.list-card .mini-illustration strong { font-size: 20px; }
.list-word { flex: 1; min-width: 0; }
.list-word strong { display: block; font: 850 16px Georgia,serif; }
.list-word small { color: #8a8196; font-size: 9px; }
.list-state { color: #7cba9d; font-size: 13px; }
.empty-state { display: grid; justify-items: center; gap: 7px; padding: 44px 18px; color: #81768f; text-align: center; }
.empty-state span { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 22px; color: #997fc8; background: rgba(255,255,255,.63); font-size: 26px; }
.empty-state strong { color: var(--ink); font-size: 14px; }
.empty-state p { max-width: 260px; margin: 0; font-size: 10px; line-height: 1.55; }
.setting-card { padding: 14px; border: 1px solid rgba(255,255,255,.9); border-radius: 17px; background: rgba(255,255,255,.65); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 43px; border-bottom: 1px solid rgba(103,83,144,.08); font-size: 11px; font-weight: 700; }
.setting-row:last-child { border: 0; }
.setting-row small { color: #8a8098; font-size: 9px; font-weight: 550; }
.setting-row input[type="range"] { width: 116px; accent-color: #9279c4; }
.switch { position: relative; width: 40px; height: 24px; border: 0; border-radius: 999px; background: #c6bfd5; cursor: pointer; }
.switch::after { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: white; box-shadow: 0 1px 4px rgba(0,0,0,.14); content: ""; transition: transform .2s; }
.switch[aria-checked="true"] { background: #987dc6; }
.switch[aria-checked="true"]::after { transform: translateX(16px); }
.small-print { color: #978da4; font-size: 8px; line-height: 1.5; }
.toast-message { position: absolute; z-index: 12; right: 50%; bottom: calc(73px + env(safe-area-inset-bottom)); padding: 9px 14px; border: 1px solid rgba(255,255,255,.75); border-radius: 999px; color: #fff; background: rgba(57,47,82,.88); box-shadow: 0 7px 18px rgba(45,35,72,.2); font-size: 10px; font-weight: 750; opacity: 0; transform: translate(50%,8px); transition: opacity .18s, transform .18s; pointer-events: none; }
.toast-message.visible { opacity: 1; transform: translate(50%,0); }

@keyframes float-card-art { 0%,100% { transform: translateY(0) rotate(-.7deg); } 50% { transform: translateY(-5px) rotate(.7deg); } }
@keyframes mic-pulse { to { transform: scale(1.07); box-shadow: 0 0 0 12px rgba(213,112,161,.11),0 7px 20px rgba(99,77,149,.15); } }
@keyframes dot-pulse { to { opacity: .35; transform: scale(.75); } }
@keyframes meter { from { transform: scaleY(.35); } to { transform: scaleY(1.2); } }
@keyframes ray-turn { to { transform: rotate(360deg); } }
@keyframes twinkle { to { opacity: .56; } }
@keyframes reward-rise { from { opacity: 0; transform: translateY(45px) scale(.75); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes reward-turn { 0% { transform: rotateY(0) scale(.86); } 45% { transform: rotateY(190deg) scale(1.08); } 100% { transform: rotateY(360deg) scale(1); } }
@media (min-width: 640px) {
  .app-shell { width: min(100%, 800px); }
  .home-content { padding: 4px 24px 12px; }
  .welcome { min-height: 62px; }
  .category-grid { grid-template-columns: repeat(3,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); gap: 14px; }
  .category-tile { border-radius: 25px; }
  .tile-label strong { font-size: 16px; }
  .tile-label small { font-size: 9px; }
  .tile-art { inset: 9px 8px 43px; }
  .collection-content { padding-right: 22px; padding-left: 22px; }
  .word-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
  .word-card { min-height: 150px; }
  .word-illustration { width: 90px; height: 84px; }
  .word-card-name { font-size: 15px; }
  .learn-shell { width: min(100%, 880px); }
  .learn-header { padding-right: 24px; padding-left: 24px; }
  .learn-content { padding: 0 23px; }
  .learn-layout { min-height: 0; flex: 1; display: flex; align-items: stretch; }
  .study-card { height: 100%; grid-template-columns: minmax(0,1fr) minmax(0,1fr); grid-template-rows: 27px minmax(0,1fr); column-gap: 12px; }
  .study-kicker { grid-column: 1 / -1; }
  .learn-main-stack { grid-column: 1; grid-row: 2; }
  .learn-info-side { grid-column: 2; grid-row: 2; align-content: center; grid-template-rows: auto minmax(94px,auto) auto auto; padding: 17px; border: 1px solid rgba(255,255,255,.78); border-radius: 21px; background: rgba(255,255,255,.43); box-shadow: 0 9px 24px rgba(76,57,120,.08); }
  .learn-info-side .content-switcher { flex-wrap: wrap; overflow: visible; }
  .learn-info-side .content-tab { flex: 1 1 28%; min-height: 37px; font-size: 10px; }
  .learn-info-side .example-panel { min-height: 94px; padding: 13px; }
  .learn-info-side .example-panel p { font-size: 15px; }
  .learn-info-side .example-panel .example-translation { font-size: 11px; }
  .learn-info-side .practice-link { min-height: 52px; font-size: 13px; }
  .learn-info-side .tablet-tip { display: block; color: #8f849d; font-size: 9px; line-height: 1.4; }
}
.tablet-tip { display: none; }
@media (max-width: 370px) {
  .page-header { padding: 0 12px; }
  .home-content { padding-right: 11px; padding-left: 11px; }
  .welcome h1 { font-size: 18px; }
  .category-grid { gap: 8px; }
  .category-tile { border-radius: 18px; }
  .tile-label strong { font-size: 12px; }
  .tile-label small { font-size: 7px; }
  .tile-progress { font-size: 7px; }
  .tile-progress i { width: 21px; }
  .learn-content { padding: 0 7px; }
  .study-card { gap: 4px; padding: 9px 10px 10px; border-radius: 22px; }
  .word-title { font-size: 36px; }
  .meaning-line { font-size: 11px; }
  .content-tab { min-height: 28px; padding: 0 5px; font-size: 7px; }
  .example-panel p { font-size: 10px; }
  .practice-link { min-height: 38px; }
  .learn-controls { padding-right: 10px; padding-left: 10px; }
}
@media (max-height: 730px) and (max-width: 639px) {
  .page-header { flex-basis: 49px; }
  .welcome { min-height: 49px; }
  .goal-strip { min-height: 38px; margin: 4px 0 5px; }
  .section-heading { flex-basis: 28px; }
  .category-grid { gap: 7px; }
  .tile-art { inset: 6px 3px 32px; }
  .tile-top { top: 7px; left: 9px; }
  .tile-label { bottom: 7px; }
  .word-card { min-height: 122px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
