:root {
  color-scheme: light;
  --ink: #123b32;
  --ink-soft: #315c50;
  --muted: #66736e;
  --paper: #fff9ed;
  --surface: #ffffff;
  --surface-elevated: #fffef9;
  --surface-warm: #fff0b7;
  --surface-sunken: #f3f9ef;
  --leaf-50: #eaf7e8;
  --leaf-100: #d8f1d5;
  --leaf-300: #7ad97e;
  --leaf-500: #28a83e;
  --leaf-600: #168e36;
  --leaf-700: #08752f;
  --leaf-800: #064d26;
  --sun-100: #fff0b7;
  --sun-300: #ffc928;
  --sun-500: #e9a900;
  --sun-700: #8b6200;
  --blue-100: #e9f0ff;
  --blue-500: #397dff;
  --sky-100: #e6f7ff;
  --sky-500: #1cb0f6;
  --sky-700: #086b9b;
  --coral-100: #ffe9e4;
  --coral-500: #e84f4f;
  --line: #d9e8d8;
  --border: #d9e8d8;
  --primary: #08752f;
  --primary-100: #eaf7e8;
  --text-muted: #66736e;
  --shadow: 0 22px 52px rgba(8, 117, 47, 0.14);
  --shadow-soft: 0 10px 28px rgba(18, 59, 50, 0.09);
  --shadow-sm: 0 5px 16px rgba(18, 59, 50, 0.08);
  --radius: 16px;
  --tap: 52px;
  --content: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(238, 251, 221, 0.92) 0, rgba(255, 253, 241, 0.96) 420px),
    var(--paper);
  font-family: Nunito, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    radial-gradient(circle at 12px 12px, rgba(90, 170, 36, 0.13) 2px, transparent 2.5px),
    radial-gradient(circle at 38px 38px, rgba(244, 176, 0, 0.16) 2px, transparent 2.5px);
  background-size: 52px 52px;
  opacity: 0.45;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

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

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 20;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--ink);
  color: white;
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(223, 232, 207, 0.86);
  background: rgba(255, 253, 241, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: var(--tap);
  color: var(--ink);
  text-decoration: none;
}

.brand-mark,
.mobile-tabbar span,
.topic-icon,
.kid-avatar,
.tile-symbol {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: var(--radius);
  font-weight: 900;
}

.brand-mark {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--leaf-500), var(--sun-300));
  color: white;
  box-shadow: var(--shadow-soft);
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 50%;
}

.brand-text {
  font-size: 1.02rem;
  font-weight: 900;
  white-space: nowrap;
}

.site-nav {
  display: none;
}

.page-shell {
  padding-bottom: 86px;
}

.section-band,
.section-panel {
  width: min(var(--content), calc(100% - 28px));
  margin-inline: auto;
}

.hero {
  display: grid;
  gap: 24px;
  min-height: calc(100svh - 154px);
  align-items: center;
  padding-block: 32px 22px;
}

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

.eyebrow {
  margin: 0 0 9px;
  color: var(--leaf-700);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 14px;
  font-size: clamp(2.35rem, 17vw, 4.8rem);
  line-height: 0.96;
  font-weight: 900;
}

h2 {
  margin-bottom: 8px;
  font-size: 1.25rem;
  line-height: 1.12;
  font-weight: 900;
}

p,
small,
span {
  overflow-wrap: anywhere;
}

p {
  color: var(--muted);
  line-height: 1.55;
}

.lead {
  max-width: 620px;
  margin-bottom: 22px;
  font-size: 1.08rem;
}

.lead.compact {
  max-width: 700px;
  margin-bottom: 0;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  min-width: 120px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius);
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:active {
  transform: translateY(1px) scale(0.99);
}

.button-primary {
  background: linear-gradient(135deg, var(--leaf-500), var(--leaf-700));
  color: white;
  box-shadow: var(--shadow-soft);
}

.button-soft {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--leaf-700);
}

.hero-board {
  position: relative;
  min-height: 260px;
  border: 1px solid rgba(223, 232, 207, 0.9);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 240, 168, 0.82), rgba(216, 244, 183, 0.92)),
    var(--surface-warm);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-board::before,
.hero-board::after {
  position: absolute;
  content: "";
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
}

.hero-board::before {
  width: 72px;
  height: 72px;
  right: 24px;
  top: 24px;
}

.hero-board::after {
  width: 110px;
  height: 22px;
  left: 24px;
  bottom: 32px;
}

.letter-card {
  position: absolute;
  display: grid;
  place-items: center;
  width: 88px;
  aspect-ratio: 1;
  border: 4px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--radius);
  color: white;
  font-size: 2.4rem;
  font-weight: 900;
  box-shadow: var(--shadow-soft);
}

.card-a {
  left: 24px;
  top: 26px;
  background: var(--leaf-500);
  transform: rotate(-7deg);
}

.card-b {
  right: 48px;
  top: 104px;
  background: var(--sun-500);
  transform: rotate(8deg);
}

.card-c {
  left: 42%;
  bottom: 36px;
  background: var(--blue-500);
  transform: rotate(-3deg);
}

.mini-progress {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 18px;
  display: flex;
  gap: 8px;
}

.mini-progress span {
  height: 8px;
  flex: 1;
  border-radius: 999px;
  background: rgba(47, 116, 27, 0.16);
}

.mini-progress span:first-child,
.mini-progress span:nth-child(2) {
  background: var(--leaf-500);
}

.section-panel {
  margin-block: 22px;
}

.page-heading {
  padding-top: 28px;
}

.quick-paths,
.card-grid,
.word-grid,
.learning-stage,
.progress-grid {
  display: grid;
  gap: 14px;
}

.feature-tile,
.topic-card,
.kid-card,
.practice-card,
.stat-card,
.word-card,
.empty-state,
.auth-panel {
  border: 1px solid rgba(223, 232, 207, 0.95);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.feature-tile,
.topic-card,
.kid-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 16px;
  color: var(--ink);
  text-decoration: none;
}

.feature-tile strong,
.topic-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.08rem;
  font-weight: 900;
}

.feature-tile small,
.topic-card small,
.kid-card p,
.word-body small,
.word-body span {
  color: var(--muted);
  line-height: 1.35;
}

.tile-green {
  background: linear-gradient(135deg, #ffffff, var(--leaf-50));
}

.tile-yellow {
  background: linear-gradient(135deg, #ffffff, var(--sun-100));
}

.tile-blue {
  background: linear-gradient(135deg, #ffffff, var(--blue-100));
}

.tile-symbol,
.topic-icon,
.kid-avatar {
  width: 54px;
  height: 54px;
}

.tile-symbol {
  background: var(--leaf-500);
  color: white;
}

.topic-icon {
  background: var(--sun-300);
  color: var(--ink);
}

.kid-avatar {
  background: var(--leaf-100);
  color: var(--leaf-700);
}

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

.word-card {
  min-width: 0;
  overflow: hidden;
}

.word-media {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--leaf-50), var(--sun-100));
}

.word-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.word-media span {
  color: var(--leaf-700);
  font-size: 2.25rem;
  font-weight: 900;
}

.word-body {
  display: grid;
  gap: 3px;
  padding: 12px;
}

.word-body strong {
  font-size: 1.08rem;
  font-weight: 900;
}

.practice-card,
.stat-card,
.empty-state,
.auth-panel {
  padding: 18px;
}

.practice-main {
  background: linear-gradient(135deg, var(--leaf-50), var(--sun-100));
}

.practice-badge {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: var(--radius);
  background: var(--leaf-500);
  color: white;
  font-size: 0.82rem;
  font-weight: 900;
}

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

.stat-card {
  display: grid;
  gap: 4px;
  min-height: 116px;
  align-content: center;
  background: var(--blue-100);
}

.stat-card.yellow {
  background: var(--sun-100);
}

.stat-card.green {
  background: var(--leaf-100);
}

.stat-card strong {
  font-size: 2rem;
  font-weight: 900;
}

.stat-card span {
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.2;
}

.empty-state {
  grid-column: 1 / -1;
  background: rgba(255, 255, 255, 0.74);
}

.empty-state strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.12rem;
  font-weight: 900;
}

.narrow {
  max-width: 520px;
}

.form-stack {
  display: grid;
  gap: 14px;
}

.form-stack p {
  margin: 0;
}

label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  min-height: var(--tap);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: white;
  color: var(--ink);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--leaf-500);
  box-shadow: 0 0 0 4px rgba(90, 170, 36, 0.14);
}

.mobile-tabbar {
  position: fixed;
  right: 10px;
  bottom: 10px;
  left: 10px;
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(223, 232, 207, 0.96);
  border-radius: var(--radius);
  background: rgba(255, 253, 241, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.mobile-tabbar a {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 0;
  min-height: 54px;
  padding: 5px 2px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-decoration: none;
}

.mobile-tabbar span {
  width: 26px;
  height: 26px;
  background: var(--leaf-100);
  color: var(--leaf-700);
  font-size: 0.78rem;
}

@media (hover: hover) {
  .button:hover,
  .feature-tile:hover,
  .topic-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
  }
}

@media (min-width: 640px) {
  .section-band,
  .section-panel {
    width: min(var(--content), calc(100% - 48px));
  }

  .word-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .card-grid,
  .quick-paths,
  .learning-stage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .practice-main {
    grid-column: span 2;
  }
}

@media (min-width: 860px) {
  .site-header {
    min-height: 76px;
    padding: 12px 32px;
  }

  .site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 12px;
    border-radius: var(--radius);
    color: var(--ink-soft);
    font-weight: 900;
    text-decoration: none;
  }

  .site-nav a:hover {
    background: var(--leaf-50);
    color: var(--leaf-700);
  }

  .site-nav .nav-cta {
    position: relative;
    border: 1px solid rgba(136, 231, 62, 0.65);
    background: linear-gradient(135deg, rgba(42, 113, 37, 0.54), rgba(6, 60, 42, 0.7));
    color: #fff06a;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 0 18px rgba(100, 221, 56, 0.22);
    isolation: isolate;
    overflow: visible;
    animation: navBorderGlow 2.8s ease-in-out infinite;
  }

  .site-nav .nav-cta::after {
    position: absolute;
    left: 50%;
    bottom: -3px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff47b;
    box-shadow: 0 0 9px 3px rgba(239, 255, 89, 0.75);
    content: "";
    transform: translateX(-50%);
    animation: navSparkPulse 1.45s ease-in-out infinite;
  }

  .site-nav .nav-cta::before {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fffbd0;
    box-shadow: 0 0 5px #fff, 0 0 12px 4px #cfff56;
    content: "";
    offset-path: inset(-3px round 999px);
    offset-distance: 0%;
    animation: navSparkTravel 3.6s linear infinite;
  }

  @keyframes navBorderGlow {
    0%, 100% {
      border-color: rgba(136, 231, 62, 0.55);
      box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 0 10px rgba(100, 221, 56, 0.14);
    }
    50% {
      border-color: rgba(218, 247, 83, 0.92);
      box-shadow: inset 0 1px rgba(255, 255, 255, 0.14), 0 0 23px rgba(124, 235, 60, 0.38);
    }
  }

  @keyframes navSparkTravel {
    to { offset-distance: 100%; }
  }

  @keyframes navSparkPulse {
    0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(0.7); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.35); }
  }

  .desktop-more-menu {
    position: relative;
  }

  .desktop-more-menu summary {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: var(--radius);
    color: var(--ink-soft);
    font-weight: 900;
    cursor: pointer;
    list-style: none;
  }

  .desktop-more-menu summary::-webkit-details-marker {
    display: none;
  }

  .desktop-more-menu summary:hover,
  .desktop-more-menu.active summary,
  .desktop-more-menu[open] summary {
    background: var(--leaf-50);
    color: var(--leaf-700);
  }

  .desktop-more-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 150;
    display: grid;
    width: 250px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 14px 34px rgba(12, 58, 45, 0.18);
  }

  .site-nav .desktop-more-panel a {
    gap: 11px;
    min-height: 60px;
    padding: 8px 10px;
  }

  .desktop-more-panel img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 11px;
  }

  .desktop-more-panel span {
    display: grid;
    gap: 1px;
  }

  .desktop-more-panel small {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
  }

  .mobile-tabbar {
    display: none;
  }

  .page-shell {
    padding-bottom: 0;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
    min-height: calc(100svh - 96px);
    padding-block: 52px 36px;
  }

  .quick-paths,
  .card-grid,
  .learning-stage {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .practice-main {
    grid-column: span 1;
  }
}

@media (min-width: 1120px) {
  .hero-board {
    min-height: 390px;
  }

  .letter-card {
    width: 108px;
  }
}

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


.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 56px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--radius);
  background: var(--leaf-50);
  color: var(--leaf-700);
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle:focus-visible {
  outline: 3px solid rgba(90, 170, 36, 0.28);
  outline-offset: 2px;
}

.eye-icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.eye-pupil {
  fill: currentColor;
  stroke: none;
}

.eye-slash {
  opacity: 0;
  stroke-width: 2.2;
  transition: opacity 160ms ease;
}

.password-toggle[aria-pressed="true"] .eye-slash {
  opacity: 1;
}

.auth-switch {
  margin: 18px 0 0;
  text-align: center;
}

.auth-switch a {
  color: var(--leaf-700);
  font-weight: 900;
}

.form-errors,
.errorlist {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--coral-100);
  color: #7a2d15;
  list-style-position: inside;
}

.help-text {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}


.split-heading {
  display: grid;
  gap: 16px;
  align-items: end;
}

.profile-card {
  align-items: flex-start;
}

.profile-card-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.profile-card-body h2,
.profile-card-body p {
  margin: 0;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-meta span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 9px;
  border-radius: var(--radius);
  background: var(--leaf-50);
  color: var(--leaf-700);
  font-size: 0.82rem;
  font-weight: 900;
}

.completion-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(90, 170, 36, 0.14);
}

.completion-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--leaf-500), var(--sun-300));
}

.completion-note,
.profile-hint {
  font-size: 0.9rem;
}

.profile-hint {
  color: #8a5d00;
}

.text-link {
  color: var(--leaf-700);
  font-weight: 900;
}

.narrow-wide {
  max-width: 920px;
}

.learner-form fieldset {
  margin: 0;
  padding: 0 0 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.learner-form fieldset:last-of-type {
  border-bottom: 0;
}

.learner-form legend {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 900;
}

.section-help {
  margin-bottom: 14px;
  font-size: 0.95rem;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-field {
  margin: 0;
}

.form-actions {
  padding-top: 4px;
}

@media (min-width: 720px) {
  .split-heading {
    grid-template-columns: minmax(0, 1fr) auto;
  }

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

  .form-field:has(textarea),
  .form-field:has(input[type="file"]) {
    grid-column: 1 / -1;
  }
}
.filter-row {
  display: grid;
  gap: 8px;
  max-width: 420px;
}

.block-grid {
  display: grid;
  gap: 14px;
}

.block-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(223, 232, 207, 0.95);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.block-card.is-open {
  background: linear-gradient(135deg, #ffffff, var(--leaf-50));
  border-color: var(--leaf-300);
}

.block-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--sun-300);
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 900;
}

.block-copy {
  display: grid;
  gap: 4px;
}

.block-copy strong {
  font-size: 1.16rem;
  font-weight: 900;
}

.block-copy span,
.block-copy p {
  margin: 0;
  color: var(--muted);
}

.block-price {
  color: var(--leaf-700);
  font-size: 1.08rem;
  font-weight: 900;
}

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

.payment-actions .button {
  min-width: 0;
  padding-inline: 10px;
}

.access-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  width: fit-content;
  padding: 0 12px;
  border-radius: var(--radius);
  background: var(--leaf-500);
  color: white;
  font-weight: 900;
}

.payment-requisites {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface-warm);
}

.payment-requisites span {
  color: var(--muted);
  font-size: 0.86rem;
}

.payment-requisites strong {
  font-size: 1.08rem;
  font-weight: 900;
}

@media (min-width: 720px) {
  .block-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .block-card {
    grid-template-columns: auto 1fr;
    align-items: start;
  }

  .block-price,
  .payment-actions,
  .access-pill {
    grid-column: 2;
  }
}

@media (min-width: 980px) {
  .block-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.message-stack {
  display: grid;
  gap: 8px;
  width: min(var(--content), calc(100% - 28px));
  margin: 14px auto 0;
}

.message {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-soft);
  box-shadow: var(--shadow-soft);
}

.message-success {
  border-color: var(--leaf-300);
  background: var(--leaf-50);
}

.message-error {
  border-color: var(--coral-500);
  background: var(--coral-100);
}

.message-info {
  border-color: var(--blue-500);
  background: var(--blue-100);
}
.word-card-locked {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.66);
}

.word-card-locked .word-media {
  filter: grayscale(0.35);
  opacity: 0.72;
}

.lock-link {
  color: var(--leaf-700);
  font-weight: 900;
  text-decoration: none;
}

.payment-nudge {
  margin-bottom: 14px;
}
.payment-toolbar {
  display: grid;
  gap: 14px;
}

.block-price small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
}

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

.balance-layout {
  display: grid;
  gap: 14px;
}

.topup-actions {
  margin-top: 10px;
}

.topup-actions input {
  flex: 1 1 170px;
}

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

.ledger-row {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.ledger-row span {
  color: var(--muted);
  font-size: 0.88rem;
}

@media (min-width: 860px) {
  .payment-toolbar {
    grid-template-columns: 220px 1fr;
    align-items: end;
  }

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

.account-actions {
  margin-block: 18px;
}

.mini-list {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.mini-list a {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--leaf-700);
  text-decoration: none;
  background: var(--leaf-50);
}

@media (max-width: 620px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}
.copy-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--tap);
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--leaf-50);
  color: var(--leaf-700);
  cursor: pointer;
}

.icon-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
}

.copy-status {
  display: block;
  min-height: 20px;
  color: var(--leaf-700);
  font-weight: 900;
}
.compact-requisites {
  margin-bottom: 14px;
}

.payment-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  margin: 14px 0 4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.payment-divider::before,
.payment-divider::after {
  height: 1px;
  background: var(--line);
  content: "";
}
.qr-payment-box {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 12px 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-warm);
  text-align: center;
}

.qr-payment-box img {
  width: min(220px, 100%);
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: var(--radius);
  background: white;
}

.qr-payment-box span {
  color: var(--muted);
}


.profile-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.profile-switcher label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.profile-switcher select {
  max-width: 140px;
  min-height: 32px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 900;
  outline: none;
}

.demo-access-card {
  display: grid;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(223, 232, 207, 0.95);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 240, 168, 0.92), rgba(216, 244, 183, 0.9));
  box-shadow: var(--shadow-soft);
}

.demo-access-card h2,
.demo-access-card p {
  margin: 0;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.link-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--leaf-700);
  font-weight: 900;
  text-decoration: underline;
  cursor: pointer;
}

.active-profile-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border-radius: var(--radius);
  background: var(--sun-300);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 900;
}

@media (min-width: 760px) {
  .demo-access-card {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 22px 24px;
  }
}

.selected-profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin-top: 8px;
  padding: 0 12px 0 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-soft);
  font-weight: 900;
}

.selected-profile-chip span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  background: var(--leaf-100);
  color: var(--leaf-700);
}

.site-header > .profile-switcher {
  margin-left: auto;
}

@media (max-width: 520px) {
  .brand-text {
    display: none;
  }

  .profile-switcher {
    max-width: calc(100vw - 92px);
  }

  .profile-switcher select {
    max-width: 96px;
  }
}

.block-summary-grid,
.block-word-list {
  display: grid;
  gap: 14px;
}

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

.block-word-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(223, 232, 207, 0.95);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.compact-media {
  min-height: 120px;
  border-radius: var(--radius);
  overflow: hidden;
}

.block-word-body {
  display: grid;
  gap: 14px;
}

.block-word-title {
  display: flex;
  gap: 10px;
  align-items: center;
}

.block-word-title h2,
.block-word-title small,
.word-detail-grid p,
.word-detail-grid small {
  margin: 0;
}

.order-pill {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: var(--sun-300);
  color: var(--ink);
  font-weight: 900;
}

.word-detail-grid {
  display: grid;
  gap: 12px;
}

.word-detail-grid > div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--leaf-50);
}

.word-detail-grid strong {
  color: var(--leaf-700);
}

.word-detail-grid p,
.word-detail-grid small {
  color: var(--muted);
  line-height: 1.35;
}

.related-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.related-chip-list span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 9px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--leaf-700);
  font-size: 0.86rem;
  font-weight: 900;
}

.access-pill {
  text-decoration: none;
}

@media (max-width: 620px) {
  .block-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 760px) {
  .block-word-card {
    grid-template-columns: 130px minmax(0, 1fr);
  }

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

.hamyon-selection-bar {
  display: grid;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(223, 232, 207, 0.95);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 240, 168, 0.88), rgba(216, 244, 183, 0.92));
  box-shadow: var(--shadow-soft);
}

.hamyon-selection-bar h2,
.hamyon-selection-bar p {
  margin: 0;
}

.hamyon-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  width: fit-content;
  padding: 0 14px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--leaf-700);
  font-weight: 900;
}

.hamyon-submit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 2px;
}

.word-select-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 34px;
  padding: 0 10px;
  border-radius: var(--radius);
  background: var(--leaf-100);
  color: var(--leaf-700);
  font-weight: 900;
  cursor: pointer;
}

.word-select-control input {
  width: 18px;
  height: 18px;
  margin: 0 8px 0 0;
  accent-color: var(--leaf-500);
}

.block-word-card.is-already-owned {
  border-color: rgba(90, 170, 36, 0.38);
}

.learner-status-wallet,
.learner-status-old_wallet {
  background: linear-gradient(135deg, #ffffff, var(--sun-100));
}

.learner-status-safe {
  background: linear-gradient(135deg, #ffffff, var(--blue-100));
}

.learner-status-safe .word-select-control {
  background: var(--blue-100);
  color: #17627e;
}

@media (min-width: 760px) {
  .hamyon-selection-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 20px 22px;
  }
}

.hamyon-board {
  display: grid;
  gap: 14px;
}

.hamyon-main-card {
  display: grid;
  gap: 16px;
}

.compact-split {
  align-items: center;
}

.hamyon-word-grid,
.review-grid {
  display: grid;
  gap: 10px;
}

.mini-word-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 70px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff, var(--leaf-50));
}

.mini-word-card > span,
.mini-word-card > img {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  background: var(--leaf-500);
  color: white;
  font-weight: 900;
  object-fit: cover;
}

.mini-word-card div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.mini-word-card strong,
.mini-word-card small {
  overflow-wrap: anywhere;
}

.mini-word-card small {
  color: var(--muted);
}

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

.review-row {
  display: grid;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.review-row.due {
  border-color: var(--sun-300);
  background: linear-gradient(135deg, #ffffff, var(--sun-100));
}

.review-row div {
  display: grid;
  gap: 3px;
}

.review-row span {
  color: var(--muted);
}


.review-map-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 132px;
}

.review-map-card.completed {
  border-color: rgba(90, 170, 36, 0.55);
  background: linear-gradient(135deg, #eefddc, #ffffff);
}

.review-map-card.is-due {
  border-color: var(--sun-500);
  background: linear-gradient(135deg, #fff3a4, #ffffff);
}

.review-map-card.scheduled:not(.is-due) {
  background: linear-gradient(135deg, #ffffff, #f4faec);
}

.review-state-badge {
  display: inline-flex;
  width: max-content;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--leaf-100);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
}

.review-state-badge.completed {
  background: var(--leaf-500);
  color: white;
}

.review-state-badge.upcoming {
  background: var(--sun-100);
}

.compact-empty {
  padding: 14px;
  box-shadow: none;
}

@media (min-width: 760px) {
  .hamyon-board {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  }

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

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

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


.mini-word-card {
  color: inherit;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.mini-word-card:hover {
  transform: translateY(-2px);
  border-color: rgba(90, 170, 36, 0.5);
  box-shadow: var(--shadow-soft);
}

.mini-word-card em {
  color: var(--leaf-700);
  font-size: 0.84rem;
  font-style: normal;
  font-weight: 900;
}

.mini-word-card.studied {
  background: linear-gradient(135deg, #ffffff, var(--blue-100));
}

.mini-word-card.studied > span {
  background: #3da1ce;
}

.word-study-hero {
  display: grid;
  gap: 16px;
  align-items: end;
}

.word-transcription {
  margin-top: -8px;
  color: var(--muted);
  font-size: clamp(1.15rem, 4vw, 1.6rem);
  font-weight: 900;
}

.study-layout,
.study-info-grid {
  display: grid;
  gap: 14px;
}

.study-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.primary-study-card {
  background: linear-gradient(135deg, #ffffff, var(--leaf-50));
}

.study-media {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1px solid rgba(90, 170, 36, 0.22);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--leaf-50), var(--leaf-100));
  overflow: hidden;
}

.study-media img {
  width: 100%;
  height: 100%;
  max-height: 340px;
  object-fit: contain;
}

.study-media span {
  display: grid;
  place-items: center;
  width: min(45vw, 180px);
  aspect-ratio: 1;
  border: 8px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-lg);
  background: var(--leaf-500);
  color: white;
  font-size: clamp(4.2rem, 22vw, 8rem);
  font-weight: 900;
  transform: rotate(-5deg);
}

.study-word-body {
  display: grid;
  gap: 12px;
}

.study-word-body h2 {
  font-size: clamp(2.4rem, 13vw, 5rem);
  line-height: 0.95;
}

.icon-text-button,
.sound-pill {
  width: fit-content;
  border: 1px solid rgba(90, 170, 36, 0.28);
  border-radius: 999px;
  background: var(--leaf-50);
  color: var(--leaf-800);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.icon-text-button {
  padding: 12px 16px;
}

.sound-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  font-size: 0.86rem;
}

.sound-pill .speaker-icon {
  width: 16px;
  height: 16px;
}

.translation-card,
.study-list-item,
.related-chip {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--leaf-600);
  background: var(--leaf-500);
  color: white;
}

.translation-card strong {
  font-size: 1.35rem;
  color: white;
}

.translation-card p,
.study-card p,
.study-list-item span,
.related-chip span,
.muted-text {
  color: var(--muted);
}

.translation-card p,
.study-list-item span,
.study-list-item small,
.related-chip span,
.translation-card .muted-pronounce,
.study-list-item .muted-pronounce,
.related-chip .muted-pronounce {
  color: rgba(255, 255, 255, 0.9);
}

.muted-card {
  background: var(--leaf-500);
  color: white;
}

.study-animation {
  width: 100%;
  border-radius: var(--radius);
}

.study-progress-strip {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--leaf-100);
}

.study-progress-strip span {
  display: block;
  width: calc((var(--step) / var(--total)) * 100%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--leaf-500), var(--leaf-700));
}

.full-width {
  width: 100%;
}

.study-list,
.related-chip-grid {
  display: grid;
  gap: 10px;
}

.other-meanings-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.other-meanings-panel > h2 {
  margin: 0 0 10px;
  font-size: clamp(1.2rem, 3vw, 1.55rem);
}

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

.other-meaning-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 60px;
  padding: 4px 2px;
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  transition: background 0.16s ease, transform 0.16s ease;
}

