:root {
  --bg: #0b0d14;
  --panel: rgba(18, 21, 32, 0.97);
  --line: rgba(255, 255, 255, 0.12);
  --text: #eef1f8;
  --muted: #9aa3b8;
  --accent: #4a7cff;
  --danger: #e5484d;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Setup-Seite ---------- */

#setup {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 64px;
  overflow-y: auto;
}

h1 { margin: 8px 0; font-size: 32px; }
h2 { font-size: 19px; margin: 0 0 10px; }
.lead { color: var(--muted); margin-top: 0; }
.muted { color: var(--muted); font-size: 14px; }

section {
  background: #141826;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-top: 16px;
}

section label {
  display: block;
  margin: 12px 0;
}

section label input[type=range] { width: 100%; display: block; margin-top: 6px; }

button {
  font: inherit;
  color: var(--text);
  background: #232a40;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
}

button.big {
  width: 100%;
  font-size: 20px;
  padding: 16px;
  margin-top: 10px;
  background: var(--accent);
  border: 0;
}

button.big.alt { background: #232a40; }
button.small { padding: 6px 10px; font-size: 14px; }

.row { display: flex; gap: 8px; }
.row input { flex: 1; min-width: 0; }

input[type=url], input[type=text], select {
  font: inherit;
  color: var(--text);
  background: #0b0d14;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
}

#layoutList { list-style: none; padding: 0; margin: 10px 0 0; }
#layoutList li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
  word-break: break-all;
  font-size: 14px;
}
#layoutList li span { flex: 1; }

code, .code {
  font-family: ui-monospace, monospace;
  background: #0b0d14;
  padding: 2px 6px;
  border-radius: 6px;
  word-break: break-all;
}

.code { font-size: 20px; letter-spacing: 2px; }

/* ---------- MR-Ansicht ---------- */

#vr {
  position: fixed;
  inset: 0;
  background: #000;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#vr[hidden] { display: none; }
#setup [hidden] { display: none !important; }
/* Lion Link (am PC): feste Bühne oben links, Hintergrund in der "Schlüsselfarbe" =
   dort zeigt das Handy die echte Welt */
#vr.link { right: auto; bottom: auto; background: #ff00ff; }
#vr.link .eye { background: transparent; }
#vr.link .eye-video { visibility: hidden; }
.link-bar { position: absolute; left: 0; top: 0; z-index: 999999; image-rendering: pixelated; pointer-events: none; }

.eye {
  position: absolute;
  top: 0;
  bottom: 0;
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #1d2333, #05060a);
}

.eye + .eye { border-left: 2px solid #000; }

.eye-inner { position: absolute; inset: 0; }

.passthrough {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  perspective-origin: 50% 50%;
}

.cursor {
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.5), 0 0 12px rgba(74, 124, 255, 0.8);
  pointer-events: none;
  z-index: 5;
  will-change: transform;
}

.cursor.gaze { width: 16px; height: 16px; margin: -8px 0 0 -8px; }
.cursor.pinch { background: var(--accent); border-color: #cfe0ff; }
.cursor.hidden { display: none; }

.toast {
  position: absolute;
  left: 50%;
  top: 14%;
  transform: translateX(-50%);
  max-width: 80%;
  background: rgba(10, 12, 20, 0.85);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 14px;
  text-align: center;
  pointer-events: none;
  z-index: 6;
}

/* ---------- Schwebende Fenster (Weltkoordinaten: 1px = 1mm) ---------- */

.win-shell {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  backface-visibility: hidden;
}

.win {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  overflow: hidden;
  color: var(--text);
  font-size: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.win-bar {
  flex: 0 0 auto;
  height: 76px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px 0 0;
  background: rgba(255, 255, 255, 0.07);
}

.win-title {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  padding-left: 24px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 600;
}

.win-title::before {
  content: "⠿";
  opacity: 0.5;
  margin-right: 14px;
}

.win-body {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.grip {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 70px;
  height: 70px;
  border-radius: 0 0 26px 0;
  background: linear-gradient(135deg, transparent 50%, rgba(255, 255, 255, 0.35) 50%);
}

.btn {
  min-width: 70px;
  height: 58px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  white-space: nowrap;
}

.btn.close { background: rgba(229, 72, 77, 0.35); }

.hover { outline: 4px solid var(--accent); outline-offset: -4px; }
.btn.hover, .tile.hover, .key.hover { background: var(--accent); outline: none; }
.grip.hover { background: linear-gradient(135deg, transparent 50%, var(--accent) 50%); outline: none; }

.media {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #000;
}

.media iframe, .media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
  background: #000;
}

.web-frame { background: #fff; }

.ctrl {
  flex: 0 0 auto;
  display: flex;
  gap: 12px;
  padding: 12px 80px 12px 12px;
  align-items: center;
  overflow: hidden;
}

.message {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: var(--muted);
}

/* Launcher */
.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), 1fr);
  gap: 18px;
  padding: 22px;
}

