@font-face {
  font-family: "Alibaba PuHuiTi 2.0";
  src: url("/fonts/Alibaba_PuHuiTi_2.0_55_Regular_55_Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Alibaba PuHuiTi 2.0";
  src: url("/fonts/Alibaba_PuHuiTi_2.0_65_Medium_65_Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Alibaba PuHuiTi 2.0";
  src: url("/fonts/Alibaba_PuHuiTi_2.0_75_SemiBold_75_SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Alibaba PuHuiTi 2.0";
  src: url("/fonts/Alibaba_PuHuiTi_2.0_95_ExtraBold_95_ExtraBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: "Alibaba PuHuiTi 2.0";
  src: url("/fonts/Alibaba_PuHuiTi_2.0_115_Black_115_Black.ttf") format("truetype");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

:root {
  --brand-navy: #08275c;
  --brand-blue: #247cff;
  --brand-blue-deep: #2d63ee;
  --brand-cyan: #12c4bf;
  --brand-teal: #00aeb3;
  --brand-gold: #ffb52e;
  --brand-ice: #eef8ff;
  --brand-navy-rgb: 8, 39, 92;
  --brand-blue-rgb: 36, 124, 255;
  --brand-cyan-rgb: 18, 196, 191;
  --brand-gold-rgb: 255, 181, 46;
  --bg: #f4f8ff;
  --surface: #ffffff;
  --surface-soft: #edf8ff;
  --ink: #0b2452;
  --muted: #687891;
  --line: rgba(var(--brand-blue-rgb), 0.14);
  --accent: var(--brand-cyan);
  --accent-deep: var(--brand-blue-deep);
  --accent-soft: #e8fbfb;
  --danger: #c94545;
  --warning: #d98b2b;
  --shadow: 0 18px 50px rgba(var(--brand-navy-rgb), 0.12);
  --radius: 22px;
  --font: "Alibaba PuHuiTi 2.0", "SimHei", "黑体", "Microsoft YaHei", "PingFang SC", "Heiti SC", "Noto Sans CJK SC", sans-serif;
  --subtitle-font: "Alibaba PuHuiTi 2.0", "SimHei", "黑体", "Microsoft YaHei", "PingFang SC", "Heiti SC", "Noto Sans CJK SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 10%, rgba(var(--brand-gold-rgb), 0.24), transparent 27rem),
    radial-gradient(circle at 82% 0%, rgba(var(--brand-blue-rgb), 0.18), transparent 28rem),
    radial-gradient(circle at 92% 36%, rgba(var(--brand-cyan-rgb), 0.18), transparent 26rem),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(15px, 0.32vw + 13.6px, 18px);
  font-weight: 400;
  line-height: 1.55;
}

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

button {
  border: 0;
}

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

.app-icon {
  --icon-size: 22px;
  width: var(--icon-size);
  height: var(--icon-size);
  display: inline-block;
  flex: 0 0 auto;
  vertical-align: -0.2em;
  color: inherit;
  background: currentColor;
  -webkit-mask: var(--icon-url) center / contain no-repeat;
  mask: var(--icon-url) center / contain no-repeat;
}

.icon-back { --icon-url: url("/icons/back.svg"); }
.icon-book { --icon-url: url("/icons/book.svg"); }
.icon-bookmark { --icon-url: url("/icons/bookmark.svg"); }
.icon-bookmark-check { --icon-url: url("/icons/bookmark-check.svg"); }
.icon-chevron-down { --icon-url: url("/icons/chevron-down.svg"); }
.icon-close { --icon-url: url("/icons/close.svg"); }
.icon-flashcards { --icon-url: url("/icons/flashcards.svg"); }
.icon-heart { --icon-url: url("/icons/heart.svg"); }
.icon-heart-filled { --icon-url: url("/icons/heart-filled.svg"); }
.icon-level { --icon-url: url("/icons/level.svg"); }
.icon-loop { --icon-url: url("/icons/loop.svg"); }
.icon-menu { --icon-url: url("/icons/menu.svg"); }
.icon-mic { --icon-url: url("/icons/mic.svg"); }
.icon-next { --icon-url: url("/icons/next.svg"); }
.icon-pause { --icon-url: url("/icons/pause.svg"); }
.icon-play { --icon-url: url("/icons/play.svg"); }
.icon-practice { --icon-url: url("/icons/practice.svg"); }
.icon-previous { --icon-url: url("/icons/previous.svg"); }
.icon-repeat { --icon-url: url("/icons/repeat.svg"); }
.icon-settings { --icon-url: url("/icons/settings.svg"); }
.icon-share { --icon-url: url("/icons/share.svg"); }
.icon-speed { --icon-url: url("/icons/speed.svg"); }
.icon-star-filled { --icon-url: url("/icons/star-filled.svg"); }
.icon-subtitles { --icon-url: url("/icons/subtitles.svg"); }
.icon-sound { --icon-url: url("/icons/sound.svg"); }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 480px);
  align-items: center;
  gap: 40px;
  padding: 48px clamp(20px, 6vw, 92px);
}

.hero-panel {
  position: relative;
  min-height: 560px;
  padding: 52px;
  border-radius: 36px;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 18%, rgba(var(--brand-gold-rgb), 0.34), transparent 16rem),
    linear-gradient(145deg, rgba(var(--brand-navy-rgb), 0.96), rgba(var(--brand-blue-rgb), 0.88) 48%, rgba(var(--brand-cyan-rgb), 0.9)),
    url("data:image/svg+xml,%3Csvg width='120' height='120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 60Q30 15 60 60t60 0v60H0z' fill='%23ffffff' fill-opacity='.09'/%3E%3C/svg%3E");
  color: white;
  box-shadow: var(--shadow);
}

.hero-panel h1 {
  margin: 0;
  max-width: 640px;
  font-size: clamp(44px, 7vw, 86px);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.hero-panel p {
  max-width: 520px;
  font-size: 18px;
  line-height: 1.8;
  opacity: 0.88;
}

.hero-card {
  position: absolute;
  right: 38px;
  bottom: 38px;
  width: min(360px, calc(100% - 76px));
  padding: 22px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(16px);
}

.auth-card,
.panel,
.video-card,
.side-card,
.admin-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 34px rgba(var(--brand-navy-rgb), 0.08);
}

.auth-card {
  padding: 30px;
}

.auth-card h2,
.panel h2,
.admin-card h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.25;
}

.muted {
  color: var(--muted);
}

.field {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.field label {
  color: #2d4166;
  font-size: 14px;
  font-weight: 700;
}

.field input,
.field textarea,
.field select,
.filters select,
.search-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 13px 16px;
  background: #fbfdff;
  color: var(--ink);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.filters select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--accent-deep) 50%) calc(100% - 20px) 50% / 7px 7px no-repeat,
    linear-gradient(135deg, var(--accent-deep) 50%, transparent 50%) calc(100% - 15px) 50% / 7px 7px no-repeat,
    #fbfdff;
  padding-right: 42px;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.file-picker-hint {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 14px;
  background: #edf7ff;
  color: var(--brand-navy);
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(var(--brand-blue-rgb), 0.13);
}

.btn.primary {
  color: white;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan));
  box-shadow: 0 12px 24px rgba(var(--brand-blue-rgb), 0.18);
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
}

.btn.danger {
  color: white;
  background: var(--danger);
}

.btn.warning {
  color: white;
  background: var(--warning);
}

.btn.small {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 11px;
  font-size: 13px;
}

.btn.icon-only {
  width: 34px;
  min-width: 34px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

.btn.icon-only .app-icon {
  --icon-size: 18px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 248, 255, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.topbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-top-menu {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: var(--brand-navy);
  background: rgba(var(--brand-cyan-rgb), 0.1);
  box-shadow: 0 10px 22px rgba(var(--brand-blue-rgb), 0.08);
  cursor: pointer;
}

.home-top-menu .app-icon {
  --icon-size: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -0.02em;
  cursor: pointer;
}

.brand-logo {
  width: clamp(128px, 10.8vw, 174px);
  height: clamp(34px, 3.1vw, 46px);
  display: block;
  object-fit: contain;
}

.brand > span {
  color: transparent;
  background: linear-gradient(90deg, var(--brand-navy) 0 58%, var(--brand-cyan) 58% 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: white;
  background:
    radial-gradient(circle at 76% 74%, var(--brand-gold) 0 18%, transparent 19%),
    linear-gradient(135deg, var(--brand-blue), var(--brand-cyan));
  box-shadow: 0 12px 24px rgba(var(--brand-blue-rgb), 0.24);
}

.brand-mark .app-icon {
  --icon-size: 24px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 800;
  white-space: nowrap;
  word-break: keep-all;
}

.nav a.active {
  color: white;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan));
  border-color: rgba(var(--brand-blue-rgb), 0.32);
}

.avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 900;
}

.topbar-account {
  display: grid;
  place-items: center;
  text-decoration: none;
  justify-self: end;
  border-radius: 999px;
}

.topbar-account.active .avatar {
  color: white;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan));
}

.layout {
  max-width: 1440px;
  margin: 0 auto;
  padding: 26px 18px 60px;
}

.home-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 16px;
}

.side-card,
.panel,
.admin-card {
  padding: 20px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.stat {
  padding: 12px 8px;
  border: 1px solid transparent;
  border-radius: 14px;
  text-align: center;
  color: var(--brand-navy);
  background: linear-gradient(180deg, #ffffff, var(--brand-ice));
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.stat:hover,
.stat.active {
  border-color: rgba(var(--brand-cyan-rgb), 0.36);
  box-shadow: 0 10px 22px rgba(var(--brand-blue-rgb), 0.1);
  transform: translateY(-1px);
}

.stat strong {
  display: block;
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  animation: statPop .72s cubic-bezier(.22, 1, .36, 1);
}

.stat strong,
.metric strong,
.admin-chart-card strong,
.calendar .day,
.duration,
.video-progress-badge,
.avatar,
.thumb-letter {
  font-weight: 800 !important;
}

@keyframes statPop {
  0% {
    opacity: 0.36;
    transform: translateY(5px) scale(0.94);
  }
  55% {
    opacity: 1;
    transform: translateY(-2px) scale(1.04);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.calendar-head h3 {
  margin: 0;
}

.calendar-head button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--brand-navy);
  background: rgba(var(--brand-cyan-rgb), 0.1);
  cursor: pointer;
}

.calendar-head .app-icon {
  --icon-size: 17px;
}

.calendar .day {
  min-height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #64748b;
  background: rgba(255, 255, 255, 0.58);
  cursor: pointer;
  font-weight: 800;
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.calendar .day:hover,
.calendar .day.active {
  transform: translateY(-1px);
  color: white;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan));
  box-shadow: 0 10px 20px rgba(var(--brand-blue-rgb), 0.16);
}

.calendar .day.learned {
  color: var(--brand-navy);
  background: rgba(var(--brand-cyan-rgb), 0.16);
}

.calendar .day.learned.active {
  color: white;
}

.day {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}

.day.learned {
  color: white;
  background: var(--accent);
  font-weight: 900;
}

.calendar .day {
  aspect-ratio: 1;
  border: 0;
  color: #64748b;
  background: rgba(255, 255, 255, 0.58);
}

.calendar .day.learned {
  color: var(--brand-navy);
  background: rgba(var(--brand-cyan-rgb), 0.16);
}

.calendar .day.active,
.calendar .day.learned.active,
.calendar .day:hover {
  color: white;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan));
}

.filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px 160px;
  gap: 12px;
  margin-bottom: 16px;
}

.home-filters {
  grid-template-columns: repeat(4, minmax(118px, 1fr)) auto;
}

.home-filters .search-input {
  grid-column: 1 / -2;
  min-width: 240px;
}

.home-search-button {
  min-height: 48px;
  align-self: stretch;
}

.home-filter-dropdown {
  position: relative;
  min-width: 0;
}

.home-filter-dropdown summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--brand-navy);
  background: #fbfdff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-weight: 500;
  list-style: none;
}

.home-filter-dropdown summary::-webkit-details-marker {
  display: none;
}

.home-filter-dropdown .app-icon {
  --icon-size: 18px;
  color: var(--brand-blue);
  transition: transform .18s ease;
}

.home-filter-dropdown[open] summary {
  border-color: rgba(var(--brand-cyan-rgb), 0.55);
  box-shadow: 0 0 0 4px rgba(var(--brand-cyan-rgb), 0.12), 0 12px 26px rgba(var(--brand-blue-rgb), 0.1);
}

.home-filter-dropdown[open] .app-icon {
  transform: rotate(180deg);
}

.home-filter-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(var(--brand-cyan-rgb), 0.18);
  border-radius: 20px;
  background: rgba(251, 253, 255, 0.98);
  box-shadow: 0 18px 42px rgba(var(--brand-navy-rgb), 0.14);
  backdrop-filter: blur(14px);
}

.home-filter-option {
  min-height: 38px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 14px;
  color: var(--brand-navy);
  cursor: pointer;
  font-weight: 500;
}

.home-filter-option:hover {
  background: rgba(var(--brand-cyan-rgb), 0.1);
}

