:root {
  /* Bảng màu vui nhộn theo Đặc tả 06 */
  --c-yellow: #ffd23f;
  --c-green: #3bb273;
  --c-blue: #2f80ed;
  --c-orange: #ff8c42;
  --c-purple: #8e5cd9;
  --c-pink: #ff6b9a;
  --c-cream: #fff6cc;
  --c-ink: #1d3a8a;

  /* Biến tương thích cho các module và game */
  --color-primary: #2f80ed;
  --color-primary-light: #e8f2ff;
  --color-primary-dark: #1d3a8a;
  --color-accent: #ffd23f;
  --color-accent-hover: #f5b800;
  --color-success: #3bb273;
  --color-success-bg: #dcfce7;
  --color-danger: #ef4444;
  --color-danger-bg: #fee2e2;
  --color-bg: #f0f7ff;
  --color-surface: #ffffff;
  --color-text: #1d3a8a;
  --color-text-muted: #2b458c;
  --color-border: #dce4f2;
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-xl: 32px;
  --shadow-sm: 0 6px 16px rgba(29, 58, 138, 0.1);
  --shadow-md: 0 12px 28px rgba(29, 58, 138, 0.16);
  --font-sans: ui-rounded, "SF Pro Rounded", "Segoe UI", "Roboto", "Noto Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--c-ink);
  background-color: #c9dcea;
  background-image:
    radial-gradient(circle at 15% 18%, rgba(255, 255, 255, 0.45) 0 2px, transparent 3px),
    radial-gradient(circle at 38% 10%, rgba(255, 255, 255, 0.38) 0 2.5px, transparent 3.5px),
    radial-gradient(circle at 64% 22%, rgba(255, 255, 255, 0.4) 0 2px, transparent 3px),
    radial-gradient(circle at 84% 14%, rgba(255, 255, 255, 0.42) 0 2.5px, transparent 3.5px),
    radial-gradient(circle at 24% 36%, rgba(255, 255, 255, 0.35) 0 1.8px, transparent 2.8px),
    radial-gradient(circle at 76% 40%, rgba(255, 255, 255, 0.35) 0 2px, transparent 3px),
    repeating-linear-gradient(
      180deg,
      transparent 0px,
      transparent 18px,
      rgba(255, 255, 255, 0.14) 18px,
      rgba(255, 255, 255, 0.14) 21px
    ),
    linear-gradient(180deg, #eaf2f8 0%, #c9dcea 54%, #9fbdd6 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* Cảnh Bắc Âu Phần Lan dịu nhẹ cố định phía sau: chữ thập Bắc Âu mờ + hàng cây thông ven hồ */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
}

body::before {
  inset: 0;
  background-image:
    linear-gradient(
      90deg,
      transparent 0%,
      transparent 28%,
      rgba(255, 255, 255, 0.55) 28%,
      rgba(255, 255, 255, 0.55) 35.5%,
      transparent 35.5%,
      transparent 100%
    ),
    linear-gradient(
      180deg,
      transparent 0%,
      transparent 34%,
      rgba(255, 255, 255, 0.55) 34%,
      rgba(255, 255, 255, 0.55) 44%,
      transparent 44%,
      transparent 100%
    ),
    linear-gradient(
      180deg,
      transparent 62%,
      rgba(255, 255, 255, 0.22) 63%,
      transparent 64.5%,
      transparent 72%,
      rgba(255, 255, 255, 0.2) 73%,
      transparent 74.5%,
      transparent 82%,
      rgba(255, 255, 255, 0.18) 83%,
      transparent 84.5%
    );
  opacity: 0.22;
}

body::after {
  left: 0;
  right: 0;
  bottom: 0;
  height: 150px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 150' preserveAspectRatio='none'%3E%3Cpath fill='%233b556e' d='M0 150 L0 128 L16 128 L30 92 L22 92 L36 62 L29 62 L42 32 L55 62 L48 62 L62 92 L54 92 L68 128 L94 128 L106 98 L99 98 L111 70 L105 70 L116 44 L127 70 L121 70 L133 98 L126 98 L138 128 L166 128 L180 88 L171 88 L186 54 L178 54 L192 22 L206 54 L198 54 L213 88 L204 88 L218 128 L248 128 L260 96 L253 96 L266 68 L260 68 L272 40 L284 68 L278 68 L291 96 L284 96 L296 128 L320 128 L320 150 Z'/%3E%3Cpath fill='%23293e52' d='M0 150 L0 134 L10 106 L4 106 L15 80 L9 80 L20 52 L31 80 L25 80 L36 106 L30 106 L42 134 L62 134 L75 100 L68 100 L80 72 L73 72 L85 44 L97 72 L90 72 L102 100 L95 100 L108 134 L134 134 L146 104 L140 104 L151 78 L145 78 L156 50 L167 78 L161 78 L172 104 L166 104 L178 134 L208 134 L221 98 L214 98 L227 68 L220 68 L232 38 L244 68 L237 68 L250 98 L243 98 L256 134 L282 134 L293 108 L287 108 L298 82 L292 82 L302 58 L312 82 L306 82 L317 108 L311 108 L320 134 L320 150 Z'/%3E%3Ccircle cx='28' cy='22' r='1.8' fill='%23ffffff' opacity='0.65'/%3E%3Ccircle cx='88' cy='16' r='2.2' fill='%23ffffff' opacity='0.55'/%3E%3Ccircle cx='152' cy='28' r='1.6' fill='%23ffffff' opacity='0.6'/%3E%3Ccircle cx='226' cy='18' r='2' fill='%23ffffff' opacity='0.6'/%3E%3Ccircle cx='286' cy='26' r='1.8' fill='%23ffffff' opacity='0.55'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: bottom center;
  background-size: 320px 150px;
  opacity: 0.3;
}

body {
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 0;
}

.container {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Hiệu ứng nảy nhẹ khi xuất hiện */
@keyframes playfulPopIn {
  0% {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
  }
  70% {
    opacity: 1;
    transform: scale(1.02) translateY(-2px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes playfulShake {
  0%, 100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}

/* Tiêu đề kiểu "logo": chữ to, màu xanh đậm #1d3a8a, viền trắng dày và bóng đổ */
.logo-title,
.site-title,
.shell-title {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 4.8vw, 3.2rem);
  font-weight: 800;
  line-height: 1.12;
  color: var(--c-ink);
  letter-spacing: 0.01em;
  paint-order: stroke fill;
  -webkit-text-stroke: 6px #ffffff;
  text-shadow:
    -2px -2px 0 #ffffff,
     2px -2px 0 #ffffff,
    -2px  2px 0 #ffffff,
     2px  2px 0 #ffffff,
     0px  4px 0 rgba(29, 58, 138, 0.24),
     0px  7px 14px rgba(29, 58, 138, 0.22);
}

/* Focus rõ ràng cho bàn phím */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 4px solid var(--c-yellow);
  outline-offset: 3px;
}

/* Nút bấm chung: cao tối thiểu 52px, chữ 1.15rem, bo tròn hoàn toàn, nút bấm 3D */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  min-width: 52px;
  padding: 10px 22px;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 999px;
  border: 3px solid #1d3a8a;
  border-bottom-width: 7px;
  background-color: var(--c-yellow);
  color: var(--c-ink);
  cursor: pointer;
  transition: transform 0.1s ease, border-bottom-width 0.1s ease, filter 0.15s ease, background-color 0.15s ease;
  user-select: none;
  box-shadow: 0 4px 10px rgba(29, 58, 138, 0.15);
}

.btn:hover:not(:disabled) {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(2px);
  border-bottom-width: 3px;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

.btn-primary {
  background-color: var(--c-yellow);
  color: var(--c-ink);
  border-color: #d99b00;
}

.btn-primary:hover:not(:disabled) {
  background-color: #ffde66;
  color: var(--c-ink);
}

.btn-secondary {
  background-color: var(--c-blue);
  color: #ffffff;
  border-color: #1b5bbf;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #4692f5;
  color: #ffffff;
}

.btn-outline {
  background-color: #ffffff;
  color: var(--c-ink);
  border-color: #94a3b8;
}

.btn-outline:hover:not(:disabled) {
  background-color: var(--c-cream);
  border-color: var(--c-ink);
}

.btn-large {
  min-height: 58px;
  padding: 12px 32px;
  font-size: 1.25rem;
}

.btn-icon {
  min-width: 52px;
  min-height: 52px;
  padding: 8px 14px;
  font-size: 1.25rem;
  background-color: var(--c-blue);
  color: #ffffff;
  border-color: #1b5bbf;
  border-radius: 999px;
}

.btn-icon:hover:not(:disabled) {
  background-color: #4692f5;
}

/* Đầu trang chủ: dải trắng bo tròn ở trên cùng */
.site-header {
  padding: 18px 0 8px;
  background: transparent;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 26px;
  background-color: #ffffff;
  border: 6px solid var(--color-border);
  border-radius: 32px;
  box-shadow: var(--shadow-md);
}

.brand-titles {
  flex: 0 1 auto;
}

.site-title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 800;
  color: var(--c-ink);
}

.site-subtitle {
  margin: 2px 0 0;
  font-size: 1.05rem;
  color: var(--c-ink);
  font-weight: 700;
}

.site-header .mute-toggle-btn {
  background-color: var(--c-yellow);
  color: var(--c-ink);
  border-color: #d99b00;
  min-height: 48px;
  padding: 10px 20px;
}

.header-nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  position: relative;
  z-index: 40;
}

.nav-dropdown {
  position: relative;
}

.nav-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 22px;
  background-color: #f4f8ff;
  color: var(--c-ink);
  border: 3px solid #cbd9f0;
  border-bottom-width: 6px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.14s ease, background-color 0.14s ease, border-color 0.14s ease;
}