.tile {
  height: 150px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 54px;
}

.tile span { font-size: 26px; }

.info-line {
  padding: 0 24px 16px;
  font-size: 24px;
  color: var(--muted);
}

/* Uhr */
.clock {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.clock .time { font-size: 150px; font-weight: 200; font-variant-numeric: tabular-nums; }
.clock .date { font-size: 34px; color: var(--muted); }

/* PC-Info */
.pc-info { padding: 28px; line-height: 1.5; }
.pc-info .code { font-size: 60px; display: inline-block; margin: 10px 0; }

/* Tastatur */
.kb-text {
  margin: 16px 16px 8px;
  padding: 14px 18px;
  min-height: 70px;
  background: #05060a;
  border-radius: 14px;
  font-family: ui-monospace, monospace;
  font-size: 30px;
  word-break: break-all;
}

.kb-prompt { padding: 10px 18px 0; color: var(--muted); font-size: 24px; }

.kb-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 8px 12px;
}

.key {
  flex: 1;
  max-width: 82px;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.13);
  font-size: 32px;
}

.key.wide { max-width: 200px; flex: 2; font-size: 26px; }
.key.space { max-width: 400px; flex: 5; }
.key.ok { background: rgba(74, 124, 255, 0.55); }


.win [hidden] { display: none !important; }

.page-info { flex: 1; text-align: center; color: var(--muted); font-size: 26px; }

/* Suchleiste (YouTube, Google) */
.searchbar {
  flex: 0 0 auto;
  display: flex;
  gap: 12px;
  padding: 14px 14px 6px;
}

.query {
  flex: 1;
  min-width: 0;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  border-radius: 32px;
  background: #05060a;
  border: 2px solid rgba(255, 255, 255, 0.15);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.searchbar .btn { height: 64px; border-radius: 32px; }

/* YouTube */
.yt-browse, .yt-player {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.chips {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  padding: 8px 14px;
  overflow: hidden;
}

.chip {
  padding: 10px 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 24px;
  white-space: nowrap;
}

.chip.hover { background: var(--accent); outline: none; }

.yt-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 16px;
  padding: 8px 14px;
}

.yt-grid .message { grid-column: 1 / -1; grid-row: 1 / -1; }

.card {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: 18px;
}

.card.hover { background: rgba(74, 124, 255, 0.35); outline: none; }

.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.dur {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.8);
  font-size: 20px;
}