.home-filter-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand-cyan);
}

.home-filter-option em {
  min-width: 28px;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--brand-blue);
  background: rgba(var(--brand-blue-rgb), 0.08);
  font-size: 12px;
  font-style: normal;
  text-align: center;
}

.home-filters select {
  min-height: 48px;
  border-color: rgba(var(--brand-cyan-rgb), 0.2);
  border-radius: 18px;
  color: var(--brand-navy);
  font-weight: 500;
  background:
    linear-gradient(45deg, transparent 50%, var(--brand-blue) 50%) calc(100% - 22px) 50% / 7px 7px no-repeat,
    linear-gradient(135deg, var(--brand-blue) 50%, transparent 50%) calc(100% - 17px) 50% / 7px 7px no-repeat,
    radial-gradient(circle at 12% 0%, rgba(var(--brand-cyan-rgb), 0.15), transparent 9rem),
    linear-gradient(180deg, #ffffff, #eef9ff);
  box-shadow: 0 10px 24px rgba(var(--brand-blue-rgb), 0.08);
}

.home-filters select:focus {
  border-color: rgba(var(--brand-cyan-rgb), 0.55);
  box-shadow: 0 0 0 4px rgba(var(--brand-cyan-rgb), 0.12), 0 12px 26px rgba(var(--brand-blue-rgb), 0.1);
}

.home-filters > .btn {
  font-weight: 500;
}

.home-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.home-panel-head h2,
.home-panel-head p {
  margin-top: 0;
}

.home-drawer-button {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid rgba(var(--brand-cyan-rgb), 0.2);
  border-radius: 999px;
  color: var(--brand-navy);
  background: linear-gradient(135deg, rgba(var(--brand-cyan-rgb), 0.12), rgba(255, 255, 255, 0.92));
  font-weight: 900;
  cursor: pointer;
}

.home-drawer-button .app-icon {
  --icon-size: 20px;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.announcement-latest {
  display: grid;
  gap: 6px;
  margin: 0;
}

.announcement-latest strong,
.announcement-latest span,
.announcement-latest em {
  display: block;
}

.announcement-latest em {
  color: #7a8aa3;
  font-size: 12px;
  font-style: normal;
}

.profile-card strong {
  display: block;
  color: var(--brand-navy);
  font-size: 18px;
}

.profile-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: white;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan));
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(var(--brand-blue-rgb), 0.16);
}

.home-drawer-backdrop,
.home-mobile-drawer {
  display: none;
}

.tag-filter-box {
  margin: 8px 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.64);
}

.tag-filter-box summary {
  color: var(--brand-navy);
  font-weight: 900;
  cursor: pointer;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 18px;
}

.chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(var(--brand-cyan-rgb), 0.1);
  color: var(--brand-navy);
  border: 1px solid rgba(var(--brand-cyan-rgb), 0.2);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.chip.is-deletable {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: default;
}

.chip-delete {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  color: var(--accent-deep);
  background: rgba(var(--brand-blue-rgb), 0.1);
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
}

.chip-delete:hover {
  color: white;
  background: var(--danger);
}

.chip.active {
  color: white;
  background: var(--accent);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.video-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.video-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: white;
  font-size: 42px;
  font-weight: 900;
}

.thumb-video,
.thumb-scrim {
  position: absolute;
  inset: 0;
}

.thumb-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .22s ease;
}

.thumb.cover-ready .thumb-video {
  opacity: 1;
}

.thumb-scrim {
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.34));
  opacity: 0;
}

.thumb.cover-ready .thumb-scrim {
  opacity: 1;
}

.thumb-letter {
  position: relative;
  z-index: 1;
  transition: opacity .18s ease;
}

.thumb.cover-ready .thumb-letter {
  opacity: 0;
}

.thumb.mint {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan));
}

.thumb.sunset {
  background: linear-gradient(135deg, var(--brand-navy), var(--brand-gold));
}

.thumb.lilac {
  background: linear-gradient(135deg, #4667ff, #12c4bf 52%, #7de3ff);
}

.duration,
.bookmark {
  position: absolute;
  z-index: 2;
}

.duration {
  right: 9px;
  bottom: 9px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.62);
  color: white;
  font-size: 12px;
}

.bookmark {
  right: 9px;
  top: 9px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand-navy);
  cursor: pointer;
  transition: transform .18s ease, color .18s ease, background .18s ease;
}

.bookmark:hover {
  transform: translateY(-1px) scale(1.04);
}

.bookmark.is-bookmarked {
  color: white;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan));
  box-shadow: 0 10px 22px rgba(var(--brand-blue-rgb), 0.26);
}

.bookmark .app-icon {
  --icon-size: 18px;
}

.video-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px;
}

.video-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.video-admin-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.video-body > .muted {
  margin: 0 0 12px;
}

.video-body .chip-row {
  margin: auto 0 12px;
}

.video-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.meta-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.meta-with-icon .app-icon {
  --icon-size: 15px;
}

.video-progress-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
}

.difficulty-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-weight: 800;
}

.difficulty-badge .app-icon {
  --icon-size: 14px;
}

.difficulty-badge.level-easy,
.difficulty-badge.level-mid,
.difficulty-badge.level-hard {
  color: #d49228;
}

.difficulty-badge em {
  margin-left: 3px;
  color: var(--muted);
  font-style: normal;
}

.learning-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 22px;
  align-items: start;
}

.player {
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.68)),
    linear-gradient(135deg, #315d46, #a7bf74);
  color: white;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
}

.play-dot {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
}

.speed-row,
.tool-row,
.tab-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.subtitle-list {
  display: grid;
  gap: 10px;
  max-height: 720px;
  overflow: auto;
  padding-right: 4px;
}

.subtitle-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fbfdff;
  cursor: pointer;
}

.subtitle-item.active {
  border-color: rgba(var(--brand-cyan-rgb), 0.48);
  background: var(--accent-soft);
}

.time {
  color: var(--accent-deep);
  font-weight: 900;
}

.english {
  margin-bottom: 5px;
  font-weight: 800;
}

.practice-box,
.close-reading {
  margin-top: 16px;
  padding: 18px;
  border-radius: 20px;
  background: var(--brand-ice);
  border: 1px solid var(--line);
}

.favorites-list,
.records-list,
.admin-list {
  display: grid;
  gap: 12px;
}

.list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfdff;
}

.admin-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 22px 0 12px;
}

.admin-list-head h3 {
  margin: 0;
}

.admin-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.select-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--brand-navy);
  font-size: 13px;
  font-weight: 900;
}

.select-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.admin-video-item {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.admin-video-item.is-selected {
  border-color: rgba(var(--brand-cyan-rgb), 0.55);
  background: linear-gradient(90deg, rgba(var(--brand-cyan-rgb), 0.1), #fbfdff);
}

.favorites-list {
  --study-font-scale: 1;
}

.favorite-subtitle-main {
  min-width: 0;
}

.favorite-subtitle-main.is-clickable {
  cursor: pointer;
}

.favorite-subtitle-main.is-clickable:hover strong {
  color: var(--accent-deep);
}

.favorite-subtitle-main.is-clickable .muted {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid transparent;
}

.favorite-subtitle-main.is-clickable:hover .muted {
  border-bottom-color: rgba(var(--brand-cyan-rgb), 0.34);
}

.favorite-subtitle-main .study-line-en {
  display: block;
  margin-bottom: 4px;
}

.favorite-subtitle-main .study-line-cn {
  margin: 0 0 4px;
}

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

.favorites-video-grid {
  margin-top: 12px;
}

.record-date-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 16px;
  padding: 12px 14px;
  border-radius: 16px;
  color: var(--brand-navy);
  background: rgba(var(--brand-cyan-rgb), 0.1);
  font-weight: 850;
}

.record-timeline-day {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
}

.record-timeline-date {
  position: sticky;
  top: 82px;
  align-self: start;
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, var(--brand-ice));
  border: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
}

.record-timeline-date strong {
  color: var(--brand-navy);
}

.record-timeline-date span,
.record-time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.record-timeline-items {
  display: grid;
  gap: 12px;
}

.record-video-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fbfdff;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.record-video-card:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--brand-cyan-rgb), 0.36);
  box-shadow: 0 12px 26px rgba(var(--brand-blue-rgb), 0.1);
}

.record-video-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.record-video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: white;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan));
}

.record-video-thumb .thumb-video,
.record-video-thumb .thumb-scrim {
  border-radius: inherit;
}

.record-video-thumb .duration {
  display: none;
}

.record-video-thumb.sunset {
  background: linear-gradient(135deg, #ff9d47, var(--brand-gold));
}

.record-video-thumb.lilac {
  background: linear-gradient(135deg, #6a7cff, #b58cff);
}

.record-timeline-day.is-collapsed .record-timeline-items {
  display: none;
}

.admin-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
}

.admin-menu {
  display: grid;
  gap: 8px;
}

.admin-menu button {
  justify-content: flex-start;
}

.aavt-panel,
.video-editor-panel {
  margin: 16px 0 18px;
  padding: 20px;
  border: 1px solid rgba(var(--brand-cyan-rgb), 0.18);
  border-radius: 22px;
  background:
    radial-gradient(circle at 0% 0%, rgba(var(--brand-cyan-rgb), 0.12), transparent 26rem),
    #fbfdff;
}

.aavt-panel h3,
.video-editor-panel h3 {
  margin: 0 0 8px;
}

.aavt-form {
  margin-top: 14px;
}

.workflow-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.workflow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.workflow-steps span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(var(--brand-blue-rgb), 0.08);
  color: #526784;
  font-size: 12px;
  font-weight: 800;
}

.workflow-steps .active {
  color: white;
  background: var(--accent);
}

.upload-progress {
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(var(--brand-cyan-rgb), 0.16);
}

.upload-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.upload-percent {
  color: var(--accent-deep);
  font-weight: 900;
}

.upload-progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #d9e7f0;
}

.upload-progress-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-cyan));
  transition: width .28s ease;
}

.upload-detail {
  margin: 10px 0 0;
}

.batch-upload-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.batch-upload-item {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) minmax(180px, 0.85fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.batch-upload-item span {
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  border-radius: 999px;
  color: var(--brand-navy);
  background: rgba(var(--brand-blue-rgb), 0.08);
  font-size: 12px;
}

.batch-upload-item strong,
.batch-upload-item em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-upload-item em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.batch-upload-item.done span {
  color: #0e604c;
  background: rgba(var(--brand-cyan-rgb), 0.16);
}

.batch-upload-item.failed span {
  color: #9f2d2d;
  background: #fff0ee;
}

.manual-create {
  margin: 16px 0 20px;
  padding: 16px;
  border: 1px dashed rgba(var(--brand-cyan-rgb), 0.28);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.54);
}

.manual-create summary {
  cursor: pointer;
  font-weight: 800;
}

.manual-create .panel {
  margin-top: 12px;
  padding: 0;
  background: transparent;
  border: 0;
}

.admin-review-tabs {
  display: flex;
  gap: 10px;
  margin: 14px 0 18px;
  overflow-x: auto;
  padding: 2px 2px 8px;
}

.admin-review-tabs button {
  position: relative;
  flex: 0 0 168px;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.admin-review-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 3;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #9f2d2d;
  background: rgba(255, 240, 238, 0.94);
  font-size: 16px;
  line-height: 1;
}

.admin-review-remove:hover {
  color: white;
  background: var(--danger);
}

.admin-review-tabs button.active {
  border-color: rgba(var(--brand-blue-rgb), 0.38);
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(var(--brand-blue-rgb), 0.12);
}

.admin-review-thumb.thumb {
  width: 62px;
  border-radius: 10px;
  font-size: 18px;
}

.admin-review-tabs em {
  overflow: hidden;
  color: var(--brand-navy);
  font-style: normal;
  font-size: 13px;
  line-height: 1.25;
  text-align: left;
  text-overflow: ellipsis;
}

.admin-library-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.admin-library-head h2,
.admin-library-head p {
  margin-top: 0;
}

.admin-material-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.admin-material-card {
  position: relative;
  cursor: default;
}

.admin-material-card.is-selected {
  outline: 2px solid rgba(var(--brand-cyan-rgb), 0.62);
  outline-offset: 2px;
}

.admin-material-select {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 4;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(var(--brand-navy-rgb), 0.12);
}

.admin-material-card .video-admin-actions {
  flex-wrap: wrap;
}