.other-meaning-card:hover,
.other-meaning-card:focus-visible {
  background: var(--leaf-50);
  transform: translateX(2px);
}

.other-meaning-card:focus-visible {
  outline: 3px solid rgba(90, 170, 36, 0.35);
  outline-offset: 2px;
}

.other-meaning-image {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: var(--leaf-50);
  color: var(--leaf-700);
  font-size: 1.3rem;
  font-weight: 900;
}

.other-meaning-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.other-meaning-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.other-meaning-copy strong {
  overflow-wrap: anywhere;
}

.other-meaning-copy small {
  color: var(--muted);
}

.other-meaning-chevron {
  color: var(--leaf-700);
  font-size: 2rem;
  line-height: 1;
}

.study-list-item strong,
.related-chip strong {
  overflow-wrap: anywhere;
}

@media (min-width: 760px) {
  .word-study-hero {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .study-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
    align-items: start;
  }

  .primary-study-card {
    grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  }

  .study-info-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
}


.wallet-sticky-counter {
  position: sticky;
  top: 76px;
  z-index: 9;
  display: grid;
  width: min(var(--content), calc(100% - 28px));
  gap: 8px;
  align-items: center;
  margin: -10px auto 16px;
  padding: 10px 12px;
  border: 1px solid rgba(90, 170, 36, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 255, 245, 0.96);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.wallet-sticky-counter div {
  display: grid;
  gap: 2px;
}

.wallet-sticky-counter strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.wallet-sticky-counter small,
.wallet-sticky-counter > span {
  color: var(--muted);
  font-weight: 900;
}

.wallet-sticky-counter > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--leaf-100);
  color: var(--leaf-800);
}

.wallet-counter-actions {
  display: grid;
  gap: 8px;
}

.wallet-counter-actions form {
  margin: 0;
}

.wallet-counter-actions .button,
.wallet-counter-actions > span,
.wallet-closed-label {
  width: 100%;
}

.wallet-closed-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--blue-100);
  color: #17627e;
  font-size: 0.92rem;
  font-weight: 900;
  text-align: center;
}

.is-hidden {
  display: none !important;
}

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

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

.simple-word-row {
  display: grid;
  gap: 10px;
  align-content: space-between;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.simple-word-name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.simple-word-name strong {
  color: var(--ink);
  font-size: 1.16rem;
  overflow-wrap: anywhere;
}

.simple-word-row form {
  margin: 0;
}

.simple-word-row .button,
.simple-word-row .status-pill {
  width: 100%;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--leaf-100);
  color: var(--leaf-800);
  font-weight: 900;
  text-align: center;
}

.simple-word-row.is-already-owned {
  background: linear-gradient(135deg, #ffffff, var(--leaf-50));
}

@media (min-width: 640px) {
  .wallet-sticky-counter {
    width: min(var(--content), calc(100% - 48px));
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .wallet-counter-actions {
    grid-template-columns: auto auto;
    align-items: center;
  }

  .wallet-counter-actions .button,
  .wallet-counter-actions > span,
  .wallet-closed-label {
    width: auto;
  }

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

@media (min-width: 1120px) {
  .simple-block-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


.app-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(23, 50, 31, 0.42);
  backdrop-filter: blur(6px);
}

.app-modal {
  display: grid;
  gap: 12px;
  width: min(420px, 100%);
  padding: 18px;
  border: 1px solid rgba(90, 170, 36, 0.28);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff, var(--leaf-50));
  box-shadow: var(--shadow);
}

.app-modal h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.55rem, 8vw, 2.2rem);
  line-height: 1;
}

.app-modal p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

.app-modal-actions {
  display: grid;
  gap: 8px;
}

.app-modal-actions .button {
  width: 100%;
}

@media (min-width: 520px) {
  .app-modal-actions {
    grid-template-columns: 1fr 1fr;
  }
}


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

.modal-helper-avatar {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 5px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background: linear-gradient(135deg, var(--leaf-500), var(--sun-300));
  color: white;
  font-size: 1.6rem;
  font-weight: 900;
  box-shadow: var(--shadow-soft);
  transform: rotate(-4deg);
}

.listen-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(90, 170, 36, 0.28);
  border-radius: var(--radius);
  background: var(--sun-100);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.listen-button span {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--leaf-500);
  color: white;
  font-size: 0.82rem;
}

.listen-button:hover {
  border-color: rgba(90, 170, 36, 0.5);
  box-shadow: var(--shadow-soft);
}


.home-hero {
  display: grid;
  gap: 20px;
  min-height: calc(100svh - 154px);
  align-items: center;
  padding-block: 28px 18px;
}

.home-hero-copy {
  max-width: 760px;
}

.bank-journey-board {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(223, 232, 207, 0.9);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 240, 168, 0.72), rgba(216, 244, 183, 0.94));
  box-shadow: var(--shadow);
}

.journey-node {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 12px;
  align-items: center;
  min-height: 92px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  text-decoration: none;
}

.journey-node > span {
  display: grid;
  grid-row: span 2;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: var(--radius);
  color: white;
  font-size: 1.65rem;
  font-weight: 900;
}

.journey-node.bank > span {
  background: var(--leaf-500);
}

.journey-node.wallet > span {
  background: var(--sun-500);
}

.journey-node.safe > span {
  background: var(--blue-500);
}

.journey-node strong,
.journey-node small {
  min-width: 0;
}

.journey-node small {
  color: var(--muted);
  font-weight: 900;
}

.home-stats {
  margin-top: 8px;
}

.home-dashboard-grid,
.public-home-grid {
  display: grid;
  gap: 14px;
}

.home-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.today-panel {
  background: linear-gradient(135deg, #ffffff, var(--leaf-50));
}

.review-panel {
  background: linear-gradient(135deg, #ffffff, var(--sun-100));
}

.home-word-strip,
.recent-word-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-word-chip,
.recent-word-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.home-word-chip span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--leaf-500);
  color: white;
}

.home-review-row {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.home-review-row.urgent {
  border-color: var(--sun-300);
  background: var(--sun-100);
}

.home-review-row span {
  color: var(--muted);
  font-weight: 900;
}

.home-section-heading {
  display: grid;
  gap: 12px;
  align-items: end;
}

.home-section-heading p {
  margin-bottom: 0;
}

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

.block-preview-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}

.block-preview-card > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--sun-300);
  color: var(--ink);
  font-weight: 900;
}

.block-preview-card small {
  color: var(--muted);
  font-weight: 900;
}

.block-preview-card em {
  width: fit-content;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--leaf-100);
  color: var(--leaf-800);
  font-style: normal;
  font-weight: 900;
}

.block-preview-card.is-open {
  background: linear-gradient(135deg, #ffffff, var(--leaf-50));
  border-color: rgba(90, 170, 36, 0.38);
}

.parent-note {
  background: linear-gradient(135deg, #ffffff, var(--blue-100));
}

.home-empty-profile {
  margin-top: 18px;
}

@media (min-width: 760px) {
  .home-hero {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
    min-height: calc(100svh - 96px);
    padding-block: 48px 28px;
  }

  .home-dashboard-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  }

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

  .home-section-heading {
    grid-template-columns: minmax(0, 1fr) auto;
  }

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

@media (min-width: 1120px) {
  .bank-journey-board {
    min-height: 390px;
    align-content: center;
  }

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


.bank-toolbar {
  display: grid;
  gap: 12px;
  align-items: end;
}

.bank-view-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bank-view-switch a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--leaf-700);
  font-weight: 900;
  text-decoration: none;
}

.bank-view-switch a.active {
  background: var(--sun-300);
  color: var(--ink);
  border-color: rgba(244, 176, 0, 0.55);
}

.bank-search {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-weight: 900;
}

.bank-search input {
  min-height: 46px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-weight: 900;
}

.bank-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.legend-chip,
.bank-word-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font-weight: 900;
  line-height: 1.1;
}

.legend-chip {
  min-height: 34px;
  padding: 7px 9px;
  border: 2px solid transparent;
}

.bank-legend > strong {
  color: var(--ink);
}

.bank-word-cloud {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 5px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.55);
}

.bank-word-chip {
  min-height: 28px;
  padding: 4px 7px;
  border: 2px solid transparent;
  font-size: clamp(0.92rem, 3.6vw, 1.08rem);
  cursor: default;
}

.status-bank {
  border-color: var(--leaf-500);
  background: var(--leaf-100);
  color: #392eb5;
}

.status-wallet {
  border-color: var(--sun-500);
  background: var(--sun-100);
  color: var(--ink);
}

.status-old_wallet {
  border-color: var(--blue-500);
  background: var(--blue-100);
  color: #17627e;
}

.status-safe {
  border-color: var(--leaf-700);
  background: linear-gradient(135deg, var(--leaf-500), var(--leaf-700));
  color: white;
}

.bank-word-chip[hidden] {
  display: none;
}

@media (min-width: 760px) {
  .bank-toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  }

  .bank-word-cloud {
    gap: 6px;
    padding: 14px;
  }
}

.schedule-preview-card {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff, var(--leaf-50));
}

.schedule-preview-card h2,
.schedule-preview-card p {
  margin: 0;
}

.schedule-preview-card p {
  color: var(--muted);
  font-weight: 800;
}

.schedule-preview-grid {
  display: grid;
  gap: 8px;
}

.schedule-preview-chip {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid rgba(90, 170, 36, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
}

.schedule-preview-chip strong {
  color: var(--ink);
}

.schedule-preview-chip em {
  color: var(--leaf-700);
  font-style: normal;
  font-weight: 900;
}

.schedule-preview-chip small {
  width: fit-content;
  padding: 4px 7px;
  border-radius: 999px;
  background: #ffe0cf;
  color: #9b2c00;
  font-weight: 900;
}

.schedule-preview-chip.is-late {
  border-color: #ffb088;
  background: #fff2ea;
}

.hamyon-study-status,
.hamyon-complete-form {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.hamyon-study-status {
  width: fit-content;
  padding: 9px 10px;
  border: 1px solid rgba(90, 170, 36, 0.28);
  border-radius: var(--radius);
  background: var(--leaf-50);
}

.hamyon-study-status strong,
.hamyon-study-status span,
.hamyon-complete-form small,
.audio-gate-note {
  color: var(--muted);
  font-weight: 900;
}

.hamyon-complete-form {
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
}

.button:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  box-shadow: none;
}

.sound-pill.is-listened,
.icon-text-button.is-listened {
  background: var(--leaf-100);
  border-color: rgba(90, 170, 36, 0.38);
  color: var(--leaf-800);
}

.audio-gate-note {
  display: block;
  margin-top: 8px;
}

.study-audio-panel {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.study-audio-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, 1fr);
  gap: 8px;
  align-items: stretch;
}

.study-audio-actions button[hidden] {
  display: none;
}

.study-audio-delay {
  display: grid;
  gap: 4px;
  min-width: 0;
  font-weight: 900;
  color: var(--muted);
}

.study-audio-delay > span {
  white-space: nowrap;
}

.study-audio-delay select {
  min-width: 92px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 900;
}

.translation-card.is-audio-active,
.study-list-item.is-audio-active,
.related-chip.is-audio-active,
.primary-study-card.is-audio-active {
  outline: 3px solid var(--sun-300);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(255, 201, 40, 0.2);
}

.study-floating-audio {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: min(520px, calc(100vw - 28px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}

.study-floating-audio[hidden] {
  display: none;
}

.study-floating-audio strong,
.study-floating-audio span {
  display: block;
}

.study-floating-audio span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 900;
}

.study-floating-audio .button {
  width: auto;
  min-width: 140px;
}


@media (max-width: 760px) {
  .study-floating-audio {
    bottom: 78px;
    width: calc(100vw - 22px);
  }
}

@media (min-width: 760px) {
  .schedule-preview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.nickname-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.nickname-suggestions button {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(90, 170, 36, 0.28);
  border-radius: 999px;
  background: var(--leaf-50);
  color: var(--leaf-800);
  font-weight: 900;
}

.avatar-picker-panel,
.review-adjustment-panel {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.64);
}

.avatar-picker-panel h2,
.avatar-picker-panel p {
  margin: 0;
}

.avatar-picker-panel p {
  color: var(--muted);
  font-weight: 800;
}

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

.avatar-choice-card {
  display: grid;
  gap: 6px;
  place-items: center;
  min-height: 138px;
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
  cursor: pointer;
}

.avatar-choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.avatar-choice-card:has(input:checked),
.avatar-choice-card.is-selected {
  border-color: var(--leaf-500);
  background: linear-gradient(135deg, #ffffff, var(--leaf-50));
  box-shadow: 0 10px 24px rgba(54, 130, 20, 0.12);
}

.avatar-face {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--avatar-bg, var(--leaf-100));
  color: var(--ink);
  font-size: 1.55rem;
  font-weight: 1000;
}

.avatar-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.avatar-choice-card strong {
  color: var(--ink);
}

.avatar-choice-card small {
  color: var(--muted);
  font-weight: 900;
}

.review-adjustment-panel {
  background: linear-gradient(135deg, #ffffff, var(--sun-100));
}

.range-field {
  display: grid;
  gap: 8px;
}

.range-field label,
.range-field strong {
  color: var(--ink);
  font-weight: 900;
}

.range-field input[type="range"] {
  width: 100%;
  accent-color: var(--leaf-600);
}

.range-field strong {
  width: fit-content;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
}

@media (min-width: 760px) {
  .avatar-choice-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

.pronounce-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pronounce-line.large {
  align-items: flex-end;
}

.pronounce-line > strong,
.pronounce-line > h2,
.pronounce-line > span {
  min-width: 0;
}

.speaker-button {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #d8f1d5;
  color: #315c50;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  box-shadow: none;
}

.speaker-button.small {
  width: 38px;
  height: 38px;
  font-size: 0.9rem;
}

.speaker-button.mini {
  width: 32px;
  height: 32px;
  font-size: 0.76rem;
}

.speaker-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.speaker-button.small .speaker-icon {
  width: 19px;
  height: 19px;
}

.speaker-button.mini .speaker-icon {
  width: 17px;
  height: 17px;
}

.audio-button-group {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 6px;
  margin-inline-start: auto;
}

.pronounce-line > .speaker-button {
  margin-inline-start: auto;
}

.slow-audio-button {
  order: -1;
  background: #eaf7e8;
  font-size: 1.05rem;
}

.speaker-button:hover,
.speaker-button:focus-visible {
  background: #c7e9c4;
  color: #123b32;
  outline: 3px solid rgba(90, 170, 36, 0.3);
  outline-offset: 2px;
}

.speaker-button.is-listened {
  background: #d8f1d5;
  color: #315c50;
  box-shadow: inset 0 0 0 2px #7ad97e;
}

.sound-pill.is-listened,
.icon-text-button.is-listened {
  background: var(--leaf-500);
  border-color: var(--leaf-700);
  color: white;
}

.slow-audio-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(90, 170, 36, 0.28);
  border-radius: var(--radius);
  background: var(--leaf-50);
  color: var(--leaf-800);
  font-weight: 900;
}

.slow-audio-control > span {
  min-width: 0;
  white-space: nowrap;
}

.slow-audio-control select {
  width: 82px;
  min-width: 82px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 900;
}

.muted-pronounce {
  justify-content: space-between;
  color: var(--muted);
}

.study-list-item .pronounce-line + .pronounce-line,
.related-chip .pronounce-line + .pronounce-line {
  margin-top: 5px;
}

.kid-avatar,
.selected-profile-chip span,
.top-profile-avatar {
  overflow: hidden;
  background: var(--avatar-bg, var(--leaf-100));
}

.kid-avatar img,
.selected-profile-chip span img,
.top-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.top-profile-avatar {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  color: var(--leaf-800);
  font-weight: 1000;
}

.real-name-note {
  margin: -3px 0 4px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 900;
}

.profile-switcher {
  gap: 8px;
}

.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;
}

.site-header .profile-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  max-width: 210px;
  padding: 5px 34px 5px 7px;
  border: 1px solid rgba(155, 188, 126, 0.34);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 24px rgba(54, 130, 20, 0.08);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.site-header .profile-switcher:hover,
.site-header .profile-switcher:focus-within {
  border-color: rgba(90, 170, 36, 0.52);
  box-shadow: 0 12px 28px rgba(54, 130, 20, 0.13);
  transform: translateY(-1px);
}

.site-header .profile-switcher .top-profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6);
}

.profile-switcher-text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.profile-switcher-text small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 1000;
  line-height: 1;
}

.profile-switcher-text strong {
  max-width: 118px;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 1000;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-switcher-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  color: var(--leaf-800);
  font-size: 1rem;
  font-weight: 1000;
  transform: translateY(-58%);
  pointer-events: none;
}

.site-header .profile-switcher select {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  min-height: 100%;
  opacity: 0;
  cursor: pointer;
}

@media (max-width: 520px) {
  .site-header .profile-switcher {
    max-width: 168px;
    padding-right: 28px;
  }

  .profile-switcher-text strong {
    max-width: 82px;
  }
}

.avatar-current-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff, var(--leaf-50));
}

.avatar-current-card .button {
  grid-column: 1 / -1;
}

.avatar-current-card strong,
.avatar-current-card small {
  display: block;
}

.avatar-current-card small {
  color: var(--muted);
  font-weight: 900;
}

.avatar-modal[hidden] {
  display: none;
}

.avatar-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
}

.avatar-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 36, 22, 0.48);
  backdrop-filter: blur(8px);
}

.avatar-modal-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  width: min(920px, 100%);
  max-height: min(760px, calc(100svh - 36px));
  padding: 16px;
  border: 1px solid rgba(223, 232, 207, 0.95);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(13, 31, 18, 0.24);
}

.avatar-modal-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.avatar-modal-header h2,
.avatar-modal-header p {
  margin: 0;
}

.avatar-modal-close {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--leaf-50);
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 900;
}

.avatar-folder-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.avatar-folder-tabs button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--leaf-800);
  font-weight: 900;
}

.avatar-folder-tabs button.active {
  border-color: var(--leaf-500);
  background: var(--sun-300);
  color: var(--ink);
}

.avatar-modal-body {
  overflow: auto;
  padding-right: 3px;
}

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

.avatar-choice-grid.modal-grid .avatar-choice-card {
  min-height: 132px;
}

.avatar-choice-grid.modal-grid .avatar-choice-card.is-selected {
  border-color: var(--leaf-600);
  background: linear-gradient(135deg, #ffffff, var(--leaf-100));
}

@media (min-width: 760px) {
  .avatar-current-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .avatar-current-card .button {
    grid-column: auto;
  }

  .avatar-choice-grid.modal-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.avatar-choice-grid[hidden],
.avatar-choice-grid.modal-grid[hidden],
[data-avatar-group][hidden] {
  display: none !important;
}

.avatar-modal-dialog {
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}

.avatar-modal-body {
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

.avatar-choice-grid.modal-grid {
  align-items: stretch;
  padding-bottom: 6px;
}

.avatar-choice-grid.modal-grid .avatar-choice-card {
  width: 100%;
  min-height: 150px;
}

.avatar-choice-grid.modal-grid .avatar-face {
  width: 72px;
  height: 72px;
}

.avatar-choice-grid.modal-grid .avatar-face img {
  padding: 2px;
  object-fit: contain;
}

@media (max-width: 520px) {
  .avatar-modal {
    padding: 10px;
  }

  .avatar-modal-dialog {
    max-height: calc(100svh - 20px);
    padding: 12px;
  }

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

.site-header .profile-switcher {
  min-height: 42px;
  padding-block: 4px;
}

.profile-switcher-name {
  max-width: 124px;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 1000;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .profile-switcher-name {
    max-width: 88px;
  }
}

.avatar-folder-tabs {
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.avatar-folder-tabs button {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar-modal-body {
  overscroll-behavior: contain;
}

.avatar-choice-grid.modal-grid .avatar-choice-card strong {
  display: -webkit-box;
  min-height: 2.35em;
  overflow: hidden;
  line-height: 1.15;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@media (max-width: 520px) {
  .avatar-modal {
    align-items: stretch;
    padding: 8px;
  }

  .avatar-modal-dialog {
    width: 100%;
    max-height: calc(100svh - 16px);
    grid-template-rows: auto auto minmax(0, 1fr);
    border-radius: 14px;
  }

  .avatar-modal-header {
    align-items: center;
  }

  .avatar-modal-header h2 {
    font-size: 1.05rem;
    line-height: 1.15;
  }

  .avatar-modal-close {
    width: 38px;
    height: 38px;
  }

  .avatar-folder-tabs {
    margin-inline: -4px;
    padding-inline: 4px;
  }

  .avatar-folder-tabs button {
    max-width: 154px;
    min-height: 34px;
    padding: 6px 10px;
    font-size: 0.86rem;
  }

  .avatar-choice-grid.modal-grid {
    gap: 8px;
  }

  .avatar-choice-grid.modal-grid .avatar-choice-card {
    min-height: 138px;
    padding: 9px 6px;
  }

  .avatar-choice-grid.modal-grid .avatar-face {
    width: 58px;
    height: 58px;
    border-radius: 13px;
  }

  .avatar-choice-grid.modal-grid .avatar-choice-card strong {
    font-size: 0.88rem;
  }

  .avatar-choice-grid.modal-grid .avatar-choice-card small {
    font-size: 0.74rem;
  }
}


/* Two-step avatar picker: folders first, avatars second. */
.avatar-modal-dialog {
  grid-template-rows: auto minmax(0, 1fr);
}

.avatar-folder-view[hidden],
.avatar-group-view[hidden] {
  display: none !important;
}

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

.avatar-folder-card {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  min-height: 148px;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, #ffffff, var(--leaf-50));
  color: var(--ink);
  text-align: center;
  box-shadow: 0 10px 24px rgba(35, 79, 22, 0.06);
}

.avatar-folder-card:hover,
.avatar-folder-card:focus-visible {
  border-color: var(--leaf-600);
  background: linear-gradient(145deg, var(--leaf-50), var(--sun-100));
}

.avatar-folder-card .folder-preview {
  width: 82px;
  height: 82px;
}

.avatar-folder-card strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.84rem;
  line-height: 1.12;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.avatar-folder-card small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.avatar-group-toolbar {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  background: var(--surface);
}

.avatar-group-toolbar .button {
  min-height: 34px;
  padding: 7px 12px;
}

.avatar-group-toolbar strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar-choice-grid.modal-grid .avatar-choice-card {
  min-height: 142px;
  padding: 10px 7px;
}

.avatar-choice-grid.modal-grid .avatar-face {
  width: 82px;
  height: 82px;
}

.avatar-choice-grid.modal-grid .avatar-choice-card strong {
  min-height: 2.1em;
  font-size: 0.76rem;
  line-height: 1.1;
}

.premium-badge {
  display: inline-flex;
  justify-content: center;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--sun-300);
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 1000;
}

@media (min-width: 760px) {
  .avatar-folder-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .avatar-folder-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .avatar-folder-grid {
    gap: 8px;
  }

  .avatar-folder-card {
    min-height: 136px;
    padding: 10px 6px;
  }

  .avatar-folder-card .folder-preview,
  .avatar-choice-grid.modal-grid .avatar-face {
    width: 76px;
    height: 76px;
  }

  .avatar-folder-card strong {
    font-size: 0.78rem;
  }

  .avatar-choice-grid.modal-grid .avatar-choice-card {
    min-height: 134px;
  }

  .avatar-choice-grid.modal-grid .avatar-choice-card strong {
    font-size: 0.72rem;
  }
}


/* Learner profile dashboard */
.learner-hero {
  display: grid;
  gap: 14px;
  align-items: stretch;
  min-height: auto;
  padding-top: 22px;
  padding-bottom: 18px;
}

.learner-hero-main,
.learner-today-card,
.learner-map-card,
.learner-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-soft);
}

.learner-hero-main {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: linear-gradient(145deg, #ffffff, var(--leaf-50));
}

.learner-id-card,
.learner-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.learner-big-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--avatar-bg, var(--leaf-100));
  color: var(--leaf-800);
  font-size: 2rem;
  font-weight: 1000;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.7), 0 12px 28px rgba(54, 130, 20, 0.14);
}

.learner-big-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.learner-id-card h1 {
  margin: 0;
  font-size: clamp(2.2rem, 13vw, 4.8rem);
  line-height: 0.95;
}

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

.learner-metric {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 9px;
  align-items: center;
  min-height: 70px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
}

.learner-metric > span,
.learner-card-head > span,
.review-map-node > span,
.safe-vault-card > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--leaf-500);
  color: white;
  font-weight: 1000;
}

