/* ==========================================================================
   Game: Numbrix  (number path logic puzzle)
   Self-contained — every class is prefixed .nbx-. Dark "stage" panel in both
   site themes with a light paper grid. Uses site tokens from common.css.
   ========================================================================== */

.nbx {
  --nbx-bg: #14162d;
  --nbx-card: rgba(255, 255, 255, .06);
  --nbx-card-hover: rgba(255, 255, 255, .11);
  --nbx-line: rgba(255, 255, 255, .12);
  --nbx-text: #fff;
  --nbx-sub: rgba(255, 255, 255, .72);
  --nbx-good: #19c28f;
  --nbx-bad: #ff5c8a;
  --nbx-warn: #ffb547;
  --nbx-accent: var(--hot);
  --nbx-paper: #f7f6ff;
  --nbx-ink: #1d1f3d;
  --nbx-gap: 3px;

  position: relative;
  margin: 10px 0 40px;
  padding: 36px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(110% 80% at 100% 0%, rgba(30, 136, 229, .3), transparent 55%),
    radial-gradient(90% 80% at 0% 100%, rgba(91, 61, 245, .45), transparent 60%),
    var(--nbx-bg);
  color: var(--nbx-text);
  isolation: isolate;
  min-height: 520px;
}
:root[data-theme="dark"] .nbx { border: 1px solid var(--line); }

