:root {
  --bg: #080c14;
  --panel: rgba(14, 18, 28, 0.88);
  --panel-border: rgba(196, 92, 42, 0.28);
  --panel-border-hover: rgba(232, 138, 58, 0.45);
  --text: #e8e0d4;
  --text-muted: #8a8278;
  --text-dim: #5c564e;
  --ember: #c45c2a;
  --ember-glow: #e88a3a;
  --terminal-green: #6fcf97;
  --terminal-warm: #e8a85c;
  --radius: 12px;
  --radius-sm: 8px;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-sans: system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Rye", serif;
  --header-h: 72px;
  --footer-h: 52px;
  --scene-w: clamp(240px, 46%, 480px);
  --scene-h: clamp(220px, 88%, 400px);
  --activity-logo-w: clamp(180px, 100%, 233px);
  --activity-logo-h: clamp(108px, 24vw, 140px);
  --brand-logo: clamp(36px, 5vw, 52px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text);
  background: var(--bg) url("../assets/images/Campfire_BG.png") center / cover no-repeat fixed;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem 0.75rem;
  gap: 1rem;
  background: linear-gradient(to bottom,
      rgba(8, 12, 20, 0.55) 0%,
      rgba(8, 12, 20, 0.72) 40%,
      rgba(8, 12, 20, 0.85) 100%);
}

/* ── Header ── */
.header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand_logo {
  width: var(--brand-logo);
  height: var(--brand-logo);
  object-fit: contain;
  flex-shrink: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.brand_name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: var(--ember-glow);
}

.brand_tagline {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.nav_panel {
  display: contents;
}

.nav_panel-title {
  display: none;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ember-glow);
  background: rgba(14, 18, 28, 0.92);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, background 0.2s;
}

.nav-toggle:hover {
  border-color: var(--panel-border-hover);
  background: rgba(20, 24, 34, 0.95);
}

.nav-toggle_prompt {
  letter-spacing: 0.02em;
}

.nav-toggle_icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 16px;
}

.nav-toggle_icon span {
  display: block;
  height: 2px;
  background: var(--ember-glow);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle_icon span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle_icon span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle_icon span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(4, 6, 10, 0.72);
  backdrop-filter: blur(3px);
}

.nav-backdrop.is-visible {
  display: block;
}

.nav_link {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-bottom: 0.35rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav_link:hover {
  color: var(--text);
}

.nav_link--active {
  color: var(--ember-glow);
  border-bottom-color: var(--ember-glow);
}

.header-status {
  position: relative;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1rem 0.55rem 0.75rem;
  min-width: 200px;
  background: rgba(18, 22, 32, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(10px);
}

.header-status_icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-status_text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.2;
}

.header-status_count {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: #f0ebe3;
  letter-spacing: 0.01em;
}

.header-status_label {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  color: var(--text-muted);
}

.header-status_dot {
  position: absolute;
  top: 0.45rem;
  right: 0.5rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.7);
}

/* ── Header activity log ── */
.header-logs {
  justify-self: end;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.5rem 0.85rem;
  min-width: 210px;
  max-width: 260px;
  background: rgba(18, 22, 32, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(10px);
}

.header-logs_label {
  font-size: 0.62rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(196, 92, 42, 0.15);
  padding-bottom: 0.3rem;
  margin-bottom: 0.1rem;
}

.header-logs_list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.header-logs_entry {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.63rem;
  color: var(--text-muted);
  line-height: 1.3;
  opacity: 0;
  animation: log-fadein 0.4s ease forwards;
}

.header-logs_entry--new {
  color: var(--terminal-green);
}

.header-logs_time {
  flex-shrink: 0;
  color: var(--text-dim);
  font-size: 0.58rem;
}

@keyframes log-fadein {
  from { opacity: 0; transform: translateY(3px); }
  to   { opacity: 1; transform: translateY(0); }
}



.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.7);
  flex-shrink: 0;
}

.status-dot--sm {
  width: 6px;
  height: 6px;
}

/* ── Main layout ── */
.main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1rem;
  min-height: 0;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
}

