.cbn-shell {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 14px 26px;
  color: var(--cg-ink);
  font-family: Inter, Arial, sans-serif;
}

.cbn-topbar,
.cbn-statline,
.cbn-actions,
.cbn-row,
.cbn-panel-head,
.cbn-result-actions {
  display: flex;
  align-items: center;
}

.cbn-topbar {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.cbn-statline,
.cbn-actions {
  gap: 8px;
}

.cbn-stat {
  min-width: 74px;
  padding: 8px 10px;
  border: 1px solid var(--cg-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(33, 43, 40, 0.08);
  text-align: center;
}

.cbn-stat span {
  display: block;
  color: var(--cg-muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cbn-stat strong {
  display: block;
  margin-top: 2px;
  font-size: 19px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.cbn-btn,
.cbn-close {
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--cg-line);
  border-radius: 12px;
  background: #fff;
  color: var(--cg-ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.cbn-btn:hover,
.cbn-close:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(33, 43, 40, 0.12);
}

.cbn-btn:focus-visible,
.cbn-close:focus-visible,
.cbn-swatch:focus-visible,
.cbn-pic:focus-visible,
.cbn-seg-btn:focus-visible,
.cbn-board:focus-visible {
  outline: 3px solid rgba(49, 95, 157, 0.4);
  outline-offset: 3px;
}

.cbn-icon {
  padding: 0;
  font-size: 20px;
}

.cbn-primary {
  border-color: transparent;
  background: var(--cg-teal);
  color: #fff;
}

.cbn-stage {
  position: relative;
  padding: 12px;
  border: 1px solid var(--cg-line);
  border-radius: 22px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.95), rgba(246, 239, 224, 0.6) 60%, rgba(232, 219, 194, 0.7)),
    linear-gradient(180deg, #fdf7e9, #f0e6d2);
  box-shadow: var(--cg-shadow);
}

.cbn-boardwrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 16px;
  background: #fbf7ec;
  box-shadow: inset 0 0 0 1px rgba(120, 98, 62, 0.16), 0 10px 22px rgba(80, 62, 34, 0.12);
  touch-action: none;
}

.cbn-boardwrap::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(38deg, rgba(160, 132, 88, 0.05) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(-52deg, rgba(160, 132, 88, 0.045) 0 1px, transparent 1px 7px),
    radial-gradient(80% 60% at 50% 45%, rgba(255, 255, 255, 0.55), transparent 70%);
  mix-blend-mode: multiply;
  z-index: 1;
}

.cbn-boardwrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  box-shadow: inset 0 0 40px rgba(120, 96, 58, 0.16);
  border-radius: 16px;
}

.cbn-board {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
  touch-action: none;
  cursor: crosshair;
}

.cbn-region path {
  fill: rgba(255, 255, 255, 0.62);
  stroke: rgba(120, 98, 62, 0.42);
  stroke-width: 0.16;
  transition: fill 180ms ease;
}

.cbn-region.is-done path {
  fill: var(--cbn-t);
  stroke: rgba(70, 54, 30, 0.28);
  stroke-width: 0.2;
}

.cbn-region.is-pop {
  transform-box: fill-box;
  transform-origin: center;
  animation: cbn-pop 320ms ease-out;
}

.cbn-region.is-focus path {
  stroke: #1e2528;
  stroke-width: 0.9;
  stroke-dasharray: 2.4 1.6;
}

.cbn-region.is-bad path {
  animation: cbn-wrong 420ms ease;
}

.cbn-region.is-hint path {
  animation: cbn-hint 1.4s ease-in-out;
}

.cbn-num {
  fill: #6a5a3c;
  font-family: Inter, Arial, sans-serif;
  font-weight: 800;
  pointer-events: none;
  user-select: none;
}

.cbn-region.is-done .cbn-num {
  opacity: 0;
  transition: opacity 220ms ease;
}

.cbn-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  height: 6px;
  background: rgba(120, 98, 62, 0.14);
  pointer-events: none;
}

.cbn-progress i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(90deg, #f0b64a, #e0714f 55%, #5f9a58);
  transition: width 260ms ease;
}

.cbn-boardwrap.is-complete .cbn-progress i {
  background: linear-gradient(90deg, #7fc46a, #3f9a7a);
}

.cbn-fx {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.cbn-dot {
  position: absolute;
  width: 9px;
  height: 9px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  animation: cbn-fly 620ms cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}

.cbn-spark {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  animation: cbn-burst 1s ease-out forwards;
}

.cbn-loupe {
  position: absolute;
  z-index: 6;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.95);
  background: #fbf7ec;
  box-shadow: 0 10px 26px rgba(48, 36, 18, 0.34);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 150ms ease, transform 150ms ease;
  pointer-events: none;
}

.cbn-loupe.is-on {
  opacity: 1;
  transform: scale(1);
}

.cbn-loupe svg {
  width: 100%;
  height: 100%;
  display: block;
}

.cbn-loupe::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(120, 98, 62, 0.3), inset 0 0 26px rgba(90, 70, 40, 0.25);
  pointer-events: none;
}

.cbn-result {
  position: absolute;
  inset: auto 0 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  text-align: center;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 253, 245, 0.93), rgba(244, 236, 216, 0.98));
  backdrop-filter: blur(6px);
}

