:root {
  --bg: #f9fbff;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --text: #17324d;
  --muted: #5f7288;
  --primary: #2d7ff9;
  --primary-dark: #1f62c8;
  --secondary: #ff8a3d;
  --accent: #ffcf4d;
  --sky: #dff3ff;
  --pink: #ffe1ef;
  --lime: #eef9cb;
  --lavender: #ece8ff;
  --success: #1f9f64;
  --shadow-lg: 0 24px 60px rgba(38, 76, 114, 0.14);
  --shadow-md: 0 16px 34px rgba(38, 76, 114, 0.1);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --max-width: 1180px;
  --rainbow-blue: #72d4ff;
  --rainbow-pink: #ff9bc7;
  --rainbow-yellow: #ffd96b;
  --rainbow-orange: #ffb067;
  --rainbow-green: #b6f17f;
  --rainbow-purple: #c1aeff;
  --font-arabic: "IBM Plex Sans Arabic", "Noto Sans Arabic", Tahoma, sans-serif;
  --font-body: "Noto Sans", "Noto Sans Hebrew", "Noto Sans Arabic", "Segoe UI", sans-serif;
  --font-heading: "Noto Sans", "Noto Sans Hebrew", "Noto Sans Arabic", "Segoe UI", sans-serif;
}

html.lingurise-booting body {
  opacity: 0;
}

html.lingurise-ready body,
body {
  transition: opacity 180ms ease;
}

body.lingurise-games-focus .promo-marquee-section {
  display: none;
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at 10% 16%, rgba(255, 155, 199, 0.34), transparent 18%),
    radial-gradient(circle at 88% 14%, rgba(114, 212, 255, 0.34), transparent 20%),
    radial-gradient(circle at 84% 72%, rgba(255, 217, 107, 0.32), transparent 18%),
    radial-gradient(circle at 16% 78%, rgba(182, 241, 127, 0.28), transparent 18%),
    linear-gradient(135deg, #fff8ef 0%, #fffef8 16%, #eef8ff 34%, #f5eeff 52%, #f1fff0 68%, #fff6d8 84%, #fff1f8 100%);
  line-height: 1.6;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.28;
  pointer-events: none;
  z-index: -1;
}

body::after {
  content: "";
  position: fixed;
  inset: -12%;
  pointer-events: none;
  z-index: -2;
  opacity: 0.85;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 176, 103, 0.25), transparent 20%),
    radial-gradient(circle at 78% 18%, rgba(114, 212, 255, 0.26), transparent 18%),
    radial-gradient(circle at 24% 82%, rgba(193, 174, 255, 0.22), transparent 20%),
    radial-gradient(circle at 84% 78%, rgba(255, 155, 199, 0.22), transparent 20%),
    radial-gradient(circle at 52% 58%, rgba(182, 241, 127, 0.18), transparent 24%);
  filter: blur(24px);
}

html[lang="en"] body {
  --font-body: "Noto Sans", "Noto Sans Hebrew", "Noto Sans Arabic", "Segoe UI", sans-serif;
  --font-heading: "Noto Sans", "Noto Sans Hebrew", "Noto Sans Arabic", "Segoe UI", sans-serif;
}

html[lang="ar"] body {
  --font-body: var(--font-arabic);
  --font-heading: var(--font-arabic);
  letter-spacing: 0;
}

html[lang="he"] body {
  --font-body: "Noto Sans Hebrew", "Noto Sans", "Noto Sans Arabic", "Segoe UI", sans-serif;
  --font-heading: "Noto Sans Hebrew", "Noto Sans", "Noto Sans Arabic", "Segoe UI", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

section[id] {
  scroll-margin-top: 110px;
}

.container {
  width: min(var(--max-width), 92vw);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5000;
  isolation: isolate;
  overflow: visible;
  background:
    linear-gradient(135deg, rgba(255, 247, 215, 0.66), rgba(226, 245, 255, 0.72), rgba(255, 232, 242, 0.66)),
    rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(23, 50, 77, 0.06);
}

body.touch-home-topbar-mode {
  padding-top: 78px;
}

body.touch-home-topbar-mode .topbar {
  position: fixed;
  inset-inline: 0;
  top: 0;
  transition: transform 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
}

body.touch-home-topbar-hidden .topbar {
  transform: translateY(calc(-100% - 8px));
  opacity: 0;
  pointer-events: none;
}

body.touch-page-topbar-mode {
  padding-top: 78px;
}

body.touch-page-topbar-mode .topbar {
  position: fixed;
  inset-inline: 0;
  top: 0;
  transition: transform 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
}

body.touch-page-topbar-hidden .topbar {
  transform: translateY(calc(-100% - 8px));
  opacity: 0;
  pointer-events: none;
}

body.touch-learn-topbar-mode {
  padding-top: 0 !important;
}

body.touch-learn-topbar-mode .topbar {
  display: block;
}

body.learn-topbar-scroll-mode {
  padding-top: 78px;
}

body.learn-topbar-scroll-mode .topbar {
  position: fixed;
  inset-inline: 0;
  top: 0;
  transition: transform 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
}

body.learn-topbar-hidden .topbar {
  display: none !important;
  transform: translateY(calc(-100% - 8px));
  opacity: 0;
  pointer-events: none;
}

body.learn-topbar-hidden {
  padding-top: 0 !important;
}

main,
footer {
  position: relative;
  z-index: 1;
}

.balloon-sky {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.floating-balloon {
  position: absolute;
  left: 0;
  bottom: -220px;
  width: var(--balloon-size, 78px);
  height: calc(var(--balloon-size, 78px) * 1.9);
  opacity: 0;
  animation: balloon-rise var(--balloon-duration, 24s) linear var(--balloon-delay, 0s) infinite;
  will-change: transform;
  filter: saturate(1.08);
}

.floating-balloon-body {
  position: relative;
  width: var(--balloon-size, 78px);
  height: calc(var(--balloon-size, 78px) * 1.16);
  border-radius: 50% 50% 48% 48%;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.34) 18%, transparent 19%),
    linear-gradient(180deg, var(--balloon-color-top, rgba(255, 155, 199, 0.95)), var(--balloon-color-bottom, rgba(114, 212, 255, 0.95)));
  border: 2px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 28px rgba(42, 72, 117, 0.14);
  animation: balloon-sway var(--balloon-sway-duration, 5.2s) ease-in-out infinite alternate;
}

.floating-balloon-body::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 14px;
  height: 14px;
  background: var(--balloon-color-bottom, rgba(114, 212, 255, 0.95));
  border-radius: 3px 50% 50% 50%;
  transform: translateX(-50%) rotate(45deg);
  box-shadow: 0 4px 8px rgba(42, 72, 117, 0.12);
}

.floating-balloon-string {
  position: absolute;
  left: 50%;
  top: calc(var(--balloon-size, 78px) * 1.16);
  width: 2px;
  height: var(--balloon-string-height, 88px);
  background: linear-gradient(180deg, rgba(118, 134, 160, 0.7), rgba(118, 134, 160, 0));
  transform: translateX(-50%);
}

@keyframes balloon-rise {
  0% {
    transform: translate3d(var(--balloon-drift-start, 0px), 0, 0) scale(var(--balloon-scale, 1));
    opacity: 0;
  }

  10%,
  88% {
    opacity: var(--balloon-visible-opacity, 0.58);
  }

  100% {
    transform: translate3d(var(--balloon-drift-end, 42px), calc(-100vh - 320px), 0) scale(calc(var(--balloon-scale, 1) * 1.04));
    opacity: 0;
  }
}

@keyframes balloon-sway {
  0% {
    transform: rotate(-5deg) translateX(-10px);
  }

  100% {
    transform: rotate(7deg) translateX(12px);
  }
}

.topbar-inner,
.nav,
.topbar-actions,
.lang-switch,
.hero-actions,
.tabs,
.group-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
  padding: 8px 0;
  overflow: visible;
  position: relative;
  z-index: 5001;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  position: relative;
  z-index: 3;
}

.logo-media {
  inline-size: clamp(78px, 8.4vw, 102px);
  block-size: clamp(78px, 8.4vw, 102px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 255, 0.94), rgba(255, 248, 221, 0.94));
  border: 1px solid rgba(103, 148, 219, 0.2);
  box-shadow:
    0 18px 34px rgba(41, 77, 145, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.logo-media:hover,
.logo-media:focus-visible {
  transform: translateY(-1px);
  box-shadow:
    0 20px 36px rgba(41, 77, 145, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  outline: none;
}

.logo-media-image {
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(31, 68, 132, 0.12));
}

.logo-mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 14px;
  background: conic-gradient(from 200deg, #2d7ff9, #73d7ff, #ffcf4d, #ff8a3d, #ff6aa5, #2d7ff9);
  box-shadow: var(--shadow-md);
}

.logo-text {
  display: grid;
  gap: 2px;
}

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

.logo-text strong,
.hero h1,
.hero-panel h2,
.section-heading h2,
.step-card h3,
.grade-card h3,
.category-card h3,
.content-card h4,
.product-body h3,
.cta-copy h2,
.form-card h3,
.footer-box strong {
  font-family: var(--font-heading);
}

.logo-text strong {
  font-size: 1.02rem;
  letter-spacing: 0.02em;
}

.logo-text span {
  font-size: 0.78rem;
}

.logo-text span,
.hero p,
.panel-note,
.section-heading p,
.step-card p,
.grade-card p,
.category-card p,
.content-card p,
.product-body p,
.cta-copy p,
.footer-box p,
.stat-card span,
.mini-stat span {
  color: var(--muted);
}

.nav {
  order: 3;
  flex: 1 1 auto;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
  flex-wrap: wrap;
  overflow: visible;
  scrollbar-width: none;
  white-space: normal;
  position: relative;
  z-index: 5002;
  overflow: visible;
  gap: 8px;
}

.topbar-actions {
  order: 2;
  justify-content: flex-start;
  align-items: center;
  align-self: center;
  flex-direction: row;
  flex-wrap: nowrap;
  flex-shrink: 0;
  gap: 8px;
  padding-left: 0;
  min-height: 0;
  position: relative;
  z-index: 5003;
  gap: 6px;
}

.topbar-inner > .topbar-actions + .nav + .topbar-actions {
  display: none !important;
}

.nav > *,
.topbar-actions > * {
  flex-shrink: 0;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a,
.lang-btn,
.tab-btn,
.filter-btn,
.mini-btn,
.btn {
  border: 0;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.nav a,
.lang-btn,
.tab-btn,
.filter-btn,
.mini-btn {
  padding: 7px 11px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 249, 223, 0.92), rgba(236, 246, 255, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 22px rgba(38, 76, 114, 0.08);
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
}

.nav a:hover,
.nav a:focus-visible,
.lang-btn:hover,
.lang-btn:focus-visible,
.tab-btn:hover,
.tab-btn:focus-visible,
.filter-btn:hover,
.filter-btn:focus-visible,
.mini-btn:hover,
.mini-btn:focus-visible,
.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.nav a:hover,
.nav a:focus-visible,
.mini-btn:hover,
.mini-btn:focus-visible {
  background: #eef5ff;
  color: var(--primary-dark);
}

.page-link-active {
  background: linear-gradient(135deg, #2d7ff9 0%, #62c1ff 52%, #ff8a3d 100%) !important;
  color: #ffffff !important;
}

.lang-btn.active,
.tab-btn.active {
  background: linear-gradient(135deg, #2d7ff9 0%, #62c1ff 52%, #ff8a3d 100%);
  color: #ffffff;
}

.filter-btn.active {
  background: linear-gradient(135deg, #ff8a3d 0%, #ffb267 56%, #ffd96b 100%);
  color: #ffffff;
}

.google-login-btn {
  order: 1;
  width: auto;
  min-height: 40px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 249, 223, 0.92), rgba(236, 246, 255, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(38, 76, 114, 0.08);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  position: static;
}

.google-login-btn:hover,
.google-login-btn:focus-visible {
  transform: translateY(-2px);
  outline: none;
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(38, 76, 114, 0.14);
}

.google-login-btn svg {
  width: 22px;
  height: 22px;
  display: block;
}

.google-login-btn-label {
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--text);
  white-space: nowrap;
}

.google-login-btn-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lang-switch {
  order: 8;
  position: relative;
  display: block;
  align-self: center;
  flex-shrink: 0;
  z-index: 6000;
}

.lang-switch-trigger {
  min-height: 40px;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 249, 223, 0.92), rgba(236, 246, 255, 0.9));
  box-shadow: 0 10px 22px rgba(38, 76, 114, 0.08);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  position: relative;
  z-index: 6001;
}

.lang-switch-trigger:hover,
.lang-switch-trigger:focus-visible {
  transform: translateY(-2px);
  outline: none;
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(38, 76, 114, 0.14);
}

.lang-switch-title {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.lang-switch-current {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
}

.lang-switch-arrow {
  font-size: 0.92rem;
  color: var(--primary-dark);
  transition: transform 0.2s ease;
}

.lang-switch.is-open .lang-switch-arrow {
  transform: rotate(180deg);
}

.lang-switch-panel {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  min-width: 190px;
  padding: 10px;
  display: none;
  gap: 8px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 255, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 34px rgba(38, 76, 114, 0.14);
  z-index: 7000;
  pointer-events: auto;
}

.lang-switch.is-open .lang-switch-panel {
  display: grid;
}

.lang-switch .lang-btn {
  width: 100%;
  justify-content: flex-start;
}

.hero {
  padding: 42px 0 24px;
}

.promo-marquee-section {
  position: relative;
  z-index: 2;
  padding: 12px 0 0;
}

.promo-marquee {
  position: relative;
  width: min(1280px, calc(100% - 32px));
  min-height: 66px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 999px;
  direction: ltr;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 216, 0.94), rgba(230, 245, 255, 0.95), rgba(255, 232, 242, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 30px rgba(38, 76, 114, 0.08);
}

.promo-marquee-track,
.promo-marquee-group,
.promo-marquee-badge,
.promo-marquee-text,
.promo-marquee-separator {
  display: none !important;
}

.promo-marquee::before,
.promo-marquee::after {
  content: "Lingurise ✦ ابدأ رحلتك في تعلم الإنجليزية مع Lingurise وتمتع بشهر مجاني كامل في مجموعات المحادثة التفاعلية ✦ Lingurise ✦ ابدأ رحلتك في تعلم الإنجليزية مع Lingurise وتمتع بشهر مجاني كامل في مجموعات المحادثة التفاعلية ✦ Lingurise ✦ ";
  position: absolute;
  top: 50%;
  left: 0;
  display: block;
  width: max-content;
  white-space: nowrap;
  color: var(--primary-dark);
  font-size: clamp(1rem, 1.45vw, 1.12rem);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
  transform: translate3d(0, -50%, 0);
  will-change: transform;
}

.promo-marquee::before {
  animation: promo-marquee-chain-a 22s linear infinite;
}

.promo-marquee::after {
  animation: promo-marquee-chain-b 22s linear infinite;
}

@keyframes promo-marquee-chain-a {
  from {
    transform: translate3d(0, -50%, 0);
  }

  to {
    transform: translate3d(-100%, -50%, 0);
  }
}

@keyframes promo-marquee-chain-b {
  from {
    transform: translate3d(100%, -50%, 0);
  }

  to {
    transform: translate3d(0, -50%, 0);
  }
}

.promo-marquee::before,
.promo-marquee::after {
  content: none !important;
  animation: none !important;
}

.promo-marquee-lane {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-width: 100%;
  min-height: 66px;
  white-space: nowrap;
  will-change: transform;
  animation: promo-marquee-loop 34s linear infinite;
}

.promo-marquee-reel {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  flex-shrink: 0;
  padding-inline: 18px;
}

.promo-marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.promo-marquee-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(45, 127, 249, 0.14), rgba(255, 209, 93, 0.2), rgba(114, 212, 255, 0.2));
  color: var(--primary-dark);
  font-size: 0.9rem;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(38, 76, 114, 0.08);
}

.promo-marquee-copy,
.promo-marquee-dot {
  color: var(--primary-dark);
  font-size: clamp(1rem, 1.45vw, 1.12rem);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.promo-marquee-dot {
  opacity: 0.8;
}

@keyframes promo-marquee-loop {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-50%, 0, 0);
  }
}

.hero-grid,
.cta {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 24px;
  align-items: stretch;
}

.hero-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.hero-grid-featured {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas: "media copy";
}

.hero-grid-featured > .hero-copy {
  grid-area: copy;
}

.hero-grid-featured > .hero-video-card {
  grid-area: media;
}

.glass-card,
.category-card,
.content-card,
.product-card,
.cta,
.footer-box,
.step-card,
.stat-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9)),
    linear-gradient(135deg, rgba(255, 217, 107, 0.34), rgba(114, 212, 255, 0.26), rgba(255, 155, 199, 0.28), rgba(182, 241, 127, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.hero-copy,
.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 32px;
}

.hero-copy {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 249, 221, 0.92), rgba(236, 247, 255, 0.92), rgba(255, 235, 245, 0.9));
}

.hero-copy-video {
  display: grid;
  align-content: start;
  gap: 0;
}

.hero-copy-video .eyebrow,
.hero-copy-video h1,
.hero-copy-video #heroText,
.hero-copy-video .hero-actions,
.hero-copy-video .hero-points {
  display: none;
}

.hero-copy-video-shell {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0;
  align-content: start;
}

.hero-copy::before,
.hero-panel::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  top: -90px;
  inset-inline-end: -70px;
  background: rgba(255, 255, 255, 0.45);
}

.hero-copy::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  inset-inline-start: -60px;
  inset-block-end: -80px;
  background: rgba(255, 207, 77, 0.32);
}

.hero-admin-strip {
  position: relative;
  z-index: 1;
  margin-bottom: 14px;
}

.hero-admin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(45, 127, 249, 0.16), rgba(114, 212, 255, 0.14), rgba(255, 138, 61, 0.16));
  border: 1px solid rgba(45, 127, 249, 0.16);
  box-shadow: 0 16px 28px rgba(38, 76, 114, 0.1);
  color: var(--primary-dark);
  font-size: 0.98rem;
  font-weight: 900;
}

.hero-admin-button:hover,
.hero-admin-button:focus-visible {
  transform: translateY(-2px);
  outline: none;
  background: linear-gradient(135deg, rgba(45, 127, 249, 0.22), rgba(114, 212, 255, 0.18), rgba(255, 138, 61, 0.22));
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(114, 212, 255, 0.24), rgba(255, 217, 107, 0.28), rgba(255, 155, 199, 0.18));
  color: var(--primary-dark);
  font-size: 0.92rem;
  font-weight: 800;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.5rem);
  line-height: 1.15;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.hero p,
.hero-actions,
.hero-points {
  position: relative;
  z-index: 1;
}

.btn {
  padding: 14px 20px;
  font-weight: 800;
  font-size: 0.98rem;
  cursor: pointer;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #2d7ff9 0%, #69c8ff 54%, #ff8a3d 100%);
  box-shadow: 0 16px 34px rgba(45, 127, 249, 0.24), 0 8px 18px rgba(255, 138, 61, 0.22);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: linear-gradient(135deg, #1f62c8 0%, #2d7ff9 46%, #ff8a3d 100%);
}

.btn-light {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 209, 0.88), rgba(231, 245, 255, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.9);
  color: var(--text);
  box-shadow: 0 12px 26px rgba(38, 76, 114, 0.1);
}

.full-width {
  width: 100%;
}

.hero-points,
.grade-list,
.cta-list {
  list-style: none;
}

.hero-points {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.hero-points li,
.grade-list li,
.cta-list li {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 247, 223, 0.84), rgba(236, 247, 255, 0.82));
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(38, 76, 114, 0.06);
}

.hero-points li {
  border-radius: 999px;
}

.hero-panel {
  display: grid;
  gap: 18px;
  background:
    linear-gradient(135deg, rgba(114, 212, 255, 0.26), rgba(193, 174, 255, 0.22), rgba(255, 217, 107, 0.24), rgba(255, 155, 199, 0.18)),
    rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.74);
}

.hero-video-card {
  align-content: start;
  gap: 0;
}

.hero-level-card {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 252, 241, 0.96)),
    linear-gradient(135deg, rgba(114, 212, 255, 0.18), rgba(255, 217, 107, 0.22), rgba(255, 155, 199, 0.2));
}

.hero-level-card .hero-video-badge,
.hero-level-card .hero-video-frame {
  display: none !important;
}

.hero-level-head,
.hero-level-progress,
.hero-level-shell {
  position: relative;
  z-index: 1;
}

.hero-level-head {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.hero-level-logo {
  width: 88px;
  height: 88px;
  border-radius: 26px;
  object-fit: cover;
  box-shadow: 0 16px 30px rgba(38, 76, 114, 0.14);
  background: rgba(255, 255, 255, 0.92);
  padding: 8px;
}

.hero-level-heading {
  display: grid;
  gap: 8px;
}

.hero-level-badge {
  width: fit-content;
  display: inline-flex;
}

.hero-level-title {
  margin: 0;
  font-size: clamp(1.28rem, 2.5vw, 1.8rem);
  line-height: 1.25;
  color: var(--primary-dark);
}

.hero-level-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

.hero-level-progress {
  display: grid;
  gap: 10px;
}

.hero-level-progress-track {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(205, 223, 241, 0.72);
  box-shadow: inset 0 2px 8px rgba(38, 76, 114, 0.08);
}

.hero-level-progress-fill {
  display: block;
  width: 12.5%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, #2d7ff9 0%, #69c8ff 40%, #ffd15d 72%, #ff8a3d 100%);
  box-shadow: 0 8px 18px rgba(45, 127, 249, 0.2);
  transition: width 0.35s ease;
}

.hero-level-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--primary-dark);
  font-size: 0.94rem;
  font-weight: 800;
}

.hero-level-shell {
  min-height: 440px;
}

.student-rewards-panel {
  position: relative;
  z-index: 1;
}

.student-rewards-card {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 252, 241, 0.94)),
    linear-gradient(135deg, rgba(114, 212, 255, 0.16), rgba(255, 217, 107, 0.18), rgba(255, 155, 199, 0.16));
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: 0 14px 28px rgba(38, 76, 114, 0.1);
}

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

.student-rewards-title {
  margin: 0 0 6px;
  font-size: 1.08rem;
  color: var(--primary-dark);
}

.student-rewards-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.student-rewards-tier {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 900;
  color: var(--primary-dark);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 20px rgba(38, 76, 114, 0.08);
}

.student-rewards-tier.is-bronze {
  background: linear-gradient(135deg, rgba(255, 210, 174, 0.95), rgba(255, 240, 223, 0.96));
}

.student-rewards-tier.is-silver {
  background: linear-gradient(135deg, rgba(232, 239, 250, 0.96), rgba(255, 255, 255, 0.98));
}

.student-rewards-tier.is-gold {
  background: linear-gradient(135deg, rgba(255, 232, 161, 0.98), rgba(255, 247, 214, 0.98));
}

.student-rewards-tier.is-diamond {
  background: linear-gradient(135deg, rgba(220, 245, 255, 0.98), rgba(255, 241, 255, 0.98));
}

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

.student-reward-tile {
  display: grid;
  gap: 6px;
  padding: 14px 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.student-reward-tile strong {
  color: var(--primary-dark);
  font-size: 1.28rem;
}

.student-reward-tile span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.student-rewards-summary {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
}

.student-rewards-summary strong {
  color: var(--primary-dark);
  font-size: 0.9rem;
}

.student-rewards-summary span {
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.92rem;
}

.student-level-card {
  display: grid;
  gap: 18px;
  min-height: 440px;
  padding: 22px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 251, 245, 0.96)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 215, 107, 0.12), rgba(114, 212, 255, 0.12));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 18px 34px rgba(38, 76, 114, 0.1);
}

.student-level-card.is-thinking {
  align-content: center;
  text-align: center;
}

.student-level-step-title {
  margin: 0;
  font-size: clamp(1.18rem, 2vw, 1.5rem);
  color: var(--primary-dark);
  line-height: 1.35;
}

.student-level-step-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.98rem;
}

.student-level-cohort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--primary-dark);
  font-size: 0.88rem;
  font-weight: 800;
}

.student-level-age-grid,
.student-level-answer-grid {
  display: grid;
  gap: 10px;
}

.student-level-age-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

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

.student-level-pill,
.student-level-answer,
.student-level-gender {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 14px;
  border-radius: 20px;
  border: 1px solid rgba(173, 202, 230, 0.72);
  background: rgba(255, 255, 255, 0.96);
  color: var(--primary-dark);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(38, 76, 114, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.student-level-pill:hover,
.student-level-pill:focus-visible,
.student-level-answer:hover,
.student-level-answer:focus-visible,
.student-level-gender:hover,
.student-level-gender:focus-visible {
  transform: translateY(-2px);
  outline: none;
  border-color: rgba(45, 127, 249, 0.42);
  box-shadow: 0 14px 24px rgba(38, 76, 114, 0.12);
}

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

.student-level-gender.is-active,
.student-level-pill.is-active,
.student-level-answer.is-active {
  background: linear-gradient(135deg, rgba(45, 127, 249, 0.12), rgba(255, 209, 93, 0.18), rgba(114, 212, 255, 0.18));
  border-color: rgba(45, 127, 249, 0.34);
}

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

.student-level-label {
  display: grid;
  gap: 8px;
  color: var(--primary-dark);
  font-weight: 800;
}

.student-level-input {
  min-height: 56px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(173, 202, 230, 0.72);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 8px 14px rgba(38, 76, 114, 0.06);
}

.student-level-input:focus {
  outline: none;
  border-color: rgba(45, 127, 249, 0.44);
  box-shadow: 0 0 0 3px rgba(45, 127, 249, 0.12);
}

.student-level-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.student-level-actions .btn {
  min-width: 180px;
}

.student-level-message {
  min-height: 26px;
  margin: 0;
  font-size: 0.94rem;
  font-weight: 800;
}

.student-level-message.is-error {
  color: #c34848;
}

.student-level-message.is-success {
  color: #1e8c63;
}

.student-level-message.is-loading {
  color: var(--primary-dark);
}

.student-level-answer {
  justify-content: flex-start;
  text-align: start;
  padding-inline: 18px;
  line-height: 1.6;
}

.student-level-question-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--primary-dark);
  font-size: 0.86rem;
  font-weight: 900;
}

.student-level-thinking-wrap {
  display: grid;
  gap: 16px;
  justify-items: center;
}

.student-level-thinking-bar {
  width: min(100%, 320px);
  height: 16px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(205, 223, 241, 0.8);
  position: relative;
}

.student-level-thinking-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(135deg, #2d7ff9, #69c8ff, #ffd15d);
  animation: student-level-thinking 1s linear infinite;
}

@keyframes student-level-thinking {
  0% {
    transform: translateX(-110%);
  }

  100% {
    transform: translateX(290%);
  }
}

.student-level-summary {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 249, 221, 0.92), rgba(236, 247, 255, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.student-level-summary strong {
  color: var(--primary-dark);
  font-size: 1rem;
}

.student-level-summary span {
  color: var(--muted);
  line-height: 1.8;
  font-weight: 700;
}

.student-level-google-btn {
  width: 100%;
  justify-content: center;
  gap: 10px;
}

.student-level-google-btn svg {
  width: 22px;
  height: 22px;
}

.hero-video-badge {
  display: none;
}

.hero-video-frame {
  position: relative;
  z-index: 1;
  aspect-ratio: 1 / 1;
  border-radius: 30px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.24), transparent 42%),
    linear-gradient(145deg, rgba(19, 35, 57, 0.94), rgba(39, 71, 116, 0.9), rgba(255, 138, 61, 0.56));
  box-shadow: 0 22px 42px rgba(20, 40, 68, 0.2);
}

.hero-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #0f2033;
}

.hero-video-sound {
  position: absolute;
  inset-inline-start: 18px;
  inset-block-end: 18px;
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-dark);
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(20, 40, 68, 0.18);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.hero-video-sound:hover,
.hero-video-sound:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.hero-video-sound.is-muted {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 209, 0.9), rgba(231, 245, 255, 0.92));
}

.hero-video-sound:not(.is-muted) {
  background: linear-gradient(135deg, #2d7ff9 0%, #69c8ff 54%, #ff8a3d 100%);
  color: #ffffff;
}

.about-card {
  position: relative;
  overflow: hidden;
  padding: 32px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 249, 221, 0.92), rgba(236, 247, 255, 0.92), rgba(255, 235, 245, 0.9));
}

.about-card::before,
.about-card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.about-card::before {
  width: 220px;
  height: 220px;
  inset-inline-end: -70px;
  inset-block-start: -95px;
  background: rgba(255, 255, 255, 0.45);
}

.about-card::after {
  width: 180px;
  height: 180px;
  inset-inline-start: -56px;
  inset-block-end: -82px;
  background: rgba(255, 207, 77, 0.3);
}

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

.about-eyebrow {
  margin-bottom: 16px;
}

.about-card h3 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.35;
  margin-bottom: 16px;
  color: var(--primary-dark);
}

.about-card p {
  max-width: 980px;
  margin: 0;
  line-height: 1.95;
  font-size: 1.03rem;
}

.about-actions,
.about-points {
  display: none;
}

#about,
#navAbout {
  display: none !important;
}

#categories {
  display: none !important;
}

.panel-label {
  color: #af6b00;
  font-weight: 800;
  font-size: 0.88rem;
}

.hero-panel h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.2;
}

.mini-stat-grid,
.stats-grid,
.steps-grid,
.grades-grid,
.categories-grid,
.content-grid,
.shop-grid {
  display: grid;
  gap: 18px;
}

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

.mini-stat,
.step-card,
.grade-card,
.category-card,
.content-card,
.product-card,
.form-card {
  box-shadow: var(--shadow-md);
}

.mini-stat {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  animation: floatCard 5s ease-in-out infinite;
}

.mini-stat strong,
.stat-card strong {
  display: block;
  color: var(--primary-dark);
}

.mini-stat strong {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.section {
  padding: 28px 0;
}

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

.section-heading h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  margin-bottom: 6px;
}

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

.stat-card {
  padding: 24px 18px;
  text-align: center;
}

.stat-card strong {
  font-size: 1.9rem;
  margin-bottom: 6px;
}

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

.step-card,
.category-card,
.content-card,
.product-body,
.form-card {
  padding: 24px;
}

.step-card,
.category-card,
.content-card {
  display: grid;
  gap: 12px;
}

.steps-grid .step-card:nth-child(1) {
  background: linear-gradient(135deg, rgba(114, 212, 255, 0.34), rgba(193, 174, 255, 0.2), rgba(255, 217, 107, 0.18)), linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 251, 255, 0.95));
}

.steps-grid .step-card:nth-child(2) {
  background: linear-gradient(135deg, rgba(255, 155, 199, 0.28), rgba(255, 217, 107, 0.22), rgba(182, 241, 127, 0.18)), linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 244, 0.95));
}

.steps-grid .step-card:nth-child(3) {
  background: linear-gradient(135deg, rgba(255, 217, 107, 0.24), rgba(114, 212, 255, 0.18), rgba(255, 176, 103, 0.18)), linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 252, 241, 0.95));
}

.categories-grid .category-card:nth-child(1) {
  background: linear-gradient(135deg, rgba(114, 212, 255, 0.84), rgba(193, 174, 255, 0.58), rgba(255, 217, 107, 0.54));
}

.categories-grid .category-card:nth-child(2) {
  background: linear-gradient(135deg, rgba(255, 155, 199, 0.72), rgba(255, 217, 107, 0.58), rgba(182, 241, 127, 0.52));
}

.categories-grid .category-card:nth-child(3) {
  background: linear-gradient(135deg, rgba(182, 241, 127, 0.62), rgba(114, 212, 255, 0.58), rgba(255, 217, 107, 0.54));
}

.categories-grid .category-card:nth-child(4) {
  background: linear-gradient(135deg, rgba(255, 217, 107, 0.66), rgba(255, 176, 103, 0.56), rgba(255, 155, 199, 0.5));
}

.card-media {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(114, 212, 255, 0.26), rgba(255, 217, 107, 0.3), rgba(255, 155, 199, 0.22), rgba(182, 241, 127, 0.2));
  border: 1px solid rgba(23, 50, 77, 0.08);
}