.translation-config {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid rgba(var(--brand-cyan-rgb), 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
}

.smart-card-settings {
  margin-top: 14px;
}

.editor-work-tabs {
  display: flex;
  gap: 8px;
  margin: 18px 0 12px;
  padding: 6px;
  border: 1px solid rgba(var(--brand-cyan-rgb), 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.editor-work-tabs button {
  flex: 1;
  min-height: 42px;
  border-radius: 14px;
  color: var(--brand-navy);
  background: transparent;
  cursor: pointer;
}

.editor-work-tabs button.active {
  color: white;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan));
  box-shadow: 0 10px 22px rgba(var(--brand-blue-rgb), 0.16);
}

.editor-tab-panel[hidden] {
  display: none;
}

.editor-wide-field {
  margin-bottom: 0;
}

.translation-config summary {
  cursor: pointer;
  font-weight: 800;
}

.translation-config-form {
  margin-top: 14px;
}

.translation-config-actions,
.check-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.check-row {
  margin: 12px 0;
  font-weight: 700;
  color: var(--ink);
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.editor-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.admin-codearea {
  min-height: 180px;
  font-family: var(--font);
  line-height: 1.65;
}

.admin-codearea.compact {
  min-height: 86px;
}

.youdao-config-fields {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(var(--brand-cyan-rgb), 0.2);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(var(--brand-cyan-rgb), 0.08), rgba(var(--brand-gold-rgb), 0.08));
}

.youdao-config-fields.is-muted {
  opacity: .72;
}

.youdao-config-fields h4 {
  margin: 0;
  color: var(--brand-navy);
}

.file-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfdf9;
  cursor: pointer;
}

.folder-picker {
  margin-top: 8px;
}

.file-picker input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-picker-action {
  flex: 0 0 auto;
  padding: 11px 16px;
  border-radius: 14px;
  color: white;
  font-weight: 900;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
}

.file-picker-name {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-picker {
  position: relative;
  display: grid;
  gap: 10px;
}

.tag-picker-combo {
  position: relative;
}

.tag-picker-input {
  padding-right: 46px;
  background:
    linear-gradient(45deg, transparent 50%, var(--accent-deep) 50%) calc(100% - 23px) 52% / 7px 7px no-repeat,
    linear-gradient(135deg, var(--accent-deep) 50%, transparent 50%) calc(100% - 18px) 52% / 7px 7px no-repeat,
    #fbfdf9;
}

.tag-suggestion-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 20;
  display: none;
  max-height: 220px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(var(--brand-cyan-rgb), 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 44px rgba(var(--brand-navy-rgb), 0.13);
}

.tag-picker.is-open .tag-suggestion-menu {
  display: grid;
  gap: 6px;
}

.tag-suggestion-menu button,
.tag-suggestion-menu span {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--brand-navy);
  background: transparent;
  text-align: left;
  font-weight: 800;
}

.tag-suggestion-menu button:hover {
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.tag-suggestion-menu span {
  color: var(--muted);
  font-weight: 700;
}

.tag-chip-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px 7px 12px;
  border-radius: 999px;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border: 1px solid rgba(var(--brand-cyan-rgb), 0.18);
  cursor: pointer;
  font-weight: 800;
}

.tag-chip span {
  color: #647891;
  font-size: 14px;
}

.field-label-actions,
.editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.editor-actions {
  position: sticky;
  bottom: 12px;
  z-index: 20;
  justify-content: flex-end;
  margin: 18px -4px 0;
  padding: 10px 12px;
  border: 1px solid rgba(var(--brand-blue-rgb), 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 34px rgba(var(--brand-navy-rgb), 0.12);
  backdrop-filter: blur(14px);
}

.inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.subtitle-timeline {
  display: grid;
  gap: 8px;
  max-height: none;
  overflow: visible;
  padding: 4px 4px 4px 0;
}

.subtitle-edit-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1.1fr) minmax(0, .95fr);
  gap: 12px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid rgba(var(--brand-cyan-rgb), 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.subtitle-row-time,
.subtitle-row-text {
  display: grid;
  align-content: start;
  gap: 8px;
}

.subtitle-time-input {
  text-align: center;
  font-weight: 900;
  color: var(--accent-deep);
  background: #f2f9ff;
}

.subtitle-row-text textarea {
  min-height: 78px;
}

.subtitle-insert-row {
  justify-self: center;
  min-height: 30px;
  padding: 5px 12px;
  border: 1px dashed rgba(var(--brand-cyan-rgb), 0.34);
  border-radius: 999px;
  color: var(--accent-deep);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  opacity: .56;
}

.subtitle-insert-row:hover {
  opacity: 1;
  background: var(--accent-soft);
}

.learning-points-editor {
  display: grid;
  gap: 12px;
}

.learning-points-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.learning-points-toolbar p {
  margin: 0;
}

.learning-points-list {
  display: grid;
  gap: 12px;
  max-height: none;
  overflow: visible;
  padding-right: 4px;
}

.learning-points-empty {
  padding: 18px;
  border: 1px dashed rgba(var(--brand-cyan-rgb), 0.24);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.68);
  font-weight: 700;
}

.learning-point-row {
  padding: 14px;
  border: 1px solid rgba(var(--brand-cyan-rgb), 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.learning-point-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.learning-point-grid {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.35fr) minmax(130px, .45fr);
  gap: 10px;
}

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

.field.compact {
  margin: 8px 0;
}

.field.compact textarea {
  min-height: 70px;
}

.admin-selection-popover {
  position: fixed;
  z-index: 90;
  max-height: min(76vh, 720px);
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(var(--brand-cyan-rgb), 0.22);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(18px);
}

.admin-selection-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.admin-selection-head span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.chip.active {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan));
}

.admin-selection-head strong {
  display: block;
  color: var(--brand-navy);
  font-size: 16px;
  line-height: 1.3;
}

.admin-selection-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
}

.admin-selection-body p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.55;
  font-weight: 700;
}

.admin-selection-preview {
  display: grid;
  gap: 10px;
}

.admin-selection-preview label {
  display: grid;
  gap: 6px;
  color: var(--brand-navy);
  font-size: 12px;
  font-weight: 900;
}

.admin-selection-preview input,
.admin-selection-preview select,
.admin-selection-preview textarea {
  width: 100%;
  border: 1px solid rgba(var(--brand-blue-rgb), 0.14);
  border-radius: 14px;
  background: #f8fbff;
  color: var(--brand-navy);
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  padding: 10px 12px;
}

.admin-selection-preview textarea {
  min-height: 66px;
  resize: vertical;
}

.admin-selection-grid {
  display: grid;
  gap: 10px;
}

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

.admin-selection-loading,
.admin-selection-error {
  padding: 12px;
  border-radius: 16px;
  background: rgba(var(--brand-cyan-rgb), 0.1);
}

.learning-point-row.just-added {
  animation: learningPointAdded 1.1s ease both;
}

@keyframes learningPointAdded {
  0% {
    box-shadow: 0 0 0 0 rgba(var(--brand-cyan-rgb), 0.38);
    transform: translateY(-2px);
  }
  100% {
    box-shadow: 0 0 0 12px rgba(var(--brand-cyan-rgb), 0);
    transform: translateY(0);
  }
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.metric {
  padding: 16px;
  border-radius: 18px;
  background: #f8fbf6;
  border: 1px solid var(--line);
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 30px;
}

.admin-analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.admin-chart-card {
  min-height: 210px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, var(--brand-ice));
}

.admin-chart-card h3 {
  margin: 0 0 14px;
  color: var(--brand-navy);
  font-size: 16px;
}

.admin-line-chart,
.admin-bar-chart {
  height: 142px;
  padding: 10px 4px 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
}

.admin-line-chart {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 16px;
  gap: 4px;
}

.admin-line-plot {
  position: relative;
  min-height: 0;
}

.admin-line-plot svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.admin-line-plot polyline {
  fill: none;
  stroke: var(--brand-blue);
  stroke-width: 2.8;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 8px 12px rgba(var(--brand-blue-rgb), 0.18));
}

.chart-point {
  position: absolute;
  left: var(--point-x);
  top: var(--point-y);
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--brand-blue);
  background: transparent;
  cursor: pointer;
}

.chart-point i {
  width: 9px;
  height: 9px;
  border: 2px solid white;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 6px 14px rgba(var(--brand-blue-rgb), 0.28);
}

.chart-point b,
.admin-bar-chart b {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 4;
  transform: translateX(-50%) translateY(4px);
  min-width: max-content;
  padding: 5px 8px;
  border-radius: 999px;
  color: white;
  background: rgba(var(--brand-navy-rgb), 0.92);
  font-size: 12px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}

.chart-point:hover b,
.chart-point:focus-visible b,
.admin-bar-chart span:hover b,
.admin-bar-chart span:focus-within b {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.chart-axis,
.admin-bar-chart span {
  display: grid;
}

.chart-axis {
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: center;
}

.admin-bar-chart {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
}

.admin-bar-chart span {
  position: relative;
  min-width: 0;
  height: 100%;
  grid-template-rows: minmax(0, 1fr) 16px;
  align-items: end;
  gap: 4px;
}

.admin-bar-chart i {
  display: block;
  min-height: 5px;
  border-radius: 999px 999px 4px 4px;
}

.admin-bar-chart i {
  height: var(--bar-height);
  background: linear-gradient(180deg, var(--brand-gold), #ffe59b);
}

.chart-axis em,
.admin-bar-chart em {
  min-height: 16px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  text-align: center;
  white-space: nowrap;
}

.retention-card {
  display: grid;
  align-content: start;
  gap: 12px;
}

.retention-card div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(var(--brand-cyan-rgb), 0.1);
}

.retention-card strong {
  display: block;
  color: var(--brand-blue-deep);
  font-size: 34px;
  line-height: 1;
}

.retention-card span {
  color: var(--muted);
}

.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

.table th,
.table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 900;
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.status-suspended {
  color: #9f2d2d;
  background: #fff0ee;
}

.status-pending {
  color: #9a5b16;
  background: #fff8ed;
}

.user-progress-row td {
  background: #fbfdf9;
}

.user-progress-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.user-progress-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.user-progress-summary span {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--brand-navy);
  background: var(--soft);
  font-weight: 800;
}

.user-progress-list {
  display: grid;
  gap: 8px;
}

.user-progress-list article {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f7fbff;
}

.admin-log-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.admin-log-item {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.admin-log-item p {
  margin: 6px 0 0;
  color: #61728a;
}

.admin-log-meta {
  display: grid;
  gap: 6px;
  min-width: 160px;
  color: #667085;
  font-weight: 800;
  text-align: right;
}

.wordcards-page {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}

.wordcards-video-list,
.wordcards-board {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.wordcards-video-list {
  position: sticky;
  top: 92px;
  height: calc(100vh - 138px);
  padding: 18px;
}

.wordcards-video-list h2,
.wordcards-head h2 {
  margin: 0;
  color: var(--brand-navy);
}

.wordcards-video-scroll {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 196px);
  margin-top: 14px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
}

.wordcards-video-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 18px;
  color: var(--ink);
  background: rgba(var(--brand-ice), 0.68);
  cursor: pointer;
  text-align: left;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.wordcards-video-item:hover,
.wordcards-video-item.active {
  transform: translateY(-1px);
  border-color: rgba(var(--brand-cyan-rgb), 0.34);
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(var(--brand-blue-rgb), 0.1);
}

.wordcards-video-thumb.thumb {
  flex: 0 0 108px;
  width: 108px;
  border-radius: 12px;
  font-size: 28px;
}

.wordcards-video-item strong,
.wordcards-video-item em {
  display: block;
}

.wordcards-video-item > span:last-child {
  min-width: 0;
}

.wordcards-video-item strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--brand-navy);
  line-height: 1.28;
}

.wordcards-video-item em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.wordcards-board {
  min-width: 0;
  height: calc(100vh - 138px);
  padding: 22px;
  overflow: hidden;
}

.wordcards-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

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

.wordcards-head .muted {
  margin: 4px 0 0;
}

.wordcards-tabs {
  margin-bottom: 18px;
}

.wordcards-flash-list {
  grid-template-columns: repeat(auto-fill, minmax(230px, 260px));
  justify-content: start;
  max-height: calc(100vh - 300px);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 100;
  transform: translateX(-50%);
  padding: 12px 16px;
  border-radius: 999px;
  color: white;
  background: rgba(35, 52, 42, 0.92);
  box-shadow: var(--shadow);
}

.modal-backdrop,
.study-export-backdrop {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(var(--brand-navy-rgb), 0.34);
  backdrop-filter: blur(8px);
}

.password-reset-dialog {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
  box-shadow: var(--shadow);
}

.password-reset-dialog h3,
.password-reset-dialog p {
  margin: 0;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.empty {
  padding: 36px;
  border: 1px dashed rgba(var(--brand-cyan-rgb), 0.32);
  border-radius: 20px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.68);
}

