:root {
  --bg: #eceff3;
  --bg-deep: #c9d1db;
  --panel: rgba(255, 255, 255, 0.7);
  --panel-strong: rgba(255, 255, 255, 0.9);
  --ink: #13161b;
  --muted: #58606c;
  --accent: #ff4d8d;
  --accent-strong: #ff6f61;
  --accent-soft: rgba(255, 77, 141, 0.12);
  --lime: #d9e3ee;
  --correct: #1f9a73;
  --error: #bf4e57;
  --line: rgba(36, 42, 51, 0.12);
  --shadow: 0 24px 80px rgba(33, 39, 49, 0.14);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --font-display: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans CJK SC", "Source Han Sans SC", "Segoe UI", sans-serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans CJK SC", "Source Han Sans SC", "Segoe UI", sans-serif;
  --font-brand: "Avenir Next", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 123, 168, 0.08), transparent 24%),
    radial-gradient(circle at 82% 12%, rgba(121, 142, 255, 0.12), transparent 24%),
    linear-gradient(180deg, #1e2129 0%, #21252d 100%);
}

body.trainer-body {
  overflow: hidden;
}

body.lessons-body {
  scrollbar-width: none;
}

body.lessons-body::-webkit-scrollbar {
  display: none;
}

html.lessons-scroll-hidden {
  scrollbar-width: none;
}

html.lessons-scroll-hidden::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.page-shell {
  width: min(1440px, calc(100% - 32px));
  margin-inline: auto;
  padding: 22px 0 36px;
}

.page-shell.is-home-view {
  padding-bottom: 0;
}

.page-shell.is-trainer-view {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
}

.topbar,
.hero,
.intro-grid,
.level-grid,
.trainer-layout,
.stats-grid,
.action-row {
  display: grid;
  gap: 18px;
}

.topbar {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
  padding: 8px 12px 0;
  position: relative;
  z-index: 5;
}

.topbar.is-hidden {
  display: none;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  position: relative;
}

.brand-wordmark {
  justify-content: center;
}

.brand-home-button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.brand-wordmark h1 {
  color: #f1f5fb;
  font-size: 3.2rem;
  letter-spacing: 0.08em;
  font-weight: 800;
  text-align: center;
  text-shadow: 0 12px 28px rgba(16, 20, 29, 0.38);
}

.brand-domain {
  display: inline-block;
  margin-top: 1px;
  padding: 0;
  border: 0;
  background: linear-gradient(
    105deg,
    #a9b9d3 0%,
    #dfe7f3 26%,
    #f4f8ff 40%,
    #c8d5ea 56%,
    #9fb2d0 100%
  );
  background-size: 220% 100%;
  background-position: 130% 50%;
  color: transparent;
  font-family: var(--font-brand);
  font-size: 0.86rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-transform: none;
  text-shadow: 0 0 8px rgba(175, 191, 216, 0.24);
  opacity: 0.9;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: brand-domain-shine 4.8s ease-in-out infinite;
}

.brand-shortcut {
  position: absolute;
  bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #d7e0f1;
  border-radius: 999px;
  min-height: 32px;
  width: 60px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 0.76rem;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.brand-shortcut:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.34);
  color: #f3f8ff;
}

.brand-shortcut-left {
  right: calc(100% + 44px);
  left: auto;
}

.brand-shortcut-left svg {
  width: 15px;
  height: 15px;
}

.brand-shortcut-right {
  left: calc(100% + 44px);
  right: auto;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ff7bc3, #ff4fa3 55%, #ffb86c);
  font-family: var(--font-display);
  font-weight: 800;
  color: #fff7ef;
}

.brand h1,
.hero h2,
.panel h2,
.panel h3 {
  margin: 0;
  font-family: var(--font-display);
}

