/* =========================================================
   慕真英语 · 成人英语900句
   Warm editorial design system
   Typography scale: all font sizes are enlarged 1.5x
   ========================================================= */

:root {
  --ink: #182a22;
  --ink-soft: #45564c;
  --muted: #626d64;
  --cream: #f7f2e8;
  --cream-deep: #eee5d5;
  --paper: #fffdf7;
  --green: #173e31;
  --green-soft: #2b5b47;
  --coral: #e96743;
  --coral-deep: #c94c2a;
  --gold: #e9bd55;
  --line: rgba(24, 42, 34, 0.14);
  --line-strong: rgba(24, 42, 34, 0.28);
  --font-sans: "Aptos", "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --font-serif: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Songti SC", "STSong", serif;
  --header-h: 78px;
  --radius: 24px;
  --shadow: 0 20px 60px rgba(24, 42, 34, 0.1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 24px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

::selection {
  background: var(--coral);
  color: var(--paper);
}

img,
svg {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
h1,
h2,
h3,
h4,
blockquote,
figure {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

.icon {
  display: block;
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: fixed;
  left: 18px;
  top: 14px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--green);
  color: var(--cream);
  font-size: 21px;
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}

.container {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.container--narrow {
  width: min(920px, calc(100% - 48px));
}

.section {
  padding: 104px 0;
}

.section--tight {
  padding: 72px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(233, 103, 67, 0.12);
}

.eyebrow--light {
  color: rgba(247, 242, 232, 0.7);
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-kicker .num {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-serif);
  font-size: 16.5px;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.section-title {
  font-size: clamp(51px, 6.6vw, 87px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.12;
  text-wrap: balance;
}

.section-title .italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.section-lead {
  max-width: 330px;
  padding-bottom: 8px;
  color: var(--ink-soft);
  font-size: 22.5px;
  line-height: 1.85;
  text-wrap: balance;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 42px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--green);
  color: var(--cream);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.015em;
  line-height: 1.2;
  transition: transform 0.25s var(--ease), background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
  background: var(--green-soft);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(23, 62, 49, 0.18);
}

.btn .icon {
  width: 17px;
  height: 17px;
  transition: transform 0.25s var(--ease);
}

.btn:hover .icon--arrow {
  transform: translateX(4px);
}

.btn--coral {
  background: var(--coral);
  color: #fffaf0;
}

.btn--coral:hover {
  background: var(--coral-deep);
}

.btn--outline {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.btn--outline:hover {
  background: var(--paper);
  box-shadow: none;
}

.btn--light {
  background: var(--cream);
  color: var(--green);
}

.btn--light:hover {
  background: #fffdf7;
}

.btn--small {
  min-height: 42px;
  padding: 10px 16px;
  font-size: 19.5px;
}

.btn--block {
  width: 100%;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line-strong);
  font-size: 20.25px;
  font-weight: 700;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.text-link .icon {
  width: 15px;
  height: 15px;
  transition: transform 0.25s var(--ease);
}

.text-link:hover {
  color: var(--coral-deep);
  border-color: var(--coral);
}

.text-link:hover .icon {
  transform: translate(2px, -2px);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 253, 247, 0.6);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.icon-btn:hover {
  background: var(--paper);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.icon-btn .icon {
  width: 18px;
  height: 18px;
}

/* ---------- site header ---------- */

#site-header {
  min-height: var(--header-h);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  min-height: var(--header-h);
  border-bottom: 1px solid transparent;
  background: rgba(247, 242, 232, 0.82);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  background: rgba(247, 242, 232, 0.95);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: max-content;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50% 50% 50% 9px;
  background: var(--green);
  color: var(--cream);
  font-family: var(--font-serif);
  font-size: 37.5px;
  line-height: 1;
  transform: rotate(-3deg);
  transition: transform 0.3s var(--ease);
}

.brand-mark::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
}

.brand:hover .brand-mark {
  transform: rotate(3deg) scale(1.03);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-copy strong {
  font-size: 25.5px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.25;
}

.brand-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.4;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  position: relative;
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 19.5px;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover {
  color: var(--ink);
  background: rgba(255, 253, 247, 0.65);
}

.main-nav a.is-active {
  color: var(--ink);
}

.main-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--coral);
  transform: translateX(-50%);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.search-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 8px 10px 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.48);
  color: var(--muted);
  font-size: 18.75px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.search-trigger:hover {
  background: var(--paper);
  border-color: var(--line-strong);
  color: var(--ink);
}

.search-trigger .icon {
  width: 16px;
  height: 16px;
}

.search-trigger kbd {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--cream);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1;
}

.header-cta {
  min-height: 40px;
  padding: 9px 17px;
  font-size: 18.75px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  place-items: center;
}

.mobile-menu {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 79;
  display: none;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 20px 24px 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 242, 232, 0.98);
  box-shadow: 0 24px 50px rgba(24, 42, 34, 0.12);
  transform: translateY(-12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, transform 0.22s var(--ease), visibility 0.22s;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
}

.mobile-menu nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 27px;
  font-weight: 750;
  letter-spacing: -0.025em;
}

.mobile-menu nav a .icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.mobile-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 18px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--muted);
  font-size: 21px;
  text-align: left;
}

.mobile-menu-note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 16.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- home hero ---------- */

.hero {
  position: relative;
  padding: 58px 0 82px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -230px;
  right: -210px;
  width: 620px;
  height: 620px;
  border: 1px solid rgba(24, 42, 34, 0.13);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  top: 120px;
  right: 41%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 6px rgba(233, 189, 85, 0.16);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.hero-head {
  position: relative;
  z-index: 3;
}

.hero-lower {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(430px, 1.14fr);
  align-items: center;
  gap: 50px;
}

.hero-copy {
  position: relative;
  z-index: 3;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px 6px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.45);
  color: var(--ink-soft);
  font-size: 15.75px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.hero-kicker .chip {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--green);
  color: var(--cream);
  font-size: 13.5px;
  letter-spacing: 0.08em;
}

.hero h1 {
  margin: 24px 0 22px;
  font-size: clamp(84px, 10.05vw, 141px);
  font-weight: 800;
  letter-spacing: -0.075em;
  line-height: 1.02;
  text-wrap: balance;
}

.hero .hero-title {
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  margin: 24px 0 12px;
  font-size: clamp(64px, 10.2vw, 141px);
  font-weight: 800;
  letter-spacing: -0.075em;
  line-height: 0.96;
  white-space: nowrap;
}

.hero-title-words,
.hero-title-number,
.hero-title-unit {
  flex: none;
}

.hero-title-number {
  margin-left: 0.035em;
  margin-right: 0.01em;
  color: var(--coral);
  font-family: var(--font-serif);
  font-size: 1.04em;
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.hero-slogan {
  margin: 0 0 30px;
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: clamp(26px, 2.35vw, 36px);
  font-style: italic;
  letter-spacing: -0.02em;
  line-height: 1.35;
  text-wrap: balance;
}

.hero-slogan em {
  color: var(--ink);
  font-style: italic;
}

.hero-sub {
  max-width: 560px;
  color: var(--ink-soft);
  font-size: 24px;
  line-height: 1.9;
  text-wrap: balance;
}

.hero-sub strong {
  color: var(--ink);
  font-weight: 750;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin-top: 32px;
}

.hero-actions .btn {
  min-height: 56px;
  padding-inline: 25px;
}

.hero-audio-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 17.25px;
}

.hero-audio-note .sound-waves {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 14px;
}

