:root {
  --background: #030812;
  --surface: rgba(8, 22, 38, 0.82);
  --surface-strong: rgba(10, 31, 52, 0.94);
  --surface-accent: rgba(20, 229, 255, 0.09);
  --ink: #edfaff;
  --muted: #93b9c7;
  --line: rgba(112, 239, 255, 0.2);
  --green: #17e8ff;
  --green-dark: #8af6ff;
  --orange: #ff9a3d;
  --danger: #ff5f71;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
  --glow-cyan: 0 0 26px rgba(23, 232, 255, 0.28);
  --glow-amber: 0 0 28px rgba(255, 154, 61, 0.25);
  --radius-lg: 24px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 16% 8%, rgba(23, 232, 255, 0.18), transparent 28%),
    radial-gradient(circle at 86% 4%, rgba(255, 116, 56, 0.16), transparent 26%),
    linear-gradient(120deg, rgba(23, 232, 255, 0.045) 1px, transparent 1px),
    linear-gradient(30deg, rgba(23, 232, 255, 0.035) 1px, transparent 1px),
    var(--background);
  background-size: auto, auto, 74px 74px, 98px 98px, auto;
  color: var(--ink);
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 100% 44px, 44px 100%;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.48), transparent 78%);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(420px, 1.1fr);
  align-items: stretch;
  gap: 26px;
  min-height: 430px;
  margin-bottom: 24px;
  padding: 22px;
  border: 1px solid rgba(112, 239, 255, 0.2);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(10, 31, 52, 0.88), rgba(3, 8, 18, 0.68)),
    radial-gradient(circle at 30% 20%, rgba(23, 232, 255, 0.14), transparent 34%);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero::before {
  inset: 16px;
  border: 1px solid rgba(23, 232, 255, 0.11);
  border-radius: 26px;
}

.hero::after {
  left: 20px;
  right: 20px;
  bottom: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(23, 232, 255, 0.72), rgba(255, 154, 61, 0.58), transparent);
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  padding: clamp(12px, 3vw, 34px);
}

.eyebrow,
.panel-label {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(44px, 7vw, 78px);
  letter-spacing: -0.05em;
  line-height: 0.98;
  text-shadow: 0 0 24px rgba(23, 232, 255, 0.22);
}

.intro {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-metrics span {
  padding: 9px 11px;
  border: 1px solid rgba(23, 232, 255, 0.28);
  border-radius: 999px;
  background: rgba(23, 232, 255, 0.08);
  color: #d9fbff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  box-shadow: var(--glow-cyan);
}

.hero-visual {
  position: relative;
  min-height: 330px;
  border: 1px solid rgba(112, 239, 255, 0.18);
  border-radius: 26px;
  overflow: hidden;
  background: #050b14;
  box-shadow: inset 0 0 44px rgba(23, 232, 255, 0.12), 0 24px 64px rgba(0, 0, 0, 0.42);
}

.hero-visual img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  display: block;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.16) contrast(1.12);
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 8, 18, 0.24), transparent 42%, rgba(3, 8, 18, 0.38)),
    radial-gradient(circle at 78% 46%, rgba(23, 232, 255, 0.18), transparent 28%);
  pointer-events: none;
}

.hud-ring {
  position: absolute;
  width: 150px;
  aspect-ratio: 1;
  border: 1px solid rgba(23, 232, 255, 0.38);
  border-radius: 50%;
  box-shadow: inset 0 0 24px rgba(23, 232, 255, 0.16), 0 0 26px rgba(23, 232, 255, 0.2);
  pointer-events: none;
  animation: hudSpin 12s linear infinite;
}

.hud-ring::before,
.hud-ring::after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px dashed rgba(255, 154, 61, 0.42);
  border-radius: 50%;
}

.hud-ring::after {
  inset: 38px;
  border-color: rgba(23, 232, 255, 0.44);
}

.hud-ring-left {
  left: 24px;
  bottom: 34px;
}

.hud-ring-right {
  right: 28px;
  top: 48px;
  animation-duration: 16s;
  animation-direction: reverse;
}

.connection-card {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: min(320px, calc(100% - 36px));
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(3, 8, 18, 0.72);
  box-shadow: var(--glow-cyan);
  backdrop-filter: blur(14px);
}

