:root {
  color-scheme: light;
  --bg: #f6f4f6;
  --surface: #ffffff;
  --surface-soft: #fbf8fa;
  --ink: #2c1730;
  --muted: #756b77;
  --line: #e8e1e7;
  --pink: #d91672;
  --pink-dark: #b70f5c;
  --pink-soft: #ffe3f0;
  --blue: #3858e9;
  --blue-soft: #e8ecff;
  --lime: #d8f35d;
  --success: #176b4d;
  --success-soft: #e3f6ee;
  --warning: #9b5300;
  --warning-soft: #fff0d7;
  --danger: #a6293e;
  --danger-soft: #ffe7eb;
  --shadow: 0 18px 50px rgba(61, 28, 54, 0.09);
  --shadow-soft: 0 8px 24px rgba(61, 28, 54, 0.07);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --content: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 9% 4%, rgba(217, 22, 114, 0.09), transparent 23rem),
    radial-gradient(circle at 93% 28%, rgba(56, 88, 233, 0.08), transparent 21rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:not(:disabled) {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

:focus-visible {
  outline: 3px solid rgba(56, 88, 233, 0.36);
  outline-offset: 3px;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  padding: 14px max(24px, calc((100vw - var(--content)) / 2));
  border-bottom: 1px solid rgba(232, 225, 231, 0.88);
  background: rgba(246, 244, 246, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  background: var(--pink);
  box-shadow: 0 9px 22px rgba(217, 22, 114, 0.24);
  font-size: 15px;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-size: 16px;
  letter-spacing: -0.02em;
}

.brand-copy span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.13em;
}

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

.nav-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 720;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.nav-button:hover {
  transform: translateY(-1px);
  border-color: #d6c8d2;
  background: #fff;
}

.nav-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 8px;
  color: var(--blue);
  background: var(--blue-soft);
  font-weight: 850;
}

.review-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--pink);
}

.nav-count {
  display: grid;
  min-width: 23px;
  height: 23px;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  color: #fff;
  background: var(--ink);
  font-size: 12px;
}

#app {
  width: min(var(--content), calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 72px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--pink);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: -0.035em;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(32px, 5vw, 54px);
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(25px, 3.2vw, 36px);
}

h3 {
  margin-bottom: 6px;
  font-size: 18px;
}

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

.lead {
  max-width: 670px;
  margin-bottom: 0;
  font-size: 17px;
}

.dashboard-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  margin-bottom: 26px;
}

.welcome-card,
.progress-card,
.panel,
.trainer-shell {
  border: 1px solid rgba(232, 225, 231, 0.9);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.welcome-card {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  padding: 34px;
  border-radius: var(--radius-xl);
}

.welcome-card::after {
  position: absolute;
  right: -52px;
  bottom: -67px;
  width: 220px;
  height: 220px;
  border: 34px solid var(--pink-soft);
  border-radius: 50%;
  content: "";
}

.welcome-card::before {
  position: absolute;
  z-index: 1;
  right: 88px;
  bottom: 24px;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--lime);
  box-shadow: -56px -38px 0 var(--blue-soft);
  content: "";
  transform: rotate(12deg);
}

.welcome-card > * {
  position: relative;
  z-index: 2;
}

.welcome-card h1 {
  max-width: 650px;
}

.progress-card {
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 28px;
  border-radius: var(--radius-xl);
  text-align: center;
}

.progress-ring {
  --value: 0;
  position: relative;
  display: grid;
  width: 132px;
  height: 132px;
  margin-bottom: 16px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--pink) calc(var(--value) * 1%), var(--pink-soft) 0);
}

.progress-ring::before {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--surface);
  content: "";
}

.progress-ring strong,
.progress-ring span {
  position: relative;
  z-index: 1;
}

.progress-ring strong {
  font-size: 30px;
  line-height: 1;
}