@media (max-width: 980px) {
  .auth-shell,
  .home-grid,
  .learning-grid,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .wordcards-page {
    grid-template-columns: 1fr;
  }

  .wordcards-video-list {
    position: static;
    height: auto;
  }

  .wordcards-video-scroll {
    max-height: 320px;
  }

  .hero-panel {
    min-height: 420px;
  }

  .sidebar {
    position: static;
  }

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

  .admin-analytics-grid {
    grid-template-columns: 1fr;
  }

  .batch-upload-item {
    grid-template-columns: 1fr;
  }

  .subtitle-edit-row {
    grid-template-columns: 1fr;
  }

  .learning-point-grid,
  .learning-point-grid.two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px), (orientation: portrait) and (max-width: 1180px) {
  .auth-shell {
    padding: 18px;
  }

  .layout {
    padding: clamp(16px, 2.2vw, 24px) clamp(12px, 2.4vw, 24px) 48px;
  }

  .home-grid > .sidebar {
    display: none;
  }

  .home-panel-head {
    align-items: center;
    margin-bottom: 12px;
  }

  .home-panel-head h2 {
    margin-bottom: 4px;
    font-size: 24px;
  }

  .home-panel-head p {
    display: none;
  }

  .home-drawer-button {
    display: none;
  }

  .home-top-menu {
    display: grid;
  }

  .home-filters {
    grid-template-columns: 1fr;
  }

  .panel > .home-filters {
    display: none;
  }

  .wordcards-page {
    gap: 14px;
    overflow: hidden;
  }

  .wordcards-video-list,
  .wordcards-board {
    height: auto;
    min-width: 0;
    padding: 16px;
    overflow: hidden;
  }

  .wordcards-video-scroll {
    display: flex;
    max-height: none;
    margin: 12px -4px 0;
    padding: 0 4px 4px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
  }

  .wordcards-video-item {
    flex: 0 0 min(76vw, 260px);
    min-width: 0;
    scroll-snap-align: start;
  }

  .wordcards-video-item > span:last-child {
    min-width: 0;
  }

  .wordcards-video-thumb.thumb {
    flex-basis: 96px;
    width: 96px;
  }

  .wordcards-head .muted {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .wordcards-tabs.segmented.wide {
    grid-auto-flow: column;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-radius: 999px;
  }

  .wordcards-tabs.segmented.wide button {
    padding: 9px 6px;
    white-space: nowrap;
  }

  .wordcards-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .wordcards-flash-list {
    grid-template-columns: 1fr;
    max-height: none;
    overflow: visible;
  }

  .wordcards-page .flash-card {
    min-width: 0;
  }

  .home-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: block;
    pointer-events: none;
    opacity: 0;
    background: rgba(var(--brand-navy-rgb), 0.28);
    backdrop-filter: blur(4px);
    transition: opacity .22s ease;
  }

  .home-mobile-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 160;
    display: block;
    width: min(86vw, 340px);
    padding: 18px 14px calc(24px + env(safe-area-inset-bottom));
    overflow: auto;
    transform: translateX(-104%);
    border-radius: 0 28px 28px 0;
    background:
      radial-gradient(circle at 8% 0%, rgba(var(--brand-cyan-rgb), 0.18), transparent 15rem),
      linear-gradient(180deg, #fbfffc, #eef9f7);
    box-shadow: 22px 0 58px rgba(var(--brand-navy-rgb), 0.18);
    transition: transform .28s cubic-bezier(.22, 1, .36, 1);
  }

  .home-grid.drawer-open .home-drawer-backdrop {
    pointer-events: auto;
    opacity: 1;
  }

  .home-grid.drawer-open .home-mobile-drawer {
    transform: translateX(0);
  }

  .home-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 4px 4px 0;
  }

  .home-drawer-head strong {
    display: block;
    color: var(--brand-navy);
    font-size: 20px;
  }

  .home-drawer-head button {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--brand-navy);
    background: white;
    box-shadow: 0 8px 20px rgba(var(--brand-blue-rgb), 0.08);
  }

  .home-mobile-drawer .sidebar {
    position: static;
    display: grid;
    width: 100%;
    gap: 12px;
  }

  .home-mobile-drawer .side-card {
    width: 100%;
    padding: 16px;
    border-color: rgba(var(--brand-cyan-rgb), 0.16);
    box-shadow: 0 10px 26px rgba(var(--brand-blue-rgb), 0.08);
  }

  .home-mobile-drawer > .side-card {
    margin-top: 12px;
  }

  .home-mobile-drawer .drawer-filters {
    width: 100%;
    gap: 10px;
    margin-bottom: 12px;
  }

  .record-timeline-day {
    grid-template-columns: 1fr;
  }

  .record-timeline-date {
    position: static;
    grid-template-columns: 1fr auto;
  }

  .record-video-card {
    grid-template-columns: 1fr;
  }

  .record-video-main {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 16px;
  }

  .home-mobile-drawer .tag-filter-box {
    margin-bottom: 0;
    background: rgba(255, 255, 255, 0.74);
  }

  .hero-panel {
    display: none;
  }

  .topbar-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "left account"
      "nav nav";
    align-items: center;
    gap: 10px 12px;
    padding: 10px 12px;
  }

  .topbar-left {
    grid-area: left;
    min-width: 0;
  }

  .topbar-account {
    grid-area: account;
    justify-self: end;
  }

  .brand-logo {
    width: clamp(116px, 34vw, 152px);
    height: clamp(31px, 8.8vw, 42px);
  }

  .nav {
    grid-area: nav;
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
  }

  .nav a {
    flex: 0 1 auto;
    padding: 9px 12px;
    font-size: 14px;
    line-height: 1.15;
    text-align: center;
  }

  .nav a:has(.avatar) {
    padding: 4px;
  }

  .nav .avatar {
    width: 38px;
    height: 38px;
  }

  .subtitle-item,
  .list-item {
    grid-template-columns: 1fr;
  }
}

/* Immersive study page */
.study-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(var(--brand-blue-rgb), 0.1), transparent 28rem),
    radial-gradient(circle at 96% 22%, rgba(var(--brand-cyan-rgb), 0.14), transparent 24rem),
    #fbfdff;
  color: #14233d;
  --study-green: var(--brand-cyan);
  --study-deep: var(--brand-navy);
  --study-line: rgba(var(--brand-blue-rgb), 0.14);
  --study-soft: #f3f9ff;
  --study-sheet-font: clamp(15px, 1.08vw, 18px);
  --study-ui-font: clamp(15px, 1.05vw, 17px);
  --study-tool-icon: 24px;
  --study-tool-label: 13px;
  --study-control-time: 15px;
  --study-control-gap: 12px;
  --study-control-padding-y: 16px;
  --study-control-padding-x: 22px;
  --study-time-width: 54px;
  --study-progress-height: 24px;
  --study-progress-track: 5px;
  --study-progress-thumb: 22px;
  --study-transport-gap: 12px;
  --study-transport-button: 48px;
  --study-transport-icon: 24px;
  --study-big-play: 72px;
  --study-big-play-icon: 30px;
  font-size: var(--study-ui-font);
}

.study-shell {
  width: min(1420px, calc(100vw - 32px));
  margin: 16px auto 108px;
  display: grid;
  grid-template-columns: minmax(520px, 1.5fr) minmax(430px, 1fr);
  gap: 28px;
}

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

.study-header {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.study-title-wrap {
  min-width: 0;
  flex: 1 1 auto;
}

.study-header h1 {
  margin: 0;
  font-size: clamp(20px, 2vw, 27px);
  letter-spacing: -0.02em;
  line-height: 1.28;
}

.study-header p {
  margin: 0 0 0 auto;
  color: #667085;
  font-size: 14px;
  text-align: right;
  white-space: nowrap;
}

.study-meta {
  flex: 0 0 auto;
}

.study-back {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  color: #667085;
  cursor: pointer;
}

.study-back .app-icon {
  --icon-size: 24px;
}

.study-header-bookmark.bookmark {
  position: static;
  flex: 0 0 auto;
  margin-left: 2px;
  box-shadow: 0 8px 18px rgba(var(--brand-blue-rgb), 0.09);
}

.study-header-share {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--brand-navy);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 18px rgba(var(--brand-blue-rgb), 0.09);
  cursor: pointer;
}

.study-header-share .app-icon {
  --icon-size: 18px;
}

.study-video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 20px;
  background:
    linear-gradient(90deg, rgba(5, 18, 14, 0.45), rgba(9, 44, 34, 0.05)),
    radial-gradient(circle at 62% 42%, rgba(235, 230, 200, 0.7) 0 4%, transparent 4.5%),
    linear-gradient(135deg, #264435, #97c2a7 58%, #9ecbd1);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
}

.study-video-frame.sunset {
  background:
    linear-gradient(90deg, rgba(5, 18, 14, 0.45), rgba(9, 44, 34, 0.04)),
    radial-gradient(circle at 62% 42%, rgba(235, 230, 200, 0.7) 0 4%, transparent 4.5%),
    linear-gradient(135deg, #4a332a, #d6a86c 55%, #9ecbd1);
}

.study-video-frame.lilac {
  background:
    linear-gradient(90deg, rgba(5, 18, 14, 0.45), rgba(9, 44, 34, 0.04)),
    radial-gradient(circle at 62% 42%, rgba(235, 230, 200, 0.7) 0 4%, transparent 4.5%),
    linear-gradient(135deg, #31335f, #9a83bd 55%, #b5d5d0);
}

.study-video-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 16%, rgba(13, 44, 30, 0.85) 0 8%, transparent 9%),
    radial-gradient(circle at 35% 70%, rgba(71, 45, 31, 0.7) 0 9%, transparent 10%),
    linear-gradient(8deg, rgba(34, 30, 25, 0.65) 0 22%, transparent 23%),
    repeating-linear-gradient(90deg, transparent 0 72px, rgba(255,255,255,.08) 72px 74px);
  mix-blend-mode: multiply;
}

.study-video-frame.has-real-video {
  background: #050806;
}

.study-video-frame.has-real-video::before {
  display: none;
}

.study-video {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  background: #050806;
  object-fit: contain;
  cursor: pointer;
}

.study-video-frame.has-real-video .study-video-play {
  background: rgba(var(--brand-blue-rgb), 0.9);
  backdrop-filter: blur(10px);
  opacity: 1;
  transition: opacity .22s ease, transform .22s ease;
}

.study-video-frame.has-real-video.is-playing.controls-idle:not(:hover):not(:focus-within) .study-video-play {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.92);
}