.nav-tab-btn:hover,
.nav-tab-btn.is-open {
  background-color: #e8f2ff;
  border-color: var(--c-blue);
  transform: translateY(-1px);
}

.nav-tab-btn.is-open .nav-caret {
  transform: rotate(180deg);
}

.nav-caret {
  display: inline-block;
  font-size: 0.85em;
  transition: transform 0.16s ease;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 260px;
  max-width: min(320px, calc(100vw - 32px));
  max-height: 70vh;
  overflow-y: auto;
  padding: 8px;
  background-color: #ffffff;
  border: 4px solid var(--color-border);
  border-radius: 22px;
  box-shadow: 0 18px 36px rgba(29, 58, 138, 0.22);
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 100;
}

.nav-dropdown-menu[hidden] {
  display: none;
}

.nav-dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--c-ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}

.nav-dropdown-item:hover {
  background-color: #f0f7ff;
  border-color: #cfe0ff;
}

.nav-dropdown-item.is-selected {
  background-color: #fff8dc;
  border-color: var(--c-yellow);
}

.nav-item-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.nav-item-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.nav-item-title {
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.25;
}

.nav-item-sub {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-text-muted);
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item-check {
  font-size: 1rem;
  font-weight: 900;
  color: var(--c-green);
  flex-shrink: 0;
}

.nav-dropdown-empty {
  padding: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-align: center;
}

@media (max-width: 820px) {
  .header-nav {
    order: 3;
    flex: 1 0 100%;
    justify-content: center;
    padding-top: 4px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 14px 16px;
    gap: 10px;
  }

  .header-nav {
    gap: 8px;
  }

  .nav-tab-btn {
    flex: 1 1 0;
    min-height: 44px;
    padding: 8px 12px;
    font-size: 0.94rem;
  }

  .site-header .mute-toggle-btn {
    min-height: 44px;
    padding: 8px 14px;
  }

  .nav-dropdown[data-dropdown="topics"] .nav-dropdown-menu {
    left: auto;
    right: 0;
  }
}

/* Nội dung chính nằm trong khung trắng lớn bo góc 32px, viền xám nhạt dày 6px, đổ bóng mềm */
.main-content {
  flex: 1;
  padding-top: 16px;
  padding-bottom: 36px;
}

.playful-board,
.card {
  background-color: #ffffff;
  border: 6px solid var(--color-border);
  border-radius: 32px;
  padding: 28px;
  box-shadow: 0 16px 36px rgba(29, 58, 138, 0.16), 0 4px 12px rgba(29, 58, 138, 0.08);
  animation: playfulPopIn 0.32s ease-out;
}

.home-section {
  margin-bottom: 32px;
}

.home-section:last-child {
  margin-bottom: 0;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  background-color: var(--c-orange);
  color: #ffffff;
  font-weight: 800;
  font-size: 1rem;
  border-radius: 999px;
  border: 3px solid #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.section-title {
  margin: 0;
  font-size: clamp(1.4rem, 3.2vw, 1.85rem);
  font-weight: 800;
  color: var(--c-ink);
}

/* Chọn chủ đề: 2 thẻ chủ đề to, emoji cỡ 64px, viền vàng dày + dấu ✓ lớn ở góc */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.topic-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 120px;
  padding: 20px 22px;
  text-align: left;
  font-family: inherit;
  background-color: var(--c-cream);
  border: 6px solid var(--color-border);
  border-radius: 28px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
  animation: playfulPopIn 0.35s ease-out;
}

.topic-card:hover {
  transform: scale(1.03);
  border-color: var(--c-blue);
  box-shadow: var(--shadow-md);
}

.topic-card.is-selected {
  border-color: var(--c-yellow);
  background-color: #fffbeb;
  box-shadow: 0 0 0 4px rgba(255, 210, 63, 0.45), var(--shadow-md);
}

.topic-card-icon {
  font-size: 64px;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.12));
}

.topic-card-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.topic-card-name-vi {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--c-ink);
  line-height: 1.2;
}

.topic-card-name-fi {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-purple);
}

.topic-card-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  padding: 4px 14px;
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  background-color: var(--c-blue);
  border-radius: 999px;
}