.category-card .card-media {
  min-height: 182px;
  margin-bottom: 4px;
}

.content-card .card-media {
  min-height: 166px;
}

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

.card-media-photo {
  background: #ffffff;
}

.card-media-photo img {
  transform: scale(1.06);
  transform-origin: center;
}

.media-icon {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  z-index: 1;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.72);
}

.step-number {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #6ba7ff);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(45, 127, 249, 0.2);
}

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

.grade-card {
  padding: 24px;
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 14px;
}

.grade-card::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  inset-inline-end: -50px;
  inset-block-end: -70px;
  background: rgba(255, 255, 255, 0.35);
}

.grade-card.kids {
  background: linear-gradient(135deg, rgba(114, 212, 255, 0.86), rgba(193, 174, 255, 0.62), rgba(255, 217, 107, 0.6));
}

.grade-card.middle {
  background: linear-gradient(135deg, rgba(255, 155, 199, 0.72), rgba(255, 217, 107, 0.6), rgba(182, 241, 127, 0.54));
}

.grade-card.teens {
  background: linear-gradient(135deg, rgba(255, 217, 107, 0.68), rgba(255, 246, 208, 0.9), rgba(114, 212, 255, 0.46));
}

.grade-badge,
.mini-label {
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  font-size: 0.84rem;
  font-weight: 800;
}

.grade-list,
.cta-list {
  display: grid;
  gap: 10px;
}

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

.icon-box {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  font-size: 1.5rem;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(38, 76, 114, 0.08);
}

.icon-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.icon-letters { background: linear-gradient(135deg, #dff4ff, #ebe6ff); }
.icon-games { background: linear-gradient(135deg, #ffe4ef, #fff3d0); }
.icon-worksheets { background: linear-gradient(135deg, #ecf9c8, #dff4ff); }
.icon-videos { background: linear-gradient(135deg, #fff2d9, #ffdfe7); }

.library-shell {
  background:
    linear-gradient(135deg, rgba(114, 212, 255, 0.26), rgba(193, 174, 255, 0.22), rgba(255, 217, 107, 0.24), rgba(255, 155, 199, 0.18)),
    rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: var(--radius-xl);
  padding: 12px;
  box-shadow: 0 16px 36px rgba(38, 76, 114, 0.08);
}

.tabs {
  margin-bottom: 12px;
}

.group-filters {
  margin-bottom: 16px;
}

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

.content-card {
  min-height: 100%;
  overflow: hidden;
}

.content-card.group-kids {
  border-top: 6px solid #7dc8ff;
  background: linear-gradient(135deg, rgba(114, 212, 255, 0.34), rgba(193, 174, 255, 0.2), rgba(255, 217, 107, 0.18)), linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 251, 255, 0.95));
}

.content-card.group-middle {
  border-top: 6px solid #ffb267;
  background: linear-gradient(135deg, rgba(255, 155, 199, 0.28), rgba(255, 217, 107, 0.22), rgba(182, 241, 127, 0.18)), linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 244, 0.95));
}

.content-card.group-teens {
  border-top: 6px solid #f2d14d;
  background: linear-gradient(135deg, rgba(255, 217, 107, 0.24), rgba(114, 212, 255, 0.18), rgba(255, 176, 103, 0.18)), linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 252, 241, 0.95));
}

.content-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}

.pill-btn {
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
}

.pill-outline {
  background: linear-gradient(135deg, rgba(231, 243, 255, 0.94), rgba(255, 245, 213, 0.9));
  color: var(--primary-dark);
}

.pill-soft {
  background: linear-gradient(135deg, rgba(255, 240, 210, 0.94), rgba(255, 227, 241, 0.88));
  color: #9a6400;
}

.empty-state {
  padding: 30px;
  text-align: center;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  font-weight: 700;
}

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

@media (max-width: 1024px) and (orientation: landscape) {
  .promo-marquee-section {
    display: none;
  }

  .topbar {
    padding-block: 10px;
  }

  .topbar-inner {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
  }

  .nav {
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .lang-switch,
  .google-login-btn {
    transform: scale(0.92);
    transform-origin: center;
  }

  .library-shell {
    padding: 10px;
    border-radius: 24px;
  }

  .group-filters,
  .tabs {
    margin-bottom: 10px;
  }

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

  .content-card,
  .grade-card,
  .category-card {
    padding: 14px;
    gap: 10px;
  }

  .content-card .card-media,
  .category-card .card-media {
    min-height: 120px;
  }

  .content-actions {
    gap: 8px;
  }

  .pill-btn {
    padding: 8px 12px;
    font-size: 0.84rem;
  }
}

@media (max-width: 1180px) and (pointer: coarse) {
  body.touch-home-topbar-mode section[id],
  body.touch-page-topbar-mode section[id] {
    scroll-margin-top: 82px;
  }

  body.touch-home-topbar-mode .topbar,
  body.touch-page-topbar-mode .topbar {
    backdrop-filter: blur(14px);
    box-shadow: 0 12px 28px rgba(41, 77, 145, 0.12);
  }

  body.touch-page-topbar-mode .topbar-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
  }

  body.touch-page-topbar-mode .logo,
  body.touch-page-topbar-mode .topbar-actions,
  body.touch-page-topbar-mode .nav {
    width: auto;
    min-width: 0;
  }

  body.touch-page-topbar-mode .logo {
    justify-content: flex-end;
  }

  body.touch-page-topbar-mode .logo-media {
    inline-size: 54px;
    block-size: 54px;
    padding: 5px;
    border-radius: 18px;
  }

  body.touch-page-topbar-mode .nav {
    order: 2;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    gap: 6px;
  }

  body.touch-page-topbar-mode .nav a {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 0.82rem;
    line-height: 1.1;
    white-space: nowrap;
  }

  body.touch-page-topbar-mode .topbar-actions {
    order: 3;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
  }

  body.touch-page-topbar-mode .google-login-btn,
  body.touch-page-topbar-mode .lang-switch-trigger,
  body.touch-page-topbar-mode .lang-btn {
    min-height: 38px;
  }

  body.touch-page-topbar-mode .google-login-btn,
  body.touch-page-topbar-mode .lang-switch {
    transform: scale(0.86);
    transform-origin: center left;
  }

  body.touch-page-topbar-mode .promo-marquee-section {
    margin-top: 0;
  }

  body.touch-home-topbar-mode:not(.touch-learn-topbar-mode) {
    padding-top: 92px;
  }

  body.touch-home-topbar-mode:not(.touch-learn-topbar-mode) .topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px 0;
  }

  body.touch-home-topbar-mode:not(.touch-learn-topbar-mode) .logo,
  body.touch-home-topbar-mode:not(.touch-learn-topbar-mode) .topbar-actions,
  body.touch-home-topbar-mode:not(.touch-learn-topbar-mode) .nav {
    width: 100%;
  }

  body.touch-home-topbar-mode:not(.touch-learn-topbar-mode) .logo {
    justify-content: space-between;
  }

  body.touch-home-topbar-mode:not(.touch-learn-topbar-mode) .logo-media {
    inline-size: clamp(70px, 11vw, 94px);
    block-size: clamp(70px, 11vw, 94px);
    padding: 6px;
    border-radius: 22px;
  }

  body.touch-home-topbar-mode:not(.touch-learn-topbar-mode) .nav {
    order: 3;
    flex-wrap: wrap;
    overflow: visible;
    white-space: normal;
    justify-content: flex-end;
    gap: 8px;
  }

  body.touch-home-topbar-mode:not(.touch-learn-topbar-mode) .nav a {
    min-height: 42px;
    padding: 8px 14px;
    font-size: 0.9rem;
  }

  body.touch-home-topbar-mode:not(.touch-learn-topbar-mode) .topbar-actions {
    width: auto;
    order: 2;
    justify-content: flex-start;
  }

  body.touch-home-topbar-mode:not(.touch-learn-topbar-mode) .google-login-btn,
  body.touch-home-topbar-mode:not(.touch-learn-topbar-mode) .lang-switch {
    transform: none;
  }

  body.learn-topbar-scroll-mode {
    padding-top: 70px;
  }

  body.learn-topbar-scroll-mode .topbar-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
  }

  body.learn-topbar-scroll-mode .logo,
  body.learn-topbar-scroll-mode .topbar-actions,
  body.learn-topbar-scroll-mode .nav {
    width: auto;
    min-width: 0;
  }

  body.learn-topbar-scroll-mode .logo {
    justify-content: flex-end;
  }

  body.learn-topbar-scroll-mode .logo-media {
    inline-size: 50px;
    block-size: 50px;
    padding: 5px;
    border-radius: 18px;
  }

  body.learn-topbar-scroll-mode .nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    justify-content: flex-start;
    gap: 6px;
  }

  body.learn-topbar-scroll-mode .nav a {
    min-height: 36px;
    padding: 7px 11px;
    font-size: 0.8rem;
    line-height: 1.1;
    white-space: nowrap;
  }

  body.learn-topbar-scroll-mode .topbar-actions {
    flex-wrap: nowrap;
    gap: 6px;
  }

  body.learn-topbar-scroll-mode .google-login-btn,
  body.learn-topbar-scroll-mode .lang-switch {
    transform: scale(0.84);
    transform-origin: center left;
  }
}

.product-card {
  overflow: hidden;
}

.product-top {
  min-height: 170px;
  display: grid;
  place-items: center;
  font-size: 3rem;
  background: linear-gradient(135deg, rgba(114, 212, 255, 0.42), rgba(255, 217, 107, 0.4), rgba(255, 155, 199, 0.36), rgba(182, 241, 127, 0.28));
  overflow: hidden;
}

.product-top img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-top-photo {
  padding: 0;
  background: #ffffff;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.price {
  color: var(--success);
  font-size: 1.3rem;
  font-weight: 900;
}

.private-section {
  padding: 34px 0;
}

.lessons-shell {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 22px;
  padding: 18px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(114, 212, 255, 0.26), rgba(193, 174, 255, 0.22), rgba(255, 217, 107, 0.24), rgba(255, 155, 199, 0.18)),
    rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-lg);
}

.lessons-shell::before,
.lessons-shell::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.34);
}

.lessons-shell::before {
  width: 220px;
  height: 220px;
  top: -90px;
  inset-inline-end: -70px;
}

.lessons-shell::after {
  width: 180px;
  height: 180px;
  inset-inline-start: -60px;
  inset-block-end: -70px;
}

.lessons-copy,
.teacher-card {
  position: relative;
  z-index: 1;
}

.lessons-copy {
  padding: 18px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(114, 212, 255, 0.22), rgba(193, 174, 255, 0.18), rgba(255, 217, 107, 0.2), rgba(255, 155, 199, 0.16)),
    rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.lessons-eyebrow {
  background: linear-gradient(135deg, rgba(231, 243, 255, 0.94), rgba(255, 245, 213, 0.9), rgba(255, 228, 240, 0.84));
}

.lessons-copy h2 {
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.18;
  margin-bottom: 14px;
}

.lessons-list,
.teacher-facts {
  list-style: none;
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.lessons-list li,
.teacher-fact {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 22px rgba(38, 76, 114, 0.08);
}

.lessons-list li {
  font-weight: 800;
}

.teacher-card {
  align-self: stretch;
  padding: 24px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(114, 212, 255, 0.24), rgba(193, 174, 255, 0.2), rgba(255, 217, 107, 0.22), rgba(255, 155, 199, 0.16)),
    rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 14px;
}

.teacher-badge {
  background: linear-gradient(135deg, rgba(231, 243, 255, 0.94), rgba(255, 245, 213, 0.9), rgba(255, 228, 240, 0.84));
  color: var(--primary-dark);
}

.teacher-card h3 {
  font-size: 1.55rem;
  line-height: 1.25;
}

.teacher-fact strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.interest-notice {
  display: none;
  width: fit-content;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--success);
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(38, 76, 114, 0.08);
}

.letters-hero {
  padding-top: 44px;
}

.letters-hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  gap: 24px;
  padding: 20px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(215, 241, 255, 0.98) 0%, rgba(241, 232, 255, 0.98) 22%, rgba(255, 243, 208, 0.98) 44%, rgba(233, 255, 241, 0.98) 66%, rgba(255, 231, 242, 0.98) 100%);
  box-shadow: var(--shadow-lg);
}

.letters-hero-copy,
.letters-side-card {
  padding: 18px;
  border-radius: 28px;
  position: relative;
  overflow: hidden;
}

.letters-hero-copy {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 248, 223, 0.76), rgba(236, 247, 255, 0.74));
}

.letters-hero-copy h1 {
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  line-height: 1.18;
  margin-bottom: 14px;
}

.letters-mode-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0 0;
}

.letters-mode-btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 209, 0.88), rgba(231, 245, 255, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 24px rgba(38, 76, 114, 0.08);
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.letters-mode-btn:hover,
.letters-mode-btn:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.letters-mode-btn.active {
  background: linear-gradient(135deg, #2d7ff9 0%, #62c1ff 52%, #ff8a3d 100%);
  color: #ffffff;
  box-shadow: 0 16px 28px rgba(45, 127, 249, 0.18);
}

.letters-side-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 241, 209, 0.88), rgba(235, 245, 255, 0.86), rgba(249, 233, 255, 0.84));
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 16px;
  align-content: center;
}

.letters-preview-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.letters-preview-tile {
  min-height: 100px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary-dark);
  background: linear-gradient(145deg, rgba(114, 212, 255, 0.32), rgba(255, 217, 107, 0.34), rgba(193, 174, 255, 0.28));
  box-shadow: 0 10px 22px rgba(38, 76, 114, 0.08);
}

.letters-preview-hidden {
  display: none;
}

.letters-preview-image-frame {
  min-height: 220px;
  padding: 16px;
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(114, 212, 255, 0.18), rgba(255, 217, 107, 0.2), rgba(193, 174, 255, 0.16));
  box-shadow: 0 10px 22px rgba(38, 76, 114, 0.08);
  display: grid;
  place-items: center;
}

.letters-preview-image {
  width: 100%;
  max-width: 360px;
  height: auto;
  display: block;
  object-fit: contain;
}

.letters-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.letter-card {
  cursor: pointer;
  text-align: inherit;
  padding: 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 249, 253, 0.94), rgba(244, 250, 255, 0.94));
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.letter-card:hover,
.letter-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 20px 36px rgba(38, 76, 114, 0.14);
  outline: none;
}

.letter-card-art {
  height: clamp(160px, 19vw, 184px);
  min-height: 160px;
  border-radius: 22px;
  overflow: hidden;
  display: grid;
  background: linear-gradient(145deg, rgba(114, 212, 255, 0.3), rgba(255, 217, 107, 0.32), rgba(255, 155, 199, 0.24), rgba(182, 241, 127, 0.2));
  border: 1px solid rgba(23, 50, 77, 0.08);
}

.letter-card-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.letter-card-photo-shell {
  width: 100%;
  height: 100%;
  min-height: 148px;
  display: grid;
  place-items: center;
  padding: 10px;
  overflow: hidden;
}

.letter-card-art .letter-card-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

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

.letter-main-wrap,
.letter-word-wrap {
  display: grid;
  gap: 4px;
}

.letter-main {
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
  color: var(--primary-dark);
}

.letter-translit {
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef5ff;
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 0.85rem;
  width: fit-content;
}

.letter-word {
  font-size: 1.1rem;
  font-weight: 800;
}

.letter-word-arabic {
  color: var(--muted);
  font-weight: 700;
}

.letter-caption {
  color: var(--muted);
  font-size: 0.94rem;
}

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

.letter-card.is-letters-mode .letter-card-top {
  margin-top: 4px;
}

.letter-word-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.letter-word-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(238, 245, 255, 0.96), rgba(255, 246, 214, 0.94));
  color: var(--primary-dark);
  font-size: 0.84rem;
  font-weight: 800;
  box-shadow: 0 8px 16px rgba(38, 76, 114, 0.06);
}

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

.audio-icon-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(233, 244, 255, 0.96), rgba(255, 243, 210, 0.92));
  color: var(--primary-dark);
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(38, 76, 114, 0.08);
  transition: transform 0.18s ease, background 0.18s ease;
}

.audio-icon-btn:hover,
.audio-icon-btn:focus-visible {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(214, 236, 255, 0.98), rgba(255, 232, 194, 0.96));
  outline: none;
}

.letter-open-hint {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.letter-modal {
  position: fixed;
  inset: 0;
  background: rgba(18, 33, 49, 0.58);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 14px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 1200;
}

.letter-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.letter-modal-card {
  position: relative;
  width: min(720px, 100%);
  max-height: calc(100dvh - 28px);
  display: grid;
  gap: 14px;
  padding: 48px 18px 18px;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 251, 255, 0.97));
  box-shadow: 0 26px 56px rgba(18, 33, 49, 0.26);
  overflow-y: auto;
}

.letter-modal-close {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #eef5ff;
  color: var(--primary-dark);
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
  z-index: 3;
}

.letter-sound-pill {
  display: none;
}

.word-slider-shell {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  gap: 10px;
  align-items: stretch;
  touch-action: pan-y;
}

.word-slider-shell.is-letters-only {
  grid-template-columns: minmax(0, 1fr);
}

.word-nav-btn {
  border: 0;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(231, 243, 255, 0.96), rgba(255, 241, 213, 0.92), rgba(250, 229, 243, 0.88));
  color: var(--primary-dark);
  font-size: 1.25rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(38, 76, 114, 0.08);
  transition: transform 0.18s ease, background 0.18s ease;
}

.word-nav-btn:hover,
.word-nav-btn:focus-visible {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(214, 236, 255, 0.98), rgba(255, 232, 194, 0.96), rgba(250, 219, 237, 0.92));
  outline: none;
}

.word-lesson-card {
  padding: 16px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 249, 252, 0.96), rgba(244, 249, 255, 0.95));
  box-shadow: 0 14px 28px rgba(38, 76, 114, 0.1);
  display: grid;
  gap: 12px;
  user-select: none;
}

.word-lesson-card.is-letters-only .word-lesson-hero {
  grid-template-columns: 1fr;
}

.word-lesson-card.is-letters-only .word-letter-panel {
  max-width: 280px;
  margin: 0 auto;
}

.word-lesson-hero {
  display: grid;
  grid-template-columns: minmax(150px, 0.92fr) minmax(0, 1.08fr);
  gap: 10px;
  align-items: stretch;
}

.word-letter-panel,
.word-lesson-visual {
  height: clamp(184px, 24vw, 228px);
  min-height: 184px;
  border-radius: 26px;
  overflow: hidden;
}

.word-letter-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: stretch;
  justify-items: center;
  padding: 14px;
  background: linear-gradient(155deg, rgba(114, 212, 255, 0.34), rgba(193, 174, 255, 0.32) 42%, rgba(255, 217, 107, 0.32) 72%, rgba(255, 155, 199, 0.18));
  box-shadow: inset 0 0 0 1px rgba(23, 50, 77, 0.05);
  text-align: center;
}

.word-letter-main {
  display: grid;
  place-items: center;
  width: 100%;
  font-size: clamp(4rem, 10vw, 6rem);
  line-height: 0.9;
  font-weight: 900;
  color: var(--primary-dark);
}

.word-letter-main img {
  width: min(100%, 148px);
  max-height: 132px;
  object-fit: contain;
  display: block;
}

.word-letter-main.has-letter-image {
  min-height: 132px;
  align-self: center;
}

.word-letter-pronunciation-line {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-weight: 700;
  justify-items: center;
}

.word-letter-pronunciation-line strong {
  color: var(--text);
  font-size: 0.92rem;
}

.word-lesson-visual {
  position: relative;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(255, 217, 107, 0.3), rgba(114, 212, 255, 0.3), rgba(255, 155, 199, 0.28), rgba(182, 241, 127, 0.18));
  box-shadow: inset 0 0 0 1px rgba(23, 50, 77, 0.05);
}

.word-lesson-emoji {
  width: 128px;
  height: 128px;
  display: grid;
  place-items: center;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.82);
  font-size: 4rem;
  box-shadow: 0 16px 30px rgba(38, 76, 114, 0.1);
}

.word-lesson-emoji.has-photo {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 184px;
  padding: 26px;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(250, 252, 255, 0.74));
  box-shadow: none;
  overflow: hidden;
}

.word-lesson-media-image {
  width: auto;
  height: auto;
  max-width: 88%;
  max-height: 88%;
  margin: auto;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
}

.letters-bottom-action {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.media-zoom-btn {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-dark);
  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 20px rgba(38, 76, 114, 0.12);
  transition: transform 0.18s ease, background 0.18s ease;
}

.media-zoom-btn:hover,
.media-zoom-btn:focus-visible {
  transform: translateY(-2px);
  background: #ffffff;
  outline: none;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 33, 49, 0.72);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.image-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.image-lightbox-card {
  position: relative;
  width: min(940px, 100%);
  max-height: 90vh;
  display: grid;
  gap: 12px;
  padding: 22px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 60px rgba(18, 33, 49, 0.28);
}

.image-lightbox-card img {
  width: 100%;
  max-height: 74vh;
  border-radius: 22px;
  object-fit: contain;
  background: linear-gradient(145deg, rgba(255, 244, 212, 0.95), rgba(223, 243, 255, 0.96), rgba(255, 228, 239, 0.9));
}

.image-lightbox-close {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #eef5ff;
  color: var(--primary-dark);
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
}

.image-lightbox-caption {
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

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

.word-lesson-main-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.word-lesson-texts {
  display: grid;
  gap: 6px;
}

.letter-modal-word {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 900;
  line-height: 1.1;
}

.sentence-keyword-pill {
  width: fit-content;
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #eef5ff, #fff2d8);
  color: var(--primary-dark);
  font-weight: 900;
  font-size: 1.05rem;
}

.sentence-keyword-pills {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sentence-keyword-translation {
  background: linear-gradient(135deg, #fff0da, #ffe4ef);
  color: #b35a18;
}

.letter-modal-word-arabic {
  color: var(--muted);
  font-weight: 700;
  font-size: 1.04rem;
}

.sentence-card-copy {
  display: grid;
  gap: 10px;
}

.sentence-line {
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  font-weight: 800;
  line-height: 1.5;
  color: var(--text);
}

.sentence-line mark {
  background: linear-gradient(135deg, rgba(255, 207, 77, 0.45), rgba(123, 120, 239, 0.18));
  color: var(--primary-dark);
  padding: 0 8px;
  border-radius: 10px;
}

.sentence-translation-card {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 244, 212, 0.72), rgba(236, 232, 255, 0.55));
  box-shadow: inset 0 0 0 1px rgba(23, 50, 77, 0.05);
}

.sentence-translation-line {
  font-size: clamp(1.15rem, 2.7vw, 1.45rem);
  font-weight: 800;
  line-height: 1.6;
  color: var(--text);
}

.sentence-translation-line mark {
  background: linear-gradient(135deg, rgba(255, 138, 61, 0.24), rgba(255, 207, 77, 0.46));
  color: #a85216;
  padding: 0 8px;
  border-radius: 10px;
}

.sentence-preview-line {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.45;
}

.sentence-inline-back {
  background: #ffffff;
  color: var(--primary-dark);
}

.word-lesson-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.letter-modal-meaning-line {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(238, 245, 255, 0.82);
  color: var(--text);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.letter-exam-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(229, 242, 255, 0.9), rgba(255, 249, 224, 0.92), rgba(255, 238, 246, 0.9));
  border: 1px solid rgba(45, 127, 249, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.letter-exam-panel[hidden] {
  display: none;
}

.letter-exam-panel.is-complete {
  background: linear-gradient(145deg, rgba(229, 255, 239, 0.96), rgba(240, 250, 255, 0.94), rgba(255, 249, 224, 0.9));
}

.letter-exam-celebration {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
}

.letter-exam-panel.is-complete .letter-exam-celebration {
  opacity: 1;
}

.letter-exam-celebration[hidden] {
  display: none;
}

.letter-exam-celebration span {
  --ribbon-color: #2d7ff9;
  --ribbon-left: 10%;
  --ribbon-rotate: -18deg;
  --ribbon-delay: 0s;
  position: absolute;
  top: -18px;
  left: var(--ribbon-left);
  width: 12px;
  height: 74px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), var(--ribbon-color));
  transform: rotate(var(--ribbon-rotate));
  box-shadow: 0 10px 20px rgba(23, 50, 77, 0.12);
  animation: letterExamRibbonDrop 1.2s ease-in-out infinite alternate;
  animation-delay: var(--ribbon-delay);
}

.letter-exam-celebration span::before,
.letter-exam-celebration span::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
}

.letter-exam-celebration span:nth-child(3n)::before,
.letter-exam-celebration span:nth-child(4n)::before {
  top: 8px;
  width: 18px;
  height: 22px;
  border-radius: 50% 50% 48% 48%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), var(--ribbon-color));
  box-shadow: 0 8px 14px rgba(23, 50, 77, 0.12);
  opacity: 1;
}

.letter-exam-celebration span:nth-child(3n)::after,
.letter-exam-celebration span:nth-child(4n)::after {
  top: 30px;
  width: 2px;
  height: 20px;
  background: linear-gradient(180deg, rgba(117, 132, 156, 0.76), rgba(117, 132, 156, 0));
  opacity: 1;
}

