:root {
  color-scheme: dark;
  --ink: #fff8ea;
  --muted: #bfc8bd;
  --panel: rgba(13, 15, 18, .74);
  --panel-strong: rgba(18, 21, 25, .93);
  --line: rgba(255, 248, 234, .17);
  --acid: #d7ff5f;
  --cyan: #58f0ff;
  --coral: #ff6f4b;
  --gold: #ffd36e;
  --violet: #caa2ff;
  --ok: #7df7b2;
  --shadow: 0 28px 90px rgba(0, 0, 0, .42);
  --radius: 8px;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.024) 1px, transparent 1px),
    linear-gradient(135deg, #11150f 0%, #121820 44%, #1b1419 100%);
  background-size: 48px 48px, 48px 48px, auto;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(110deg, transparent 0%, rgba(88,240,255,.08) 42%, transparent 56%),
    linear-gradient(180deg, rgba(255,255,255,.04), transparent 12%, transparent 88%, rgba(0,0,0,.28));
  mix-blend-mode: screen;
  opacity: .72;
}

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .9;
}

button, input {
  font: inherit;
}

button {
  border: 0;
  color: inherit;
  cursor: pointer;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1500px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
}

.mission-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.mission-strip div {
  min-height: 58px;
  padding: 10px 12px;
  display: grid;
  gap: 5px;
  align-content: center;
  background: linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.035));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.08);
}

.mission-strip span {
  color: var(--muted);
  font-size: 12px;
}

.mission-strip strong {
  color: var(--ink);
  font-size: 15px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: conic-gradient(from 210deg, var(--acid), var(--cyan), var(--coral), var(--acid));
  color: #161616;
  font-weight: 900;
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px rgba(255,255,255,.24), 0 18px 54px rgba(215,255,95,.24);
  position: relative;
  overflow: hidden;
}

.mark::after {
  content: "";
  position: absolute;
  inset: -70% 20%;
  background: rgba(255,255,255,.46);
  transform: rotate(35deg) translateX(-70px);
  animation: sheen 4.5s ease-in-out infinite;
}

h1, h2, h3, p { margin: 0; }

h1 {
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1;
  letter-spacing: 0;
}

.brand p,
.mode-copy p,
.telemetry span,
.panel-head span,
.knob-control span,
.search-box span {
  color: var(--muted);
}

.top-actions,
.search-row,
.status-strip,
.panel-head,
.coze-config {
  display: flex;
  align-items: center;
  gap: 10px;
}

.primary-button,
.ghost-button,
.icon-button {
  min-height: 42px;
  border-radius: var(--radius);
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.primary-button {
  padding: 0 18px;
  background: linear-gradient(135deg, var(--acid), var(--gold));
  color: #141414;
  font-weight: 800;
  box-shadow: 0 14px 32px rgba(200, 255, 95, .16);
  border: 1px solid rgba(255,255,255,.18);
}

.ghost-button,
.icon-button {
  background: rgba(246, 242, 232, .08);
  border: 1px solid var(--line);
}

.ghost-button { padding: 0 14px; }
.icon-button { width: 42px; font-size: 20px; }

button:hover { transform: translateY(-1px); }

button:disabled {
  cursor: not-allowed;
  opacity: .55;
  transform: none;
}

.status-strip b {
  font-size: 13px;
}

.workspace {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 300px;
  gap: 14px;
  align-items: stretch;
}

.rail,
.stage,
.control-deck,
.map-panel,
.timeline-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.rail::before,
.stage::before,
.control-deck::before,
.map-panel::before,
.timeline-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,.11), transparent 32%, rgba(88,240,255,.06));
  opacity: .55;
}

.rail > *, .stage > *, .control-deck > *, .map-panel > *, .timeline-panel > * {
  position: relative;
  z-index: 1;
}

.rail {
  padding: 10px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.rail-item {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 9px;
  background: linear-gradient(135deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
  border: 1px solid transparent;
  border-radius: var(--radius);
  text-align: left;
}

.rail-item span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: rgba(255,255,255,.08);
  color: var(--cyan);
  font-weight: 900;
}

.rail-item strong {
  font-size: 15px;
  line-height: 1.25;
}

.rail-item.active {
  background: linear-gradient(135deg, rgba(215, 255, 95, .18), rgba(88,240,255,.08));
  border-color: rgba(200, 255, 95, .42);
  box-shadow: inset 0 0 0 1px rgba(215,255,95,.12), 0 16px 34px rgba(215,255,95,.08);
}

.stage {
  min-height: 620px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stage::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--acid), transparent);
  opacity: .7;
}

.hud {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--acid) !important;
  font-size: 12px;
  font-weight: 900;
}