.topic-card-check {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background-color: var(--c-green);
  color: #ffffff;
  border: 4px solid #ffffff;
  font-size: 1.5rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.topic-card.is-selected .topic-card-check {
  opacity: 1;
  transform: scale(1);
}

/* Lưới game: 2 cột trên máy tính, 1 cột dưới 640px, thẻ rộng tối đa 360px */
.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 360px));
  justify-content: center;
  gap: 24px;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
  font-family: inherit;
  background-color: var(--c-cream);
  border: 6px solid var(--color-border);
  border-radius: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  animation: playfulPopIn 0.38s ease-out;
}

.game-card.is-ready {
  cursor: pointer;
}

.game-card.is-ready:hover {
  transform: scale(1.03);
  border-color: var(--game-accent, var(--c-blue));
  box-shadow: var(--shadow-md);
}

.game-card.is-ready:active {
  transform: scale(0.99) translateY(2px);
}

.game-card.is-disabled {
  background-color: #f1f5f9;
  color: var(--c-ink);
  cursor: not-allowed;
  opacity: 0.7;
}

.game-card-title {
  margin: 0 0 12px;
  font-size: clamp(1.65rem, 3.5vw, 2.05rem);
  font-weight: 800;
  color: var(--game-accent, var(--c-ink));
  text-align: center;
}