/* Decorative dotted path */
.nbx::before {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  z-index: -1;
  width: 300px;
  height: 300px;
  background-image: radial-gradient(circle, rgba(255, 216, 77, .35) 2px, transparent 2.5px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(circle, #000 30%, transparent 70%);
  mask-image: radial-gradient(circle, #000 30%, transparent 70%);
  opacity: .35;
}

.nbx-screen[hidden] { display: none !important; }
.nbx-screen { animation: nbx-fade .35s var(--ease); }
@keyframes nbx-fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.nbx-ico {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Buttons ---------- */
.nbx-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 18px;
  border: 1px solid var(--nbx-line);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--nbx-text);
  font: 600 .875rem/1.2 var(--font);
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.nbx-ghost:hover { background: var(--nbx-card-hover); }
.nbx-ghost--danger { color: var(--nbx-sub); }
.nbx-ghost.is-confirm { border-color: var(--nbx-bad); color: var(--nbx-bad); }
.nbx-ghost .nbx-ico--off { display: none; }
.nbx-ghost.is-off .nbx-ico--on { display: none; }
.nbx-ghost.is-off .nbx-ico--off { display: block; }

.nbx-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  padding: 0;
  border: 1px solid var(--nbx-line);
  border-radius: 50%;
  background: var(--nbx-card);
  color: var(--nbx-text);
  cursor: pointer;
  transition: background-color .2s var(--ease);
}
.nbx-icon-btn:hover { background: var(--nbx-card-hover); }

.nbx .btn-pill { min-height: 46px; padding: 11px 24px; }
.nbx .btn-pill:not(.btn-pill--hot) { background: var(--brand-soft); color: var(--night); }
.nbx button:focus-visible { outline: 3px solid var(--nbx-accent); outline-offset: 2px; }

/* ==========================================================================
   Home
   ========================================================================== */
.nbx-home__head { display: flex; align-items: flex-start; gap: 22px; max-width: 780px; }

.nbx-logo {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  flex: none;
  width: 76px;
  height: 76px;
  padding: 6px;
  border-radius: 20px;
  background: linear-gradient(145deg, var(--brand), #1e88e5);
  box-shadow: 0 12px 30px rgba(30, 136, 229, .35);
}
.nbx-logo span {
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: rgba(255, 255, 255, .92);
  color: var(--brand);
  font-size: .72rem;
  font-weight: 800;
  animation: nbx-logo 3s ease-in-out infinite;
}
.nbx-logo span:nth-child(1) { animation-delay: 0s; }
.nbx-logo span:nth-child(2) { animation-delay: .15s; }
.nbx-logo span:nth-child(3) { animation-delay: .3s; }
.nbx-logo span:nth-child(6) { animation-delay: .45s; }
.nbx-logo span:nth-child(5) { animation-delay: .6s; }
.nbx-logo span:nth-child(4) { animation-delay: .75s; }
.nbx-logo span:nth-child(7) { animation-delay: .9s; }
.nbx-logo span:nth-child(8) { animation-delay: 1.05s; }
.nbx-logo span:nth-child(9) { animation-delay: 1.2s; }
@keyframes nbx-logo {
  0%, 40%, 100% { background: rgba(255, 255, 255, .92); color: var(--brand); }
  20% { background: var(--hot); color: var(--night); }
}

.nbx-kicker {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 216, 77, .14);
  color: var(--nbx-accent);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.nbx-title { margin: 0 0 8px; font-size: clamp(2rem, 4.4vw, 3rem); letter-spacing: -.035em; line-height: 1.05; }
.nbx-lead { margin: 0; color: var(--nbx-sub); }

/* Daily puzzle card */
.nbx-daily {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  max-width: 640px;
  margin: 28px 0 0;
  padding: 16px 20px 16px 16px;
  border: 1px solid rgba(255, 216, 77, .4);
  border-radius: var(--radius-md);
  background: linear-gradient(120deg, rgba(255, 216, 77, .16), rgba(255, 255, 255, .04));
  color: var(--nbx-text);
  font-family: var(--font);
  text-align: left;
  cursor: pointer;
  transition: transform .2s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease);
}
.nbx-daily:hover { transform: translateY(-2px); border-color: var(--nbx-accent); }
.nbx-daily.is-done { border-color: rgba(25, 194, 143, .5); background: linear-gradient(120deg, rgba(25, 194, 143, .16), rgba(255, 255, 255, .04)); }
.nbx-daily__cal {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: none;
  width: 62px;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  color: var(--night);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
}
.nbx-daily__cal span {
  width: 100%;
  padding: 3px 0;
  background: var(--nbx-bad);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
}
.nbx-daily__cal strong { padding: 2px 0 6px; font-size: 1.6rem; line-height: 1.1; }
.nbx-daily__body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.nbx-daily__kicker { color: var(--nbx-accent); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.nbx-daily__name { font-size: 1.15rem; font-weight: 700; line-height: 1.25; }
.nbx-daily__status { color: var(--nbx-sub); font-size: .84rem; }
.nbx-daily__go {
  flex: none;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--hot);
  color: var(--night);
  font-size: .9rem;
  font-weight: 700;
}

.nbx-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 24px 0 26px;
}
.nbx-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.nbx-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--nbx-line);
  border-radius: var(--radius-pill);
  background: var(--nbx-card);
}
.nbx-chip__label { color: var(--nbx-sub); font-size: .78rem; font-weight: 500; }
.nbx-chip strong { color: var(--nbx-accent); font-size: 1rem; }
.nbx-toolbar__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.nbx-subtitle { margin: 0 0 14px; font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; color: var(--nbx-sub); }

.nbx-stages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nbx-stage {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  height: 100%;
  padding: 18px;
  border: 1px solid var(--nbx-line);
  border-radius: var(--radius-md);
  background: var(--nbx-card);
  color: var(--nbx-text);
  font-family: var(--font);
  text-align: left;
  cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease);
}
.nbx-stage:hover:not(:disabled) { transform: translateY(-3px); border-color: rgba(255, 216, 77, .55); background: var(--nbx-card-hover); }
.nbx-stage.is-cleared { border-color: rgba(25, 194, 143, .45); }
.nbx-stage.is-locked { cursor: not-allowed; opacity: .5; }
.nbx-stage__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nbx-stage__num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--nbx-accent);
  color: var(--night);
  font-size: 1.1rem;
  font-weight: 700;
}
.nbx-stage.is-locked .nbx-stage__num { background: rgba(255, 255, 255, .14); color: var(--nbx-text); }
.nbx-stage__size {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .08);
  color: var(--nbx-sub);
  font-size: .75rem;
  font-weight: 700;
}
.nbx-stage__body { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nbx-stage__name { font-size: 1rem; font-weight: 700; line-height: 1.3; }
.nbx-stage__blurb { color: var(--nbx-sub); font-size: .82rem; line-height: 1.45; }
.nbx-stage__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--nbx-line);
}
.nbx-stage__best { color: var(--nbx-sub); font-size: .78rem; font-weight: 600; }

