main.main-content:has(.color-rush-page) {
  background: transparent;
}

.color-rush-page {
  padding: 0.35rem clamp(0.45rem, 1.6vw, 0.9rem) 0.45rem;
  min-height: calc(100dvh - 8rem);
}

.color-rush-shell-wrap {
  display: flex;
  justify-content: center;
  min-height: inherit;
}

.color-rush-shell {
  width: min(860px, 100%);
  min-height: calc(100dvh - 8.8rem);
  border: none;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
}

.color-rush-shell__header {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}

.color-rush-shell__header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.color-rush-shell__title {
  margin: 0;
  font-size: clamp(1rem, 2.8vw, 1.2rem);
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.color-rush-shell__new-game {
  appearance: none;
  padding: 0.26rem 0.58rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent-strong) 44%, var(--border));
  background: color-mix(in srgb, var(--accent-soft) 36%, var(--surface-strong));
  color: var(--accent-strong);
  font-size: clamp(0.68rem, 2.3vw, 0.76rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.08s ease;
}

.color-rush-shell__new-game:hover {
  background: color-mix(in srgb, var(--accent-soft) 52%, var(--surface-strong));
  border-color: color-mix(in srgb, var(--accent-strong) 65%, var(--border));
}

.color-rush-shell__new-game:focus-visible {
  outline: 2px solid var(--focus-ring, #7c3aed);
  outline-offset: 2px;
}

.color-rush-shell__toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.45rem 0.85rem;
  padding: 0.45rem 0;
  background: transparent;
  border-bottom: 1px solid var(--border);
}

.color-rush-stat {
  justify-self: center;
  min-width: 84px;
  text-align: center;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 8px;
  padding: 0.28rem 0.5rem 0.34rem;
}

.color-rush-stat__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.color-rush-stat__value {
  display: block;
  font-size: 1.35rem;
  line-height: 1.1;
  font-weight: 800;
  margin-top: 0.1rem;
}

.color-rush-next {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.color-rush-next__label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.color-rush-next__swatches {
  position: relative;
  width: 72px;
  height: 42px;
}

.color-rush-next__swatch {
  position: absolute;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, #000000 16%, transparent);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.15);
}

.color-rush-next__swatch--next {
  width: 42px;
  height: 28px;
  top: 2px;
  left: 24px;
  opacity: 0.52;
}

.color-rush-next__swatch--current {
  width: 56px;
  height: 34px;
  top: 6px;
  left: 7px;
}

.color-rush-next__swatch[data-color="red"] {
  background: #d94841;
}

.color-rush-next__swatch[data-color="yellow"] {
  background: #f1df4c;
}

.color-rush-next__swatch[data-color="blue"] {
  background: #4255a0;
}

.color-rush-next__swatch[data-color="green"] {
  background: #4caf54;
}

.color-rush-next__swatch[data-color="purple"] {
  background: #8b5cf6;
}

.color-rush-shell__play {
  padding: 0.35rem 0 0.35rem;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.color-rush-status {
  margin: 0 0 0.3rem;
  text-align: center;
  color: var(--text-muted);
  font-weight: 600;
  min-height: 1.1rem;
  font-size: 0.92rem;
  flex-shrink: 0;
}

.color-rush-board-wrap {
  display: flex;
  justify-content: center;
  padding: 0;
  flex: 1;
  min-height: 0;
  align-items: center;
  position: relative;
}

.color-rush-board {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(12, minmax(0, 1fr));
  gap: 0;
  width: min(620px, calc(100vw - 1rem), calc(100dvh - 185px), var(--color-rush-board-fit, 9999px));
  aspect-ratio: 1 / 1;
  border: 1px solid var(--border);
  background: #ffffff;
}

/* Win celebration card (matches Zip .zip-solved-overlay) */
.color-rush-win-panel[hidden] {
  display: none;
}

.color-rush-win-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(86%, 450px);
  z-index: 6;
}

.color-rush-win-panel__modal {
  position: relative;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(115, 76, 226, 0.36);
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 224, 143, 0.32) 0 24px, transparent 25px),
    radial-gradient(circle at 88% 18%, rgba(255, 170, 226, 0.24) 0 20px, transparent 21px),
    radial-gradient(circle at 84% 82%, rgba(132, 214, 255, 0.22) 0 22px, transparent 23px),
    rgba(255, 255, 255, 0.92);
  color: #22133f;
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
  box-shadow: 0 12px 34px rgba(36, 24, 85, 0.18);
  backdrop-filter: blur(1.5px);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
  overflow: hidden;
  pointer-events: auto;
}