.hero-audio-note .sound-waves i {
  display: block;
  width: 2px;
  border-radius: 2px;
  background: var(--coral);
  animation: sound-wave 1.4s ease-in-out infinite;
}

.hero-audio-note .sound-waves i:nth-child(1) {
  height: 5px;
  animation-delay: -0.2s;
}

.hero-audio-note .sound-waves i:nth-child(2) {
  height: 11px;
  animation-delay: -0.7s;
}

.hero-audio-note .sound-waves i:nth-child(3) {
  height: 7px;
  animation-delay: -0.4s;
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 18px;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-meta b {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 25.5px;
  font-weight: 600;
}

.hero-meta i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
}

@keyframes sound-wave {
  0%, 100% { transform: scaleY(0.55); }
  50% { transform: scaleY(1); }
}

/* ---------- hero stage ---------- */

.hero-stage {
  position: relative;
  width: 100%;
  height: 548px;
  isolation: isolate;
}

.stage-blob {
  position: absolute;
  top: 46px;
  left: 42px;
  right: 0;
  bottom: 46px;
  border-radius: 46% 54% 38% 62% / 58% 42% 58% 42%;
  background: #ebdfc9;
  transform: rotate(5deg);
}

.stage-blob::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px dashed rgba(24, 42, 34, 0.2);
  border-radius: inherit;
}

.stage-grid {
  position: absolute;
  left: 0;
  right: 14%;
  bottom: 8%;
  height: 210px;
  background-image: radial-gradient(rgba(24, 42, 34, 0.25) 1px, transparent 1px);
  background-size: 14px 14px;
  -webkit-mask-image: linear-gradient(to top, #000, transparent);
  mask-image: linear-gradient(to top, #000, transparent);
  opacity: 0.5;
}

.hero-stamp {
  position: absolute;
  z-index: 6;
  top: 10px;
  left: 21%;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  text-align: center;
  transform: rotate(10deg);
  box-shadow: 4px 5px 0 rgba(24, 42, 34, 0.12);
}

.hero-stamp strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 45px;
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 0.9;
}

.hero-stamp span {
  display: block;
  margin-top: 2px;
  font-size: 11.25px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.hero-spark {
  position: absolute;
  z-index: 5;
  top: 218px;
  left: 3px;
  color: var(--coral);
  font-family: var(--font-serif);
  font-size: 57px;
  line-height: 1;
  transform: rotate(-12deg);
}

.hero-sticker {
  position: absolute;
  z-index: 4;
  left: 36px;
  bottom: 5px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-sticker .icon {
  width: 15px;
  height: 15px;
  color: var(--coral);
}

.phrase-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(24, 42, 34, 0.38);
  border-radius: 22px;
  padding: 22px 22px 18px;
  box-shadow: 7px 9px 0 rgba(24, 42, 34, 0.11);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.phrase-card:hover {
  box-shadow: 9px 13px 0 rgba(24, 42, 34, 0.12);
}

.phrase-card .phrase-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(24, 42, 34, 0.16);
  color: var(--ink-soft);
  font-size: 12.75px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.phrase-card .phrase-top span:last-child {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.05em;
  font-style: italic;
  text-transform: none;
}

.phrase-card .phrase-en {
  margin: 18px 0 10px;
  font-family: var(--font-serif);
  font-size: 34.5px;
  line-height: 1.35;
  letter-spacing: -0.025em;
}

.phrase-card .phrase-zh {
  color: rgba(24, 42, 34, 0.68);
  font-size: 18px;
  line-height: 1.7;
}

.phrase-card .phrase-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(24, 42, 34, 0.16);
}

.phrase-card .phrase-foot > span {
  color: rgba(24, 42, 34, 0.58);
  font-family: var(--font-serif);
  font-size: 15px;
  font-style: italic;
}

.mini-play {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 10px 5px 7px;
  border: 1px solid rgba(24, 42, 34, 0.3);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.38);
  font-size: 14.25px;
  font-weight: 750;
  letter-spacing: 0.05em;
  transition: background 0.2s ease, transform 0.2s ease;
}

.mini-play:hover {
  background: var(--paper);
  transform: translateY(-1px);
}

.mini-play .icon {
  width: 14px;
  height: 14px;
}

.mini-play.is-playing .icon {
  animation: pulse-play 0.8s ease-in-out infinite alternate;
}

@keyframes pulse-play {
  from { opacity: 0.35; }
  to { opacity: 1; }
}

.phrase-card--main {
  z-index: 4;
  top: 100px;
  left: 0;
  width: min(360px, 84%);
  background: var(--paper);
  transform: rotate(-5.5deg);
}

.phrase-card--main:hover {
  transform: rotate(-2deg) translateY(-5px);
}

.phrase-card--main .phrase-en {
  font-size: 39px;
}

.phrase-card--yellow {
  z-index: 2;
  top: 34px;
  right: 1px;
  width: 250px;
  min-height: 174px;
  background: var(--gold);
  transform: rotate(7deg);
}

.phrase-card--yellow:hover {
  transform: rotate(3deg) translateY(-4px);
}

.phrase-card--yellow .phrase-en {
  margin: 14px 0 0;
  font-size: 27px;
}

.phrase-card--yellow .phrase-zh {
  margin-top: 7px;
  font-size: 15.75px;
}

.phrase-card--mint {
  z-index: 3;
  right: 0;
  bottom: 22px;
  width: 270px;
  background: #dce9d5;
  transform: rotate(-2deg);
}

.phrase-card--mint:hover {
  transform: rotate(0deg) translateY(-5px);
}

.phrase-card--mint .phrase-en {
  margin: 14px 0 0;
  font-size: 31.5px;
}

.phrase-card--mint .phrase-zh {
  margin-top: 6px;
}

/* ---------- marquee ---------- */

.ticker {
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(247, 242, 232, 0.14);
  border-bottom: 1px solid rgba(247, 242, 232, 0.14);
  background: var(--green);
  color: var(--cream);
}

.ticker-track {
  display: flex;
  align-items: center;
  width: max-content;
  padding: 17px 0;
  animation: ticker-scroll 42s linear infinite;
}

.ticker:hover .ticker-track {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding-right: 26px;
  white-space: nowrap;
}

.ticker-item b {
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
}

.ticker-item span {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ticker-item i {
  color: rgba(247, 242, 232, 0.5);
  font-family: var(--font-serif);
  font-size: 19.5px;
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
}

@keyframes ticker-scroll {
  to { transform: translateX(-50%); }
}

/* ---------- scene library ---------- */

.scene-library {
  padding-top: 96px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin: -4px 0 13px;
}

.scene-count-note {
  margin-bottom: 25px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 18px;
  font-weight: 650;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-chip span {
  font-family: var(--font-serif);
  font-size: 15px;
  opacity: 0.55;
}

.filter-chip:hover {
  border-color: var(--line-strong);
  background: var(--paper);
  color: var(--ink);
}

.filter-chip.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--cream);
}

.filter-chip.is-active span {
  opacity: 0.65;
}

.scene-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.scene-card {
  --bg: #e5dfd2;
  --accent: var(--green);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 315px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(24, 42, 34, 0.16);
  border-radius: 24px;
  background: var(--bg);
  isolation: isolate;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s ease;
}

.scene-card.is-hidden {
  display: none;
}

.scene-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -54px;
  bottom: 18px;
  width: 152px;
  height: 152px;
  border: 1px solid rgba(24, 42, 34, 0.16);
  border-radius: 50%;
  transition: transform 0.5s var(--ease);
}

