/* RK2026 – Zeitversatz · Design-System
   AV-Regie-Instrument: dunkles Graphit, Hamburg = Referenz (Amber-Anker),
   weitere Standorte mit eigener Farbe, Versatz strikt Grün (vor) / Rot (nach).
   Space Grotesk (UI) + IBM Plex Mono (alle Zeit-/Zahlenwerte). */

:root {
  --bg: #0e1217;
  --bg-grain: #0b0f14;
  --panel: #151b24;
  --panel-2: #1a2230;
  --panel-3: #212c3b;
  --line: #2a3543;
  --line-soft: #1e2733;

  --ink: #eef3f9;
  --ink-dim: #9fb0c2;
  --ink-mute: #647387;
  --ink-faint: #4c5a6b;

  --ref: #ff9e2c;          /* Referenz (Hamburg) */
  --ref-soft: #573913;
  --ref-glow: #ff9e2c26;

  --pos: #2fd07a;          /* Standort vor Referenz (+) */
  --neg: #ff5468;          /* Standort nach Referenz (−) */

  --radius: 16px;
  --radius-sm: 11px;
  --radius-lg: 22px;

  --shadow: 0 18px 40px -22px #000000cc;
  --maxw: 560px;

  --font-ui: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* schlägt Klassen-display (z. B. .modal-back, .linklike) */
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  background: radial-gradient(120% 80% at 50% -10%, #18222f 0%, var(--bg) 46%, var(--bg-grain) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
  min-height: 100dvh;
}
button, input, select { font-family: inherit; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 18px 16px calc(30px + env(safe-area-inset-bottom)); }

/* ── Kopf ─────────────────────────────────────────────────────────────────── */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.brand { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.brand .mark { font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-mute); font-weight: 600; }
.brand .route { font-family: var(--font-mono); font-size: 13.5px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand .route i { color: var(--ref); font-style: normal; font-weight: 500; }
.brand .route b { color: var(--ink); font-weight: 500; }
.topright { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.adminlink { font-size: 12px; color: var(--ink-dim); text-decoration: none; border: 1px solid var(--line); padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.adminlink:active { background: var(--panel-2); }

.live { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mute); padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; }
.live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-mute); }
.live.on { color: var(--pos); border-color: #2fd07a44; }
.live.on .dot { background: var(--pos); animation: pulse 2.4s ease-in-out infinite; }
.live.off { color: var(--neg); border-color: #ff546840; }
.live.off .dot { background: var(--neg); }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 #2fd07a55; } 50% { box-shadow: 0 0 0 6px #2fd07a00; } }

/* Status-Punkt (Dashboard) */
.dotwrap { position: relative; flex-shrink: 0; }
.statusdot { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); display: grid; place-items: center; cursor: pointer; }
.statusdot .d { width: 12px; height: 12px; border-radius: 50%; background: var(--ink-mute); }
.statusdot.on { border-color: #2fd07a55; }
.statusdot.on .d { background: var(--pos); box-shadow: 0 0 12px var(--pos); animation: pulse 2.4s ease-in-out infinite; }
.statusdot.off .d { background: var(--neg); }
.statuspop { position: absolute; right: 0; top: 46px; z-index: 30; background: var(--panel-3); border: 1px solid var(--line); border-radius: 12px; padding: 10px 13px; font-size: 12.5px; color: var(--ink); white-space: nowrap; box-shadow: var(--shadow); }

/* ── Tage ─────────────────────────────────────────────────────────────────── */
.days { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 5px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); margin-bottom: 16px; }
.day-btn { border: 1px solid transparent; background: transparent; color: var(--ink-dim); border-radius: 11px; padding: 10px 4px; font-weight: 600; font-size: 15px; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.day-btn .d-sub { display: block; font-size: 10.5px; color: var(--ink-mute); font-family: var(--font-mono); margin-top: 1px; }
.day-btn[aria-pressed='true'] { background: var(--panel-3); color: var(--ink); border-color: var(--line); }
.day-btn:active { transform: translateY(1px); }

/* ── Karte ────────────────────────────────────────────────────────────────── */
.card { position: relative; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 16px 16px; box-shadow: var(--shadow); overflow: hidden; }
.card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--ref), #3d8bff); opacity: .85; }
.eyebrow { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); font-weight: 600; }
.eyebrow .pos-num { font-family: var(--font-mono); color: var(--ink-dim); }
.chip { margin-left: auto; font-size: 10.5px; letter-spacing: 0.1em; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-dim); }
.chip.run { color: #3d8bff; border-color: #3d8bff55; background: #3d8bff1f; }
.sched { font-family: var(--font-mono); font-size: 29px; font-weight: 600; margin: 10px 0 2px; font-variant-numeric: tabular-nums; }
.ptitle { font-size: clamp(18px, 5vw, 22px); font-weight: 600; line-height: 1.25; margin: 0 0 16px; text-wrap: balance; }

/* Versatz-Wert (überall) */
.delta { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; color: var(--ink-mute); }
.delta.pos { color: var(--pos); }
.delta.neg { color: var(--neg); }
.delta.zero { color: var(--ink-dim); }
.delta.idle { color: var(--ink-faint); }

/* Referenz-Band */
.refslot { margin-bottom: 10px; }
.refband { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; border: 1px dashed var(--line); border-radius: var(--radius); padding: 13px 15px; background: #ff9e2c0a; }
.refband .reftag { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ref); font-weight: 600; }
.refband .refname { grid-column: 2; font-weight: 600; font-size: 15px; }
.refband .refname em { font-style: normal; font-family: var(--font-mono); color: var(--ref); font-size: 13px; margin-left: 4px; }
.refband .refstatus { grid-column: 3; font-family: var(--font-mono); font-size: 13px; color: var(--ink-dim); justify-self: end; }
.refband.marked { border-style: solid; border-color: var(--ref-soft); }
.refband.tappable { cursor: pointer; }
.refband.tappable:active { transform: scale(.99); }
.mini-edit { grid-column: 3; justify-self: end; background: none; border: 1px solid var(--line); color: var(--ink-dim); border-radius: 8px; width: 30px; height: 28px; cursor: pointer; }

/* Großer Mess-Button */
.bigloc { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; border: 1.5px solid var(--line); background: var(--panel); color: var(--ink); border-radius: var(--radius); padding: 15px 15px; cursor: pointer; text-align: left; margin-bottom: 9px; transition: transform .08s, border-color .15s, box-shadow .2s, background .15s; }
.bigloc:active { transform: scale(.985); }
.bigloc .bdot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--c, var(--ink-mute)); }
.bigloc .blab { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.bigloc .bshort { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--c, var(--ink)); font-weight: 600; }
.bigloc .bname { font-size: 13px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bigloc .bhint { font-size: 12px; color: var(--ink-mute); text-align: right; line-height: 1.2; }
.bigloc .bstamp { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 20px; font-weight: 600; }
.bigloc .bchip { font-size: 13px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; }
.bigloc .b-edit { background: none; border: 1px solid var(--line); color: var(--ink-dim); border-radius: 8px; width: 32px; height: 30px; cursor: pointer; font-size: 13px; }
.bigloc.set { border-color: color-mix(in srgb, var(--c) 60%, var(--line)); background: linear-gradient(color-mix(in srgb, var(--c) 9%, transparent), transparent), var(--panel); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 22%, transparent), 0 10px 24px -16px var(--c); }
.bigloc.set .bdot { background: var(--c); }
.bigloc.flash { animation: lockin .5s ease; }
@keyframes lockin { 0% { box-shadow: 0 0 0 0 var(--c); } 30% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 30%, transparent); } 100% { box-shadow: 0 0 0 1px transparent; } }

