/* =========================================================
   BeeSpell — clean, soft, modern theme
   ========================================================= */

:root {
  /* Surfaces */
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f5f3ee;
  --border: #ebe7df;
  --border-strong: #ddd8ce;

  /* Text */
  --text: #1f1d1a;
  --text-2: #6f6a62;
  --text-3: #a39d93;

  /* Honey accent */
  --honey: #f5c443;
  --honey-strong: #e8ac1c;
  --honey-soft: #fdf3d6;
  --honey-ink: #6b4a05;

  /* Hive — enhanced high-contrast, tactile warm oat & honey */
  --hex-fill: #e8e4db;
  --hex-fill-hover: #dfdad0;
  --hex-stroke: #d3ccc0;
  --hex-stroke-hover: #c4bcb0;
  --hex-ink: #181512;
  --hex-center-fill: #f5ba23;
  --hex-center-hover: #ebb019;
  --hex-center-stroke: #dda010;
  --hex-center-stroke-hover: #cb9208;
  --hex-center-ink: #1b1202;
  --hex-shadow: 0 3px 6px -1px rgba(35, 30, 24, 0.08), 0 1px 2px rgba(35, 30, 24, 0.05);
  --hex-center-shadow: 0 4px 14px -2px rgba(220, 155, 10, 0.38), 0 1px 3px rgba(35, 30, 24, 0.08);

  /* Feedback */
  --danger: #d9534f;

  /* Effects */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(31, 29, 26, 0.04);
  --shadow: 0 1px 2px rgba(31, 29, 26, 0.04), 0 8px 24px -12px rgba(31, 29, 26, 0.10);
  --shadow-lg: 0 24px 48px -16px rgba(31, 29, 26, 0.22);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  /* Hive geometry (flat-top hexagons). Larger, centered hero focus. */
  --hex-w: 132px;
  --hex-gap: 8px;
  --hex-h: calc(var(--hex-w) * 0.866);
  --hex-step: calc(var(--hex-h) + var(--hex-gap));
  --hex-dx: calc(var(--hex-step) * 0.866);
}

[data-theme="dark"] {
  --bg: #151517;
  --surface: #1d1d20;
  --surface-2: #26262a;
  --border: #2d2d32;
  --border-strong: #3a3a40;

  --text: #f2f0ec;
  --text-2: #a7a29a;
  --text-3: #6f6b65;

  --honey: #f2c14e;
  --honey-strong: #f5cd6a;
  --honey-soft: rgba(242, 193, 78, 0.12);
  --honey-ink: #f7d988;

  /* Hive — dark mode high-contrast tactile slate & glowing amber */
  --hex-fill: #222227;
  --hex-fill-hover: #2b2b32;
  --hex-stroke: #33333c;
  --hex-stroke-hover: #40404a;
  --hex-ink: #f5f3ef;
  --hex-center-fill: #f5ba23;
  --hex-center-hover: #f7c33c;
  --hex-center-stroke: #e2a613;
  --hex-center-stroke-hover: #f5ba23;
  --hex-center-ink: #1b1202;
  --hex-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
  --hex-center-shadow: 0 4px 16px rgba(245, 186, 35, 0.35);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, 0.7);
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

/* Buttons don't inherit fonts by default — fix that globally */
button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--honey-strong);
  outline-offset: 2px;
}

svg {
  display: block;
}

/* ---------- Header ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-container {
  max-width: 1040px;
  margin: 0 auto;
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 30px;
  height: 30px;
  fill: var(--honey);
  transition: transform 0.4s var(--ease-spring);
}

.brand-mark-inner {
  fill: var(--surface);
  opacity: 0.55;
}

.brand:hover .brand-mark {
  transform: rotate(60deg);
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-name span {
  font-weight: 500;
  color: var(--text-2);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.15s var(--ease), background-color 0.15s var(--ease);
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav-link.active {
  color: var(--text);
  background: var(--surface-2);
  font-weight: 700;
}

@media (max-width: 820px) {
  .header-nav {
    display: none;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.header-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 6px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: var(--text-2);
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
}

.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.icon-btn:active {
  transform: scale(0.94);
}

/* ---------- Toolbar ---------- */
.toolbar {
  max-width: 1040px;
  width: 100%;
  margin: 20px auto 0;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.segmented-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  border-radius: 9px;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.segmented-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.9;
}

.segmented-btn:hover {
  color: var(--text);
}

