:root {
  color-scheme: dark;
  --bg: #07111f;
  --panel: #0e1d30;
  --panel-2: #12253d;
  --line: rgba(179, 211, 255, 0.16);
  --text: #f5f8ff;
  --muted: #9fb1c9;
  --cyan: #35d6e8;
  --yellow: #ffd166;
  --blue: #2f80ed;
  --violet: #9b5de5;
  --green: #3ddc97;
  --coral: #ff6b6b;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 15% 0%, rgba(53, 214, 232, 0.13), transparent 32rem),
    radial-gradient(circle at 85% 32rem, rgba(155, 93, 229, 0.12), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: "Trebuchet MS", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

button, a { font: inherit; }
button { color: inherit; }
a { color: inherit; }
.topbar {
  width: min(1180px, calc(100% - 32px));
  min-height: 74px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.brand, h1, h2, h3, .hud-stat strong, .hud-moves strong { font-family: ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; letter-spacing: .13em; }
.brand-mark { display: grid; place-items: center; width: 34px; aspect-ratio: 1; border-radius: 10px; color: #04121b; background: linear-gradient(135deg, var(--yellow), var(--cyan)); transform: rotate(-6deg); box-shadow: 0 8px 25px rgba(53, 214, 232, .2); }
.site-nav, .footer-nav { display: flex; align-items: center; gap: 18px; }
.site-nav a, .footer-nav a { color: var(--muted); font-size: .9rem; font-weight: 750; text-decoration: none; }
.site-nav a:hover, .footer-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.top-actions { display: flex; gap: 10px; align-items: center; }
.button, .icon-button { min-height: 44px; border-radius: 13px; border: 1px solid var(--line); cursor: pointer; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.button:hover, .icon-button:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.35); }
.button:focus-visible, .icon-button:focus-visible, .tile:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.button { padding: 10px 17px; font-weight: 750; }
.button-ghost, .icon-button { background: rgba(255,255,255,.04); }
.icon-button { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; }
.button-primary { border: 0; color: #06111d; background: linear-gradient(135deg, var(--yellow), #ff9f43); }
.button-secondary { width: 100%; background: var(--panel-2); }

main { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.play-section { padding: clamp(32px, 6vw, 72px) 0 80px; }
.play-heading { display: grid; justify-items: center; gap: 12px; margin-bottom: 24px; text-align: center; }
.eyebrow { margin: 0 0 5px; color: var(--cyan); font-size: .78rem; line-height: 1.3; letter-spacing: .17em; font-weight: 900; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: clamp(1.9rem, 4.8vw, 3.5rem); line-height: 1.02; letter-spacing: -.035em; text-align: center; }
h2 { margin: 0; font-size: clamp(1.4rem, 2.7vw, 2rem); line-height: 1.12; letter-spacing: -.025em; }
.quick-rule { max-width: 430px; margin: 0; color: var(--muted); text-align: center; }
.entry-panel { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 10px; width: min(100%, 1120px); margin: 0 auto 14px; }
.entry-panel .button { min-height: 54px; }
.entry-primary { font-size: 1rem; }
.entry-option { display: grid; align-content: center; justify-items: start; padding: 7px 14px; background: rgba(255,255,255,.045); text-align: left; }
.entry-option span { font-weight: 900; }
.entry-option small { color: var(--muted); font-size: .75rem; line-height: 1.2; }
.storage-warning { width: min(100%, 1120px); margin: 0 auto 14px; padding: 10px 13px; border: 1px solid rgba(255,209,102,.32); border-radius: 12px; background: rgba(255,209,102,.08); color: #ffe5a3; font-size: .88rem; text-align: center; }
.stats-panel { width: min(100%, 1120px); margin: 0 auto 14px; padding: 18px; border: 1px solid rgba(53,214,232,.24); border-radius: 18px; background: rgba(12,28,48,.96); }
.stats-panel[hidden] { display: none; }
.stats-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.stats-heading h2 { font-size: 1.2rem; }
.stats-close { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.04); color: var(--text); font-size: 1.4rem; cursor: pointer; }
.stats-close:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.stats-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.stats-grid > div { min-width: 0; padding: 11px; border-radius: 12px; background: rgba(255,255,255,.045); text-align: center; }
.stats-grid span { display: block; color: var(--muted); font-size: .72rem; line-height: 1.25; }
.stats-grid strong { display: block; margin-top: 4px; color: var(--text); font-family: ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.game-layout { display: grid; grid-template-columns: minmax(0, 820px) 280px; align-items: start; gap: 20px; width: min(100%, 1120px); margin-inline: auto; }
.game-switch-row { display: flex; justify-content: center; width: min(100%, 1120px); margin: 22px auto 0; }
.game-switch-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-width: min(100%, 340px); color: var(--text); text-align: center; text-decoration: none; }
.switch-to-gems { border-color: rgba(193, 135, 255, .42); background: rgba(151, 88, 220, .14); }
.switch-to-gems:hover { border-color: rgba(211, 173, 255, .75); background: rgba(151, 88, 220, .22); }
.switch-to-classic { border-color: rgba(53, 214, 232, .4); background: rgba(53, 214, 232, .1); }
.switch-to-classic:hover { border-color: rgba(53, 214, 232, .72); background: rgba(53, 214, 232, .17); }
.home-game-discovery { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; width: min(100%, 1120px); margin: 22px auto 0; padding: 18px 20px; border: 1px solid rgba(193, 135, 255, .24); border-radius: 18px; background: rgba(151, 88, 220, .055); }
.home-game-discovery .eyebrow { margin-bottom: 3px; color: #d7b8ff; }
.home-game-discovery h2 { margin: 0 0 5px; font-size: 1.25rem; }
.home-game-discovery p:last-child { margin: 0; color: var(--muted); }
.home-game-links { display: grid; gap: 10px; min-width: 0; }
.game-stage { padding: clamp(12px, 2.5vw, 24px); border: 1px solid var(--line); border-radius: 26px; background: linear-gradient(145deg, rgba(18,37,61,.94), rgba(9,23,39,.96)); box-shadow: var(--shadow); }
.game-stage.daily-mode { border-color: rgba(255,209,102,.38); box-shadow: 0 28px 70px rgba(0,0,0,.32), 0 0 0 1px rgba(255,209,102,.08); }
.level-select { position: sticky; top: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(145deg, rgba(18,37,61,.94), rgba(9,23,39,.96)); box-shadow: 0 22px 50px rgba(0,0,0,.24); }
.level-select-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.level-select-heading h2 { font-size: 1.2rem; text-align: left; }
.level-select-heading > strong { color: var(--yellow); font-size: 1rem; font-variant-numeric: tabular-nums; }
.level-select-copy { min-height: 42px; margin: 10px 0 14px; color: var(--muted); font-size: .88rem; line-height: 1.45; }
.continue-button { width: 100%; }
.level-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin-top: 16px; }
.level-button { position: relative; display: grid; place-items: center; min-width: 0; min-height: 44px; aspect-ratio: 1; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.045); color: var(--text); font-size: .88rem; font-weight: 900; font-variant-numeric: tabular-nums; cursor: pointer; }
.level-button:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--cyan); background: rgba(53,214,232,.09); }
.level-button:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.level-button.completed { border-color: rgba(61,220,151,.42); background: rgba(61,220,151,.12); color: #bff6dd; }
.level-button.completed::after { position: absolute; right: 3px; bottom: 1px; content: "✓"; color: var(--green); font-size: .66rem; }
.level-button.current { border-color: var(--yellow); background: rgba(255,209,102,.14); box-shadow: 0 0 0 2px rgba(255,209,102,.18); }
.level-button:disabled { color: #67768a; cursor: not-allowed; opacity: .7; }
.level-button:disabled::before { content: "•"; position: absolute; top: 1px; color: #78879b; font-size: .75rem; }
.level-legend { display: grid; gap: 5px; margin-top: 15px; color: var(--muted); font-size: .75rem; }
.level-legend span { display: flex; align-items: center; gap: 7px; }
.level-legend i { width: 9px; height: 9px; border-radius: 3px; background: rgba(255,255,255,.1); }
.level-legend .legend-current { border: 1px solid var(--yellow); background: rgba(255,209,102,.22); }
.level-legend .legend-complete { background: var(--green); }
.level-legend .legend-locked { background: #59677a; }
.game-hud { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) clamp(78px, 13vw, 104px); gap: 10px; margin-bottom: 14px; padding: 16px 12px 12px; border: 1px solid rgba(53,214,232,.24); border-radius: 18px; background: linear-gradient(145deg, rgba(28,55,82,.98), rgba(12,28,48,.98)); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 12px 26px rgba(0,0,0,.24); }
.hud-level { position: absolute; top: -9px; left: 16px; z-index: 1; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border: 1px solid rgba(53,214,232,.42); border-radius: 99px; background: #0a1b2d; color: var(--cyan); box-shadow: 0 4px 10px rgba(0,0,0,.26); }
.hud-level span { font-size: .69rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.hud-level strong { color: var(--text); font-variant-numeric: tabular-nums; }
.hud-main { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; min-width: 0; }
.hud-stat { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; padding: 9px 10px 12px; border: 1px solid transparent; border-radius: 13px; background: rgba(255,255,255,.05); transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.hud-stat-copy { min-width: 0; }
.hud-label { display: block; overflow: hidden; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .04em; line-height: 1.2; text-overflow: ellipsis; text-transform: uppercase; }
.hud-stat strong { display: block; overflow: hidden; margin-top: 1px; font-size: clamp(1rem, 2.8vw, 1.35rem); line-height: 1.05; font-variant-numeric: tabular-nums; text-overflow: ellipsis; }
.hud-symbol { display: grid; place-items: center; width: 38px; aspect-ratio: 1; color: var(--yellow); font-size: 1.55rem; filter: drop-shadow(0 3px 8px rgba(255,209,102,.3)); }
.goal-check { position: absolute; top: 4px; right: 6px; display: grid; place-items: center; width: 18px; aspect-ratio: 1; border-radius: 50%; background: var(--green); color: #062519; font-size: .72rem; font-weight: 900; opacity: 0; transform: scale(.6); transition: opacity .2s ease, transform .2s ease; }
.hud-goal.complete { border-color: rgba(61,220,151,.5); background: rgba(61,220,151,.1); }
.hud-goal.complete .goal-check { opacity: 1; transform: scale(1); }
.hud-side { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 6px; }
.hud-moves { display: grid; place-content: center; min-height: 66px; border: 2px solid var(--yellow); border-radius: 14px; background: linear-gradient(145deg, #fff4c8, #ffc857); color: #401c04; text-align: center; box-shadow: inset 0 2px 0 rgba(255,255,255,.72), 0 7px 16px rgba(255,177,48,.16); }
.hud-moves span { font-size: .67rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.hud-moves strong { margin-top: -3px; font-size: clamp(1.8rem, 5vw, 2.65rem); line-height: 1; font-variant-numeric: tabular-nums; }
.hud-moves.low { border-color: #ff9f43; background: linear-gradient(145deg, #ffe6b8, #ffad42); }
.hud-moves.critical { border-color: var(--coral); background: linear-gradient(145deg, #ffd1c8, #ff796f); box-shadow: inset 0 2px 0 rgba(255,255,255,.72), 0 7px 18px rgba(255,107,107,.26); }
.hud-reset { min-height: 32px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.05); color: var(--text); font-size: .73rem; font-weight: 800; cursor: pointer; }
.hud-reset:hover { border-color: var(--cyan); background: rgba(53,214,232,.09); }
.hud-reset:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.board-wrap { position: relative; width: min(100%, 660px); margin-inline: auto; }
.board { display: grid; grid-template-columns: repeat(8, 1fr); gap: clamp(4px, .9vw, 9px); width: 100%; aspect-ratio: 1; padding: clamp(7px, 1.4vw, 13px); border-radius: 20px; background: #06101d; border: 1px solid rgba(255,255,255,.08); box-shadow: inset 0 0 45px rgba(0,0,0,.45); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.tile { position: relative; min-width: 0; border: 0; border-radius: clamp(7px, 1.2vw, 14px); cursor: pointer; transform: translateZ(0); touch-action: manipulation; box-shadow: inset 0 2px 0 rgba(255,255,255,.24), inset 0 -5px 10px rgba(0,0,0,.24), 0 4px 8px rgba(0,0,0,.25); transition: transform .12s ease, filter .12s ease, opacity .18s ease, box-shadow .12s ease; }
.tile::after { content: ""; position: absolute; inset: 14% 22% auto; height: 17%; border-radius: 999px; background: rgba(255,255,255,.25); filter: blur(1px); }
.tile:hover { transform: scale(1.06); filter: brightness(1.1); z-index: 1; }
.tile.eligible { z-index: 1; transform: scale(1.07); filter: brightness(1.18) saturate(1.12); box-shadow: inset 0 2px 0 rgba(255,255,255,.42), inset 0 -5px 10px rgba(0,0,0,.18), 0 0 0 2px rgba(255,255,255,.72), 0 0 18px rgba(53,214,232,.38); }
.tile.selected { transform: scale(1.1); filter: brightness(1.25); }
.tile.large-group { box-shadow: inset 0 2px 0 rgba(255,255,255,.45), inset 0 -5px 10px rgba(0,0,0,.18), 0 0 0 3px var(--yellow), 0 0 24px rgba(255,209,102,.52); }
.tile.removing { transform: scale(.15) rotate(14deg); filter: brightness(1.4); opacity: 0; }
.tile.invalid { animation: invalid-shake .28s ease; filter: grayscale(.45) brightness(.75); }
.board.cascading .tile { animation: cascade-in .24s cubic-bezier(.2,.75,.25,1) both; }
.tile-blue { background: linear-gradient(145deg, #48b8ff, var(--blue)); }
.tile-violet { background: linear-gradient(145deg, #c084fc, var(--violet)); }
.tile-green { background: linear-gradient(145deg, #62efb3, #17a873); }
.tile-coral { background: linear-gradient(145deg, #ff9b85, var(--coral)); }
.tile-yellow { background: linear-gradient(145deg, #ffe58c, #f4a62a); }
.game-message { min-height: 24px; margin: 13px 4px 0; color: var(--muted); text-align: center; }
.score-pop { position: absolute; top: 45%; left: 50%; z-index: 4; color: var(--yellow); font-family: ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; font-size: 1.65rem; font-weight: 900; pointer-events: none; opacity: 0; transform: translate(-50%,0) scale(.8); text-shadow: 0 3px 12px rgba(0,0,0,.75); }
.score-pop.show { animation: score-rise .62s ease-out both; }
.score-pop.strong { font-size: 2.15rem; }
.game-overlay { position: absolute; inset: 0; z-index: 3; padding: 24px; border-radius: 20px; background: rgba(4, 13, 25, .9); backdrop-filter: blur(12px); display: grid; place-content: center; justify-items: center; text-align: center; }
.game-overlay[hidden] { display: none; }
.overlay-kicker { margin: 0 0 7px; color: var(--cyan); font-weight: 900; text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; }
.game-overlay h2 { margin-bottom: 10px; }
.game-overlay p:not(.overlay-kicker) { max-width: 360px; margin: 0 0 22px; color: var(--muted); }
.overlay-stats { display: grid; grid-template-columns: repeat(3, minmax(76px, 1fr)); gap: 8px; width: min(100%, 390px); margin-bottom: 18px; }
.overlay-stats > div { padding: 10px; border-radius: 12px; background: rgba(255,255,255,.06); }
.overlay-stats span { display: block; color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.overlay-stats strong { display: block; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.overlay-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.overlay-actions .button-secondary { width: auto; }
.mini-tile { width: 38px; aspect-ratio: 1; border-radius: 10px; box-shadow: inset 0 2px 0 rgba(255,255,255,.25), inset 0 -4px 7px rgba(0,0,0,.25); }
.progress { position: absolute; right: 9px; bottom: 6px; left: 9px; height: 4px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.09); }
.progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--yellow)); transition: width .3s ease; }

.how-to { padding: 72px 0 86px; border-top: 1px solid var(--line); }
.how-to > h2 { max-width: 650px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 30px; }
.steps article { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.025); }
.steps article > span { color: var(--cyan); font-size: .8rem; font-weight: 900; letter-spacing: .14em; }
.steps h3 { margin: 20px 0 6px; font-size: 1.15rem; }
.steps p { margin: 0; color: var(--muted); }
.section-actions { margin-top: 24px; }
.text-link { color: var(--cyan); font-weight: 800; text-decoration: none; }
.text-link:hover { color: var(--yellow); }
.home-page .play-section { padding: clamp(22px, 3.4vw, 42px) 0 64px; }
.home-page .play-heading { max-width: 760px; margin: 0 auto 16px; gap: 8px; }
.home-page .play-heading h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.home-page .quick-rule { max-width: 720px; font-size: clamp(1rem, 1.6vw, 1.08rem); line-height: 1.45; }
.home-support { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 6vw, 72px); padding: 62px 0 76px; border-top: 1px solid var(--line); }
.home-copy-section, .home-benefits { min-width: 0; }
.home-copy-section h2, .home-benefits h2, .home-levels h2 { margin-bottom: 18px; }
.home-copy-section > p:not(.eyebrow):not(.support-link-row), .home-benefits li, .home-levels p { color: var(--muted); }
.home-copy-section > p:not(.eyebrow):not(.support-link-row) { margin: 0; }
.home-copy-section > p + p:not(.support-link-row) { margin-top: 14px; }
.home-benefits ul { display: grid; gap: 10px; margin: 0; padding-left: 1.2rem; }
.home-benefits li::marker { color: var(--cyan); }
.support-link-row { margin: 22px 0 0; }
.home-levels { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; margin-top: 48px; padding: 42px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.home-levels p { max-width: 760px; margin: 0; }
.home-levels .button { width: auto; text-decoration: none; white-space: nowrap; }
.home-faq { grid-column: 1 / -1; margin-top: 48px; }
.gems-play-section { padding: clamp(24px, 4vw, 48px) 0 72px; }
.gems-heading { display: grid; justify-items: center; max-width: 780px; margin: 0 auto 22px; text-align: center; }
.gems-heading h1 { font-size: clamp(2rem, 4.3vw, 3.1rem); }
.gems-heading > p:last-child { max-width: 720px; margin: 13px 0 0; color: var(--muted); font-size: clamp(1rem, 1.7vw, 1.08rem); }
.gems-game-layout { display: grid; grid-template-columns: minmax(0, 820px) 280px; align-items: start; gap: 20px; width: min(100%, 1120px); margin-inline: auto; }
.gems-game-stage { min-width: 0; padding: clamp(12px, 2.4vw, 22px); border: 1px solid rgba(199, 168, 255, .28); border-radius: 26px; background: linear-gradient(145deg, rgba(22, 38, 61, .97), rgba(11, 24, 41, .98)); box-shadow: var(--shadow); scroll-margin-top: 8px; }
.gems-hud { position: relative; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(120px, .7fr) minmax(82px, .48fr) 92px; gap: 8px; margin-bottom: 14px; padding: 18px 10px 10px; border: 1px solid rgba(199, 168, 255, .28); border-radius: 18px; background: linear-gradient(145deg, rgba(35, 48, 76, .98), rgba(18, 30, 51, .98)); }
.gems-level-badge { position: absolute; top: -9px; left: 15px; z-index: 1; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border: 1px solid rgba(199, 168, 255, .48); border-radius: 99px; background: #101a2d; color: #d7b8ff; box-shadow: 0 4px 10px rgba(0, 0, 0, .26); }
.gems-level-badge span { font-size: .69rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.gems-level-badge strong { color: var(--text); font-variant-numeric: tabular-nums; }
.gem-goals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; min-width: 0; }
.gem-goal-card, .gem-value-card, .gem-score-card { position: relative; min-width: 0; border: 1px solid transparent; border-radius: 12px; background: rgba(255, 255, 255, .05); }
.gem-goal-card { display: grid; grid-template-columns: 34px minmax(0, 1fr) 17px; align-items: center; gap: 6px; padding: 9px 7px 10px; }
.gem-goal-card small, .gem-value-card small, .gem-score-card small { display: block; overflow: hidden; color: var(--muted); font-size: .64rem; font-weight: 800; line-height: 1.15; text-overflow: ellipsis; text-transform: uppercase; }
.gem-goal-card strong, .gem-value-card strong, .gem-score-card strong { display: block; margin-top: 2px; font-size: 1rem; line-height: 1; font-variant-numeric: tabular-nums; }
.gem-goal-card i { display: grid; place-items: center; width: 17px; aspect-ratio: 1; border-radius: 50%; background: var(--green); color: #062519; font-size: .66rem; font-style: normal; font-weight: 900; opacity: 0; }
.gem-goal-card.complete { border-color: rgba(61, 220, 151, .45); background: rgba(61, 220, 151, .09); }
.gem-goal-card.complete i { opacity: 1; }
.gem-goal-icon { display: grid; place-items: center; width: 34px; aspect-ratio: 1; }
.gem-goal-icon .gem-shape { width: 29px; height: 29px; }
.gem-value-card { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 6px; padding: 9px 8px 13px; }
.gem-value-symbol { color: #e3c7ff; font-size: 1.45rem; text-align: center; text-shadow: 0 2px 10px rgba(199, 168, 255, .35); }
.gem-value-card b { font-weight: 900; }
.gem-score-card { display: grid; place-content: center; padding: 8px; text-align: center; }
.gem-score-card strong { overflow: hidden; font-size: 1.06rem; text-overflow: ellipsis; }
.gems-hud-side { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 6px; }
.gems-hud-side .hud-moves { min-height: 58px; }
.gems-hud-side .hud-reset { min-height: 32px; }
.gem-board-wrap { position: relative; width: min(100%, 600px); margin-inline: auto; }
.gem-board { display: grid; grid-template-columns: repeat(7, 1fr); gap: clamp(4px, .85vw, 8px); width: 100%; aspect-ratio: 1; padding: clamp(7px, 1.25vw, 12px); border: 1px solid rgba(199, 168, 255, .14); border-radius: 20px; background: linear-gradient(145deg, #081220, #0b1728); box-shadow: inset 0 0 42px rgba(0, 0, 0, .45); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.gem-tile { position: relative; display: grid; place-items: center; min-width: 0; border: 1px solid rgba(255, 255, 255, .06); border-radius: clamp(8px, 1.1vw, 13px); background: rgba(255, 255, 255, .025); cursor: pointer; touch-action: manipulation; transition: transform .13s ease, border-color .13s ease, background .13s ease, opacity .17s ease; }
.gem-tile:hover { transform: translateY(-1px); background: rgba(255, 255, 255, .055); }
.gem-tile:focus-visible { z-index: 2; outline: 3px solid var(--yellow); outline-offset: 1px; }
.gem-shape { position: relative; display: block; width: 72%; height: 72%; clip-path: polygon(28% 0, 72% 0, 100% 28%, 88% 78%, 50% 100%, 12% 78%, 0 28%); background: var(--gem-fill); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .18); filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .32)); }
.gem-shape::before { position: absolute; inset: 0; content: ""; clip-path: inherit; background: linear-gradient(135deg, rgba(255, 255, 255, .48) 0 13%, transparent 14% 42%, rgba(255, 255, 255, .13) 43% 55%, transparent 56%), linear-gradient(45deg, transparent 42%, rgba(255, 255, 255, .16) 43% 51%, transparent 52%); }
.gem-ruby { --gem-fill: linear-gradient(145deg, #ff8792, #cf3150 58%, #7e1630); }
.gem-emerald { --gem-fill: linear-gradient(145deg, #7bf0bd, #21a873 58%, #0b694a); }
.gem-sapphire { --gem-fill: linear-gradient(145deg, #85c9ff, #2f80ed 58%, #174b9d); }
.gem-amethyst { --gem-fill: linear-gradient(145deg, #d8a6ff, #9254d6 58%, #542383); }
.gem-topaz { --gem-fill: linear-gradient(145deg, #ffe08a, #e7a62f 58%, #9c6514); }
.gem-tile.eligible { z-index: 1; border-color: rgba(255, 255, 255, .62); background: rgba(199, 168, 255, .1); transform: scale(1.045); }
.gem-tile.eligible .gem-shape { filter: brightness(1.12) drop-shadow(0 4px 7px rgba(0, 0, 0, .35)); }
.gem-tile.tier-polished { border-color: rgba(255, 209, 102, .8); }
.gem-tile.tier-rare { border-color: #fff2ba; box-shadow: 0 0 0 2px rgba(255, 209, 102, .22); }
.gem-tile.tier-rare .gem-shape::after { position: absolute; top: 10%; right: 14%; width: 6px; aspect-ratio: 1; border-radius: 50%; background: #fffbea; content: ""; box-shadow: 0 0 7px rgba(255, 255, 255, .85); animation: gem-sparkle 1.1s ease-in-out infinite; }
.gem-tile.selected { transform: scale(1.08); }
.gem-tile.removing { transform: scale(.2) rotate(5deg); opacity: 0; }
.gem-tile.invalid { animation: invalid-shake .28s ease; filter: grayscale(.5) brightness(.72); }
.gem-board.cascading .gem-tile { animation: cascade-in .24s cubic-bezier(.2, .75, .25, 1) both; }
.gem-score-pop { position: absolute; top: 45%; left: 50%; z-index: 4; color: var(--text); font-family: ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; font-size: 1.55rem; font-weight: 900; pointer-events: none; opacity: 0; transform: translate(-50%, 0) scale(.8); text-shadow: 0 3px 12px rgba(0, 0, 0, .8); }
.gem-score-pop.show { animation: score-rise .68s ease-out both; }
.gem-score-pop.polished { color: var(--yellow); }
.gem-score-pop.rare { color: #ead6ff; font-size: 1.9rem; }
.gems-overlay { border-radius: 20px; }
.gem-level-panel { position: sticky; top: 18px; padding: 20px; border: 1px solid rgba(199, 168, 255, .22); border-radius: 22px; background: linear-gradient(145deg, rgba(22, 38, 61, .96), rgba(11, 24, 41, .98)); box-shadow: 0 22px 50px rgba(0, 0, 0, .24); }
.gem-level-panel .level-select-heading h2 { font-size: 1.2rem; text-align: left; }
.gem-level-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin-top: 16px; }
.gem-value-legend { display: grid; gap: 7px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }
.gem-value-legend strong { color: var(--text); font-size: .82rem; }
.gem-value-legend span { display: flex; align-items: center; gap: 8px; }
.gem-value-legend i { display: grid; place-items: center; width: 28px; min-height: 24px; border: 1px solid rgba(199, 168, 255, .24); border-radius: 7px; color: #e3c7ff; font-style: normal; font-weight: 900; }
.gems-support { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 70px); padding: 64px 0 82px; border-top: 1px solid var(--line); }
.gems-support article { min-width: 0; }
.gems-support h2 { margin-bottom: 17px; }
.gems-support article > p:not(.eyebrow) { margin: 0 0 20px; color: var(--muted); }
.gems-support .text-link { display: inline-block; }
.guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 0 0 76px; }
.strategy-card, .faq-card { padding: clamp(22px, 4vw, 38px); border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(145deg, rgba(18,37,61,.72), rgba(9,23,39,.78)); }
.strategy-card > p:not(.eyebrow), .strategy-card li, .faq-card details p { color: var(--muted); }
.strategy-card ul { margin: 24px 0 0; padding-left: 1.2rem; }
.strategy-card li + li { margin-top: 10px; }
.faq-card h2, .strategy-card h2 { margin-bottom: 18px; }
.faq-card details { padding: 15px 0; border-top: 1px solid var(--line); }
.faq-card summary { cursor: pointer; font-weight: 750; }
.faq-card details p { margin: 10px 0 0; }
.cluster-section { padding: 0 0 76px; }
.cluster-section > h2 { max-width: 720px; }
.cluster-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 28px; }
.cluster-card { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.025); text-decoration: none; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.cluster-card:hover { transform: translateY(-3px); border-color: rgba(53,214,232,.42); background: rgba(53,214,232,.055); }
.cluster-card > span { color: var(--cyan); font-size: .76rem; font-weight: 900; letter-spacing: .14em; }
.cluster-card h3 { margin: 16px 0 7px; font-size: 1.08rem; }
.cluster-card p { margin: 0; color: var(--muted); font-size: .92rem; }
.guide-page { width: min(920px, calc(100% - 32px)); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 7px; padding-top: 24px; color: var(--muted); font-size: .86rem; }
.breadcrumbs a { color: var(--cyan); text-decoration: none; }
.guide-hero { padding: clamp(42px, 8vw, 88px) 0 46px; border-bottom: 1px solid var(--line); text-align: center; }
.guide-hero h1 { max-width: 830px; }
.guide-lead { max-width: 730px; margin: 22px auto 0; color: var(--muted); font-size: clamp(1.02rem, 2vw, 1.18rem); }
.guide-cta { display: inline-flex; margin-top: 24px; text-decoration: none; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 34px; padding: 48px 0 76px; align-items: start; }
.article-body section + section { margin-top: 48px; padding-top: 44px; border-top: 1px solid var(--line); }
.article-body h2 { margin-bottom: 17px; font-size: clamp(1.55rem, 3vw, 2.1rem); }
.article-body h3 { margin: 27px 0 8px; font-size: 1.13rem; }
.article-body p, .article-body li { color: var(--muted); }
.article-body ul, .article-body ol { padding-left: 1.25rem; }
.article-body li + li { margin-top: 8px; }
.answer-box, .example-box, .level-card { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg, rgba(18,37,61,.72), rgba(9,23,39,.78)); }
.answer-box { margin-bottom: 34px; border-color: rgba(53,214,232,.28); }
.answer-box strong { color: var(--text); }
.example-box { margin: 24px 0; }
.example-box p:last-child { margin-bottom: 0; }
.article-aside { position: sticky; top: 22px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.025); }
.article-aside h2 { font-size: 1rem; letter-spacing: 0; }
.article-aside nav { display: grid; gap: 7px; margin-top: 15px; }
.article-aside a { padding: 9px 10px; border-radius: 9px; color: var(--muted); font-size: .9rem; text-decoration: none; }
.article-aside a:hover, .article-aside a[aria-current="page"] { background: rgba(53,214,232,.08); color: var(--text); }
.facts-table { width: 100%; margin: 22px 0; border-collapse: collapse; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.facts-table th, .facts-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.facts-table th { background: rgba(53,214,232,.07); color: var(--text); }
.facts-table td { color: var(--muted); }
.facts-table tr:last-child td { border-bottom: 0; }
.level-stack { display: grid; gap: 14px; margin-top: 24px; }
.level-card { display: grid; grid-template-columns: 70px 1fr; gap: 18px; }
.level-number { display: grid; place-items: center; width: 64px; aspect-ratio: 1; border-radius: 16px; background: linear-gradient(135deg, var(--yellow), #ff9f43); color: #301500; font-size: 1rem; font-weight: 900; }
.level-card h3 { margin-top: 0; }
.tile-guide-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 24px; }
.tile-guide { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: center; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.025); }
.tile-guide .mini-tile { width: 48px; }
.tile-guide h3 { margin: 0 0 3px; }
.tile-guide p { margin: 0; font-size: .92rem; }
.related-guides { padding: 42px 0 76px; border-top: 1px solid var(--line); }
.related-guides .cluster-grid { grid-template-columns: repeat(3, 1fr); }
.level-directory { display: grid; gap: 16px; margin: 24px 0 34px; }
.level-directory section { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.025); }
.level-directory h3 { margin: 0 0 12px; font-size: 1rem; }
.level-directory section > div { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.level-directory a { display: grid; gap: 3px; min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 11px; color: var(--text); text-decoration: none; }
.level-directory a:hover { border-color: rgba(53,214,232,.5); background: rgba(53,214,232,.07); }
.level-directory a span { color: var(--muted); font-size: .74rem; line-height: 1.3; }
.level-breadcrumbs { width: min(920px, 100%); margin-inline: auto; }
.level-intro { width: min(920px, 100%); margin: 0 auto; padding: 34px 0 30px; text-align: center; }
.level-intro > p:not(.eyebrow) { max-width: 720px; margin: 15px auto 0; color: var(--muted); font-size: 1.05rem; }
.level-intro dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 22px 0 0; }
.level-intro dl div { padding: 13px 10px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.025); }
.level-intro dt { color: var(--muted); font-size: .73rem; font-weight: 800; text-transform: uppercase; }
.level-intro dd { margin: 4px 0 0; font-weight: 850; }
.level-page .play-section { padding-top: 22px; border-top: 1px solid var(--line); }
.level-page .play-heading h2 { text-align: center; }
.level-page .level-select { display: none; }
.level-page .game-layout { grid-template-columns: minmax(0, 820px); justify-content: center; }
.level-page-links { padding: 0 0 72px; }
.level-prev-next { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.level-prev-next a { color: var(--text); font-weight: 800; text-decoration: none; }
.level-prev-next a:last-child { text-align: right; }
.nearby-levels { padding-top: 40px; }
.nearby-levels h2 { margin-bottom: 18px; }
.nearby-levels > div { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.nearby-levels a { display: grid; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; color: var(--text); font-weight: 850; text-decoration: none; }
.nearby-levels small { color: var(--muted); font-weight: 500; line-height: 1.3; }

footer { width: min(1180px, calc(100% - 32px)); margin-inline: auto; padding: 25px 0 38px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; color: var(--muted); }
footer p { margin: 0; }
footer a { color: var(--text); font-weight: 700; }
.footer-privacy-nav { display: flex; flex: 1 0 100%; align-items: center; justify-content: flex-end; gap: 10px 16px; flex-wrap: wrap; }
.footer-privacy-nav a, .footer-privacy-nav button { color: var(--muted); font: inherit; font-size: .82rem; font-weight: 700; }
.footer-privacy-nav button { padding: 0; border: 0; background: none; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.footer-privacy-nav a:hover, .footer-privacy-nav a:focus-visible, .footer-privacy-nav button:hover, .footer-privacy-nav button:focus-visible { color: var(--text); }

.legal-page { width: min(820px, calc(100% - 32px)); }
.legal-content { padding: 0 0 76px; }
.legal-content section { padding: 26px 0; border-bottom: 1px solid var(--line); }
.legal-content h2 { margin-bottom: 12px; font-size: clamp(1.15rem, 3vw, 1.45rem); }
.legal-content p, .legal-content li { color: var(--muted); line-height: 1.75; }
.legal-content ul { margin: 12px 0 0; padding-left: 22px; }
.contact-panel { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 14px 0 18px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.contact-panel p { margin: 0; }
.contact-panel .button { text-decoration: none; }

.analytics-consent { position: fixed; right: 16px; bottom: 16px; left: 16px; z-index: 100; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; width: min(760px, calc(100% - 32px)); margin-inline: auto; padding: 16px 18px; border: 1px solid rgba(53,214,232,.34); border-radius: 16px; background: rgba(7,17,31,.98); box-shadow: 0 18px 48px rgba(0,0,0,.42); }
.analytics-consent[hidden] { display: none; }
.analytics-consent p { display: grid; gap: 3px; margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.4; }
.analytics-consent strong { color: var(--text); font-size: .96rem; }
.analytics-consent-actions { display: flex; gap: 8px; }
.analytics-consent-actions .button { min-height: 44px; padding-inline: 15px; }

@keyframes invalid-shake { 0%,100% { transform: translateX(0); } 30% { transform: translateX(-4px); } 70% { transform: translateX(4px); } }
@keyframes cascade-in { from { transform: translateY(-14px) scale(.96); opacity: .65; } to { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes score-rise { 0% { opacity: 0; transform: translate(-50%,8px) scale(.75); } 22% { opacity: 1; transform: translate(-50%,0) scale(1.08); } 100% { opacity: 0; transform: translate(-50%,-50px) scale(1); } }
@keyframes gem-sparkle { 0%, 100% { opacity: .3; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.25); } }

@media (max-width: 860px) {
  .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .game-layout { grid-template-columns: minmax(0, 1fr); width: min(100%, 820px); }
  .level-select { position: static; }
  .game-hud { position: sticky; top: 8px; z-index: 5; }
  .site-nav { display: none; }
  .gems-game-layout { grid-template-columns: minmax(0, 1fr); width: min(100%, 760px); }
  .gem-level-panel { position: static; }
  .gems-support { grid-template-columns: 1fr; }
  .home-support { grid-template-columns: 1fr; row-gap: 36px; }
  .home-benefits { padding-top: 36px; border-top: 1px solid var(--line); }
  .home-levels { grid-column: 1; grid-template-columns: 1fr; margin-top: 8px; }
  .home-faq { grid-column: 1; margin-top: 12px; }
  .cluster-grid { grid-template-columns: repeat(2, 1fr); }
  .article-layout { grid-template-columns: 1fr; }
  .article-aside { position: static; order: -1; }
  .article-aside nav { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 861px) {
  .game-stage { scroll-margin-top: 8px; }
  .board-wrap {
    width: min(100%, 660px, clamp(300px, calc(100vh - 252px), 660px));
    width: min(100%, 660px, clamp(300px, calc(100svh - 252px), 660px));
  }
  .gem-board-wrap {
    width: min(100%, 600px, clamp(300px, calc(100vh - 260px), 600px));
    width: min(100%, 600px, clamp(300px, calc(100svh - 260px), 600px));
  }
}
@media (max-width: 600px) {
  .topbar { min-height: 64px; }
  .button-ghost, #soundLabel { display: none; }
  .gems-classic-link { display: inline-flex; padding-inline: 12px; font-size: .82rem; }
  .icon-button { width: 44px; justify-content: center; padding: 0; }
  main, .topbar, footer { width: min(100% - 20px, 1180px); }
  .guide-page { width: min(100% - 20px, 920px); }
  .play-section { padding-top: 28px; }
  .home-page .play-section { padding: 20px 0 48px; }
  .play-heading { gap: 10px; }
  .home-page .play-heading { gap: 7px; margin-bottom: 14px; }
  .home-page .play-heading h1 { font-size: 2rem; }
  .home-page .quick-rule { max-width: 38ch; font-size: .96rem; line-height: 1.4; }
  .entry-panel { grid-template-columns: 1fr 1fr; }
  .entry-primary { grid-column: 1 / -1; }
  .entry-option { justify-items: center; text-align: center; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-rule { text-align: center; }
  .game-stage { border-radius: 18px; }
  .level-select { padding: 17px; border-radius: 18px; }
  .level-grid { gap: 6px; }
  .game-hud { grid-template-columns: minmax(0, 1fr) 72px; gap: 7px; margin-bottom: 10px; padding: 15px 7px 7px; border-radius: 14px; }
  .hud-level { left: 10px; }
  .hud-main { gap: 5px; }
  .hud-stat { grid-template-columns: 30px minmax(0, 1fr); gap: 5px; padding: 7px 6px 10px; border-radius: 10px; }
  .mini-tile, .hud-symbol { width: 30px; border-radius: 8px; }
  .hud-symbol { font-size: 1.2rem; }
  .hud-label { font-size: .62rem; }
  .hud-stat strong { font-size: clamp(.9rem, 4vw, 1.12rem); }
  .hud-moves { min-height: 56px; border-radius: 11px; }
  .hud-moves strong { font-size: 1.85rem; }
  .board { border-radius: 14px; }
  .game-message { min-height: 44px; display: grid; place-items: center; margin-top: 8px; font-size: .9rem; }
  .game-overlay { padding: 15px; }
  .game-overlay h2 { font-size: 1.45rem; }
  .overlay-stats { grid-template-columns: repeat(3, minmax(64px, 1fr)); }
  .overlay-stats > div { padding: 8px 5px; }
  .overlay-stats strong { font-size: 1.08rem; }
  .gems-play-section { padding: 20px 0 48px; }
  .gems-heading { margin-bottom: 16px; }
  .gems-heading h1 { font-size: 2rem; }
  .gems-heading > p:last-child { max-width: 38ch; margin-top: 10px; font-size: .96rem; line-height: 1.4; }
  .gems-game-stage { padding: 10px; border-radius: 18px; }
  .gems-hud { grid-template-columns: minmax(0, 1fr) 68px; gap: 6px; padding: 16px 7px 7px; border-radius: 14px; }
  .gem-goals { grid-column: 1; grid-row: 1; gap: 4px; }
  .gem-goal-card { grid-template-columns: 27px minmax(0, 1fr); gap: 4px; padding: 7px 5px 9px; }
  .gem-goal-card i { display: none; }
  .gem-goal-icon { width: 27px; }
  .gem-goal-icon .gem-shape { width: 24px; height: 24px; }
  .gem-goal-card small { font-size: .57rem; }
  .gem-goal-card strong { font-size: .9rem; }
  .gem-value-card { grid-column: 1; grid-row: 2; min-height: 45px; padding: 7px 7px 11px; }
  .gem-score-card { grid-column: 1; grid-row: 3; min-height: 38px; padding: 5px; }
  .gems-hud-side { grid-column: 2; grid-row: 1 / span 3; }
  .gems-hud-side .hud-moves { min-height: 70px; }
  .gem-board { gap: 4px; padding: 7px; border-radius: 14px; }
  .gem-tile { border-radius: 8px; }
  .gem-level-panel { padding: 17px; border-radius: 18px; }
  .gem-level-grid { gap: 6px; }
  .gems-support { gap: 36px; padding: 46px 0 58px; }
  .steps { grid-template-columns: 1fr; }
  .home-support { row-gap: 30px; padding: 44px 0 52px; }
  .home-benefits { padding-top: 30px; }
  .home-levels { gap: 20px; margin-top: 4px; padding: 34px 0; }
  .home-levels .button { width: 100%; text-align: center; white-space: normal; }
  .home-faq { margin-top: 4px; }
  .home-game-discovery { grid-template-columns: 1fr; gap: 16px; padding: 17px; text-align: center; }
  .home-game-discovery .game-switch-button { width: 100%; min-width: 0; }
  .guide-grid { grid-template-columns: 1fr; }
  .cluster-grid { grid-template-columns: 1fr; }
  .article-layout { padding-top: 34px; }
  .article-aside nav { grid-template-columns: 1fr; }
  .level-directory section > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .level-intro dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .level-prev-next { grid-template-columns: 1fr 1fr; }
  .level-prev-next a:nth-child(2) { grid-column: 1 / -1; grid-row: 1; text-align: center; }
  .level-prev-next a:last-child { text-align: right; }
  .nearby-levels > div { grid-template-columns: 1fr 1fr; }
  .facts-table { width: 100%; max-width: 100%; table-layout: fixed; font-size: .82rem; }
  .facts-table th, .facts-table td { padding: 8px 4px; overflow-wrap: anywhere; text-align: center; }
  .level-card { grid-template-columns: 54px 1fr; padding: 17px; gap: 12px; }
  .level-number { width: 50px; border-radius: 13px; font-size: .86rem; }
  .tile-guide-grid, .related-guides .cluster-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; }
  .footer-nav { flex-wrap: wrap; gap: 10px 16px; }
}
@media (max-width: 380px) {
  .game-hud { grid-template-columns: minmax(0, 1fr) 66px; }
  .hud-stat { grid-template-columns: 1fr; justify-items: center; gap: 2px; }
  .hud-label { display: none; }
  .hud-stat-copy { text-align: center; }
}
@media (max-width: 600px) {
  .analytics-consent { grid-template-columns: 1fr; gap: 12px; padding: 15px; }
  .analytics-consent-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .analytics-consent-actions .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Illustrations and verified level help. */
.verified-guide { max-width: 1060px; margin: 36px auto 48px; padding: clamp(18px, 4vw, 36px); border: 1px solid var(--line); border-radius: 20px; background: #0c1728; color: #d5dfed; }
.verified-guide h2, .verified-guide h3 { color: #f1f5f9; }
.verified-guide p, .move-explanations li { line-height: 1.75; }
.verified-guide > p { max-width: 78ch; }
.guide-board { max-width: 360px; min-width: 0; margin: 20px 0; }
.guide-board svg { display: block; width: 100%; height: auto; }
.guide-board figcaption { margin-top: 10px; color: #bdcce0; font-size: .875rem; line-height: 1.65; }
.board-comparison { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; }
.board-legend { font-size: .9rem; color: #bdcce0; }
.walkthrough-details { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.walkthrough-details > summary { cursor: pointer; color: #b9d9ff; font-weight: 700; padding: 12px 4px; }
.walkthrough-details > summary:focus-visible, .guide-table-scroll:focus-visible { outline: 2px solid #86bfff; outline-offset: 4px; }
.guide-table-scroll { max-width: 100%; overflow-x: auto; margin: 18px 0; }
.guide-table-scroll table { min-width: 500px; width: 100%; }
.guide-table-scroll caption { text-align: left; padding-bottom: 12px; color: #bdcce0; line-height: 1.6; }
.move-explanations { padding-left: 24px; }
.move-explanations li { margin: 12px 0; }
.gem-guide { margin-bottom: 64px; }
@media (max-width: 580px) { .board-comparison { grid-template-columns: 1fr; gap: 0; } .verified-guide { margin-inline: 0; } }
.article-body { min-width: 0; }
.guide-table-scroll .facts-table { table-layout: auto; min-width: 620px; } .guide-table-scroll .facts-table th, .guide-table-scroll .facts-table td { white-space: nowrap; overflow-wrap: normal; padding: 10px 12px; }

/* Shared page introductions: one alignment and spacing rhythm across routes. */
:root{--intro-gap:12px;--intro-after:28px;--intro-before:24px}
body main .play-heading.play-heading,body main .gems-heading.gems-heading,body main .guide-hero.guide-hero,body main .level-intro.level-intro,
body.baskets-integrated main .intro,body.chains-page main .intro,body.fruit-page main .intro{
 display:flex;flex-direction:column;align-items:center;gap:var(--intro-gap);
 text-align:center;max-width:920px;width:100%;margin:0 auto var(--intro-after);padding:var(--intro-before) 0 0;
}
body main .play-heading.play-heading>div{display:contents}
body main :is(.play-heading.play-heading,.gems-heading.gems-heading,.guide-hero.guide-hero,.level-intro.level-intro,.intro.intro)>:is(h1,h2,p,.eyebrow){margin:0;text-align:center}
body main :is(.play-heading.play-heading,.gems-heading.gems-heading,.guide-hero.guide-hero,.level-intro.level-intro,.intro.intro)>:is(p,.eyebrow){max-width:720px}
body main .guide-hero.guide-hero{padding-bottom:var(--intro-after)}
body main .guide-hero.guide-hero .guide-cta{margin-top:0}
body main .level-intro.level-intro dl{width:100%;margin:0}
body.basket-article main>h1{margin:var(--intro-before) auto var(--intro-after);text-align:center}
@media(max-width:650px){:root{--intro-gap:10px;--intro-after:20px;--intro-before:20px}}

body main .play-heading.play-heading>div>:is(h1,h2,p){margin:0;text-align:center}