.scene-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: 23px;
  bottom: 94px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(24, 42, 34, 0.18);
  border-radius: 50% 50% 8px 50%;
  transform: rotate(18deg);
}

.scene-card:hover {
  z-index: 2;
  border-color: rgba(24, 42, 34, 0.32);
  transform: translateY(-5px);
  box-shadow: 8px 11px 0 rgba(24, 42, 34, 0.09);
}

.scene-card:hover::before {
  transform: scale(1.12) rotate(10deg);
}

.scene-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.scene-no {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1;
}

.scene-no small {
  color: rgba(24, 42, 34, 0.5);
  font-family: var(--font-sans);
  font-size: 11.25px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.scene-icon-box {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(24, 42, 34, 0.17);
  border-radius: 50%;
  background: rgba(255, 253, 247, 0.35);
  color: var(--accent);
  transition: background 0.25s ease, transform 0.35s var(--ease);
}

.scene-card:hover .scene-icon-box {
  background: rgba(255, 253, 247, 0.75);
  transform: rotate(-6deg);
}

.scene-icon-box .icon {
  width: 22px;
  height: 22px;
}

.scene-copy {
  margin-top: auto;
  padding-top: 36px;
}

.scene-copy .en {
  margin-bottom: 5px;
  color: rgba(24, 42, 34, 0.51);
  font-family: var(--font-serif);
  font-size: 18px;
  font-style: italic;
}

.scene-copy h3 {
  font-size: 40.5px;
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1.25;
}

.scene-sample {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-top: 11px;
  color: rgba(24, 42, 34, 0.72);
  font-family: var(--font-serif);
  font-size: 20.25px;
  line-height: 1.55;
}

.scene-sample::before {
  content: "“";
}

.scene-sample::after {
  content: "”";
}

.scene-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 21px;
  padding-top: 13px;
  border-top: 1px solid rgba(24, 42, 34, 0.14);
  color: rgba(24, 42, 34, 0.62);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.scene-foot .round-arrow {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid rgba(24, 42, 34, 0.23);
  border-radius: 50%;
  color: var(--accent);
  transition: background 0.25s ease, color 0.25s ease, transform 0.3s var(--ease);
}

.scene-foot .round-arrow .icon {
  width: 13px;
  height: 13px;
}

.scene-card:hover .round-arrow {
  background: var(--ink);
  color: var(--cream);
  transform: rotate(45deg);
}

/* ---------- method ---------- */

.method-section {
  padding: 0 0 104px;
}

.method-panel {
  position: relative;
  overflow: hidden;
  padding: 66px 58px 0;
  border-radius: 34px;
  background: var(--green);
  color: var(--cream);
  isolation: isolate;
}

.method-panel::before {
  content: "SAY IT";
  position: absolute;
  z-index: -1;
  right: -28px;
  top: -50px;
  color: transparent;
  font-family: var(--font-serif);
  font-size: 360px;
  font-style: italic;
  letter-spacing: -0.08em;
  line-height: 1;
  opacity: 0.11;
  -webkit-text-stroke: 1px var(--cream);
  pointer-events: none;
}

.method-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -130px;
  bottom: -210px;
  width: 450px;
  height: 450px;
  border: 1px solid rgba(247, 242, 232, 0.14);
  border-radius: 50%;
}

.method-head {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
}

.method-head .section-kicker {
  flex-wrap: nowrap;
  white-space: nowrap;
  color: rgba(247, 242, 232, 0.55);
}

.method-head .section-kicker .num {
  border-color: rgba(247, 242, 232, 0.24);
  color: var(--cream);
}

.method-head .section-title {
  max-width: 960px;
}

.method-head p {
  max-width: 700px;
  padding-bottom: 0;
  color: rgba(247, 242, 232, 0.62);
  font-size: 21px;
  line-height: 1.8;
  text-wrap: balance;
}

.method-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(247, 242, 232, 0.17);
}

.method-step {
  position: relative;
  padding: 30px 24px 38px 0;
}

.method-step + .method-step {
  padding-left: 24px;
  border-left: 1px solid rgba(247, 242, 232, 0.17);
}

.method-step .step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.method-step .step-num {
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 37.5px;
  font-style: italic;
  line-height: 1;
}

.method-step .step-en {
  color: rgba(247, 242, 232, 0.4);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.method-step h3 {
  margin: 26px 0 10px;
  font-size: 31.5px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.method-step p {
  max-width: 275px;
  color: rgba(247, 242, 232, 0.62);
  font-size: 19.5px;
  line-height: 1.8;
}

.method-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 4px;
  padding: 18px 0 21px;
  border-top: 1px solid rgba(247, 242, 232, 0.17);
  color: rgba(247, 242, 232, 0.47);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.method-foot span:nth-child(2) {
  color: var(--gold);
}

/* ---------- practice / progress + daily ---------- */

.practice-section {
  padding: 0 0 104px;
}

.practice-grid {
  display: grid;
  grid-template-columns: 0.93fr 1.07fr;
  gap: 16px;
}

.progress-panel {
  display: flex;
  flex-direction: column;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
}

.progress-top {
  display: flex;
  align-items: center;
  gap: 22px;
}

.progress-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  flex: none;
}

.progress-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-ring .ring-bg {
  fill: none;
  stroke: var(--cream-deep);
  stroke-width: 6;
}

.progress-ring .ring-value {
  fill: none;
  stroke: var(--coral);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s var(--ease);
}

.progress-ring .ring-label {
  position: relative;
  z-index: 1;
  text-align: center;
}

.progress-ring .ring-label strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 37.5px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.progress-ring .ring-label span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.progress-title .eyebrow {
  margin-bottom: 8px;
}

.progress-title h3 {
  font-size: 36px;
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1.25;
}

.progress-title p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 18px;
}

.progress-numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 27px 0 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.progress-numbers > div {
  padding: 16px 12px 15px 0;
}

.progress-numbers > div + div {
  padding-left: 17px;
  border-left: 1px solid var(--line);
}

.progress-numbers strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 43.5px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.progress-numbers span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
}

.progress-panel .btn {
  margin-top: auto;
}

.progress-panel .panel-note {
  display: flex;
  justify-content: center;
  gap: 13px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 15px;
}

.progress-panel .panel-note a:hover {
  color: var(--coral-deep);
}

.daily-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 30px;
  overflow: hidden;
  border: 1px solid rgba(24, 42, 34, 0.28);
  border-radius: 28px;
  background: var(--gold);
  color: var(--ink);
  isolation: isolate;
}

.daily-panel::before {
  content: "“";
  position: absolute;
  z-index: -1;
  right: 13px;
  top: -30px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 435px;
  line-height: 1;
  opacity: 0.1;
  transform: rotate(7deg);
}

.daily-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -35px;
  bottom: -88px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(24, 42, 34, 0.16);
  border-radius: 50%;
}

.daily-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(24, 42, 34, 0.2);
}

.daily-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.daily-label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral-deep);
}

.daily-scene {
  color: rgba(24, 42, 34, 0.55);
  font-family: var(--font-serif);
  font-size: 15px;
  font-style: italic;
}

.daily-quote {
  margin: 26px 0 10px;
  font-family: var(--font-serif);
  font-size: clamp(37.5px, 3.975vw, 52.5px);
  letter-spacing: -0.035em;
  line-height: 1.35;
}

.daily-translation {
  max-width: 440px;
  color: rgba(24, 42, 34, 0.65);
  font-size: 19.5px;
  line-height: 1.7;
  text-wrap: balance;
}

.daily-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 24px;
}