.segmented-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 1px 1px rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .segmented-btn.active {
  background: var(--border-strong);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.puzzle-meta {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
}

.puzzle-meta strong {
  color: var(--text);
  font-weight: 700;
}

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}

.text-btn svg {
  width: 15px;
  height: 15px;
  stroke-width: 2;
}

.text-btn:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

/* ---------- Layout (Centered Hero, Single-Screen Fit) ---------- */
.main-content {
  flex: 1;
  max-width: 620px;
  width: 100%;
  margin: 0 auto;
  padding: 10px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.board {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

/* ---------- Rank progress ---------- */
.rank {
  width: 100%;
  max-width: 520px;
  padding: 4px 4px 0;
}

.rank-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.rank-label {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.rank-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.rank-next {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-score {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
}

.rank-score #current-score {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}

.rank-score-max {
  color: var(--text-3);
}

.rank-track {
  position: relative;
  height: 26px;
  margin: 0 13px;
}

.rank-line,
.rank-line-fill {
  position: absolute;
  top: 50%;
  left: 0;
  height: 2px;
  margin-top: -1px;
  border-radius: 2px;
}

.rank-line {
  right: 0;
  background: var(--border-strong);
}

.rank-line-fill {
  width: 0;
  background: var(--honey);
  transition: width 0.5s var(--ease);
}

.rank-nodes {
  position: absolute;
  inset: 0;
}

.rank-node {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
  transform: translate(-50%, -50%);
  transition: background-color 0.3s var(--ease);
}

.rank-node.achieved {
  background: var(--honey);
}

.rank-node.current {
  width: 28px;
  height: 28px;
  background: var(--honey);
  color: var(--hex-center-ink);
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 800;
  box-shadow: 0 0 0 4px var(--bg);
  z-index: 2;
  animation: pop 0.35s var(--ease-spring);
}

@keyframes pop {
  0% { transform: translate(-50%, -50%) scale(0.6); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* ---------- Collapsible Found Words Drawer (Single-Screen) ---------- */
.words-drawer {
  width: 100%;
  max-width: 520px;
  position: relative;
  z-index: 25;
  margin-top: 12px;
}

.words-drawer-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), background-color 0.15s var(--ease);
}

.words-drawer-toggle:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.words-drawer.open .words-drawer-toggle {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  border-color: var(--border-strong);
}

.words-drawer-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.words-drawer-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
}

.words-drawer-label strong {
  color: var(--text);
  font-weight: 800;
}

.words-drawer-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
}

.words-drawer-chips::-webkit-scrollbar {
  display: none;
}

.drawer-chip {
  text-transform: capitalize;
  padding: 2px 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.drawer-chip:hover {
  background: var(--surface);
  border-color: var(--border-strong);
}

.drawer-chip.is-pangram {
  background: var(--honey-soft);
  border-color: var(--honey);
  color: var(--honey-ink);
  font-weight: 700;
}

.drawer-chip-empty {
  font-size: 12.5px;
  color: var(--text-3);
  font-style: italic;
}

.words-drawer-arrow {
  width: 16px;
  height: 16px;
  color: var(--text-3);
  flex-shrink: 0;
  transition: transform 0.25s var(--ease);
}

.words-drawer.open .words-drawer-arrow {
  transform: rotate(180deg);
}

/* Dropdown body overlay */
.words-drawer-body {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 14px 18px 18px;
  max-height: 280px;
  overflow-y: auto;
  z-index: 50;
  animation: drawerSlideDown 0.2s var(--ease);
}

@keyframes drawerSlideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.words-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.words-drawer-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.words-drawer-hint {
  font-size: 11.5px;
  color: var(--text-3);
}

/* ---------- Typed word ---------- */
.word-input-container {
  position: relative;
  width: 100%;
  height: 48px;
  margin: 24px 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.word-input-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
}

.word-input-preview .letter-center {
  color: var(--honey-strong);
}

.word-placeholder {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-3);
}

.cursor-blink {
  display: inline-block;
  width: 2px;
  height: 34px;
  margin-left: 3px;
  border-radius: 2px;
  background: var(--honey-strong);
  animation: blink 1.1s steps(1) infinite;
}

/* Empty state: cursor sits before the placeholder text */
.cursor-blink:first-child {
  height: 22px;
  margin: 0 8px 0 0;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Toast (Positioned cleanly in open gap, z-index 100 so it never tucks behind drawer) */
.toast-msg {
  position: absolute;
  top: -14px;
  left: 50%;
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--bg);
  background: var(--text);
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity 0.2s var(--ease), transform 0.25s var(--ease-spring);
  z-index: 100;
}

.toast-msg.show {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.toast-msg.pangram-toast {
  background: var(--honey);
  color: var(--hex-center-ink);
}

.shake {
  animation: shake 0.36s var(--ease);
}

@keyframes shake {
  20%, 60% { transform: translateX(-7px); }
  40%, 80% { transform: translateX(7px); }
}

/* ---------- Hive ---------- */
.hive {
  position: relative;
  width: calc(var(--hex-dx) * 2 + var(--hex-w));
  height: calc(var(--hex-step) * 2 + var(--hex-h));
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.hex {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--hex-w);
  height: var(--hex-h);
  margin-left: calc(var(--hex-w) / -2);
  margin-top: calc(var(--hex-h) / -2);
  /* --x / --y are set inline per cell: x in columns, y in rows (0.5 = half row) */
  translate: calc(var(--x) * var(--hex-dx)) calc(var(--y) * var(--hex-step));
  pointer-events: none; /* only the painted hexagon is clickable */
  filter: drop-shadow(var(--hex-shadow));
  transition: scale 0.18s var(--ease-spring), filter 0.18s var(--ease);
}

.hex-center {
  filter: drop-shadow(var(--hex-center-shadow));
}

.hex:hover {
  filter: drop-shadow(0 6px 12px -2px rgba(35, 30, 24, 0.14));
}

.hex-center:hover {
  filter: drop-shadow(0 6px 16px -2px rgba(220, 155, 10, 0.45));
}

.hex-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.hex-svg use,
.hex-svg polygon {
  pointer-events: visiblePainted;
}

.hex-svg {
  fill: var(--hex-fill);
  stroke: var(--hex-stroke);
  stroke-width: 8;
  stroke-linejoin: round;
  transition: fill 0.15s var(--ease), stroke 0.15s var(--ease);
}

.hex-letter {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: calc(var(--hex-w) * 0.27);
  font-weight: 800;
  text-transform: uppercase;
  color: var(--hex-ink);
  pointer-events: none;
  transition: opacity 0.16s var(--ease), transform 0.16s var(--ease);
}

.hex:hover .hex-svg {
  fill: var(--hex-fill-hover);
  stroke: var(--hex-stroke-hover);
}

.hex:active {
  scale: 0.93;
}

.hex-center .hex-svg {
  fill: var(--hex-center-fill);
  stroke: var(--hex-center-stroke);
}

.hex-center:hover .hex-svg {
  fill: var(--hex-center-hover);
  stroke: var(--hex-center-stroke-hover);
}

.hex-center .hex-letter {
  color: var(--hex-center-ink);
}

.hex.pressed {
  scale: 0.93;
}

/* Shuffle: fade outer letters out and back in */
.hive.shuffling .hex:not(.hex-center) .hex-letter {
  opacity: 0;
  transform: scale(0.7);
}

/* ---------- Controls ---------- */
.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 999px;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.1s var(--ease), box-shadow 0.15s var(--ease);
}

.btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.btn:active {
  transform: scale(0.96);
}

.btn-outline,
.btn-round {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.btn-outline:hover,
.btn-round:hover {
  background: var(--surface-2);
}

.btn-outline {
  min-width: 112px;
}

.btn-round {
  width: 48px;
  padding: 0;
}

.btn-round svg {
  transition: transform 0.45s var(--ease);
}

.btn-round.rotating svg {
  transform: rotate(180deg);
}

.btn-solid {
  min-width: 112px;
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
}

.btn-solid:hover {
  box-shadow: 0 6px 16px -6px rgba(31, 29, 26, 0.45);
}

.btn-block {
  width: 100%;
}

/* Board actions: Prominent Share Score Button */
.board-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
}

.btn-share-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 20px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease), transform 0.1s var(--ease), box-shadow 0.15s var(--ease);
}