.letter-exam-celebration span:nth-child(1) { --ribbon-color: #ff8c61; --ribbon-left: 4%; --ribbon-rotate: -24deg; --ribbon-delay: 0s; }
.letter-exam-celebration span:nth-child(2) { --ribbon-color: #ffd654; --ribbon-left: 11%; --ribbon-rotate: 18deg; --ribbon-delay: 0.08s; }
.letter-exam-celebration span:nth-child(3) { --ribbon-color: #7e6dff; --ribbon-left: 19%; --ribbon-rotate: -12deg; --ribbon-delay: 0.16s; }
.letter-exam-celebration span:nth-child(4) { --ribbon-color: #33c28f; --ribbon-left: 28%; --ribbon-rotate: 22deg; --ribbon-delay: 0.24s; }
.letter-exam-celebration span:nth-child(5) { --ribbon-color: #ff6aa2; --ribbon-left: 36%; --ribbon-rotate: -16deg; --ribbon-delay: 0.1s; }
.letter-exam-celebration span:nth-child(6) { --ribbon-color: #4a90e2; --ribbon-left: 45%; --ribbon-rotate: 13deg; --ribbon-delay: 0.3s; }
.letter-exam-celebration span:nth-child(7) { --ribbon-color: #ffae3d; --ribbon-left: 54%; --ribbon-rotate: -22deg; --ribbon-delay: 0.05s; }
.letter-exam-celebration span:nth-child(8) { --ribbon-color: #ff5b7f; --ribbon-left: 62%; --ribbon-rotate: 19deg; --ribbon-delay: 0.18s; }
.letter-exam-celebration span:nth-child(9) { --ribbon-color: #6fd96f; --ribbon-left: 70%; --ribbon-rotate: -13deg; --ribbon-delay: 0.28s; }
.letter-exam-celebration span:nth-child(10) { --ribbon-color: #9b7dff; --ribbon-left: 79%; --ribbon-rotate: 23deg; --ribbon-delay: 0.12s; }
.letter-exam-celebration span:nth-child(11) { --ribbon-color: #57d5ff; --ribbon-left: 88%; --ribbon-rotate: -18deg; --ribbon-delay: 0.22s; }
.letter-exam-celebration span:nth-child(12) { --ribbon-color: #ffc857; --ribbon-left: 95%; --ribbon-rotate: 16deg; --ribbon-delay: 0.32s; }

@keyframes letterExamRibbonDrop {
  from {
    transform: translateY(-10px) rotate(var(--ribbon-rotate));
  }
  to {
    transform: translateY(26px) rotate(calc(var(--ribbon-rotate) * -1));
  }
}

.letter-exam-header,
.letter-exam-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.letter-exam-stage-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--primary-dark);
  font-size: 0.86rem;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(38, 76, 114, 0.08);
}

.letter-exam-title {
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  line-height: 1.25;
}

.letter-exam-text {
  color: var(--muted);
  font-weight: 700;
}

.letter-exam-write-shell {
  display: grid;
  gap: 8px;
}

.letter-exam-write-label {
  font-weight: 800;
  color: var(--text);
}

.letter-exam-write-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.letter-exam-write-input {
  flex: 1 1 240px;
  min-height: 50px;
  border: 1px solid rgba(45, 127, 249, 0.18);
  border-radius: 18px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.letter-exam-write-input:focus {
  outline: 2px solid rgba(45, 127, 249, 0.2);
  border-color: rgba(45, 127, 249, 0.36);
}

.letter-exam-check-button {
  min-width: 130px;
}

.letter-exam-button {
  min-width: 190px;
}

.letter-exam-next-button {
  min-width: 190px;
  box-shadow: 0 12px 24px rgba(34, 160, 107, 0.14);
}

.letter-exam-button:disabled {
  cursor: wait;
  opacity: 0.82;
  transform: none;
  box-shadow: 0 12px 24px rgba(45, 127, 249, 0.14);
}

.letter-exam-feedback,
.letter-exam-transcript {
  padding: 12px 14px;
  border-radius: 18px;
  font-weight: 800;
}

.letter-exam-feedback {
  min-height: 48px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
}

.letter-exam-feedback.is-success {
  color: #177b4d;
  background: rgba(236, 255, 244, 0.96);
}

.letter-exam-feedback.is-error {
  color: #b42c2c;
  background: rgba(255, 240, 240, 0.96);
}

.letter-exam-feedback.is-neutral {
  color: var(--text);
}

.letter-exam-transcript {
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
}

.letter-a-game-page-body {
  background: linear-gradient(180deg, #fef8ea 0%, #eef7ff 52%, #fff7fd 100%);
}

.letter-a-game-page {
  padding-bottom: 42px;
}

.letter-a-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(250px, 0.7fr);
  gap: 24px;
  align-items: stretch;
}

.letter-a-copy,
.letter-a-side-card,
.letter-a-game-card,
.letter-a-step-card {
  border-radius: 32px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(250, 246, 255, 0.94));
  border: 1px solid rgba(53, 109, 189, 0.12);
  box-shadow: 0 22px 50px rgba(22, 49, 80, 0.08);
}

.letter-a-copy {
  padding: 32px;
}

.letter-a-side-card {
  padding: 26px 22px;
  display: grid;
  gap: 16px;
  align-content: start;
}

.letter-a-side-badge {
  width: 110px;
  height: 110px;
  display: grid;
  place-items: center;
  border-radius: 32px;
  background: linear-gradient(135deg, #2d7ff9, #ffab52);
  color: #fff;
  font-size: 3.2rem;
  font-weight: 900;
  box-shadow: 0 18px 34px rgba(45, 127, 249, 0.24);
}

.letter-a-side-badge img,
.letter-a-main-letter img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  display: block;
}

.letter-a-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.letter-a-step-card {
  padding: 24px 20px;
  display: grid;
  gap: 10px;
}

.letter-a-step-card .step-badge {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #2d7ff9, #74b2ff);
  color: #fff;
  font-weight: 900;
}

.letter-a-step-card h3 {
  font-size: 1.1rem;
}

.letter-a-step-card p {
  color: var(--muted);
}

.letter-a-game-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  display: grid;
  gap: 24px;
}

.letter-a-game-header,
.letter-a-prompt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.letter-a-score-pill {
  min-width: 140px;
  padding: 14px 18px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(232, 246, 255, 0.96), rgba(255, 247, 228, 0.95));
  border: 1px solid rgba(45, 127, 249, 0.14);
  display: grid;
  gap: 4px;
  text-align: center;
}

.letter-a-score-pill strong {
  font-size: 1.2rem;
  color: var(--primary-dark);
}

.letter-a-main-letter {
  width: 110px;
  height: 110px;
  display: grid;
  place-items: center;
  border-radius: 32px;
  background: linear-gradient(135deg, #2d7ff9, #6ea7ff);
  color: #fff;
  font-size: 4rem;
  font-weight: 900;
  box-shadow: 0 18px 32px rgba(45, 127, 249, 0.22);
}

.letter-a-prompt-copy {
  display: grid;
  gap: 6px;
  flex: 1;
}

.letter-a-options-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.letter-a-option-card {
  border: 1px solid rgba(45, 127, 249, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.96));
  border-radius: 26px;
  padding: 16px;
  display: grid;
  gap: 14px;
  justify-items: center;
  box-shadow: 0 16px 32px rgba(23, 50, 77, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.letter-a-option-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 38px rgba(23, 50, 77, 0.12);
  border-color: rgba(45, 127, 249, 0.26);
}

.letter-a-option-card img {
  width: 100%;
  max-width: 160px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 22px;
  background: #fff;
}

.letter-a-option-card strong {
  font-size: 1.18rem;
  color: var(--primary-dark);
}

.letter-a-option-card.is-correct {
  background: linear-gradient(145deg, rgba(229, 255, 239, 0.98), rgba(240, 255, 245, 0.96));
  border-color: rgba(49, 185, 129, 0.5);
  box-shadow: 0 18px 36px rgba(49, 185, 129, 0.18);
}

.letter-a-option-card.is-wrong {
  background: linear-gradient(145deg, rgba(255, 238, 238, 0.98), rgba(255, 245, 245, 0.96));
  border-color: rgba(212, 58, 73, 0.48);
  box-shadow: 0 16px 30px rgba(212, 58, 73, 0.16);
}

.letter-a-option-card:disabled {
  cursor: default;
}

.letter-a-feedback-shell {
  position: relative;
  min-height: 92px;
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(240, 248, 255, 0.92), rgba(255, 252, 242, 0.94));
  border: 1px solid rgba(45, 127, 249, 0.12);
  padding: 18px 20px;
  overflow: hidden;
}

.letter-a-feedback {
  position: relative;
  z-index: 1;
  font-weight: 900;
  font-size: 1.08rem;
}

.letter-a-feedback.is-neutral {
  color: var(--text);
}

.letter-a-feedback.is-success {
  color: #177b4d;
}

.letter-a-feedback.is-error {
  color: #b42c2c;
}

.letter-a-feedback-celebration {
  display: none;
}

.letter-a-feedback-celebration span {
  display: none;
}

.letter-a-feedback-celebration span:nth-child(2) { animation-delay: 0.08s; }
.letter-a-feedback-celebration span:nth-child(3) { animation-delay: 0.16s; }
.letter-a-feedback-celebration span:nth-child(4) { animation-delay: 0.24s; }
.letter-a-feedback-celebration span:nth-child(5) { animation-delay: 0.32s; }
.letter-a-feedback-celebration span:nth-child(6) { animation-delay: 0.4s; }

.letter-a-game-card.is-finished > :not(.letter-a-game-finish) {
  visibility: hidden;
}

.letter-a-game-finish {
  position: absolute;
  inset: 18px;
  z-index: 4;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  padding: 28px;
  text-align: center;
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(255, 248, 226, 0.95), rgba(238, 247, 255, 0.94), rgba(255, 239, 248, 0.94));
  box-shadow: 0 26px 52px rgba(23, 50, 77, 0.14);
  overflow: hidden;
}

.letter-a-game-finish[hidden] {
  display: none;
}

.letter-a-game-finish h3 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.15;
}

.letter-a-game-finish p {
  max-width: 520px;
  color: var(--muted);
  font-weight: 800;
}

.letter-a-game-finish-balloons {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.letter-a-finish-balloon {
  position: absolute;
  bottom: -90px;
  width: var(--balloon-size, 44px);
  height: calc(var(--balloon-size, 44px) * 1.34);
  border-radius: 50% 50% 48% 48%;
  background: linear-gradient(180deg, var(--balloon-top, #ff8d72), var(--balloon-bottom, #ffd95c));
  box-shadow: 0 10px 18px rgba(23, 50, 77, 0.14);
  opacity: 0.92;
  animation: letterAGameBalloonFloat var(--balloon-duration, 4.8s) ease-in-out infinite;
  animation-delay: var(--balloon-delay, 0s);
}

.letter-a-finish-balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 10px;
  height: 10px;
  background: var(--balloon-bottom, #ffd95c);
  border-radius: 2px 50% 50% 50%;
  transform: translateX(-50%) rotate(45deg);
}

.letter-a-finish-balloon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 2px;
  height: 52px;
  background: linear-gradient(180deg, rgba(117, 132, 156, 0.74), rgba(117, 132, 156, 0));
  transform: translateX(-50%);
}

@keyframes letterAGameBalloonFloat {
  0% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(var(--balloon-drift, 0px), -180px, 0);
  }

  100% {
    transform: translate3d(calc(var(--balloon-drift, 0px) * -1), -360px, 0);
  }
}

@keyframes letterAFloat {
  from {
    transform: translateY(0) scale(0.96);
    opacity: 0.72;
  }
  to {
    transform: translateY(16px) scale(1.08);
    opacity: 1;
  }
}

@media (max-width: 980px) {
  .letter-a-shell,
  .letter-a-steps-grid,
  .letter-a-options-grid {
    grid-template-columns: 1fr;
  }

  .letter-a-side-badge,
  .letter-a-main-letter {
    width: 88px;
    height: 88px;
    font-size: 3rem;
  }
}

.cta {
  padding: 18px;
  background: linear-gradient(145deg, rgba(255, 248, 221, 0.98), rgba(233, 245, 255, 0.96), rgba(255, 233, 244, 0.94), rgba(237, 255, 241, 0.94));
}

.cta-copy,
.form-card {
  padding: 18px;
}

.form-card {
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(252, 248, 255, 0.96));
}

.form-card label {
  display: block;
  margin-bottom: 6px;
  font-weight: 800;
}

.form-card input,
.form-card select {
  width: 100%;
  border: 1px solid #dbe6f1;
  border-radius: 16px;
  padding: 14px 15px;
  margin-bottom: 14px;
  background: #fbfdff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-card input:focus,
.form-card select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(45, 127, 249, 0.12);
  outline: none;
}

.notice {
  margin-top: 14px;
  color: var(--success);
  font-weight: 800;
  display: none;
}

body.modal-open {
  overflow: hidden;
}

.lead-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

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

.lead-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lead-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(19, 33, 56, 0.42);
  backdrop-filter: blur(10px);
}

.lead-modal-card {
  position: relative;
  width: min(560px, 100%);
  max-height: min(90vh, 760px);
  overflow: auto;
  padding: 28px;
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(255, 250, 229, 0.98), rgba(240, 248, 255, 0.97), rgba(255, 236, 246, 0.95));
  box-shadow: 0 22px 68px rgba(18, 35, 63, 0.22);
  display: grid;
  gap: 20px;
  transform: translateY(18px) scale(0.98);
  transition: transform 0.18s ease;
}

.lead-modal.is-open .lead-modal-card {
  transform: translateY(0) scale(1);
}

.lead-modal-close {
  position: absolute;
  top: 18px;
  inset-inline-end: 18px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: #eef4ff;
  color: var(--primary-dark);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}

.lead-modal-close:hover {
  transform: translateY(-2px);
  background: #e2edff;
}

.lead-modal-header {
  display: grid;
  gap: 10px;
  padding-inline-end: 52px;
}

.lead-modal-header h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
}

.lead-modal-header p {
  color: var(--muted);
}

.lead-context-pill {
  width: fit-content;
  background: linear-gradient(135deg, #eef5ff, #fff0d6);
  color: var(--primary-dark);
}

.lead-form {
  display: grid;
  gap: 16px;
}

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

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

.lead-field label,
.lead-static-label {
  font-weight: 800;
}

.lead-package-value {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(238, 245, 255, 0.88);
  box-shadow: inset 0 0 0 1px rgba(45, 127, 249, 0.08);
}

.lead-form input,
.lead-form select,
.lead-form textarea {
  width: 100%;
  border: 1px solid #dbe6f1;
  border-radius: 16px;
  padding: 14px 15px;
  background: #fbfdff;
  font: inherit;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  resize: vertical;
}

.lead-form input:focus,
.lead-form select:focus,
.lead-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(45, 127, 249, 0.12);
  outline: none;
}

.lead-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.lead-form-message {
  min-height: 24px;
  font-weight: 800;
}

.lead-form-message.is-success {
  color: var(--success);
}

.lead-form-message.is-error {
  color: var(--danger);
}

.lead-form-message.is-loading {
  color: var(--primary-dark);
}

.match-game-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: start;
}

.match-summary-card,
.match-board-card {
  padding: 24px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.92)),
    linear-gradient(135deg, rgba(255, 217, 107, 0.3), rgba(114, 212, 255, 0.28), rgba(255, 155, 199, 0.24), rgba(182, 241, 127, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-md);
}

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

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

.match-level-card {
  border: 0;
  border-radius: 26px;
  padding: 20px;
  text-align: start;
  display: grid;
  gap: 10px;
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 251, 240, 0.94)),
    linear-gradient(135deg, rgba(255, 217, 107, 0.26), rgba(114, 212, 255, 0.24), rgba(255, 155, 199, 0.22));
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.match-level-card:hover,
.match-level-card:focus-visible {
  transform: translateY(-2px);
  outline: none;
  box-shadow: 0 16px 32px rgba(38, 76, 114, 0.12);
}

.match-level-card.is-active {
  box-shadow: 0 0 0 4px rgba(45, 127, 249, 0.18), 0 16px 32px rgba(38, 76, 114, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 247, 255, 0.95)),
    linear-gradient(135deg, rgba(114, 212, 255, 0.34), rgba(193, 174, 255, 0.26), rgba(255, 217, 107, 0.24));
}

.match-level-short {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.match-level-card strong {
  font-size: 1.15rem;
}

.match-level-card p,
.match-level-banner p {
  color: var(--muted);
}

.match-level-banner {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: inset 0 0 0 1px rgba(45, 127, 249, 0.08);
}

.match-level-banner strong {
  font-size: 1.22rem;
  color: var(--primary-dark);
}

.match-summary-copy {
  display: grid;
  gap: 10px;
}

.match-summary-copy p {
  color: var(--muted);
}

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

.match-stat-card,
.match-selected-card {
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 0 0 1px rgba(45, 127, 249, 0.08);
  display: grid;
  gap: 8px;
}

.match-stat-card span,
.match-selected-card span {
  color: var(--muted);
  font-weight: 700;
}

.match-stat-card strong,
.match-selected-card strong {
  font-size: 1.15rem;
  color: var(--primary-dark);
}

.match-feedback {
  min-height: 28px;
  font-weight: 800;
  color: var(--primary-dark);
}

.match-feedback.is-success {
  color: var(--success);
}

.match-feedback.is-error {
  color: var(--danger);
}

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

.match-board-toolbar {
  display: flex;
  justify-content: flex-end;
}

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

.match-board-column {
  display: grid;
  gap: 12px;
}

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

.match-card-grid[data-size="medium"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.match-card-grid[data-size="large"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.match-select-card {
  position: relative;
  border: 0;
  border-radius: 24px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 232, 0.94)),
    linear-gradient(135deg, rgba(255, 217, 107, 0.24), rgba(114, 212, 255, 0.2), rgba(255, 155, 199, 0.2));
  box-shadow: 0 14px 28px rgba(38, 76, 114, 0.1);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.match-select-card:hover,
.match-select-card:focus-visible {
  transform: translateY(-2px);
  outline: none;
  box-shadow: 0 18px 34px rgba(38, 76, 114, 0.16);
}

.match-select-card.is-selected {
  box-shadow: 0 0 0 4px rgba(45, 127, 249, 0.2), 0 18px 34px rgba(38, 76, 114, 0.14);
}

.match-select-card.is-wrong {
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.16), 0 18px 34px rgba(239, 68, 68, 0.16);
}

.match-select-card.is-matched {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(237, 255, 243, 0.96)),
    linear-gradient(135deg, rgba(74, 222, 128, 0.24), rgba(134, 239, 172, 0.18), rgba(114, 212, 255, 0.14));
  cursor: default;
}

.match-select-card:disabled {
  opacity: 1;
}

.match-word-card {
  min-height: 122px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 10px;
}

.match-word-card strong {
  font-size: 1.3rem;
}

.match-card-grid[data-size="medium"] .match-word-card strong,
.match-card-grid[data-size="large"] .match-word-card strong {
  font-size: 1.08rem;
}

.match-card-badge {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.match-image-card {
  min-height: 160px;
}

.match-image-card img {
  width: 100%;
  height: 132px;
  object-fit: contain;
  display: block;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  padding: 12px;
}

.match-emoji-visual {
  min-height: 132px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.96);
  font-size: clamp(2.4rem, 3vw, 3.1rem);
}

.match-card-check {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--success);
  color: #ffffff;
  font-weight: 900;
}

.match-step-card {
  background: linear-gradient(135deg, rgba(255, 217, 107, 0.28), rgba(114, 212, 255, 0.2), rgba(255, 155, 199, 0.18)), linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.95));
}

.match-complete-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 24px;
}

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

.match-complete-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(19, 33, 56, 0.42);
  backdrop-filter: blur(10px);
}

.match-complete-card {
  position: relative;
  width: min(520px, 100%);
  padding: 30px;
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.95)),
    linear-gradient(135deg, rgba(255, 217, 107, 0.34), rgba(114, 212, 255, 0.3), rgba(255, 155, 199, 0.28), rgba(182, 241, 127, 0.22));
  box-shadow: 0 26px 60px rgba(18, 35, 63, 0.24);
  display: grid;
  gap: 16px;
  text-align: center;
}

.match-complete-close {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #eef4ff;
  color: var(--primary-dark);
  font-size: 1.3rem;
  cursor: pointer;
}

.match-complete-message {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  color: var(--primary-dark);
}

footer {
  padding: 18px 0 36px;
}

.footer-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.92)),
    linear-gradient(135deg, rgba(255, 217, 107, 0.28), rgba(114, 212, 255, 0.26), rgba(255, 155, 199, 0.24));
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@media (max-width: 1080px) {
  .hero-grid,
  .cta,
  .lessons-shell,
  .letters-hero-shell,
  .grades-grid,
  .categories-grid,
  .content-grid,
  .shop-grid,
  .stats-grid,
  .steps-grid,
  .match-levels-grid,
  .letters-grid,
  .match-board-columns,
  .match-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .topbar-inner,
  .hero-actions,
  .footer-box {
    justify-content: center;
  }

  .nav,
  .topbar-actions,
  .lang-switch {
    width: 100%;
    justify-content: center;
  }

  .hero-grid,
  .cta,
  .lessons-shell,
  .letters-hero-shell,
  .grades-grid,
  .categories-grid,
  .content-grid,
  .shop-grid,
  .stats-grid,
  .steps-grid,
  .match-levels-grid,
  .mini-stat-grid,
  .letters-grid,
  .match-stat-grid,
  .match-board-columns,
  .match-card-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid-featured {
    grid-template-areas:
      "copy"
      "media";
  }

  .hero-level-head {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .hero-level-heading {
    justify-items: center;
  }

  .hero-level-shell,
  .student-level-card {
    min-height: auto;
  }

  .student-level-age-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .student-rewards-head {
    display: grid;
  }

  .student-rewards-grid {
    grid-template-columns: 1fr;
  }

  .student-level-gender-wrap,
  .student-level-actions {
    grid-template-columns: 1fr;
  }

  .student-level-actions {
    display: grid;
  }

  .student-level-actions .btn {
    width: 100%;
    min-width: 0;
  }

  .promo-marquee {
    width: calc(100% - 20px);
  }

  .promo-marquee-reel {
    gap: 18px;
    padding-inline: 14px;
  }

  .promo-marquee-item {
    gap: 12px;
  }

  .promo-marquee-copy,
  .promo-marquee-dot {
    font-size: 0.96rem;
  }

  .promo-marquee-chip {
    min-height: 34px;
    padding: 8px 12px;
  }

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

  .word-lesson-main-row,
  .word-lesson-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .lead-form-grid {
    grid-template-columns: 1fr;
  }

  .lead-form-actions .btn {
    width: 100%;
  }

  .word-nav-btn {
    min-height: 48px;
  }

  .hero-copy,
  .hero-panel,
  .about-card,
  .lessons-copy,
  .teacher-card,
  .lead-modal-card,
  .letters-hero-copy,
  .letters-side-card,
  .step-card,
  .category-card,
  .content-card,
  .product-body,
  .cta-copy,
  .form-card {
    padding: 22px;
  }

  .hero-video-frame {
    max-width: 420px;
    margin-inline: auto;
  }

  .hero-video-sound {
    inset-inline-start: 14px;
    inset-block-end: 14px;
  }

  .match-complete-card {
    padding: 24px;
  }

  .section {
    padding: 24px 0;
  }
}

.match-playground-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

body.match-game-page-body {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(255, 248, 226, 0.16), rgba(231, 242, 255, 0.12)),
    url("images/match-game/background.webp?v=20260414bg1") center / cover no-repeat fixed;
}

.match-levels-panel,
.match-status-banner,
.match-board-card {
  background: rgba(255, 255, 255, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 30px;
  box-shadow: 0 20px 42px rgba(38, 76, 114, 0.12);
  backdrop-filter: blur(20px);
}

.match-levels-panel,
.match-status-banner,
.match-board-card {
  padding: 24px;
}

.match-panel-heading {
  margin-bottom: 0;
}

.match-levels-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.match-level-card {
  min-height: 178px;
  align-content: start;
  padding: 18px;
  gap: 12px;
  border-radius: 24px;
}

.match-level-meta,
.match-level-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.match-level-lock,
.match-level-time,
.match-level-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
}

.match-level-lock {
  min-width: 32px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--primary-dark);
}

.match-level-lock.is-open {
  color: #c77700;
}

.match-level-lock.is-complete,
.match-level-hint.is-complete {
  background: rgba(225, 255, 236, 0.9);
  color: var(--success);
}

.match-level-time {
  background: rgba(238, 245, 255, 0.56);
  color: var(--primary-dark);
}

.match-level-hint {
  background: rgba(255, 247, 223, 0.58);
  color: #9a6500;
}

.match-level-card.is-locked {
  opacity: 0.88;
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(249, 250, 252, 0.96), rgba(244, 246, 249, 0.94)),
    linear-gradient(135deg, rgba(208, 217, 228, 0.26), rgba(239, 242, 246, 0.24));
}

.match-level-card.is-locked strong,
.match-level-card.is-locked p {
  color: #6d7a89;
}

.match-level-card.is-completed {
  box-shadow: 0 0 0 3px rgba(31, 159, 100, 0.14), 0 18px 32px rgba(38, 76, 114, 0.14);
}

.match-admin-panel {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.match-admin-toggle {
  width: fit-content;
}

.match-admin-form {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: inset 0 0 0 1px rgba(45, 127, 249, 0.08);
}

.match-admin-form label {
  font-weight: 800;
}

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

.match-admin-row input {
  flex: 1 1 220px;
  border: 1px solid #dbe6f1;
  border-radius: 16px;
  padding: 12px 14px;
  background: #fbfdff;
}

.match-admin-row input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(45, 127, 249, 0.12);
  outline: none;
}

.match-admin-message {
  min-height: 22px;
  font-weight: 800;
}

.match-admin-message.is-success {
  color: var(--success);
}

.match-admin-message.is-error {
  color: var(--danger);
}

.match-status-banner {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 18px;
  align-items: start;
}

.match-status-copy {
  display: grid;
  gap: 10px;
}

.match-status-copy h3 {
  font-size: clamp(1.55rem, 3vw, 2.05rem);
  line-height: 1.15;
}

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

.match-selected-wide {
  grid-column: 1 / -1;
}

.match-feedback {
  min-height: 28px;
  font-weight: 800;
  color: var(--primary-dark);
}

.match-feedback.is-success {
  color: var(--success);
}

.match-feedback.is-error {
  color: var(--danger);
}

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

.match-board-toolbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.match-board-heading-copy {
  display: grid;
  gap: 8px;
  max-width: 760px;
}

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

.match-board-column {
  min-width: 0;
}

.match-column-header {
  margin-bottom: 12px;
}

.match-board-scroll {
  max-height: min(54vh, 510px);
  min-height: 320px;
  overflow-y: auto;
  padding-inline-end: 6px;
  scrollbar-gutter: stable;
}

.match-board-scroll::-webkit-scrollbar {
  width: 10px;
}

.match-board-scroll::-webkit-scrollbar-thumb {
  background: rgba(45, 127, 249, 0.28);
  border-radius: 999px;
}

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

.match-card-grid[data-size="medium"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.match-card-grid[data-size="large"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.match-select-card {
  min-width: 0;
}

.match-select-card.is-inactive {
  opacity: 0.72;
}

.match-word-card {
  min-height: 118px;
}

.match-word-card strong {
  line-height: 1.2;
}

.match-card-grid[data-size="large"] .match-word-card {
  min-height: 94px;
  padding: 12px 10px;
}

.match-card-grid[data-size="large"] .match-word-card strong {
  font-size: 1rem;
}

.match-card-grid[data-size="large"] .match-card-badge {
  padding: 4px 8px;
  font-size: 0.72rem;
}

.match-letter-helper {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.match-image-shell {
  position: relative;
}

.match-image-card {
  min-height: 158px;
}

.match-card-grid[data-size="large"] .match-image-card {
  min-height: 120px;
  padding: 10px;
}

.match-image-card img,
.match-emoji-visual {
  height: 128px;
}

.match-card-grid[data-size="large"] .match-image-card img,
.match-card-grid[data-size="large"] .match-emoji-visual {
  height: 90px;
}

.match-card-grid[data-size="medium"] .match-image-card img,
.match-card-grid[data-size="medium"] .match-emoji-visual {
  height: 106px;
}

.match-image-zoom-btn {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.7);
  color: var(--primary-dark);
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 18px rgba(38, 76, 114, 0.12);
  transition: transform 0.18s ease, background 0.18s ease;
}

body.match-game-page-body .match-level-card {
  background: rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(18px);
}

.match-image-zoom-btn:hover,
.match-image-zoom-btn:focus-visible {
  transform: translateY(-2px);
  background: #ffffff;
  outline: none;
}

@media (max-width: 1080px) {
  .match-levels-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .match-status-banner {
    grid-template-columns: 1fr;
  }

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

  .match-card-grid[data-size="large"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .match-levels-panel,
  .match-status-banner,
  .match-board-card {
    padding: 20px;
  }

  .match-levels-grid,
  .match-status-cards,
  .match-board-columns,
  .match-card-grid,
  .match-card-grid[data-size="medium"],
  .match-card-grid[data-size="large"] {
    grid-template-columns: 1fr;
  }

  .match-admin-row {
    flex-direction: column;
  }

  .match-board-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .match-board-scroll {
    max-height: 340px;
    min-height: 280px;
  }

  .match-image-card img,
  .match-emoji-visual,
  .match-card-grid[data-size="medium"] .match-image-card img,
  .match-card-grid[data-size="medium"] .match-emoji-visual,
  .match-card-grid[data-size="large"] .match-image-card img,
  .match-card-grid[data-size="large"] .match-emoji-visual {
    height: 112px;
  }
}

.sentence-builder-page {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

.sentence-builder-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.26)),
    url("images/B.png") center/cover no-repeat;
  filter: blur(3px) saturate(1.06);
  transform: scale(1.03);
  z-index: -2;
}

.sentence-builder-page::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.54), transparent 32%),
    radial-gradient(circle at top right, rgba(255, 230, 132, 0.24), transparent 28%),
    linear-gradient(180deg, rgba(236, 246, 255, 0.5), rgba(255, 244, 228, 0.48), rgba(239, 244, 255, 0.42));
  z-index: -1;
}

.sentence-builder-main {
  position: relative;
}

.sentence-hero .container,
.sentence-play-shell,
.sentence-complete-modal {
  perspective: 1900px;
  perspective-origin: center top;
}

.sentence-hero {
  padding-top: 38px;
}

.sentence-stage-card,
.sentence-game-banner,
.sentence-game-card,
.sentence-clue-card,
.sentence-bank-card,
.sentence-progress-box,
.sentence-complete-card {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.9)),
    linear-gradient(135deg, rgba(255, 217, 107, 0.28), rgba(114, 212, 255, 0.24), rgba(255, 155, 199, 0.24));
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow:
    0 30px 44px rgba(38, 76, 114, 0.18),
    0 12px 18px rgba(255, 255, 255, 0.32) inset,
    0 -8px 18px rgba(255, 255, 255, 0.24) inset;
}

.sentence-stage-card::before,
.sentence-game-banner::before,
.sentence-game-card::before,
.sentence-clue-card::before,
.sentence-bank-card::before,
.sentence-progress-box::before,
.sentence-complete-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.5), transparent 34%),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.36), transparent 28%);
  opacity: 0.8;
  pointer-events: none;
  z-index: 0;
}