.nbx-star { color: rgba(255, 255, 255, .22); font-size: 1.05rem; line-height: 1; }
.nbx-star.is-on { color: var(--nbx-accent); text-shadow: 0 0 12px rgba(255, 216, 77, .5); }

.nbx-noscript { margin: 16px 0 0; padding: 14px 18px; border-radius: var(--radius-sm); background: rgba(255, 92, 138, .15); }

/* ==========================================================================
   Play
   ========================================================================== */
.nbx-play { position: relative; }

.nbx-hud { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 20px; }
.nbx-hud__stage {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 216, 77, .14);
  color: var(--nbx-accent);
  font-size: .8rem;
  font-weight: 700;
}
.nbx-hud__stats { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-left: auto; }
.nbx-stat { display: flex; flex-direction: column; line-height: 1.2; }
.nbx-stat__label { color: var(--nbx-sub); font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.nbx-stat strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }

.nbx-arena {
  display: grid;
  grid-template-columns: minmax(0, 540px) minmax(240px, 300px);
  justify-content: center;
  align-items: start;
  gap: 28px;
}
.nbx-boardwrap { position: relative; width: 100%; }

.nbx-board {
  --nbx-n: 5;
  display: grid;
  grid-template-columns: repeat(var(--nbx-n), minmax(0, 1fr));
  gap: var(--nbx-gap);
  width: 100%;
  aspect-ratio: 1;
  padding: 8px;
  border-radius: 16px;
  background: #c9c4ef;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
  container-type: inline-size;
  touch-action: manipulation;
}