.btn-share-pill svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
  color: var(--honey-strong);
}

.btn-share-pill:hover {
  border-color: var(--honey-strong);
  background: var(--honey-soft);
  color: var(--honey-ink);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(232, 172, 28, 0.15);
}

.btn-share-pill:active {
  transform: translateY(0);
}

.keyboard-hint {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--text-3);
}

kbd {
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  color: var(--text-2);
  background: var(--surface);
}

/* ---------- Found words inside Drawer ---------- */
.words-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
}

.word-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  padding: 10px 2px;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  text-transform: capitalize;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: color 0.15s var(--ease);
  animation: fadeIn 0.3s var(--ease);
}

.word-chip:hover {
  color: var(--honey-strong);
}

.word-chip.is-pangram {
  font-weight: 700;
}

.pangram-dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--honey);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.words-empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 26px 12px 22px;
  color: var(--text-3);
}

.words-empty-state svg {
  width: 32px;
  height: 32px;
  margin-bottom: 10px;
  fill: none;
  stroke: var(--border-strong);
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.words-empty-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
}

.words-empty-text {
  margin-top: 4px;
  font-size: 13px;
}

/* ---------- SEO & About Section (Crawlable Content) ---------- */
.seo-guide {
  width: 100%;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 48px 24px;
  margin-top: 48px;
}