.color-rush-win-panel:not([hidden]) .color-rush-win-panel__modal {
  animation: color-rush-win-pop 0.55s ease-out;
}

.color-rush-win-panel__modal::before,
.color-rush-win-panel__modal::after {
  content: "✦";
  position: absolute;
  color: rgba(116, 75, 232, 0.7);
  font-size: 1rem;
  pointer-events: none;
  animation: color-rush-win-sparkle-float 1.8s ease-in-out infinite;
}

.color-rush-win-panel__modal::before {
  left: 0.85rem;
  top: 0.5rem;
}

.color-rush-win-panel__modal::after {
  right: 0.85rem;
  bottom: 0.5rem;
  animation-delay: 0.45s;
}

@keyframes color-rush-win-pop {
  0% { opacity: 0; transform: scale(0.94); filter: saturate(0.7) brightness(0.95); }
  100% { opacity: 1; transform: scale(1); filter: saturate(1.08) brightness(1); }
}

@keyframes color-rush-win-sparkle-float {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.65; }
  50% { transform: translateY(-4px) rotate(10deg); opacity: 1; }
}

.color-rush-win-panel__title,
.color-rush-win-panel__detail {
  margin: 0;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
}

.color-rush-win-panel__btn {
  margin-top: 0.55rem;
  border: 1px solid rgba(115, 76, 226, 0.36);
  background: var(--surface-strong);
  border-radius: 10px;
  min-height: 36px;
  padding: 0.2rem 0.75rem;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  color: #22133f;
}