.pill-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid rgba(24, 42, 34, 0.27);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.18);
  color: var(--ink);
  font-size: 15.75px;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease;
}

.pill-action:hover {
  background: rgba(255, 253, 247, 0.42);
  transform: translateY(-1px);
}

.pill-action .icon {
  width: 14px;
  height: 14px;
}

.pill-action.is-active {
  background: var(--ink);
  color: var(--cream);
}

.pill-action.is-active .icon {
  fill: currentColor;
}

.daily-actions .text-link {
  margin-left: auto;
  border-color: rgba(24, 42, 34, 0.33);
  font-size: 15.75px;
}

.daily-actions .text-link:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* ---------- footer ---------- */

#site-footer {
  background: var(--green);
  color: var(--cream);
}

.site-footer {
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  right: -110px;
  top: -190px;
  width: 440px;
  height: 440px;
  border: 1px solid rgba(247, 242, 232, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 0.6fr 0.6fr;
  gap: 60px;
  padding: 66px 0 52px;
}

.footer-brand .brand-mark {
  background: var(--cream);
  color: var(--green);
}

.footer-brand .brand-mark::after {
  background: var(--coral);
}

.footer-brand .brand-copy strong {
  color: var(--cream);
}

.footer-brand .brand-copy small {
  color: rgba(247, 242, 232, 0.47);
}

.footer-lead {
  max-width: 510px;
  margin-top: 25px;
  color: rgba(247, 242, 232, 0.65);
  font-family: var(--font-serif);
  font-size: clamp(33px, 3vw, 42px);
  line-height: 1.5;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.footer-lead em {
  color: var(--gold);
}

.footer-links h4 {
  margin-bottom: 17px;
  color: rgba(247, 242, 232, 0.42);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: rgba(247, 242, 232, 0.7);
  font-size: 18.75px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--cream);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0 22px;
  border-top: 1px solid rgba(247, 242, 232, 0.15);
  color: rgba(247, 242, 232, 0.5);
  font-size: 14.25px;
  letter-spacing: 0.04em;
}

.footer-legal {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 16px;
}

.footer-icp {
  color: rgba(247, 242, 232, 0.62);
  font-variant-numeric: tabular-nums;
  text-decoration: underline;
  text-decoration-color: rgba(247, 242, 232, 0.26);
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.footer-icp:hover {
  color: var(--gold);
  text-decoration-color: var(--gold);
}

.footer-bottom .footer-motto {
  color: rgba(247, 242, 232, 0.6);
  font-family: var(--font-serif);
  font-size: 16.5px;
  font-style: italic;
  letter-spacing: 0;
}

/* ---------- search overlay ---------- */

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
}

.search-overlay.is-open {
  display: block;
}

.search-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 28, 22, 0.46);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  animation: fade-in 0.2s ease both;
}

.search-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(740px, calc(100% - 32px));
  max-height: min(74vh, 720px);
  margin: 9vh auto 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: var(--paper);
  box-shadow: 0 30px 90px rgba(16, 30, 23, 0.3);
  animation: dialog-in 0.3s var(--ease) both;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.search-field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
}

.search-field .icon {
  width: 19px;
  height: 19px;
  color: var(--muted);
}

.search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 25.5px;
}

.search-field input::placeholder {
  color: #9a9d93;
}

.scene-search input::-webkit-search-cancel-button,
.scene-search input::-webkit-search-decoration,
.search-field input::-webkit-search-cancel-button,
.search-field input::-webkit-search-decoration {
  display: none;
  -webkit-appearance: none;
  appearance: none;
}

.search-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--cream);
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.search-close:hover {
  border-color: var(--line-strong);
  background: var(--paper);
  color: var(--ink);
}

.search-close .icon {
  width: 16px;
  height: 16px;
}

.search-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px 5px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.search-meta span:last-child {
  font-family: var(--font-serif);
  font-style: italic;
}

.search-results {
  overflow-y: auto;
  padding: 8px 10px 14px;
  overscroll-behavior: contain;
}

.search-results::-webkit-scrollbar {
  width: 8px;
}

.search-results::-webkit-scrollbar-thumb {
  background: var(--cream-deep);
  border: 2px solid var(--paper);
  border-radius: 10px;
}

.search-suggestions {
  padding: 14px 10px 8px;
}

.search-suggestions h3 {
  margin-bottom: 11px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.search-chip {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 16.5px;
  transition: background 0.2s ease;
}

.search-chip:hover {
  background: var(--cream);
}

.search-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}

.search-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.search-preview:hover {
  background: var(--cream);
  border-color: var(--line-strong);
}

.search-preview .preview-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--cream);
}

.search-preview .preview-icon .icon {
  width: 17px;
  height: 17px;
}

.search-preview strong {
  display: block;
  font-size: 18.75px;
  font-weight: 700;
}

.search-preview span {
  display: block;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 15.75px;
  font-style: italic;
}

.search-result {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 13px 12px;
  border-radius: 13px;
  transition: background 0.18s ease;
}

.search-result:hover,
.search-result.is-focused {
  background: var(--cream);
}

.search-result .result-tag {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 120px;
  flex: none;
  padding-top: 2px;
}

.search-result .result-scene {
  font-size: 14.25px;
  font-weight: 750;
  letter-spacing: 0.025em;
}

.search-result .result-scene-no {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 13.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result .result-content {
  display: block;
  flex: 1;
  min-width: 0;
}

.search-result .result-en {
  display: block;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1.4;
}

.search-result .result-en mark {
  border-radius: 2px;
  background: rgba(233, 189, 85, 0.47);
  color: inherit;
}

.search-result .result-zh {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 17.25px;
  line-height: 1.5;
}

.search-result .result-arrow {
  margin-top: 7px;
  color: var(--muted);
}

.search-result .result-arrow .icon {
  width: 14px;
  height: 14px;
}

.search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 230px;
  padding: 30px;
  text-align: center;
}

.search-empty .icon {
  width: 30px;
  height: 30px;
  color: var(--coral);
}

.search-empty strong {
  font-size: 24px;
}

.search-empty span {
  color: var(--muted);
  font-size: 18px;
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: calc(100% - 32px);
  padding: 11px 17px;
  border: 1px solid rgba(247, 242, 232, 0.15);
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  box-shadow: 0 15px 40px rgba(24, 42, 34, 0.25);
  font-size: 18px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 0.25s ease, transform 0.25s var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast .icon {
  width: 15px;
  height: 15px;
  color: var(--gold);
}

/* =========================================================
   Scene page
   ========================================================= */

.scene-hero {
  --tint: #dde9d2;
  --accent: #2e5d45;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--tint);
  isolation: isolate;
}

.scene-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: 9%;
  bottom: -155px;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(24, 42, 34, 0.16);
  border-radius: 50%;
}

.scene-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: 12%;
  bottom: 88px;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(24, 42, 34, 0.22);
  border-radius: 50% 50% 10px 50%;
  transform: rotate(22deg);
}

.scene-hero-inner {
  position: relative;
  z-index: 1;
  padding: 26px 0 54px;
}