.learner-metric.wallet > span { background: var(--sun-500); }
.learner-metric.safe > span { background: var(--blue-500); }
.learner-metric.rank > span { background: var(--coral-500); }

.learner-metric strong {
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
}

.learner-metric small {
  grid-column: 2;
  color: var(--muted);
  font-weight: 900;
}

.coin-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(244, 176, 0, 0.4);
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--sun-100), #ffffff);
}

.coin-card strong,
.coin-card p {
  margin: 0;
}

.coin-card p {
  color: var(--muted);
  font-weight: 900;
}

.coin-stack {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 62px;
  height: 62px;
  border: 4px solid #eaa900;
  border-radius: 999px;
  background: radial-gradient(circle at 32% 28%, #fff5a8, var(--sun-300) 44%, var(--sun-500));
  color: #573600;
  font-size: 1.45rem;
  font-weight: 1000;
  box-shadow: inset 0 -5px 0 rgba(124, 82, 0, 0.16), 0 12px 24px rgba(244, 176, 0, 0.24);
}

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

.learner-today-card,
.learner-map-card,
.learner-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.learner-card-head h2,
.learner-card-head p {
  margin: 0;
}

.wallet-progress-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
}

.wallet-progress-line span,
.muted-text {
  color: var(--muted);
  font-weight: 900;
}

.soft-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(216, 244, 183, 0.7);
}

.soft-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--leaf-500), var(--sun-300));
}

.learner-word-minirow,
.reward-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.mini-token,
.reward-list span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--leaf-50);
  color: var(--ink);
  font-weight: 1000;
  text-decoration: none;
}

.mini-token.done {
  background: var(--sun-100);
}

.compact-review-map {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  color: inherit;
  text-decoration: none;
}

.map-dot {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 70px;
  padding: 7px 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.map-dot b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--leaf-500);
  color: white;
}

.map-dot small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 1000;
}

.map-dot.due {
  border-color: var(--sun-500);
  background: var(--sun-100);
}

.map-empty {
  grid-column: 1 / -1;
  color: var(--muted);
  font-weight: 900;
}

.learner-dashboard-grid {
  display: grid;
  gap: 14px;
}

.learner-panel h2,
.learner-panel p {
  margin: 0;
}

.learner-word-strip .home-word-chip.studied {
  background: var(--sun-100);
}

.reward-list span {
  border-radius: var(--radius);
}

.reward-list b {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  margin-right: 7px;
  border-radius: 999px;
  background: var(--sun-300);
  color: var(--ink);
}

.full-review-map {
  display: grid;
  gap: 10px;
}

.review-map-node {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
}

.review-map-node.due {
  grid-template-columns: auto minmax(0, 1fr) auto;
  border-color: var(--sun-500);
  background: var(--sun-100);
}

.review-map-node strong,
.review-map-node small {
  display: block;
}

.review-map-node small {
  color: var(--muted);
  font-weight: 900;
}

.safe-vault-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(63, 159, 210, 0.34);
  border-radius: var(--radius);
  background: var(--blue-100);
}

.safe-vault-card strong {
  font-size: 2.2rem;
  line-height: 1;
}

.safe-vault-card small {
  grid-column: 2;
  color: var(--muted);
  font-weight: 900;
}

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

.family-rating-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.family-rating-row.active {
  border-color: var(--leaf-500);
  background: var(--leaf-50);
}

.family-rating-row > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--sun-300);
  color: var(--ink);
  font-weight: 1000;
}

.family-rating-row small {
  color: var(--muted);
  font-weight: 900;
}

@media (min-width: 780px) {
  .learner-hero {
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  }

  .learner-hero-main {
    grid-row: span 2;
  }

  .learner-quick-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .learner-dashboard-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.45fr);
  }

  .wide-panel {
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .learner-hero {
    padding-top: 12px;
  }

  .learner-hero-main,
  .learner-today-card,
  .learner-map-card,
  .learner-panel {
    padding: 12px;
  }

  .learner-big-avatar {
    width: 62px;
    height: 62px;
    border-radius: 15px;
  }

  .learner-id-card h1 {
    font-size: 2.35rem;
  }

  .learner-metric {
    min-height: 64px;
    padding: 8px;
  }

  .compact-review-map {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .review-map-node,
  .review-map-node.due {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .review-map-node .button {
    grid-column: 1 / -1;
  }
}


/* Profile switcher: current nickname opens dashboard, arrow changes profile. */
.profile-switcher-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.site-header .profile-switcher {
  padding-right: 36px;
}

.site-header .profile-switcher select {
  left: auto;
  right: 0;
  width: 38px;
  min-width: 38px;
}

/* Rankings page */
.ranking-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ranking-layout {
  display: grid;
  gap: 14px;
}

.ranking-filter-panel,
.ranking-board-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-soft);
}

.ranking-filter-panel h2,
.ranking-board-panel h2,
.ranking-filter-panel p,
.ranking-board-panel p {
  margin: 0;
}

.ranking-scope-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.ranking-scope {
  display: grid;
  flex: 0 0 auto;
  gap: 2px;
  min-width: 128px;
  min-height: 58px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}

.ranking-scope.active {
  border-color: var(--leaf-500);
  background: linear-gradient(135deg, var(--leaf-50), var(--sun-100));
}

.ranking-scope small,
.ranking-board-panel p {
  color: var(--muted);
  font-weight: 900;
}

.ranking-table {
  display: grid;
  gap: 8px;
}

.ranking-table-row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.ranking-table-row.active {
  border-color: var(--leaf-500);
  background: var(--leaf-50);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--sun-300);
  color: var(--ink);
  font-weight: 1000;
}

.rank-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--avatar-bg, var(--leaf-100));
  color: var(--leaf-800);
  font-weight: 1000;
}

.rank-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.ranking-table-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-table-row small {
  color: var(--muted);
  font-weight: 1000;
}

.group-feature-grid {
  display: grid;
  gap: 8px;
}

.group-feature-grid span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--leaf-50);
  font-weight: 1000;
}

.group-feature-grid b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--leaf-500);
  color: white;
}

@media (min-width: 820px) {
  .ranking-layout {
    grid-template-columns: 280px minmax(0, 1fr);
  }

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

  .ranking-scope-list {
    display: grid;
    overflow: visible;
  }
}

@media (max-width: 560px) {
  .ranking-summary-grid {
    grid-template-columns: 1fr;
  }

  .ranking-table-row {
    grid-template-columns: auto auto minmax(0, 1fr);
  }

  .ranking-table-row small {
    grid-column: 3;
  }
}


/* Study groups */
.compact-form {
  gap: 8px;
}

.compact-form input,
.compact-form select,
.compact-form textarea {
  width: 100%;
}

.group-feature-grid a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--leaf-50);
  color: var(--ink);
  font-weight: 1000;
  text-decoration: none;
}

.group-feature-grid a b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--leaf-500);
  color: white;
}

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

.study-group-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}

.study-group-card > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--leaf-500);
  color: white;
  font-weight: 1000;
}

.study-group-card strong,
.study-group-card small {
  display: block;
}

.study-group-card small {
  color: var(--muted);
  font-weight: 900;
}

.invite-code-panel h2 {
  width: fit-content;
  padding: 8px 12px;
  border: 2px dashed var(--leaf-500);
  border-radius: var(--radius);
  background: var(--leaf-50);
  font-size: clamp(1.8rem, 8vw, 3rem);
  letter-spacing: 0.08em;
}

@media (min-width: 760px) {
  .study-group-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Learner groups */
.education-group-card,
.profile-study-group-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 244, 159, 0.86), rgba(221, 250, 190, 0.8));
  color: var(--ink);
  text-decoration: none;
}

.education-group-card > span,
.profile-study-group-card > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--leaf-500);
  color: white;
  font-weight: 1000;
}

.education-group-card.kindergarten > span {
  background: var(--sky-500);
}

.education-group-card strong,
.education-group-card small,
.profile-study-group-card strong,
.profile-study-group-card small {
  display: block;
}

.education-group-card small,
.profile-study-group-card small {
  color: var(--muted);
  font-weight: 900;
}

.profile-study-group-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

@media (min-width: 620px) {
  .profile-study-group-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Group detail safety */
.group-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.group-danger-zone {
  display: grid;
  gap: 12px;
  border-color: rgba(213, 75, 61, 0.24);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 244, 230, 0.74));
}

.group-danger-zone h2,
.group-danger-zone p {
  margin: 0;
}

.button-danger,
.button-danger-soft {
  border: 1px solid rgba(213, 75, 61, 0.32);
}

.button-danger {
  background: linear-gradient(135deg, #d94b3d, #a73227);
  color: white;
  box-shadow: var(--shadow-soft);
}

.button-danger-soft {
  background: #fff4ef;
  color: #8d2a22;
}

.modal-helper-avatar.danger {
  background: linear-gradient(135deg, #d94b3d, var(--sun-300));
}

@media (min-width: 720px) {
  .group-danger-zone {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}

@media (max-width: 560px) {
  .group-detail-actions,
  .group-detail-actions .button,
  .group-danger-zone .button {
    width: 100%;
  }
}

.compact-label {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 1000;
}

.compact-copy-field {
  margin-top: 4px;
}

.compact-copy-field input {
  min-width: 0;
  font-size: 0.9rem;
}

/* Invitation registration */
.invite-register-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(90, 170, 36, 0.34);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 244, 159, 0.88), rgba(221, 250, 190, 0.86));
  box-shadow: var(--shadow-soft);
}

.invite-banner-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 5px solid rgba(255, 255, 255, 0.75);
  border-radius: 16px;
  background: var(--leaf-500);
  color: white;
  font-size: 1.45rem;
  font-weight: 1000;
  transform: rotate(-4deg);
}

.invite-register-banner h2,
.invite-register-banner p {
  margin: 0;
}

.invite-register-banner h2 {
  color: var(--ink);
  font-size: clamp(1.25rem, 6vw, 2rem);
  line-height: 1.05;
}

.invite-register-banner small,
.auth-context-note {
  display: block;
  color: var(--muted);
  font-weight: 900;
}

.auth-context-note {
  margin: -4px 0 14px;
}

/* Review exercise prototype */
.review-exercise-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.review-exercise-card,
.review-action-card {
  align-self: start;
}

.review-word-stack {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.review-task-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 18px;
}

.review-task-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.review-task-card strong,
.review-task-card small,
.review-task-card p {
  display: block;
  margin: 0;
}

.review-task-card small {
  color: var(--muted);
  font-weight: 900;
}

.review-task-card p {
  margin-top: 6px;
  color: var(--text);
}

.review-task-start {
  align-self: center;
  white-space: nowrap;
}

.review-task-start:disabled {
  cursor: wait;
  opacity: 0.75;
}

.review-playback-stage {
  display: grid;
  gap: 14px;
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f4ffe8, #ffffff);
  color: #17351e;
}

.review-playback-media {
  display: grid;
  place-items: center;
  min-height: 320px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  overflow: hidden;
  touch-action: pan-y;
}

.review-playback-media img,
.review-playback-media video {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: contain;
}

.review-playback-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.review-stage-icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffff;
  color: var(--green-dark);
  font-size: 1.6rem;
  font-weight: 900;
  cursor: pointer;
}

.review-stage-icon-button.primary {
  width: 52px;
  height: 52px;
  background: #78c841;
  color: #ffffff;
}

.review-playback-copy {
  text-align: center;
}

.review-playback-copy h3 {
  margin: 0;
  color: #17351e;
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  line-height: 1.02;
}

.review-playback-copy p:last-child {
  margin: 8px 0 0;
  color: #526a48;
  font-size: clamp(1.05rem, 2.4vw, 1.45rem);
  font-weight: 900;
}

.review-playback-copy .eyebrow {
  color: #5aaa24;
}

.review-playback-status {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #efffdd;
  color: var(--green-dark);
  font-weight: 900;
}

.review-interactive-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid #dfe8cf;
  border-radius: var(--radius);
  background: #ffffff;
}

.review-interactive-panel[hidden] {
  display: none;
}

.review-interactive-head {
  display: grid;
  gap: 4px;
  text-align: center;
}

.review-interactive-head .eyebrow,
.review-interactive-head strong {
  margin: 0;
}

.review-interactive-head strong {
  color: #17351e;
  font-size: clamp(1.25rem, 4vw, 2rem);
  line-height: 1.12;
}

.review-choice-grid,
.review-match-board {
  display: grid;
  gap: 10px;
}

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

.review-choice-grid.image-choice {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.review-choice-button,
.review-match-chip,
.review-drag-chip {
  min-height: 58px;
  border: 2px solid #dfe8cf;
  border-radius: var(--radius);
  background: #f8ffef;
  color: #17351e;
  font-weight: 900;
  cursor: pointer;
}

.review-choice-button {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 10px;
  font-size: clamp(1rem, 3vw, 1.35rem);
}

.review-choice-button img {
  width: 100%;
  max-height: 150px;
  object-fit: contain;
}

.review-choice-button span {
  display: grid;
  place-items: center;
  width: 72px;
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: #78c841;
  color: #ffffff;
  font-size: 2.4rem;
}

.review-choice-button strong {
  color: #17351e;
  font-size: 1rem;
}

.review-choice-button[data-state="correct"],
.review-match-chip[data-state="correct"],
.review-drop-target[data-state="correct"] {
  border-color: #5aaa24;
  background: #dff7c9;
}

.review-choice-button[data-state="wrong"],
.review-match-chip[data-state="wrong"],
.review-typing-row input[data-state="wrong"] {
  border-color: #ff7b4a;
  background: #ffe1d5;
}

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

.review-match-column {
  display: grid;
  gap: 8px;
}

.review-match-chip {
  padding: 10px 12px;
  text-align: center;
}

.review-match-chip[data-state="selected"] {
  border-color: #ffd84d;
  background: #fff4ba;
}

.review-typing-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.review-typing-row input[data-state="correct"] {
  border-color: #5aaa24;
  background: #f4ffe8;
}

.review-drag-board {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(160px, 1.4fr);
  gap: 12px;
  align-items: stretch;
}

.review-drag-chip {
  padding: 12px;
  background: #fff4ba;
}

.review-drop-target {
  display: grid;
  place-items: center;
  min-height: 92px;
  border: 3px dashed #9ddd5b;
  border-radius: var(--radius);
  background: #f8ffef;
  color: #526a48;
  text-align: center;
  font-weight: 900;
}

.review-interactive-feedback {
  min-height: 28px;
  margin: 0;
  color: #526a48;
  text-align: center;
  font-size: 1.08rem;
  font-weight: 900;
}

.review-interactive-feedback[data-state="correct"] {
  color: #2f741b;
}

.review-interactive-feedback[data-state="wrong"] {
  color: #b74b24;
}

.review-word-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #fff7b8, #f3ffd9);
}

.review-word-card h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
}

.review-word-card p,
.review-word-card small {
  display: block;
  margin: 0;
  color: var(--muted);
}

.review-action-card form {
  margin-top: 14px;
}

.review-action-card small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.review-result-summary {
  display: grid;
  gap: 2px;
  margin: 12px 0 0;
  padding: 12px;
  border-radius: var(--radius);
  background: #efffdd;
  color: #17351e;
}

.review-result-summary strong {
  font-size: 1.6rem;
  line-height: 1;
}

.review-result-summary span {
  color: #526a48;
  font-size: 0.92rem;
  font-weight: 900;
}

@media (max-width: 640px) {
  .review-task-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .review-task-start {
    grid-column: 1 / -1;
    width: 100%;
  }

  .review-playback-stage {
    padding: 12px;
  }

  .review-playback-media {
    min-height: 260px;
  }

  .review-playback-media img,
  .review-playback-media video {
    max-height: 360px;
  }

  .review-choice-grid,
  .review-match-board,
  .review-drag-board,
  .review-typing-row {
    grid-template-columns: 1fr;
  }

}

@media (min-width: 860px) {
  .review-exercise-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

/* Hamyon archive */
.hamyon-archive-list {
  display: grid;
  gap: 14px;
}

.hamyon-archive-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff, #f5ffe8);
  box-shadow: var(--shadow-soft);
}

.hamyon-archive-card.today {
  border-color: rgba(244, 176, 0, 0.55);
  background: linear-gradient(135deg, #fff5b8, #f5ffe8);
}

.hamyon-archive-head {
  display: grid;
  gap: 10px;
}

.hamyon-archive-head h2,
.hamyon-archive-head p {
  margin: 0;
}

.hamyon-archive-head p {
  color: var(--muted);
}

.hamyon-archive-words,
.hamyon-archive-map,
.hamyon-archive-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hamyon-stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
}

.hamyon-stage-pill b {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--leaf-500);
  color: white;
}

.hamyon-stage-pill.completed {
  background: var(--leaf-100);
  border-color: rgba(90, 170, 36, 0.55);
}

.hamyon-stage-pill.completed b {
  background: var(--leaf-700);
}

.hamyon-stage-pill.is-due {
  background: var(--sun-100);
  border-color: var(--sun-500);
}

.hamyon-stage-pill span,
.hamyon-archive-foot span {
  color: var(--muted);
  font-size: 0.84rem;
}

.hamyon-archive-foot {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

@media (min-width: 760px) {
  .hamyon-archive-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}

.mini-review-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.mini-review-status-row .status-pill {
  min-height: 0;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
}

.status-pill.warning {
  background: var(--sun-100);
  color: var(--ink);
}

.status-pill.success {
  background: var(--blue-100);
  color: var(--ink);
}

.review-notification {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(23, 50, 31, 0.42);
  backdrop-filter: blur(7px);
}

.review-notification[hidden] {
  display: none;
}

.review-notification-card {
  position: relative;
  width: min(520px, 100%);
  padding: 14px;
  border: 1px solid rgba(90, 170, 36, 0.35);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.review-notification-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--leaf-100);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.5rem;
  font-weight: 900;
}

.review-notification-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 18px 48px 18px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--leaf-50), var(--sun-100));
}

.review-notification-hero[data-mascot-color="blue"] {
  background: linear-gradient(135deg, var(--blue-100), var(--leaf-50));
}

.review-notification-hero[data-mascot-color="yellow"] {
  background: linear-gradient(135deg, var(--sun-100), var(--leaf-100));
}

.review-notification-mascot {
  display: inline-grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: var(--leaf-500);
  color: white;
  box-shadow: var(--shadow-soft);
  font-size: 2rem;
  font-weight: 900;
}

.review-notification h2 {
  margin-bottom: 6px;
  font-size: 1.65rem;
}

.review-notification p {
  margin-bottom: 0;
}

.review-notification-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.review-notification-meta span,
.review-notification-voice {
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--leaf-50);
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 900;
}

.review-notification-voice {
  border-radius: var(--radius);
}

.review-notification-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

@media (min-width: 560px) {
  .review-notification-actions {
    grid-template-columns: 1fr 1.2fr;
  }
}

.review-mascot-banner {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  max-width: 560px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(90, 170, 36, 0.34);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--leaf-50), var(--sun-100));
}

.review-mascot-banner[data-mascot-color="blue"] {
  background: linear-gradient(135deg, var(--blue-100), var(--leaf-50));
}

.review-mascot-banner[data-mascot-color="yellow"] {
  background: linear-gradient(135deg, var(--sun-100), var(--leaf-100));
}

.review-mascot-banner > span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--leaf-500);
  color: white;
  font-weight: 900;
}

.review-mascot-banner strong {
  display: block;
  color: var(--ink);
  font-weight: 900;
}

.review-mascot-banner p {
  margin: 0;
  font-size: 0.92rem;
}

.review-stage-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--leaf-50);
  border: 1px solid rgba(90, 170, 36, 0.28);
  flex: 0 0 auto;
}

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

.review-row .button {
  grid-column: 1 / -1;
}

.review-map-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.review-map-card-banner {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--leaf-50);
}

.hamyon-stage-pill img {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(90, 170, 36, 0.28);
}

.review-notification-hero {
  position: relative;
  overflow: hidden;
  min-height: 184px;
}

.review-notification-banner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
}

.review-notification-icon {
  position: relative;
  z-index: 1;
  width: 74px;
  height: 74px;
  border-radius: 18px;
  object-fit: cover;
  background: var(--leaf-50);
  border: 2px solid rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
}

.review-notification-hero > div {
  position: relative;
  z-index: 1;
}

.review-mascot-banner {
  position: relative;
  overflow: hidden;
  min-height: 108px;
}

.review-mascot-banner-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
}

.review-mascot-icon {
  position: relative;
  z-index: 1;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
}

.review-mascot-banner > div {
  position: relative;
  z-index: 1;
}

.review-exercise-illustration {
  width: min(220px, 52vw);
  aspect-ratio: 1;
  object-fit: contain;
  margin: 0 auto 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--leaf-50), var(--sun-100));
}

@media (min-width: 640px) {
  .review-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .review-row .button {
    grid-column: auto;
  }
}

/* Core Bank-Hamyon-Seyf artwork */
.core-icon-wrap {
  display: grid;
  place-items: center;
  overflow: hidden;
}

.core-icon-wrap img,
.tabbar-image-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.home-hero-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: calc(var(--radius) - 2px);
  box-shadow: var(--shadow-soft);
  background: var(--leaf-50);
}

.bank-journey-board .journey-node > .core-icon-wrap,
.learner-metric > .core-icon-wrap,
.learner-card-head > .core-icon-wrap,
.education-group-card > .core-icon-wrap,
.profile-study-group-card > .core-icon-wrap,
.safe-vault-card > .core-icon-wrap {
  background: rgba(255, 255, 255, 0.78);
  color: inherit;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.72);
}

.journey-node > .core-icon-wrap img,
.learner-metric > .core-icon-wrap img,
.learner-card-head > .core-icon-wrap img,
.education-group-card > .core-icon-wrap img,
.profile-study-group-card > .core-icon-wrap img,
.safe-vault-card > .core-icon-wrap img {
  padding: 4px;
}

.core-page-visual {
  display: grid;
  gap: 10px;
  align-items: end;
  justify-items: start;
  min-width: min(100%, 260px);
}

.core-page-visual > img {
  width: min(100%, 360px);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid rgba(223, 232, 207, 0.9);
  border-radius: var(--radius);
  background: var(--leaf-50);
  box-shadow: var(--shadow-soft);
}

.core-page-visual.small-icon-visual > img {
  width: 132px;
  aspect-ratio: 1;
  object-fit: contain;
  padding: 12px;
}

.coin-stack.image-coin {
  position: relative;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.coin-stack.image-coin img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.coin-stack.image-coin b {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-width: 30px;
  min-height: 30px;
  border-radius: 999px;
  background: rgba(255, 240, 168, 0.85);
  color: #573600;
  line-height: 1;
}

.reward-panel {
  position: relative;
  overflow: hidden;
}

.panel-corner-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 58px;
  height: 58px;
  object-fit: contain;
  opacity: 0.92;
}

.reward-panel h2,
.reward-panel p,
.reward-panel .reward-list {
  position: relative;
  z-index: 1;
}

.mobile-tabbar .tabbar-image-icon {
  overflow: hidden;
  background: transparent;
}

.mobile-tabbar .tabbar-image-icon img {
  padding: 1px;
}

@media (max-width: 759px) {
  .home-hero-image {
    max-height: 230px;
  }

  .core-page-visual {
    justify-items: stretch;
  }

  .core-page-visual > img {
    width: 100%;
    max-height: 190px;
  }
}

@media (min-width: 760px) {
  .page-heading .core-page-visual {
    justify-items: end;
  }
}

/* Keep page headings readable when an artwork column is present. */
.page-heading.split-heading > div:first-child {
  min-width: 0;
  width: min(100%, 760px);
}

.page-heading.split-heading > div:first-child .eyebrow,
.page-heading.split-heading > div:first-child h1,
.page-heading.split-heading > div:first-child p,
.page-heading.split-heading > div:first-child .lead {
  max-width: 760px;
  overflow-wrap: normal;
  word-break: normal;
}

@media (min-width: 720px) {
  .page-heading.split-heading:has(.core-page-visual) {
    grid-template-columns: minmax(420px, 1fr) minmax(260px, 360px);
  }

  .page-heading.split-heading:has(.core-page-visual) .core-page-visual {
    width: min(100%, 360px);
  }
}

@media (max-width: 719px) {
  .page-heading.split-heading > div:first-child {
    width: 100%;
  }
}

