:root{--bg:#0b1220;--panel:#0f172a;--border:#1f2937;--txt:#e5e7eb;--muted:#94a3b8;--up:#10b981;--down:#ef4444;--accent:#22d3ee}
    *{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
    html,body{margin:0;padding:0;background:var(--bg);color:var(--txt);font-family:-apple-system,BlinkMacSystemFont,Inter,Segoe UI,Roboto,Helvetica,Arial,sans-serif}
    .wrap{max-width:1480px;margin:0 auto;padding:18px 16px 34px}
    h1{margin:0;font-size:22px}
    .muted{color:var(--muted)}
    .grid{display:grid;gap:14px}
    .cols{grid-template-columns:1fr}
    @media(min-width:1200px){.cols{grid-template-columns:2fr 1fr}}
    .card{background:var(--panel);border:1px solid var(--border);border-radius:18px;padding:14px;box-shadow:0 10px 30px rgba(0,0,0,.25)}
    .tile{background:rgba(255,255,255,.02);border:1px solid var(--border);border-radius:12px;padding:10px;text-align:center}
    .label{font-size:11px;color:var(--muted)}
    .val{font-size:18px;font-weight:700;margin:4px 0}
    .chg{font-size:12px}
    .fine{font-variant-numeric:tabular-nums}
    .row{display:flex;gap:10px;align-items:center;justify-content:space-between;padding:8px 0;border-bottom:1px dashed #1e293b}
    .row:last-child{border-bottom:none}
    .row .left{display:flex;gap:10px;align-items:center}
    .badge{padding:.25rem .6rem;border-radius:.6rem;border:1px solid var(--border);font-size:.75rem;display:inline-block}
    .badge.up{color:var(--up);border-color:rgba(16,185,129,.5);background:rgba(16,185,129,.1)}
    .badge.down{color:var(--down);border-color:rgba(239,68,68,.5);background:rgba(239,68,68,.1)}
    .badge.neutral{color:#cbd5e1;border-color:#334155;background:rgba(148,163,184,.12)}

    .dial{position:relative;width:100%;max-width:360px;aspect-ratio:1/1;margin:0 auto}
    .dial .ring{position:absolute;inset:0;border-radius:999px;border:1px solid var(--border)}
    .dial svg{position:absolute;inset:12px;pointer-events:none}
    .center{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:2px;text-align:center;pointer-events:none}
    .big{font-size:28px;font-weight:700}
    .mid{font-size:16px;font-weight:600}
    .upTxt{color:var(--up)} .downTxt{color:var(--down)}

    .bar{display:flex;gap:10px;align-items:center;justify-content:space-between}
    .tog{display:inline-flex;gap:8px;align-items:center;border:1px solid var(--border);background:rgba(255,255,255,.04);border-radius:999px;padding:6px 10px;font-size:13px}
    .btn{cursor:pointer;user-select:none;border:1px solid var(--border);background:rgba(255,255,255,.04);padding:8px 12px;border-radius:12px}
    .btn:hover{background:rgba(255,255,255,.07)}
    .btn.primary{border-color:#0ea5e9;background:#0ea5e914}
    .status{font-size:12px}
    .status.ok{color:#86efac}
    .status.warn{color:#fde68a}
    .status.err{color:#fca5a5}

    .modal{position:fixed;inset:0;background:rgba(0,0,0,.6);display:none;align-items:center;justify-content:center;padding:20px;z-index:50}
    .modcard{background:var(--panel);border:1px solid var(--border);border-radius:16px;padding:12px;max-width:1200px;width:100%;max-height:90vh;overflow:auto}
    .close{position:sticky;top:0;display:flex;justify-content:flex-end;gap:8px;align-items:center}
    .small{font-size:12px}
    .minibox{min-height:180px;display:flex;align-items:center;justify-content:center}
    .volchart{width:100%;height:120px}
    .legend{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
    .dot{width:10px;height:10px;border-radius:50%}
    .flex{display:flex;gap:10px;align-items:center;flex-wrap:wrap}

    .focus .hideInFocus{display:none}
    .focus .dial{max-width:420px}
    .hint{font-size:11px;color:#9ca3af}

    .tileMinute{padding:6px 6px 8px;border-radius:10px;border:1px solid #263041;background:#0f172a;display:flex;flex-direction:column;gap:4px;align-items:center;justify-content:center}
    .tileMinute .mini{font-size:11px;color:#a3b2c7}
    .tileMinute .pct{font-size:12px;font-weight:700}
    .minuteGrid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:8px}
    @media (max-width: 900px){ .minuteGrid{grid-template-columns:repeat(6,minmax(0,1fr));} }

    /* Calendar tiles clickable fix */
    #kalender_grid .tile{cursor:pointer; user-select:none}
    #kalender_grid .tile.neutral{opacity:.6; filter:saturate(60%)}
    #candles_card{position:relative}

    /* Info bubble */
    .infoBtn{width:22px;height:22px;border-radius:999px;border:1px solid #334155;background:#0b1220;display:inline-flex;align-items:center;justify-content:center;font-weight:700;color:#a5b4fc;cursor:pointer}
    .infoBtn:hover{background:#111827}
  

/* --- v15 header patch (sticky toolbar & mode presets) — bright variant --- */
:root{--hdr-bg:#0b1220;--hdr-border:#334155;--hdr-txt:#e5e7eb;--hdr-dim:#94a3b8;--pill:#1f2937;--pill-active:#0ea5e9;--pill-active-txt:#dbeafe}
.topbar{position:sticky;top:0;z-index:40;background:var(--hdr-bg);padding:10px 12px 8px;margin-bottom:10px;border-bottom:1px dashed var(--hdr-border)}
.topbar .toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.topbar .toolbar .btn{padding:7px 12px;border-radius:10px;border:1px solid var(--hdr-border);background:#111827;color:var(--hdr-txt);font-weight:500}
.topbar .toolbar .btn.primary{background:#0ea5e9;border-color:#38bdf8;color:#07263a}
.topbar .toolbar select{background:#0f172a;border:1px solid var(--hdr-border);color:var(--hdr-txt);padding:7px 10px;border-radius:8px}
.modeBtn{border:1px solid var(--hdr-border);background:var(--pill);color:var(--hdr-txt);padding:7px 12px;border-radius:999px;cursor:pointer;font-size:13px}
.modeBtn:hover{border-color:#60a5fa}
.modeBtn.active{background:rgba(14,165,233,.15);border-color:var(--pill-active);color:var(--pill-active-txt);box-shadow:0 0 0 1px rgba(14,165,233,.35) inset}
#hdr_note{font-size:12px;color:var(--hdr-dim);margin-left:8px}

.topbar{position:sticky;top:0;z-index:40;background:var(--bg);padding:8px 0 6px;margin-bottom:10px;border-bottom:1px dashed #1e293b}
.topbar .toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.topbar .toolbar .btn{padding:6px 10px;border-radius:10px}
.topbar .toolbar select{background:rgba(255,255,255,.04);border:1px solid var(--border);color:var(--txt);padding:6px 8px;border-radius:8px}
.modeBtn{border:1px solid var(--border);background:rgba(255,255,255,.04);padding:6px 10px;border-radius:999px;cursor:pointer;font-size:13px}
.modeBtn.active{background:#0ea5e914;border-color:#0ea5e9;color:#bfdbfe}
#hdr_note{font-size:12px;color:#94a3b8;margin-left:8px}


/* --- v15.9: live second metrics bar --- */
.metricbar{display:flex;gap:10px;flex-wrap:wrap;margin:8px 0 12px}
.metric{background:#0f172a;border:1px solid #334155;border-radius:12px;padding:8px 12px;min-width:170px}
.metric .label{font:600 12px/1.1 system-ui;color:#9fb3c8;margin-bottom:4px;letter-spacing:.2px}
.metric .value{font:700 18px/1.2 system-ui;color:#e5e7eb}
.metric .sub{font:500 11px/1.2 system-ui;color:#93a6b9;margin-top:2px}
.metric .up{color:#10b981}.metric .down{color:#ef4444}


/* Lighter text for Minute Tiles button */
#open_minute_tiles{color: rgba(235,245,255,.85); font-weight:600;}


/* ===== UI POLISH PATCH v50 (buttons + selects) ===== */
.btn{
  color: var(--txt);
  background: rgba(255,255,255,.07);
}
.btn:hover{background: rgba(255,255,255,.10)}
.btn:active{transform: translateY(1px)}

/* Fix invisible <option> text on some browsers (Edge/Chromium) */
select{ color-scheme: dark; }
select option{
  background: #0f172a;
  color: #e5e7eb;
}
/* In case any control inherits muted color inside bars */
.bar label, .bar .small{ color: rgba(235,245,255,0.85); }

/* Make small action buttons ("Ladda om") a touch clearer */
#season_reload, #ga_reload{
  border-color: rgba(120,220,255,0.35);
}
/* ===== END PATCH ===== */


/* Hide legacy floating 6-charts button (unused) */
#sc_open_btn{display:none !important;}


/* ===== GA Lock: keep Green Average stable, hide controls (locked UI) ===== */
.ga-card{
  min-height: 270px;
}
.ga-card .ga-ctrls{ display:none !important; }
.ga-card select, .ga-card button, .ga-card input{ pointer-events:none; }
.ga-card .ga-row{ align-items:flex-start; }

/* Remove legacy floating 6-charts button if present */
#sc_open_btn{ display:none !important; }
/* ===== End GA Lock ===== */


/* ===== Crypto Rotation Engine (v1) ===== */
.rot-card{
  margin: 14px auto 18px auto;
  max-width: 1200px;
  border-radius: 14px;
  padding: 14px 14px 12px 14px;
  background: rgba(18, 22, 30, 0.65);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(6px);
}

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

.rot-title{
  font-size: 14px;
  letter-spacing: 0.2px;
  color: rgba(235,245,255,0.88);
}

.rot-badge{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(235,245,255,0.90);
  white-space: nowrap;
}

.rot-grid{
  display:grid;
  grid-template-columns: 1.05fr 1.2fr 1.2fr;
  gap: 12px;
}

.rot-kpi, .rot-drivers, .rot-bias{
  border-radius: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.rot-kpi-label{
  font-size: 11px;
  color: rgba(235,245,255,0.65);
  margin-bottom: 6px;
}

.rot-kpi-value{
  font-size: 22px;
  font-weight: 700;
  color: rgba(235,245,255,0.92);
  line-height: 1.1;
}

.rot-kpi-sub{
  margin-top: 6px;
  font-size: 11px;
  color: rgba(235,245,255,0.60);
}

.rot-driver-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 6px 0;
  border-top: 1px dashed rgba(255,255,255,0.10);
}
.rot-driver-row:first-of-type{ border-top: 0; padding-top: 0; }

.rot-driver-name{
  font-size: 12px;
  color: rgba(235,245,255,0.82);
}

.rot-driver-val{
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: rgba(235,245,255,0.92);
}

.rot-note{
  margin-top: 8px;
  font-size: 11px;
  color: rgba(235,245,255,0.55);
}

.rot-bias-text{
  font-size: 13px;
  color: rgba(235,245,255,0.92);
  line-height: 1.35;
}

.rot-bias-sub{
  margin-top: 6px;
  font-size: 11px;
  color: rgba(235,245,255,0.55);
}

@media (max-width: 980px){
  .rot-grid{ grid-template-columns: 1fr; }
}
/* ===== End Crypto Rotation Engine ===== */


/* ===== Crypto Rotation Engine (v1.1 UI) ===== */
.rot-card{
  margin: 14px auto 18px auto;
  max-width: 1200px;
  border-radius: 16px;
  padding: 14px 14px 12px 14px;
  background:
    radial-gradient(600px 220px at 25% 0%, rgba(0, 200, 255, 0.10), transparent 60%),
    radial-gradient(520px 220px at 80% 10%, rgba(0, 255, 180, 0.08), transparent 55%),
    rgba(12, 16, 24, 0.60);
  border: 1px solid rgba(120, 220, 255, 0.14);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  backdrop-filter: blur(8px);
}

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

.rot-title{
  font-size: 13px;
  letter-spacing: 0.2px;
  color: rgba(235,245,255,0.90);
}

.rot-badge{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(235,245,255,0.92);
  white-space: nowrap;
}

.rot-badge.rot-btc{
  border-color: rgba(255, 90, 90, 0.28);
  background: rgba(255, 90, 90, 0.10);
}
.rot-badge.rot-large{
  border-color: rgba(120, 220, 255, 0.28);
  background: rgba(120, 220, 255, 0.10);
}
.rot-badge.rot-alt{
  border-color: rgba(0, 255, 180, 0.26);
  background: rgba(0, 255, 180, 0.10);
}
.rot-badge.rot-fragile{
  border-color: rgba(200, 140, 255, 0.30);
  background: rgba(200, 140, 255, 0.10);
}
.rot-badge.rot-neutral{
  border-color: rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
}

.rot-grid{
  display:grid;
  grid-template-columns: 0.9fr 1.1fr 1.2fr;
  gap: 12px;
}

.rot-kpi, .rot-drivers, .rot-donut{
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.08);
}

.rot-kpi-label{
  font-size: 11px;
  color: rgba(235,245,255,0.68);
  margin-bottom: 6px;
}

.rot-kpi-value{
  font-size: 24px;
  font-weight: 750;
  color: rgba(235,245,255,0.94);
  line-height: 1.1;
}

.rot-kpi-sub{
  margin-top: 6px;
  font-size: 11px;
  color: rgba(235,245,255,0.60);
}

.rot-driver-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px dashed rgba(255,255,255,0.10);
}
.rot-driver-row:first-of-type{ border-top: 0; padding-top: 0; }

.rot-driver-name{
  font-size: 12px;
  color: rgba(235,245,255,0.84);
}

.rot-driver-val{
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: rgba(235,245,255,0.94);
}

.rot-note{
  margin-top: 8px;
  font-size: 11px;
  color: rgba(235,245,255,0.58);
}

.rot-bias{
  margin-top: 10px;
  border-radius: 12px;
  padding: 10px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.07);
}

.rot-bias-text{
  font-size: 13px;
  color: rgba(235,245,255,0.93);
  line-height: 1.35;
}

.rot-donut-wrap{
  position: relative;
  height: 150px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin: 4px 0 8px 0;
}

.rot-ring{
  width: 150px;
  height: 150px;
  overflow: visible;
  transform: rotate(-90deg);
}

.rot-ring-track{
  fill: none;
  stroke: rgba(255,255,255,0.08);
  stroke-width: 12;
}

.rot-ring-seg{
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 0 999;
  stroke-dashoffset: 0;
  filter: drop-shadow(0 0 6px rgba(0,0,0,0.35));
}

.rot-seg-btc{ stroke: rgba(255, 90, 90, 0.95); }
.rot-seg-large{ stroke: rgba(120, 220, 255, 0.95); }
.rot-seg-high{ stroke: rgba(0, 255, 180, 0.95); }

.rot-donut-center{
  position:absolute;
  inset: 0;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction: column;
  pointer-events:none;
  transform: translateY(1px);
}

.rot-center-title{
  font-size: 12px;
  color: rgba(235,245,255,0.92);
  font-weight: 650;
}

.rot-center-sub{
  font-size: 11px;
  color: rgba(235,245,255,0.60);
  margin-top: 2px;
}

.rot-legend{
  display:flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}
.rot-legend-row{
  display:grid;
  grid-template-columns: 14px 1fr auto;
  align-items:center;
  gap: 8px;
  font-size: 12px;
  color: rgba(235,245,255,0.85);
}
.rot-legend-val{
  font-variant-numeric: tabular-nums;
  color: rgba(235,245,255,0.92);
}
.rot-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(0,0,0,0.25);
}
.rot-dot-btc{ background: rgba(255, 90, 90, 0.95); }
.rot-dot-large{ background: rgba(120, 220, 255, 0.95); }
.rot-dot-high{ background: rgba(0, 255, 180, 0.95); }

@media (max-width: 980px){
  .rot-grid{ grid-template-columns: 1fr; }
}
/* ===== End Crypto Rotation Engine (v1.1 UI) ===== */


/* ===== Crypto Rotation Engine (v1.2 Analytic UI) ===== */
.rot-card{ margin:14px auto 18px auto; max-width:1200px; border-radius:16px; padding:14px 14px 12px 14px;
  background: rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.10); box-shadow:0 10px 34px rgba(0,0,0,0.35); }
.rot-head-left{ display:flex; align-items:center; gap:10px; }
.rot-head-right{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.rot-meta{ font-size:11px; color: rgba(235,245,255,0.60); }

.rot-info-btn{ width:22px; height:22px; border-radius:999px; border:1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06); color: rgba(235,245,255,0.88); cursor:pointer; display:flex; align-items:center; justify-content:center;
  font-size:12px; line-height:1; }
.rot-info-btn:hover{ background: rgba(255,255,255,0.10); }

.rot-conf{ font-size:12px; padding:6px 10px; border-radius:999px; border:1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06); color: rgba(235,245,255,0.92); white-space:nowrap; }

.rot-grid{ display:grid; grid-template-columns:0.7fr 1.1fr 1.2fr; gap:12px; }
.rot-kpi, .rot-drivers, .rot-ladder{ border-radius:14px; padding:12px; background: rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.08); }

.rot-ladder-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:6px; }
.rot-node{ display:flex; align-items:center; gap:8px; padding:8px 10px; border-radius:999px; border:1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.12); min-width:110px; justify-content:center; }
.rot-node.active{ border-color: rgba(120,220,255,0.26); background: rgba(120,220,255,0.08); box-shadow: 0 0 0 3px rgba(120,220,255,0.08); }
.rot-node-name{ font-size:12px; color: rgba(235,245,255,0.90); }
.rot-node-dot{ width:10px; height:10px; border-radius:999px; }
.rot-arrow{ color: rgba(235,245,255,0.55); font-size:16px; }
.rot-ladder-sub{ margin-top:10px; font-size:12px; color: rgba(235,245,255,0.74); }

.rot-driver-block{ margin-top:10px; padding-top:10px; border-top:1px dashed rgba(255,255,255,0.10); }
.rot-driver-block:first-of-type{ margin-top:0; padding-top:0; border-top:0; }
.rot-driver-top{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:6px; }

.rot-spark{ width:100%; height:46px; border-radius:10px; background: rgba(0,0,0,0.10); border:1px solid rgba(255,255,255,0.06); }

.rot-modal{ position:fixed; inset:0; display:none; z-index:9999; }
.rot-modal.open{ display:block; }
.rot-modal-backdrop{ position:absolute; inset:0; background: rgba(0,0,0,0.55); }
.rot-modal-card{ position:absolute; left:50%; top:50%; transform: translate(-50%,-50%); width:min(620px, calc(100% - 28px));
  border-radius:16px; padding:14px; background: rgba(12, 16, 24, 0.96); border:1px solid rgba(255,255,255,0.10); box-shadow:0 18px 60px rgba(0,0,0,0.55);
  color: rgba(235,245,255,0.92); }
.rot-modal-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; }
.rot-modal-title{ font-size:14px; font-weight:650; }
.rot-modal-close{ width:32px; height:32px; border-radius:10px; border:1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.06); color: rgba(235,245,255,0.92);
  cursor:pointer; font-size:18px; }
.rot-modal-close:hover{ background: rgba(255,255,255,0.10); }
.rot-modal-body p, .rot-modal-body li{ font-size:12px; color: rgba(235,245,255,0.85); line-height:1.45; }
.rot-modal-body ul{ margin:8px 0 8px 18px; }
.rot-modal-note{ margin-top:10px; font-size:11px; color: rgba(235,245,255,0.60); }

@media (max-width: 980px){
  .rot-grid{ grid-template-columns:1fr; }
  .rot-node{ min-width:0; flex:1; }
}
/* ===== End Crypto Rotation Engine (v1.2 Analytic UI) ===== */


/* Rotation KPI enhancements */
.rot-kpi-top{ display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.rot-kpi-scale{ font-size:11px; opacity:0.6; letter-spacing:0.02em; white-space:nowrap; }


.rot-score-legend{
  margin-top:4px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-size:11px;
  opacity:0.75;
}
.rot-score-arrow{
  opacity:0.9;
  letter-spacing:0.03em;
  white-space:nowrap;
}
.rot-score-meta{
  margin-top:6px;
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  opacity:0.90;
}
.rot-score-pill{
  padding:2px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.04);
  font-size:11px;
  letter-spacing:0.04em;
  text-transform:uppercase;
  white-space:nowrap;
}
.rot-score-pill.btc{ background:rgba(255,120,120,0.10); border-color:rgba(255,120,120,0.18); }
.rot-score-pill.alts{ background:rgba(120,255,180,0.10); border-color:rgba(120,255,180,0.18); }
.rot-score-pill.neutral{ background:rgba(255,255,255,0.06); border-color:rgba(255,255,255,0.14); }
.rot-score-interpret{ color:rgba(235,245,255,0.86); }

.rot-kpi-spark{
  display:block;
  width:100%;
  height:auto;
  margin-top:10px;
  border-radius:10px;
  background:rgba(255,255,255,0.03);
}

/* Score sparkline readability (now marker + footer labels) */
.rot-score-spark-wrap{ position: relative; margin-top:10px; }
.rot-score-spark-wrap .rot-kpi-spark{ margin-top:0; }
.rot-spark-x{ margin-top:6px; font-size:11px; opacity:0.55; }
.rot-spark-now{ position:absolute; right:0; top:-2px; font-size:11px; opacity:0.75; }
.rot-kpi-delta{
  margin-top:8px;
  font-size:12px;
  opacity:0.85;
}
.rot-kpi-delta .muted{ opacity:0.7; }
.rot-kpi-delta .pos{ color: rgba(140, 255, 180, 0.95); }
.rot-kpi-delta .neg{ color: rgba(255, 140, 140, 0.95); }

.rot-kpi-backtrack{
  margin-top:8px;
  display:flex;
  gap:8px;
  align-items:flex-start;
  font-size:12px;
  opacity:0.82;
}
.rot-kpi-backtrack-label{
  opacity:0.7;
  white-space:nowrap;
}
.rot-kpi-backtrack-values{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  letter-spacing:0.01em;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  flex:1;
}



/* ===== Minute Clock Modal ===== */
.modal.hidden{ display:none; }
.modal{ position:fixed; inset:0; z-index:9999; }
.modalBackdrop{ position:absolute; inset:0; background:rgba(0,0,0,0.55); backdrop-filter: blur(3px); }
.modalPanel{
  position:relative;
  width:min(900px, calc(100vw - 24px));
  margin: 24px auto;
  background: rgba(15, 24, 44, 0.92);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  padding: 14px 14px 16px 14px;
}
.modalHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 6px 4px 10px 4px;
}
.modalHead .title{ font-size:16px; font-weight:700; letter-spacing:0.01em; }
.modalControls{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:12px 16px;
  padding: 10px 4px 10px 4px;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.modalControls input[type="range"]{ width: 220px; vertical-align: middle; }
.modalBody{ display:flex; justify-content:center; padding-top: 14px; }
#mc_canvas{ width:min(620px, 78vw); height:auto; display:block; }
