:root {
  --ink: #132a27;
  --ink-soft: #405a55;
  --jade: #0d6255;
  --jade-deep: #103f38;
  --jade-pale: #dceee8;
  --vermilion: #d94a36;
  --vermilion-dark: #b83224;
  --gold: #f2bd52;
  --paper: #f7f8f4;
  --paper-warm: #fbf5eb;
  --white: #fff;
  --line: #d6e1dc;
  --line-dark: #adc2ba;
  --muted: #637873;
  --purple: #6256a4;
  --blue: #35738b;
  --shadow-sm: 0 8px 24px rgba(16, 63, 56, .08);
  --shadow: 0 22px 65px rgba(16, 63, 56, .13);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 32px;
  --shell: 1180px;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --font-display: Georgia, "Noto Serif TC", "PMingLiU", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.035em; }
h1 { font-size: clamp(2.75rem, 6vw, 5.75rem); }
h2 { font-size: clamp(2rem, 4vw, 3.65rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.55rem); }
p { color: var(--ink-soft); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 5px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 999;
  left: 18px;
  top: 12px;
  transform: translateY(-150%);
  padding: 10px 16px;
  border-radius: 10px;
  color: var(--white);
  background: var(--ink);
  font-weight: 800;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

.shell { width: min(var(--shell), calc(100% - 40px)); margin-inline: auto; }
.section { padding: clamp(70px, 9vw, 120px) 0; }
.section-soft { background: var(--jade-pale); }
.view { min-height: 50vh; }
.page-view { padding-top: clamp(60px, 8vw, 110px); }

.kicker, .eyebrow, .overline {
  color: var(--vermilion-dark);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.kicker.light { color: #8ee0cf; }
.overline { margin-bottom: 12px; color: var(--jade); }

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 850;
  line-height: 1.2;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.button:hover { transform: translateY(-2px); }
.button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.button-primary { color: var(--white); background: var(--vermilion); box-shadow: 0 12px 24px rgba(217, 74, 54, .2); }
.button-primary:hover { background: var(--vermilion-dark); box-shadow: 0 15px 30px rgba(217, 74, 54, .27); }
.button-quiet { color: var(--ink); background: var(--white); border-color: var(--line-dark); }
.button-quiet:hover { border-color: var(--jade); }
.button-outline { color: var(--jade); background: transparent; border-color: var(--jade); }
.button-outline:hover { color: var(--white); background: var(--jade); }
.button-paper { color: var(--jade-deep); background: var(--paper); }
.button-small { min-height: 40px; padding: 8px 15px; font-size: .88rem; }
.text-action {
  padding: 0;
  border: 0;
  cursor: pointer;
  color: var(--jade);
  background: transparent;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-color: rgba(13, 98, 85, .3);
  text-underline-offset: 5px;
}
.text-action:hover { color: var(--vermilion-dark); text-decoration-color: currentColor; }
.icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  color: var(--ink);
  background: var(--white);
  font-size: 1.45rem;
  line-height: 1;
}

/* Header */
.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid rgba(214, 225, 220, .82);
  background: rgba(247, 248, 244, .9);
  backdrop-filter: blur(18px);
}
.header-inner { display: grid; min-height: 76px; grid-template-columns: auto 1fr auto; align-items: center; gap: 26px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 7px 15px 7px 15px;
  color: var(--white);
  background: var(--vermilion);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .32);
  transform: rotate(-3deg);
}
.brand-mark span { font-family: var(--font-display); font-size: 1.45rem; font-weight: 900; transform: rotate(3deg); }
.brand-mark-small { width: 38px; height: 38px; }
.brand-copy { display: grid; line-height: 1; }
.brand-copy strong { font-size: 1.03rem; letter-spacing: -.02em; }
.brand-copy small { margin-top: 4px; color: var(--muted); font-size: .69rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.primary-nav { display: flex; align-items: center; justify-content: center; gap: 30px; }
.primary-nav a { position: relative; padding: 25px 0 22px; color: var(--ink-soft); font-size: .92rem; font-weight: 750; text-decoration: none; }
.primary-nav a::after { position: absolute; right: 0; bottom: 16px; left: 0; height: 2px; content: ""; background: var(--vermilion); transform: scaleX(0); transition: transform .18s ease; }
.primary-nav a:hover, .primary-nav a.is-active { color: var(--ink); }
.primary-nav a:hover::after, .primary-nav a.is-active::after { transform: scaleX(1); }
.account-control { display: inline-flex; min-height: 38px; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); font-size: .85rem; font-weight: 800; text-decoration: none; }
.account-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.account-control.is-signed-in .account-dot { background: #33a56f; }
.mobile-menu { display: none; width: 44px; height: 44px; padding: 11px; border: 1px solid var(--line); border-radius: 50%; background: var(--white); }
.mobile-menu span:not(.sr-only) { display: block; height: 2px; margin: 4px 0; border-radius: 2px; background: var(--ink); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: clamp(65px, 8vw, 112px) 0 75px; background: linear-gradient(135deg, #f7f8f4 0%, #f7f8f4 54%, #e3f0eb 100%); }
.hero-pattern { position: absolute; inset: 0; opacity: .18; background-image: linear-gradient(rgba(13, 98, 85, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(13, 98, 85, .12) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(to right, transparent 10%, black 70%); }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(390px, .98fr); align-items: center; gap: clamp(34px, 7vw, 90px); }
.hero-copy { position: relative; z-index: 2; }
.eyebrow { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; }
.eyebrow span { display: inline-block; padding: 5px 9px; border-radius: 6px; color: var(--white); background: var(--jade); font-family: var(--font-display); font-size: .86rem; letter-spacing: .06em; text-transform: none; }
.hero h1 { max-width: 790px; margin-bottom: 24px; font-weight: 780; }
.hero h1 em { color: var(--vermilion); font-family: var(--font-display); font-weight: 500; }
.hero-lead { max-width: 650px; margin-bottom: 30px; font-size: clamp(1.08rem, 1.8vw, 1.3rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 34px 0 0; padding: 24px 0 0; border-top: 1px solid var(--line-dark); list-style: none; color: var(--ink-soft); font-size: .85rem; font-weight: 750; }
.hero-proof span { color: var(--jade); font-family: var(--font-display); font-size: 1.2rem; }
.hero-visual { position: relative; aspect-ratio: 1 / 1; min-height: 480px; }
.hero-visual::before { position: absolute; inset: 9% 2% 2% 9%; border-radius: 45% 55% 52% 48%; content: ""; background: linear-gradient(145deg, #c6e3da, #8ac9ba); transform: rotate(-4deg); }
.hero-visual img { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 22px 30px rgba(16, 63, 56, .16)); }
.hero-visual img.image-missing { opacity: 0; }
.sun-disc { position: absolute; z-index: 1; top: 1%; right: 3%; width: 30%; aspect-ratio: 1; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 16px rgba(242, 189, 82, .12); }
.phrase-card { position: absolute; z-index: 3; min-width: 170px; padding: 13px 16px; border: 1px solid rgba(255, 255, 255, .8); border-radius: 14px; background: rgba(255, 255, 255, .92); box-shadow: var(--shadow-sm); backdrop-filter: blur(10px); }
.phrase-card strong, .phrase-card span, .phrase-card small { display: block; }
.phrase-card strong { font-family: var(--font-display); font-size: 1.15rem; }
.phrase-card span { color: var(--jade); font-size: .76rem; font-weight: 800; }
.phrase-card small { color: var(--muted); font-size: .72rem; }
.phrase-card-one { bottom: 7%; left: -2%; transform: rotate(-2deg); }
.phrase-card-two { top: 20%; right: -3%; transform: rotate(2deg); }

.signal-strip { color: var(--white); background: var(--jade-deep); }
.signal-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.signal-grid > div { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 25px 28px; border-right: 1px solid rgba(255, 255, 255, .13); }
.signal-grid > div:last-child { border-right: 0; }
.signal-grid p { margin: 0; color: #d6e8e2; font-size: .85rem; line-height: 1.5; }
.signal-grid strong { color: var(--white); }
.signal-index { color: var(--gold); font-family: var(--font-display); font-size: 1.7rem; font-weight: 900; line-height: 1; }

/* Home sections */
.section-heading { max-width: 760px; margin-bottom: 38px; }
.section-heading h2 { margin-bottom: 18px; }
.section-heading > p:last-child { font-size: 1.08rem; }
.split-heading { display: grid; max-width: none; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); align-items: end; gap: 60px; }
.split-heading > p { margin-bottom: 10px; }
.persona-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.persona-card { position: relative; min-height: 330px; overflow: hidden; padding: 34px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow-sm); }
.persona-card::after { position: absolute; right: -60px; bottom: -65px; width: 210px; height: 210px; border-radius: 50%; content: ""; opacity: .7; }
.persona-card h3 { position: relative; z-index: 1; max-width: 280px; margin-bottom: 18px; font-size: 1.65rem; }
.persona-card p:not(.overline) { position: relative; z-index: 1; max-width: 290px; }
.persona-card .text-action { position: absolute; z-index: 2; bottom: 31px; left: 34px; }
.persona-chinese { position: absolute; z-index: 0; top: 14px; right: 24px; color: rgba(13, 98, 85, .085); font-family: var(--font-display); font-size: 7.5rem; font-weight: 900; line-height: 1; }
.persona-beginner::after { background: #f9dca2; }
.persona-taiwan::after { background: #b7ddd3; }
.persona-speaker::after { background: #d9d3f1; }

.section-ink { color: var(--white); background: var(--ink); }
.learning-loop { display: grid; grid-template-columns: minmax(0, .85fr) minmax(440px, 1.15fr); align-items: start; gap: clamp(55px, 9vw, 125px); }
.loop-copy { position: sticky; top: 120px; }
.loop-copy p:not(.kicker) { max-width: 550px; color: #b9cec8; font-size: 1.08rem; }
.loop-copy .button { margin-top: 15px; }
.loop-steps { display: grid; margin: 0; padding: 0; list-style: none; }
.loop-steps li { display: grid; grid-template-columns: 74px 1fr; gap: 24px; padding: 29px 0; border-bottom: 1px solid rgba(255, 255, 255, .13); }
.loop-steps li:first-child { padding-top: 0; }
.loop-steps li > span { display: grid; width: 64px; height: 64px; place-items: center; border: 1px solid rgba(255, 255, 255, .22); border-radius: 50%; color: var(--gold); font-family: var(--font-display); font-size: 1.65rem; }
.loop-steps strong { font-size: 1.25rem; }
.loop-steps p { margin: 5px 0 0; color: #b9cec8; }

.package-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.package-card { position: relative; display: flex; min-height: 400px; flex-direction: column; overflow: hidden; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.package-card:hover { border-color: var(--line-dark); box-shadow: var(--shadow); transform: translateY(-5px); }
.package-card::before { position: absolute; top: 0; right: 0; left: 0; height: 6px; content: ""; background: var(--package-color, var(--jade)); }
.package-card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.course-level, .status-badge, .priority-badge, .type-badge { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; font-size: .69rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.course-level { color: var(--jade-deep); background: var(--jade-pale); }
.course-glyph { color: var(--package-color, var(--jade)); font-family: var(--font-display); font-size: 2.2rem; font-weight: 900; line-height: 1; }
.package-card h3 { margin-bottom: 10px; font-size: 1.65rem; }
.package-card .card-tagline { min-height: 58px; margin-bottom: 24px; }
.course-outcomes { display: grid; gap: 8px; margin: 0 0 25px; padding: 0; list-style: none; color: var(--ink-soft); font-size: .88rem; }
.course-outcomes li { position: relative; padding-left: 18px; }
.course-outcomes li::before { position: absolute; top: .57em; left: 0; width: 7px; height: 7px; border-radius: 50%; content: ""; background: var(--package-color, var(--jade)); }
.package-card-footer { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-top: auto; padding-top: 20px; border-top: 1px solid var(--line); }
.course-meta { display: grid; color: var(--muted); font-size: .76rem; }
.course-price { color: var(--ink); font-size: 1.35rem; font-weight: 900; }
.course-price small { color: var(--muted); font-size: .7rem; font-weight: 700; }
.compare-toggle { display: inline-flex; align-items: center; gap: 7px; margin-top: 15px; color: var(--muted); font-size: .78rem; font-weight: 800; }
.compare-toggle input { width: 17px; height: 17px; accent-color: var(--jade); }
.section-action { margin-top: 35px; text-align: center; }
.skeleton-card { min-height: 400px; overflow: hidden; border-radius: var(--radius); background: linear-gradient(105deg, #eef2ef 30%, #fff 48%, #eef2ef 66%); background-size: 240% 100%; animation: shimmer 1.45s infinite linear; }
@keyframes shimmer { to { background-position-x: -240%; } }
.start-panel { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 32px; padding: clamp(28px, 5vw, 52px); border: 1px solid rgba(13, 98, 85, .15); border-radius: var(--radius-lg); background: rgba(255, 255, 255, .65); }
.start-panel h2 { margin-bottom: 8px; font-size: clamp(1.8rem, 3vw, 2.65rem); }
.start-panel p:last-child { margin: 0; }
.start-seal { display: grid; width: 82px; height: 82px; place-items: center; border: 2px solid var(--vermilion); border-radius: 12px 27px 12px 27px; color: var(--vermilion); font-family: var(--font-display); font-size: 2.4rem; font-weight: 900; transform: rotate(-4deg); }

/* Page headers and controls */
.page-header { max-width: 880px; margin-bottom: 48px; }
.page-header h1 { margin-bottom: 22px; font-size: clamp(2.7rem, 5.8vw, 5.2rem); }
.page-header > p:last-child { max-width: 760px; font-size: 1.1rem; }
.centered-header { margin-inline: auto; text-align: center; }
.centered-header > p:last-child { margin-inline: auto; }
.catalog-toolbar, .library-toolbar { display: flex; align-items: center; gap: 16px; margin-bottom: 30px; }
.search-field { display: flex; min-height: 48px; flex: 1 1 300px; align-items: center; gap: 9px; padding: 0 15px; border: 1px solid var(--line-dark); border-radius: 13px; background: var(--white); }
.search-field > span { color: var(--jade); font-size: 1.35rem; }
.search-field input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search-field:focus-within { border-color: var(--jade); box-shadow: 0 0 0 3px rgba(13, 98, 85, .12); }
.filter-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-pills button, .script-switch button { min-height: 40px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; color: var(--ink-soft); background: var(--white); font-size: .78rem; font-weight: 850; }
.filter-pills button.is-active, .script-switch button.is-active { border-color: var(--jade); color: var(--white); background: var(--jade); }
.select-field { display: grid; min-width: 150px; gap: 3px; padding: 5px 12px; border: 1px solid var(--line-dark); border-radius: 13px; background: var(--white); }
.select-field span { color: var(--muted); font-size: .65rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.select-field select { min-height: 26px; padding-right: 25px; border: 0; outline: 0; color: var(--ink); background: linear-gradient(45deg, transparent 50%, var(--jade) 50%) calc(100% - 7px) 50% / 5px 5px no-repeat, linear-gradient(135deg, var(--jade) 50%, transparent 50%) calc(100% - 2px) 50% / 5px 5px no-repeat; appearance: none; }
.empty-state { max-width: 620px; margin: 60px auto; padding: 45px; border: 1px dashed var(--line-dark); border-radius: var(--radius); text-align: center; }
.empty-state > span { display: block; color: var(--line-dark); font-family: var(--font-display); font-size: 4rem; }
.empty-state h2 { font-size: 1.7rem; }

/* Package detail */
.detail-hero { position: relative; overflow: hidden; padding: clamp(55px, 8vw, 95px) 0; color: var(--white); background: var(--jade-deep); }
.detail-hero::after { position: absolute; top: -220px; right: -80px; width: 600px; height: 600px; border: 1px solid rgba(255, 255, 255, .13); border-radius: 50%; content: ""; box-shadow: 0 0 0 70px rgba(255, 255, 255, .035), 0 0 0 140px rgba(255, 255, 255, .025); }
.detail-hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: center; gap: 70px; }
.detail-breadcrumb { display: inline-flex; margin-bottom: 24px; color: #b8d7cf; font-size: .82rem; font-weight: 800; text-decoration: none; }
.detail-hero h1 { max-width: 760px; margin-bottom: 16px; }
.detail-tagline { max-width: 710px; color: #d5e7e2; font-size: 1.18rem; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 10px 25px; margin-top: 28px; color: #d5e7e2; font-size: .85rem; }
.detail-meta strong { color: var(--white); }
.purchase-card { padding: 28px; border: 1px solid rgba(255, 255, 255, .2); border-radius: var(--radius); background: rgba(255, 255, 255, .09); backdrop-filter: blur(10px); }
.purchase-card .price { margin-bottom: 5px; color: var(--white); font-size: 2.5rem; font-weight: 900; }
.purchase-card .price-note { color: #cce0db; font-size: .82rem; }
.purchase-card .button { width: 100%; margin-top: 18px; }
.purchase-card small { display: block; margin-top: 12px; color: #a9cac2; line-height: 1.45; }
.package-body { padding: clamp(60px, 8vw, 105px) 0; }
.package-body-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; align-items: start; gap: 65px; }
.outcome-panel { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 55px; }
.outcome-item { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); }
.outcome-item strong { display: block; margin-bottom: 6px; }
.outcome-item p { margin: 0; font-size: .87rem; }
.curriculum-head { margin-bottom: 25px; }
.curriculum-head h2 { font-size: 2.35rem; }
.lesson-list { display: grid; gap: 12px; }
.lesson-card { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); }
.lesson-card summary { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 14px; padding: 19px; cursor: pointer; list-style: none; }
.lesson-card summary::-webkit-details-marker { display: none; }
.lesson-number { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; color: var(--jade); background: var(--jade-pale); font-size: .76rem; font-weight: 900; }
.lesson-title strong { display: block; }
.lesson-title span { display: block; margin-top: 3px; color: var(--muted); font-size: .78rem; }
.lesson-chevron { width: 9px; height: 9px; border-right: 2px solid var(--jade); border-bottom: 2px solid var(--jade); transform: rotate(45deg); transition: transform .18s ease; }
.lesson-card[open] .lesson-chevron { transform: rotate(225deg); }
.lesson-content { padding: 0 20px 22px 80px; }
.lesson-content > p { margin-bottom: 16px; }
.study-set-list { display: grid; gap: 8px; }
.lesson-set { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 11px 13px; border-radius: 9px; background: var(--paper); font-size: .82rem; }
.lesson-set > div { display: flex; align-items: center; gap: 9px; }
.priority-badge.must { color: #813126; background: #fae2dc; }
.priority-badge.should { color: #19594f; background: #dceee8; }
.priority-badge.stretch { color: #56478c; background: #e8e4f6; }
.package-sidebar { position: sticky; top: 104px; }
.sidebar-card { margin-bottom: 15px; padding: 23px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); }
.sidebar-card h3 { font-size: 1.08rem; }
.sidebar-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; color: var(--ink-soft); font-size: .85rem; }
.sidebar-list li { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.sidebar-list li:last-child { padding-bottom: 0; border-bottom: 0; }

/* Study set library */
.library-header { display: flex; max-width: none; align-items: end; justify-content: space-between; gap: 30px; }
.library-header > div:first-child { max-width: 800px; }
.script-switch { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); }
.script-switch button { min-height: 36px; border-color: transparent; }
.set-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.set-card { display: flex; min-height: 285px; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); transition: transform .18s ease, box-shadow .18s ease; }
.set-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-3px); }
.set-card-visual { position: relative; display: grid; aspect-ratio: 16 / 8.5; overflow: hidden; margin: -24px -24px 20px; place-items: center; border-bottom: 1px solid var(--line); background: linear-gradient(145deg, #dceee8, #f9e9cf 52%, #f2d9d4); }
.set-card-scene { position: absolute; inset: 0; background-color: #dceee8; }
.set-card-visual::after { position: absolute; inset: auto 0 0; height: 42%; content: ""; background: linear-gradient(transparent, rgba(12, 40, 36, .3)); pointer-events: none; }
.set-glyph-fallback { color: rgba(13, 98, 85, .3); font-family: var(--font-display); font-size: 4.5rem; font-weight: 900; }
.set-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 19px; }
.set-glyph { font-family: var(--font-display); font-size: 2.15rem; font-weight: 900; }
.set-glyph.pinyin-preview { max-width: 65%; overflow: hidden; font-family: var(--font-body); font-size: .76rem; line-height: 1.25; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.set-card h2 { margin-bottom: 4px; font-size: 1.42rem; }
.set-meaning { margin-bottom: 18px; color: var(--jade); font-size: .79rem; font-weight: 800; }
.set-goal { font-size: .88rem; }
.set-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; }
.set-card-footer .text-action { font-size: .8rem; }
.pinyin-preview { display: none; color: var(--jade); }
body[data-script-mode="pinyin"] .traditional-preview { display: none; }
body[data-script-mode="pinyin"] .pinyin-preview, body[data-script-mode="both"] .pinyin-preview { display: block; }

.study-page { min-height: 75vh; padding: 55px 0 100px; }
.study-topbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 35px; }
.study-topbar a { font-weight: 850; text-decoration: none; }
.study-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 30px; margin-bottom: 34px; }
.study-head h1 { margin-bottom: 8px; font-family: var(--font-display); font-size: clamp(2.7rem, 6vw, 5rem); }
.study-head .pinyin-line { color: var(--jade); font-size: 1rem; font-weight: 800; }
.study-progress { min-width: 220px; }
.study-progress-label { display: flex; justify-content: space-between; color: var(--muted); font-size: .75rem; font-weight: 800; }
.progress-track { height: 8px; overflow: hidden; border-radius: 999px; background: var(--line); }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--vermilion); transition: width .25s ease; }
.guided-scene { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(330px, .7fr); overflow: hidden; margin: 0 0 54px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow); }
.scene-frame { position: relative; min-height: 570px; overflow: hidden; isolation: isolate; background: #dcece7; }
.scene-panel-image { position: absolute; z-index: -1; inset: 0; background-color: #dceee8; }
.scene-frame::after { position: absolute; z-index: -1; inset: 0; content: ""; background: linear-gradient(180deg, rgba(8, 35, 31, .03) 35%, rgba(8, 35, 31, .58)); pointer-events: none; }
.scene-placeholder { position: absolute; z-index: -2; inset: 0; display: grid; align-content: center; justify-items: center; gap: 7px; color: var(--jade); background: radial-gradient(circle at 25% 22%, rgba(255, 255, 255, .8), transparent 25%), linear-gradient(145deg, #dceee8, #f8e4c4 58%, #e9cbc7); }
.scene-placeholder span { font-family: var(--font-display); font-size: clamp(5rem, 12vw, 10rem); font-weight: 900; opacity: .4; }
.scene-placeholder small { font-size: .76rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.scene-frame:not(.is-missing) .scene-placeholder { opacity: 0; }
.scene-bubbles { position: absolute; inset: 0; }
.scene-bubble { position: absolute; z-index: 2; display: grid; width: min(44%, 330px); min-height: 130px; align-content: center; gap: 4px; padding: 18px 21px; border: 2px solid rgba(255, 255, 255, .78); border-radius: 38px; cursor: pointer; color: var(--ink); background: rgba(255, 255, 255, .93); box-shadow: 0 15px 45px rgba(11, 39, 35, .25); text-align: left; backdrop-filter: blur(10px); transition: transform .18s ease, opacity .18s ease; }
.scene-bubble::after { position: absolute; bottom: -16px; width: 19px; height: 19px; border: 5px solid rgba(255, 255, 255, .9); border-radius: 50%; content: ""; background: rgba(255, 255, 255, .88); box-shadow: 13px 15px 0 -5px rgba(255, 255, 255, .9); }
.scene-bubble.is-left { bottom: 11%; left: 5%; }
.scene-bubble.is-left::after { left: 28px; }
.scene-bubble.is-right { top: 9%; right: 5%; }
.scene-bubble.is-right::after { right: 28px; }
.scene-bubble:not(.is-current) { opacity: .78; transform: scale(.92); }
.scene-bubble:hover, .scene-bubble:focus-visible { opacity: 1; transform: translateY(-3px); }
.scene-bubble small { color: var(--vermilion); font-size: .67rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.scene-bubble strong { font-family: var(--font-display); font-size: clamp(1.18rem, 2.5vw, 1.7rem); line-height: 1.25; }
.scene-bubble span { color: var(--jade); font-size: .78rem; font-style: normal; font-weight: 850; }
.scene-bubble em { color: var(--ink-soft); font-size: .76rem; font-style: normal; line-height: 1.35; }
.dialogue-player { display: flex; min-width: 0; flex-direction: column; padding: clamp(25px, 4vw, 42px); }
.dialogue-player-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.dialogue-player-head h2 { max-width: 420px; margin: 3px 0 0; font-size: clamp(1.55rem, 3vw, 2.25rem); }
.dialogue-counter { flex: 0 0 auto; color: var(--muted); font-size: .78rem; font-weight: 900; }
.dialogue-counter b { color: var(--vermilion); font-size: 1.25rem; }
.selected-dialogue { margin: 34px 0 28px; padding: 23px; border-left: 4px solid var(--vermilion); border-radius: 0 14px 14px 0; background: var(--paper); }
.speaker-chip { display: inline-flex; margin-bottom: 11px; padding: 5px 9px; border-radius: 999px; color: var(--jade); background: var(--jade-pale); font-size: .67rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.selected-hanzi { margin: 0; font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.9rem); font-weight: 900; line-height: 1.22; }
.selected-pinyin { margin: 7px 0 0; color: var(--jade); font-size: 1rem; font-weight: 850; }
.selected-english { margin: 13px 0 0; color: var(--ink-soft); font-size: .92rem; }
.dialogue-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.dialogue-controls button, .dialogue-options button { min-height: 44px; padding: 9px 11px; border: 1px solid var(--line-dark); border-radius: 10px; cursor: pointer; color: var(--jade); background: var(--white); font-size: .76rem; font-weight: 900; }
.dialogue-controls .dialogue-play { color: var(--white); border-color: var(--jade); background: var(--jade); }
.dialogue-controls button:hover:not(:disabled), .dialogue-options button:hover:not(:disabled) { border-color: var(--jade); box-shadow: inset 0 0 0 1px var(--jade); }
.dialogue-controls button:disabled, .dialogue-options button:disabled { cursor: not-allowed; opacity: .42; }
.dialogue-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.dialogue-options label { display: grid; gap: 4px; color: var(--muted); font-size: .68rem; font-weight: 850; }
.dialogue-options select { min-height: 44px; padding: 7px 34px 7px 10px; border: 1px solid var(--line-dark); border-radius: 10px; color: var(--ink); background: var(--white); font-size: .76rem; font-weight: 800; }
.dialogue-options button[aria-pressed="true"] { color: var(--white); border-color: var(--vermilion); background: var(--vermilion); }
.speech-status { margin: auto 0 0; padding-top: 18px; color: var(--muted); font-size: .77rem; }
.dialogue-transcript-wrap { grid-column: 1 / -1; display: grid; grid-template-columns: 245px 1fr; gap: 28px; padding: 28px; border-top: 1px solid var(--line); background: #f5f7f5; }
.dialogue-transcript-wrap h3 { margin: 2px 0 0; font-size: 1.25rem; }
.dialogue-transcript { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.dialogue-line { display: grid; width: 100%; min-height: 112px; grid-template-columns: 28px 1fr; gap: 10px; padding: 14px; border: 1px solid transparent; border-radius: 12px; cursor: pointer; color: var(--ink); background: var(--white); text-align: left; }
.dialogue-line:hover, .dialogue-line:focus-visible { border-color: var(--jade); }
.dialogue-line.is-current { border-color: var(--vermilion); box-shadow: inset 0 0 0 1px var(--vermilion); }
.dialogue-line-number { color: var(--muted); font-size: .7rem; font-weight: 900; }
.dialogue-line strong { display: block; color: var(--vermilion); font-size: .67rem; letter-spacing: .06em; text-transform: uppercase; }
.dialogue-hanzi { display: block; margin-top: 4px; font-family: var(--font-display); font-size: 1.15rem; font-weight: 850; }
.dialogue-pinyin { display: block; margin-top: 2px; color: var(--jade); font-size: .76rem; font-weight: 800; }
.dialogue-line small { display: block; margin-top: 5px; color: var(--ink-soft); font-size: .73rem; line-height: 1.35; }
.practice-section-head { display: grid; grid-template-columns: 1fr minmax(260px, .6fr); align-items: end; gap: 30px; margin: 0 0 24px; }
.practice-section-head h2 { margin: 2px 0 0; font-size: clamp(1.7rem, 3vw, 2.5rem); }
.practice-section-head > p { margin: 0; }
.phrase-study-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.study-phrase { position: relative; min-height: 210px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.study-phrase.is-known { border-color: #70b5a4; background: #f2faf7; }
.phrase-index { position: absolute; top: 18px; right: 20px; color: var(--line-dark); font-family: var(--font-display); font-size: 1.6rem; }
.study-phrase .hanzi { max-width: 85%; margin-bottom: 6px; font-family: var(--font-display); font-size: clamp(1.65rem, 3vw, 2.35rem); font-weight: 850; line-height: 1.25; }
.study-phrase .pinyin { color: var(--jade); font-size: .9rem; font-weight: 800; }
.study-phrase .meaning { margin: 20px 0 0; color: var(--ink-soft); }
.phrase-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 22px; }
.audio-button, .known-button { min-height: 38px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; color: var(--jade); background: var(--paper); font-size: .75rem; font-weight: 900; }
.known-button[aria-pressed="true"] { color: var(--white); background: var(--jade); }
.study-complete { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-top: 35px; padding: 27px; border-radius: var(--radius); color: var(--white); background: var(--jade-deep); }
.study-complete p { margin: 4px 0 0; color: #c8ddd7; }

/* Placement */
.placement-shell { max-width: 980px; }
.placement-header { margin-inline: auto; text-align: center; }
.placement-header > p:last-child { margin-inline: auto; }
.placement-layout { max-width: 760px; margin: 0 auto; }
.placement-progress { margin-bottom: 16px; }
.placement-progress > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: .76rem; font-weight: 850; }
.placement-card { padding: clamp(27px, 6vw, 55px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow); }
.placement-card h2 { margin-bottom: 10px; font-size: clamp(1.65rem, 3vw, 2.4rem); }
.placement-card fieldset { margin: 25px 0 0; padding: 0; border: 0; }
.answer-grid { display: grid; gap: 10px; }
.answer-option { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.answer-option:hover { border-color: var(--jade); background: #f6fbf9; }
.answer-option:has(input:checked) { border-color: var(--jade); background: var(--jade-pale); box-shadow: inset 0 0 0 1px var(--jade); }
.answer-option input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--jade); }
.answer-option strong { display: block; }
.answer-option small { display: block; margin-top: 2px; color: var(--muted); }
.placement-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; }
.placement-actions .button-primary { margin-left: auto; }
.placement-result { max-width: 860px; margin: 35px auto 0; padding: clamp(30px, 6vw, 55px); border-radius: var(--radius-lg); color: var(--white); background: var(--jade-deep); box-shadow: var(--shadow); }
.placement-result p { color: #d2e5df; }
.placement-result-grid { display: grid; grid-template-columns: 1fr 250px; align-items: end; gap: 35px; }
.placement-result .button { margin-top: 15px; }
.recommendation-rationale { display: grid; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.recommendation-rationale li { position: relative; padding-left: 18px; color: #d2e5df; }
.recommendation-rationale li::before { position: absolute; top: .65em; left: 0; width: 7px; height: 7px; border-radius: 50%; content: ""; background: var(--gold); }
.recommendation-seal { display: grid; aspect-ratio: 1; place-items: center; border: 2px solid rgba(255, 255, 255, .34); border-radius: 25% 45% 25% 45%; color: var(--gold); font-family: var(--font-display); font-size: 5rem; font-weight: 900; transform: rotate(-4deg); }

/* Pricing and account */
.tier-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.tier-card { position: relative; display: flex; min-height: 440px; flex-direction: column; padding: 27px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.tier-card.is-featured { border: 2px solid var(--jade); box-shadow: var(--shadow); }
.tier-ribbon { position: absolute; top: -13px; left: 24px; padding: 5px 11px; border-radius: 999px; color: var(--white); background: var(--jade); font-size: .67rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.tier-card h2 { margin: 15px 0 8px; font-size: 1.55rem; }
.tier-audience { min-height: 50px; font-size: .84rem; }
.tier-price { margin: 10px 0 20px; color: var(--ink); font-size: 2rem; font-weight: 900; }
.tier-price small { color: var(--muted); font-size: .73rem; }
.tier-features { display: grid; gap: 10px; margin: 0 0 25px; padding: 0; list-style: none; color: var(--ink-soft); font-size: .84rem; }
.tier-features li { position: relative; padding-left: 18px; }
.tier-features li::before { position: absolute; top: .55em; left: 0; width: 7px; height: 7px; border-radius: 50%; content: ""; background: var(--jade); }
.tier-card .button { width: 100%; margin-top: auto; }
.pricing-section { margin-top: 90px; }
.bundle-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.bundle-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 25px; padding: 27px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.bundle-card h3 { margin-bottom: 8px; }
.bundle-card p { margin: 0; font-size: .87rem; }
.bundle-price { text-align: right; }
.bundle-price strong { display: block; font-size: 1.45rem; }
.bundle-price small { color: var(--muted); }
.pricing-note { display: grid; grid-template-columns: auto 1fr; gap: 20px; margin-top: 35px; padding: 25px; border: 1px solid #e6c67c; border-radius: var(--radius-sm); background: #fff9e9; }
.pricing-note > span { color: #9a6b06; font-family: var(--font-display); font-size: 2rem; }
.pricing-note p { margin: 4px 0 0; }
.account-shell { max-width: 960px; }
.account-guest, .account-dashboard { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); gap: 18px; }
.account-card { padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.account-card h2 { font-size: 1.75rem; }
.account-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.entitlement-list, .progress-list { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.entitlement-list li, .progress-list li { padding: 13px; border-radius: 10px; background: var(--paper); }

/* Compare, notifications, loading */
.compare-bar { position: fixed; z-index: 120; right: 24px; bottom: 24px; left: 24px; display: grid; max-width: 920px; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 16px; margin: auto; padding: 13px 16px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 18px; color: var(--white); background: rgba(19, 42, 39, .96); box-shadow: 0 18px 55px rgba(0, 0, 0, .22); backdrop-filter: blur(15px); }
.compare-bar > div:first-child { display: grid; }
.compare-bar > div:first-child span { color: #b7cec8; font-size: .72rem; }
.compare-chips { display: flex; overflow: hidden; gap: 7px; }
.compare-chip { max-width: 150px; overflow: hidden; padding: 6px 10px; border-radius: 999px; color: #d9e8e4; background: rgba(255, 255, 255, .09); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
dialog { border: 0; }
dialog::backdrop { background: rgba(10, 31, 28, .68); backdrop-filter: blur(5px); }
.compare-dialog { width: min(960px, calc(100% - 30px)); max-height: min(82vh, 760px); overflow: auto; padding: 30px; border-radius: var(--radius-lg); color: var(--ink); background: var(--paper); box-shadow: var(--shadow); }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.dialog-head h2 { margin: 0; font-size: 2rem; }
.comparison-table-wrap { overflow-x: auto; }
.comparison-table { width: 100%; border-collapse: collapse; background: var(--white); }
.comparison-table th, .comparison-table td { min-width: 180px; padding: 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.comparison-table th:first-child, .comparison-table td:first-child { min-width: 130px; color: var(--muted); font-size: .78rem; font-weight: 900; }
.toast-region { position: fixed; z-index: 300; right: 20px; bottom: 20px; display: grid; width: min(390px, calc(100% - 40px)); gap: 9px; }
.toast { padding: 14px 17px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 12px; color: var(--white); background: var(--ink); box-shadow: var(--shadow); animation: toast-in .22s ease both; }
.toast.error { background: #8f2d24; }
.toast.success { background: var(--jade); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.route-loading { position: fixed; z-index: 250; top: 76px; right: 0; left: 0; height: 3px; overflow: hidden; }
.route-loading span:first-child { display: block; width: 35%; height: 100%; background: var(--vermilion); animation: route-load 1s infinite ease-in-out; }
@keyframes route-load { from { transform: translateX(-120%); } to { transform: translateX(380%); } }
.error-panel { max-width: 720px; margin: 60px auto; padding: 35px; border: 1px solid #e2aaa2; border-radius: var(--radius); background: #fff1ef; text-align: center; }
.noscript { position: fixed; z-index: 500; right: 0; bottom: 0; left: 0; padding: 15px; color: var(--white); background: #8f2d24; text-align: center; }

/* Footer */
.site-footer { padding: 65px 0 25px; color: #d8e6e2; background: #0c2824; }
.footer-grid { display: grid; grid-template-columns: 1.5fr .65fr .65fr 1fr; gap: 45px; }
.brand-footer { color: var(--white); }
.footer-grid > div { display: flex; flex-direction: column; align-items: start; gap: 9px; }
.footer-grid p { max-width: 320px; color: #9fbbb4; font-size: .85rem; }
.footer-grid strong { color: var(--white); font-size: .85rem; }
.footer-grid a:not(.brand) { color: #afc7c1; font-size: .82rem; text-decoration: none; }
.footer-grid a:hover { color: var(--white); }
.footer-chinese { color: rgba(255, 255, 255, .18); font-family: var(--font-display); font-size: clamp(1.7rem, 3vw, 2.7rem); line-height: 1.35; }
.footer-bottom { display: flex; justify-content: space-between; margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .1); color: #7f9f97; font-size: .72rem; }

/* Admin */
.admin-body { background: #eef2ef; }
.admin-shell { width: min(1460px, calc(100% - 36px)); margin-inline: auto; }
.admin-header { border-bottom: 1px solid var(--line); background: var(--ink); color: var(--white); }
.admin-header-inner { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 25px; }
.admin-brand { display: flex; align-items: center; gap: 12px; }
.admin-brand > div { display: grid; line-height: 1.2; }
.admin-brand small { color: #9db9b2; font-size: .7rem; }
.admin-header nav { display: flex; gap: 22px; }
.admin-header nav a { color: #c3d7d2; font-size: .8rem; font-weight: 800; text-decoration: none; }
.admin-header nav a:hover { color: var(--white); }
.admin-main { padding: 45px 0 70px; }
.admin-page-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 27px; }
.admin-page-head h1 { margin-bottom: 9px; font-size: clamp(2.2rem, 4vw, 3.8rem); }
.admin-page-head p:last-child { margin: 0; }
.admin-sync { display: flex; min-width: 200px; align-items: center; gap: 10px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.admin-sync > span { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }
.admin-sync.is-ready > span { background: #3aa879; }
.admin-sync.is-error > span { background: var(--vermilion); }
.admin-sync > div { display: grid; line-height: 1.25; }
.admin-sync strong { font-size: .78rem; }
.admin-sync small { color: var(--muted); font-size: .66rem; }
.admin-summary { display: grid; grid-template-columns: repeat(6, 1fr); gap: 11px; margin-bottom: 18px; }
.admin-stat { padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: var(--white); }
.admin-stat strong { display: block; font-size: 1.55rem; }
.admin-stat span { color: var(--muted); font-size: .7rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.admin-stat .stat-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; }
.admin-commercial { margin: 0 0 18px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-sm); }
.admin-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.admin-section-heading h2 { margin: 2px 0 0; font-size: 1.45rem; }
.admin-section-heading > p { max-width: 620px; margin: 0; color: var(--muted); }
.admin-offer-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.admin-offer-columns h3 { margin: 0 0 9px; color: var(--muted); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.admin-offer-list { display: grid; gap: 8px; }
.admin-offer-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); }
.admin-offer-card div { display: grid; gap: 2px; }
.admin-offer-card div:last-child { flex: 0 0 auto; text-align: right; }
.admin-offer-card span,.admin-offer-card small,.admin-offer-empty { color: var(--muted); font-size: .78rem; }
.admin-studysets { margin: 0 0 18px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-sm); }
.admin-studyset-tools { display: grid; grid-template-columns: minmax(260px, 1fr) 150px; gap: 9px; margin-bottom: 16px; }
.admin-studyset-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.admin-studyset-grid > .admin-empty { grid-column: 1 / -1; }
.admin-studyset-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fbfcfb; }
.admin-studyset-card[open] { border-color: #9bc8bd; background: var(--white); box-shadow: var(--shadow-sm); }
.admin-studyset-card summary { display: grid; min-height: 148px; grid-template-columns: 132px minmax(0, 1fr) auto; align-items: stretch; gap: 15px; padding: 10px 13px 10px 10px; cursor: pointer; list-style: none; }
.admin-studyset-card summary::-webkit-details-marker { display: none; }
.admin-studyset-card[open] summary .lesson-chevron { transform: rotate(225deg); }
.admin-studyset-card summary > .lesson-chevron { align-self: center; }
.admin-studyset-image { display: grid; min-height: 126px; overflow: hidden; place-items: center; border-radius: 9px; color: var(--jade); background: var(--jade-pale); }
.admin-studyset-image img { width: 100%; height: 100%; object-fit: cover; }
.admin-studyset-glyph { font-family: var(--font-display); font-size: 3.6rem; font-weight: 900; }
.admin-studyset-heading { display: grid; min-width: 0; align-content: center; gap: 3px; }
.admin-studyset-heading > strong { overflow: hidden; font-family: var(--font-display); font-size: 1.25rem; text-overflow: ellipsis; white-space: nowrap; }
.admin-studyset-heading > small { overflow: hidden; color: var(--ink-soft); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.admin-studyset-heading > em { margin-top: 5px; color: var(--muted); font-size: .69rem; font-style: normal; font-weight: 800; }
.admin-set-pinyin { overflow: hidden; color: var(--jade); font-size: .76rem; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.admin-set-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.admin-set-meta b { padding: 3px 7px; border-radius: 999px; color: var(--vermilion-dark); background: #f8e4df; font-size: .65rem; }
.admin-set-meta i { color: var(--line-dark); font-family: var(--font-display); font-size: 1.3rem; font-style: normal; font-weight: 900; }
.admin-studyset-content { padding: 18px; border-top: 1px solid var(--line); }
.admin-studyset-content > p { margin: 0 0 15px; color: var(--ink-soft); font-size: .84rem; }
.admin-set-review-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.admin-set-review-head h3 { margin: 0; font-size: .96rem; }
.admin-set-review-head a { color: var(--jade); font-size: .72rem; font-weight: 850; }
.admin-scene-lines { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.admin-scene-lines li { display: grid; grid-template-columns: 25px minmax(0, 1fr); gap: 8px; padding: 11px; border-radius: 9px; background: var(--paper); }
.admin-line-number { color: var(--muted); font-size: .66rem; font-weight: 900; }
.admin-scene-lines strong { display: block; color: var(--vermilion-dark); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; }
.admin-scene-lines p { margin: 3px 0; font-family: var(--font-display); font-size: 1rem; font-weight: 800; }
.admin-scene-lines div > span { display: block; color: var(--jade); font-size: .74rem; font-weight: 800; }
.admin-scene-lines small { display: block; margin-top: 3px; color: var(--ink-soft); font-size: .72rem; line-height: 1.35; }
.admin-workspace { display: grid; min-height: 670px; grid-template-columns: 380px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-sm); }
.admin-catalog-panel { border-right: 1px solid var(--line); background: #f9fbf9; }
.admin-tools { display: grid; grid-template-columns: 1fr 125px; gap: 8px; padding: 14px; border-bottom: 1px solid var(--line); }
.admin-search, .admin-filter { min-width: 0; min-height: 42px; }
.admin-package-list { display: grid; max-height: 730px; overflow-y: auto; }
.admin-package-item { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 17px; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; color: var(--ink); background: transparent; text-align: left; }
.admin-package-item:hover, .admin-package-item.is-active { background: var(--white); }
.admin-package-item.is-active { box-shadow: inset 4px 0 var(--jade); }
.admin-package-item strong { display: block; margin-bottom: 4px; }
.admin-package-item small { color: var(--muted); }
.admin-package-item .status-badge { align-self: start; }
.status-badge.draft { color: #4f6060; background: #e4e9e7; }
.status-badge.review { color: #765500; background: #fff0c6; }
.status-badge.approved { color: #19594f; background: #dceee8; }
.status-badge.published { color: var(--white); background: var(--jade); }
.status-badge.archived { color: #6b5876; background: #eee8f1; }
.admin-empty { padding: 35px; text-align: center; }
.admin-empty p { margin: 4px 0 0; }
.admin-detail-panel { min-width: 0; padding: 32px; }
.admin-detail-placeholder { display: grid; min-height: 580px; place-content: center; text-align: center; }
.admin-detail-placeholder > span { color: var(--line-dark); font-family: var(--font-display); font-size: 5rem; }
.admin-detail-placeholder h2 { margin-bottom: 8px; font-size: 1.7rem; }
.admin-detail-head { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 25px; margin-bottom: 25px; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.admin-detail-head h2 { margin-bottom: 7px; font-size: 2.1rem; }
.admin-detail-head p { margin: 0; }
.admin-price { text-align: right; }
.admin-price strong { display: block; font-size: 1.8rem; }
.admin-price small { color: var(--muted); }
.readiness-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-bottom: 24px; }
.readiness-item { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.readiness-item span { display: block; color: var(--muted); font-size: .66rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.readiness-item strong { display: block; margin-top: 4px; font-size: .85rem; }
.readiness-item.is-ready strong { color: var(--jade); }
.readiness-item.is-blocked strong { color: var(--vermilion-dark); }
.admin-tabs { display: flex; gap: 6px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.admin-tabs button { padding: 10px 13px; border: 0; border-bottom: 3px solid transparent; cursor: pointer; color: var(--muted); background: transparent; font-size: .78rem; font-weight: 900; }
.admin-tabs button.is-active { border-bottom-color: var(--jade); color: var(--ink); }
.admin-tab-panel h3 { margin-top: 25px; font-size: 1.1rem; }
.admin-outcomes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }
.admin-outcomes li { padding: 12px; border-radius: 9px; background: var(--paper); font-size: .82rem; }
.admin-lesson-list { display: grid; gap: 8px; }
.admin-lesson { border: 1px solid var(--line); border-radius: 10px; }
.admin-lesson summary { display: grid; grid-template-columns: 35px 1fr auto; align-items: center; gap: 10px; padding: 13px; cursor: pointer; list-style: none; }
.admin-lesson summary::-webkit-details-marker { display: none; }
.admin-lesson > div { padding: 0 13px 14px 58px; }
.admin-lesson > div p { font-size: .82rem; }
.admin-set-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.admin-set-tags span { padding: 4px 7px; border-radius: 6px; background: var(--paper); font-size: .68rem; }
.admin-actions-panel { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 28px -32px -32px; padding: 15px 32px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .95); backdrop-filter: blur(10px); }
.admin-actions-panel .current-status { margin-right: auto; color: var(--muted); font-size: .75rem; }
.review-timeline { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.review-event { position: relative; padding: 0 0 18px 22px; border-left: 2px solid var(--line); }
.review-event::before { position: absolute; top: 3px; left: -6px; width: 10px; height: 10px; border-radius: 50%; content: ""; background: var(--jade); }
.review-event strong { display: block; font-size: .82rem; }
.review-event small { color: var(--muted); }
.review-event p { margin: 4px 0 0; font-size: .8rem; }
.admin-confirm { width: min(480px, calc(100% - 30px)); padding: 32px; border-radius: var(--radius); color: var(--ink); background: var(--white); text-align: center; }
.confirm-icon { display: grid; width: 62px; height: 62px; margin: 0 auto 17px; place-items: center; border: 2px solid var(--vermilion); border-radius: 8px 20px 8px 20px; color: var(--vermilion); font-family: var(--font-display); font-size: 1.9rem; font-weight: 900; }
.admin-confirm h2 { margin-bottom: 10px; font-size: 1.7rem; }
.note-field { display: grid; gap: 5px; margin-top: 20px; text-align: left; }
.note-field > span { font-size: .77rem; font-weight: 850; }
.note-field small { color: var(--muted); font-weight: 500; }
.note-field textarea { width: 100%; padding: 10px; border: 1px solid var(--line-dark); border-radius: 9px; resize: vertical; }
.confirm-actions { display: flex; justify-content: end; gap: 8px; margin-top: 20px; }
.skeleton-line, .admin-list-skeleton { min-height: 72px; background: linear-gradient(105deg, #edf1ef 30%, #fff 48%, #edf1ef 66%); background-size: 240% 100%; animation: shimmer 1.45s infinite linear; }

/* Responsive */
@media (max-width: 1080px) {
  .package-grid, .set-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tier-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(360px, .8fr); gap: 28px; }
  .hero-visual { min-height: 420px; }
  .persona-card { padding: 27px; }
  .persona-card .text-action { left: 27px; }
  .admin-workspace { grid-template-columns: 330px minmax(0, 1fr); }
  .readiness-grid { grid-template-columns: repeat(2, 1fr); }
  .guided-scene { grid-template-columns: 1fr; }
  .scene-frame { min-height: 520px; }
  .dialogue-transcript-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .header-inner { grid-template-columns: auto auto 1fr; }
  .mobile-menu { display: block; justify-self: end; }
  .primary-nav { position: fixed; z-index: 99; top: 76px; right: 0; left: 0; display: none; height: calc(100vh - 76px); align-content: start; padding: 30px 22px; background: var(--paper); }
  .primary-nav.is-open { display: grid; }
  .primary-nav a { padding: 13px 4px; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
  .primary-nav a::after { display: none; }
  .account-control { justify-self: end; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { max-width: 700px; }
  .hero-visual { max-width: 600px; min-height: 480px; margin: 0 auto; }
  .signal-grid { grid-template-columns: 1fr; }
  .signal-grid > div { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .13); }
  .split-heading { grid-template-columns: 1fr; gap: 8px; }
  .persona-grid { grid-template-columns: 1fr; }
  .persona-card { min-height: 280px; }
  .learning-loop { grid-template-columns: 1fr; }
  .loop-copy { position: static; }
  .start-panel { grid-template-columns: auto 1fr; }
  .start-panel .button { grid-column: 1 / -1; }
  .catalog-toolbar { align-items: stretch; flex-direction: column; }
  .detail-hero-grid, .package-body-grid { grid-template-columns: 1fr; }
  .purchase-card { max-width: 500px; }
  .package-sidebar { position: static; }
  .library-header { align-items: start; flex-direction: column; }
  .library-toolbar { align-items: stretch; flex-wrap: wrap; }
  .search-field { flex-basis: 100%; }
  .phrase-study-grid { grid-template-columns: 1fr; }
  .dialogue-transcript { grid-template-columns: 1fr; }
  .practice-section-head { align-items: start; grid-template-columns: 1fr; gap: 8px; }
  .tier-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
  .footer-chinese { grid-column: 1 / -1; }
  .admin-page-head { align-items: start; flex-direction: column; }
  .admin-summary { grid-template-columns: repeat(3, 1fr); }
  .admin-section-heading { display: block; }
  .admin-section-heading > p { margin-top: 8px; }
  .admin-offer-columns { grid-template-columns: 1fr; }
  .admin-studyset-grid { grid-template-columns: 1fr; }
  .admin-workspace { grid-template-columns: 1fr; overflow: visible; }
  .admin-catalog-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-package-list { max-height: 390px; }
}

@media (max-width: 620px) {
  .shell, .admin-shell { width: min(100% - 26px, var(--shell)); }
  .header-inner { gap: 10px; }
  .brand-copy { display: none; }
  .account-control { margin-left: auto; }
  .hero { padding-top: 45px; }
  .hero h1 { font-size: clamp(2.65rem, 13vw, 4.2rem); }
  .hero-actions .button { width: 100%; }
  .hero-visual { min-height: 370px; }
  .phrase-card { min-width: 145px; padding: 10px 12px; }
  .phrase-card-two { right: 0; }
  .signal-grid > div { padding-inline: 5px; }
  .package-grid, .set-grid, .tier-grid, .bundle-grid { grid-template-columns: 1fr; }
  .package-card { min-height: 365px; }
  .start-panel { display: block; }
  .start-seal { width: 65px; height: 65px; margin-bottom: 20px; }
  .start-panel .button { width: 100%; margin-top: 17px; }
  .filter-pills { display: grid; grid-template-columns: repeat(2, 1fr); }
  .filter-pills button { width: 100%; }
  .detail-meta { display: grid; grid-template-columns: repeat(2, 1fr); }
  .outcome-panel { grid-template-columns: 1fr; }
  .lesson-card summary { grid-template-columns: 38px 1fr auto; padding: 14px; }
  .lesson-number { width: 34px; height: 34px; }
  .lesson-content { padding: 0 14px 17px; }
  .lesson-set { align-items: start; flex-direction: column; }
  .study-head { align-items: start; grid-template-columns: 1fr; }
  .study-progress { width: 100%; }
  .guided-scene { border-radius: var(--radius); }
  .scene-frame { min-height: 440px; }
  .scene-bubble { width: 68%; min-height: 112px; padding: 15px 17px; border-radius: 28px; }
  .scene-bubble:not(.is-current) { display: none; }
  .scene-bubble.is-left { bottom: 8%; left: 4%; }
  .scene-bubble.is-right { top: 5%; right: 4%; }
  .scene-bubble strong { font-size: 1.16rem; }
  .dialogue-player { padding: 24px 18px; }
  .dialogue-player-head { gap: 10px; }
  .selected-dialogue { margin: 24px 0 20px; padding: 18px; }
  .dialogue-controls { grid-template-columns: repeat(2, 1fr); }
  .dialogue-options { grid-template-columns: 1fr; }
  .dialogue-transcript-wrap { padding: 22px 18px; }
  .study-complete { align-items: stretch; flex-direction: column; }
  .placement-card { border-radius: var(--radius); }
  .placement-result-grid { grid-template-columns: 1fr; }
  .recommendation-seal { display: none; }
  .bundle-card { grid-template-columns: 1fr; }
  .bundle-price { text-align: left; }
  .account-guest, .account-dashboard { grid-template-columns: 1fr; }
  .compare-bar { right: 12px; bottom: 12px; left: 12px; grid-template-columns: 1fr auto auto; }
  .compare-chips { display: none; }
  .compare-dialog { padding: 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child, .footer-chinese { grid-column: 1 / -1; }
  .footer-bottom { align-items: start; flex-direction: column; gap: 6px; }
  .admin-header nav a:first-child { display: none; }
  .admin-page-head h1 { font-size: 2.5rem; }
  .admin-summary { grid-template-columns: repeat(2, 1fr); }
  .admin-tools { grid-template-columns: 1fr; }
  .admin-studysets { padding: 18px; }
  .admin-studyset-tools { grid-template-columns: 1fr; }
  .admin-studyset-card summary { min-height: 116px; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 11px; padding: 9px; }
  .admin-studyset-image { min-height: 98px; }
  .admin-studyset-heading > strong { font-size: 1.08rem; }
  .admin-studyset-content { padding: 14px; }
  .admin-detail-panel { padding: 20px; }
  .admin-detail-head { grid-template-columns: 1fr; }
  .admin-price { text-align: left; }
  .readiness-grid, .admin-outcomes { grid-template-columns: 1fr; }
  .admin-actions-panel { margin: 25px -20px -20px; padding: 13px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