.mode-copy h2 {
  font-size: clamp(24px, 3vw, 42px);
  letter-spacing: 0;
}

.mode-copy p:not(.eyebrow) {
  margin-top: 8px;
  max-width: 720px;
  line-height: 1.65;
}

.status-strip {
  flex-wrap: wrap;
  align-content: start;
  justify-content: flex-end;
}

.status-strip span {
  min-height: 32px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--muted);
  box-shadow: 0 0 18px currentColor;
}
.online { color: var(--ok); background: var(--ok); }
.pulse { color: var(--gold); background: var(--gold); animation: blink 1.2s infinite; }
.board { color: var(--cyan); background: var(--cyan); }

.fx-console {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 54px;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(88,240,255,.08), rgba(215,255,95,.04));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.led-strip {
  display: grid;
  grid-template-columns: repeat(5, 22px);
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.24);
  border: 1px solid rgba(255,255,255,.12);
}

.led-strip span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1c2423;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.led-strip span.on-cyan { background: var(--cyan); box-shadow: 0 0 22px rgba(88,240,255,.9), inset 0 0 8px rgba(255,255,255,.7); }
.led-strip span.on-acid { background: var(--acid); box-shadow: 0 0 22px rgba(215,255,95,.9), inset 0 0 8px rgba(255,255,255,.7); }
.led-strip span.on-gold { background: var(--gold); box-shadow: 0 0 22px rgba(255,211,110,.82), inset 0 0 8px rgba(255,255,255,.7); }
.led-strip span.on-coral { background: var(--coral); box-shadow: 0 0 22px rgba(255,111,75,.82), inset 0 0 8px rgba(255,255,255,.7); }
.led-strip span.active-led { transform: scale(1.18); }

.wave-meter {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
}

.wave-meter i {
  width: 7px;
  height: 8px;
  display: block;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cyan), var(--acid));
  opacity: .38;
  transform-origin: bottom;
}

.wave-meter.live i {
  animation: wavePulse .58s ease-in-out infinite;
  opacity: .95;
}

.wave-meter.live i:nth-child(2n) { animation-delay: .08s; }
.wave-meter.live i:nth-child(3n) { animation-delay: .16s; }
.wave-meter.live i:nth-child(4n) { animation-delay: .24s; }

#fxStatus {
  color: var(--acid);
  font-size: 13px;
  white-space: nowrap;
}

.search-row {
  align-items: stretch;
  flex-wrap: wrap;
}

.image-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  user-select: none;
}

.image-tray {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 10px;
  border: 1px solid rgba(88,240,255,.24);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(88,240,255,.08), rgba(215,255,95,.045));
}

.image-preview-wrap {
  position: relative;
  width: 72px;
  height: 58px;
  flex: 0 0 auto;
}

.image-preview-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.2);
}

.image-remove {
  position: absolute;
  top: -9px;
  right: -9px;
  width: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  background: rgba(20,20,20,.94);
}

.image-meta {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.image-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-meta span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.search-box {
  flex: 1 1 420px;
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  background: rgba(255,255,255,.09);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.search-box:focus-within {
  border-color: rgba(88,240,255,.55);
  box-shadow: 0 0 0 3px rgba(88,240,255,.1);
}

.search-box input,
.coze-config input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.answer-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 14px;
  min-height: 0;
}

.answer-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: linear-gradient(180deg, rgba(26,29,34,.96), rgba(17,19,23,.93));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.answer-panel.local-panel {
  border-color: rgba(88,240,255,.22);
}

.answer-panel.coze-panel {
  border-color: rgba(215,255,95,.22);
}

.panel-head {
  justify-content: space-between;
  min-height: 42px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
}

.panel-head span {
  font-size: 12px;
  font-weight: 900;
}

.panel-head strong {
  color: var(--acid);
  font-size: 13px;
}

.answer-body {
  flex: 1;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  overflow: auto;
  line-height: 1.65;
  scrollbar-width: thin;
  scrollbar-color: rgba(88,240,255,.42) transparent;
}

.coze-panel .answer-body:not(:empty) {
  background-image: linear-gradient(90deg, rgba(215,255,95,.06), transparent 30%);
}

.muted { color: var(--muted); }

.answer-section {
  padding: 13px 14px 14px;
  border: 1px solid rgba(246, 242, 232, .12);
  border-radius: 7px;
  background: linear-gradient(145deg, rgba(255,255,255,.065), rgba(255,255,255,.022));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}

.answer-section + .answer-section {
  margin-top: 0;
}

.answer-conclusion {
  border-color: rgba(215,255,95,.26);
  background: linear-gradient(145deg, rgba(215,255,95,.09), rgba(255,255,255,.02));
}

.answer-evidence {
  border-color: rgba(88,240,255,.22);
  background: linear-gradient(145deg, rgba(88,240,255,.075), rgba(255,255,255,.02));
}

.answer-action {
  border-color: rgba(255,211,110,.22);
  background: linear-gradient(145deg, rgba(255,211,110,.07), rgba(255,255,255,.02));
}

.answer-verify {
  border-color: rgba(202,162,255,.22);
  background: linear-gradient(145deg, rgba(202,162,255,.07), rgba(255,255,255,.02));
}

.answer-section h3 {
  position: relative;
  margin: 0 0 8px;
  padding-left: 13px;
  color: var(--cyan);
  font-size: 14px;
  letter-spacing: .02em;
}

.answer-section h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 3px;
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--acid), var(--cyan));
  box-shadow: 0 0 12px rgba(88,240,255,.5);
}