.cbn-result > span {
  color: var(--cg-green);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cbn-result > strong {
  font-size: 26px;
  line-height: 1.1;
}

.cbn-result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  max-width: 420px;
  margin-top: 4px;
}

.cbn-result-grid div {
  padding: 8px 4px;
  border: 1px solid var(--cg-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
}

.cbn-result-grid span {
  display: block;
  color: var(--cg-muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.cbn-result-grid b {
  display: block;
  margin-top: 2px;
  font-size: 15px;
}

.cbn-result-actions {
  gap: 8px;
  margin-top: 10px;
}

.cbn-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--cg-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(33, 43, 40, 0.08);
}

.cbn-panel-head {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.cbn-panel-head span {
  color: var(--cg-muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cbn-panel-head b {
  color: var(--cg-teal);
  font-size: 14px;
}

.cbn-palette {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 8px;
}

.cbn-swatch {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 56px;
  padding: 6px 4px 5px;
  border: 2px solid var(--cg-line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  transition: transform 130ms ease, border-color 130ms ease, box-shadow 130ms ease;
}

.cbn-swatch:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(33, 43, 40, 0.14);
}

.cbn-chip {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 13px;
  height: 13px;
  border-radius: 4px;
  background: var(--cbn-s);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.cbn-numtag {
  font-size: 21px;
  line-height: 1;
  color: var(--cg-ink);
}

.cbn-left {
  display: block;
  margin-top: 3px;
  color: var(--cg-muted);
  font-size: 10px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.cbn-swatch.is-sel {
  border-color: var(--cg-teal);
  box-shadow: 0 0 0 3px rgba(18, 122, 137, 0.22);
  transform: translateY(-2px);
}

.cbn-swatch.is-done {
  opacity: 0.5;
}

.cbn-row {
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.cbn-hintbtn {
  border-color: rgba(196, 122, 23, 0.5);
  color: #8a5406;
  background: linear-gradient(180deg, #fff8e8, #fdf0d4);
}

.cbn-seg {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--cg-line);
  border-radius: 14px;
  background: rgba(246, 247, 242, 0.9);
}

.cbn-seg-btn {
  min-width: 84px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--cg-muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.cbn-seg-btn[aria-pressed="true"] {
  background: #fff;
  color: var(--cg-ink);
  box-shadow: 0 4px 10px rgba(33, 43, 40, 0.12);
}

.cbn-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.cbn-pic {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 6px 10px;
  border: 2px solid var(--cg-line);
  border-radius: 14px;
  background: #fff;
  color: var(--cg-ink);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  transition: transform 130ms ease, border-color 130ms ease;
}

.cbn-pic:hover {
  transform: translateY(-2px);
}

.cbn-pic.is-on {
  border-color: var(--cg-green);
  box-shadow: 0 0 0 3px rgba(29, 127, 98, 0.18);
}

.cbn-pic-glyph {
  display: grid;
  grid-template-columns: repeat(2, 9px);
  grid-auto-rows: 9px;
  gap: 2px;
  flex: 0 0 auto;
  padding: 3px;
  border-radius: 6px;
  background: #f2ede1;
}

.cbn-pic-glyph i {
  border-radius: 2px;
}

.cbn-note {
  margin: 12px 2px 0;
  color: var(--cg-muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.cbn-live {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.cbn-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(30, 37, 40, 0.55);
}

.cbn-modal-card {
  position: relative;
  max-width: 460px;
  max-height: 86vh;
  overflow: auto;
  padding: 20px 22px 24px;
  border-radius: 18px;
  background: var(--cg-panel);
  box-shadow: var(--cg-shadow);
}

.cbn-modal-card h2 {
  margin: 0 44px 10px 0;
  font-size: 21px;
}

.cbn-modal-card p {
  margin: 0 0 10px;
  color: var(--cg-muted);
  line-height: 1.55;
}

.cbn-close {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 0;
  font-size: 24px;
}

.cbn-hidden {
  display: none !important;
}

@keyframes cbn-pop {
  0% { transform: scale(0.86); }
  60% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

@keyframes cbn-wrong {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-1.6px); }
  45% { transform: translateX(1.6px); }
  70% { transform: translateX(-0.9px); }
}

@keyframes cbn-hint {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.4) saturate(1.3); }
}

@keyframes cbn-fly {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--cbn-x), var(--cbn-y)) scale(0.2); opacity: 0; }
}

@keyframes cbn-burst {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
  100% {
    transform: translate(var(--cbn-d), -60px) rotate(var(--cbn-r)) scale(0.2);
    opacity: 0;
  }
}

.cbn-boardwrap.is-shake {
  animation: cbn-shake 300ms ease;
}

@keyframes cbn-shake {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-3px, 1px); }
  50% { transform: translate(3px, -1px); }
  75% { transform: translate(-2px, -1px); }
}

@media (max-width: 640px) {
  .cbn-shell {
    padding: 0 10px 20px;
  }

  .cbn-stat {
    min-width: 62px;
    padding: 7px 8px;
  }

  .cbn-stat strong {
    font-size: 16px;
  }

  .cbn-stage {
    padding: 8px;
    border-radius: 18px;
  }

  .cbn-palette {
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    gap: 6px;
  }

  .cbn-swatch {
    min-height: 52px;
  }

  .cbn-numtag {
    font-size: 18px;
  }

  .cbn-picker {
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  }

  .cbn-seg {
    flex: 1 1 auto;
  }

  .cbn-seg-btn {
    flex: 1 1 0;
    min-width: 0;
  }

  .cbn-loupe {
    width: 118px;
    height: 118px;
  }

  .cbn-result {
    gap: 6px;
    padding: 14px;
  }

  .cbn-result > strong {
    font-size: 20px;
  }

  .cbn-result-grid b {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cbn-region.is-pop,
  .cbn-region.is-bad,
  .cbn-boardwrap.is-shake {
    animation: none;
  }

  .cbn-dot,
  .cbn-spark {
    display: none;
  }
}

.cbn-shell {
  max-width: 1040px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  grid-template-areas: "top top" "stage panel" "live live";
  gap: 12px 16px;
  align-items: start;
}

.cbn-topbar { grid-area: top; margin: 0; flex-wrap: nowrap; }
.cbn-stage { grid-area: stage; }
.cbn-panel { grid-area: panel; margin: 0; }
.cbn-live { grid-area: live; }

.cbn-statline { gap: 6px; min-width: 0; }

.cbn-stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  padding: 0 10px;
  height: 40px;
  align-items: center;
  border-radius: 12px;
}

.cbn-stat span { display: inline; font-size: 10px; }
.cbn-stat strong { display: inline; margin: 0; font-size: 17px; }

.cbn-shell[data-combo="0"] .cbn-stat:nth-child(3),
.cbn-shell[data-combo="1"] .cbn-stat:nth-child(3) { opacity: 0.55; }
.cbn-shell:not([data-combo="0"]):not([data-combo="1"]) .cbn-stat:nth-child(3) strong { color: var(--cg-amber); }

.cbn-stage {
  padding: 14px;
  border: 0;
  border-radius: 22px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.5), transparent 60%),
    linear-gradient(160deg, #8a6a46, #5f4629 55%, #4a3520);
  box-shadow: 0 18px 40px rgba(60, 40, 18, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -3px 0 rgba(0, 0, 0, 0.25);
}

.cbn-shell[data-scene="0"] .cbn-stage { background: radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,.4), transparent 60%), linear-gradient(160deg, #3d84a6, #24566f 60%, #1b3f54); }
.cbn-shell[data-scene="1"] .cbn-stage { background: radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,.35), transparent 60%), linear-gradient(160deg, #6f9f66, #3f7347 60%, #2c5233); }
.cbn-shell[data-scene="2"] .cbn-stage { background: radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,.3), transparent 60%), linear-gradient(160deg, #33507a, #1d3050 60%, #121e35); }
.cbn-shell[data-scene="3"] .cbn-stage { background: radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,.4), transparent 60%), linear-gradient(160deg, #e0714f, #b0492f 60%, #7c3020); }
.cbn-shell[data-scene="4"] .cbn-stage { background: radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,.35), transparent 60%), linear-gradient(160deg, #a9743f, #7a4e2a 60%, #543519); }

.cbn-boardwrap {
  border-radius: 10px;
  box-shadow: 0 0 0 3px rgba(255, 244, 214, 0.9), 0 0 0 4px rgba(0, 0, 0, 0.3), 0 12px 24px rgba(0, 0, 0, 0.35);
}

.cbn-boardwrap::after { border-radius: 10px; }

.cbn-region path.cbn-gloss {
  fill: url(#cbn-gl);
  stroke: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}

.cbn-region.is-done path.cbn-gloss { opacity: 1; }

.cbn-region.is-target path:first-child {
  fill: color-mix(in srgb, var(--cbn-t) 60%, white);
  animation: cbn-target 1.6s ease-in-out infinite;
}

.cbn-region.is-target .cbn-num { fill: #1e2528; }

.cbn-region.is-done path:first-child { filter: drop-shadow(0 0.25px 0.25px rgba(40, 30, 10, 0.35)); }

.cbn-progress { height: 8px; background: rgba(0, 0, 0, 0.22); }

.cbn-ring {
  position: absolute;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 3px solid #fff;
  border-radius: 50%;
  animation: cbn-ring 520ms ease-out forwards;
}

.cbn-float {
  position: absolute;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45), 0 0 10px rgba(240, 182, 74, 0.9);
  transform: translate(-50%, -50%);
  animation: cbn-float 760ms ease-out forwards;
}

.cbn-sweep {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%);
  transform: translateX(-100%);
}

.cbn-boardwrap.is-complete .cbn-sweep { animation: cbn-sweep 1.4s ease-out 0.15s 1 forwards; }

.cbn-result {
  padding: 12px 14px 14px;
  gap: 6px;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(255, 253, 245, 0.9), rgba(244, 236, 216, 0.97));
  animation: cbn-rise 420ms ease-out;
}

.cbn-result > strong { font-size: 22px; }
.cbn-result-grid { max-width: 460px; }
.cbn-result-actions { margin-top: 4px; }

.cbn-panel {
  position: sticky;
  top: 8px;
}

.cbn-palette {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.cbn-swatch {
  min-height: 58px;
  border: 3px solid rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  background: var(--cbn-s);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.16), 0 3px 0 rgba(0, 0, 0, 0.2);
  flex-direction: column;
}

.cbn-swatch::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 11px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.35), transparent 50%, rgba(0, 0, 0, 0.12));
  pointer-events: none;
}