.study-video-person {
  position: absolute;
  left: 55%;
  top: 22%;
  width: 18%;
  height: 52%;
  border-radius: 46% 46% 32% 32%;
  background:
    radial-gradient(circle at 50% 10%, #e7c9a5 0 16%, transparent 17%),
    linear-gradient(#b7d2d7 22%, #7ca7ad);
  box-shadow: 0 24px 36px rgba(0,0,0,.18);
}

.study-video-label,
.study-video-count {
  position: absolute;
  z-index: 2;
  top: 16px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
}

.study-video-label {
  left: 18px;
}

.study-video-count {
  right: 18px;
  color: #e5d355;
}

.study-video-play {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, rgba(var(--brand-blue-rgb), 0.92), rgba(var(--brand-cyan-rgb), 0.92));
  box-shadow: 0 16px 36px rgba(var(--brand-blue-rgb), 0.28);
  cursor: pointer;
}

.study-video-play .app-icon {
  --icon-size: 32px;
}

.study-intro {
  margin-top: 16px;
  padding: 22px 26px;
  border: 1px solid var(--study-line);
  border-radius: 18px;
  background: white;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.study-intro strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
}

.study-intro .app-icon {
  --icon-size: 22px;
  color: var(--study-green);
}

.study-intro p {
  margin: 8px 0 0 38px;
  color: #667085;
  line-height: 1.8;
}

.study-transcript-panel {
  height: calc(100vh - 32px);
  min-height: 620px;
  border: 1px solid var(--study-line);
  border-radius: 18px;
  background: white;
  overflow: hidden;
}

@media (orientation: portrait) and (min-width: 981px) {
  .study-page {
    height: 100vh;
    overflow: hidden;
  }

  .study-shell {
    height: calc(100vh - 124px);
    margin-bottom: 0;
    align-items: start;
  }

  .study-main {
    position: sticky;
    top: 16px;
    z-index: 24;
    align-self: start;
  }

  .study-transcript-panel {
    height: calc(100vh - 32px);
    min-height: 0;
  }
}

.study-panel-header {
  height: 68px;
  padding: 0 22px;
  border-bottom: 1px solid var(--study-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.study-panel-header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.study-panel-tools,
.study-mobile-tools {
  display: flex;
  align-items: center;
  gap: clamp(10px, 0.9em, 16px);
}

.study-tool {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(4px, 0.36em, 8px);
  background: transparent;
  color: #4b5563;
  cursor: pointer;
}

.study-tool .app-icon {
  --icon-size: var(--study-tool-icon);
}

.study-tool em {
  font-style: normal;
  font-weight: 700;
  font-size: var(--study-tool-label);
}

.study-tool.active {
  color: var(--study-green);
}

.study-tool.active .app-icon {
  filter: drop-shadow(0 8px 14px rgba(var(--brand-blue-rgb), 0.16));
}

.study-tool.desktop em {
  display: none;
}

.study-subtitle-scroll {
  height: calc(100% - 68px);
  padding: 14px 18px 18px;
  overflow: auto;
  scroll-behavior: smooth;
  overflow-anchor: none;
}

.study-mobile-list {
  display: none;
}

.study-subtitle-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 14px;
  padding: 18px 20px;
  margin-bottom: 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: #f6f9fc;
  overflow: hidden;
  cursor: pointer;
  font-family: var(--subtitle-font);
  transition: background .2s, border .2s, box-shadow .2s, transform .2s;
}

.study-subtitle-card.active {
  background: linear-gradient(90deg, rgba(var(--brand-cyan-rgb), 0.16), rgba(248, 252, 255, 0.98));
  border-color: rgba(var(--brand-cyan-rgb), 0.36);
  box-shadow: 0 14px 30px rgba(var(--brand-blue-rgb), 0.11);
}

.study-subtitle-card.active::before {
  content: "";
  position: absolute;
  inset: 14px auto 14px 0;
  width: 5px;
  border-radius: 0 999px 999px 0;
  background: var(--study-green);
}

.study-subtitle-card:hover {
  transform: translateY(-1px);
}

.study-subtime {
  grid-column: 1 / -1;
  font-size: calc(12px * var(--study-font-scale));
  color: #64748b;
  font-weight: 800;
}

.study-subcontent {
  min-width: 0;
}

.study-subtitle-actions {
  grid-column: 2;
  grid-row: 2 / span 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.study-line-en {
  font-family: var(--subtitle-font);
  font-size: calc(19px * var(--study-font-scale));
  line-height: 1.62;
  font-weight: 800;
  letter-spacing: 0.005em;
  word-spacing: 0.08em;
}

.study-line-cn {
  font-family: var(--subtitle-font);
  margin-top: 6px;
  font-size: calc(15px * var(--study-font-scale));
  line-height: 1.56;
  color: #66758b;
  font-weight: 700;
}

.learn-mark {
  appearance: none;
  display: inline;
  margin: 0 0.04em;
  padding: 0.02em 0.14em 0.05em;
  border: 0;
  border-bottom: 0.11em solid rgba(var(--brand-cyan-rgb), 0.56);
  border-radius: 0.18em;
  background: rgba(var(--brand-cyan-rgb), 0.16);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  color: inherit;
  cursor: pointer;
  font: inherit;
  line-height: inherit;
  vertical-align: baseline;
}

.learn-mark:hover,
.learn-mark:focus-visible {
  border-bottom-color: rgba(var(--brand-blue-rgb), 0.65);
  background: rgba(var(--brand-cyan-rgb), 0.24);
}

.study-inline-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.study-inline-cards button,
.study-mini-list button {
  padding: 7px 10px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--study-line);
  color: var(--brand-navy);
  cursor: pointer;
}

@media (orientation: portrait) {
  .study-transcript-panel .study-subtitle-scroll {
    padding: 10px 14px 14px;
  }

  .study-transcript-panel .study-subtitle-card {
    grid-template-columns: minmax(0, 1fr) 36px;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 12px;
  }

  .study-transcript-panel .study-subtitle-card.active::before {
    inset: 10px auto 10px 0;
    width: 4px;
  }

  .study-transcript-panel .study-subtime {
    font-size: calc(10px * var(--study-font-scale));
  }

  .study-transcript-panel .study-line-en {
    font-size: calc(16px * var(--study-font-scale));
    line-height: 1.34;
  }

  .study-transcript-panel .study-line-cn {
    margin-top: 2px;
    font-size: calc(13px * var(--study-font-scale));
    line-height: 1.32;
  }

  .study-transcript-panel .learn-mark {
    padding: 0 0.14em 0.02em;
    border: 0;
    border-bottom: 0.14em solid rgba(var(--brand-cyan-rgb), 0.62);
    border-radius: 0.2em;
  }

  .study-transcript-panel .study-star,
  .study-transcript-panel .study-practice {
    width: 34px;
    height: 34px;
  }
}

.study-star,
.study-practice {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-self: start;
  color: #cbd5e1;
  background: white;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  cursor: pointer;
}

.study-star .app-icon,
.study-practice .app-icon {
  --icon-size: 21px;
}

.study-practice {
  color: var(--brand-blue);
  border: 1px solid rgba(var(--brand-blue-rgb), 0.16);
  background: #ffffff;
}

.study-practice:hover {
  color: var(--brand-blue);
  border-color: rgba(var(--brand-cyan-rgb), 0.42);
  background: #ffffff;
}

.study-star.is-collected {
  color: var(--study-green);
  background: var(--accent-soft);
  box-shadow: 0 10px 22px rgba(var(--brand-blue-rgb), 0.14);
}

.study-control-bar {
  position: fixed;
  left: max(16px, calc((100vw - min(1420px, calc(100vw - 32px))) / 2));
  bottom: 20px;
  z-index: 50;
  width: min(835px, calc(60vw - 36px), calc(100vw - 40px));
  transform: none;
  padding: var(--study-control-padding-y) var(--study-control-padding-x);
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(18px);
  font-size: var(--study-ui-font);
}

.study-progress-row {
  display: grid;
  grid-template-columns: var(--study-time-width) minmax(0, 1fr) var(--study-time-width);
  align-items: center;
  gap: var(--study-control-gap);
  color: #64748b;
  font-weight: 700;
  font-size: var(--study-control-time);
}

.study-progress-row span:first-child {
  color: var(--brand-cyan);
}

.study-progress-range {
  width: 100%;
  height: var(--study-progress-height);
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.study-progress-range::-webkit-slider-runnable-track {
  height: var(--study-progress-track);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-blue) 0 var(--study-progress, 0%), #d9e7f0 var(--study-progress, 0%) 100%);
}

.study-progress-range::-webkit-slider-thumb {
  appearance: none;
  width: var(--study-progress-thumb);
  height: var(--study-progress-thumb);
  margin-top: calc((var(--study-progress-track) - var(--study-progress-thumb)) / 2);
  border: 4px solid white;
  border-radius: 50%;
  background: var(--brand-cyan);
  box-shadow: 0 6px 16px rgba(var(--brand-blue-rgb), 0.24);
}

.study-progress-range::-moz-range-track {
  height: var(--study-progress-track);
  border-radius: 999px;
  background: #d9e5e8;
}

.study-progress-range::-moz-range-progress {
  height: var(--study-progress-track);
  border-radius: 999px;
  background: var(--brand-blue);
}

.study-progress-range::-moz-range-thumb {
  width: calc(var(--study-progress-thumb) - 6px);
  height: calc(var(--study-progress-thumb) - 6px);
  border: 4px solid white;
  border-radius: 50%;
  background: var(--brand-cyan);
  box-shadow: 0 6px 16px rgba(var(--brand-blue-rgb), 0.24);
}

.study-transport {
  margin-top: var(--study-transport-gap);
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.study-transport button {
  width: var(--study-transport-button);
  height: var(--study-transport-button);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  color: #4b5563;
  cursor: pointer;
}

.study-transport .app-icon {
  --icon-size: var(--study-transport-icon);
}

.study-transport button.is-on {
  color: var(--study-green);
}

.loop-control {
  position: relative;
  width: var(--study-transport-button);
  height: var(--study-transport-button);
  display: grid;
  place-items: center;
}

.study-transport .loop-control > button {
  width: var(--study-transport-button);
  height: var(--study-transport-button);
}

.loop-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 8;
  width: 172px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(var(--brand-cyan-rgb), 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(var(--brand-navy-rgb), 0.18);
  backdrop-filter: blur(16px);
  display: none;
}

.loop-control.is-open .loop-menu {
  display: grid;
}

.study-transport .loop-menu button {
  width: 100%;
  height: auto;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 11px;
  border-radius: 13px;
  color: var(--brand-navy);
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  text-align: left;
}

.study-transport .loop-menu button.active {
  color: var(--brand-blue-deep);
  background: rgba(var(--brand-blue-rgb), 0.1);
}

.study-transport .loop-menu button.muted-action {
  color: var(--muted);
  background: #f5f8fb;
}

.study-transport .big-play {
  width: var(--study-big-play);
  height: var(--study-big-play);
  color: white;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan));
  box-shadow: 0 14px 30px rgba(var(--brand-blue-rgb), 0.28);
}

.study-transport .big-play .app-icon {
  --icon-size: var(--study-big-play-icon);
}

.study-sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(var(--brand-navy-rgb), 0.28);
  backdrop-filter: blur(3px);
}

.study-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 90;
  width: min(820px, calc(100vw - 24px));
  max-height: min(84vh, 780px);
  height: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(-50%) translateY(var(--sheet-drag-y, 0px));
  padding: clamp(16px, 1.25vw, 24px) clamp(18px, 1.55vw, 28px) clamp(24px, 1.9vw, 36px);
  border-radius: 28px 28px 0 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(var(--brand-cyan-rgb), 0.12), transparent 22rem),
    linear-gradient(180deg, #ffffff, #f5fbff);
  box-shadow: 0 -22px 64px rgba(var(--brand-navy-rgb), 0.2);
  font-size: var(--study-sheet-font);
  transition: transform .32s cubic-bezier(.22, 1, .36, 1), max-height .32s cubic-bezier(.22, 1, .36, 1), height .32s cubic-bezier(.22, 1, .36, 1), width .32s cubic-bezier(.22, 1, .36, 1);
  will-change: transform, max-height;
}

.study-sheet.is-expanded {
  height: calc(100dvh - 18px);
  max-height: calc(100dvh - 18px);
  width: min(980px, calc(100vw - 24px));
}

.study-sheet.is-dragging {
  transition: none;
}

.study-sheet-handle {
  flex: 0 0 auto;
  width: clamp(58px, 4.4em, 86px);
  height: clamp(6px, 0.48em, 10px);
  border-radius: 999px;
  margin: 0 auto clamp(12px, 0.9em, 18px);
  background: rgba(var(--brand-blue-rgb), 0.18);
  cursor: grab;
  touch-action: none;
}

.study-sheet.is-dragging .study-sheet-handle {
  cursor: grabbing;
}

.study-sheet header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.study-sheet header h2 {
  margin: 0;
  font-size: clamp(21px, 1.45em, 30px);
}

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

.study-sheet-header-actions .definition-toggle {
  min-height: clamp(36px, 2.45em, 46px);
  padding: 7px 9px 7px 14px;
  box-shadow: 0 8px 18px rgba(var(--brand-blue-rgb), 0.07);
}

.study-sheet-close {
  width: clamp(38px, 2.65em, 54px);
  height: clamp(38px, 2.65em, 54px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--brand-navy);
  background: #edf7ff;
  cursor: pointer;
}

.study-sheet-close .app-icon {
  --icon-size: clamp(21px, 1.45em, 30px);
}

.sheet-row {
  min-height: 78px;
  margin: 12px 0;
  padding: 18px 22px;
  border: 1px solid var(--study-line);
  border-radius: 18px;
  background: white;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.sheet-row strong,
.sheet-row span {
  font-size: 1em;
}

.sheet-row input[type="range"] {
  min-height: 32px;
}

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--study-line);
  border-radius: 999px;
  background: #eef7ff;
}

.segmented.wide {
  flex: 0 0 auto;
  width: 100%;
  grid-auto-columns: 1fr;
  margin-bottom: 16px;
}

.segmented button {
  padding: 10px 20px;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  font-weight: 900;
  cursor: pointer;
}

.segmented button.active {
  color: white;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan));
  box-shadow: 0 6px 14px rgba(var(--brand-blue-rgb), 0.22);
}

.flashcard-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.flashcard-toolbar .segmented.wide {
  flex: 1 1 auto;
  margin-bottom: 0;
}

.definition-toggle {
  flex: 0 0 auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 16px;
  border: 1px solid rgba(var(--brand-cyan-rgb), 0.22);
  border-radius: 999px;
  color: var(--brand-navy);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(var(--brand-blue-rgb), 0.08);
  cursor: pointer;
  font-weight: 900;
  white-space: nowrap;
}

.definition-toggle em {
  width: 42px;
  height: 24px;
  position: relative;
  border-radius: 999px;
  background: #dbeafe;
  transition: background .18s ease;
}

.definition-toggle em::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 4px 10px rgba(var(--brand-navy-rgb), 0.18);
  transition: transform .18s ease;
}

.definition-toggle.on {
  border-color: rgba(var(--brand-gold-rgb), 0.38);
  background: rgba(var(--brand-gold-rgb), 0.13);
}

.definition-toggle.on em {
  background: var(--brand-gold);
}

.definition-toggle.on em::after {
  transform: translateX(18px);
}

.switch {
  justify-self: end;
  width: 78px;
  height: 42px;
  border-radius: 999px;
  padding: 4px;
  background: #e5e7eb;
  cursor: pointer;
}

.switch span {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
  transition: transform .18s;
}

.switch.on {
  background: var(--study-green);
}

.switch.on span {
  transform: translateX(36px);
}

.study-sheet.is-subtitles {
  max-height: min(54vh, 520px);
}

.study-sheet.is-subtitles .sheet-row {
  min-height: 56px;
  margin: 8px 0;
  padding: 12px 16px;
  grid-template-columns: 108px minmax(0, 1fr) auto;
  border-radius: 16px;
}

.study-sheet.is-subtitles .segmented button {
  padding: 8px 14px;
}

.study-sheet.is-subtitles .switch {
  width: 64px;
  height: 34px;
  padding: 3px;
}

.study-sheet.is-subtitles .switch span {
  width: 28px;
  height: 28px;
}

.study-sheet.is-subtitles .switch.on span {
  transform: translateX(30px);
}