.answer-section p {
  margin: 0;
  color: #e9eee7;
  line-height: 1.78;
  overflow-wrap: anywhere;
  white-space: normal;
}

.answer-section p + p {
  margin-top: 8px;
}

.answer-paragraph {
  text-indent: 0;
}

.coze-answer-section {
  animation: answerReveal .22s ease-out both;
}

.coze-answer-section:nth-child(2) { animation-delay: .035s; }
.coze-answer-section:nth-child(3) { animation-delay: .07s; }
.coze-answer-section:nth-child(4) { animation-delay: .105s; }

.answer-placeholder {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.coze-panel .answer-body {
  white-space: normal;
}

@keyframes answerReveal {
  from { opacity: .35; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.coze-config {
  padding: 10px;
  border-top: 1px solid var(--line);
}

.coze-config input {
  min-height: 38px;
  padding: 0 10px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.control-deck {
  padding: 14px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.function-panel {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255,255,255,.075), rgba(88,240,255,.045));
}

.function-panel .panel-head {
  min-height: 32px;
  padding: 0;
  border-bottom: 0;
}

.function-panel p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.function-actions {
  display: grid;
  gap: 8px;
}

.function-actions button {
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.065);
  color: var(--ink);
  text-align: left;
  line-height: 1.25;
}

.function-actions button strong {
  display: block;
  font-size: 13px;
}

.function-actions button span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.function-actions button:hover,
.function-actions button.active-action {
  border-color: rgba(215,255,95,.45);
  background: linear-gradient(135deg, rgba(215,255,95,.16), rgba(88,240,255,.07));
}

.lesson-ring {
  position: relative;
  height: 220px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 1px, transparent 1px 18px),
    radial-gradient(circle, rgba(88,240,255,.14), rgba(255,255,255,.035) 60%, transparent);
}

.ring-core {
  width: 128px;
  height: 128px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, rgba(36,49,49,.92), rgba(12,14,16,.9));
  border: 1px solid rgba(200,255,95,.5);
  box-shadow: 0 0 50px rgba(200,255,95,.12);
  text-align: center;
}

.ring-core span {
  color: var(--acid);
  font-weight: 900;
  font-size: 28px;
}

.ring-core strong {
  width: 100px;
  font-size: 14px;
  line-height: 1.2;
}

.orbit {
  position: absolute;
  border: 1px solid rgba(103,232,249,.28);
  border-radius: 50%;
  transform: rotate(28deg);
}

.orbit-a { width: 180px; height: 92px; animation: rotateA 10s linear infinite; }
.orbit-b { width: 210px; height: 126px; border-color: rgba(255,122,89,.28); animation: rotateB 14s linear infinite; }

.knob-control {
  display: grid;
  gap: 10px;
}

.knob-control input {
  accent-color: var(--acid);
}

.board-pad {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.board-pad button {
  min-height: 66px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.105), rgba(255,255,255,.045));
  font-weight: 900;
  line-height: 1.2;
}

.board-pad button:hover {
  border-color: rgba(88,240,255,.38);
  box-shadow: 0 12px 30px rgba(88,240,255,.08);
}

.board-pad button span {
  display: inline-block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.board-pad button.active-key {
  color: #171717;
  background: var(--acid);
  box-shadow: 0 0 24px rgba(200,255,95,.28);
}

.hid-hint {
  display: grid;
  gap: 5px;
  padding: 10px 11px;
  border: 1px solid rgba(88,240,255,.2);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(88,240,255,.08), rgba(215,255,95,.045));
}

.hid-hint strong {
  color: var(--acid);
  font-size: 13px;
}

.hid-hint span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.wifi-bridge {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
}