/* Ảnh minh hoạ lớn tỷ lệ 4:3 bằng CSS / emoji */
.game-art {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  border: 4px solid #ffffff;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(29, 58, 138, 0.1);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

/* Minh hoạ 1: Ghép thẻ (4 thẻ úp/ngửa có 🍞🥛) */
.game-art--memory-match {
  background: linear-gradient(135deg, #bae6fd 0%, #60a5fa 100%);
  padding: 12px;
}

.art-mm-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  width: 88%;
  height: 88%;
}

.art-mm-card {
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.art-mm-card--up {
  background-color: #ffffff;
  color: var(--c-ink);
}

.art-mm-card--fi {
  border: 3px solid var(--c-blue);
}

.art-mm-card--vi {
  border: 3px solid var(--c-orange);
}

.art-mm-card--down {
  background: repeating-linear-gradient(
    45deg,
    var(--c-purple),
    var(--c-purple) 8px,
    var(--c-pink) 8px,
    var(--c-pink) 16px
  );
  border: 3px solid #ffffff;
  color: #ffffff;
}

.art-mm-emoji {
  font-size: 1.5rem;
  line-height: 1;
}

.art-mm-word {
  font-size: 1rem;
}

.art-mm-q {
  font-size: 1.6rem;
  font-weight: 900;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

/* Minh hoạ 2: Bắn từ (kiểu Fast English: thanh từ "kiitos" + 3 thẻ hình sáng màu) */
.game-art--word-shooter {
  background: linear-gradient(135deg, #ede9fe 0%, #c4b5fd 55%, #a78bfa 100%);
  padding: 12px;
}

.art-ws-scene {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.art-ws-prompt {
  padding: 5px 20px;
  background-color: #ffffff;
  color: var(--c-ink);
  border: 3px solid var(--c-purple);
  border-radius: 999px;
  font-weight: 900;
  font-size: 1.15rem;
  line-height: 1.2;
  box-shadow: 0 4px 8px rgba(29, 58, 138, 0.14);
}

.art-ws-cards {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.art-ws-card {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background-color: #ffffff;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 10px rgba(29, 58, 138, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  line-height: 1;
}

.art-ws-card:nth-child(1) {
  background-color: #fef3c7;
}

.art-ws-card:nth-child(3) {
  background-color: #e0f2fe;
}

.art-ws-card--hit {
  background-color: #dcfce7;
  border-color: var(--c-green);
  transform: scale(1.06);
  box-shadow: 0 0 0 3px rgba(59, 178, 115, 0.3), 0 6px 12px rgba(29, 58, 138, 0.18);
}

.art-ws-check {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background-color: var(--c-green);
  color: #ffffff;
  border: 2px solid #ffffff;
  font-size: 0.85rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.art-ws-star {
  position: absolute;
  font-size: 1.2rem;
}

.art-ws-star--1 {
  top: 12%;
  left: 14%;
}

.art-ws-star--2 {
  top: 20%;
  right: 14%;
}

.art-ws-meteor {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background-color: var(--c-orange);
  border: 3px solid var(--c-yellow);
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.art-ws-meteor--1 {
  top: 16%;
  left: 16%;
}

.art-ws-meteor--2 {
  top: 38%;
  right: 14%;
}

.art-ws-laser {
  position: absolute;
  bottom: 28%;
  left: 50%;
  width: 4px;
  height: 36px;
  background-color: var(--c-yellow);
  border-radius: 999px;
  transform: translateX(-50%);
  box-shadow: 0 0 10px var(--c-yellow);
}

.art-ws-rocket {
  position: absolute;
  bottom: 6%;
  left: 50%;
  transform: translateX(-50%) rotate(-45deg);
  font-size: 2.3rem;
}

/* Minh hoạ 3: Nghe và gõ (tai 🎧 + bàn phím ä ö) */
.game-art--listen-type {
  background: linear-gradient(135deg, #fbcfe8 0%, #f472b6 100%);
}

.art-lt-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
}

.art-lt-headphone-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.art-lt-headphone {
  font-size: 2.8rem;
  line-height: 1;
}

.art-lt-wave {
  font-size: 1.4rem;
}

.art-lt-keys {
  display: flex;
  align-items: center;
  gap: 10px;
}

.art-lt-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background-color: var(--c-purple);
  color: #ffffff;
  border: 3px solid #ffffff;
  border-bottom-width: 5px;
  font-size: 1.3rem;
  font-weight: 800;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.art-lt-key--sm {
  width: 38px;
  height: 38px;
  font-size: 1.1rem;
}

/* Minh hoạ 4: Xếp câu (kiểu Falling Clouds: đám mây từ trên bầu trời + thảm cỏ) */
.game-art--sentence-builder {
  background: linear-gradient(180deg, #bae6fd 0%, #e0f2fe 74%, #bbf7d0 100%);
  padding: 0;
}

.art-sb-scene {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  padding: 12px 10px 26px;
}

.art-sb-clouds {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}

.art-sb-cloud {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  background-color: #ffffff;
  color: var(--c-ink);
  font-weight: 800;
  font-size: 0.95rem;
  border: 3px solid #e0f2fe;
  box-shadow: 0 4px 10px rgba(29, 58, 138, 0.14);
}

.art-sb-swap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background-color: var(--c-orange);
  color: #ffffff;
  border: 2px solid #ffffff;
  font-weight: 900;
  font-size: 0.95rem;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
}

.art-sb-ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22px;
  background: linear-gradient(180deg, #4ade80 0%, var(--c-green) 100%);
  border-top: 3px solid #bbf7d0;
  z-index: 1;
}

.art-sb-pieces {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.art-sb-piece {
  padding: 6px 12px;
  border-radius: 14px;
  color: #ffffff;
  font-weight: 800;
  font-size: 1rem;
  border: 3px solid #ffffff;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.art-sb-piece--1 {
  background-color: var(--c-blue);
  transform: rotate(-3deg);
}

.art-sb-piece--2 {
  background-color: var(--c-green);
  transform: rotate(2deg);
}

.art-sb-piece--3 {
  background-color: var(--c-purple);
  transform: rotate(-2deg);
}

.art-sb-slot {
  width: 84%;
  height: 22px;
  border-radius: 12px;
  border: 3px dashed var(--c-ink);
  background-color: rgba(255, 255, 255, 0.65);
}

/* Minh hoạ 5: Bong bóng đuôi cách (kiểu Grammar Bubbles: 🧑‍🎓 + 3 bong bóng óng ánh) */
.game-art--case-racer {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 50%, #bae6fd 100%);
  padding: 12px;
}

.art-cr-scene {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.art-cr-avatar {
  font-size: 2.6rem;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.16));
}

.art-cr-bubbles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

@keyframes crBubbleFloat {
  from { transform: translateY(0); }
  to { transform: translateY(-5px); }
}

.art-cr-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--c-ink);
  background: radial-gradient(circle at 30% 28%, #ffffff 0%, rgba(255, 255, 255, 0.88) 45%, rgba(186, 230, 253, 0.85) 100%);
  border: 3px solid #ffffff;
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.9), 0 4px 10px rgba(29, 58, 138, 0.15);
  animation: crBubbleFloat 1.8s ease-in-out infinite alternate;
}

.art-cr-bubble--1 {
  border-color: var(--c-blue);
}

.art-cr-bubble--2 {
  border-color: var(--c-green);
  animation-delay: 0.3s;
}

.art-cr-bubble--3 {
  border-color: var(--c-purple);
  animation-delay: 0.6s;
}

.art-cr-road {
  position: relative;
  width: 68%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 6px;
}

.art-cr-gates {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  z-index: 2;
}

.art-cr-gate {
  padding: 3px 4px;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 800;
  font-size: 1rem;
  border: 2px solid #ffffff;
  text-align: center;
}

.art-cr-gate--1 {
  background-color: var(--c-blue);
}

.art-cr-gate--2 {
  background-color: var(--c-orange);
}

.art-cr-gate--3 {
  background-color: var(--c-purple);
}

.art-cr-lanes {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  pointer-events: none;
}

.art-cr-lane:not(:last-child) {
  border-right: 3px dashed rgba(255, 255, 255, 0.75);
}

.art-cr-car {
  font-size: 2.3rem;
  line-height: 1;
  text-align: center;
  z-index: 2;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.35));
}

/* Minh hoạ 6: Nhảy số (quái vật 👾 và 3 khối số) */
.game-art--numbers {
  background: linear-gradient(180deg, #bae6fd 0%, #7dd3fc 55%, #38bdf8 100%);
  position: relative;
}

.art-nm-scene {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 12px;
}

.art-nm-monster {
  position: absolute;
  top: 10%;
  left: 18%;
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.2));
  animation: nmBounce 1.6s ease-in-out infinite alternate;
}

@keyframes nmBounce {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}

.art-nm-blocks {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.art-nm-block {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 38px;
  background: #8b5a2b;
  border-top: 6px solid #48bb78;
  border-radius: 6px;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.art-nm-block--2 {
  height: 48px;
  background: #7a4e24;
  border-top-color: #38a169;
}

/* Minh hoạ 7: Quá khứ (đồng hồ cát ⏳ / chuyển động từ hiện tại sang quá khứ) */
.game-art--past-tense {
  background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 55%, #60a5fa 100%);
  position: relative;
  padding: 12px;
}

.art-pt-scene {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.art-pt-clock,
.art-pt-hourglass,
.art-pt-icon {
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.16));
}

.art-pt-cards,
.art-pt-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.art-pt-word,
.art-pt-card,
.art-pt-badge,
.art-pt-present,
.art-pt-past {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 14px;
  background-color: #ffffff;
  color: var(--c-ink);
  border: 3px solid var(--c-blue);
  font-weight: 800;
  font-size: 0.98rem;
  box-shadow: 0 3px 8px rgba(29, 58, 138, 0.15);
}

.art-pt-past,
.art-pt-word--past,
.art-pt-card--past {
  background-color: var(--c-yellow);
  border-color: #d99b00;
}

.art-pt-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--c-ink);
}

/* Minh hoạ 8: Đặt đồ (sofa 🛋️, mèo 🐈, đèn 💡) */
.game-art--prepositions {
  background: linear-gradient(180deg, #d1fae5 0%, #a7f3d0 60%, #6ee7b7 100%);
  position: relative;
  padding: 12px;
}

.art-pp-scene {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.art-pp-sofa {
  font-size: 2.4rem;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

.art-pp-cat {
  font-size: 1.8rem;
  margin-top: 14px;
}

.art-pp-lamp {
  font-size: 1.6rem;
  filter: drop-shadow(0 0 8px #fef08a);
}

.art-pp-label,
.art-pp-word {
  padding: 4px 10px;
  border-radius: 999px;
  background-color: #ffffff;
  color: var(--c-ink);
  border: 2px solid var(--c-green);
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* Minh hoạ 9: Câu hỏi (bong bóng hỏi ❓ & đáp 💬) */
.game-art--questions {
  background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 55%, #f9a8d4 100%);
  position: relative;
  padding: 12px;
}

.art-qs-scene,
.art-qt-scene,
.art-q-scene {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.art-qs-qmark,
.art-qs-icon,
.art-qt-icon {
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.16));
}

.art-qs-bubble,
.art-qs-chip,
.art-qs-card,
.art-qt-bubble,
.art-qt-card {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 16px;
  background-color: #ffffff;
  color: var(--c-ink);
  border: 3px solid var(--c-pink);
  font-weight: 800;
  font-size: 0.98rem;
  box-shadow: 0 3px 8px rgba(29, 58, 138, 0.14);
}

.art-qs-bubble--a,
.art-qs-card--a,
.art-qt-bubble--a {
  background-color: var(--c-cream);
  border-color: var(--c-purple);
}

/* Minh hoạ 10: Một ngày (bình minh 🌅, giường 🛏️, trăng 🌙) */
.game-art--routines {
  background: linear-gradient(135deg, #fed7aa 0%, #fde047 60%, #fdba74 100%);
  position: relative;
  padding: 12px;
}

.art-rt-scene {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.art-rt-sun {
  font-size: 2.2rem;
  filter: drop-shadow(0 2px 4px rgba(234, 88, 12, 0.3));
}

.art-rt-bed {
  font-size: 2.5rem;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
}

.art-rt-moon {
  font-size: 2.2rem;
  filter: drop-shadow(0 2px 4px rgba(147, 51, 234, 0.25));
}

/* Chân thẻ game: 1 dòng mô tả ngắn + nút tròn ▶ lớn ở góc dưới phải */
.game-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
}

.game-card-footer-text {
  flex: 1;
  min-width: 0;
}

.game-card-desc {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-ink);
  line-height: 1.3;
}

.game-card-note {
  display: inline-block;
  margin: 6px 0 0;
  padding: 3px 10px;
  background-color: #ffffff;
  color: var(--c-ink);
  border: 2px solid var(--c-green);
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 800;
}

.game-card-play-btn {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background-color: var(--c-green);
  color: #ffffff;
  border: 3px solid #ffffff;
  border-bottom-width: 6px;
  border-bottom-color: #1e7e48;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  font-weight: 900;
  padding-left: 3px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.game-card.is-ready:hover .game-card-play-btn {
  background-color: var(--c-orange);
  border-bottom-color: #c25915;
  transform: scale(1.08);
}

/* Footer */
.site-footer {
  padding: 14px 0 24px;
  text-align: center;
  color: var(--c-ink);
  font-size: 1rem;
  font-weight: 800;
}

.site-footer p {
  display: inline-block;
  margin: 0;
  padding: 8px 20px;
  background-color: rgba(255, 255, 255, 0.92);
  border: 4px solid var(--color-border);
  border-radius: 999px;
}

/* =========================================================
   KHUNG GAME DÙNG CHUNG (GAME SHELL - SÂN KHẤU 4b & ĐẶC TẢ 08)
   ========================================================= */

/* Dải chủ đề gọn trên trang chủ */
.home-section--topics {
  margin-bottom: 20px;
}

.topic-grid.topic-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.topic-strip .topic-card {
  width: auto;
  flex: 1 1 240px;
  max-width: 360px;
  min-height: 82px;
  padding: 12px 18px;
}

.topic-strip .topic-card-icon {
  font-size: 48px;
}

.game-shell-container {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 10px 16px;
}

/* Khung "sân khấu" bo tròn (khoảng 4:3 trên máy tính, rộng hết màn hình trên điện thoại) */
.shell-stage-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: calc(100vh - 20px);
  min-height: 480px;
  background-color: #ffffff;
  border: 6px solid var(--color-border);
  border-radius: 32px;
  padding: 14px 22px 18px;
  box-shadow: 0 16px 36px rgba(29, 58, 138, 0.16), 0 4px 12px rgba(29, 58, 138, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
  animation: playfulPopIn 0.32s ease-out;
}

.shell-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 4px 10px;
  margin-bottom: 8px;
  border-bottom: 4px dashed var(--color-border);
}

.shell-home-btn {
  border-radius: 999px;
  font-weight: 800;
}

.shell-topbar-center {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  flex: 1 1 180px;
}

.shell-topic-badge {
  font-weight: 800;
  font-size: 1rem;
  color: var(--c-ink);
  background-color: var(--c-cream);
  padding: 6px 14px;
  border-radius: 999px;
  border: 3px solid var(--c-yellow);
}

.shell-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Nút âm thanh tròn ở góc trên phải của sân khấu */
.shell-mute-corner-btn {
  width: 54px;
  height: 54px;
  min-width: 54px;
  min-height: 54px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.45rem;
  background-color: var(--c-yellow);
  color: var(--c-ink);
  border: 3px solid #d99b00;
  border-bottom-width: 6px;
}

/* Điểm hiển thị trong huy hiệu ngôi sao ⭐ to */
.shell-score-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #fff6cc 0%, var(--c-yellow) 100%);
  color: var(--c-ink);
  padding: 6px 16px;
  border-radius: 999px;
  border: 3px solid #d99b00;
  border-bottom-width: 6px;
  font-size: 1.1rem;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(217, 155, 0, 0.22);
}

.shell-score-star {
  font-size: 1.4rem;
  line-height: 1;
}

.shell-score-value {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--c-ink);
}

/* Màn hình bắt đầu bên trong sân khấu: hiển thị MỘT màn hình tại một thời điểm theo data-step */
.shell-start-screen {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 4px 0;
  width: 100%;
}

.shell-start-screen[hidden],
.shell-play-screen[hidden],
.shell-result-screen[hidden] {
  display: none !important;
}

/* Màn hình A ('menu'): hiện tiêu đề lớn + dòng chủ đề ngắn + '▶ Chơi' / '📖 Ôn từ' + menuExtra + nút "i" */
.shell-start-screen[data-step="menu"] .shell-info-panel,
.shell-start-screen[data-step="menu"] .shell-topic-picker,
.shell-start-screen[data-step="menu"] .shell-review-panel,
.shell-start-screen[data-step="menu"] .shell-level-step-header,
.shell-start-screen[data-step="menu"] .shell-best-info,
.shell-start-screen[data-step="menu"] .shell-rules,
.shell-start-screen[data-step="menu"] .shell-difficulty,
.shell-start-screen[data-step="menu"] .ws-mode-box,
.shell-start-screen[data-step="menu"] .shell-start-btn {
  display: none !important;
}

/* Màn hình Info ('info' - Cách chơi): chỉ hiện bảng cách chơi ngắn + nút Quay lại */
.shell-start-screen[data-step="info"] .shell-title,
.shell-start-screen[data-step="info"] .shell-topic-info,
.shell-start-screen[data-step="info"] .shell-best-info,
.shell-start-screen[data-step="info"] .shell-menu-stack,
.shell-start-screen[data-step="info"] .shell-menu-extra,
.shell-start-screen[data-step="info"] .shell-menu-footer,
.shell-start-screen[data-step="info"] .shell-topic-picker,
.shell-start-screen[data-step="info"] .shell-review-panel,
.shell-start-screen[data-step="info"] .shell-level-step-header,
.shell-start-screen[data-step="info"] .shell-rules,
.shell-start-screen[data-step="info"] .shell-difficulty,
.shell-start-screen[data-step="info"] .ws-mode-box,
.shell-start-screen[data-step="info"] .shell-start-btn {
  display: none !important;
}

/* Màn hình B ('topics' - Chọn chủ đề): chỉ hiện bảng ô vuông chủ đề + nút Quay lại */
.shell-start-screen[data-step="topics"] .shell-title,
.shell-start-screen[data-step="topics"] .shell-topic-info,
.shell-start-screen[data-step="topics"] .shell-best-info,
.shell-start-screen[data-step="topics"] .shell-menu-stack,
.shell-start-screen[data-step="topics"] .shell-menu-extra,
.shell-start-screen[data-step="topics"] .shell-menu-footer,
.shell-start-screen[data-step="topics"] .shell-info-panel,
.shell-start-screen[data-step="topics"] .shell-review-panel,
.shell-start-screen[data-step="topics"] .shell-level-step-header,
.shell-start-screen[data-step="topics"] .shell-rules,
.shell-start-screen[data-step="topics"] .shell-difficulty,
.shell-start-screen[data-step="topics"] .ws-mode-box,
.shell-start-screen[data-step="topics"] .shell-start-btn {
  display: none !important;
}

/* Màn hình C ('level' - Chọn mức): chỉ hiện chọn độ khó/màn chơi/chế độ + 'Bắt đầu ▶' + nút Quay lại */
.shell-start-screen[data-step="level"] .shell-title,
.shell-start-screen[data-step="level"] .shell-menu-stack,
.shell-start-screen[data-step="level"] .shell-menu-extra,
.shell-start-screen[data-step="level"] .shell-menu-footer,
.shell-start-screen[data-step="level"] .shell-info-panel,
.shell-start-screen[data-step="level"] .shell-topic-picker,
.shell-start-screen[data-step="level"] .shell-review-panel {
  display: none !important;
}

/* Màn hình Review ('review' - Ôn từ): chỉ hiện trình xem thẻ từ + nút Quay lại */
.shell-start-screen[data-step="review"] .shell-title,
.shell-start-screen[data-step="review"] .shell-topic-info,
.shell-start-screen[data-step="review"] .shell-best-info,
.shell-start-screen[data-step="review"] .shell-menu-stack,
.shell-start-screen[data-step="review"] .shell-menu-extra,
.shell-start-screen[data-step="review"] .shell-menu-footer,
.shell-start-screen[data-step="review"] .shell-info-panel,
.shell-start-screen[data-step="review"] .shell-topic-picker,
.shell-start-screen[data-step="review"] .shell-level-step-header,
.shell-start-screen[data-step="review"] .shell-rules,
.shell-start-screen[data-step="review"] .shell-difficulty,
.shell-start-screen[data-step="review"] .ws-mode-box,
.shell-start-screen[data-step="review"] .shell-start-btn {
  display: none !important;
}

.shell-title {
  margin: 0;
  font-size: clamp(2.1rem, 4.8vw, 3.1rem);
}

.shell-topic-info {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--c-ink);
}

.shell-best-info {
  display: inline-block;
  margin: 0;
  padding: 4px 16px;
  background-color: var(--c-cream);
  color: var(--c-ink);
  border: 3px solid var(--c-yellow);
  border-radius: 999px;
  font-weight: 800;
  font-size: 1rem;
}

/* Ẩn hoàn toàn viên thuốc kỷ lục khi chưa có điểm kỷ lục (hidden hoặc rỗng) */
.shell-best-info[hidden],
.shell-best-info:empty {
  display: none !important;
}

/* Cột các nút viên thuốc lớn xếp dọc */
.shell-menu-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 320px;
  margin: 6px 0 0;
}

.shell-menu-pill {
  width: 100%;
  min-height: 58px;
  font-size: 1.35rem;
  font-weight: 900;
  border-radius: 999px;
}

.shell-play-btn {
  background-color: var(--c-green);
  color: #ffffff;
  border-color: #1e7e48;
}

.shell-play-btn:hover:not(:disabled) {
  background-color: #48c783;
  color: #ffffff;
}

.shell-review-btn {
  background-color: var(--c-purple);
  color: #ffffff;
  border-color: #5b21b6;
}

.shell-review-btn:hover:not(:disabled) {
  background-color: #9f6ee6;
  color: #ffffff;
}

.shell-menu-extra {
  width: 100%;
  max-width: 440px;
  margin: 4px auto 0;
}

.shell-menu-extra:empty,
.shell-menu-extra[hidden] {
  display: none !important;
}

/* Chân menu: nút "i" ở góc dưới trái */
.shell-menu-footer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: auto;
  padding-top: 6px;
}

.shell-menu-footer[hidden] {
  display: none !important;
}

.shell-info-btn {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 50%;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 1.35rem;
  font-weight: 900;
  background-color: var(--c-blue);
  color: #ffffff;
  border: 3px solid #1b5bbf;
  border-bottom-width: 6px;
}

/* Bảng "Cách chơi" (info-panel), "Chọn chủ đề" (topic-picker) và "Ôn từ" (review-panel) */
.shell-info-panel,
.shell-topic-picker,
.shell-review-panel {
  width: 100%;
  max-width: 600px;
  padding: 14px 18px;
  background-color: var(--c-cream);
  border: 4px solid var(--c-yellow);
  border-radius: 26px;
  box-shadow: var(--shadow-sm);
  margin: 0;
}

.shell-info-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.shell-info-item {
  padding: 10px 14px;
  background-color: #ffffff;
  border: 3px solid var(--color-border);
  border-radius: 16px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-ink);
}