.seo-container {
  max-width: 820px;
  margin: 0 auto;
}

.seo-guide h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 12px;
}

.seo-lead {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-2);
  margin-bottom: 28px;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

@media (max-width: 600px) {
  .seo-grid {
    grid-template-columns: 1fr;
  }
}

.seo-card {
  padding: 18px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.seo-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.seo-card p {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-2);
}

.seo-faq {
  border-top: 1px solid var(--border);
  padding-top: 28px;
}

.seo-faq h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text);
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.faq-item summary {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 18px;
  font-weight: 600;
  color: var(--text-3);
  transition: transform 0.2s var(--ease);
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-2);
}

/* ---------- Footer ---------- */
.app-footer {
  padding: 20px 24px 28px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-3);
}

.footer-link {
  font-weight: 600;
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border-strong);
}

.footer-link:hover {
  color: var(--text);
}

/* ---------- Modals ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(20, 18, 15, 0.38);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.28s var(--ease-spring);
}

.modal-card-wide {
  max-width: 580px;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  padding: 4px 2px;
}

@media (max-width: 500px) {
  .archive-grid {
    grid-template-columns: 1fr;
  }
}

.archive-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease), transform 0.1s var(--ease);
}

.archive-card:hover {
  border-color: var(--border-strong);
  background: var(--surface);
  transform: translateY(-1px);
}

.archive-card.active-puzzle {
  border-color: var(--honey-strong);
  background: var(--honey-soft);
}

.archive-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.archive-date {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.archive-meta {
  font-size: 11.5px;
  color: var(--text-3);
  white-space: nowrap;
}

.archive-status {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  white-space: nowrap;
}

.archive-card.played .archive-status {
  background: var(--honey-soft);
  border-color: var(--honey);
  color: var(--honey-ink);
  font-weight: 700;
}

@media (max-width: 640px) {
  .btn-text-desktop {
    display: none;
  }
}

.modal-overlay.open .modal-card {
  transform: none;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 22px 0;
}

.modal-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

#def-word {
  text-transform: capitalize;
}

.def-phonetic {
  font-size: 13px;
  color: var(--text-2);
}

.modal-close {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  margin: -4px -6px 0 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--text-2);
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}

.modal-close svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.modal-close:hover {
  background: var(--surface-2);
  color: var(--text);
}

.modal-body {
  padding: 16px 22px 24px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text);
}

.modal-lead {
  color: var(--text-2);
}

.modal-subtitle {
  margin: 20px 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.modal-note {
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--text-2);
}

.rule-list {
  list-style: none;
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.rule-list li {
  position: relative;
  padding-left: 22px;
}

.rule-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 9px;
  height: 9px;
  background: var(--honey);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}

.score-rows {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.score-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

.score-row:last-child {
  border-bottom: none;
}

.score-row span {
  color: var(--text-2);
}

.score-row-highlight {
  background: var(--honey-soft);
}

.score-row-highlight span,
.score-row-highlight strong {
  color: var(--honey-ink);
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 4px 0 20px;
}

.stat-box {
  padding: 14px 4px 12px;
  text-align: center;
  background: var(--surface-2);
  border-radius: 12px;
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
}

/* Hints */
.hint-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 6px;
}

.hint-stat {
  padding: 12px 6px;
  text-align: center;
  background: var(--surface-2);
  border-radius: 12px;
}

.hint-stat strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
}

.hint-stat span {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
}

