:root {
  --yellow-50: #fffdf4;
  --yellow-100: #fff7d4;
  --yellow-200: #ffe995;
  --yellow-300: #ffd95a;
  --yellow-400: #ffc72c;
  --yellow-500: #ffb80f;
  --yellow-600: #ef9800;
  --orange: #f27618;
  --orange-deep: #ca5d0c;
  --cream: #fffaf0;
  --white: #ffffff;
  --ink: #352512;
  --ink-soft: #664c2c;
  --muted: #806f58;
  --line: rgba(128, 83, 24, .12);
  --blue: #4f8df7;
  --rose: #f36c73;
  --green: #46ad75;
  --purple: #8f72e6;
  --shadow-soft: 0 12px 30px rgba(136, 81, 5, .10);
  --shadow-card: 0 20px 40px rgba(123, 72, 3, .12), 0 4px 8px rgba(123, 72, 3, .06);
  --shadow-deep: 0 26px 56px rgba(112, 61, 0, .19), inset 0 1px 0 rgba(255, 255, 255, .78);
  --radius-sm: 16px;
  --radius-md: 22px;
  --radius-lg: 30px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color: var(--ink);
  background: var(--yellow-50);
  font-family: Inter, ui-rounded, "SF Pro Rounded", "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 88% 4%, rgba(255, 205, 61, .22), transparent 28rem),
    radial-gradient(circle at 7% 36%, rgba(255, 233, 149, .42), transparent 26rem),
    linear-gradient(180deg, #fffef9 0%, #fff9e7 48%, #fffdf5 100%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .24;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.055'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
  z-index: -1;
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, [role="button"]:focus-visible { outline: 3px solid rgba(255, 184, 15, .38); outline-offset: 3px; }
.ui-icon { width: 1em; height: 1em; display: block; }

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(4px);
  pointer-events: none;
}
.ambient--one { width: 340px; height: 340px; right: -180px; top: 20%; background: rgba(255, 196, 37, .12); }
.ambient--two { width: 260px; height: 260px; left: -120px; bottom: 4%; background: rgba(255, 218, 91, .16); }

.app-shell, .app-main { min-height: 100vh; }
.desktop-sidebar { display: none; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(255, 253, 247, .82);
  backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid rgba(118, 76, 14, .07);
}
.mobile-brand { display: inline-flex; align-items: center; gap: 10px; }
.mobile-brand__logo-wrap, .brand-logo-wrap {
  display: grid;
  place-items: center;
  padding: 3px;
  border-radius: 15px;
  background: linear-gradient(145deg, #fff, #ffe48a);
  box-shadow: 0 7px 16px rgba(139, 83, 0, .15), inset 0 1px 0 #fff;
}
.mobile-brand__logo { width: 34px; height: 34px; border-radius: 12px; object-fit: cover; }
.mobile-brand strong, .mobile-brand small { display: block; line-height: 1; }
.mobile-brand strong { font-size: 15px; font-weight: 900; letter-spacing: -.03em; }
.mobile-brand small { margin-top: 4px; color: var(--orange-deep); font-size: 8px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.topbar-actions { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.icon-button, .avatar-button, .round-button { border: 0; display: inline-grid; place-items: center; cursor: pointer; }
.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff, #fff5d5);
  box-shadow: 0 8px 16px rgba(106, 66, 9, .1), inset 0 1px 0 #fff;
  font-size: 21px;
}
.avatar-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, #4a321a, #25170a);
  border: 3px solid #fff1bd;
  font-weight: 900;
  box-shadow: 0 7px 15px rgba(70, 38, 4, .21), inset 0 1px 0 rgba(255,255,255,.25);
}
.streak-pill {
  height: 40px;
  border: 1px solid rgba(156, 89, 0, .08);
  border-radius: 999px;
  background: linear-gradient(145deg, #fff, #fff3c8);
  padding: 0 12px;
  display: inline-flex;
  gap: 5px;
  align-items: center;
  box-shadow: 0 7px 16px rgba(106, 66, 9, .1), inset 0 1px 0 #fff;
}
.streak-pill b { font-size: 14px; }
.streak-pill span:last-child { font-size: 10px; color: var(--muted); font-weight: 800; }
.streak-fire { filter: drop-shadow(0 2px 2px rgba(202, 93, 12, .25)); }

main { padding: 0 0 calc(92px + var(--safe-bottom)); }
.page { width: min(100%, 1180px); margin: 0 auto; padding: 18px 14px 38px; }
.page-heading { margin: 8px 0 20px; }
.page-heading h1, .hero-card h1, .profile-hero h1 { margin: 6px 0 8px; line-height: 1.06; letter-spacing: -.05em; }
.page-heading h1 { font-size: clamp(31px, 7.6vw, 52px); }
.page-heading p, .profile-hero p { color: var(--muted); margin: 0; line-height: 1.6; }
.eyebrow { color: #9d6909; font-weight: 900; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.surface-heading {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255,255,255,.95), rgba(255,247,217,.88));
  border: 1px solid rgba(167, 101, 1, .1);
  box-shadow: var(--shadow-soft), inset 0 1px 0 #fff;
}
.surface-heading::after {
  content: "汉";
  position: absolute;
  right: 15px;
  bottom: -22px;
  color: rgba(239, 152, 0, .08);
  font-size: 100px;
  font-weight: 900;
  line-height: 1;
}

.hero-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 500px;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 22px 18px 0;
  border-radius: 34px;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% 24%, rgba(255,255,255,.82), transparent 13rem),
    linear-gradient(140deg, #fff7c7 0%, #ffd451 47%, #ffb20b 100%);
  border: 1px solid rgba(192, 111, 0, .15);
  box-shadow: 0 28px 58px rgba(139, 77, 0, .22), inset 0 2px 0 rgba(255,255,255,.8), inset 0 -5px 12px rgba(205, 105, 0, .1);
}
.hero-card::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 9px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 27px;
  pointer-events: none;
}
.hero-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 440px;
  height: 440px;
  right: -155px;
  bottom: -220px;
  border-radius: 50%;
  background: rgba(255, 116, 0, .16);
  box-shadow: 0 0 0 58px rgba(255,255,255,.08), 0 0 0 115px rgba(255,255,255,.05);
}
.hero-copy { position: relative; z-index: 3; max-width: 630px; }
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(255,255,255,.78);
  color: #855509;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
  box-shadow: 0 7px 15px rgba(150, 89, 0, .08), inset 0 1px 0 #fff;
}
.hero-kicker i { width: 8px; height: 8px; border-radius: 50%; background: #49b972; box-shadow: 0 0 0 4px rgba(73, 185, 114, .14); }
.hero-card h1 { max-width: 600px; margin-top: 14px; font-size: clamp(32px, 7vw, 58px); }
.hero-card h1 em { color: #bd4f08; font-style: normal; text-shadow: 0 2px 0 rgba(255,255,255,.45); }
.hero-copy > p { max-width: 590px; color: #725022; font-size: 14px; line-height: 1.62; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.primary-button, .secondary-button, .text-button {
  border: 0;
  cursor: pointer;
  font-weight: 900;
}
.primary-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 19px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, #4b321a, #241507);
  border: 1px solid rgba(0,0,0,.15);
  box-shadow: 0 10px 0 #150c04, 0 16px 25px rgba(70, 35, 0, .25), inset 0 1px 0 rgba(255,255,255,.24);
  transition: transform .18s ease, box-shadow .18s ease;
}
.primary-button:active { transform: translateY(7px); box-shadow: 0 3px 0 #150c04, 0 7px 14px rgba(70,35,0,.2); }
.primary-button .ui-icon { font-size: 18px; }
.secondary-button {
  min-height: 50px;
  padding: 0 18px;
  border-radius: 16px;
  color: #725022;
  background: rgba(255,255,255,.68);
  border: 1px solid rgba(255,255,255,.85);
  box-shadow: 0 9px 18px rgba(134, 76, 0, .1), inset 0 1px 0 #fff;
}
.hero-metrics { display: none; }
.hero-stage {
  position: relative;
  z-index: 2;
  min-height: 220px;
  display: grid;
  place-items: end center;
  margin-top: -5px;
}
.hero-mascot__image {
  position: relative;
  z-index: 3;
  width: min(90%, 370px);
  height: auto;
  display: block;
  transform: translateY(30px);
  filter: drop-shadow(0 26px 22px rgba(111, 56, 0, .19));
  animation: mascot-bob 5s ease-in-out infinite;
}
.mascot-halo {
  position: absolute;
  z-index: 1;
  width: 230px;
  height: 230px;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.94) 0 38%, rgba(255,255,255,.38) 39% 56%, transparent 57%);
  filter: blur(.5px);
}
.mascot-platform {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: -15px;
  width: 220px;
  height: 58px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: linear-gradient(180deg, #ffe785 0%, #ffb20c 47%, #df7e00 100%);
  box-shadow: 0 14px 22px rgba(111, 57, 0, .26), inset 0 5px 7px rgba(255,255,255,.54), inset 0 -6px 10px rgba(135, 61, 0, .22);
}
.mascot-platform span { position: absolute; inset: 10px 28px 15px; border-radius: 50%; background: rgba(116, 50, 0, .15); filter: blur(7px); }
.float-chip {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.9);
  color: #714400;
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(255,237,171,.95));
  box-shadow: 0 12px 23px rgba(116, 66, 0, .17), inset 0 1px 0 #fff;
  font-weight: 900;
  animation: chip-float 4.5s ease-in-out infinite;
}
.float-chip--han { width: 48px; height: 48px; left: 4%; bottom: 42%; border-radius: 15px; font-size: 24px; transform: rotate(-9deg); }
.float-chip--hello { right: 4%; bottom: 55%; padding: 8px 11px; border-radius: 13px; font-size: 13px; transform: rotate(7deg); animation-delay: -.8s; }
.float-chip--tone { right: 10%; bottom: 20%; padding: 7px 10px; border-radius: 999px; color: #d5590c; font-size: 12px; animation-delay: -1.5s; }
.hero-spark { position: absolute; color: rgba(255,255,255,.9); text-shadow: 0 3px 8px rgba(155,83,0,.16); }
.hero-spark--one { top: 18px; right: 16%; font-size: 23px; }
.hero-spark--two { top: 52%; left: 48%; font-size: 14px; }

.section-block { margin-top: 30px; }
.section-heading { display: flex; justify-content: space-between; gap: 12px; align-items: end; margin: 0 2px 14px; }
.section-heading h2, .smart-review-card h2 { margin: 4px 0 0; font-size: 23px; letter-spacing: -.04em; }
.progress-number { color: #9a6509; font-size: 11px; font-weight: 900; white-space: nowrap; }
.text-button { display: none; color: #8a5a06; background: transparent; padding: 7px 0; }
.text-button span { font-size: 20px; vertical-align: -1px; }
.goal-panel {
  padding: 16px;
  border-radius: 25px;
  background: linear-gradient(145deg, #fff, #fff8df);
  border: 1px solid rgba(150, 91, 7, .1);
  box-shadow: var(--shadow-card), inset 0 1px 0 #fff;
}
.goal-progress__label { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 11px; }
.goal-progress__label b { font-size: 14px; }
.goal-progress__label span { color: var(--muted); font-size: 10px; }
.progress-track { height: 12px; padding: 2px; border-radius: 999px; overflow: hidden; background: #f1e7cf; box-shadow: inset 0 2px 5px rgba(101,58,0,.11); }
.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff9d00, #ffd13e);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65), 0 2px 6px rgba(220, 116, 0, .3);
}
.daily-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.mini-stat {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 5px;
  text-align: center;
  border-radius: 17px;
  background: linear-gradient(145deg, #fffdf7, #fff1bd);
  border: 1px solid rgba(165, 96, 0, .08);
  box-shadow: 0 8px 15px rgba(118, 68, 0, .07), inset 0 1px 0 #fff;
}
.mini-stat__icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #b66904;
  background: linear-gradient(145deg, #fff, #ffe083);
  box-shadow: 0 6px 10px rgba(143, 81, 0, .12), inset 0 1px 0 #fff;
  font-size: 18px;
}
.mini-stat b, .mini-stat small { display: block; }
.mini-stat b { font-size: 13px; }
.mini-stat small { margin-top: 3px; color: var(--muted); font-size: 9px; }

.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px; perspective: 900px; }
.feature-card {
  --accent: var(--yellow-500);
  --accent-dark: var(--yellow-600);
  --accent-soft: #fff0ad;
  position: relative;
  overflow: hidden;
  min-height: 204px;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-radius: 24px;
  background: linear-gradient(145deg, #fff, #fff8dc);
  border: 1px solid rgba(144, 85, 0, .1);
  box-shadow: 0 15px 26px rgba(100, 58, 0, .11), 0 5px 0 rgba(193, 132, 22, .13), inset 0 1px 0 #fff;
  cursor: pointer;
  transition: transform .24s ease, box-shadow .24s ease;
  animation: card-enter .5s both;
  animation-delay: calc(var(--card-index) * 70ms);
}
.feature-card[data-color="blue"] { --accent: #5e9bf7; --accent-dark: #3976d3; --accent-soft: #e9f2ff; }
.feature-card[data-color="rose"] { --accent: #f27e7d; --accent-dark: #d85658; --accent-soft: #fff0ef; }
.feature-card[data-color="green"] { --accent: #54ba7f; --accent-dark: #338c5a; --accent-soft: #eaf8ee; }
.feature-card::after {
  content: "";
  position: absolute;
  width: 110px;
  height: 110px;
  right: -42px;
  bottom: -48px;
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: 0 0 0 24px rgba(255,255,255,.36);
}
.feature-card__shine { position: absolute; inset: 1px 1px auto; height: 45%; border-radius: 23px 23px 50% 50%; background: linear-gradient(180deg, rgba(255,255,255,.7), transparent); pointer-events: none; }
.feature-icon {
  position: relative;
  z-index: 2;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(145deg, var(--accent), var(--accent-dark));
  border: 1px solid rgba(255,255,255,.52);
  box-shadow: 0 9px 0 color-mix(in srgb, var(--accent-dark) 88%, #753300 12%), 0 13px 20px color-mix(in srgb, var(--accent) 35%, transparent), inset 0 2px 0 rgba(255,255,255,.38);
  font-size: 27px;
}
.feature-copy { position: relative; z-index: 2; margin-top: 20px; }
.feature-label { color: var(--accent-dark); font-size: 9px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.feature-card h3 { margin: 5px 0 6px; font-size: 18px; letter-spacing: -.03em; }
.feature-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.feature-arrow {
  position: absolute;
  z-index: 3;
  right: 13px;
  bottom: 13px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--accent-dark);
  background: rgba(255,255,255,.82);
  box-shadow: 0 7px 12px rgba(96,55,0,.11), inset 0 1px 0 #fff;
  font-size: 17px;
}
.feature-card:active { transform: translateY(4px); box-shadow: 0 8px 18px rgba(100,58,0,.1), 0 2px 0 rgba(193,132,22,.12); }

.smart-review-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: 56px 1fr 46px;
  gap: 13px;
  align-items: center;
  margin-top: 30px;
  padding: 18px;
  border-radius: 25px;
  color: white;
  background: linear-gradient(135deg, #4a321a, #241509 72%);
  border: 1px solid rgba(255,255,255,.13);
  box-shadow: 0 21px 34px rgba(52, 28, 3, .25), inset 0 1px 0 rgba(255,255,255,.19), inset 0 -5px 12px rgba(0,0,0,.2);
}
.smart-review-card__orb { position: absolute; z-index: -1; width: 170px; height: 170px; right: 40px; top: -90px; border-radius: 50%; background: rgba(255, 190, 19, .12); box-shadow: 0 0 0 38px rgba(255,190,19,.035); }
.smart-review-card .eyebrow { color: #ffd75b; }
.smart-review-card p { margin: 5px 0 0; color: #d9cbb9; font-size: 11px; line-height: 1.45; }
.smart-review-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #673e00;
  background: linear-gradient(145deg, #ffe871, #ffad09);
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 8px 0 #a95c00, 0 12px 18px rgba(0,0,0,.19), inset 0 2px 0 rgba(255,255,255,.55);
  font-size: 28px;
}
.round-button {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  color: #6b4000;
  background: linear-gradient(145deg, #ffe967, #ffb70e);
  box-shadow: 0 7px 0 #a75e00, 0 12px 18px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.7);
  font-size: 20px;
}
.round-button:active { transform: translateY(5px); box-shadow: 0 2px 0 #a75e00, 0 6px 10px rgba(0,0,0,.14); }

.content-list { display: grid; gap: 11px; }
.content-card {
  --item-accent: #f4a600;
  width: 100%;
  min-height: 82px;
  display: grid;
  grid-template-columns: 54px minmax(0,1fr) 32px;
  align-items: center;
  gap: 13px;
  padding: 14px;
  border: 1px solid rgba(151, 92, 8, .1);
  border-radius: 21px;
  background: linear-gradient(145deg, #fff, #fff9e7);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 13px 24px rgba(98,57,0,.09), 0 4px 0 rgba(193,132,22,.1), inset 0 1px 0 #fff;
  animation: item-enter .45s both;
  animation-delay: calc(var(--item-index) * 45ms);
  transition: transform .2s ease, box-shadow .2s ease;
}
.content-card--featured { background: linear-gradient(145deg, #fff8c6, #ffd75b); border-color: rgba(199, 124, 0, .18); }
.content-card[disabled] { opacity: .52; cursor: not-allowed; filter: grayscale(.1); }
.list-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: #a75d00;
  background: linear-gradient(145deg, #fff7c6, #ffd85c);
  border: 1px solid rgba(255,255,255,.8);
  box-shadow: 0 7px 0 #e3a524, 0 11px 16px rgba(134,79,0,.13), inset 0 1px 0 #fff;
  font-size: 25px;
}
.list-icon--level { color: white; background: linear-gradient(145deg, #ffca2b, #e98100); box-shadow: 0 7px 0 #a95200, 0 11px 16px rgba(134,79,0,.16), inset 0 1px 0 rgba(255,255,255,.5); }
.list-icon--level b { font-size: 23px; text-shadow: 0 2px 0 rgba(122,57,0,.25); }
.content-card__copy { min-width: 0; }
.content-card h3 { margin: 0 0 5px; font-size: 15px; letter-spacing: -.02em; }
.content-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.card-arrow { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 11px; color: #a56c19; background: rgba(255,255,255,.68); font-size: 17px; }
.content-card:active { transform: translateY(3px); box-shadow: 0 7px 14px rgba(98,57,0,.08), 0 1px 0 rgba(193,132,22,.1); }

.lesson-placeholder {
  padding: 30px 20px;
  border-radius: 28px;
  background: linear-gradient(145deg, #fff, #fff4ca);
  border: 1px solid rgba(151,92,8,.1);
  text-align: center;
  box-shadow: var(--shadow-card), inset 0 1px 0 #fff;
}
.lesson-placeholder__icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  margin: 4px auto 20px;
  border-radius: 25px;
  color: #955200;
  background: linear-gradient(145deg, #fff2a4, #ffc51d);
  box-shadow: 0 10px 0 #d88a00, 0 17px 24px rgba(122,67,0,.2), inset 0 2px 0 rgba(255,255,255,.65);
  font-size: 41px;
}
.lesson-placeholder h2 { margin: 0 0 8px; }
.lesson-placeholder p { margin: 0 auto 22px; max-width: 480px; color: var(--muted); line-height: 1.6; }

.progress-dashboard { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.stat-card {
  min-height: 150px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(145deg, #fff, #fff7da);
  border: 1px solid rgba(151,92,8,.1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 14px 25px rgba(98,57,0,.1), 0 4px 0 rgba(193,132,22,.1), inset 0 1px 0 #fff;
}
.stat-card--wide { grid-column: 1 / -1; min-height: 185px; }
.stat-card--wide .progress-track { margin-top: 16px; }
.stat-card h2 { margin: 4px 0 0; }
.stat-card b { font-size: 24px; margin-top: 13px; }
.stat-card small { color: var(--muted); margin-top: 4px; }
.stat-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #955200;
  background: linear-gradient(145deg, #fff4ac, #ffc31b);
  box-shadow: 0 7px 0 #da8a00, 0 11px 16px rgba(128,71,0,.14), inset 0 1px 0 rgba(255,255,255,.68);
  font-size: 25px;
}
.stat-icon--han { font-size: 25px; font-weight: 900; }

.profile-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  gap: 15px;
  align-items: center;
  padding: 22px;
  border-radius: 30px;
  background: linear-gradient(145deg, #fff3ae, #ffc52b 62%, #f49a00);
  border: 1px solid rgba(187,106,0,.15);
  box-shadow: var(--shadow-deep);
}
.profile-hero > div:not(.profile-avatar) { position: relative; z-index: 2; }
.profile-hero > img { position: absolute; right: -18px; bottom: -33px; width: 120px; height: 120px; object-fit: cover; border-radius: 50%; opacity: .32; transform: rotate(-10deg); }
.profile-glow { position: absolute; width: 190px; height: 190px; right: -50px; top: -90px; border-radius: 50%; background: rgba(255,255,255,.3); box-shadow: 0 0 0 35px rgba(255,255,255,.08); }
.profile-avatar {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  color: white;
  background: linear-gradient(145deg, #4c331b, #241509);
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 9px 0 #130a03, 0 15px 22px rgba(70,38,0,.25), inset 0 1px 0 rgba(255,255,255,.25);
  font-size: 30px;
  font-weight: 900;
}
.settings-list { margin-top: 20px; display: grid; gap: 10px; }
.settings-list button {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(151,92,8,.1);
  border-radius: 20px;
  background: linear-gradient(145deg, #fff, #fff9e9);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 11px 20px rgba(98,57,0,.08), 0 3px 0 rgba(193,132,22,.08), inset 0 1px 0 #fff;
}
.settings-list button > span { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; color: #9e5900; background: linear-gradient(145deg, #fff4ae, #ffd14a); box-shadow: 0 6px 0 #dfa027, inset 0 1px 0 #fff; font-size: 23px; }
.settings-list b, .settings-list small { display: block; }
.settings-list small { color: var(--muted); margin-top: 3px; }
.settings-list i { font-style: normal; color: #a67834; font-size: 24px; }

.bottom-nav {
  position: fixed;
  z-index: 40;
  bottom: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 8px 7px calc(8px + var(--safe-bottom));
  border-top: 1px solid rgba(111,71,14,.08);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 -10px 24px rgba(94,57,5,.08);
}
.nav-item {
  min-width: 0;
  min-height: 56px;
  border: 0;
  border-radius: 16px;
  color: #92816b;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
}
.nav-item .nav-icon { width: 31px; height: 27px; display: grid; place-items: center; border-radius: 10px; font-size: 19px; }
.nav-item.active { color: #8e5200; background: linear-gradient(145deg, #fff8d1, #ffe27b); box-shadow: 0 5px 12px rgba(140,84,0,.1), inset 0 1px 0 #fff; }
.nav-item.active .nav-icon { color: #b86d00; }

@keyframes mascot-bob {
  0%, 100% { transform: translateY(30px) rotate(-.6deg); }
  50% { transform: translateY(22px) rotate(.6deg); }
}
@keyframes chip-float {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -8px; }
}
@keyframes card-enter {
  from { opacity: 0; transform: translateY(12px) rotateX(2deg); }
  to { opacity: 1; transform: translateY(0) rotateX(0); }
}
@keyframes item-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 560px) {
  .hero-card { min-height: 520px; }
  .hero-stage { min-height: 265px; }
  .hero-mascot__image { width: min(74%, 420px); }
  .mascot-platform { width: 250px; }
  .goal-panel { padding: 20px; }
  .mini-stat { flex-direction: row; justify-content: center; text-align: left; padding: 13px; }
}

@media (min-width: 720px) {
  .page { padding: 28px 24px 54px; }
  .hero-card { min-height: 420px; grid-template-columns: minmax(0,1.1fr) minmax(290px,.9fr); grid-template-rows: 1fr; align-items: center; padding: 30px 28px; }
  .hero-stage { align-self: stretch; min-height: auto; margin: 0 -8px -30px 0; }
  .hero-mascot__image { width: min(122%, 470px); transform: translate(10px, 48px); }
  .mascot-halo { width: 300px; height: 300px; bottom: 24px; }
  .mascot-platform { width: 280px; bottom: 5px; }
  .float-chip--han { left: -3%; bottom: 43%; }
  .float-chip--hello { right: 0; bottom: 61%; }
  .float-chip--tone { right: 4%; bottom: 20%; }
  .hero-metrics { display: flex; gap: 10px; margin-top: 22px; }
  .hero-metrics > span { min-width: 91px; padding: 10px 12px; border-radius: 15px; background: rgba(255,255,255,.58); border: 1px solid rgba(255,255,255,.78); box-shadow: 0 8px 15px rgba(136,78,0,.08), inset 0 1px 0 #fff; }
  .hero-metrics b, .hero-metrics small { display: block; }
  .hero-metrics b { font-size: 16px; }
  .hero-metrics small { margin-top: 2px; color: #805c29; font-size: 9px; }
  .daily-grid { gap: 12px; }
  .feature-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .feature-card { min-height: 228px; }
  .text-button { display: block; }
  .content-list { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }
  .progress-dashboard { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .stat-card--wide { grid-column: 1 / -1; }
  .surface-heading { padding: 28px; }
  @keyframes mascot-bob {
    0%, 100% { transform: translate(10px, 48px) rotate(-.6deg); }
    50% { transform: translate(10px, 40px) rotate(.6deg); }
  }
}

@media (min-width: 1024px) {
  .mobile-only { display: none !important; }
  .app-shell { display: grid; grid-template-columns: 270px minmax(0,1fr); }
  .desktop-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 24px 18px;
    border-right: 1px solid rgba(120,75,12,.08);
    background: rgba(255,255,255,.82);
    backdrop-filter: blur(22px);
    box-shadow: 16px 0 35px rgba(94,56,4,.045);
  }
  .brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 24px; }
  .brand-logo-wrap { border-radius: 19px; }
  .brand-logo { width: 50px; height: 50px; border-radius: 16px; object-fit: cover; }
  .brand-copy strong, .brand-copy small { display: block; }
  .brand-copy strong { font-size: 21px; font-weight: 950; letter-spacing: -.04em; }
  .brand-copy small { color: #b06d04; font-size: 9px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
  .desktop-nav { display: grid; gap: 7px; }
  .desktop-nav .nav-item { min-height: 56px; flex-direction: row; justify-content: flex-start; padding: 0 14px; gap: 12px; border-radius: 18px; font-size: 13px; }
  .desktop-nav .nav-icon { width: 31px; font-size: 20px; }
  .desktop-nav .nav-item.active { box-shadow: 0 8px 16px rgba(136,81,0,.11), inset 0 1px 0 #fff; }
  .sidebar-card {
    position: relative;
    overflow: hidden;
    margin-top: auto;
    padding: 18px;
    border-radius: 24px;
    background: linear-gradient(145deg, #fff4ae, #ffc52b 66%, #f4a000);
    border: 1px solid rgba(177,102,0,.14);
    box-shadow: 0 17px 28px rgba(121,68,0,.16), inset 0 1px 0 rgba(255,255,255,.7), inset 0 -5px 10px rgba(186,91,0,.08);
  }
  .sidebar-card__shine { position: absolute; width: 150px; height: 150px; right: -65px; top: -70px; border-radius: 50%; background: rgba(255,255,255,.25); box-shadow: 0 0 0 30px rgba(255,255,255,.06); }
  .sidebar-card__logo { position: relative; width: 58px; height: 58px; border-radius: 19px; object-fit: cover; box-shadow: 0 8px 0 #d28700, 0 13px 18px rgba(91,48,0,.18); }
  .sidebar-card strong { position: relative; display: block; margin-top: 15px; }
  .sidebar-card p { position: relative; margin: 6px 0 12px; color: #715022; font-size: 11px; line-height: 1.5; }
  .sidebar-streak { position: relative; display: inline-flex; padding: 7px 9px; border-radius: 999px; color: #744800; background: rgba(255,255,255,.6); font-size: 9px; font-weight: 900; box-shadow: inset 0 1px 0 #fff; }
  .topbar { min-height: 74px; justify-content: flex-end; padding: 12px 30px; background: rgba(255,253,247,.64); }
  #backButton:not([hidden]) { margin-right: auto; }
  main { padding-bottom: 0; }
  .page { padding: 34px 30px 68px; }
  .hero-card { min-height: 450px; padding: 36px 38px; border-radius: 34px; }
  .hero-copy > p { font-size: 15px; }
  .hero-stage { margin-right: -28px; margin-bottom: -36px; }
  .hero-mascot__image { width: min(128%, 520px); transform: translate(18px, 56px); }
  .mascot-platform { width: 310px; height: 60px; }
  .feature-card:hover, .content-card:hover { transform: translateY(-7px) rotateX(1deg); box-shadow: 0 23px 38px rgba(100,58,0,.14), 0 6px 0 rgba(193,132,22,.12), inset 0 1px 0 #fff; }
  .feature-card:hover .feature-icon { transform: translateY(-2px); }
  .feature-icon { transition: transform .22s ease; }
  @keyframes mascot-bob {
    0%, 100% { transform: translate(18px, 56px) rotate(-.6deg); }
    50% { transform: translate(18px, 48px) rotate(.6deg); }
  }
}

@media (min-width: 1320px) {
  .app-shell { grid-template-columns: 286px minmax(0,1fr); }
  .hero-card { grid-template-columns: minmax(0,1.06fr) minmax(430px,.94fr); }
  .hero-card h1 { font-size: 60px; }
}

@media (max-width: 390px) {
  .page { padding-left: 11px; padding-right: 11px; }
  .topbar { padding-left: 11px; padding-right: 11px; }
  .hero-card { padding-left: 16px; padding-right: 16px; min-height: 475px; }
  .hero-card h1 { font-size: 31px; }
  .hero-copy > p { font-size: 13px; }
  .secondary-button { display: none; }
  .hero-stage { min-height: 215px; }
  .feature-grid { gap: 9px; }
  .feature-card { min-height: 196px; padding: 14px; }
  .feature-icon { width: 49px; height: 49px; font-size: 24px; }
  .feature-card h3 { font-size: 16px; }
  .feature-card p { font-size: 10px; }
  .smart-review-card { grid-template-columns: 52px 1fr 42px; padding: 15px; }
  .smart-review-icon { width: 52px; height: 52px; }
  .round-button { width: 42px; height: 42px; }
  .goal-progress__label span { display: none; }
}

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

/* Home layout update: compact bottom banner */
.home-page {
  display: grid;
  gap: 24px;
}
.home-page > * { margin-top: 0; }
.home-intro {
  margin: 0;
  padding: 20px 20px 22px;
}
.home-intro h1 {
  margin: 8px 0 8px;
  font-size: clamp(28px, 6.5vw, 44px);
  letter-spacing: -.045em;
}
.home-intro p {
  max-width: 760px;
}

.home-page .hero-card--footer {
  min-height: 0;
  padding: 20px 18px;
  border-radius: 30px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
}
.home-page .hero-card--footer::after {
  width: 270px;
  height: 270px;
  right: -115px;
  bottom: -150px;
}
.home-page .hero-card--footer .hero-copy {
  max-width: 100%;
}
.home-page .hero-card--footer .hero-kicker {
  font-size: 9px;
  padding: 7px 10px;
}
.home-page .hero-card--footer h2 {
  max-width: 620px;
  margin: 12px 0 8px;
  font-size: clamp(24px, 5vw, 36px);
  line-height: 1.08;
  letter-spacing: -.045em;
}
.home-page .hero-card--footer h2 em {
  color: #bd4f08;
  font-style: normal;
  text-shadow: 0 2px 0 rgba(255,255,255,.45);
}
.home-page .hero-card--footer .hero-copy > p {
  max-width: 560px;
  font-size: 13px;
}
.home-page .hero-card--footer .hero-actions {
  margin-top: 14px;
}
.home-page .hero-card--footer .primary-button,
.home-page .hero-card--footer .secondary-button {
  min-height: 44px;
  border-radius: 14px;
}
.home-page .hero-card--footer .hero-stage {
  min-height: 150px;
  margin-top: 6px;
}
.home-page .hero-card--footer .hero-mascot__image {
  width: min(68%, 250px);
  transform: translateY(18px);
  animation: mascot-bob-footer 5s ease-in-out infinite;
}
.home-page .hero-card--footer .mascot-halo {
  width: 165px;
  height: 165px;
  bottom: 8px;
}
.home-page .hero-card--footer .mascot-platform {
  width: 170px;
  height: 42px;
  bottom: -8px;
}
.home-page .hero-card--footer .mascot-platform span {
  inset: 7px 20px 10px;
}
.home-page .hero-card--footer .float-chip--han {
  width: 40px;
  height: 40px;
  left: 3%;
  bottom: 48%;
  font-size: 20px;
}
.home-page .hero-card--footer .float-chip--hello {
  right: 5%;
  bottom: 62%;
  font-size: 11px;
  padding: 6px 9px;
}
.home-page .hero-card--footer .float-chip--tone {
  right: 9%;
  bottom: 18%;
  font-size: 10px;
  padding: 6px 9px;
}
.home-page .hero-card--footer .hero-spark--one {
  top: 16px;
  right: 14px;
  font-size: 18px;
}
.home-page .hero-card--footer .hero-spark--two {
  top: auto;
  bottom: 26px;
  left: 56%;
  font-size: 12px;
}
.home-page .hero-card--footer .hero-metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.home-page .hero-card--footer .hero-metrics > span {
  min-width: 82px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(255,255,255,.78);
  box-shadow: 0 8px 15px rgba(136,78,0,.08), inset 0 1px 0 #fff;
}
.home-page .hero-card--footer .hero-metrics b,
.home-page .hero-card--footer .hero-metrics small {
  display: block;
}
.home-page .hero-card--footer .hero-metrics b {
  font-size: 14px;
}
.home-page .hero-card--footer .hero-metrics small {
  margin-top: 2px;
  color: #805c29;
  font-size: 9px;
}

@media (min-width: 720px) {
  .home-page {
    gap: 26px;
  }
  .home-intro {
    padding: 24px 26px 26px;
  }
  .home-page .hero-card--footer {
    grid-template-columns: minmax(0, 1.08fr) minmax(220px, .72fr);
    grid-template-rows: 1fr;
    min-height: 230px;
    padding: 22px 24px;
  }
  .home-page .hero-card--footer .hero-stage {
    min-height: 180px;
    margin: 0 -4px -18px 0;
  }
  .home-page .hero-card--footer .hero-mascot__image {
    width: min(100%, 280px);
    transform: translate(8px, 24px);
  }
  .home-page .hero-card--footer .mascot-halo {
    width: 190px;
    height: 190px;
    bottom: 16px;
  }
  .home-page .hero-card--footer .mascot-platform {
    width: 200px;
    height: 44px;
    bottom: 2px;
  }
}

@media (min-width: 1024px) {
  .home-page {
    gap: 28px;
  }
  .home-intro {
    padding: 28px 30px;
  }
  .home-page .hero-card--footer {
    min-height: 248px;
    padding: 24px 28px;
    border-radius: 32px;
  }
  .home-page .hero-card--footer .hero-copy > p {
    font-size: 14px;
  }
  .home-page .hero-card--footer .hero-stage {
    margin-right: -16px;
    margin-bottom: -22px;
  }
  .home-page .hero-card--footer .hero-mascot__image {
    width: min(100%, 300px);
    transform: translate(12px, 26px);
  }
}

@media (max-width: 390px) {
  .home-intro {
    padding: 18px 16px 20px;
  }
  .home-page .hero-card--footer {
    padding: 18px 16px;
  }
  .home-page .hero-card--footer h2 {
    font-size: 23px;
  }
  .home-page .hero-card--footer .hero-stage {
    min-height: 140px;
  }
  .home-page .hero-card--footer .hero-mascot__image {
    width: min(72%, 220px);
  }
}

@keyframes mascot-bob-footer {
  0%, 100% { transform: translateY(18px) rotate(-.5deg); }
  50% { transform: translateY(12px) rotate(.5deg); }
}
@media (min-width: 720px) {
  @keyframes mascot-bob-footer {
    0%, 100% { transform: translate(8px, 24px) rotate(-.5deg); }
    50% { transform: translate(8px, 18px) rotate(.5deg); }
  }
}
@media (min-width: 1024px) {
  @keyframes mascot-bob-footer {
    0%, 100% { transform: translate(12px, 26px) rotate(-.5deg); }
    50% { transform: translate(12px, 20px) rotate(.5deg); }
  }
}

/* Editable display name in the personal section */
.profile-name-card {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(151,92,8,.1);
  border-radius: 22px;
  background: linear-gradient(145deg, #fff, #fff9e9);
  box-shadow: 0 11px 20px rgba(98,57,0,.08), 0 3px 0 rgba(193,132,22,.08), inset 0 1px 0 #fff;
}
.profile-name-card__copy label {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
}
.profile-name-card__copy small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}
.profile-name-card__controls {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 10px;
  margin-top: 14px;
}
.profile-name-card input {
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(151,92,8,.16);
  border-radius: 15px;
  outline: none;
  color: var(--ink);
  background: #fffdf7;
  box-shadow: inset 0 2px 5px rgba(101,58,0,.06);
  font: inherit;
  font-weight: 800;
}
.profile-name-card input:focus {
  border-color: #f0a600;
  box-shadow: 0 0 0 4px rgba(255,190,34,.18), inset 0 2px 5px rgba(101,58,0,.05);
}
.profile-name-card button {
  height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 15px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(145deg, #4b321a, #241507);
  box-shadow: 0 6px 0 #150c04, 0 10px 18px rgba(70,35,0,.2), inset 0 1px 0 rgba(255,255,255,.24);
  font: inherit;
  font-weight: 900;
}
.profile-name-card button:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #150c04, 0 5px 10px rgba(70,35,0,.17);
}
.profile-name-status {
  min-height: 18px;
  margin: 10px 2px 0;
  color: #8a5a06;
  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 520px) {
  .profile-name-card__controls {
    grid-template-columns: 1fr;
  }
  .profile-name-card button {
    width: 100%;
  }
}

/* Vocabulary library */
.vocabulary-browser {
  display: grid;
  gap: 14px;
}
.vocabulary-toolbar {
  position: sticky;
  top: 78px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(155, 94, 5, .12);
  border-radius: 20px;
  background: rgba(255, 253, 246, .88);
  box-shadow: 0 12px 28px rgba(103, 60, 2, .09), inset 0 1px 0 #fff;
  backdrop-filter: blur(16px);
}
.vocabulary-search {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 13px;
  border-radius: 14px;
  background: #fffaf0;
  border: 1px solid rgba(151, 91, 4, .1);
  color: #a06608;
  box-shadow: inset 0 2px 5px rgba(95, 54, 0, .045);
}
.vocabulary-search .ui-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}
.vocabulary-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 750;
}
.vocabulary-search input::placeholder {
  color: #a69272;
  font-weight: 650;
}
.vocabulary-count {
  flex: 0 0 auto;
  padding: 9px 11px;
  border-radius: 999px;
  color: #7b4c04;
  background: linear-gradient(145deg, #fff0af, #ffd45a);
  border: 1px solid rgba(172, 101, 0, .12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
  font-size: 10px;
  font-weight: 950;
  white-space: nowrap;
}
.vocabulary-grid {
  display: grid;
  gap: 12px;
}
.vocabulary-card {
  min-width: 0;
  padding: 17px;
  border-radius: 23px;
  background: linear-gradient(145deg, rgba(255,255,255,.97), rgba(255,248,222,.92));
  border: 1px solid rgba(151, 91, 4, .1);
  box-shadow: 0 13px 25px rgba(100, 58, 0, .08), inset 0 1px 0 #fff;
}
.vocabulary-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.vocabulary-card h3 {
  margin: 0;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -.035em;
}
.vocabulary-pinyin {
  margin: 5px 0 0;
  color: #c26608;
  font-size: 13px;
  font-weight: 900;
}
.vocabulary-level {
  flex: 0 0 auto;
  padding: 7px 9px;
  border-radius: 11px;
  color: #865200;
  background: #fff1b4;
  border: 1px solid rgba(170, 98, 0, .1);
  font-size: 9px;
  font-weight: 950;
}
.vocabulary-meaning {
  margin: 13px 0 0;
  color: #493620;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.55;
}
.vocabulary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.vocabulary-tags span {
  padding: 6px 8px;
  border-radius: 999px;
  color: #7f684a;
  background: #f6f0e5;
  border: 1px solid rgba(99, 68, 29, .06);
  font-size: 9px;
  font-weight: 850;
}
.vocabulary-memory {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px dashed rgba(133, 82, 9, .17);
}
.vocabulary-memory summary {
  cursor: pointer;
  color: #996009;
  font-size: 10px;
  font-weight: 950;
}
.vocabulary-memory p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}
.vocabulary-empty {
  padding: 34px 20px;
  border-radius: 23px;
  background: rgba(255,255,255,.72);
  border: 1px dashed rgba(151, 91, 4, .18);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

@media (min-width: 720px) {
  .vocabulary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .vocabulary-card {
    padding: 19px;
  }
}

@media (min-width: 1180px) {
  .vocabulary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .vocabulary-toolbar {
    top: 68px;
    align-items: stretch;
    flex-direction: column;
  }
  .vocabulary-count {
    align-self: flex-start;
  }
}

/* HSK pinyin practice */
.practice-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(255,255,255,.97), rgba(255,247,223,.94));
  border: 1px solid rgba(151, 91, 4, .1);
  box-shadow: 0 16px 30px rgba(100, 58, 0, .08), inset 0 1px 0 #fff;
}
.practice-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.practice-panel__header h2 {
  margin: 5px 0 6px;
  font-size: clamp(24px, 5vw, 34px);
  letter-spacing: -.04em;
}
.practice-panel__header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.practice-counter {
  flex: 0 0 auto;
  align-self: flex-start;
  padding: 9px 12px;
  border-radius: 999px;
  color: #7b4c04;
  background: linear-gradient(145deg, #fff0af, #ffd45a);
  border: 1px solid rgba(172, 101, 0, .12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
  font-size: 10px;
  font-weight: 950;
  white-space: nowrap;
}
.practice-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
  background: linear-gradient(160deg, #fffdf7, #fff5d6);
  border: 1px solid rgba(151, 91, 4, .11);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.92);
}
.practice-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.practice-mode-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  color: #8c5607;
  background: rgba(255, 238, 180, .95);
  border: 1px solid rgba(170, 98, 0, .12);
  font-size: 11px;
  font-weight: 950;
}
.practice-switcher {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.practice-chip {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(151, 91, 4, .12);
  background: rgba(255,255,255,.78);
  color: #87674a;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: inset 0 1px 0 #fff;
}
.practice-chip.is-active {
  color: #513107;
  background: linear-gradient(145deg, #fff2b9, #ffd457);
  border-color: rgba(198, 118, 3, .18);
}
.practice-prompt {
  min-height: 132px;
  display: grid;
  place-items: center;
  padding: 16px;
  border-radius: 24px;
  text-align: center;
  color: #5d3208;
  background: linear-gradient(145deg, rgba(255,255,255,.88), rgba(255,249,232,.92));
  border: 1px solid rgba(151, 91, 4, .1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.94);
  font-size: clamp(28px, 8vw, 74px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.04em;
}
.practice-hint {
  margin: -2px 0 0;
  color: #8a6a47;
  font-size: 12px;
  font-weight: 750;
}
.practice-input-wrap {
  display: grid;
  gap: 8px;
}
.practice-input-wrap > span {
  color: #865200;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.practice-input {
  min-height: 56px;
  width: 100%;
  padding: 0 16px;
  border-radius: 18px;
  border: 2px solid rgba(230, 180, 61, .4);
  background: #fffef9;
  color: #574126;
  font: inherit;
  font-size: 22px;
  font-weight: 900;
  outline: 0;
  box-shadow: inset 0 2px 5px rgba(95, 54, 0, .05);
  transition: border-color .18s ease, box-shadow .18s ease, color .18s ease, background-color .18s ease;
}
.practice-input::placeholder {
  color: #b8a688;
  font-weight: 700;
}
.practice-input:focus {
  border-color: rgba(244, 180, 45, .85);
  box-shadow: 0 0 0 4px rgba(255, 201, 80, .16), inset 0 2px 5px rgba(95, 54, 0, .04);
}
.practice-input.is-correct {
  color: #0d7a43;
  border-color: rgba(32, 182, 107, .78);
  background: #f3fff7;
  box-shadow: 0 0 0 4px rgba(32, 182, 107, .12), inset 0 2px 5px rgba(16, 120, 70, .04);
}
.practice-input.is-wrong {
  color: #c53a3a;
  border-color: rgba(223, 76, 76, .75);
  background: #fff6f6;
  box-shadow: 0 0 0 4px rgba(223, 76, 76, .10), inset 0 2px 5px rgba(170, 45, 45, .04);
}
.practice-feedback {
  margin: 0;
  min-height: 24px;
  color: #7c6241;
  font-size: 13px;
  font-weight: 800;
}
.practice-feedback.is-correct { color: #138a4c; }
.practice-feedback.is-wrong { color: #cb3d3d; }
.practice-answer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 17px;
  background: rgba(255,255,255,.74);
  border: 1px dashed rgba(151, 91, 4, .18);
}
.practice-answer-label {
  color: #8c6f49;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.practice-answer {
  color: #9b5d07;
  font-size: 15px;
  font-weight: 950;
}
.practice-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.practice-audio-actions,
.practice-nav-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.practice-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 15px;
  border: 1px solid rgba(151, 91, 4, .12);
  background: rgba(255,255,255,.82);
  color: #664016;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: inset 0 1px 0 #fff;
}
.practice-button .ui-icon {
  width: 18px;
  height: 18px;
}
.practice-button--primary {
  color: #fff;
  background: linear-gradient(145deg, #3fca87, #29b86f);
  border-color: rgba(15, 126, 72, .18);
  box-shadow: 0 10px 16px rgba(28, 170, 99, .18), inset 0 1px 0 rgba(255,255,255,.34);
}

@media (min-width: 1024px) {
  .practice-card {
    padding: 18px;
  }
  .practice-prompt {
    min-height: 156px;
  }
}

@media (max-width: 720px) {
  .practice-panel,
  .practice-card {
    padding: 14px;
  }
  .practice-panel__header,
  .practice-card__top,
  .practice-actions-row,
  .practice-answer-row {
    flex-direction: column;
    align-items: stretch;
  }
  .practice-counter,
  .practice-mode-badge {
    align-self: flex-start;
  }
  .practice-switcher {
    justify-content: flex-start;
  }
  .practice-audio-actions,
  .practice-nav-actions {
    width: 100%;
  }
  .practice-button {
    flex: 1 1 0;
  }
  .practice-prompt {
    min-height: 116px;
    font-size: clamp(24px, 9vw, 46px);
  }
  .practice-input {
    font-size: 19px;
  }
}

/* Saved vocabulary and wrong-answer review */
#practiceSaveSlot {
  display: contents;
}
.save-word-button,
.vocabulary-audio-button,
.study-action-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border-radius: 13px;
  border: 1px solid rgba(151, 91, 4, .12);
  background: rgba(255,255,255,.84);
  color: #6a451b;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: inset 0 1px 0 #fff;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}
.save-word-button:hover,
.vocabulary-audio-button:hover,
.study-action-button:hover {
  transform: translateY(-1px);
}
.save-word-button .ui-icon,
.vocabulary-audio-button .ui-icon,
.study-action-button .ui-icon {
  width: 17px;
  height: 17px;
}
.save-word-button.is-saved {
  color: #7a4a00;
  background: linear-gradient(145deg, #fff0aa, #ffd14a);
  border-color: rgba(191, 111, 0, .2);
  box-shadow: 0 8px 14px rgba(168, 92, 0, .1), inset 0 1px 0 rgba(255,255,255,.78);
}
.save-word-button.is-saved .ui-icon {
  fill: currentColor;
}
.save-word-button--practice {
  min-height: 44px;
  font-size: 13px;
  border-radius: 15px;
}
.vocabulary-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}
.vocabulary-wrong-tag {
  color: #bd3f3f !important;
  background: #fff0f0 !important;
  border-color: rgba(205, 58, 58, .1) !important;
}

.study-collection {
  display: grid;
  gap: 16px;
}
.study-summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 19px;
  border-radius: 25px;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(255,244,204,.95));
  border: 1px solid rgba(151, 91, 4, .11);
  box-shadow: 0 15px 27px rgba(100, 58, 0, .08), inset 0 1px 0 #fff;
}
.study-summary-card--review {
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(255,235,218,.95));
}
.study-summary-card h2 {
  margin: 5px 0 6px;
  font-size: clamp(24px, 5vw, 34px);
  letter-spacing: -.04em;
}
.study-summary-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.study-summary-badge {
  flex: 0 0 auto;
  min-width: 64px;
  min-height: 64px;
  display: grid;
  place-items: center;
  padding: 10px;
  border-radius: 21px;
  color: #734500;
  background: linear-gradient(145deg, #fff1b0, #ffc928);
  border: 1px solid rgba(170, 98, 0, .13);
  box-shadow: 0 9px 0 rgba(202, 121, 0, .12), inset 0 1px 0 rgba(255,255,255,.8);
  font-size: 18px;
  font-weight: 950;
}
.study-word-grid {
  display: grid;
  gap: 13px;
}
.study-word-card {
  min-width: 0;
  padding: 17px;
  border-radius: 23px;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(255,249,229,.94));
  border: 1px solid rgba(151, 91, 4, .1);
  box-shadow: 0 13px 25px rgba(100, 58, 0, .075), inset 0 1px 0 #fff;
}
.study-word-card--wrong {
  border-color: rgba(203, 74, 74, .13);
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(255,243,238,.94));
}
.study-word-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.study-word-card__word {
  min-width: 0;
}
.study-word-card__word h3 {
  display: inline-block;
  margin: 0;
  color: #493018;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: -.035em;
}
.study-word-card__word p {
  margin: 5px 0 0;
  color: #c26608;
  font-size: 13px;
  font-weight: 900;
}
.study-rank {
  display: inline-flex;
  margin-right: 7px;
  padding: 5px 7px;
  vertical-align: 7px;
  border-radius: 9px;
  color: #9a5d05;
  background: #fff0b5;
  font-size: 9px;
  font-weight: 950;
}
.study-word-card__badges {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  flex-direction: column;
}
.wrong-count-badge {
  padding: 7px 9px;
  border-radius: 11px;
  color: #bd3d3d;
  background: #ffecec;
  border: 1px solid rgba(202, 60, 60, .1);
  font-size: 9px;
  font-weight: 950;
  white-space: nowrap;
}
.study-word-card__meaning {
  margin: 13px 0 0;
  color: #493620;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.55;
}
.study-word-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}
.study-word-card__meta span {
  padding: 6px 8px;
  border-radius: 999px;
  color: #7f684a;
  background: #f6f0e5;
  border: 1px solid rgba(99, 68, 29, .06);
  font-size: 9px;
  font-weight: 850;
}
.study-word-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.study-action-button--reset {
  color: #16834c;
  background: #effff6;
  border-color: rgba(29, 159, 91, .13);
}
.study-empty-card {
  display: grid;
  justify-items: center;
  padding: 42px 22px;
  border-radius: 27px;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(255,246,211,.92));
  border: 1px dashed rgba(151, 91, 4, .2);
  text-align: center;
  box-shadow: 0 14px 26px rgba(100, 58, 0, .07), inset 0 1px 0 #fff;
}
.study-empty-card__icon {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 23px;
  color: #9f6207;
  background: linear-gradient(145deg, #fff1ad, #ffc82d);
  box-shadow: 0 9px 0 rgba(199, 119, 0, .13), inset 0 1px 0 rgba(255,255,255,.8);
}
.study-empty-card__icon .ui-icon {
  width: 31px;
  height: 31px;
}
.study-empty-card h2 {
  margin: 20px 0 7px;
  font-size: 25px;
  letter-spacing: -.04em;
}
.study-empty-card p {
  max-width: 470px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

@media (min-width: 720px) {
  .study-word-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (min-width: 1180px) {
  .study-word-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .study-summary-card,
  .study-word-card__top {
    align-items: stretch;
    flex-direction: column;
  }
  .study-summary-badge {
    align-self: flex-start;
    min-width: 56px;
    min-height: 56px;
  }
  .study-word-card__badges {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .study-word-card__actions > * {
    flex: 1 1 calc(50% - 8px);
  }
}

/* Home saved vocabulary preview */
.home-saved-preview {
  display: grid;
  gap: 10px;
  padding: 13px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255,255,255,.97), rgba(255,247,219,.92));
  border: 1px solid rgba(151, 91, 4, .1);
  box-shadow: 0 13px 25px rgba(100, 58, 0, .075), inset 0 1px 0 #fff;
}
.home-saved-link {
  display: block;
}
.home-saved-empty {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 0;
  border-radius: 18px;
  background: rgba(255,255,255,.64);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.home-saved-empty__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #a46508;
  background: linear-gradient(145deg, #fff0ab, #ffd14c);
  box-shadow: 0 7px 0 rgba(190, 111, 0, .12), inset 0 1px 0 rgba(255,255,255,.78);
}
.home-saved-empty__icon .ui-icon {
  width: 23px;
  height: 23px;
}
.home-saved-empty b,
.home-saved-empty small {
  display: block;
}
.home-saved-empty b {
  font-size: 13px;
}
.home-saved-empty small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}
.home-saved-empty > .ui-icon {
  width: 20px;
  height: 20px;
  color: #a26a16;
}
.home-saved-words {
  display: grid;
  gap: 8px;
}
.home-saved-word {
  min-width: 0;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 9px 11px;
  border: 1px solid rgba(151, 91, 4, .08);
  border-radius: 16px;
  background: rgba(255,255,255,.74);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.home-saved-word strong {
  font-size: 24px;
  line-height: 1;
}
.home-saved-word span {
  color: #c26608;
  font-size: 11px;
  font-weight: 900;
}
.home-saved-word small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-saved-total {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid rgba(172, 101, 0, .11);
  border-radius: 16px;
  color: #754800;
  background: linear-gradient(145deg, #fff1b0, #ffd45a);
  font: inherit;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
}
.home-saved-total b {
  font-size: 17px;
}
.home-saved-total span {
  font-size: 11px;
  font-weight: 900;
}
.home-saved-total .ui-icon {
  width: 17px;
  height: 17px;
}

@media (min-width: 720px) {
  .home-saved-preview {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
  }
  .home-saved-words {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .home-saved-word {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .home-saved-word small {
    grid-column: 1 / -1;
  }
  .home-saved-total {
    min-width: 116px;
    flex-direction: column;
  }
}

@media (min-width: 1180px) {
  .home-saved-words {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Voice settings */
.voice-settings-card {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  padding: 20px;
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(255,255,255,.97), rgba(255,247,222,.94));
  border: 1px solid rgba(151, 91, 4, .11);
  box-shadow: 0 15px 28px rgba(100, 58, 0, .08), inset 0 1px 0 #fff;
}
.voice-settings-card__heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.voice-settings-card__icon {
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: #8a5606;
  background: linear-gradient(145deg, #fff0ad, #ffd45b);
  border: 1px solid rgba(172, 101, 0, .12);
  box-shadow: 0 8px 16px rgba(130, 74, 0, .1), inset 0 1px 0 rgba(255,255,255,.8);
}
.voice-settings-card__icon .ui-icon {
  width: 24px;
  height: 24px;
}
.voice-settings-card__heading h2 {
  margin: 4px 0 5px;
  font-size: 22px;
  letter-spacing: -.035em;
}
.voice-settings-card__heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.voice-settings-grid {
  display: grid;
  gap: 13px;
}
.voice-settings-grid label {
  display: grid;
  gap: 8px;
}
.voice-settings-grid label > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #73502a;
  font-size: 11px;
  font-weight: 900;
}
.voice-settings-grid label > span b {
  color: #a56206;
  font-size: 11px;
}
.voice-settings-grid select {
  width: 100%;
  min-height: 48px;
  padding: 0 38px 0 13px;
  border-radius: 15px;
  border: 1px solid rgba(151, 91, 4, .13);
  background: #fffdf8;
  color: #4e371f;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  outline: 0;
  box-shadow: inset 0 2px 5px rgba(95, 54, 0, .04);
}
.voice-settings-grid select:focus {
  border-color: rgba(240, 169, 32, .75);
  box-shadow: 0 0 0 4px rgba(255, 198, 67, .14);
}
.voice-settings-grid input[type="range"] {
  width: 100%;
  accent-color: #eaa514;
}
.voice-settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.voice-preview-button,
.voice-save-button {
  min-height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 15px;
  border: 1px solid rgba(151, 91, 4, .12);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.voice-preview-button {
  color: #684217;
  background: rgba(255,255,255,.86);
  box-shadow: inset 0 1px 0 #fff;
}
.voice-preview-button .ui-icon {
  width: 18px;
  height: 18px;
}
.voice-save-button {
  color: #fff;
  background: linear-gradient(145deg, #4b321a, #241507);
  box-shadow: 0 7px 0 #150c04, 0 12px 18px rgba(70, 35, 0, .18), inset 0 1px 0 rgba(255,255,255,.22);
}
.voice-settings-status {
  min-height: 18px;
  margin: 0;
  color: #8b6c47;
  font-size: 11px;
  font-weight: 750;
}

/* Reveal and answer controls */
.practice-answer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}
.practice-answer-part {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  padding: 5px 8px;
  border-radius: 10px;
  transition: transform .18s ease, background-color .18s ease, color .18s ease;
}
.practice-answer-part.is-hidden {
  color: #b3a287;
  background: rgba(233, 223, 204, .58);
}
.practice-answer-part.is-revealed {
  color: #8b5504;
  background: #fff0b7;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
  animation: answer-pop .24s ease both;
}
.practice-answer-gap {
  width: 2px;
}
.practice-button--reveal {
  color: #7d5108;
  background: linear-gradient(145deg, #fff7cf, #ffe48d);
}
.practice-button--answer {
  color: #a64b12;
  background: linear-gradient(145deg, #fff0de, #ffd5ad);
  border-color: rgba(191, 92, 23, .16);
}
.practice-button--answer.is-added {
  color: #fff;
  background: linear-gradient(145deg, #d3602a, #b9461d);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.practice-button:disabled {
  cursor: default;
  opacity: .68;
  transform: none;
}
.practice-feedback.is-reveal {
  color: #9a6509;
}
@keyframes answer-pop {
  from { opacity: 0; transform: translateY(4px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (min-width: 720px) {
  .voice-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .voice-settings-card {
    padding: 16px;
  }
  .voice-settings-card__heading {
    align-items: center;
  }
  .voice-settings-actions > button {
    flex: 1 1 0;
  }
  .practice-answer-row {
    gap: 10px;
  }
  .practice-answer {
    justify-content: flex-start;
  }
  .practice-audio-actions .practice-button {
    flex: 1 1 calc(50% - 5px);
  }
  #practiceSaveSlot {
    flex: 1 1 100%;
  }
  #practiceSaveSlot .save-word-button {
    width: 100%;
  }
}

/* Letter-by-letter pinyin reveal and success detail */
.practice-answer {
  gap: 2px;
}
.practice-answer-part {
  min-width: 21px;
  padding: 5px 5px;
  border-radius: 8px;
  font-size: 15px;
}
.practice-answer-gap {
  width: 8px;
  min-width: 8px;
}
.practice-detail-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
  color: #2f5f41;
  background: linear-gradient(145deg, #f4fff8, #e3f9eb);
  border: 1px solid rgba(36, 157, 92, .2);
  box-shadow: 0 12px 24px rgba(25, 126, 72, .1), inset 0 1px 0 rgba(255,255,255,.95);
  animation: practice-detail-enter .28s ease both;
}
.practice-detail-card[hidden] {
  display: none;
}
.practice-detail-card__hanzi {
  min-height: 88px;
  display: grid;
  place-items: center;
  padding: 10px;
  border-radius: 19px;
  color: #117542;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(36, 157, 92, .16);
  box-shadow: inset 0 1px 0 #fff;
  font-size: clamp(36px, 7vw, 58px);
  font-weight: 950;
  line-height: 1;
  text-align: center;
}
.practice-detail-card__content {
  min-width: 0;
}
.practice-detail-card__content .eyebrow {
  color: #16804a;
}
.practice-detail-card__pinyin {
  margin: 6px 0 3px;
  color: #0f7a43;
  font-size: 20px;
  font-weight: 950;
}
.practice-detail-card__meaning {
  margin: 0;
  color: #365744;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}
.practice-detail-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}
.practice-detail-card__tags span {
  padding: 6px 9px;
  border-radius: 999px;
  color: #176f43;
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(36, 157, 92, .14);
  font-size: 10px;
  font-weight: 900;
}
.practice-detail-card__memory {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px dashed rgba(36, 157, 92, .18);
  color: #557061;
  font-size: 11px;
  line-height: 1.55;
}
@keyframes practice-detail-enter {
  from { opacity: 0; transform: translateY(8px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 560px) {
  .practice-answer {
    justify-content: flex-start;
  }
  .practice-answer-part {
    min-width: 19px;
    padding: 4px;
    font-size: 14px;
  }
  .practice-detail-card {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 13px;
  }
  .practice-detail-card__hanzi {
    min-height: 72px;
    border-radius: 16px;
    font-size: 38px;
  }
}

/* Inline reveal hint replaces old answer block */
.practice-reveal-inline {
  display: grid;
  gap: 8px;
  margin: -2px 0 2px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 248, 224, .82);
  border: 1px dashed rgba(190, 135, 22, .22);
}
.practice-reveal-inline[hidden] {
  display: none !important;
}
.practice-reveal-title {
  color: #9a6a14;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.practice-reveal-parts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.practice-answer-part,
.practice-answer-gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 900;
}
.practice-answer-part.is-revealed {
  color: #8a5a05;
  background: linear-gradient(145deg, #fff4c5, #ffd96d);
  border: 1px solid rgba(198, 130, 5, .14);
}
.practice-answer-part.is-hidden {
  color: #c8a85d;
  background: rgba(255,255,255,.72);
  border: 1px dashed rgba(190, 135, 22, .16);
}
.practice-answer-gap {
  min-width: 10px;
  padding: 0 2px;
  color: #ae9361;
  background: transparent;
  border: 0;
}

/* Practice screen optimization: make all key details visible sooner */
@media (min-width: 1180px) {
  .list-page .page-heading.surface-heading {
    padding: 20px 30px;
    margin-bottom: 18px;
  }
  .list-page .page-heading.surface-heading h1 {
    margin: 4px 0 6px;
    font-size: clamp(34px, 3.2vw, 56px);
    line-height: 1.02;
  }
  .list-page .page-heading.surface-heading p {
    font-size: 13px;
  }

  .practice-panel {
    gap: 12px;
    padding: 14px;
    border-radius: 24px;
  }
  .practice-panel__header {
    align-items: center;
    gap: 12px;
  }
  .practice-panel__header h2 {
    margin: 3px 0 4px;
    font-size: clamp(28px, 2.3vw, 40px);
    line-height: 1.04;
  }
  .practice-panel__header p {
    font-size: 12px;
  }
  .practice-counter {
    padding: 8px 11px;
  }

  .practice-card {
    grid-template-columns: minmax(0, 1.28fr) minmax(300px, .86fr);
    grid-template-areas:
      "top top"
      "prompt reveal"
      "hint detail"
      "input detail"
      "feedback detail"
      "actions detail";
    gap: 12px 14px;
    padding: 14px;
  }
  .practice-card__top {
    grid-area: top;
  }
  .practice-prompt {
    grid-area: prompt;
    min-height: 104px;
    padding: 14px;
    font-size: clamp(26px, 5.2vw, 66px);
  }
  .practice-hint {
    grid-area: hint;
    margin: -1px 0 0;
  }
  .practice-input-wrap {
    grid-area: input;
    gap: 6px;
  }
  .practice-input {
    min-height: 52px;
    font-size: 18px;
  }
  .practice-feedback {
    grid-area: feedback;
    min-height: 20px;
    font-size: 12px;
  }
  .practice-reveal-inline {
    grid-area: reveal;
    margin: 0;
    align-self: start;
    min-height: 56px;
    padding: 10px 12px;
  }
  .practice-detail-card {
    grid-area: detail;
    align-self: start;
    margin: 0;
    padding: 14px;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
  }
  .practice-detail-card__hanzi {
    min-height: 76px;
    font-size: clamp(32px, 3.1vw, 48px);
  }
  .practice-detail-card__pinyin {
    margin: 4px 0 2px;
    font-size: 17px;
  }
  .practice-detail-card__meaning {
    font-size: 13px;
    line-height: 1.42;
  }
  .practice-detail-card__tags {
    gap: 6px;
    margin-top: 8px;
  }
  .practice-detail-card__tags span {
    padding: 5px 8px;
    font-size: 9px;
  }
  .practice-detail-card__memory {
    margin-top: 8px;
    padding-top: 8px;
    font-size: 10px;
    line-height: 1.48;
  }
  .practice-actions-row {
    grid-area: actions;
    align-items: flex-start;
    gap: 8px;
  }
  .practice-audio-actions,
  .practice-nav-actions {
    gap: 8px;
  }
  .practice-button,
  .save-word-button,
  .vocabulary-audio-button,
  .study-action-button {
    min-height: 40px;
    padding: 0 12px;
    font-size: 12px;
  }
  .practice-button .ui-icon,
  .save-word-button .ui-icon,
  .vocabulary-audio-button .ui-icon,
  .study-action-button .ui-icon {
    width: 16px;
    height: 16px;
  }
  .practice-answer-part,
  .practice-answer-gap {
    min-width: 24px;
    min-height: 24px;
    padding: 0 7px;
    font-size: 16px;
  }
}

@media (min-width: 1180px) and (max-width: 1420px) {
  .practice-card {
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
  }
  .practice-audio-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    flex: 1 1 100%;
  }
  .practice-nav-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* v8.4: floating vocab detail over the Hanzi panel + cleaner horizontal actions */
@media (min-width: 1180px) {
  .practice-card {
    grid-template-columns: minmax(0, 1fr) 310px;
    grid-template-areas:
      "top top"
      "prompt reveal"
      "hint reveal"
      "input reveal"
      "feedback reveal"
      "actions actions";
    gap: 10px 16px;
    position: relative;
  }

  .practice-prompt {
    grid-area: prompt;
    min-height: 220px;
    padding: 18px 320px 18px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .practice-detail-card {
    grid-area: prompt;
    justify-self: end;
    align-self: end;
    width: min(360px, 44%);
    margin: 0 12px 12px 0;
    z-index: 3;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
    border-radius: 24px;
    box-shadow: 0 16px 30px rgba(25, 126, 72, .12), inset 0 1px 0 rgba(255,255,255,.96);
  }

  .practice-detail-card__hanzi {
    min-height: 86px;
    font-size: clamp(38px, 3.6vw, 56px);
  }

  .practice-detail-card__pinyin {
    font-size: 18px;
  }

  .practice-detail-card__meaning {
    font-size: 13px;
  }

  .practice-reveal-inline {
    min-height: 84px;
    align-content: start;
  }

  .practice-actions-row--study {
    grid-area: actions;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
  }

  .practice-actions-row--study .practice-audio-actions,
  .practice-actions-row--study .practice-nav-actions,
  .practice-actions-row--study #practiceSaveSlot {
    display: contents;
  }

  .practice-actions-row--study .practice-button,
  .practice-actions-row--study .save-word-button {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 0 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  .practice-actions-row--study .practice-button .ui-icon,
  .practice-actions-row--study .save-word-button .ui-icon {
    width: 15px;
    height: 15px;
  }
}

@media (min-width: 1180px) and (max-width: 1360px) {
  .practice-card {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .practice-prompt {
    padding-right: 300px;
  }

  .practice-detail-card {
    width: min(320px, 46%);
    margin-right: 8px;
  }

  .practice-actions-row--study {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* v8.5: popup detail card overlays the Hanzi panel, with cat icon and nicer shadow */
.practice-card {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "top"
    "prompt"
    "reveal"
    "hint"
    "input"
    "feedback"
    "actions";
  gap: 12px;
}
.practice-card__top { grid-area: top; }
.practice-prompt {
  grid-area: prompt;
  min-height: 220px;
  padding: 18px;
}
.practice-reveal-inline { grid-area: reveal; }
.practice-hint { grid-area: hint; }
.practice-input-wrap { grid-area: input; }
.practice-feedback { grid-area: feedback; }
.practice-actions-row--study { grid-area: actions; }

.practice-detail-card {
  grid-area: prompt;
  justify-self: end;
  align-self: end;
  width: min(84%, 340px);
  margin: 0 12px 12px 0;
  position: relative;
  z-index: 4;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  padding: 16px 16px 14px;
  border-radius: 24px;
  background: linear-gradient(150deg, rgba(240,255,246,.97), rgba(220,246,232,.96));
  border: 1px solid rgba(67, 188, 128, .22);
  box-shadow:
    0 24px 45px rgba(28, 118, 76, .18),
    0 8px 18px rgba(21, 95, 60, .10),
    inset 0 1px 0 rgba(255,255,255,.95);
}
.practice-detail-card::before {
  content: '';
  position: absolute;
  top: -14px;
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(255,245,184,.95), rgba(255,203,74,.95)),
    url('assets/favicon.png') center/74% no-repeat;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 74%;
  border: 2px solid rgba(255,255,255,.88);
  box-shadow: 0 12px 20px rgba(148, 98, 0, .22), inset 0 1px 0 rgba(255,255,255,.8);
}
.practice-detail-card__hanzi {
  min-height: 84px;
  border-radius: 20px;
  box-shadow: inset 0 1px 0 #fff, 0 8px 16px rgba(24, 122, 69, .07);
}
.practice-detail-card__content .eyebrow {
  display: block;
  padding-right: 36px;
}

.practice-actions-row--study {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}
.practice-actions-row--study .practice-audio-actions,
.practice-actions-row--study .practice-nav-actions,
.practice-actions-row--study #practiceSaveSlot {
  display: contents;
}
.practice-actions-row--study .practice-button,
.practice-actions-row--study .save-word-button {
  flex: 0 0 auto;
  min-width: 110px;
}
.practice-actions-row--study .practice-button--primary {
  min-width: 98px;
}

@media (min-width: 1180px) {
  .practice-prompt {
    min-height: 240px;
    padding: 22px;
  }
  .practice-detail-card {
    width: min(360px, 42%);
    margin: 0 16px 16px 0;
  }
}

@media (max-width: 720px) {
  .practice-prompt {
    min-height: 180px;
    padding: 16px;
  }
  .practice-detail-card {
    width: min(88%, 300px);
    margin: 0 10px 10px 0;
    grid-template-columns: 66px minmax(0, 1fr);
    gap: 10px;
    padding: 14px 14px 12px;
  }
  .practice-detail-card::before {
    width: 36px;
    height: 36px;
    top: -12px;
    right: 12px;
  }
  .practice-detail-card__hanzi {
    min-height: 66px;
    font-size: 34px;
  }
  .practice-detail-card__pinyin {
    font-size: 16px;
  }
  .practice-detail-card__meaning {
    font-size: 12px;
    line-height: 1.38;
  }
  .practice-detail-card__memory {
    font-size: 10px;
  }
}

/* v8.6: manual PC / Mobile interface switch */
.interface-mode-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(255,248,222,.94));
  border: 1px solid rgba(151,92,8,.1);
  box-shadow: 0 14px 28px rgba(98,57,0,.09), inset 0 1px 0 #fff;
}
.interface-mode-card__heading {
  display: flex;
  align-items: center;
  gap: 13px;
}
.interface-mode-card__icon {
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: #8f5600;
  background: linear-gradient(145deg, #fff2b5, #ffd04a);
  box-shadow: 0 7px 0 #dfa027, 0 12px 18px rgba(115,68,0,.12), inset 0 1px 0 #fff;
}
.interface-mode-card__icon .ui-icon {
  width: 25px;
  height: 25px;
}
.interface-mode-card__heading h2 {
  margin: 5px 0 4px;
  font-size: 20px;
  letter-spacing: -.035em;
}
.interface-mode-card__heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.interface-mode-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
  margin-top: 16px;
}
.interface-mode-option {
  position: relative;
  min-width: 0;
  min-height: 92px;
  display: grid;
  grid-template-columns: 48px minmax(0,1fr) 24px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 19px;
  border: 1px solid rgba(151,92,8,.12);
  background: rgba(255,255,255,.78);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 9px 18px rgba(98,57,0,.06), inset 0 1px 0 #fff;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.interface-mode-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(98,57,0,.10), inset 0 1px 0 #fff;
}
.interface-mode-option.is-active {
  border-color: rgba(226,151,13,.32);
  background: linear-gradient(145deg, #fff6ca, #ffe174);
  box-shadow: 0 10px 0 rgba(210,143,22,.28), 0 18px 28px rgba(115,68,0,.13), inset 0 1px 0 #fff;
}
.interface-mode-option__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #895100;
  background: linear-gradient(145deg, #fff, #fff0b5);
  border: 1px solid rgba(173,105,4,.1);
  box-shadow: inset 0 1px 0 #fff;
}
.interface-mode-option__icon .ui-icon {
  width: 24px;
  height: 24px;
}
.interface-mode-option b,
.interface-mode-option small {
  display: block;
}
.interface-mode-option b {
  font-size: 14px;
}
.interface-mode-option small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}
.interface-mode-option__check {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: transparent;
  background: rgba(255,255,255,.48);
  border: 1px solid rgba(151,92,8,.1);
  font-style: normal;
  font-size: 13px;
  font-weight: 950;
}
.interface-mode-option.is-active .interface-mode-option__check {
  color: #fff;
  background: linear-gradient(145deg, #42c983, #24ae68);
  border-color: rgba(17,132,74,.18);
  box-shadow: 0 5px 10px rgba(31,164,94,.18), inset 0 1px 0 rgba(255,255,255,.36);
}
.interface-mode-status {
  min-height: 18px;
  margin: 12px 2px 0;
  color: #8a5a06;
  font-size: 11px;
  font-weight: 850;
}

/* Force a compact mobile layout even when opened on a wide desktop screen. */
html[data-interface-mode="mobile"] body {
  background: linear-gradient(180deg, #eee8dc, #e6dfd2);
}
html[data-interface-mode="mobile"] .ambient {
  display: none;
}
html[data-interface-mode="mobile"] .app-shell {
  display: block !important;
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  background:
    radial-gradient(circle at 88% 4%, rgba(255,205,61,.18), transparent 22rem),
    linear-gradient(180deg, #fffef9 0%, #fff9e7 52%, #fffdf5 100%);
  box-shadow: 0 0 0 1px rgba(82,54,15,.08), 0 30px 80px rgba(47,33,16,.16);
}
html[data-interface-mode="mobile"] .app-main {
  width: 100%;
  min-width: 0;
  max-width: 520px;
  margin: 0 auto;
}
html[data-interface-mode="mobile"] .desktop-sidebar {
  display: none !important;
}
html[data-interface-mode="mobile"] .mobile-brand.mobile-only {
  display: inline-flex !important;
}
html[data-interface-mode="mobile"] #bottomNav.mobile-only {
  left: 50%;
  right: auto;
  width: min(100%, 520px);
  display: grid !important;
  transform: translateX(-50%);
}
html[data-interface-mode="mobile"] .topbar {
  min-height: 68px;
  justify-content: space-between;
  padding: 10px 14px;
}
html[data-interface-mode="mobile"] main {
  padding-bottom: calc(92px + var(--safe-bottom));
}
html[data-interface-mode="mobile"] .page {
  width: 100%;
  padding: 18px 14px 38px;
}
html[data-interface-mode="mobile"] .feature-grid {
  grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  gap: 10px !important;
}
html[data-interface-mode="mobile"] .content-list,
html[data-interface-mode="mobile"] .vocabulary-grid {
  grid-template-columns: 1fr !important;
}
html[data-interface-mode="mobile"] .progress-dashboard {
  grid-template-columns: repeat(2, minmax(0,1fr)) !important;
}
html[data-interface-mode="mobile"] .stat-card--wide {
  grid-column: 1 / -1 !important;
}
html[data-interface-mode="mobile"] .practice-panel,
html[data-interface-mode="mobile"] .practice-card {
  padding: 14px !important;
}
html[data-interface-mode="mobile"] .practice-card {
  grid-template-columns: minmax(0,1fr) !important;
  grid-template-areas:
    "top"
    "prompt"
    "reveal"
    "hint"
    "input"
    "feedback"
    "actions" !important;
}
html[data-interface-mode="mobile"] .practice-prompt {
  min-height: 180px !important;
  padding: 16px !important;
  font-size: clamp(34px, 13vw, 58px) !important;
}
html[data-interface-mode="mobile"] .practice-detail-card {
  width: min(88%, 300px) !important;
  margin: 0 10px 10px 0 !important;
}
html[data-interface-mode="mobile"] .practice-actions-row--study {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  gap: 9px !important;
}
html[data-interface-mode="mobile"] .practice-actions-row--study .practice-button,
html[data-interface-mode="mobile"] .practice-actions-row--study .save-word-button {
  flex: 0 0 auto !important;
  min-width: 108px;
}
html[data-interface-mode="mobile"] .interface-mode-options {
  grid-template-columns: 1fr;
}

/* Explicit desktop mode. On narrow screens it safely falls back to the normal mobile CSS. */
@media (min-width: 1024px) {
  html[data-interface-mode="pc"] .app-shell {
    display: grid !important;
    grid-template-columns: 270px minmax(0,1fr) !important;
    width: 100%;
    max-width: none;
    margin: 0;
    box-shadow: none;
  }
  html[data-interface-mode="pc"] .desktop-sidebar {
    display: flex !important;
  }
  html[data-interface-mode="pc"] .mobile-only {
    display: none !important;
  }
  html[data-interface-mode="pc"] main {
    padding-bottom: 0;
  }
}

@media (max-width: 620px) {
  .interface-mode-options {
    grid-template-columns: 1fr;
  }
  .interface-mode-card__heading {
    align-items: flex-start;
  }
}

/* v8.7: fix broken mobile action bar, show every button without horizontal scrolling */
@media (max-width: 720px) {
  .practice-actions-row--study {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    width: 100%;
    overflow: visible !important;
    padding-bottom: 0 !important;
  }

  .practice-actions-row--study .practice-audio-actions {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
  }

  .practice-actions-row--study .practice-nav-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    width: 100%;
  }

  .practice-actions-row--study #practiceSaveSlot {
    display: contents !important;
  }

  .practice-actions-row--study .practice-button,
  .practice-actions-row--study .save-word-button {
    min-width: 0 !important;
    width: 100% !important;
    min-height: 54px;
    padding: 6px 4px !important;
    flex: none !important;
    flex-direction: column;
    gap: 4px;
    border-radius: 14px;
    font-size: 9px !important;
    line-height: 1.12;
    white-space: normal !important;
    text-align: center;
  }

  .practice-actions-row--study .practice-nav-actions .practice-button {
    min-height: 46px;
    flex-direction: row;
    gap: 7px;
    font-size: 12px !important;
  }

  .practice-actions-row--study .practice-button .ui-icon,
  .practice-actions-row--study .save-word-button .ui-icon {
    width: 17px !important;
    height: 17px !important;
    flex: 0 0 auto;
  }
}

html[data-interface-mode="mobile"] .practice-actions-row--study {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 10px !important;
  width: 100%;
  overflow: visible !important;
  padding-bottom: 0 !important;
}

html[data-interface-mode="mobile"] .practice-actions-row--study .practice-audio-actions {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
}

html[data-interface-mode="mobile"] .practice-actions-row--study .practice-nav-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  width: 100%;
}

html[data-interface-mode="mobile"] .practice-actions-row--study #practiceSaveSlot {
  display: contents !important;
}

html[data-interface-mode="mobile"] .practice-actions-row--study .practice-button,
html[data-interface-mode="mobile"] .practice-actions-row--study .save-word-button {
  min-width: 0 !important;
  width: 100% !important;
  min-height: 54px;
  padding: 6px 4px !important;
  flex: none !important;
  flex-direction: column;
  gap: 4px;
  border-radius: 14px;
  font-size: 9px !important;
  line-height: 1.12;
  white-space: normal !important;
  text-align: center;
}

html[data-interface-mode="mobile"] .practice-actions-row--study .practice-nav-actions .practice-button {
  min-height: 46px;
  flex-direction: row;
  gap: 7px;
  font-size: 12px !important;
}

html[data-interface-mode="mobile"] .practice-actions-row--study .practice-button .ui-icon,
html[data-interface-mode="mobile"] .practice-actions-row--study .save-word-button .ui-icon {
  width: 17px !important;
  height: 17px !important;
  flex: 0 0 auto;
}

@media (max-width: 390px) {
  .practice-actions-row--study .practice-audio-actions,
  html[data-interface-mode="mobile"] .practice-actions-row--study .practice-audio-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* v8.8: remove duplicate topic heading and make action bar always show all buttons */
.page-heading[hidden] {
  display: none !important;
}
.practice-panel__header h2 {
  display: none !important;
}
.practice-panel__header {
  align-items: center;
}
.practice-panel__header > div:first-child {
  min-width: 0;
}
.practice-panel__header p {
  margin-top: 4px;
}

.practice-actions-row--study,
html[data-interface-mode="mobile"] .practice-actions-row--study {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 10px !important;
  width: 100%;
  overflow: visible !important;
  padding-bottom: 0 !important;
}

.practice-actions-row--study .practice-audio-actions,
html[data-interface-mode="mobile"] .practice-actions-row--study .practice-audio-actions {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.practice-actions-row--study .practice-nav-actions,
html[data-interface-mode="mobile"] .practice-actions-row--study .practice-nav-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.practice-actions-row--study #practiceSaveSlot,
html[data-interface-mode="mobile"] .practice-actions-row--study #practiceSaveSlot {
  display: block !important;
}

.practice-actions-row--study .practice-button,
.practice-actions-row--study .save-word-button,
html[data-interface-mode="mobile"] .practice-actions-row--study .practice-button,
html[data-interface-mode="mobile"] .practice-actions-row--study .save-word-button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 46px;
  padding: 0 10px !important;
  flex: none !important;
  white-space: nowrap !important;
  font-size: 12px !important;
  border-radius: 15px;
}

.practice-actions-row--study .practice-button,
.practice-actions-row--study .save-word-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.practice-actions-row--study .practice-nav-actions .practice-button,
html[data-interface-mode="mobile"] .practice-actions-row--study .practice-nav-actions .practice-button {
  min-height: 48px;
}

.practice-actions-row--study .practice-button .ui-icon,
.practice-actions-row--study .save-word-button .ui-icon,
html[data-interface-mode="mobile"] .practice-actions-row--study .practice-button .ui-icon,
html[data-interface-mode="mobile"] .practice-actions-row--study .save-word-button .ui-icon {
  width: 16px !important;
  height: 16px !important;
}

@media (max-width: 1100px) {
  .practice-actions-row--study .practice-audio-actions,
  html[data-interface-mode="mobile"] .practice-actions-row--study .practice-audio-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .practice-actions-row--study .practice-audio-actions,
  html[data-interface-mode="mobile"] .practice-actions-row--study .practice-audio-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .practice-actions-row--study .practice-button,
  .practice-actions-row--study .save-word-button,
  html[data-interface-mode="mobile"] .practice-actions-row--study .practice-button,
  html[data-interface-mode="mobile"] .practice-actions-row--study .save-word-button {
    min-height: 44px;
    font-size: 11px !important;
    white-space: normal !important;
  }
}

/* When user forces mobile interface on desktop, keep action buttons in a compact multi-row grid */
html[data-interface-mode="mobile"] .practice-actions-row--study .practice-audio-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

@media (max-width: 390px) {
  html[data-interface-mode="mobile"] .practice-actions-row--study .practice-audio-actions,
  .practice-actions-row--study .practice-audio-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* v9.0: replace top chips with topic label beside "Luyện gõ pinyin" */
.practice-panel__header {
  justify-content: flex-start;
}
.practice-panel__header .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.practice-card__top--align-right {
  justify-content: flex-end;
}
.practice-card__top--align-right .practice-switcher {
  margin-left: auto;
}

@media (max-width: 720px) {
  .practice-panel__header {
    align-items: flex-start;
  }
  .practice-panel__header .eyebrow {
    line-height: 1.35;
  }
}

/* v9.3: keep action buttons on one row on larger screens */
@media (min-width: 1100px) {
  .practice-actions-row--study,
  html[data-interface-mode="mobile"] .practice-actions-row--study,
  html[data-interface-mode="pc"] .practice-actions-row--study {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100%;
    overflow: hidden !important;
    padding-bottom: 0 !important;
  }

  .practice-actions-row--study .practice-audio-actions,
  .practice-actions-row--study .practice-nav-actions,
  .practice-actions-row--study #practiceSaveSlot,
  html[data-interface-mode="mobile"] .practice-actions-row--study .practice-audio-actions,
  html[data-interface-mode="mobile"] .practice-actions-row--study .practice-nav-actions,
  html[data-interface-mode="mobile"] .practice-actions-row--study #practiceSaveSlot,
  html[data-interface-mode="pc"] .practice-actions-row--study .practice-audio-actions,
  html[data-interface-mode="pc"] .practice-actions-row--study .practice-nav-actions,
  html[data-interface-mode="pc"] .practice-actions-row--study #practiceSaveSlot {
    display: contents !important;
  }

  .practice-actions-row--study .practice-button,
  .practice-actions-row--study .save-word-button,
  html[data-interface-mode="mobile"] .practice-actions-row--study .practice-button,
  html[data-interface-mode="mobile"] .practice-actions-row--study .save-word-button,
  html[data-interface-mode="pc"] .practice-actions-row--study .practice-button,
  html[data-interface-mode="pc"] .practice-actions-row--study .save-word-button {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: auto !important;
    min-height: 48px !important;
    padding: 0 10px !important;
    white-space: nowrap !important;
    font-size: 12px !important;
    border-radius: 15px;
  }

  .practice-actions-row--study .practice-button .ui-icon,
  .practice-actions-row--study .save-word-button .ui-icon,
  html[data-interface-mode="mobile"] .practice-actions-row--study .practice-button .ui-icon,
  html[data-interface-mode="mobile"] .practice-actions-row--study .save-word-button .ui-icon,
  html[data-interface-mode="pc"] .practice-actions-row--study .practice-button .ui-icon,
  html[data-interface-mode="pc"] .practice-actions-row--study .save-word-button .ui-icon {
    width: 16px !important;
    height: 16px !important;
  }
}

/* v9.5: HSK nâng cao - kho câu theo cấp độ */
.sentence-browser {
  display: grid;
  gap: 14px;
}
.sentence-toolbar {
  position: sticky;
  top: 78px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(155, 94, 5, .12);
  border-radius: 20px;
  background: rgba(255, 253, 246, .9);
  box-shadow: 0 12px 28px rgba(103, 60, 2, .09), inset 0 1px 0 #fff;
  backdrop-filter: blur(16px);
}
.sentence-search {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 13px;
  border-radius: 14px;
  background: #fffaf0;
  border: 1px solid rgba(151, 91, 4, .1);
  color: #a06608;
  box-shadow: inset 0 2px 5px rgba(95, 54, 0, .045);
}
.sentence-search .ui-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}
.sentence-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 750;
}
.sentence-search input::placeholder {
  color: #a69272;
  font-weight: 650;
}
.sentence-count {
  flex: 0 0 auto;
  padding: 9px 11px;
  border-radius: 999px;
  color: #176f43;
  background: linear-gradient(145deg, #ecfff4, #bfeecd);
  border: 1px solid rgba(36, 157, 92, .15);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82);
  font-size: 10px;
  font-weight: 950;
  white-space: nowrap;
}
.sentence-grid {
  display: grid;
  gap: 12px;
}
.sentence-card {
  min-width: 0;
  padding: 17px;
  border-radius: 23px;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(239,255,246,.92));
  border: 1px solid rgba(36, 157, 92, .12);
  box-shadow: 0 13px 25px rgba(31, 113, 70, .08), inset 0 1px 0 #fff;
}
.sentence-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sentence-number,
.sentence-level {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 950;
}
.sentence-number {
  color: #8a5a05;
  background: #fff2bd;
  border: 1px solid rgba(182, 111, 0, .1);
}
.sentence-level {
  color: #176f43;
  background: #e8faef;
  border: 1px solid rgba(36, 157, 92, .12);
}
.sentence-card h3 {
  margin: 13px 0 0;
  color: #302215;
  font-size: clamp(23px, 4vw, 32px);
  line-height: 1.25;
  letter-spacing: -.025em;
}
.sentence-pinyin {
  margin: 8px 0 0;
  color: #b26108;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.55;
}
.sentence-meaning {
  margin: 8px 0 0;
  color: #443526;
  font-size: 13px;
  font-weight: 780;
  line-height: 1.55;
}
.sentence-structure {
  margin-top: 12px;
  padding: 10px 11px;
  border-radius: 14px;
  color: #356148;
  background: rgba(231, 249, 238, .82);
  border: 1px solid rgba(36, 157, 92, .1);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.5;
}
.sentence-practice {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.sentence-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 13px;
}
.sentence-audio-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(36, 157, 92, .12);
  background: rgba(255,255,255,.86);
  color: #245d3d;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: inset 0 1px 0 #fff;
}
.sentence-audio-button .ui-icon {
  width: 17px;
  height: 17px;
}
.sentence-empty {
  padding: 34px 20px;
  border-radius: 23px;
  background: rgba(255,255,255,.72);
  border: 1px dashed rgba(36, 157, 92, .2);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

@media (min-width: 760px) {
  .sentence-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .sentence-card {
    padding: 19px;
  }
}

@media (min-width: 1280px) {
  .sentence-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .sentence-toolbar {
    top: 68px;
    align-items: stretch;
    flex-direction: column;
  }
  .sentence-count {
    align-self: flex-start;
  }
}

/* v9.6: pinyin typing practice for HSK advanced sentences */
.sentence-practice-panel .practice-prompt {
  min-height: 180px;
  font-size: clamp(24px, 4vw, 46px);
  line-height: 1.35;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}

.sentence-practice-panel .practice-reveal-parts {
  line-height: 1.9;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .sentence-practice-panel .practice-prompt {
    min-height: 150px;
    font-size: clamp(22px, 7vw, 34px);
    line-height: 1.4;
  }
}

/* v9.7: saved sentence action joins the sentence controls */
.sentence-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.sentence-actions .save-word-button {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 10px;
  font-size: 11px;
}

/* v9.9: radicals library */
.radical-browser {
  display: grid;
  gap: 22px;
}

.radical-overview-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.radical-stat-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(255,245,222,.92));
  border: 1px solid rgba(163, 101, 13, .1);
  box-shadow: 0 16px 30px rgba(126, 75, 4, .08), inset 0 1px 0 rgba(255,255,255,.96);
}
.radical-stat-card__icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #8a5200;
  background: linear-gradient(145deg, #fff4c4, #ffd96e);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.radical-stat-card__icon .ui-icon {
  width: 24px;
  height: 24px;
}
.radical-stat-card small {
  display: block;
  color: #9d7c4f;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.radical-stat-card strong {
  display: block;
  margin-top: 4px;
  color: #5e3508;
  font-size: 28px;
  font-weight: 950;
}
.radical-stat-card p {
  margin: 6px 0 0;
  color: #866748;
  font-size: 13px;
  line-height: 1.5;
}

.radical-gallery-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255,255,255,.95), rgba(255,248,231,.94));
  border: 1px solid rgba(163, 101, 13, .1);
  box-shadow: 0 16px 30px rgba(126, 75, 4, .06), inset 0 1px 0 rgba(255,255,255,.96);
}
.radical-gallery-panel__head h2 {
  margin: 6px 0 6px;
  color: #5e3508;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -.04em;
}
.radical-gallery-panel__head p {
  margin: 0;
  color: #866748;
  font-size: 13px;
}
.radical-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.radical-gallery-card {
  margin: 0;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(163, 101, 13, .1);
  box-shadow: 0 14px 26px rgba(108, 66, 4, .08);
}
.radical-gallery-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1055 / 1491;
  object-fit: cover;
  background: #fff9eb;
}
.radical-gallery-card figcaption {
  display: grid;
  gap: 4px;
  padding: 12px 14px 14px;
}
.radical-gallery-card figcaption b {
  color: #663b0a;
  font-size: 14px;
}
.radical-gallery-card figcaption span {
  color: #8b6b45;
  font-size: 12px;
  line-height: 1.5;
}

.radical-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  align-items: center;
}
.radical-search,
.radical-filter {
  display: grid;
  gap: 7px;
}
.radical-search {
  position: relative;
}
.radical-search > span {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #9d7c4f;
}
.radical-search .ui-icon {
  width: 18px;
  height: 18px;
}
.radical-search input,
.radical-filter select {
  width: 100%;
  min-height: 52px;
  border-radius: 18px;
  border: 1px solid rgba(163, 101, 13, .14);
  background: rgba(255,255,255,.95);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
  color: #5b3d17;
  font: inherit;
}
.radical-search input {
  padding: 0 16px 0 44px;
}
.radical-filter span {
  color: #8a6a46;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.radical-filter select {
  padding: 0 16px;
}
.radical-results-meta {
  display: flex;
  justify-content: flex-end;
}
.radical-results-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: #7b4d0c;
  background: linear-gradient(145deg, #fff1b4, #ffd768);
  border: 1px solid rgba(182, 117, 17, .14);
  font-size: 12px;
  font-weight: 950;
}

.radical-groups {
  display: grid;
  gap: 18px;
}
.radical-group-section {
  display: grid;
  gap: 14px;
}
.radical-group-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.radical-group-section__head h3 {
  margin: 0;
  color: #5c3408;
  font-size: 22px;
  letter-spacing: -.03em;
}
.radical-group-section__head span {
  color: #8a6a46;
  font-size: 12px;
  font-weight: 900;
}
.radical-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.radical-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(255,248,233,.95));
  border: 1px solid rgba(163, 101, 13, .1);
  box-shadow: 0 14px 26px rgba(108, 66, 4, .06), inset 0 1px 0 rgba(255,255,255,.95);
}
.radical-card__top,
.radical-card__variants {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.radical-card__index,
.radical-card__strokes {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}
.radical-card__index {
  color: #8f5a09;
  background: rgba(255, 239, 182, .88);
}
.radical-card__strokes {
  color: #5b7b1b;
  background: rgba(228, 247, 202, .95);
}
.radical-card__main {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}
.radical-card__symbol {
  min-height: 84px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: #693d0b;
  background: linear-gradient(145deg, #fff6cf, #ffe18a);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.92);
  font-size: 42px;
  font-weight: 950;
}
.radical-card__copy h4 {
  margin: 0 0 4px;
  color: #5e3508;
  font-size: 20px;
  letter-spacing: -.03em;
}
.radical-card__pinyin {
  margin: 0;
  color: #cf6c1d;
  font-size: 14px;
  font-weight: 900;
}
.radical-card__meaning {
  margin: 6px 0 0;
  color: #6c5639;
  font-size: 13px;
  line-height: 1.5;
}
.radical-card__variants span {
  color: #90714a;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.radical-card__variants div {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.radical-card__variants b {
  min-width: 30px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 10px;
  color: #6a3c0a;
  background: rgba(255,255,255,.95);
  border: 1px solid rgba(163, 101, 13, .1);
  font-size: 18px;
}
.radical-card__note {
  margin: 0;
  color: #846643;
  font-size: 13px;
  line-height: 1.58;
}
.radical-empty {
  padding: 22px;
  border-radius: 22px;
  background: rgba(255,255,255,.86);
  border: 1px dashed rgba(163, 101, 13, .18);
  color: #7c6241;
  text-align: center;
  font-weight: 800;
}

@media (max-width: 1100px) {
  .radical-overview-panel,
  .radical-gallery-grid,
  .radical-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .radical-browser {
    gap: 18px;
  }
  .radical-overview-panel,
  .radical-gallery-grid,
  .radical-card-grid,
  .radical-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }
  .radical-stat-card,
  .radical-gallery-panel,
  .radical-card {
    padding: 14px;
    border-radius: 20px;
  }
  .radical-card__main {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
  }
  .radical-card__symbol {
    min-height: 72px;
    font-size: 34px;
    border-radius: 18px;
  }
  .radical-card__copy h4 {
    font-size: 18px;
  }
  .radical-group-section__head {
    align-items: flex-start;
    flex-direction: column;
  }
  .radical-results-meta {
    justify-content: flex-start;
  }
}

/* v10: completed Hanzi radical study tools */
.radical-card__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: auto;
}
.radical-card__actions .save-word-button,
.radical-card__actions .vocabulary-audio-button {
  width: 100%;
  min-width: 0;
}
.radical-card--compact .radical-card__main {
  margin-bottom: 2px;
}

.radical-learning-browser {
  display: grid;
  gap: 20px;
}

.radical-build-practice {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(255,246,222,.96));
  border: 1px solid rgba(160, 98, 14, .12);
  box-shadow: 0 18px 36px rgba(116, 70, 6, .08), inset 0 1px 0 rgba(255,255,255,.98);
}
.radical-build-stage {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(150deg, #fffdf6, #fff3c8);
  border: 1px solid rgba(184, 117, 16, .12);
  box-shadow: inset 0 1px 0 #fff, 0 14px 28px rgba(139, 84, 4, .08);
}
.radical-build-stage__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.radical-build-structure,
.radical-review-strokes {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: #657d24;
  background: rgba(231, 247, 199, .95);
  border: 1px solid rgba(100, 133, 33, .12);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.radical-build-equation {
  min-height: 116px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.radical-build-equation span,
.radical-build-equation b {
  min-width: 78px;
  min-height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 22px;
  font-size: 42px;
  font-weight: 950;
}
.radical-build-equation span {
  color: #6c3f0d;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(168, 101, 12, .12);
  box-shadow: 0 10px 20px rgba(123, 75, 5, .07), inset 0 1px 0 #fff;
}
.radical-build-equation b {
  color: #2f6f43;
  background: linear-gradient(145deg, #eaffdd, #c8f0ba);
  border: 1px solid rgba(61, 135, 80, .16);
  box-shadow: 0 12px 24px rgba(43, 119, 66, .1), inset 0 1px 0 rgba(255,255,255,.9);
}
.radical-build-equation i {
  color: #b67b22;
  font-style: normal;
  font-size: 24px;
  font-weight: 950;
}
.radical-build-result {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(160, 98, 14, .09);
}
.radical-build-result > strong {
  min-height: 106px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  color: #6a3d0b;
  background: linear-gradient(145deg, #fff3b6, #ffd65e);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
  font-size: 56px;
  font-weight: 950;
}
.radical-build-result p {
  margin: 0;
  color: #d16c1e;
  font-size: 18px;
  font-weight: 900;
}
.radical-build-result h3 {
  margin: 6px 0 10px;
  color: #5b350d;
  font-size: 22px;
  line-height: 1.3;
}
.radical-build-result span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: #5f7a1a;
  background: #edf7d8;
  font-size: 11px;
  font-weight: 950;
}
.radical-build-explanation {
  margin: 0;
  padding: 14px 16px;
  border-radius: 18px;
  color: #765536;
  background: rgba(255,255,255,.68);
  font-size: 14px;
  line-height: 1.6;
}
.radical-build-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.radical-build-actions .practice-button {
  width: 100%;
  min-width: 0;
}
.radical-build-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.radical-build-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 15px;
  border: 1px solid rgba(160, 98, 14, .1);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(255,247,228,.96));
  box-shadow: 0 13px 24px rgba(116, 70, 6, .06), inset 0 1px 0 #fff;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.radical-build-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 17px 28px rgba(116, 70, 6, .1), inset 0 1px 0 #fff;
}
.radical-build-card__structure {
  justify-self: start;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: #668023;
  background: #edf7da;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.radical-build-card__equation {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}
.radical-build-card__equation i,
.radical-build-card__equation strong {
  min-width: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-style: normal;
  font-size: 23px;
  font-weight: 950;
}
.radical-build-card__equation i {
  color: #70430e;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(160, 98, 14, .1);
}
.radical-build-card__equation strong {
  color: #2c7042;
  background: #dff4d5;
}
.radical-build-card__equation em {
  color: #b07925;
  font-style: normal;
  font-weight: 950;
}
.radical-build-card > p {
  margin: 0;
  color: #d16c1e;
  font-size: 13px;
  font-weight: 900;
}
.radical-build-card > h3 {
  margin: 0;
  color: #65431d;
  font-size: 15px;
  line-height: 1.45;
}

.hanzi-radical-groups {
  display: grid;
  gap: 18px;
}
.hanzi-radical-section {
  display: grid;
  gap: 15px;
  padding: 18px;
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(255,247,229,.95));
  border: 1px solid rgba(160, 98, 14, .1);
  box-shadow: 0 15px 28px rgba(116, 70, 6, .06), inset 0 1px 0 rgba(255,255,255,.96);
}
.hanzi-radical-section__head {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}
.hanzi-radical-section__symbol {
  min-height: 78px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: #6b3f0c;
  background: linear-gradient(145deg, #fff3b4, #ffd55f);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
  font-size: 42px;
  font-weight: 950;
}
.hanzi-radical-section__head h2 {
  margin: 4px 0;
  color: #d06c1c;
  font-size: 20px;
}
.hanzi-radical-section__head p {
  margin: 0;
  color: #806447;
  font-size: 13px;
}
.hanzi-radical-character-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.hanzi-radical-character-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(160, 98, 14, .09);
}
.hanzi-radical-character-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.hanzi-radical-character-card__top strong {
  color: #653b0b;
  font-size: 38px;
  line-height: 1;
}
.hanzi-radical-character-card__top span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: #617d20;
  background: #edf7d9;
  font-size: 10px;
  font-weight: 950;
}
.hanzi-radical-character-card__pinyin {
  margin: 0;
  color: #d16c1d;
  font-size: 14px;
  font-weight: 900;
}
.hanzi-radical-character-card h3 {
  margin: 0;
  min-height: 42px;
  color: #5d4428;
  font-size: 14px;
  line-height: 1.45;
}
.hanzi-radical-character-card__parts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.hanzi-radical-character-card__parts b {
  min-width: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 11px;
  color: #683d0c;
  background: #fff2c7;
  font-size: 19px;
}
.hanzi-radical-character-card__parts i {
  color: #b07821;
  font-style: normal;
  font-weight: 950;
}
.hanzi-radical-character-card__note {
  margin: 0;
  color: #82684a;
  font-size: 12px;
  line-height: 1.52;
}
.hanzi-radical-character-card .vocabulary-audio-button {
  width: 100%;
  margin-top: auto;
}

.radical-review-prompt {
  font-size: clamp(78px, 12vw, 150px);
}
.radical-review-detail .practice-detail-card__hanzi {
  font-size: 46px;
}

@media (max-width: 1100px) {
  .radical-build-grid,
  .hanzi-radical-character-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .radical-build-practice,
  .radical-build-stage,
  .hanzi-radical-section {
    padding: 14px;
    border-radius: 21px;
  }
  .radical-build-equation {
    min-height: 90px;
    gap: 8px;
  }
  .radical-build-equation span,
  .radical-build-equation b {
    min-width: 58px;
    min-height: 58px;
    border-radius: 17px;
    font-size: 31px;
  }
  .radical-build-equation i {
    font-size: 18px;
  }
  .radical-build-result {
    grid-template-columns: 76px minmax(0, 1fr);
    padding: 12px;
  }
  .radical-build-result > strong {
    min-height: 76px;
    border-radius: 19px;
    font-size: 40px;
  }
  .radical-build-result h3 {
    font-size: 17px;
  }
  .radical-build-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .radical-build-actions .practice-button {
    min-width: 0;
    padding: 0 7px;
    font-size: 11px;
  }
  .radical-build-grid,
  .hanzi-radical-character-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hanzi-radical-section__head {
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .hanzi-radical-section__symbol {
    min-height: 64px;
    border-radius: 18px;
    font-size: 34px;
  }
  .radical-card__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* v10.1: Bộ thủ refinements */
.radical-gallery-open {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.radical-gallery-open > span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: rgba(80, 46, 6, .76);
  border: 1px solid rgba(255,255,255,.38);
  box-shadow: 0 10px 20px rgba(48, 27, 2, .25);
  font-size: 20px;
  font-weight: 900;
  backdrop-filter: blur(8px);
}
.radical-gallery-open:hover img {
  transform: scale(1.015);
}
.radical-gallery-open img {
  transition: transform .2s ease;
}
.radical-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(24, 15, 5, .94);
  backdrop-filter: blur(12px);
}
.radical-image-lightbox[hidden] {
  display: none !important;
}
.radical-image-lightbox__content {
  width: min(100%, 1100px);
  height: min(100%, 96vh);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
  place-items: center;
}
.radical-image-lightbox__content img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 30px 70px rgba(0,0,0,.48);
}
.radical-image-lightbox__content p {
  margin: 0;
  color: rgba(255,255,255,.9);
  font-size: 14px;
  font-weight: 850;
  text-align: center;
}
.radical-image-lightbox__close {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 2;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  background: rgba(255,255,255,.14);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.radical-build-result__character {
  min-height: 118px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 10px 8px;
  border-radius: 24px;
  color: #6a3d0b;
  background: linear-gradient(145deg, #fff3b6, #ffd65e);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.radical-build-result__character strong {
  font-size: 56px;
  line-height: 1;
  font-weight: 950;
}
.radical-build-result__character small {
  color: #c45f16;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 950;
}
.radical-build-card__result {
  display: inline-grid;
  place-items: center;
  gap: 3px;
}
.radical-build-card__result small {
  color: #c65f18;
  font-size: 11px;
  line-height: 1.1;
  font-weight: 950;
}

.radical-review-categories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.radical-review-category {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(160, 98, 14, .12);
  color: #6a4318;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(255,247,228,.96));
  box-shadow: 0 12px 22px rgba(116,70,6,.06), inset 0 1px 0 #fff;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.radical-review-category:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(116,70,6,.1), inset 0 1px 0 #fff;
}
.radical-review-category.is-active {
  border-color: rgba(210, 132, 18, .42);
  background: linear-gradient(145deg, #fff4bd, #ffd96f);
  box-shadow: 0 16px 28px rgba(164, 100, 7, .15), inset 0 1px 0 rgba(255,255,255,.88);
}
.radical-review-category__icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #6d400c;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(160, 98, 14, .1);
  font-size: 27px;
  font-weight: 950;
}
.radical-review-category__copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.radical-review-category__copy b {
  color: #5f390e;
  font-size: 15px;
}
.radical-review-category__copy small {
  color: #876a48;
  font-size: 11px;
  line-height: 1.4;
}
.radical-review-category > strong {
  min-width: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 999px;
  color: #80500c;
  background: rgba(255,255,255,.72);
  font-size: 12px;
  font-weight: 950;
}

@media (max-width: 1000px) {
  .radical-review-categories {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .radical-image-lightbox {
    padding: 66px 10px 14px;
  }
  .radical-image-lightbox__content {
    height: 100%;
  }
  .radical-build-result__character {
    min-height: 84px;
    border-radius: 19px;
  }
  .radical-build-result__character strong {
    font-size: 40px;
  }
  .radical-build-result__character small {
    font-size: 12px;
  }
  .radical-review-category {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    padding: 12px;
    border-radius: 18px;
  }
  .radical-review-category__icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 24px;
  }
}

.radical-build-result {
  grid-template-columns: 118px minmax(0, 1fr);
}
@media (max-width: 720px) {
  .radical-build-result {
    grid-template-columns: 84px minmax(0, 1fr);
  }
}

/* v10.3: show Pinyin directly under the completed Hanzi in radical composition */
.radical-build-equation__answer {
  display: inline-grid !important;
  place-items: center;
  align-content: center;
  gap: 5px;
  min-width: 82px;
  padding: 10px 12px !important;
  border-radius: 20px;
  color: #2f6f43 !important;
  background: linear-gradient(145deg, #eaffdd, #c8f0ba) !important;
  border: 1px solid rgba(61, 135, 80, .16) !important;
  box-shadow: 0 12px 24px rgba(43, 119, 66, .1), inset 0 1px 0 rgba(255,255,255,.9) !important;
}
.radical-build-equation__answer b {
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  color: #2f6f43 !important;
  font-size: 38px;
  line-height: 1;
}
.radical-build-equation__answer small {
  display: block;
  color: #c35e17;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 950;
}

@media (max-width: 720px) {
  .radical-build-equation__answer {
    min-width: 70px;
    padding: 9px 10px !important;
  }
  .radical-build-equation__answer b {
    font-size: 32px;
  }
  .radical-build-equation__answer small {
    font-size: 12px;
  }
}

/* v10.4: HSK mastery gate and pronunciation scoring */
.content-card--locked,
.content-card:disabled {
  cursor: not-allowed;
  opacity: .62;
  filter: saturate(.55);
}
.content-card--locked .list-icon {
  background: linear-gradient(145deg, #f4efe6, #ded5c7);
  color: #8b806e;
}

.pronunciation-practice-browser {
  display: grid;
  gap: 18px;
}

.pronunciation-session-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 90% 8%, rgba(255,255,255,.95), transparent 30%),
    linear-gradient(145deg, rgba(239,248,255,.98), rgba(219,239,255,.95));
  border: 1px solid rgba(56, 139, 202, .15);
  box-shadow: 0 22px 42px rgba(35, 101, 150, .11), inset 0 1px 0 rgba(255,255,255,.96);
}

.pronunciation-session-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.pronunciation-session-head h2 {
  margin: 5px 0 6px;
  color: #194e76;
  font-size: clamp(24px, 3vw, 38px);
  letter-spacing: -.04em;
}
.pronunciation-session-head p {
  margin: 0;
  color: #57768f;
  font-size: 13px;
  line-height: 1.55;
}
.pronunciation-counter,
.pronunciation-level {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(145deg, #e5f5ff, #b9e0fa);
  border: 1px solid rgba(52, 137, 196, .14);
  color: #1b5e8c;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.pronunciation-stage {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 12px;
  min-height: 500px;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(56, 139, 202, .12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.98), 0 14px 28px rgba(37, 96, 137, .07);
  overflow: hidden;
}
.pronunciation-stage::before {
  content: '';
  position: absolute;
  width: 260px;
  height: 260px;
  left: -120px;
  top: -140px;
  border-radius: 50%;
  background: rgba(116, 202, 255, .12);
  pointer-events: none;
}
.pronunciation-level {
  justify-self: start;
  min-height: 32px;
  padding: 0 12px;
}
.pronunciation-hanzi {
  max-width: 940px;
  color: #173e5a;
  font-size: clamp(44px, 7vw, 82px);
  font-weight: 950;
  line-height: 1.25;
  letter-spacing: .03em;
  text-align: center;
  text-wrap: balance;
}
.pronunciation-pinyin {
  margin: 0;
  max-width: 880px;
  color: #1771ad;
  font-size: clamp(18px, 2.4vw, 28px);
  font-weight: 900;
  line-height: 1.45;
  text-align: center;
}
.pronunciation-meaning {
  margin: 0;
  max-width: 760px;
  color: #5d7180;
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
}
.pronunciation-wrong-part {
  color: #d92c2c;
  text-decoration: underline wavy rgba(217,44,44,.55);
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
}

.pronunciation-recognized {
  width: min(100%, 680px);
  display: grid;
  gap: 5px;
  padding: 12px 16px;
  border-radius: 18px;
  background: #f6fbff;
  border: 1px solid rgba(56, 139, 202, .12);
  text-align: center;
}
.pronunciation-recognized span {
  color: #7890a1;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.pronunciation-recognized b {
  color: #27536f;
  font-size: 16px;
  line-height: 1.45;
}

.pronunciation-score-panel {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 9px;
  border-radius: 999px;
  background: #fff2ef;
  border: 1px solid rgba(213, 64, 50, .15);
}
.pronunciation-score-panel[hidden] {
  display: none !important;
}
.pronunciation-score-panel strong {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #ef6054, #c92b27);
  font-size: 18px;
  box-shadow: 0 8px 16px rgba(190, 44, 35, .2);
}
.pronunciation-score-panel span {
  color: #9d312b;
  font-size: 13px;
  font-weight: 900;
}
.pronunciation-score-panel.is-good {
  background: #ecfff4;
  border-color: rgba(35, 160, 92, .15);
}
.pronunciation-score-panel.is-good strong {
  background: linear-gradient(145deg, #55cf8c, #159b58);
  box-shadow: 0 8px 16px rgba(20, 144, 81, .18);
}
.pronunciation-score-panel.is-good span {
  color: #187447;
}

.pronunciation-hint-line {
  margin: 0;
  max-width: 760px;
  color: #d52b2b;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.55;
  text-align: center;
}
.pronunciation-hint-line[hidden] {
  display: none !important;
}

.pronunciation-controls {
  width: min(100%, 780px);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.pronunciation-action,
.pronunciation-record-button {
  appearance: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pronunciation-action {
  min-width: 0;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  border-radius: 16px;
  color: #286181;
  background: linear-gradient(145deg, #f8fcff, #dceffd);
  border: 1px solid rgba(51, 134, 190, .13);
  box-shadow: 0 9px 17px rgba(44, 111, 153, .08), inset 0 1px 0 rgba(255,255,255,.95);
  font-size: 12px;
  font-weight: 900;
}
.pronunciation-action .ui-icon,
.pronunciation-record-button .ui-icon {
  width: 18px;
  height: 18px;
}
.pronunciation-action--score {
  color: #8f5506;
  background: linear-gradient(145deg, #fff8de, #ffe19a);
  border-color: rgba(190, 125, 18, .14);
}
.pronunciation-action--next {
  color: #246c43;
  background: linear-gradient(145deg, #effff5, #ccefd9);
  border-color: rgba(43, 151, 88, .13);
}
.pronunciation-record-button {
  justify-self: center;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #54bdfb, #187cc0);
  border: 5px solid rgba(255,255,255,.9);
  box-shadow: 0 14px 26px rgba(26, 111, 169, .24), inset 0 1px 0 rgba(255,255,255,.35);
  font-size: 11px;
  font-weight: 950;
}
.pronunciation-record-button .ui-icon {
  width: 26px;
  height: 26px;
}
.pronunciation-record-button.is-recording {
  background: linear-gradient(145deg, #ff7067, #d42828);
  animation: pronunciation-record-pulse 1.1s ease-in-out infinite;
}
@keyframes pronunciation-record-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(226,49,45,.24), 0 14px 26px rgba(169,26,26,.22); }
  50% { box-shadow: 0 0 0 13px rgba(226,49,45,0), 0 14px 26px rgba(169,26,26,.22); }
}
.pronunciation-action:active,
.pronunciation-record-button:active {
  transform: translateY(1px) scale(.99);
}

.pronunciation-status {
  margin: 0;
  color: #627d90;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
  text-align: center;
}
.pronunciation-status.is-recording {
  color: #1974aa;
}
.pronunciation-status.is-success {
  color: #16814a;
}
.pronunciation-status.is-error {
  color: #c83131;
}

@media (max-width: 720px) {
  .pronunciation-session-card {
    padding: 12px;
    border-radius: 24px;
  }
  .pronunciation-session-head {
    align-items: flex-start;
    gap: 10px;
  }
  .pronunciation-session-head h2 {
    font-size: 24px;
  }
  .pronunciation-session-head p {
    font-size: 11px;
  }
  .pronunciation-counter {
    min-height: 32px;
    padding: 0 10px;
  }
  .pronunciation-stage {
    min-height: 460px;
    padding: 16px 10px;
    border-radius: 22px;
  }
  .pronunciation-hanzi {
    font-size: clamp(38px, 12vw, 58px);
  }
  .pronunciation-pinyin {
    font-size: 18px;
  }
  .pronunciation-meaning {
    font-size: 13px;
  }
  .pronunciation-controls {
    gap: 6px;
  }
  .pronunciation-action {
    min-height: 48px;
    padding: 4px;
    flex-direction: column;
    gap: 3px;
    border-radius: 14px;
    font-size: 9px;
    line-height: 1.1;
  }
  .pronunciation-action .ui-icon {
    width: 16px;
    height: 16px;
  }
  .pronunciation-record-button {
    width: 72px;
    height: 72px;
    border-width: 4px;
    font-size: 9px;
  }
  .pronunciation-record-button .ui-icon {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 390px) {
  .pronunciation-controls {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }
  .pronunciation-action {
    font-size: 8px;
  }
  .pronunciation-record-button {
    width: 66px;
    height: 66px;
  }
}
.pronunciation-hanzi.is-low-score {
  color: #d92c2c;
}

/* v10.5: complete grammar section from the six-volume textbook set */
.grammar-browser {
  display: grid;
  gap: 20px;
}

.grammar-source-panel {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 20px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 92% 12%, rgba(76, 174, 117, .13), transparent 30%),
    linear-gradient(145deg, rgba(255,255,255,.97), rgba(239,251,244,.95));
  border: 1px solid rgba(61, 146, 96, .13);
  box-shadow: 0 18px 36px rgba(37, 112, 68, .09), inset 0 1px 0 rgba(255,255,255,.95);
}
.grammar-source-panel--compact {
  padding: 16px 18px;
}
.grammar-source-panel__icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 21px;
  color: #1f7045;
  background: linear-gradient(145deg, #e5f8ec, #bdebcf);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.92), 0 10px 20px rgba(55, 148, 94, .12);
}
.grammar-source-panel__icon .ui-icon {
  width: 28px;
  height: 28px;
}
.grammar-source-panel__copy h2 {
  margin: 5px 0 6px;
  color: #244c35;
  font-size: clamp(22px, 3vw, 32px);
  letter-spacing: -.04em;
}
.grammar-source-panel__copy p {
  margin: 0;
  color: #5d7567;
  font-size: 13px;
  line-height: 1.6;
}
.grammar-source-volumes {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.grammar-source-volumes span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: #2d7049;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(61, 146, 96, .13);
  font-size: 11px;
  font-weight: 900;
}

.grammar-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.grammar-summary-strip > div {
  display: grid;
  gap: 2px;
  min-height: 88px;
  align-content: center;
  padding: 14px 16px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,.97), rgba(247,252,248,.96));
  border: 1px solid rgba(61, 146, 96, .1);
  box-shadow: 0 12px 24px rgba(37, 112, 68, .06), inset 0 1px 0 rgba(255,255,255,.95);
}
.grammar-summary-strip b {
  color: #236c43;
  font-size: 25px;
  font-weight: 950;
}
.grammar-summary-strip span {
  color: #688071;
  font-size: 12px;
  font-weight: 800;
}

.grammar-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 12px;
  align-items: end;
}
.grammar-toolbar--examples {
  grid-template-columns: minmax(0, 1fr);
}
.grammar-search,
.grammar-filter {
  display: grid;
  gap: 7px;
}
.grammar-search {
  position: relative;
}
.grammar-search > span {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #6f8777;
}
.grammar-search .ui-icon {
  width: 18px;
  height: 18px;
}
.grammar-search input,
.grammar-filter select,
.grammar-quiz-toolbar select {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(61, 146, 96, .14);
  border-radius: 18px;
  background: rgba(255,255,255,.96);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.96), 0 10px 20px rgba(37, 112, 68, .05);
  color: #314f3d;
  font: inherit;
}
.grammar-search input {
  padding: 0 16px 0 44px;
}
.grammar-filter span,
.grammar-quiz-toolbar label > span {
  color: #5d7567;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.grammar-filter select,
.grammar-quiz-toolbar select {
  padding: 0 14px;
}
.grammar-result-count {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  color: #2d7049;
  background: #e7f8ed;
  border: 1px solid rgba(61, 146, 96, .12);
  font-size: 11px;
  font-weight: 900;
}

.grammar-point-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.grammar-point-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(249,252,250,.96));
  border: 1px solid rgba(61, 146, 96, .11);
  box-shadow: 0 16px 30px rgba(37, 112, 68, .07), inset 0 1px 0 rgba(255,255,255,.97);
}
.grammar-point-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}
.grammar-level-badge,
.grammar-source-badge,
.grammar-category-label {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .03em;
}
.grammar-level-badge {
  min-height: 30px;
  padding: 0 10px;
  color: #226e43;
  background: #dbf5e5;
}
.grammar-source-badge {
  min-height: 28px;
  padding: 0 9px;
  color: #7a6648;
  background: #fff6db;
}
.grammar-category-label {
  justify-self: start;
  min-height: 27px;
  padding: 0 9px;
  color: #4f6c5a;
  background: #f0f7f2;
  border: 1px solid rgba(61, 146, 96, .08);
}
.grammar-point-card h3 {
  margin: 0;
  color: #263f30;
  font-size: 21px;
  letter-spacing: -.035em;
  line-height: 1.2;
}
.grammar-pattern-box,
.grammar-position-box {
  display: grid;
  gap: 5px;
  padding: 12px 13px;
  border-radius: 17px;
  background: linear-gradient(145deg, #effaf3, #e2f4e8);
  border: 1px solid rgba(61, 146, 96, .1);
}
.grammar-pattern-box small,
.grammar-position-box small {
  color: #62806d;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.grammar-pattern-box strong,
.grammar-position-box b {
  color: #1e6b40;
  font-size: 14px;
  line-height: 1.5;
}
.grammar-explanation {
  margin: 0;
  color: #5f7265;
  font-size: 13px;
  line-height: 1.62;
}
.grammar-example-box {
  display: grid;
  gap: 4px;
  padding: 13px;
  border-radius: 18px;
  background: rgba(255,250,237,.92);
  border: 1px solid rgba(171, 122, 43, .11);
}
.grammar-example-box__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.grammar-example-box__head > span {
  color: #8b6d43;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.grammar-audio-button,
.grammar-situation-card__bottom button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  color: #6b4a19;
  background: linear-gradient(145deg, #fff6cf, #ffe599);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.92);
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
}
.grammar-audio-button .ui-icon,
.grammar-situation-card__bottom button .ui-icon {
  width: 14px;
  height: 14px;
}
.grammar-example-box > b {
  color: #5b3a13;
  font-size: 20px;
  line-height: 1.35;
}
.grammar-example-box p {
  margin: 0;
  color: #735d3e;
  font-size: 12px;
  line-height: 1.5;
}
.grammar-example-box .grammar-example-pinyin {
  color: #d36d26;
  font-weight: 800;
}
.grammar-note {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid #ef8c45;
  border-radius: 10px;
  color: #7d5633;
  background: #fff5e9;
  font-size: 12px;
  line-height: 1.55;
}

.grammar-pattern-groups {
  display: grid;
  gap: 18px;
}
.grammar-pattern-group {
  display: grid;
  gap: 13px;
  padding: 18px;
  border-radius: 25px;
  background: linear-gradient(145deg, rgba(255,255,255,.97), rgba(247,252,248,.96));
  border: 1px solid rgba(61, 146, 96, .1);
  box-shadow: 0 15px 28px rgba(37, 112, 68, .06);
}
.grammar-pattern-group__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.grammar-pattern-group__head h2 {
  margin: 4px 0 0;
  color: #244a34;
  font-size: 24px;
  letter-spacing: -.04em;
}
.grammar-pattern-group__head > span {
  color: #427558;
  font-size: 11px;
  font-weight: 900;
}
.grammar-pattern-list {
  display: grid;
  gap: 10px;
}
.grammar-pattern-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, .8fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 19px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(61, 146, 96, .08);
}
.grammar-pattern-row__title {
  display: flex;
  align-items: center;
  gap: 9px;
}
.grammar-pattern-row__title span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  color: #267147;
  background: #e4f7eb;
  font-size: 10px;
  font-weight: 900;
}
.grammar-pattern-row h3 {
  margin: 0;
  color: #294434;
  font-size: 17px;
}
.grammar-pattern-row code {
  display: inline-block;
  margin-top: 8px;
  padding: 7px 9px;
  border-radius: 10px;
  color: #1f6a40;
  background: #eef8f1;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
}
.grammar-pattern-row p {
  margin: 8px 0 0;
  color: #627568;
  font-size: 12px;
  line-height: 1.55;
}
.grammar-pattern-row__example {
  display: grid;
  gap: 3px;
  padding: 12px;
  border-radius: 16px;
  background: #fffaf0;
}
.grammar-pattern-row__example b {
  color: #5d3b13;
  font-size: 17px;
}
.grammar-pattern-row__example span {
  color: #d36d26;
  font-size: 11px;
  font-weight: 800;
}
.grammar-pattern-row__example small {
  color: #7b6445;
  line-height: 1.45;
}

.grammar-section-intro {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255,255,255,.97), rgba(246,251,247,.96));
  border: 1px solid rgba(61, 146, 96, .09);
}
.grammar-section-intro h2 {
  margin: 0;
  color: #264b35;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -.04em;
}
.grammar-section-intro p {
  margin: 0;
  color: #65776a;
  font-size: 13px;
}

.grammar-word-class-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.grammar-word-class-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 11px;
  padding: 17px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(249,252,250,.96));
  border: 1px solid rgba(61, 146, 96, .1);
  box-shadow: 0 14px 26px rgba(37, 112, 68, .06);
}
.grammar-word-class-card__number {
  position: absolute;
  top: 13px;
  right: 14px;
  color: rgba(35, 108, 67, .28);
  font-size: 21px;
  font-weight: 950;
}
.grammar-word-class-card h3 {
  margin: 0;
  padding-right: 40px;
  color: #274534;
  font-size: 19px;
  letter-spacing: -.03em;
}
.grammar-word-class-card > p {
  margin: 0;
  color: #64766a;
  font-size: 12px;
  line-height: 1.58;
}
.grammar-mini-example {
  display: grid;
  gap: 3px;
  padding: 11px;
  border-radius: 15px;
  background: #fff9eb;
}
.grammar-mini-example b {
  color: #583a17;
  font-size: 16px;
}
.grammar-mini-example span {
  color: #d26d27;
  font-size: 11px;
  font-weight: 800;
}
.grammar-mini-example p {
  margin: 0;
  color: #786145;
  font-size: 11px;
  line-height: 1.45;
}

.grammar-order-list {
  display: grid;
  gap: 12px;
}
.grammar-order-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(248,252,249,.96));
  border: 1px solid rgba(61, 146, 96, .1);
  box-shadow: 0 13px 24px rgba(37, 112, 68, .05);
}
.grammar-order-card__number {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #216b41;
  background: linear-gradient(145deg, #e4f8eb, #c6ecd4);
  font-size: 19px;
  font-weight: 950;
}
.grammar-order-card__content {
  display: grid;
  gap: 8px;
}
.grammar-order-card h3 {
  margin: 0;
  color: #294535;
  font-size: 19px;
}
.grammar-order-formula {
  display: inline-flex;
  justify-self: start;
  padding: 8px 10px;
  border-radius: 12px;
  color: #1f6a40;
  background: #edf8f0;
  font-size: 13px;
  font-weight: 950;
}
.grammar-order-card__content > p {
  margin: 0;
  color: #627467;
  font-size: 12px;
  line-height: 1.55;
}
.grammar-order-example {
  display: grid;
  grid-template-columns: minmax(160px, auto) minmax(160px, 1fr) minmax(180px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 15px;
  background: #fffaf0;
}
.grammar-order-example b {
  color: #5b3b16;
  font-size: 16px;
}
.grammar-order-example span {
  color: #d36c24;
  font-size: 11px;
  font-weight: 800;
}
.grammar-order-example small {
  color: #786145;
  line-height: 1.45;
}

.grammar-example-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.grammar-situation-card {
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 17px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(250,252,250,.96));
  border: 1px solid rgba(61, 146, 96, .1);
  box-shadow: 0 14px 25px rgba(37, 112, 68, .05);
}
.grammar-situation-card__top {
  display: flex;
  align-items: center;
  gap: 9px;
}
.grammar-situation-card__top span {
  min-width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #226d43;
  background: #e4f7eb;
  font-size: 11px;
  font-weight: 950;
}
.grammar-situation-card__top b {
  color: #2d4938;
  font-size: 14px;
}
.grammar-situation-hanzi {
  margin: 3px 0 0;
  color: #4e3517;
  font-size: 23px;
  font-weight: 950;
  line-height: 1.4;
}
.grammar-situation-pinyin,
.grammar-situation-meaning {
  margin: 0;
  line-height: 1.5;
}
.grammar-situation-pinyin {
  color: #d36d26;
  font-size: 12px;
  font-weight: 800;
}
.grammar-situation-meaning {
  color: #68766c;
  font-size: 12px;
}
.grammar-situation-card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(61, 146, 96, .08);
}
.grammar-situation-card__bottom > span {
  color: #3e7454;
  font-size: 10px;
  font-weight: 900;
}

.grammar-quiz-shell {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(247,252,248,.96));
  border: 1px solid rgba(61, 146, 96, .1);
  box-shadow: 0 18px 35px rgba(37, 112, 68, .07);
}
.grammar-quiz-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}
.grammar-quiz-toolbar label {
  display: grid;
  gap: 7px;
  width: min(240px, 100%);
}
.grammar-quiz-score {
  display: grid;
  gap: 2px;
  justify-items: end;
}
.grammar-quiz-score span {
  color: #68796d;
  font-size: 11px;
  font-weight: 900;
}
.grammar-quiz-score b {
  color: #217043;
  font-size: 28px;
  font-weight: 950;
}
.grammar-quiz-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9f2ec;
}
.grammar-quiz-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #63c28b, #2ca96c);
  transition: width .25s ease;
}
.grammar-quiz-card {
  display: grid;
  gap: 15px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(61, 146, 96, .08);
}
.grammar-quiz-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.grammar-quiz-card__meta span,
.grammar-quiz-card__meta b {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
}
.grammar-quiz-card__meta span {
  color: #226d43;
  background: #e4f7eb;
}
.grammar-quiz-card__meta b {
  color: #785e3b;
  background: #fff7df;
}
.grammar-quiz-card h2 {
  margin: 0;
  color: #2d4938;
  font-size: clamp(21px, 3vw, 30px);
  letter-spacing: -.035em;
  line-height: 1.32;
}
.grammar-quiz-options {
  display: grid;
  gap: 10px;
}
.grammar-quiz-options button {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 56px;
  padding: 8px 13px;
  border: 1px solid rgba(61, 146, 96, .12);
  border-radius: 17px;
  color: #3d5748;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.grammar-quiz-options button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(61, 146, 96, .28);
  background: #f5fbf7;
}
.grammar-quiz-options button > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #2b7048;
  background: #ebf7ef;
  font-weight: 950;
}
.grammar-quiz-options button.is-correct {
  border-color: rgba(46, 168, 101, .42);
  background: #eaf9f0;
}
.grammar-quiz-options button.is-wrong {
  border-color: rgba(222, 74, 74, .38);
  background: #fff0f0;
  color: #9b3e3e;
}
.grammar-quiz-feedback {
  display: grid;
  gap: 4px;
  padding: 12px 13px;
  border-radius: 15px;
  font-size: 12px;
  line-height: 1.5;
}
.grammar-quiz-feedback p {
  margin: 0;
}
.grammar-quiz-feedback.is-correct {
  color: #256c43;
  background: #e9f8ef;
  border: 1px solid rgba(46, 168, 101, .2);
}
.grammar-quiz-feedback.is-wrong {
  color: #923e3e;
  background: #fff0f0;
  border: 1px solid rgba(222, 74, 74, .18);
}
.grammar-quiz-next {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(145deg, #45bc7a, #2da766);
  box-shadow: 0 12px 22px rgba(45, 167, 102, .19), inset 0 1px 0 rgba(255,255,255,.2);
  cursor: pointer;
  font-weight: 900;
}
.grammar-quiz-next:disabled {
  opacity: .42;
  cursor: not-allowed;
}
.grammar-quiz-next .ui-icon {
  width: 17px;
  height: 17px;
}
.grammar-quiz-finish {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 28px 16px;
  text-align: center;
}
.grammar-quiz-finish__icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: #8a5b00;
  background: linear-gradient(145deg, #fff3b6, #ffd563);
}
.grammar-quiz-finish__icon .ui-icon {
  width: 30px;
  height: 30px;
}
.grammar-quiz-finish h2 {
  margin: 0;
  color: #2a4936;
  font-size: 29px;
}
.grammar-quiz-finish p {
  margin: 0;
  color: #66786c;
  font-size: 13px;
}
.grammar-quiz-finish button {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #45bc7a, #2da766);
  cursor: pointer;
  font-weight: 900;
}
.grammar-empty {
  grid-column: 1 / -1;
  padding: 22px;
  border-radius: 20px;
  color: #65766a;
  background: rgba(255,255,255,.88);
  border: 1px dashed rgba(61, 146, 96, .18);
  text-align: center;
  font-weight: 800;
}

@media (max-width: 1120px) {
  .grammar-word-class-grid,
  .grammar-example-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grammar-pattern-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .grammar-order-example {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .grammar-browser {
    gap: 16px;
  }
  .grammar-source-panel {
    grid-template-columns: 52px minmax(0, 1fr);
    padding: 15px;
    border-radius: 21px;
  }
  .grammar-source-panel__icon {
    width: 52px;
    height: 52px;
    border-radius: 17px;
  }
  .grammar-source-panel__copy h2 {
    font-size: 21px;
  }
  .grammar-summary-strip,
  .grammar-point-grid,
  .grammar-word-class-grid,
  .grammar-example-grid,
  .grammar-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }
  .grammar-summary-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .grammar-summary-strip > div {
    min-height: 72px;
    padding: 10px;
  }
  .grammar-summary-strip b {
    font-size: 20px;
  }
  .grammar-summary-strip span {
    font-size: 10px;
  }
  .grammar-result-count {
    justify-self: start;
  }
  .grammar-point-card,
  .grammar-pattern-group,
  .grammar-section-intro,
  .grammar-word-class-card,
  .grammar-order-card,
  .grammar-situation-card,
  .grammar-quiz-shell,
  .grammar-quiz-card {
    padding: 14px;
    border-radius: 19px;
  }
  .grammar-point-card h3 {
    font-size: 19px;
  }
  .grammar-pattern-group__head {
    align-items: flex-start;
    flex-direction: column;
  }
  .grammar-order-card {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 11px;
  }
  .grammar-order-card__number {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 16px;
  }
  .grammar-quiz-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .grammar-quiz-toolbar label {
    width: 100%;
  }
  .grammar-quiz-score {
    justify-items: start;
  }
}

@media (max-width: 430px) {
  .grammar-source-panel {
    grid-template-columns: minmax(0, 1fr);
  }
  .grammar-summary-strip {
    grid-template-columns: minmax(0, 1fr);
  }
  .grammar-point-card__top {
    align-items: flex-start;
    flex-direction: column;
  }
  .grammar-situation-hanzi {
    font-size: 20px;
  }
}

/* v10.6: profile support info and AI progress assessment */
.settings-list .settings-list-item {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(151,92,8,.1);
  border-radius: 20px;
  color: inherit;
  background: linear-gradient(145deg, #fff, #fff9e9);
  text-align: left;
  text-decoration: none;
  box-shadow: 0 11px 20px rgba(98,57,0,.08), 0 3px 0 rgba(193,132,22,.08), inset 0 1px 0 #fff;
}
.settings-list .settings-list-item > span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #9e5900;
  background: linear-gradient(145deg, #fff4ae, #ffd14a);
  box-shadow: 0 6px 0 #dfa027, inset 0 1px 0 #fff;
  font-size: 23px;
}
.settings-list .settings-list-item b,
.settings-list .settings-list-item small {
  display: block;
}
.settings-list .settings-list-item small {
  margin-top: 3px;
  color: var(--muted);
}
.settings-list .settings-list-item i {
  color: #a67834;
  font-size: 22px;
  font-style: normal;
}
.settings-list .settings-list-item:not(.settings-list-item--static) {
  cursor: pointer;
}
.settings-list .settings-list-item:not(.settings-list-item--static):active {
  transform: translateY(2px);
}

.personal-assessment-card {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding: 20px;
  border: 1px solid rgba(151,92,8,.1);
  border-radius: 26px;
  background: linear-gradient(145deg, #fff, #fff6d9);
  box-shadow: 0 14px 25px rgba(98,57,0,.09), 0 4px 0 rgba(193,132,22,.08), inset 0 1px 0 #fff;
}
.personal-assessment-card__heading {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}
.personal-assessment-card__icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: #955200;
  background: linear-gradient(145deg, #fff4ac, #ffc31b);
  box-shadow: 0 7px 0 #da8a00, 0 11px 16px rgba(128,71,0,.14), inset 0 1px 0 rgba(255,255,255,.68);
}
.personal-assessment-card__heading h2 {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: -.03em;
}
.personal-assessment-card__badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: #7c4800;
  background: linear-gradient(145deg, #fff1ad, #ffd45f);
  border: 1px solid rgba(151,92,8,.12);
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}
.personal-assessment-card > p {
  margin: 0;
  color: #70583a;
  font-size: 14px;
  line-height: 1.7;
}
.personal-assessment-note {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border-radius: 16px;
  color: #874f09;
  background: rgba(255, 233, 162, .52);
  border: 1px solid rgba(190, 122, 13, .12);
}
.personal-assessment-note b {
  font-size: 12px;
}
.personal-assessment-note span {
  font-size: 12px;
  line-height: 1.55;
}

@media (max-width: 620px) {
  .personal-assessment-card__heading {
    grid-template-columns: 48px minmax(0, 1fr);
  }
  .personal-assessment-card__icon {
    width: 48px;
    height: 48px;
  }
  .personal-assessment-card__badge {
    grid-column: 1 / -1;
    justify-self: start;
  }
}
