:root {
  --bg: #060a09;
  --bezel: #0a0f0d;
  --panel: #0c1310;
  --panel-deep: #090f0d;
  --line: #22332c;
  --line-soft: #182620;
  --teal: #79e6d5;
  --teal-bright: #a6f4e7;
  --teal-dim: #2c4c45;
  --orange: #ff9a4d;
  --orange-dim: #5a3a1e;
  --cream: #d8cdab;
  --cream-deep: #b3a780;
  --green: #5fd79b;
  --text: #9fb4ac;
  --label: #7d948c;
  --font: 'Space Mono', 'Consolas', monospace;
}

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

html, body { height: 100%; }

body {
  background: var(--bg);
  font-family: var(--font);
  color: var(--text);
  display: flex;
  gap: 14px;
  padding: 14px;
  min-width: 1220px;
  overflow: auto;
}

canvas { display: block; width: 100%; height: 100%; }

/* ---------- Sidebar ---------- */

#sidebar {
  width: 218px;
  flex: 0 0 218px;
  background: var(--cream);
  border-radius: 14px;
  border: 1px solid #3a3a32;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(60, 50, 20, 0.18);
}

.poster { overflow: hidden; }
.poster svg { display: block; width: 100%; height: 100%; }
.poster-top { height: 168px; flex: 0 0 auto; }
.poster-bottom { flex: 1 1 auto; min-height: 100px; display: flex; align-items: flex-end; }

.brand { text-align: center; padding: 12px 8px 10px; }
.brand h1 {
  font-size: 25px;
  letter-spacing: 0.08em;
  color: #23312e;
  font-weight: 700;
}
.brand p {
  font-size: 8.5px;
  letter-spacing: 0.12em;
  white-space: nowrap;
  color: #55604f;
  margin-top: 2px;
}

#nav { display: flex; flex-direction: column; gap: 7px; padding: 10px 14px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  padding: 8px 12px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: transparent;
  color: #3c473f;
  cursor: pointer;
  text-align: left;
}
.nav-item svg { width: 15px; height: 15px; flex: 0 0 auto; }
.nav-item:hover { background: rgba(35, 49, 46, 0.08); }
.nav-item.active {
  background: #16211f;
  color: var(--teal);
  border-color: #3f5a54;
  box-shadow: 0 0 0 2px rgba(22, 33, 31, 0.25), 0 0 12px rgba(60, 120, 110, 0.35);
}

