/* פקודה לרובוט — game styles (kit tokens come from ../_kit/wall.css) */

:root {
  --cr-fwd: #38BDF8;
  --cr-right: #6D8BFF;
  --cr-left: #C084FC;
  --cr-loop: #2DD4BF;
  --cr-del: #94A3B8;
  --cr-star: #FCD34D;
  --cr-edit: #FBBF24;
  --cr-bad: #F43F5E;
  --cr-good: #34D399;
  --cr-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, 'Liberation Mono', monospace;
}

.cr-root { position: absolute; inset: 0; isolation: isolate; }

/* ---------- board ---------- */
.cr-board-wrap { position: absolute; }
.cr-board-frame {
  position: absolute;
  inset: 0;
  border-radius: 26px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(56, 189, 248, 0.10), transparent 60%),
    linear-gradient(180deg, rgba(14, 28, 58, 0.86), rgba(6, 13, 29, 0.92));
  border: 1px solid rgba(56, 189, 248, 0.26);
  box-shadow:
    0 0 0 6px rgba(6, 15, 31, 0.5),
    0 0 70px rgba(56, 189, 248, 0.10),
    inset 0 0 60px rgba(56, 189, 248, 0.05);
}
.cr-board {
  position: absolute;
  border-radius: 14px;
  background-color: rgba(2, 8, 19, 0.6);
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.15) 1px, transparent 1px),
    radial-gradient(circle, rgba(56, 189, 248, 0.32) 1.6px, transparent 2.2px);
  background-size: 90px 90px, 90px 90px, 90px 90px;
  background-position: -0.5px -0.5px, -0.5px -0.5px, -45px -45px;
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.30);
}
.cr-cells { position: absolute; inset: 0; }

.cr-wall {
  position: absolute;
  width: 76px;
  height: 76px;
  margin: 7px;
  box-sizing: border-box;
  border-radius: 14px;
  background:
    repeating-linear-gradient(135deg, rgba(148, 163, 184, 0.13) 0 3px, transparent 3px 11px),
    linear-gradient(160deg, #26365a, #121c33 70%);
  border: 1px solid rgba(148, 163, 184, 0.42);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.10),
    inset 0 -6px 12px rgba(0, 0, 0, 0.35),
    0 8px 16px rgba(0, 0, 0, 0.35);
  transition: border-color 250ms ease, box-shadow 250ms ease, background 250ms ease;
}
.cr-wall.is-hit {
  border-color: var(--cr-bad);
  background:
    repeating-linear-gradient(135deg, rgba(244, 63, 94, 0.30) 0 3px, transparent 3px 11px),
    linear-gradient(160deg, #4a1c32, #22101f 70%);
  box-shadow: 0 0 34px rgba(244, 63, 94, 0.65), inset 0 0 18px rgba(244, 63, 94, 0.4);
}

.cr-start {
  position: absolute;
  width: 72px;
  height: 72px;
  margin: 9px;
  box-sizing: border-box;
  border-radius: 18px;
  border: 2px dashed rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.07);
}

.cr-star {
  position: absolute;
  width: 90px;
  height: 90px;
}
.cr-star svg {
  position: absolute;
  left: 11px;
  top: 10px;
  width: 68px;
  height: 68px;
  filter: drop-shadow(0 0 12px rgba(252, 211, 77, 0.85)) drop-shadow(0 0 30px rgba(245, 158, 11, 0.45));
  animation: cr-star-float 2.6s ease-in-out infinite;
}
.cr-star-glow {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(252, 211, 77, 0.30), transparent 65%);
  animation: cr-star-glow 2.6s ease-in-out infinite;
}
.cr-star { z-index: 4; }
.cr-star.is-won svg { animation: cr-star-won 900ms ease-out both; }
.cr-star.is-won .cr-star-glow { transform: translateY(-58px); animation: none; }
.cr-star.is-won .cr-star-glow { background: radial-gradient(circle, rgba(252, 211, 77, 0.65), transparent 70%); inset: -40px; }
@keyframes cr-star-float {
  0%, 100% { transform: translateY(0) rotate(-4deg) scale(1); }
  50% { transform: translateY(-4px) rotate(4deg) scale(1.06); }
}
@keyframes cr-star-glow {
  0%, 100% { opacity: 0.7; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.08); }
}
@keyframes cr-star-won {
  0% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-70px) scale(1.55) rotate(18deg); }
  100% { transform: translateY(-58px) scale(1.3) rotate(0deg); }
}