.shell-level-step-header {
  width: 100%;
  max-width: 560px;
}

.shell-info-panel[hidden],
.shell-topic-picker[hidden],
.shell-review-panel[hidden],
.shell-level-step-header[hidden] {
  display: none !important;
}

.shell-subpanel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.shell-subpanel-header .shell-section-subtitle {
  margin: 0;
  font-size: 1.25rem;
}

.shell-step-heading {
  margin: 0;
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
}

.shell-subpanel-back {
  min-height: 44px;
  padding: 6px 14px;
  font-size: 1rem;
}

/* Phân trang chủ đề (topic-prev, topic-next) */
.shell-topic-pager {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.shell-topic-page-btn {
  min-width: 42px;
  min-height: 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  font-size: 1rem;
  border-radius: 50%;
}

.shell-topic-page-btn.is-disabled,
.shell-topic-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.shell-topic-page-indicator {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--c-ink);
  min-width: 38px;
  text-align: center;
}

/* Các ô chủ đề vuông gọn (~140px trên máy tính, 2 ô mỗi hàng trên điện thoại) */
.shell-topic-tiles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.shell-topic-tile {
  position: relative;
  width: 132px;
  height: 132px;
  aspect-ratio: 1 / 1;
  min-height: 0;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background-color: #ffffff;
  border: 4px solid var(--color-border);
  border-radius: 22px;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.shell-topic-tile:hover {
  transform: scale(1.03);
  border-color: var(--c-blue);
  box-shadow: var(--shadow-md);
}

.shell-topic-tile.is-selected {
  border-color: var(--c-yellow);
  background-color: #fffbeb;
  box-shadow: 0 0 0 4px rgba(255, 210, 63, 0.45), var(--shadow-sm);
}

.shell-topic-tile-emoji {
  font-size: 40px;
  line-height: 1;
}

.shell-topic-tile-name {
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.15;
  color: var(--c-ink);
}

.shell-topic-tile-fi {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--c-purple);
}

