:root {
  --bg-deep: #090814;
  --bg-panel: #120f29;
  --bg-card: rgba(21, 17, 46, 0.9);
  --bg-card-strong: rgba(28, 22, 60, 0.96);
  --border-subtle: rgba(130, 148, 255, 0.22);
  --border-cyan: rgba(0, 229, 255, 0.45);
  --border-magenta: rgba(255, 42, 133, 0.48);

  --cyan: #00e5ff;
  --cyan-soft: rgba(0, 229, 255, 0.14);
  --magenta: #ff2a85;
  --magenta-soft: rgba(255, 42, 133, 0.15);
  --gold: #ffd166;
  --text-main: #eef2ff;
  --text-muted: #98a2c9;
  --text-dim: #6f78a3;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --nav-height: 70px;
}

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  background-image:
    radial-gradient(circle at 12% 8%, rgba(0, 229, 255, 0.13), transparent 36%),
    radial-gradient(circle at 88% 18%, rgba(255, 42, 133, 0.13), transparent 40%),
    linear-gradient(180deg, #0c0a1d 0%, #090814 100%);
  background-attachment: fixed;
}

.terminal-shell {
  position: relative;
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(rgba(0, 229, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.025) 1px, transparent 1px),
    rgba(11, 9, 26, 0.72);
  background-size: 24px 24px, 24px 24px, auto;
  border-left: 1px solid rgba(130, 148, 255, 0.12);
  border-right: 1px solid rgba(130, 148, 255, 0.12);
}

/* Header */
.terminal-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 14px 16px 12px;
  background: linear-gradient(180deg, rgba(16, 13, 36, 0.98) 0%, rgba(12, 10, 28, 0.94) 100%);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-cyan);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan), 0 0 4px #fff;
  flex-shrink: 0;
}

.brand-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
}

.brand-sub {
  margin: 2px 0 0;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--cyan);
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.balance-display {
  text-align: right;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(9, 8, 20, 0.85);
  border: 1px solid rgba(255, 209, 102, 0.4);
  box-shadow: inset 0 0 12px rgba(255, 209, 102, 0.08);
  flex-shrink: 0;
}

.balance-label {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.balance-value-row {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 3px;
}

.balance-value {
  font-size: 1.45rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  line-height: 1.1;
  text-shadow: 0 0 10px rgba(255, 209, 102, 0.35);
}

.balance-unit {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  opacity: 0.85;
}

.header-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.mini-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(130, 148, 255, 0.14);
}

.mini-stat-label {
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.mini-stat-val {
  font-size: 0.88rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

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

.magenta,
.magenta-text {
  color: var(--magenta);
}

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

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 14px);
  transform: translateX(-50%);
  z-index: 50;
  max-width: min(440px, calc(100vw - 32px));
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(16, 13, 38, 0.96);
  border: 1px solid var(--cyan);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6), 0 0 16px rgba(0, 229, 255, 0.25);
  text-align: center;
}

.toast.error {
  border-color: var(--magenta);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6), 0 0 16px rgba(255, 42, 133, 0.3);
}

/* Main Content */
.terminal-main {
  flex: 1;
  padding: 16px 16px calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 24px);
}

.tab-panel[hidden] {
  display: none;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.section-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 10px;
}

.eyebrow {
  margin: 0;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--cyan);
}

.section-title {
  margin: 3px 0 0;
  font-size: 1.15rem;
  font-weight: 800;
}

.card-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
}

.card-desc {
  margin: 8px 0 14px;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.muted-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Cards */
.terminal-card,
.metro-map-card,
.station-detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.metro-map-card {
  border-color: var(--border-cyan);
  position: relative;
  overflow: hidden;
}

.metro-map-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(0, 229, 255, 0.24);
}

.line-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--cyan-soft);
  border: 1px solid var(--border-cyan);
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.map-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Subway Route Map */
.station-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 4px;
}

.station-node-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}

.station-rail {
  position: relative;
  width: 34px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}

.station-rail::before {
  content: "";
  position: absolute;
  top: -12px;
  bottom: -12px;
  width: 4px;
  background: linear-gradient(180deg, var(--cyan), var(--magenta));
  opacity: 0.65;
  border-radius: 2px;
}