.status-box {
  margin: 8px 14px 12px;
  background: #10181688;
  background: #131d1a;
  border: 1px solid #2c3b36;
  border-radius: 8px;
  padding: 7px 11px 9px;
}
.status-label { font-size: 7.5px; letter-spacing: 0.2em; color: #718778; }
.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3px;
}
.status-row span:first-child {
  color: var(--green);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-shadow: 0 0 8px rgba(95, 215, 155, 0.6);
}
.status-lamp {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: lamp 2.4s ease-in-out infinite;
}
.status-lamp.warn { background: var(--orange); box-shadow: 0 0 8px var(--orange); }
@keyframes lamp { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* ---------- Main column ---------- */

#main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#frame {
  flex: 1 1 auto;
  min-height: 0;
  background: var(--bezel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Header */

#hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 10px;
  border-bottom: 1px solid var(--line-soft);
}
.hdr-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; letter-spacing: 0.22em; color: #cfe0da; font-weight: 700;
}
.live-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 9px var(--green);
  animation: lamp 1.6s ease-in-out infinite;
}
.hdr-right { display: flex; align-items: stretch; gap: 16px; }
.hdr-sep { width: 1px; background: var(--line-soft); }
.hdr-label { display: block; font-size: 8px; letter-spacing: 0.2em; color: var(--label); margin-bottom: 3px; }
.hdr-value { font-size: 12.5px; color: #d5e4de; letter-spacing: 0.06em; }
.hdr-endpoint { cursor: default; }
.hdr-endpoint .hdr-value i { font-style: normal; color: var(--label); margin-left: 8px; font-size: 10px; }
.hdr-started { text-align: left; }
.dm-elapsed { width: 92px; height: 14px; margin-top: 3px; }

/* Stat cards */

#stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  flex: 0 0 148px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px 9px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.stat-head { display: flex; align-items: baseline; gap: 8px; }
.stat-name { font-size: 11px; letter-spacing: 0.18em; color: #c8d9d2; font-weight: 700; }
.stat-unit { font-size: 9px; letter-spacing: 0.1em; color: var(--label); }
.badge {
  margin-left: auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid var(--teal-dim);
  color: var(--teal);
  display: flex; align-items: center; justify-content: center;
  background: rgba(121, 230, 213, 0.05);
}
.badge svg { width: 13px; height: 13px; }
.dm-big { flex: 1 1 auto; min-height: 0; margin: 6px 0 4px; }
.stat-sub {
  display: flex; align-items: center; gap: 7px;
  font-size: 9.5px; letter-spacing: 0.12em; color: var(--label);
  border-top: 1px solid var(--line-soft);
  padding-top: 7px;
}
.stat-sub svg { width: 12px; height: 12px; color: var(--teal-dim); color: #55786f; flex: 0 0 auto; }

.stat-card.loss .badge { border-color: var(--orange-dim); color: var(--orange); background: rgba(255, 154, 77, 0.05); }
.stat-card.loss .stat-sub svg { color: #8a5c33; }

/* Panels shared */

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.panel-title {
  font-size: 10.5px; letter-spacing: 0.2em; color: #c8d9d2; font-weight: 700;
}
.panel-title.centered { text-align: center; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; }

/* Mid row */

#mid-row {
  flex: 1.05 1 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 4.6fr) minmax(0, 4.6fr);
  gap: 12px;
}

.legend { font-size: 8.5px; letter-spacing: 0.16em; color: var(--label); display: flex; align-items: center; gap: 6px; }
.legend .key { width: 14px; height: 2px; display: inline-block; margin-left: 10px; }
.legend .key-dl { background: var(--teal); box-shadow: 0 0 4px var(--teal); }
.legend .key-ul { background: var(--orange); box-shadow: 0 0 4px var(--orange); }
#chart { flex: 1 1 auto; min-height: 0; margin-top: 8px; }

#globe-wrap {
  border-radius: 10px;
  background: radial-gradient(circle at 50% 45%, #0d1714 0%, var(--panel-deep) 70%);
  min-width: 0; min-height: 0;
}

#stability-panel { align-items: stretch; }
.dm-stab { height: 34px; flex: 0 0 34px; margin-top: 10px; }
#stabRating {
  color: var(--green); font-size: 11px; letter-spacing: 0.1em;
  margin: 6px 0 4px; text-shadow: 0 0 8px rgba(95, 215, 155, 0.45);
}
#stabBars { flex: 1 1 auto; min-height: 0; }
.axis-note { font-size: 7.5px; letter-spacing: 0.18em; color: var(--label); margin-top: 6px; }

/* Bottom row */

#bottom-row {
  flex: 1.3 1 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 3.2fr) minmax(0, 4.4fr);
  gap: 12px;
}