.eyebrow,
.section-label,
.stat-card span,
.lesson-target span,
.feature-chip,
.keyboard-key small {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.topbar-actions,
.topbar-actions-wide,
.topbar-cta {
  display: none;
}

.nav-link,
.primary-button,
.ghost-button,
.lesson-button {
  border: none;
  cursor: pointer;
  font: inherit;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.nav-link-dark {
  background: transparent;
  border: none;
  color: #171717;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav-link:hover,
.lesson-button:hover,
.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px);
  padding: 28px;
}

.ghost-button-dark {
  background: transparent;
  color: #171717;
  border-color: rgba(23, 23, 23, 0.12);
}

.hero-cta-button,
.primary-button-fashion {
  border: none;
  cursor: pointer;
  font: inherit;
  padding: 22px 42px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff4d8d, #ff6f61 58%, #ff9966);
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: 700;
  box-shadow: 0 18px 40px rgba(255, 111, 97, 0.24);
  transition: transform 180ms ease, opacity 180ms ease;
}

.hero-cta-button:hover {
  transform: translateY(-1px);
}

.fashion-home {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: 20px;
}

.fashion-home::before {
  content: none;
}

.fashion-home::after {
  content: none;
}

.fashion-hero {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  margin: 0 auto;
  padding: 28px 18px 56px;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.fashion-copy {
  position: relative;
  z-index: 2;
  width: min(100%, 980px);
  max-width: 980px;
  margin: 0 auto;
  padding: 26px 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.fashion-kicker {
  margin: 0 0 18px;
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6b6a65;
}

.fashion-copy h2 {
  margin: 0;
  max-width: none;
  font-size: 3.6rem;
  line-height: 1.08;
  letter-spacing: 0.01em;
  color: #f1f5fb;
  font-family: var(--font-display);
}

.fashion-copy h3 {
  margin: 22px 0 0;
  font-size: 1.35rem;
  color: #3a3831;
  font-family: var(--font-display);
}

.fashion-text {
  max-width: 46ch;
  margin: 24px 0 0;
  margin-left: auto;
  margin-right: auto;
  color: #9aa4b8;
  line-height: 1.9;
  font-size: 1.06rem;
}

.fashion-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

.hero-keyboard-visual {
  display: block;
  text-align: center;
  margin-top: 42px;
  width: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
}

.keyboard-wrap.keyboard-wrap-home {
  display: inline-block;
  vertical-align: top;
  width: -webkit-max-content;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  padding: clamp(6px, 1.1vw, 14px);
  border-radius: clamp(12px, 1.8vw, 22px);
  background: rgba(255, 255, 255, 0.025);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 18px 42px rgba(19, 23, 31, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.keyboard.keyboard-home {
  --home-key-size: clamp(26px, 4vw, 58px);
  --home-key-gap: clamp(4px, 0.48vw, 8px);
  width: -webkit-max-content;
  width: max-content;
  margin: 0;
  display: block;
}

.keyboard-home .keyboard-key {
  flex: 0 0 var(--home-key-size);
  min-height: var(--home-key-size);
  border-radius: clamp(10px, 0.9vw, 16px);
}

.keyboard-home .keyboard-key.wide-1-5 {
  flex-basis: calc(var(--home-key-size) * 1.52);
}

.keyboard-home .keyboard-key.wide-2 {
  flex-basis: calc(var(--home-key-size) * 2.13);
}

.keyboard-home .keyboard-key.wide-3 {
  flex-basis: calc(var(--home-key-size) * 3.05);
}

.keyboard-home .keyboard-key.wide-4 {
  flex-basis: calc(var(--home-key-size) * 7.2);
}

.keyboard.keyboard-home .keyboard-row {
  gap: var(--home-key-gap);
  width: -webkit-max-content;
  width: max-content;
  justify-content: flex-start;
}

.keyboard-home .keyboard-dark .keyboard-key.active,
.keyboard-home .keyboard-key.active {
  background: rgba(255, 79, 163, 0.22);
  border-color: rgba(255, 79, 163, 0.72);
  color: #ffffff;
  box-shadow: 0 0 0 14px rgba(255, 79, 163, 0.12);
}

.home-footer {
  width: min(1280px, calc(100% - 20px));
  margin: auto auto 10px;
  padding: 0 8px 4px;
}

.home-footer-line {
  height: 1px;
  background: rgba(158, 169, 188, 0.2);
  margin-bottom: 18px;
}

.home-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.home-footer-copy {
  margin: 0;
  font-size: 0.9rem;
  color: #8a93a8;
  letter-spacing: 0.01em;
}

.home-footer-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.home-footer-link {
  border: none;
  background: transparent;
  color: #b0bacf;
  font: inherit;
  font-size: 0.92rem;
  cursor: not-allowed;
  opacity: 0.78;
}

.ghost-button-fashion {
  padding: 22px 42px;
  font-size: 1.3rem;
  background: rgba(255, 255, 255, 0.08);
  color: #eff3f9;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 14px 32px rgba(28, 34, 48, 0.24);
}

.ghost-button-fashion:disabled {
  background: rgba(255, 255, 255, 0.34);
  color: rgba(42, 48, 57, 0.4);
  border-color: rgba(255, 255, 255, 0.34);
  opacity: 1;
}


.fashion-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 8px 12px 0;
}

.fashion-strip-item,
.fashion-card {
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 48px rgba(124, 102, 73, 0.08);
}

.fashion-strip-item {
  padding: 22px 24px;
}

.fashion-strip-item span {
  display: block;
  color: #7a7268;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 10px;
}

.fashion-strip-item strong {
  color: #191714;
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1.25;
}

.fashion-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 16px;
  padding: 18px 12px 0;
}

.fashion-card {
  padding: 28px;
}

.fashion-card h3 {
  margin: 10px 0 14px;
  font-size: 2rem;
  line-height: 1.12;
  color: #171512;
  font-family: var(--font-display);
}

.fashion-card p:last-child {
  color: #6c675f;
  line-height: 1.8;
}

.fashion-card-large {
  grid-row: span 2;
  min-height: 420px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(255, 244, 233, 0.88));
}

.fashion-card-accent {
  background: linear-gradient(135deg, rgba(232, 243, 233, 0.92), rgba(255, 247, 237, 0.88));
}

.view {
  display: none;
}

.view.active {
  display: block;
}

#home-view.view.active {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 150px);
}

#trainer-view.view.active {
  display: block;
}


.hero {
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
  margin-bottom: 18px;
}

.hero-template {
  align-items: stretch;
}

.hero-copy,
.hero-side,
.level-hero {
  min-height: 100%;
}

.hero-showcase {
  display: grid;
  gap: 14px;
  align-content: stretch;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.metric-block {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.75);
}

.metric-block strong {
  display: block;
  font-size: 1.8rem;
  font-family: var(--font-display);
  margin-bottom: 6px;
}

.metric-block span {
  color: var(--muted);
  font-size: 0.95rem;
}

.showcase-card {
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 239, 247, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.78);
}

.showcase-main {
  min-height: 260px;
}

.showcase-main h3,
.home-band-card h3,
.template-section-head h3,
.template-card h3 {
  margin: 8px 0 12px;
  font-size: 1.8rem;
}

.showcase-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.showcase-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.showcase-card strong {
  display: block;
  margin-top: 10px;
  font-size: 1.35rem;
  font-family: var(--font-display);
}

.template-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
}

.home-band {
  margin-bottom: 18px;
}

.home-band-card {
  padding: 26px 30px;
}

.intro-grid-template {
  margin-bottom: 18px;
}

.template-section {
  display: grid;
  gap: 16px;
}

.template-section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}

.template-section-head p:last-child,
.template-card p:last-child {
  color: var(--muted);
  line-height: 1.7;
}

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

.template-card {
  min-height: 220px;
}

.hero h2 {
  font-size: 3.4rem;
  line-height: 0.96;
  max-width: 10ch;
}

.hero-text,
.intro-card p,
.level-card p,
.lesson-summary p,
#status-text,
.finger-hint {
  color: var(--muted);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.feature-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 229, 242, 0.88));
  margin-right: 8px;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.hero-note {
  margin-top: 22px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 236, 245, 0.92));
  border: 1px solid var(--line);
}