.status-dot {
  width: 12px;
  height: 12px;
  flex: none;
  border-radius: 50%;
  background: var(--orange);
}

.status-dot.connected {
  background: #21f7a6;
  box-shadow: 0 0 0 6px rgba(33, 247, 166, 0.12), 0 0 18px rgba(33, 247, 166, 0.65);
}

.connection-status,
.connection-detail {
  margin: 0;
}

.connection-status {
  margin-bottom: 5px;
  font-weight: 600;
  color: #f4fdff;
}

.connection-detail {
  color: var(--muted);
  font-size: 13px;
}

.setup-panel {
  margin-bottom: 20px;
  padding: 20px 24px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(20, 229, 255, 0.07);
}

.setup-panel h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.setup-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(23, 232, 255, 0.12);
  color: #dffcff;
  font-size: 0.92em;
}

.actions {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.speech-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 18px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow), inset 0 0 30px rgba(23, 232, 255, 0.04);
  backdrop-filter: blur(16px);
}

.speech-copy h2 {
  margin: 0 0 7px;
  font-size: 21px;
}

.speech-copy p:last-child {
  max-width: 390px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.speech-controls {
  display: grid;
  min-width: min(470px, 100%);
  gap: 12px;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
}

.toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--green);
}

.always-on-note {
  margin: 0;
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--surface-accent);
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 600;
}

.voice-field {
  display: grid;
  grid-template-columns: 82px 1fr;
  align-items: center;
  gap: 10px;
}

select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(4, 13, 24, 0.86);
  color: var(--ink);
  font: inherit;
}

.speech-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.button.secretary {
  flex: 1 1 190px;
}

.button {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 13px 18px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

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

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.button.primary {
  border-color: rgba(23, 232, 255, 0.48);
  background: linear-gradient(135deg, #0aa7bd, #16e6ff);
  color: #00131b;
  box-shadow: var(--glow-cyan);
}

.button.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #25f2ff, #8af6ff);
}

.button.secondary {
  border-color: rgba(255, 154, 61, 0.34);
  background: rgba(255, 154, 61, 0.12);
  color: #ffd7a5;
  box-shadow: var(--glow-amber);
}

.button.ghost {
  border: 1px solid var(--line);
  background: rgba(23, 232, 255, 0.04);
  color: var(--ink);
}

.button.full {
  width: 100%;
  margin-top: 4px;
}

.message {
  min-height: 28px;
  margin: 0 0 16px;
  padding: 0 2px;
  font-size: 14px;
}

.message.success {
  color: #80fff4;
}

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

.message.error {
  color: var(--danger);
}

.main-menu {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
  padding: 12px;
  border: 1px solid rgba(112, 239, 255, 0.2);
  border-radius: 18px;
  background: rgba(4, 13, 24, 0.86);
  box-shadow: var(--shadow), inset 0 0 28px rgba(23, 232, 255, 0.05);
  backdrop-filter: blur(18px);
}

.menu-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(23, 232, 255, 0.04);
  color: #bdeff8;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 0 14px rgba(23, 232, 255, 0.03);
}

.menu-button.active {
  border-color: var(--green);
  background: linear-gradient(135deg, rgba(23, 232, 255, 0.92), rgba(23, 232, 255, 0.36));
  color: #011018;
  box-shadow: var(--glow-cyan);
}

.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
}

.dashboard {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.gmail-panel {
  min-height: 0;
}

.gmail-status {
  margin: -8px 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.gmail-list {
  display: grid;
  gap: 10px;
}

.gmail-list.empty-state {
  place-items: center;
  min-height: 115px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
}

.gmail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(8, 22, 38, 0.74);
}

.gmail-item h3 {
  margin: 0;
  font-size: 15px;
}

.gmail-item h3 a {
  color: var(--green-dark);
  text-decoration: none;
}

.gmail-item h3 a:hover {
  color: var(--green);
  text-decoration: underline;
}

.gmail-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.gmail-actions {
  flex: none;
}

.button.small {
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 13px;
}

.button.danger {
  border-color: rgba(255, 95, 113, 0.36);
  background: rgba(255, 95, 113, 0.12);
  color: var(--danger);
}

.button.danger:hover:not(:disabled) {
  background: rgba(255, 95, 113, 0.2);
}

.research-panel {
  margin-top: 18px;
  min-height: 0;
}

.bus-panel,
.news-panel,
.audio-panel,
.cg-panel,
.interview-panel {
  margin-top: 18px;
  min-height: 0;
}

.interview-layout {
  display: grid;
  gap: 16px;
}

.cg-layout {
  display: grid;
  gap: 18px;
}

.cg-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 16px;
  align-items: stretch;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: inset 0 0 30px rgba(23, 232, 255, 0.04);
}

