:root {
  --bg: #0b1622;
  --panel: #13202f;
  --ink: #e8f0f7;
  --muted: #8aa0b4;
  --accent: #4ea1ff;
  --ok: #38c172;
  --warn: #f6b73c;
  --danger: #e0506b;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, system-ui, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  overflow: hidden;          /* camera view owns the screen */
}

.banner {
  flex: 0 0 auto;
  background: #3d1a24;
  color: #ffb4c4;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--danger);
}
.banner[hidden] { display: none; }
.banner a { color: #ffb4c4; }

.stage-banner {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(90deg, #3d2e12, #4a3520, #3d2e12);
  color: #ffe8b8;
  font-size: 12px; font-weight: 600;
  padding: 7px 12px;
  border-bottom: 2px solid var(--warn);
  letter-spacing: 0.02em;
}
.stage-banner[hidden] { display: none; }
.stage-pill {
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em;
  padding: 2px 7px; border-radius: 4px;
  background: var(--warn); color: #2a1f08;
}
.stage-title-badge {
  font-size: 10px; font-weight: 800; letter-spacing: 0.06em;
  vertical-align: middle; margin-left: 4px;
  padding: 2px 6px; border-radius: 4px;
  background: var(--warn); color: #2a1f08;
}
.stage-title-badge[hidden] { display: none; }
.app-version {
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--muted); vertical-align: middle; margin-left: 4px;
}

body.stage-env {
  --accent: #e8a43a;
}
body.stage-env header {
  border-bottom-color: #6b4e1a;
  background: linear-gradient(180deg, #121a24, #0f1520);
}
body.stage-env #camera-wrap::before {
  content: "";
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  box-shadow: inset 0 0 0 3px rgba(246, 183, 60, 0.45);
}

header {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 10px 12px 10px 10px; border-bottom: 1px solid #21344a;
}
.menu-btn {
  flex: 0 0 auto;
  width: 40px; height: 40px; padding: 0; margin: 0;
  border: 1px solid #2a4258; border-radius: 10px;
  background: #152433; color: var(--ink);
  font-size: 20px; line-height: 1; cursor: pointer;
}
.menu-btn:active { background: #1c3044; }

.app-menu { position: fixed; inset: 0; z-index: 200; }
.app-menu[hidden] { display: none; }
.menu-scrim {
  position: absolute; inset: 0; border: 0; padding: 0; margin: 0;
  background: rgba(0, 0, 0, 0.55); cursor: pointer;
}
.menu-panel {
  position: absolute; top: 0; left: 0; bottom: 0; width: min(88vw, 320px);
  background: var(--panel); border-right: 1px solid #21344a;
  padding: 14px 16px 20px; overflow-y: auto;
  box-shadow: 8px 0 24px rgba(0, 0, 0, 0.35);
}
.menu-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.menu-head h2 { margin: 0; font-size: 18px; }
.menu-close {
  width: 36px; height: 36px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); font-size: 24px; cursor: pointer;
}
.menu-status {
  font-size: 13px; line-height: 1.45; color: var(--muted);
  margin: 0 0 14px; padding: 10px 12px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid #21344a;
}
.menu-token-wrap {
  display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px;
}
.menu-token-wrap[hidden] { display: none; }
.menu-token-label { font-size: 12px; color: var(--muted); }
.menu-token-input {
  width: 100%; box-sizing: border-box; padding: 12px 14px;
  border: 1px solid #2a4258; border-radius: 10px;
  background: #0f1a26; color: var(--ink); font-size: 15px;
}
.menu-actions { display: flex; flex-direction: column; gap: 8px; }
.menu-item {
  width: 100%; text-align: left; padding: 12px 14px;
  border: 1px solid #2a4258; border-radius: 10px;
  background: #152433; color: var(--ink); font-size: 15px; cursor: pointer;
}
.menu-item:active { background: #1c3044; }
.menu-item-warn { border-color: rgba(224, 80, 107, 0.45); color: #ffb4c4; }
.menu-health {
  margin: 12px 0 0; font-size: 12px; line-height: 1.4; color: var(--muted);
  padding: 10px 12px; border-radius: 8px; background: rgba(0, 0, 0, 0.2);
}
.menu-health[hidden] { display: none; }
.menu-health.ok { color: #9ee6b8; }
.menu-health.err { color: #ffb4c4; }

.menu-subview { margin-top: 4px; }
.menu-back {
  display: inline-block; margin: 0 0 12px; padding: 0;
  border: 0; background: none; color: var(--accent);
  font-size: 14px; cursor: pointer;
}
.about-brand {
  display: flex; justify-content: center; margin: 4px 0 14px;
}
.about-logo {
  width: 96px; height: 96px; border-radius: 22px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.about-title { margin: 0 0 8px; font-size: 18px; text-align: center; }
.about-version {
  margin: 0 0 6px; font-size: 15px; font-weight: 700; color: var(--ink);
}
.about-meta {
  margin: 0 0 14px; font-size: 12px; line-height: 1.45; color: var(--muted);
}
.about-body { font-size: 13px; line-height: 1.5; color: var(--ink); }
.about-body p { margin: 0 0 12px; }
.about-body a { color: var(--accent); }
.about-muted { color: var(--muted); font-size: 12px; }

h1 { font-size: 16px; margin: 0; white-space: nowrap; flex: 1 1 auto; min-width: 0; }
.app-title {
  display: flex; align-items: center; gap: 8px; margin: 0;
  font-size: 16px; font-weight: 700; min-width: 0;
}
.app-logo {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 7px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.meta { font-size: 12px; color: var(--muted); text-align: right; flex: 0 1 42%; }

main { flex: 1 1 auto; position: relative; min-height: 0; }

/* ---- Camera view (fills main) ---- */
#camera-wrap { position: absolute; inset: 0; overflow: hidden; background: #000; }
#video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Targeting overlay */
#overlay { position: absolute; inset: 0; pointer-events: none; }
#reticle {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(70vw, 60vh); height: min(70vw, 60vh);
  opacity: 0.35; transition: opacity 0.2s;
}
#reticle .brackets path, #reticle .cross line {
  fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round;
}
#reticle .cross circle { fill: var(--ink); stroke: none; }
#reticle .cross { transition: transform 0.1s linear; }  /* drifts to target */
#overlay.targeting #reticle { opacity: 0.9; }
#overlay.targeting #reticle .brackets path,
#overlay.targeting #reticle .cross line { stroke: var(--accent); }
#overlay.targeting #reticle .cross circle { fill: var(--accent); }
#overlay.aligned #reticle .brackets path,
#overlay.aligned #reticle .cross line { stroke: var(--ok); }
#overlay.aligned #reticle .cross circle { fill: var(--ok); }

#align-hint {
  position: absolute; top: 56px; left: 50%; transform: translateX(-50%);
  background: rgba(7,18,30,0.78); color: var(--ink); font-size: 13px;
  font-weight: 600; padding: 6px 12px; border-radius: 999px; white-space: nowrap;
}
#overlay.aligned #align-hint { color: var(--ok); }

/* Chips over the preview */
.chip {
  position: absolute; z-index: 3; font-size: 13px; font-weight: 600;
  padding: 8px 12px; border-radius: 999px; border: 1px solid #2a405a;
  background: rgba(11,22,34,0.7); color: var(--ink); cursor: pointer;
  backdrop-filter: blur(6px);
}
.chip-tl { top: 12px; left: 12px; }
.chip-tr { top: 12px; right: 12px; }

#status {
  position: absolute; z-index: 5; bottom: 108px; left: 50%;
  transform: translateX(-50%); margin: 0; max-width: 88%;
  background: rgba(11,22,34,0.9); color: var(--warn); font-size: 13px;
  padding: 6px 12px; border-radius: 10px; text-align: center;
}
#status.toast {
  color: var(--ink);
  border: 1px solid #2a405a;
  box-shadow: 0 4px 16px rgba(0,0,0,0.45);
}
#status.toast-error {
  color: #ffb4c4;
  border-color: rgba(224, 80, 107, 0.5);
  max-width: 92%;
  font-size: 12px;
  line-height: 1.35;
  white-space: pre-line;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}
#status:empty { display: none; }
/* In landscape the controls dock right, so keep the toast clear of them. */
@media (orientation: landscape) {
  #status { bottom: 16px; left: calc(50% - 55px); }
}

/* ---- Bottom bar (portrait): thumbs · shutter · classify ---- */
#bottom-bar {
  position: absolute; z-index: 4; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: 1fr auto auto 1fr; align-items: center;
  gap: 8px; padding: 16px 18px calc(18px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(7,14,22,0.85), rgba(7,14,22,0));
}
.tray-left {
  display: flex; align-items: center; gap: 8px; justify-self: start;
  min-width: 0; max-width: 100%; overflow-x: auto;
}
#thumbs { display: flex; gap: 6px; flex: none; }
.gallery-btn {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid #2a405a; background: rgba(11,22,34,0.7); color: var(--ink);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  backdrop-filter: blur(6px); padding: 0;
}
.gallery-btn:active { transform: scale(0.92); }
.gallery-btn:disabled { opacity: 0.4; cursor: default; }