.intro-grid,
.level-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.levels-shell {
  display: grid;
  gap: 24px;
  width: 100%;
  max-width: 980px;
  margin-inline: auto;
  padding: 18px 4px 10px;
}

.levels-shell > * {
  min-width: 0;
}

.my-data-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  width: 100%;
  max-width: 980px;
  margin-inline: auto;
  padding-inline: 4px;
}

.my-data-card {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(20, 24, 34, 0.5);
  border-radius: 22px;
  padding: 22px;
}

.my-data-nickname-card {
  display: grid;
  gap: 10px;
}

.my-data-nickname-head {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.my-data-vip-card {
  display: grid;
  gap: 10px;
  align-content: start;
}

.my-data-vip-inline {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 6px;
}

.my-data-vip-inline .my-data-label {
  margin: 0;
  white-space: nowrap;
}

.my-data-vip-inline .my-data-nickname-current {
  margin: 0;
  text-align: left;
  font-size: clamp(0.92rem, 1.35vw, 1.08rem);
  font-weight: 700;
}

.my-data-name-inline .my-data-nickname-current {
  font-size: clamp(0.94rem, 1.4vw, 1.12rem);
}

.my-data-nickname-current {
  margin: 0;
  color: #f0f5ff;
  font-size: clamp(1.08rem, 1.7vw, 1.35rem);
  font-weight: 800;
}

.my-data-nickname-edit {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.my-data-nickname-edit input {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 12, 20, 0.65);
  color: #f4f8ff;
  padding: 0 12px;
  font: inherit;
  box-sizing: border-box;
}

.my-data-nickname-edit input:focus {
  outline: none;
  border-color: rgba(122, 189, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(85, 165, 255, 0.2);
}

.my-data-nickname-edit .primary-button {
  min-width: 116px;
  min-height: 44px;
  padding: 0 16px;
}

.my-data-vip-now {
  margin-top: 2px;
  width: max-content;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 0.86rem;
}

.my-data-eyebrow {
  margin: 0;
  color: #95a3ba;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.my-data-card h2 {
  margin: 10px 0 8px;
  color: #eff4ff;
  font-size: clamp(1.7rem, 2.7vw, 2.3rem);
}

.my-data-card h3 {
  margin: 10px 0 8px;
  color: #eaf1ff;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.my-data-note {
  margin: 0;
  color: rgba(168, 174, 186, 0.82);
  font-size: 0.95rem;
}

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

.my-data-item {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(17, 20, 28, 0.55);
  border-radius: 18px;
  padding: 16px;
}

.my-data-label {
  margin: 0;
  color: #8e9bb0;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.my-data-value {
  margin: 8px 0 0;
  color: #f4f7ff;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  font-weight: 800;
  line-height: 1.1;
}

.my-data-keyboard-card {
  display: grid;
  gap: 12px;
}

.my-data-keyboard.home-keyboard {
  --home-key-size: clamp(30px, 2.95vw, 54px);
  --home-key-gap: clamp(5px, 0.52vw, 8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  padding-bottom: 2px;
}

.my-data-keyboard-shell {
  width: max-content;
  max-width: 100%;
  display: block;
  margin: 0 auto;
  overflow: hidden;
}

.my-data-keyboard .home-kb-key {
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.my-data-keyboard .home-kb-key small {
  font-size: clamp(0.66rem, 0.76vw, 0.84rem);
}

.my-data-keyboard .home-kb-key span {
  font-size: clamp(1rem, 1.2vw, 1.3rem);
}

.my-data-keyboard .home-kb-row {
  margin-left: auto;
  margin-right: auto;
}

.my-data-finger-usage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.my-data-finger-group {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(17, 22, 31, 0.5);
  border-radius: 16px;
  padding: 12px;
}

.my-data-finger-hand {
  margin: 0 0 10px;
  color: #c9d8f2;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.my-data-finger-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.my-data-finger-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 18, 27, 0.54);
  border-radius: 12px;
  padding: 10px 6px;
  text-align: center;
}

.my-data-finger-item span {
  display: block;
  color: #8ea0bc;
  font-size: 0.8rem;
}

.my-data-finger-item strong {
  display: block;
  margin-top: 6px;
  color: #f4f8ff;
  font-size: 1.2rem;
  line-height: 1;
}

.my-data-speed-chart {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(16, 22, 32, 0.5);
  border-radius: 16px;
  padding: 14px;
  margin-top: 12px;
}

.my-data-speed-empty {
  margin: 0;
  color: #8ea0bc;
  font-size: 0.92rem;
  text-align: center;
  padding: 18px 8px;
}

.my-data-speed-metrics {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  color: #96a8c6;
  font-size: 0.9rem;
}

.my-data-speed-metrics strong {
  color: #f5f8ff;
  font-size: 1rem;
}

.my-data-speed-svg {
  width: 100%;
  height: auto;
  display: block;
}

.my-data-speed-grid line {
  stroke: rgba(255, 255, 255, 0.11);
  stroke-width: 1;
}

.my-data-speed-grid text {
  fill: #7f92af;
  font-size: 14px;
  text-anchor: end;
}

.my-data-speed-line {
  fill: none;
  stroke: #58b6ff;
  stroke-width: 2.6;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.my-data-speed-points circle {
  fill: #8dd4ff;
  stroke: rgba(24, 41, 64, 0.9);
  stroke-width: 1.2;
}

.my-data-speed-xlabels text {
  fill: #8193ae;
  font-size: 14px;
  text-anchor: middle;
}

.my-data-keyboard::-webkit-scrollbar {
  height: 5px;
}

.my-data-keyboard::-webkit-scrollbar-thumb {
  background: rgba(150, 171, 206, 0.4);
  border-radius: 999px;
}

.level-track-nav {
  display: grid;
  gap: 14px;
  justify-items: center;
}

.level-track-divider {
  width: min(100%, 920px);
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.08) 18%,
    rgba(255, 255, 255, 0.24) 50%,
    rgba(255, 255, 255, 0.08) 82%,
    rgba(255, 255, 255, 0) 100%
  );
}

.level-track-options {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.level-track-option {
  min-width: 112px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #8592a7;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.level-track-option:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: #dce4f1;
}

.level-track-option.is-active {
  border-color: rgba(255, 143, 188, 0.2);
  color: #f1f5fb;
  background: rgba(255, 79, 141, 0.12);
}

.level-track-option:disabled {
  cursor: default;
  opacity: 1;
}

.level-grid-redesign.level-track-panel {
  display: none;
}

.level-grid-redesign.level-track-panel.is-active {
  display: grid;
}

.track-section-title {
  grid-column: 1 / -1;
  margin: 4px 0 -4px;
  color: #dce4f1;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: none;
}

.levels-heading {
  text-align: center;
  padding: 6px 12px 8px;
}

.levels-heading .eyebrow {
  color: #93a0b6;
}

.levels-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(2.2rem, 4.2vw, 4rem);
  line-height: 1.02;
  color: #eaf1fb;
  text-shadow: 0 10px 24px rgba(8, 11, 18, 0.26);
}

.level-grid-redesign {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 240px));
  justify-content: center;
  gap: 20px;
}

.level-grid-redesign .level-card {
  aspect-ratio: 1 / 1;
  min-height: 0;
  padding: clamp(14px, 1.4vw, 22px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
  backdrop-filter: none;
  display: flex;
  flex-direction: column;
  transform: none;
  transition: border-color 180ms ease, transform 180ms ease;
}

.level-grid-redesign .level-card:hover {
  transform: translateY(-2px);
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.2);
}

.level-card-primary {
  background: transparent;
}

.level-card-secondary {
  background: transparent;
}

.level-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 79, 141, 0.14);
  color: #ff8fbc;
  font-size: clamp(0.68rem, 0.9vw, 0.84rem);
  font-weight: 700;
  border: 1px solid rgba(255, 143, 188, 0.14);
}