.cg-form {
  display: grid;
  gap: 12px;
}

.cg-form textarea {
  min-height: 160px;
}

.cg-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cg-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.cg-note a {
  color: var(--green);
  font-weight: 800;
  text-decoration: none;
}

.cg-result,
.cg-animation-wrap {
  min-height: 460px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(3, 8, 18, 0.62);
}

.cg-result {
  display: grid;
  place-items: center;
  overflow: hidden;
}

.checkerboard {
  background-color: rgba(3, 8, 18, 0.62);
  background-image:
    linear-gradient(45deg, rgba(23, 232, 255, 0.08) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(23, 232, 255, 0.08) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(23, 232, 255, 0.08) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(23, 232, 255, 0.08) 75%);
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  background-size: 24px 24px;
}

.cg-result img {
  display: block;
  max-width: 100%;
  max-height: 460px;
  object-fit: contain;
}

.cg-animation-wrap {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.cg-stage {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 320px;
  border-radius: 14px;
  background: #111827;
  color: #fff;
  isolation: isolate;
}

.ratio-16-9 {
  aspect-ratio: 16 / 9;
}

.ratio-9-16 {
  aspect-ratio: 9 / 16;
  max-height: 580px;
  margin: 0 auto;
}

.ratio-1-1 {
  aspect-ratio: 1 / 1;
  max-height: 560px;
  margin: 0 auto;
}

.cg-stage-bg,
.cg-stage-subject,
.cg-stage-title,
.cg-stage-caption {
  position: absolute;
}

.cg-stage-bg {
  inset: -18%;
  background:
    radial-gradient(circle at 22% 28%, rgba(246, 188, 82, 0.7), transparent 23%),
    radial-gradient(circle at 82% 18%, rgba(15, 143, 127, 0.8), transparent 24%),
    linear-gradient(130deg, #172033, #3d1f2d 48%, #0d4f4a);
}

.cg-stage-subject {
  left: 10%;
  bottom: 18%;
  display: grid;
  place-items: center;
  width: min(34%, 260px);
  aspect-ratio: 1;
  border: 4px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 56px;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.cg-stage-title {
  right: 8%;
  top: 20%;
  max-width: 54%;
  font-size: clamp(28px, 5vw, 62px);
  line-height: 1.05;
  font-weight: 900;
}

.cg-stage-caption {
  right: 7%;
  bottom: 10%;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.42);
  font-weight: 900;
}

.cg-stage.playing .cg-stage-bg {
  animation: cgBgDrift 6s ease-in-out both;
}

.cg-stage.playing .cg-stage-subject {
  animation: cgSubjectMove 6s cubic-bezier(0.2, 0.7, 0.1, 1) both;
}

.cg-stage.playing .cg-stage-title {
  animation: cgTitleReveal 6s ease both;
}

.cg-stage.playing .cg-stage-caption {
  animation: cgCaptionPulse 1s steps(2, end) 6;
}

.cg-timeline {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.cg-video {
  display: block;
  width: 100%;
  max-height: 520px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #111827;
}

.cg-video.hidden {
  display: none;
}

.cg-animation-wrap .button.secondary {
  justify-self: start;
}

.cg-spec {
  min-height: 110px;
  max-height: 180px;
  margin: 0;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-accent);
  white-space: pre-wrap;
  color: #c7f6ff;
  font: 13px/1.5 "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

.interview-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: inset 0 0 24px rgba(23, 232, 255, 0.035);
}

.box-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.box-title h3 {
  margin: 0;
  font-size: 18px;
}

.box-title span {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--surface-accent);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
}

.clue-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.clue-grid label {
  color: var(--muted);
  font-size: 13px;
}

.clue-grid input {
  width: 100%;
  margin-top: 5px;
}

.interview-options,
.interview-output-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.interview-output {
  min-height: 260px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.interview-audio-transcript {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-accent);
}

.interview-audio-transcript h4 {
  margin: 0;
  color: var(--green-dark);
  font-size: 15px;
}

.interview-audio-transcript pre {
  max-height: 280px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  color: #d9fbff;
  font: 14px/1.7 "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

.interview-output h3 {
  margin: 6px 0 8px;
  font-size: 20px;
}

.interview-output .meta {
  margin-bottom: 12px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 700;
}

.interview-output p {
  color: #c1dce4;
  line-height: 1.7;
}

.bus-layout {
  display: grid;
  gap: 14px;
}

.bus-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.bus-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-accent);
  color: var(--green-dark);
  font-size: 14px;
  line-height: 1.7;
}