.clear-btn {
  flex: none;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #2a405a;
  background: rgba(11,22,34,0.7);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.clear-btn:active { transform: scale(0.95); }
.clear-btn:disabled { opacity: 0.4; cursor: default; }
.thumb { position: relative; width: 52px; height: 52px; cursor: pointer; }
.thumb img { width: 52px; height: 52px; object-fit: cover; border-radius: 7px;
  border: 1px solid #2a405a; display: block; }
.thumb .needle {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  overflow: visible;
}
.thumb .needle-svg {
  width: 88%; height: 96%;
  overflow: visible;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.9));
}
.thumb .needle-north {
  stroke: #0a0a0a;
  stroke-width: 1.1;
  stroke-linejoin: round;
}
.thumb .needle-outline {
  fill: none;
  stroke: #0a0a0a;
  stroke-width: 2.4;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.thumb .needle-axis {
  stroke: #0a0a0a;
  stroke-width: 2;
  stroke-linecap: round;
}
.thumb.unmasked img { opacity: 0.92; }
.thumb.unmasked .needle { display: none; }
.thumb .del {
  position: absolute; top: -6px; right: -6px; width: 18px; height: 18px;
  border-radius: 50%; border: none; background: var(--danger); color: #fff;
  font-size: 12px; line-height: 18px; text-align: center; padding: 0;
  cursor: pointer; font-weight: 700; z-index: 3;
}
.thumb .num {
  position: absolute; bottom: 1px; left: 2px; font-size: 9px; font-weight: 700;
  color: #fff; text-shadow: 0 1px 2px #000; z-index: 2;
}

.shutter {
  justify-self: center; width: 74px; height: 74px; border-radius: 50%;
  border: 4px solid #fff; background: rgba(255,255,255,0.92);
  display: flex; align-items: center; justify-content: center; padding: 0;
  cursor: pointer; transition: transform 0.08s, border-color 0.15s, background 0.15s;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.shutter:active:not(.waiting) { transform: scale(0.92); }
.shutter:disabled { opacity: 0.45; }
.shutter.waiting {
  border-color: var(--warn);
  background: rgba(11, 22, 34, 0.88);
}
.shutter.waiting.skip-flash {
  border-color: var(--ok);
  background: rgba(56, 193, 114, 0.25);
}
#shutter-inner {
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; color: #0b1622;
}
#shutter-inner.wait-mode {
  flex-direction: column; gap: 2px; color: var(--ink);
}
.wait-num { font-size: 28px; font-weight: 800; line-height: 1; color: #fff; }
.wait-hint {
  font-size: 7px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--warn); text-align: center;
  line-height: 1.15; max-width: 58px;
}