.station-node-wrap:first-child .station-rail::before {
  top: 50%;
}

.station-node-wrap:last-child .station-rail::before {
  bottom: 50%;
}

.station-node-wrap:only-child .station-rail::before {
  display: none;
}

.station-dot {
  position: relative;
  z-index: 2;
  align-self: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 3px solid var(--cyan);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.45);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 900;
  color: var(--bg-deep);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.station-node-wrap.selected .station-dot {
  border-color: var(--magenta);
  box-shadow: 0 0 16px rgba(255, 42, 133, 0.85);
  transform: scale(1.12);
}

.station-node-wrap.completed .station-dot {
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.75);
}

.station-btn {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 13px;
  margin-left: 8px;
  border-radius: 14px;
  border: 1px solid rgba(130, 148, 255, 0.22);
  background: rgba(12, 10, 28, 0.78);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  min-height: 54px;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.station-btn:active {
  transform: scale(0.99);
}

.station-node-wrap.selected .station-btn {
  border-color: var(--magenta);
  background: linear-gradient(90deg, rgba(255, 42, 133, 0.14), rgba(0, 229, 255, 0.08));
  box-shadow: 0 0 0 1px rgba(255, 42, 133, 0.3), 0 6px 18px rgba(0, 0, 0, 0.35);
}

.station-node-wrap.completed .station-btn {
  border-color: rgba(0, 229, 255, 0.35);
  background: rgba(0, 229, 255, 0.07);
}

.station-info {
  min-width: 0;
  flex: 1;
}

.station-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.station-code {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

.station-line-tag {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(130, 148, 255, 0.16);
  color: var(--text-muted);
}

.station-name {
  display: block;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.3;
  word-break: break-word;
}

.station-node-wrap.completed .station-name {
  color: var(--text-muted);
}

.station-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.station-coins {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.station-state-pill {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(130, 148, 255, 0.16);
  color: var(--text-muted);
}

.station-node-wrap.completed .station-state-pill {
  background: var(--cyan-soft);
  color: var(--cyan);
}

/* Station Detail Card */
.station-detail-card {
  margin-top: 14px;
  border-color: var(--border-magenta);
  background: linear-gradient(180deg, rgba(26, 20, 58, 0.96), rgba(16, 13, 36, 0.96));
}

.detail-placeholder {
  font-size: 0.84rem;
  color: var(--text-muted);
  text-align: center;
  padding: 12px 6px;
}

.detail-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.station-code-badge {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--magenta-soft);
  border: 1px solid var(--border-magenta);
  color: var(--magenta);
}

.station-line-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(130, 148, 255, 0.15);
  color: var(--text-muted);
}

.station-status-badge {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(130, 148, 255, 0.15);
  color: var(--text-muted);
}

.station-status-badge.done {
  background: var(--cyan-soft);
  color: var(--cyan);
  border: 1px solid var(--border-cyan);
}

.detail-title {
  margin: 10px 0 4px;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.35;
}

.detail-note {
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.detail-note:empty {
  display: none;
}

.detail-reward-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(9, 8, 20, 0.75);
  border: 1px solid rgba(255, 209, 102, 0.28);
  margin-bottom: 12px;
}

.detail-reward-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.detail-reward-value {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

/* Buttons */
.primary-btn,
.secondary-btn,
.danger-btn,
.chip-btn,
.small-btn,
.text-btn {
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.primary-btn:active,
.secondary-btn:active,
.danger-btn:active,
.chip-btn:active,
.small-btn:active {
  transform: scale(0.98);
}

.primary-btn {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.cyan-btn {
  background: linear-gradient(135deg, #00e5ff, #38bdf8);
  color: #070b18;
  box-shadow: 0 6px 20px rgba(0, 229, 255, 0.3);
}

.magenta-btn {
  background: linear-gradient(135deg, #ff2a85, #ec4899);
  color: #fff;
  box-shadow: 0 6px 20px rgba(255, 42, 133, 0.32);
}

.primary-btn:disabled,
.small-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.secondary-btn {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid var(--border-cyan);
  color: var(--cyan);
  font-size: 0.88rem;
  font-weight: 700;
}

.danger-btn {
  width: 100%;
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 10px;
  background: rgba(255, 42, 133, 0.12);
  border: 1px solid var(--border-magenta);
  color: var(--magenta);
  font-size: 0.84rem;
  font-weight: 700;
}

.chip-btn {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--cyan-soft);
  border: 1px solid var(--border-cyan);
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 700;
}

.text-btn {
  background: transparent;
  color: var(--magenta);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 6px;
}

.small-btn {
  min-height: 36px;
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(130, 148, 255, 0.14);
  color: var(--text-main);
  border: 1px solid rgba(130, 148, 255, 0.25);
}

.small-btn.win-btn {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.22), rgba(0, 229, 255, 0.12));
  border-color: var(--border-cyan);
  color: var(--cyan);
}

.small-btn.win-btn.claimed {
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.3);
  color: var(--cyan);
  opacity: 0.75;
}

.small-btn.danger {
  color: var(--magenta);
  border-color: rgba(255, 42, 133, 0.35);
  background: rgba(255, 42, 133, 0.1);
}

/* Forms */
.form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
}

.field input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(130, 148, 255, 0.28);
  background: rgba(9, 8, 20, 0.85);
  color: var(--text-main);
  font-size: 0.94rem;
  font-family: inherit;
}