.sentence-stage-card::after,
.sentence-game-banner::after,
.sentence-game-card::after,
.sentence-clue-card::after,
.sentence-bank-card::after,
.sentence-progress-box::after,
.sentence-complete-card::after {
  content: "";
  position: absolute;
  inset: auto 28px 12px;
  height: 26px;
  border-radius: 999px;
  background: rgba(27, 54, 88, 0.16);
  filter: blur(16px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.sentence-stage-card > *,
.sentence-game-banner > *,
.sentence-game-card > *,
.sentence-clue-card > *,
.sentence-bank-card > *,
.sentence-progress-box > *,
.sentence-complete-card > * {
  position: relative;
  z-index: 1;
  transform: translateZ(18px);
}

.sentence-complete-card > .sentence-complete-close {
  transform: translateZ(26px);
}

.sentence-complete-decoration {
  transform: translateZ(8px);
}

.sentence-stage-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 30px;
  border-radius: 34px;
  backdrop-filter: blur(10px);
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 200ms ease, box-shadow 200ms ease;
  transform: rotateX(var(--surface-tilt-x, 0deg)) rotateY(var(--surface-tilt-y, 0deg)) translateZ(0);
}

.sentence-stage-copy,
.sentence-stage-side {
  display: grid;
  gap: 16px;
}

.sentence-stage-side {
  align-content: center;
  justify-items: center;
  text-align: center;
}

.sentence-build-tiles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.sentence-build-tiles-large {
  gap: 12px;
}

.sentence-build-letter {
  --letter-tilt: -3deg;
  width: 74px;
  height: 82px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 2.15rem;
  font-weight: 900;
  color: #ffffff;
  box-shadow:
    0 10px 0 rgba(36, 58, 94, 0.12),
    0 20px 28px rgba(38, 76, 114, 0.2),
    0 8px 16px rgba(255, 255, 255, 0.28) inset;
  border: 3px solid rgba(255, 255, 255, 0.85);
  transform: rotate(var(--letter-tilt)) translateZ(20px);
  transform-style: preserve-3d;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.sentence-build-tiles-large .sentence-build-letter {
  width: 88px;
  height: 96px;
  font-size: 2.4rem;
}

.letter-one {
  --letter-tilt: -3deg;
  background: linear-gradient(180deg, #ffb83f, #ff8d2b);
}

.letter-two {
  --letter-tilt: 2deg;
  background: linear-gradient(180deg, #ff8fcd, #d56bff);
}

.letter-three {
  --letter-tilt: -1deg;
  background: linear-gradient(180deg, #ffd569, #ff9c3c);
}

.letter-four {
  --letter-tilt: 3deg;
  background: linear-gradient(180deg, #9be873, #5dd46f);
}

.letter-five {
  --letter-tilt: -2deg;
  background: linear-gradient(180deg, #71c7ff, #3485ff);
}

.sentence-build-sign {
  min-width: min(100%, 360px);
  padding: 18px 26px;
  border-radius: 24px;
  background: linear-gradient(180deg, #f6aa35, #e68f25);
  border: 4px solid rgba(255, 255, 255, 0.82);
  box-shadow:
    0 10px 0 rgba(132, 78, 14, 0.16),
    0 20px 26px rgba(158, 90, 14, 0.24);
  text-align: center;
  transform: translateZ(22px);
  transform-style: preserve-3d;
}

.sentence-build-sign strong {
  color: #ffffff;
  font-size: clamp(1.4rem, 2vw, 2rem);
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(136, 82, 24, 0.22);
}

.sentence-build-sign-large {
  padding: 20px 28px;
  min-width: min(100%, 430px);
}

.sentence-play-shell {
  width: min(980px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 22px;
  padding: clamp(18px, 2.4vw, 26px);
  border-radius: 42px;
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.sentence-game-banner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  align-items: center;
  padding: 28px;
  border-radius: 34px;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 200ms ease, box-shadow 200ms ease;
  transform: rotateX(var(--surface-tilt-x, 0deg)) rotateY(var(--surface-tilt-y, 0deg)) translateZ(0);
}

.sentence-title-stack {
  display: grid;
  gap: 14px;
  justify-items: center;
}

.sentence-progress-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.sentence-progress-box {
  padding: 18px;
  border-radius: 22px;
  text-align: center;
  transform-style: preserve-3d;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.sentence-progress-box span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 700;
}

.sentence-progress-box strong {
  display: block;
  line-height: 1.3;
  color: var(--primary-dark);
  font-size: 1.08rem;
}

.sentence-game-card {
  display: grid;
  gap: 20px;
  padding: 30px;
  border-radius: 36px;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 200ms ease, box-shadow 200ms ease;
  transform: rotateX(var(--surface-tilt-x, 0deg)) rotateY(var(--surface-tilt-y, 0deg)) translateZ(0);
}

.sentence-clue-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 22px 24px;
  border-radius: 28px;
  transform-style: preserve-3d;
  transition: transform 180ms ease, box-shadow 180ms ease;
  transform: rotateX(var(--surface-tilt-x, 0deg)) rotateY(var(--surface-tilt-y, 0deg)) translateZ(0);
}

.sentence-clue-copy {
  display: grid;
  gap: 8px;
}

.sentence-clue-copy strong {
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  color: var(--primary-dark);
}

.sentence-clue-emoji {
  width: 92px;
  height: 92px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(255, 217, 107, 0.42), rgba(114, 212, 255, 0.36), rgba(255, 155, 199, 0.36));
  font-size: 2.4rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.84);
  transform: translateZ(28px);
}

.sentence-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 14px;
  direction: ltr;
}

.sentence-slot,
.sentence-word-tile {
  position: relative;
  border: 0;
  border-radius: 24px;
  min-height: 108px;
  padding: 18px 14px;
  display: grid;
  gap: 8px;
  align-content: center;
  justify-items: center;
  text-align: center;
  font-weight: 900;
  direction: ltr;
  unicode-bidi: isolate;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  transform-style: preserve-3d;
}

.sentence-slot {
  background: rgba(255, 255, 255, 0.9);
  border: 3px dashed rgba(255, 199, 84, 0.5);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.88),
    0 10px 0 rgba(38, 76, 114, 0.08),
    0 18px 24px rgba(38, 76, 114, 0.12);
}

.sentence-slot::after,
.sentence-word-tile::after {
  content: "";
  position: absolute;
  inset: auto 14px 8px;
  height: 14px;
  border-radius: 999px;
  background: rgba(24, 44, 76, 0.16);
  filter: blur(7px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}

.sentence-slot > *,
.sentence-word-tile > * {
  position: relative;
  z-index: 1;
  transform: translateZ(18px);
}

.sentence-slot.is-empty:hover,
.sentence-word-tile:hover,
.sentence-word-tile:focus-visible,
.sentence-slot.is-filled:hover {
  transform: translateY(-8px) translateZ(20px) rotateX(7deg);
}

.sentence-slot.is-empty {
  color: var(--muted);
}

.sentence-slot.is-filled {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.92);
}

.sentence-slot-word,
.sentence-word-main {
  font-size: 1.2rem;
  line-height: 1.2;
}

.sentence-slot-index,
.sentence-word-sub,
.sentence-slot-placeholder {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(26, 45, 74, 0.72);
}

.sentence-bank-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: 30px;
  transform-style: preserve-3d;
  transition: transform 180ms ease, box-shadow 180ms ease;
  transform: rotateX(var(--surface-tilt-x, 0deg)) rotateY(var(--surface-tilt-y, 0deg)) translateZ(0);
}

.sentence-bank-header,
.sentence-bottom-actions,
.sentence-bank-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.sentence-bank-actions .btn:disabled,
.sentence-bottom-actions .btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.sentence-word-bank {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 14px;
  direction: ltr;
}

.sentence-word-tile {
  color: #ffffff;
  cursor: pointer;
  box-shadow:
    0 12px 0 rgba(36, 58, 94, 0.12),
    0 18px 24px rgba(38, 76, 114, 0.14),
    0 10px 18px rgba(255, 255, 255, 0.18) inset;
  border: 3px solid rgba(255, 255, 255, 0.86);
}

.sentence-word-tile.palette-0,
.sentence-slot.palette-0 {
  background: linear-gradient(180deg, #ffb83f, #ff8d2b);
}

.sentence-word-tile.palette-1,
.sentence-slot.palette-1 {
  background: linear-gradient(180deg, #ff95d0, #e16aff);
}

.sentence-word-tile.palette-2,
.sentence-slot.palette-2 {
  background: linear-gradient(180deg, #74c8ff, #3f8fff);
}

.sentence-word-tile.palette-3,
.sentence-slot.palette-3 {
  background: linear-gradient(180deg, #9fe76f, #5bcf77);
}

.sentence-word-tile.palette-4,
.sentence-slot.palette-4 {
  background: linear-gradient(180deg, #ffd76d, #ffb248);
}

.sentence-word-tile.palette-0 .sentence-word-sub,
.sentence-word-tile.palette-1 .sentence-word-sub,
.sentence-word-tile.palette-2 .sentence-word-sub,
.sentence-word-tile.palette-3 .sentence-word-sub,
.sentence-word-tile.palette-4 .sentence-word-sub,
.sentence-slot.is-filled .sentence-slot-index {
  color: rgba(255, 255, 255, 0.82);
}

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

.sentence-complete-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.sentence-complete-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 37, 68, 0.42);
  backdrop-filter: blur(6px);
}

.sentence-complete-card {
  position: relative;
  width: min(560px, calc(100% - 28px));
  margin: min(12vh, 90px) auto 0;
  padding: 28px;
  border-radius: 34px;
  display: grid;
  gap: 16px;
  text-align: center;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 200ms ease, box-shadow 200ms ease;
  transform: rotateX(var(--surface-tilt-x, 0deg)) rotateY(var(--surface-tilt-y, 0deg)) translateZ(0);
}

.sentence-complete-close {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.94);
  color: var(--primary-dark);
  font-size: 1.35rem;
  cursor: pointer;
  transform: translateZ(26px);
}

.sentence-complete-card > * {
  position: relative;
  z-index: 1;
  transform: translateZ(18px);
}

@media (hover: hover) and (pointer: fine) {
  .sentence-stage-card:hover,
  .sentence-game-banner:hover,
  .sentence-game-card:hover,
  .sentence-clue-card:hover,
  .sentence-bank-card:hover,
  .sentence-progress-box:hover,
  .sentence-complete-card:hover {
    box-shadow:
      0 36px 52px rgba(38, 76, 114, 0.22),
      0 14px 20px rgba(255, 255, 255, 0.34) inset,
      0 -8px 18px rgba(255, 255, 255, 0.24) inset;
  }

  .sentence-build-letter:hover {
    transform: rotate(var(--letter-tilt)) translateY(-8px) translateZ(28px);
  }

  .sentence-progress-box:hover {
    transform: translateY(-7px) translateZ(14px) rotateX(6deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sentence-stage-card,
  .sentence-game-banner,
  .sentence-game-card,
  .sentence-clue-card,
  .sentence-bank-card,
  .sentence-progress-box,
  .sentence-complete-card,
  .sentence-slot,
  .sentence-word-tile,
  .sentence-build-letter {
    transition: none;
  }
}

.sentence-complete-decoration {
  position: absolute;
  inset: 0 0 auto 0;
  height: 210px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.sentence-ribbon {
  position: absolute;
  top: -150px;
  width: 14px;
  height: 190px;
  border-radius: 999px;
  opacity: 0.92;
  box-shadow: 0 14px 24px rgba(38, 76, 114, 0.16);
  animation: sentence-ribbon-drop 3.4s linear infinite;
}

.ribbon-1 { left: 8%; background: linear-gradient(180deg, #ff8fc2, #ff5a8a); animation-delay: 0s; }
.ribbon-2 { left: 18%; background: linear-gradient(180deg, #ffd86d, #ffac34); animation-delay: 0.4s; }
.ribbon-3 { left: 30%; background: linear-gradient(180deg, #71c7ff, #2d7ff9); animation-delay: 0.9s; }
.ribbon-4 { left: 42%; background: linear-gradient(180deg, #9be873, #56c765); animation-delay: 0.2s; }
.ribbon-5 { left: 56%; background: linear-gradient(180deg, #ffb173, #ff7e44); animation-delay: 1.1s; }
.ribbon-6 { left: 68%; background: linear-gradient(180deg, #c9a7ff, #8a67ff); animation-delay: 0.6s; }
.ribbon-7 { left: 80%; background: linear-gradient(180deg, #73e2ff, #29c3ff); animation-delay: 1.4s; }
.ribbon-8 { left: 90%; background: linear-gradient(180deg, #ffe083, #ffc842); animation-delay: 0.75s; }

@keyframes sentence-ribbon-drop {
  0% {
    transform: translateY(-150px) rotate(-10deg);
  }

  100% {
    transform: translateY(250px) rotate(22deg);
  }
}

.sentence-complete-score {
  width: min(230px, 100%);
  margin: 0 auto;
  padding: 14px 18px;
  display: grid;
  gap: 6px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 217, 107, 0.34), rgba(114, 212, 255, 0.28), rgba(255, 155, 199, 0.28));
  border: 1px solid rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.52);
}

.sentence-complete-score span {
  color: var(--muted);
  font-weight: 800;
}

.sentence-complete-score strong {
  font-size: 1.45rem;
  color: var(--primary-dark);
}

.sentence-complete-message {
  font-size: 1.45rem;
  color: var(--success);
}

@media (max-width: 980px) {
  .sentence-stage-card,
  .sentence-game-banner {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .sentence-stage-card,
  .sentence-game-banner,
  .sentence-game-card,
  .sentence-bank-card,
  .sentence-clue-card,
  .sentence-complete-card {
    padding: 20px;
  }

  .sentence-play-shell {
    padding: 14px;
    border-radius: 30px;
  }

  .sentence-build-tiles-large .sentence-build-letter,
  .sentence-build-letter {
    width: 58px;
    height: 66px;
    font-size: 1.8rem;
  }

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

  .sentence-word-bank,
  .sentence-slot-grid {
    grid-template-columns: 1fr 1fr;
  }

  .sentence-bottom-actions,
  .sentence-bank-header,
  .sentence-bank-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

.site-auth-status {
  order: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-self: center;
  position: relative;
  z-index: 1;
}

.auth-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 130px;
  padding: 6px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 249, 223, 0.92), rgba(236, 246, 255, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 22px rgba(38, 76, 114, 0.08);
}

.auth-chip-guest {
  opacity: 0.92;
}

.auth-chip-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.auth-chip-copy strong {
  max-width: 68px;
  font-size: 0.82rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-chip-copy span {
  display: none;
}

.auth-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 6px 14px rgba(38, 76, 114, 0.12);
}

.auth-avatar-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2d7ff9, #ff8a3d);
  color: #ffffff;
  font-weight: 900;
}

.auth-admin-link,
.auth-signout-btn {
  text-decoration: none;
}

.google-login-btn.is-signed-in {
  background: linear-gradient(135deg, rgba(45, 127, 249, 0.12), rgba(255, 138, 61, 0.12), rgba(182, 241, 127, 0.16));
}

.auth-gate {
  position: fixed;
  inset: 96px 16px 16px;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.auth-locked .auth-gate {
  display: flex;
}

.auth-gate-card {
  width: min(560px, 100%);
  display: grid;
  gap: 16px;
  padding: 30px;
  border-radius: 32px;
  pointer-events: auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92)),
    linear-gradient(135deg, rgba(255, 217, 107, 0.3), rgba(114, 212, 255, 0.24), rgba(255, 155, 199, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 28px 60px rgba(38, 76, 114, 0.22);
  text-align: center;
}

.auth-gate-card h2 {
  font-size: clamp(1.8rem, 2.6vw, 2.4rem);
}

.auth-gate-card p {
  color: var(--muted);
}

.auth-gate-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.auth-gate-button-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
}

.auth-gate-button-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.auth-gate-message {
  min-height: 24px;
  font-weight: 700;
}

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

.auth-gate-message.is-success {
  color: var(--success);
}

.auth-locked main,
.auth-locked footer {
  filter: blur(7px);
  pointer-events: none;
  user-select: none;
}

.admin-page .topbar {
  position: sticky;
}

.student-flow-modal {
  position: fixed;
  inset: 0;
  z-index: 6500;
  display: grid;
  place-items: center;
  padding: 24px;
}

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

.student-flow-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 31, 52, 0.48);
  backdrop-filter: blur(12px);
}

.student-flow-dialog {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(88vh, 840px);
  overflow: auto;
  padding: 30px;
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.985), rgba(255, 255, 255, 0.94)),
    linear-gradient(135deg, rgba(255, 217, 107, 0.3), rgba(114, 212, 255, 0.26), rgba(255, 155, 199, 0.22));
  box-shadow: 0 28px 70px rgba(20, 40, 68, 0.28);
  display: grid;
  gap: 20px;
}

.student-flow-close {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(238, 245, 255, 0.98), rgba(255, 244, 214, 0.96));
  color: var(--primary-dark);
  font-size: 1.65rem;
  line-height: 1;
  box-shadow: 0 12px 22px rgba(38, 76, 114, 0.12);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.student-flow-close:hover,
.student-flow-close:focus-visible {
  transform: translateY(-2px);
  outline: none;
  background: linear-gradient(135deg, rgba(226, 238, 255, 1), rgba(255, 236, 196, 0.98));
  box-shadow: 0 16px 28px rgba(38, 76, 114, 0.16);
}

.student-flow-copy {
  display: grid;
  gap: 12px;
}

.student-flow-copy h2 {
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  line-height: 1.2;
}

.student-flow-copy p {
  color: var(--muted);
}

.student-package-copy {
  display: grid;
  gap: 16px;
}

.student-package-block {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border-radius: 24px;
  background: rgba(246, 250, 255, 0.82);
  border: 1px solid rgba(23, 50, 77, 0.08);
}

.student-package-block ul {
  list-style: none;
  display: grid;
  gap: 8px;
}

.student-package-price {
  font-weight: 900;
  color: var(--primary-dark);
}

.student-flow-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.student-flow-message {
  min-height: 22px;
  font-weight: 800;
}

.student-flow-message.is-error {
  color: #c53232;
}

.student-flow-message.is-neutral {
  color: var(--muted);
}

.student-profile-form {
  display: grid;
  gap: 18px;
}

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

.student-profile-field {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.student-profile-field input,
.student-profile-field select {
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px solid rgba(23, 50, 77, 0.12);
  background: rgba(244, 248, 255, 0.94);
  color: var(--text);
}

.subscription-locked main,
.subscription-pending main {
  filter: saturate(0.95);
}

.subscription-locked .nav a,
.subscription-pending .nav a,
.subscription-locked .hero-actions .btn,
.subscription-pending .hero-actions .btn,
.subscription-locked .step-card,
.subscription-pending .step-card,
.subscription-locked .grade-card,
.subscription-pending .grade-card,
.subscription-locked .category-card,
.subscription-pending .category-card,
.subscription-locked .content-card,
.subscription-pending .content-card,
.subscription-locked .shop-card,
.subscription-pending .shop-card,
.subscription-locked .footer-box .btn,
.subscription-pending .footer-box .btn {
  position: relative;
}

.subscription-locked .nav a::after,
.subscription-pending .nav a::after,
.subscription-locked .hero-actions .btn::after,
.subscription-pending .hero-actions .btn::after,
.subscription-locked .step-card::after,
.subscription-pending .step-card::after,
.subscription-locked .grade-card::after,
.subscription-pending .grade-card::after,
.subscription-locked .category-card::after,
.subscription-pending .category-card::after,
.subscription-locked .content-card::after,
.subscription-pending .content-card::after,
.subscription-locked .shop-card::after,
.subscription-pending .shop-card::after,
.subscription-locked .footer-box .btn::after,
.subscription-pending .footer-box .btn::after {
  content: "🔒";
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 18px rgba(26, 48, 77, 0.14);
  z-index: 2;
  font-size: 1rem;
}

.subscription-locked .content-card::before,
.subscription-pending .content-card::before,
.subscription-locked .step-card::before,
.subscription-pending .step-card::before,
.subscription-locked .grade-card::before,
.subscription-pending .grade-card::before,
.subscription-locked .category-card::before,
.subscription-pending .category-card::before,
.subscription-locked .shop-card::before,
.subscription-pending .shop-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.26);
  z-index: 1;
}

.starter-lesson-page {
  padding: 28px 0 72px;
}

.starter-lesson-shell {
  display: grid;
  gap: 22px;
}

.starter-lesson-header {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr;
  gap: 20px;
}

.starter-lesson-card,
.starter-progress-card,
.starter-stage-card,
.starter-complete-card {
  padding: 24px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 255, 0.94)),
    linear-gradient(135deg, rgba(255, 217, 107, 0.24), rgba(114, 212, 255, 0.2), rgba(255, 155, 199, 0.18));
  border: 1px solid rgba(23, 50, 77, 0.08);
  box-shadow: var(--shadow-md);
}

.starter-lesson-card {
  display: grid;
  gap: 14px;
}

.starter-progress-card {
  display: grid;
  gap: 16px;
  align-content: start;
}

.starter-timer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 170px;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 1.2rem;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, #2d7ff9 0%, #67c8ff 56%, #ff8a3d 100%);
  box-shadow: 0 14px 28px rgba(45, 127, 249, 0.28);
}

.starter-stage-card {
  display: grid;
  gap: 20px;
}

.starter-stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.starter-stage-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  min-height: 110px;
  padding: 18px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(114, 212, 255, 0.26), rgba(255, 217, 107, 0.24), rgba(255, 155, 199, 0.2));
  border: 1px solid rgba(23, 50, 77, 0.08);
}

.starter-stage-badge img {
  width: 100%;
  max-width: 96px;
  max-height: 96px;
  object-fit: contain;
}

.starter-stage-actions,
.starter-stage-footer,
.starter-games-grid {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.starter-feedback {
  min-height: 28px;
  font-weight: 800;
}

.starter-feedback.is-success {
  color: var(--success);
}

.starter-feedback.is-error {
  color: #c53232;
}

.starter-celebration {
  position: relative;
  min-height: 56px;
}

.starter-celebration[hidden] {
  display: none;
}

.starter-ribbon {
  position: absolute;
  top: 0;
  width: 12px;
  height: 40px;
  border-radius: 999px;
  animation: starter-ribbon-fall 1.8s linear infinite;
}

.starter-balloon {
  position: absolute;
  bottom: -8px;
  width: 18px;
  height: 24px;
  border-radius: 50% 50% 46% 46%;
  animation: starter-balloon-rise 2.6s ease-in infinite;
}

@keyframes starter-ribbon-fall {
  0% { transform: translateY(-10px) rotate(0deg); opacity: 0; }
  16% { opacity: 1; }
  100% { transform: translateY(74px) rotate(160deg); opacity: 0; }
}

@keyframes starter-balloon-rise {
  0% { transform: translateY(0); opacity: 0; }
  16% { opacity: 1; }
  100% { transform: translateY(-68px); opacity: 0; }
}

@media (max-width: 900px) {
  .student-flow-dialog {
    padding: 22px;
  }

  .student-profile-grid,
  .starter-lesson-header {
    grid-template-columns: 1fr;
  }
}

.admin-main {
  padding-bottom: 36px;
}

.admin-hero {
  padding-bottom: 14px;
}

.admin-hero-card,
.admin-card,
.admin-stat-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.91)),
    linear-gradient(135deg, rgba(255, 217, 107, 0.26), rgba(114, 212, 255, 0.24), rgba(255, 155, 199, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-lg);
}

.admin-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 30px;
  border-radius: 34px;
}

.admin-grid {
  display: grid;
  gap: 18px;
}

.admin-alert {
  padding: 16px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-md);
  font-weight: 700;
}

.admin-alert.is-error {
  color: #b82c2c;
  background: rgba(255, 240, 240, 0.96);
}

.admin-alert.is-success {
  color: var(--success);
  background: rgba(241, 255, 246, 0.96);
}

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

.admin-stat-card {
  padding: 22px;
  border-radius: 26px;
  display: grid;
  gap: 8px;
}

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

.admin-stat-card strong {
  font-size: 2rem;
  color: var(--primary-dark);
}

.admin-card {
  padding: 24px;
  border-radius: 30px;
}

.admin-card-heading {
  margin-bottom: 18px;
}

.admin-table-shell {
  overflow: auto;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.admin-table th,
.admin-table td {
  padding: 14px 16px;
  text-align: start;
  vertical-align: top;
  border-bottom: 1px solid rgba(23, 50, 77, 0.08);
}

.admin-table th {
  background: rgba(248, 251, 255, 0.9);
  color: var(--primary-dark);
  font-size: 0.92rem;
}

.admin-empty-row {
  text-align: center;
  color: var(--muted);
}

.admin-muted-line {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
}

.admin-session-row td {
  background: rgba(255, 255, 255, 0.56);
}

.admin-session-toggle {
  white-space: nowrap;
}

.admin-session-detail-row[hidden] {
  display: none;
}

.admin-session-detail-row td {
  background: rgba(245, 250, 255, 0.92);
}

.admin-session-detail-shell {
  display: grid;
  gap: 10px;
}

.admin-session-event {
  display: grid;
  grid-template-columns: minmax(140px, 1.2fr) minmax(150px, 1fr) minmax(180px, 1.3fr) minmax(120px, 0.8fr) minmax(110px, 0.7fr);
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(23, 50, 77, 0.08);
}

.admin-session-empty {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 980px) {
  .topbar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .logo,
  .nav,
  .topbar-actions {
    width: 100%;
  }

  .logo {
    justify-content: space-between;
  }

  .topbar-actions {
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
  }

  .site-auth-status {
    width: auto;
    justify-content: flex-end;
  }

  .auth-chip-copy span {
    max-width: 150px;
  }

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

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

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

@media (max-width: 760px) {
  .nav {
    gap: 8px;
  }

  .nav a,
  .lang-switch-trigger,
  .google-login-btn {
    min-height: 44px;
  }

  .auth-gate {
    inset: 88px 12px 12px;
  }

  .auth-gate-card {
    padding: 22px;
    border-radius: 26px;
  }

  .site-auth-status {
    gap: 8px;
  }

  .auth-chip {
    width: 100%;
  }

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

  .auth-chip-copy span {
    max-width: none;
  }

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

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

body.match-game-page-body .container {
  width: min(1480px, 96vw);
}

body.match-game-page-body .match-playground-shell {
  width: min(1540px, 100%);
  gap: 24px;
}

body.match-game-page-body .match-status-banner,
body.match-game-page-body .match-board-card {
  padding: 28px;
}

body.match-game-page-body .match-status-banner {
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 22px;
}

body.match-game-page-body .match-board-columns {
  gap: 22px;
}

body.match-game-page-body .match-board-scroll {
  max-height: min(74vh, 700px);
  min-height: 400px;
}

body.match-game-page-body .match-card-grid {
  gap: 16px;
}

body.match-game-page-body .match-card-grid[data-size="medium"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.match-game-page-body .match-card-grid[data-size="large"] {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

body.match-game-page-body .match-word-card {
  min-height: 126px;
}

body.match-game-page-body .match-card-grid[data-size="large"] .match-word-card {
  min-height: 108px;
  padding: 12px 10px;
}

body.match-game-page-body .match-image-card {
  min-height: 172px;
}

body.match-game-page-body .match-card-grid[data-size="large"] .match-image-card {
  min-height: 136px;
}

body.match-game-page-body .match-image-card img,
body.match-game-page-body .match-emoji-visual {
  height: 136px;
}

body.match-game-page-body .match-card-grid[data-size="medium"] .match-image-card img,
body.match-game-page-body .match-card-grid[data-size="medium"] .match-emoji-visual {
  height: 118px;
}

body.match-game-page-body .match-card-grid[data-size="large"] .match-image-card img,
body.match-game-page-body .match-card-grid[data-size="large"] .match-emoji-visual {
  height: 102px;
}

@media (min-width: 1180px) {
  body.match-game-page-body {
    zoom: 0.8;
  }
}

@media (max-width: 1180px) {
  body.match-game-page-body .container {
    width: min(var(--max-width), 92vw);
  }

  body.match-game-page-body .match-playground-shell {
    width: 100%;
  }

  body.match-game-page-body .match-card-grid[data-size="medium"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.match-game-page-body .match-card-grid[data-size="large"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body.match-game-page-body .match-levels-panel,
  body.match-game-page-body .match-status-banner,
  body.match-game-page-body .match-board-card {
    padding: 20px;
  }

  body.match-game-page-body .match-board-columns,
  body.match-game-page-body .match-card-grid,
  body.match-game-page-body .match-card-grid[data-size="medium"],
  body.match-game-page-body .match-card-grid[data-size="large"] {
    grid-template-columns: 1fr;
  }

  body.match-game-page-body .match-board-scroll {
    max-height: 340px;
    min-height: 280px;
  }

  body.match-game-page-body .match-image-card img,
  body.match-game-page-body .match-emoji-visual,
  body.match-game-page-body .match-card-grid[data-size="medium"] .match-image-card img,
  body.match-game-page-body .match-card-grid[data-size="medium"] .match-emoji-visual,
  body.match-game-page-body .match-card-grid[data-size="large"] .match-image-card img,
  body.match-game-page-body .match-card-grid[data-size="large"] .match-emoji-visual {
    height: 112px;
  }
}

body.match-game-page-body {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    url("images/match-word-picture-background.webp?v=20260416matchbg2") center top / cover no-repeat fixed !important;
}

body.match-game-page-body::before,
body.match-game-page-body::after {
  display: none;
}

body.match-game-page-body .topbar {
  display: none;
}

body.match-game-page-body {
  zoom: 1 !important;
}

.match-modern-topbar {
  width: min(1640px, 96vw);
  margin: 4px auto 0;
  padding: 6px 8px 4px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  direction: inherit;
}

.match-modern-back,
.match-modern-action,
.match-modern-logo,
.match-modern-chip,
.match-modern-copy,
.match-modern-selected,
.match-board-column:last-child,
.match-complete-card {
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 14px 30px rgba(33, 71, 122, 0.12);
}

.match-modern-back,
.match-modern-action {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #133864;
  font-weight: 800;
  font-size: 0.86rem;
}

.match-modern-center {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.match-modern-chip {
  min-width: 88px;
  padding: 6px 10px;
  border-radius: 18px;
  text-align: center;
}

.match-modern-chip span {
  display: block;
  color: #537090;
  font-size: 0.72rem;
  font-weight: 700;
}

.match-modern-chip strong {
  display: block;
  margin-top: 4px;
  color: #163a66;
  font-size: 1rem;
  line-height: 1.1;
}

.match-modern-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.match-modern-logo {
  width: 64px;
  padding: 6px;
  border-radius: 20px;
}

.match-modern-main {
  width: min(1640px, 96vw);
  margin: 0 auto;
  padding: 0 0 10px;
  min-height: calc(100vh - 82px);
}

.match-playground-shell-modern {
  width: 100% !important;
  gap: 8px;
}

.match-modern-status-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.match-modern-copy,
.match-modern-selected {
  border-radius: 20px;
  padding: 10px 14px;
}

.match-modern-kicker {
  display: none;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  color: #3565a2;
  font-weight: 800;
  margin-bottom: 10px;
}

.match-modern-copy h1 {
  font-size: clamp(1.08rem, 1.2vw, 1.24rem);
  line-height: 1.08;
  color: #183c69;
}

.match-modern-copy p,
.match-modern-selected span {
  color: #58728f;
  font-weight: 700;
}

.match-modern-copy p {
  display: none;
}

.match-modern-selected {
  display: none;
}

.match-modern-selected strong {
  font-size: 1rem;
  color: #173a67;
  line-height: 1.2;
}

.match-board-card-modern {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.match-board-toolbar-modern {
  margin-bottom: 8px;
}

.match-board-heading-copy {
  max-width: 100%;
}

.match-board-heading-copy .mini-label {
  display: none;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: #31639e;
}

.match-feedback {
  font-size: 0.88rem;
  font-weight: 800;
  color: #173c69;
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 18px;
  padding: 10px 14px;
  width: fit-content;
  max-width: 100%;
}

.match-board-columns {
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr) !important;
  gap: 18px !important;
  align-items: start;
}

.match-board-column {
  min-width: 0;
}

.match-board-column:first-child {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.match-board-column:last-child {
  padding: 12px;
  border-radius: 24px;
}

.match-column-header h3 {
  font-size: 1.1rem;
  color: #173c69;
}

.match-board-scroll {
  max-height: min(74vh, 720px) !important;
  min-height: 380px !important;
  padding-inline-end: 6px;
}

#matchImageGrid.match-card-grid[data-size="small"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#matchImageGrid.match-card-grid[data-size="medium"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#matchImageGrid.match-card-grid[data-size="large"] {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

#matchWordGrid.match-card-grid[data-size="small"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#matchWordGrid.match-card-grid[data-size="medium"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#matchWordGrid.match-card-grid[data-size="large"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.match-word-card {
  min-height: 102px !important;
  padding: 12px 10px !important;
  background: rgba(255, 255, 255, 0.34) !important;
  border: 1px solid rgba(255, 255, 255, 0.86) !important;
  border-radius: 28px !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 28px rgba(34, 74, 126, 0.12) !important;
}

.match-word-card strong {
  color: #173b67;
  font-size: 1.02rem !important;
  font-weight: 800;
}

.match-card-badge {
  background: rgba(255, 255, 255, 0.82);
  color: #2b5f99;
}

.match-image-shell {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.match-image-card {
  min-height: 110px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.match-image-card img,
.match-emoji-visual {
  height: 90px !important;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  margin: 0 auto;
  filter: drop-shadow(0 14px 18px rgba(34, 74, 126, 0.16));
}

.match-card-grid[data-size="medium"] .match-image-card img,
.match-card-grid[data-size="medium"] .match-emoji-visual {
  height: 82px !important;
}

.match-card-grid[data-size="large"] .match-image-card img,
.match-card-grid[data-size="large"] .match-emoji-visual {
  height: 72px !important;
}

.match-image-card.is-matched img,
.match-image-shell.is-matched img {
  filter: drop-shadow(0 0 18px rgba(85, 206, 126, 0.45));
}

.match-image-zoom-btn {
  display: none !important;
}

.match-hidden-support,
.match-hidden-next {
  display: none !important;
}

@media (max-width: 1180px) {
  .match-modern-topbar,
  .match-modern-main {
    width: min(98vw, 1440px);
  }

  .match-modern-status-line {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .match-board-columns {
    grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr) !important;
  }

  #matchImageGrid.match-card-grid[data-size="large"],
  #matchImageGrid.match-card-grid[data-size="medium"],
  #matchWordGrid.match-card-grid[data-size="large"],
  #matchWordGrid.match-card-grid[data-size="medium"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .match-modern-topbar {
    grid-template-columns: 1fr;
  }

  .match-modern-brand {
    justify-content: space-between;
  }

  .match-modern-center {
    justify-content: stretch;
  }

  .match-modern-chip {
    flex: 1 1 140px;
  }

  .match-modern-status-line {
    grid-template-columns: 1fr;
  }

  .match-board-columns {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr) !important;
    gap: 12px !important;
  }

  .match-board-scroll {
    max-height: min(62vh, 560px) !important;
    min-height: 260px !important;
  }

  #matchImageGrid.match-card-grid,
  #matchImageGrid.match-card-grid[data-size="medium"],
  #matchImageGrid.match-card-grid[data-size="large"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #matchWordGrid.match-card-grid,
  #matchWordGrid.match-card-grid[data-size="medium"],
  #matchWordGrid.match-card-grid[data-size="large"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.daily-life-page {
  padding-bottom: 84px;
}

.daily-life-hero {
  padding-top: 42px;
}

.daily-life-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
  gap: 24px;
  align-items: stretch;
}

.daily-life-copy,
.daily-side-card,
.daily-word-card,
.daily-category-chip {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 38px rgba(28, 47, 94, 0.09);
}

.daily-life-copy {
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 30px;
  padding: 32px;
}

.daily-life-copy p {
  max-width: 66ch;
}

.daily-side-card {
  border-radius: 28px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  display: grid;
  gap: 18px;
}

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

.daily-side-stat {
  border-radius: 18px;
  padding: 16px 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(72, 114, 214, 0.12);
  text-align: center;
}

.daily-side-stat strong {
  display: block;
  font-size: 1.35rem;
  color: var(--ink-dark);
  margin-bottom: 4px;
}

.daily-side-stat span {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.daily-category-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.daily-category-chip {
  border: 1px solid rgba(82, 109, 189, 0.14);
  border-radius: 22px;
  padding: 18px 16px;
  text-align: start;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.daily-category-chip.is-ready {
  cursor: pointer;
}

.daily-category-chip.is-ready:hover,
.daily-category-chip.active {
  transform: translateY(-2px);
  border-color: rgba(71, 128, 245, 0.28);
  box-shadow: 0 20px 36px rgba(52, 89, 168, 0.14);
}

.daily-category-chip:disabled {
  opacity: 0.68;
  cursor: not-allowed;
}

.daily-category-chip span,
.daily-category-chip small {
  display: block;
}

.daily-category-chip span {
  font-weight: 800;
  color: var(--ink-dark);
}

.daily-category-chip small {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.86rem;
}

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

.daily-word-card {
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  overflow: hidden;
}

.daily-word-media {
  position: relative;
  padding: 18px 18px 0;
}

.daily-word-media img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  border-radius: 22px;
  display: block;
  background: linear-gradient(135deg, #fef4d7 0%, #eaf5ff 100%);
}

.daily-image-expand {
  position: absolute;
  top: 30px;
  inset-inline-end: 30px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 1.2rem;
  font-weight: 800;
  color: #234a82;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 22px rgba(40, 74, 130, 0.16);
  cursor: pointer;
  z-index: 2;
}

.daily-image-expand:hover {
  transform: translateY(-1px);
}

.daily-word-body {
  padding: 18px 18px 20px;
  display: grid;
  gap: 14px;
}

.daily-word-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.daily-word-index {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #28559b;
  background: linear-gradient(135deg, rgba(77, 144, 255, 0.16) 0%, rgba(255, 170, 92, 0.2) 100%);
}

.daily-word-title-block h3 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--ink-dark);
}

.daily-word-title-block p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-weight: 600;
}

.daily-word-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.daily-audio-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(135deg, #3a83ff 0%, #ff9f59 100%);
  box-shadow: 0 12px 24px rgba(60, 110, 216, 0.18);
}

.wh-question-card .daily-word-body {
  gap: 18px;
}

.wh-question-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wh-question-visual {
  width: 84px;
  height: 84px;
  border-radius: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(77, 144, 255, 0.16) 0%, rgba(255, 170, 92, 0.2) 100%);
  box-shadow: inset 0 0 0 1px rgba(72, 114, 214, 0.12);
  overflow: hidden;
}

.wh-question-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wh-question-title h3 {
  font-size: 1.55rem;
}

.wh-question-title p {
  font-size: 1rem;
  font-weight: 700;
}

.wh-question-examples {
  display: grid;
  gap: 12px;
}

.wh-question-example {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(72, 114, 214, 0.12);
}

.wh-question-example-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 1px rgba(72, 114, 214, 0.1);
}

.wh-question-example-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wh-question-example-media.is-contain img {
  object-fit: contain;
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.wh-question-example-copy strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-dark);
  font-size: 1.02rem;
}

.wh-question-example-copy p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 600;
}

.wh-question-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.wh-answer-model {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(72, 114, 214, 0.14);
}

.wh-answer-model strong {
  display: block;
  font-size: 1.08rem;
  color: var(--ink-dark);
}

.wh-answer-model p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 700;
}

.wh-answer-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(83, 134, 255, 0.14);
  color: var(--ink-dark);
  font-size: 0.9rem;
  font-weight: 800;
}

.wh-answer-options {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.wh-answer-option-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wh-answer-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(72, 114, 214, 0.15);
  color: var(--ink-dark);
  font-weight: 700;
}

.wh-answer-feedback {
  min-height: 24px;
  margin: 0;
  font-weight: 700;
  color: var(--text-muted);
}

.wh-answer-feedback.is-listening {
  color: #2f69da;
}

.wh-answer-feedback.is-success {
  color: #2f9a55;
}

.wh-answer-feedback.is-error {
  color: #d95252;
}

.wh-next-btn {
  justify-self: start;
}

html[dir="ltr"] .wh-next-btn {
  justify-self: end;
}

.wh-success-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(16, 29, 55, 0.52);
  z-index: 1500;
}

.wh-success-overlay.active {
  display: flex;
}

.wh-success-panel {
  position: relative;
  width: min(560px, 92vw);
  overflow: hidden;
  border-radius: 32px;
  padding: 34px 26px 26px;
  text-align: center;
  background: linear-gradient(180deg, #fffdf6 0%, #eef8ff 100%);
  box-shadow: 0 36px 64px rgba(18, 38, 76, 0.24);
}

.wh-success-panel h3 {
  margin: 0 0 12px;
  font-size: 2rem;
  color: var(--ink-dark);
}

.wh-success-panel p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 700;
}

.wh-success-close-icon {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--ink-dark);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 20px rgba(53, 92, 170, 0.12);
}

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

.wh-success-balloons,
.wh-success-ribbons {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.wh-success-balloon {
  position: absolute;
  bottom: -54px;
  width: var(--wh-balloon-size);
  height: calc(var(--wh-balloon-size) * 1.24);
  border-radius: 50% 50% 48% 48%;
  background: linear-gradient(180deg, var(--wh-balloon-top) 0%, var(--wh-balloon-bottom) 100%);
  box-shadow: inset -8px -10px 0 rgba(255, 255, 255, 0.16);
  animation: whFloatUp 2.6s ease-in infinite;
  animation-delay: var(--wh-balloon-delay);
}

.wh-success-balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -18px;
  width: 2px;
  height: 18px;
  background: rgba(112, 127, 173, 0.42);
  transform: translateX(-50%);
}

.wh-success-ribbon {
  position: absolute;
  width: 16px;
  height: 6px;
  border-radius: 999px;
  opacity: 0;
  animation: whRibbonBurst 1.8s ease-in infinite;
}

@keyframes whFloatUp {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--wh-balloon-drift), -280px, 0);
    opacity: 0;
  }
}

@keyframes whRibbonBurst {
  0% {
    transform: scale(0.5) rotate(0deg);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translateY(34px) scale(1.1) rotate(180deg);
    opacity: 0;
  }
}

.daily-audio-btn.is-soft {
  color: var(--ink-dark);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(236, 244, 255, 0.96) 100%);
}

.daily-word-meta,
.daily-word-usage {
  border-radius: 20px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(82, 109, 189, 0.12);
}

.daily-word-meta p,
.daily-word-usage p {
  margin: 8px 0 0;
}

.daily-word-usage p:first-of-type {
  font-weight: 700;
  color: var(--ink-dark);
}

.daily-word-usage-translation {
  color: var(--text-muted);
}

.command-hero-media {
  margin-top: 18px;
}

.command-hero-media img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  display: block;
  border-radius: 22px;
  background: linear-gradient(135deg, #fef4d7 0%, #eaf5ff 100%);
}

.command-section + .command-section {
  margin-top: 28px;
}

.command-section-heading {
  margin-bottom: 14px;
}

.command-section-heading h3 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--ink-dark);
}

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