.card-title {
  font-size: 23px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-author { font-size: 19px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Eingebettete Seiten mit Hoch/Runter-Knöpfen */
.scroller { overflow: hidden; }
.scroller iframe { bottom: auto; }

/* Startmenü: 5 Spalten */
[data-win] .grid:has([data-action="exit"]) { --cols: 5; }

/* Ebenen: Kamerabild -> Welt-Canvas -> Fenster */
.eye-top { background: none; }
.env-canvas { position: absolute; left: 0; top: 0; pointer-events: none; }
.env-canvas[hidden] { display: none; }

.tile.active { box-shadow: inset 0 0 0 4px var(--accent); }
.reality-info { flex: 1; text-align: center; font-size: 28px; }

/* ---------- YouTube (an das dunkle YouTube-Design angelehnt) ---------- */
.win:has(.yt-head) { background: #0f0f0f; }
.win:has(.yt-head) .win-bar { background: #0f0f0f; }

.yt-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 20px;
}

.yt-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -1px;
  padding: 6px 10px;
  border-radius: 12px;
}

.yt-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 38px;
  border-radius: 11px;
  background: #ff0000;
  color: #fff;
  font-size: 20px;
}

.yt-head .query { max-width: 900px; background: #121212; border-color: #303030; }
.btn.round { width: 64px; height: 64px; min-width: 0; padding: 0; border-radius: 50%; background: #272727; }

.yt-main { flex: 1; min-height: 0; display: flex; }

.yt-side {
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 12px;
}

.side-item {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 64px;
  padding: 0 16px;
  border-radius: 14px;
  font-size: 25px;
}

.side-item span { font-size: 30px; }
.side-item.active { background: #272727; font-weight: 600; }
.side-item.hover { background: #3a3a3a; outline: none; }

.yt-main .yt-browse { flex: 1; min-width: 0; }
.yt-main .chips .chip { background: #272727; }
.yt-main .chips .chip.active { background: #f1f1f1; color: #0f0f0f; }
.yt-main .chips .chip.hover { background: var(--accent); color: #fff; }

.yt-main .yt-grid { grid-template-columns: repeat(4, 1fr); padding: 8px 18px; }

.card-info { display: flex; gap: 12px; min-width: 0; }
.card-text { min-width: 0; flex: 1; }
.card-info .card-title { font-weight: 600; margin-bottom: 4px; }

.avatar {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

/* Videoseite */
.yt-watch { flex: 1; min-width: 0; display: flex; gap: 22px; padding: 4px 20px 0; }
.watch-left { flex: 0 0 64%; min-width: 0; display: flex; flex-direction: column; }
.watch-left .media { flex: 0 0 auto; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; }
.watch-title { font-size: 30px; font-weight: 700; margin: 14px 4px 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.watch-meta { display: flex; align-items: center; gap: 14px; margin: 0 4px; }
.watch-channel { font-size: 25px; font-weight: 600; }
.watch-views { font-size: 21px; color: var(--muted); }
.watch-left .ctrl { padding: 12px 0; }

.watch-right { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.next-head { display: flex; align-items: center; gap: 10px; font-size: 26px; }
.next-head b { flex: 1; }
.btn.small-btn { min-width: 58px; height: 50px; padding: 0; }
.next-list { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }

.next-item { display: flex; gap: 12px; padding: 6px; border-radius: 14px; min-height: 0; }
.next-item .thumb { flex: 0 0 46%; }
.next-item .card-title { font-size: 22px; font-weight: 600; }
.next-item.hover { background: rgba(74, 124, 255, 0.35); outline: none; }

/* Echte Hand über den Fenstern */
.hand-canvas { position: absolute; inset: 0; pointer-events: none; z-index: 4; }

/* Pinch halten im leeren Raum: Fortschrittsring */
.cursor.hold {
  border-color: transparent;
  background: conic-gradient(var(--accent) var(--p, 0deg), rgba(255, 255, 255, 0.25) 0);
  -webkit-mask: radial-gradient(circle, transparent 52%, #000 54%);
  mask: radial-gradient(circle, transparent 52%, #000 54%);
}

/* Bett-Welt Einstellungen */
.place-row { padding: 16px; }
.btn.selected { background: var(--accent); }
.opt-list { display: flex; flex-direction: column; gap: 10px; padding: 0 16px 16px; }
.opt-row { display: flex; align-items: center; gap: 12px; }
.opt-label { flex: 1; font-size: 28px; }
.opt-value { width: 300px; text-align: center; font-size: 28px; font-weight: 600; }

/* YouTube-Vollbild (Kino-Modus) */
.win.cinema .yt-head,
.win.cinema .watch-right,
.win.cinema .watch-title,
.win.cinema .watch-meta { display: none; }
.win.cinema .yt-watch { padding: 0; gap: 0; }
.win.cinema .watch-left { flex: 1; }
.win.cinema .watch-left .media { flex: 1; aspect-ratio: auto; border-radius: 0; }
.win.cinema .watch-left .ctrl { padding: 10px 16px; }

/* Großer Vollbild-Knopf direkt auf dem Video (wie bei YouTube unten rechts) */
.fs-btn {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 52px;
  z-index: 2;
}
.fs-btn.hover { background: var(--accent); outline: none; }
.watch-left .ctrl { flex-wrap: wrap; padding-right: 12px; }

/* Startseite: Datei-Knopf */
.file-btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  margin: 0 8px 0 0;
}

/* Galerie */
.gal-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 14px;
  padding: 14px;
}
.gal-item { position: relative; border-radius: 16px; overflow: hidden; background: #000; min-height: 0; }
.gal-item img, .gal-item video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.gal-item.hover { outline: 5px solid var(--accent); outline-offset: -5px; }
.gal-view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.gal-view video { object-fit: contain; }

/* Wetter */
.wx { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 30px; padding: 10px 30px 30px; }
.wx-now { display: flex; align-items: center; gap: 30px; font-size: 32px; }
.wx-big { font-size: 140px; }
.wx-temp { font-size: 110px; font-weight: 200; line-height: 1; }
.wx-days { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.wx-day { background: rgba(255, 255, 255, 0.07); border-radius: 18px; padding: 14px; text-align: center; font-size: 26px; }
.wx-icon { font-size: 50px; margin: 6px 0; }

/* Notizen */
.notes-wrap { flex: 1; min-height: 0; overflow: hidden; padding: 20px 26px; }
.notes-text { white-space: pre-wrap; font-size: 30px; line-height: 1.45; }

/* Rechner */
.calc-display { margin: 16px; padding: 16px 22px; background: #05060a; border-radius: 18px; text-align: right; }
.calc-expr { font-size: 52px; font-family: ui-monospace, monospace; min-height: 64px; word-break: break-all; }
.calc-result { font-size: 40px; color: var(--muted); min-height: 50px; }
.calc-keys { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 0 16px 16px; }
.calc-keys .key { max-width: none; height: auto; font-size: 44px; }
.calc-keys .key.wide { grid-column: span 2; max-width: none; font-size: 40px; }

/* Laser-Strahl aus der Hand */
.ray { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; overflow: visible; }
.ray line { filter: drop-shadow(0 0 4px rgba(120, 160, 255, 0.9)); }

/* Handgelenk-Menü-Knopf (Handfläche zu dir drehen) */
.palm-btn {
  position: absolute;
  left: 0;
  top: 0;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: rgba(20, 24, 40, 0.85);
  border: 3px solid var(--accent);
  box-shadow: 0 0 18px rgba(74, 124, 255, 0.8);
  pointer-events: none;
  z-index: 6;
}

/* Startmenü: 6 Spalten */
[data-win] .grid:has([data-action="exit"]) { --cols: 6; }

/* Ballon-Jagd */
.game-info { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 20px; }
.game-score { font-size: 90px; font-weight: 700; }
.game-time { font-size: 30px; }
.game-best { font-size: 24px; }

/* Handgelenk-Menü: Fortschrittsring beim Halten */
.palm-btn {
  width: 72px; height: 72px; margin: -36px 0 0 -36px;
  /* Glas-Knopf am Arm; der Ring füllt sich beim Halten */
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.28) 0 58%, transparent 60%),
    conic-gradient(rgba(140, 200, 255, 0.95) var(--p, 0deg), rgba(255, 255, 255, 0.18) 0);
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 2px 2px rgba(255, 255, 255, 0.5), 0 6px 18px rgba(0, 0, 0, 0.3);
}
.palm-btn svg { width: 34px; height: 34px; }


/* YouTube-Sparmodus: zweites Auge als kleiner, hochskalierter Player (niedrigere Auflösung) */
.media.yt-low iframe { width: 34% !important; height: 34% !important; transform: scale(2.9412); transform-origin: 0 0; }

/* ---------- Glas-Design (Startmenü nach Lions Zeichnung, wie Quest 3) ---------- */
.gl {
  /* ohne Weichzeichner: den zeichnet das iPhone bei 3D-Fenstern falsch (riesig, doppelt) */
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.3), rgba(40, 46, 64, 0.38) 55%, rgba(255, 255, 255, 0.16));
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 2px 1px rgba(255, 255, 255, 0.45);
  color: #fff;
  transition: background 0.15s, transform 0.15s;
}

/* Startmenü: kein Fensterrahmen, nur die Glas-Teile schweben im Raum */
.win.glass { background: transparent; border: none; box-shadow: none; overflow: visible; }
.win.glass > .win-bar, .win.glass > .grip { display: none; }
.lm { height: 100%; display: flex; flex-direction: column; gap: 22px; padding: 6px 10px; }
.lm svg { width: 64px; height: 64px; display: block; }
.lm-search {
  height: 120px; border-radius: 60px; display: flex; align-items: center; gap: 22px; padding: 0 18px 0 40px;
}
.lm-search .lm-ph { flex: 1; font-size: 40px; color: rgba(255, 255, 255, 0.75); }
.lm-search .lm-ico svg { width: 52px; height: 52px; opacity: 0.85; }
.lm-mini {
  align-self: flex-end; margin-right: 150px; height: 128px; border-radius: 64px; display: flex; align-items: center; gap: 18px; padding: 0 16px;
}
.lm-dock {
  height: 176px; border-radius: 88px; display: flex; align-items: center; gap: 22px; padding: 0 22px;
}
.lm-gap { flex: 1; }
.lm-round {
  position: relative; width: 132px; height: 132px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.1); border: 1.5px solid rgba(255, 255, 255, 0.22); transition: background 0.15s, transform 0.15s;
}
.lm-search .lm-round, .lm-mini .lm-round { width: 96px; height: 96px; }
.lm-search .lm-round svg, .lm-mini .lm-round svg { width: 50px; height: 50px; }
.lm-lion {
  font-size: 74px; background: radial-gradient(circle at 35% 30%, #ffc477, #f08a24 60%, #c75f0c); border: 3px solid rgba(255, 230, 190, 0.8);
}
.lm-time {
  position: relative;
  width: 132px; height: 132px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 600; background: rgba(255, 255, 255, 0.14); border: 1.5px solid rgba(255, 255, 255, 0.3);
}
/* Zeigen = heller, größer und Name darüber (wie bei der Quest) */
.lm-time.hover { background: rgba(255, 255, 255, 0.42); outline: none; }
.lm-round.hover { background: rgba(255, 255, 255, 0.42); transform: scale(1.1); outline: none; }
.lm-lion.hover { background: radial-gradient(circle at 35% 30%, #ffd9a3, #ff9a33 60%, #d86a10); }
.lm-round.hover::after {
  content: attr(data-label); position: absolute; bottom: calc(100% + 18px); left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-size: 32px; padding: 10px 22px; border-radius: 30px; background: rgba(20, 22, 30, 0.75); color: #fff;
}
.lm-search.hover { background: linear-gradient(140deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.14)); outline: none; }

/* Fenster im Glas-Look (Einstellungen) */
.win.glass-panel {
  background: linear-gradient(140deg, rgba(60, 66, 90, 0.78), rgba(25, 28, 40, 0.74));
  border: 2px solid rgba(255, 255, 255, 0.35);
}
.win.glass-panel .win-bar { background: transparent; }
.qs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 22px 26px 10px; }
.qs-toggle { height: 104px; border-radius: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px 0 36px; font-size: 34px; }
.qs-toggle i { width: 104px; height: 60px; border-radius: 30px; background: rgba(255, 255, 255, 0.2); position: relative; transition: background 0.15s; }
.qs-toggle i::after { content: ''; position: absolute; top: 6px; left: 6px; width: 48px; height: 48px; border-radius: 50%; background: #fff; transition: left 0.15s; }
.qs-toggle.on i { background: #3ccf6e; }
.qs-toggle.on i::after { left: 50px; }
.qs-row { display: flex; gap: 14px; padding: 12px 26px 24px; }
.qs-btn { flex: 1; height: 96px; border-radius: 48px; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.qs-btn.danger { background: linear-gradient(140deg, rgba(229, 72, 77, 0.55), rgba(229, 72, 77, 0.3)); }
.qs-toggle.hover, .qs-btn.hover { background: rgba(255, 255, 255, 0.4); outline: none; transform: scale(1.03); }

/* ---------- Start-Seiten im Glas-Design ---------- */
body:has(#setup:not([hidden])) {
  background:
    radial-gradient(circle at 15% 10%, rgba(90, 200, 255, 0.22), transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(80, 120, 255, 0.35), transparent 45%),
    radial-gradient(circle at 40% 90%, rgba(160, 80, 255, 0.3), transparent 45%),
    #0b0d14;
  background-attachment: fixed;
}
#setup section {
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 12px 32px rgba(0, 0, 0, 0.25);
}
#setup button {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
}
#setup button.big { background: linear-gradient(135deg, rgba(110, 150, 255, 0.85), rgba(74, 124, 255, 0.85)); border: 1px solid rgba(200, 215, 255, 0.6); color: #fff; font-weight: 600; }
#setup button.big.alt { background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.3); }
#setup input[type=url], #setup input[type=text], #setup select {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
}

/* ---------- Hologramm: Fenster wird von unten nach oben "projiziert" ---------- */
@keyframes lion-materialize {
  0% { clip-path: inset(100% 0 0 0 round 28px); opacity: 0.35; }
  60% { opacity: 1; }
  100% { clip-path: inset(0 0 0 0 round 28px); opacity: 1; }
}
@keyframes lion-scan {
  0% { top: 100%; opacity: 1; }
  85% { opacity: 1; }
  100% { top: 0%; opacity: 0; }
}
.win.materialize { animation: lion-materialize 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.win.materialize::after {
  content: ''; position: absolute; left: 0; right: 0; height: 8px; margin-top: -4px; z-index: 50; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(170, 220, 255, 0.95) 20%, #fff 50%, rgba(170, 220, 255, 0.95) 80%, transparent);
  box-shadow: 0 0 26px 6px rgba(120, 190, 255, 0.7);
  animation: lion-scan 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

/* ---------- Glas schöner (ohne Weichzeichner): Lichtkante oben, matter Schimmer ---------- */
.gl { position: relative; }
.gl::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 48%),
    radial-gradient(120% 80% at 10% 0%, rgba(255, 255, 255, 0.16), transparent 60%);
}
.gl > * { position: relative; }
/* Fenster allgemein leicht glasig (Zimmer schimmert durch) */
.win:not(.glass):not(.glass-panel):not(:has(.yt-head)) {
  background: linear-gradient(145deg, rgba(64, 70, 94, 0.86), rgba(20, 23, 34, 0.88));
  border: 2px solid rgba(255, 255, 255, 0.26);
  box-shadow: inset 0 2px 1px rgba(255, 255, 255, 0.28), 0 20px 60px rgba(0, 0, 0, 0.45);
}
.win:not(.glass):not(.glass-panel):not(:has(.yt-head)) > .win-bar { background: rgba(255, 255, 255, 0.06); }
/* PC-Link: Pink darf nicht durchscheinen (wäre sonst halb durchsichtig) -> Glas deckend */
#vr.link .win:not(.glass):not(:has(.yt-head)) { background: linear-gradient(145deg, #3f4560, #171a26); }
#vr.link .gl { background: linear-gradient(140deg, #5d6480, #2b3042 55%, #454b63); }

/* Webcam-Vorschau (6DoF-Tracking) */
.webcam-preview { position: relative; margin-top: 10px; border-radius: 14px; overflow: hidden; max-width: 320px; }
.webcam-preview video { width: 100%; display: block; transform: scaleX(-1); }
.webcam-dot { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: #3ccf6e; box-shadow: 0 0 12px #3ccf6e; z-index: 2; display: none; }