.field input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.2);
}

/* Task Manage List */
.manage-task-list,
.match-list,
.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.manage-task-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.manage-task-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.manage-task-title {
  margin: 2px 0 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.manage-task-note {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.manage-task-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Economy */
.economy-summary {
  margin-bottom: 14px;
}

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

.summary-box {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(9, 8, 20, 0.72);
  border: 1px solid rgba(130, 148, 255, 0.16);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.summary-val {
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.match-control-card {
  border-color: var(--border-magenta);
}

.card-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.rate-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--magenta-soft);
  border: 1px solid var(--border-magenta);
  color: #ff8bc0;
}

.match-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.match-item-info {
  min-width: 0;
}

.match-title {
  font-size: 0.92rem;
  font-weight: 800;
}

.match-sub {
  margin-top: 3px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Settings */
.settings-details {
  margin-top: 18px;
}

.settings-summary {
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.settings-summary::after {
  content: "+";
  color: var(--cyan);
  font-size: 1.1rem;
  font-weight: 800;
}

.settings-details[open] .settings-summary::after {
  content: "−";
}

.settings-form {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(130, 148, 255, 0.22);
}

.storage-meta {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(130, 148, 255, 0.22);
}

.storage-key-text {
  margin: 0 0 10px;
  font-size: 0.74rem;
  color: var(--text-muted);
  word-break: break-all;
}

.storage-key-text code {
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.08);
  padding: 2px 5px;
  border-radius: 4px;
}

/* History */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.filter-chip {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(130, 148, 255, 0.25);
  background: rgba(16, 13, 36, 0.85);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.filter-chip.active {
  background: var(--cyan-soft);
  border-color: var(--border-cyan);
  color: var(--cyan);
}

.history-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.history-left {
  min-width: 0;
}

.history-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.type-badge {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 5px;
}

.type-badge.task {
  background: var(--cyan-soft);
  color: var(--cyan);
}

.type-badge.match {
  background: var(--magenta-soft);
  color: var(--magenta);
}

.type-badge.win_cashback {
  background: rgba(255, 209, 102, 0.16);
  color: var(--gold);
}

.history-time {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.history-label {
  font-size: 0.9rem;
  font-weight: 700;
  word-break: break-word;
}

.history-right {
  text-align: right;
  flex-shrink: 0;
}

.history-delta {
  font-size: 1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.history-balance {
  margin-top: 2px;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.empty-state {
  padding: 22px 14px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-muted);
  background: rgba(16, 13, 36, 0.6);
  border: 1px dashed rgba(130, 148, 255, 0.24);
  border-radius: 14px;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(13, 10, 30, 0.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-cyan);
  z-index: 30;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  position: relative;
}

.nav-item.active {
  color: var(--cyan);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18%;
  right: 18%;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  box-shadow: 0 0 10px var(--cyan);
}

.nav-icon {
  width: 22px;
  height: 22px;
}