.subtitle-font-row {
  align-items: center;
  grid-template-columns: 108px minmax(0, 1fr) !important;
}

.subtitle-font-control {
  display: grid;
  gap: 4px;
  align-self: center;
}

.subtitle-font-scale {
  display: flex;
  justify-content: space-between;
  color: #7d8fa4;
  font-size: 12px;
  font-weight: 900;
}

.subtitle-font-label {
  display: none;
}

.speed-card {
  padding: 22px 24px 24px;
  border: 1px solid rgba(var(--brand-cyan-rgb), 0.16);
  border-radius: 28px;
  color: var(--brand-navy);
  background:
    radial-gradient(circle at 8% 16%, rgba(var(--brand-cyan-rgb), 0.14), transparent 28%),
    radial-gradient(circle at 94% 0%, rgba(var(--brand-gold-rgb), 0.13), transparent 20%),
    linear-gradient(135deg, #ffffff, #eef8ff);
  box-shadow: 0 16px 34px rgba(var(--brand-blue-rgb), 0.1);
}

.speed-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.speed-card-head strong {
  font-size: 18px;
}

.speed-card-head span {
  color: var(--study-green);
  font-size: 20px;
  font-weight: 900;
}

.speed-ruler {
  position: relative;
  height: 28px;
  margin: 0 7px 2px;
  color: #8aa198;
  font-weight: 800;
}

.speed-ruler span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}

.speed-ruler span:first-child {
  transform: translateX(0);
}

.speed-ruler span:last-child {
  transform: translateX(-100%);
}

.speed-ruler span:nth-child(2) {
  color: var(--study-green);
}

.speed-range {
  width: 100%;
  height: 38px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.speed-range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-blue) 0 var(--speed-progress), #d3e8f0 var(--speed-progress) 100%);
}

.speed-range::-webkit-slider-thumb {
  appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -9px;
  border: 5px solid white;
  border-radius: 50%;
  background: var(--brand-cyan);
  box-shadow: 0 8px 18px rgba(var(--brand-blue-rgb), 0.24);
}

.speed-range::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: #d3e8f0;
}

.speed-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 5px solid white;
  border-radius: 50%;
  background: var(--brand-cyan);
  box-shadow: 0 8px 18px rgba(var(--brand-blue-rgb), 0.24);
}

.study-flash-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: clamp(10px, 0.8em, 16px);
  align-items: stretch;
  grid-auto-rows: auto;
  min-height: 0;
  max-height: min(54vh, 560px);
  overflow: auto;
  padding: 2px 4px 4px;
}

.study-sheet.is-expanded .study-flash-list,
.study-sheet.is-expanded .study-favorite-list {
  flex: 1 1 auto;
  max-height: none;
}

.flash-card,
.practice-card {
  position: relative;
  align-self: start;
  padding: clamp(16px, 1.2em, 24px);
  border-radius: clamp(18px, 1.35em, 26px);
  border: 1px solid var(--study-line);
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--brand-cyan-rgb), 0.1), transparent 9rem),
    white;
  box-shadow: 0 10px 24px rgba(var(--brand-navy-rgb), 0.05);
}

.flash-card {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.flash-card.is-known {
  border-color: rgba(var(--brand-blue-rgb), 0.26);
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--brand-blue-rgb), 0.13), transparent 9rem),
    #eef7ff;
}

.flash-card.is-unknown {
  border-color: rgba(var(--brand-gold-rgb), 0.42);
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--brand-gold-rgb), 0.2), transparent 9rem),
    #fff7df;
}

.flash-card h3 {
  margin: 0 48px 10px 0;
  font-size: clamp(18px, var(--title-size, 28px), 30px);
  line-height: 1.25;
}

.flash-card-title {
  display: -webkit-box;
  overflow: hidden;
  text-wrap: balance;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--brand-navy);
}

.flash-card-pronunciation {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: #6a7d95;
  font-size: clamp(14px, 0.96em, 18px);
  font-weight: 850;
}

.flash-card-bookmark,
.flash-card-sound {
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--study-green);
  background: rgba(var(--brand-cyan-rgb), 0.1);
  cursor: pointer;
}

.flash-card-bookmark {
  position: absolute;
  top: auto;
  right: clamp(12px, 0.95em, 18px);
  bottom: clamp(12px, 0.95em, 18px);
  width: clamp(34px, 2.6em, 46px);
  height: clamp(34px, 2.6em, 46px);
}

.flash-card-sound {
  width: clamp(30px, 2.1em, 40px);
  height: clamp(30px, 2.1em, 40px);
}

.flash-card-bookmark .app-icon,
.flash-card-sound .app-icon {
  --icon-size: clamp(17px, 1.22em, 23px);
}

.flash-card.is-collected .flash-card-bookmark {
  color: var(--brand-navy);
  background: var(--accent-soft);
  box-shadow: 0 10px 22px rgba(var(--brand-blue-rgb), 0.12);
}

.flash-card p,
.practice-card p {
  margin-bottom: 0;
  color: #61728a;
  font-size: clamp(14px, 0.95em, 18px);
  line-height: 1.62;
}

.flash-card p {
  padding-right: 42px;
}

.flash-card-meaning[hidden] {
  display: none;
}

.flash-card-status-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: auto;
  padding-top: 18px;
  padding-right: clamp(46px, 3.5em, 62px);
}

.flash-status {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  font-weight: 400;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.flash-status:hover {
  transform: translateY(-1px);
}

.flash-status.known {
  color: var(--brand-blue-deep);
  background: #e5f4ff;
  border-color: rgba(var(--brand-blue-rgb), 0.18);
}

.flash-status.unknown {
  color: #99660d;
  background: #fff1c7;
  border-color: rgba(var(--brand-gold-rgb), 0.28);
}

.flash-status.active {
  box-shadow: 0 10px 20px rgba(var(--brand-navy-rgb), 0.1);
}

.flash-status.known.active {
  color: white;
  background: linear-gradient(135deg, var(--brand-blue), #65caff);
}

.flash-status.unknown.active {
  color: var(--brand-navy);
  background: linear-gradient(135deg, #ffe59b, var(--brand-gold));
}

.study-mini-list {
  display: grid;
  gap: 10px;
}

.study-mini-list button {
  border-radius: 16px;
  text-align: left;
  font-weight: 800;
}

.study-favorite-list {
  display: grid;
  gap: clamp(10px, 0.8em, 16px);
  min-height: 0;
  max-height: min(54vh, 560px);
  overflow: auto;
  padding: 2px 4px 4px;
}

.study-favorite-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(40px, 2.9em, 54px);
  gap: clamp(10px, 0.75em, 16px);
  align-items: center;
  padding: clamp(14px, 1em, 20px);
  border: 1px solid var(--study-line);
  border-radius: clamp(16px, 1.2em, 22px);
  background: white;
  box-shadow: 0 10px 24px rgba(var(--brand-navy-rgb), 0.05);
}

.study-favorite-main {
  min-width: 0;
  display: grid;
  gap: 6px;
  text-align: left;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.study-favorite-main strong {
  font-size: clamp(16px, 1.08em, 22px);
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.study-favorite-word-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.study-favorite-sound {
  width: clamp(30px, 2.2em, 40px);
  height: clamp(30px, 2.2em, 40px);
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--study-green);
  background: var(--accent-soft);
  cursor: pointer;
}

.study-favorite-sound .app-icon {
  --icon-size: clamp(16px, 1.1em, 21px);
}

.study-favorite-main span {
  color: #66758b;
  font-size: clamp(13px, 0.92em, 17px);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.study-favorite-remove {
  width: clamp(40px, 2.9em, 54px);
  height: clamp(40px, 2.9em, 54px);
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--study-green);
  background: var(--accent-soft);
  cursor: pointer;
}

.study-favorite-remove .app-icon {
  --icon-size: clamp(18px, 1.3em, 26px);
}

.study-favorite-video-toggle.is-bookmarked {
  color: white;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan));
  box-shadow: 0 10px 22px rgba(var(--brand-blue-rgb), 0.2);
}

.learning-card-layer {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: transparent;
}

.learning-card-popover {
  position: fixed;
  max-height: calc(100dvh - 28px);
  overflow: auto;
  min-height: 220px;
  padding: 20px;
  border: 1px solid rgba(var(--brand-cyan-rgb), 0.18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 0% 0%, rgba(var(--brand-cyan-rgb), 0.12), transparent 18rem),
    radial-gradient(circle at 100% 0%, rgba(var(--brand-gold-rgb), 0.12), transparent 13rem),
    #fffffb;
  box-shadow: 0 24px 70px rgba(var(--brand-navy-rgb), 0.22);
  animation: cardPop .18s ease both;
}

.learning-card-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #64748b;
  background: #edf7ff;
  cursor: pointer;
}

.learning-card-favorite {
  position: absolute;
  top: 14px;
  right: 56px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--study-green);
  background: rgba(var(--brand-cyan-rgb), 0.1);
  cursor: pointer;
}

.learning-card-favorite.is-collected {
  color: var(--brand-navy);
  background: var(--accent-soft);
  box-shadow: 0 10px 22px rgba(var(--brand-blue-rgb), 0.12);
}

.learning-card-close .app-icon {
  --icon-size: 18px;
}

.learning-card-favorite .app-icon {
  --icon-size: 18px;
}

.learning-card-type {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--accent-deep);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 900;
}

.learning-card-popover h3 {
  margin: 12px 40px 4px 0;
  font-size: 28px;
  line-height: 1.18;
}

.learning-card-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-right: 36px;
  margin-top: 12px;
}

.learning-card-title h3 {
  margin: 0;
}

.learning-card-icon-sound,
.learning-card-sentence-sound {
  display: inline-grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--accent-deep);
  background: var(--accent-soft);
  cursor: pointer;
}

.learning-card-icon-sound .app-icon,
.learning-card-sentence-sound .app-icon {
  --icon-size: 17px;
}

.learning-card-phonetic {
  color: #5f7467;
  font-size: 14px;
  font-weight: 800;
}

.learning-card-section {
  margin: 14px 0 10px;
  padding: 12px 14px;
  border: 1px solid rgba(var(--brand-cyan-rgb), 0.14);
  border-radius: 16px;
  background: #f2fbff;
}

.learning-card-section strong {
  display: block;
  margin-bottom: 5px;
  color: var(--accent-deep);
  font-size: 13px;
  font-weight: 900;
}

.learning-card-section p {
  margin: 0;
  color: var(--brand-navy);
  font-weight: 800;
  line-height: 1.65;
}

.learning-card-section.scene {
  border-color: rgba(217, 139, 43, 0.2);
  background: #fff8ed;
}

.learning-card-section.scene strong {
  color: #a66420;
}

.word-translate-popover {
  position: fixed;
  z-index: 260;
  color: var(--brand-navy);
  border: 1px solid rgba(var(--brand-cyan-rgb), 0.22);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 45px rgba(var(--brand-navy-rgb), 0.14);
  backdrop-filter: blur(16px);
}

.word-translate-popover.is-menu {
  padding: 3px;
  border-radius: 999px;
  border-color: rgba(var(--brand-blue-rgb), 0.16);
  background: rgba(255, 255, 255, 0.86);
}

.word-translate-popover.is-menu button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--brand-blue);
  background: rgba(var(--brand-blue-rgb), 0.08);
  cursor: pointer;
  font-weight: 900;
  font-size: 13px;
}

.word-translate-popover.is-menu .app-icon {
  --icon-size: 15px;
}

.word-translate-popover.is-card {
  width: min(330px, calc(100vw - 24px));
  padding: 16px;
  border-radius: 22px;
}

.word-translate-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(var(--brand-blue-rgb), 0.08);
  cursor: pointer;
}

.word-translate-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-right: 32px;
}

.word-translate-title h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.18;
}

.word-translate-title span {
  color: #61728a;
  font-size: 14px;
  font-weight: 900;
}

.word-translate-title button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--brand-navy);
  background: var(--accent-soft);
  cursor: pointer;
}

.word-translate-popover section {
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(var(--brand-cyan-rgb), 0.14);
  border-radius: 15px;
  background: #f2fbff;
}

.word-translate-popover section strong {
  display: block;
  margin-bottom: 4px;
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 900;
}

.word-translate-popover section p,
.word-translate-loading,
.word-translate-error {
  margin: 0;
  color: var(--brand-navy);
  font-weight: 800;
  line-height: 1.58;
}

