/* Passant – Händler-App
   Idee: die Straße am Abend. Kühles Glas und Asphalt als Grund,
   das warme Licht eines Schaufensters als einzige Akzentfarbe. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-standard-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-ext-standard-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --asphalt: #1d2a33;
  --glass: #e6ecee;
  --pane: #ffffff;
  --lamp: #ffb800;
  --lamp-soft: #fff3cf;
  --canal: #2f6f73;
  --brick: #c8413b;
  --mute: #5d6d77;
  --line: #d3dcdf;
  --bg: var(--glass);
  --fg: var(--asphalt);
  --surface: var(--pane);
  --frame: #2a3a45;
  --shadow: 0 1px 0 rgba(29, 42, 51, 0.06);
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --nav-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111a20;
    --fg: #e4ecef;
    --surface: #1a252d;
    --line: #2b3943;
    --mute: #93a4ae;
    --frame: #0b1115;
    --lamp-soft: #3a3214;
    --canal: #5fb3b5;
    --brick: #ef6b62;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--lamp); outline-offset: 2px; }
.icon { width: 22px; height: 22px; flex: none; }
.icon.s { width: 18px; height: 18px; }
.icon.l { width: 28px; height: 28px; }
.hidden { display: none !important; }
.mute { color: var(--mute); }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Gerüst ---------- */
.app { max-width: 600px; margin: 0 auto; min-height: 100%; padding-bottom: calc(var(--nav-h) + var(--safe-b) + 24px); }
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 18px 12px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
}
.wordmark {
  font-weight: 800; font-stretch: 75%; font-size: 26px; letter-spacing: -0.01em; line-height: 1;
  display: flex; align-items: center; gap: 8px;
}
.wordmark .mark { width: 1.05em; height: 1.05em; flex: none; filter: drop-shadow(0 0 6px rgba(255, 184, 0, .35)); }
.topbar .spacer { flex: 1; }
.tenant-pick {
  appearance: none; border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 7px 34px 7px 14px; max-width: 55vw; font-size: 15px;
  background-image: linear-gradient(45deg, transparent 50%, var(--mute) 50%), linear-gradient(135deg, var(--mute) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
main { padding: 4px 18px 0; }
h1 {
  font-size: 34px; font-weight: 800; font-stretch: 72%; line-height: 1.05; letter-spacing: -0.01em;
  margin: 10px 0 6px;
}
h2 { font-size: 20px; font-weight: 700; font-stretch: 85%; margin: 28px 0 10px; }
.lead { margin: 0 0 18px; color: var(--mute); }

/* ---------- Navigation unten ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  max-width: 600px; margin: 0 auto;
  background: var(--surface); border-top: 1px solid var(--line);
}
.tab {
  border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 12px; color: var(--mute); padding: 8px 0; height: 100%; justify-content: center;
}
.tab[aria-current="page"] { color: var(--fg); font-weight: 700; }
.tab[aria-current="page"] .icon { color: var(--fg); }
.tab.add { position: relative; }
.tab.add .bulb {
  width: 58px; height: 58px; border-radius: 50%; margin-top: -26px;
  display: grid; place-items: center; background: var(--lamp); color: #1d2a33;
  box-shadow: 0 6px 22px color-mix(in srgb, var(--lamp) 55%, transparent), 0 0 0 5px var(--surface);
}
.tab.add .bulb .icon { width: 28px; height: 28px; stroke-width: 2.5; }

/* ---------- Das Schaufenster (Hauptmotiv) ---------- */
.storefront { margin: 6px 0 4px; }
.awning {
  height: 20px; border-radius: 10px 10px 0 0;
  background: repeating-linear-gradient(90deg, var(--asphalt) 0 22px, var(--lamp) 22px 44px);
  position: relative;
}
.awning::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px;
  background: radial-gradient(circle at 11px -2px, var(--asphalt) 10px, transparent 11px) 0 0 / 44px 8px repeat-x,
              radial-gradient(circle at 33px -2px, var(--lamp) 10px, transparent 11px) 0 0 / 44px 8px repeat-x;
}
.window {
  background: var(--frame); padding: 14px; border-radius: 0 0 6px 6px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.04);
}
.pane {
  position: relative; margin: 0 auto; background: #05080a; overflow: hidden; border-radius: 3px;
  aspect-ratio: 16 / 9; display: grid; place-items: center;
  box-shadow: 0 0 40px color-mix(in srgb, var(--lamp) 30%, transparent);
}
.pane.portrait { aspect-ratio: 9 / 16; max-height: 62vh; }
.pane img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pane.fill img { object-fit: cover; }
.pane .glare {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,0.10) 0 18%, transparent 18% 60%, rgba(255,255,255,0.05) 60% 64%, transparent 64%);
}
.pane .empty { color: #8fa1ab; text-align: center; padding: 20px; font-size: 15px; }
.sill { height: 10px; background: color-mix(in srgb, var(--frame) 70%, var(--bg)); border-radius: 0 0 6px 6px; margin: 0 -4px; }
.status-line { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; font-size: 15px; flex-wrap: wrap; }
.status-line strong { font-weight: 700; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.pill.on { background: color-mix(in srgb, var(--canal) 16%, transparent); color: var(--canal); }
.pill.off { background: color-mix(in srgb, var(--brick) 14%, transparent); color: var(--brick); }
.pill.warn { background: var(--lamp-soft); color: color-mix(in srgb, var(--lamp) 40%, var(--fg)); }
.pill .led { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.now-title { font-size: 22px; font-weight: 700; font-stretch: 85%; margin: 6px 0 0; }

.strip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x mandatory; }
.strip figure { margin: 0; flex: none; width: 120px; scroll-snap-align: start; }
.strip img { width: 120px; height: 68px; object-fit: cover; border-radius: var(--radius-s); background: var(--line); display: block; }
.strip figcaption { font-size: 13px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Programm-Liste ---------- */
.summary { display: flex; gap: 16px; color: var(--mute); font-size: 15px; margin-bottom: 14px; }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.row-wrap { position: relative; border-radius: var(--radius-m); overflow: hidden; }
.row-under {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px; font-weight: 700; font-size: 14px;
}
.row-under .left { display: flex; align-items: center; gap: 8px; color: var(--canal); }
.row-under .right { display: flex; align-items: center; gap: 8px; color: var(--brick); }
.row-wrap.swipe-right .row-under { background: color-mix(in srgb, var(--canal) 18%, var(--surface)); }
.row-wrap.swipe-left .row-under { background: color-mix(in srgb, var(--brick) 18%, var(--surface)); }
.row {
  position: relative; display: grid; grid-template-columns: 34px 72px 1fr auto; align-items: center; gap: 12px;
  background: var(--surface); padding: 10px 12px 10px 4px; border-radius: var(--radius-m);
  touch-action: pan-y; transition: transform 0.2s ease; box-shadow: var(--shadow);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.row.dragging { transition: none; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); z-index: 3; }
.row.swiping { transition: none; }
.row.paused .thumb, .row.paused .meta-title { opacity: 0.45; }
.handle { border: 0; background: none; color: var(--mute); padding: 14px 6px; touch-action: none; cursor: grab; display: grid; place-items: center; }
.thumb { width: 72px; height: 48px; border-radius: 6px; object-fit: cover; background: var(--line); display: grid; place-items: center; color: var(--mute); }
.meta { min-width: 0; }
.meta-title { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta-sub { font-size: 13px; color: var(--mute); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tag { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 6px; background: var(--lamp-soft); color: color-mix(in srgb, var(--lamp) 35%, var(--fg)); }
.tag.canal { background: color-mix(in srgb, var(--canal) 14%, transparent); color: var(--canal); }
.tag.brick { background: color-mix(in srgb, var(--brick) 14%, transparent); color: var(--brick); }
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background 0.15s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.15s; box-shadow: 0 1px 3px rgba(0,0,0,0.25); }
.switch input:checked + span { background: var(--canal); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 3px solid var(--lamp); outline-offset: 2px; }
.switch input:disabled + span { opacity: 0.5; }
.hint { font-size: 13px; color: var(--mute); margin: 14px 4px; display: flex; gap: 8px; align-items: center; }

/* ---------- Leere Zustände ---------- */
.empty-state { text-align: center; padding: 40px 20px; color: var(--mute); }
.empty-state .icon { width: 40px; height: 40px; margin-bottom: 10px; color: var(--fg); }
.empty-state p { margin: 0 0 18px; }

/* ---------- Knöpfe und Formulare ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 13px 18px; font-weight: 700; font-size: 16px;
  background: var(--asphalt); color: #fff; min-height: 48px;
}
@media (prefers-color-scheme: dark) { .btn { background: #e4ecef; color: #1d2a33; } }
.btn.lamp { background: var(--lamp); color: #1d2a33; }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn.danger { background: transparent; color: var(--brick); border: 1px solid color-mix(in srgb, var(--brick) 40%, transparent); }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.small { min-height: 36px; padding: 7px 12px; font-size: 14px; border-radius: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 14px; font-weight: 600; }
.field small { color: var(--mute); font-size: 13px; }
.input {
  width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px;
  padding: 12px 14px; min-height: 48px; font-size: 16px;
}
.input:focus { outline: none; border-color: var(--canal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--canal) 25%, transparent); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.days label { position: relative; }
.days input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.days span {
  display: grid; place-items: center; height: 42px; border-radius: 10px; border: 1px solid var(--line);
  font-weight: 700; font-size: 14px; background: var(--surface);
}
.days input:checked + span { background: var(--asphalt); border-color: var(--asphalt); color: #fff; }
@media (prefers-color-scheme: dark) { .days input:checked + span { background: #e4ecef; color: #1d2a33; } }
.days input:focus-visible + span { outline: 3px solid var(--lamp); outline-offset: 2px; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg label { flex: 1; position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.seg span { display: grid; place-items: center; padding: 10px 4px; font-weight: 600; font-size: 14px; }
.seg input:checked + span { background: var(--asphalt); color: #fff; }
@media (prefers-color-scheme: dark) { .seg input:checked + span { background: #e4ecef; color: #1d2a33; } }
.check { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.check:last-child { border-bottom: 0; }

/* ---------- Menülisten (Mehr) ---------- */
.menu { background: var(--surface); border-radius: var(--radius-m); overflow: hidden; box-shadow: var(--shadow); }
.menu button, .menu a {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 15px 16px; border: 0; background: none;
  text-align: left; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; font-size: 16px;
}
.menu > :last-child { border-bottom: 0; }
.menu .grow { flex: 1; min-width: 0; }
.menu .sub { display: block; font-size: 13px; color: var(--mute); }

/* ---------- Bottom-Sheet ---------- */
.sheet-back {
  position: fixed; inset: 0; z-index: 20; background: rgba(10, 16, 20, 0.45);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade 0.18s ease;
}
.sheet {
  width: 100%; max-width: 600px; max-height: 92vh; overflow-y: auto;
  background: var(--bg); border-radius: var(--radius-l) var(--radius-l) 0 0;
  padding: 10px 18px calc(22px + var(--safe-b));
  animation: rise 0.22s cubic-bezier(.2,.8,.2,1);
}
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
.sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sheet-head h2 { margin: 0; flex: 1; }
.icon-btn { border: 0; background: var(--surface); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--fg); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.actions .btn { flex: 1 1 0; min-width: fit-content; }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

.big-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.big-choice label {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px 16px;
  border-radius: var(--radius-m); background: var(--surface); cursor: pointer; font-weight: 700; position: relative;
  box-shadow: var(--shadow);
}
.big-choice label small { font-weight: 400; color: var(--mute); font-size: 13px; }
.big-choice label:first-child { background: var(--lamp); color: #1d2a33; }
.big-choice label:first-child small { color: #4a4320; }
.big-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.big-choice label:focus-within { outline: 3px solid var(--asphalt); outline-offset: 2px; }

.upload-preview { margin-bottom: 16px; }
.upload-preview .pane { box-shadow: none; }
.upload-file { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.upload-file .grow { flex: 1; min-width: 0; }
.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; width: 0; background: var(--canal); transition: width 0.2s; }

/* ---------- Verlauf ---------- */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--surface); border-radius: var(--radius-m); padding: 14px 16px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 34px; font-weight: 800; font-stretch: 72%; line-height: 1.1; }
.stat span { font-size: 14px; color: var(--mute); }
.chart { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding: 10px 0 0; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.chart .col i { width: 100%; max-width: 32px; background: var(--canal); border-radius: 4px 4px 0 0; min-height: 2px; }
.chart .col small { font-size: 11px; color: var(--mute); }
.table { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--surface); border-radius: var(--radius-m); overflow: hidden; box-shadow: var(--shadow); }
.table td, .table th { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.table th { font-size: 13px; color: var(--mute); font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Anmeldung ---------- */
.login { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 24px; max-width: 420px; margin: 0 auto; }
.login .storefront { margin-bottom: 28px; }
.login .pane { display: grid; place-items: center; }
.login .pane .wordmark { color: #fff; font-size: 44px; }
.login-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.linkbtn { background: none; border: 0; padding: 10px 0; min-height: 44px; color: var(--canal); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:focus-visible { outline: 2px solid var(--canal); outline-offset: 2px; border-radius: 4px; }
.login form > .linkbtn { display: block; margin: 8px auto 0; }
.wordmark-small { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 24px; margin-bottom: 20px; color: var(--fg); }
.wordmark-small .mark { width: 40px; height: 40px; }
.seg-wrap { flex-wrap: wrap; }
.seg-wrap label { flex: 1 1 45%; }
.check-line { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--mute); margin: 12px 0 16px; }
.check-line input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--asphalt); }
.member-state { font-size: 12px; }
.code-box { font-size: 28px; font-weight: 800; letter-spacing: 0.18em; font-variant-numeric: tabular-nums; text-align: center; padding: 14px; background: var(--lamp-soft); border-radius: var(--radius-m); margin: 8px 0; user-select: all; }
pre.cmd { white-space: pre-wrap; word-break: break-all; font-size: 13px; background: var(--surface); border: 1px solid var(--line); padding: 12px; border-radius: 10px; }

/* ---------- Meldungen ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 18px); transform: translateX(-50%);
  background: var(--asphalt); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 40;
  font-size: 15px; max-width: calc(100% - 36px); box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  display: flex; gap: 14px; align-items: center; animation: rise 0.2s ease;
}
.toast.error { background: var(--brick); }
.toast button { border: 0; background: none; color: var(--lamp); font-weight: 700; padding: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (min-width: 640px) {
  h1 { font-size: 42px; }
}
.sheet:focus { outline: none; }

/* ---------------------------------------------------------------- Bildschirm: Live-Bild, Öffnungszeiten, Lauftext */
.push-right { margin-left: auto; }
.pane .live {
  position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: rgba(29, 42, 51, 0.78); color: #fff;
}
.pane .live .icon { width: 13px; height: 13px; }
.device { margin-bottom: 26px; }
.device-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.device-head h2 { margin-bottom: 8px; }
.device .pane.shot { margin-bottom: 4px; }
.hours-row {
  display: grid; grid-template-columns: auto 2.2em 1fr auto 1fr; align-items: center; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid var(--line);
}
.hours-row .input { min-width: 0; padding-left: 8px; padding-right: 8px; }
.hours-row .input:disabled { opacity: 0.35; }
.ticker-preview { position: relative; overflow: hidden; }
.ticker-preview .tp-content { color: #8fa1ab; display: grid; place-items: center; height: 100%; }
.ticker-preview .tp-band { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; overflow: hidden; white-space: nowrap; }
.ticker-preview.top .tp-band { top: 0; bottom: auto; }
.ticker-preview .tp-band span { display: inline-block; font-weight: 700; will-change: transform; }
.swatch {
  display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px; border-radius: 5px;
  font-style: normal; font-size: 11px; font-weight: 800; vertical-align: -3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15);
}
.seg span:has(.swatch) { grid-auto-flow: column; justify-content: center; gap: 8px; }
.ticker-preview .tp-content { width: 100%; }
.ticker-preview .tp-content img { width: 100%; height: 100%; object-fit: cover; display: block; }
.code-input { font-size: 26px; letter-spacing: 0.25em; text-transform: uppercase; font-weight: 700; }
.menu .menu-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.layout-preview { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #05080a; border-radius: var(--radius-s); margin-bottom: 14px; }
.seg.wrap { flex-wrap: wrap; }
.seg.wrap label { flex: 1 1 45%; }

/* Auswahl eines Inhalts (Hingucker) */
.pick-list { display: grid; gap: 8px; max-height: 280px; overflow-y: auto; }
.pick { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; position: relative; }
.pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pick img, .pick .pick-ph { width: 64px; height: 40px; object-fit: cover; border-radius: 6px; flex: none; background: var(--line); display: grid; place-items: center; }
.pick span { display: flex; flex-direction: column; min-width: 0; }
.pick small { color: var(--mute, #5d6d77); font-size: 13px; }
.pick:has(input:checked) { border-color: var(--lamp); box-shadow: 0 0 0 2px var(--lamp) inset; }
.pick:has(input:focus-visible) { outline: 3px solid var(--canal); outline-offset: 2px; }

/* Vorlagen */
.tpl-preview { position: relative; background: #05080a; border-radius: var(--radius-s); overflow: hidden; aspect-ratio: 16 / 9; margin-bottom: 14px; }
.tpl-preview.portrait { aspect-ratio: 9 / 16; max-height: 52vh; margin-inline: auto; }
.tpl-preview img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tpl-preview img:not([src]) { visibility: hidden; }
.tpl-busy { position: absolute; right: 10px; top: 10px; background: rgba(0, 0, 0, .55); color: #fff; border-radius: 99px; padding: 6px; display: grid; }
.tpl-busy[hidden] { display: none; }
.tpl-choice { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 10px; padding: 16px; border: 0; border-radius: var(--radius-m);
  background: var(--surface); box-shadow: var(--shadow); font: inherit; font-weight: 700; color: inherit; text-align: left; cursor: pointer; }
.tpl-choice .sub { display: block; font-weight: 400; color: var(--mute); font-size: 13px; }
.tpl-choice:focus-visible { outline: 3px solid var(--asphalt); outline-offset: 2px; }
label.btn { cursor: pointer; }
.tpl-choice .grow { flex: 1; min-width: 0; }

/* Sofortnachricht */
.msgs { display: grid; gap: 10px; margin-bottom: 8px; }
.msg { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius-m); background: var(--surface); box-shadow: var(--shadow); }
.msg img { width: 88px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; flex: none; }
.msg .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.msg .sub { font-size: 13px; color: var(--mute); }
.msg.past { opacity: .7; box-shadow: none; }
.web-box { margin-bottom: 14px; padding: 12px; border-radius: var(--radius-m); background: var(--surface); box-shadow: var(--shadow); }
.mail-preview { width: 100%; height: 70vh; border: 0; border-radius: var(--radius-s); background: #f3f6f7; }

/* A/B-Test */
.ab-test { padding: 14px; border-radius: var(--radius-m); background: var(--surface); box-shadow: var(--shadow); margin-bottom: 12px; }
.ab-title { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.ab-title .sub, .ab-card .sub { font-size: 13px; color: var(--mute); }
.ab-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ab-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.ab-card.win { border-color: var(--lamp); box-shadow: 0 0 0 2px var(--lamp) inset; }
.ab-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ab-head { flex-wrap: wrap; }
.ab-head b { flex-basis: 100%; font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.ab-head img { width: 44px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; flex: none; }
.ab-letter { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--asphalt); color: #fff; font-weight: 800; font-size: 13px; }
.ab-big { font-size: 28px; font-weight: 800; line-height: 1; display: flex; flex-direction: column; gap: 2px; }
.ab-big span { font-size: 12px; font-weight: 400; color: var(--mute); }
.check .sub { display: block; font-size: 13px; color: var(--mute); font-weight: 400; margin-top: 2px; }
.tpl-pages { margin: -4px 0 14px; }
.tpl-lang { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }

/* Vergleichsmessung (zwei Radare) */
.cmp-hours { display: grid; gap: 6px; margin: 8px 0 4px; }
.cmp-hour { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.cmp-hour .num { color: var(--mute); font-variant-numeric: tabular-nums; }
.cmp-bar { display: grid; gap: 2px; }
.cmp-bar i { display: block; height: 7px; border-radius: 4px; background: var(--canal); min-width: 2px; }
.cmp-bar i.alt, .cmp-key.alt { background: var(--lamp); }
.cmp-key { display: inline-block; width: 12px; height: 8px; border-radius: 3px; background: var(--canal); }

/* Werbung */
.ad-tabs { flex-wrap: wrap; margin-bottom: 18px; }
.ad-tabs label { flex: 1 1 auto; }
.ad-tabs span { white-space: nowrap; padding-left: 10px; padding-right: 10px; }
.menu .menu-row { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.menu .menu-row:last-child { border-bottom: 0; }
.menu .menu-row .btn { width: auto; flex: none; border-bottom: 0; padding: 7px 12px; font-size: 14px; }

/* Händler-Ring: eigene Werbung wählen */
.ring-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 6px 0; }
.ring-pick label { position: relative; display: grid; gap: 6px; padding: 8px; border: 2px solid var(--line); border-radius: var(--radius-s); background: var(--surface); cursor: pointer; font-size: 13px; }
.ring-pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ring-pick label:has(input:checked) { border-color: var(--lamp); box-shadow: 0 0 0 2px var(--lamp-soft); }
.ring-pick label:has(input:focus-visible) { outline: 2px solid var(--canal); outline-offset: 2px; }
.ring-pick img, .ring-pick .thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: var(--glass); display: grid; place-items: center; }

/* Spracheingabe */
.voice-wrap { position: relative; display: block; }
.voice-wrap > .input { padding-right: 48px; }
.mic-btn { position: absolute; right: 6px; top: 6px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--mute); display: grid; place-items: center; cursor: pointer; }
.mic-btn:hover { color: var(--fg); background: var(--glass); }
.mic-btn:focus-visible { outline: 2px solid var(--canal); outline-offset: 1px; }
.mic-btn.listening { color: #fff; background: var(--brick); animation: mic-pulse 1.2s ease-in-out infinite; }
@keyframes mic-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--brick) 25%, transparent); } }
@media (prefers-reduced-motion: reduce) { .mic-btn.listening { animation: none; } }

/* Breite Tabellen (z. B. Abrechnung der Wiederverkäufer) seitlich scrollen statt abschneiden */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap .table { min-width: 520px; }

/* Verträge und Rechnungen: Tabellen umbrechen statt seitlich abschneiden */
.table.bill { font-size: 14px; }
.table.bill td, .table.bill th { padding: 8px 10px; vertical-align: top; overflow-wrap: break-word; hyphens: auto; }
.table.bill td.num { white-space: nowrap; text-align: right; }
.table.bill.ctable { box-shadow: none; border: 1px solid var(--line); margin: 6px 0 12px; }
.table.bill.ctable td:nth-child(2) { white-space: nowrap; text-align: center; }
a.btn { text-decoration: none; }

/* Bedingungen (conditions.js) */
details.cond { border: 1px solid var(--line, #d9d4cc); border-radius: 10px; padding: 0 12px; margin: 6px 0 14px; }
details.cond > summary { display: flex; gap: 10px; align-items: baseline; padding: 12px 0; cursor: pointer; font-weight: 600; list-style: none; }
details.cond > summary::-webkit-details-marker { display: none; }
details.cond > summary::after { content: "▾"; margin-left: auto; transition: transform .15s; }
details.cond[open] > summary::after { transform: rotate(180deg); }
details.cond > summary .sub { font-weight: 400; font-size: .85em; color: var(--mute, #6b6b6b); }
details.cond .days { grid-template-columns: repeat(3, 1fr); }

/* SD-Karte (sdcard.js) */
ol.steps { padding-left: 1.3em; margin: 6px 0 12px; }
ol.steps li { margin: 0 0 12px; line-height: 1.55; }
ol.steps .btn { margin: 0 4px 4px 0; }

/* ---------- Werbe-Shop (öffentliche Seite) ---------- */
.shop { max-width: 760px; margin: 0 auto; padding: 24px 18px 64px; }
.shop h2 { margin-top: 34px; }
.shop-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.shop-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 460px; overflow-y: auto; }
.shop-win { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: var(--surface); border-radius: var(--radius-m); border: 2px solid transparent; cursor: pointer; }
.shop-win:has(input:checked) { border-color: var(--lamp); background: var(--lamp-soft); }
.shop-win input { width: 22px; height: 22px; flex: none; accent-color: var(--asphalt); }
.shop-win .grow { flex: 1; min-width: 0; }
.shop-win .sub { display: block; font-size: 13px; color: var(--mute); margin-top: 2px; }
.shop-win .price { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.shop-win .price small { display: block; font-weight: 400; font-size: 12px; color: var(--mute); }
.shop-preview { background: #000; border-radius: var(--radius-m); overflow: hidden; margin: 0 0 14px; display: grid; place-items: center; }
.shop-preview img, .shop-preview video { display: block; max-width: 100%; max-height: 360px; }
.shop-sum { margin: 26px 0 6px; }
.shop-sum .table { margin-bottom: 10px; }
.shop-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