.go-col {
  justify-self: end; display: flex; flex-direction: column; align-items: stretch;
  gap: 6px; min-width: 0;
}
.note-input {
  font-size: 12px; padding: 7px 10px; border-radius: 8px;
  border: 1px solid #2a405a; background: rgba(11,22,34,0.85); color: var(--ink);
  width: 130px;
}
.note-input::placeholder { color: var(--muted); }
.go {
  font-size: 15px; font-weight: 700; padding: 11px 16px;
  border-radius: 10px; border: none; background: var(--accent); color: #07121e;
  cursor: pointer;
}
.go:disabled { opacity: 0.4; }

/* ---- Landscape: dock the controls on the right as a vertical bar ---- */
@media (orientation: landscape) {
  #bottom-bar {
    left: auto; top: 0; bottom: 0; right: 0; width: 110px;
    grid-template-columns: none; grid-auto-rows: max-content;
    justify-items: center; align-content: center; gap: 14px;
    padding: 14px 12px;
    background: linear-gradient(to left, rgba(7,14,22,0.85), rgba(7,14,22,0));
  }
  .tray-left { justify-self: center; flex-direction: column; order: -1; }
  #thumbs { flex-direction: column; }
  .shutter { order: 0; }
  #gallery-btn { order: 1; }
  .go-col { justify-self: center; }
  .note-input { width: 90px; }
  #reticle { width: min(55vh, 50vw); height: min(55vh, 50vw); }
  .chip-tr { right: 124px; }
}