.scene-ghost {
  position: absolute;
  z-index: 0;
  top: 10px;
  right: 3%;
  color: transparent;
  font-family: var(--font-serif);
  font-size: clamp(300px, 33vw, 465px);
  font-weight: 500;
  letter-spacing: -0.09em;
  line-height: 0.85;
  opacity: 0.75;
  -webkit-text-stroke: 1px rgba(24, 42, 34, 0.17);
  pointer-events: none;
  user-select: none;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(24, 42, 34, 0.6);
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.breadcrumb:hover {
  color: var(--ink);
}

.breadcrumb .icon {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.breadcrumb:hover .icon {
  transform: translateX(-3px);
}

.scene-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  align-items: end;
  gap: 40px;
  margin-top: 48px;
}

.scene-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.scene-kicker .scene-code {
  display: inline-grid;
  place-items: center;
  min-width: 39px;
  height: 22px;
  padding: 0 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 0.04em;
}

.scene-kicker .scene-kicker-line {
  width: 30px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

.scene-hero h1 {
  margin: 16px 0 6px;
  font-size: clamp(75px, 10.35vw, 132px);
  font-weight: 800;
  letter-spacing: -0.07em;
  line-height: 0.98;
}

.scene-hero .scene-en {
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: clamp(31.5px, 3.75vw, 48px);
  font-style: italic;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.scene-desc {
  max-width: 530px;
  margin-top: 20px;
  color: rgba(24, 42, 34, 0.7);
  font-size: 21.75px;
  line-height: 1.8;
  text-wrap: balance;
}

.scene-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 24px;
  color: rgba(24, 42, 34, 0.66);
  font-size: 15.75px;
  font-weight: 600;
}

.scene-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.scene-meta b {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 22.5px;
  font-weight: 600;
}

.scene-meta .meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(24, 42, 34, 0.3);
}

.scene-emblem {
  position: relative;
  display: grid;
  place-items: center;
  width: 168px;
  height: 168px;
  margin-left: auto;
  border: 1px solid rgba(24, 42, 34, 0.24);
  border-radius: 50%;
}

.scene-emblem::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(24, 42, 34, 0.2);
  border-radius: 50%;
}

.scene-emblem::after {
  content: attr(data-no);
  position: absolute;
  right: -23px;
  top: 2px;
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 22.5px;
  font-style: italic;
}

.scene-emblem .icon {
  width: 53px;
  height: 53px;
  color: var(--accent);
  stroke-width: 1.25;
}

.scene-emblem .emblem-spark {
  position: absolute;
  left: 17px;
  bottom: 20px;
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 31.5px;
  transform: rotate(-14deg);
}

.scene-toolbar {
  position: sticky;
  top: var(--header-h);
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 242, 232, 0.94);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
}

.toolbar-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 10px 0;
}

.scene-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 1 215px;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
}

.scene-search .icon {
  width: 15px;
  height: 15px;
}

.scene-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 17.25px;
}

.scene-search input::placeholder {
  color: #94988f;
}

.status-filter {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  flex: none;
  border-radius: 999px;
  background: var(--cream-deep);
}

.status-btn {
  height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.status-btn:hover {
  color: var(--ink);
}

.status-btn.is-active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(24, 42, 34, 0.1);
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}

.tool-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 33px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.tool-toggle:hover {
  background: rgba(255, 253, 247, 0.7);
  color: var(--ink);
}

.tool-toggle.is-active {
  background: var(--ink);
  color: var(--cream);
}

.tool-toggle .icon {
  width: 14px;
  height: 14px;
}

.toolbar-play {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px 0 9px;
  border-radius: 999px;
  background: var(--coral);
  color: #fffaf0;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease;
}

.toolbar-play:hover {
  background: var(--coral-deep);
  transform: translateY(-1px);
}

.toolbar-play.is-playing {
  background: var(--ink);
  color: var(--cream);
}

.toolbar-play.is-playing:hover {
  background: var(--green-soft);
}

.toolbar-play .icon {
  width: 15px;
  height: 15px;
}

.toolbar-progress {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  flex: none;
  color: var(--muted);
  font-size: 14.25px;
  white-space: nowrap;
}

.toolbar-progress b {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
}

.toolbar-progress .mini-track {
  width: 48px;
  height: 3px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--cream-deep);
}

.toolbar-progress .mini-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--coral);
  transition: width 0.4s var(--ease);
}

.scene-layout {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  align-items: start;
  gap: 54px;
  padding: 54px 0 88px;
}

.scene-aside {
  min-width: 0;
}

.aside-inner {
  position: sticky;
  top: calc(var(--header-h) + 85px);
}

.aside-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
}

.aside-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12.75px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.aside-label span:last-child {
  font-family: var(--font-serif);
  font-size: 13.5px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.toc-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 7px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 17.25px;
  line-height: 1.4;
  transition: background 0.2s ease, color 0.2s ease;
}

.toc-link:hover {
  background: var(--cream);
  color: var(--ink);
}

.toc-link.is-active {
  background: var(--cream);
  color: var(--ink);
  font-weight: 700;
}

.toc-link .toc-num {
  color: #a6a69b;
  font-family: var(--font-serif);
  font-size: 13.5px;
}

.toc-link.is-active .toc-num {
  color: var(--coral);
}

.toc-link .toc-check {
  width: 12px;
  height: 12px;
  margin-left: auto;
  color: var(--green-soft);
  opacity: 0;
}

.toc-link .toc-check .icon {
  width: 12px;
  height: 12px;
}

.toc-link.is-complete .toc-check {
  opacity: 0.75;
}

.aside-progress {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.aside-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 14.25px;
}

.aside-progress-head b {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 600;
}

.aside-track {
  height: 4px;
  margin: 8px 0 9px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--cream-deep);
}

.aside-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--coral);
  transition: width 0.45s var(--ease);
}

.aside-progress-note {
  color: var(--muted);
  font-size: 13.5px;
}

.aside-tip {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--ink);
  color: var(--cream);
}

.aside-tip .icon {
  width: 16px;
  height: 16px;
  margin-bottom: 10px;
  color: var(--gold);
}

.aside-tip strong {
  display: block;
  font-size: 16.5px;
  font-weight: 700;
}

.aside-tip p {
  margin-top: 5px;
  color: rgba(247, 242, 232, 0.55);
  font-size: 14.25px;
  line-height: 1.7;
}

.scene-main {
  min-width: 0;
}

.scene-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.scene-list-head h2 {
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.scene-list-head p {
  color: var(--muted);
  font-size: 15px;
}

.scene-list-head p b {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
}

.sentence-group {
  scroll-margin-top: calc(var(--header-h) + 92px);
  margin-bottom: 55px;
}

.sentence-group.is-filtered-out {
  display: none;
}

.sentence-group:last-child {
  margin-bottom: 0;
}

.group-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-strong);
}

.group-heading .group-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.group-heading h2 {
  font-size: 34.5px;
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.group-heading .group-count {
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 15px;
  font-style: italic;
  white-space: nowrap;
}

.sentence-list {
  display: flex;
  flex-direction: column;
}

.sentence-card {
  position: relative;
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr) auto;
  align-items: start;
  gap: 13px;
  padding: 19px 7px 18px;
  border-bottom: 1px solid var(--line);
  border-radius: 12px;
  transition: background 0.25s ease, opacity 0.25s ease;
}

.sentence-card:hover {
  background: rgba(255, 253, 247, 0.78);
}

.sentence-card.is-hidden {
  display: none;
}

.sentence-card.is-learned {
  background: rgba(220, 233, 213, 0.31);
}

.sentence-card.is-target {
  animation: target-highlight 2.2s ease both;
}

@keyframes target-highlight {
  0%, 100% { background: transparent; }
  8%, 55% { background: rgba(233, 189, 85, 0.24); }
}

.sentence-card.is-speaking {
  background: var(--paper);
  box-shadow: inset 3px 0 0 var(--coral);
}