/* Artwork heroes: use the banner as the page heading background, not as a side card. */
.page-heading.split-heading:has(.core-page-visual:not(.small-icon-visual)) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(300px, 34vw, 430px);
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid rgba(223, 232, 207, 0.92);
  border-radius: var(--radius);
  background: var(--leaf-50);
  box-shadow: var(--shadow-soft);
}

.page-heading.split-heading:has(.core-page-visual:not(.small-icon-visual))::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(251, 250, 238, 0.96), rgba(251, 250, 238, 0.72) 38%, rgba(251, 250, 238, 0.2) 70%),
    linear-gradient(0deg, rgba(216, 244, 183, 0.16), rgba(255, 240, 168, 0.12));
}

.page-heading.split-heading:has(.core-page-visual:not(.small-icon-visual)) > div:first-child {
  position: relative;
  z-index: 1;
  width: min(100%, 600px);
  padding: 0;
}

.page-heading.split-heading:has(.core-page-visual:not(.small-icon-visual)) .core-page-visual {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: block;
  width: 100% !important;
  min-width: 0;
}

.page-heading.split-heading:has(.core-page-visual:not(.small-icon-visual)) .core-page-visual > img {
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
  border: 0;
  border-radius: inherit;
  box-shadow: none;
}

.page-heading.split-heading:has(.core-page-visual:not(.small-icon-visual)) .core-page-visual > .button,
.page-heading.split-heading:has(.core-page-visual:not(.small-icon-visual)) .core-page-visual > .status-pill {
  position: absolute;
  z-index: 2;
  right: clamp(16px, 3vw, 34px);
  bottom: clamp(16px, 3vw, 34px);
}

.page-heading.split-heading:has(.bank-visual)::before,
.page-heading.split-heading:has(.hamyon-visual)::before,
.page-heading.split-heading:has(.learning-visual)::before {
  background:
    linear-gradient(90deg, rgba(251, 250, 238, 0.18), rgba(251, 250, 238, 0.72) 46%, rgba(251, 250, 238, 0.96) 72%),
    linear-gradient(0deg, rgba(216, 244, 183, 0.16), rgba(255, 240, 168, 0.12));
}

.page-heading.split-heading:has(.bank-visual) > div:first-child,
.page-heading.split-heading:has(.hamyon-visual) > div:first-child,
.page-heading.split-heading:has(.learning-visual) > div:first-child {
  justify-self: end;
  width: min(100%, 560px);
}

.page-heading.split-heading:has(.bank-visual) .core-page-visual > .button,
.page-heading.split-heading:has(.hamyon-visual) .core-page-visual > .button,
.page-heading.split-heading:has(.learning-visual) .core-page-visual > .button,
.page-heading.split-heading:has(.learning-visual) .core-page-visual > .status-pill {
  right: clamp(16px, 3vw, 34px);
  bottom: clamp(16px, 3vw, 34px);
}

.page-heading.split-heading:has(.rewards-visual) .core-page-visual > .button {
  left: clamp(16px, 3vw, 34px);
  right: auto;
}

@media (max-width: 719px) {
  .page-heading.split-heading:has(.core-page-visual:not(.small-icon-visual)) {
    min-height: 360px;
    align-items: end;
    padding: 18px;
  }

  .page-heading.split-heading:has(.core-page-visual:not(.small-icon-visual))::before,
  .page-heading.split-heading:has(.bank-visual)::before,
  .page-heading.split-heading:has(.hamyon-visual)::before,
  .page-heading.split-heading:has(.learning-visual)::before {
    background:
      linear-gradient(0deg, rgba(251, 250, 238, 0.98), rgba(251, 250, 238, 0.88) 42%, rgba(251, 250, 238, 0.18) 78%),
      linear-gradient(0deg, rgba(216, 244, 183, 0.18), rgba(255, 240, 168, 0.14));
  }

  .page-heading.split-heading:has(.core-page-visual:not(.small-icon-visual)) > div:first-child,
  .page-heading.split-heading:has(.bank-visual) > div:first-child,
  .page-heading.split-heading:has(.hamyon-visual) > div:first-child,
  .page-heading.split-heading:has(.learning-visual) > div:first-child {
    justify-self: stretch;
    width: 100%;
  }

  .page-heading.split-heading:has(.core-page-visual:not(.small-icon-visual)) .core-page-visual > .button,
  .page-heading.split-heading:has(.core-page-visual:not(.small-icon-visual)) .core-page-visual > .status-pill {
    position: relative;
    right: auto;
    bottom: auto;
    margin-top: 12px;
    justify-self: start;
  }
}

@media (max-width: 719px) {
  .page-heading.split-heading:has(.core-page-visual:not(.small-icon-visual)) .core-page-visual > .button,
  .page-heading.split-heading:has(.core-page-visual:not(.small-icon-visual)) .core-page-visual > .status-pill {
    position: absolute;
    left: 18px;
    right: auto;
    bottom: 18px;
    margin-top: 0;
  }

  .page-heading.split-heading:has(.bank-visual) .core-page-visual > .button,
  .page-heading.split-heading:has(.hamyon-visual) .core-page-visual > .button,
  .page-heading.split-heading:has(.learning-visual) .core-page-visual > .button,
  .page-heading.split-heading:has(.learning-visual) .core-page-visual > .status-pill {
    left: auto;
    right: 18px;
  }
}

/* Core hero correction: keep banners vivid and uncropped. */
.page-heading.split-heading:has(.core-page-visual:not(.small-icon-visual)) {
  min-height: auto;
  aspect-ratio: 16 / 9;
  align-items: center;
}

.page-heading.split-heading:has(.core-page-visual:not(.small-icon-visual)) .core-page-visual > img {
  object-fit: contain;
  object-position: center;
  background: #fbfaee;
}

.page-heading.split-heading:has(.core-page-visual:not(.small-icon-visual))::before {
  background:
    linear-gradient(90deg, rgba(251, 250, 238, 0.96), rgba(251, 250, 238, 0.72) 34%, rgba(251, 250, 238, 0) 62%);
}

.page-heading.split-heading:has(.bank-visual)::before,
.page-heading.split-heading:has(.hamyon-visual)::before,
.page-heading.split-heading:has(.learning-visual)::before {
  background:
    linear-gradient(90deg, rgba(251, 250, 238, 0) 0%, rgba(251, 250, 238, 0) 38%, rgba(251, 250, 238, 0.76) 59%, rgba(251, 250, 238, 0.96) 100%);
}

.page-heading.split-heading:has(.bank-visual) > div:first-child,
.page-heading.split-heading:has(.hamyon-visual) > div:first-child,
.page-heading.split-heading:has(.learning-visual) > div:first-child {
  justify-self: end;
  width: min(100%, 480px);
  margin-right: clamp(8px, 2vw, 28px);
}

.page-heading.split-heading:has(.rewards-visual) > div:first-child {
  width: min(100%, 520px);
  margin-left: clamp(8px, 2vw, 28px);
}

.page-heading.split-heading:has(.bank-visual) .core-page-visual > .button,
.page-heading.split-heading:has(.hamyon-visual) .core-page-visual > .button,
.page-heading.split-heading:has(.learning-visual) .core-page-visual > .button,
.page-heading.split-heading:has(.learning-visual) .core-page-visual > .status-pill {
  right: clamp(28px, 5vw, 72px);
}

@media (max-width: 719px) {
  .page-heading.split-heading:has(.core-page-visual:not(.small-icon-visual)) {
    aspect-ratio: auto;
    min-height: 390px;
  }

  .page-heading.split-heading:has(.core-page-visual:not(.small-icon-visual)) .core-page-visual > img {
    object-fit: contain;
    object-position: top center;
  }

  .page-heading.split-heading:has(.core-page-visual:not(.small-icon-visual))::before,
  .page-heading.split-heading:has(.bank-visual)::before,
  .page-heading.split-heading:has(.hamyon-visual)::before,
  .page-heading.split-heading:has(.learning-visual)::before {
    background:
      linear-gradient(0deg, rgba(251, 250, 238, 0.98), rgba(251, 250, 238, 0.88) 34%, rgba(251, 250, 238, 0) 72%);
  }

  .page-heading.split-heading:has(.bank-visual) > div:first-child,
  .page-heading.split-heading:has(.hamyon-visual) > div:first-child,
  .page-heading.split-heading:has(.learning-visual) > div:first-child,
  .page-heading.split-heading:has(.rewards-visual) > div:first-child {
    justify-self: stretch;
    width: 100%;
    margin-inline: 0;
  }
}

/* Core hero final placement: keep artwork vivid, put text into the empty banner area. */
.page-heading.split-heading:has(.core-page-visual:not(.small-icon-visual)) .core-page-visual > img {
  opacity: 1;
  filter: none;
}

.page-heading.split-heading:has(.bank-visual)::before,
.page-heading.split-heading:has(.hamyon-visual)::before,
.page-heading.split-heading:has(.learning-visual)::before {
  background:
    linear-gradient(90deg, rgba(251, 250, 238, 0) 0%, rgba(251, 250, 238, 0) 54%, rgba(251, 250, 238, 0.16) 68%, rgba(251, 250, 238, 0.46) 100%);
}

.page-heading.split-heading:has(.rewards-visual)::before {
  background:
    linear-gradient(90deg, rgba(251, 250, 238, 0.46), rgba(251, 250, 238, 0.2) 36%, rgba(251, 250, 238, 0) 66%);
}

.page-heading.split-heading:has(.bank-visual) > div:first-child,
.page-heading.split-heading:has(.hamyon-visual) > div:first-child,
.page-heading.split-heading:has(.learning-visual) > div:first-child {
  justify-self: end;
  width: min(38vw, 420px);
  min-width: 340px;
  margin-right: clamp(36px, 8vw, 118px);
  text-shadow: 0 1px 0 rgba(251, 250, 238, 0.72), 0 10px 26px rgba(251, 250, 238, 0.34);
}

.page-heading.split-heading:has(.bank-visual) > div:first-child h1,
.page-heading.split-heading:has(.hamyon-visual) > div:first-child h1,
.page-heading.split-heading:has(.learning-visual) > div:first-child h1 {
  max-width: 10ch;
}

.page-heading.split-heading:has(.bank-visual) .core-page-visual > .button,
.page-heading.split-heading:has(.hamyon-visual) .core-page-visual > .button,
.page-heading.split-heading:has(.learning-visual) .core-page-visual > .button,
.page-heading.split-heading:has(.learning-visual) .core-page-visual > .status-pill {
  right: clamp(44px, 8vw, 126px);
}

.page-heading.split-heading:has(.rewards-visual) > div:first-child {
  text-shadow: 0 1px 0 rgba(251, 250, 238, 0.72), 0 10px 26px rgba(251, 250, 238, 0.28);
}

@media (max-width: 980px) {
  .page-heading.split-heading:has(.bank-visual) > div:first-child,
  .page-heading.split-heading:has(.hamyon-visual) > div:first-child,
  .page-heading.split-heading:has(.learning-visual) > div:first-child {
    width: min(48vw, 390px);
    min-width: 300px;
    margin-right: clamp(18px, 4vw, 44px);
  }
}

@media (max-width: 719px) {
  .page-heading.split-heading:has(.bank-visual)::before,
  .page-heading.split-heading:has(.hamyon-visual)::before,
  .page-heading.split-heading:has(.learning-visual)::before,
  .page-heading.split-heading:has(.rewards-visual)::before {
    background:
      linear-gradient(0deg, rgba(251, 250, 238, 0.88), rgba(251, 250, 238, 0.58) 38%, rgba(251, 250, 238, 0) 74%);
  }

  .page-heading.split-heading:has(.bank-visual) > div:first-child,
  .page-heading.split-heading:has(.hamyon-visual) > div:first-child,
  .page-heading.split-heading:has(.learning-visual) > div:first-child,
  .page-heading.split-heading:has(.rewards-visual) > div:first-child {
    width: 100%;
    min-width: 0;
    margin-inline: 0;
  }

  .page-heading.split-heading:has(.bank-visual) > div:first-child h1,
  .page-heading.split-heading:has(.hamyon-visual) > div:first-child h1,
  .page-heading.split-heading:has(.learning-visual) > div:first-child h1 {
    max-width: 100%;
  }
}

/* Definitive vivid hero layout for Bank, Hamyonlar and O'rganish pages. */
.page-heading.split-heading:has(.bank-visual),
.page-heading.split-heading:has(.hamyon-visual),
.page-heading.split-heading:has(.learning-visual) {
  position: relative !important;
  display: block !important;
  overflow: hidden !important;
  padding: 0 !important;
  aspect-ratio: 16 / 9 !important;
  min-height: 0 !important;
  background: #fbfaee !important;
}

.page-heading.split-heading:has(.bank-visual)::before,
.page-heading.split-heading:has(.hamyon-visual)::before,
.page-heading.split-heading:has(.learning-visual)::before {
  display: none !important;
  content: none !important;
  background: none !important;
}

.page-heading.split-heading:has(.bank-visual) .core-page-visual,
.page-heading.split-heading:has(.hamyon-visual) .core-page-visual,
.page-heading.split-heading:has(.learning-visual) .core-page-visual {
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

.page-heading.split-heading:has(.bank-visual) .core-page-visual > img,
.page-heading.split-heading:has(.hamyon-visual) .core-page-visual > img,
.page-heading.split-heading:has(.learning-visual) .core-page-visual > img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center !important;
  opacity: 1 !important;
  filter: none !important;
  mix-blend-mode: normal !important;
  background: #fbfaee !important;
  border: 0 !important;
  box-shadow: none !important;
}

.page-heading.split-heading:has(.bank-visual) > div:first-child,
.page-heading.split-heading:has(.hamyon-visual) > div:first-child,
.page-heading.split-heading:has(.learning-visual) > div:first-child {
  position: absolute !important;
  z-index: 2 !important;
  top: 50% !important;
  right: clamp(22px, 5vw, 76px) !important;
  left: auto !important;
  transform: translateY(-50%) !important;
  width: clamp(270px, 25vw, 370px) !important;
  min-width: 0 !important;
  max-width: 370px !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
  text-shadow: 0 1px 0 rgba(255, 252, 231, 0.9), 0 12px 28px rgba(255, 252, 231, 0.52) !important;
}

.page-heading.split-heading:has(.bank-visual) > div:first-child h1,
.page-heading.split-heading:has(.hamyon-visual) > div:first-child h1,
.page-heading.split-heading:has(.learning-visual) > div:first-child h1 {
  max-width: 9ch !important;
}

.page-heading.split-heading:has(.bank-visual) .core-page-visual > .button,
.page-heading.split-heading:has(.hamyon-visual) .core-page-visual > .button,
.page-heading.split-heading:has(.learning-visual) .core-page-visual > .button,
.page-heading.split-heading:has(.learning-visual) .core-page-visual > .status-pill {
  position: absolute !important;
  z-index: 3 !important;
  right: clamp(22px, 5vw, 76px) !important;
  bottom: clamp(22px, 4vw, 54px) !important;
  left: auto !important;
  margin: 0 !important;
}

@media (max-width: 719px) {
  .page-heading.split-heading:has(.bank-visual),
  .page-heading.split-heading:has(.hamyon-visual),
  .page-heading.split-heading:has(.learning-visual) {
    aspect-ratio: auto !important;
    min-height: 390px !important;
  }

  .page-heading.split-heading:has(.bank-visual)::after,
  .page-heading.split-heading:has(.hamyon-visual)::after,
  .page-heading.split-heading:has(.learning-visual)::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 48%;
    z-index: 1;
    background: linear-gradient(0deg, rgba(251, 250, 238, 0.96), rgba(251, 250, 238, 0.68) 58%, rgba(251, 250, 238, 0));
    pointer-events: none;
  }

  .page-heading.split-heading:has(.bank-visual) > div:first-child,
  .page-heading.split-heading:has(.hamyon-visual) > div:first-child,
  .page-heading.split-heading:has(.learning-visual) > div:first-child {
    top: auto !important;
    right: 18px !important;
    left: 18px !important;
    bottom: 78px !important;
    transform: none !important;
    width: auto !important;
    max-width: none !important;
  }

  .page-heading.split-heading:has(.bank-visual) > div:first-child h1,
  .page-heading.split-heading:has(.hamyon-visual) > div:first-child h1,
  .page-heading.split-heading:has(.learning-visual) > div:first-child h1 {
    max-width: 100% !important;
  }

  .page-heading.split-heading:has(.bank-visual) .core-page-visual > .button,
  .page-heading.split-heading:has(.hamyon-visual) .core-page-visual > .button,
  .page-heading.split-heading:has(.learning-visual) .core-page-visual > .button,
  .page-heading.split-heading:has(.learning-visual) .core-page-visual > .status-pill {
    right: 18px !important;
    bottom: 18px !important;
  }
}

/* Mobile hero layout: keep artwork clear and move text below the banner. */
@media (max-width: 719px) {
  .page-heading.split-heading:has(.bank-visual),
  .page-heading.split-heading:has(.hamyon-visual),
  .page-heading.split-heading:has(.learning-visual) {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    aspect-ratio: auto !important;
    min-height: 0 !important;
    padding: 12px !important;
    overflow: visible !important;
    background: #fffdf1 !important;
  }

  .page-heading.split-heading:has(.bank-visual)::after,
  .page-heading.split-heading:has(.hamyon-visual)::after,
  .page-heading.split-heading:has(.learning-visual)::after {
    display: none !important;
    content: none !important;
  }

  .page-heading.split-heading:has(.bank-visual) .core-page-visual,
  .page-heading.split-heading:has(.hamyon-visual) .core-page-visual,
  .page-heading.split-heading:has(.learning-visual) .core-page-visual {
    position: relative !important;
    inset: auto !important;
    z-index: 0 !important;
    order: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-heading.split-heading:has(.bank-visual) .core-page-visual > img,
  .page-heading.split-heading:has(.hamyon-visual) .core-page-visual > img,
  .page-heading.split-heading:has(.learning-visual) .core-page-visual > img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 8px !important;
  }

  .page-heading.split-heading:has(.bank-visual) > div:first-child,
  .page-heading.split-heading:has(.hamyon-visual) > div:first-child,
  .page-heading.split-heading:has(.learning-visual) > div:first-child {
    position: relative !important;
    z-index: 1 !important;
    order: 2 !important;
    inset: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    padding: 0 2px 2px !important;
    text-shadow: none !important;
  }

  .page-heading.split-heading:has(.bank-visual) > div:first-child h1,
  .page-heading.split-heading:has(.hamyon-visual) > div:first-child h1,
  .page-heading.split-heading:has(.learning-visual) > div:first-child h1 {
    max-width: 100% !important;
    font-size: clamp(2.4rem, 13vw, 3.6rem) !important;
    line-height: 0.95 !important;
  }

  .page-heading.split-heading:has(.bank-visual) > div:first-child .lead,
  .page-heading.split-heading:has(.hamyon-visual) > div:first-child .lead,
  .page-heading.split-heading:has(.learning-visual) > div:first-child .lead {
    max-width: 100% !important;
  }

  .page-heading.split-heading:has(.bank-visual) .core-page-visual > .button,
  .page-heading.split-heading:has(.hamyon-visual) .core-page-visual > .button,
  .page-heading.split-heading:has(.learning-visual) .core-page-visual > .button,
  .page-heading.split-heading:has(.learning-visual) .core-page-visual > .status-pill {
    position: relative !important;
    inset: auto !important;
    z-index: 1 !important;
    width: 100% !important;
    margin: 0 !important;
    justify-content: center !important;
  }
}

/* Mobile hero layout for Reytinglar/Progress page too. */
@media (max-width: 719px) {
  .page-heading.split-heading:has(.rewards-visual) {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    aspect-ratio: auto !important;
    min-height: 0 !important;
    padding: 12px !important;
    overflow: visible !important;
    background: #fffdf1 !important;
  }

  .page-heading.split-heading:has(.rewards-visual)::before,
  .page-heading.split-heading:has(.rewards-visual)::after {
    display: none !important;
    content: none !important;
    background: none !important;
  }

  .page-heading.split-heading:has(.rewards-visual) .core-page-visual {
    position: relative !important;
    inset: auto !important;
    z-index: 0 !important;
    order: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-heading.split-heading:has(.rewards-visual) .core-page-visual > img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    object-fit: cover !important;
    object-position: center !important;
    opacity: 1 !important;
    filter: none !important;
    border-radius: 8px !important;
  }

  .page-heading.split-heading:has(.rewards-visual) > div:first-child {
    position: relative !important;
    z-index: 1 !important;
    order: 2 !important;
    inset: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 2px 2px !important;
    text-shadow: none !important;
  }

  .page-heading.split-heading:has(.rewards-visual) > div:first-child h1 {
    max-width: 100% !important;
    font-size: clamp(2.4rem, 13vw, 3.6rem) !important;
    line-height: 0.95 !important;
  }

  .page-heading.split-heading:has(.rewards-visual) .core-page-visual > .button {
    position: relative !important;
    inset: auto !important;
    z-index: 1 !important;
    width: 100% !important;
    margin: 0 !important;
    justify-content: center !important;
  }
}

/* Active learner avatar in the mobile tabbar. */
.mobile-tabbar .tabbar-profile-icon {
  overflow: hidden;
  background: var(--avatar-bg, var(--leaf-100));
  border: 1px solid rgba(120, 200, 65, 0.42);
  box-shadow: 0 6px 14px rgba(35, 86, 21, 0.12);
}

.mobile-tabbar .tabbar-profile-icon img {
  width: 100%;
  height: 100%;
  padding: 1px;
  object-fit: cover;
  border-radius: 8px;
}

/* Profile dashboard polish and mobile more menu. */
.learner-big-avatar {
  width: clamp(86px, 9vw, 122px);
  height: clamp(86px, 9vw, 122px);
  border-radius: 22px;
}

.learner-big-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


@media (max-width: 520px) {
  .learner-big-avatar {
    width: 78px;
    height: 78px;
    border-radius: 18px;
  }
}

/* Illustrated statistic cards. */
.stat-card.stat-bank,
.stat-card.stat-hamyon,
.stat-card.stat-seyf,
.stat-card.stat-coin,
.stat-card.stat-rating,
.learner-metric.bank,
.learner-metric.wallet,
.learner-metric.safe,
.learner-metric.rank,
.coin-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-position: center right;
  background-size: cover;
  background-repeat: no-repeat;
}

.stat-card.stat-bank::before,
.stat-card.stat-hamyon::before,
.stat-card.stat-seyf::before,
.stat-card.stat-coin::before,
.stat-card.stat-rating::before,
.learner-metric.bank::before,
.learner-metric.wallet::before,
.learner-metric.safe::before,
.learner-metric.rank::before,
.coin-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(255, 253, 241, 0.92), rgba(255, 253, 241, 0.68) 46%, rgba(255, 253, 241, 0.08));
}

.stat-card.stat-bank,
.learner-metric.bank {
  background-image: url("/static/img/core/bank/cards/stat_1200x480.9f9449a01c6a.webp");
}

.stat-card.stat-hamyon,
.learner-metric.wallet {
  background-image: url("/static/img/core/hamyon/cards/stat_1200x480.49c5475b9465.webp");
}

.stat-card.stat-seyf,
.learner-metric.safe {
  background-image: url("/static/img/core/seyf/cards/stat_1200x480.072da85413b8.webp");
}

.stat-card.stat-coin,
.coin-card {
  background-image: url("/static/img/core/rewards/cards/coin_stat_1200x480.4c62e875a231.webp");
}

.stat-card.stat-rating,
.learner-metric.rank {
  background-image: url("/static/img/core/rating/cards/stat_1200x480.4a6bf73ed911.webp");
}

.stat-card.stat-bank strong,
.stat-card.stat-hamyon strong,
.stat-card.stat-seyf strong,
.stat-card.stat-coin strong,
.stat-card.stat-rating strong,
.stat-card.stat-bank span,
.stat-card.stat-hamyon span,
.stat-card.stat-seyf span,
.stat-card.stat-coin span,
.stat-card.stat-rating span,
.learner-metric strong,
.learner-metric small,
.coin-card strong,
.coin-card p {
  position: relative;
  z-index: 1;
}

@media (max-width: 520px) {
  .stat-card.stat-bank,
  .stat-card.stat-hamyon,
  .stat-card.stat-seyf,
  .stat-card.stat-coin,
  .stat-card.stat-rating {
    min-height: 92px;
    background-position: center right;
  }

  .stat-card.stat-bank::before,
  .stat-card.stat-hamyon::before,
  .stat-card.stat-seyf::before,
  .stat-card.stat-coin::before,
  .stat-card.stat-rating::before {
    background: linear-gradient(90deg, rgba(255, 253, 241, 0.94), rgba(255, 253, 241, 0.72) 52%, rgba(255, 253, 241, 0.18));
  }
}

/* Keep statistic card artwork vivid; shade only the text zone. */
.stat-card.stat-bank::before,
.stat-card.stat-hamyon::before,
.stat-card.stat-seyf::before,
.stat-card.stat-coin::before,
.stat-card.stat-rating::before,
.learner-metric.bank::before,
.learner-metric.wallet::before,
.learner-metric.safe::before,
.learner-metric.rank::before,
.coin-card::before {
  background: linear-gradient(90deg, rgba(255, 253, 241, 0.9) 0%, rgba(255, 253, 241, 0.7) 28%, rgba(255, 253, 241, 0.22) 46%, rgba(255, 253, 241, 0) 62%) !important;
}