.level-badge-muted {
  background: rgba(149, 164, 190, 0.1);
  color: #9ba8bd;
  border-color: rgba(149, 164, 190, 0.1);
}

.level-grid-redesign .level-card p {
  color: #95a1b5;
  line-height: 1.65;
  font-size: 0.92rem;
}

.level-enter-button,
.level-wait-button {
  width: 100%;
  margin-top: auto;
  min-height: clamp(36px, 4vw, 48px);
  border-radius: 14px;
  font-weight: 700;
  font-size: clamp(0.8rem, 1vw, 0.96rem);
}

.level-enter-button {
  box-shadow: none;
}

.level-enter-button:disabled,
.level-enter-button.level-entry-locked {
  cursor: not-allowed;
  opacity: 0.64;
  color: #8a95aa;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.level-enter-button:disabled:hover,
.level-enter-button.level-entry-locked:hover {
  transform: none;
}

.level-wait-button {
  background: transparent;
  color: #8691a5;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.level-mini-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.level-mini-meta span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #7f8ba0;
  font-size: clamp(0.64rem, 0.8vw, 0.78rem);
  background: transparent;
}

.lesson-grid-page {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 140px));
  justify-content: center;
  gap: 14px;
  margin-top: 0;
}

.lesson-grid-divider {
  grid-column: 1 / -1;
  height: 1px;
  margin: 10px auto 8px;
  width: min(100%, 920px);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.08) 18%,
    rgba(255, 255, 255, 0.22) 50%,
    rgba(255, 255, 255, 0.08) 82%,
    rgba(255, 255, 255, 0) 100%
  );
}

.lesson-grid-page .lesson-button {
  min-height: 0;
  aspect-ratio: 1 / 1;
}

.intro-card h3,
.level-card h3 {
  margin: 8px 0 10px;
  font-size: 1.5rem;
}

.level-card-active {
  background: linear-gradient(135deg, rgba(255, 96, 173, 0.12), rgba(255, 255, 255, 0.96));
}

.trainer-layout {
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.45fr);
}

.trainer-dark {
  width: 100%;
  min-height: calc(100vh - 110px);
  border-radius: 36px;
  background: #202229;
  color: #f2f4f8;
  padding: 26px 32px 40px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
}

.page-shell.is-trainer-view .trainer-dark {
  width: calc(100vw - 32px);
  height: calc(100vh - 32px);
  min-height: 0;
  margin: 16px auto;
  padding: 24px 28px 28px;
  border-radius: 32px;
}

.trainer-topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.trainer-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trainer-center {
  text-align: center;
}

.trainer-mode {
  margin: 0 0 4px;
  color: #8e97ab;
  font-size: 0.95rem;
}

.trainer-center h2 {
  margin: 0;
  font-size: 1.5rem;
  font-family: var(--font-display);
  color: #d8deea;
}

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

.trainer-link {
  border: none;
  background: transparent;
  color: #9aa4ba;
  font: inherit;
  cursor: pointer;
  padding: 8px 10px;
  font-size: 0.92rem;
  border-radius: 12px;
  transition: color 160ms ease, background-color 160ms ease, opacity 160ms ease;
}

.trainer-link:hover {
  color: #eef2f8;
  background: rgba(255, 255, 255, 0.08);
}

.trainer-link:focus-visible {
  outline: none;
  color: #eef2f8;
  background: rgba(255, 255, 255, 0.08);
}

.accent-link {
  color: #f6f7fb;
}

.trainer-stage {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding-top: 36px;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  overflow: hidden;
}

.prompt-text-dark {
  background: transparent;
  border: none;
  color: #dfe5ef;
  box-shadow: none;
  margin: 0;
  border-radius: 0;
  text-align: center;
}

.prompt-text-large {
  min-height: auto;
  padding: 0;
  font-size: 2rem;
  line-height: 1.56;
  letter-spacing: 0.015em;
}

.prompt-text-dark .char.current {
  background: rgba(141, 148, 160, 0.52);
  color: #ffffff;
}

.typing-input-dark {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: #f2f5fb;
}

