/* app.css – HEY!go Live: Startseite + Anzeige-Hülle (P1). Dunkel, Grün #1dd75f als Akzent, Systemschrift, keine Fremd-Fonts. */
:root {
  --bg: #05060a; --bg2: #0b0e16; --ink: #f3f5f7; --mute: #9aa3b2; --line: rgba(255,255,255,.10); --glass: rgba(16,19,28,.72);
  --accent: #1dd75f; --accent-ink: #03140a; --violet: #8b5cff; --pink: #ff5fd2; --cyan: #46d9ff;
  --r: 18px; --font: -apple-system, "SF Pro Display", system-ui, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.nojs { position: fixed; inset: auto 0 40% 0; text-align: center; color: var(--mute); }

/* ───────── Startseite ───────── */
.landing { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; padding: 28px 16px 0;
  background: radial-gradient(60% 50% at 50% 30%, rgba(139,92,255,.16), transparent 70%), radial-gradient(50% 40% at 70% 80%, rgba(29,215,95,.10), transparent 70%), var(--bg);
  overflow-y: auto; }
body.on-display .landing { display: none; }
.l-wrap { width: 100%; max-width: 460px; margin: auto 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.landing h1 { margin: 22px 0 6px; font-size: clamp(34px, 7vw, 52px); font-weight: 850; letter-spacing: -.02em; }
.landing h1 span { color: var(--accent); }
.l-sub { margin: -18px auto 28px; max-width: 34em; color: var(--mute); font-size: 14.5px; line-height: 1.5; opacity: .85; }
.l-lead { margin: 0 0 30px; color: var(--mute); font-size: clamp(16px, 2.6vw, 19px); }
.l-actions { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.btn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 62px; padding: 0 22px; border-radius: var(--r);
  border: 1px solid var(--line); background: rgba(255,255,255,.06); font-size: 18px; font-weight: 700; cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.btn:hover { background: rgba(255,255,255,.10); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.primary:hover { background: #2be86f; }
.btn.small { min-height: 52px; font-size: 17px; }
.btn-ico { width: 22px; height: 22px; border-radius: 50%; flex: none; }
.btn-ico.sp { background: radial-gradient(circle at 50% 50%, transparent 38%, currentColor 39%, currentColor 46%, transparent 47%), radial-gradient(circle, currentColor 18%, transparent 19%); opacity: .9; }
.btn-ico.code { border-radius: 6px; border: 2px solid currentColor; opacity: .8; }
.l-soon { margin: 2px 0 4px; color: var(--mute); font-size: 15px; line-height: 1.45; }
.l-note { margin: 18px 0 0; color: var(--mute); font-size: 15px; }
.l-demo { margin-top: 22px; color: var(--mute); font-size: 15px; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.18); padding-bottom: 1px; }
.l-demo:hover { color: var(--ink); }
.l-foot { flex: none; padding: 26px 16px calc(18px + env(safe-area-inset-bottom)); text-align: center; color: #6c7484; font-size: 13px; }
.l-foot span { margin: 0 6px; }

/* Code-Eingabe: sechs Felder, darunter EIN echtes Eingabefeld (Einfügen „K7Q-4M2“, Tippen, Fernbedienung) */
.pair { position: relative; width: 100%; margin-top: 18px; padding: 18px; border-radius: 22px; background: var(--glass); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pair-label { font-size: 15px; color: var(--mute); }
.pair-label small { display: block; font-size: 13px; opacity: .8; margin-top: 2px; }
.cells { display: flex; align-items: center; gap: 8px; pointer-events: none; }
.cells span { width: 46px; height: 58px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  font: 800 28px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0; }
.cells span.cur { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(29,215,95,.25); }
.cells i { color: var(--mute); font-style: normal; font-weight: 700; }
.cells-input { position: absolute; left: 18px; right: 18px; top: 52px; height: 60px; opacity: 0; border: 0; cursor: text; }
.pair:focus-within .cells span.cur { border-color: var(--accent); }
.pair-msg { min-height: 1.3em; margin: 0; font-size: 14px; color: var(--mute); }
.pair-msg.ok { color: var(--accent); }

/* Magic-Kugel (CSS): Seifenblase mit Augen wie das HEY!go-Icon */
.orb { --s: 132px; position: relative; width: var(--s); height: var(--s); border-radius: 50%; flex: none;
  background: radial-gradient(85% 85% at 42% 36%, rgba(225,250,255,.55) 0%, rgba(140,222,255,.40) 45%, rgba(60,120,240,.55) 100%);
  box-shadow: 0 0 0 2px rgba(255,255,255,.18) inset, 0 18px 60px rgba(139,92,255,.35), 0 0 90px rgba(70,217,255,.18);
  overflow: hidden; animation: orb-breath 3.2s ease-in-out infinite; }
.orb i { position: absolute; width: 80%; height: 80%; border-radius: 50%; filter: blur(8px); opacity: .75; }
.orb .a1 { left: -12%; top: 18%; background: radial-gradient(circle, var(--violet), transparent 68%); animation: orb-a 7.5s ease-in-out infinite alternate; }
.orb .a2 { right: -14%; top: -10%; background: radial-gradient(circle, var(--pink), transparent 68%); animation: orb-b 9s ease-in-out infinite alternate; }
.orb .a3 { left: 16%; bottom: -22%; background: radial-gradient(circle, var(--cyan), transparent 66%); animation: orb-c 8.2s ease-in-out infinite alternate; }
.orb .eye { position: absolute; top: 40%; width: 17%; height: 23%; border-radius: 50%; background: radial-gradient(circle at 38% 30%, #fff 0 17%, transparent 19%), radial-gradient(circle at 62% 68%, rgba(255,255,255,.7) 0 8%, transparent 10%), #0b1020;
  animation: orb-blink 5.5s infinite; }
.orb .eye.l { left: 30%; } .orb .eye.r { right: 30%; }
.orb .shine { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(52% 38% at 33% 20%, rgba(255,255,255,.75), rgba(255,255,255,.18) 42%, transparent 72%), radial-gradient(100% 100% at 50% 50%, transparent 60%, rgba(255,255,255,.22) 100%); }
@keyframes orb-breath { 50% { transform: scale(1.035) translateY(-2px); } }
@keyframes orb-a { to { transform: translate(18%, -12%) scale(1.1); } }
@keyframes orb-b { to { transform: translate(-16%, 14%) scale(.95); } }
@keyframes orb-c { to { transform: translate(10%, -18%) scale(1.08); } }
@keyframes orb-blink { 0%, 93%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.orb.small { --s: 64px; }

/* ───────── Anzeige ───────── */
.display { position: fixed; inset: 0; background: #000; overflow: hidden; }
.display.cursor-off, .display.cursor-off * { cursor: none !important; }
.stage { position: absolute; inset: 0; overflow: hidden; contain: strict; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; pointer-events: none; }
/* Büro-Jam mit Ansicht (/jam?ansicht=…, eingebettet in HEY Desk): die Seite ist durchsichtig – „rahmen“/„oben“ liegen über dem Board */
html.durch, html.durch body, html.durch .display, html.durch .stage iframe { background: transparent; }
html.durch .stage iframe { color-scheme: light; }   /* gleiche Farbwelt wie die 3D-Seite – sonst malt der Browser dem iframe einen deckenden Grund */
html.durch .veil { display: none; }

.veil { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; text-align: center; padding: 24px;
  background: radial-gradient(50% 45% at 50% 45%, rgba(139,92,255,.14), transparent 70%), rgba(5,6,10,.86); transition: opacity .6s ease; z-index: 5; }
.veil.off { opacity: 0; pointer-events: none; }
.veil p { margin: 0; max-width: 560px; font-size: clamp(18px, 2.6vw, 28px); font-weight: 650; line-height: 1.35; }
.veil small { color: var(--mute); font-size: clamp(14px, 1.6vw, 18px); }
.veil .code-big { font: 800 clamp(28px, 4vw, 44px)/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .08em; color: var(--accent); }

.bar { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 12px; padding: calc(14px + env(safe-area-inset-top)) 18px 26px;
  background: linear-gradient(rgba(0,0,0,.62), rgba(0,0,0,0)); z-index: 10; transition: opacity .35s ease, transform .35s ease; }
.display.ui-hidden .bar { opacity: 0; transform: translateY(-10px); pointer-events: none; }
.display.ui-off .bar, .display.ui-off .toast { display: none; }
.status { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; font-size: 15px; font-weight: 600; color: rgba(255,255,255,.9); text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.status .dot { width: 10px; height: 10px; border-radius: 50%; background: #6c7484; flex: none; }
.status[data-s="live"] .dot { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.status[data-s="paused"] .dot, .status[data-s="waiting"] .dot, .status[data-s="connecting"] .dot { background: #f5c451; }
.status[data-s="offline"] .dot, .status[data-s="error"] .dot { background: #ff7a59; }
.status .txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg { display: flex; padding: 3px; border-radius: 14px; background: rgba(20,23,32,.78); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.seg button { border: 0; background: transparent; padding: 9px 14px; border-radius: 11px; font-size: 14px; font-weight: 650; color: rgba(255,255,255,.75); cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: rgba(255,255,255,.14); color: #fff; }
.ibtn { width: 44px; height: 44px; flex: none; border-radius: 14px; border: 1px solid var(--line); background: rgba(20,23,32,.78); display: grid; place-items: center; cursor: pointer;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.ibtn:hover { background: rgba(40,44,58,.9); }
/* „In VR ansehen“ – nur mit Brille sichtbar (WebXR) */
.vbtn { height: 44px; flex: none; padding: 0 16px; border-radius: 14px; border: 1px solid rgba(120,220,255,.45); background: rgba(20,23,32,.78); color: #eafaff; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap;
  box-shadow: 0 0 18px rgba(90,200,255,.22), inset 0 0 12px rgba(90,200,255,.10); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.vbtn[hidden] { display: none; }
.vbtn:hover, .vbtn[aria-pressed="true"] { background: rgba(40,60,80,.9); box-shadow: 0 0 26px rgba(90,200,255,.4), inset 0 0 14px rgba(90,200,255,.18); }
.row.master label { font-weight: 700; }
.row.master output { min-width: 5.6em; color: #fff; font-weight: 650; }
.ibtn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.spotify { position: absolute; left: 18px; bottom: calc(16px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: 12px;
  background: rgba(0,0,0,.45); font-size: 12px; color: rgba(255,255,255,.82); z-index: 9; transition: opacity .35s ease; max-width: min(420px, 70vw); }
.display.ui-hidden .spotify { opacity: .62; }
.spotify img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex: none; background: #222; }
.spotify b { display: block; font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spotify span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spotify em { font-style: normal; color: var(--accent); font-weight: 650; }

.toast { position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%) translateY(10px); padding: 10px 18px; border-radius: 14px; background: rgba(16,19,28,.86);
  border: 1px solid var(--line); font-size: 16px; font-weight: 650; opacity: 0; transition: opacity .25s ease, transform .25s ease; z-index: 12; pointer-events: none; }
.toast.on { opacity: 1; transform: translateX(-50%); }

/* Einstellungen */
.panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 100vw); padding: calc(18px + env(safe-area-inset-top)) 20px 24px; background: rgba(12,14,21,.92);
  border-left: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); z-index: 20; overflow-y: auto; transform: translateX(102%); transition: transform .3s ease; }
.panel.open { transform: none; }
.panel h2 { margin: 4px 0 18px; font-size: 20px; display: flex; align-items: center; justify-content: space-between; }
.panel h3 { margin: 22px 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); font-weight: 700; }
.panel .seg { width: 100%; }
.panel .seg button { flex: 1; }
.row { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
.row label, .row .lbl { flex: 1; font-size: 15px; }
.row output { min-width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; color: var(--mute); font-size: 14px; }
.row input[type=range] { flex: 1.4; accent-color: var(--accent); height: 28px; }
.step { display: flex; align-items: center; gap: 8px; }
.step button { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.06); font-size: 20px; font-weight: 700; cursor: pointer; }
.step output { min-width: 4.6em; text-align: center; }
.switch { position: relative; width: 50px; height: 30px; flex: none; border-radius: 15px; border: 1px solid var(--line); background: rgba(255,255,255,.12); cursor: pointer; padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s ease; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.hint { margin: 4px 0 0; font-size: 13px; color: var(--mute); line-height: 1.45; }
.panel .btn { min-height: 50px; font-size: 16px; margin-top: 26px; }
.sliders[data-follow="true"] input[type=range], .master[data-follow="true"] input[type=range] { opacity: .55; }

@media (max-width: 640px) {
  .bar { flex-wrap: wrap; gap: 8px; padding-left: 14px; padding-right: 14px; }
  .bar .seg { order: 3; flex-basis: 100%; }
  .bar .seg button { flex: 1; padding: 8px 6px; font-size: 13px; }
  .ibtn { width: 40px; height: 40px; }
}
/* Ton-Sync-Leiste unten (groß, fingerfreundlich, blendet mit der oberen Leiste aus) */
.tbar { position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 10px; z-index: 10; transition: opacity .35s ease, transform .35s ease; max-width: calc(100vw - 32px); }
.display.ui-hidden .tbar { opacity: 0; transform: translateX(-50%) translateY(10px); pointer-events: none; }
.display.ui-off .tbar { display: none; }
.tbtn { min-height: 52px; min-width: 52px; padding: 0 18px; border-radius: 16px; border: 1px solid var(--line); background: rgba(20,23,32,.78); color: #fff; font-size: 16px; font-weight: 700;
  cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: inline-flex; align-items: center; gap: 10px; touch-action: manipulation; font-variant-numeric: tabular-nums; }
.tbtn:hover { background: rgba(40,44,58,.9); }
.tbtn.ton .mic { width: 10px; height: 10px; border-radius: 50%; background: #6c7484; flex: none; }
.tbtn.ton[aria-pressed="true"] { border-color: var(--accent); }
.tbtn.ton[aria-pressed="true"] .mic { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.tinfo { flex-basis: 100%; text-align: center; font-size: 13px; font-weight: 600; color: rgba(255,255,255,.8); text-shadow: 0 1px 6px rgba(0,0,0,.7); min-height: 1em; }
.tinfo:empty { display: none; }
.toast { bottom: calc(120px + env(safe-area-inset-bottom)); max-width: calc(100vw - 32px); text-align: center; }
@media (max-width: 640px) { .spotify { bottom: calc(118px + env(safe-area-inset-bottom)); } .tbtn { min-height: 56px; padding: 0 16px; font-size: 15px; } .tbar { gap: 8px; } }

@media (prefers-reduced-motion: reduce) {
  .orb, .orb i, .orb .eye { animation: none; }
}