/* ── Terminal ── */
.terminal {
  display: flex;
  flex-direction: column;
  min-height: 380px;
  overflow: hidden;
}

.terminal_titlebar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--panel-border);
  background: rgba(0, 0, 0, 0.25);
}

.window-controls {
  display: flex;
  gap: 0.4rem;
}

.window-controls_btn {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.window-controls_btn--close {
  background: #ff5f57;
}

.window-controls_btn--min {
  background: #febc2e;
}

.window-controls_btn--max {
  background: #28c840;
}

.terminal_title {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.terminal_mode {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.terminal_body {
  position: relative;
  flex: 1;
  min-height: 300px;
  overflow: hidden;
}

.terminal_scene {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(8, 12, 20, 0.82) 0%, rgba(8, 12, 20, 0.45) 45%, rgba(8, 12, 20, 0.15) 100%),
    url("../assets/images/Campfire_BG.png") center right / cover no-repeat;
}

.terminal_scene-visual {
  position: absolute;
  right: 0;
  bottom: 0;
  width: var(--scene-w);
  height: var(--scene-h);
  max-width: 52%;
  max-height: 92%;
  pointer-events: none;
}

.terminal_scene-visual::before {
  content: "";
  position: absolute;
  inset: -10% -6% -4% -28%;
  background: radial-gradient(
    ellipse 72% 82% at 74% 88%,
    rgba(8, 12, 20, 0.5) 0%,
    rgba(8, 12, 20, 0.28) 40%,
    rgba(8, 12, 20, 0.1) 62%,
    transparent 82%
  );
  filter: blur(16px);
  z-index: 0;
}

.terminal_scene-visual::after {
  content: "";
  position: absolute;
  inset: -4% -2% 0 -18%;
  background: radial-gradient(
    ellipse 85% 90% at 78% 90%,
    transparent 42%,
    rgba(6, 10, 18, 0.2) 58%,
    rgba(6, 10, 18, 0.55) 75%,
    rgba(6, 10, 18, 0.82) 92%
  );
  filter: blur(8px);
  z-index: 2;
  pointer-events: none;
}

.terminal_scene-img {
  position: relative;
  z-index: 1;
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: right bottom;
  pointer-events: none;
  mask-image: radial-gradient(
    ellipse 90% 94% at 80% 90%,
    black 50%,
    rgba(0, 0, 0, 0.88) 65%,
    rgba(0, 0, 0, 0.5) 80%,
    transparent 100%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 90% 94% at 80% 90%,
    black 50%,
    rgba(0, 0, 0, 0.88) 65%,
    rgba(0, 0, 0, 0.5) 80%,
    transparent 100%
  );
}

.terminal_output {
  position: relative;
  z-index: 1;
  max-width: 58%;
  padding: 1.25rem 1.25rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  line-height: 1.55;
  min-height: 220px;
  overflow-y: auto;
}

.terminal_run {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  margin: 0 0 0.75rem 2.25rem;
  padding: 0.4rem 3.85rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--terminal-green);
  background: rgba(111, 207, 151, 0.08);
  border: 1px solid rgba(111, 207, 151, 0.35);
  border-radius: var(--radius-sm);
  transition: background 0.2s, border-color 0.2s, opacity 0.2s;
  display: inline-block;
}

#terminal-run-alt {
  margin-left: 0.75rem;
}

#terminal-run-alt:hover:not(:disabled) {
  background: rgba(111, 207, 151, 0.16);
  border-color: rgba(111, 207, 151, 0.55);
}

#terminal-run-alt:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.terminal_run:hover:not(:disabled) {
  background: rgba(111, 207, 151, 0.16);
  border-color: rgba(111, 207, 151, 0.55);
}

.terminal_run:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.terminal_run.is-running {
  color: var(--ember-glow);
  border-color: rgba(232, 138, 58, 0.45);
  background: rgba(196, 92, 42, 0.1);
}

.terminal_output p {
  white-space: pre-wrap;
  word-break: break-word;
}

.t-dim {
  color: var(--text-dim);
}