.command-word-card.is-practicing {
  transform: translateY(-4px);
  box-shadow: 0 22px 40px rgba(58, 131, 255, 0.16);
}

.command-word-media {
  padding-top: 18px;
}

.command-icon-tile {
  width: 100%;
  height: 220px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 14px;
  background: linear-gradient(135deg, #fef4d7 0%, #eaf5ff 100%);
}

.command-icon-tile img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

@media (max-width: 980px) {
  .command-words-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .command-icon-tile {
    height: 200px;
  }
}

body.daily-modal-open {
  overflow: hidden;
}

.daily-image-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(18, 30, 56, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
}

.daily-image-modal.active {
  display: flex;
}

.daily-image-modal-dialog {
  width: min(92vw, 760px);
  max-height: 88vh;
  border-radius: 28px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 26px 54px rgba(13, 24, 45, 0.22);
}

.daily-image-modal-dialog img {
  width: 100%;
  max-height: calc(88vh - 36px);
  object-fit: contain;
  display: block;
  border-radius: 22px;
  background: linear-gradient(135deg, #fef4d7 0%, #eaf5ff 100%);
}

.daily-image-modal-close {
  position: absolute;
  top: 24px;
  inset-inline-end: 24px;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  line-height: 1;
  color: #17345a;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(17, 35, 65, 0.18);
  cursor: pointer;
}

@media (max-width: 1080px) {
  .daily-life-shell {
    grid-template-columns: 1fr;
  }

  .daily-category-strip,
  .daily-words-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .daily-side-stats,
  .daily-category-strip,
  .daily-words-grid {
    grid-template-columns: 1fr;
  }

  .daily-life-copy,
  .daily-side-card {
    padding: 24px;
  }

  .daily-word-media img {
    height: 200px;
  }
}

.memory-game-page-body {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(255, 248, 228, 0.16), rgba(231, 242, 255, 0.12)),
    url("images/memory-game/background.webp?v=20260414bg1") center / cover no-repeat fixed;
}

.memory-page-main {
  padding-bottom: 5rem;
}

.memory-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 360px);
  gap: 1.5rem;
  align-items: stretch;
}

.memory-copy,
.memory-side-card,
.memory-status-card,
.memory-success-card {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(22px);
  box-shadow: 0 22px 46px rgba(54, 82, 129, 0.14);
}

.memory-side-card {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.memory-preview-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.memory-preview-pill,
.memory-level-badge,
.memory-card-badge,
.memory-stat-pill,
.memory-feedback {
  border-radius: 999px;
}

.memory-preview-pill {
  padding: 0.55rem 0.95rem;
  background: rgba(255, 255, 255, 0.54);
  font-weight: 700;
  color: #24415e;
  box-shadow: 0 12px 28px rgba(77, 124, 173, 0.12);
}

.memory-level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.memory-level-card {
  border: 1px solid rgba(95, 135, 191, 0.12);
  border-radius: 28px;
  padding: 1.15rem;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 14px 32px rgba(114, 152, 198, 0.14);
  display: grid;
  gap: 0.45rem;
  text-align: start;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.memory-level-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 38px rgba(114, 152, 198, 0.18);
  border-color: rgba(78, 149, 251, 0.24);
}

.memory-level-card strong {
  font-size: 1.08rem;
  color: #14345a;
}

.memory-level-card span {
  color: #59789e;
  font-weight: 600;
}

.memory-level-card.is-active {
  border-color: rgba(76, 141, 242, 0.38);
  background: linear-gradient(135deg, rgba(232, 244, 255, 0.98), rgba(255, 245, 232, 0.98));
}

.memory-level-card.is-complete .memory-level-badge {
  background: linear-gradient(135deg, #4ecf91, #2e9e66);
  color: #fff;
}

.memory-level-badge {
  justify-self: start;
  padding: 0.35rem 0.75rem;
  background: rgba(76, 141, 242, 0.12);
  color: #2a63b8;
  font-size: 0.88rem;
}

.memory-board-shell {
  display: grid;
  gap: 1.4rem;
}

.memory-status-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.memory-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.memory-stat-pill {
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: inset 0 0 0 1px rgba(101, 132, 188, 0.08);
  display: grid;
  gap: 0.25rem;
}

.memory-stat-pill span {
  color: #6280a4;
  font-size: 0.93rem;
}

.memory-stat-pill strong {
  color: #18375f;
  font-size: 1.15rem;
}

.memory-feedback {
  margin: 0;
  padding: 0.9rem 1rem;
  background: linear-gradient(135deg, rgba(79, 132, 251, 0.12), rgba(255, 171, 101, 0.12));
  color: #23456a;
  font-weight: 700;
}

.memory-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.memory-card {
  position: relative;
  border: none;
  background: transparent;
  aspect-ratio: 1 / 1.14;
  perspective: 900px;
  cursor: pointer;
  padding: 0;
}

.memory-card-face {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  backface-visibility: hidden;
  transition: transform 340ms ease, box-shadow 200ms ease;
  overflow: hidden;
  box-shadow: 0 16px 30px rgba(103, 143, 192, 0.16);
  border: 1px solid rgba(99, 135, 183, 0.12);
}

.memory-card-front {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.72), transparent 26%),
    linear-gradient(135deg, rgba(255, 243, 224, 0.82), rgba(231, 244, 255, 0.78));
  display: grid;
  place-items: center;
}

.memory-card-back {
  transform: rotateY(180deg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(247, 251, 255, 0.74));
  padding: 0.95rem;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0.7rem;
}

.memory-card.is-revealed .memory-card-front,
.memory-card.is-matched .memory-card-front {
  transform: rotateY(180deg);
}

.memory-card.is-revealed .memory-card-back,
.memory-card.is-matched .memory-card-back {
  transform: rotateY(0deg);
}

.memory-card.is-matched .memory-card-back {
  box-shadow: 0 0 0 3px rgba(77, 195, 126, 0.3), 0 16px 32px rgba(77, 195, 126, 0.24);
}

.memory-card-star {
  font-size: clamp(2.6rem, 5vw, 4rem);
  font-weight: 900;
  color: #2f6dda;
  text-shadow: 0 8px 20px rgba(47, 109, 218, 0.2);
}

.memory-card-badge {
  padding: 0.35rem 0.75rem;
  background: linear-gradient(135deg, rgba(80, 145, 251, 0.13), rgba(255, 171, 101, 0.18));
  color: #28527d;
  font-size: 0.82rem;
  font-weight: 800;
}

.memory-card-letter {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 900;
  color: #234d8f;
}

.memory-card-image {
  width: 100%;
  max-height: 130px;
  object-fit: contain;
}

.memory-card-word {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1f3554;
  text-align: center;
}

.memory-success-section {
  padding-top: 0;
}

.memory-success-card {
  position: relative;
  overflow: hidden;
  text-align: center;
}

.memory-success-badges {
  position: relative;
  height: 84px;
}

.memory-burst-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5ca8ff, #ffb15d);
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: memoryBurst 900ms ease forwards;
  animation-delay: var(--memory-dot-delay);
}

.memory-burst-dot:nth-child(3n) {
  background: linear-gradient(135deg, #ff8fba, #ffd45c);
}

.memory-burst-dot:nth-child(4n) {
  background: linear-gradient(135deg, #77e29a, #4ca47a);
}

@keyframes memoryBurst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--memory-dot-x)), calc(-50% + var(--memory-dot-y))) scale(1.05);
  }
}

@media (max-width: 960px) {
  .memory-shell {
    grid-template-columns: 1fr;
  }

  .memory-status-top {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 700px) {
  .memory-copy,
  .memory-side-card,
  .memory-status-card,
  .memory-success-card {
    padding: 1.35rem;
  }

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

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

.article-pattern-page {
  padding-bottom: 84px;
}

.article-pattern-hero {
  padding-top: 42px;
}

.article-shell,
.article-example-viewer,
.article-example-sidebar,
.article-stage-pill {
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 38px rgba(28, 47, 94, 0.09);
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 24px;
  padding: 28px;
  border-radius: 34px;
}

.article-copy,
.article-side-card,
.article-example-viewer,
.article-example-sidebar {
  border-radius: 28px;
}

.article-copy {
  padding: 30px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(245, 250, 255, 0.86));
}

.article-copy h1 {
  margin-bottom: 14px;
}

.article-copy p {
  max-width: 720px;
}

.article-side-card {
  padding: 24px;
  background: linear-gradient(135deg, rgba(248, 251, 255, 0.96), rgba(255, 249, 238, 0.94));
}

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

.article-side-stat {
  padding: 14px 10px;
  border-radius: 22px;
  text-align: center;
  background: rgba(255, 255, 255, 0.84);
}

.article-side-stat strong {
  display: block;
  font-size: 1.35rem;
  color: var(--ink-dark);
}

.article-side-stat span {
  display: block;
  margin-top: 6px;
  font-size: 0.92rem;
  color: var(--muted);
}

.article-stage-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.article-stage-pill {
  border-radius: 24px;
  padding: 16px 18px;
}

.article-stage-pill strong {
  display: block;
  color: var(--ink-dark);
  font-size: 1rem;
}

.article-stage-pill span {
  display: inline-flex;
  margin-top: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
}

.article-stage-pill.is-active {
  box-shadow: 0 18px 38px rgba(90, 147, 255, 0.16);
}

.article-stage-pill.is-active span {
  background: linear-gradient(135deg, rgba(66, 136, 255, 0.16), rgba(255, 181, 93, 0.16));
  color: var(--brand-blue);
}

.article-stage-pill.is-upcoming span {
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
}

.article-example-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.72fr);
  gap: 24px;
  align-items: start;
}

.article-example-viewer,
.article-example-sidebar {
  padding: 24px;
}

.article-example-top,
.article-nav-buttons,
.article-audio-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.article-example-top {
  justify-content: space-between;
  margin-bottom: 18px;
}

.article-example-main {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1fr);
  gap: 20px;
}

.article-example-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  border-radius: 28px;
  padding: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(245, 249, 255, 0.9));
  border: 1px solid rgba(208, 225, 255, 0.62);
}

.article-example-media img {
  display: block;
  width: 100%;
  max-width: 280px;
  max-height: 260px;
  object-fit: contain;
}

.article-sentence-box {
  margin-bottom: 16px;
  padding: 16px 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(203, 221, 255, 0.7);
}

.article-sentence-text {
  margin: 10px 0 0;
  font-size: 1.95rem;
  font-weight: 800;
  line-height: 1.55;
  direction: ltr;
  text-align: left;
  color: var(--ink-dark);
}

.article-sentence-piece {
  display: inline-block;
  padding: 5px 12px;
  margin-inline-end: 8px;
  border-radius: 999px;
}

.article-sentence-piece--article {
  background: rgba(82, 171, 255, 0.16);
  color: #2769da;
}

.article-sentence-piece--noun {
  background: rgba(120, 221, 144, 0.2);
  color: #1f8b5f;
}

.article-sentence-piece--predicate {
  background: rgba(255, 191, 111, 0.24);
  color: #c56f21;
}

.article-sentence-parts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.article-part {
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: center;
  gap: 8px;
  min-height: 112px;
  border: 0;
  border-radius: 24px;
  padding: 18px 16px;
  text-align: inherit;
  cursor: pointer;
  color: var(--ink-dark);
}

.article-part strong {
  font-size: 1.55rem;
}

.article-part-label {
  font-size: 0.86rem;
  font-weight: 800;
  opacity: 0.82;
}

.article-part--article {
  background: linear-gradient(135deg, rgba(82, 171, 255, 0.18), rgba(113, 207, 255, 0.26));
}

.article-part--noun {
  background: linear-gradient(135deg, rgba(120, 221, 144, 0.18), rgba(227, 245, 172, 0.3));
}

.article-part--predicate {
  background: linear-gradient(135deg, rgba(255, 202, 108, 0.22), rgba(255, 167, 121, 0.26));
}

.article-audio-row {
  margin-top: 16px;
}

.article-audio-btn {
  min-width: 156px;
}

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

.article-helper-card {
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(224, 234, 255, 0.66);
}

.article-helper-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-dark);
}

.article-helper-card p {
  margin: 0;
  font-size: 0.94rem;
}

.article-translation-box {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(247, 250, 255, 0.8));
  border: 1px solid rgba(223, 234, 255, 0.66);
}

.article-translation-box strong {
  display: block;
  margin-top: 8px;
  font-size: 1.12rem;
  color: var(--ink-dark);
}

.article-example-note {
  margin: 16px 0 0;
  font-size: 0.98rem;
  color: var(--muted);
}

.article-sidebar-head {
  margin-bottom: 14px;
}

.article-sidebar-head h3 {
  margin: 0 0 8px;
  color: var(--ink-dark);
}

.article-sidebar-head p {
  margin: 0;
}

.article-example-picker {
  display: grid;
  gap: 12px;
}

.article-example-chip {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 1px solid rgba(222, 234, 255, 0.72);
  background: rgba(255, 255, 255, 0.84);
  border-radius: 22px;
  padding: 10px;
  cursor: pointer;
  text-align: inherit;
}

.article-example-chip.is-active {
  border-color: rgba(72, 133, 255, 0.38);
  box-shadow: 0 14px 28px rgba(90, 147, 255, 0.14);
}

.article-example-chip img {
  width: 78px;
  height: 78px;
  object-fit: contain;
  border-radius: 18px;
  background: rgba(248, 251, 255, 0.96);
}

.article-example-chip-copy strong,
.article-example-chip-copy span {
  display: block;
}

.article-example-chip-copy strong {
  color: var(--ink-dark);
}

.article-example-chip-copy span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

@media (max-width: 1080px) {
  .article-shell,
  .article-example-layout,
  .article-example-main {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .article-shell,
  .article-example-viewer,
  .article-example-sidebar {
    padding: 18px;
  }

  .article-side-stats,
  .article-sentence-parts,
  .article-helper-grid,
  .article-stage-strip {
    grid-template-columns: 1fr;
  }

  .article-example-chip {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .article-example-chip img {
    width: 64px;
    height: 64px;
  }
}

.parts-page {
  padding: 36px 0 80px;
}

.parts-hero {
  padding-top: 24px;
}

.parts-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 24px;
  align-items: center;
  padding: 30px;
  border-radius: 38px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(246, 251, 255, 0.82));
  border: 1px solid rgba(216, 229, 255, 0.68);
  box-shadow: 0 22px 52px rgba(88, 142, 255, 0.12);
}

.parts-copy h1 {
  margin: 8px 0 14px;
  font-size: clamp(2.2rem, 4vw, 3.65rem);
  color: var(--ink-dark);
}

.parts-copy p {
  margin: 0 0 22px;
  font-size: 1.08rem;
  line-height: 1.9;
  color: var(--muted);
}

.parts-cover-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  padding: 24px;
  border-radius: 34px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 255, 0.92));
  border: 1px solid rgba(212, 226, 255, 0.72);
}

.parts-cover-card img {
  display: block;
  width: 100%;
  max-width: 340px;
  max-height: 300px;
  object-fit: contain;
}

.parts-order-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.parts-order-pill {
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink-dark);
}

.parts-order-pill--noun {
  background: rgba(82, 171, 255, 0.18);
  color: #2769da;
}

.parts-order-pill--verb {
  background: rgba(120, 221, 144, 0.22);
  color: #1f8b5f;
}

.parts-order-pill--rest {
  background: rgba(255, 191, 111, 0.26);
  color: #c56f21;
}

.parts-order-plus {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink-dark);
}

.parts-order-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.parts-order-step {
  padding: 20px 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(219, 232, 255, 0.72);
  box-shadow: 0 16px 34px rgba(96, 145, 255, 0.08);
}

.parts-order-step strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 1.2rem;
  color: var(--ink-dark);
}

.parts-order-step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.parts-sentence-examples {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.parts-example-card,
.parts-card {
  padding: 18px;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(247, 251, 255, 0.86));
  border: 1px solid rgba(215, 229, 255, 0.72);
  box-shadow: 0 18px 38px rgba(87, 139, 255, 0.1);
}

.parts-example-media,
.parts-card-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(224, 235, 255, 0.76);
}

.parts-example-media img,
.parts-card-media img {
  display: block;
  width: 100%;
  max-width: 340px;
  max-height: 280px;
  object-fit: contain;
}

.parts-example-copy,
.parts-card-copy {
  margin-top: 16px;
}

.parts-sentence-box {
  padding: 14px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(221, 232, 255, 0.76);
}

.parts-sentence-box strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-dark);
}

.parts-sentence-text {
  margin: 0;
  line-height: 1.9;
  direction: ltr;
  text-align: left;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--ink-dark);
}

.parts-sentence-piece {
  display: inline-block;
  padding: 4px 10px;
  margin-right: 7px;
  margin-bottom: 8px;
  border-radius: 999px;
}

.parts-sentence-piece--noun {
  background: rgba(82, 171, 255, 0.18);
  color: #2769da;
}

.parts-sentence-piece--verb {
  background: rgba(120, 221, 144, 0.22);
  color: #1f8b5f;
}

.parts-sentence-piece--rest {
  background: rgba(255, 191, 111, 0.26);
  color: #c56f21;
}

.parts-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  margin-bottom: 18px;
}

.parts-tab {
  border: 0;
  padding: 14px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink-dark);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(95, 140, 255, 0.08);
}

.parts-tab.is-active {
  background: linear-gradient(135deg, #4a90e2, #ffb46f);
  color: #fff;
}

.parts-tab.is-complete {
  background: rgba(120, 221, 144, 0.24);
  color: #1f8b5f;
}

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

.parts-grid--single {
  grid-template-columns: minmax(0, 920px);
  justify-content: center;
}

.parts-card--single {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(360px, 500px) 1fr;
  gap: 24px;
  align-items: stretch;
}

.parts-card--paired-single {
  grid-template-columns: 1fr;
}

.parts-intro-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(340px, 460px) 1fr;
  gap: 22px;
  padding: 22px;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 255, 0.9));
  border: 1px solid rgba(215, 229, 255, 0.72);
  box-shadow: 0 18px 38px rgba(87, 139, 255, 0.1);
}

.parts-intro-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 560px;
  padding: 28px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(224, 235, 255, 0.76);
}

.parts-intro-media img {
  display: block;
  width: 100%;
  max-width: 860px;
  max-height: 700px;
  object-fit: contain;
}

.parts-intro-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.parts-intro-copy--center {
  text-align: center;
}

.parts-intro-copy h3 {
  margin: 0;
  font-size: 2rem;
  color: var(--ink-dark);
}

.parts-intro-copy p {
  margin: 0;
  line-height: 1.9;
  color: var(--muted);
  font-weight: 700;
}

.parts-sequence-hint {
  font-size: 0.98rem;
}

.parts-card--nouns .parts-card-media {
  min-height: 520px;
}

.parts-card--nouns .parts-card-media img {
  max-width: 720px;
  max-height: 560px;
  object-fit: contain;
}

.parts-card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(74, 144, 226, 0.14);
  color: #2769da;
  font-size: 0.84rem;
  font-weight: 800;
}

.parts-card h3 {
  margin: 12px 0 6px;
  font-size: 1.45rem;
  color: var(--ink-dark);
}

.parts-card-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.parts-card-meta span {
  font-size: 0.86rem;
  font-weight: 800;
  color: #5d7fae;
}

.parts-card-meta strong {
  color: var(--ink-dark);
  font-size: 1.02rem;
}

.parts-card-meta small {
  color: var(--muted);
  font-size: 0.94rem;
}

.parts-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.parts-card--single .parts-card-media {
  min-height: 580px;
  padding: 28px;
}

.parts-card--single .parts-card-media img {
  max-width: 820px;
  max-height: 640px;
  object-fit: contain;
}

.parts-card--single .parts-card-copy {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.parts-card-audio-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.parts-card-audio-groups {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.parts-card-audio-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.parts-card-nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.parts-card-nav-actions .mini-btn {
  min-width: 170px;
  padding: 14px 24px;
}

.parts-card-actions .mini-btn {
  min-width: 140px;
}

.parts-order-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.parts-practice-shell {
  display: grid;
  gap: 22px;
}

.parts-practice-card {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 255, 0.9));
  border: 1px solid rgba(215, 229, 255, 0.72);
  box-shadow: 0 18px 38px rgba(87, 139, 255, 0.1);
  text-align: center;
}

.parts-practice-card h2 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--ink-dark);
}

.parts-practice-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.9;
}

.parts-practice-media {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}

.parts-practice-media img {
  display: block;
  width: 100%;
  max-width: 780px;
  max-height: 560px;
  object-fit: contain;
}

.parts-intro-examples,
.parts-card-example-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.parts-card-paired-shell {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.parts-card-adjective-shell {
  display: grid;
  gap: 18px;
}

.parts-card-adjective-media {
  position: relative;
  width: min(100%, 420px);
  margin-inline: auto;
  aspect-ratio: 1 / 1;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(236, 246, 255, 0.92), rgba(255, 247, 229, 0.92));
  display: grid;
  place-items: center;
}

.parts-card-adjective-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.85);
}

.parts-card-adjective-examples {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.parts-card-paired-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(210, 226, 255, 0.7);
  box-shadow: 0 14px 28px rgba(87, 139, 255, 0.08);
}

.parts-card-paired-media {
  position: relative;
  min-height: 260px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(236, 246, 255, 0.92), rgba(255, 247, 229, 0.92));
}

.parts-card-paired-frame {
  min-height: 220px;
  height: 100%;
  overflow: hidden;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: rgba(255, 255, 255, 0.85);
}

.parts-card-paired-frame img {
  width: 200%;
  max-width: none;
  max-height: none;
  height: auto;
  display: block;
}

.parts-card-paired-frame--left img {
  transform: translateX(0);
}

.parts-card-paired-frame--right img {
  transform: translateX(-50%);
}

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

.parts-intro-examples p,
.parts-card-example-list span,
.parts-card-example-item small {
  margin: 0;
}

.parts-intro-examples p,
.parts-card-example-item {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
}

.parts-card-example-item {
  display: grid;
  gap: 12px;
}

.parts-card-example-item--paired {
  align-content: start;
}

.parts-card-example-item strong {
  color: var(--ink-dark);
  font-size: 1.08rem;
}

.parts-card-example-word,
.parts-card-example-sentence {
  display: grid;
  gap: 8px;
}

.parts-card-example-word--top {
  gap: 12px;
}

.parts-card-example-word strong {
  font-size: 1.16rem;
}

.parts-card-example-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.parts-card-example-actions--split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.parts-card-example-sentence {
  gap: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(87, 139, 255, 0.18);
}

.parts-card-example-actions .mini-btn {
  min-width: 150px;
}

.parts-practice-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.parts-result-modal {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(19, 37, 66, 0.38);
}

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

.parts-result-card {
  width: min(420px, 100%);
  padding: 26px;
  border-radius: 30px;
  text-align: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 250, 255, 0.96));
  box-shadow: 0 24px 48px rgba(55, 96, 168, 0.18);
}

.parts-result-card strong {
  display: block;
  font-size: 1.5rem;
  color: var(--ink-dark);
}

.parts-result-card p {
  margin: 10px 0 18px;
  color: var(--muted);
}

.parts-game-progress {
  max-width: 920px;
  margin: 0 auto 18px;
  display: grid;
  gap: 10px;
}

.parts-game-progress-bar {
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(205, 225, 255, 0.8);
}

.parts-game-progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4d92ff, #ffae69);
  transition: width 220ms ease;
}

.parts-game-progress strong {
  color: var(--ink-dark);
  font-size: 1rem;
}

.parts-game-card {
  max-width: 920px;
  margin: 0 auto;
  padding: 30px;
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 255, 0.92));
  border: 1px solid rgba(215, 229, 255, 0.72);
  box-shadow: 0 18px 38px rgba(87, 139, 255, 0.1);
  display: grid;
  gap: 20px;
}

.parts-game-media {
  display: flex;
  justify-content: center;
}

.parts-game-media img {
  width: 100%;
  max-width: 360px;
  max-height: 250px;
  object-fit: contain;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.84);
  padding: 14px;
}

.parts-game-copy {
  display: grid;
  gap: 10px;
  text-align: center;
}

.parts-game-copy h3 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  color: var(--ink-dark);
}

.parts-game-copy p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.9;
}

.parts-game-pattern {
  display: inline-flex;
  margin: 0 auto;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(77, 146, 255, 0.1);
  color: var(--ink-dark);
  font-weight: 700;
}

.parts-game-answer,
.parts-game-word-bank {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  min-height: 88px;
}

.parts-chip {
  border: none;
  border-radius: 18px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(234, 243, 255, 0.96));
  color: var(--ink-dark);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(87, 139, 255, 0.1);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.parts-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 26px rgba(87, 139, 255, 0.14);
}

.parts-chip--selected {
  background: linear-gradient(135deg, #4d92ff, #ffae69);
  color: #fff;
}

.parts-game-placeholder {
  color: var(--muted);
  font-weight: 700;
  align-self: center;
}

.parts-game-feedback {
  min-height: 30px;
  margin: 0;
  text-align: center;
  font-weight: 800;
}

.parts-game-feedback--success {
  color: #168d52;
}

.parts-game-feedback--error {
  color: #d94b5b;
}

@media (max-width: 1080px) {
  .parts-shell,
  .parts-order-board,
  .parts-sentence-examples,
  .parts-grid,
  .parts-card-paired-shell {
    grid-template-columns: 1fr;
  }

  .parts-intro-card,
  .parts-card--single {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .parts-shell,
  .parts-card,
  .parts-example-card {
    padding: 18px;
  }

  .parts-card-audio-actions,
  .parts-card-nav-actions {
    flex-direction: column;
  }

  .parts-card-example-actions {
    flex-direction: column;
  }

  .parts-card-audio-group,
  .parts-card-example-actions--split {
    grid-template-columns: 1fr;
  }

  .parts-card-example-pairs {
    grid-template-columns: 1fr;
  }

  .parts-card-adjective-examples,
  .parts-card-paired-shell {
    grid-template-columns: 1fr;
  }

  .parts-game-card {
    padding: 20px;
  }

  .parts-card-audio-actions .mini-btn,
  .parts-card-audio-group .mini-btn,
  .parts-card-example-actions--split .mini-btn,
.parts-card-example-actions .mini-btn,
.parts-card-nav-actions .mini-btn,
.parts-card-actions .mini-btn {
  width: 100%;
}

.parts-practice-actions .btn,
.parts-practice-actions .mini-btn {
  width: 100%;
}
}

/* 2026-04-16 unified fullscreen HUD style for selected games */
:is(.places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body, .build-home-page-body, .shape-sentence-page-body) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04)),
    url("images/game word background.webp") center center / cover no-repeat fixed !important;
}