@media (max-width: 520px) {
  .stat-card.stat-bank::before,
  .stat-card.stat-hamyon::before,
  .stat-card.stat-seyf::before,
  .stat-card.stat-coin::before,
  .stat-card.stat-rating::before {
    background: linear-gradient(90deg, rgba(255, 253, 241, 0.92) 0%, rgba(255, 253, 241, 0.68) 34%, rgba(255, 253, 241, 0.18) 52%, rgba(255, 253, 241, 0) 70%) !important;
  }
}

/* Home page hero: use the illustration as the main banner behind the text. */
.home-hero.section-band {
  position: relative;
  display: block !important;
  min-height: 0 !important;
  aspect-ratio: 16 / 9;
  max-height: 620px;
  overflow: hidden;
  padding: 0 !important;
  border: 1px solid rgba(223, 232, 207, 0.9);
  border-radius: var(--radius);
  background: var(--surface-warm);
  box-shadow: var(--shadow-soft);
  isolation: isolate;
}

.home-hero.section-band .bank-journey-board {
  position: absolute !important;
  inset: 0;
  z-index: 0;
  display: block !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: inherit;
  background: transparent !important;
  box-shadow: none !important;
}

.home-hero.section-band .bank-journey-board::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(255, 253, 241, 0.88) 0%, rgba(255, 253, 241, 0.66) 31%, rgba(255, 253, 241, 0.2) 50%, rgba(255, 253, 241, 0) 68%);
  pointer-events: none;
}

.home-hero.section-band .home-hero-image {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: cover;
  object-position: center;
  border: 0 !important;
  border-radius: inherit !important;
  box-shadow: none !important;
  opacity: 1 !important;
  filter: none !important;
}

.home-hero.section-band .home-hero-copy {
  position: absolute;
  left: clamp(34px, 7vw, 112px);
  top: 50%;
  z-index: 2;
  width: min(46%, 620px);
  max-width: none !important;
  transform: translateY(-50%);
}

.home-hero.section-band .home-hero-copy h1 {
  max-width: 9.5ch;
}

.home-hero.section-band .home-hero-copy .lead {
  max-width: 48ch;
}

.home-hero.section-band .journey-node {
  position: absolute;
  right: clamp(24px, 5vw, 84px);
  z-index: 2;
  width: min(27vw, 320px);
  min-height: 78px;
  padding: 12px;
  background: rgba(255, 253, 241, 0.78);
  backdrop-filter: blur(4px);
  box-shadow: var(--shadow-soft);
}

.home-hero.section-band .journey-node.bank {
  top: 26%;
}

.home-hero.section-band .journey-node.wallet {
  top: calc(26% + 92px);
}

.home-hero.section-band .journey-node.safe {
  top: calc(26% + 184px);
}

.home-hero.section-band .journey-node > span {
  width: 46px;
  height: 46px;
}

@media (max-width: 900px) {
  .home-hero.section-band .home-hero-copy {
    left: 28px;
    width: 50%;
  }

  .home-hero.section-band .journey-node {
    right: 22px;
    width: 250px;
  }
}

@media (max-width: 759px) {
  .home-hero.section-band {
    display: grid !important;
    aspect-ratio: auto;
    max-height: none;
    padding: 12px !important;
    gap: 12px;
    overflow: visible;
  }

  .home-hero.section-band .bank-journey-board {
    position: relative !important;
    inset: auto;
    z-index: 0;
    order: 1;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    border-radius: calc(var(--radius) - 2px);
  }

  .home-hero.section-band .bank-journey-board::before {
    display: none;
  }

  .home-hero.section-band .home-hero-image {
    position: relative;
    grid-column: 1 / -1;
    width: 100% !important;
    height: auto !important;
    min-height: 190px;
    aspect-ratio: 16 / 9 !important;
    object-fit: cover;
    object-position: center;
    border-radius: calc(var(--radius) - 2px) !important;
  }

  .home-hero.section-band .home-hero-copy {
    position: relative;
    left: auto;
    top: auto;
    z-index: 1;
    order: 2;
    width: 100%;
    transform: none;
  }

  .home-hero.section-band .home-hero-copy h1 {
    max-width: 100%;
  }

  .home-hero.section-band .journey-node {
    position: relative;
    right: auto;
    top: auto !important;
    width: auto;
    min-height: 84px;
    padding: 8px;
    gap: 5px;
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    background: rgba(255, 253, 241, 0.84);
  }

  .home-hero.section-band .journey-node > span {
    grid-row: auto;
    width: 42px;
    height: 42px;
  }

  .home-hero.section-band .journey-node small {
    display: none;
  }
}

/* Full-bleed home hero on desktop: banner spans the viewport, content stays aligned. */
@media (min-width: 760px) {
  .home-hero.section-band {
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    min-height: clamp(520px, calc(100svh - 96px), 760px) !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-radius: 0 !important;
  }

  .home-hero.section-band .home-hero-copy {
    left: max(34px, calc((100vw - var(--content)) / 2 + 34px)) !important;
    width: min(42vw, 600px) !important;
  }

  .home-hero.section-band .journey-node {
    right: max(34px, calc((100vw - var(--content)) / 2 + 34px)) !important;
    width: min(25vw, 320px) !important;
  }

  .home-hero.section-band .bank-journey-board::before {
    background: linear-gradient(90deg, rgba(255, 253, 241, 0.76) 0%, rgba(255, 253, 241, 0.52) 30%, rgba(255, 253, 241, 0.13) 49%, rgba(255, 253, 241, 0) 66%) !important;
  }
}

/* Home banner refinement: no cropped heads, no haze over characters. */
@media (min-width: 760px) {
  .home-hero.section-band {
    min-height: calc(100svh - 82px) !important;
    background: #fff8da !important;
  }

  .home-hero.section-band .home-hero-image {
    object-fit: contain !important;
    object-position: center bottom !important;
    background: #fff8da !important;
  }

  .home-hero.section-band .bank-journey-board::before {
    background: radial-gradient(ellipse at 34% 50%, rgba(255, 253, 241, 0.82) 0%, rgba(255, 253, 241, 0.62) 22%, rgba(255, 253, 241, 0.18) 38%, rgba(255, 253, 241, 0) 56%) !important;
  }

  .home-hero.section-band .home-hero-copy {
    padding: 16px 18px;
    border-radius: var(--radius);
    background: rgba(255, 253, 241, 0.18);
    backdrop-filter: blur(1.5px);
  }
}

/* Home banner should fill the whole first screen without side gaps. */
@media (min-width: 760px) {
  .home-hero.section-band {
    min-height: calc(100svh - 58px) !important;
    background: #fff8da !important;
  }

  .home-hero.section-band .home-hero-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center top !important;
  }

  .home-hero.section-band .bank-journey-board::before {
    display: none !important;
  }

  .home-hero.section-band .home-hero-copy {
    background: rgba(255, 253, 241, 0.46) !important;
    box-shadow: 0 18px 45px rgba(255, 253, 241, 0.24);
  }
}

/* Final desktop layout for illustrated page headers: full-width, compact, content-friendly. */
@media (min-width: 760px) {
  .page-heading.split-heading:has(.bank-visual),
  .page-heading.split-heading:has(.hamyon-visual),
  .page-heading.split-heading:has(.learning-visual),
  .page-heading.split-heading:has(.rewards-visual) {
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    min-height: clamp(300px, 40svh, 470px) !important;
    max-height: 470px !important;
    aspect-ratio: auto !important;
    padding: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff8da !important;
  }

  .page-heading.split-heading:has(.bank-visual)::before,
  .page-heading.split-heading:has(.hamyon-visual)::before,
  .page-heading.split-heading:has(.learning-visual)::before,
  .page-heading.split-heading:has(.rewards-visual)::before,
  .page-heading.split-heading:has(.bank-visual)::after,
  .page-heading.split-heading:has(.hamyon-visual)::after,
  .page-heading.split-heading:has(.learning-visual)::after,
  .page-heading.split-heading:has(.rewards-visual)::after {
    display: none !important;
    content: none !important;
  }

  .page-heading.split-heading:has(.bank-visual) .core-page-visual,
  .page-heading.split-heading:has(.hamyon-visual) .core-page-visual,
  .page-heading.split-heading:has(.learning-visual) .core-page-visual,
  .page-heading.split-heading:has(.rewards-visual) .core-page-visual {
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
  }

  .page-heading.split-heading:has(.bank-visual) .core-page-visual > img,
  .page-heading.split-heading:has(.hamyon-visual) .core-page-visual > img,
  .page-heading.split-heading:has(.learning-visual) .core-page-visual > img,
  .page-heading.split-heading:has(.rewards-visual) .core-page-visual > img {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: cover !important;
    object-position: center top !important;
    opacity: 1 !important;
    filter: none !important;
    mix-blend-mode: normal !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff8da !important;
  }

  .page-heading.split-heading:has(.bank-visual) > div:first-child,
  .page-heading.split-heading:has(.hamyon-visual) > div:first-child,
  .page-heading.split-heading:has(.learning-visual) > div:first-child,
  .page-heading.split-heading:has(.rewards-visual) > div:first-child {
    position: absolute !important;
    z-index: 2 !important;
    top: 50% !important;
    right: max(34px, calc((100vw - var(--content)) / 2 + 34px)) !important;
    left: auto !important;
    bottom: auto !important;
    width: min(37vw, 510px) !important;
    max-width: 510px !important;
    min-width: 330px !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    padding: 16px 18px !important;
    border-radius: var(--radius) !important;
    background: rgba(255, 253, 241, 0.42) !important;
    text-align: left !important;
    text-shadow: 0 1px 0 rgba(255, 252, 231, 0.88), 0 10px 24px rgba(255, 252, 231, 0.38) !important;
    box-shadow: 0 18px 45px rgba(255, 253, 241, 0.2) !important;
    backdrop-filter: blur(1px) !important;
  }

  .page-heading.split-heading:has(.bank-visual) > div:first-child h1,
  .page-heading.split-heading:has(.hamyon-visual) > div:first-child h1,
  .page-heading.split-heading:has(.learning-visual) > div:first-child h1,
  .page-heading.split-heading:has(.rewards-visual) > div:first-child h1 {
    max-width: 10.5ch !important;
    font-size: clamp(3rem, 5vw, 5.4rem) !important;
    line-height: 0.9 !important;
  }

  .page-heading.split-heading:has(.bank-visual) > div:first-child .lead,
  .page-heading.split-heading:has(.hamyon-visual) > div:first-child .lead,
  .page-heading.split-heading:has(.learning-visual) > div:first-child .lead,
  .page-heading.split-heading:has(.rewards-visual) > div:first-child .lead,
  .page-heading.split-heading:has(.bank-visual) > div:first-child p,
  .page-heading.split-heading:has(.hamyon-visual) > div:first-child p,
  .page-heading.split-heading:has(.learning-visual) > div:first-child p,
  .page-heading.split-heading:has(.rewards-visual) > div:first-child p {
    max-width: 44ch !important;
  }

  .page-heading.split-heading:has(.bank-visual) .core-page-visual > .button,
  .page-heading.split-heading:has(.hamyon-visual) .core-page-visual > .button,
  .page-heading.split-heading:has(.learning-visual) .core-page-visual > .button,
  .page-heading.split-heading:has(.learning-visual) .core-page-visual > .status-pill,
  .page-heading.split-heading:has(.rewards-visual) .core-page-visual > .button {
    position: absolute !important;
    z-index: 3 !important;
    right: max(34px, calc((100vw - var(--content)) / 2 + 34px)) !important;
    bottom: clamp(20px, 4svh, 46px) !important;
    left: auto !important;
    margin: 0 !important;
  }
}

/* Full-screen illustrated headers for the main learning pages, matching the home hero. */
@media (min-width: 760px) {
  .page-heading.split-heading:has(.bank-visual),
  .page-heading.split-heading:has(.hamyon-visual),
  .page-heading.split-heading:has(.learning-visual),
  .page-heading.split-heading:has(.rewards-visual) {
    min-height: calc(100svh - 58px) !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    background: #fff8da !important;
  }

  .page-heading.split-heading:has(.bank-visual) .core-page-visual > img,
  .page-heading.split-heading:has(.hamyon-visual) .core-page-visual > img,
  .page-heading.split-heading:has(.learning-visual) .core-page-visual > img,
  .page-heading.split-heading:has(.rewards-visual) .core-page-visual > img {
    object-fit: cover !important;
    object-position: center top !important;
  }

  .page-heading.split-heading:has(.bank-visual) > div:first-child,
  .page-heading.split-heading:has(.hamyon-visual) > div:first-child,
  .page-heading.split-heading:has(.learning-visual) > div:first-child,
  .page-heading.split-heading:has(.rewards-visual) > div:first-child {
    top: 50% !important;
    right: max(34px, calc((100vw - var(--content)) / 2 + 34px)) !important;
    width: min(38vw, 520px) !important;
    max-width: 520px !important;
    min-width: 340px !important;
    background: rgba(255, 253, 241, 0.46) !important;
  }

  .page-heading.split-heading:has(.bank-visual) .core-page-visual > .button,
  .page-heading.split-heading:has(.hamyon-visual) .core-page-visual > .button,
  .page-heading.split-heading:has(.learning-visual) .core-page-visual > .button,
  .page-heading.split-heading:has(.learning-visual) .core-page-visual > .status-pill,
  .page-heading.split-heading:has(.rewards-visual) .core-page-visual > .button {
    right: max(34px, calc((100vw - var(--content)) / 2 + 34px)) !important;
    bottom: clamp(28px, 8svh, 76px) !important;
  }
}

/* Content-first illustrated pages: banner becomes page background, not a tall hero block. */
@media (min-width: 760px) {
  .page-shell:has(.page-heading.split-heading .core-page-visual:not(.small-icon-visual)) {
    position: relative;
    isolation: isolate;
    padding-top: clamp(18px, 3svh, 32px);
  }

  .page-shell:has(.page-heading.split-heading .core-page-visual:not(.small-icon-visual))::before {
    content: "";
    position: fixed;
    inset: 82px 0 0 0;
    z-index: -2;
    background: linear-gradient(180deg, rgba(255, 253, 241, 0.22), rgba(255, 253, 241, 0.84) 72%, rgba(255, 253, 241, 0.94));
    pointer-events: none;
  }

  .page-heading.split-heading:has(.bank-visual),
  .page-heading.split-heading:has(.hamyon-visual),
  .page-heading.split-heading:has(.learning-visual),
  .page-heading.split-heading:has(.rewards-visual) {
    position: relative !important;
    display: block !important;
    width: min(var(--content), calc(100% - 28px)) !important;
    min-height: 0 !important;
    max-height: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 16px !important;
    padding: clamp(12px, 2vw, 18px) !important;
    border: 0 !important;
    border-radius: var(--radius) !important;
    overflow: visible !important;
    background: transparent !important;
    box-shadow: none !important;
    aspect-ratio: auto !important;
  }

  .page-heading.split-heading:has(.bank-visual)::before,
  .page-heading.split-heading:has(.hamyon-visual)::before,
  .page-heading.split-heading:has(.learning-visual)::before,
  .page-heading.split-heading:has(.rewards-visual)::before,
  .page-heading.split-heading:has(.bank-visual)::after,
  .page-heading.split-heading:has(.hamyon-visual)::after,
  .page-heading.split-heading:has(.learning-visual)::after,
  .page-heading.split-heading:has(.rewards-visual)::after {
    display: none !important;
    content: none !important;
  }

  .page-heading.split-heading:has(.bank-visual) .core-page-visual,
  .page-heading.split-heading:has(.hamyon-visual) .core-page-visual,
  .page-heading.split-heading:has(.learning-visual) .core-page-visual,
  .page-heading.split-heading:has(.rewards-visual) .core-page-visual {
    position: fixed !important;
    inset: 82px 0 0 0 !important;
    z-index: -3 !important;
    display: block !important;
    width: 100vw !important;
    height: calc(100svh - 82px) !important;
    min-width: 0 !important;
    pointer-events: none !important;
  }

  .page-heading.split-heading:has(.bank-visual) .core-page-visual > img,
  .page-heading.split-heading:has(.hamyon-visual) .core-page-visual > img,
  .page-heading.split-heading:has(.learning-visual) .core-page-visual > img,
  .page-heading.split-heading:has(.rewards-visual) .core-page-visual > img {
    width: 100vw !important;
    height: 100% !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: cover !important;
    object-position: center top !important;
    opacity: 1 !important;
    filter: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff8da !important;
  }

  .page-heading.split-heading:has(.bank-visual) > div:first-child,
  .page-heading.split-heading:has(.hamyon-visual) > div:first-child,
  .page-heading.split-heading:has(.learning-visual) > div:first-child,
  .page-heading.split-heading:has(.rewards-visual) > div:first-child {
    position: relative !important;
    inset: auto !important;
    z-index: 2 !important;
    width: min(100%, 620px) !important;
    max-width: 620px !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 14px 16px !important;
    transform: none !important;
    border-radius: var(--radius) !important;
    background: rgba(255, 253, 241, 0.62) !important;
    backdrop-filter: blur(1px) !important;
    text-align: left !important;
    text-shadow: 0 1px 0 rgba(255, 252, 231, 0.86) !important;
    box-shadow: var(--shadow-soft) !important;
  }

  .page-heading.split-heading:has(.bank-visual) > div:first-child h1,
  .page-heading.split-heading:has(.hamyon-visual) > div:first-child h1,
  .page-heading.split-heading:has(.learning-visual) > div:first-child h1,
  .page-heading.split-heading:has(.rewards-visual) > div:first-child h1 {
    max-width: 100% !important;
    font-size: clamp(2.5rem, 4.2vw, 4.25rem) !important;
    line-height: 0.92 !important;
  }

  .page-heading.split-heading:has(.bank-visual) > div:first-child p,
  .page-heading.split-heading:has(.hamyon-visual) > div:first-child p,
  .page-heading.split-heading:has(.learning-visual) > div:first-child p,
  .page-heading.split-heading:has(.rewards-visual) > div:first-child p,
  .page-heading.split-heading:has(.bank-visual) > div:first-child .lead,
  .page-heading.split-heading:has(.hamyon-visual) > div:first-child .lead,
  .page-heading.split-heading:has(.learning-visual) > div:first-child .lead,
  .page-heading.split-heading:has(.rewards-visual) > div:first-child .lead {
    max-width: 58ch !important;
  }

  .page-heading.split-heading:has(.bank-visual) .core-page-visual > .button,
  .page-heading.split-heading:has(.hamyon-visual) .core-page-visual > .button,
  .page-heading.split-heading:has(.learning-visual) .core-page-visual > .button,
  .page-heading.split-heading:has(.learning-visual) .core-page-visual > .status-pill,
  .page-heading.split-heading:has(.rewards-visual) .core-page-visual > .button {
    position: absolute !important;
    z-index: 3 !important;
    left: auto !important;
    right: max(22px, calc((100vw - var(--content)) / 2 + 22px)) !important;
    top: 16px !important;
    bottom: auto !important;
    margin: 0 !important;
    pointer-events: auto !important;
  }

  .page-heading.split-heading:has(.bank-visual) ~ .section-panel,
  .page-heading.split-heading:has(.hamyon-visual) ~ .section-panel,
  .page-heading.split-heading:has(.learning-visual) ~ .section-panel,
  .page-heading.split-heading:has(.rewards-visual) ~ .section-panel,
  .page-heading.split-heading:has(.bank-visual) ~ form,
  .page-heading.split-heading:has(.hamyon-visual) ~ form,
  .page-heading.split-heading:has(.learning-visual) ~ form,
  .page-heading.split-heading:has(.rewards-visual) ~ form {
    position: relative;
    z-index: 1;
  }
}



/* Theme system */
:root {
  --radius-sm: 10px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --text: var(--ink);
  --green-dark: var(--leaf-800);
  --paper-rgb: 255, 249, 237;
  --surface-rgb: 255, 255, 255;
  --header-bg: rgba(255, 249, 237, 0.88);
  --floating-bg: rgba(255, 255, 255, 0.94);
  --hero-wash-start: rgba(234, 247, 232, 0.96);
  --hero-wash-end: rgba(255, 249, 237, 0.98);
  --pattern-leaf: rgba(40, 168, 62, 0.12);
  --pattern-sun: rgba(255, 201, 40, 0.16);
  --focus-ring: rgba(57, 125, 255, 0.2);
  --overlay: rgba(18, 59, 50, 0.38);
  --danger-ink: #a72e35;
  --warning-ink: #7b5700;
  --blue-ink: #1759c7;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f7fff6;
  --ink-soft: #d9f3e6;
  --muted: #b7d3c7;
  /* Deep treasure palette shared with the ratings page. */
  --paper: #021a15;
  --surface: #06362b;
  --surface-elevated: #0a4938;
  --surface-warm: #354b31;
  --surface-sunken: #031f19;
  --leaf-50: #194e40;
  --leaf-100: #205d48;
  --leaf-300: #65df79;
  --leaf-500: #35c75a;
  --leaf-600: #28a83e;
  --leaf-700: #8cf08e;
  --leaf-800: #d9ffd8;
  --sun-100: #554317;
  --sun-300: #ffd34e;
  --sun-500: #ffc928;
  --sun-700: #ffe28a;
  --blue-100: #193f64;
  --blue-500: #68a2ff;
  --sky-100: #174c62;
  --sky-500: #45c7ff;
  --sky-700: #a6e9ff;
  --coral-100: #5c302f;
  --coral-500: #ff7d73;
  --line: #3a6a60;
  --border: #3a6a60;
  --primary: #75e889;
  --primary-100: #1d5845;
  --text: var(--ink);
  --text-muted: var(--muted);
  --shadow: 0 24px 56px rgba(3, 24, 29, 0.3), 0 0 0 1px rgba(101, 223, 121, 0.04);
  --shadow-soft: 0 12px 30px rgba(3, 24, 29, 0.22);
  --shadow-sm: 0 6px 18px rgba(3, 24, 29, 0.2);
  --green-dark: var(--leaf-800);
  --paper-rgb: 2, 26, 21;
  --surface-rgb: 6, 54, 43;
  --header-bg: rgba(2, 31, 25, 0.88);
  --floating-bg: rgba(10, 73, 56, 0.94);
  --hero-wash-start: rgba(6, 45, 37, 0.96);
  --hero-wash-end: rgba(2, 24, 18, 0.98);
  --pattern-leaf: rgba(101, 223, 121, 0.16);
  --pattern-sun: rgba(255, 211, 78, 0.12);
  --focus-ring: rgba(104, 162, 255, 0.3);
  --overlay: rgba(2, 22, 27, 0.56);
  --danger-ink: #ffd5d0;
  --warning-ink: #ffe7a6;
  --blue-ink: #c9e4ff;
}

body {
  transition: background-color 180ms ease, color 180ms ease;
}

body {
  background:
    linear-gradient(180deg, var(--hero-wash-start) 0, var(--hero-wash-end) 420px),
    var(--paper);
}

body::before {
  background-image:
    radial-gradient(circle at 12px 12px, var(--pattern-leaf) 2px, transparent 2.5px),
    radial-gradient(circle at 38px 38px, var(--pattern-sun) 2px, transparent 2.5px);
}

.site-header {
  border-bottom-color: color-mix(in srgb, var(--line) 86%, transparent);
  background: var(--header-bg);
}

.mobile-tabbar,
.mobile-more-panel {
  border-color: color-mix(in srgb, var(--line) 94%, transparent);
  background: var(--floating-bg);
}

input,
select,
textarea {
  background: var(--surface);
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.language-switcher {
  flex: 0 0 auto;
  margin: 0;
}

.language-switcher select {
  min-height: 44px;
  max-width: 132px;
  padding: 0 30px 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.theme-toggle,
.mobile-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--leaf-700);
  cursor: pointer;
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.theme-toggle {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  overflow: hidden;
}

.theme-toggle-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
}

.theme-toggle-sun {
  border: 3px solid currentColor;
  border-radius: 999px;
  box-shadow: 0 -8px 0 -6px currentColor, 0 8px 0 -6px currentColor, 8px 0 0 -6px currentColor, -8px 0 0 -6px currentColor, 6px 6px 0 -6px currentColor, -6px 6px 0 -6px currentColor, 6px -6px 0 -6px currentColor, -6px -6px 0 -6px currentColor;
}

.theme-toggle-moon {
  position: absolute;
  inset: 11px;
  border-radius: 999px;
  background: currentColor;
  transform: translateX(45px);
}

.theme-toggle-moon::after {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 17px;
  height: 17px;
  border-radius: inherit;
  background: var(--surface);
  content: "";
}

:root[data-theme="dark"] .theme-toggle-sun {
  transform: translateX(-45px);
}

:root[data-theme="dark"] .theme-toggle-moon {
  transform: translateX(0);
}

.theme-toggle:focus-visible,
.mobile-theme-toggle:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.mobile-theme-toggle {
  position: relative;
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  justify-content: flex-start;
}

.mobile-theme-toggle .theme-toggle-icon {
  width: 22px;
  height: 22px;
}

.mobile-theme-toggle .theme-toggle-moon {
  inset: auto;
  left: 12px;
  top: 50%;
  transform: translate(45px, -50%);
}

.mobile-theme-toggle .theme-toggle-moon::after {
  background: var(--surface);
}

:root[data-theme="dark"] .mobile-theme-toggle .theme-toggle-moon {
  transform: translate(0, -50%);
}

@media (hover: hover) {
  .theme-toggle:hover,
  .mobile-theme-toggle:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
  }
}