.progress-ring span {
  align-self: start;
  margin-top: -32px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.progress-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.level-switcher {
  display: flex;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 22px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
}

.level-button {
  min-width: 62px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  font-weight: 820;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.level-button:hover {
  background: var(--surface-soft);
}

.level-button.is-active {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 7px 16px rgba(44, 23, 48, 0.18);
}

.section-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.section-row h2,
.section-row p {
  margin-bottom: 0;
}

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

.topic-card {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  min-height: 116px;
  align-items: center;
  gap: 17px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  text-align: left;
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.topic-card:not(:disabled):hover {
  transform: translateY(-3px);
  border-color: rgba(217, 22, 114, 0.34);
  box-shadow: var(--shadow);
}

.topic-card:disabled {
  cursor: default;
  opacity: 0.78;
}

.topic-card.is-ready {
  border-color: rgba(217, 22, 114, 0.24);
  background: linear-gradient(120deg, #fff 62%, var(--pink-soft));
}

.topic-number {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 18px;
  color: var(--pink);
  background: var(--pink-soft);
  font-size: 16px;
  font-weight: 860;
}

.topic-card.is-ready .topic-number {
  color: #fff;
  background: var(--pink);
  box-shadow: 0 10px 23px rgba(217, 22, 114, 0.22);
}

.topic-copy {
  min-width: 0;
}

.topic-copy strong {
  display: block;
  margin-bottom: 5px;
  font-size: 17px;
  letter-spacing: -0.015em;
}

.topic-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.mini-progress {
  display: block;
  width: 74px;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #eadfe6;
}

.mini-progress span {
  display: block;
  width: var(--value, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--pink);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--muted);
  background: #f1edf0;
  font-size: 12px;
  font-weight: 730;
  white-space: nowrap;
}

.status-pill.ready {
  color: var(--pink-dark);
  background: var(--pink-soft);
}

.arrow-chip {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  color: var(--pink);
  background: #fff;
  font-size: 19px;
  font-weight: 850;
}

.back-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  font-weight: 730;
}

.back-button:hover {
  border-color: #d6c8d2;
  background: #fff;
}

.topic-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 18px;
  margin-bottom: 18px;
}

.topic-intro {
  position: relative;
  min-height: 245px;
  padding: 32px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  color: #fff;
  background: var(--ink);
  box-shadow: var(--shadow);
}

.topic-intro::after {
  position: absolute;
  right: -35px;
  bottom: -85px;
  width: 235px;
  height: 235px;
  border: 34px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  content: "";
}

.topic-intro .eyebrow {
  color: #ff79b7;
}

.topic-intro h1 {
  max-width: 650px;
  margin-bottom: 12px;
}

.topic-intro p {
  position: relative;
  z-index: 1;
  max-width: 570px;
  margin-bottom: 0;
  color: #d9ced8;
}

.set-panel {
  padding: 26px;
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, var(--pink-soft), #fff);
  box-shadow: var(--shadow-soft);
}

.set-panel h2 {
  font-size: 24px;
}

.set-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.set-button {
  min-height: 50px;
  padding: 0 12px;
  border: 1px solid rgba(217, 22, 114, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 800;
}

.set-button.is-active {
  color: #fff;
  border-color: var(--pink);
  background: var(--pink);
  box-shadow: 0 9px 20px rgba(217, 22, 114, 0.22);
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.text-button {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 730;
}

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

.mode-card {
  display: grid;
  min-height: 168px;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  text-align: left;
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.mode-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 88, 233, 0.28);
  box-shadow: var(--shadow-soft);
}

.mode-index {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 13px;
  font-weight: 850;
}

.mode-copy p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.mode-start {
  color: var(--pink);
  font-size: 14px;
  font-weight: 800;
}

.trainer-shell {
  width: min(820px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.trainer-top {
  padding: 22px 24px 0;
}

.trainer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 730;
}

.trainer-progress {
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #eee8ec;
}

.trainer-progress span {
  display: block;
  width: var(--value, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pink), #f05a9f);
  transition: width 250ms ease;
}

.trainer-body {
  min-height: 440px;
  padding: 42px clamp(24px, 6vw, 64px) 34px;
}

.task-label {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prompt-large {
  margin-bottom: 28px;
  font-size: clamp(28px, 5vw, 43px);
  font-weight: 820;
  line-height: 1.16;
  letter-spacing: -0.04em;
}

.prompt-medium {
  margin-bottom: 24px;
  font-size: clamp(22px, 3.8vw, 31px);
  font-weight: 760;
  line-height: 1.28;
  letter-spacing: -0.025em;
}

.translation {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 7px 11px;
  border-radius: 10px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 14px;
  font-weight: 720;
}

.flashcard {
  position: relative;
  display: grid;
  min-height: 280px;
  align-content: center;
  justify-items: center;
  padding: 34px;
  border: 1px solid #ebdfe7;
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 227, 240, 0.48));
  text-align: center;
}

.flashcard .prompt-large {
  margin-bottom: 12px;
}

.flashcard-answer {
  width: 100%;
  padding-top: 20px;
  border-top: 1px solid rgba(217, 22, 114, 0.14);
}

.flashcard-answer strong {
  display: block;
  margin-bottom: 10px;
  color: var(--pink-dark);
  font-size: 19px;
}

.flashcard-answer p {
  margin: 0;
  color: var(--muted);
}

.option-list {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.option-button {
  width: 100%;
  min-height: 56px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  text-align: left;
  font-weight: 700;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.option-button:hover:not(:disabled),
.option-button.is-selected {
  transform: translateX(3px);
  border-color: rgba(56, 88, 233, 0.48);
  background: var(--blue-soft);
}

.option-button.is-correct {
  border-color: rgba(23, 107, 77, 0.38);
  background: var(--success-soft);
}

.option-button.is-wrong {
  border-color: rgba(166, 41, 62, 0.35);
  background: var(--danger-soft);
}

.answer-input {
  width: 100%;
  min-height: 60px;
  margin-bottom: 15px;
  padding: 14px 17px;
  border: 1px solid #d9ced6;
  border-radius: 15px;
  color: var(--ink);
  background: #fff;
  font-size: 18px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.answer-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(56, 88, 233, 0.1);
  outline: none;
}

.token-area {
  display: flex;
  min-height: 78px;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  margin-bottom: 18px;
  padding: 13px;
  border: 1px dashed #cabdc6;
  border-radius: 16px;
  background: var(--surface-soft);
}

.token-area.is-empty::before {
  color: #a397a0;
  content: "Нажимайте на слова в правильном порядке";
  font-size: 14px;
}

.token-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.token {
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid #dacfd7;
  border-radius: 12px;
  background: #fff;
  font-weight: 720;
}

.token.chosen {
  border-color: rgba(56, 88, 233, 0.25);
  background: var(--blue-soft);
}

.feedback {
  margin: 18px 0 0;
  padding: 15px 17px;
  border-radius: 15px;
  font-size: 15px;
}

.feedback strong {
  display: block;
  margin-bottom: 4px;
}

.feedback.correct {
  color: var(--success);
  background: var(--success-soft);
}

.feedback.wrong {
  color: var(--danger);
  background: var(--danger-soft);
}

.feedback p {
  margin: 5px 0 0;
  color: inherit;
}

.trainer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 24px 24px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

.action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.button-primary,
.button-secondary,
.button-pink,
.button-quiet {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
}

.button-primary {
  border: 1px solid var(--ink);
  color: #fff;
  background: var(--ink);
}

.button-primary:hover:not(:disabled) {
  background: #452449;
}

.button-pink {
  border: 1px solid var(--pink);
  color: #fff;
  background: var(--pink);
}

.button-pink:hover:not(:disabled) {
  background: var(--pink-dark);
}

.button-secondary {
  border: 1px solid var(--line);
  background: #fff;
}

.button-secondary:hover:not(:disabled) {
  border-color: #d3c5cf;
}

.button-quiet {
  border: 1px solid transparent;
  color: var(--muted);
  background: transparent;
}

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

.match-column {
  display: grid;
  align-content: start;
  gap: 9px;
}

.match-column-title {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.match-option {
  min-height: 62px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-align: left;
  font-size: 14px;
  font-weight: 680;
}

.match-option.is-selected {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.match-option.is-matched {
  border-color: rgba(23, 107, 77, 0.3);
  color: var(--success);
  background: var(--success-soft);
}

.panel {
  padding: clamp(22px, 4vw, 36px);
  border-radius: var(--radius-xl);
}

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

.panel-head h1,
.panel-head p {
  margin-bottom: 0;
}

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

.stat-card {
  padding: 20px;
  border-radius: 18px;
  background: var(--surface-soft);
}

.stat-card:nth-child(2) {
  background: var(--blue-soft);
}

.stat-card:nth-child(3) {
  background: var(--pink-soft);
}

.stat-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 31px;
  line-height: 1;
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.progress-sections {
  display: grid;
  gap: 32px;
}

.progress-explanation { margin: 20px 0; }
.progress-next { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px; margin: 20px 0; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.progress-next p { margin: 6px 0 0; }
.progress-levels-title { margin-top: 32px; }
.progress-overview { gap: 16px; }
.progress-level { border: 1px solid var(--line); border-radius: 20px; padding: 20px; background: #fff; min-width: 0; }
.progress-level > summary { cursor: pointer; font-size: 1rem; }
.progress-level > summary > span { display: inline-block; margin: 0 16px 8px 0; }
.progress-level > summary strong { font-size: 1.25rem; }
.progress-overview progress { display: block; width: 100%; height: 12px; accent-color: #df0873; margin: 8px 0 16px; }
.progress-topic-grid { display: grid; gap: 16px; margin-top: 20px; }
.progress-overview .progress-topic { border-top: 1px solid var(--line); padding-top: 18px; min-width: 0; }
.progress-overview h3 { font-size: 1.1rem; margin: 0 0 8px; }
.progress-overview p { font-size: 1rem; margin: 0 0 12px; }
.progress-expressions { margin-top: 14px; }
.progress-expressions > summary { cursor: pointer; font-weight: 700; font-size: .95rem; padding: 10px 0; }
.progress-expressions .collocation-row { grid-template-columns: 36px minmax(0, 1fr) auto; }
.progress-expressions .row-statuses { grid-column: 2; flex-wrap: wrap; }
.progress-expressions .report-row { grid-column: 3; grid-row: 1 / span 2; }
@media (max-width: 540px) {
  .progress-level { padding: 14px; }
  .progress-next .button-pink { width: 100%; }
  .progress-expressions .collocation-row { grid-template-columns: 28px minmax(0, 1fr); }
  .progress-expressions .report-row { grid-column: 2; grid-row: auto; justify-self: start; }
}

.progress-topic h2 {
  margin: 0 0 14px;
  font-size: clamp(19px, 2vw, 24px);
}

.collocation-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(190px, 0.8fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}

.row-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: var(--muted);
  background: #f1edf0;
  font-size: 12px;
  font-weight: 800;
}

.row-phrase {
  font-weight: 750;
}

.row-translation {
  color: var(--muted);
  font-size: 14px;
}

.row-statuses {
  display: flex;
  gap: 5px;
}

.state-chip {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--muted);
  background: #f1edf0;
  font-size: 11px;
  font-weight: 750;
}

.state-chip.recognized {
  color: var(--blue);
  background: var(--blue-soft);
}

.state-chip.recalled {
  color: var(--success);
  background: var(--success-soft);
}

.state-chip.review {
  color: var(--pink-dark);
  background: var(--pink-soft);
}

.empty-state,
.complete-card {
  display: grid;
  min-height: 340px;
  align-content: center;
  justify-items: center;
  padding: 32px;
  border: 1px dashed #d6c9d2;
  border-radius: 22px;
  background: var(--surface-soft);
  text-align: center;
}

.empty-symbol,
.complete-symbol {
  display: grid;
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 24px;
  color: var(--pink);
  background: var(--pink-soft);
  font-size: 30px;
  font-weight: 850;
  transform: rotate(-5deg);
}

.empty-state p,
.complete-card p {
  max-width: 470px;
  color: var(--muted);
}

.complete-card .button-pink,
.empty-state .button-secondary {
  margin-top: 8px;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100vw - 44px));
  padding: 13px 16px;
  border-radius: 14px;
  color: #fff;
  background: var(--ink);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(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;
}

@media (max-width: 900px) {
  .dashboard-head,
  .topic-hero {
    grid-template-columns: 1fr;
  }

  .progress-card {
    grid-template-columns: auto 1fr;
    justify-items: start;
    gap: 20px;
    text-align: left;
  }

  .progress-ring {
    width: 112px;
    height: 112px;
    margin-bottom: 0;
  }

  .progress-ring::before {
    width: 84px;
    height: 84px;
  }

  .progress-ring span {
    margin-top: -27px;
  }

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

  .collocation-row {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .row-translation {
    display: none;
  }
}

@media (max-width: 680px) {
  .topbar {
    min-height: 70px;
    padding: 11px 16px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .brand-copy span,
  .nav-button > span:not(.review-dot, .nav-count, .nav-icon) {
    display: none;
  }

  .nav-button {
    min-width: 42px;
    padding: 0 10px;
  }

  #app {
    width: min(100% - 28px, var(--content));
    padding: 22px 0 44px;
  }

  .welcome-card,
  .topic-intro,
  .set-panel,
  .panel {
    padding: 24px;
    border-radius: 22px;
  }

  .welcome-card {
    min-height: 278px;
  }

  .progress-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .level-switcher {
    width: 100%;
  }

  .level-button {
    min-width: 58px;
    padding: 0 15px;
  }

  .section-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .topic-grid,
  .mode-grid,
  .stats-grid,
  .match-grid {
    grid-template-columns: 1fr;
  }

  .topic-card {
    grid-template-columns: 50px minmax(0, 1fr) auto;
    min-height: 104px;
    padding: 16px;
  }

  .topic-number {
    width: 50px;
    height: 50px;
    border-radius: 15px;
  }

  .status-pill {
    display: none;
  }

  .mode-card {
    min-height: 140px;
  }

  .trainer-body {
    min-height: 430px;
    padding: 32px 20px 26px;
  }

  .trainer-top,
  .trainer-actions {
    padding-right: 18px;
    padding-left: 18px;
  }

  .trainer-actions,
  .action-group {
    width: 100%;
  }

  .trainer-actions .button-primary,
  .trainer-actions .button-pink,
  .trainer-actions .button-secondary,
  .trainer-actions .button-quiet {
    flex: 1;
    padding-right: 14px;
    padding-left: 14px;
  }

  .collocation-row {
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: start;
  }

  .row-statuses {
    grid-column: 2;
    flex-wrap: wrap;
  }
}

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

/* Langspace Play — visual refresh */
:root {
  --bg: #fffaf6;
  --surface: #ffffff;
  --surface-soft: #f9f7fb;
  --ink: #342541;
  --muted: #746a7f;
  --line: #e7dfeb;
  --pink: #e01b72;
  --pink-dark: #b90b58;
  --pink-soft: #fff0f6;
  --blue: #6c5ce7;
  --blue-soft: #f0edff;
  --lime: #c8ee5a;
  --success: #138a65;
  --success-soft: #e6f8f1;
  --warning: #a85c00;
  --warning-soft: #fff1d8;
  --danger: #c33655;
  --danger-soft: #ffedf1;
  --shadow: 0 20px 46px rgba(84, 55, 102, 0.12);
  --shadow-soft: 0 10px 24px rgba(84, 55, 102, 0.09);
  --radius-xl: 30px;
  --radius-lg: 23px;
  --radius-md: 16px;
  --content: 1200px;
}

html {
  background: var(--bg);
}

body {
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 4% 8%, rgba(255, 61, 141, 0.13), transparent 24rem),
    radial-gradient(circle at 96% 18%, rgba(108, 92, 231, 0.12), transparent 26rem),
    radial-gradient(circle at 78% 88%, rgba(29, 193, 171, 0.1), transparent 23rem),
    var(--bg);
  font-family: ui-rounded, "SF Pro Rounded", "Avenir Next", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 500;
}

body::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  background-image: radial-gradient(rgba(91, 70, 108, 0.13) 1px, transparent 1px);
  background-size: 24px 24px;
  content: "";
  opacity: 0.28;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 52%);
  mask-image: linear-gradient(to bottom, #000, transparent 52%);
}

.app-shell {
  position: relative;
  z-index: 1;
}

:focus-visible {
  outline: 4px solid rgba(108, 92, 231, 0.28);
  outline-offset: 3px;
}

.topbar {
  min-height: 78px;
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(225, 216, 231, 0.92);
  background: rgba(255, 250, 246, 0.9);
  box-shadow: 0 4px 20px rgba(84, 55, 102, 0.05);
  backdrop-filter: blur(22px) saturate(150%);
}

.brand {
  gap: 13px;
}

.brand-mark {
  position: relative;
  width: 48px;
  height: 46px;
  border: 2px solid var(--pink-dark);
  border-radius: 16px;
  background: linear-gradient(145deg, var(--pink), #c90c60);
  box-shadow: 0 5px 0 var(--pink-dark), 0 9px 18px rgba(217, 29, 112, 0.18);
  font-size: 15px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.brand:hover .brand-mark {
  transform: translateY(-2px) rotate(-2deg);
  box-shadow: 0 7px 0 var(--pink-dark), 0 12px 22px rgba(217, 29, 112, 0.2);
}

.brand-mark i {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 13px;
  height: 13px;
  border: 3px solid var(--bg);
  border-radius: 50%;
  background: #ffe45d;
}

.brand-copy strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 850;
}

.brand-copy span {
  color: #887b91;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.nav-button {
  min-height: 46px;
  gap: 9px;
  padding: 0 15px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 3px 0 #ded5e3;
  font-weight: 780;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.nav-button:hover {
  transform: translateY(-2px);
  border-color: #cfc1d7;
  box-shadow: 0 5px 0 #ded5e3;
}

.nav-button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #ded5e3;
}

.nav-icon,
.review-dot {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 900;
}

.nav-icon {
  color: #5845d4;
  background: var(--blue-soft);
}

.review-dot {
  color: var(--pink-dark);
  background: var(--pink-soft);
}

.nav-count {
  min-width: 25px;
  height: 25px;
  color: var(--ink);
  background: #ffe45d;
  font-weight: 900;
}

#app {
  padding-top: 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  color: var(--pink-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.18);
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 850;
  letter-spacing: -0.045em;
}

h1 {
  font-size: clamp(35px, 4.6vw, 56px);
}

h2 {
  font-size: clamp(27px, 3.2vw, 38px);
}

.lead {
  font-size: 18px;
  line-height: 1.55;
}

.dashboard-head {
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  margin-bottom: 30px;
}

.welcome-card,
.progress-card,
.panel,
.trainer-shell {
  border-width: 2px;
}

.welcome-card {
  min-height: 320px;
  padding: 34px 36px 30px;
  border-color: var(--pink-dark);
  border-radius: 32px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), transparent 38%),
    linear-gradient(135deg, #e01b72 0%, #d9146a 58%, #c90c60 100%);
  box-shadow: 0 8px 0 var(--pink-dark), 0 24px 50px rgba(185, 11, 88, 0.2);
}

.welcome-card::before,
.welcome-card::after {
  display: none;
}

.welcome-card .eyebrow {
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.welcome-card h1 {
  max-width: 760px;
  margin-bottom: 13px;
  padding-right: 205px;
  color: #fff;
  font-size: clamp(36px, 4.3vw, 55px);
  text-wrap: balance;
}

.welcome-card .lead {
  max-width: 650px;
  margin-bottom: 0;
  padding-right: 170px;
  color: rgba(255, 255, 255, 0.9);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 25px;
  padding-right: 190px;
}

.hero-stats span {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.13);
  font-size: 13px;
  font-weight: 720;
}

.hero-stats strong {
  font-size: 16px;
  font-weight: 900;
}

.hero-orbit {
  position: absolute;
  right: 30px;
  bottom: 32px;
  display: grid;
  width: 172px;
  height: 172px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.hero-orbit::before,
.hero-orbit::after {
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  content: "";
}

.hero-orbit::before {
  width: 122px;
  height: 122px;
}

.hero-orbit::after {
  width: 204px;
  height: 64px;
  transform: rotate(42deg);
}

.orbit-word {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 27px;
  color: #fff;
  background: #6c5ce7;
  box-shadow: 0 7px 0 #5140c5;
  font-size: 29px;
  font-weight: 950;
  letter-spacing: -0.07em;
}

.orbit-dot {
  position: absolute;
  border: 3px solid #fff;
  border-radius: 50%;
}

.dot-one {
  top: 4px;
  right: 18px;
  width: 25px;
  height: 25px;
  background: #ffe45d;
}

.dot-two {
  bottom: 10px;
  left: 1px;
  width: 19px;
  height: 19px;
  background: #52dbc6;
}

.dot-three {
  top: 45px;
  left: -7px;
  width: 13px;
  height: 13px;
  background: #fff;
}

.progress-card {
  position: relative;
  min-height: 320px;
  align-content: start;
  padding: 24px;
  overflow: hidden;
  border-color: #e3c53f;
  border-radius: 32px;
  background: linear-gradient(145deg, #fff9ca, #ffed82);
  box-shadow: 0 8px 0 #d9b934, 0 24px 46px rgba(170, 132, 13, 0.15);
}

.progress-card::after {
  position: absolute;
  right: -48px;
  bottom: -52px;
  width: 145px;
  height: 145px;
  border: 24px solid rgba(255, 255, 255, 0.33);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.progress-card > * {
  position: relative;
  z-index: 1;
}

.progress-card-label {
  z-index: 1;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  margin-bottom: 13px;
  padding: 0 11px;
  border: 1px solid rgba(120, 91, 0, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.progress-ring {
  width: 132px;
  height: 132px;
  margin-bottom: 12px;
  background: conic-gradient(var(--pink) calc(var(--value) * 1%), rgba(255, 255, 255, 0.52) 0);
  box-shadow: inset 0 0 0 1px rgba(120, 91, 0, 0.08);
}

.progress-ring::before {
  width: 98px;
  height: 98px;
  background: #fff4a5;
  box-shadow: 0 3px 0 rgba(195, 153, 18, 0.14);
}

.progress-ring strong,
.progress-ring span {
  grid-area: 1 / 1;
}

.progress-ring strong {
  align-self: center;
  margin-top: -10px;
  color: var(--ink);
  font-size: 30px;
  font-weight: 950;
}

.progress-ring span {
  align-self: center;
  margin-top: 48px;
  color: #7a641b;
  font-size: 11px;
  font-weight: 800;
}

.progress-copy {
  z-index: 1;
}

.progress-copy h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.progress-metrics {
  display: flex;
  justify-content: center;
  gap: 7px;
}

.progress-metrics span {
  display: grid;
  min-width: 104px;
  padding: 7px 9px;
  border: 1px solid rgba(120, 91, 0, 0.12);
  border-radius: 11px;
  color: #7a641b;
  background: rgba(255, 255, 255, 0.44);
  font-size: 11px;
}

.progress-metrics strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.level-switcher {
  margin-bottom: 26px;
  padding: 7px;
  border: 2px solid var(--line);
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 4px 0 #ded5e3;
}

.level-button {
  min-height: 45px;
  border-radius: 13px;
  font-weight: 900;
}

.level-button:hover {
  background: #f8f4fa;
}

.level-button.is-active {
  background: linear-gradient(145deg, var(--blue), #5a48ce);
  box-shadow: 0 4px 0 #5140c5;
}

.section-row {
  margin-bottom: 18px;
}

.section-row .muted {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 700;
}

.topic-grid {
  gap: 17px;
  padding-bottom: 14px;
}

.topic-tone-1 {
  --topic-accent: #e01b72;
  --topic-soft: #fff0f6;
  --topic-shadow: #b90b58;
  --topic-ink: #ffffff;
}

.topic-tone-2 {
  --topic-accent: #6c5ce7;
  --topic-soft: #f0edff;
  --topic-shadow: #5542c9;
  --topic-ink: #ffffff;
}

.topic-tone-3 {
  --topic-accent: #ff9f43;
  --topic-soft: #fff4e8;
  --topic-shadow: #d77a20;
  --topic-ink: #432b17;
}

.topic-tone-4 {
  --topic-accent: #1dbfa9;
  --topic-soft: #e9fbf7;
  --topic-shadow: #108b7d;
  --topic-ink: #103e3a;
}

.topic-tone-5 {
  --topic-accent: #2869c5;
  --topic-soft: #ebf4ff;
  --topic-shadow: #174b91;
  --topic-ink: #ffffff;
}

.topic-card {
  grid-template-columns: 66px minmax(0, 1fr) auto;
  min-height: 126px;
  gap: 17px;
  padding: 19px 20px;
  border: 2px solid var(--line);
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 5px 0 #ded6e2, 0 12px 26px rgba(84, 55, 102, 0.06);
  transition: transform 170ms ease, translate 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.topic-card:nth-child(even) {
  translate: 0 10px;
}

.topic-card.is-ready {
  border-color: var(--topic-accent);
  background: linear-gradient(135deg, #fff 55%, var(--topic-soft));
  box-shadow: 0 5px 0 var(--topic-shadow), 0 14px 28px rgba(84, 55, 102, 0.09);
}

.topic-card:not(:disabled):hover {
  transform: translateY(-3px) rotate(-0.35deg);
  border-color: var(--topic-accent);
  box-shadow: 0 8px 0 var(--topic-shadow), 0 18px 34px rgba(84, 55, 102, 0.12);
}

.topic-card:not(:disabled):active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--topic-shadow);
}

.topic-card:disabled {
  opacity: 0.68;
}

.topic-number-wrap {
  position: relative;
  display: block;
  width: 62px;
  height: 62px;
}

.topic-number {
  width: 62px;
  height: 62px;
  border: 2px solid #e3dbe7;
  border-radius: 20px;
  color: #91859a;
  background: #f5f1f6;
  font-size: 17px;
  font-weight: 950;
}

.topic-card.is-ready .topic-number {
  border-color: var(--topic-shadow);
  color: var(--topic-ink, #fff);
  background: var(--topic-accent);
  box-shadow: 0 4px 0 var(--topic-shadow);
}

.topic-ready-dot {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 19px;
  height: 19px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #ffe45d;
  box-shadow: 0 2px 0 rgba(112, 87, 0, 0.2);
}

.topic-copy strong {
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
}

.topic-meta {
  gap: 9px;
  font-size: 13px;
  font-weight: 650;
}

.mini-progress {
  width: 82px;
  height: 9px;
  border: 2px solid #e4dbe8;
  background: #f0eaf2;
}

.mini-progress span {
  background: var(--topic-accent);
}

.topic-action {
  display: grid;
  justify-items: center;
  gap: 5px;
}

.topic-action small {
  color: var(--topic-shadow);
  font-size: 11px;
  font-weight: 900;
}

.arrow-chip {
  width: 40px;
  height: 40px;
  border: 2px solid var(--topic-accent);
  border-radius: 14px;
  color: var(--topic-shadow);
  background: #fff;
  box-shadow: 0 3px 0 var(--topic-accent);
}

.status-pill {
  min-height: 31px;
  border: 1px solid #ded5e3;
  background: #f3eff5;
  font-weight: 800;
}

.back-button {
  min-height: 44px;
  margin-bottom: 22px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 0 #ded5e3;
  font-weight: 800;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.back-button:hover {
  transform: translateY(-2px);
  border-color: #cfc1d7;
  box-shadow: 0 5px 0 #ded5e3;
}

.back-button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #ded5e3;
}

.topic-hero {
  --topic-hero: #e01b72;
  --topic-hero-edge: #b90b58;
  --topic-hero-ink: #ffffff;
  --topic-hero-muted: rgba(255, 255, 255, 0.88);
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: 18px;
  margin-bottom: 28px;
}

.topic-theme-2 {
  --topic-hero: #6c5ce7;
  --topic-hero-edge: #5542c9;
}

.topic-theme-3 {
  --topic-hero: #ff9f43;
  --topic-hero-edge: #d77a20;
  --topic-hero-ink: #432b17;
  --topic-hero-muted: #684628;
}

.topic-theme-4 {
  --topic-hero: #23c4ad;
  --topic-hero-edge: #108b7d;
  --topic-hero-ink: #103e3a;
  --topic-hero-muted: #1e5c56;
}

.topic-intro {
  min-height: 290px;
  padding: 34px 36px;
  border: 2px solid var(--topic-hero-edge);
  border-radius: 30px;
  color: var(--topic-hero-ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 45%),
    var(--topic-hero);
  box-shadow: 0 8px 0 var(--topic-hero-edge), 0 22px 42px rgba(84, 55, 102, 0.14);
}

.topic-intro::after {
  right: -60px;
  bottom: -80px;
  width: 250px;
  height: 250px;
  border-width: 28px;
  border-color: rgba(255, 255, 255, 0.15);
}

.topic-intro .eyebrow {
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.27);
  border-radius: 999px;
  color: var(--topic-hero-ink);
  background: rgba(255, 255, 255, 0.13);
}

.topic-intro h1 {
  position: relative;
  z-index: 2;
  max-width: 600px;
  padding-right: 120px;
  color: var(--topic-hero-ink);
  text-wrap: balance;
}

.topic-intro > p:not(.eyebrow) {
  max-width: 560px;
  padding-right: 100px;
  color: var(--topic-hero-muted);
  font-size: 17px;
}

.topic-facts {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 24px;
}

.topic-facts span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 11px;
  color: var(--topic-hero-ink);
  background: rgba(255, 255, 255, 0.14);
  font-size: 12px;
  font-weight: 800;
}

.topic-monogram {
  position: absolute;
  top: 30px;
  right: 28px;
  display: grid;
  width: 104px;
  height: 104px;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.46);
  border-radius: 34px;
  color: var(--topic-hero-ink);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 7px 0 rgba(50, 26, 63, 0.16);
  font-size: 30px;
  font-weight: 950;
  letter-spacing: -0.06em;
  transform: rotate(6deg);
}

.set-panel {
  position: relative;
  padding: 27px;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 8px 0 #ded5e3, 0 20px 36px rgba(84, 55, 102, 0.09);
}

.set-panel::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 7px;
  background: linear-gradient(90deg, var(--pink), #7865eb, #23c4ad, #ffe45d);
  content: "";
}

.set-panel .eyebrow {
  margin-top: 3px;
}

.set-panel h2 {
  margin-bottom: 5px;
  font-size: 26px;
}

.set-buttons {
  position: relative;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
}

.set-buttons::before {
  position: absolute;
  z-index: 0;
  top: 22px;
  right: 10%;
  left: 10%;
  height: 4px;
  border-radius: 999px;
  background: #e7dfeb;
  content: "";
}

.set-button {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 76px;
  place-items: center;
  align-content: center;
  gap: 3px;
  padding: 8px;
  border: 2px solid var(--line);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 3px 0 #ded5e3;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.set-button:hover:not(.is-active) {
  transform: translateY(-2px);
  border-color: #cfc1d7;
  box-shadow: 0 5px 0 #ded5e3;
}

.set-button.is-active {
  border-color: var(--pink-dark);
  background: var(--pink);
  box-shadow: 0 5px 0 var(--pink-dark);
}

.set-button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #ded5e3;
}

.set-number {
  font-size: 20px;
  font-weight: 950;
  line-height: 1;
}

.set-range {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.set-button.is-active .set-range {
  color: rgba(255, 255, 255, 0.82);
}

.quick-links {
  gap: 7px;
  margin-top: 17px;
}

.text-button {
  min-height: 42px;
  border: 2px solid var(--line);
  border-radius: 13px;
  box-shadow: 0 2px 0 #ded5e3;
  font-size: 14px;
  font-weight: 780;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.text-button:hover {
  transform: translateY(-2px);
  border-color: #cfc1d7;
  box-shadow: 0 4px 0 #ded5e3;
}

.mode-grid {
  gap: 15px;
}

.mode-card {
  --mode-accent: #e01b72;
  --mode-soft: #fff0f6;
  --mode-edge: #b90b58;
  position: relative;
  min-height: 194px;
  gap: 13px;
  padding: 20px;
  overflow: hidden;
  border: 2px solid var(--mode-accent);
  border-radius: 23px;
  background: linear-gradient(145deg, #fff 58%, var(--mode-soft));
  box-shadow: 0 5px 0 var(--mode-edge), 0 12px 24px rgba(84, 55, 102, 0.07);
  transition: transform 170ms ease, box-shadow 170ms ease;
}

.mode-card[data-mode="match"] {
  --mode-accent: #7865eb;
  --mode-soft: #f0edff;
  --mode-edge: #5542c9;
}

.mode-card[data-mode="context"] {
  --mode-accent: #ff9f43;
  --mode-soft: #fff4e8;
  --mode-edge: #d77a20;
}

.mode-card[data-mode="build"] {
  --mode-accent: #1dbfa9;
  --mode-soft: #e9fbf7;
  --mode-edge: #108b7d;
}

.mode-card[data-mode="recall"] {
  --mode-accent: #3d8bf2;
  --mode-soft: #ebf4ff;
  --mode-edge: #2467bf;
}

.mode-card[data-mode="form"] {
  --mode-accent: #97c72e;
  --mode-soft: #f3fbdc;
  --mode-edge: #689517;
}

.mode-card::after {
  position: absolute;
  right: -32px;
  bottom: -44px;
  width: 118px;
  height: 118px;
  border: 18px solid var(--mode-accent);
  border-radius: 50%;
  content: "";
  opacity: 0.09;
}

.mode-card:hover {
  transform: translateY(-4px) rotate(-0.45deg);
  border-color: var(--mode-accent);
  box-shadow: 0 9px 0 var(--mode-edge), 0 18px 32px rgba(84, 55, 102, 0.12);
}

.mode-card:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--mode-edge);
}

.mode-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.mode-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 2px solid var(--mode-accent);
  border-radius: 16px;
  color: var(--mode-edge);
  background: var(--mode-soft);
  box-shadow: 0 3px 0 var(--mode-accent);
  font-size: 21px;
  font-weight: 950;
}

.mode-index {
  display: block;
  width: auto;
  height: auto;
  padding: 5px 7px;
  border-radius: 8px;
  color: var(--mode-edge);
  background: var(--mode-soft);
  font-size: 11px;
  font-weight: 900;
}

.mode-copy h3 {
  font-size: 19px;
}

.mode-copy p {
  font-size: 14px;
  line-height: 1.45;
}

.mode-start {
  z-index: 1;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 10px;
  color: var(--mode-edge);
  background: var(--mode-soft);
  font-weight: 850;
}

.trainer-shell {
  --mode-accent: var(--pink);
  --mode-soft: var(--pink-soft);
  --mode-edge: var(--pink-dark);
  width: min(860px, 100%);
  border: 2px solid var(--mode-accent);
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 8px 0 var(--mode-edge), 0 24px 48px rgba(84, 55, 102, 0.13);
}

.trainer-shell.mode-match,
.trainer-shell.mode-recall {
  --mode-accent: #7865eb;
  --mode-soft: #f0edff;
  --mode-edge: #5542c9;
}

.trainer-shell.mode-context {
  --mode-accent: #ff9f43;
  --mode-soft: #fff4e8;
  --mode-edge: #d77a20;
}

.trainer-shell.mode-build {
  --mode-accent: #1dbfa9;
  --mode-soft: #e9fbf7;
  --mode-edge: #108b7d;
}

.trainer-shell.mode-form {
  --mode-accent: #97c72e;
  --mode-soft: #f3fbdc;
  --mode-edge: #689517;
}

.trainer-shell.mode-complete {
  --mode-accent: #1dbfa9;
  --mode-soft: #e9fbf7;
  --mode-edge: #108b7d;
}

.trainer-top {
  padding: 24px 27px 0;
  background: linear-gradient(to bottom, var(--mode-soft), rgba(255, 255, 255, 0));
}

.trainer-meta {
  margin-bottom: 14px;
  color: var(--mode-edge);
  font-size: 13px;
  font-weight: 850;
}

.trainer-meta span:last-child {
  padding: 5px 8px;
  border-radius: 9px;
  background: var(--mode-soft);
}

.trainer-progress {
  height: 13px;
  border: 2px solid #e7dfeb;
  background: #f3eff5;
  box-shadow: inset 0 2px 3px rgba(84, 55, 102, 0.07);
}

.trainer-progress span {
  background: var(--mode-accent);
  box-shadow: inset 0 -2px 0 rgba(50, 28, 65, 0.12);
}

.trainer-body {
  min-height: 445px;
  padding-top: 38px;
}

.task-label {
  display: inline-flex;
  margin-bottom: 20px;
  padding: 7px 10px;
  border-radius: 10px;
  color: var(--mode-edge);
  background: var(--mode-soft);
  font-size: 12px;
  font-weight: 900;
}

.prompt-large {
  font-size: clamp(31px, 5vw, 46px);
  font-weight: 900;
}

.prompt-medium {
  font-weight: 820;
}

.translation {
  border: 1px solid var(--mode-accent);
  border-radius: 11px;
  color: var(--mode-edge);
  background: var(--mode-soft);
  font-weight: 800;
}

.flashcard {
  min-height: 300px;
  border: 2px solid var(--mode-accent);
  border-radius: 25px;
  background:
    radial-gradient(circle at 92% 10%, var(--mode-soft) 0 56px, transparent 57px),
    linear-gradient(145deg, #fff, var(--mode-soft));
  box-shadow: 0 6px 0 var(--mode-edge);
}

.pronunciation-button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding: 7px 13px 7px 8px;
  border: 2px solid #f3a9ca;
  border-radius: 16px;
  color: var(--pink-dark);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 0 #f3a9ca;
  font-size: 14px;
  font-weight: 900;
  transition: transform 150ms ease, box-shadow 150ms ease, color 150ms ease, background 150ms ease;
}

.pronunciation-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #f3a9ca;
}

.pronunciation-button:active,
.pronunciation-button.is-playing {
  transform: translateY(2px);
  border-color: var(--pink-dark);
  color: #fff;
  background: var(--pink);
  box-shadow: 0 2px 0 var(--pink-dark);
}

.pronunciation-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 11px;
  background: var(--pink-soft);
}

.pronunciation-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pronunciation-button.is-playing .pronunciation-icon {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

.pronunciation-bars {
  display: inline-flex;
  height: 17px;
  align-items: center;
  gap: 2px;
  margin-left: 2px;
}

.pronunciation-bars i {
  width: 3px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.5;
}

.pronunciation-bars i:nth-child(2) {
  height: 11px;
}

.pronunciation-bars i:nth-child(3) {
  height: 7px;
}

.pronunciation-button.is-playing .pronunciation-bars i {
  opacity: 1;
  animation: pronunciation-wave 720ms ease-in-out infinite alternate;
}

.pronunciation-button.is-playing .pronunciation-bars i:nth-child(2) {
  animation-delay: 160ms;
}

.pronunciation-button.is-playing .pronunciation-bars i:nth-child(3) {
  animation-delay: 320ms;
}

@keyframes pronunciation-wave {
  from {
    transform: scaleY(0.55);
  }
  to {
    transform: scaleY(1.35);
  }
}

.flashcard-answer {
  border-top: 2px solid var(--mode-accent);
}

.flashcard-answer strong {
  color: var(--mode-edge);
}

.option-list {
  gap: 11px;
}

.option-button,
.match-option {
  min-height: 60px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 0 #ded5e3;
  font-weight: 760;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background 150ms ease;
}

.option-button:hover:not(:disabled),
.option-button.is-selected,
.match-option:hover:not(:disabled),
.match-option.is-selected {
  transform: translateY(-2px);
  border-color: var(--mode-accent);
  background: var(--mode-soft);
  box-shadow: 0 6px 0 var(--mode-edge);
}

.option-button.is-correct,
.match-option.is-matched {
  border-color: #2cab83;
  background: var(--success-soft);
  box-shadow: 0 4px 0 #17815f;
}

.option-button.is-wrong {
  border-color: #e15b74;
  background: var(--danger-soft);
  box-shadow: 0 4px 0 #b92f4d;
}

.answer-input {
  min-height: 64px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 0 #ded5e3;
  font-size: 18px;
  font-weight: 650;
}

.answer-input:focus {
  border-color: var(--mode-accent);
  box-shadow: 0 4px 0 var(--mode-edge), 0 0 0 5px var(--mode-soft);
}

.token-area {
  min-height: 88px;
  border: 2px dashed var(--mode-accent);
  border-radius: 18px;
  background: var(--mode-soft);
}

.token-area.is-empty::before {
  color: var(--mode-edge);
  content: "Нажимайте на слова в правильном порядке";
  font-weight: 700;
}

.token {
  min-height: 45px;
  border: 2px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 3px 0 #ded5e3;
  font-weight: 780;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.token:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #ded5e3;
}

.token.chosen {
  border-color: var(--mode-accent);
  color: var(--mode-edge);
  background: var(--mode-soft);
  box-shadow: 0 3px 0 var(--mode-edge);
}

.feedback {
  padding: 17px 18px;
  border: 2px solid currentColor;
  border-radius: 17px;
  box-shadow: 0 4px 0 currentColor;
}

.trainer-actions {
  padding: 19px 25px 25px;
  border-top: 2px solid var(--line);
  background: #fbf9fc;
}

.button-primary,
.button-secondary,
.button-pink,
.button-quiet {
  min-height: 50px;
  border-width: 2px;
  border-radius: 15px;
  font-weight: 850;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.button-primary {
  border-color: #5140c5;
  background: #6c5ce7;
  box-shadow: 0 5px 0 #5140c5;
}

.button-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  background: #6654df;
  box-shadow: 0 7px 0 #5140c5;
}

.button-pink {
  border-color: var(--pink-dark);
  background: var(--pink);
  box-shadow: 0 5px 0 var(--pink-dark);
}

.button-pink:hover:not(:disabled) {
  transform: translateY(-2px);
  background: #d9146a;
  box-shadow: 0 7px 0 var(--pink-dark);
}

.button-secondary {
  border-color: var(--line);
  background: #fff;
  box-shadow: 0 4px 0 #ded5e3;
}

.button-secondary:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: #cfc1d7;
  box-shadow: 0 6px 0 #ded5e3;
}

.button-primary:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #5140c5;
}

.button-pink:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--pink-dark);
}

.button-secondary:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #ded5e3;
}

.button-quiet {
  color: var(--muted);
  background: transparent;
}

.button-quiet:hover {
  color: var(--ink);
  background: #f0ebf3;
}

.panel {
  border: 2px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 0 #ded5e3, 0 22px 42px rgba(84, 55, 102, 0.1);
}

.stats-grid {
  gap: 14px;
}

.stat-card {
  border: 2px solid #e7dfeb;
  border-radius: 19px;
  background: #fff4e8;
  box-shadow: 0 4px 0 #ead5bf;
}

.stat-card:nth-child(2) {
  border-color: #cfc8fb;
  background: var(--blue-soft);
  box-shadow: 0 4px 0 #c0b7ed;
}

.stat-card:nth-child(3) {
  border-color: #f8b8d5;
  background: var(--pink-soft);
  box-shadow: 0 4px 0 #eba5c6;
}

.stat-card strong {
  font-weight: 950;
}

.collocation-list {
  gap: 10px;
}

.collocation-row {
  min-height: 70px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 3px 0 #e1d9e5;
  transition: transform 150ms ease, border-color 150ms ease;
}

.collocation-row:hover {
  transform: translateX(3px);
  border-color: #d0c2d8;
}

.row-number {
  border: 1px solid #e0d7e5;
  border-radius: 11px;
  color: #665a70;
  background: #f5f1f6;
  font-weight: 900;
}

.row-phrase {
  font-weight: 820;
}

.state-chip {
  min-height: 28px;
  border: 1px solid rgba(84, 55, 102, 0.1);
  font-weight: 800;
}

.empty-state,
.complete-card {
  border: 2px dashed var(--mode-accent, #d6c9d2);
  border-radius: 24px;
  background: var(--mode-soft, var(--surface-soft));
}

.empty-symbol,
.complete-symbol {
  border: 2px solid var(--mode-accent, var(--pink));
  border-radius: 24px;
  color: var(--mode-edge, var(--pink-dark));
  background: #fff;
  box-shadow: 0 5px 0 var(--mode-edge, var(--pink-dark));
}

.toast {
  border: 2px solid #5140c5;
  border-radius: 16px;
  background: #6c5ce7;
  box-shadow: 0 5px 0 #5140c5, var(--shadow);
  font-weight: 800;
}

@media (max-width: 980px) {
  .dashboard-head,
  .topic-hero {
    grid-template-columns: 1fr;
  }

  .welcome-card h1 {
    max-width: 780px;
  }

  .progress-card {
    grid-template-columns: auto 1fr;
    min-height: 180px;
    align-items: center;
    justify-content: start;
    justify-items: start;
    gap: 22px;
    text-align: left;
  }

  .progress-card-label {
    grid-column: 1 / -1;
    margin-bottom: -6px;
  }

  .progress-ring {
    width: 118px;
    height: 118px;
    margin: 0;
  }

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

  .progress-metrics {
    justify-content: flex-start;
  }

  .topic-intro h1,
  .topic-intro > p:not(.eyebrow) {
    padding-right: 140px;
  }
}

@media (max-width: 720px) {
  .topbar {
    min-height: 70px;
    padding: 10px 14px;
  }

  .brand-mark {
    width: 43px;
    height: 41px;
    border-radius: 14px;
  }

  .brand-copy span,
  .nav-button > span:not(.review-dot, .nav-count, .nav-icon) {
    display: none;
  }

  .nav-button {
    min-width: 42px;
    min-height: 43px;
    padding: 0 8px;
    border-radius: 14px;
  }

  #app {
    width: min(100% - 28px, var(--content));
    padding: 22px 0 48px;
  }

  h1 {
    font-size: clamp(31px, 10vw, 42px);
  }

  .welcome-card,
  .topic-intro,
  .set-panel,
  .panel {
    padding: 24px;
    border-radius: 24px;
  }

  .welcome-card {
    min-height: auto;
    padding-bottom: 25px;
  }

  .welcome-card h1,
  .welcome-card .lead,
  .hero-stats {
    padding-right: 0;
  }

  .welcome-card h1 {
    font-size: clamp(32px, 10.4vw, 42px);
  }

  .hero-orbit {
    display: none;
  }

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

  .hero-stats span {
    display: grid;
    min-height: 58px;
    align-content: center;
    padding: 7px 9px;
  }

  .progress-card {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 12px;
    text-align: center;
  }

  .progress-card-label {
    grid-column: auto;
    margin-bottom: 0;
  }

  .progress-metrics {
    justify-content: center;
  }

  .level-switcher {
    width: 100%;
  }

  .section-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .topic-grid,
  .mode-grid,
  .stats-grid,
  .match-grid {
    grid-template-columns: 1fr;
  }

  .topic-card,
  .topic-card:nth-child(even) {
    translate: 0;
  }

  .topic-card {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    min-height: 112px;
    padding: 15px;
  }

  .topic-number-wrap,
  .topic-number {
    width: 54px;
    height: 54px;
  }

  .topic-number {
    border-radius: 17px;
  }

  .topic-action small,
  .status-pill {
    display: none;
  }

  .topic-intro {
    min-height: 285px;
  }

  .topic-intro h1,
  .topic-intro > p:not(.eyebrow) {
    padding-right: 0;
  }

  .topic-monogram {
    top: auto;
    right: 22px;
    bottom: 24px;
    width: 70px;
    height: 70px;
    border-radius: 23px;
    font-size: 22px;
    opacity: 0.58;
  }

  .topic-facts {
    max-width: calc(100% - 80px);
  }

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

  .set-buttons::before {
    display: none;
  }

  .mode-card {
    min-height: 176px;
  }

  .trainer-shell {
    border-radius: 23px;
  }

  .trainer-body {
    min-height: 430px;
    padding: 31px 20px 27px;
  }

  .trainer-top,
  .trainer-actions {
    padding-right: 18px;
    padding-left: 18px;
  }

  .trainer-actions,
  .action-group {
    width: 100%;
  }

  .trainer-actions .button-primary,
  .trainer-actions .button-pink,
  .trainer-actions .button-secondary,
  .trainer-actions .button-quiet {
    flex: 1;
    padding-right: 13px;
    padding-left: 13px;
  }

  .flashcard {
    min-height: 285px;
    padding: 25px;
  }

  .collocation-row {
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: start;
  }

  .row-statuses {
    grid-column: 2;
    flex-wrap: wrap;
  }
}

@media (max-width: 430px) {
  .brand-copy strong {
    font-size: 15px;
  }

  .top-actions {
    gap: 5px;
  }

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

  .hero-stats span {
    min-height: 40px;
    grid-template-columns: auto 1fr;
  }

  .topic-copy strong {
    font-size: 16px;
  }

  .topic-meta {
    font-size: 12px;
  }

  .mini-progress {
    width: 62px;
  }

  .arrow-chip {
    width: 36px;
    height: 36px;
  }

  .topic-facts {
    max-width: 100%;
    padding-right: 62px;
  }

  .progress-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-orbit {
    animation: orbit-float 5.5s ease-in-out infinite;
  }

  .live-dot {
    animation: live-pulse 2.4s ease-in-out infinite;
  }

  .topic-ready-dot {
    animation: ready-bounce 3s ease-in-out infinite;
  }
}

@keyframes orbit-float {
  0%,
  100% {
    transform: translateY(0) rotate(-8deg);
  }
  50% {
    transform: translateY(-8px) rotate(-4deg);
  }
}

@keyframes live-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(0.82);
  }
}