.typing-input-minimal {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  background: transparent;
  box-shadow: none;
  opacity: 0;
}

.typing-input-dark::placeholder {
  color: #70798f;
}

.typing-input-minimal:focus {
  border: none;
  box-shadow: none;
}

.prompt-text.prompt-text-dark.prompt-text-large {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  min-height: auto;
  padding: 0;
  font-size: 2rem;
  line-height: 1.56;
  text-align: center;
  width: 100%;
  max-width: 980px;
}

.keyboard-dark {
  --trainer-key-size: clamp(24px, 4vw, 58px);
  --trainer-key-gap: clamp(4px, 0.52vw, 8px);
  display: flex;
  flex-direction: column;
  gap: var(--trainer-key-gap);
  width: auto;
  align-items: center;
  margin: 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;
}

.keyboard-area {
  margin-top: auto;
  margin-bottom: 18px;
  width: 100%;
  text-align: center;
}

.keyboard-wrap {
  display: inline-block;
  vertical-align: top;
  margin: 0;
  padding: clamp(8px, 1vw, 14px);
  overflow: visible;
  border-radius: clamp(14px, 1.8vw, 22px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 18px 40px rgba(18, 22, 31, 0.18);
}

.keyboard-wrap.is-hidden {
  display: none;
}

.trainer-status-bar.is-hidden {
  display: none;
}

.trainer-kb-row {
  display: flex;
  gap: var(--trainer-key-gap);
  width: max-content;
  justify-content: flex-start;
  margin-left: auto;
  margin-right: auto;
}

.trainer-kb-row + .trainer-kb-row {
  margin-top: var(--trainer-key-gap);
}

.trainer-kb-key {
  width: var(--trainer-key-size);
  min-width: var(--trainer-key-size);
  height: var(--trainer-key-size);
  min-height: var(--trainer-key-size);
  padding: 0;
  border-radius: clamp(10px, 0.9vw, 16px);
  border: 1px solid #4a5060;
  background: transparent;
  color: #a6afc0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.trainer-kb-key small {
  display: block;
  margin-bottom: 2px;
  font-size: 0.56rem;
  line-height: 1;
  color: inherit;
  opacity: 0.82;
}

.trainer-kb-key span {
  font-weight: 500;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
}

.trainer-kb-key.active {
  background: rgba(255, 79, 163, 0.22);
  border-color: rgba(255, 79, 163, 0.72);
  color: #ffffff;
  box-shadow: 0 0 0 14px rgba(255, 79, 163, 0.12);
}

.trainer-kb-key.pressed {
  background: rgba(255, 255, 255, 0.08);
}

.trainer-kb-key.trainer-kb-wide-1-5 {
  width: calc(var(--trainer-key-size) * 1.52);
  min-width: calc(var(--trainer-key-size) * 1.52);
}

.trainer-kb-key.trainer-kb-wide-2 {
  width: calc(var(--trainer-key-size) * 2.13);
  min-width: calc(var(--trainer-key-size) * 2.13);
}

.trainer-kb-key.trainer-kb-wide-3 {
  width: calc(var(--trainer-key-size) * 3.05);
  min-width: calc(var(--trainer-key-size) * 3.05);
}

.trainer-kb-key.trainer-kb-wide-4 {
  width: calc(var(--trainer-key-size) * 6.5);
  min-width: calc(var(--trainer-key-size) * 6.5);
}

.trainer-kb-key.trainer-kb-blank-key span,
.trainer-kb-key.trainer-kb-blank-key small {
  display: none;
}

.trainer-status-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px 28px;
  margin-top: 14px;
  padding: 6px 2px 0;
  align-items: center;
  width: 100%;
}

.status-item {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-height: auto;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  text-align: center;
}

.status-item span {
  display: inline;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: #7f8797;
}

.status-item strong {
  display: inline;
  margin-top: 0;
  color: #eef2f8;
  font-size: 1.12rem;
  font-family: var(--font-display);
  line-height: 1.12;
}

.completion-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 12, 18, 0.44);
  backdrop-filter: blur(10px);
  z-index: 40;
}

.completion-modal.is-visible {
  display: flex;
}

.completion-card {
  width: min(100%, 460px);
  padding: 28px 28px 24px;
  border-radius: 28px;
  background: rgba(30, 34, 42, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.completion-badge {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: #8f97ab;
}

.completion-card h3 {
  margin: 0;
  font-size: 1.58rem;
  line-height: 1.35;
  color: #f2f5fb;
}

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

.completion-summary-item {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 8px 12px;
  text-align: center;
}

.completion-summary-label {
  display: block;
  font-size: 0.82rem;
  color: #8f97ab;
  line-height: 1.2;
}

.completion-summary-value {
  display: block;
  margin-top: 7px;
  font-family: var(--font-display);
  font-size: 1.26rem;
  color: #f2f5fb;
  line-height: 1.2;
}

.completion-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}

.completion-button {
  min-width: 148px;
}

.auth-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 11, 17, 0.62);
  backdrop-filter: blur(8px);
  z-index: 60;
}

.auth-modal.is-visible {
  display: flex;
}

.auth-card {
  width: min(100%, 460px);
  border-radius: 22px;
  background: rgba(20, 26, 38, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
  padding: 18px 18px 20px;
}

.auth-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-head h3 {
  margin: 0;
  color: #eef3fb;
  font-size: 1.3rem;
}

.auth-close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #d8e1f3;
  font-size: 1.2rem;
  cursor: pointer;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.auth-tab {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #9eaac0;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.auth-tab.is-active {
  border-color: rgba(110, 180, 255, 0.58);
  color: #eef4ff;
  background: rgba(88, 166, 255, 0.2);
}

.auth-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.auth-field {
  display: grid;
  gap: 6px;
}

.auth-field[hidden] {
  display: none !important;
}

.auth-field span {
  color: #a4b1c7;
  font-size: 0.88rem;
}

.auth-field input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 15, 24, 0.72);
  color: #edf3ff;
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  box-sizing: border-box;
}