/* Weitere (nur-lese) Standorte */
.otherhead { font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-mute); font-weight: 600; margin: 14px 2px 7px; }
.rolist { display: flex; flex-direction: column; gap: 5px; }
.roloc { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px 13px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); }
.roloc .rodot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--ink-mute)); }
.roloc .roname { font-size: 13px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roloc .roname b { font-family: var(--font-mono); color: var(--ink); font-weight: 600; }
.roloc .delta { font-size: 16px; }

/* Steuerung */
.controls { display: flex; gap: 8px; margin-top: 15px; }
.btn { cursor: pointer; border: 1px solid var(--line); background: var(--panel); color: var(--ink-dim); border-radius: var(--radius-sm); padding: 13px 12px; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: background .15s, color .15s, border-color .15s, transform .08s; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn .ic { font-family: var(--font-mono); font-size: 15px; }
.btn.ghost { flex: 1; }
.btn.next { flex: 1.4; background: linear-gradient(180deg, #243246, var(--panel-3)); color: var(--ink); }
.btn.danger { color: var(--neg); border-color: #ff546833; }
.btn.danger:active { background: #ff54680f; }

/* ── Zeitleiste ───────────────────────────────────────────────────────────── */
.tl-head { display: flex; align-items: center; justify-content: space-between; margin: 22px 2px 9px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-mute); font-weight: 600; }
.tl { display: flex; flex-direction: column; gap: 5px; }
.row { display: flex; align-items: center; gap: 10px; width: 100%; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 10px 12px; cursor: pointer; text-align: left; color: var(--ink-dim); transition: border-color .15s, background .15s; }
.row:active { background: var(--panel-2); }
.row .st { width: 16px; text-align: center; font-family: var(--font-mono); font-size: 14px; flex-shrink: 0; }
.row .num { font-family: var(--font-mono); font-size: 12px; color: var(--ink-mute); width: 20px; flex-shrink: 0; }
.row .rtime { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-mute); width: 42px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.row .rtitle { flex: 1; min-width: 0; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .tdots { display: inline-flex; gap: 3px; flex-shrink: 0; }
.row .tdots .tdot { width: 7px; height: 7px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--c) 50%, var(--line)); }
.row .tdots .tdot.on { background: var(--c); border-color: var(--c); }
.row .roff { font-family: var(--font-mono); font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--ink-mute); flex-shrink: 0; min-width: 40px; text-align: right; }
.row .roff.pos { color: var(--pos); }
.row .roff.neg { color: var(--neg); }
.row.done .st { color: var(--pos); }
.row.open { opacity: .6; }
.row.open .st { color: var(--ink-mute); }
.row.running { border-color: #3d8bff55; background: linear-gradient(90deg, #3d8bff14, transparent 60%), var(--panel-2); color: var(--ink); }
.row.running .st { color: #3d8bff; }
.row.running .rtitle { color: var(--ink); }

/* ── Fuß ──────────────────────────────────────────────────────────────────── */
.foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.linklike { background: none; border: none; cursor: pointer; color: var(--ink-mute); font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; padding: 6px 2px; }
.linklike.danger { color: var(--neg); opacity: .85; }
.linklike:active { opacity: .6; }

/* ── Editor-Modal ─────────────────────────────────────────────────────────── */
.modal-back { position: fixed; inset: 0; z-index: 60; background: #060a0fcc; backdrop-filter: blur(2px); display: flex; align-items: flex-end; justify-content: center; padding: 0; }
.modal { width: 100%; max-width: var(--maxw); background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: 22px 22px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); box-shadow: var(--shadow); }
.m-eyebrow { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-mute); font-weight: 600; }
.m-title { font-size: 16px; font-weight: 600; margin: 3px 0 14px; color: var(--ink-dim); }
.ed-time { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 46px; font-weight: 600; text-align: center; letter-spacing: 0.02em; }
.ed-prev { text-align: center; font-size: 13px; color: var(--ink-mute); margin: 4px 0 14px; }
.ed-prev .delta { font-size: 15px; margin-left: 4px; }
.nudge { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 8px 0 16px; }
.nbtn { padding: 13px 2px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 10px; font-family: var(--font-mono); font-size: 13px; font-weight: 600; cursor: pointer; }
.nbtn:active { transform: translateY(1px); background: var(--panel-3); }
.ed-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.ed-field > span { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-mute); font-weight: 600; }
.ed-field input, .ed-field select { background: var(--bg); color: var(--ink); border: 1.5px solid var(--line); border-radius: 11px; padding: 13px 13px; font-size: 16px; font-family: var(--font-mono); }
.ed-field input[type='time'] { font-size: 22px; text-align: center; }
.ed-field select { font-family: var(--font-ui); }
.ed-field input:focus, .ed-field select:focus { outline: none; border-color: var(--ref); }
.ed-actions { display: flex; gap: 8px; }
.ed-actions .btn { flex: 1; }

/* ── Toast ────────────────────────────────────────────────────────────────── */
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--panel-3); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 11px 16px; font-size: 13.5px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .22s, transform .22s; z-index: 80; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .em { color: var(--pos); font-family: var(--font-mono); }

/* ── Login ────────────────────────────────────────────────────────────────── */
.login-wrap { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 360px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px 24px 24px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.login-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--ref), #3d8bff); }
.login-card .mark { font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-mute); font-weight: 600; }
.login-card h1 { font-size: 22px; margin: 6px 0 4px; font-weight: 600; }
.login-card .sub { color: var(--ink-mute); font-size: 13.5px; margin-bottom: 22px; }
.field { margin-bottom: 12px; }
.field input { width: 100%; background: var(--bg); color: var(--ink); border: 1.5px solid var(--line); border-radius: 12px; padding: 15px 14px; font-size: 16px; font-family: var(--font-mono); }
.field input:focus { outline: none; border-color: #3d8bff; }
.field input::placeholder { color: var(--ink-mute); font-family: var(--font-ui); }
.submit { width: 100%; cursor: pointer; border: none; background: linear-gradient(180deg, #3d8bff, #2f73da); color: #fff; font-weight: 600; font-size: 15px; border-radius: 12px; padding: 15px; margin-top: 6px; }
.submit:active { transform: translateY(1px); }
.submit[disabled] { opacity: .6; pointer-events: none; }
.err { color: var(--neg); font-size: 13px; min-height: 18px; margin-top: 10px; text-align: center; }

/* ── Dashboard ────────────────────────────────────────────────────────────── */
.page-dashboard { --maxw: 640px; }
.dash { display: flex; flex-direction: column; }
.dash .status-eyebrow { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-mute); font-weight: 600; }
.dash .cur-point { font-size: clamp(22px, 6vw, 30px); font-weight: 600; line-height: 1.2; margin: 4px 0 4px; text-wrap: balance; }
.dash .cur-meta { font-family: var(--font-mono); font-size: 13px; color: var(--ink-mute); }

.page-dashboard .refband { margin: 20px 0 12px; padding: 15px 17px; }
.page-dashboard .refband .refname { font-size: 17px; }
.loclist { display: flex; flex-direction: column; gap: 8px; }
.locrow { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 17px; }
.locrow .locdot { width: 13px; height: 13px; border-radius: 50%; background: var(--c); box-shadow: 0 0 14px var(--c); }
.locrow .locid { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.locrow .locshort { font-family: var(--font-mono); font-weight: 600; font-size: 15px; color: var(--c); letter-spacing: .02em; }
.locrow .locname { font-size: 13px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.locrow .locval { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.locrow .locval .delta { font-size: 30px; line-height: 1; }
.locrow .locsub { font-size: 11px; color: var(--ink-mute); }
.loclist.single .locrow { padding: 22px 20px; }
.loclist.single .locval .delta { font-size: clamp(40px, 13vw, 60px); }
.locrow.live { border-color: color-mix(in srgb, var(--c) 35%, var(--line)); }
.locrow.live .locdot { animation: pulse2 1.6s ease-in-out infinite; }
@keyframes pulse2 { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

.dash-foot { margin-top: 26px; text-align: center; font-size: 11.5px; color: var(--ink-faint); }
.dash-foot .pos { color: var(--pos); } .dash-foot .neg { color: var(--neg); }
.dash-empty { color: var(--ink-mute); font-size: 13.5px; padding: 10px 2px; }

/* ── Admin ────────────────────────────────────────────────────────────────── */
.adminbody { display: flex; flex-direction: column; gap: 26px; }
.asec h2 { font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim); font-weight: 600; margin: 0 2px 11px; }
.alist { display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px; }
.aitem { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.aitem.open { border-color: var(--line); }
.aitem-main { width: 100%; display: flex; align-items: center; gap: 11px; padding: 14px 15px; background: none; border: none; cursor: pointer; text-align: left; color: var(--ink); }
.aitem-main .locdot { width: 11px; height: 11px; border-radius: 50%; background: var(--c); flex-shrink: 0; }
.aitem-main .ain { font-size: 14.5px; }
.aitem-main .ain b { font-family: var(--font-mono); font-weight: 600; }
.aitem-main .role { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-dim); margin-left: 4px; }
.aitem-main .role.admin { color: var(--ref); border-color: var(--ref-soft); }
.aitem-main .badge { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.aitem-main .badge.ref { color: var(--ref); border: 1px solid var(--ref-soft); background: var(--ref-glow); }
.aitem-main .allowed { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 38%; }
.aitem-main .chev { margin-left: auto; color: var(--ink-mute); font-size: 12px; flex-shrink: 0; }
.aitem-main .ain + .chev, .aitem-main .badge + .chev { margin-left: auto; }
.aedit { padding: 4px 15px 16px; border-top: 1px solid var(--line-soft); }
.aedit .ed-field { margin-top: 13px; margin-bottom: 0; }
.aedit .btn[data-locref] { margin-top: 13px; }
.aedit-actions { display: flex; gap: 8px; margin-top: 15px; }
.aedit-actions .btn { flex: 1; }
.hintline { font-size: 12.5px; color: var(--ink-mute); margin-top: 12px; }
.aadd { background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); padding: 14px 15px; display: flex; flex-direction: column; gap: 11px; }
.aadd .addrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.aadd input, .aadd select { width: 100%; background: var(--bg); color: var(--ink); border: 1.5px solid var(--line); border-radius: 11px; padding: 12px 12px; font-size: 15px; }
.aadd input:focus, .aadd select:focus { outline: none; border-color: #3d8bff; }
.locchecks { display: flex; flex-direction: column; gap: 7px; margin-top: 7px; }
.chk { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-dim); cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: #3d8bff; }
.chk b { font-family: var(--font-mono); color: var(--ink); }

/* ── PWA Update-Banner ────────────────────────────────────────────────────── */
.pwa-update {
  position: fixed; left: 50%; z-index: 120;
  bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translate(-50%, 24px);
  display: flex; align-items: center; gap: 12px;
  max-width: min(94vw, 460px);
  padding: 10px 12px 10px 16px;
  background: var(--panel-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow);
  opacity: 0; pointer-events: none;
  transition: opacity .24s ease, transform .24s ease;
}
.pwa-update.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.pwa-update-txt { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.pwa-update-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ref); box-shadow: 0 0 0 0 var(--ref-glow); animation: pwa-pulse 1.8s ease-out infinite; flex: none; }
@keyframes pwa-pulse { 0% { box-shadow: 0 0 0 0 #ff9e2c66; } 70% { box-shadow: 0 0 0 9px #ff9e2c00; } 100% { box-shadow: 0 0 0 0 #ff9e2c00; } }
.pwa-update-btn { margin-left: auto; flex: none; cursor: pointer; font-size: 13.5px; font-weight: 600; color: #0e1217; background: var(--ref); border: 0; border-radius: 10px; padding: 9px 14px; }
.pwa-update-btn:active { transform: translateY(1px); }
.pwa-update-x { flex: none; cursor: pointer; background: transparent; border: 0; color: var(--ink-mute); font-size: 15px; line-height: 1; padding: 6px 4px; }
.pwa-update-x:hover { color: var(--ink); }

/* ── A11y / Motion ────────────────────────────────────────────────────────── */
:focus-visible { outline: 2px solid #3d8bff; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
@media (max-width: 360px) { .nudge { grid-template-columns: repeat(3, 1fr); } .sched { font-size: 26px; } }