@media (max-width: 520px) {
  .theme-toggle {
    width: 40px;
    height: 40px;
  }
}

:root[data-theme="dark"] .button-primary,
:root[data-theme="dark"] .access-pill,
:root[data-theme="dark"] .practice-badge,
:root[data-theme="dark"] .tile-symbol,
:root[data-theme="dark"] .mini-word-card > span,
:root[data-theme="dark"] .brand-mark {
  color: #0f1d12;
}

:root[data-theme="dark"] .letter-card,
:root[data-theme="dark"] .study-media span,
:root[data-theme="dark"] .review-notification-mascot,
:root[data-theme="dark"] .group-feature-grid b {
  color: #0f1d12;
}

:root[data-theme="dark"] .review-playback-stage {
  border-color: rgba(143, 220, 85, 0.34);
  background: linear-gradient(135deg, #f4ffe8, #ffffff);
  color: #17351e;
}

:root[data-theme="dark"] .review-playback-media,
:root[data-theme="dark"] .review-stage-icon-button {
  background: #ffffff;
}

:root[data-theme="dark"] .review-playback-copy h3 {
  color: #17351e;
}

:root[data-theme="dark"] .review-playback-copy p:last-child {
  color: #526a48;
}

:root[data-theme="dark"] .review-playback-copy .eyebrow {
  color: #5aaa24;
}

:root[data-theme="dark"] .review-interactive-panel,
:root[data-theme="dark"] .review-choice-button,
:root[data-theme="dark"] .review-match-chip,
:root[data-theme="dark"] .review-drop-target {
  background: #ffffff;
  color: #17351e;
}

:root[data-theme="dark"] .review-interactive-head strong,
:root[data-theme="dark"] .review-choice-button strong {
  color: #17351e;
}

:root[data-theme="dark"] .review-interactive-feedback {
  color: #526a48;
}

:root[data-theme="dark"] .review-result-summary {
  background: #efffdd;
  color: #17351e;
}

:root[data-theme="dark"] .review-result-summary span {
  color: #526a48;
}

:root[data-theme="dark"] .feature-tile,
:root[data-theme="dark"] .topic-card,
:root[data-theme="dark"] .kid-card,
:root[data-theme="dark"] .practice-card,
:root[data-theme="dark"] .stat-card,
:root[data-theme="dark"] .word-card,
:root[data-theme="dark"] .empty-state,
:root[data-theme="dark"] .auth-panel,
:root[data-theme="dark"] .block-card,
:root[data-theme="dark"] .block-word-card,
:root[data-theme="dark"] .ledger-row,
:root[data-theme="dark"] .review-row,
:root[data-theme="dark"] .ranking-scope,
:root[data-theme="dark"] .ranking-table-row,
:root[data-theme="dark"] .family-rating-row,
:root[data-theme="dark"] .study-card {
  border-color: var(--line);
  background-color: var(--surface);
}

:root[data-theme="dark"] .tile-green,
:root[data-theme="dark"] .tile-yellow,
:root[data-theme="dark"] .tile-blue,
:root[data-theme="dark"] .block-card.is-open,
:root[data-theme="dark"] .primary-study-card,
:root[data-theme="dark"] .mini-word-card,
:root[data-theme="dark"] .mini-word-card.studied,
:root[data-theme="dark"] .review-row.due,
:root[data-theme="dark"] .ranking-scope.active,
:root[data-theme="dark"] .ranking-table-row.active,
:root[data-theme="dark"] .family-rating-row.active,
:root[data-theme="dark"] .learner-status-wallet,
:root[data-theme="dark"] .learner-status-old_wallet,
:root[data-theme="dark"] .learner-status-safe {
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 82%, black), var(--leaf-50));
}

:root[data-theme="dark"] .hero-board,
:root[data-theme="dark"] .practice-main,
:root[data-theme="dark"] .word-media,
:root[data-theme="dark"] .demo-access-card,
:root[data-theme="dark"] .hamyon-selection-bar,
:root[data-theme="dark"] .review-notification-hero,
:root[data-theme="dark"] .study-media,
:root[data-theme="dark"] .payment-requisites,
:root[data-theme="dark"] .qr-payment-box {
  background: linear-gradient(135deg, var(--surface-warm), var(--leaf-50));
}

:root[data-theme="dark"] .hero-board::before,
:root[data-theme="dark"] .hero-board::after {
  background: rgba(244, 255, 233, 0.12);
}

:root[data-theme="dark"] .empty-state,
:root[data-theme="dark"] .word-card-locked,
:root[data-theme="dark"] .ranking-filter-panel,
:root[data-theme="dark"] .ranking-board-panel {
  background: rgba(var(--surface-rgb), 0.78);
}

:root[data-theme="dark"] .form-errors,
:root[data-theme="dark"] .errorlist {
  color: var(--danger-ink);
}

:root[data-theme="dark"] .profile-hint {
  color: var(--warning-ink);
}

:root[data-theme="dark"] .learner-status-safe .word-select-control,
:root[data-theme="dark"] .safe-vault-card,
:root[data-theme="dark"] .message-info,
:root[data-theme="dark"] .status-pill.success {
  color: var(--blue-ink);
}

:root[data-theme="dark"] .review-notification {
  background: var(--overlay);
}

:root[data-theme="dark"] .qr-payment-box img {
  background: #f7f7f0;
}

:root[data-theme="dark"] .page-shell:has(.page-heading.split-heading .core-page-visual:not(.small-icon-visual))::before {
  background: linear-gradient(180deg, rgba(var(--paper-rgb), 0.22), rgba(var(--paper-rgb), 0.84) 72%, rgba(var(--paper-rgb), 0.94));
}

:root[data-theme="dark"] .page-heading.split-heading:has(.bank-visual) > div:first-child,
:root[data-theme="dark"] .page-heading.split-heading:has(.hamyon-visual) > div:first-child,
:root[data-theme="dark"] .page-heading.split-heading:has(.learning-visual) > div:first-child,
:root[data-theme="dark"] .page-heading.split-heading:has(.rewards-visual) > div:first-child {
  background: rgba(var(--surface-rgb), 0.68) !important;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.38) !important;
}

:root[data-theme="dark"] .page-heading.split-heading:has(.bank-visual),
:root[data-theme="dark"] .page-heading.split-heading:has(.hamyon-visual),
:root[data-theme="dark"] .page-heading.split-heading:has(.learning-visual),
:root[data-theme="dark"] .page-heading.split-heading:has(.rewards-visual),
:root[data-theme="dark"] .page-heading.split-heading:has(.bank-visual) .core-page-visual > img,
:root[data-theme="dark"] .page-heading.split-heading:has(.hamyon-visual) .core-page-visual > img,
:root[data-theme="dark"] .page-heading.split-heading:has(.learning-visual) .core-page-visual > img,
:root[data-theme="dark"] .page-heading.split-heading:has(.rewards-visual) .core-page-visual > img {
  background: var(--paper) !important;
}

:root[data-theme="dark"] .page-heading.split-heading:has(.bank-visual) .core-page-visual > img,
:root[data-theme="dark"] .page-heading.split-heading:has(.hamyon-visual) .core-page-visual > img,
:root[data-theme="dark"] .page-heading.split-heading:has(.learning-visual) .core-page-visual > img,
:root[data-theme="dark"] .page-heading.split-heading:has(.rewards-visual) .core-page-visual > img {
  filter: brightness(0.78) saturate(0.9) !important;
}


/* Bank word cloud contrast fixes for dark theme. */
:root[data-theme="dark"] .bank-word-cloud {
  border: 1px solid var(--line);
  background: rgba(var(--surface-rgb), 0.86);
  box-shadow: var(--shadow-soft);
}

:root[data-theme="dark"] .bank-word-chip,
:root[data-theme="dark"] .legend-chip {
  text-shadow: none;
}

:root[data-theme="dark"] .status-bank {
  border-color: #8fdc55;
  background: #1d321f;
  color: #d9ffb6;
}

:root[data-theme="dark"] .status-wallet {
  border-color: #ffd84d;
  background: #3c300d;
  color: #fff3a8;
}

:root[data-theme="dark"] .status-old_wallet {
  border-color: #74c8f0;
  background: #143343;
  color: #c8f1ff;
}

:root[data-theme="dark"] .status-safe {
  border-color: #b7ef82;
  background: linear-gradient(135deg, #3c6f22, #6dbb3b);
  color: #071109;
}

:root[data-theme="dark"] .selected-profile-chip {
  background: rgba(var(--surface-rgb), 0.85);
  border: 1px solid var(--line);
  color: var(--ink);
}

:root[data-theme="dark"] .selected-profile-chip span {
  color: #17271d;
}

/* Keep stat cards light with light gradients, but ensure text is dark */
:root[data-theme="dark"] .stat-card,
:root[data-theme="dark"] .stat-card *,
:root[data-theme="dark"] .learner-metric,
:root[data-theme="dark"] .learner-metric *,
:root[data-theme="dark"] .coin-card,
:root[data-theme="dark"] .coin-card * {
  color: #17321f !important;
}

/* Fix hardcoded white gradients to use dark surface in dark mode */
:root[data-theme="dark"] .today-panel,
:root[data-theme="dark"] .block-preview-card.is-open,
:root[data-theme="dark"] .empty-state {
  background: linear-gradient(135deg, var(--surface), var(--leaf-50)) !important;
}
:root[data-theme="dark"] .review-panel {
  background: linear-gradient(135deg, var(--surface), var(--sun-100)) !important;
}
:root[data-theme="dark"] .parent-note {
  background: linear-gradient(135deg, var(--surface), var(--blue-100)) !important;
}

/* Force dark text inside hero copy over light images in dark mode */
:root[data-theme="dark"] .home-hero-copy h1,
:root[data-theme="dark"] .home-hero-copy p.lead,
:root[data-theme="dark"] .home-hero-copy p.eyebrow {
  color: #17321f !important;
}

:root[data-theme="dark"] .home-hero.section-band .home-hero-copy {
  background: rgba(255, 255, 255, 0.46) !important;
}

/* Custom Profile Dropdown */
.custom-profile-dropdown {
  position: relative;
  display: inline-flex;
}

.profile-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.profile-dropdown-trigger:hover {
  background: var(--leaf-50);
  border-color: var(--leaf-200);
}

.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
  overflow: hidden;
}

.profile-toggle-checkbox:checked ~ .profile-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-dropdown-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: none;
}

.profile-toggle-checkbox:checked ~ .profile-dropdown-backdrop {
  display: block;
}

.profile-dropdown-form {
  display: flex;
  flex-direction: column;
  padding: 8px;
  margin: 0;
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px;
  background: transparent;
  border: none;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.profile-dropdown-item:hover {
  background: var(--leaf-50);
}

.profile-dropdown-item.active {
  background: var(--leaf-100);
}

.profile-dropdown-divider {
  height: 1px;
  background: var(--line);
  margin: 0;
}

.profile-dropdown-manage {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  transition: background 0.15s;
}

.profile-dropdown-manage:hover {
  background: var(--leaf-50);
  color: var(--leaf-600);
}

.profile-dropdown-link-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.home-hamyon-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.learner-history-link {
  display: block;
  margin-top: 10px;
  color: var(--leaf-700);
  font-weight: 850;
  text-align: center;
  text-decoration: none;
}

.learner-history-link:hover {
  text-decoration: underline;
}

.dropdown-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--avatar-bg);
  color: var(--ink);
  font-weight: 900;
  font-size: 14px;
  overflow: hidden;
}

.dropdown-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dropdown-name {
  font-weight: 800;
  font-size: 1rem;
  color: var(--ink);
}

:root[data-theme="dark"] .profile-dropdown-trigger {
  background: rgba(var(--surface-rgb), 0.5);
}

:root[data-theme="dark"] .profile-dropdown-menu {
  background: var(--paper);
  border-color: var(--line);
}

.site-header > .custom-profile-dropdown {
  margin-left: auto;
}

@media (min-width: 860px) {
  .site-header > .custom-profile-dropdown {
    margin-left: 0;
  }
}

.profile-dropdown-arrow {
  display: flex;
  align-items: center;
  color: var(--leaf-800);
  transition: transform 0.2s;
}

.profile-toggle-checkbox:checked ~ .profile-dropdown-trigger .profile-dropdown-arrow {
  transform: rotate(180deg);
}

/* Mobile PWA shell — aligned with the Flutter design system. */
body {
  min-height: 100dvh;
}

.mobile-tabbar .tabbar-svg-icon {
  background: transparent;
}

.mobile-tabbar .tabbar-svg-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pwa-install-card {
  position: fixed;
  right: 16px;
  bottom: 18px;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  width: min(560px, calc(100% - 32px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.pwa-install-card[hidden] {
  display: none;
}

.pwa-install-card > img {
  border-radius: 14px;
}

.pwa-install-card strong,
.pwa-install-card small {
  display: block;
}

.pwa-install-card small {
  margin-top: 2px;
  color: var(--muted);
}

.pwa-install-card .button {
  min-width: 108px;
}

.pwa-install-close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--leaf-50);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.4rem;
}

.offline-page {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
}

.offline-card {
  width: min(480px, 100%);
  padding: 32px 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.offline-card > img {
  margin: 0 auto 18px;
  border-radius: 24px;
}

.offline-card h1 {
  font-size: clamp(2rem, 10vw, 3.2rem);
}

@media (max-width: 859px) {
  :root {
    --radius: 16px;
    --tap: 52px;
  }

  .site-header {
    min-height: 64px;
    padding: max(7px, env(safe-area-inset-top)) 12px 7px;
  }

  .site-header > div:first-of-type {
    min-width: 0;
    gap: 6px !important;
  }

  .site-header .brand-logo {
    width: 44px !important;
    height: 44px !important;
  }

  .site-header .brand-text {
    font-size: 1.08rem !important;
  }

  .page-shell {
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
  }

  .section-band,
  .section-panel {
    width: min(var(--content), calc(100% - 24px));
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .button,
  .auth-panel,
  .empty-state,
  .home-panel,
  .learner-panel,
  .stat-card,
  .story-card,
  .block-preview-card,
  .ranking-filter-panel,
  .ranking-board-panel {
    border-radius: 22px;
  }

  .mobile-tabbar {
    right: 0;
    bottom: 0;
    left: 0;
    gap: 2px;
    padding: 7px 8px max(7px, env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 22px 22px 0 0;
    background: var(--surface);
  }

  .mobile-tabbar a,
  .mobile-more-menu {
    border-radius: 16px;
  }

  .mobile-tabbar a.is-active {
    background: color-mix(in srgb, var(--sun-300) 30%, var(--surface));
    color: var(--leaf-800);
  }

  .mobile-tabbar a.is-active > span {
    transform: scale(1.06);
  }

  .mobile-more-panel {
    right: 4px;
    bottom: calc(100% + 12px);
    max-height: min(70dvh, 520px);
    overflow-y: auto;
    border-radius: 22px;
  }

  .pwa-install-card {
    right: 10px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    grid-template-columns: auto minmax(0, 1fr) auto;
    width: calc(100% - 20px);
    border-radius: 22px;
  }

  .pwa-install-card .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .pwa-install-close {
    grid-column: 3;
    grid-row: 1;
  }
}

@media (max-width: 420px) {
  .site-header .brand-text,
  .profile-switcher-name,
  .profile-dropdown-arrow {
    display: none;
  }

  .profile-dropdown-trigger {
    padding-right: 7px;
  }

  .mobile-tabbar a,
  .mobile-more-trigger {
    font-size: 0.68rem;
  }

  .pwa-install-card {
    grid-template-columns: 44px minmax(0, 1fr) 36px;
    gap: 8px;
  }

  .pwa-install-close {
    width: 36px;
    height: 36px;
  }
}

@media (display-mode: standalone) {
  .site-header {
    padding-top: max(10px, env(safe-area-inset-top));
  }

  .mobile-tabbar {
    padding-bottom: max(9px, env(safe-area-inset-bottom));
  }
}

/* Flutter-equivalent bottom navigation and Ko‘proq bottom sheet. */
.mobile-tabbar > a,
.mobile-tabbar > .mobile-more-trigger {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 54px;
  padding: 5px 2px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.15;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
}

.mobile-tabbar > .mobile-more-trigger .tabbar-svg-icon,
.mobile-tabbar > a .tabbar-svg-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: transparent;
  color: var(--leaf-700);
}

.mobile-tabbar > .mobile-more-trigger .tabbar-svg-icon svg,
.mobile-tabbar > a .tabbar-svg-icon svg {
  width: 24px;
  height: 24px;
}

.mobile-tabbar > a.is-active,
.mobile-tabbar > .mobile-more-trigger.is-active {
  background: rgba(255, 201, 40, 0.3);
  color: var(--leaf-800);
}

.mobile-tabbar > a.is-active > span,
.mobile-tabbar > .mobile-more-trigger.is-active > span {
  transform: scale(1.06);
}

body.mobile-more-open {
  overflow: hidden;
  touch-action: none;
}

.mobile-more-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  border: 0;
  background: rgba(18, 59, 50, 0.42);
  opacity: 0;
  transition: opacity 220ms ease;
}

.mobile-more-backdrop.is-open {
  opacity: 1;
}

.mobile-more-sheet {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 41;
  max-height: min(82dvh, 640px);
  padding: 0 16px max(18px, env(safe-area-inset-bottom));
  overflow-y: auto;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  background: var(--paper);
  box-shadow: 0 -18px 48px rgba(18, 59, 50, 0.2);
  transform: translateY(105%);
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
  overscroll-behavior: contain;
}

.mobile-more-sheet.is-open {
  transform: translateY(0);
}

.mobile-more-sheet[hidden],
.mobile-more-backdrop[hidden] {
  display: none;
}

.mobile-more-handle {
  display: grid;
  width: 100%;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.mobile-more-handle span {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 42%, transparent);
}

.mobile-more-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 12px;
}

.mobile-more-sheet-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.375rem;
  font-weight: 900;
}

.mobile-more-close {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 13px;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.4rem;
  cursor: pointer;
}

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

.mobile-more-item {
  display: flex;
  min-width: 0;
  min-height: 94px;
  padding: 10px 6px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  border: 1px solid rgba(var(--menu-rgb), 0.25);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.mobile-more-item > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: rgba(var(--menu-rgb), 0.13);
  color: var(--menu-color);
}

.mobile-more-item svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-more-item strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-more-item:focus-visible,
.mobile-more-close:focus-visible,
.mobile-more-handle:focus-visible,
.mobile-more-trigger:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.mobile-more-item:active {
  transform: scale(0.98);
}

@media (hover: hover) {
  .mobile-more-item:hover {
    border-color: rgba(var(--menu-rgb), 0.52);
    background: rgba(var(--menu-rgb), 0.07);
  }
}

@media (min-width: 860px) {
  .mobile-more-sheet,
  .mobile-more-backdrop {
    display: none !important;
  }
}

@media (max-width: 360px) {
  .mobile-more-sheet {
    padding-right: 10px;
    padding-left: 10px;
  }

  .mobile-more-grid {
    gap: 8px;
  }

  .mobile-more-item {
    min-height: 88px;
    padding-inline: 4px;
  }

  .mobile-more-item > span {
    width: 38px;
    height: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-more-sheet,
  .mobile-more-backdrop {
    transition-duration: 0.001ms;
  }
}

/* Premium theme refresh — Flutter brand palette with a brighter night mode. */
::selection {
  background: var(--sun-300);
  color: #123b32;
}

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

body {
  background:
    radial-gradient(circle at 8% -4%, rgba(40, 168, 62, 0.16), transparent 31rem),
    radial-gradient(circle at 96% 6%, rgba(255, 201, 40, 0.14), transparent 27rem),
    linear-gradient(180deg, var(--hero-wash-start) 0, var(--hero-wash-end) 34rem),
    var(--paper);
}

body::before {
  opacity: 0.52;
}

h1,
h2,
h3 {
  color: var(--ink);
  letter-spacing: -0.025em;
}

.eyebrow {
  color: var(--leaf-700);
  letter-spacing: 0.075em;
}

.site-header {
  border-bottom-color: rgba(8, 117, 47, 0.13);
  box-shadow: 0 6px 24px rgba(18, 59, 50, 0.055);
}

.button {
  border-radius: 16px;
}

.button-primary {
  background: linear-gradient(135deg, #32bd4b 0%, #168e36 56%, #08752f 100%);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(8, 117, 47, 0.22);
}

.button-soft {
  border-color: var(--line);
  background: linear-gradient(180deg, var(--surface-elevated), var(--surface));
  color: var(--leaf-700);
  box-shadow: var(--shadow-sm);
}

.home-panel,
.learner-panel,
.auth-panel,
.practice-card,
.block-card,
.block-word-card,
.ranking-filter-panel,
.ranking-board-panel,
.study-card,
.kid-card,
.feature-tile,
.topic-card,
.word-card,
.ledger-row,
.review-row,
.empty-state {
  border-color: var(--line);
  background-color: var(--surface);
  box-shadow: var(--shadow-soft);
}

.home-panel,
.learner-panel {
  background: linear-gradient(145deg, var(--surface-elevated), var(--surface));
}

.home-story-card {
  position: relative;
  overflow: hidden;
  border-color: var(--line) !important;
  background: linear-gradient(145deg, var(--surface-elevated), var(--surface)) !important;
  box-shadow: var(--shadow-soft) !important;
}

.home-story-card::after {
  position: absolute;
  right: -34px;
  bottom: -42px;
  width: 118px;
  height: 118px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 201, 40, 0.16), transparent 68%);
  content: "";
  pointer-events: none;
}

.home-story-card > img,
.home-story-card > div:first-child {
  box-shadow: 0 8px 20px rgba(18, 59, 50, 0.14);
}

.theme-toggle {
  border-color: color-mix(in srgb, var(--leaf-500) 28%, var(--line));
  background: linear-gradient(145deg, var(--surface-elevated), var(--surface));
  box-shadow: var(--shadow-sm);
}

.profile-dropdown-trigger {
  border-color: color-mix(in srgb, var(--leaf-500) 22%, var(--line));
  background: linear-gradient(145deg, var(--surface-elevated), var(--surface));
  box-shadow: var(--shadow-sm);
}

.mobile-tabbar {
  border-top-color: rgba(8, 117, 47, 0.15);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -12px 34px rgba(18, 59, 50, 0.13);
}

.mobile-tabbar > a.is-active,
.mobile-tabbar > .mobile-more-trigger.is-active {
  background: linear-gradient(145deg, rgba(255, 201, 40, 0.42), rgba(234, 247, 232, 0.9));
  color: var(--leaf-800);
  box-shadow: inset 0 0 0 1px rgba(8, 117, 47, 0.08);
}

.mobile-more-sheet {
  background:
    radial-gradient(circle at 100% 0, rgba(255, 201, 40, 0.13), transparent 15rem),
    var(--paper);
}

.mobile-more-item {
  box-shadow: var(--shadow-sm);
}

@media (hover: hover) {
  .button-primary:hover {
    box-shadow: 0 14px 30px rgba(8, 117, 47, 0.28);
  }

  .button-soft:hover,
  .home-story-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow) !important;
  }
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 4% -2%, rgba(69, 199, 255, 0.19), transparent 26rem),
    radial-gradient(circle at 96% 4%, rgba(101, 223, 121, 0.2), transparent 30rem),
    radial-gradient(circle at 58% 38%, rgba(255, 211, 78, 0.08), transparent 34rem),
    linear-gradient(180deg, #164b43 0, var(--paper) 36rem),
    var(--paper);
}

:root[data-theme="dark"] body::before {
  opacity: 0.68;
}

:root[data-theme="dark"] .site-header {
  border-bottom-color: rgba(101, 223, 121, 0.19);
  background: linear-gradient(180deg, rgba(16, 58, 58, 0.94), var(--header-bg));
  box-shadow: 0 8px 28px rgba(2, 22, 27, 0.22);
}

:root[data-theme="dark"] .brand-text > span:first-child {
  color: #f7fff6 !important;
}

