/* Auto-Oberfläche: große Ziele (≥ 64 px), lesbar auf Armlänge */
body { font-size: 20px; overflow: hidden; height: 100vh; }
.muted { color: var(--muted); }
.small { font-size: .85em; }
.row { display: flex; align-items: center; gap: 16px; }
[data-icon] { display: inline-flex; }
[data-icon] svg { width: 28px; height: 28px; }

/* ---------- Kopplung ---------- */
.pairing {
  height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center;
  gap: 6vw; padding: 6vh 7vw;
}
.pairing h1 { font-size: 52px; font-weight: 600; letter-spacing: -.01em; }
.lead { font-size: 24px; color: var(--muted); max-width: 32ch; }
.pair-code { display: flex; gap: 12px; margin: 40px 0 28px; }
.pair-code span {
  width: 76px; height: 96px; display: grid; place-items: center;
  font-size: 56px; font-weight: 600; background: var(--surface);
  border-bottom: 4px solid var(--accent); border-radius: var(--radius-s) var(--radius-s) 2px 2px;
}
.pair-code span:nth-child(3) { margin-right: 18px; }
.pair-qr { background: #fff; border-radius: var(--radius-m); padding: 28px; width: min(36vw, 70vh); aspect-ratio: 1; justify-self: center; }
.pair-qr svg { width: 100%; height: 100%; display: block; }

/* ---------- Grundlayout ---------- */
.app { display: grid; grid-template-columns: 124px 1fr; height: 100vh; }
.rail { display: flex; flex-direction: column; gap: 4px; padding: 16px 10px; background: var(--surface); border-right: 1px solid var(--line); }
.rail-spacer { flex: 1; }
.rail-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 4px;
  border: 0; background: none; border-radius: var(--radius-m); color: var(--muted); font-size: 16px; font-weight: 500; cursor: pointer;
}
.rail-btn svg { width: 34px; height: 34px; }
.rail-btn.active { color: var(--text); background: var(--surface-2); box-shadow: inset 4px 0 0 var(--accent); }

.main { overflow-y: auto; padding: 28px 40px 60px; scroll-behavior: smooth; }
.pane-head { margin: 4px 0 24px; }
.pane-head.row h1 { flex: 1; }
.pane-head h1 { font-size: 38px; }
.section-title { font-size: 26px; font-weight: 600; margin: 34px 0 14px; display: flex; align-items: baseline; gap: 14px; }
.section-title small { font-size: 18px; color: var(--muted); font-weight: 400; }