.shell-topic-tile-check {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--c-green);
  color: #ffffff;
  border: 3px solid #ffffff;
  font-size: 1rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.shell-topic-tile.is-selected .shell-topic-tile-check {
  opacity: 1;
  transform: scale(1);
}

/* Trình xem thẻ ghi nhớ "Ôn từ" (emoji lớn, từ Phần Lan, nghĩa Việt, nút T, 🔊, mũi tên trước/sau) */
.shell-review-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shell-review-counter {
  font-weight: 900;
  font-size: 1rem;
  color: var(--c-ink);
  background-color: #ffffff;
  padding: 4px 12px;
  border-radius: 999px;
  border: 2px solid var(--c-blue);
}

.shell-review-text-toggle {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.15rem;
  font-weight: 900;
  background-color: #ffffff;
  color: var(--c-ink);
  border: 3px solid var(--c-blue);
  border-bottom-width: 5px;
}

.shell-review-text-toggle.is-active {
  background-color: var(--c-blue);
  color: #ffffff;
  border-color: #1b5bbf;
}

.shell-flashcard {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 16px;
  background-color: #ffffff;
  border: 4px solid var(--c-blue);
  border-radius: 22px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}

.shell-flashcard-emoji {
  font-size: 52px;
  line-height: 1.05;
}