.nbx-cell {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: var(--nbx-paper);
  color: var(--brand);
  font: 600 calc(42cqw / var(--nbx-n)) / 1 var(--font);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background-color .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.nbx-cell.is-long { font-size: calc(36cqw / var(--nbx-n)); letter-spacing: -.03em; }
.nbx-cell__v { position: relative; z-index: 2; }
.nbx-cell:hover { background: #ecebff; }
.nbx-cell.is-clue { background: #e3defb; color: var(--nbx-ink); font-weight: 800; cursor: default; }
.nbx-cell.is-hint { background: #d7f5ea; color: #0b7a58; font-weight: 800; }
.nbx-cell.is-rel { background: #fff3c2; }
.nbx-cell.is-sel { z-index: 3; background: var(--hot); color: var(--night); box-shadow: 0 0 0 3px var(--night), 0 0 0 5px var(--hot); }
.nbx-cell.is-bad { background: #ffe0e8; color: #d1124a; }
.nbx-cell.is-bad.is-sel { background: #ff9fb8; color: #5a0019; }
.nbx-cell.is-wrong { background: repeating-linear-gradient(135deg, #ffd5df 0 6px, #ffe9ee 6px 12px); color: #d1124a; }
.nbx-cell.is-end .nbx-cell__v { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.nbx-cell:focus-visible { outline: none; }
.nbx-cell.is-pop { animation: nbx-pop .45s var(--ease); }
@keyframes nbx-pop { 40% { transform: scale(1.18); } }

/* Path connectors between consecutive neighbours */
.nbx-cell.link-r::after,
.nbx-cell.link-d::before {
  content: "";
  position: absolute;
  z-index: 1;
  border-radius: 3px;
  background: rgba(91, 61, 245, .28);
  pointer-events: none;
}
.nbx-cell.link-r::after { left: 50%; top: calc(50% - 2px); width: calc(100% + var(--nbx-gap)); height: 4px; }
.nbx-cell.link-d::before { top: 50%; left: calc(50% - 2px); height: calc(100% + var(--nbx-gap)); width: 4px; }

/* Win wave along the path */
.nbx-play.is-won .nbx-cell { animation: nbx-wave .6s var(--ease) var(--nbx-d, 0s) both; cursor: default; }
.nbx-play.is-won .nbx-cell.link-r::after,
.nbx-play.is-won .nbx-cell.link-d::before { background: rgba(11, 122, 88, .45); }
@keyframes nbx-wave {
  0% { transform: none; }
  40% { transform: scale(1.12); background: var(--hot); color: var(--night); }
  100% { transform: none; background: #d7f5ea; color: #0b7a58; }
}

.nbx-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 16px;
  background: rgba(20, 22, 45, .7);
  color: var(--nbx-sub);
  font-weight: 600;
}
.nbx-loading[hidden] { display: none; }
.nbx-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255, 255, 255, .2);
  border-top-color: var(--nbx-accent);
  border-radius: 50%;
  animation: nbx-spin .8s linear infinite;
}
@keyframes nbx-spin { to { transform: rotate(360deg); } }

/* Side panel */
.nbx-side { display: flex; flex-direction: column; gap: 16px; }
.nbx-msg {
  min-height: 48px;
  margin: 0;
  padding: 12px 14px;
  border-left: 4px solid var(--brand-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .07);
  color: var(--nbx-sub);
  font-size: .88rem;
  line-height: 1.4;
}
.nbx-msg.is-good { border-left-color: var(--nbx-good); color: #b6f2dc; }
.nbx-msg.is-bad { border-left-color: var(--nbx-bad); color: #ffc2d2; }
.nbx-msg.is-warn { border-left-color: var(--nbx-warn); color: #ffe0b0; }

.nbx-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.nbx-key {
  display: grid;
  place-items: center;
  min-height: 50px;
  padding: 0;
  border: 1px solid var(--nbx-line);
  border-radius: 12px;
  background: var(--nbx-card);
  color: var(--nbx-text);
  font: 700 1.2rem/1 var(--font);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color .15s var(--ease), transform .1s var(--ease);
}
.nbx-key:hover { background: var(--nbx-card-hover); }
.nbx-key:active { transform: scale(.94); background: rgba(255, 216, 77, .22); }
.nbx-key--wide { grid-column: span 2; }

.nbx-tools { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.nbx-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--nbx-line);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--nbx-text);
  font: 600 .84rem/1.2 var(--font);
  cursor: pointer;
  transition: background-color .2s var(--ease), opacity .2s var(--ease);
}
.nbx-tool .nbx-ico { width: 18px; height: 18px; }
.nbx-tool:hover:not(:disabled) { background: var(--nbx-card-hover); }
.nbx-tool:disabled { opacity: .4; cursor: not-allowed; }
.nbx-tool--hint { border-color: rgba(255, 216, 77, .45); }
.nbx-tool--hint .nbx-ico { color: var(--nbx-accent); }
.nbx-tool:last-child { grid-column: 1 / -1; }
.nbx-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: 3px;
  padding: 0 5px;
  border-radius: 10px;
  background: rgba(255, 216, 77, .18);
  color: var(--nbx-accent);
  font-size: .72rem;
}

/* Pause */
.nbx-play.is-paused .nbx-arena { filter: blur(14px); pointer-events: none; user-select: none; }
.nbx-paused { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 16px; }
.nbx-paused[hidden] { display: none; }
.nbx-paused__card {
  max-width: 400px;
  padding: 28px;
  border: 1px solid var(--nbx-line);
  border-radius: var(--radius-md);
  background: rgba(21, 23, 46, .95);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .45);
  text-align: center;
}
.nbx-paused__title { margin: 0 0 6px; font-size: 1.6rem; }
.nbx-paused__card p { margin: 0 0 20px; color: var(--nbx-sub); font-size: .9rem; }
.nbx-paused__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ==========================================================================
   Results
   ========================================================================== */
.nbx-result { max-width: 640px; margin: 0 auto; padding: 10px 0; text-align: center; }
.nbx-result__stars { display: flex; justify-content: center; gap: 10px; margin-bottom: 8px; }
.nbx-star--big { font-size: clamp(3rem, 9vw, 4.25rem); opacity: 0; animation: nbx-star-in .5s var(--ease) forwards; }
@keyframes nbx-star-in {
  from { opacity: 0; transform: scale(.3) rotate(-30deg); }
  to { opacity: 1; transform: none; }
}
.nbx-result__title { margin: 0 0 6px; font-size: clamp(1.8rem, 4vw, 2.5rem); }
.nbx-result__new {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  background: var(--nbx-accent);
  color: var(--night);
  font-size: .8rem;
  font-weight: 700;
}
.nbx-result__new[hidden] { display: none; }
.nbx-result__text { margin: 0 auto 24px; max-width: 460px; color: var(--nbx-sub); }
.nbx-result__stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 26px; }
.nbx-result__stats div { padding: 14px 8px; border: 1px solid var(--nbx-line); border-radius: var(--radius-sm); background: var(--nbx-card); }
.nbx-result__stats dt { color: var(--nbx-sub); font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.nbx-result__stats dd { margin: 2px 0 0; font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.nbx-result__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.nbx-result__actions [hidden] { display: none; }

/* ==========================================================================
   How to play
   ========================================================================== */
.nbx-guide { margin: 0 0 56px; }
.nbx-guide .section-head__title { margin-bottom: 22px; }
.nbx-guide__item {
  height: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.nbx-guide__item h3 { margin: 12px 0 6px; font-size: 1.05rem; }
.nbx-guide__item p { margin: 0; color: var(--sub); font-size: .9rem; }
.nbx-guide__num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand);
  color: var(--onbrand);
  font-weight: 700;
}
.nbx-guide__back { margin: 24px 0 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 991.98px) {
  .nbx-arena { grid-template-columns: minmax(0, 540px); }
  .nbx-pad { grid-template-columns: repeat(6, 1fr); }
  .nbx-tools { grid-template-columns: repeat(5, 1fr); }
  .nbx-tool:last-child { grid-column: auto; }
}

@media (max-width: 767.98px) {
  .nbx { padding: 24px 20px; min-height: 0; }
  .nbx-result__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nbx-hud__stats { margin-left: 0; order: 3; width: 100%; justify-content: space-between; }
  .nbx-hud .nbx-icon-btn { margin-left: auto; }
}

@media (max-width: 575.98px) {
  .nbx { --nbx-gap: 2px; margin-left: -4px; margin-right: -4px; padding: 20px 12px; border-radius: var(--radius-md); }
  .nbx-home__head { flex-direction: column; gap: 16px; }
  .nbx-logo { width: 62px; height: 62px; }
  .nbx-daily { gap: 12px; padding: 12px; }
  .nbx-daily__cal { width: 52px; }
  .nbx-daily__go { padding: 8px 14px; }
  .nbx-toolbar { flex-direction: column; align-items: stretch; }
  .nbx-toolbar__actions .nbx-ghost { flex: 1; }
  .nbx-stages { grid-template-columns: 1fr; }
  .nbx-hud { margin-bottom: 12px; }
  .nbx-arena { gap: 12px; }
  .nbx-board { padding: 5px; border-radius: 12px; }
  .nbx-cell { border-radius: 4px; }
  .nbx-side { gap: 10px; }
  .nbx-msg { min-height: 0; padding: 8px 12px; font-size: .82rem; }
  .nbx-key { min-height: 44px; font-size: 1.1rem; }
  .nbx-tool { padding: 6px 4px; font-size: .74rem; flex-direction: column; gap: 2px; min-height: 48px; border-radius: 12px; }
  .nbx-tool .nbx-badge { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .nbx-logo span, .nbx-screen, .nbx-spinner { animation: none; }
  .nbx-play.is-won .nbx-cell { animation: none; background: #d7f5ea; color: #0b7a58; }
  .nbx-cell.is-pop { animation: none; }
  .nbx-star--big { opacity: 1; animation: none; }
}

@media (min-width: 992px) {
  .nbx-stages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