.hints-matrix {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.hints-matrix th,
.hints-matrix td {
  padding: 7px 4px;
  border-bottom: 1px solid var(--border);
}

.hints-matrix tr:last-child td {
  border-bottom: none;
}

.hints-matrix th {
  font-weight: 700;
  color: var(--text-2);
  background: var(--surface-2);
}

.hints-matrix td:first-child {
  font-weight: 700;
}

.hints-matrix td.muted {
  color: var(--text-3);
}

.two-letter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.two-letter-tag {
  padding: 4px 10px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--surface-2);
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
}

.two-letter-tag span {
  color: var(--text-3);
  margin-left: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 560px), (max-height: 750px) and (max-width: 820px) {
  :root {
    --hex-w: 94px;
    --hex-gap: 5px;
  }

  .header-container {
    height: 48px;
    padding: 0 12px;
  }

  .brand-name {
    font-size: 17px;
  }

  .brand-icon {
    width: 22px;
    height: 22px;
  }

  .icon-btn {
    width: 32px;
    height: 32px;
  }

  .icon-btn svg {
    width: 17px;
    height: 17px;
  }

  .toolbar {
    margin-top: 6px;
    padding: 0 12px;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .segmented {
    padding: 2px;
    border-radius: 10px;
  }

  .segmented-btn {
    padding: 5px 9px;
    font-size: 12px;
    gap: 5px;
    border-radius: 7px;
  }

  .segmented-btn svg {
    width: 14px;
    height: 14px;
  }

  .toolbar-right {
    gap: 6px;
    flex-shrink: 0;
  }

  .puzzle-meta {
    font-size: 12px;
    white-space: nowrap;
  }

  .text-btn {
    padding: 5px 8px;
    font-size: 12px;
    gap: 4px;
    border-radius: 8px;
  }

  .text-btn svg {
    width: 14px;
    height: 14px;
  }

  .main-content {
    padding: 4px 12px 14px;
  }

  .board {
    min-height: calc(100dvh - 110px);
    justify-content: flex-start;
  }

  .rank-top {
    margin-bottom: 4px;
  }

  .rank-name {
    font-size: 15px;
  }

  .rank-score {
    font-size: 12px;
  }

  .rank-track {
    height: 22px;
    margin: 0 11px;
  }

  .rank-node {
    width: 7px;
    height: 7px;
    margin-left: -3.5px;
  }

  .rank-node.current {
    width: 22px;
    height: 22px;
    margin-left: -11px;
    font-size: 10px;
  }

  .words-drawer {
    height: 36px;
    margin-top: 12px;
  }

  .words-drawer-toggle {
    padding: 0 12px;
    font-size: 12.5px;
  }

  .word-input-container {
    margin: 8px 0 2px;
    height: 36px;
  }

  .word-input-preview {
    font-size: 24px;
  }

  .cursor-bar {
    height: 22px;
  }

  .toast-msg {
    top: -12px;
    padding: 6px 14px;
    font-size: 12px;
  }

  .controls {
    margin-top: 8px;
    gap: 6px;
  }

  .btn-outline,
  .btn-solid {
    min-width: 76px;
    height: 42px;
    padding: 0 12px;
    font-size: 13.5px;
  }

  .btn-round {
    width: 42px;
    height: 42px;
  }

  .btn-round svg {
    width: 17px;
    height: 17px;
  }

  .board-actions {
    margin-top: 6px;
  }

  .btn-share-pill {
    padding: 5px 14px;
    font-size: 12px;
    gap: 5px;
  }

  .btn-share-pill svg {
    width: 13px;
    height: 13px;
  }

  .keyboard-hint {
    display: none;
  }

  .rank-next {
    display: none;
  }
}

@media (max-height: 690px) and (max-width: 560px) {
  :root {
    --hex-w: 86px;
    --hex-gap: 4px;
  }
  .word-input-container {
    margin: 4px 0 2px;
    height: 32px;
  }
  .word-input-preview {
    font-size: 22px;
  }
  .controls {
    margin-top: 6px;
  }
  .btn-outline,
  .btn-solid {
    height: 38px;
    min-width: 72px;
  }
  .btn-round {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 360px) {
  :root {
    --hex-w: 84px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}


/* ---------- Solver Modal & Features ---------- */
.solver-form {
  margin: 16px 0 20px;
}

.solver-inputs {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  margin-bottom: 14px;
}

.solver-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.solver-input-group.flex-1 {
  flex: 1;
}

.solver-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-2);
}

.solver-input {
  height: 48px;
  padding: 0 14px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.solver-input:focus {
  border-color: var(--honey);
  box-shadow: 0 0 0 3px var(--honey-soft);
}

.solver-center-input {
  width: 68px;
  text-align: center;
  background: var(--honey-soft);
  border-color: var(--honey);
  color: var(--honey-ink);
  font-size: 22px;
  font-weight: 800;
}

.solver-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.solver-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s var(--ease);
  white-space: nowrap;
}

.solver-btn svg {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.solver-btn-primary {
  background: var(--honey-dark, #b45309);
  color: #fff;
  border: none;
  box-shadow: 0 2px 6px rgba(180, 83, 9, 0.25);
}

.solver-btn-primary:hover {
  background: #92400e;
  transform: translateY(-1px);
}

.solver-btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.solver-btn-secondary:hover {
  background: var(--surface);
  border-color: var(--border-hover);
}

.solver-btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid transparent;
}

.solver-btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}

.solver-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}