:is(.places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body, .build-home-page-body, .shape-sentence-page-body)::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.34), transparent 24%),
    radial-gradient(circle at 84% 12%, rgba(255, 255, 255, 0.26), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

:is(.places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body, .build-home-page-body, .shape-sentence-page-body) .topbar-inner,
:is(.places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body, .build-home-page-body, .shape-sentence-page-body) .container {
  width: min(1720px, 98vw);
}

:is(.places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-main,
.build-home-page-body .build-home-main,
.shape-sentence-page-body .shape-game-main {
  padding-top: 0.4rem;
  padding-bottom: 1.5rem;
}

:is(.places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-shell,
.build-home-page-body .build-home-shell,
.shape-sentence-page-body .shape-game-board-shell {
  gap: 0.85rem;
}

:is(.places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-status,
:is(.places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-stage,
:is(.places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-notebook,
.build-home-page-body .build-home-mission,
.build-home-page-body .build-home-stage,
.build-home-page-body .build-home-wordbook,
.build-home-page-body .build-home-tray,
.shape-sentence-page-body .shape-game-status,
.shape-sentence-page-body .shape-game-card,
.shape-sentence-page-body .shape-game-finish {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

:is(.places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-status::before,
:is(.places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-stage::before,
:is(.places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-notebook::before,
.build-home-page-body .build-home-mission::before,
.build-home-page-body .build-home-stage::before,
.build-home-page-body .build-home-wordbook::before,
.build-home-page-body .build-home-tray::before,
.shape-sentence-page-body .shape-game-status::before,
.shape-sentence-page-body .shape-game-card::before,
.shape-sentence-page-body .shape-game-finish::before,
.shape-sentence-page-body .shape-game-copy,
.shape-sentence-page-body .shape-game-side,
.shape-sentence-page-body .shape-guide-card,
.shape-sentence-page-body .shape-game-copy::before,
.shape-sentence-page-body .shape-game-side::before,
.shape-sentence-page-body .shape-guide-card::before {
  display: none !important;
}

:is(.places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-status-actions .btn,
:is(.places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .place-game-mic-wrap .btn,
.build-home-page-body .build-home-mission-actions .btn,
.shape-sentence-page-body .shape-game-restart {
  min-height: 56px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84) !important;
  border: 1px solid rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 12px 24px rgba(32, 80, 137, 0.08) !important;
  color: #17375d !important;
  font-weight: 800;
}

:is(.places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-stat-pill,
.build-home-page-body .build-home-stat-pill,
.shape-sentence-page-body .shape-game-stat-pill {
  min-height: 88px;
  padding: 0.95rem 1rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.84) !important;
  border: 1px solid rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 12px 24px rgba(32, 80, 137, 0.08) !important;
}

:is(.places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-stat-pill span,
.build-home-page-body .build-home-stat-pill span,
.shape-sentence-page-body .shape-game-stat-pill span {
  font-size: 1rem;
  color: #557191;
  font-weight: 800;
}

:is(.places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-stat-pill strong,
.build-home-page-body .build-home-stat-pill strong,
.shape-sentence-page-body .shape-game-stat-pill strong {
  font-size: 1.32rem;
  color: #17375d;
  font-weight: 900;
}

:is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) .animal-game-stats-row,
.hobbies-game-body .hobby-game-stats-row {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.build-home-page-body .build-home-stats-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.shape-sentence-page-body .shape-game-progress-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

:is(.places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-board-grid {
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

:is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) .animal-game-stage {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  grid-template-areas:
    "head head"
    "image prompt"
    "image transcript"
    "image feedback";
  column-gap: 1.2rem;
  row-gap: 0.8rem;
  padding: 0;
}

:is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) .animal-game-stage-head {
  grid-area: head;
}

:is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) .animal-game-image-frame {
  grid-area: image;
  min-height: 250px;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

:is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) .animal-game-image-frame img {
  width: min(100%, 360px);
  filter: drop-shadow(0 18px 24px rgba(32, 80, 137, 0.12));
}

:is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) .animal-game-prompt-card {
  grid-area: prompt;
}

:is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) .animal-game-transcript-card {
  grid-area: transcript;
}

:is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) .animal-game-prompt-card,
:is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) .animal-game-transcript-card,
:is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) .animal-game-feedback,
:is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) .animal-game-notebook-empty,
:is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) .animal-game-learned-card,
.build-home-page-body .build-home-feedback,
.build-home-page-body .build-home-word-empty,
.build-home-page-body .build-home-word-card,
.build-home-page-body .build-home-choice,
.build-home-page-body .build-home-slot,
.shape-sentence-page-body .shape-game-feedback,
.shape-sentence-page-body .shape-option-btn,
.shape-sentence-page-body .shape-game-translation,
.shape-sentence-page-body .shape-progress-dot {
  background: rgba(255, 255, 255, 0.82) !important;
  border: 1px solid rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 12px 24px rgba(32, 80, 137, 0.08) !important;
}

:is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) .animal-game-feedback {
  grid-area: feedback;
  min-height: auto;
  padding: 0.95rem 1rem;
  border-radius: 22px;
}

:is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) .animal-game-notebook {
  padding: 0;
}

:is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) .animal-game-notebook-head {
  margin-bottom: 0.35rem;
}

:is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) .animal-game-learned-list {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

:is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) .animal-game-learned-card {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  padding: 0.35rem;
}

:is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) .animal-game-notebook-head h3,
.hobbies-game-body .hobby-card-word-button strong,
.build-home-page-body .build-home-wordbook-head h3,
.build-home-page-body .build-home-mission-top h2,
.shape-sentence-page-body .shape-game-status-top h2,
.shape-sentence-page-body .shape-game-sentence {
  color: #17375d;
}

:is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) .animal-game-sentence,
:is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) .animal-game-stage-head h3,
.build-home-page-body .build-home-prompt,
.shape-sentence-page-body .shape-game-sentence {
  font-size: clamp(1.55rem, 3.2vw, 2.3rem);
  line-height: 1.35;
}

:is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) .animal-game-translation,
:is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) .animal-game-feedback,
:is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) #placeGameTranscript,
:is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) #transportGameTranscript,
:is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) #foodGameTranscript,
:is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) #bodyGameTranscript,
.build-home-page-body .build-home-feedback,
.build-home-page-body .build-home-translation,
.shape-sentence-page-body .shape-game-feedback,
.shape-sentence-page-body .shape-game-translation {
  font-size: 1.05rem;
  font-weight: 800;
  color: #4b6987;
}

.hobbies-game-body .hobby-game-shell {
  gap: 0.85rem;
}

.hobbies-game-body .hobby-game-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.hobbies-game-body .hobby-card {
  padding: 0.8rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.66) !important;
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 14px 28px rgba(32, 80, 137, 0.08) !important;
}

.hobbies-game-body .hobby-card-image-frame {
  background: transparent;
  box-shadow: none;
}

.hobbies-game-body .hobby-card-word-button strong {
  font-size: 1.2rem;
}

.hobbies-game-body .hobby-card-word-button span,
.hobbies-game-body .hobby-card-feedback,
.hobbies-game-body .hobby-card-sentence {
  font-size: 0.96rem;
  font-weight: 800;
}

.build-home-page-body .build-home-play-section {
  padding-top: 0.35rem;
}

.build-home-page-body .build-home-board-grid {
  grid-template-columns: 1fr;
  gap: 1rem;
}

.build-home-page-body .build-home-stage-layout {
  grid-template-columns: minmax(0, 1.16fr) minmax(340px, 0.84fr);
  gap: 1.2rem;
}

.build-home-page-body .build-home-house-scene {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.build-home-page-body .build-home-house-scene img {
  filter: drop-shadow(0 18px 24px rgba(32, 80, 137, 0.12));
}

.build-home-page-body .build-home-wordbook-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.build-home-page-body .build-home-choice-grid {
  grid-template-columns: 1fr;
}

.build-home-page-body .build-home-choice img {
  filter: drop-shadow(0 10px 20px rgba(32, 80, 137, 0.12));
}

.shape-sentence-page-body .shape-game-hero,
.shape-sentence-page-body #shape-game-guide {
  display: none !important;
}

.shape-sentence-page-body .shape-game-board-shell {
  min-height: calc(100vh - 168px);
  align-content: start;
}

.shape-sentence-page-body .shape-game-status {
  padding: 0;
}

.shape-sentence-page-body .shape-game-card {
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr);
  gap: 1rem;
  padding: 0;
}

.shape-sentence-page-body .shape-game-image-wrap {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.shape-sentence-page-body .shape-game-image-wrap img {
  width: min(100%, 350px);
  margin-inline: auto;
  filter: drop-shadow(0 18px 24px rgba(32, 80, 137, 0.12));
}

.shape-sentence-page-body .shape-game-content {
  gap: 0.8rem;
}

.shape-sentence-page-body .shape-game-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1180px) {
  :is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) .animal-game-stage,
  .build-home-page-body .build-home-board-grid,
  .shape-sentence-page-body .shape-game-card {
    grid-template-columns: 1fr;
    grid-template-areas: none;
  }

  .build-home-stage-layout {
    grid-template-columns: 1fr;
  }

  :is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) .animal-game-stats-row,
  .hobbies-game-body .hobby-game-stats-row,
  .build-home-page-body .build-home-stats-row,
  .shape-sentence-page-body .shape-game-progress-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hobbies-game-body .hobby-game-grid,
  .build-home-page-body .build-home-wordbook-list,
  .build-home-page-body .build-home-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  :is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) .animal-game-stats-row,
  .hobbies-game-body .hobby-game-stats-row,
  .build-home-page-body .build-home-stats-row,
  .shape-sentence-page-body .shape-game-progress-row,
  .hobbies-game-body .hobby-game-grid,
  .build-home-page-body .build-home-wordbook-list,
  .build-home-page-body .build-home-choice-grid,
  .shape-sentence-page-body .shape-game-options,
  :is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) .animal-game-learned-list {
    grid-template-columns: 1fr;
  }

  .build-home-stage-layout {
    grid-template-columns: 1fr;
  }
}

.shape-sentence-page-body {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(255, 248, 226, 0.16), rgba(230, 241, 255, 0.12)),
    url("images/shape-game/background.webp?v=20260414bg1") center / cover no-repeat fixed;
}

.shape-game-main {
  padding-bottom: 5rem;
}

.shape-game-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.9fr);
  gap: 1.5rem;
  align-items: stretch;
}

.shape-game-copy,
.shape-game-side,
.shape-game-status,
.shape-game-card,
.shape-game-finish,
.shape-guide-card {
  position: relative;
  overflow: hidden;
}

.shape-game-copy::before,
.shape-game-side::before,
.shape-game-status::before,
.shape-game-card::before,
.shape-game-finish::before,
.shape-guide-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(122, 195, 255, 0.22), transparent 38%),
    radial-gradient(circle at bottom left, rgba(255, 190, 131, 0.22), transparent 34%);
  pointer-events: none;
}

.shape-game-copy,
.shape-game-side,
.shape-guide-card,
.shape-game-status,
.shape-game-card,
.shape-game-finish {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(22px);
  box-shadow: 0 24px 48px rgba(49, 73, 120, 0.14);
}

.shape-mini-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1rem 0 1.1rem;
}

.shape-mini-preview span {
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(94, 139, 255, 0.12);
  font-weight: 700;
  color: #1f3b63;
  box-shadow: 0 12px 24px rgba(57, 85, 138, 0.08);
}

.shape-game-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.shape-guide-card {
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(87, 125, 230, 0.12);
  box-shadow: 0 20px 40px rgba(50, 72, 120, 0.12);
}

.shape-guide-number {
  inline-size: 2.5rem;
  block-size: 2.5rem;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #4b8df8, #ff9d5c);
  color: #fff;
  font-weight: 800;
  margin-bottom: 1rem;
}

.shape-guide-card h3 {
  margin: 0 0 0.55rem;
  color: #183453;
}

.shape-guide-card p {
  margin: 0;
  color: #5b6f89;
  line-height: 1.8;
}

.shape-game-board-shell {
  display: grid;
  gap: 1.25rem;
}

.shape-game-status {
  border-radius: 30px;
}

.shape-game-status-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.shape-game-status-top h2 {
  margin: 0.3rem 0 0;
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  color: #173356;
}

.shape-game-progress-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1.1rem;
}

.shape-game-stat-pill {
  padding: 0.95rem 1.1rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(87, 125, 230, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  display: grid;
  gap: 0.3rem;
}

.shape-game-stat-pill span {
  color: #6c7f97;
  font-size: 0.95rem;
}

.shape-game-stat-pill strong {
  color: #173356;
  font-size: 1.12rem;
}

.shape-game-progress-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.shape-progress-dot {
  inline-size: 2rem;
  block-size: 2rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
  color: #62758d;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(79, 113, 207, 0.14);
}

.shape-progress-dot.is-active {
  color: #fff;
  background: linear-gradient(135deg, #4d88ff, #ff9959);
  box-shadow: 0 14px 30px rgba(77, 136, 255, 0.22);
}

.shape-progress-dot.is-complete {
  color: #0c6a3b;
  background: rgba(112, 221, 167, 0.22);
  border-color: rgba(70, 177, 124, 0.25);
}

.shape-game-card,
.shape-game-finish {
  border-radius: 34px;
  display: grid;
  gap: 1.35rem;
}

.shape-game-card {
  grid-template-columns: minmax(320px, 0.98fr) minmax(0, 1fr);
  align-items: start;
}

.shape-game-image-wrap {
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(244, 247, 255, 0.42));
  border: 1px solid rgba(76, 114, 215, 0.14);
  box-shadow: 0 24px 50px rgba(60, 84, 136, 0.12);
}

.shape-game-image-wrap img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.shape-game-content {
  display: grid;
  gap: 0.95rem;
}

#shapeGameCounter {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

#shapeGamePromptPreview,
.shape-game-sentence,
.shape-option-btn {
  direction: ltr;
  unicode-bidi: isolate;
}

#shapeGamePromptPreview,
.shape-game-sentence {
  text-align: left;
}

.shape-game-translation {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  width: fit-content;
  border-radius: 999px;
  background: rgba(77, 136, 255, 0.1);
  color: #315999;
  font-weight: 700;
}

.shape-game-sentence {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.3rem);
  line-height: 1.45;
  color: #163455;
}

.shape-game-feedback {
  margin: 0;
  min-height: 1.75rem;
  color: #687b94;
  font-weight: 600;
}

.shape-game-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  direction: ltr;
}

.shape-option-btn {
  appearance: none;
  border: 0;
  border-radius: 24px;
  padding: 1rem 0.9rem;
  font: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  color: #1a3557;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 18px 36px rgba(50, 75, 124, 0.12);
  border: 1px solid rgba(88, 122, 226, 0.14);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

.shape-option-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 48px rgba(50, 75, 124, 0.16);
}

.shape-option-btn:disabled {
  cursor: default;
}

.shape-option-btn.is-correct {
  color: #fff;
  background: linear-gradient(135deg, #38b56f, #7fe09f);
  box-shadow: 0 22px 42px rgba(56, 181, 111, 0.28);
}

.shape-option-btn.is-wrong {
  color: #fff;
  background: linear-gradient(135deg, #eb546d, #ff9f94);
  box-shadow: 0 20px 40px rgba(235, 84, 109, 0.28);
  animation: shapeWrongShake 420ms ease;
}

.shape-game-finish {
  text-align: center;
  justify-items: center;
}

.shape-game-finish-stars {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  color: #ffbe32;
  font-size: 1.6rem;
}

.shape-game-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: rgba(10, 26, 46, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.shape-game-popup-backdrop[hidden] {
  display: none !important;
}

.shape-game-popup {
  width: min(100%, 520px);
  border-radius: 34px;
  padding: 1.7rem 1.5rem;
  text-align: center;
  box-shadow: 0 28px 64px rgba(17, 41, 81, 0.25);
}

.shape-game-popup-stars {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  color: #ffbe32;
  font-size: 1.65rem;
}

.shape-game-popup h2 {
  margin: 0 0 0.65rem;
  color: #173356;
}

.shape-game-popup p {
  margin: 0;
}

.shape-game-popup .hero-actions {
  justify-content: center;
  margin-top: 0.95rem;
}

.shape-game-popup-button {
  margin-top: 0 !important;
}

@keyframes shapeWrongShake {
  0%,
  100% { transform: translateX(0); }
  25% { transform: translateX(5px); }
  50% { transform: translateX(-5px); }
  75% { transform: translateX(3px); }
}

@media (max-width: 980px) {
  .shape-game-shell,
  .shape-game-guide-grid,
  .shape-game-progress-row,
  .shape-game-options,
  .shape-game-card {
    grid-template-columns: 1fr;
  }

  .shape-game-status-top {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .shape-game-copy,
  .shape-game-side,
  .shape-guide-card,
  .shape-game-status,
  .shape-game-card,
  .shape-game-finish {
    padding: 1.15rem;
  }

  .shape-progress-dot {
    inline-size: 1.8rem;
    block-size: 1.8rem;
    font-size: 0.8rem;
  }
}

.build-home-page-body {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(255, 249, 236, 0.22), rgba(231, 243, 255, 0.18)),
    url("images/build-home-game/background.webp?v=20260414bg2") center / cover no-repeat fixed;
}

.build-home-main {
  padding-top: 1rem;
  padding-bottom: 5rem;
}

.build-home-play-section {
  padding-top: 1rem;
}

.build-home-hero-shell,
.build-home-board-grid,
.build-home-stats-row,
.build-home-choice-grid,
.build-home-slot-grid,
.build-home-guide-grid {
  display: grid;
}

.build-home-hero-shell {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.86fr);
  gap: 1.5rem;
  align-items: stretch;
}

.build-home-copy,
.build-home-preview,
.build-home-mission,
.build-home-stage,
.build-home-wordbook,
.build-home-tray,
.build-home-popup,
.build-home-guide-card {
  position: relative;
  overflow: hidden;
  padding: 1.55rem;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(22px);
  box-shadow: 0 24px 50px rgba(43, 72, 117, 0.14);
}

.build-home-copy::before,
.build-home-preview::before,
.build-home-mission::before,
.build-home-stage::before,
.build-home-wordbook::before,
.build-home-tray::before,
.build-home-popup::before,
.build-home-guide-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(123, 194, 255, 0.2), transparent 38%),
    radial-gradient(circle at bottom left, rgba(255, 193, 118, 0.22), transparent 34%);
  pointer-events: none;
}

.build-home-preview-house {
  margin-top: 1rem;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(82, 120, 219, 0.14);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.64), rgba(241, 247, 255, 0.5));
  box-shadow: 0 24px 54px rgba(51, 76, 120, 0.14);
}

.build-home-preview-house img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.build-home-preview-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.build-home-preview-chip {
  padding: 0.56rem 0.94rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(83, 122, 219, 0.12);
  color: #204067;
  font-weight: 800;
  box-shadow: 0 16px 30px rgba(45, 70, 118, 0.08);
}

.build-home-preview-chip.is-current {
  color: #fff;
  background: linear-gradient(135deg, #4d88ff, #ff9d5b);
  box-shadow: 0 18px 32px rgba(77, 136, 255, 0.22);
}

.build-home-preview-chip.is-complete {
  color: #0b6f45;
  background: rgba(116, 226, 175, 0.24);
  border-color: rgba(62, 182, 117, 0.24);
}

.build-home-guide-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.build-home-guide-card {
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(88, 122, 226, 0.12);
  box-shadow: 0 22px 46px rgba(47, 70, 114, 0.12);
}

.build-home-guide-number {
  inline-size: 2.65rem;
  block-size: 2.65rem;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  margin-bottom: 0.95rem;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, #4d88ff, #ff9b59);
}

.build-home-guide-card h3 {
  margin: 0 0 0.55rem;
  color: #173457;
}

.build-home-guide-card p {
  margin: 0;
  line-height: 1.8;
  color: #5f728a;
}

.build-home-shell {
  display: grid;
  gap: 1.3rem;
}

.build-home-stage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(340px, 0.84fr);
  gap: 1.2rem;
  align-items: start;
}

.build-home-stage-main {
  display: grid;
  gap: 1rem;
}

.build-home-mission,
.build-home-stage,
.build-home-wordbook,
.build-home-tray,
.build-home-popup {
  border-radius: 34px;
}

.build-home-mission-top,
.build-home-wordbook-head,
.build-home-tray-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.build-home-mission-top h2,
.build-home-wordbook-head h3,
.build-home-tray-head h3 {
  margin: 0.35rem 0 0;
  color: #173457;
}

.build-home-mission-top h2 {
  font-size: clamp(2rem, 3.2vw, 2.7rem);
}

.build-home-mission-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.build-home-stats-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.build-home-stat-pill {
  padding: 0.95rem 1.05rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(86, 121, 223, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  display: grid;
  gap: 0.25rem;
}

.build-home-stat-pill span {
  color: #6b7d94;
  font-size: 0.95rem;
}

.build-home-stat-pill strong {
  color: #173457;
  font-size: 1.15rem;
  direction: ltr;
  unicode-bidi: isolate;
}

.build-home-prompt {
  margin: 1rem 0 0;
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  color: #173457;
  text-align: left;
}

.build-home-translation {
  margin: 0.6rem 0 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.58rem 1rem;
  width: fit-content;
  border-radius: 999px;
  background: rgba(77, 136, 255, 0.1);
  color: #315999;
  font-weight: 700;
}

.build-home-feedback {
  margin: 0.95rem 0 0;
  min-height: 1.7rem;
  color: #5f728a;
  font-weight: 700;
  font-size: 1.08rem;
}

.build-home-board-grid {
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.build-home-house-scene {
  border-radius: 30px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(244, 247, 255, 0.48));
  border: 1px solid rgba(83, 120, 216, 0.14);
  box-shadow: 0 24px 48px rgba(49, 72, 115, 0.12);
}

.build-home-house-scene img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.build-home-slot-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.build-home-slot {
  min-height: 192px;
  border-radius: 28px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(88, 124, 224, 0.12);
  box-shadow: 0 18px 34px rgba(48, 73, 118, 0.1);
  display: grid;
  gap: 0.8rem;
  align-content: start;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.build-home-slot.is-current {
  border-color: rgba(77, 136, 255, 0.42);
  box-shadow: 0 22px 40px rgba(77, 136, 255, 0.18);
  animation: buildHomePulse 1.6s ease-in-out infinite;
}

.build-home-slot.is-complete {
  border-color: rgba(66, 184, 124, 0.28);
  box-shadow: 0 22px 40px rgba(66, 184, 124, 0.14);
}

.build-home-slot-visual {
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(245, 248, 255, 0.66), rgba(255, 255, 255, 0.54));
  min-height: 108px;
  display: grid;
  place-items: center;
}

.build-home-slot-visual img {
  display: block;
  width: 100%;
  height: 108px;
  object-fit: cover;
}

.build-home-slot-placeholder {
  padding: 0.8rem;
  text-align: center;
  color: #6b7d94;
  font-weight: 700;
  line-height: 1.6;
}

.build-home-slot-body {
  display: grid;
  gap: 0.25rem;
}

.build-home-slot-body strong {
  color: #173457;
  font-size: 1.08rem;
}

.build-home-slot-body span {
  color: #4d6fa4;
  font-size: 1rem;
  font-weight: 800;
}

.build-home-wordbook-text {
  margin: 0.35rem 0 0;
  color: #60728a;
  line-height: 1.7;
  font-size: 1rem;
}

.build-home-wordbook-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.build-home-word-empty {
  padding: 1rem 1.1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.44);
  color: #60728a;
  text-align: center;
  font-weight: 700;
  grid-column: 1 / -1;
  font-size: 1.05rem;
}

.build-home-word-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.8rem;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(86, 122, 224, 0.12);
  box-shadow: 0 16px 30px rgba(45, 67, 110, 0.1);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.build-home-word-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(45, 67, 110, 0.14);
}

.build-home-word-card img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 18px;
}

.build-home-word-card strong {
  display: block;
  color: #173457;
  font-size: 1rem;
}

.build-home-word-card span {
  display: block;
  color: #4d6fa4;
  font-weight: 700;
  margin-top: 0.2rem;
  font-size: 0.96rem;
}

.build-home-word-card p {
  margin: 0.35rem 0 0;
  color: #60728a;
  line-height: 1.5;
  font-size: 0.92rem;
}

.build-home-tray-head p {
  margin: 0;
  color: #60728a;
  line-height: 1.7;
  max-width: 360px;
  font-size: 1rem;
}

.build-home-choice-grid {
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-top: 0.85rem;
}

.build-home-choice {
  appearance: none;
  border: 0;
  padding: 0.8rem;
  border-radius: 28px;
  text-align: start;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(85, 121, 224, 0.14);
  box-shadow: 0 20px 40px rgba(49, 72, 116, 0.11);
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
  cursor: grab;
}

.build-home-choice:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 46px rgba(49, 72, 116, 0.15);
}

.build-home-choice.is-selected {
  border-color: rgba(77, 136, 255, 0.42);
  box-shadow: 0 24px 46px rgba(77, 136, 255, 0.18);
}

.build-home-choice.is-dragging {
  opacity: 0.7;
  transform: scale(0.98);
}

.build-home-choice.is-correct {
  background: linear-gradient(135deg, #39b86f, #7de0a0);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 26px 52px rgba(57, 184, 111, 0.26);
}

.build-home-choice.is-wrong {
  background: linear-gradient(135deg, #eb556d, #ff9e95);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 24px 48px rgba(235, 85, 109, 0.26);
  animation: buildHomeWrongShake 420ms ease;
}

.build-home-choice img {
  display: block;
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 22px;
}

.build-home-choice strong,
.build-home-choice span {
  display: block;
}

.build-home-choice strong {
  color: inherit;
  font-size: 1.12rem;
}

.build-home-choice span {
  color: inherit;
  opacity: 0.82;
  font-weight: 700;
  font-size: 0.98rem;
}

.build-home-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: rgba(10, 26, 46, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.build-home-popup-backdrop[hidden] {
  display: none !important;
}

.build-home-popup {
  width: min(100%, 560px);
  text-align: center;
  box-shadow: 0 28px 64px rgba(15, 38, 77, 0.26);
}

.build-home-popup-stars {
  font-size: 0;
  margin-bottom: 0.8rem;
}

.build-home-popup-stars::before {
  content: "★★★★★";
  font-size: 1.7rem;
  letter-spacing: 0.35rem;
  color: #ffbf2f;
}

.build-home-popup h2 {
  margin: 0 0 0.7rem;
  color: #173457;
}

.build-home-popup p {
  margin: 0;
  color: #5f728a;
  line-height: 1.85;
}

@keyframes buildHomePulse {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes buildHomeWrongShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(5px); }
  50% { transform: translateX(-5px); }
  75% { transform: translateX(3px); }
}

@media (max-width: 1100px) {
  .build-home-board-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .build-home-hero-shell,
  .build-home-guide-grid,
  .build-home-stats-row,
  .build-home-choice-grid,
  .build-home-slot-grid {
    grid-template-columns: 1fr;
  }

  .build-home-mission-top,
  .build-home-wordbook-head,
  .build-home-tray-head {
    flex-direction: column;
    align-items: stretch;
  }

  .build-home-word-card {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .build-home-word-card img {
    width: 72px;
    height: 72px;
  }
}

@media (max-width: 640px) {
  .build-home-copy,
  .build-home-preview,
  .build-home-mission,
  .build-home-stage,
  .build-home-wordbook,
  .build-home-tray,
  .build-home-popup,
  .build-home-guide-card {
    padding: 1.15rem;
  }

  .build-home-slot {
    min-height: 160px;
  }

  .build-home-slot-visual img {
    height: 92px;
  }
}

.animal-sound-game-body {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    url("images/match-word-picture-background.webp?v=20260416animalbg1") center top / cover no-repeat fixed;
}

.number-game-body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    url("images/let's count from 1-20.webp") center center / cover no-repeat fixed;
}

.number-game-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.34), transparent 24%),
    radial-gradient(circle at 84% 12%, rgba(255, 255, 255, 0.28), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.places-game-body {
  background:
    linear-gradient(135deg, rgba(255, 248, 229, 0.18), rgba(230, 243, 255, 0.16)),
    url("images/places-speaking-game/background.webp?v=20260414bg1") center / cover no-repeat fixed;
}

.transport-game-body {
  background:
    linear-gradient(135deg, rgba(255, 247, 226, 0.18), rgba(229, 242, 255, 0.16)),
    url("images/transport-speaking-game/background.webp?v=20260414bg1") center / cover no-repeat fixed;
}

.food-game-body {
  background:
    linear-gradient(135deg, rgba(255, 247, 225, 0.18), rgba(255, 238, 244, 0.16)),
    url("images/food-speaking-game/background.webp?v=20260414bg1") center / cover no-repeat fixed;
}

.hobbies-game-body {
  background:
    linear-gradient(135deg, rgba(255, 248, 228, 0.18), rgba(231, 243, 255, 0.16)),
    url("images/hobbies-speaking-game/background.webp?v=20260414bg1") center / cover no-repeat fixed;
}

.body-parts-game-body {
  background:
    linear-gradient(135deg, rgba(255, 247, 226, 0.18), rgba(229, 243, 255, 0.16)),
    url("images/body-parts-speaking-game/background.webp?v=20260414bg1") center / cover no-repeat fixed;
}

.animal-game-main {
  padding-bottom: 2.4rem;
  padding-top: 0.45rem;
}

.animal-game-section {
  padding-top: 0.4rem;
}

.animal-sound-game-body .container {
  width: min(1560px, 96vw);
}

.animal-game-hero-shell,
.animal-game-guide-grid,
.animal-game-stats-row,
.animal-game-board-grid,
.animal-game-choice-grid {
  display: grid;
}

.animal-game-hero-shell {
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 1.5rem;
  align-items: stretch;
}

.animal-game-copy,
.animal-game-cover,
.animal-game-status,
.animal-game-stage,
.animal-game-notebook,
.animal-game-popup,
.animal-game-guide-card {
  position: relative;
  overflow: hidden;
  padding: 1.55rem;
}

.animal-game-copy::before,
.animal-game-cover::before,
.animal-game-status::before,
.animal-game-stage::before,
.animal-game-notebook::before,
.animal-game-popup::before,
.animal-game-guide-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(122, 223, 188, 0.2), transparent 36%),
    radial-gradient(circle at bottom left, rgba(255, 191, 102, 0.22), transparent 34%);
  pointer-events: none;
}

.animal-game-cover-frame {
  margin-top: 1rem;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(76, 142, 255, 0.14);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.66), rgba(245, 249, 255, 0.52));
  box-shadow: 0 26px 54px rgba(43, 73, 124, 0.14);
}

.animal-game-cover-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.animal-game-preview-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.animal-game-preview-chip {
  padding: 0.56rem 0.94rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(88, 126, 226, 0.12);
  color: #204067;
  font-weight: 800;
  box-shadow: 0 16px 30px rgba(45, 70, 118, 0.08);
}