.sentence-index {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.sentence-index:hover {
  border-color: var(--coral);
  background: var(--coral);
  color: var(--paper);
}

.sentence-card.is-speaking .sentence-index {
  border-color: var(--coral);
  background: var(--coral);
  color: var(--paper);
}

.sentence-content {
  min-width: 0;
  padding-top: 1px;
}

.sentence-en {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 28.5px;
  line-height: 1.47;
  letter-spacing: -0.018em;
}

.sentence-card.is-learned .sentence-en {
  color: #3d594c;
}

.sentence-zh {
  margin-top: 4px;
  color: var(--muted);
  font-size: 18.75px;
  line-height: 1.65;
}

body.hide-zh .sentence-zh {
  display: none;
}

body.hide-zh .sentence-card {
  padding-block: 21px;
}

.sentence-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: -4px;
  opacity: 0.62;
  transition: opacity 0.2s ease;
}

.sentence-card:hover .sentence-actions,
.sentence-card:focus-within .sentence-actions,
.sentence-card.is-fav .sentence-actions,
.sentence-card.is-learned .sentence-actions,
.sentence-card.is-speaking .sentence-actions {
  opacity: 1;
}

.sentence-action {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sentence-action:hover {
  background: var(--cream-deep);
  color: var(--ink);
}

.sentence-action .icon {
  width: 15px;
  height: 15px;
}

.sentence-action[data-action="fav"].is-active {
  color: var(--coral-deep);
}

.sentence-action[data-action="fav"].is-active .icon,
.sentence-action[data-action="learned"].is-active .icon {
  fill: currentColor;
}

.sentence-action[data-action="learned"].is-active {
  background: var(--green);
  color: var(--cream);
}

.sentence-action.is-active:hover {
  transform: scale(1.04);
}

.sentence-action[data-action="speak"].is-playing {
  color: var(--coral-deep);
}

.scene-empty {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 230px;
  padding: 40px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 20px;
  text-align: center;
}

.scene-empty.is-visible {
  display: flex;
}

.scene-empty .icon {
  width: 28px;
  height: 28px;
  margin-bottom: 12px;
  color: var(--coral);
}

.scene-empty strong {
  font-size: 22.5px;
}

.scene-empty p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 16.5px;
}

.scene-empty button {
  margin-top: 15px;
  border-bottom: 1px solid var(--line-strong);
  font-size: 16.5px;
  font-weight: 650;
}

.scene-next-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--line-strong);
}

.scene-next {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 84px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  transition: border-color 0.2s ease, transform 0.25s var(--ease), box-shadow 0.25s ease;
}

.scene-next:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(24, 42, 34, 0.06);
}

.scene-next--next {
  justify-content: flex-end;
  text-align: right;
}

.scene-next .next-arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--coral);
}

.scene-next .next-arrow .icon {
  width: 15px;
  height: 15px;
}

.scene-next .next-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scene-next strong {
  display: block;
  margin-top: 3px;
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.scene-next .next-en {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 15px;
  font-style: italic;
}

.playbar {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(410px, calc(100% - 32px));
  padding: 9px 10px 9px 18px;
  border: 1px solid rgba(247, 242, 232, 0.15);
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  box-shadow: 0 20px 50px rgba(17, 32, 24, 0.3);
  transform: translate(-50%, 25px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.35s var(--ease), visibility 0.3s;
}

.playbar.is-active {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
}

.playbar-info {
  flex: 1;
  min-width: 0;
}

.playbar-info strong {
  display: block;
  overflow: hidden;
  font-size: 15.75px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playbar-info span {
  display: block;
  margin-top: 1px;
  color: rgba(247, 242, 232, 0.45);
  font-family: var(--font-serif);
  font-size: 13.5px;
  font-style: italic;
}

.playbar-stop {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--ink);
  transition: background 0.2s ease;
}

.playbar-stop:hover {
  background: var(--gold);
}

.playbar-stop .icon {
  width: 15px;
  height: 15px;
}

.scene-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 280px;
  color: var(--muted);
  font-size: 18px;
}

.scene-loading::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid var(--cream-deep);
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =========================================================
   My phrasebook
   ========================================================= */

.library-hero {
  position: relative;
  overflow: hidden;
  padding: 58px 0 54px;
  border-bottom: 1px solid var(--line);
  background: var(--cream-deep);
}

.library-hero::before {
  content: "";
  position: absolute;
  right: -80px;
  top: -190px;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(24, 42, 34, 0.13);
  border-radius: 50%;
}

.library-hero::after {
  content: "AS";
  position: absolute;
  right: 11%;
  bottom: -85px;
  color: transparent;
  font-family: var(--font-serif);
  font-size: 390px;
  font-style: italic;
  line-height: 1;
  opacity: 0.3;
  -webkit-text-stroke: 1px rgba(24, 42, 34, 0.25);
}

.library-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.library-hero h1 {
  margin: 15px 0 8px;
  font-size: clamp(66px, 9vw, 111px);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 1;
}

.library-hero .library-en {
  max-width: 760px;
  color: var(--coral-deep);
  font-family: var(--font-serif);
  font-size: 33px;
  font-style: italic;
  text-wrap: balance;
}

.library-hero p {
  max-width: 600px;
  margin-top: 15px;
  color: var(--ink-soft);
  font-size: 20.25px;
  line-height: 1.8;
  text-wrap: balance;
}

.library-hero-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  padding-bottom: 3px;
}

.library-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 25px 0 0;
}

.library-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.45);
}

.library-stat span {
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
}

.library-stat strong {
  font-family: var(--font-serif);
  font-size: 34.5px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.library-main {
  padding: 44px 0 94px;
}

.library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-strong);
}

.library-tabs {
  display: flex;
  gap: 4px;
}

.library-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 15px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 650;
  transition: background 0.2s ease, color 0.2s ease;
}

.library-tab span {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--cream-deep);
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 13.5px;
}

.library-tab:hover {
  background: rgba(255, 253, 247, 0.75);
  color: var(--ink);
}

.library-tab.is-active {
  background: var(--ink);
  color: var(--cream);
}

.library-tab.is-active span {
  background: rgba(247, 242, 232, 0.16);
  color: var(--cream);
}

.library-toolbar-note {
  color: var(--muted);
  font-size: 15px;
}

.library-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.library-scene-group {
  padding: 23px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
}

.library-scene-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.library-scene-head .library-scene-title {
  display: flex;
  align-items: center;
  gap: 11px;
}

.library-scene-title .scene-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tint, var(--coral));
}