/* trail of the current run */
.cr-trail { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.cr-trail-line {
  fill: none;
  stroke: var(--cr-fwd);
  stroke-width: 6;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.9));
}
.cr-trail-line.is-bad { stroke: var(--cr-bad); filter: drop-shadow(0 0 6px rgba(244, 63, 94, 0.9)); }
.cr-trail-dot { fill: #E0F5FF; filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.9)); }
.cr-trail-x path { stroke: var(--cr-bad); stroke-width: 6; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(244, 63, 94, 0.9)); }
.cr-trail-run { transition: opacity 500ms ease; }
.cr-trail-run.is-old { opacity: 0.32; }

.cr-edge {
  position: absolute;
  background: var(--cr-bad);
  box-shadow: 0 0 24px 6px rgba(244, 63, 94, 0.7);
  border-radius: 4px;
  opacity: 0;
}

/* ---------- robot ---------- */
.cr-robot {
  position: absolute;
  left: 0;
  top: 0;
  width: 90px;
  height: 90px;
  z-index: 3;
  will-change: transform;
}
.cr-bot {
  position: absolute;
  left: 7px;
  top: 3px;
  width: 76px;
  height: 80px;
  filter: drop-shadow(0 0 14px rgba(56, 189, 248, 0.35));
}
.cr-bot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.cr-bot-eyes { transition: transform 280ms ease, opacity 150ms ease; }
.cr-robot[data-dir="0"] .cr-bot-eyes { transform: translate(0, -3.5px); }
.cr-robot[data-dir="1"] .cr-bot-eyes { transform: translate(5px, 0); }
.cr-robot[data-dir="2"] .cr-bot-eyes { transform: translate(0, 2px); }
.cr-robot[data-dir="3"] .cr-bot-eyes { transform: translate(-5px, 0); }
.cr-bot-x { opacity: 0; transition: opacity 150ms ease; }
.cr-robot.is-crashed .cr-bot-eyes { opacity: 0; }
.cr-robot.is-crashed .cr-bot-x { opacity: 1; }
.cr-robot.is-crashed .cr-bot-visor { fill: #2a0d1c; }
.cr-robot.is-crashed .cr-bot-ant { fill: var(--cr-bad); }
.cr-robot.is-happy .cr-bot-ant { fill: var(--cr-star); }
.cr-robot.is-happy .cr-bot-core { fill: var(--cr-star); }
.cr-bot-ant { animation: cr-blink 2.4s ease-in-out infinite; }
@keyframes cr-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

.cr-heading { position: absolute; inset: 0; }
.cr-heading::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -15px;
  margin-left: -14px;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-bottom: 17px solid var(--cr-fwd);
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.95));
}
.cr-robot.is-crashed .cr-heading::before { border-bottom-color: var(--cr-bad); filter: drop-shadow(0 0 8px rgba(244, 63, 94, 0.95)); }