.t-success {
  color: var(--terminal-green);
}

.t-error {
  color: #ff6b6b;
}

.t-comment {
  color: var(--text-muted);
}

.t-indent {
  padding-left: 0.5rem;
}

.t-arrow {
  color: var(--terminal-warm);
}

.cursor {
  color: var(--terminal-green);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.terminal_input-row {
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--panel-border);
  background: rgba(0, 0, 0, 0.35);
}

.terminal_input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  outline: none;
}

.terminal_input::placeholder {
  color: var(--text-dim);
}

.terminal_input:focus {
  border-color: var(--panel-border-hover);
}

/* ── Sidebar ── */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.panel_header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.panel_icon {
  font-size: 0.9rem;
}

.panel_title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
}

.panel--activity,
.panel--confessions,
.panel--juno {
  padding: 0.85rem 1rem;
}

.panel_header--activity {
  gap: 0.35rem;
}

.activity-header_logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  flex-shrink: 0;
}

.activity-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.5rem 0 0.65rem;
  padding: 0.5rem 0.35rem;
  min-height: clamp(120px, 28vw, 156px);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(196, 92, 42, 0.12);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.activity-fire_logo {
  display: block;
  width: var(--activity-logo-w);
  height: auto;
  max-height: var(--activity-logo-h);
  flex-shrink: 0;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.panel_caption {
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.65rem;
}

.activity-bar {
  display: flex;
  align-items: stretch;
  gap: 3px;
  height: 14px;
  padding: 3px 4px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(196, 92, 42, 0.15);
  border-radius: 4px;
}

.activity-bar_seg {
  flex: 1;
  min-width: 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
}

.activity-bar_seg--on {
  background: linear-gradient(to bottom,
      #f0a050 0%,
      var(--ember-glow) 45%,
      var(--ember) 100%);
  box-shadow: 0 0 4px rgba(232, 138, 58, 0.35);
}

.confession-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.confession_meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}

.confession_user {
  font-size: 0.72rem;
  color: var(--ember-glow);
}

.confession_time {
  font-size: 0.62rem;
  color: var(--text-dim);
}

.confession_dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-left: auto;
}

.confession_dot--green {
  background: #4ade80;
}

.confession_dot--orange {
  background: var(--ember-glow);
}

.confession_dot--blue {
  background: #60a5fa;
}