/* ---- Result bottom sheet ---- */
.sheet {
  position: fixed; z-index: 10; left: 0; right: 0; bottom: 0;
  max-height: 85vh; overflow: auto;
  background: var(--panel); border-top: 1px solid #2a405a;
  border-radius: 16px 16px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 30px rgba(0,0,0,0.45);
}
.sheet-close {
  position: absolute; top: 10px; right: 12px; width: 30px; height: 30px;
  border-radius: 50%; border: 1px solid #2a405a; background: var(--bg);
  color: var(--ink); font-size: 18px; line-height: 1; cursor: pointer; padding: 0;
}
#verdict { font-size: 22px; font-weight: 700; margin: 4px 40px 10px 0; }
#verdict .cover { color: var(--accent); }
#verdict .sub { display: block; font-size: 13px; color: var(--muted);
  font-weight: 400; margin-top: 4px; }

.metar-panel {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 13px;
  line-height: 1.4;
}
.metar-panel.metar-ok { border-color: rgba(90, 200, 120, 0.35); }
.metar-panel.metar-warn { border-color: rgba(255, 180, 80, 0.4); }
.metar-title { font-weight: 600; margin-bottom: 4px; color: var(--text); }
.metar-line { color: var(--muted); }
.metar-agree { margin-top: 4px; }

.prob-bar {
  display: flex; height: 10px; border-radius: 5px; overflow: hidden;
  margin: 10px 0 6px; gap: 2px;
}
.prob-seg { min-width: 4px; opacity: 0.55; transition: opacity 0.15s; }
.prob-seg.active { opacity: 1; }

.prob-legend {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  align-items: center;
}
.prob-legend-title {
  width: 100%;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: -2px;
}
.prob-legend-item {
  display: flex; align-items: center; gap: 8px;
}
.prob-legend-swatch {
  width: 12px; height: 12px; border-radius: 3px;
  border: 1px solid rgba(255,255,255,0.12);
}

#per-frame { margin: 8px 0 4px; }
.frame-row {
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid #21344a;
  cursor: pointer;
}
.frame-row:last-child { border-bottom: none; }
.frame-row-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.frame-num { color: var(--muted); font-weight: 700; flex: 0 0 auto; }
.frame-cover { font-weight: 600; color: var(--accent); text-transform: capitalize; }
.frame-row-detail {
  margin: 4px 0 0 28px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
}

/* ---- Large frame preview (tap a thumbnail / per-frame row) ---- */
.frame-preview {
  z-index: 20;
  max-height: 90vh;
}
.frame-preview .sheet-close,
.frame-preview .preview-delete {
  z-index: 5;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}
.preview-delete {
  position: absolute; top: 10px; left: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid #2a405a; background: var(--panel);
  color: var(--ink); cursor: pointer; padding: 0;
  display: none;
  align-items: center; justify-content: center;
}
.preview-delete:not([hidden]) { display: flex; }
.preview-delete:active { transform: scale(0.95); }
.frame-preview-image-wrap {
  position: relative;
  width: 100%;
  margin-top: 44px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #21344a;
  background: #000;
}
.frame-preview-image-wrap img {
  width: 100%;
  max-height: 55vh;
  object-fit: contain;
  display: block;
  user-select: none;
  touch-action: none;
}
.hold-hint {
  position: absolute;
  top: 10px; left: 50%;
  transform: translateX(-50%);
  background: rgba(11,22,34,0.85);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #21344a;
  pointer-events: none;
}
.frame-preview-meta {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}
.ghost { background: var(--bg); color: var(--ink); border: 1px solid #2a405a;
  border-radius: 8px; cursor: pointer; }