[data-theme="dark"] .color-rush-win-panel__modal {
  border-color: rgba(185, 160, 255, 0.62);
  color: #f2f5ff;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 224, 143, 0.24) 0 24px, transparent 25px),
    radial-gradient(circle at 88% 18%, rgba(255, 170, 226, 0.18) 0 20px, transparent 21px),
    radial-gradient(circle at 84% 82%, rgba(132, 214, 255, 0.18) 0 22px, transparent 23px),
    rgba(20, 24, 48, 0.9);
  box-shadow: 0 14px 36px rgba(4, 6, 18, 0.5);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .color-rush-win-panel__title,
[data-theme="dark"] .color-rush-win-panel__detail {
  color: #f2f5ff;
}

.color-rush-help {
  margin-top: 0.18rem;
  border-top: 1px solid var(--border);
  background: transparent;
  padding: 0.5rem 0 0.28rem;
}

.color-rush-help__title {
  margin: 0 0 0.18rem;
  font-size: clamp(0.78rem, 2.2vw, 0.9rem);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

.color-rush-help__line {
  margin: 0.14rem 0 0;
  font-size: clamp(0.72rem, 2.2vw, 0.84rem);
  line-height: 1.45;
  color: var(--text-muted);
  text-align: center;
}

.color-rush-help__line--gem,
.color-rush-help__line--master {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  column-gap: 0.5rem;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  text-align: left;
}

.color-rush-help__line--gem > span:last-child,
.color-rush-help__line--master > span:last-child {
  display: block;
  text-align: left;
  max-width: min(100%, 56rem);
}

.color-rush-help__line--gem .color-rush-help__icon-cell.color-rush-cell,
.color-rush-help__line--master .color-rush-help__icon-cell.color-rush-cell {
  margin-top: 0.08rem;
}

.color-rush-help__icon-cell.color-rush-cell {
  width: 1.22rem;
  height: 1.22rem;
  min-width: 1.22rem;
  min-height: 1.22rem;
  max-width: 1.22rem;
  max-height: 1.22rem;
  flex-shrink: 0;
  border-radius: 0;
  cursor: default;
  transform: none;
  filter: none;
}

.color-rush-help__icon-cell:hover {
  transform: none;
  filter: none;
}

.color-rush-help__crown {
  position: relative;
  z-index: 1;
  width: 0.56rem;
  height: 0.4rem;
  background: linear-gradient(180deg, #ffffff 0%, #dbeafe 100%);
  clip-path: polygon(0% 100%, 0% 52%, 18% 66%, 31% 12%, 50% 58%, 69% 12%, 82% 66%, 100% 52%, 100% 100%);
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.8));
}

.color-rush-cell {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border: 0;
  margin: 0;
  padding: 0;
  line-height: 1;
  font: inherit;
  cursor: pointer;
  background: #ffffff;
  box-shadow: inset 0 0 0 0.5px #000000;
  min-width: 0;
  min-height: 0;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.color-rush-cell:hover {
  transform: scale(0.97);
  filter: brightness(1.05);
}

.color-rush-cell.is-empty {
  background: color-mix(in srgb, var(--surface-strong) 82%, #ffffff);
  cursor: default;
}

.color-rush-cell.is-empty:hover {
  transform: none;
  filter: none;
}

/* Match clear FX (3+ tile pops) */
@keyframes color-rush-cell-pop-match-3 {
  0% {
    transform: scale(1);
    filter: brightness(1);
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
  25% {
    transform: scale(1.1);
    filter: brightness(1.35);
    box-shadow: 0 0 10px 3px rgba(255, 255, 255, 0.4);
  }
  100% {
    transform: scale(0.2);
    filter: brightness(1.5);
    opacity: 0;
    box-shadow: 0 0 18px 6px rgba(255, 255, 255, 0);
  }
}

@keyframes color-rush-cell-pop-match-4 {
  0% {
    transform: scale(1);
    filter: brightness(1) saturate(1);
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
  22% {
    transform: scale(1.14);
    filter: brightness(1.45) saturate(1.1);
    box-shadow: 0 0 12px 4px rgba(255, 255, 255, 0.5);
  }
  100% {
    transform: scale(0.18);
    filter: brightness(1.6);
    opacity: 0;
    box-shadow: 0 0 22px 8px rgba(255, 255, 255, 0);
  }
}

@keyframes color-rush-cell-pop-match-5 {
  0% {
    transform: scale(1);
    filter: brightness(1) saturate(1);
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
  18% {
    transform: scale(1.18);
    filter: brightness(1.55) saturate(1.15);
    box-shadow: 0 0 14px 5px rgba(255, 255, 255, 0.55);
  }
  45% {
    transform: scale(0.95);
    filter: brightness(1.4);
    opacity: 0.95;
  }
  100% {
    transform: scale(0.12);
    filter: brightness(1.75);
    opacity: 0;
    box-shadow: 0 0 26px 10px rgba(255, 255, 255, 0);
  }
}

@keyframes color-rush-match-combo-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.008);
  }
}

.color-rush-cell.is-match-clearing {
  z-index: 2;
  pointer-events: none;
}

.color-rush-cell.is-match-clearing--3 {
  animation: color-rush-cell-pop-match-3 0.3s ease-in forwards;
}

.color-rush-cell.is-match-clearing--4 {
  animation: color-rush-cell-pop-match-4 0.32s ease-in forwards;
}

.color-rush-cell.is-match-clearing--5 {
  animation: color-rush-cell-pop-match-5 0.36s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.color-rush-board-wrap.is-match-clear--combo {
  animation: color-rush-match-combo-pulse 0.32s ease-in-out;
}

/* Gem row clear FX (Candy Crush–style sweep + pop) */
.color-rush-fx-layer {
  position: absolute;
  pointer-events: none;
  z-index: 4;
  overflow: hidden;
}

.color-rush-row-sweep {
  position: absolute;
  left: 0;
  width: 100%;
  opacity: 0;
  animation: color-rush-row-sweep 0.34s ease-out forwards;
}

.color-rush-row-sweep--color {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 18%,
    rgba(255, 255, 255, 0.95) 48%,
    rgba(147, 234, 255, 0.88) 58%,
    rgba(255, 255, 255, 0.15) 82%,
    transparent 100%
  );
  box-shadow:
    0 0 16px rgba(121, 214, 255, 0.55),
    inset 0 0 12px rgba(255, 255, 255, 0.35);
}

.color-rush-row-sweep--master {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 248, 220, 0.2) 14%,
    rgba(255, 255, 255, 0.98) 42%,
    rgba(255, 215, 87, 0.95) 52%,
    rgba(196, 181, 253, 0.82) 62%,
    rgba(255, 248, 220, 0.2) 86%,
    transparent 100%
  );
  box-shadow:
    0 0 20px rgba(255, 208, 87, 0.5),
    0 0 28px rgba(137, 92, 246, 0.32),
    inset 0 0 14px rgba(255, 255, 255, 0.4);
  animation-duration: 0.4s;
}

@keyframes color-rush-row-sweep {
  0% {
    transform: translateX(-108%) scaleX(0.55);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  100% {
    transform: translateX(108%) scaleX(1.08);
    opacity: 0;
  }
}

@keyframes color-rush-cell-pop-color {
  0% {
    transform: scale(1);
    filter: brightness(1) saturate(1);
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(147, 234, 255, 0);
  }
  20% {
    transform: scale(1.14);
    filter: brightness(1.55) saturate(1.15);
    box-shadow: 0 0 14px 4px rgba(147, 234, 255, 0.65);
  }
  55% {
    transform: scale(0.88) rotate(-5deg);
    filter: brightness(1.25);
    opacity: 0.88;
    box-shadow: 0 0 20px 8px rgba(255, 255, 255, 0.45);
  }
  100% {
    transform: scale(0.15);
    filter: brightness(1.8);
    opacity: 0;
    box-shadow: 0 0 28px 12px rgba(147, 234, 255, 0);
  }
}

@keyframes color-rush-cell-pop-master {
  0% {
    transform: scale(1);
    filter: brightness(1) saturate(1);
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(255, 215, 87, 0);
  }
  22% {
    transform: scale(1.2);
    filter: brightness(1.7) saturate(1.25);
    box-shadow: 0 0 18px 6px rgba(255, 215, 87, 0.7);
  }
  52% {
    transform: scale(0.82) rotate(7deg);
    opacity: 0.92;
    box-shadow: 0 0 24px 10px rgba(196, 181, 253, 0.5);
  }
  100% {
    transform: scale(0.12);
    filter: brightness(2);
    opacity: 0;
    box-shadow: 0 0 32px 14px rgba(255, 215, 87, 0);
  }
}

@keyframes color-rush-board-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  18% {
    transform: translateX(-3px);
  }
  36% {
    transform: translateX(3px);
  }
  54% {
    transform: translateX(-2px);
  }
  72% {
    transform: translateX(2px);
  }
}

.color-rush-cell.is-row-clearing {
  z-index: 2;
  pointer-events: none;
}

.color-rush-cell.is-row-clearing--color {
  animation: color-rush-cell-pop-color 0.42s ease-in forwards;
}

.color-rush-cell.is-row-clearing--master {
  animation: color-rush-cell-pop-master 0.52s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.color-rush-board-wrap.is-gem-clear--master {
  animation: color-rush-board-shake 0.34s ease-in-out;
}

@keyframes color-rush-row-flash {
  0% { filter: brightness(1); }
  50% { filter: brightness(1.85); }
  100% { filter: brightness(1); }
}

@media (prefers-reduced-motion: reduce) {
  .color-rush-row-sweep {
    display: none;
  }

  .color-rush-board-wrap.is-gem-clear--master {
    animation: none;
  }

  .color-rush-cell.is-row-clearing {
    animation: color-rush-row-flash 0.15s ease-in-out forwards;
  }

  .color-rush-board-wrap.is-match-clear--combo {
    animation: none;
  }

  .color-rush-cell.is-match-clearing {
    animation: color-rush-row-flash 0.15s ease-in-out forwards;
  }
}

.color-rush-cell[data-color="red"] { background: #cf4b42; }
.color-rush-cell[data-color="yellow"] { background: #f1df4c; }
.color-rush-cell[data-color="blue"] { background: #4255a0; }
.color-rush-cell[data-color="green"] { background: #4caf54; }
.color-rush-cell[data-color="purple"] { background: #8a5cf3; }

.color-rush-cell[data-gem]::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  pointer-events: none;
}

.color-rush-cell[data-gem]::before {
  content: "";
  position: absolute;
  pointer-events: none;
}

.color-rush-cell__gem-mark {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.95);
  text-shadow:
    0 0 4px rgba(255, 255, 255, 0.45),
    0 1px 2px rgba(0, 0, 0, 0.35);
  font-weight: 800;
}

.color-rush-cell[data-gem="master"] .color-rush-cell__gem-mark {
  font-size: clamp(0.66rem, 1.2vw, 0.92rem);
  letter-spacing: 0.02em;
  text-shadow:
    0 0 5px rgba(255, 248, 219, 0.82),
    0 0 10px rgba(255, 215, 87, 0.54),
    0 1px 2px rgba(0, 0, 0, 0.36);
  animation: color-rush-master-mark-pulse 2s ease-in-out infinite;
}

.color-rush-cell[data-gem="color"] .color-rush-cell__gem-mark {
  font-size: clamp(0.62rem, 1.12vw, 0.86rem);
  text-shadow:
    0 0 4px rgba(209, 246, 255, 0.7),
    0 0 8px rgba(80, 198, 240, 0.45),
    0 1px 2px rgba(0, 0, 0, 0.34);
  animation: color-rush-color-mark-shimmer 2.8s ease-in-out infinite;
}

.color-rush-cell[data-gem="color"]::after {
  border-color: rgba(229, 231, 235, 0.95);
  box-shadow:
    0 0 0 1px rgba(229, 231, 235, 0.45),
    0 0 10px rgba(121, 214, 255, 0.28),
    inset 0 0 5px rgba(255, 255, 255, 0.2);
}

.color-rush-cell[data-gem="color"]::before {
  inset: 16%;
  border-radius: 7px;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.95) 0 18%, rgba(255, 255, 255, 0) 52%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.55), rgba(147, 234, 255, 0.35) 54%, rgba(67, 167, 220, 0.38));
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.5),
    inset 0 -2px 3px rgba(0, 0, 0, 0.17);
  clip-path: polygon(50% 0%, 100% 34%, 86% 100%, 14% 100%, 0% 34%);
  animation: color-rush-color-core-float 2.8s ease-in-out infinite;
}

.color-rush-cell[data-gem="master"]::after {
  border-color: rgba(254, 243, 199, 0.95);
  box-shadow:
    0 0 0 1px rgba(254, 243, 199, 0.5),
    0 0 13px rgba(255, 208, 87, 0.4),
    inset 0 0 6px rgba(255, 255, 255, 0.2);
  animation: color-rush-master-ring-pulse 1.85s ease-in-out infinite;
}

.color-rush-cell[data-gem="master"]::before {
  inset: 14%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.95) 0 20%, rgba(255, 255, 255, 0) 54%),
    radial-gradient(circle at 50% 58%, rgba(255, 231, 156, 0.92) 0 44%, rgba(200, 132, 18, 0.8) 70%, rgba(118, 73, 10, 0.72) 100%);
  box-shadow:
    0 0 0 1.5px rgba(255, 240, 188, 0.82),
    0 0 12px rgba(255, 209, 97, 0.55),
    0 0 22px rgba(137, 92, 246, 0.28);
  animation: color-rush-master-core-pulse 1.85s ease-in-out infinite;
}