.auth-field input:focus {
  outline: none;
  border-color: rgba(112, 184, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(84, 160, 255, 0.2);
}

.auth-message {
  min-height: 22px;
  margin: 0;
  font-size: 0.88rem;
  color: #98a6bf;
}

.auth-message.is-error {
  color: #ff6f8f;
}

.auth-message.is-success {
  color: #71d8a5;
}

.auth-submit {
  width: 100%;
  margin-top: 2px;
}

.panel-head,
.prompt-footer,
.keyboard-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.lesson-list {
  display: grid;
  gap: 12px;
  max-height: 820px;
  overflow: auto;
  padding-right: 6px;
}

.lesson-button {
  width: 100%;
  text-align: center;
  padding: 12px;
  border-radius: 18px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.lesson-button.lesson-button-unlocked {
  border-color: rgba(255, 255, 255, 0.28);
}

.lesson-button.active,
.lesson-button.lesson-button-unlocked.active {
  background: rgba(255, 79, 141, 0.08);
  border-color: rgba(255, 92, 156, 0.92);
}

.lesson-button:disabled,
.lesson-button.lesson-button-locked {
  cursor: not-allowed;
  opacity: 0.48;
}

.lesson-button:disabled:hover,
.lesson-button.lesson-button-locked:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.12);
}

.lesson-target strong,
.stat-card strong {
  display: block;
  font-family: var(--font-display);
}

.lesson-button span {
  display: block;
  color: #d8e0ee;
  font-size: 0.96rem;
  font-weight: 600;
}

.lesson-button small {
  display: block;
  color: #7f8ba0;
  margin-top: 0;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
}

.lesson-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  width: 20px;
  height: 20px;
}

.lesson-lock svg {
  width: 18px;
  height: 18px;
  display: block;
}

.lesson-lock path,
.lesson-lock rect {
  fill: none;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lessons-shell {
  width: 100%;
  max-width: 980px;
  margin-inline: auto;
  padding-inline: 4px;
}

.lessons-topbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 4px;
}

.lessons-back-link-left {
  margin-right: auto;
}

.lessons-back-link {
  border: none;
  background: transparent;
  padding: 8px 10px;
  color: #9ca8bc;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  border-radius: 12px;
  transition: color 160ms ease, background-color 160ms ease, opacity 160ms ease;
}

.lessons-back-link:hover {
  color: #eef4ff;
  background: rgba(255, 255, 255, 0.08);
}

.lessons-back-link:focus-visible {
  outline: none;
  color: #eef4ff;
  background: rgba(255, 255, 255, 0.08);
}

.vip-shell {
  gap: 14px;
}

.vip-card {
  display: grid;
  gap: 18px;
}

.vip-head h3 {
  margin: 8px 0 6px;
  color: #eef4ff;
  font-size: clamp(1.3rem, 2vw, 1.6rem);
}

.vip-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.vip-plan-column {
  width: 100%;
}

.vip-plan-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

.vip-plan-item {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 14px;
  background: rgba(12, 16, 28, 0.6);
  display: grid;
  gap: 12px;
}

.vip-plan-item-highlight {
  border-color: rgba(253, 163, 90, 0.45);
  background: linear-gradient(145deg, rgba(37, 28, 22, 0.62), rgba(17, 19, 30, 0.68));
}

.vip-plan-title {
  margin: 0;
  color: #f4f8ff;
  font-size: 1.04rem;
  font-weight: 700;
}

.vip-plan-price {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.vip-price-new {
  color: #ffbf60;
  font-size: 1.55rem;
  font-weight: 800;
}

.vip-price-old {
  color: rgba(155, 166, 186, 0.88);
  font-size: 0.95rem;
  text-decoration: line-through;
}

.vip-plan-button {
  width: 100%;
  min-height: 42px;
}

.vip-deal-card {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 18px 16px;
  background: linear-gradient(160deg, rgba(15, 22, 38, 0.82), rgba(26, 20, 36, 0.75));
  min-height: 100%;
  display: grid;
  gap: 10px;
  align-content: start;
}

.vip-deal-time {
  margin: 0;
  font-family: var(--font-display);
  color: #ffbf60;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  text-shadow: 0 8px 24px rgba(255, 190, 96, 0.22);
}

.vip-deal-note {
  margin-top: 2px;
}

.lesson-target {
  text-align: right;
}

.lesson-target strong {
  font-size: 1.5rem;
  margin-top: 4px;
}

.lesson-summary {
  margin-bottom: 18px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.lesson-summary p {
  margin: 4px 0;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.stat-card,
.prompt-panel,
.keyboard-panel {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.stat-card {
  padding: 18px;
}

.stat-card strong {
  margin-top: 10px;
  font-size: 2rem;
}

.prompt-panel,
.keyboard-panel {
  padding: 22px;
}

.prompt-panel {
  margin-bottom: 18px;
}

.prompt-text {
  margin: 18px 0;
  min-height: 170px;
  padding: 22px;
  border-radius: 22px;
  background: #fffdf8;
  border: 1px solid var(--line);
  font-size: 1.18rem;
  line-height: 1.9;
}

.prompt-text .char {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0.96em;
  min-height: 1.24em;
  margin: 0 0.05em 0.14em;
  border-radius: 4px;
  color: #818895;
  background: transparent;
}

.prompt-text .char.current {
  background: rgba(141, 148, 160, 0.52);
  color: #ffffff;
}

.prompt-text .char.current::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: -0.06em;
  height: 0.08em;
  border-radius: 999px;
  background: #ffffff;
}

.prompt-text .char.correct {
  color: #45c89b;
  background: rgba(69, 200, 155, 0.2);
}

.prompt-text .char.corrected {
  color: #ffc14e;
  background: rgba(255, 193, 78, 0.24);
}

.prompt-text .char.incorrect {
  color: #ff5d66;
  background: rgba(255, 93, 102, 0.24);
}

.prompt-text.prompt-text-pinyin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, max-content));
  gap: 42px 42px;
  align-items: start;
  justify-content: start;
  justify-items: center;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.prompt-text.prompt-text-pinyin-article {
  grid-template-columns: repeat(auto-fit, minmax(108px, max-content));
  gap: 10px 5px;
  max-width: 1320px;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 16px 12px 24px;
  scrollbar-width: none;
  overscroll-behavior: contain;
  align-content: start;
}

.prompt-text.prompt-text-dark.prompt-text-large.prompt-text-pinyin-grid.prompt-text-pinyin-article {
  padding: 0 16px 12px 28px;
  text-align: left;
}

.prompt-text.prompt-text-pinyin-article:not(.prompt-text-pinyin-grid) {
  display: block;
  white-space: normal;
  overflow: auto;
}

.prompt-text.prompt-text-hanzi-native {
  position: relative;
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable both-edges;
}

.hanzi-native-measure {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 10px;
  padding: 28px 32px 30px 40px;
  width: 100%;
  box-sizing: border-box;
  font-size: 2.08rem;
  line-height: 1.08;
  font-weight: 700;
  color: transparent;
  pointer-events: none;
}

.hanzi-measure-char {
  grid-row: 1;
  width: 1.18em;
  height: 1.18em;
  min-width: 1.18em;
  margin: 0;
  border-radius: 0;
  font-size: 2.08rem;
  line-height: 1.08;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  color: transparent;
}

.hanzi-native-row {
  position: relative;
  padding: 28px 32px 22px 40px;
  width: 100%;
  box-sizing: border-box;
  background: rgba(17, 20, 27, 0.18);
}

.hanzi-native-row.is-active {
  background: rgba(17, 20, 27, 0.42);
}

.hanzi-native-row.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: #d85d8f;
}