.confession_text {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.panel_link {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 0.68rem;
  color: var(--ember-glow);
}

.panel_link:hover {
  text-decoration: underline;
}

.juno {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.juno_avatar {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
}

.juno_name {
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.juno_status {
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── Action row ── */
.actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.action-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.7rem 0.8rem;
  background: rgba(14, 18, 28, 0.92);
  border: 1px solid rgba(196, 92, 42, 0.22);
  border-radius: var(--radius-sm);
  text-align: left;
  transition: border-color 0.2s, transform 0.15s;
}

.action-card:hover {
  border-color: var(--panel-border-hover);
  transform: translateY(-2px);
}

.action-card_icon {
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.action-card_cmd {
  font-size: 0.75rem;
  font-weight: 600;
}

.action-card_desc {
  font-size: 0.62rem;
  color: var(--text-muted);
}

.action-card--green .action-card_cmd {
  color: #6fcf97;
}

.action-card--red .action-card_cmd {
  color: #f87171;
}

.action-card--orange .action-card_cmd {
  color: #fb923c;
}

.action-card--amber .action-card_cmd {
  color: var(--ember-glow);
}

.action-card--purple .action-card_cmd {
  color: #c084fc;
}

.action-card--blue .action-card_cmd {
  color: #60a5fa;
}

/* ── Footer ── */
.footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.25rem;
  margin-top: 0.35rem;
  padding: 0.65rem 0 0.25rem;
  border-top: 1px solid rgba(196, 92, 42, 0.18);
}

.footer_player {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.65rem 0.4rem 0.55rem;
  background: rgba(14, 18, 28, 0.85);
  border: 1px solid rgba(196, 92, 42, 0.2);
  border-radius: var(--radius-sm);
}

.footer_note {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 0.85rem;
  color: var(--ember-glow);
}

.footer_player-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.footer_visualizer {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
  padding: 0 0.15rem;
}

.footer_visualizer span {
  width: 3px;
  background: linear-gradient(to top, var(--ember), var(--ember-glow));
  border-radius: 1px;
  animation: viz 0.75s ease-in-out infinite alternate;
}

.footer_visualizer span:nth-child(1) {
  height: 35%;
  animation-delay: 0s;
}

.footer_visualizer span:nth-child(2) {
  height: 60%;
  animation-delay: 0.08s;
}

.footer_visualizer span:nth-child(3) {
  height: 90%;
  animation-delay: 0.16s;
}

.footer_visualizer span:nth-child(4) {
  height: 50%;
  animation-delay: 0.24s;
}

.footer_visualizer span:nth-child(5) {
  height: 75%;
  animation-delay: 0.32s;
}

.footer_visualizer span:nth-child(6) {
  height: 45%;
  animation-delay: 0.4s;
}

@keyframes viz {
  from {
    transform: scaleY(0.45);
    opacity: 0.7;
  }

  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

.footer_pause {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  font-size: 0.7rem;
  color: var(--ember-glow);
  background: rgba(196, 92, 42, 0.15);
  border: 1px solid rgba(232, 138, 58, 0.35);
  border-radius: 6px;
  transition: background 0.2s;
}

.footer_pause:hover {
  background: rgba(196, 92, 42, 0.28);
}

.footer_quote {
  font-size: 0.72rem;
  color: var(--terminal-green);
  text-align: center;
  white-space: nowrap;
}

.footer_quote-prompt {
  color: var(--text-dim);
  margin-right: 0.25rem;
}

.footer_heart {
  color: #f87171;
  margin-left: 0.2rem;
}

.footer_clock {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer_moon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  font-size: 0.9rem;
  background: rgba(14, 18, 28, 0.85);
  border: 1px solid rgba(196, 92, 42, 0.2);
  border-radius: var(--radius-sm);
}

.footer_time {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(14, 18, 28, 0.85);
  border: 1px solid rgba(196, 92, 42, 0.2);
  border-radius: var(--radius-sm);
}

/* ── Responsive ── */
@media (min-width: 1400px) {
  :root {
    --scene-w: clamp(320px, 44%, 540px);
    --scene-h: clamp(280px, 90%, 440px);
  }

  .main {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

@media (max-width: 1100px) {
  .header {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand status"
      "toggle toggle";
    gap: 0.75rem 1rem;
  }

  .brand {
    grid-area: brand;
    justify-content: flex-start;
    text-align: left;
  }

  .header-status {
    grid-area: status;
    justify-self: end;
    min-width: 0;
  }

  .nav-toggle {
    display: inline-flex;
    grid-area: toggle;
    justify-self: end;
  }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 200;
    width: min(300px, 88vw);
    height: 100vh;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    transform: translateX(105%);
    transition: transform 0.28s ease;
  }

  .nav.is-open {
    transform: translateX(0);
  }

  .nav_panel {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    width: 100%;
    height: 100%;
    padding: 1.25rem 1.25rem 2rem;
    background: rgba(10, 14, 22, 0.98);
    border-left: 1px solid var(--panel-border);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.45);
  }

  .nav_panel-title {
    display: block;
    font-size: 0.68rem;
    color: var(--text-dim);
    text-align: center;
    padding-bottom: 0.85rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--panel-border);
  }

  .nav_link {
    padding: 0.75rem 0.85rem;
    border-bottom: none;
    border-left: 2px solid transparent;
    border-radius: var(--radius-sm);
    transition: background 0.2s, border-color 0.2s, color 0.2s;
  }

  .nav_link:hover {
    background: rgba(196, 92, 42, 0.08);
  }

  .nav_link--active {
    border-left-color: var(--ember-glow);
    border-bottom-color: transparent;
    background: rgba(196, 92, 42, 0.12);
  }

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

  .actions {
    grid-template-columns: repeat(3, 1fr);
  }

  .terminal_output {
    max-width: 62%;
  }
}

@media (max-width: 768px) {
  :root {
    --scene-w: clamp(160px, 58vw, 280px);
    --scene-h: clamp(140px, 38vh, 260px);
    --activity-logo-w: min(100%, 220px);
    --brand-logo: 40px;
  }

  .header {
    grid-template-columns: 1fr auto auto;
    grid-template-areas: "brand toggle status";
    align-items: center;
  }

  .brand_tagline {
    font-size: 0.62rem;
  }

  .header-status {
    padding: 0.4rem 0.65rem;
    gap: 0.45rem;
  }

  .header-status_count {
    font-size: 0.72rem;
  }

  .header-status_label {
    font-size: 0.6rem;
  }

  .terminal {
    min-height: 340px;
  }

  .terminal_titlebar {
    grid-template-columns: auto 1fr;
    gap: 0.5rem;
  }

  .terminal_mode {
    display: none;
  }

  .terminal_output {
    max-width: 100%;
    padding: 1rem 0.85rem 0.75rem;
    font-size: 0.74rem;
  }

  .terminal_scene-visual {
    max-width: 72%;
    opacity: 0.92;
  }

  .activity-fire_logo {
    max-width: 100%;
  }

  .footer_quote {
    white-space: normal;
  }
}

@media (max-width: 640px) {
  .app {
    padding: 0.65rem;
    gap: 0.75rem;
  }

  .header-status_icon {
    display: none;
  }

  .header-status {
    min-width: 0;
  }

  .terminal_scene-visual {
    max-width: 78%;
    max-height: 50%;
  }

  .terminal_scene-visual::before,
  .terminal_scene-visual::after {
    filter: blur(10px);
  }

  .actions {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 0.5rem;
  }

  .footer_player,
  .footer_clock {
    justify-content: center;
    justify-self: center;
  }

  .footer_player-label {
    font-size: 0.62rem;
  }
}

@media (max-width: 400px) {
  :root {
    --scene-h: clamp(110px, 32vh, 180px);
  }

  .brand_name {
    font-size: 1.05rem;
  }

  .header-status_label {
    display: none;
  }

  .terminal_scene-visual {
    max-width: 85%;
    max-height: 42%;
  }
}

/* ── Command Popup Modal ── */
.cmd-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.cmd-popup[hidden] {
  display: none;
}

.cmd-popup_overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
}

.cmd-popup_content {
  position: relative;
  z-index: 1001;
  width: 90%;
  max-width: 520px;
  max-height: 70vh;
  border-radius: var(--radius);
  overflow: hidden;
}

/* ── About page ── */
.about-main {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.about-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 420px;
}

.about-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
}

.about-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: var(--ember-glow);
  letter-spacing: 0.04em;
}