#speed-panel .speed-body {
  flex: 1 1 auto; min-height: 0;
  display: flex; gap: 8px; margin-top: 6px;
}
.gyro-box {
  flex: 0 0 31%;
  background: var(--panel-deep);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  padding: 8px;
}
#gyro { width: 100%; height: 100%; max-height: 210px; }
.ring { transform-origin: 60px 62px; }
.r1 { animation: spin 14s linear infinite; }
.r2 { animation: spin 6s linear infinite; }
.r3 { animation: spin-rev 9s linear infinite; }
.r4 { animation: spin 11s linear infinite reverse; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes spin-rev { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }

.gauge-box {
  flex: 1 1 auto; min-width: 0; min-height: 0;
  display: flex; flex-direction: column; align-items: center;
}
#gauge { flex: 1 1 auto; min-height: 0; }
.dm-gauge { width: 150px; height: 26px; flex: 0 0 26px; }
.gauge-unit { font-size: 10px; letter-spacing: 0.14em; color: var(--label); margin-top: 3px; }

#integrity-panel { align-items: stretch; }
#particles { flex: 1 1 auto; min-height: 0; margin-top: 4px; }
.stream-status {
  text-align: center; font-size: 12px; letter-spacing: 0.22em;
  color: var(--green); text-shadow: 0 0 8px rgba(95, 215, 155, 0.5);
  margin-top: 2px;
}
.stream-status.warn { color: var(--orange); text-shadow: 0 0 8px rgba(255, 154, 77, 0.5); }
.packets-line {
  text-align: center; font-size: 9px; letter-spacing: 0.16em;
  color: var(--label); margin-top: 5px;
}

#path-panel .path-scene { flex: 1 1 auto; min-height: 0; }
.path-scene svg { width: 100%; height: 100%; }
.flow { animation: dash 1.2s linear infinite; }
@keyframes dash { from { stroke-dashoffset: 16; } to { stroke-dashoffset: 0; } }
.path-label {
  fill: #c8d9d2; font-size: 9px; letter-spacing: 0.16em;
  text-anchor: middle; font-family: var(--font); font-weight: 700;
}
.path-sub { fill: var(--label); font-size: 7.5px; letter-spacing: 0.1em; text-anchor: middle; font-family: var(--font); }

.path-footer {
  display: flex; align-items: center; gap: 18px;
  border-top: 1px solid var(--line-soft);
  padding-top: 9px;
}
.pf-label { display: block; font-size: 7.5px; letter-spacing: 0.16em; color: var(--label); margin-bottom: 2px; }
.pf-value { font-size: 11px; color: #d5e4de; letter-spacing: 0.05em; }

.pause-btn {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font); font-size: 10px; letter-spacing: 0.14em;
  color: var(--teal);
  background: rgba(121, 230, 213, 0.06);
  border: 1px solid var(--teal-dim);
  border-radius: 7px;
  padding: 8px 14px;
  cursor: pointer;
}
.pause-btn:hover { background: rgba(121, 230, 213, 0.13); box-shadow: 0 0 10px rgba(121, 230, 213, 0.2); }
.pb-icon { font-size: 8px; letter-spacing: 0; }

/* ---------- Console strip ---------- */

#console {
  flex: 0 0 118px;
  min-height: 0;              /* stay at the 118px basis; don't grow to log content */
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px minmax(0, 1fr);
  gap: 14px;
}

.console-panel {
  background: var(--bezel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 14px;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.console-title { font-size: 8px; letter-spacing: 0.22em; color: var(--label); margin-bottom: 5px; }

.console-panel { overflow: hidden; }   /* keep the log bounded to the strip */

#log {
  flex: 1 1 auto;
  min-height: 0;                        /* allow the scroll area to shrink */
  overflow-y: auto;
  padding-right: 14px;                  /* clear the corner lamp */
  font-size: 10px;
  line-height: 1.55;
  color: var(--green);
  letter-spacing: 0.04em;
  text-shadow: 0 0 6px rgba(95, 215, 155, 0.35);
  scrollbar-width: thin;
  scrollbar-color: var(--teal-dim) transparent;
}
#log::-webkit-scrollbar { width: 6px; }
#log::-webkit-scrollbar-thumb { background: var(--teal-dim); border-radius: 3px; }
#log .warn { color: var(--orange); text-shadow: 0 0 6px rgba(255, 154, 77, 0.35); }
.log-lamp {
  position: absolute; right: 12px; bottom: 12px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--orange); box-shadow: 0 0 7px var(--orange);
  animation: lamp 1.1s ease-in-out infinite;
}

#about-panel p {
  flex: 1 1 auto;
  font-size: 9.5px;
  line-height: 1.6;
  color: #b9ac8d;
  letter-spacing: 0.03em;
  max-width: 70%;
}
#about-logo {
  position: absolute; right: 16px; top: 50%;
  width: 84px; transform: translateY(-50%);
  opacity: 0.85;
}

#console-center {
  background: linear-gradient(180deg, #1b1b16, #101210);
  border: 1px solid #33332a;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  padding: 10px;
}