/* ---------- Videokacheln ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px 22px; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 22%); gap: 22px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory; }
.strip > * { scroll-snap-align: start; }
.tile { text-align: left; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; position: relative; }
.thumb { position: relative; aspect-ratio: 16/9; border-radius: var(--radius-m); overflow: hidden; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge { position: absolute; right: 8px; bottom: 8px; background: rgba(10,14,24,.85); padding: 2px 8px; border-radius: 6px; font-size: 16px; font-weight: 600; }
.badge.live { background: var(--danger); color: #fff; }
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(255,255,255,.25); }
.progress i { display: block; height: 100%; background: var(--accent); }
.tile-title { font-weight: 600; margin-top: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-meta { color: var(--muted); font-size: 17px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-remove { position: absolute; top: 8px; right: 8px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(10,14,24,.8); color: var(--text); font-size: 26px; cursor: pointer; }

.empty { border: 1px dashed var(--line); border-radius: var(--radius-m); padding: 32px; color: var(--muted); max-width: 640px; }
.empty strong { color: var(--text); display: block; font-size: 22px; margin-bottom: 6px; }

/* ---------- Suche ---------- */
.search-bar { display: flex; gap: 14px; margin-bottom: 16px; }
.search-bar input { font-size: 24px; min-height: 68px; }
.search-bar .btn { min-height: 68px; padding: 0 2em; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.chip { min-height: 48px; padding: 0 18px; border-radius: 24px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }

/* ---------- Kanäle ---------- */
.channel-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.channel-item { display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: var(--radius-m); background: var(--surface); border: 0; cursor: pointer; text-align: left; min-height: 84px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-weight: 700; font-size: 24px; color: var(--accent); flex: none; }

/* ---------- Optionen ---------- */
.settings { max-width: 760px; }
.settings h2 { font-size: 26px; margin: 30px 0 8px; }
.segmented { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.segmented button { min-height: 76px; border: 0; border-right: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.segmented button:last-child { border-right: 0; }
.segmented button small { font-weight: 400; color: var(--muted); font-size: 15px; }
.segmented button.on { background: var(--accent); color: var(--accent-ink); }
.segmented button.on small { color: var(--accent-ink); }

/* ---------- Player ---------- */
.player { position: fixed; inset: 0; background: #000; z-index: 10; }
.player canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transition: filter .3s; }
.player.driver canvas { filter: blur(48px) brightness(.45); }
.controls { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr auto; transition: opacity .25s; }
.controls.idle { opacity: 0; pointer-events: none; }
.ctl-top { display: flex; align-items: center; gap: 16px; padding: 18px 22px 40px; background: linear-gradient(rgba(0,0,0,.7), transparent); }
.ctl-title { flex: 1; min-width: 0; }
.ctl-title strong { display: block; font-size: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link { background: none; border: 0; color: var(--muted); padding: 4px 0; cursor: pointer; font-size: 18px; }
.ctl-mid { display: flex; align-items: center; justify-content: center; gap: 70px; }
.ctl-bottom { display: flex; align-items: center; gap: 20px; padding: 40px 30px 26px; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.icon-btn { width: 68px; height: 68px; border-radius: 50%; border: 0; background: rgba(23,32,51,.6); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn svg { width: 32px; height: 32px; }
.icon-btn.big { width: 96px; height: 96px; }
.icon-btn.big svg { width: 48px; height: 48px; }
.icon-btn.huge { width: 128px; height: 128px; background: rgba(245,184,61,.92); color: var(--accent-ink); }
.icon-btn.huge svg { width: 64px; height: 64px; }
.icon-btn.on { background: var(--accent); color: var(--accent-ink); }
.time { font-variant-numeric: tabular-nums; font-size: 20px; min-width: 70px; text-align: center; }
.track { flex: 1; height: 48px; position: relative; cursor: pointer; touch-action: none; }
.track::before { content: ''; position: absolute; left: 0; right: 0; top: 21px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.28); }
.track-fill { position: absolute; left: 0; top: 21px; height: 6px; border-radius: 3px; background: var(--accent); width: 0; }
.track-knob { position: absolute; top: 12px; width: 24px; height: 24px; margin-left: -12px; border-radius: 50%; background: #fff; left: 0; }
.track.disabled { pointer-events: none; opacity: .4; }

.driver-veil { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; z-index: 2; }
.driver-veil > span svg { width: 80px; height: 80px; color: var(--accent); }
.driver-veil p { font-size: 26px; max-width: 26ch; }
.center-status { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; z-index: 3; pointer-events: none; }
.spinner { width: 64px; height: 64px; border-radius: 50%; border: 6px solid rgba(255,255,255,.2); border-top-color: var(--accent); margin: 0 auto 14px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-box { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--surface); padding: 32px; border-radius: var(--radius-m); z-index: 4; max-width: 640px; }
.error-box p { font-size: 22px; margin-top: 0; }
.toast { position: absolute; left: 50%; bottom: 130px; transform: translateX(-50%); background: var(--surface); padding: 14px 22px; border-radius: 40px; z-index: 5; display: flex; gap: 16px; align-items: center; }
.toast button { background: none; border: 0; color: var(--accent); font-weight: 600; cursor: pointer; min-height: 44px; }

/* ---------- Wer schaut? ---------- */
.sheet-wrap { position: fixed; inset: 0; background: rgba(5,8,15,.7); display: grid; place-items: center; z-index: 20; }
.sheet { background: var(--surface); border-radius: var(--radius-m); padding: 34px 40px; width: min(760px, 92vw); text-align: center; }
.sheet h2 { font-size: 34px; }
.who-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 26px 0 12px; }
.who { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px; min-height: 180px; justify-content: center; border-radius: var(--radius-m); border: 2px solid var(--line); background: var(--surface-2); cursor: pointer; }
.who svg { width: 48px; height: 48px; color: var(--accent); }
.who strong { font-size: 26px; }
.who small { color: var(--muted); font-size: 18px; }

.unsupported { padding: 10vh 10vw; }
.center-inline { padding: 48px 0; }
.player .driver-veil { z-index: 4; pointer-events: none; justify-content: flex-start; padding-top: 16vh; }
.player .driver-veil button { pointer-events: auto; }