.hanzi-native-row-target,
.hanzi-native-row-typed {
  display: grid;
  grid-template-columns: repeat(var(--row-columns), 1.18em);
  grid-auto-columns: 1.18em;
  column-gap: 10px;
  align-items: end;
  justify-content: start;
  width: 100%;
  overflow: hidden;
}

.hanzi-native-row-target {
  min-height: 1.2em;
}

.hanzi-native-divider {
  height: 1px;
  margin: 18px 0 20px;
  background: rgba(166, 174, 189, 0.18);
}

.hanzi-target-char {
  grid-row: 1;
  width: 1.18em;
  height: 1.18em;
  margin: 0;
  border-radius: 0;
  font-size: 2.08rem;
  line-height: 1.08;
  color: #8d93a5;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.hanzi-target-char.typed {
  color: #f3f5fb;
}

.hanzi-target-char.incorrect {
  color: #ff6c74;
}

.hanzi-target-char.current {
  border-radius: 0;
  background: rgba(141, 148, 160, 0.52);
  color: #ffffff;
}

.hanzi-target-char.current::after {
  left: 12%;
  right: 12%;
  bottom: -0.04em;
  height: 0.08em;
  background: #ff6ba4;
}

.hanzi-typed-char {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  grid-row: 1;
  width: 1.18em;
  height: 1.18em;
  font-size: 2.08rem;
  line-height: 1.08;
  font-weight: 700;
  color: #edf0f8;
  box-sizing: border-box;
}

.hanzi-typed-char.correct {
  color: #45c89b;
}

.hanzi-typed-char.corrected {
  color: #ffc14e;
}

.hanzi-typed-char.incorrect {
  color: #ff5d66;
}

.hanzi-native-cursor {
  grid-row: 1;
  width: 2px;
  height: 1.08em;
  justify-self: start;
  align-self: end;
  margin-left: 0;
  background: #f2f5fb;
  box-shadow: 0 0 0 1px rgba(242, 245, 251, 0.08);
}

.prompt-text.prompt-text-pinyin-article::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.prompt-text-pinyin-grid .pinyin-cell {
  display: inline-grid;
  justify-items: center;
  align-content: start;
  gap: 5px;
  min-width: max-content;
  padding: 4px 6px;
  border-radius: 14px;
  transition: background 160ms ease, color 160ms ease;
}

.prompt-text.prompt-text-dark.prompt-text-large.prompt-text-pinyin-grid .pinyin-cell:first-child {
  margin-left: 6px;
}

.prompt-text-pinyin-grid .pinyin-cell.pinyin-cell-punctuation {
  gap: 10px;
  padding: 4px 6px;
  min-width: 1.1em;
}

.prompt-text-pinyin-grid .pinyin-cell.pinyin-cell-punctuation .pinyin-text {
  min-height: 1.1em;
  font-size: 1.92rem;
  letter-spacing: 0;
}

.prompt-text-pinyin-grid .pinyin-cell.pinyin-cell-punctuation .hanzi-text {
  min-height: 1.1em;
  font-size: 2.28rem;
}

.prompt-text-pinyin-grid .pinyin-text {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.04em;
  font-size: 2rem;
  line-height: 1.1;
  color: #8c92a4;
  letter-spacing: 0.02em;
}

.prompt-text-pinyin-article .pinyin-text {
  font-size: 1.28rem;
}

.prompt-text-pinyin-grid .pinyin-letter {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0.74em;
  min-height: 1.14em;
  border-radius: 4px;
  color: #8c92a4;
}

.prompt-text-pinyin-grid .pinyin-letter.correct {
  color: #45c89b;
}

.prompt-text-pinyin-grid .pinyin-letter.corrected {
  color: #ffc14e;
}

.prompt-text-pinyin-grid .pinyin-letter.incorrect {
  color: #ff7b83;
}

.prompt-text-pinyin-grid .pinyin-letter.current {
  color: #f0f4fb;
  background: rgba(141, 148, 160, 0.52);
}

.prompt-text-pinyin-grid .pinyin-letter.current::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -0.06em;
  height: 0.08em;
  border-radius: 999px;
  background: #ff6ba4;
}

.prompt-text-pinyin-grid .hanzi-text {
  font-size: 2.68rem;
  line-height: 1;
  color: #8c92a4;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.prompt-text-pinyin-article .hanzi-text {
  font-size: 2rem;
}