@keyframes color-rush-color-core-float {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.06); filter: brightness(1.12); }
}

@keyframes color-rush-color-mark-shimmer {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 1; }
}

@keyframes color-rush-master-core-pulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.09); filter: brightness(1.14); }
}

@keyframes color-rush-master-ring-pulse {
  0%, 100% { opacity: 0.92; }
  50% { opacity: 1; }
}

@keyframes color-rush-master-mark-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}

@media (max-width: 720px), (max-height: 760px) {
  .color-rush-page {
    min-height: calc(100dvh - 7.2rem);
    padding-top: 0.2rem;
  }

  .color-rush-shell__toolbar {
    gap: 0.3rem 0.55rem;
    padding: 0.35rem 0;
  }

  .color-rush-stat {
    min-width: 74px;
    padding-inline: 0.4rem;
  }

  .color-rush-stat__value {
    font-size: 1.12rem;
  }

  .color-rush-next__swatches {
    width: 62px;
    height: 36px;
  }

  .color-rush-next__swatch--next {
    width: 36px;
    height: 24px;
    left: 21px;
  }

  .color-rush-next__swatch--current {
    width: 48px;
    height: 29px;
    top: 5px;
    left: 6px;
  }

  .color-rush-status {
    min-height: 1rem;
    font-size: 0.85rem;
    margin-bottom: 0.22rem;
  }

  .color-rush-board {
    width: min(475px, calc(100vw - 0.75rem), calc(100dvh - 166px), var(--color-rush-board-fit, 9999px));
  }

  .color-rush-help {
    margin-top: 0.12rem;
    padding: 0.35rem 0 0.24rem;
  }

  .color-rush-help__title {
    font-size: 0.74rem;
  }

  .color-rush-help__line {
    font-size: 0.72rem;
    line-height: 1.25;
  }

  .color-rush-help__icon-cell.color-rush-cell {
    width: 1.08rem;
    height: 1.08rem;
    min-width: 1.08rem;
    min-height: 1.08rem;
    max-width: 1.08rem;
    max-height: 1.08rem;
  }
}

/* Desktop only — use viewport for shell + board; mobile/tablet rules above unchanged */
@media (min-width: 1025px) {
  .color-rush-page {
    min-height: calc(100dvh - 5.5rem);
    padding-inline: clamp(0.75rem, 2vw, 1.5rem);
  }

  .color-rush-shell-wrap {
    width: 100%;
    max-width: 100%;
    align-items: stretch;
  }

  .color-rush-shell {
    width: 100%;
    max-width: 100%;
    min-height: calc(100dvh - 6.5rem);
  }

  .color-rush-shell__play {
    flex: 1 1 auto;
    min-height: 0;
  }

  .color-rush-board-wrap {
    width: 100%;
  }

  .color-rush-board {
    width: min(
      100%,
      calc(100dvh - 12rem),
      var(--color-rush-board-fit, 9999px)
    );
  }
}