.word-translate-popover > em {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.word-translate-error {
  padding-right: 30px;
  color: var(--danger);
}

.learning-card-example,
.learning-card-sentence {
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 16px;
  background: #f3f9ff;
  color: #566980;
  line-height: 1.55;
}

.learning-card-sentence-block {
  margin-top: 12px;
}

.learning-card-sentence {
  position: relative;
  padding-right: 48px;
  color: var(--brand-navy);
  font-weight: 800;
}

.learning-card-sentence-sound {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
}

.learning-card-sentence-mark {
  padding: 1px 4px;
  border: 1px solid rgba(var(--brand-cyan-rgb), 0.34);
  border-radius: 8px;
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.learning-card-sentence-cn {
  margin: 8px 2px 0;
  color: #69786f;
  font-size: 14px;
  line-height: 1.65;
}

@keyframes cardPop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.study-page.practice-open {
  padding-bottom: 44px;
}

.study-page.practice-open .study-control-bar {
  opacity: 0;
  pointer-events: none;
  transform: translateY(112%);
}

.study-page.practice-open .study-sheet-mask {
  pointer-events: none;
  background: transparent;
  backdrop-filter: none;
}

.study-sheet.is-practice {
  width: min(760px, calc(100vw - 28px));
  max-height: min(76vh, 680px);
  bottom: 18px;
  border-radius: 30px;
  padding: clamp(18px, 2vw, 26px);
  box-shadow: 0 26px 70px rgba(var(--brand-navy-rgb), 0.22);
}

@media (min-width: 981px) {
  .study-sheet.is-practice {
    left: max(16px, calc((100vw - min(1420px, calc(100vw - 32px))) / 2));
    width: min(835px, calc(60vw - 36px), calc(100vw - 40px));
    transform: translateY(var(--sheet-drag-y, 0px));
  }
}

.study-sheet.is-practice .study-sheet-handle {
  margin-bottom: 10px;
}

.study-sheet.is-practice header {
  margin-bottom: 10px;
}

.practice-panel {
  position: relative;
  display: grid;
  gap: 12px;
}

.practice-current-card {
  grid-template-columns: minmax(54px, auto) minmax(0, 1fr);
  margin: 0;
  padding: clamp(14px, 1.2em, 20px);
  border-color: rgba(var(--brand-cyan-rgb), 0.18);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--brand-cyan-rgb), 0.08), transparent 11rem),
    #ffffff;
  box-shadow: 0 10px 24px rgba(var(--brand-blue-rgb), 0.07);
}

.practice-current-card.active,
.practice-current-card.active:hover {
  border-color: rgba(var(--brand-cyan-rgb), 0.18);
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--brand-cyan-rgb), 0.08), transparent 11rem),
    #ffffff;
  box-shadow: 0 10px 24px rgba(var(--brand-blue-rgb), 0.07);
  transform: none;
}

.practice-current-card.active::before {
  display: none;
}

.practice-blank-input {
  margin-top: 12px;
}

.practice-control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.practice-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
}

.practice-icon-button,
.practice-record-play {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: inline-grid;
  place-items: center;
  align-items: center;
  justify-content: center;
  color: var(--brand-navy);
  background: #eef8ff;
  cursor: pointer;
}

.practice-toolbar button .app-icon,
.practice-record-play .app-icon {
  --icon-size: 20px;
}