.prompt-text-pinyin-grid .pinyin-cell.correct .pinyin-text,
.prompt-text-pinyin-grid .pinyin-cell.correct .hanzi-text {
  color: #45c89b;
}

.prompt-text-pinyin-grid .pinyin-cell.corrected .pinyin-text,
.prompt-text-pinyin-grid .pinyin-cell.corrected .hanzi-text {
  color: #ffc14e;
}

.prompt-text-pinyin-grid .pinyin-cell.incorrect .pinyin-text,
.prompt-text-pinyin-grid .pinyin-cell.incorrect .hanzi-text {
  color: #ff7b83;
}

.prompt-text-pinyin-grid .pinyin-cell.current .hanzi-text {
  color: #f0f4fb;
}

.prompt-text-pinyin-grid .pinyin-cell .hanzi-text {
  position: relative;
  min-width: 1.02em;
  min-height: 1.18em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}


.typing-input {
  width: 100%;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  font: inherit;
  outline: none;
}

.typing-input:focus {
  border-color: rgba(255, 79, 163, 0.5);
  box-shadow: 0 0 0 4px rgba(255, 79, 163, 0.12);
}

.action-row {
  grid-auto-flow: column;
  gap: 10px;
}

.primary-button,
.ghost-button {
  padding: 13px 18px;
  border-radius: 16px;
}

.primary-button {
  background: linear-gradient(135deg, #ff7bb8, #ff4fa3 58%, #ff9f6c);
  color: #fff8f1;
  box-shadow: 0 14px 32px rgba(255, 79, 163, 0.22);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  border: 1px solid var(--line);
}

.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.keyboard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  width: auto;
  align-items: center;
}

@media (max-width: 900px) {
  .hero,
  .intro-grid,
  .level-grid,
  .trainer-layout,
  .lesson-grid-page {
    grid-template-columns: 1fr;
  }

  .topbar {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 16px;
    padding-top: 12px;
  }

  .topbar-actions-wide,
  .topbar-cta,
  .fashion-actions {
    flex-wrap: wrap;
    justify-content: center;
  }

  .fashion-hero,
  .fashion-strip,
  .fashion-grid {
    grid-template-columns: 1fr;
  }

  .level-grid-redesign {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
  }

  .lesson-grid-page {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-content: stretch;
  }

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

  .my-data-keyboard.home-keyboard {
    --home-key-size: clamp(28px, 3.45vw, 48px);
    --home-key-gap: clamp(5px, 0.56vw, 8px);
  }

  .my-data-nickname-edit {
    grid-template-columns: 1fr;
  }

  .my-data-nickname-head {
    grid-template-columns: 1fr;
  }

  .my-data-finger-usage {
    grid-template-columns: 1fr;
  }

  .vip-plan-grid {
    grid-template-columns: 1fr;
  }

  .vip-layout {
    grid-template-columns: 1fr;
  }

  .fashion-copy {
    padding: 34px 18px 28px;
  }

  .fashion-copy h2 {
    max-width: none;
  }

  .hero-keyboard-visual {
    width: 100%;
    margin-top: 28px;
  }

  .keyboard-wrap.keyboard-wrap-home {
    width: -webkit-max-content;
    width: max-content;
    max-width: 100%;
    padding: clamp(5px, 1.2vw, 10px);
    border-radius: clamp(10px, 1.5vw, 16px);
  }

  .keyboard-home {
    --home-key-size: clamp(20px, 5vw, 40px);
    --home-key-gap: clamp(3px, 0.55vw, 6px);
  }

  .fashion-home::before {
    content: none;
  }

  .fashion-home::after {
    content: none;
  }

  .fashion-hero {
    width: calc(100% - 8px);
    padding: 18px 10px 30px;
    border-radius: 24px;
  }

  .home-footer {
    width: calc(100% - 8px);
    padding: 0 2px 2px;
  }

  .home-footer-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .home-footer-links {
    gap: 10px;
    flex-wrap: wrap;
  }

  .showcase-stack,
  .template-cards,
  .hero-metrics {
    grid-template-columns: 1fr;
  }

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

  .trainer-topbar,
  .trainer-status-bar {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 760px) {
  .page-shell {
    width: min(1320px, calc(100% - 20px));
  }

  .topbar {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .brand-wordmark h1 {
    font-size: 2.6rem;
  }

  .brand-domain {
    margin-top: 2px;
    padding: 0;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
  }

  .topbar-actions,
  .hero-actions,
  .prompt-footer,
  .trainer-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .panel,
  .prompt-panel,
  .keyboard-panel {
    padding: 20px;
  }

  .level-grid-redesign .level-card {
    width: auto;
    padding: 14px;
  }

  .my-data-grid {
    grid-template-columns: 1fr;
  }

  .my-data-keyboard.home-keyboard {
    --home-key-size: clamp(24px, 4.65vw, 40px);
    --home-key-gap: clamp(4px, 0.5vw, 7px);
  }

  .my-data-finger-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .my-data-speed-metrics {
    gap: 10px;
    font-size: 0.84rem;
  }

  .lessons-topbar {
    gap: 8px;
    flex-wrap: wrap;
  }

  .lesson-button {
    padding: 14px;
  }

  .level-stats {
    grid-template-columns: 1fr;
  }

  .panel-head,
  .keyboard-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .trainer-dark {
    padding: 20px 16px 28px;
    border-radius: 24px;
  }

  .trainer-stage {
    padding-top: 24px;
    min-height: auto;
  }

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

  .action-row {
    grid-auto-flow: row;
  }

  .keyboard-area {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .keyboard-wrap {
    min-width: max-content;
  }
}

@keyframes brand-domain-shine {
  0% {
    background-position: 130% 50%;
  }

  55% {
    background-position: 0% 50%;
  }

  100% {
    background-position: -120% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-domain {
    animation: none;
    background-position: 50% 50%;
  }
}

@media (max-width: 560px) {
  .level-grid-redesign {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lesson-grid-page {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