.animal-game-preview-chip.is-current {
  color: #fff;
  background: linear-gradient(135deg, #4d88ff, #ff9d5b);
  box-shadow: 0 18px 32px rgba(77, 136, 255, 0.22);
}

.animal-game-preview-chip.is-complete {
  color: #0a7146;
  background: rgba(114, 229, 175, 0.24);
  border-color: rgba(62, 182, 117, 0.24);
}

.animal-game-guide-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.animal-game-guide-card {
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(88, 122, 226, 0.12);
  box-shadow: 0 20px 42px rgba(47, 70, 114, 0.11);
}

.animal-game-guide-number {
  inline-size: 2.6rem;
  block-size: 2.6rem;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  margin-bottom: 0.95rem;
  background: linear-gradient(135deg, #4cb0ff, #ffad5f);
  color: #fff;
  font-weight: 800;
}

.animal-game-guide-card h3 {
  margin: 0 0 0.55rem;
  color: #183657;
}

.animal-game-guide-card p {
  margin: 0;
  color: #5f728a;
  line-height: 1.8;
}

.animal-game-shell {
  display: grid;
  gap: 1.3rem;
}

.animal-game-status,
.animal-game-stage,
.animal-game-notebook,
.animal-game-popup {
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(22px);
  box-shadow: 0 26px 48px rgba(42, 72, 118, 0.14);
}

:is(.number-game-body, .places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-copy,
:is(.number-game-body, .places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-cover,
:is(.number-game-body, .places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-status,
:is(.number-game-body, .places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-stage,
:is(.number-game-body, .places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-notebook,
:is(.number-game-body, .places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-popup,
:is(.number-game-body, .places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-guide-card {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(22px);
  box-shadow: 0 24px 48px rgba(42, 72, 118, 0.14);
}

:is(.number-game-body, .places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-cover-frame {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(245, 249, 255, 0.48));
}

:is(.number-game-body, .places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-preview-chip {
  background: rgba(255, 255, 255, 0.52);
}

:is(.number-game-body, .places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-stat-pill {
  background: rgba(255, 255, 255, 0.44);
}

:is(.number-game-body, .places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-animal-chip {
  background: rgba(255, 255, 255, 0.6);
}

:is(.number-game-body, .places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-image-frame {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.5), rgba(245, 249, 255, 0.34));
}

:is(.number-game-body, .places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-prompt-card,
:is(.number-game-body, .places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-transcript-card {
  background: rgba(255, 255, 255, 0.44);
}

:is(.number-game-body, .places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-choice {
  background: rgba(255, 255, 255, 0.54);
}

:is(.number-game-body, .places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-notebook-empty {
  background: rgba(255, 255, 255, 0.46);
}

:is(.number-game-body, .places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body) .animal-game-learned-card {
  background: rgba(255, 255, 255, 0.54);
}

.number-game-body .container {
  width: min(1700px, 97vw);
}

.number-game-body .animal-game-main {
  padding-top: 0.7rem;
  padding-bottom: 2.7rem;
}

.number-game-body .animal-game-shell {
  gap: 1rem;
}

.number-game-body .animal-game-status,
.number-game-body .animal-game-stage,
.number-game-body .animal-game-notebook,
.number-game-body .animal-game-popup {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.44);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 36px rgba(59, 95, 152, 0.1);
}

.number-game-body .animal-game-status {
  padding: 1.15rem 1.2rem;
}

.number-game-body .animal-game-stage,
.number-game-body .animal-game-notebook {
  padding: 1.15rem 1.2rem;
}

.number-game-body .animal-game-stats-row {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.number-game-body .animal-game-stat-pill,
.number-game-body .animal-game-preview-chip,
.number-game-body .animal-game-animal-chip,
.number-game-body .animal-game-prompt-card,
.number-game-body .animal-game-transcript-card,
.number-game-body .animal-game-notebook-empty,
.number-game-body .animal-game-learned-card {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 24px rgba(32, 80, 137, 0.08);
}

.number-game-body .animal-game-stat-pill span,
.number-game-body .animal-game-translation,
.number-game-body .animal-game-feedback,
.number-game-body #numberGameTranscript,
.number-game-body .animal-game-notebook-text,
.number-game-body .animal-game-choice span {
  color: #456683;
}

.number-game-body .animal-game-stat-pill strong,
.number-game-body .animal-game-sentence,
.number-game-body .animal-game-choice strong,
.number-game-body .animal-game-notebook-head h3,
.number-game-body .animal-game-status-top h2 {
  color: #17375d;
}

.number-game-body .animal-game-board-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.92fr);
  gap: clamp(18px, 2.8vw, 34px);
}

.number-game-body .animal-game-image-frame {
  min-height: 320px;
  background: transparent;
  box-shadow: none;
}

.number-game-body .animal-game-image-frame img {
  width: min(100%, 400px);
  filter: drop-shadow(0 18px 24px rgba(32, 80, 137, 0.12));
}

.number-game-body .animal-game-status-actions .btn,
.number-game-body .place-game-mic-wrap .btn {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 24px rgba(32, 80, 137, 0.08);
}

@media (max-width: 980px) {
  .number-game-body .animal-game-stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .number-game-body .animal-game-board-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .number-game-body .animal-game-stats-row {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   2026-04-17 final game alignment fixes
   ========================================================= */

body.game-layout-page .game-hud-collapsible {
  position: fixed !important;
  top: max(8px, env(safe-area-inset-top)) !important;
  left: 10px !important;
  right: auto !important;
  transform: none !important;
  z-index: 140 !important;
  inline-size: min(calc(100vw - 20px), var(--game-shell-max, 1480px)) !important;
  max-inline-size: calc(100vw - 20px) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.game-layout-page .game-hud-collapsible::before {
  display: none !important;
}

body.game-layout-page .game-hud-toggle {
  min-block-size: 36px !important;
  padding: 0.35rem 0.78rem !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.84) !important;
  border: 1px solid rgba(255, 255, 255, 0.94) !important;
  box-shadow: 0 10px 18px rgba(33, 77, 131, 0.14) !important;
  color: #214d82 !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
}

body.game-layout-page .game-hud-toggle-text {
  font-size: 0.82rem !important;
}

body.game-layout-page .game-hud-collapsible.is-expanded .game-hud-toggle {
  margin-bottom: 0.4rem !important;
}

body.game-layout-page .game-hud-collapsible.is-collapsed {
  inline-size: auto !important;
  max-inline-size: calc(100vw - 20px) !important;
}

body.game-page-hud-collapsed :is(
  .animal-game-main,
  .build-home-main,
  .clothes-game-main,
  .color-game-main,
  .days-week-game-main,
  .letter-hunt-main,
  .match-modern-main,
  .memory-main,
  .number-game-main,
  .shape-game-main,
  .time-routine-game-main,
  .word-builder-main
) {
  padding-top: max(1.4rem, calc(env(safe-area-inset-top) + 1.25rem)) !important;
}

body.game-page-hud-collapsed :is(
  .animal-game-section,
  .build-home-section,
  .clothes-game-section,
  .color-game-section,
  .days-week-game-section,
  .shape-game-section,
  .time-routine-game-section
) {
  padding-top: 0 !important;
}

.word-builder-page-body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    url("images/game word background.webp") center center / 100% 100% no-repeat !important;
  background-attachment: scroll !important;
}

.animal-sound-game-body,
.number-game-body,
.color-game-body,
.clothes-game-body,
:is(.places-game-body, .transport-game-body, .food-game-body, .hobbies-game-body, .body-parts-game-body, .build-home-page-body, .shape-sentence-page-body) {
  background-size: auto, 100% 100% !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-attachment: scroll !important;
}

.places-game-body .animal-game-stage,
.transport-game-body .animal-game-stage,
.food-game-body .animal-game-stage,
.body-parts-game-body .animal-game-stage {
  grid-template-columns: minmax(250px, 0.8fr) minmax(0, 1.2fr) !important;
  grid-template-areas:
    "image head"
    "image prompt"
    "image transcript"
    "image mic"
    "image feedback" !important;
  align-items: start;
}

.places-game-body .animal-game-stage-head,
.transport-game-body .animal-game-stage-head,
.food-game-body .animal-game-stage-head,
.body-parts-game-body .animal-game-stage-head {
  grid-area: head;
  align-self: center;
}

.places-game-body .place-game-mic-wrap,
.transport-game-body .place-game-mic-wrap,
.food-game-body .place-game-mic-wrap,
.body-parts-game-body .place-game-mic-wrap {
  grid-area: mic;
  margin: 0 !important;
}

.clothes-game-shell {
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  align-items: start;
}

.clothes-game-mission,
.clothes-game-options-panel {
  align-self: start;
}

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

body.game-layout-page.game-device-touch.game-device-landscape .clothes-game-main,
body.game-layout-page.game-device-touch.game-device-landscape .animal-game-main,
body.game-layout-page.game-device-touch.game-device-landscape .word-builder-main,
body.game-layout-page.game-device-touch.game-device-landscape .letter-hunt-main {
  padding-top: 4px !important;
  padding-bottom: 10px !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .word-builder-main,
body.game-layout-page.game-device-touch.game-device-landscape .letter-hunt-main,
body.game-layout-page.game-device-touch.game-device-landscape .animal-game-main,
body.game-layout-page.game-device-touch.game-device-landscape .clothes-game-main {
  width: calc(100vw - (var(--game-touch-gutter) * 1.2)) !important;
  max-width: none !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .animal-game-board-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(200px, 0.68fr) !important;
}

body.game-layout-page.game-device-touch.game-device-landscape :is(.places-game-body, .transport-game-body, .food-game-body, .body-parts-game-body) .animal-game-stage {
  grid-template-columns: minmax(190px, 0.74fr) minmax(0, 1.26fr) !important;
  grid-template-areas:
    "image head"
    "image prompt"
    "image transcript"
    "image mic"
    "image feedback" !important;
  row-gap: 0.55rem !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .clothes-game-shell {
  grid-template-columns: minmax(0, 0.92fr) minmax(260px, 1.08fr) !important;
  gap: 10px !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .clothes-game-status,
body.game-layout-page.game-device-touch.game-device-landscape .clothes-game-mission,
body.game-layout-page.game-device-touch.game-device-landscape .clothes-game-options-panel {
  padding: 0.72rem !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .clothes-game-options {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.55rem !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .clothes-game-bubble {
  padding: 0.8rem 0.9rem !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .clothes-game-rack {
  margin-top: 0.35rem !important;
}

@media (max-width: 980px) {
  body.game-layout-page .game-hud-collapsible {
    left: 8px !important;
    inline-size: min(calc(100vw - 16px), var(--game-shell-max, 1480px)) !important;
    max-inline-size: calc(100vw - 16px) !important;
  }

  .clothes-game-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body.game-layout-page .game-hud-collapsible {
    top: max(4px, env(safe-area-inset-top)) !important;
    left: 6px !important;
    inline-size: min(calc(100vw - 12px), var(--game-shell-max, 1480px)) !important;
    max-inline-size: calc(100vw - 12px) !important;
  }

  body.game-layout-page .game-hud-toggle {
    min-block-size: 34px !important;
    padding: 0.32rem 0.68rem !important;
    font-size: 0.78rem !important;
  }
}

.hobbies-game-body .hobby-card {
  background: rgba(255, 255, 255, 0.5);
}

.hobbies-game-body .hobby-card-image-frame {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(244, 248, 255, 0.54));
}

.animal-game-status-top,
.animal-game-notebook-head,
.animal-game-stage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.animal-game-status-top h2,
.animal-game-stage-head h3,
.animal-game-notebook-head h3 {
  margin: 0.35rem 0 0;
  color: #173457;
}

.animal-game-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.animal-game-status-actions .btn.is-listening {
  background: linear-gradient(135deg, #38b56f, #7fe09f);
  color: #fff;
  border-color: transparent;
}

.animal-game-stats-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.animal-game-stat-pill {
  padding: 0.95rem 1.05rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(86, 121, 223, 0.12);
  display: grid;
  gap: 0.25rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.animal-game-stat-pill span {
  color: #6b7d94;
  font-size: 0.95rem;
}

.animal-game-stat-pill strong {
  color: #173457;
  font-size: 1.12rem;
  direction: ltr;
  unicode-bidi: isolate;
}

.animal-game-board-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 1.45rem;
}

.animal-game-board-grid.is-single-stage {
  grid-template-columns: minmax(0, 1fr);
}

.transport-game-stage {
  max-width: 980px;
  margin-inline: auto;
}

.food-game-stage {
  max-width: 980px;
  margin-inline: auto;
}

.hobby-game-shell {
  display: grid;
  gap: 1.2rem;
}

.hobby-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.hobby-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 24px 48px rgba(23, 52, 87, 0.1);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.hobby-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(122, 223, 188, 0.18), transparent 34%),
    radial-gradient(circle at bottom left, rgba(255, 191, 102, 0.2), transparent 36%);
  pointer-events: none;
}

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

.hobby-card.is-active {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 28px 54px rgba(72, 127, 196, 0.18);
  border-color: rgba(111, 168, 255, 0.58);
}

.hobby-card.is-listening {
  border-color: rgba(74, 144, 226, 0.8);
  box-shadow: 0 30px 56px rgba(74, 144, 226, 0.22);
}

.hobby-card.is-complete {
  background: linear-gradient(180deg, rgba(235, 255, 240, 0.96), rgba(214, 249, 221, 0.98));
  border-color: rgba(76, 182, 103, 0.58);
  box-shadow: 0 30px 60px rgba(74, 181, 104, 0.18);
}

.hobby-card-image-button,
.hobby-card-word-button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.hobby-card-image-frame {
  display: block;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.hobby-card-image-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.hobby-card-body {
  display: grid;
  gap: 0.65rem;
}

.hobby-card-word-button {
  display: grid;
  gap: 0.2rem;
  text-align: center;
}

.hobby-card-word-button strong {
  font-size: 1.22rem;
  color: #173457;
}

.hobby-card-word-button span {
  color: #60728a;
  font-weight: 700;
}

.hobby-card-mic-button {
  width: 100%;
}

.hobby-card-feedback {
  min-height: 1.55rem;
  margin: 0;
  text-align: center;
  font-weight: 700;
  color: #60728a;
}

.hobby-card-feedback[data-tone="listening"] {
  color: #2f7a4e;
}

.hobby-card-feedback[data-tone="success"] {
  color: #137a45;
}

.hobby-card-feedback[data-tone="wrong"] {
  color: #cc4f66;
}

.hobby-card-sentence {
  margin: 0;
  min-height: 2.8rem;
  text-align: center;
  color: #1f5b36;
  font-weight: 800;
}

.hobby-card-sentence[hidden] {
  display: none;
}

.hobby-card-check {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #51bb6b, #7ddf92);
  color: #fff;
  font-size: 1.3rem;
  font-weight: 900;
  box-shadow: 0 16px 26px rgba(74, 181, 104, 0.3);
}

.hobby-card-check[hidden] {
  display: none;
}

@media (max-width: 640px) {
  .hobby-game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
  }

  .hobby-card {
    padding: 0.85rem;
    border-radius: 24px;
  }

  .hobby-card-word-button strong {
    font-size: 1.02rem;
  }
}

.animal-game-stage {
  display: grid;
  gap: 1rem;
}

.animal-game-animal-chip {
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  color: #183657;
  font-weight: 800;
  border: 1px solid rgba(84, 121, 222, 0.12);
  box-shadow: 0 16px 30px rgba(45, 70, 118, 0.08);
}

.animal-game-image-frame {
  border-radius: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 290px;
}

.animal-game-image-frame img {
  display: block;
  width: min(100%, 340px);
  aspect-ratio: 1 / 1;
  object-fit: contain;
  filter: drop-shadow(0 22px 24px rgba(33, 71, 122, 0.16));
}

.place-game-mic-wrap {
  display: flex;
  justify-content: center;
}

.place-game-mic-wrap .btn {
  min-width: min(100%, 360px);
}

.place-game-mic-wrap .btn.is-listening {
  background: linear-gradient(135deg, #38b56f, #7fe09f);
  color: #fff;
  border-color: transparent;
}

.animal-game-prompt-card,
.animal-game-transcript-card {
  padding: 1rem 1.1rem;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(88, 123, 226, 0.12);
  box-shadow: 0 18px 32px rgba(45, 67, 110, 0.1);
}

.animal-game-sentence {
  margin: 0;
  color: #163456;
  font-size: clamp(1.4rem, 3vw, 2rem);
  text-align: left;
}

.animal-game-translation {
  margin: 0.55rem 0 0;
  color: #5d718a;
  line-height: 1.8;
}

#animalGameTranscript {
  margin: 0.5rem 0 0;
  min-height: 1.6rem;
  color: #25456f;
  font-weight: 700;
}

#animalGameTranscript[data-tone="listening"] {
  color: #2f7a4e;
}

#animalGameTranscript[data-tone="wrong"] {
  color: #c5435f;
}

#animalGameTranscript[data-tone="success"] {
  color: #137a45;
}

#animalGameTranscript[data-tone="warn"] {
  color: #946227;
}

.animal-game-feedback {
  margin: 0;
  min-height: 1.7rem;
  color: #60728a;
  font-weight: 700;
}

.animal-game-feedback[data-tone="success"] {
  color: #137a45;
}

.animal-game-feedback[data-tone="wrong"] {
  color: #cc4f66;
}

.animal-game-feedback[data-tone="listening"] {
  color: #2f7a4e;
}

.animal-game-feedback[data-tone="warn"] {
  color: #946227;
}

.animal-game-choice-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.95rem;
}

.animal-game-choice {
  appearance: none;
  border: 0;
  padding: 0.9rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(86, 122, 226, 0.14);
  box-shadow: 0 20px 40px rgba(49, 72, 116, 0.11);
  display: grid;
  gap: 0.75rem;
  text-align: start;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.animal-game-choice:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 48px rgba(49, 72, 116, 0.14);
}

.animal-game-choice img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 0;
  filter: drop-shadow(0 16px 18px rgba(33, 71, 122, 0.14));
}

.animal-game-choice strong {
  color: #183657;
  font-size: 1.04rem;
}

.animal-game-choice span {
  color: #5d718a;
  font-weight: 700;
}

.animal-game-choice.is-correct {
  color: #fff;
  background: linear-gradient(135deg, #39b86f, #7de0a0);
  box-shadow: 0 24px 48px rgba(57, 184, 111, 0.28);
}

.animal-game-choice.is-correct strong,
.animal-game-choice.is-correct span {
  color: inherit;
}

.animal-game-choice.is-wrong {
  color: #fff;
  background: linear-gradient(135deg, #eb556d, #ff9e95);
  box-shadow: 0 24px 48px rgba(235, 85, 109, 0.28);
  animation: animalGameWrongShake 420ms ease;
}

.animal-game-choice.is-wrong strong,
.animal-game-choice.is-wrong span {
  color: inherit;
}

.animal-game-notebook-text {
  margin: 0.6rem 0 0;
  color: #60728a;
  line-height: 1.8;
}

.animal-game-learned-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.animal-game-notebook-empty {
  padding: 1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.44);
  color: #60728a;
  text-align: center;
  font-weight: 700;
}

.animal-game-learned-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  padding: 0.8rem;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(87, 124, 226, 0.12);
  box-shadow: 0 16px 30px rgba(45, 67, 110, 0.09);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.animal-game-learned-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 34px rgba(45, 67, 110, 0.13);
}

.animal-game-learned-card img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  border-radius: 0;
  filter: drop-shadow(0 10px 14px rgba(33, 71, 122, 0.14));
}

.animal-game-status-actions .btn {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.84);
  box-shadow: 0 14px 30px rgba(33, 71, 122, 0.12);
}

.animal-game-feedback,
.animal-game-notebook-text,
.animal-game-translation,
#animalGameTranscript {
  font-weight: 800;
}

@media (min-width: 1180px) {
  .animal-game-status {
    padding: 1.2rem 1.4rem;
  }

  .animal-game-stage,
  .animal-game-notebook {
    padding: 1.3rem 1.45rem;
  }

  .animal-game-choice-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem;
  }
}

body.animal-sound-game-body .topbar-inner {
  width: min(1560px, 96vw);
}

body.animal-sound-game-body .animal-game-shell {
  gap: 0.9rem;
}

body.animal-sound-game-body .animal-game-status,
body.animal-sound-game-body .animal-game-stage {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
}

body.animal-sound-game-body .animal-game-status::before,
body.animal-sound-game-body .animal-game-stage::before,
body.animal-sound-game-body .animal-game-notebook::before {
  display: none;
}

body.animal-sound-game-body .animal-game-status-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
}

body.animal-sound-game-body .animal-game-status-actions .btn {
  min-height: 54px;
  padding-inline: 18px;
  border-radius: 999px;
  font-weight: 800;
}

body.animal-sound-game-body .animal-game-stat-pill {
  min-height: 92px;
  align-content: center;
  border-radius: 28px;
}

body.animal-sound-game-body .animal-game-board-grid {
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

body.animal-sound-game-body .animal-game-stage {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  grid-template-areas:
    "head head"
    "image prompt"
    "image transcript"
    "image feedback"
    "helpers helpers"
    "choices choices";
  column-gap: 1.25rem;
  row-gap: 0.8rem;
  align-items: start;
}

body.animal-sound-game-body .animal-game-stage-head {
  grid-area: head;
}

body.animal-sound-game-body .animal-game-image-frame {
  grid-area: image;
  min-height: 250px;
  align-self: start;
}

body.animal-sound-game-body .animal-game-prompt-card {
  grid-area: prompt;
}

body.animal-sound-game-body .animal-game-transcript-card {
  grid-area: transcript;
}

body.animal-sound-game-body .animal-game-feedback {
  grid-area: feedback;
  min-height: auto;
  padding: 0.9rem 1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 28px rgba(33, 71, 122, 0.08);
}

body.animal-sound-game-body .animal-game-choice-head {
  grid-area: helpers;
}

body.animal-sound-game-body .animal-game-choice-grid {
  grid-area: choices;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.animal-sound-game-body .animal-game-notebook {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
  border-radius: 0;
}

body.animal-sound-game-body .animal-game-notebook-head {
  margin-bottom: 0.25rem;
}

body.animal-sound-game-body .animal-game-learned-list {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 0.7rem;
}

body.animal-sound-game-body .animal-game-learned-card {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  padding: 0.2rem;
  background: transparent;
  border: 0;
  box-shadow: none;
}

body.animal-sound-game-body .animal-game-learned-card:hover {
  transform: translateY(-2px);
  box-shadow: none;
}

body.animal-sound-game-body .animal-game-learned-card img {
  width: 72px;
  height: 72px;
}

body.animal-sound-game-body .animal-game-learned-card strong {
  margin-top: 0.2rem;
}

body.animal-sound-game-body .animal-game-notebook-empty {
  width: fit-content;
  min-width: min(100%, 340px);
  margin-inline: auto;
}

@media (max-width: 1180px) {
  body.animal-sound-game-body .animal-game-stage {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "image"
      "prompt"
      "transcript"
      "feedback"
      "helpers"
      "choices";
  }

  body.animal-sound-game-body .animal-game-learned-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body.animal-sound-game-body .animal-game-status-top {
    grid-template-columns: 1fr;
  }

  body.animal-sound-game-body .animal-game-choice-grid,
  body.animal-sound-game-body .animal-game-learned-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.animal-game-learned-card strong {
  display: block;
  color: #183657;
}

.animal-game-learned-card span {
  display: block;
  color: #5d718a;
  font-weight: 700;
  margin-top: 0.25rem;
}

.animal-game-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: rgba(10, 26, 46, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.animal-game-popup-backdrop[hidden] {
  display: none !important;
}

.animal-game-popup {
  width: min(100%, 560px);
  text-align: center;
  box-shadow: 0 28px 64px rgba(15, 38, 77, 0.26);
}

.animal-game-popup-stars {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 0.8rem;
  color: #ffbf2f;
  font-size: 1.6rem;
}

.animal-game-popup h2 {
  margin: 0 0 0.7rem;
  color: #173457;
}

.animal-game-popup p {
  margin: 0;
  color: #5f728a;
  line-height: 1.85;
}

@keyframes animalGameWrongShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(5px); }
  50% { transform: translateX(-5px); }
  75% { transform: translateX(3px); }
}

@media (max-width: 1100px) {
  .animal-game-board-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .animal-game-hero-shell,
  .animal-game-guide-grid,
  .animal-game-stats-row,
  .animal-game-choice-grid {
    grid-template-columns: 1fr;
  }

  .animal-game-status-top,
  .animal-game-stage-head,
  .animal-game-notebook-head {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  .animal-game-copy,
  .animal-game-cover,
  .animal-game-status,
  .animal-game-stage,
  .animal-game-notebook,
  .animal-game-popup,
  .animal-game-guide-card {
    padding: 1.15rem;
  }

  .animal-game-status-actions .btn,
  .place-game-mic-wrap .btn,
  .animal-game-popup .hero-actions .btn {
    width: 100%;
  }

  .animal-game-learned-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .animal-game-learned-card img {
    width: 64px;
    height: 64px;
  }
}

.clothes-game-body {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    url("images/لعبة الملابس بالإنجليزية.webp") center center / cover no-repeat fixed;
}

.clothes-game-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.34), transparent 24%),
    radial-gradient(circle at 86% 12%, rgba(255, 255, 255, 0.28), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.clothes-game-main {
  padding-top: 0.85rem;
  padding-bottom: 2.8rem;
}

.clothes-game-section {
  padding-top: 1rem;
}

.clothes-game-shell,
.clothes-game-stats-row,
.clothes-game-options,
.clothes-game-progress-strip,
.clothes-game-rack-list {
  display: grid;
}

.clothes-game-status,
.clothes-game-mission,
.clothes-game-options-panel,
.clothes-game-popup,
.clothes-game-rack {
  position: relative;
  overflow: hidden;
}

.clothes-game-status,
.clothes-game-mission,
.clothes-game-options-panel,
.clothes-game-popup {
  padding: 1.15rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.44);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 36px rgba(59, 95, 152, 0.1);
}

.clothes-game-status::before,
.clothes-game-mission::before,
.clothes-game-options-panel::before,
.clothes-game-popup::before,
.clothes-game-rack::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 199, 94, 0.22), transparent 34%),
    radial-gradient(circle at bottom right, rgba(110, 178, 255, 0.2), transparent 38%);
  pointer-events: none;
}

.clothes-game-status {
  margin-bottom: 0.95rem;
}

.clothes-game-status-head,
.clothes-game-rack-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.clothes-game-status-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.7rem;
}

.clothes-game-stats-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.clothes-game-stat-pill {
  padding: 0.85rem 1rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 24px rgba(32, 80, 137, 0.08);
  text-align: center;
}

.clothes-game-stat-pill span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

.clothes-game-stat-pill strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.18rem;
  color: var(--ink);
}

.clothes-game-progress-strip {
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 0.55rem;
  margin-top: 1rem;
}

.clothes-game-progress-chip {
  padding: 0.52rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.9);
  text-align: center;
  font-size: 0.86rem;
  color: #426287;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.clothes-game-progress-chip.is-current {
  background: linear-gradient(135deg, rgba(76, 144, 250, 0.16), rgba(255, 167, 89, 0.18));
  border-color: rgba(76, 144, 250, 0.32);
  color: var(--ink);
  transform: translateY(-2px);
}

.clothes-game-progress-chip.is-complete {
  background: linear-gradient(135deg, rgba(124, 224, 144, 0.22), rgba(255, 223, 121, 0.18));
  border-color: rgba(91, 194, 121, 0.3);
  color: var(--ink);
}

.clothes-game-shell {
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(18px, 2.8vw, 34px);
  align-items: stretch;
}

.clothes-game-bubble {
  position: relative;
  padding: 1.1rem 1.15rem 1rem;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 28px rgba(32, 80, 137, 0.08);
}

.clothes-game-bubble::after {
  content: "";
  position: absolute;
  bottom: -14px;
  inset-inline-start: 2.4rem;
  width: 28px;
  height: 28px;
  transform: rotate(45deg);
  background: rgba(255, 255, 255, 0.88);
  border-inline-start: 1px solid rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.9);
}

.clothes-game-sentence {
  margin: 0.45rem 0 0;
  font-size: clamp(1.9rem, 4.4vw, 2.6rem);
  line-height: 1.16;
  color: #1f4570;
}

.clothes-game-translation {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.clothes-game-sound-wave {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  height: 44px;
  margin: 1.6rem 0 1rem;
  padding-inline: 0.25rem;
}

.clothes-game-sound-wave span {
  flex: 1 1 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #5ea8ff, #ffad66);
  animation: clothes-wave 1.5s ease-in-out infinite;
  opacity: 0.8;
}

.clothes-game-sound-wave span:nth-child(1) { height: 28%; animation-delay: 0s; }
.clothes-game-sound-wave span:nth-child(2) { height: 62%; animation-delay: 0.14s; }
.clothes-game-sound-wave span:nth-child(3) { height: 90%; animation-delay: 0.28s; }
.clothes-game-sound-wave span:nth-child(4) { height: 46%; animation-delay: 0.42s; }
.clothes-game-sound-wave span:nth-child(5) { height: 72%; animation-delay: 0.56s; }

@keyframes clothes-wave {
  0%, 100% { transform: scaleY(0.72); opacity: 0.6; }
  50% { transform: scaleY(1.08); opacity: 1; }
}

.clothes-game-feedback {
  margin: 0;
  min-height: 1.7rem;
  color: #31557f;
  font-weight: 600;
}

.clothes-game-rack {
  margin-top: 1.2rem;
  padding: 0.95rem 0.9rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.36);
  backdrop-filter: blur(8px);
}

.clothes-game-rack-list {
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.clothes-game-rack-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0.58rem 0.45rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 22px rgba(32, 80, 137, 0.08);
}

.clothes-game-rack-item img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.clothes-game-rack-item span {
  font-size: 0.88rem;
  color: var(--ink);
}

.clothes-game-rack-empty {
  margin: 0;
  color: var(--muted);
}

.clothes-game-options-head {
  margin-bottom: 0.9rem;
}

.clothes-game-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.95rem;
}

.clothes-game-option {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.14);
  padding: 0.62rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 14px 24px rgba(32, 80, 137, 0.08);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.clothes-game-option:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 38px rgba(75, 105, 168, 0.12);
  border-color: rgba(76, 144, 250, 0.28);
}

.clothes-game-option:disabled {
  cursor: default;
}

.clothes-game-option-media {
  display: grid;
  place-items: center;
  min-height: 170px;
  border-radius: 22px;
  background: transparent;
  overflow: hidden;
}

.clothes-game-option-media img {
  width: min(100%, 178px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(32, 80, 137, 0.12));
}

.clothes-game-option-label {
  margin-top: 0.7rem;
  padding: 0.72rem 0.8rem;
  border-radius: 18px;
  text-align: center;
  background: rgba(255, 255, 255, 0.84);
  color: #1c436f;
  font-size: 1rem;
  font-weight: 800;
}

.clothes-game-option.is-correct {
  border-color: rgba(85, 193, 115, 0.42);
  background: linear-gradient(180deg, rgba(234, 255, 239, 0.96), rgba(255, 255, 255, 0.92));
  transform: translateY(-3px) scale(1.02);
}

.clothes-game-option.is-wrong {
  border-color: rgba(231, 104, 104, 0.42);
  background: linear-gradient(180deg, rgba(255, 236, 236, 0.96), rgba(255, 255, 255, 0.92));
  animation: clothes-shake 0.36s ease;
}

@keyframes clothes-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(5px); }
  50% { transform: translateX(-5px); }
  75% { transform: translateX(3px); }
}

.clothes-game-popup-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(19, 31, 61, 0.46);
  backdrop-filter: blur(8px);
  z-index: 80;
}

.clothes-game-popup-backdrop[hidden] {
  display: none !important;
}

.clothes-game-popup {
  width: min(520px, calc(100vw - 2rem));
  text-align: center;
  background: rgba(255, 255, 255, 0.88);
}

.clothes-game-popup-stars {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
  font-size: 1.6rem;
  color: #ffbe2e;
}

.clothes-game-popup p {
  color: #416282;
}

@media (max-width: 980px) {
  .clothes-game-shell {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 640px) {
  .clothes-game-status-head,
  .clothes-game-rack-head {
    flex-direction: column;
    align-items: stretch;
  }

  .clothes-game-status-actions {
    justify-content: stretch;
  }

  .clothes-game-status-actions .btn {
    width: 100%;
  }

  .clothes-game-stats-row {
    grid-template-columns: 1fr;
  }

  .clothes-game-progress-strip,
  .clothes-game-rack-list,
  .clothes-game-options {
    grid-template-columns: 1fr;
  }

  .clothes-game-option-media {
    min-height: 150px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .clothes-game-sound-wave span,
  .clothes-game-option,
  .clothes-game-progress-chip {
    animation: none !important;
    transition: none !important;
  }
}

.color-game-body {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    url("images/learn color.webp") center center / cover no-repeat fixed;
}

.color-game-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.34), transparent 24%),
    radial-gradient(circle at 84% 12%, rgba(255, 255, 255, 0.28), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.color-game-main {
  padding-top: 0.85rem;
  padding-bottom: 2.8rem;
}

.color-game-section {
  padding-top: 1rem;
}

.color-game-status,
.color-game-stage,
.color-game-palette {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.44);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 36px rgba(59, 95, 152, 0.1);
}

.color-game-status::before,
.color-game-stage::before,
.color-game-palette::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 197, 87, 0.2), transparent 30%),
    radial-gradient(circle at 86% 16%, rgba(96, 156, 255, 0.18), transparent 28%),
    radial-gradient(circle at 52% 86%, rgba(255, 143, 190, 0.15), transparent 24%);
  pointer-events: none;
}

.color-game-status,
.color-game-stage {
  padding: 1.15rem;
}

.color-game-palette {
  padding: 1.05rem;
}

.color-game-status {
  margin-bottom: 1.15rem;
}

.color-game-status-top,
.color-game-palette-head,
.color-game-stage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.color-game-status-top h2,
.color-game-stage-head h3 {
  margin: 0.35rem 0 0;
  color: #163456;
}

.color-game-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.color-game-stats-row,
.color-game-progress-strip,
.color-game-options,
.color-game-palette-list {
  display: grid;
}

.color-game-stats-row {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.color-game-stat-pill {
  padding: 0.9rem 1rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 24px rgba(32, 80, 137, 0.08);
}

.color-game-stat-pill span {
  display: block;
  color: #667a93;
  font-size: 0.94rem;
}

.color-game-stat-pill strong {
  display: block;
  margin-top: 0.22rem;
  color: #163456;
  font-size: 1.12rem;
}

.color-game-progress-strip {
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 0.55rem;
  margin-top: 1rem;
}

.color-game-progress-chip {
  padding: 0.55rem 0.68rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.9);
  color: #456683;
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 10px 20px rgba(32, 80, 137, 0.08);
}

.color-game-progress-chip.is-current {
  color: #173457;
  background: linear-gradient(135deg, rgba(77, 136, 255, 0.16), rgba(255, 172, 89, 0.16));
  border-color: rgba(77, 136, 255, 0.34);
}

.color-game-progress-chip.is-complete {
  color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--chip-color) 74%, #ffffff 26%), color-mix(in srgb, var(--chip-color) 60%, #ffffff 40%));
  border-color: transparent;
}