.research-layout {
  display: grid;
  gap: 14px;
}

.article-input textarea {
  min-height: 220px;
}

.research-actions {
  display: flex;
  gap: 10px;
}

.keyword-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.research-output {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.research-output.empty-state {
  place-items: center;
  min-height: 120px;
  border-style: dashed;
  color: var(--muted);
}

.research-block {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-accent);
  border: 1px solid rgba(112, 239, 255, 0.12);
}

.research-block h3 {
  margin: 0 0 7px;
  color: var(--green-dark);
  font-size: 15px;
}

.research-block p,
.research-block ul {
  margin: 0;
  color: #c1dce4;
  line-height: 1.7;
}

.research-block a {
  display: inline-block;
  margin-top: 8px;
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}

.research-block.error {
  background: rgba(255, 95, 113, 0.12);
}

.research-block.error h3,
.research-block.error p {
  color: var(--danger);
}

.research-block ul {
  padding-left: 20px;
}

.search-result pre {
  max-height: 320px;
  margin: 10px 0 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #d9fbff;
  font: 14px/1.7 "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

.transcript-output pre {
  max-height: 360px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #d9fbff;
  font: 15px/1.8 "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

.transcript-block pre {
  max-height: 420px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #d9fbff;
  font: 14px/1.8 "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

@keyframes cgBgDrift {
  from {
    transform: scale(1) translateX(-2%);
    filter: saturate(0.9);
  }
  to {
    transform: scale(1.12) translateX(3%);
    filter: saturate(1.35);
  }
}

@keyframes cgSubjectMove {
  0% {
    transform: translateX(-18%) scale(0.82);
    opacity: 0;
  }
  18%,
  80% {
    opacity: 1;
  }
  100% {
    transform: translateX(18%) scale(1.05);
    opacity: 1;
  }
}

@keyframes cgTitleReveal {
  0%,
  16% {
    transform: translateY(24px);
    opacity: 0;
  }
  38%,
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes cgCaptionPulse {
  50% {
    background: rgba(255, 255, 255, 0.24);
  }
}

.keyword-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: news-keywords;
}

.keyword-list li {
  counter-increment: news-keywords;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-accent);
  border: 1px solid rgba(112, 239, 255, 0.12);
}

.keyword-list li::before {
  content: counter(news-keywords);
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
  color: #00131b;
  font-size: 13px;
  font-weight: 700;
}

.keyword-name {
  flex: 1;
  color: var(--green-dark);
  font-weight: 700;
}

.keyword-count {
  color: var(--muted);
  font-size: 13px;
}

.news-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.news-categories {
  grid-template-columns: repeat(2, 1fr);
  background: rgba(8, 22, 38, 0.82);
}

.news-category-block ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.news-category-block:nth-child(1) {
  background: rgba(23, 232, 255, 0.1);
}

.news-category-block:nth-child(2) {
  background: rgba(255, 154, 61, 0.12);
}

.news-category-block:nth-child(3) {
  background: rgba(33, 247, 166, 0.1);
}

.news-category-block:nth-child(4) {
  background: rgba(169, 93, 255, 0.13);
}

.news-category-block li:nth-child(-n+3) {
  font-weight: 800;
}

.news-category-block li:nth-child(1)::marker {
  color: var(--danger);
}

.news-category-block li:nth-child(2)::marker,
.news-category-block li:nth-child(3)::marker {
  color: var(--orange);
}

.news-category-block li {
  color: #c1dce4;
  line-height: 1.6;
}

.news-category-block a {
  color: var(--green-dark);
  font-weight: 600;
  text-decoration: none;
}

.news-category-block a:hover {
  color: var(--green);
  text-decoration: underline;
}

.panel {
  min-height: 440px;
  padding: 28px;
  border: 1px solid rgba(112, 239, 255, 0.2);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow), inset 0 0 34px rgba(23, 232, 255, 0.04);
  backdrop-filter: blur(18px);
}

.news-live-panel {
  background:
    linear-gradient(135deg, rgba(10, 31, 52, 0.88), rgba(3, 8, 18, 0.82)),
    radial-gradient(circle at 70% 10%, rgba(255, 154, 61, 0.12), transparent 34%);
}

.live-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.live-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(8, 22, 38, 0.74);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.26);
}