:root[data-theme="dark"] .theme-toggle {
  border-color: rgba(255, 211, 78, 0.34);
  background: linear-gradient(145deg, #24574d, var(--surface));
  color: var(--sun-300);
}

:root[data-theme="dark"] .profile-dropdown-trigger {
  border-color: rgba(101, 223, 121, 0.24);
  background: linear-gradient(145deg, var(--surface-elevated), var(--surface));
}

:root[data-theme="dark"] .profile-dropdown-menu {
  border-color: var(--line);
  background: var(--surface-elevated);
  box-shadow: var(--shadow);
}

:root[data-theme="dark"] .profile-dropdown-item.active {
  background: linear-gradient(135deg, rgba(255, 211, 78, 0.2), rgba(101, 223, 121, 0.16));
}

:root[data-theme="dark"] .mobile-tabbar {
  border-top-color: rgba(101, 223, 121, 0.2);
  background: linear-gradient(180deg, rgba(27, 82, 69, 0.97), rgba(18, 60, 57, 0.98));
  box-shadow: 0 -14px 38px rgba(2, 22, 27, 0.32);
}

:root[data-theme="dark"] .mobile-tabbar > a,
:root[data-theme="dark"] .mobile-tabbar > .mobile-more-trigger {
  color: #b9d6ca;
}

:root[data-theme="dark"] .mobile-tabbar > a.is-active,
:root[data-theme="dark"] .mobile-tabbar > .mobile-more-trigger.is-active {
  background: linear-gradient(145deg, rgba(255, 211, 78, 0.34), rgba(101, 223, 121, 0.18));
  color: #f1ffd8;
  box-shadow: inset 0 0 0 1px rgba(255, 226, 138, 0.18);
}

:root[data-theme="dark"] .mobile-more-sheet {
  border-color: rgba(101, 223, 121, 0.22);
  background:
    radial-gradient(circle at 100% 0, rgba(255, 211, 78, 0.14), transparent 16rem),
    linear-gradient(180deg, #184c46, #103438);
}

:root[data-theme="dark"] .mobile-more-item {
  border-color: rgba(var(--menu-rgb), 0.42);
  background: linear-gradient(145deg, var(--surface-elevated), var(--surface));
  box-shadow: 0 8px 20px rgba(2, 22, 27, 0.2);
}

:root[data-theme="dark"] .home-panel,
:root[data-theme="dark"] .learner-panel,
:root[data-theme="dark"] .auth-panel,
:root[data-theme="dark"] .practice-card,
:root[data-theme="dark"] .block-card,
:root[data-theme="dark"] .block-word-card,
:root[data-theme="dark"] .ranking-filter-panel,
:root[data-theme="dark"] .ranking-board-panel,
:root[data-theme="dark"] .study-card,
:root[data-theme="dark"] .kid-card,
:root[data-theme="dark"] .feature-tile,
:root[data-theme="dark"] .topic-card,
:root[data-theme="dark"] .word-card,
:root[data-theme="dark"] .ledger-row,
:root[data-theme="dark"] .review-row,
:root[data-theme="dark"] .empty-state {
  border-color: rgba(101, 223, 121, 0.2);
  background: linear-gradient(145deg, var(--surface-elevated), var(--surface));
  box-shadow: var(--shadow-soft);
}

:root[data-theme="dark"] .home-story-card {
  border-color: rgba(101, 223, 121, 0.23) !important;
  background:
    radial-gradient(circle at 100% 0, rgba(69, 199, 255, 0.08), transparent 14rem),
    linear-gradient(145deg, #205348, #17443f) !important;
  box-shadow: 0 14px 34px rgba(2, 22, 27, 0.24) !important;
}

:root[data-theme="dark"] .home-story-card h3 {
  color: #f7fff6 !important;
}

:root[data-theme="dark"] .home-story-card img {
  box-shadow: 0 10px 24px rgba(2, 22, 27, 0.3);
}

:root[data-theme="dark"] .today-panel,
:root[data-theme="dark"] .block-preview-card.is-open,
:root[data-theme="dark"] .empty-state {
  background: linear-gradient(135deg, #1e5147, #19483f) !important;
}

:root[data-theme="dark"] .review-panel {
  background: linear-gradient(135deg, #1b4d46, #4b421f) !important;
}

:root[data-theme="dark"] .parent-note {
  background: linear-gradient(135deg, #1c4b48, #1a4365) !important;
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
  border-color: var(--line);
  background: var(--surface-sunken);
}

:root[data-theme="dark"] .page-heading.split-heading:has(.bank-visual) .core-page-visual > img,
:root[data-theme="dark"] .page-heading.split-heading:has(.hamyon-visual) .core-page-visual > img,
:root[data-theme="dark"] .page-heading.split-heading:has(.learning-visual) .core-page-visual > img,
:root[data-theme="dark"] .page-heading.split-heading:has(.rewards-visual) .core-page-visual > img {
  filter: brightness(0.96) saturate(1.12) contrast(1.02) !important;
}

:root[data-theme="dark"] .status-bank {
  border-color: #65df79;
  background: #194e40;
  color: #d9ffd8;
}

:root[data-theme="dark"] .status-wallet {
  border-color: #ffd34e;
  background: #554317;
  color: #fff0b7;
}

:root[data-theme="dark"] .status-old_wallet {
  border-color: #68a2ff;
  background: #193f64;
  color: #d9e8ff;
}

:root[data-theme="dark"] .status-safe {
  border-color: #8cf08e;
  background: linear-gradient(135deg, #28a83e, #65df79);
  color: #072512;
}

:root[data-theme="dark"] .selected-profile-chip {
  border-color: rgba(101, 223, 121, 0.25);
  background: rgba(23, 68, 63, 0.9);
}
/* Unified illustrated page heroes: copy and actions live on the artwork. */
.page-shell:has(.illustrated-page-hero) {
  padding-top: 0 !important;
}

.page-shell:has(.illustrated-page-hero)::before {
  display: none !important;
  content: none !important;
}

body .page-heading.split-heading.illustrated-page-hero {
  position: relative !important;
  isolation: isolate;
  display: grid !important;
  place-items: center;
  width: min(var(--content), calc(100% - 32px)) !important;
  min-height: 390px !important;
  max-height: 620px !important;
  aspect-ratio: 16 / 9 !important;
  margin: 22px auto 28px !important;
  padding: clamp(18px, 3vw, 38px) !important;
  overflow: hidden !important;
  border: 1px solid rgba(205, 145, 8, 0.36) !important;
  border-radius: 28px !important;
  background: #fff8da !important;
  box-shadow: 0 24px 64px rgba(23, 71, 55, 0.16) !important;
}

body .page-heading.split-heading.illustrated-page-hero::before {
  display: none !important;
  content: none !important;
}

body .page-heading.split-heading.illustrated-page-hero::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block !important;
  content: "";
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(255, 250, 232, 0.82) 0%, rgba(255, 250, 232, 0.58) 29%, rgba(255, 250, 232, 0) 60%);
}

body .page-heading.split-heading.illustrated-page-hero > .core-page-visual {
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

body .page-heading.split-heading.illustrated-page-hero > .core-page-visual > img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  object-position: center !important;
  opacity: 1 !important;
  filter: none !important;
  border: 0 !important;
  border-radius: inherit !important;
  background: #fff8da !important;
  box-shadow: none !important;
}

body .page-heading.split-heading.illustrated-page-hero > div:first-child {
  position: relative !important;
  inset: auto !important;
  z-index: 2 !important;
  align-self: center !important;
  justify-self: center !important;
  width: min(48%, 520px) !important;
  min-width: 320px !important;
  max-width: 520px !important;
  margin: 0 !important;
  padding: 20px 24px !important;
  transform: none !important;
  text-align: center !important;
  color: #163f36 !important;
  border: 1px solid rgba(255, 255, 255, 0.72) !important;
  border-radius: 22px !important;
  background: rgba(255, 250, 232, 0.73) !important;
  box-shadow: 0 18px 48px rgba(88, 72, 18, 0.14) !important;
  text-shadow: none !important;
  -webkit-backdrop-filter: blur(8px) saturate(1.08);
  backdrop-filter: blur(8px) saturate(1.08);
}

body .illustrated-page-hero .eyebrow {
  margin-bottom: 4px !important;
  color: #087e38 !important;
  text-shadow: none !important;
}

body .illustrated-page-hero h1 {
  margin: 0 0 8px !important;
  color: #123b32 !important;
  font-size: clamp(2.5rem, 5vw, 4.8rem) !important;
  line-height: 0.98 !important;
  text-shadow: none !important;
}

body .illustrated-page-hero h1 img {
  width: 48px !important;
  height: 48px !important;
  object-fit: contain;
}

body .illustrated-page-hero .lead,
body .illustrated-page-hero p:not(.eyebrow) {
  color: #315d51 !important;
  text-shadow: none !important;
}

body .illustrated-page-hero .selected-profile-chip {
  width: fit-content;
  margin: 14px auto 0 !important;
  border-color: rgba(12, 127, 58, 0.28) !important;
  background: rgba(255, 255, 255, 0.76) !important;
  color: #123b32 !important;
  box-shadow: 0 8px 20px rgba(34, 84, 57, 0.1) !important;
}

body .illustrated-page-hero > div:first-child > .button,
body .illustrated-page-hero > div:first-child > .status-pill {
  margin-top: 14px;
}

.hamyon-archive-filters {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 3;
  display: flex;
  gap: 10px;
  width: max-content;
  max-width: calc(100% - 32px);
  transform: translateX(-50%);
}

.hamyon-archive-filters select {
  width: auto;
  min-width: 132px;
}

.seyf-page-hero > .seyf-hero-inner {
  display: grid !important;
  gap: 12px;
}

.seyf-page-hero .seyf-title-box {
  padding: 0;
  background: transparent !important;
  box-shadow: none !important;
}

.seyf-page-hero .seyf-title-box h1 {
  justify-content: center;
}

.seyf-page-hero .seyf-achievements-box {
  display: flex;
  flex-direction: column;
  max-height: 150px;
  padding-top: 12px;
  overflow: hidden;
  border-top: 1px solid rgba(12, 127, 58, 0.18);
  background: transparent !important;
  box-shadow: none !important;
}

.seyf-page-hero .seyf-achievements-box h3 {
  margin: 0 0 8px !important;
  color: #123b32 !important;
  font-size: 1rem !important;
}

.seyf-page-hero .seyf-achievements-box > div {
  overflow-y: auto !important;
}

:root[data-theme="dark"] body .page-heading.split-heading.illustrated-page-hero {
  border-color: rgba(255, 207, 65, 0.44) !important;
  background: #fff4c8 !important;
  box-shadow: 0 24px 68px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(101, 223, 121, 0.09) !important;
}

:root[data-theme="dark"] body .page-heading.split-heading.illustrated-page-hero > div:first-child {
  color: #163f36 !important;
  border-color: rgba(255, 255, 255, 0.58) !important;
  background: rgba(255, 247, 216, 0.76) !important;
  box-shadow: 0 18px 52px rgba(35, 40, 20, 0.2) !important;
}

@media (max-width: 759px) {
  body .page-heading.split-heading.illustrated-page-hero {
    display: block !important;
    width: calc(100% - 24px) !important;
    min-height: clamp(420px, 112vw, 460px) !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    margin: 18px auto 22px !important;
    padding: 0 !important;
    border-radius: 22px !important;
  }

  body .page-heading.split-heading.illustrated-page-hero::after {
    background: linear-gradient(180deg, rgba(255, 248, 218, 0) 20%, rgba(255, 248, 218, 0.12) 35%, rgba(255, 248, 218, 0.92) 57%, #fff8da 75%) !important;
  }

  body .page-heading.split-heading.illustrated-page-hero > .core-page-visual > img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    object-fit: contain !important;
    object-position: center top !important;
  }

  body .page-heading.split-heading.illustrated-page-hero > div:first-child {
    position: absolute !important;
    inset: auto 14px 70px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 14px !important;
    text-align: left !important;
    border-radius: 18px !important;
    background: rgba(255, 250, 232, 0.72) !important;
  }

  body .illustrated-page-hero h1 {
    margin-bottom: 7px !important;
    font-size: clamp(2.25rem, 12vw, 3.2rem) !important;
  }

  body .illustrated-page-hero .lead,
  body .illustrated-page-hero p:not(.eyebrow) {
    font-size: 0.94rem !important;
    line-height: 1.42 !important;
  }

  body .illustrated-page-hero .selected-profile-chip {
    margin: 10px 0 0 !important;
  }

  .hamyon-archive-hero {
    min-height: 540px !important;
  }

  body .hamyon-archive-hero > div:first-child {
    bottom: 126px !important;
  }

  .hamyon-archive-filters {
    right: 14px;
    bottom: 14px;
    left: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: auto;
    max-width: none;
    transform: none;
  }

  .hamyon-archive-filters .button {
    padding-inline: 10px;
  }

  .hamyon-archive-filters select {
    grid-column: 1 / -1;
    width: 100%;
  }

  .seyf-page-hero {
    min-height: 540px !important;
  }

  .seyf-page-hero .seyf-achievements-box {
    max-height: 132px;
  }

  .seyf-page-hero .seyf-title-box h1 {
    justify-content: flex-start;
  }
}

/* Daily Hamyon: shared mobile/PWA/web empty state */
body:has(.hamyon-empty-screen) {
  background: #fff9ed;
}

.hamyon-empty-screen {
  width: min(100%, 980px);
  min-height: calc(100svh - 170px);
  margin: 0 auto;
  color: #123b32;
}

.hamyon-empty-toolbar {
  position: relative;
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
}

.hamyon-empty-toolbar h1 {
  margin: 0;
  color: #123b32;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900;
}

.hamyon-empty-toolbar a {
  position: absolute;
  right: 4px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: #123b32;
  font-size: 1.8rem;
  font-weight: 900;
  text-decoration: none;
}

.hamyon-empty-toolbar a:hover {
  background: rgba(8, 117, 47, 0.1);
}

.hamyon-empty-content {
  display: flex;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(74px, 14svh, 150px) 16px 40px;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hamyon-empty-icon {
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  color: #08752f;
}

.hamyon-empty-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  stroke: #fff9ed;
  stroke-width: 4;
  stroke-linecap: round;
}

.hamyon-empty-content h2 {
  margin: 12px 0 6px;
  color: #123b32;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  font-weight: 900;
}

.hamyon-empty-content p {
  margin: 0;
  color: #214a40;
  font-size: 1.05rem;
}

.hamyon-empty-action.button {
  width: 100%;
  min-height: 48px;
  margin-top: 18px;
  border-radius: 999px;
  background: #22ad43;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 900;
  box-shadow: 0 4px 8px rgba(31, 122, 51, 0.24);
}

.hamyon-empty-action.button:hover {
  background: #159838;
}

:root[data-theme="dark"] body:has(.hamyon-empty-screen),
:root[data-theme="dark"] .hamyon-empty-screen {
  background: #fff9ed;
  color: #123b32;
}

@media (max-width: 759px) {
  .page-shell:has(.hamyon-empty-screen) {
    padding-top: 0;
  }

  .hamyon-empty-screen {
    min-height: calc(100svh - 154px);
  }

  .hamyon-empty-content {
    padding-top: clamp(72px, 13svh, 120px);
  }
}

/* Word block filters and compact adaptive cards shared by web and PWA */
.block-word-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: min(var(--content), calc(100% - 32px));
  margin: 10px auto;
}

.block-word-filters button {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(8, 117, 47, 0.25);
  border-radius: 14px;
  background: var(--surface);
  color: var(--leaf-800);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
}

.block-word-filters button.is-active {
  border-color: #08752f;
  background: #08752f;
  color: #fff;
  box-shadow: 0 6px 14px rgba(8, 117, 47, 0.22);
}

.simple-block-list[data-word-list] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.simple-word-row {
  min-width: 0;
  min-height: 116px;
}

.simple-word-name .order-pill {
  flex: 0 0 auto;
}

.simple-word-name strong {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.simple-word-audio {
  display: grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.simple-word-audio:hover {
  background: rgba(8, 117, 47, 0.1);
}

.block-filter-empty {
  width: min(var(--content), calc(100% - 32px));
  margin: 10px auto;
}

@media (min-width: 760px) {
  .block-word-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1120px) {
  .simple-block-list[data-word-list] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Mobile-style word block header for web and PWA */
.block-detail-hero {
  display: grid;
  gap: 14px;
  width: min(var(--content), calc(100% - 32px));
  margin: 16px auto 10px;
  padding: clamp(16px, 2.5vw, 24px);
  border-radius: 24px;
  background: #08752f;
  color: #fff;
  box-shadow: 0 12px 30px rgba(8, 117, 47, 0.2);
}

.block-detail-hero-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.block-detail-number {
  display: grid;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 900;
}

.block-detail-hero-title > div {
  min-width: 0;
}

.block-detail-hero .eyebrow,
.block-detail-hero h1,
.block-detail-hero p {
  margin: 0;
  color: #fff;
}

.block-detail-hero .eyebrow {
  opacity: 0.78;
}

.block-detail-hero h1 {
  font-size: clamp(1.45rem, 4vw, 2.25rem);
  line-height: 1.08;
}

.block-detail-hero-title p:last-child {
  margin-top: 3px;
  opacity: 0.84;
}

.block-detail-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.block-detail-hero-pills > span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 900;
}

.block-detail-close-form {
  margin: 0;
}

.block-detail-hero-action.button {
  width: 100%;
  min-height: 44px;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  box-shadow: none;
}

.block-detail-hero-action.button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.block-detail-hero .wallet-closed-label {
  width: 100%;
  min-height: 44px;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.block-learning-lock {
  max-width: 34rem;
  color: var(--muted);
  line-height: 1.35;
}

.block-learning-warning {
  display: grid;
  gap: 8px;
  border-color: color-mix(in srgb, var(--sun-500) 55%, var(--line));
  background: color-mix(in srgb, var(--sun-100) 72%, var(--surface));
}

.block-learning-warning p {
  margin: 0;
  color: var(--muted);
}

.simple-word-row[hidden] {
  display: none !important;
}

/* Installed PWA keeps the complete wallet confirmation dialog on small screens */
.app-modal-backdrop {
  padding:
    max(14px, env(safe-area-inset-top))
    max(14px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));
  -webkit-backdrop-filter: blur(6px);
}

@media (max-width: 519px) {
  .app-modal {
    width: min(360px, 100%);
    max-height: calc(100svh - 28px);
    padding: 16px;
    overflow-y: auto;
    border-radius: 18px;
  }

  .app-modal h2 {
    font-size: clamp(1.7rem, 9vw, 2rem);
  }

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

  .app-modal-actions .button {
    min-width: 0;
    padding-inline: 8px;
    white-space: normal;
  }
}


/* Focused daily Hamyon: shared web and installed PWA */
.hamyon-today-page {
  background: #fff9ed;
}

.hamyon-today {
  width: min(100%, 780px);
  min-height: calc(100svh - 190px);
  margin: 0 auto;
  color: #123f35;
}

.hamyon-today-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 64px;
  margin-bottom: 18px;
}

.hamyon-today-toolbar::before {
  content: "";
}

.hamyon-today-toolbar h1 {
  margin: 0;
  grid-column: 2;
  color: #123f35;
  font: 900 clamp(1.55rem, 4vw, 2rem)/1.1 "Nunito", sans-serif;
  letter-spacing: -0.03em;
}

.hamyon-today-toolbar nav {
  grid-column: 3;
  justify-self: end;
  display: flex;
  gap: 10px;
}

.hamyon-today-toolbar a,
.hamyon-today-round-action {
  display: inline-grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #08752f;
  cursor: pointer;
}

.hamyon-today-toolbar a:hover,
.hamyon-today-round-action:hover {
  background: #e2f2dd;
}

.hamyon-today-toolbar svg,
.hamyon-today-round-action svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hamyon-today-summary {
  padding: 20px 22px 18px;
  border-radius: 24px;
  background: #078333;
  color: #fff;
  box-shadow: none;
}

.hamyon-today-summary-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hamyon-today-cap {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.hamyon-today-cap svg {
  width: 24px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hamyon-today-summary-head div {
  min-width: 0;
  flex: 1;
}

.hamyon-today-summary h2 {
  margin: 0 0 2px;
  color: #fff;
  font-size: 1.55rem;
  line-height: 1.05;
}

.hamyon-today-summary-head strong {
  font-size: 1rem;
}

.hamyon-today-status {
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 800;
  white-space: nowrap;
}

.hamyon-today-progress {
  height: 9px;
  margin: 20px 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

.hamyon-today-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #fff;
}

.hamyon-today-progress-label {
  font-size: 1rem;
}

.hamyon-today-summary.is-ready .hamyon-today-progress span {
  background: #ffc64d;
}

.hamyon-today-check-form {
  margin: 16px 0 0;
}

.hamyon-today-check-button {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: #ffc64d;
  color: #123b32;
  box-shadow: 0 5px 14px rgba(103, 72, 0, 0.14);
  cursor: pointer;
  font: 900 1.05rem/1.2 "Nunito", sans-serif;
  text-decoration: none;
  transition: transform 0.16s ease, background-color 0.16s ease;
}

.hamyon-today-check-button:hover {
  background: #ffd36f;
  transform: translateY(-1px);
}

.hamyon-today-check-button:focus-visible {
  outline: 3px solid white;
  outline-offset: 3px;
}

.hamyon-today-check-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hamyon-today-words {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.hamyon-today-word {
  display: flex;
  min-height: 82px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(8, 117, 47, 0.04);
  border-radius: 22px;
  background: #fff;
}

.hamyon-today-word-image {
  display: grid;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  overflow: hidden;
  place-items: center;
  border-radius: 12px;
  background: #edf7f1;
  color: #25332f;
}

.hamyon-today-word-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hamyon-today-word-image svg {
  width: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hamyon-today-word-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.hamyon-today-word-copy strong {
  overflow: hidden;
  font-size: 1.05rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hamyon-today-word-copy span {
  color: #174e43;
}

.hamyon-today-round-action {
  flex: 0 0 42px;
  background: #dff0da;
  color: #43634d;
}

.hamyon-today-round-action.is-playing {
  background: #bde3b4;
  color: #08752f;
}

.hamyon-today-empty {
  display: flex;
  min-height: min(520px, 62svh);
  align-items: center;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.hamyon-today-empty-icon {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  color: #078333;
}

.hamyon-today-empty-icon svg {
  width: 52px;
  fill: currentColor;
}

.hamyon-today-empty h2 {
  margin: 10px 0 4px;
  font-size: 1.55rem;
}

.hamyon-today-empty p {
  margin: 0 0 18px;
}

.hamyon-today-empty .button {
  width: min(100%, 520px);
  border-radius: 999px;
}

:root[data-theme="dark"] .hamyon-today-page,
:root[data-theme="dark"] .hamyon-today-page .page-shell {
  background: #fff9ed;
  color-scheme: light;
}

@media (max-width: 859px) {
  .hamyon-today-page .site-header {
    display: none;
  }
}

@media (max-width: 719px) {
  .hamyon-today-page .page-shell {
    padding: 0 16px calc(88px + env(safe-area-inset-bottom));
  }

  .hamyon-today-toolbar {
    min-height: 64px;
    margin-bottom: 0;
  }

  .hamyon-today-toolbar nav {
    gap: 2px;
  }

  .hamyon-today-summary {
    padding: 18px 16px 16px;
  }

  .hamyon-today-summary h2 {
    font-size: 1.35rem;
  }

  .hamyon-today-status {
    padding-inline: 9px;
    font-size: 0.78rem;
  }
}


/* Focused Hamyon review journey: shared by desktop web and installed PWA. */
.hamyon-review-section {
  margin-top: 22px;
}

.hamyon-review-eyebrow {
  margin: 0 0 3px;
  color: #08752f;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hamyon-review-section > h2 {
  margin: 0 0 12px;
  color: #123f35;
  font-size: 1.45rem;
  line-height: 1.15;
}

.hamyon-due-list,
.hamyon-review-map {
  display: grid;
  gap: 14px;
}

.hamyon-due-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 2px solid #ffb800;
  border-radius: 18px;
  background: #fff5c7;
  color: #123f35;
}

.hamyon-due-card > img {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  object-fit: cover;
}

.hamyon-due-card > div {
  display: grid;
  gap: 3px;
}

.hamyon-due-card strong {
  font-size: 1rem;
  font-weight: 900;
}

.hamyon-due-card span {
  color: #66736e;
  font-size: 0.88rem;
}

.hamyon-due-card > a,
.hamyon-review-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 9px 22px;
  border-radius: 999px;
  background: #24ad42;
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 5px 12px rgba(8, 117, 47, 0.18);
}

.hamyon-review-card {
  overflow: hidden;
  border: 2px solid #b9ddaa;
  border-radius: 23px;
  background: #f8fcf5;
  color: #123f35;
}

.hamyon-review-card.is-due,
.hamyon-review-card.due,
.hamyon-review-card.in_progress {
  border-color: #ffb800;
  background: #fff8d8;
}

.hamyon-review-card.completed {
  border-color: #58a936;
  background: #f0fbea;
}

.hamyon-review-banner {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #edf7e7;
}

.hamyon-review-card-body {
  padding: 12px 14px 15px;
}

.hamyon-review-card-meta {
  display: flex;
  align-items: center;
  gap: 9px;
}

.hamyon-review-card-meta img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
}

.hamyon-review-card-meta b {
  display: inline-grid;
  min-width: 34px;
  height: 34px;
  padding-inline: 8px;
  place-items: center;
  border-radius: 999px;
  background: #b9ddaa;
  color: #fff;
  font-weight: 900;
}

.hamyon-review-card.is-due .hamyon-review-card-meta b,
.hamyon-review-card.due .hamyon-review-card-meta b,
.hamyon-review-card.in_progress .hamyon-review-card-meta b {
  background: #e0a400;
}

.hamyon-review-card.completed .hamyon-review-card-meta b {
  background: #58a936;
}

.hamyon-review-card-meta span {
  margin-left: auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: #edf5e8;
  color: #66845c;
  font-size: 0.78rem;
  font-weight: 900;
}

.hamyon-review-card-meta span.is-due {
  background: #fff0b5;
  color: #8b6200;
}

.hamyon-review-card-meta span.is-completed {
  background: #dff3d7;
  color: #287c2f;
}

.hamyon-review-card h3 {
  margin: 11px 0 4px;
  color: #123f35;
  font-size: 1.08rem;
}

.hamyon-review-card p {
  margin: 0;
  color: #66736e;
  font-size: 0.9rem;
  font-weight: 600;
}

.hamyon-review-action {
  width: 100%;
  margin-top: 12px;
}

.hamyon-review-action.secondary {
  border: 1px solid #58a936;
  background: #fff;
  box-shadow: none;
  color: #08752f;
}

.hamyon-recheck-link {
  display: block;
  width: max-content;
  margin: 18px auto 0;
  color: #66736e;
  font-size: 0.85rem;
  font-weight: 800;
}

@media (min-width: 720px) {
  .hamyon-review-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .hamyon-due-card {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .hamyon-due-card > a {
    grid-column: 1 / -1;
    width: 100%;
  }
}


/* Stage five: animated image, word and translation recall. */
@keyframes stageFiveLetterArrive {
  0% { opacity: 0; transform: translate3d(0, 52px, 0) scale(.45) rotate(8deg); }
  70% { opacity: 1; transform: translate3d(0, -7px, 0) scale(1.08) rotate(-2deg); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1) rotate(0); }
}
@keyframes stageFiveLetterBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  38% { transform: translateY(-18px) scale(1.08); }
  68% { transform: translateY(3px) scale(.98); }
}
.stage-five-review { width: min(100% - 24px, 720px); }
.stage-five-header { margin-bottom: 14px; padding: 16px; border-radius: 24px; background: #20b23d; color: #fff; text-align: center; }
.stage-five-header h1 { margin: 4px 0; color: #fff; font-size: clamp(1.55rem, 5vw, 2rem); }
.stage-five-header > p { margin: 0; color: #fff; }
.stage-five-card { text-align: center; }
.stage-five-image-wrap { display: grid; place-items: center; height: min(32vh, 240px); min-height: 170px; padding: 10px 22px; overflow: hidden; border-radius: 20px; background: #f8fff7; }
body .stage-five-review .stage-five-image-wrap > img { width: min(100%, 280px) !important; height: 100% !important; max-width: 280px !important; object-fit: contain !important; object-position: center !important; }
.stage-five-image-wrap > span { color: #078638; font-size: 4.5rem; transform: rotate(-18deg); }
.stage-five-words { display: grid; align-content: center; min-height: 132px; margin-top: 10px; padding: 10px 4px; border-radius: 18px; background: #f8fff7; }
.stage-five-source, .stage-five-translation { display: flex; justify-content: center; min-width: 0; line-height: 1; white-space: pre; }
.stage-five-source span, .stage-five-translation span { display: inline-block; opacity: 0; font-weight: 1000; text-shadow: 0 1.5px 0 rgb(5 61 45 / 13%); animation-delay: calc(var(--letter-index) * 55ms); animation-fill-mode: both; }
.stage-five-source span { color: #123f36; font-size: clamp(2.15rem, 9vw, 3.3rem); }
.stage-five-translation { margin-top: 10px; }
.stage-five-translation span { color: #078638; font-size: clamp(1.45rem, 6vw, 2.15rem); text-shadow: 0 .5px 0 rgb(5 61 45 / 7%); }
.stage-five-source span.is-arriving, .stage-five-translation span.is-arriving { animation-name: stageFiveLetterArrive; animation-duration: 720ms; animation-timing-function: cubic-bezier(.2, .9, .25, 1.25); }
.stage-five-source span.is-bouncing { opacity: 1; animation-name: stageFiveLetterBounce; animation-duration: 680ms; animation-timing-function: ease-out; }
.stage-five-nav { display: flex; justify-content: center; gap: 12px; margin: 4px 0 12px; }
.stage-five-nav button { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #6e7a74; border-radius: 50%; background: #fff; color: #078638; cursor: pointer; font-size: 1.6rem; font-weight: 900; }
.stage-five-nav button.primary { border-color: #20b23d; background: #20b23d; color: #fff; box-shadow: 0 6px 14px rgb(32 178 61 / 25%); }
.stage-five-nav button:disabled { cursor: default; opacity: .4; }
.stage-five-start { border-radius: 999px; }
.stage-five-result-actions { display: grid; gap: 6px; margin-top: 10px; }
:root[data-theme="dark"] .stage-five-header { background: #20b23d; }
:root[data-theme="dark"] .stage-five-image-wrap { background: #f8fff7; }
:root[data-theme="dark"] .stage-five-source span { color: #123f36; }
:root[data-theme="dark"] .stage-five-nav button:not(.primary) { border-color: #82b9a9; background: #f8fff7; color: #078638; }
@media (max-width: 520px) {
  .stage-five-review { width: min(100% - 12px, 520px); }
  .stage-five-card { padding: 14px; }
  .stage-five-image-wrap { height: min(29vh, 210px); min-height: 155px; padding-inline: 14px; }
  .stage-five-words { min-height: 116px; }
}
@media (prefers-reduced-motion: reduce) {
  .stage-five-source span, .stage-five-translation span { opacity: 1; animation-duration: 1ms !important; animation-delay: 0ms !important; }
}

/* Focused listening review: shared visual language with the mobile client. */
.focused-review { width: min(100% - 32px, 720px); margin: 0 auto; padding: 0 0 48px; }
.focused-review-progress { height: 4px; margin-bottom: 18px; overflow: hidden; background: #d9ead9; }
.focused-review-progress span { display: block; width: 0; height: 100%; background: #078638; transition: width 180ms ease; }
.focused-review-heading { margin-bottom: 18px; padding: 18px 22px; border-radius: 24px; background: #20b23d; color: #fff; text-align: center; box-shadow: 0 12px 28px rgb(18 147 49 / 16%); }
.focused-review-heading .eyebrow { min-height: 1.15em; margin: 0 0 7px; color: #fff; }
.focused-review-heading h1 { margin: 0; color: #fff; font-size: clamp(1.55rem, 4vw, 2rem); font-weight: 900; line-height: 1.15; }
.focused-review-heading > p:last-child { margin: 7px 0 0; color: #fff; font-size: 1rem; font-weight: 700; }
.focused-review-card { display: grid; gap: 10px; padding: 22px; border: 0; border-radius: 24px; background: #fff; box-shadow: none; }
.focused-review-visual { display: grid; min-height: 120px; max-height: 185px; padding: 4px 12px; place-items: center; overflow: hidden; color: #078638; }
.focused-review-visual > span { transform: rotate(-22deg); font-size: 4.5rem; font-weight: 900; line-height: 1; }
.focused-review-visual img { width: min(100%, 260px); height: 175px; border-radius: 18px; object-fit: contain; }
.focused-review-extras { display: grid; gap: 8px; }
.focused-review-extra { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 58px; padding: 9px 10px 9px 12px; border-radius: 14px; background: #f4f8f1; color: #183f37; }
.focused-review-extra div { display: grid; gap: 2px; }
.focused-review-extra small { color: #078638; font-size: .64rem; font-weight: 900; }
.focused-review-extra span { font-size: .98rem; }
.focused-review-extra-audio { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; font-size: 1.1rem; }
.focused-review-extra-audio[data-playing="true"], .focused-review-listen[data-playing="true"] { background: #dbefd7; }
.focused-review-word { min-height: 1.15em; margin: 4px 0 12px; color: #123f36; font-size: clamp(1.65rem, 6vw, 2.7rem); font-weight: 900; line-height: 1.12; text-align: center; }
.focused-review-listen { min-height: 48px; border: 0; border-radius: 999px; background: #ffc94a; color: #123f36; cursor: pointer; font: 900 1rem inherit; box-shadow: 0 7px 16px rgb(218 162 0 / 20%); }
.focused-review-forgot { min-height: 42px; border: 1px solid #68736e; border-radius: 999px; background: #fff; color: #078638; cursor: pointer; font: inherit; }
.focused-review-remember { width: 100%; min-height: 48px; border-radius: 999px; font-size: 1.1rem; }
.focused-review-forgot { min-height: 28px; border: 0; }
.focused-review-feedback { min-height: 1.4em; margin: 0; color: #d94e43; text-align: center; }
.focused-review-finish { margin-top: 56px; text-align: center; }
.focused-review-finish[hidden], .focused-review-card[hidden] { display: none; }
.focused-review-finish-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: #24b342; color: #fff; font-size: 2rem; font-weight: 900; }
:root[data-theme="dark"] .focused-review-progress { background: #285c50; }
:root[data-theme="dark"] .focused-review-heading h1,
:root[data-theme="dark"] .focused-review-heading > p:last-child { color: #fff; }
:root[data-theme="dark"] .focused-review-card { background: #17483e; color: #f8fff7; }
:root[data-theme="dark"] .focused-review-extra { background: #23584c; color: #f8fff7; }
:root[data-theme="dark"] .focused-review-word { color: #fff; }
:root[data-theme="dark"] .focused-review-listen { border-color: #ffc94a; background: #ffc94a; color: #123f36; }
:root[data-theme="dark"] .focused-review-forgot { border-color: #82b9a9; background: transparent; color: #9cf08e; }
@media (max-width: 640px) {
  .focused-review { width: min(100% - 20px, 520px); }
  .focused-review-card { padding: 18px; }
}


.image-review-listen { width: 100%; min-height: 48px; font-weight: 800; }
.image-review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 6px; }
.image-review-option { aspect-ratio: 1; overflow: hidden; padding: 8px; border: 2px solid #d7e5d4; border-radius: 20px; background: #fff; cursor: pointer; transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease; }
.image-review-option:hover { transform: translateY(-2px); border-color: #24b342; box-shadow: 0 8px 20px rgb(18 63 54 / 10%); }
.image-review-option:disabled { cursor: default; }
.image-review-option img { width: 100%; height: 100%; border-radius: 14px; object-fit: contain; }
.review-recommendations { margin-top: 20px; border: 1px solid #ead88d; border-radius: 18px; background: #fff4c7; text-align: left; }
.review-recommendations summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; color: #078638; cursor: pointer; font-weight: 900; list-style: none; }
.review-recommendations summary::-webkit-details-marker { display: none; }
.review-recommendations summary::after { content: "⌄"; font-size: 1.25rem; transition: transform 160ms ease; }
.review-recommendations[open] summary::after { transform: rotate(180deg); }
.review-recommendations summary small { margin-left: auto; color: #66736e; font-size: .78rem; }
.review-recommendation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 12px 14px; }
.review-recommendation-card { min-width: 0; overflow: hidden; border: 1px solid #d7e5d4; border-radius: 15px; background: #fff; color: #123f36; text-decoration: none; }
.review-recommendation-card:hover { border-color: #24b342; transform: translateY(-1px); }
.review-recommendation-media { display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: #eaf4ee; font-size: 2.3rem; }
.review-recommendation-media img { width: 100%; height: 100%; object-fit: cover; }
.review-recommendation-copy { display: grid; gap: 3px; padding: 9px; }
.review-recommendation-copy small { overflow: hidden; color: #078638; font-size: .72rem; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.review-recommendation-copy strong { display: -webkit-box; overflow: hidden; color: #123f36; font-size: .9rem; line-height: 1.2; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.review-recommendation-copy > span { color: #66736e; font-size: .7rem; font-weight: 700; }
:root[data-theme="dark"] .image-review-option { border-color: #3b7466; background: #f8fff7; }
:root[data-theme="dark"] .review-recommendations { border-color: #3b7466; background: #17483e; }
:root[data-theme="dark"] .review-recommendations summary small { color: #b8d4cb; }
:root[data-theme="dark"] .review-recommendation-card { border-color: #3b7466; background: #f8fff7; }
@media (min-width: 720px) {
  .review-recommendation-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .review-action-card .review-recommendation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .focused-image-review { width: min(100% - 32px, 680px); }
  .image-review-option { border-radius: 24px; }
}


.image-review-header { margin-bottom: 14px; padding: 16px; border-radius: 24px; background: #20b23d; color: #fff; }
.image-review-header .eyebrow,
.image-review-header h1,
.image-review-header > p:last-child { color: #fff !important; }
.image-review-mascot { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; text-align: left; }
.image-review-mascot img { width: 54px; height: 54px; object-fit: contain; }
.image-review-mascot div { display: grid; gap: 2px; min-width: 0; }
.image-review-mascot strong { color: #fff; font-size: 1.05rem; }
.image-review-mascot span { color: #fff; opacity: .92; }
.image-review-listen { border: 0; background: #ffc94a; color: #123f36; font-weight: 900; box-shadow: 0 5px 12px rgb(122 86 0 / 18%); }
.image-review-listen:hover { background: #ffd66d; }
.image-review-feedback { min-height: 0; margin: 4px 0 0; padding: 0; font-weight: 900; }
.image-review-feedback:empty { display: none; }
.image-review-feedback[data-state="wrong"] { padding: 10px 12px; border: 1px solid #ff7062; border-radius: 14px; background: #fff0ee; }
.image-review-feedback[data-state="correct"] { padding: 10px 12px; border: 1px solid #20b23d; border-radius: 14px; background: #eaf8e8; }
:root[data-theme="dark"] .image-review-header { background: #20b23d; }
:root[data-theme="dark"] .image-review-listen { border: 0; background: #ffc94a; color: #123f36; }
@media (max-width: 640px) {
  .image-review-grid { gap: 10px; }
  .image-review-option { padding: 6px; border-radius: 16px; }
}

/* Early review stages share the bright mobile visual language. */
.early-review-heading { background: #20b23d; color: #fff; border: 0; border-radius: 26px; box-shadow: 0 12px 28px rgb(18 147 49 / 16%); }
.early-review-heading h1, .early-review-heading p, .early-review-heading .eyebrow, .early-review-heading .lead { color: #fff !important; }
.early-review-heading .selected-profile-chip { background: #fff; color: #123f36; }
.early-review-heading .button-soft { border-color: #ffc94a; background: #ffc94a; color: #123f36; }
.early-review-heading + .review-exercise-layout .review-task-start { border-color: #ffc94a; background: #ffc94a; color: #123f36; box-shadow: 0 7px 16px rgb(218 162 0 / 20%); }
.early-review-heading + .review-exercise-layout .review-playback-media { min-height: 190px; max-height: 245px; padding: 12px; }
.early-review-heading + .review-exercise-layout .review-playback-media img, .early-review-heading + .review-exercise-layout .review-playback-media video { width: 100%; height: 220px; object-fit: contain; }
.early-review-heading + .review-exercise-layout .review-playback-copy { margin-top: 0; text-align: center; }
.early-review-heading + .review-exercise-layout .review-playback-copy h3 { font-size: clamp(1.7rem, 5vw, 2.8rem); font-weight: 900; }
:root[data-theme="dark"] .early-review-heading { background: #20b23d; color: #fff; }
@media (max-width: 640px) { .early-review-heading + .review-exercise-layout .review-playback-media { min-height: 165px; max-height: 210px; } .early-review-heading + .review-exercise-layout .review-playback-media img, .early-review-heading + .review-exercise-layout .review-playback-media video { height: 185px; } }


/* Study day-off calendar: shared responsive UI for web and installed PWA. */
.study-calendar-panel {
  display: grid;
  gap: 20px;
  margin-top: 18px;
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 96% 5%, color-mix(in srgb, var(--sun-300) 24%, transparent) 0 90px, transparent 92px),
    var(--surface-sunken);
}

.study-calendar-heading,
.date-ranges-title,
.study-calendar-dialog-header,
.calendar-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.study-calendar-heading h2,
.study-calendar-heading p,
.study-calendar-dialog-header h2,
.study-calendar-dialog-header p,
.date-ranges-title p {
  margin: 0;
}

.study-calendar-heading > div,
.date-ranges-title > div {
  min-width: 0;
}

.study-calendar-heading > div > p:last-child {
  max-width: 650px;
  color: var(--muted);
  font-size: .92rem;
}

.study-calendar-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--sun-300);
  color: #624500;
  font-size: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.weekly-days-field,
.date-ranges-field {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.weekly-days-field > small,
.date-ranges-title small,
.selected-date-range small {
  color: var(--muted);
}

.weekly-days-field #id_weekly_days_off {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.weekly-days-field #id_weekly_days_off > div {
  min-width: 0;
}

.weekly-days-field #id_weekly_days_off label {
  display: grid;
  place-items: center;
  min-height: 48px;
  padding: 8px 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-elevated);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: .82rem;
  font-weight: 900;
  text-align: center;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.weekly-days-field #id_weekly_days_off label:hover {
  transform: translateY(-1px);
  border-color: var(--leaf-500);
}

.weekly-days-field #id_weekly_days_off input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.weekly-days-field #id_weekly_days_off label:has(input:checked) {
  border-color: var(--leaf-600);
  background: var(--leaf-600);
  color: #fff;
  box-shadow: 0 7px 16px color-mix(in srgb, var(--leaf-600) 25%, transparent);
}

.weekly-days-field #id_weekly_days_off label:has(input:focus-visible) {
  outline: 3px solid color-mix(in srgb, var(--sky-500) 42%, transparent);
  outline-offset: 2px;
}

.day-off-source {
  display: none;
}

.date-ranges-title .button {
  flex: 0 0 auto;
  min-height: 44px;
}

.selected-date-ranges {
  display: grid;
  gap: 9px;
}

.selected-date-range {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--leaf-500) 38%, var(--line));
  border-radius: 15px;
  background: var(--leaf-50);
}

.selected-date-range-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--leaf-700);
  font-size: 1.2rem;
}

.selected-date-range div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.selected-date-range button,
.study-calendar-close,
.calendar-month-toolbar button {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--surface-elevated);
  color: var(--ink);
  cursor: pointer;
}

.selected-date-range button {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: var(--coral-500);
  font-size: 1.25rem;
}

.date-ranges-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 15px;
  color: var(--muted);
}

.date-ranges-empty[hidden] {
  display: none;
}

.date-ranges-empty span {
  font-size: 1.35rem;
}

.date-ranges-empty p {
  margin: 0;
}

.study-calendar-modal[hidden] {
  display: none;
}

.study-calendar-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
}

.study-calendar-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(6 30 25 / 62%);
  backdrop-filter: blur(8px);
}

.study-calendar-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  width: min(560px, 100%);
  max-height: calc(100svh - 36px);
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 30px 90px rgb(3 26 20 / 34%);
  overscroll-behavior: contain;
}

.study-calendar-close {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 1.55rem;
}

.calendar-selection-summary {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: var(--surface-sunken);
}

.calendar-selection-summary span {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: .75rem;
}

.calendar-selection-summary span:last-child {
  text-align: right;
}

.calendar-selection-summary strong {
  color: var(--ink);
  font-size: .9rem;
}

.calendar-selection-summary i {
  color: var(--leaf-600);
  font-style: normal;
}

.calendar-month-toolbar {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
}

.calendar-month-toolbar strong {
  text-align: center;
  text-transform: capitalize;
}

.calendar-month-toolbar button {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  font-size: 1.6rem;
}

.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
  color: var(--muted);
  font-size: .73rem;
  text-align: center;
}

.calendar-days {
  gap: 3px 0;
}

.calendar-days button {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
  isolation: isolate;
}

.calendar-days button::before {
  position: absolute;
  inset: 9%;
  z-index: -1;
  border-radius: 999px;
  content: "";
}

.calendar-days button:hover::before,
.calendar-days button.is-today::before {
  border: 1.5px solid var(--leaf-600);
}

.calendar-days button.is-muted {
  color: color-mix(in srgb, var(--muted) 42%, transparent);
}

.calendar-days button.is-in-range {
  background: var(--leaf-100);
}

.calendar-days button.is-start,
.calendar-days button.is-end {
  background: var(--leaf-100);
  color: #fff;
}

.calendar-days button.is-start::before,
.calendar-days button.is-end::before {
  border: 0;
  background: var(--leaf-600);
}

.calendar-helper {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  text-align: center;
}

.calendar-dialog-actions .button {
  flex: 1 1 0;
}

body.has-open-modal {
  overflow: hidden;
}

:root[data-theme="dark"] .weekly-days-field #id_weekly_days_off label:has(input:checked),
:root[data-theme="dark"] .calendar-days button.is-start::before,
:root[data-theme="dark"] .calendar-days button.is-end::before {
  background: #35c75a;
  color: #0c3028;
}

:root[data-theme="dark"] .calendar-days button.is-start,
:root[data-theme="dark"] .calendar-days button.is-end {
  color: #0c3028;
}

@media (max-width: 640px) {
  .study-calendar-panel {
    margin-inline: -4px;
    padding: 14px;
    border-radius: 20px;
  }

  .study-calendar-heading {
    align-items: start;
  }

  .study-calendar-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }

  .weekly-days-field #id_weekly_days_off {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .date-ranges-title {
    align-items: stretch;
    flex-direction: column;
  }

  .date-ranges-title .button {
    width: 100%;
  }

  .study-calendar-modal {
    align-items: end;
    padding: 0;
  }

  .study-calendar-dialog {
    width: 100%;
    max-height: 94svh;
    padding: 18px 14px calc(18px + env(safe-area-inset-bottom));
    border-width: 1px 0 0;
    border-radius: 26px 26px 0 0;
  }

  .calendar-days button {
    min-height: 42px;
  }

  .calendar-dialog-actions {
    position: sticky;
    bottom: calc(-18px - env(safe-area-inset-bottom));
    z-index: 2;
    margin: 0 -14px calc(-18px - env(safe-area-inset-bottom));
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
    background: var(--surface);
  }
}

  .desktop-more-icon {
    display: grid !important;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 11px;
    background: var(--leaf-50);
    color: var(--leaf-700);
  }

  .desktop-more-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
/* Global support shortcut. It stays reachable above page overlays and mobile navigation. */
.global-support-fab {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 120;
  display: grid;
  color: #fff;
  text-decoration: none;
  filter: drop-shadow(0 12px 22px rgb(3 45 30 / 28%));
  transition:
    bottom 220ms ease,
    filter 180ms ease,
    transform 180ms ease;
  -webkit-tap-highlight-color: transparent;
}

.global-support-fab-icon {
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: linear-gradient(145deg, #19b86b, #08752f);
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 22%),
    0 0 0 3px rgb(255 201 40 / 72%);
}

.global-support-fab-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.global-support-fab-label {
  position: absolute;
  top: 50%;
  right: calc(100% + 10px);
  white-space: nowrap;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--leaf-500) 30%, var(--line));
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(8px, -50%);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.global-support-fab:hover,
.global-support-fab:focus-visible {
  filter: drop-shadow(0 15px 26px rgb(3 45 30 / 34%));
  transform: translateY(-3px);
}

.global-support-fab:hover .global-support-fab-label,
.global-support-fab:focus-visible .global-support-fab-label {
  opacity: 1;
  transform: translate(0, -50%);
}

.global-support-fab:focus-visible {
  border-radius: 50%;
  outline: 4px solid color-mix(in srgb, var(--sun-300) 78%, #fff);
  outline-offset: 5px;
}

body:has(.pwa-install-card:not([hidden])) .global-support-fab {
  bottom: 112px;
}

@media (max-width: 859px) {
  .global-support-fab {
    right: max(14px, env(safe-area-inset-right));
    bottom: calc(88px + env(safe-area-inset-bottom));
  }

  .global-support-fab-icon {
    width: 54px;
    height: 54px;
    border-width: 2px;
  }

  .global-support-fab-icon svg {
    width: 27px;
    height: 27px;
  }

  .global-support-fab-label {
    display: none;
  }

  body:has(.pwa-install-card:not([hidden])) .global-support-fab {
    bottom: calc(246px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .global-support-fab,
  .global-support-fab-label {
    transition: none;
  }
}

@media print {
  .global-support-fab {
    display: none;
  }
}


/* Battle notifications shared by home and profile pages. */
.battle-notice-panel { display: grid; gap: 1rem; margin: 1rem 0 1.35rem; padding: clamp(1rem, 3vw, 1.35rem); color: var(--text, var(--ink)); border: 1px solid var(--border, var(--line)); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-sm); }
.battle-notice-heading, .battle-notice-heading > div { display: flex; align-items: center; justify-content: space-between; gap: .65rem; }
.battle-notice-heading h2, .battle-notice-group h3 { margin: 0; }
.battle-notice-heading a { color: var(--leaf-700); font-weight: 900; }
.battle-notice-group { display: grid; gap: .55rem; }
.battle-notice-group h3 { font-size: 1rem; }
.battle-notice-card { display: flex; align-items: center; gap: .75rem; padding: .8rem; color: inherit; text-decoration: none; border: 1px solid var(--border, var(--line)); border-radius: 15px; background: var(--shade, var(--surface-sunken)); }
.battle-notice-card.is-invitation { justify-content: space-between; border-color: var(--leaf-500); }
.battle-notice-card > div, .battle-notice-card > span:not(.battle-notice-icon) { display: grid; gap: .15rem; }
.battle-notice-card small, .battle-notice-card time, .battle-notice-card div > span { color: var(--muted); }
.battle-notice-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--primary-100); font-size: 1.35rem; }
.battle-notice-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.battle-public-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
@media (max-width: 800px) { .battle-public-strip { grid-template-columns: 1fr; } .battle-notice-card.is-invitation { align-items: stretch; flex-direction: column; } }

.battle-notice-panel.is-compact { margin: 0; padding: 18px; border-radius: 24px; }
.battle-notice-panel.is-compact .battle-notice-heading { align-items: flex-start; flex-wrap: wrap; }
.battle-notice-panel.is-compact .battle-public-strip { grid-template-columns: 1fr; }
.battle-notice-panel.is-compact .battle-notice-card { padding: .7rem; }
.battle-notice-empty { display: grid; justify-items: center; gap: .45rem; padding: 1rem .5rem .25rem; text-align: center; }
.battle-notice-empty > span { font-size: 2rem; }
.battle-notice-empty small { color: var(--muted); }
.battle-notice-empty .button { margin-top: .35rem; }