.cbn-chip { display: none; }

.cbn-numtag {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  font-size: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.cbn-left {
  position: absolute;
  right: 3px;
  bottom: 2px;
  margin: 0;
  padding: 1px 5px;
  border-radius: 8px;
  background: rgba(30, 37, 40, 0.72);
  color: #fff;
  font-size: 10px;
}

.cbn-swatch.is-sel {
  border-color: #fff;
  box-shadow: 0 0 0 3px var(--cg-ink), 0 6px 14px rgba(0, 0, 0, 0.3);
  transform: translateY(-3px) scale(1.04);
}

.cbn-swatch.is-done {
  opacity: 0.38;
  filter: saturate(0.6);
}

.cbn-swatch.is-done .cbn-left { background: var(--cg-green); font-size: 0; }
.cbn-swatch.is-done .cbn-left::after { content: "\2713"; font-size: 11px; }

@keyframes cbn-target {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

@keyframes cbn-ring {
  0% { transform: scale(0.4); opacity: 0.95; }
  100% { transform: scale(3.6); opacity: 0; }
}

@keyframes cbn-float {
  0% { transform: translate(-50%, -20%) scale(0.6); opacity: 0; }
  25% { transform: translate(-50%, -80%) scale(1.25); opacity: 1; }
  100% { transform: translate(-50%, -220%) scale(1); opacity: 0; }
}

@keyframes cbn-sweep {
  0% { transform: translateX(-100%); opacity: 1; }
  100% { transform: translateX(100%); opacity: 1; }
}

@keyframes cbn-rise {
  0% { transform: translateY(30%); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@media (max-width: 860px) {
  .cbn-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "top" "stage" "panel" "live";
    gap: 8px;
  }

  .cbn-panel { position: static; padding: 10px; }
}

@media (max-width: 640px) {
  .cbn-shell { padding: 0 8px 20px; }
  .cbn-stage { padding: 7px; border-radius: 16px; }
  .cbn-topbar { gap: 6px; }
  .cbn-stat { padding: 0 7px; height: 38px; gap: 4px; }
  .cbn-stat span { display: none; }
  .cbn-stat:nth-child(3) strong::before { content: "x"; }
  .cbn-stat strong { font-size: 15px; }
  .cbn-stat-streak { display: none; }
  .cbn-actions { gap: 6px; }
  .cbn-btn { padding: 0 10px; }

  .cbn-palette {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 8px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .cbn-swatch { flex: 0 0 56px; min-height: 56px; scroll-snap-align: start; }
  .cbn-panel-head { margin-bottom: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .cbn-ring, .cbn-float, .cbn-sweep, .cbn-result, .cbn-region.is-target path:first-child { animation: none; }
}

.cg-shell-game .cg-stage-main #game-root > .cbn-shell {
  max-width: min(100%, 1040px) !important;
}

@media (max-width: 860px) {
  .cbn-shell { max-width: 100% !important; }
}

.cbn-region.is-target path:first-child {
  stroke: var(--cg-ink);
  stroke-width: 0.35;
  stroke-dasharray: 1.6 1.1;
}