.key-cluster {
  display: grid;
  grid-template-columns: repeat(2, 30px);
  gap: 6px;
  justify-items: center;
}
.key {
  width: 30px; height: 24px;
  border-radius: 4px;
  font-family: var(--font); font-size: 7.5px; letter-spacing: 0.06em;
  cursor: pointer;
  border: 1px solid #000;
}
.key-cluster.teal .key {
  background: #0f2925; color: #55786f;
  border-color: #234; border-color: #1d3833;
  box-shadow: inset 0 1px 0 rgba(121, 230, 213, 0.14);
}
.key-cluster.teal .key.active {
  background: #1a4a42; color: var(--teal-bright);
  box-shadow: 0 0 10px rgba(121, 230, 213, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.key-cluster.orange .key {
  background: #3a1f0c; color: #c07f45;
  border-color: #2a1608;
  box-shadow: inset 0 1px 0 rgba(255, 154, 77, 0.2);
}
.key-cluster.orange .key:active { background: #6b3a16; color: #ffc99a; }
.key-cluster.teal .key:not(.active):hover { background: #143630; }
.cluster-label {
  grid-column: 1 / -1;
  font-size: 6.5px; letter-spacing: 0.2em; color: #6a6a58;
}

.speaker { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.grille {
  width: 44px; height: 34px;
  border-radius: 5px;
  background: repeating-linear-gradient(90deg, #2a2a22 0 3px, #14140f 3px 6px);
  border: 1px solid #33332a;
}
.dial {
  width: 22px; height: 22px; border-radius: 50%;
  background: conic-gradient(from 210deg, #4a4a3e, #23231c 40%, #4a4a3e 70%);
  border: 2px solid #33332a;
  position: relative;
}
.dial::after {
  content: ''; position: absolute;
  left: 50%; top: 2px; width: 2px; height: 7px;
  background: #cfc5a5; transform: translateX(-50%);
}

/* ---------- Test progress bar (under header) ---------- */

#test-progress {
  height: 3px; margin: -6px 2px 0;
  background: #142019; border-radius: 2px; overflow: hidden;
  flex: 0 0 auto;
}
#test-progress.continuous { visibility: hidden; }
#test-progress-fill {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #2c4c45, var(--teal));
  box-shadow: 0 0 8px var(--teal);
  transition: width 0.4s linear;
}
#dmRemaining { width: 92px; height: 14px; margin-top: 3px; }
#targetLabel { font-size: 10px; color: var(--label); letter-spacing: 0.06em; }
.mode-pill {
  font-size: 8.5px; letter-spacing: 0.14em; font-weight: 700;
  padding: 3px 9px; border-radius: 10px; margin-left: 4px;
  color: var(--teal); border: 1px solid var(--teal-dim); background: rgba(121, 230, 213, 0.08);
}
.mode-pill.burn { color: var(--orange); border-color: var(--orange-dim); background: rgba(255, 154, 77, 0.1); }
.hdr-endpoint { cursor: pointer; }

/* ---------- Settings page ---------- */

body.on-settings #frame,
body.on-settings #console { display: none; }

#settings-view {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  overflow: auto;
}
#settings-view[hidden] { display: none; }

.settings-frame {
  flex: 1 1 auto;
  background: var(--bezel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.settings-head {
  display: flex; align-items: baseline; gap: 18px;
  padding-bottom: 14px; border-bottom: 1px solid var(--line-soft);
}
.settings-sub { font-size: 8.5px; letter-spacing: 0.18em; color: var(--label); }

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field.wide { grid-column: 1 / -1; }
.field > label {
  font-size: 10px; letter-spacing: 0.18em; color: #c8d9d2; font-weight: 700;
}
.field > label .opt, .field > label .opt { color: var(--label); font-weight: 400; letter-spacing: 0.12em; }
.field-note { font-size: 9.5px; line-height: 1.5; color: var(--label); letter-spacing: 0.02em; max-width: 52ch; }

.control select {
  width: 100%;
  font-family: var(--font); font-size: 12px; letter-spacing: 0.04em;
  color: #d5e4de;
  background: var(--panel);
  border: 1px solid var(--teal-dim);
  border-radius: 8px;
  padding: 10px 34px 10px 13px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2379e6d5' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 11px;
}
.control select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 10px rgba(121, 230, 213, 0.25); }
.control select option { background: #0c1310; color: #d5e4de; }

.control.seg { display: inline-flex; gap: 0; border: 1px solid var(--teal-dim); border-radius: 8px; overflow: hidden; width: max-content; }
.seg-btn {
  font-family: var(--font); font-size: 11px; letter-spacing: 0.12em;
  padding: 10px 22px; cursor: pointer;
  background: var(--panel); color: var(--label); border: none;
}
.seg-btn + .seg-btn { border-left: 1px solid var(--teal-dim); }
.seg-btn.active { background: #1a4a42; color: var(--teal-bright); box-shadow: inset 0 0 12px rgba(121, 230, 213, 0.25); }
.seg-btn[data-mode="burn"].active { background: #5a3a1e; color: #ffd0a5; box-shadow: inset 0 0 12px rgba(255, 154, 77, 0.3); }

.estimate { border-top: 1px solid var(--line-soft); padding-top: 16px; }
.estimate-body {
  display: flex; flex-wrap: wrap; gap: 26px;
  font-size: 12px; color: var(--label); letter-spacing: 0.08em;
}
.estimate-body div { opacity: 0.5; transition: opacity 0.2s; }
.estimate-body div.on { opacity: 1; }
.estimate-body b { color: var(--teal); font-weight: 700; font-size: 15px; margin-left: 8px; letter-spacing: 0.02em; }
.estimate-body .burn b { color: var(--orange); }

.settings-actions { display: flex; gap: 12px; margin-top: auto; padding-top: 8px; }

/* ---------- Buttons (shared) ---------- */

.btn-primary, .btn-ghost {
  font-family: var(--font); font-size: 10.5px; letter-spacing: 0.14em;
  padding: 11px 20px; border-radius: 8px; cursor: pointer;
}
.btn-primary {
  color: #061713; font-weight: 700;
  background: linear-gradient(180deg, var(--teal-bright), var(--teal));
  border: 1px solid var(--teal);
  box-shadow: 0 0 14px rgba(121, 230, 213, 0.35);
}
.btn-primary:hover { box-shadow: 0 0 20px rgba(121, 230, 213, 0.55); }
.btn-ghost {
  color: var(--teal);
  background: rgba(121, 230, 213, 0.06);
  border: 1px solid var(--teal-dim);
}
.btn-ghost:hover { background: rgba(121, 230, 213, 0.14); }

/* ---------- Modals ---------- */

.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(4, 8, 7, 0.78);
  backdrop-filter: blur(3px);
}
.modal-overlay[hidden] { display: none; }

.modal.art {
  position: relative;
  width: 100%; max-width: 560px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background:
    radial-gradient(120% 80% at 50% -10%, #14211d 0%, var(--bezel) 60%);
  border: 1px solid #3f5a54;
  border-radius: 16px;
  padding: 26px 30px 24px;
  box-shadow: 0 0 0 1px rgba(121, 230, 213, 0.08), 0 24px 60px rgba(0, 0, 0, 0.6), inset 0 0 60px rgba(121, 230, 213, 0.05);
  text-align: center;
  animation: modalIn 0.32s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.modal.art.result { max-width: 720px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }

.modal-emblem { width: 96px; margin: 2px auto 8px; }
.modal-emblem svg { width: 100%; display: block; }
.modal-emblem .r-spin { transform-origin: 60px 60px; animation: spin 24s linear infinite; }

.modal-title {
  font-size: 17px; letter-spacing: 0.2em; color: var(--teal-bright); font-weight: 700;
  text-shadow: 0 0 12px rgba(121, 230, 213, 0.4); margin-bottom: 12px;
}
.modal-lede { font-size: 12px; line-height: 1.65; color: var(--text); max-width: 46ch; margin: 0 auto 16px; }
.modal-lede.small { font-size: 11px; margin-bottom: 14px; }
.modal-lede em { color: var(--teal); font-style: normal; }

.modal-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 16px; }
.mode-card {
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); padding: 12px 14px; text-align: left;
}
.mode-card.cruise { border-color: var(--teal-dim); }
.mode-card.burn { border-color: var(--orange-dim); }
.mode-name { font-size: 11px; letter-spacing: 0.16em; font-weight: 700; color: #c8d9d2; }
.mode-card.burn .mode-name { color: var(--orange); }
.mode-desc { font-size: 9.5px; line-height: 1.5; color: var(--label); margin: 6px 0 8px; }
.mode-data { font-size: 10px; color: var(--text); }
.mode-data span { color: var(--teal); font-weight: 700; }
.mode-card.burn .mode-data span { color: var(--orange); font-weight: 700; }

.modal-foot { font-size: 10px; line-height: 1.6; color: var(--label); max-width: 50ch; margin: 0 auto 18px; }
.modal-foot b { color: var(--teal); }
.modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.report-wrap {
  margin: 4px auto 18px; max-width: 620px;
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
#reportCanvas { width: 100%; display: block; }