.juno-button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}

.juno-button:hover {
  transform: scale(1.02);
}

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

.juno {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.juno_avatar {
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.juno_name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.juno_status {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Juno Modal */
.juno-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.juno-modal[hidden] {
  display: none;
}

.juno-modal_overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
}

.juno-modal_content {
  position: relative;
  z-index: 1001;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  border-radius: var(--radius);
  overflow: hidden;
}

.juno-terminal {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  height: 100%;
}

.juno-terminal_output {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  font-size: 0.75rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.juno-terminal_output p {
  margin-bottom: 0.5rem;
}

.juno-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--panel-border);
  background: rgba(0, 0, 0, 0.2);
}

.juno-action-btn {
  padding: 0.4rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--terminal-green);
  background: rgba(111, 207, 151, 0.08);
  border: 1px solid rgba(111, 207, 151, 0.35);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.juno-action-btn:hover {
  background: rgba(111, 207, 151, 0.16);
  border-color: rgba(111, 207, 151, 0.55);
}

.juno-action-btn:active {
  transform: scale(0.98);
}

.juno-modal_close {
  position: absolute;
  top: 3rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.2s;
  z-index: 1002;
}

.juno-modal_close:hover {
  background: rgba(0, 0, 0, 0.7);
  color: var(--text);
}