button.small { font-size: 13px; padding: 8px 12px; font-weight: 600; }
pre { font-size: 11px; color: var(--muted); white-space: pre-wrap;
  word-break: break-word; margin: 10px 0 0; }

/* ---- Orientation viewer (debug compass sphere) ---- */
body.orient-open #camera-wrap { visibility: hidden; }

.orient-view {
  position: fixed; z-index: 150; inset: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
  overflow: hidden;
}
.orient-view[hidden] { display: none; }
.orient-close {
  position: absolute; top: calc(10px + env(safe-area-inset-top)); right: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid #2a405a; background: var(--panel);
  color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; padding: 0;
  z-index: 2;
}
.orient-title {
  margin: calc(4px + env(safe-area-inset-top)) 40px 4px 0;
  font-size: 20px; font-weight: 700;
}
.orient-hint {
  margin: 0 0 10px; font-size: 13px; line-height: 1.4; color: var(--muted);
}
.orient-model-wrap {
  flex: 1 1 auto; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 35%, #1a2d42 0%, #0b1622 70%);
  border: 1px solid #21344a;
}
.orient-model-wrap model-viewer {
  width: 100%; height: 100%; min-height: 220px;
  --poster-color: transparent;
}
.orient-readout {
  flex: 0 0 auto; margin: 12px 0 6px; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px;
}
.orient-readout .orient-span2 { grid-column: 1 / -1; }
.orient-readout .orient-span2 dd {
  font-size: 13px; font-weight: 600; color: var(--ink);
  word-break: break-all;
}
.orient-readout div {
  margin: 0; padding: 8px 10px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid #21344a;
}
.orient-mock-cell {
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.15s, background 0.15s;
}
.orient-mock-cell:active { background: rgba(78, 161, 255, 0.12); }
.orient-mock-cell.mock-active {
  border-color: rgba(78, 161, 255, 0.55);
  background: rgba(78, 161, 255, 0.08);
}
.mock-tag {
  font-size: 9px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--muted); margin-left: 4px;
}
.orient-mock-cell.mock-active .mock-tag { color: var(--accent); }
.orient-actions {
  flex: 0 0 auto;
  display: flex; justify-content: center;
  margin: 0 0 4px;
}
.orient-actions button[hidden] { display: none; }
.orient-readout dt {
  margin: 0 0 2px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted);
}
.orient-readout dd {
  margin: 0; font-size: 17px; font-weight: 700;
  font-variant-numeric: tabular-nums; color: var(--accent);
}
.orient-status {
  flex: 0 0 auto; margin: 0; font-size: 12px; line-height: 1.4;
  color: var(--muted); text-align: center;
}

.rating-panel {
  margin: 14px 0; padding: 12px; border-radius: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
}
.rating-label { font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--ink); }
.rating-stars { display: flex; gap: 6px; margin-bottom: 8px; }
.star {
  flex: 1; padding: 9px 0; border-radius: 8px; border: 1px solid #2a405a;
  background: var(--bg); color: var(--muted); font-size: 14px; font-weight: 700;
  cursor: pointer;
}
.star.selected { color: #0b1622; border-color: transparent; }
.star-1.selected { background: var(--danger); }
.star-2.selected { background: #d98a55; }
.star-3.selected { background: var(--muted); }
.star-4.selected { background: #8fd08a; }
.star-5.selected { background: var(--ok); }
.rating-comment {
  width: 100%; min-height: 52px; resize: vertical; font: inherit; font-size: 13px;
  padding: 8px 10px; border-radius: 8px; border: 1px solid #2a405a;
  background: rgba(11,22,34,0.85); color: var(--ink); margin-bottom: 8px;
  box-sizing: border-box;
}
.rating-comment::placeholder { color: var(--muted); }
.rating-submit {
  font-size: 14px; font-weight: 700; padding: 10px 14px; width: 100%;
  border-radius: 8px; border: none; background: var(--accent); color: #07121e;
  cursor: pointer;
}
.rating-submit:disabled { opacity: 0.4; cursor: default; }
.rating-status { margin: 8px 0 0; font-size: 12px; }
.rating-status.ok { color: var(--ok); }
.rating-status.err { color: var(--danger); }