.library-scene-title strong {
  font-size: 22.5px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.library-scene-title span {
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 15px;
  font-style: italic;
}

.library-scene-head a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.library-scene-head a .icon {
  width: 12px;
  height: 12px;
}

.library-scene-head a:hover {
  color: var(--coral-deep);
}

.library-sentence {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.library-sentence:last-child {
  border-bottom: 0;
  padding-bottom: 3px;
}

.library-sentence-en {
  font-family: var(--font-serif);
  font-size: 25.5px;
  line-height: 1.45;
  letter-spacing: -0.015em;
}

.library-sentence-zh {
  margin-top: 3px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.library-sentence-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.library-sentence-actions .sentence-action.is-active {
  color: var(--coral-deep);
}

.library-sentence-actions .sentence-action.is-active .icon {
  fill: currentColor;
}

.library-sentence-actions .sentence-action[data-lib-action="learned"].is-active {
  background: var(--green);
  color: var(--cream);
}

.library-sentence-actions .sentence-action.is-playing {
  color: var(--coral-deep);
}

.library-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 370px;
  padding: 40px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 24px;
  text-align: center;
}

.empty-illustration {
  position: relative;
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--coral);
}

.empty-illustration::before,
.empty-illustration::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

.empty-illustration::before {
  top: 8px;
  right: 3px;
}

.empty-illustration::after {
  bottom: 10px;
  left: 1px;
  background: var(--green-soft);
}

.empty-illustration .icon {
  width: 29px;
  height: 29px;
}

.library-empty h2 {
  font-size: 34.5px;
  font-weight: 750;
  letter-spacing: -0.04em;
}

.library-empty p {
  max-width: 330px;
  margin: 8px auto 20px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.library-clear {
  margin-top: 18px;
  color: var(--muted);
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.library-clear:hover {
  color: var(--coral-deep);
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1120px) {
  .header-inner {
    gap: 16px;
  }

  .main-nav a {
    padding-inline: 9px;
    font-size: 18px;
  }

  .search-trigger kbd {
    display: none;
  }

  .hero-lower {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .hero-copy {
    max-width: 700px;
  }

  .hero h1 {
    font-size: clamp(81px, 9.75vw, 117px);
  }

  .hero-stage {
    width: min(720px, 100%);
    height: 515px;
    margin: 0 auto;
  }

  .phrase-card--main {
    width: min(360px, 87%);
  }

  .phrase-card--yellow {
    width: 230px;
  }

  .phrase-card--mint {
    width: 260px;
  }

  .scene-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 38px;
  }

  .toolbar-row {
    gap: 9px;
  }

  .toolbar-progress {
    display: none;
  }
}

@media (max-width: 980px) {
  :root {
    --header-h: 70px;
  }

  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    display: none;
  }

  .menu-toggle {
    display: grid;
  }

  .mobile-menu {
    display: block;
  }

  .hero {
    padding-top: 42px;
  }

  .hero-lower {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .hero-copy {
    max-width: 660px;
  }

  .hero h1 {
    font-size: clamp(87px, 15vw, 132px);
  }

  .hero-sub {
    max-width: 560px;
  }

  .hero-stage {
    width: min(700px, 100%);
    height: 520px;
    margin: 0 auto;
  }

  .hero-stamp {
    left: 25%;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .section-lead {
    max-width: 520px;
  }

  .scene-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .method-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }

  .method-head p {
    max-width: 500px;
  }

  .practice-grid {
    grid-template-columns: 1fr;
  }

  .progress-panel {
    min-height: 0;
  }

  .daily-panel {
    min-height: 330px;
  }

  .scene-title-row {
    grid-template-columns: minmax(0, 1fr) 150px;
  }

  .scene-emblem {
    width: 142px;
    height: 142px;
  }

  .scene-emblem .icon {
    width: 44px;
    height: 44px;
  }

  .scene-layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 0;
  }

  .scene-aside {
    display: none;
  }

  .scene-main {
    padding-top: 38px;
  }

  .scene-toolbar {
    top: var(--header-h);
  }

  .toolbar-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "search play"
      "filters controls";
    gap: 7px 8px;
    min-height: 0;
    padding: 9px 0 10px;
    overflow: visible;
    flex-wrap: nowrap;
  }

  .scene-search {
    grid-area: search;
    flex: 1 1 auto;
    width: auto;
    max-width: none;
  }

  .status-filter {
    grid-area: filters;
    justify-self: start;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .status-filter::-webkit-scrollbar {
    display: none;
  }

  .toolbar-controls {
    grid-area: controls;
    justify-self: end;
    margin-left: 0;
  }

  .toolbar-play {
    grid-area: play;
    justify-self: end;
    flex: none;
  }

  .sentence-group {
    scroll-margin-top: calc(var(--header-h) + 118px);
  }

  .library-hero-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 24px;
  }
}

@media (max-width: 760px) {
  .container,
  .container--narrow {
    width: min(100% - 34px, 620px);
  }

  .section {
    padding: 74px 0;
  }

  .section--tight {
    padding: 54px 0;
  }

  .site-header {
    min-height: var(--header-h);
  }

  .search-trigger {
    width: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .search-trigger .search-label {
    display: none;
  }

  .search-trigger .icon {
    width: 18px;
    height: 18px;
  }

  .header-cta {
    display: none;
  }

  .header-actions {
    gap: 7px;
  }

  .hero {
    padding: 33px 0 55px;
  }

  .hero-kicker {
    font-size: 13.5px;
  }

  .hero h1 {
    margin-top: 19px;
    font-size: clamp(72px, 20.55vw, 105px);
    letter-spacing: -0.075em;
  }

  .hero .hero-title {
    margin: 18px 0 10px;
  }

  .hero-slogan {
    margin-bottom: 24px;
  }

  .hero-sub {
    font-size: 21.75px;
    line-height: 1.85;
  }

  .hero-actions {
    margin-top: 26px;
  }

  .hero-actions .btn {
    min-height: 52px;
  }

  .hero-audio-note {
    font-size: 15.75px;
  }

  .hero-meta {
    gap: 9px 15px;
    margin-top: 30px;
    font-size: 15.75px;
  }

  .hero-meta i {
    display: none;
  }

  .scene-meta {
    gap: 6px 16px;
  }

  .scene-meta .meta-dot {
    display: none;
  }

  .hero-meta b {
    font-size: 22.5px;
  }

  .hero-stage {
    width: min(430px, 100%);
    height: 470px;
    margin: 8px auto 0;
  }

  .phrase-card--yellow,
  .phrase-card--mint,
  .hero-sticker {
    display: none;
  }

  .phrase-card--main {
    top: 60px;
    left: 0;
    width: min(360px, 92%);
  }

  .stage-blob {
    top: 34px;
    left: 28px;
    bottom: 28px;
  }

  .hero-stamp {
    top: 0;
    left: 19%;
    width: 76px;
    height: 76px;
  }

  .hero-stamp strong {
    font-size: 37.5px;
  }

  .phrase-card {
    padding: 17px;
    border-radius: 18px;
  }

  .phrase-card--main .phrase-en {
    font-size: 33px;
  }

  .phrase-card--yellow {
    top: 8px;
    right: 0;
    width: 202px;
    min-height: 0;
    padding: 15px;
  }

  .phrase-card--yellow .phrase-en {
    font-size: 22.5px;
  }

  .phrase-card--yellow .phrase-zh {
    display: none;
  }

  .phrase-card--yellow .phrase-top {
    padding-bottom: 8px;
  }

  .phrase-card--mint {
    right: 0;
    bottom: 4px;
    width: 235px;
    padding: 16px;
  }

  .phrase-card--mint .phrase-en {
    font-size: 27px;
  }

  .phrase-card--mint .phrase-zh {
    font-size: 15.75px;
  }

  .phrase-card .phrase-foot {
    margin-top: 12px;
    padding-top: 9px;
  }

  .phrase-card--yellow .phrase-foot {
    display: none;
  }

  .hero-sticker {
    left: 8px;
    bottom: 0;
    font-size: 12px;
  }

  .hero-spark {
    display: none;
  }

  .ticker-track {
    padding: 13px 0;
  }

  .ticker-item {
    gap: 9px;
    padding-right: 19px;
  }

  .ticker-item span {
    font-size: 15px;
  }

  .ticker-item i {
    font-size: 16.5px;
  }

  .scene-library {
    padding-top: 64px;
  }

  .filter-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-right: -17px;
    padding-right: 17px;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .filter-row::-webkit-scrollbar {
    display: none;
  }

  .filter-chip {
    flex: none;
  }

  .scene-grid {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .scene-card {
    min-height: 270px;
    padding: 20px;
    border-radius: 20px;
  }

  .scene-copy {
    padding-top: 26px;
  }

  .scene-copy h3 {
    font-size: 37.5px;
  }

  .method-section {
    padding-bottom: 74px;
  }

  .method-panel {
    padding: 42px 22px 0;
    border-radius: 24px;
  }

  .method-panel::before {
    top: -20px;
    right: -32px;
    font-size: 225px;
  }

  .method-head {
    margin-bottom: 32px;
  }

  .method-steps {
    grid-template-columns: 1fr;
  }

  .method-step {
    padding: 23px 0 25px;
  }

  .method-step + .method-step {
    padding-left: 0;
    border-top: 1px solid rgba(247, 242, 232, 0.17);
    border-left: 0;
  }

  .method-step h3 {
    margin-top: 16px;
    font-size: 28.5px;
  }

  .method-step p {
    max-width: 100%;
    font-size: 18px;
  }

  .method-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
    font-size: 12px;
  }

  .method-foot span:nth-child(2) {
    display: none;
  }

  .practice-section {
    padding-bottom: 74px;
  }

  .progress-panel,
  .daily-panel {
    padding: 22px;
    border-radius: 22px;
  }

  .progress-top {
    gap: 16px;
  }

  .progress-ring {
    width: 88px;
    height: 88px;
  }

  .progress-ring .ring-label strong {
    font-size: 31.5px;
  }

  .progress-title h3 {
    font-size: 31.5px;
  }

  .progress-title p {
    font-size: 16.5px;
  }

  .progress-numbers strong {
    font-size: 37.5px;
  }

  .daily-quote {
    font-size: 42px;
  }

  .daily-panel {
    min-height: 315px;
  }

  .daily-actions .text-link {
    margin-left: 0;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 36px 24px;
    padding: 48px 0 38px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-lead {
    max-width: 100%;
    margin-top: 18px;
    font-size: 30px;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    font-size: 12.75px;
  }

  .footer-legal {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .scene-hero-inner {
    padding: 20px 0 40px;
  }

  .scene-title-row {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 34px;
  }

  .scene-hero h1 {
    font-size: clamp(66px, 21vw, 105px);
  }

  .scene-hero .scene-en {
    font-size: 30px;
  }

  .scene-desc {
    margin-top: 14px;
    font-size: 19.5px;
  }

  .scene-emblem {
    display: none;
  }

  .scene-ghost {
    display: none;
  }

  .scene-meta {
    margin-top: 18px;
  }

  .toolbar-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "search play"
      "filters controls";
    gap: 7px 8px;
    min-height: 0;
    padding: 9px 0 10px;
    overflow: visible;
  }

  .scene-search {
    grid-area: search;
    flex: 1 1 auto;
    width: auto;
    max-width: none;
    height: 36px;
  }

  .status-filter {
    grid-area: filters;
    justify-self: start;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .status-filter::-webkit-scrollbar {
    display: none;
  }

  .toolbar-controls {
    grid-area: controls;
    justify-self: end;
    margin-left: 0;
    gap: 2px;
  }

  .status-btn {
    height: 30px;
    padding-inline: 9px;
    font-size: 14.25px;
  }

  .tool-toggle {
    height: 32px;
    padding-inline: 7px;
    font-size: 14.25px;
  }

  .toolbar-play {
    height: 33px;
    padding-right: 10px;
  }

  .toolbar-play span {
    display: none;
  }

  .toolbar-play {
    grid-area: play;
    justify-self: end;
    width: 36px;
    height: 36px;
    justify-content: center;
    padding: 0;
  }

  .scene-main {
    padding-top: 30px;
  }

  .scene-layout {
    padding-bottom: 66px;
  }

  .scene-list-head {
    margin-bottom: 22px;
  }

  .group-heading h2 {
    font-size: 31.5px;
  }

  .sentence-group {
    margin-bottom: 44px;
    scroll-margin-top: calc(var(--header-h) + 118px);
  }

  .sentence-card {
    grid-template-columns: 1fr auto;
    gap: 9px;
    padding: 16px 3px 15px 8px;
  }

  .sentence-index {
    display: none;
  }

  .sentence-en {
    font-size: 25.5px;
    line-height: 1.5;
  }

  .sentence-zh {
    font-size: 18px;
  }

  .sentence-actions {
    opacity: 0.74;
  }

  .sentence-action {
    width: 29px;
    height: 29px;
  }

  .scene-next-nav {
    grid-template-columns: 1fr;
    margin-top: 42px;
  }

  .scene-next {
    min-height: 72px;
  }

  .scene-next--next {
    justify-content: flex-start;
    text-align: left;
    flex-direction: row-reverse;
  }

  .playbar {
    bottom: 14px;
  }

  .library-hero {
    padding: 38px 0 36px;
  }

  .library-hero h1 {
    font-size: 69px;
  }

  .library-hero .library-en {
    font-size: 27px;
  }

  .library-stats {
    grid-template-columns: 1fr;
    gap: 7px;
    margin-top: 20px;
  }

  .library-stat {
    padding: 11px 14px;
  }

  .library-stat strong {
    font-size: 30px;
  }

  .library-main {
    padding: 30px 0 66px;
  }

  .library-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
  }

  .library-toolbar-note {
    padding-left: 4px;
  }

  .library-scene-group {
    padding: 17px 16px;
    border-radius: 17px;
  }

  .library-sentence {
    gap: 8px;
  }

  .library-sentence-en {
    font-size: 23.25px;
  }

  .library-sentence-zh {
    font-size: 17.25px;
  }

  .library-sentence-actions .sentence-action {
    width: 28px;
    height: 28px;
  }

  .library-empty {
    min-height: 320px;
  }

  .search-dialog {
    margin-top: 5vh;
    max-height: 82vh;
    border-radius: 19px;
  }

  .search-field {
    padding: 14px 16px;
  }

  .search-field input {
    font-size: 22.5px;
  }

  .search-preview-grid {
    grid-template-columns: 1fr;
  }

  .search-result .result-tag {
    width: 92px;
  }

  .search-result .result-en {
    font-size: 21.75px;
  }

  .search-result .result-zh {
    font-size: 15.75px;
  }

  .toast {
    bottom: 16px;
    font-size: 16.5px;
  }
}

@media (max-width: 480px) {
  .hero .hero-title {
    flex-wrap: wrap;
    white-space: normal;
  }

  .hero-title-words {
    flex: 0 0 100%;
  }
}

@media (max-width: 390px) {
  .hero h1 {
    font-size: 66px;
  }

  .hero .hero-title {
    margin-top: 14px;
  }

  .hero-slogan {
    margin-bottom: 20px;
    font-size: 25px;
  }

  .phrase-card--main {
    top: 60px;
    width: 92%;
  }

  .phrase-card--yellow {
    width: 180px;
  }

  .phrase-card--mint {
    width: 215px;
  }

  .brand-copy small {
    display: none;
  }

  .progress-numbers > div + div {
    padding-left: 11px;
  }

  .daily-quote {
    font-size: 37.5px;
  }
}

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

@media print {
  .site-header,
  .site-footer,
  .scene-toolbar,
  .scene-aside,
  .sentence-actions,
  .scene-next-nav,
  .playbar,
  .search-overlay {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .scene-layout {
    display: block;
    padding: 20px 0;
  }

  .sentence-card {
    break-inside: avoid;
  }
}