.shell-flashcard-fi {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--c-ink);
}

.shell-flashcard-vi {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-purple);
}

.shell-flashcard-emoji[hidden],
.shell-flashcard-fi[hidden],
.shell-flashcard-vi[hidden] {
  display: none !important;
}

.shell-flashcard--sentence {
  gap: 10px;
  padding: 18px 16px;
}

.shell-flashcard--sentence .shell-flashcard-vi {
  font-size: clamp(1.15rem, 3.2vw, 1.35rem);
  font-weight: 800;
  color: var(--c-purple);
  overflow-wrap: anywhere;
}

.shell-flashcard--sentence .shell-flashcard-fi {
  font-size: clamp(1.3rem, 3.8vw, 1.65rem);
  font-weight: 900;
  color: var(--c-ink);
  overflow-wrap: anywhere;
}

.shell-flashcard-speak {
  margin-top: 2px;
  min-height: 46px;
  padding: 6px 18px;
}

.shell-flashcard-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.shell-flashcard-arrow {
  min-width: 116px;
  min-height: 48px;
}

.shell-section-subtitle {
  margin: 0 0 6px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--c-ink);
}

.shell-rules:empty {
  display: none;
}

.shell-rules {
  width: 100%;
  max-width: 680px;
  margin: 0;
}

.shell-start-screen .cr-rules-header-actions {
  margin-top: 0;
}

.shell-start-screen .cr-rules-panel {
  max-height: 200px;
  overflow-y: auto;
  text-align: left;
}

/* Nút chọn độ khó nhiều màu (Dễ xanh lá, Vừa cam, Khó tím) có ⭐ */
.shell-difficulty {
  width: 100%;
  margin: 2px 0;
}

.shell-difficulty > .shell-section-subtitle,
.shell-difficulty .cr-level-header .shell-section-subtitle {
  display: none;
}

.shell-difficulty .cr-level-header {
  margin-bottom: 8px;
}

.shell-start-screen .ws-mode-box {
  margin-bottom: 4px;
}

.shell-difficulty-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.btn-difficulty {
  background-color: #ffffff;
  color: var(--c-ink);
  border-color: #94a3b8;
  font-size: 1.05rem;
  padding: 8px 18px;
}

.btn-difficulty--1 {
  background-color: #e6f9ef;
  border-color: var(--c-green);
  color: #0f5132;
}

.btn-difficulty--2 {
  background-color: #fff1e6;
  border-color: var(--c-orange);
  color: #7c2d12;
}

.btn-difficulty--3 {
  background-color: #f3ecff;
  border-color: var(--c-purple);
  color: #4c1d95;
}

.btn-difficulty.is-active,
.btn-difficulty--1.is-active {
  background-color: var(--c-green);
  color: #ffffff;
  border-color: #1e7e48;
  transform: scale(1.04);
}

.btn-difficulty--2.is-active {
  background-color: var(--c-orange);
  color: #ffffff;
  border-color: #c25915;
  transform: scale(1.04);
}

.btn-difficulty--3.is-active {
  background-color: var(--c-purple);
  color: #ffffff;
  border-color: #5b21b6;
  transform: scale(1.04);
}

/* Nút "Bắt đầu ▶" rất to, màu vàng, ở giữa */
.shell-start-btn {
  min-width: 240px;
  min-height: 60px;
  padding: 12px 36px;
  font-size: 1.35rem;
  font-weight: 900;
  background-color: var(--c-yellow);
  color: var(--c-ink);
  border: 4px solid #d99b00;
  border-bottom-width: 8px;
  box-shadow: 0 8px 20px rgba(255, 210, 63, 0.45);
}

/* =========================================================
   MÀN HÌNH ĐANG CHƠI & THANH DƯỚI (MENU + BÁNH RĂNG ⚙)
   ========================================================= */
.shell-play-screen {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  min-height: 0;
}

.shell-game-stage {
  flex: 1;
  width: 100%;
  min-height: 0;
  position: relative;
  z-index: 1;
}

.shell-play-bottombar {
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  pointer-events: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 3px dashed var(--color-border);
  width: 100%;
}

.shell-play-bottom-left {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.shell-play-bottom-center {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.shell-play-bottom-center:empty {
  display: none;
}

.shell-play-bottom-right {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.shell-play-bottom-right:empty {
  display: none;
}

@media (max-width: 600px) {
  .shell-play-bottom-center {
    order: -1;
    flex: 1 0 100%;
  }
}

.shell-menu-return-btn {
  min-height: 44px;
  padding: 6px 14px;
  font-size: 1rem;
}

.shell-settings-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.25rem;
}

/* Bảng Cài đặt (settings-panel) */
.shell-settings-panel {
  position: absolute;
  inset: 0;
  z-index: 30;
  background-color: rgba(29, 58, 138, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-radius: 22px;
}

.shell-settings-panel[hidden] {
  display: none !important;
}

.shell-settings-card {
  width: 100%;
  max-width: 380px;
  padding: 20px 18px;
  background-color: var(--c-cream);
  border: 4px solid var(--c-yellow);
  border-radius: 26px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.shell-settings-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shell-setting-toggle {
  width: 100%;
  min-height: 48px;
  font-size: 1.1rem;
  font-weight: 800;
}

.shell-setting-toggle.is-active {
  background-color: #e6f9ef;
  border-color: var(--c-green);
  color: #0f5132;
}

.shell-settings-back {
  min-width: 160px;
  min-height: 48px;
}

/* Màn hình Kết quả */
.shell-result-screen {
  position: relative;
  overflow: hidden;
  text-align: center;
}

.shell-result-title {
  margin: 0 0 16px;
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
}

.shell-result-summary {
  position: relative;
  padding: 24px 20px;
  margin-bottom: 24px;
  background-color: var(--c-cream);
  border: 4px solid var(--c-yellow);
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* Điểm số cực to trong ngôi sao */
.shell-result-star {
  position: relative;
  width: 128px;
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  animation: playfulPopIn 0.45s ease-out;
}

.shell-result-star-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 7.2rem;
  line-height: 1;
  filter: drop-shadow(0 6px 12px rgba(217, 155, 0, 0.35));
}

.shell-result-star-num {
  position: relative;
  z-index: 1;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--c-ink);
  paint-order: stroke fill;
  -webkit-text-stroke: 4px #ffffff;
}

.shell-result-score,
.shell-result-stat,
.shell-result-best {
  margin: 2px 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c-ink);
}

/* Ruy băng "Kỷ lục mới!" nghiêng có hiệu ứng nảy */
@keyframes ribbonBounce {
  0% {
    transform: rotate(-4deg) scale(0.7);
  }
  60% {
    transform: rotate(-4deg) scale(1.1);
  }
  100% {
    transform: rotate(-4deg) scale(1);
  }
}

.new-record-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 22px;
  background: linear-gradient(135deg, var(--c-pink) 0%, var(--c-orange) 100%);
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 900;
  border: 3px solid #ffffff;
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(255, 107, 154, 0.4);
  transform: rotate(-4deg);
  animation: ribbonBounce 0.5s ease-out;
}

/* Hiệu ứng hoa giấy (confetti) <= 2 giây */
@keyframes confettiFall {
  0% {
    opacity: 1;
    transform: translate3d(0, -20px, 0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--cf-drift, 16px), 260px, 0) rotate(320deg);
  }
}