@keyframes ready-bounce {
  0%,
  84%,
  100% {
    transform: translateY(0);
  }
  90% {
    transform: translateY(-3px);
  }
}

/* Tiger learning journey */
:root { --bg:#f7f8fc; --ink:#30233c; --muted:#766d80; --pink:#db1872; --pink-dark:#b40f5c; --line:#ece8f0; --content:1180px; }
body { background:var(--bg); font-family:ui-rounded,"Nunito",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
.app-shell { max-width:1220px; }
.topbar { border-bottom:2px solid var(--line); padding-bottom:22px; }
.brand-mark { border-radius:18px; box-shadow:0 4px 0 #a70d51; }
.brand-copy strong { font-weight:850; letter-spacing:-.5px; }
.nav-button { background:white; border:1px solid var(--line); box-shadow:0 3px 0 var(--line); }
h1,h2,h3 { letter-spacing:-.035em; }
.game-toolbar { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:12px; margin:24px 0; }
.game-pill { display:flex; align-items:center; gap:8px; border:1px solid var(--line); border-radius:16px; background:white; padding:10px 17px; font-size:14px; font-weight:650; box-shadow:0 3px 0 var(--line); }
.game-pill strong { font-size:20px; font-weight:850; }
.game-pill.flame { color:#b95216; }
.game-pill.xp { color:#967019; }
.game-pill.goal { color:#25806b; }
.journey-heading { display:flex; justify-content:space-between; align-items:center; gap:24px; margin:26px 0; }
.journey-heading h1 { font-size:clamp(30px,4vw,44px); margin:5px 0 8px; line-height:1.15; }
.journey-heading p { margin:0; color:var(--muted); }
.journey-heading .eyebrow { color:var(--pink); font-size:12px; font-weight:800; letter-spacing:1.7px; }
.button-pink,.button-primary { border-radius:18px; box-shadow:0 5px 0 #ab1158; transition:transform .15s,box-shadow .15s; }
.button-primary { background:var(--pink); border-color:var(--pink); }
.button-pink:hover,.button-primary:hover { transform:translateY(-1px); background:var(--pink-dark); }
.button-pink:active,.button-primary:active { transform:translateY(3px); box-shadow:0 2px 0 #ab1158; }
.continue-button { flex-shrink:0; padding:16px 22px; }
.level-switcher { background:white; border:2px solid var(--line); border-radius:22px; padding:7px; gap:8px; margin:24px 0; }
.level-button { border-radius:15px; min-height:48px; font-size:17px; }
.level-button.is-active { background:var(--pink); color:white; box-shadow:0 4px 0 #b30d58; }
.journey-layout { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:28px; align-items:start; }
.journey-map { background:white; border:2px solid var(--line); border-radius:30px; overflow:hidden; }
.map-heading { background:#fff6d6; display:flex; justify-content:space-between; align-items:center; gap:14px; padding:25px 30px; border-bottom:2px solid #f0e5bc; }
.map-heading h2 { font-size:24px; margin:5px 0 0; }
.map-heading .eyebrow { font-size:12px; letter-spacing:1.5px; color:#896923; margin:0; }
.map-count { border:1px solid #e6d79f; padding:8px 12px; border-radius:14px; font-size:14px; white-space:nowrap; background:#fffcf1; }
.journey-path { position:relative; padding:30px 28px 12px; }
.journey-stop { display:flex; align-items:center; gap:23px; min-height:145px; position:relative; margin-left:20px; }
.journey-stop:nth-child(4n+2),.journey-stop:nth-child(4n+3) { margin-left:88px; }
.journey-stop:not(:last-child)::after { content:""; position:absolute; left:39px; top:112px; width:7px; height:38px; border-radius:10px; background:repeating-linear-gradient(to bottom,#e7e5ee 0 6px,transparent 6px 12px); }
.map-node { position:relative; flex:0 0 84px; width:84px; height:76px; border-radius:50%; background:#ec3388; color:white; border:5px solid #f99dc7; box-shadow:0 8px 0 #a90d56,0 13px 0 #fce0ed; font-size:27px; font-weight:900; cursor:pointer; transition:transform .15s; }
.map-node:hover { transform:translateY(-3px); }
.map-node:active { transform:translateY(4px); }
.journey-stop:nth-child(3n+2) .map-node { background:#ffa640; border-color:#ffce93; box-shadow:0 8px 0 #c5751e,0 13px 0 #fff0d8; }
.journey-stop:nth-child(3n+3) .map-node { background:#8a6ee3; border-color:#c3b1fb; box-shadow:0 8px 0 #6446b8,0 13px 0 #eee8fc; }
.mastered .map-node { background:#3ca88a!important; border-color:#97dcc6!important; box-shadow:0 8px 0 #247f67,0 13px 0 #dcf5ed!important; }
.upcoming .map-node { background:#eceaf1!important; color:#a59eb1; border-color:#f7f6fa!important; box-shadow:0 8px 0 #d3ccdf,0 13px 0 #f2eff7!important; cursor:not-allowed; }
.next-stop .map-node::before { content:""; position:absolute; inset:-14px; border:2px dashed #ef86b5; border-radius:50%; }
.stop-copy { min-width:0; padding:17px 0; }
.stop-caption { font-size:11px; letter-spacing:1.3px; font-weight:800; color:#908698; }
.next-stop .stop-caption { color:var(--pink); }
.stop-copy h3 { font-size:19px; line-height:1.28; margin:6px 0; }
.topic-translation { display:block; margin:2px 0 7px; font-size:14px; line-height:1.35; font-weight:500; color:#786a80; }
.stop-copy .topic-translation { margin-top:-2px; }
.topic-intro > .topic-translation { font-size:16px; margin:0 0 12px; }
.progress-topic > .topic-translation { margin:2px 0 9px; }
.topic-name-group { display:grid; gap:3px; }
.free-topic-list .topic-name-group .topic-translation { margin:0; }
.stop-copy p { font-size:14px; margin:0; color:var(--muted); }
.stop-stars { display:flex; gap:5px; color:#e4dfea; font-size:20px; margin-top:3px; }
.stop-stars .lit { color:#e7a823; }
.map-finish { padding:25px; border-top:2px dashed var(--line); text-align:center; color:var(--muted); font-size:14px; }
.map-finish>span { font-size:25px; color:var(--pink); margin-right:8px; }
.journey-sidebar { display:grid; gap:20px; }
.journey-sidebar section { border:2px solid var(--line); border-radius:26px; background:white; overflow:hidden; }
.tiger-companion { padding:22px 16px 20px; text-align:center; }
.companion-tag { display:inline-block; background:#ffe6f1; color:#bd1b62; padding:6px 13px; border-radius:12px; font-size:11px; font-weight:800; letter-spacing:1.5px; }
.tiger { display:inline-block; width:112px; height:112px; flex-shrink:0; background-image:url('./images/tiger-poses.png'); background-size:200% 200%; background-repeat:no-repeat; vertical-align:middle; }
.tiger-wave { background-position:0 0; }
.tiger-cheer { background-position:100% 0; }
.tiger-think { background-position:0 100%; }
.tiger-heart { background-position:100% 100%; }
.tiger-hero { width:260px; height:260px; max-width:100%; margin:10px auto 0; }
.tiger-speech { background:#fff0f7; padding:18px; border-radius:20px; position:relative; margin:0 6px; }
.tiger-speech::before { content:""; position:absolute; top:-8px; left:calc(50% - 8px); width:16px; height:16px; background:#fff0f7; transform:rotate(45deg); }
.tiger-speech h2 { font-size:20px; margin:0 0 8px; }
.tiger-speech p { margin:0; font-size:15px; line-height:1.55; }
.daily-card,.journey-progress,.badge-card { padding:22px; }
.card-title { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.card-title h3,.badge-card h3 { font-size:18px; margin:0; }
.card-title>span { font-weight:850; color:var(--pink); }
.game-progress { height:16px; background:#f0edf4; border-radius:10px; overflow:hidden; margin:16px 0 12px; }
.game-progress i { display:block; height:100%; background:#e33286; border-radius:inherit; transition:width .3s; border-top:4px solid #f478b2; }
.daily-card p,.journey-progress>p,.badge-card>p { color:var(--muted); font-size:14px; line-height:1.5; margin-bottom:0; }
.journey-progress .progress-metrics { margin-top:18px; display:flex; gap:20px; }
.journey-progress .progress-metrics>span { font-size:14px; }
.journey-progress .text-button { margin-top:12px; }
.badge-grid { display:grid; gap:14px; margin-top:18px; }
.achievement { display:grid; grid-template-columns:38px 1fr; column-gap:10px; color:#817787; }
.achievement>span { grid-row:1/3; font-size:27px; filter:grayscale(1); opacity:.45; }
.achievement.earned { color:var(--ink); }
.achievement.earned>span { filter:none; opacity:1; }
.achievement strong { font-size:14px; }
.achievement small { font-size:12px; line-height:1.4; }
.topic-hero { border:2px solid var(--line); background:white; box-shadow:0 5px 0 var(--line); }
.topic-intro { background:white!important; position:relative; padding-right:155px; }
.topic-intro h1 { font-size:clamp(26px,3vw,38px); }
.topic-tiger { position:absolute; bottom:18px; right:4px; width:155px; height:155px; }
.topic-facts { padding-right:0; }
.set-panel { background:#fff5d6; }
.set-button { border-radius:16px; box-shadow:0 3px 0 #ddd2b1; }
.mode-card { border:2px solid var(--line); box-shadow:0 5px 0 var(--line); border-radius:24px; }
.mode-card:hover { border-color:#ef97bf; box-shadow:0 5px 0 #ef97bf; }
.trainer-shell { border:2px solid var(--line); box-shadow:0 6px 0 var(--line); background:white; }
.trainer-top { background:#fff5d8; }
.flashcard { position:relative; background:white; padding-top:25px; }
.card-tiger { display:block; width:120px; height:120px; margin:0 auto 12px; }
.flashcard .prompt-large { font-size:clamp(25px,4vw,38px); }
.tiger-feedback { position:relative; padding-right:112px; min-height:120px; background:white!important; border:2px solid var(--line); }
.tiger-feedback>.tiger { position:absolute; width:105px; height:105px; right:3px; top:5px; }
.feedback-encouragement { display:block; font-weight:800; margin-bottom:8px; color:var(--pink); }
.tiger-feedback>strong { display:block; }
.complete-tiger { width:210px; height:210px; display:block; margin:0 auto; }
.session-xp { display:inline-block; padding:8px 17px; margin:8px 0 20px; background:#fff1b4; color:#81610c; border-radius:15px; font-weight:850; }
.complete-card>h2 { font-size:28px; margin:6px 0 12px; }
.complete-card>h1 { font-size:22px; }
button:focus-visible { outline:3px solid #562b88; outline-offset:5px; }
@media(prefers-reduced-motion:no-preference) {
 .tiger-hero { animation:tiger-float 5s ease-in-out infinite; }
 .complete-tiger,.tiger-feedback .tiger-cheer { animation:tiger-pop .6s ease-out; }
}
@keyframes tiger-float { 0%,100%{transform:translateY(0) rotate(-1deg)}50%{transform:translateY(-6px) rotate(1deg)} }
@keyframes tiger-pop { 0%{transform:scale(.82)}65%{transform:scale(1.06)}100%{transform:scale(1)} }
@media(max-width:950px) { .journey-layout {grid-template-columns:minmax(0,1fr) 280px;gap:18px}.tiger-hero{width:225px;height:225px}.journey-path{padding:24px 20px}.journey-stop{margin-left:0}.journey-stop:nth-child(4n+2),.journey-stop:nth-child(4n+3){margin-left:30px}.map-heading{padding:20px;flex-wrap:wrap}.continue-button{font-size:14px} }
@media(max-width:720px) {
 .game-toolbar{justify-content:flex-start;gap:8px;margin:18px 0}.game-pill{font-size:12px;padding:8px 10px;gap:5px}.game-pill strong{font-size:17px}
 .journey-heading{align-items:flex-start;flex-direction:column;gap:18px}.journey-heading h1{font-size:32px}.journey-heading>div>p:last-child{font-size:15px}.continue-button{width:100%;font-size:16px}
 .journey-layout{grid-template-columns:1fr}.journey-sidebar{grid-template-columns:1fr 1fr;gap:14px}.tiger-companion{grid-column:1/-1;display:grid;grid-template-columns:130px 1fr;align-items:center;text-align:left;padding:14px!important}.companion-tag{display:none}.tiger-hero{width:130px;height:130px;margin:0}.tiger-speech{padding:14px;margin:0}.tiger-speech::before{display:none}.tiger-speech h2{font-size:18px}.tiger-speech p{font-size:14px}.badge-card{grid-column:1/-1}.badge-grid{grid-template-columns:repeat(3,1fr);gap:8px}.achievement{display:flex;flex-direction:column;text-align:center;align-items:center;gap:4px}
 .journey-map{border-radius:24px}.journey-stop{min-height:135px;gap:20px;margin-left:10px}.journey-stop:nth-child(4n+2),.journey-stop:nth-child(4n+3){margin-left:55px}.map-node{flex-basis:72px;width:72px;height:66px;font-size:23px}.stop-copy h3{font-size:17px}.stop-copy p{font-size:12px}.journey-stop:not(:last-child)::after{left:33px;top:104px;height:30px}.map-heading h2{font-size:22px}.map-count{font-size:12px}
 .topic-intro{padding-right:105px}.topic-tiger{width:100px;height:100px;right:0;bottom:12px}.topic-intro>p{font-size:15px}.topic-facts{gap:5px}.topic-facts>span{font-size:12px}.daily-card,.journey-progress,.badge-card{padding:16px}.card-title{flex-wrap:wrap}.card-title h3{font-size:16px}
}
@media(max-width:390px) { .journey-path{padding:22px 14px}.journey-stop{gap:16px;margin-left:0}.journey-stop:nth-child(4n+2),.journey-stop:nth-child(4n+3){margin-left:22px}.journey-sidebar{grid-template-columns:1fr}.daily-card,.journey-progress{grid-column:1/-1}.game-pill{padding:7px 8px}.topic-intro{padding-right:22px;padding-bottom:110px}.topic-tiger{right:10px}.tiger-feedback{padding-right:80px}.tiger-feedback>.tiger{width:75px;height:75px} }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important} }

@media(max-width:720px) {
 .journey-sidebar { display:contents; }
 .journey-layout > .journey-map, .journey-sidebar > section { grid-column:1/-1; }
 .journey-sidebar > .tiger-companion { order:-1; }
}

/* Opening artwork supplied by the creator. */
.tygli-splash { position:fixed; inset:0; z-index:1000; width:100%; height:100%; height:100dvh; border:0; padding:12px 12px 36px; background:#fff; cursor:pointer; display:flex; flex-direction:column; align-items:center; justify-content:center; opacity:1; transition:opacity .35s ease; }
.tygli-splash[hidden] { display:none; }
.tygli-splash img { display:block; max-width:100%; min-height:0; height:calc(100% - 24px); width:auto; object-fit:contain; }
.tygli-splash>span { color:#777384; font-size:12px; margin-top:8px; }
.tygli-splash.leaving { opacity:0; pointer-events:none; }
@media(prefers-reduced-motion:reduce) { .tygli-splash { transition:none; } }

.brand-mark.brand-artwork { background:#fff; overflow:hidden; box-shadow:none; border:1px solid #f3e5ed; position:relative; flex-shrink:0; }
.brand-artwork img { position:absolute; width:200%; max-width:none; height:auto; left:-50%; top:-96%; display:block; }

.brand-copy .brand-tagline { display:block; text-transform:none; letter-spacing:0; line-height:1.4; white-space:normal; max-width:340px; }
@media(max-width:600px) { .brand-copy .brand-tagline { max-width:190px; font-size:10px; } }

.review-today { display:flex; align-items:center; justify-content:space-between; gap:20px; background:#fff; border:2px solid var(--line); border-radius:22px; padding:20px 24px; margin-bottom:24px; }
.review-today p { margin:6px 0 0; color:var(--muted); }
.review-today button { flex-shrink:0; }
.upcoming-review { margin:24px 0; border:1px solid var(--line); padding:18px; border-radius:18px; }
.upcoming-review summary { cursor:pointer; font-weight:700; min-height:32px; }
.upcoming-review ul { list-style:none; padding:0; max-height:320px; overflow:auto; }
.upcoming-review li { display:flex; justify-content:space-between; gap:16px; padding:10px 0; border-bottom:1px solid var(--line); }
.upcoming-review time { white-space:nowrap; color:var(--muted); }
.report-link { display:block; margin:8px auto 16px; font-size:.875rem; }
.report-row { grid-column:2/-1; justify-self:start; font-size:.8125rem; padding:0; }
.item-report { color:var(--ink); width:min(560px,calc(100% - 32px)); max-height:85dvh; border:2px solid var(--line); border-radius:24px; padding:24px; box-shadow:var(--shadow); }
.item-report::backdrop { background:rgba(30,20,40,.5); }
.report-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.report-heading h2 { margin:0; font-size:1.5rem; }
.item-report p { font-size:.875rem; line-height:1.5; }
.item-report label { display:block; font-weight:700; margin:16px 0 8px; }
.item-report textarea { width:100%; font:inherit; border:1px solid var(--line); border-radius:12px; padding:12px; resize:vertical; }
.item-report details { margin:16px 0; }
.item-report summary { cursor:pointer; min-height:44px; }
.report-actions { display:flex; flex-wrap:wrap; gap:12px; }
@media(max-width:600px) { .review-today { align-items:stretch; flex-direction:column; padding:18px; }.item-report{padding:18px}.report-actions>button{flex:1}.upcoming-review li{flex-direction:column;gap:4px} }

/* Tygli: a calm, consistent learning surface. */
:root { --control-radius:16px; }
body { font-size:1rem; line-height:1.5; }
button,input { font:inherit; }
.button-primary,.button-secondary,.button-pink { min-height:48px; border-radius:var(--control-radius); padding:12px 22px; font-size:1rem; line-height:1.4; }
.button-quiet,.text-button,.nav-button { min-height:44px; }
.brand-mark.brand-artwork { border-radius:50%; width:60px; height:60px; }
.brand-artwork img { width:155%; height:155%; max-width:none; left:-27.5%; top:-27.5%; object-fit:cover; }
.brand-copy .brand-tagline { font-size:0.875rem; font-weight:500; line-height:1.3; color:#756b80; }
.tiger-hero { animation:none; }
.level-help { margin:-12px 0 20px; display:block; font-size:0.875rem; }
.eyebrow,.task-label,.stop-caption,.map-count,.topic-facts>span { font-size:0.875rem; }
.stop-copy p,.tiger-speech p,.game-pill,.mode-card p { font-size:0.9375rem; }
.onboarding { max-width:760px; margin:36px auto; padding:36px; }
.welcome-heading { display:flex; align-items:center; gap:24px; margin-bottom:24px; }
.welcome-tiger { width:124px; height:124px; flex-shrink:0; }
.welcome-heading h1 { font-size:clamp(1.75rem,4vw,2.5rem); margin:4px 0 12px; line-height:1.15; }
.welcome-heading p { margin:0; }
.welcome-levels { border:0; padding:0; margin:0; display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.welcome-levels legend { margin-bottom:12px; font-weight:750; }
.welcome-choice { position:relative; cursor:pointer; }
.welcome-choice input { position:absolute; left:16px; top:22px; accent-color:var(--pink); width:18px; height:18px; margin:0; }
.welcome-choice>span { min-height:100px; padding:16px 16px 16px 46px; border:2px solid var(--line); border-radius:18px; display:flex; flex-direction:column; gap:4px; height:100%; }
.welcome-choice strong { font-size:1.125rem; }
.welcome-choice span span { font-size:0.875rem; line-height:1.4; color:var(--muted); }
.welcome-choice input:checked+span { border-color:var(--pink); background:#fff0f7; }
.welcome-choice input:focus-visible+span { outline:3px solid #562b88; outline-offset:3px; }
.welcome-note { margin:24px 0; color:var(--muted); }
.welcome-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.storage-note { font-size:0.8125rem!important; color:var(--muted); line-height:1.5; margin:20px 0 0; }
.trainer-shell { max-width:800px; margin-inline:auto; border-radius:26px; overflow:hidden; }
.trainer-top { padding:22px 28px; background:#fff; }
.trainer-meta { gap:16px; font-size:0.875rem; align-items:center; }
.trainer-meta>span:last-child { white-space:nowrap; color:var(--pink); font-weight:800; }
.trainer-progress { height:10px; margin-top:16px; }
.trainer-body { padding:24px 32px; min-height:360px; }
.training-buddy { display:flex; gap:12px; align-items:center; min-height:72px; margin:0 0 16px; color:var(--muted); font-size:0.875rem; }
.training-buddy .tiger { width:72px; height:72px; flex-shrink:0; }
.buddy-listening { color:var(--pink); }
.buddy-listening .tiger { outline:3px solid #f3afd0; outline-offset:2px; border-radius:50%; }
.buddy-success { color:#267247; }
.flashcard { padding:12px 16px 24px; min-height:0; border:0; box-shadow:none; }
.flashcard .pronunciation-button { min-height:52px; margin:0 auto 20px; font-size:1rem; }
.flashcard .prompt-large { overflow-wrap:anywhere; line-height:1.3; margin:12px 0 20px; }
.flashcard-answer { margin-top:22px; padding-top:22px; }
.trainer-actions { border-top:1px solid var(--line); background:#fff; padding:20px 28px; gap:16px; min-height:92px; }
.trainer-actions .action-group { display:flex; justify-content:flex-end; gap:12px; flex-wrap:wrap; }
.answer-input { font-size:1.125rem; min-height:56px; border-radius:16px; }
.option-button,.match-option,.token { min-height:48px; font-size:1rem; overflow-wrap:anywhere; }
.trainer-body>.tiger-feedback { padding:20px; min-height:0; }
.trainer-body>.tiger-feedback>.tiger { display:none; }
.mode-match .tiger-feedback { padding-right:100px; min-height:100px; }
.mode-match .tiger-feedback>.tiger { display:block; }
.complete-card>h1 { font-size:clamp(1.5rem,4vw,2rem); margin:8px 0 24px; }
.complete-tiger { width:148px; height:148px; }
.session-results { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin:24px 0; text-align:left; }
.session-results>div { display:flex; flex-direction:column; padding:20px; border-radius:20px; background:#fff0f7; }
.session-results>div:last-child { background:#fff6dc; }
.session-results strong { font-size:2.25rem; line-height:1.2; }
.session-results small { font-size:1rem; color:var(--muted); }
.session-results span { margin-top:8px; font-size:0.875rem; }
.session-difficult { list-style:none; padding:0; margin:16px 0 24px; text-align:left; }
.session-difficult li { padding:12px 0; border-bottom:1px solid var(--line); display:flex; flex-direction:column; gap:4px; }
.session-difficult li span { color:var(--muted); }
.complete-card .action-group { justify-content:center; flex-wrap:wrap; gap:12px; }
@media(prefers-reduced-motion:no-preference) {
 .buddy-success .tiger { animation:tiger-pop .55s ease-out; }
 .buddy-listening .tiger { animation:listen-once .7s ease-out; }
}
@keyframes listen-once { 50% { transform:rotate(-7deg); } }
@media(max-width:600px) {
 .topbar { gap:16px; flex-wrap:wrap; }
 .brand-copy .brand-tagline { font-size:0.875rem; max-width:230px; }
 .brand-mark.brand-artwork { width:50px; height:50px; }
 .top-actions { width:100%; display:flex; justify-content:space-between; }
 .nav-button { font-size:0.875rem; }
 .onboarding { padding:22px 18px; margin:20px 0; }
 .welcome-heading { gap:12px; align-items:flex-start; }
 .welcome-tiger { width:72px; height:72px; }
 .welcome-levels { grid-template-columns:1fr; gap:10px; }
 .welcome-choice>span { min-height:76px; }
 .welcome-actions { flex-direction:column; align-items:stretch; }
 .trainer-top { padding:18px; }
 .trainer-meta { flex-wrap:wrap; gap:8px; }
 .trainer-body { padding:18px; min-height:300px; }
 .training-buddy { margin-bottom:12px; }
 .training-buddy .tiger { width:56px; height:56px; }
 .trainer-actions { padding:16px; flex-direction:column-reverse; align-items:stretch; gap:8px; }
 .trainer-actions .action-group { width:100%; flex-wrap:nowrap; }
 .trainer-actions .action-group>button { flex:1; padding-inline:12px; }
 .trainer-actions>.button-quiet { align-self:center; }
 .session-results { gap:10px; }
 .session-results>div { padding:16px 12px; }
 .complete-card .action-group { flex-direction:column; }
 .complete-card .action-group>button { width:100%; }
 .stop-copy p,.map-count,.game-pill { font-size:0.875rem; }
}
.cloud-dialog { width: min(560px, calc(100vw - 32px)); max-height: 90dvh; overflow-y: auto; }
.cloud-dialog form { display: grid; gap: 18px; margin: 22px 0; }
.cloud-dialog label { display: grid; gap: 8px; font-weight: 700; }
.cloud-dialog input:not([type="checkbox"]), .cloud-dialog select { width: 100%; box-sizing: border-box; font: inherit; padding: 12px 14px; border: 2px solid #e4deea; border-radius: 12px; background: white; color: #2f253c; }
.password-field-group { display:grid; gap:8px; }
.password-field { position:relative; }
.cloud-dialog .password-field input { padding-right:145px; }
.password-toggle { position:absolute; inset-block:5px; right:5px; border:0; border-radius:9px; padding:0 10px; background:#f8edf3; color:#802a58; font:inherit; font-size:14px; font-weight:700; cursor:pointer; }
.password-toggle:focus-visible { outline:2px solid #5634b9; outline-offset:2px; }
.cloud-dialog .cloud-checkbox { display: flex; align-items: start; gap: 12px; font-weight: 500; }
.cloud-checkbox input { width: 22px; height: 22px; flex-shrink: 0; accent-color: #e01b72; }
.cloud-dialog details { margin-top: 24px; }
.ranking-list { padding: 0; list-style: none; }
.ranking-list li { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 16px 12px; border-bottom: 1px solid #eee8f0; }
.ranking-list .is-me { background: #fff0f7; border-radius: 14px; }
.cloud-dialog button:disabled { opacity: .55; cursor: wait; }
@media(max-width:700px) { .top-actions { flex-wrap: wrap; } .cloud-dialog { padding: 20px; } }

.feedback-card{padding:18px 0;border-bottom:1px solid #e9e1ee}.feedback-note,.feedback-context{white-space:pre-wrap;overflow-wrap:anywhere}.feedback-date{font-size:.8rem;color:#756b80}.feedback-card details{margin-bottom:16px}.report-actions [aria-pressed="true"]{background:#ffe4f2;color:#bd0864}

.method-top{display:flex;justify-content:space-between;align-items:center;gap:12px}.method-top .eyebrow{margin:0;font-size:.875rem}.method-dots{display:flex;gap:8px;margin:18px 0 30px}.method-dots span{height:6px;flex:1;background:#eee7ef;border-radius:9px}.method-dots .is-active{background:var(--pink)}.method-body{font-size:1.125rem;line-height:1.65}.method-example{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:22px;background:#fff0f7;border:1px solid #ffd4e8;border-radius:20px;font-size:1.125rem;overflow-wrap:anywhere}.method-example strong{color:#b50a5f}.method-intro .welcome-actions{margin-top:28px}.method-level{margin-top:18px}.method-intro h1:focus{outline:none}@media(max-width:540px){.method-intro .welcome-heading{flex-direction:column}.method-intro .method-example{padding:18px;font-size:1rem}.method-body{font-size:1rem}}

.account-identity{display:flex;align-items:center;gap:18px;margin:24px 0}.account-avatar{display:grid;place-items:center;flex-shrink:0;width:72px;height:72px;border-radius:24px;background:#fff0f7;font-size:2.4rem}.account-identity h3{font-size:1.5rem;margin:0 0 6px;overflow-wrap:anywhere}.account-identity p{margin:0 0 8px;overflow-wrap:anywhere;font-size:.875rem;color:#756b80}.account-signed-in{color:#286547;font-size:.875rem;font-weight:650}.account-ranking-state{font-size:1rem}#account-open{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(max-width:540px){.account-identity{gap:12px}.account-avatar{width:52px;height:52px;border-radius:18px;font-size:1.8rem}.account-identity>div{min-width:0}#account-open{max-width:160px}}
.cloud-dialog .avatar-picker{border:0;padding:0;margin:0;min-width:0}.cloud-dialog .avatar-picker legend{font-weight:700;margin-bottom:12px}.avatar-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.cloud-dialog .avatar-option{position:relative;display:block;cursor:pointer;font-weight:500}.cloud-dialog .avatar-option input[type=radio]{position:absolute;width:1px;height:1px;padding:0;opacity:0}.avatar-option-content{min-height:88px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;padding:8px 3px;border:2px solid #e4deea;border-radius:16px;background:#fff;text-align:center;font-size:.875rem;line-height:1.25}.avatar-option-icon{font-size:2rem;line-height:1.2}.avatar-option input:checked + .avatar-option-content{border-color:#e01b72;background:#fff0f7;box-shadow:0 0 0 1px #e01b72}.avatar-option input:focus-visible + .avatar-option-content{outline:3px solid #5634b9;outline-offset:3px}@media(max-width:380px){.avatar-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.admin-links{display:flex;flex-wrap:wrap;gap:10px}.learner-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:20px 0}.learner-metrics>div{padding:14px 9px;border-radius:14px;background:#fff0f7;display:grid;gap:3px}.learner-metrics strong{font-size:1.5rem;color:#bd0864}.learner-metrics span{font-size:.875rem;line-height:1.3}.learner-help{color:#675c70;font-size:.875rem;line-height:1.5}.cloud-dialog .learner-card{margin:0;border-bottom:1px solid #e9e1ee}.learner-card summary{display:grid;gap:4px;padding:17px 2px;cursor:pointer;overflow-wrap:anywhere}.learner-card summary span:last-child{font-size:.875rem;color:#675c70}.learner-email{font-weight:700}.learner-card-body{padding:0 4px 18px;font-size:.9rem;line-height:1.5}.learner-card-body p{overflow-wrap:anywhere}.learner-topics{list-style:none;padding:0;margin:0}.learner-topics li{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-top:1px solid #f0eaf2}.learner-topics li span:last-child{white-space:nowrap;color:#675c70}@media(max-width:540px){.learner-metrics{grid-template-columns:1fr 1fr}.learner-topics li{display:grid;gap:2px}.learner-topics li span:last-child{white-space:normal}}

/* Compact topic overview: readable copy without an empty hero card. */
.topic-hero { grid-template-columns:1fr; gap:20px; border:0; background:transparent; box-shadow:none; margin-bottom:28px; }
.topic-hero .topic-intro { min-height:0; padding:8px 140px 8px 0; border:0; border-radius:0; background:transparent!important; box-shadow:none; color:var(--ink); }
.topic-hero .topic-intro::after { display:none; }
.topic-hero .topic-intro .eyebrow { padding:0; border:0; border-radius:0; background:transparent; color:var(--pink); margin:0 0 10px; }
.topic-hero .topic-intro h1 { max-width:none; padding:0; margin:0 0 10px; color:var(--ink); font-size:clamp(26px,3vw,38px); }
.topic-hero .topic-intro > p:not(.eyebrow) { max-width:760px; padding:0; color:var(--muted); font-size:16px; line-height:1.55; }
.topic-hero .topic-facts { margin-top:14px; padding:0; gap:8px; }
.topic-hero .topic-facts span { min-height:28px; padding:0 10px; border:0; border-radius:8px; background:#eee9fa; color:#594776; font-size:12px; }
.topic-hero .topic-tiger { top:50%; bottom:auto; right:0; width:120px; height:120px; transform:translateY(-50%); }
.topic-hero .set-panel { display:grid; grid-template-columns:minmax(180px,1fr) minmax(260px,1.3fr); column-gap:28px; align-items:center; padding:22px 24px; border-radius:22px; box-shadow:0 4px 0 #e7dec8; }
.topic-hero .set-panel::before { display:none; }
.topic-hero .set-panel>.eyebrow { grid-column:1; margin:0 0 6px; font-size:11px; }
.topic-hero .set-panel>h2 { grid-column:1; font-size:22px; margin:0 0 4px; }
.topic-hero .set-panel>.muted { grid-column:1; margin:0; font-size:14px; }
.topic-hero .set-buttons { grid-column:2; grid-row:1/4; margin:0; }
.topic-hero .set-button { min-height:68px; padding:10px; }
.topic-hero .quick-links { grid-column:1/-1; margin-top:16px; gap:10px; }
@media(max-width:600px) {
 .topic-hero { gap:16px; }
 .topic-hero .topic-intro { padding:4px 0; }
 .topic-hero .topic-intro h1 { padding-right:80px; font-size:26px; }
 .topic-hero .topic-intro>.eyebrow { padding-right:80px; }
 .topic-hero .topic-tiger { top:0; right:0; width:76px; height:76px; transform:none; }
 .topic-hero .set-panel { grid-template-columns:1fr; padding:18px; }
 .topic-hero .set-buttons { grid-column:1; grid-row:auto; margin-top:16px; }
 .topic-hero .quick-links { flex-wrap:wrap; }
}

/* Short, optional language guidance for each topic. */
.topic-guide { margin: 0 0 28px; border: 1px solid #efc8da; border-radius: 20px; background: #fff; overflow: hidden; }
.topic-guide summary { cursor: pointer; padding: 20px 24px; color: #a50957; font-size: 1rem; line-height: 1.5; }
.topic-guide summary span { font-weight: 800; }
.topic-guide summary small { display: block; padding-top: 4px; color: var(--muted); font-size: .875rem; }
.topic-guide summary:focus-visible { outline: 3px solid var(--pink); outline-offset: -4px; border-radius: 18px; }
.topic-guide[open] summary { background: #fff3f8; }
.topic-guide-body { padding: 0 24px 24px; font-size: 1rem; line-height: 1.65; overflow-wrap: anywhere; }
.topic-guide-body > p { margin: 20px 0; max-width: 80ch; }
.topic-guide-examples { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.topic-guide-examples > div { border-left: 3px solid var(--pink); padding: 4px 0 4px 16px; }
.topic-guide-examples p { margin: 0; font-size: 1rem; }
.topic-guide-examples p[lang] { font-weight: 700; }
.topic-guide-examples p + p { margin-top: 6px; color: var(--muted); }
@media(max-width:640px) { .topic-guide-examples { grid-template-columns: 1fr; } .topic-guide summary { padding: 18px; } .topic-guide-body { padding: 0 18px 18px; } }

/* Usage and examples are visible on every learning card. */
.card-usage {
  width: 100%;
  margin-top: 20px;
  border: 1px solid #eadde5;
  border-radius: 14px;
  background: #fff;
  text-align: left;
  overflow-wrap: anywhere;
}
.card-usage-title {
  margin: 0;
  padding: 12px 16px;
  color: var(--pink-dark);
  font-size: 1rem;
  font-weight: 700;
  border-bottom: 1px solid #eadde5;
  background: #fff5fa;
  border-radius: 13px 13px 0 0;
}
.card-usage-content { padding: 16px; }
.card-usage-content h3 { margin: 0 0 8px; font-size: 0.875rem; color: #6b4b61; font-weight: 700; }
.flashcard-answer .card-usage-note { margin: 0 0 20px; font-size: 1rem; line-height: 1.65; color: #302530; }
.card-usage-examples { margin: 0; padding-left: 1.2em; font-size: 1rem; line-height: 1.65; color: #302530; }
.card-usage-examples li + li { margin-top: 10px; }
@media (max-width: 480px) {
  .card-usage-title, .card-usage-content { padding: 12px; }
}

/* Free beta and the upcoming full-access plan. */
.free-access-banner { display:flex; align-items:center; justify-content:space-between; gap:1.2rem; padding:1.2rem 1.5rem; margin:1rem 0; border:1px solid #efbed2; border-radius:20px; background:#fff3f8; }
.free-access-banner strong { color:#92244f; font-size:1rem; }
.free-access-banner p { margin:.35rem 0 0; font-size:.95rem; }
.free-access-banner button { flex-shrink:0; }
.access-page { max-width:1020px; margin:0 auto; padding:1rem 0 3rem; }
.access-heading { max-width:760px; margin:0 0 2rem; }
.access-heading h1 { font-size:clamp(1.8rem,4vw,2.8rem); line-height:1.15; margin:.6rem 0 1rem; }
.access-heading p { font-size:1.05rem; line-height:1.6; }
.access-grid { display:grid; grid-template-columns:1fr 1fr; gap:1.3rem; }
.access-card { display:flex; flex-direction:column; align-items:flex-start; padding:1.8rem; border:1px solid #ddd7df; border-radius:24px; background:#fff; min-width:0; }
.access-card-plus { border:2px solid #e01b72; background:#fff7fa; }
.access-label { font-size:.875rem; font-weight:700; color:#863053; }
.access-card h2 { font-size:1.5rem; margin:.8rem 0; }
.access-card .access-price { font-weight:800; font-size:1.5rem; line-height:1.3; margin:.3rem 0; }
.access-card p { line-height:1.5; }
.access-card ul { padding-left:1.2rem; margin:1.25rem 0; flex:1; }
.access-card li { padding:0 0 .75rem .2rem; font-size:1rem; line-height:1.5; }
.access-card button { width:100%; white-space:normal; }
.access-card button:disabled { opacity:1; color:#655e67; background:#eee8ec; border-color:#d9cdd4; cursor:default; }
.access-soon { font-size:.95rem; color:#61505a; }
.free-topic-list { margin-top:2.2rem; }
.free-topic-list > div { display:grid; gap:.65rem; }
.free-topic-list button { display:flex; gap:1rem; align-items:center; text-align:left; width:100%; padding:1rem 1.2rem; border:1px solid #e1dce3; background:#fff; border-radius:14px; font:inherit; cursor:pointer; }
.free-topic-list button strong { color:#a51653; min-width:2rem; }
.free-topic-list button span:last-child { margin-left:auto; font-size:.9rem; color:#655369; }
.premium-stop .map-node { background:#f0ecf2; color:#665b70; border-color:#d9d1de; box-shadow:0 4px 0 #d9d1de; }
.premium-stop .stop-caption { color:#9c2860; }
.premium-stop .stop-copy h3 { color:#62546d; }
.access-page button:focus-visible, .free-access-banner button:focus-visible { outline:3px solid #97134a; outline-offset:4px; }
@media(max-width:700px) {
  .access-grid { grid-template-columns:1fr; }
  .access-card { padding:1.3rem; }
  .free-access-banner { align-items:stretch; flex-direction:column; padding:1.1rem; }
  .free-topic-list button { flex-wrap:wrap; gap:.5rem; }
  .free-topic-list button span:last-child { width:100%; margin-left:2.5rem; }
}

/* Level milestones in the progress card. */
.progress-paws { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); margin-top:20px; padding-top:16px; border-top:1px solid var(--line); }
.progress-paw { position:relative; display:flex; flex-direction:column; align-items:center; gap:8px; min-width:0; min-height:64px; padding:4px 0; border:0; background:transparent; color:#777184; font-size:14px; cursor:pointer; }
.progress-paw:not(:last-child)::after { content:""; position:absolute; width:12px; height:2px; background:#d9d5e2; top:21px; right:-6px; }
.progress-paw-icon { display:block; width:34px; height:34px; background:#d4cfdf; mask:url("images/paw-print.svg") center / contain no-repeat; -webkit-mask:url("images/paw-print.svg") center / contain no-repeat; transform:rotate(-45deg); }
.progress-paw.is-current { color:var(--pink-dark); font-weight:800; }
.progress-paw.is-current .progress-paw-icon { background:var(--pink); }
.progress-paw:hover .progress-paw-icon { background:var(--pink); }
.progress-paw:focus-visible { outline:2px solid var(--pink); outline-offset:2px; border-radius:10px; }

/* Meaning cues disambiguate otherwise valid Polish combinations. */
.match-meaning { display:block; margin-top:6px; font-size:0.875rem; line-height:1.4; font-weight:400; color:#625668; }
.match-option.is-selected .match-meaning { color:inherit; }

/* Linked pairs retain a shared, visible identity until the batch is checked. */
.match-option.pair-color-0 { --pair-ink:#225a9b; --pair-fill:#eaf3ff; }
.match-option.pair-color-1 { --pair-ink:#7440a0; --pair-fill:#f4edff; }
.match-option.pair-color-2 { --pair-ink:#92510f; --pair-fill:#fff1db; }
.match-option.pair-color-3 { --pair-ink:#176d76; --pair-fill:#e3f6f7; }
.match-option.pair-color-4 { --pair-ink:#a13173; --pair-fill:#ffedf7; }
.match-option.is-linked,
.match-option.is-linked:hover:not(:disabled) {
  border-color:var(--pair-ink);
  background:var(--pair-fill);
  box-shadow:0 3px 0 var(--pair-ink);
}
.match-option .pair-status {
  display:block;
  width:fit-content;
  margin-bottom:8px;
  padding:3px 8px;
  border-radius:7px;
  font-size:.875rem;
  line-height:1.4;
  color:#fff;
  background:var(--pair-ink,#594086);
}
.match-option.is-selected {
  outline:3px solid #372247;
  outline-offset:3px;
}
.match-option.is-pair-correct:disabled {
  --pair-ink:#176b45;
  border-color:#258354;
  background:#e8f7ed;
  box-shadow:0 3px 0 #258354;
  color:#173f2b;
  opacity:1;
}
.match-option.is-pair-wrong:disabled {
  --pair-ink:#a72d46;
  border-color:#c74460;
  background:#fff0f3;
  box-shadow:0 3px 0 #c74460;
  color:#722238;
  opacity:1;
}
.match-inline-correction {
  display:block;
  margin-top:10px;
  padding-top:8px;
  border-top:1px solid #d993a3;
  font-size:.875rem;
  line-height:1.5;
  color:#722238;
}
.match-result-summary { font-weight:750; scroll-margin-top:180px; }
.match-explanations { margin-top:24px; }
@media(max-width:540px) {
  .mode-match .match-grid { gap:10px; }
  .mode-match .match-option { padding:10px; }
  .mode-match .match-column-title { font-size:.875rem; letter-spacing:0; }
}

/* Required source word and grammatical constraints for form practice. */
.form-source { margin:0 0 20px; font-size:1rem; line-height:1.5; color:var(--pink-dark); font-weight:650; }

/* Meaning-first practice: readable scenarios and a compact task constraint. */
.situation-scene { line-height: 1.65; overflow-wrap: anywhere; }
.situation-time { font-size: .9rem; line-height: 1.5; color: var(--text-muted, #646078); margin: .5rem 0 1rem; }
.form-source strong { font-weight: 650; }

/* Phone layout shared by every level and exercise. */
@media (max-width: 720px) {
  .topbar {
    position: relative;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px max(14px, env(safe-area-inset-right)) 16px max(14px, env(safe-area-inset-left));
  }
  .brand { min-width: 0; }
  .brand-copy .brand-tagline { display: block; max-width: 240px; font-size: 13px; }
  .brand-mark.brand-artwork { width: 44px; height: 44px; }
  .top-actions { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); width: 100%; gap: 8px; }
  .top-actions .nav-button { grid-column: span 2; min-width: 0; min-height: 44px; padding: 8px 6px; font-size: 14px; }
  .top-actions .nav-button:nth-child(n+4) { grid-column: span 3; }
  .top-actions .nav-button > span:not(.review-dot,.nav-count,.nav-icon) { display: inline; }
  .top-actions #account-open { max-width: 100%; }
  #app { width: auto; margin-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right)); padding: 18px 0 calc(32px + env(safe-area-inset-bottom)); }
  .trainer-shell, .trainer-body, .flashcard, .match-column, .token-bank, .token-area { min-width: 0; }
  .trainer-shell { border-radius: 20px; }
  .trainer-top { padding: 16px; }
  .trainer-meta { flex-wrap: wrap; gap: 8px; }
  .trainer-body { padding: 18px 14px; min-height: 0; }
  .training-buddy { min-height: 48px; margin-bottom: 14px; }
  .training-buddy .tiger { width: 48px; height: 48px; }
  .flashcard { padding: 0 0 16px; }
  .flashcard .prompt-large { font-size: clamp(22px, 6vw, 30px); }
  .trainer-actions { padding: 16px 14px; flex-direction: column-reverse; align-items: stretch; gap: 12px; }
  .trainer-actions .action-group { display: flex; width: 100%; flex-wrap: wrap; gap: 10px; }
  .trainer-actions .action-group > button { flex: 1 1 120px; min-width: 0; min-height: 48px; padding: 12px; white-space: normal; line-height: 1.4; }
  .trainer-actions > .button-quiet { align-self: center; min-height: 44px; }
  .mode-match .match-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .mode-match .match-option { width: 100%; min-width: 0; padding: 12px 9px; font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
  .mode-match .match-column-title { font-size: 14px; letter-spacing: 0; overflow-wrap: anywhere; }
  .match-option .pair-status { padding: 3px 6px; font-size: 13px; }
  .match-inline-correction, .match-meaning { font-size: 14px; }
  .match-result-summary { scroll-margin-top: 16px; }
  .option-button, .token { min-width: 0; max-width: 100%; min-height: 48px; white-space: normal; line-height: 1.5; }
  .token { padding-block: 8px; }
  .answer-input, .cloud-dialog input, .cloud-dialog select, .item-report textarea { min-width: 0; max-width: 100%; font-size: 16px; }
  .item-report, .cloud-dialog { box-sizing: border-box; width: calc(100% - 24px); max-width: 560px; max-height: calc(100dvh - 32px); padding: 20px 16px; overflow-y: auto; overflow-wrap: anywhere; }
  .report-actions { flex-wrap: wrap; }
  .report-actions button { min-height: 44px; max-width: 100%; white-space: normal; }
  .journey-stop { gap: 14px; margin-left: 0; }
  .journey-stop:nth-child(4n+2), .journey-stop:nth-child(4n+3) { margin-left: 24px; }
  .stop-copy h3 { overflow-wrap: anywhere; }
  .stop-copy p { font-size: 14px; }
  button, summary { touch-action: manipulation; }
}
@media (max-width: 360px) {
  .top-actions .nav-icon, .top-actions .review-dot { display: none; }
  .journey-stop:nth-child(4n+2), .journey-stop:nth-child(4n+3) { margin-left: 0; }
}
html[lang="en"] .token-area.is-empty::before { content: "Tap the words in the right order"; }
html[lang="uk"] .token-area.is-empty::before { content: "Натискайте слова у правильному порядку"; }

/* Keep the brand and navigation in separate columns as labels change language. */
.topbar { display:grid; grid-template-columns:210px minmax(0,1fr); gap:16px 24px; }
.brand, .brand-copy { min-width:0; }
.brand { width:100%; }
.brand-copy .brand-tagline { max-width:100%; overflow-wrap:break-word; }
.top-actions { min-width:0; flex-wrap:wrap; justify-content:flex-end; }
@media (min-width:721px) {
  .top-actions { gap:6px; }
  .top-actions .nav-button { padding-inline:12px; }
}
@media (min-width:721px) and (max-width:1080px) {
  .topbar { grid-template-columns:1fr; }
  .top-actions { justify-content:flex-start; }
}
@media (max-width:720px) {
  .topbar { display:flex; }
  .brand { flex:1 1 100%; }
  .top-actions { justify-content:initial; }
}

.app-footer { display:flex; justify-content:flex-end; padding:12px 24px 28px; }
.app-footer .text-button { color:var(--muted); font-size:14px; }
.account-language { margin-top:24px; padding-top:12px; border-top:1px solid var(--line); }
.language-dialog { box-sizing:border-box; width:min(440px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); overflow-y:auto; border:1px solid var(--line); border-radius:24px; padding:28px; color:var(--ink); background:#fff; box-shadow:0 24px 70px rgba(39,24,53,.2); text-align:center; }
.language-dialog::backdrop { background:rgba(34,22,47,.55); }
.language-mark { font-size:32px; line-height:1; }
.language-dialog h2 { margin:14px 0 8px; font-size:clamp(20px,5vw,25px); line-height:1.25; }
.language-help { margin:0 0 22px; color:var(--muted); font-size:14px; line-height:1.5; }
.language-options { display:grid; gap:10px; }
.language-options button { min-height:52px; border:2px solid var(--line); border-radius:14px; background:#fff; color:var(--ink); font:inherit; font-weight:700; cursor:pointer; }
.language-options button:hover,.language-options button[aria-pressed="true"] { border-color:var(--pink); background:#fff0f7; }
.language-options button:focus-visible,.language-close:focus-visible { outline:3px solid var(--pink); outline-offset:2px; }
.language-close { position:absolute; top:12px; right:12px; min-width:42px; min-height:42px; border:0; background:transparent; color:var(--muted); cursor:pointer; }
.language-dialog.is-first-run .language-close { display:none; }
.auth-locked .cloud-dialog .account-close { display:none; }
@media (max-width:720px) { .app-footer { padding-inline:14px; } .language-dialog { padding:24px 18px; } }