.cr-bubble {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 20;
  transform: translate(-50%, -100%);
  padding: 12px 24px 14px;
  border-radius: 20px;
  background: #F4F7FB;
  color: #0B1730;
  font-family: var(--wall-font-head);
  font-weight: 800;
  font-size: 28px;
  line-height: 1.1;
  white-space: nowrap;
  box-shadow: 0 0 0 4px rgba(6, 15, 31, 0.6), 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 40px var(--bc, rgba(56, 189, 248, 0.45));
  opacity: 0;
  pointer-events: none;
}
.cr-bubble::after {
  content: '';
  position: absolute;
  left: calc(50% + var(--tail, 0px));
  bottom: -11px;
  margin-left: -11px;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-top: 12px solid #F4F7FB;
}
.cr-bubble.is-below { transform: translate(-50%, 0); }
.cr-bubble.is-below::after { bottom: auto; top: -11px; border-top: none; border-bottom: 12px solid #F4F7FB; }
.cr-bubble.is-bad { --bc: rgba(244, 63, 94, 0.55); }
.cr-bubble.is-warn { --bc: rgba(251, 191, 36, 0.55); }
.cr-bubble.is-good { --bc: rgba(52, 211, 153, 0.6); }

/* ---------- mission card ---------- */
.cr-mission {
  position: absolute;
  box-sizing: border-box;
  padding: 22px 34px 0;
  border-radius: 26px;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(79, 124, 247, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(14, 28, 58, 0.82), rgba(7, 15, 33, 0.86));
  border: 1px solid rgba(79, 124, 247, 0.32);
  box-shadow: 0 0 0 6px rgba(6, 15, 31, 0.45), 0 24px 60px rgba(0, 0, 0, 0.35);
}
.cr-m-kicker { font-size: 22px; }
.cr-m-title { font-size: 52px; margin-top: 8px; }
.cr-m-text {
  margin-top: 10px;
  font-family: var(--wall-font-body);
  font-weight: 500;
  font-size: 25px;
  line-height: 1.34;
  color: rgba(244, 247, 251, 0.80);
  text-wrap: balance;
}
.cr-m-text.is-hint { color: #FDE68A; }
.cr-m-row {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.cr-status, .cr-facing {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 20px;
  box-sizing: border-box;
  border-radius: 999px;
  font-family: var(--wall-font-body);
  font-weight: 600;
  font-size: 22px;
  white-space: nowrap;
}
.cr-status {
  --st: var(--cr-fwd);
  background: color-mix(in srgb, var(--st) 15%, rgba(6, 15, 31, 0.6));
  border: 1px solid color-mix(in srgb, var(--st) 55%, transparent);
  color: color-mix(in srgb, var(--st) 35%, #F4F7FB);
  transition: background 250ms ease, border-color 250ms ease, color 250ms ease;
}
.cr-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--st);
  box-shadow: 0 0 10px var(--st);
  flex: none;
}
.cr-status.is-wait { --st: #64748B; }
.cr-status.is-write { --st: var(--cr-fwd); }
.cr-status.is-run { --st: #6D8BFF; }
.cr-status.is-run .cr-status-dot { animation: cr-blink 600ms ease-in-out infinite; }
.cr-status.is-fail { --st: var(--cr-bad); }
.cr-status.is-edit { --st: var(--cr-edit); }
.cr-status.is-good { --st: var(--cr-good); }
.cr-facing {
  background: rgba(6, 15, 31, 0.55);
  border: 1px solid rgba(244, 247, 251, 0.16);
  color: rgba(244, 247, 251, 0.82);
}
.cr-facing.is-toward { border-color: rgba(192, 132, 252, 0.6); color: #E9D5FF; }
.cr-facing-ico {
  display: inline-flex;
  width: 26px;
  height: 26px;
  color: var(--cr-fwd);
  transition: transform 300ms ease;
}
.cr-facing-ico svg { width: 100%; height: 100%; }

/* ---------- run target ---------- */
.cr-run { position: absolute; }
.cr-run-halo {
  position: absolute;
  inset: -26px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 124, 247, 0.35), transparent 68%);
}
.cr-run-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px dashed rgba(139, 92, 246, 0.7);
  animation: cr-spin 16s linear infinite;
}
.cr-run-disc {
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: radial-gradient(circle at 36% 28%, #8FB0FF 0%, #4F7CF7 42%, #6B3FE0 100%);
  box-shadow:
    0 0 50px rgba(79, 124, 247, 0.55),
    inset 0 -12px 30px rgba(20, 10, 60, 0.35),
    inset 0 6px 16px rgba(255, 255, 255, 0.28);
  transition: filter 300ms ease, opacity 300ms ease;
}
.cr-run-ico { display: block; width: 66px; height: 66px; color: #fff; margin-left: 10px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3)); }
.cr-run-ico svg { width: 100%; height: 100%; }
.cr-run-label {
  font-family: var(--wall-font-head);
  font-weight: 800;
  font-size: 40px;
  line-height: 1;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.cr-run.is-idle .cr-run-disc { filter: saturate(0.45) brightness(0.75); }
.cr-run.is-idle .cr-run-halo { opacity: 0.4; }
.cr-run.is-ready .cr-run-disc { animation: cr-run-pulse 1.5s ease-in-out infinite; }
.cr-run.is-running .cr-run-ring {
  border-style: solid;
  border-color: #38BDF8 transparent #8B5CF6 transparent;
  animation-duration: 1.1s;
}
@keyframes cr-spin { to { transform: rotate(360deg); } }
@keyframes cr-run-pulse {
  0%, 100% { box-shadow: 0 0 40px rgba(79, 124, 247, 0.5), inset 0 -12px 30px rgba(20, 10, 60, 0.35), inset 0 6px 16px rgba(255, 255, 255, 0.28); }
  50% { box-shadow: 0 0 80px rgba(79, 124, 247, 0.95), 0 0 0 10px rgba(79, 124, 247, 0.18), inset 0 -12px 30px rgba(20, 10, 60, 0.35), inset 0 6px 16px rgba(255, 255, 255, 0.28); }
}

/* ---------- code panel ---------- */
.cr-code {
  position: absolute;
  box-sizing: border-box;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(2, 7, 17, 0.86);
  border: 1px solid rgba(56, 189, 248, 0.24);
  box-shadow: 0 0 0 6px rgba(6, 15, 31, 0.45), 0 20px 50px rgba(0, 0, 0, 0.35);
}
.cr-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
  padding: 0 18px;
  background: rgba(56, 189, 248, 0.06);
  border-bottom: 1px solid rgba(56, 189, 248, 0.14);
}
.cr-code-title {
  font-family: var(--wall-font-head);
  font-weight: 600;
  font-size: 19px;
  color: rgba(244, 247, 251, 0.78);
}
.cr-code-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  direction: ltr;
  font-family: var(--cr-mono);
  font-size: 15px;
  color: rgba(244, 247, 251, 0.45);
}
.cr-code-lang i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(244, 247, 251, 0.18);
}
.cr-code-lang i:nth-child(3) { margin-right: 6px; }
.cr-code-body {
  direction: ltr;
  text-align: left;
  padding: 8px 0;
  font-family: var(--cr-mono);
  font-size: 21px;
  line-height: 26px;
  color: #E2E8F0;
}
.cr-ln {
  display: flex;
  padding: 0 16px 0 12px;
  transition: background 200ms ease;
}
.cr-ln .no {
  width: 30px;
  flex: none;
  color: rgba(244, 247, 251, 0.24);
  text-align: right;
  margin-right: 16px;
}
.cr-ln .tx { white-space: pre; }
.cr-ln i { font-style: normal; }
.cr-ln .k { color: #C4A1FF; }
.cr-ln .f { color: #7DD3FC; }
.cr-ln .n { color: #FCD34D; }
.cr-ln.is-active { background: rgba(56, 189, 248, 0.18); box-shadow: inset 4px 0 0 var(--cr-fwd); }
.cr-ln.is-fail { background: rgba(244, 63, 94, 0.20); box-shadow: inset 4px 0 0 var(--cr-bad); }
.cr-code-empty {
  position: absolute;
  left: 0;
  right: 0;
  top: 40px;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 34px;
  text-align: center;
  font-family: var(--wall-font-body);
  font-weight: 500;
  font-size: 23px;
  line-height: 1.4;
  color: rgba(244, 247, 251, 0.42);
}

/* ---------- code strip ---------- */
.cr-strip-label {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cr-strip-title { display: flex; align-items: baseline; gap: 14px; }
.cr-strip-title b {
  font-family: var(--wall-font-head);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--wall-blue);
}
.cr-strip-title span {
  font-family: var(--wall-font-body);
  font-weight: 500;
  font-size: 18px;
  color: rgba(244, 247, 251, 0.45);
}
.cr-strip-count {
  font-family: var(--wall-font-head);
  font-weight: 700;
  font-size: 20px;
  color: rgba(244, 247, 251, 0.6);
  font-variant-numeric: tabular-nums;
}
.cr-strip-count.is-full { color: var(--cr-edit); }
.cr-strip-count.is-flash { animation: cr-count-flash 900ms ease-out; }
@keyframes cr-count-flash {
  0%, 60% { color: var(--cr-bad); text-shadow: 0 0 14px rgba(244, 63, 94, 0.9); transform: scale(1.15); }
  100% { transform: scale(1); }
}

.cr-bands { position: absolute; inset: 0; pointer-events: none; }
.cr-band {
  position: absolute;
  box-sizing: border-box;
  border-radius: 24px;
  border: 2px solid rgba(45, 212, 191, 0.55);
  background: rgba(45, 212, 191, 0.07);
  box-shadow: 0 0 26px rgba(45, 212, 191, 0.18);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.cr-band.is-active { border-color: var(--cr-loop); box-shadow: 0 0 40px rgba(45, 212, 191, 0.45); }
.cr-band-tag {
  position: absolute;
  left: 50%;
  bottom: -14px;
  transform: translateX(-50%);
  padding: 1px 16px 3px;
  border-radius: 999px;
  background: #062a2a;
  border: 1px solid rgba(45, 212, 191, 0.7);
  color: #99F6E4;
  font-family: var(--wall-font-head);
  font-weight: 700;
  font-size: 18px;
  white-space: nowrap;
}

.cr-slot {
  position: absolute;
  box-sizing: border-box;
  border-radius: 18px;
  border: 2px dashed rgba(244, 247, 251, 0.16);
  background: rgba(6, 15, 31, 0.45);
  transition: transform 220ms cubic-bezier(.2, .8, .2, 1), box-shadow 220ms ease, border-color 220ms ease, background 220ms ease;
  --c: var(--cr-fwd);
}
.cr-slot.is-fwd { --c: var(--cr-fwd); }
.cr-slot.is-right { --c: var(--cr-right); }
.cr-slot.is-left { --c: var(--cr-left); }
.cr-slot.is-loop { --c: var(--cr-loop); }
.cr-slot-num {
  position: absolute;
  top: 6px;
  right: 11px;
  font-family: var(--wall-font-head);
  font-weight: 700;
  font-size: 16px;
  color: rgba(244, 247, 251, 0.32);
  z-index: 2;
}
.cr-slot.has-block {
  border-style: solid;
  border-color: color-mix(in srgb, var(--c) 72%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 26%, #0b1730), color-mix(in srgb, var(--c) 10%, #060f1f));
  box-shadow: 0 0 22px color-mix(in srgb, var(--c) 28%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.cr-slot.has-block .cr-slot-num { color: rgba(244, 247, 251, 0.55); }
.cr-block {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.cr-block .cr-ico { display: block; width: 42px; height: 42px; color: var(--c); filter: drop-shadow(0 0 8px var(--c)); }
.cr-block .cr-ico svg { width: 100%; height: 100%; }
.cr-b-label {
  font-family: var(--wall-font-head);
  font-weight: 800;
  font-size: 26px;
  line-height: 1;
  color: var(--wall-ink);
}
.cr-b-label b { color: var(--cr-loop); }
.cr-slot.is-active {
  transform: translateY(-8px) scale(1.07);
  border-color: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 60%, transparent), 0 0 46px var(--c);
  z-index: 3;
}
.cr-slot-flag, .cr-slot-edit {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}
.cr-slot-flag {
  top: -16px;
  left: -12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cr-bad);
  color: #fff;
  font-family: var(--wall-font-head);
  font-weight: 800;
  font-size: 24px;
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.9);
}
.cr-slot.is-fail {
  border-color: var(--cr-bad);
  background: linear-gradient(180deg, rgba(244, 63, 94, 0.32), rgba(80, 14, 34, 0.55));
  animation: cr-fail-pulse 1.1s ease-in-out infinite;
}
.cr-slot.is-fail .cr-slot-flag { opacity: 1; }
@keyframes cr-fail-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.35), 0 0 26px rgba(244, 63, 94, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(244, 63, 94, 0.25), 0 0 56px rgba(244, 63, 94, 0.9); }
}
.cr-slot-edit {
  top: -17px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 14px 4px;
  border-radius: 999px;
  background: var(--cr-edit);
  color: #1d1300;
  font-family: var(--wall-font-head);
  font-weight: 800;
  font-size: 17px;
  white-space: nowrap;
}
.cr-slot.is-selected {
  border-color: var(--cr-edit);
  transform: translateY(-6px);
  animation: cr-sel-pulse 0.9s ease-in-out infinite;
  z-index: 3;
}
.cr-slot.is-selected .cr-slot-edit { opacity: 1; }
.cr-slot.is-selected .cr-slot-flag { opacity: 0; }
@keyframes cr-sel-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.45), 0 0 26px rgba(251, 191, 36, 0.45); }
  50% { box-shadow: 0 0 0 7px rgba(251, 191, 36, 0.25), 0 0 54px rgba(251, 191, 36, 0.85); }
}

/* ---------- command tiles ---------- */
.cr-tile {
  position: absolute;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 22px;
  border-radius: 28px;
  --c: var(--cr-fwd);
  background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--c) 18%, #0b1730), color-mix(in srgb, var(--c) 6%, #060f1f));
  border: 2px solid color-mix(in srgb, var(--c) 70%, transparent);
  box-shadow:
    0 0 32px color-mix(in srgb, var(--c) 24%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -22px 40px rgba(0, 0, 0, 0.25);
  transition: filter 300ms ease, opacity 300ms ease, box-shadow 200ms ease;
}
.cr-tile.is-fwd { --c: var(--cr-fwd); }
.cr-tile.is-right { --c: var(--cr-right); }
.cr-tile.is-left { --c: var(--cr-left); }
.cr-tile.is-loop { --c: var(--cr-loop); }
.cr-tile.is-del { --c: var(--cr-del); }
.cr-tile > .cr-ico {
  display: block;
  flex: none;
  width: 66px;
  height: 66px;
  color: var(--c);
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--c) 80%, transparent));
}
.cr-tile > .cr-ico svg { width: 100%; height: 100%; }
.cr-tile-txt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cr-tile-label {
  font-family: var(--wall-font-head);
  font-weight: 800;
  font-size: 46px;
  line-height: 1;
  color: var(--wall-ink);
  white-space: nowrap;
}
.cr-tile-sub {
  font-family: var(--wall-font-body);
  font-weight: 500;
  font-size: 19px;
  color: rgba(244, 247, 251, 0.55);
  white-space: nowrap;
}
.cr-tile.is-pressed {
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--c) 45%, transparent),
    0 0 70px color-mix(in srgb, var(--c) 70%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.cr-tile-lock {
  position: absolute;
  inset: 0;
  border-radius: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: transparent;
  font-family: var(--wall-font-body);
  font-weight: 600;
  font-size: 20px;
  color: rgba(244, 247, 251, 0.5);
  opacity: 0;
  transition: opacity 500ms ease;
}
.cr-tile-lock i { display: block; width: 40px; height: 40px; color: rgba(244, 247, 251, 0.45); }
.cr-tile-lock span { display: flex; flex-direction: column; gap: 4px; }
.cr-tile-lock b { font-family: var(--wall-font-head); font-weight: 800; font-size: 36px; line-height: 1; color: rgba(244, 247, 251, 0.42); }
.cr-tile-lock svg { width: 100%; height: 100%; }
.cr-tile.is-locked { border-color: rgba(148, 163, 184, 0.28); box-shadow: none; background: linear-gradient(180deg, #111a2e, #0a1222); }
.cr-tile.is-locked > .cr-ico, .cr-tile.is-locked > .cr-tile-txt { opacity: 0; }
.cr-tile > .cr-ico, .cr-tile > .cr-tile-txt { transition: opacity 500ms ease; }
.cr-tile.is-locked .cr-tile-lock { opacity: 1; }
.cr-tile.is-new { animation: cr-new-glow 1.2s ease-in-out infinite; }
@keyframes cr-new-glow {
  0%, 100% { box-shadow: 0 0 30px rgba(45, 212, 191, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.14); }
  50% { box-shadow: 0 0 0 6px rgba(45, 212, 191, 0.25), 0 0 70px rgba(45, 212, 191, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.14); }
}

/* ---------- alert pill ---------- */
.cr-alert {
  position: absolute;
  z-index: 25;
  padding: 10px 30px 13px;
  border-radius: 999px;
  background: rgba(8, 12, 26, 0.94);
  border: 2px solid var(--ac, var(--cr-bad));
  color: #fff;
  font-family: var(--wall-font-head);
  font-weight: 800;
  font-size: 36px;
  line-height: 1.1;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 0 44px color-mix(in srgb, var(--ac, #F43F5E) 60%, transparent), 0 14px 34px rgba(0, 0, 0, 0.55);
}