.wifi-bridge label {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.wifi-bridge input {
  min-width: 0;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  background: rgba(0,0,0,.18);
  color: var(--ink);
  font-size: 12px;
}

.wifi-bridge input:focus {
  border-color: rgba(88,240,255,.55);
  box-shadow: 0 0 0 2px rgba(88,240,255,.1);
}

.wifi-bridge .ghost-button {
  min-height: 34px;
  padding: 0 9px;
  font-size: 12px;
}

.wifi-state {
  color: var(--gold) !important;
  font-size: 11px !important;
}

.telemetry {
  display: grid;
  gap: 8px;
}

.telemetry div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px;
  background: rgba(255,255,255,.065);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.telemetry strong { color: var(--gold); }

.lower-band {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 14px;
  margin-top: 14px;
}

.inbox-panel {
  margin-top: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.inbox-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
}

.inbox-toolbar textarea {
  width: 100%;
  min-height: 46px;
  resize: vertical;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255,255,255,.065);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: 0;
  line-height: 1.5;
}

.inbox-toolbar textarea:focus {
  border-color: rgba(88,240,255,.55);
  box-shadow: 0 0 0 3px rgba(88,240,255,.1);
}

.inbox-list {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.inbox-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.045);
}

.inbox-item.answered {
  border-color: rgba(125,247,178,.28);
}

.inbox-item-copy {
  min-width: 0;
}

.inbox-item-copy strong,
.inbox-item-copy span {
  display: block;
}

.inbox-item-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-item-copy span,
.inbox-empty {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.inbox-answer {
  flex: 0 0 auto;
  min-height: 34px;
}

.map-panel,
.timeline-panel {
  min-height: 270px;
  overflow: hidden;
}

.constellation {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.star-card {
  min-height: 94px;
  padding: 11px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
  text-align: left;
  color: inherit;
}

.star-card:hover {
  border-color: rgba(88,240,255,.35);
  box-shadow: 0 16px 38px rgba(0,0,0,.24);
}

.star-card strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}

.star-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.star-card.active-card {
  border-color: rgba(200,255,95,.55);
  background: linear-gradient(145deg, rgba(215,255,95,.15), rgba(88,240,255,.06));
}

.timeline-panel ol {
  margin: 0;
  padding: 12px 12px 12px 34px;
  max-height: 300px;
  overflow: auto;
}

.timeline-panel li {
  margin: 0 0 12px;
  padding-left: 2px;
  line-height: 1.55;
}

.timeline-panel li strong {
  display: block;
  color: var(--cyan);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  max-width: min(380px, calc(100vw - 36px));
  padding: 12px 14px;
  background: rgba(20,20,20,.94);
  border: 1px solid rgba(200,255,95,.38);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

@keyframes blink {
  50% { opacity: .35; }
}

@keyframes sheen {
  0%, 70% { transform: rotate(35deg) translateX(-86px); }
  100% { transform: rotate(35deg) translateX(78px); }
}

@keyframes wavePulse {
  0%, 100% { transform: scaleY(.35); }
  45% { transform: scaleY(2.7); }
}

@keyframes rotateA {
  to { transform: rotate(388deg); }
}

@keyframes rotateB {
  to { transform: rotate(-332deg); }
}

@media (max-width: 1180px) {
  .workspace { grid-template-columns: 170px minmax(0, 1fr); }
  .control-deck { grid-column: 1 / -1; grid-template-columns: 260px 1fr 300px; align-items: center; }
  .lesson-ring { height: 190px; }
}

@media (max-width: 860px) {
  .shell { width: min(100vw - 20px, 760px); padding-top: 10px; }
  .topbar, .hud, .lower-band, .answer-grid, .mission-strip { grid-template-columns: 1fr; display: grid; }
  .workspace { grid-template-columns: 1fr; }
  .rail { grid-template-columns: repeat(5, minmax(116px, 1fr)); overflow-x: auto; }
  .rail-item { grid-template-columns: 1fr; min-width: 116px; }
  .rail-item span { display: none; }
  .control-deck { grid-template-columns: 1fr; }
  .constellation { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fx-console { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .topbar { align-items: start; }
  .brand { align-items: start; }
  .mark { width: 42px; height: 42px; }
  .top-actions { flex-wrap: wrap; justify-content: end; }
  .search-box { grid-template-columns: 1fr; padding: 8px 12px; }
  .search-box span { font-size: 12px; }
  .primary-button, .ghost-button { width: 100%; }
  .image-button { width: 100%; }
  .constellation { grid-template-columns: 1fr; }
  .board-pad { grid-template-columns: repeat(2, 1fr); }
  .wifi-bridge { grid-template-columns: 1fr 1fr; }
  .wifi-bridge label { grid-column: 1 / -1; }
  .wifi-bridge button { width: 100%; }
  .inbox-toolbar { grid-template-columns: 1fr; }
  .inbox-item { align-items: stretch; flex-direction: column; }
  .inbox-answer { width: 100%; }
}