.shell-confetti {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 280px;
  pointer-events: none;
  overflow: hidden;
  z-index: 5;
}

.shell-confetti-piece {
  position: absolute;
  top: -12px;
  left: var(--cf-left, 50%);
  width: 12px;
  height: 18px;
  border-radius: 4px;
  background-color: var(--cf-color, var(--c-yellow));
  animation: confettiFall var(--cf-duration, 1500ms) ease-out var(--cf-delay, 0ms) forwards;
}

/* Danh sách từ hiển thị dạng thẻ nhỏ có emoji */
.shell-learned-section,
.shell-mistakes-section {
  margin-bottom: 24px;
  text-align: left;
}

.shell-word-card-grid,
.shell-learned-list,
.shell-mistakes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.shell-learned-item,
.shell-mistake-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background-color: var(--c-cream);
  border: 3px solid var(--c-yellow);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  font-size: 1.05rem;
}

.shell-mistake-item {
  background-color: #fff1f2;
  border-color: var(--c-pink);
}

.shell-learned-text,
.shell-mistake-text {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
  color: var(--c-ink);
}

.shell-mistakes-empty {
  padding: 14px 18px;
  background-color: var(--color-success-bg);
  border: 3px solid var(--c-green);
  border-radius: 20px;
  font-weight: 800;
  color: #0f5132;
  text-align: center;
}

.shell-result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

/* Thông báo khi trình duyệt không có giọng đọc tiếng Phần Lan */
.speech-notice {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 640px;
  margin: 0 auto;
  padding: 12px 16px;
  background-color: var(--c-ink);
  color: #ffffff;
  border: 4px solid #ffffff;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 1000;
  font-size: 1rem;
  font-weight: 700;
}

.speech-notice-close {
  min-width: 48px;
  min-height: 48px;
  background: var(--c-yellow);
  color: var(--c-ink);
  border: 2px solid #ffffff;
  border-radius: 999px;
  font-size: 1.25rem;
  font-weight: 900;
  cursor: pointer;
  flex-shrink: 0;
}

/* Trang _demo */
.demo-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px 16px;
  background-color: var(--color-surface);
  border: 3px solid var(--color-border);
  border-radius: var(--radius-md);
}

.demo-word-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.demo-word-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background-color: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
}

.demo-word-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 180px;
}

.demo-word-emoji {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.demo-word-texts {
  min-width: 0;
  overflow-wrap: anywhere;
}

.demo-word-fi {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--c-ink);
}

.demo-word-vi {
  display: block;
  font-size: 1rem;
  color: var(--c-ink);
}

.demo-word-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Tôn trọng prefers-reduced-motion: tắt chuyển động và hoa giấy */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .topic-card:hover,
  .game-card.is-ready:hover,
  .btn:hover:not(:disabled) {
    transform: none !important;
  }

  .shell-confetti {
    display: none !important;
  }
}

/* Lưới 1 cột dưới 640px và sân khấu rộng hết màn hình trên điện thoại */
@media (max-width: 640px) {
  .topic-grid,
  .game-grid {
    grid-template-columns: 1fr;
  }

  .shell-stage-frame {
    aspect-ratio: auto;
    max-height: none;
    min-height: 0;
  }

  .shell-topic-tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 136px));
    justify-content: center;
    gap: 10px;
  }

  .shell-topic-tile {
    width: 100%;
    max-width: 136px;
    height: auto;
    aspect-ratio: 1 / 1;
    min-height: 0;
    padding: 8px 6px;
  }
}

/* Tối ưu cho màn hình nhỏ (360px): không có cuộn ngang, chữ không tràn */
@media (max-width: 480px) {
  .container {
    padding: 0 10px;
  }

  .header-inner {
    padding: 12px 14px;
    border-radius: 24px;
  }

  .playful-board,
  .card,
  .shell-stage-frame {
    padding: 10px 8px 14px;
    border-width: 4px;
    border-radius: 24px;
  }

  .game-shell-container {
    padding: 6px;
  }

  .topic-card {
    padding: 14px;
    gap: 12px;
  }

  .topic-card-icon {
    font-size: 52px;
  }

  .shell-topbar {
    padding: 4px 2px 8px;
    margin-bottom: 6px;
    gap: 6px;
  }

  .shell-home-btn {
    padding: 8px 12px;
    font-size: 0.95rem;
    min-height: 44px;
  }

  .shell-mute-corner-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    font-size: 1.2rem;
  }

  .shell-score-box {
    padding: 4px 10px;
    font-size: 0.98rem;
  }

  .shell-info-panel,
  .shell-topic-picker,
  .shell-review-panel {
    padding: 10px;
  }

  .shell-start-btn {
    width: 100%;
    min-width: 0;
  }

  .shell-word-card-grid,
  .shell-learned-list,
  .shell-mistakes-list {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   BỔ SUNG ĐẶC TẢ 09: MENU MODES & BẢNG KỶ LỤC DÙNG CHUNG
   ========================================================= */
.shell-mode-pill--1 {
  background-color: var(--c-green);
  color: #ffffff;
  border-color: #1e7e48;
}

.shell-mode-pill--1:hover:not(:disabled) {
  background-color: #48c783;
  color: #ffffff;
}

.shell-mode-pill--2 {
  background-color: var(--c-orange);
  color: #ffffff;
  border-color: #c25915;
}

.shell-mode-pill--2:hover:not(:disabled) {
  background-color: #ff9f60;
  color: #ffffff;
}

.shell-mode-pill--3 {
  background-color: var(--c-blue);
  color: #ffffff;
  border-color: #1b5bbf;
}

.shell-mode-pill--3:hover:not(:disabled) {
  background-color: #4692f5;
  color: #ffffff;
}

.shell-result-screen {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.shell-highscore-section {
  max-width: 440px;
  margin: 0 auto 24px;
  padding: 16px 18px;
  background-color: var(--c-cream);
  border: 4px solid var(--c-yellow);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}

.shell-highscore-title {
  margin: 0 0 10px;
  text-align: center;
  font-size: 1.2rem;
}

.shell-highscore-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shell-highscore-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background-color: #ffffff;
  border: 3px solid var(--color-border);
  border-radius: 16px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--c-ink);
}

.shell-highscore-row.is-current {
  border-color: var(--c-green);
  background-color: #dcfce7;
  color: #0f5132;
}

.shell-highscore-row.is-empty {
  opacity: 0.65;
}

.shell-highscore-rank {
  color: var(--c-purple);
  font-weight: 900;
}