.color-game-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(280px, 0.8fr);
  gap: clamp(18px, 2.8vw, 34px);
}

.color-game-stage {
  display: grid;
  gap: 1rem;
}

#colorGameSentence,
.color-game-word-chip,
.color-game-option strong,
.color-game-palette-item strong {
  direction: ltr;
  text-align: left;
}

#colorGameSentence {
  font-size: clamp(1.95rem, 4.2vw, 2.7rem);
  line-height: 1.15;
}

.color-game-word-chip {
  min-width: 116px;
  padding: 0.78rem 1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 24px rgba(32, 80, 137, 0.08);
  font-size: 1.02rem;
  font-weight: 800;
  color: #173457;
}

.color-game-image-frame {
  border-radius: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
  display: grid;
  place-items: center;
}

.color-game-image-frame img {
  display: block;
  width: min(100%, 440px);
  aspect-ratio: 1 / 1;
  object-fit: contain;
  filter: drop-shadow(0 14px 22px rgba(32, 80, 137, 0.12));
}

.color-game-prompt-card {
  padding: 1rem 1.1rem;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 24px rgba(32, 80, 137, 0.08);
}

.color-game-translation {
  margin: 0;
  color: #4d6483;
  font-weight: 700;
}

.color-game-feedback {
  margin: 0.55rem 0 0;
  min-height: 1.72rem;
  color: #60728a;
  font-weight: 700;
}

.color-game-feedback[data-tone="success"] {
  color: #16804c;
}

.color-game-feedback[data-tone="wrong"] {
  color: #cc556c;
}

.color-game-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.95rem;
}

.color-game-option {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.16);
  padding: 1rem 0.95rem 1.05rem;
  backdrop-filter: blur(8px);
  display: grid;
  gap: 0.52rem;
  justify-items: center;
  text-align: center;
  box-shadow: 0 14px 24px rgba(32, 80, 137, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.color-game-option:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 42px rgba(74, 103, 166, 0.15);
}

.color-game-option:disabled {
  cursor: default;
}

.color-game-option-drop {
  width: 66px;
  height: 66px;
  border-radius: 50% 50% 52% 52% / 58% 58% 42% 42%;
  transform: rotate(45deg);
  background: linear-gradient(135deg, color-mix(in srgb, var(--option-color) 82%, #ffffff 18%), color-mix(in srgb, var(--option-color) 54%, #ffffff 46%));
  box-shadow:
    inset -8px -8px 16px rgba(255, 255, 255, 0.28),
    inset 10px 10px 18px rgba(0, 0, 0, 0.05),
    0 12px 26px color-mix(in srgb, var(--option-color) 30%, transparent 70%);
}

.color-game-option strong {
  color: #173457;
  font-size: 1.02rem;
}

.color-game-option span {
  color: #5d728a;
  font-weight: 700;
}

.color-game-option.is-correct {
  border-color: rgba(81, 193, 114, 0.42);
  background: linear-gradient(180deg, rgba(230, 255, 236, 0.97), rgba(255, 255, 255, 0.94));
}

.color-game-option.is-wrong {
  border-color: rgba(233, 101, 114, 0.42);
  background: linear-gradient(180deg, rgba(255, 238, 240, 0.98), rgba(255, 255, 255, 0.94));
}

.color-game-palette-text {
  margin: 0.7rem 0 0;
  color: #60728a;
}

.color-game-palette-list {
  gap: 0.8rem;
  margin-top: 1rem;
}

.color-game-palette-empty {
  margin: 0;
  padding: 1rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  color: #6a7d94;
}

.color-game-palette-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 0.85rem;
  padding: 0.82rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 20px rgba(32, 80, 137, 0.08);
}

.color-game-palette-swatch {
  width: 58px;
  height: 58px;
  border-radius: 22px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--swatch) 80%, #ffffff 20%), color-mix(in srgb, var(--swatch) 56%, #ffffff 44%));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.color-game-palette-item strong {
  display: block;
  color: #173457;
}

.color-game-palette-item span {
  display: block;
  color: #61738b;
  margin-top: 0.18rem;
  font-weight: 700;
}

@media (max-width: 980px) {
  .color-game-shell,
  .color-game-options {
    grid-template-columns: 1fr;
  }

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

  .color-game-status-top,
  .color-game-stage-head,
  .color-game-palette-head {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  .color-game-status,
  .color-game-stage,
  .color-game-palette {
    padding: 1.15rem;
  }

  .color-game-status-actions .btn {
    width: 100%;
  }

  .color-game-progress-strip,
  .color-game-options {
    grid-template-columns: 1fr;
  }

  .color-game-word-chip {
    width: 100%;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .color-game-option {
    transition: none !important;
  }
}

.discoverers-return-chip {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 140;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: rgba(19, 52, 104, 0.92);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 20px 32px rgba(18, 44, 92, 0.24);
  backdrop-filter: blur(12px);
}

html.lingurise-ready body {
  opacity: 1;
}

body.touch-home-topbar-hidden .topbar,
body.touch-page-topbar-hidden .topbar {
  visibility: hidden;
}

.game-orientation-overlay,
.game-orientation-toast,
.game-device-fab-back {
  display: none;
}

body.game-layout-page {
  min-height: calc(var(--game-vh, 1vh) * 100);
}

body.game-layout-page.game-device-touch {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  background-attachment: scroll;
}

body.game-layout-page.game-device-touch main {
  min-height: calc(var(--game-vh, 1vh) * 100);
}

body.game-layout-page.game-device-touch.game-orientation-locked {
  overflow: hidden !important;
}

body.game-layout-page.game-device-touch.game-orientation-locked > :not(.game-orientation-overlay):not(.game-orientation-toast) {
  filter: blur(3px);
  pointer-events: none;
  user-select: none;
}

.game-orientation-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  place-items: center;
  padding: 24px;
  background: rgba(12, 29, 49, 0.42);
}

.game-orientation-overlay.is-visible {
  display: grid;
}

.game-orientation-card {
  width: min(92vw, 420px);
  padding: 24px 22px 22px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 248, 224, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 60px rgba(29, 68, 120, 0.24);
  text-align: center;
  color: #17375d;
}

.game-orientation-icon {
  width: 86px;
  height: 86px;
  margin: 0 auto 14px;
  border-radius: 26px;
  background: linear-gradient(135deg, #69afff, #ffbe79);
  display: grid;
  place-items: center;
  box-shadow: 0 18px 34px rgba(73, 127, 217, 0.22);
}

.game-orientation-icon::before {
  content: "";
  width: 42px;
  height: 56px;
  border-radius: 12px;
  border: 4px solid rgba(255, 255, 255, 0.96);
  transform: rotate(90deg);
  box-sizing: border-box;
}

.game-orientation-title {
  margin: 0 0 8px;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 900;
  line-height: 1.2;
}

.game-orientation-text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 700;
  color: #456683;
}

.game-orientation-toast {
  position: fixed;
  inset: auto 12px 12px 12px;
  z-index: 99998;
  justify-items: center;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.game-orientation-toast.is-visible {
  display: grid;
  opacity: 1;
  transform: translateY(0);
}

.game-orientation-toast-card {
  min-width: min(92vw, 460px);
  max-width: 92vw;
  min-height: 58px;
  padding: 14px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(255, 245, 215, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 38px rgba(29, 68, 120, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  color: #1f4673;
  font-size: 0.98rem;
  font-weight: 900;
}

.game-orientation-toast-card::before {
  content: "↻";
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, #7cb8ff, #ffb677);
  color: #fff;
  box-shadow: 0 10px 18px rgba(73, 127, 217, 0.22);
  flex: 0 0 34px;
}

.game-device-fab-back {
  position: fixed;
  inset: max(10px, env(safe-area-inset-top)) auto auto max(10px, env(safe-area-inset-left));
  z-index: 90;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: rgba(17, 53, 108, 0.92);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 16px 28px rgba(17, 53, 108, 0.22);
  backdrop-filter: blur(14px);
}

body.game-layout-page.game-device-touch.game-device-has-topbar.game-device-landscape .game-device-fab-back {
  display: inline-flex;
}

@media (pointer: coarse) and (max-width: 1180px) {
  .topbar {
    width: calc(100vw - 12px);
    margin: 6px auto 0;
    padding-inline: 10px;
    border-radius: 26px;
  }

  .topbar-inner {
    gap: 10px;
    padding-block: 10px;
  }

  .nav {
    gap: 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
    white-space: nowrap;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar,
  .tabs::-webkit-scrollbar,
  .group-filters::-webkit-scrollbar {
    display: none;
  }

  .topbar-actions {
    gap: 8px;
  }

  .lang-switch {
    flex-wrap: nowrap;
  }

  .tabs,
  .group-filters {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    flex-wrap: nowrap;
    white-space: nowrap;
    padding-bottom: 4px;
    gap: 10px;
  }

  .tab-btn,
  .filter-btn {
    min-height: 42px;
    padding-inline: 14px;
    font-size: 0.92rem;
  }

  .library-shell {
    padding: 10px;
    border-radius: 26px;
  }

  .content-grid,
  .categories-grid {
    gap: 12px;
  }

  .content-card,
  .category-card {
    padding: 12px;
    border-radius: 24px;
  }
}

@media (pointer: coarse) and (max-width: 767px) {
  .content-grid,
  .categories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (pointer: coarse) and (min-width: 768px) and (max-width: 1180px) {
  .content-grid,
  .categories-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

body.game-layout-page.game-device-touch.game-device-landscape header.topbar {
  display: none !important;
}

body.game-layout-page.game-device-touch.game-device-landscape main {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

body.game-layout-page.game-device-touch.game-device-landscape :is(
  .btn,
  .lang-btn,
  .tab-btn,
  .filter-btn,
  .mini-btn,
  .match-modern-action,
  .match-modern-back,
  .word-builder-back
) {
  min-height: 40px !important;
  padding-inline: 12px !important;
  font-size: 0.88rem !important;
}

body.game-layout-page.game-device-touch.game-device-landscape :is(
  .mini-label,
  .word-builder-kicker,
  .match-modern-kicker
) {
  font-size: 0.68rem !important;
  line-height: 1.2 !important;
}

body.game-layout-page.game-device-touch.game-device-landscape :is(
  .animal-game-stat-pill,
  .build-home-stat-pill,
  .color-game-stat-pill,
  .days-week-stat-pill,
  .time-routine-stat-pill,
  .letter-hunt-stat-pill,
  .match-modern-chip,
  .word-builder-hud-chip,
  .discoverers-stat-card
) {
  padding: 0.52rem 0.58rem !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.22) !important;
  border: 1px solid rgba(255, 255, 255, 0.36) !important;
  box-shadow: 0 10px 20px rgba(32, 80, 137, 0.08) !important;
  backdrop-filter: blur(12px);
}

body.game-layout-page.game-device-touch.game-device-landscape :is(
  .animal-game-stat-pill span,
  .build-home-stat-pill span,
  .color-game-stat-pill span,
  .days-week-stat-pill span,
  .time-routine-stat-pill span,
  .letter-hunt-stat-pill span,
  .match-modern-chip span,
  .word-builder-hud-chip span
) {
  font-size: 0.64rem !important;
}

body.game-layout-page.game-device-touch.game-device-landscape :is(
  .animal-game-stat-pill strong,
  .build-home-stat-pill strong,
  .color-game-stat-pill strong,
  .days-week-stat-pill strong,
  .time-routine-stat-pill strong,
  .letter-hunt-stat-pill strong,
  .match-modern-chip strong,
  .word-builder-hud-chip strong
) {
  font-size: 0.84rem !important;
}

body.game-layout-page.game-device-touch.game-device-landscape :is(
  .animal-sound-game-body,
  .places-game-body,
  .transport-game-body,
  .food-game-body,
  .hobbies-game-body,
  .body-parts-game-body,
  .number-game-body
) .animal-game-main {
  padding-top: 6px !important;
  padding-bottom: 12px !important;
}

body.game-layout-page.game-device-touch.game-device-landscape :is(
  .animal-sound-game-body,
  .places-game-body,
  .transport-game-body,
  .food-game-body,
  .hobbies-game-body,
  .body-parts-game-body,
  .number-game-body
) .container {
  width: calc(100vw - (var(--game-touch-gutter) * 2)) !important;
  max-width: none !important;
}

body.game-layout-page.game-device-touch.game-device-landscape :is(
  .animal-sound-game-body,
  .places-game-body,
  .transport-game-body,
  .food-game-body,
  .hobbies-game-body,
  .body-parts-game-body,
  .number-game-body
) .animal-game-shell {
  gap: 10px !important;
}

body.game-layout-page.game-device-touch.game-device-landscape :is(
  .animal-sound-game-body,
  .places-game-body,
  .transport-game-body,
  .food-game-body,
  .hobbies-game-body,
  .body-parts-game-body,
  .number-game-body
) .animal-game-status,
body.game-layout-page.game-device-touch.game-device-landscape .build-home-mission,
body.game-layout-page.game-device-touch.game-device-landscape .color-game-status,
body.game-layout-page.game-device-touch.game-device-landscape .days-week-game-status,
body.game-layout-page.game-device-touch.game-device-landscape .time-routine-status,
body.game-layout-page.game-device-touch.game-device-landscape .letter-hunt-status {
  padding: 0.72rem 0.8rem !important;
}

body.game-layout-page.game-device-touch.game-device-landscape :is(
  .animal-sound-game-body,
  .places-game-body,
  .transport-game-body,
  .food-game-body,
  .hobbies-game-body,
  .body-parts-game-body,
  .number-game-body
) .animal-game-status-actions {
  gap: 0.45rem !important;
}

body.game-layout-page.game-device-touch.game-device-landscape :is(
  .animal-sound-game-body,
  .places-game-body,
  .transport-game-body,
  .food-game-body,
  .hobbies-game-body,
  .body-parts-game-body,
  .number-game-body
) .animal-game-stats-row,
body.game-layout-page.game-device-touch.game-device-landscape .build-home-stats-row,
body.game-layout-page.game-device-touch.game-device-landscape .color-game-stats-row,
body.game-layout-page.game-device-touch.game-device-landscape .days-week-stats-row,
body.game-layout-page.game-device-touch.game-device-landscape .time-routine-stats,
body.game-layout-page.game-device-touch.game-device-landscape .letter-hunt-stats {
  gap: 0.45rem !important;
}

body.game-layout-page.game-device-touch.game-device-landscape :is(
  .animal-sound-game-body,
  .places-game-body,
  .transport-game-body,
  .food-game-body,
  .hobbies-game-body,
  .body-parts-game-body,
  .number-game-body
) .animal-game-board-grid {
  grid-template-columns: minmax(0, 1.04fr) minmax(220px, 0.72fr) !important;
  gap: 10px !important;
  align-items: start;
}

body.game-layout-page.game-device-touch.game-device-landscape :is(
  .animal-sound-game-body,
  .places-game-body,
  .transport-game-body,
  .food-game-body,
  .hobbies-game-body,
  .body-parts-game-body,
  .number-game-body
) .animal-game-stage {
  gap: 0.7rem !important;
}

body.game-layout-page.game-device-touch.game-device-landscape :is(
  .animal-sound-game-body,
  .places-game-body,
  .transport-game-body,
  .food-game-body,
  .hobbies-game-body,
  .body-parts-game-body,
  .number-game-body
) .animal-game-image-frame {
  min-height: min(25vh, 190px) !important;
}

body.game-layout-page.game-device-touch.game-device-landscape :is(
  .animal-sound-game-body,
  .places-game-body,
  .transport-game-body,
  .food-game-body,
  .hobbies-game-body,
  .body-parts-game-body,
  .number-game-body
) :is(.animal-game-image, .color-game-image-frame img, .time-routine-scene-image, .letter-hunt-card-image) {
  max-height: min(24vh, 190px) !important;
  object-fit: contain;
}

body.game-layout-page.game-device-touch.game-device-landscape :is(
  .animal-sound-game-body,
  .places-game-body,
  .transport-game-body,
  .food-game-body,
  .hobbies-game-body,
  .body-parts-game-body,
  .number-game-body
) .animal-game-choice-grid,
body.game-layout-page.game-device-touch.game-device-landscape .color-game-options,
body.game-layout-page.game-device-touch.game-device-landscape .build-home-choice-grid,
body.game-layout-page.game-device-touch.game-device-landscape .letter-hunt-choices {
  gap: 0.55rem !important;
}

body.game-layout-page.game-device-touch.game-device-landscape :is(
  .animal-sound-game-body,
  .places-game-body,
  .transport-game-body,
  .food-game-body,
  .hobbies-game-body,
  .body-parts-game-body,
  .number-game-body
) .animal-game-choice-grid,
body.game-layout-page.game-device-touch.game-device-landscape .letter-hunt-choices {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .color-game-shell {
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.66fr) !important;
  gap: 10px !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .color-game-main {
  padding-top: 6px !important;
  padding-bottom: 12px !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .color-game-options {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body.game-layout-page.game-device-touch.game-device-landscape #colorGameSentence {
  font-size: clamp(1.25rem, 2vw, 1.7rem) !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .build-home-main {
  padding-top: 6px !important;
  padding-bottom: 12px !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .build-home-shell {
  gap: 10px !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .build-home-stage,
body.game-layout-page.game-device-touch.game-device-landscape .build-home-wordbook,
body.game-layout-page.game-device-touch.game-device-landscape .build-home-tray {
  padding: 0.72rem !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .build-home-stage-layout {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.78fr) !important;
  gap: 10px !important;
  align-items: start;
}

body.game-layout-page.game-device-touch.game-device-landscape .build-home-house-scene {
  min-height: min(30vh, 250px) !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .build-home-choice-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .build-home-wordbook-list {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0.45rem !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .days-week-game-main {
  padding-top: 6px !important;
  padding-bottom: 12px !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .days-week-game-shell {
  gap: 10px !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .days-week-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0.55rem !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .days-week-train-zone {
  padding: 0.78rem !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .days-week-chip-pool {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0.45rem !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .time-routine-game-main {
  padding-top: 6px !important;
  padding-bottom: 12px !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .time-routine-shell {
  gap: 10px !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .time-routine-board {
  grid-template-columns: minmax(0, 1.04fr) minmax(260px, 0.9fr) !important;
  gap: 10px !important;
  padding: 0.78rem !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .time-routine-scene-image-wrap {
  min-height: min(28vh, 220px) !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .time-routine-hour-buttons {
  gap: 0.45rem !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .letter-hunt-main {
  padding-top: 6px !important;
  padding-bottom: 12px !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .letter-hunt-shell {
  gap: 10px !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .letter-hunt-board {
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr) !important;
  gap: 10px !important;
  padding: 0.78rem !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .letter-hunt-progress {
  padding: 0.72rem !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .match-modern-topbar,
body.game-layout-page.game-device-touch.game-device-landscape .word-builder-topbar {
  width: calc(100vw - (var(--game-touch-gutter) * 2)) !important;
  max-width: none !important;
  margin: 6px auto 0 !important;
  padding: 8px !important;
  gap: 8px !important;
  border-radius: 24px !important;
  position: sticky;
  top: max(6px, env(safe-area-inset-top));
  z-index: 80;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 249, 223, 0.82), rgba(228, 244, 255, 0.8)) !important;
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 34px rgba(27, 68, 120, 0.12);
}

body.game-layout-page.game-device-touch.game-device-landscape .match-modern-main,
body.game-layout-page.game-device-touch.game-device-landscape .word-builder-main {
  width: calc(100vw - (var(--game-touch-gutter) * 2)) !important;
  max-width: none !important;
  padding-top: 6px !important;
  padding-bottom: 12px !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .match-modern-center,
body.game-layout-page.game-device-touch.game-device-landscape .word-builder-topbar-center {
  gap: 6px !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .match-modern-selected {
  display: none !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .match-modern-status-line {
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 10px !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .match-board-card-modern,
body.game-layout-page.game-device-touch.game-device-landscape .word-builder-panel {
  padding: 0.78rem !important;
  border-radius: 22px !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .match-board-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .match-board-scroll {
  max-height: min(56vh, 390px) !important;
  min-height: 210px !important;
}

body.game-layout-page.game-device-touch.game-device-landscape :is(
  #matchImageGrid.match-card-grid[data-size="large"],
  #matchImageGrid.match-card-grid[data-size="medium"],
  #matchWordGrid.match-card-grid[data-size="large"],
  #matchWordGrid.match-card-grid[data-size="medium"]
) {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .word-builder-stage {
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr) !important;
  gap: 10px !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .word-builder-shell {
  max-width: none !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .word-builder-image-card {
  margin-bottom: 0.55rem !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .word-builder-image {
  width: min(100%, 120px) !important;
  max-height: min(20vh, 140px) !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .word-builder-letters-field {
  min-height: min(34vh, 260px) !important;
}

body.game-layout-page.game-device-touch.game-device-tablet.game-device-landscape .word-builder-stage,
body.game-layout-page.game-device-touch.game-device-tablet.game-device-landscape .match-board-columns,
body.game-layout-page.game-device-touch.game-device-tablet.game-device-landscape .animal-game-board-grid,
body.game-layout-page.game-device-touch.game-device-tablet.game-device-landscape .time-routine-board,
body.game-layout-page.game-device-touch.game-device-tablet.game-device-landscape .build-home-stage-layout {
  gap: 12px !important;
}

body.game-layout-page.game-device-touch.game-device-mobile.game-device-landscape {
  font-size: 15px;
}

body.game-layout-page.game-device-touch.game-device-tablet.game-device-landscape {
  font-size: 16px;
}

body.learn-topbar-scroll-mode main {
  min-height: calc(100vh - 40px);
}

body.learn-topbar-scroll-mode .hero-actions .btn {
  min-height: 48px;
}

body.learn-topbar-scroll-mode .letters-hero-shell,
body.learn-topbar-scroll-mode .daily-life-shell {
  align-items: stretch;
}

@media (pointer: coarse) and (max-width: 1180px) and (orientation: landscape) {
  body.learn-topbar-scroll-mode .letters-hero,
  body.learn-topbar-scroll-mode .daily-life-hero,
  body.touch-home-topbar-mode .hero,
  body.touch-home-topbar-mode .section {
    scroll-margin-top: 12px;
  }

  body.learn-topbar-scroll-mode .letters-hero-shell {
    grid-template-columns: minmax(0, 1.14fr) minmax(240px, 0.86fr) !important;
    gap: 14px !important;
  }

  body.learn-topbar-scroll-mode .daily-life-shell {
    grid-template-columns: minmax(0, 1.18fr) minmax(240px, 0.82fr) !important;
    gap: 14px !important;
  }

  body.learn-topbar-scroll-mode .letters-hero-copy,
  body.learn-topbar-scroll-mode .letters-side-card,
  body.learn-topbar-scroll-mode .daily-life-copy,
  body.learn-topbar-scroll-mode .daily-side-card {
    padding: 18px !important;
    border-radius: 24px !important;
  }

  body.learn-topbar-scroll-mode .letters-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  body.learn-topbar-scroll-mode .daily-words-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  body.learn-topbar-scroll-mode .daily-side-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  body.learn-topbar-scroll-mode .letters-bottom-action {
    gap: 10px;
    justify-content: flex-start;
  }

  body.learn-topbar-scroll-mode .section-heading {
    margin-bottom: 16px;
  }
}

@media (pointer: coarse) and (max-width: 767px) {
  body.learn-topbar-scroll-mode .letters-hero-shell,
  body.learn-topbar-scroll-mode .daily-life-shell {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  body.learn-topbar-scroll-mode .letters-hero-copy,
  body.learn-topbar-scroll-mode .letters-side-card,
  body.learn-topbar-scroll-mode .daily-life-copy,
  body.learn-topbar-scroll-mode .daily-side-card {
    padding: 16px !important;
    border-radius: 22px !important;
  }

  body.learn-topbar-scroll-mode .letters-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  body.learn-topbar-scroll-mode .daily-words-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  body.learn-topbar-scroll-mode .daily-side-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body.learn-topbar-scroll-mode .hero-actions {
    gap: 10px;
  }

  body.learn-topbar-scroll-mode .hero-actions .btn {
    width: 100%;
  }

  body.learn-topbar-scroll-mode .letters-bottom-action {
    flex-direction: column;
    gap: 10px;
  }

  body.learn-topbar-scroll-mode .letters-bottom-action .btn {
    width: 100%;
  }
}

/* =========================================================
   Game HUD collapse + tighter playfield
   ========================================================= */

.game-hud-collapsible {
  position: fixed;
  top: max(6px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 62;
  inline-size: min(calc(100vw - 16px), var(--game-shell-max, 1480px));
  max-inline-size: calc(100vw - 16px);
  overflow: visible !important;
  pointer-events: none;
  transition: padding 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.word-builder-topbar.game-hud-collapsible,
.match-modern-topbar.game-hud-collapsible {
  display: block;
}

.letter-hunt-hud-bundle.game-hud-collapsible {
  inline-size: min(calc(100vw - 16px), 1320px);
}

.game-hud-collapsible-content {
  overflow: hidden;
  transition: max-height 0.22s ease, opacity 0.18s ease, transform 0.18s ease, margin 0.18s ease;
  pointer-events: auto;
}

.word-builder-topbar.game-hud-collapsible .game-hud-collapsible-content {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.match-modern-topbar.game-hud-collapsible .game-hud-collapsible-content {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.game-hud-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  inline-size: fit-content;
  min-block-size: 42px;
  padding: 0.45rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #18395f;
  box-shadow: 0 10px 24px rgba(32, 80, 137, 0.12);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  pointer-events: auto;
}

.game-hud-toggle-icon {
  display: inline-block;
  inline-size: 12px;
  block-size: 12px;
  border-inline-end: 3px solid currentColor;
  border-block-end: 3px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.2s ease;
}

.game-hud-collapsible.is-expanded .game-hud-toggle-icon {
  transform: rotate(-135deg) translateY(-1px);
}

.game-hud-collapsible.is-collapsed {
  inline-size: auto;
  max-inline-size: calc(100vw - 16px);
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.game-hud-collapsible.is-collapsed::before {
  display: none !important;
}

.game-hud-collapsible.is-collapsed .game-hud-collapsible-content {
  max-height: 0 !important;
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  pointer-events: none;
  margin: 0 !important;
}

.game-hud-collapsible.is-expanded .game-hud-collapsible-content {
  max-height: 640px;
  opacity: 1;
  transform: none;
}

.game-hud-collapsible.is-expanded .game-hud-toggle {
  margin-bottom: 0.55rem;
}

.game-hud-collapsible.is-collapsed .game-hud-toggle {
  margin: 0;
}

body.game-page-hud-collapsed :is(
  .animal-game-main,
  .build-home-main,
  .clothes-game-main,
  .color-game-main,
  .days-week-game-main,
  .letter-hunt-main,
  .match-modern-main,
  .memory-main,
  .shape-game-main,
  .time-routine-game-main,
  .word-builder-main
) {
  padding-top: max(3rem, calc(env(safe-area-inset-top) + 2.75rem)) !important;
}

body.game-page-hud-collapsed :is(
  .animal-game-section,
  .build-home-section,
  .clothes-game-section,
  .color-game-section,
  .days-week-game-section,
  .shape-game-section,
  .time-routine-game-section
) {
  padding-top: max(2.7rem, calc(env(safe-area-inset-top) + 2.45rem)) !important;
}

@media (max-width: 980px) {
  .word-builder-topbar.game-hud-collapsible .game-hud-collapsible-content,
  .match-modern-topbar.game-hud-collapsible .game-hud-collapsible-content {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .game-hud-toggle-text {
    font-size: 0.92rem;
  }
}

@media (max-width: 720px) {
  .game-hud-collapsible {
    inline-size: calc(100vw - 12px);
    max-inline-size: calc(100vw - 12px);
    top: max(4px, env(safe-area-inset-top));
  }

  .game-hud-toggle {
    min-block-size: 38px;
    padding: 0.38rem 0.8rem;
    font-size: 0.88rem;
  }
}

/* =========================================================
   Colors game: image smaller, choices beside image
   ========================================================= */

.color-game-shell {
  align-items: start;
}

.color-game-stage {
  align-content: start;
}

.color-game-image-frame img {
  width: min(100%, 340px);
}

.color-game-palette {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.color-game-side-options {
  display: grid;
  gap: 0.8rem;
}

.color-game-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.color-game-palette-head {
  padding-top: 0.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.45);
}

.color-game-palette-text {
  margin-top: 0.15rem;
}

.color-game-options {
  grid-template-columns: 1fr;
}

.color-game-option {
  min-height: 86px;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  text-align: left;
  padding: 0.9rem 1rem;
}

.color-game-option strong,
.color-game-option span {
  text-align: left;
  width: 100%;
}

.color-game-option-drop {
  width: 54px;
  height: 54px;
}

@media (max-width: 980px) {
  .color-game-shell {
    grid-template-columns: 1fr;
  }

  .color-game-image-frame img {
    width: min(100%, 300px);
  }
}

@media (max-width: 640px) {
  .color-game-option {
    min-height: 78px;
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .color-game-option-drop {
    width: 48px;
    height: 48px;
  }
}

/* =========================================================
   Shared speaking-card games: image + actions side by side
   ========================================================= */

@media (min-width: 1100px) {
  :is(
    .animal-sound-game-body,
    .places-game-body,
    .transport-game-body,
    .food-game-body,
    .body-parts-game-body,
    .number-game-body
  ) .animal-game-stage {
    grid-template-columns: minmax(250px, 0.82fr) minmax(0, 1.18fr);
    grid-template-areas:
      "head head"
      "image prompt"
      "image transcript"
      "image feedback"
      "image helper"
      "image choices"
      "image mic";
    align-items: start;
    gap: 0.9rem 1rem;
  }

  :is(
    .animal-sound-game-body,
    .places-game-body,
    .transport-game-body,
    .food-game-body,
    .body-parts-game-body,
    .number-game-body
  ) .animal-game-stage-head {
    grid-area: head;
  }

  :is(
    .animal-sound-game-body,
    .places-game-body,
    .transport-game-body,
    .food-game-body,
    .body-parts-game-body,
    .number-game-body
  ) .animal-game-image-frame {
    grid-area: image;
    align-self: start;
  }

  :is(
    .animal-sound-game-body,
    .places-game-body,
    .transport-game-body,
    .food-game-body,
    .body-parts-game-body,
    .number-game-body
  ) .animal-game-image-frame img {
    width: min(100%, 320px);
    max-height: 280px;
    object-fit: contain;
  }

  :is(
    .animal-sound-game-body,
    .places-game-body,
    .transport-game-body,
    .food-game-body,
    .body-parts-game-body,
    .number-game-body
  ) .animal-game-prompt-card {
    grid-area: prompt;
  }

  :is(
    .animal-sound-game-body,
    .places-game-body,
    .transport-game-body,
    .food-game-body,
    .body-parts-game-body,
    .number-game-body
  ) .animal-game-transcript-card {
    grid-area: transcript;
  }

  :is(
    .animal-sound-game-body,
    .places-game-body,
    .transport-game-body,
    .food-game-body,
    .body-parts-game-body,
    .number-game-body
  ) .animal-game-feedback {
    grid-area: feedback;
    margin: 0;
  }

  :is(
    .animal-sound-game-body,
    .places-game-body,
    .transport-game-body,
    .food-game-body,
    .body-parts-game-body,
    .number-game-body
  ) .animal-game-choice-head {
    grid-area: helper;
  }

  :is(
    .animal-sound-game-body,
    .places-game-body,
    .transport-game-body,
    .food-game-body,
    .body-parts-game-body,
    .number-game-body
  ) .animal-game-choice-grid {
    grid-area: choices;
  }

  :is(
    .animal-sound-game-body,
    .places-game-body,
    .transport-game-body,
    .food-game-body,
    .body-parts-game-body,
    .number-game-body
  ) .place-game-mic-wrap {
    grid-area: mic;
    margin: 0;
  }
}

body.game-layout-page.game-device-touch.game-device-landscape .color-game-shell {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.7fr) !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .color-game-options {
  grid-template-columns: 1fr !important;
}

body.game-layout-page.game-device-touch.game-device-landscape .color-game-image-frame img {
  width: min(100%, 240px) !important;
}