.practice-play {
  color: var(--brand-navy) !important;
  background: linear-gradient(135deg, var(--brand-gold), #ffd36b) !important;
  box-shadow: 0 12px 24px rgba(var(--brand-gold-rgb), 0.24);
}

.practice-play.is-playing {
  background: linear-gradient(135deg, #ffd36b, var(--brand-gold)) !important;
}

.practice-record-cluster {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.practice-record-button {
  position: relative;
  width: clamp(66px, 6.8vw, 78px);
  height: clamp(66px, 6.8vw, 78px);
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 26px;
  color: white;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan));
  box-shadow: 0 18px 34px rgba(var(--brand-blue-rgb), 0.24);
  cursor: pointer;
}

.practice-record-button .app-icon {
  --icon-size: clamp(27px, 2.3vw, 34px);
}

.practice-record-button.is-recording {
  background: linear-gradient(135deg, #f26464, #d92d20);
  animation: recordPulse 1.05s ease-in-out infinite;
}

.practice-record-button.is-recording::before,
.practice-record-button.is-recording::after {
  content: "";
  position: absolute;
  inset: 18px 20px;
  border-radius: 999px;
  background:
    linear-gradient(90deg,
      transparent 0 8%,
      rgba(255,255,255,.88) 8% 17%,
      transparent 17% 30%,
      rgba(255,255,255,.72) 30% 39%,
      transparent 39% 52%,
      rgba(255,255,255,.9) 52% 61%,
      transparent 61% 74%,
      rgba(255,255,255,.7) 74% 83%,
      transparent 83%);
  opacity: .72;
  transform: translateY(13px) scaleY(.34);
  animation: recordWave 0.72s ease-in-out infinite;
}

.practice-record-button.is-recording::after {
  animation-delay: .18s;
  opacity: .44;
  transform: translateY(-13px) scaleY(.26);
}

.practice-record-play {
  width: clamp(66px, 6.8vw, 78px);
  height: clamp(66px, 6.8vw, 78px);
  border-radius: 24px;
  color: var(--brand-navy);
  background: rgba(var(--brand-gold-rgb), 0.2);
  box-shadow: 0 10px 22px rgba(var(--brand-gold-rgb), 0.14);
}

.practice-record-play.is-playing {
  color: var(--brand-navy);
  background: linear-gradient(135deg, var(--brand-gold), #ffd36b);
  box-shadow: 0 12px 26px rgba(var(--brand-gold-rgb), 0.24);
}

.practice-speed-popover {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(var(--brand-cyan-rgb), 0.16);
  border-radius: 18px;
  background: #eef8ff;
}

.practice-speed-popover span {
  color: var(--study-green);
  font-weight: 900;
}

@keyframes recordPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 18px 34px rgba(217, 45, 32, 0.22);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 20px 42px rgba(217, 45, 32, 0.32);
  }
}

@keyframes recordWave {
  0%, 100% {
    transform: translateY(10px) scaleY(.32);
  }
  50% {
    transform: translateY(-8px) scaleY(.9);
  }
}

.practice-text {
  min-height: 180px;
  padding: 26px;
  border-radius: 20px;
  background: #fffff6;
  font-family: var(--subtitle-font);
}

.practice-controls,
.practice-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.practice-controls button {
  min-width: 74px;
  min-height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: #edf2f7;
  cursor: pointer;
  font-weight: 900;
}

.practice-controls .app-icon {
  --icon-size: 18px;
}

@media (min-width: 981px) {
  .study-mobile-tools {
    display: none;
  }
}

@media (max-width: 980px), (orientation: portrait) and (max-width: 1180px) {
  .study-page {
    --study-ui-font: clamp(14px, 1.8vw, 18px);
    --study-sheet-font: clamp(16px, 2.55vw, 24px);
    --study-tool-icon: clamp(21px, 3.35vw, 31px);
    --study-tool-label: clamp(12px, 1.75vw, 15px);
    --study-control-time: clamp(14px, 1.85vw, 17px);
    --study-control-gap: clamp(8px, 1.5vw, 16px);
    --study-control-padding-y: clamp(12px, 1.8vw, 20px);
    --study-control-padding-x: clamp(18px, 3vw, 34px);
    --study-time-width: clamp(44px, 6.8vw, 58px);
    --study-progress-height: clamp(18px, 3vw, 28px);
    --study-progress-track: clamp(4px, 0.72vw, 7px);
    --study-progress-thumb: clamp(18px, 3vw, 26px);
    --study-transport-gap: clamp(6px, 1.35vw, 14px);
    --study-transport-button: clamp(40px, 6.6vw, 58px);
    --study-transport-icon: clamp(20px, 3.3vw, 30px);
    --study-big-play: clamp(62px, 9vw, 82px);
    --study-big-play-icon: clamp(28px, 4.4vw, 38px);
    height: auto;
    overflow: visible;
    padding-bottom: 174px;
    background:
      radial-gradient(circle at 12% 0%, rgba(var(--brand-blue-rgb), 0.12), transparent 24rem),
      radial-gradient(circle at 100% 18%, rgba(var(--brand-cyan-rgb), 0.16), transparent 24rem),
      #f8fbff;
  }

  .study-shell {
    width: 100%;
    display: block;
    margin: 0;
    padding: 0 20px;
  }

  .study-main {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 32;
    padding: 0 20px 8px;
    background: rgba(248, 251, 255, 0.96);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
  }

  .study-header {
    margin: 0 -20px;
    min-height: 46px;
    padding: 6px 20px;
  }

  .study-header h1 {
    font-size: 20px;
    max-width: 72vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .study-header p,
  .study-intro,
  .study-transcript-panel {
    display: none;
  }

  .study-video-frame {
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
  }

  .study-video-play {
    display: none;
  }

  .study-mobile-list {
    display: block;
    padding: calc(58px + ((100vw - 40px) * 0.5625) + 18px) 20px 0;
  }

  .study-mobile-tools {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
    gap: 6px;
  }

  .study-mobile-tools .study-tool {
    width: 100%;
    justify-content: center;
  }

  .study-mobile-list .study-subtitle-card {
    grid-template-columns: minmax(0, 1fr) clamp(34px, 5.8vw, 46px);
    gap: clamp(6px, 1vw, 10px);
    padding: clamp(10px, 1.7vw, 16px) clamp(12px, 2.2vw, 20px);
    margin-bottom: clamp(7px, 1.1vw, 10px);
    border-color: var(--study-line);
    border-radius: 12px;
    background: white;
  }

  .study-mobile-list .study-subtitle-card.active {
    background: linear-gradient(90deg, rgba(var(--brand-cyan-rgb), 0.14), #ffffff);
  }

  .study-subtime {
    font-size: calc(clamp(10px, 1.28vw, 14px) * var(--study-font-scale));
  }

  .study-line-en {
    font-size: calc(clamp(18px, 2.34vw, 26px) * var(--study-font-scale));
    line-height: 1.34;
  }

  .study-line-cn {
    margin-top: 5px;
    font-size: calc(clamp(14px, 1.86vw, 21px) * var(--study-font-scale));
    line-height: 1.36;
  }

  .study-mobile-list .learn-mark {
    padding: 0.02em 0.13em 0.05em;
    border: 0;
    border-bottom: 0.1em solid rgba(var(--brand-cyan-rgb), 0.58);
    border-radius: 0.2em;
    background: rgba(var(--brand-cyan-rgb), 0.16);
  }

  .study-mobile-list .study-star,
  .study-mobile-list .study-practice {
    width: clamp(34px, 5.8vw, 46px);
    height: clamp(34px, 5.8vw, 46px);
  }

  .study-mobile-list .study-star .app-icon,
  .study-mobile-list .study-practice .app-icon {
    --icon-size: clamp(17px, 2.7vw, 24px);
  }

  .study-inline-cards {
    display: none;
  }

  .study-control-bar {
    left: 0;
    bottom: 0;
    width: 100%;
    transform: none;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }

  .study-sheet {
    width: calc(100vw - clamp(16px, 3.2vw, 36px));
    max-height: min(88dvh, calc(100dvh - 28px));
    padding: clamp(18px, 2.4vw, 28px) clamp(18px, 3vw, 34px) calc(clamp(26px, 3.6vw, 42px) + env(safe-area-inset-bottom));
    border-radius: clamp(26px, 4vw, 38px) clamp(26px, 4vw, 38px) 0 0;
  }

  .study-sheet.is-practice {
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: calc(100vw - clamp(20px, 4vw, 40px));
    max-height: min(72dvh, calc(100dvh - 112px));
    border-radius: clamp(24px, 4vw, 34px);
  }

  .study-sheet.is-expanded {
    width: 100vw;
    height: calc(100dvh - 8px);
    max-height: calc(100dvh - 8px);
    border-radius: clamp(22px, 3.4vw, 34px) clamp(22px, 3.4vw, 34px) 0 0;
  }

  .study-sheet header {
    margin-bottom: clamp(12px, 1.8vw, 22px);
  }

  .study-sheet header h2 {
    font-size: clamp(24px, 3.6vw, 36px);
  }

  .segmented.wide {
    gap: clamp(4px, 0.9vw, 10px);
    padding: clamp(5px, 0.8vw, 9px);
    margin-bottom: clamp(14px, 2vw, 24px);
  }

  .segmented button {
    padding: clamp(10px, 1.65vw, 18px) clamp(12px, 2.1vw, 24px);
    font-size: clamp(14px, 2.15vw, 20px);
  }

  .study-flash-list,
  .study-favorite-list {
    max-height: min(62dvh, calc(100dvh - 238px));
  }

  .study-flash-list {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  }

  .flash-card h3 {
    font-size: clamp(24px, 3.3vw, 36px);
  }

  .study-progress-row {
    margin-top: clamp(8px, 1.25vw, 14px);
  }

  .study-control-bar.tools-collapsed {
    padding-top: clamp(8px, 1.35vw, 14px);
    padding-bottom: clamp(10px, 1.6vw, 18px);
  }

  .study-control-bar.tools-collapsed .study-mobile-tools {
    display: none;
  }

  .sheet-row {
    grid-template-columns: 1fr;
    padding: clamp(16px, 2.2vw, 26px);
  }

  .study-sheet.is-subtitles .sheet-row {
    grid-template-columns: clamp(86px, 18vw, 120px) minmax(0, 1fr) auto;
    min-height: 52px;
    padding: clamp(10px, 1.7vw, 14px);
  }

  .study-sheet.is-subtitles .subtitle-font-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .practice-toolbar {
    justify-content: flex-start;
  }

  .learning-card-layer {
    background: rgba(15, 23, 42, 0.24);
  }

  .learning-card-popover.mobile {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    max-height: 76vh;
    overflow: auto;
    border-radius: 28px 28px 0 0;
    animation: cardSheetIn .22s ease both;
  }
}

@keyframes cardSheetIn {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@media (max-width: 560px) {
  .study-page {
    --study-ui-font: 14px;
    --study-tool-icon: 20px;
    --study-tool-label: 11px;
    --study-control-time: 13px;
    --study-control-gap: 7px;
    --study-control-padding-y: 7px;
    --study-control-padding-x: 12px;
    --study-time-width: 38px;
    --study-progress-height: 16px;
    --study-progress-track: 4px;
    --study-progress-thumb: 18px;
    --study-transport-gap: 5px;
    --study-transport-button: 34px;
    --study-transport-icon: 18px;
    --study-big-play: 54px;
    --study-big-play-icon: 24px;
    padding-bottom: 128px;
  }

  .study-shell {
    padding: 0 6px;
  }

  .study-mobile-list {
    padding: 6px 14px 0;
  }

  .study-header {
    margin: 0 -6px;
    min-height: 36px;
    padding: 3px 12px;
  }

  .study-back {
    width: 28px;
    height: 28px;
  }

  .study-back .app-icon {
    --icon-size: 19px;
  }

  .study-header-bookmark.bookmark {
    width: 30px;
    height: 30px;
  }

  .study-header-share {
    width: 30px;
    height: 30px;
  }

  .study-header-bookmark.bookmark .app-icon,
  .study-header-share .app-icon {
    --icon-size: 17px;
  }

  .study-header h1 {
    font-size: 17px;
  }

  .study-main {
    padding: 0 6px 5px;
  }

  .study-mobile-list {
    padding-top: calc(44px + ((100vw - 12px) * 0.5625) + 12px);
  }

  .study-video-label,
  .study-video-count {
    top: 10px;
    font-size: 12px;
  }

  .study-line-en {
    font-size: calc(clamp(17px, 4.55vw, 22px) * var(--study-font-scale));
    line-height: 1.33;
  }

  .study-line-cn {
    margin-top: 5px;
    font-size: calc(clamp(14px, 3.75vw, 18px) * var(--study-font-scale));
    line-height: 1.36;
  }

  .study-subtitle-card {
    padding: 10px 12px;
  }

  .study-mobile-tools {
    gap: 4px;
  }

  .study-tool {
    gap: 2px;
  }

  .study-control-bar {
    padding-top: 7px;
    padding-bottom: calc(7px + env(safe-area-inset-bottom));
  }

  .study-control-bar.tools-collapsed {
    padding-top: 5px;
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
  }

  .study-control-bar.tools-collapsed .study-progress-row {
    margin-top: 0;
  }

  .study-control-bar.tools-collapsed .study-transport {
    margin-top: 4px;
  }

  .study-sheet {
    width: 100vw;
    max-height: min(90dvh, calc(100dvh - 18px));
    padding-left: 14px;
    padding-right: 14px;
    border-radius: 24px 24px 0 0;
  }

  .study-sheet.is-practice {
    width: calc(100vw - 18px);
    max-height: min(70dvh, calc(100dvh - 92px));
    padding: 12px;
    border-radius: 22px;
  }

  .segmented.wide {
    grid-auto-flow: row;
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

  .study-sheet.is-flashcards .flashcard-toolbar .segmented.wide {
    grid-auto-flow: column;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    border-radius: 999px;
  }

  .study-sheet.is-favorites .segmented.wide {
    grid-auto-flow: column;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    border-radius: 999px;
  }

  .study-sheet.is-flashcards .flashcard-toolbar .segmented.wide button {
    min-height: 44px;
    padding: 9px 6px;
    font-size: 14px;
    white-space: nowrap;
  }

  .study-sheet.is-favorites .segmented.wide button {
    min-height: 42px;
    padding: 8px 6px;
    font-size: 13px;
    white-space: nowrap;
  }

  .study-sheet.is-flashcards .study-flash-list {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 12px;
    max-height: min(58dvh, calc(100dvh - 272px));
  }

  .study-sheet.is-flashcards .flash-card {
    align-self: start;
    height: auto;
    min-height: 0;
    padding: 15px 16px;
    border-radius: 18px;
  }

  .study-sheet.is-flashcards .flash-card h3 {
    margin-right: 42px;
    margin-bottom: 6px;
    font-size: clamp(18px, 5vw, 23px);
    line-height: 1.18;
  }

  .study-sheet.is-flashcards .flash-card-pronunciation {
    min-height: 28px;
    margin-bottom: 6px;
    font-size: 13px;
  }

  .study-sheet.is-flashcards .flash-card p {
    font-size: 13px;
    line-height: 1.46;
    padding-right: 34px;
  }

  .study-sheet.is-flashcards .flash-card-bookmark {
    right: 12px;
    bottom: 12px;
    width: 34px;
    height: 34px;
  }

  .study-sheet.is-flashcards .flash-card-sound {
    width: 30px;
    height: 30px;
  }

  .study-sheet.is-flashcards .flash-card-status-actions {
    margin-top: 10px;
    padding-top: 10px;
    padding-right: 40px;
  }

  .study-sheet.is-flashcards .flash-status {
    min-height: 28px;
    padding: 5px 8px;
    font-size: 12px;
  }

  .flashcard-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .definition-toggle {
    justify-content: space-between;
    width: 100%;
  }

  .study-sheet-header-actions .definition-toggle {
    width: auto;
  }

  .wordcards-video-item {
    flex-basis: 228px;
  }

  .practice-mode-tabs {
    grid-auto-flow: column;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 999px;
  }

  .study-sheet.is-subtitles {
    max-height: min(48vh, 390px);
  }

  .study-sheet.is-subtitles .sheet-row {
    grid-template-columns: 84px minmax(0, 1fr) auto;
    min-height: 46px;
    margin: 6px 0;
    padding: 9px 10px;
    gap: 8px;
  }

  .study-sheet.is-subtitles .subtitle-font-row {
    grid-template-columns: 1fr;
  }

  .study-sheet.is-subtitles .segmented button {
    padding: 7px 9px;
    font-size: 13px;
  }

  .subtitle-font-scale {
    font-size: 11px;
  }

  .practice-current-card {
    grid-template-columns: minmax(42px, auto) minmax(0, 1fr);
    padding: 11px 12px;
    border-radius: 18px;
  }

  .practice-control-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .practice-toolbar {
    gap: 7px;
  }

  .practice-icon-button {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .practice-record-cluster {
    gap: 7px;
  }

  .practice-record-button,
  .practice-record-play {
    width: 62px;
    height: 62px;
    border-radius: 20px;
  }

  .practice-record-button .app-icon {
    --icon-size: 29px;
  }

  .practice-speed-popover {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 8px 10px;
  }

  .study-flash-list,
  .study-favorite-list {
    max-height: min(64dvh, calc(100dvh - 250px));
  }

  .study-flash-list {
    grid-template-columns: 1fr;
  }

  .study-favorite-item {
    grid-template-columns: 1fr;
  }

  .study-favorite-remove {
    justify-self: end;
  }
}

.study-tail-desktop {
  display: none !important;
}

@media (min-width: 981px) {
  .study-tail-mobile {
    display: none !important;
  }

  .study-tail-desktop {
    display: grid !important;
  }
}

.study-export-backdrop {
  align-items: start;
  overflow: auto;
}

.study-export-modal {
  width: min(980px, calc(100vw - 32px));
  display: grid;
  gap: 14px;
}

.study-export-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(var(--brand-blue-rgb), 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 34px rgba(var(--brand-navy-rgb), 0.14);
  backdrop-filter: blur(14px);
}

.study-export-toolbar strong,
.study-export-toolbar span {
  display: block;
}

.study-export-toolbar span {
  color: var(--muted);
  font-size: 13px;
}

.study-export-toolbar > div:last-child {
  display: flex;
  gap: 8px;
}

.study-export-page {
  padding: 34px;
  border-radius: 28px;
  color: #10284a;
  background:
    radial-gradient(circle at 8% 4%, rgba(var(--brand-cyan-rgb), 0.16), transparent 18rem),
    linear-gradient(180deg, #ffffff, #f8fcff);
  box-shadow: 0 24px 70px rgba(var(--brand-navy-rgb), 0.18);
}

.study-export-brandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.study-export-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--brand-navy);
}

.study-export-brand img {
  width: 142px;
  height: auto;
}

.study-export-brand span {
  padding-left: 12px;
  border-left: 1px solid rgba(var(--brand-blue-rgb), 0.16);
  color: var(--muted);
  font-size: 14px;
}

.study-export-qr {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(var(--brand-blue-rgb), 0.14);
  border-radius: 16px;
  background: white;
}

.study-export-qr img {
  width: 76px;
  height: 76px;
  display: block;
}

.study-export-qr span {
  color: var(--muted);
  font-size: 11px;
}

.study-export-cover {
  padding: 18px 22px;
  border-radius: 20px;
  color: white;
  background:
    radial-gradient(circle at 86% 20%, rgba(var(--brand-gold-rgb), 0.32), transparent 14rem),
    linear-gradient(135deg, var(--brand-navy), var(--brand-blue) 62%, var(--brand-cyan));
}

.study-export-kicker {
  margin: 0 0 5px;
  text-transform: uppercase;
  letter-spacing: .16em;
  opacity: .72;
  font-size: 10px;
}

.study-export-cover h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(24px, 4vw, 40px);
  line-height: 1.04;
}

.study-export-cover p:not(.study-export-kicker) {
  max-width: 680px;
  margin: 8px 0 12px;
  opacity: .86;
}

.study-export-cover div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.study-export-cover span {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 13px;
}

.study-export-content {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.study-export-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, .65fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(var(--brand-blue-rgb), 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  break-inside: avoid;
}

.study-export-subtitle span {
  color: var(--brand-cyan);
  font-size: 13px;
}

.study-export-subtitle h2 {
  margin: 8px 0;
  color: var(--brand-navy);
  font-size: 22px;
  line-height: 1.42;
}

.study-export-subtitle mark {
  padding: 0 .15em .05em;
  border-radius: .2em;
  color: var(--brand-navy);
  background: linear-gradient(180deg, transparent 46%, rgba(var(--brand-gold-rgb), 0.54) 46%);
}

.study-export-subtitle p {
  margin: 0;
  color: #51637d;
}

.study-export-notes {
  display: grid;
  gap: 8px;
}

.study-export-note {
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(var(--brand-cyan-rgb), 0.08);
}

.study-export-note strong,
.study-export-note em,
.study-export-note p {
  display: block;
}

.study-export-note em,
.study-export-empty {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.study-export-note p {
  margin: 4px 0 0;
  color: #405671;
  font-size: 13px;
  line-height: 1.45;
}

.activation-code-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px auto auto;
  gap: 10px;
  align-items: center;
  margin: 12px 0 10px;
}

.activation-code-toolbar select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--brand-navy);
  background: #fbfdff;
}

.activation-code-list {
  overflow-x: auto;
}

.activation-code-table {
  min-width: 820px;
}

.activation-code-table td:first-child,
.activation-code-table th:first-child {
  width: 96px;
}

.activation-code-table td:nth-child(2) strong {
  display: block;
  letter-spacing: .08em;
  color: var(--brand-navy);
}

.activation-code-table td:nth-child(2) span {
  color: var(--muted);
  font-size: 12px;
}

.status-unused {
  color: #0e604c;
  background: rgba(var(--brand-cyan-rgb), 0.12);
}

.status-used {
  color: var(--brand-blue-deep);
  background: rgba(var(--brand-blue-rgb), 0.12);
}

@media (max-width: 720px) {
  .study-export-toolbar,
  .study-export-row {
    grid-template-columns: 1fr;
  }

  .study-export-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .study-export-brandbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .study-export-page {
    padding: 16px;
  }

  .activation-code-toolbar {
    grid-template-columns: 1fr;
  }
}

@media print {
  body > :not(.study-export-backdrop) {
    display: none !important;
  }

  .study-export-backdrop {
    position: static;
    display: block;
    padding: 0;
    background: white;
    backdrop-filter: none;
  }

  .study-export-modal {
    width: 100%;
  }

  [data-export-ui] {
    display: none !important;
  }

  .study-export-page {
    box-shadow: none;
    border-radius: 0;
  }
}

/* Keep the overall UI lighter; dynamic subtitles remain visually prominent. */
body * {
  font-weight: 400 !important;
}

.study-page :is(.study-subtitle-scroll, .study-mobile-list, .practice-current-card) .study-line-en,
.study-page :is(.study-subtitle-scroll, .study-mobile-list, .practice-current-card) .study-line-en * {
  font-weight: 800 !important;
}

.study-page :is(.study-subtitle-scroll, .study-mobile-list, .practice-current-card) .study-line-cn,
.study-page :is(.study-subtitle-scroll, .study-mobile-list, .practice-current-card) .study-line-cn * {
  font-weight: 700 !important;
}