.solver-copy-btn svg {
  width: 15px !important;
  height: 15px !important;
  max-width: 15px !important;
  max-height: 15px !important;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.solver-copy-btn:hover {
  background: var(--surface-2);
  border-color: var(--border-hover);
}

.solver-blur-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
}

.solver-blur-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--honey-dark, #b45309);
  cursor: pointer;
}

.solver-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
}

.solver-error {
  padding: 10px 14px;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 10px;
  color: #dc2626;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}

.solver-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 14px;
}

.solver-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.solver-stat-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.solver-stat-lbl {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}

.solver-options {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.solver-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}

.solver-pangrams-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.solver-pangram-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--honey-soft);
  border: 1.5px solid var(--honey);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--honey-ink);
}

.solver-word-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.solver-group-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}

.solver-group-title {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-2);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}

.solver-words-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.solver-word-chip {
  padding: 4px 9px;
  font-size: 13px;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  transition: all 0.2s var(--ease);
}

.solver-word-chip.is-pangram {
  background: var(--honey-soft);
  border-color: var(--honey);
  color: var(--honey-ink);
  font-weight: 700;
}

.solver-word-chip.blurred {
  filter: blur(5px);
  user-select: none;
  cursor: pointer;
}

.solver-word-chip.blurred:hover,
.solver-word-chip.blurred.revealed {
  filter: none;
}

/* SEO Solver Section */
.seo-solver-guide {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.solver-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}

@media (max-width: 640px) {
  .solver-features-grid {
    grid-template-columns: 1fr;
  }
  .solver-inputs {
    flex-direction: column;
    align-items: stretch;
  }
  .solver-center-input {
    width: 100%;
  }
  .solver-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .solver-btn {
    width: 100%;
  }
  .solver-options {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }
}

.solver-feature-item {
  padding: 16px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.solver-feature-item h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.solver-feature-item p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
  margin: 0;
}


/* ---------- Menu Drawer ---------- */
.btn-menu-trigger {
  display: none;
}

@media (max-width: 820px) {
  .btn-menu-trigger {
    display: inline-flex;
  }
  .icon-btn-desktop {
    display: none;
  }
}

.modal-menu-card {
  max-width: 440px;
}

.menu-drawer-body {
  padding: 12px 18px 22px;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s var(--ease);
}

.drawer-nav-item:hover {
  background: var(--surface);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.drawer-nav-item:active {
  transform: scale(0.98);
}

.drawer-item-icon {
  font-size: 22px;
  width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.drawer-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.drawer-item-text strong {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}

.drawer-item-text span {
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-settings-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.drawer-pill-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}

.drawer-pill-btn:hover {
  background: var(--surface-2);
}

.drawer-pill-btn:active {
  transform: scale(0.97);
}


/* ---------- Dedicated Subpage Styles (Unlimited, Solver, Hints, Archive) ---------- */
.subpage-hero-section {
  width: 100%;
  max-width: 680px;
  margin: 16px auto 24px;
  padding: 0 16px;
}

.subpage-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.subpage-card-header {
  margin-bottom: 20px;
}

.subpage-card-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.subpage-card-desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
  margin: 0;
}

.subpage-play-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--amber-light);
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  margin-top: 20px;
  gap: 12px;
}

.subpage-play-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--amber-dark);
}

.subpage-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--text);
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s var(--ease);
}

.subpage-play-btn:hover {
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .subpage-card {
    padding: 16px;
    border-radius: var(--radius-md);
  }
  .subpage-card-title {
    font-size: 20px;
  }
  .subpage-play-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .subpage-play-btn {
    justify-content: center;
  }
}