.live-heading h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.45;
}

.live-card iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 14px;
  background: #101815;
}

.live-card a {
  justify-self: start;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface-accent);
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.live-card a:hover {
  background: rgba(23, 232, 255, 0.14);
  color: var(--green);
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 25px;
}

.timezone {
  padding: 7px 10px;
  border-radius: 30px;
  background: var(--surface-accent);
  color: var(--green);
  font-size: 12px;
  font-weight: 500;
}

.events-list {
  display: grid;
  gap: 12px;
}

.events-list.empty-state {
  place-items: center;
  min-height: 265px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
}

.event-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(23, 232, 255, 0.045);
}

.event-item h3 {
  margin: 0 0 5px;
  font-size: 15px;
}

.event-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.event-item a {
  color: var(--green);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 13px;
  background: rgba(4, 13, 24, 0.86);
  color: var(--ink);
  font: inherit;
  box-shadow: inset 0 0 18px rgba(23, 232, 255, 0.035);
}

input:focus,
textarea:focus {
  border-color: var(--green);
  outline: 3px solid rgba(23, 232, 255, 0.12);
}

input::placeholder,
textarea::placeholder {
  color: rgba(147, 185, 199, 0.68);
}

textarea {
  resize: vertical;
}

.time-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hidden {
  display: none;
}

@keyframes hudSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes panelPulse {
  0%,
  100% {
    box-shadow: var(--shadow), inset 0 0 34px rgba(23, 232, 255, 0.04);
  }
  50% {
    box-shadow: var(--shadow), inset 0 0 46px rgba(23, 232, 255, 0.075);
  }
}

.panel.active,
.view-panel.active.panel {
  animation: panelPulse 5s ease-in-out infinite;
}

@media (max-width: 800px) {
  .shell {
    padding: 32px 0;
  }

  .hero {
    align-items: stretch;
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-visual img {
    min-height: 320px;
  }

  .dashboard {
    grid-template-columns: 1fr;
  }

  .main-menu {
    position: static;
  }

  .keyword-row {
    grid-template-columns: 1fr;
  }

  .keyword-list {
    grid-template-columns: 1fr;
  }

  .news-categories {
    grid-template-columns: 1fr;
  }

  .clue-grid,
  .cg-card,
  .interview-options,
  .interview-output-grid {
    grid-template-columns: 1fr;
  }

  .cg-options {
    grid-template-columns: 1fr;
  }

  .live-grid {
    grid-template-columns: 1fr;
  }

  .bus-row {
    grid-template-columns: 1fr;
  }

  .speech-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .speech-controls {
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 26px, 1120px);
  }

  .panel {
    min-height: auto;
    padding: 20px;
  }

  .hero {
    padding: 14px;
    border-radius: 24px;
  }

  .hero-copy {
    padding: 16px;
  }

  .hero-metrics {
    gap: 8px;
  }

  .hero-metrics span {
    font-size: 10px;
  }

  .connection-card {
    position: relative;
    right: auto;
    bottom: auto;
    margin: 12px;
    min-width: 0;
  }

  .time-row,
  .actions {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .voice-field {
    grid-template-columns: 1fr;
  }

  .speech-buttons {
    flex-direction: column;
  }

  .research-actions {
    flex-direction: column;
  }

}
