@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@300;400;500;600&family=Orbitron:wght@500;700&display=swap');

/* =====================================================================
   kreimer.ch · Members Lounge – Design
   ===================================================================== */
:root {
  --bg: #02060f;
  --bg2: #050d1c;
  --panel: rgba(6, 16, 34, 0.66);
  --panel-solid: #071327;
  --line: rgba(86, 170, 255, 0.28);
  --line-strong: rgba(110, 190, 255, 0.65);
  --cyan: #4fc3ff;
  --blue: #2f7bff;
  --amber: #ffb35c;
  --silver: #dfe9f7;
  --text: #e8f1ff;
  --muted: #8aa3c4;
  --danger: #ff5c7a;
  --ok: #43e0a6;
  --accent: var(--cyan);
  --radius: 14px;
  --glow: 0 0 0 1px var(--line), 0 0 24px rgba(47, 123, 255, 0.18), inset 0 0 30px rgba(79, 195, 255, 0.05);
  --font: 'Exo 2', 'Segoe UI', system-ui, sans-serif;
  --font-tech: 'Orbitron', 'Exo 2', sans-serif;
}
.hue-amber { --accent: var(--amber); }
.hue-cyan { --accent: #5ff0ff; }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
/* Kein Zoomen: kein Doppeltipp-Zoom, keine automatische Textvergrösserung */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: manipulation; }
input, select, textarea, button { touch-action: manipulation; }
:where(input:not([type=checkbox]):not([type=radio]), select, textarea) { font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { color: #fff; }
[hidden] { display: none !important; }
.ic { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex: none; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
::selection { background: rgba(79, 195, 255, 0.35); }

/* Glas-Paneele mit HUD-Look */
.glass {
  background: linear-gradient(160deg, rgba(14, 34, 68, 0.72), rgba(4, 12, 26, 0.78));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--glow), 0 20px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.kicker {
  font-family: var(--font-tech);
  font-size: 11px;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex; align-items: center; gap: 10px;
}
h1, h2, h3 { font-weight: 300; letter-spacing: 0.02em; margin: 0; }
h1 {
  font-size: clamp(30px, 4vw, 46px);
  background: linear-gradient(180deg, #ffffff 0%, #cfdcee 45%, #8ea6c4 60%, #e9f2ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 30px rgba(79, 195, 255, 0.15);
}
.lead { color: #b9cbe4; margin: 8px 0 0; }
.empty { color: var(--muted); text-align: center; padding: 28px 10px; margin: 0; }

/* Buttons */
.btn {
  --b: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 13px/1 var(--font);
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text);
  background: rgba(10, 30, 60, 0.6);
  border: 1px solid var(--b);
  border-radius: 9px;
  padding: 13px 22px;
  cursor: pointer;
  transition: 0.2s;
  position: relative; overflow: hidden;
}
.btn:hover { border-color: var(--accent); box-shadow: 0 0 18px rgba(79, 195, 255, 0.35); color: #fff; }
.btn.primary {
  background: linear-gradient(180deg, rgba(47, 123, 255, 0.55), rgba(16, 52, 120, 0.7));
  border-color: rgba(120, 200, 255, 0.8);
  box-shadow: 0 0 22px rgba(47, 123, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn.primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.25) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform 0.7s;
}
.btn.primary:hover::after { transform: translateX(120%); }
.btn.danger { --b: rgba(255, 92, 122, 0.6); color: #ffd3dc; }
.btn.danger:hover { border-color: var(--danger); box-shadow: 0 0 18px rgba(255, 92, 122, 0.35); }
.btn.small { padding: 9px 14px; font-size: 11px; }
.btn.link { background: none; border: 0; color: var(--muted); letter-spacing: 0.08em; text-transform: none; font-weight: 400; padding: 10px; }
.btn.link:hover { color: var(--cyan); box-shadow: none; }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn.busy::before {
  content: ''; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3); border-top-color: #fff; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 9px;
  border: 1px solid var(--line); background: rgba(8, 22, 46, 0.6); color: var(--silver);
  cursor: pointer; transition: 0.2s;
}
.icon-btn:hover { border-color: var(--cyan); color: #fff; box-shadow: 0 0 14px rgba(79, 195, 255, 0.35); }
.icon-btn.danger:hover { border-color: var(--danger); color: var(--danger); box-shadow: 0 0 14px rgba(255, 92, 122, 0.35); }
.linkish { background: none; border: 0; padding: 0; color: var(--cyan); cursor: pointer; font: inherit; font-size: 13px; }
.linkish:hover { color: #fff; text-decoration: underline; }
.linkish.danger { color: var(--danger); }
form.inline { display: inline; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font: 500 12px/1 var(--font); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--silver); padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(8, 22, 46, 0.6);
  cursor: pointer; transition: 0.2s;
}
.chip:hover { border-color: var(--cyan); color: #fff; }
.chip.accent { border-color: rgba(255, 179, 92, 0.6); color: var(--amber); }
.chip.tiny { padding: 3px 7px; font-size: 10px; }
.chip.logout:hover { border-color: var(--danger); color: #ffd3dc; }
.badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
  font: 700 10px/1 var(--font); color: #02060f; background: var(--amber);
  border-radius: 999px; box-shadow: 0 0 10px rgba(255, 179, 92, 0.6);
}
.logout-form { display: inline; margin: 0; }

/* Formularfelder */
.field { display: block; margin: 0 0 16px; }
.field > span { display: block; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.field small { text-transform: none; letter-spacing: 0; opacity: 0.8; }
.field input, .input, textarea, select.input {
  width: 100%;
  font: 400 16px/1.4 var(--font);
  color: var(--text);
  background: rgba(2, 10, 24, 0.7);
  border: 1px solid rgba(86, 170, 255, 0.3);
  border-radius: 9px;
  padding: 12px 14px;
  outline: none;
  transition: 0.2s;
}
textarea { resize: vertical; min-height: 90px; }
.field input:focus, .input:focus, textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(79, 195, 255, 0.15), 0 0 18px rgba(79, 195, 255, 0.25);
}
.code-input { font-family: var(--font-tech) !important; font-size: 24px !important; letter-spacing: 0.45em; text-align: center; }
.msg { min-height: 1.2em; margin: 0 0 12px; color: #ff9fb2; font-size: 14px; }
.msg.info { color: var(--amber); }
.radio, .check { display: flex; align-items: center; gap: 10px; padding: 7px 0; cursor: pointer; color: var(--silver); }
.radio input, .check input { accent-color: var(--cyan); width: 17px; height: 17px; }
.check.tiny { font-size: 12px; padding: 0 0 6px; }

/* =====================================================================
   Kino-Bühne (Startseite & Lounge)
   ===================================================================== */
body.cinema { overflow: hidden; height: 100vh; height: 100dvh; background: #000; }
.stage-wrap { position: fixed; inset: 0; overflow: hidden; background: radial-gradient(circle at 50% 40%, #0a1d3c, #01040b 70%); }
.stage { position: absolute; background-size: cover; background-position: center; }
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hotspots { position: absolute; inset: 0; pointer-events: none; }
.hotspots.live { pointer-events: auto; }
.hotspot {
  position: absolute; display: block;
  border: 0; padding: 0; margin: 0; background: transparent;
  border-radius: 12px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow 0.25s, background 0.25s;
}
.hotspots.live .hotspot:hover, .hotspot:focus-visible {
  outline: none;
  background: rgba(79, 195, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(140, 210, 255, 0.85), 0 0 26px rgba(79, 195, 255, 0.55), inset 0 0 22px rgba(79, 195, 255, 0.25);
}
.stage-ended .hs-press { animation: pressPulse 2.4s ease-in-out infinite; }
@keyframes pressPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(79, 195, 255, 0); }
  50% { box-shadow: 0 0 0 1px rgba(140, 210, 255, 0.5), 0 0 30px rgba(79, 195, 255, 0.45); }
}

.cinema-ui { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); display: flex; gap: 10px; z-index: 5; }
.ghost-btn {
  font: 500 12px/1 var(--font); letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(232, 241, 255, 0.75); background: rgba(2, 8, 20, 0.45);
  border: 1px solid rgba(120, 190, 255, 0.3); border-radius: 999px;
  padding: 10px 16px; cursor: pointer; backdrop-filter: blur(6px); transition: 0.3s;
}
.ghost-btn:hover { color: #fff; border-color: var(--cyan); }
.ghost-btn.round { width: 40px; height: 40px; padding: 0; font-size: 16px; letter-spacing: 0; }
.ghost-btn.gone { opacity: 0; pointer-events: none; }
.ghost-btn.round.attention {
  width: auto; padding: 0 16px; font-size: 13px; letter-spacing: 0.08em; color: #fff;
  border-color: var(--cyan); animation: pressPulse 1.8s ease-in-out infinite;
}

.play-overlay {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 6;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font: 600 13px/1 var(--font); letter-spacing: 0.4em; text-transform: uppercase; color: #fff;
  background: none; border: 0; cursor: pointer;
}
.play-overlay span {
  width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; font-size: 34px; padding-left: 6px;
  background: rgba(6, 20, 44, 0.55); border: 1px solid rgba(140, 210, 255, 0.8);
  box-shadow: 0 0 0 8px rgba(79, 195, 255, 0.08), 0 0 40px rgba(79, 195, 255, 0.6); backdrop-filter: blur(6px);
  animation: pressPulse 2.4s ease-in-out infinite;
}
.play-overlay:hover span { background: rgba(47, 123, 255, 0.45); }
.play-overlay small { font: 400 10px/1 var(--font); letter-spacing: 0.3em; color: var(--muted); }
body.await-play .stage-wrap { cursor: pointer; }
body.await-play .stage::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(2, 6, 15, 0.15), rgba(2, 6, 15, 0.6)); }

body.warp .stage-wrap { animation: warp 0.7s ease-in forwards; }
@keyframes warp { to { transform: scale(1.25); filter: brightness(2.2) blur(6px); opacity: 0; } }

/* Lounge-Leiste */
.lounge-bar {
  position: fixed; top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right));
  z-index: 5; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 999px;
}
@media (max-aspect-ratio: 1/1) {
  .lounge-bar { top: auto; right: auto; left: max(14px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom)); }
}
.who { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--silver); letter-spacing: 0.05em; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.lounge-fallback { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.lounge-fallback a:focus { position: fixed; top: 10px; left: 10px; width: auto; height: auto; clip: auto; }

/* Login-Modal */
.modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(4, 16, 40, 0.55), rgba(0, 0, 0, 0.82)); opacity: 0; transition: opacity 0.3s; }
.modal.open .modal-backdrop { opacity: 1; }
.auth-panel {
  position: relative; width: min(440px, 100%); max-height: calc(100dvh - 32px); overflow: hidden auto;
  scrollbar-width: thin; scrollbar-color: rgba(79, 195, 255, 0.4) transparent;
  padding: 34px 32px 28px;
  opacity: 0; transform: translateY(18px) scale(0.97); transition: 0.35s cubic-bezier(.2, .8, .2, 1);
}
.auth-panel.static, .modal.open .auth-panel { opacity: 1; transform: none; }
.auth-panel h1, .auth-panel h2 { font-size: 30px; margin: 8px 0 20px; }
.auth-panel h2 { color: var(--silver); }
.auth-panel .lead { margin: -8px 0 20px; font-size: 15px; }
.auth-panel .btn.primary { width: 100%; }
.auth-panel .fine { text-align: center; color: var(--muted); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; margin: 18px 0 0; }
.panel-close { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: var(--muted); font-size: 26px; cursor: pointer; line-height: 1; }
.panel-close:hover { color: #fff; }
.hud-corner { position: absolute; width: 18px; height: 18px; border: 2px solid var(--cyan); opacity: 0.8; pointer-events: none; }
.hud-corner.tl { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: var(--radius); }
.hud-corner.tr { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: var(--radius); }
.hud-corner.bl { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: var(--radius); }
.hud-corner.br { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: var(--radius); }
.auth-panel::before {
  content: ''; position: absolute; left: 10%; right: 10%; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}
.qr-wrap { display: grid; place-items: center; margin: 0 0 12px; }
.qr { width: 190px; height: 190px; padding: 10px; background: #fff; border-radius: 12px; box-shadow: 0 0 30px rgba(79, 195, 255, 0.35); color: #000; font-size: 13px; display: grid; place-items: center; text-align: center; }
.qr svg { width: 100%; height: 100%; }
.secret { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.secret code { color: var(--cyan); font-size: 13px; letter-spacing: 0.08em; word-break: break-all; }
.pulse-ring { width: 74px; height: 74px; margin: 6px auto 18px; border-radius: 50%; border: 2px solid var(--ok); box-shadow: 0 0 24px rgba(67, 224, 166, 0.5); position: relative; }
.pulse-ring::after { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--ok); font-size: 32px; }
.pulse-ring::before { content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--ok); animation: ring 1.8s ease-out infinite; }
@keyframes ring { to { transform: scale(1.7); opacity: 0; } }
[data-step="done"] { text-align: center; }
.shake { animation: shake 0.4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* =====================================================================
   Innenseiten
   ===================================================================== */
body.inner { min-height: 100vh; overflow-x: hidden; }
.scene { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.scene-bg {
  position: absolute; inset: -30px; background-size: cover; background-position: center;
  filter: blur(18px) brightness(0.32) saturate(1.3);
  transform: scale(1.06);
}
.hue-amber .scene-bg { filter: blur(18px) brightness(0.3) saturate(1.2) hue-rotate(-10deg) sepia(0.15); }
.scene-grid {
  position: absolute; inset: 0;
  background:
    linear-gradient(rgba(79, 195, 255, 0.06) 1px, transparent 1px) 0 0 / 46px 46px,
    linear-gradient(90deg, rgba(79, 195, 255, 0.06) 1px, transparent 1px) 0 0 / 46px 46px;
  mask-image: radial-gradient(ellipse at 50% 100%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 100%, #000 10%, transparent 70%);
  transform: perspective(600px) rotateX(55deg) translateY(30%) scale(2);
  transform-origin: 50% 100%;
}
.scene-rings {
  position: absolute; width: 120vmax; height: 120vmax; top: 50%; left: 50%; transform: translate(-50%, -50%);
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 60px, rgba(79, 195, 255, 0.05) 61px 62px, transparent 63px 120px);
  animation: rings 60s linear infinite;
}
.side-left .scene-rings { left: 22%; }
.side-right .scene-rings { left: 78%; }
@keyframes rings { to { transform: translate(-50%, -50%) rotate(360deg); } }
.scene-figure {
  position: absolute; bottom: 0; height: 100vh; width: auto; max-width: none;
  aspect-ratio: 9 / 16; object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
  animation: figIn 1.2s cubic-bezier(.2, .8, .2, 1) both;
}
.side-right .scene-figure {
  right: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 32%), linear-gradient(0deg, transparent 0%, #000 18%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 32%), linear-gradient(0deg, transparent 0%, #000 18%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
.side-left .scene-figure {
  left: 0;
  -webkit-mask-image: linear-gradient(270deg, transparent 0%, #000 32%), linear-gradient(0deg, transparent 0%, #000 18%);
  mask-image: linear-gradient(270deg, transparent 0%, #000 32%), linear-gradient(0deg, transparent 0%, #000 18%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
.fig-wide .scene-figure { aspect-ratio: 4 / 5; object-position: 38% 30%; height: 100vh; }
@keyframes figIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
.scene-scan {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px);
}
.scene-figure { z-index: 2; }
.scene-scan { z-index: 3; }
.scene::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(ellipse at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
}

/* Kopfzeile */
.topbar {
  position: sticky; top: 10px; z-index: 10;
  margin: 10px auto 0; width: calc(100% - 20px); max-width: 1500px;
  display: flex; align-items: center; gap: 18px; padding: 10px 14px 10px 20px;
  border-radius: 16px;
}
.brand { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--font); font-weight: 600; font-size: 24px; letter-spacing: 0.01em;
  background: linear-gradient(180deg, #fff, #b8c8de 55%, #e6efff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-sub { font-size: 9px; letter-spacing: 0.5em; text-transform: uppercase; color: var(--muted); margin-top: 5px; }
.mainnav { display: flex; gap: 4px; margin: 0 auto; flex-wrap: wrap; }
.mainnav a {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  color: var(--muted); padding: 10px 14px; border-radius: 10px;
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; transition: 0.2s;
}
.mainnav a:hover { color: #fff; background: rgba(79, 195, 255, 0.08); }
.mainnav a.active { color: #fff; background: rgba(47, 123, 255, 0.18); box-shadow: inset 0 0 0 1px rgba(110, 190, 255, 0.45), 0 0 16px rgba(47, 123, 255, 0.25); }
.mainnav a.active::after { content: ''; position: absolute; left: 20%; right: 20%; bottom: -1px; height: 2px; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.mainnav .badge { position: absolute; top: 2px; right: 2px; }
.userbox { display: flex; align-items: center; gap: 12px; }

/* Inhalt */
.content {
  position: relative; z-index: 2;
  width: 100%; max-width: 1500px; margin: 0 auto;
  padding: 34px 28px 40px;
}
.side-right .content { padding-right: calc(min(56.25vh, 40vw) - 60px); }
.side-left .content { padding-left: calc(min(56.25vh, 40vw) - 60px); }
.fig-wide.side-right .content { padding-right: calc(min(80vh, 42vw) - 80px); }
.content.narrow { max-width: 520px; padding: 8vh 16px; }
.page-title { margin: 0 0 24px; }
.page-title h1 { margin-top: 10px; }
.flash { padding: 13px 18px; border-radius: 10px; margin: 0 0 18px; border: 1px solid rgba(67, 224, 166, 0.45); background: rgba(10, 50, 40, 0.55); color: #c9ffe9; backdrop-filter: blur(8px); }
.flash.err { border-color: rgba(255, 92, 122, 0.5); background: rgba(60, 10, 22, 0.6); color: #ffd3dc; }
.panel { padding: 24px 26px; margin: 0 0 28px; position: relative; }
.panel::before { content: ''; position: absolute; left: 24px; top: -1px; width: 60px; height: 2px; background: var(--accent); box-shadow: 0 0 10px var(--accent); border-radius: 2px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-title { font-size: 18px; font-weight: 400; color: var(--silver); letter-spacing: 0.06em; margin: 0 0 14px; display: flex; align-items: baseline; gap: 10px; }
.panel-head .panel-title { margin: 0; }
.panel-title small { font-size: 12px; color: var(--muted); font-family: var(--font-tech); }
.foot { position: relative; z-index: 2; text-align: center; padding: 10px 10px 24px; color: #4d6a8f; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; }

/* Tabs */
.tabs { display: flex; gap: 6px; margin: 0 0 18px; flex-wrap: wrap; }
.tabs a { padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line); background: rgba(6, 16, 34, 0.6); color: var(--muted); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; display: inline-flex; gap: 8px; align-items: center; }
.tabs a.active { color: #fff; border-color: var(--line-strong); box-shadow: 0 0 14px rgba(47, 123, 255, 0.3); }
.tabs.small { margin: 0; }
.tabs.small a { padding: 7px 12px; font-size: 11px; }

/* Dropzone */
.dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dz-label {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 26px 16px; border: 1.5px dashed rgba(110, 190, 255, 0.45); border-radius: 12px;
  background: rgba(2, 10, 24, 0.45); cursor: pointer; transition: 0.25s;
}
.dz-label .ic { width: 34px; height: 34px; color: var(--accent); filter: drop-shadow(0 0 8px var(--accent)); }
.dz-label strong { font-weight: 500; font-size: 17px; letter-spacing: 0.04em; }
.dz-label span { color: var(--muted); font-size: 13px; }
.dz-label em { font-style: normal; color: var(--cyan); font-size: 13px; word-break: break-word; }
.dz-label:hover, .dz-label.drag { border-color: var(--cyan); background: rgba(47, 123, 255, 0.1); box-shadow: inset 0 0 30px rgba(79, 195, 255, 0.12); }
.dz-label.has-files { border-style: solid; }
.dz-label.too-big { border-color: var(--danger); }
.dz-label.too-big em { color: #ff9fb2; }
.dz-row { display: flex; gap: 10px; margin-top: 14px; }
.dz-row.end { justify-content: flex-end; }
.dz-row .input { flex: 1; }
.dz-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: 14px; }
.dz-vis { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(2, 10, 24, 0.4); }
.dz-vis summary { cursor: pointer; color: var(--silver); font-size: 14px; }
.vis-title { color: var(--silver); font-size: 14px; margin-bottom: 4px; }
.vis-users { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 12px; margin: 6px 0 4px 26px; padding: 8px 12px; border-left: 1px solid var(--line); }

/* Dateiliste (Docs) */
.filelist { list-style: none; margin: 0; padding: 0; }
.filelist li { display: flex; align-items: center; gap: 14px; padding: 12px 6px; border-bottom: 1px solid rgba(86, 170, 255, 0.12); }
.filelist li:last-child { border-bottom: 0; }
.ftype {
  flex: none; width: 52px; height: 52px; border-radius: 10px; display: grid; place-items: center;
  font: 700 10px/1 var(--font-tech); letter-spacing: 0.06em; color: #fff;
  background: linear-gradient(160deg, rgba(47, 123, 255, 0.5), rgba(10, 30, 70, 0.7));
  border: 1px solid rgba(110, 190, 255, 0.5);
}
.ftype.pdf { background: linear-gradient(160deg, rgba(255, 92, 122, 0.55), rgba(70, 10, 30, 0.7)); border-color: rgba(255, 140, 160, 0.5); }
.ftype.sheet { background: linear-gradient(160deg, rgba(67, 224, 166, 0.5), rgba(10, 60, 45, 0.7)); border-color: rgba(120, 240, 190, 0.5); }
.ftype.slide { background: linear-gradient(160deg, rgba(255, 179, 92, 0.55), rgba(80, 40, 10, 0.7)); border-color: rgba(255, 200, 130, 0.5); }
.ftype.img { background: linear-gradient(160deg, rgba(180, 120, 255, 0.5), rgba(40, 20, 80, 0.7)); border-color: rgba(200, 160, 255, 0.5); }
.fmeta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fname { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fname:hover { color: var(--cyan); }
.fsub { color: var(--muted); font-size: 13px; }
.fsub b { color: var(--silver); font-weight: 500; }
.fnote { color: #b9cbe4; font-size: 13px; font-style: italic; }
.factions { display: flex; gap: 8px; }
.factions form { margin: 0; }

/* Galerie */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 20px; margin-top: 6px; }
.gitem { margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: rgba(2, 10, 24, 0.6); position: relative; transition: 0.3s; }
.gitem:hover { border-color: var(--line-strong); box-shadow: 0 0 24px rgba(47, 123, 255, 0.3); transform: translateY(-2px); }
.gitem > a { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #000; }
.gitem img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s; }
.gitem:hover img { transform: scale(1.05); }
.gitem figcaption { padding: 10px 12px 4px; display: flex; flex-direction: column; gap: 3px; }
.gtitle { font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gsub { font-size: 12px; color: var(--muted); }
.gactions { display: flex; gap: 6px; padding: 6px 12px 12px; }
.gactions form { margin: 0; }
.gactions .icon-btn { width: 32px; height: 32px; }
.vis-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; letter-spacing: 0.06em; color: var(--muted); }
.vis-tag.vis-all { color: var(--ok); }
.vis-tag.vis-custom { color: var(--cyan); }
.vis-tag.vis-private, .vis-tag.vis-none { color: var(--amber); }

/* Dialoge */
dialog.dlg { color: var(--text); padding: 24px; width: min(520px, calc(100vw - 32px)); border-radius: var(--radius); }
dialog.dlg::backdrop { background: rgba(0, 4, 12, 0.75); backdrop-filter: blur(3px); }
dialog.dlg h3 { font-size: 20px; margin-bottom: 4px; color: var(--silver); }
dialog.dlg .muted { margin: 0 0 14px; font-size: 13px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0, 3, 10, 0.92); display: grid; place-items: center; opacity: 0; transition: opacity 0.25s; }
.lightbox.open { opacity: 1; }
.lightbox img { max-width: 92vw; max-height: 84vh; border-radius: 10px; box-shadow: 0 0 0 1px var(--line), 0 0 60px rgba(47, 123, 255, 0.3); }
.lightbox button { position: absolute; background: rgba(6, 16, 34, 0.7); border: 1px solid var(--line); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 28px; cursor: pointer; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; }
.lb-next { right: 16px; top: 50%; }
.lb-cap { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: var(--silver); letter-spacing: 0.08em; }

/* Nachrichten */
.msg-layout.with-list { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: start; }
.convo-list { padding: 18px 12px; }
.convo-list .panel-title { padding: 0 10px; }
.convo { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; color: var(--text); }
.convo:hover { background: rgba(79, 195, 255, 0.08); color: #fff; }
.convo.active { background: rgba(47, 123, 255, 0.18); box-shadow: inset 0 0 0 1px rgba(110, 190, 255, 0.4); }
.cname { flex: 1; display: flex; flex-direction: column; font-size: 14px; min-width: 0; }
.cname small { color: var(--muted); font-size: 11px; }
.avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; color: #fff; background: linear-gradient(160deg, var(--blue), #0b2a4d); box-shadow: 0 0 0 1px rgba(110, 190, 255, 0.6), 0 0 12px rgba(47, 123, 255, 0.4); }
.avatar.big { width: 52px; height: 52px; font-size: 20px; }
.chat { display: flex; flex-direction: column; }
.chat-log { max-height: 56vh; min-height: 200px; overflow-y: auto; padding: 6px 4px 16px; display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: 78%; padding: 12px 16px; border-radius: 14px; position: relative; }
.bubble.in { align-self: flex-start; background: rgba(12, 30, 60, 0.85); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.out { align-self: flex-end; background: linear-gradient(160deg, rgba(47, 123, 255, 0.45), rgba(16, 52, 120, 0.65)); border: 1px solid rgba(120, 200, 255, 0.55); border-bottom-right-radius: 4px; box-shadow: 0 0 16px rgba(47, 123, 255, 0.25); }
.btext { white-space: pre-wrap; word-wrap: break-word; }
.bmeta { font-size: 11px; color: var(--muted); margin-top: 6px; letter-spacing: 0.05em; }
.bubble.out .bmeta { color: #b9d5ff; }
.composer { display: flex; gap: 10px; align-items: flex-end; border-top: 1px solid var(--line); padding-top: 14px; }
.composer textarea { flex: 1; min-height: 70px; }

/* Download */
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.dl-card { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 12px; border: 1px solid var(--line); background: rgba(2, 10, 24, 0.55); transition: 0.25s; }
.dl-card:hover { border-color: var(--line-strong); box-shadow: 0 0 22px rgba(47, 123, 255, 0.25); }
.dl-icon { display: flex; align-items: center; gap: 10px; color: var(--accent); font: 700 11px/1 var(--font-tech); letter-spacing: 0.12em; }
.dl-icon .ic { width: 30px; height: 30px; padding: 6px; border: 1px solid currentColor; border-radius: 9px; box-shadow: 0 0 12px currentColor; }
.dl-body h3 { font-size: 18px; color: var(--text); margin-bottom: 4px; }
.dl-body p { margin: 0 0 6px; color: #b9cbe4; font-size: 14px; }
.dl-body .vis-tag { margin-top: 6px; display: flex; }
.dl-actions { display: flex; gap: 8px; align-items: center; margin-top: auto; }
.dl-actions form { margin: 0; }

/* Admin */
.cards { display: grid; gap: 12px; }
.ucard { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border: 1px solid rgba(255, 179, 92, 0.45); border-radius: 12px; background: rgba(40, 24, 6, 0.3); flex-wrap: wrap; }
.ubody { flex: 1; min-width: 180px; }
.ubody h3 { font-size: 18px; color: var(--text); }
.ubody p { margin: 2px 0; color: #b9cbe4; }
.uactions { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.uactions form { margin: 0; display: flex; flex-direction: column; align-items: flex-start; }
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 500; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 11px 12px; border-bottom: 1px solid rgba(86, 170, 255, 0.1); vertical-align: top; }
.tbl tr:hover td { background: rgba(79, 195, 255, 0.04); }
.row-actions { white-space: nowrap; display: flex; gap: 14px; }
.status { font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid; }
.status.s-active { color: var(--ok); border-color: rgba(67, 224, 166, 0.5); }
.status.s-blocked { color: var(--danger); border-color: rgba(255, 92, 122, 0.5); }
.ev { font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--silver); white-space: nowrap; }
.ev-login .ev { color: var(--cyan); border-color: rgba(79, 195, 255, 0.55); }
.ev-logout .ev, .ev-timeout .ev { color: #9aa9bf; }
.ev-login_fail .ev, .ev-blocked .ev, .ev-rejected .ev, .ev-deleted .ev { color: var(--danger); border-color: rgba(255, 92, 122, 0.5); }
.ev-register .ev, .ev-invite .ev { color: var(--amber); border-color: rgba(255, 179, 92, 0.5); }
.ev-approved .ev { color: var(--ok); border-color: rgba(67, 224, 166, 0.5); }
.inline-filter select { width: auto; padding: 8px 12px; font-size: 16px; }

/* =====================================================================
   Responsive
   ===================================================================== */
/* Ordner */
.page-docs { --area: 110, 168, 255; }
.page-galerie { --area: 192, 139, 255; }
.page-download { --area: 67, 224, 166; }
.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; margin-top: 4px; }
.folder-card {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  padding: 14px 14px 12px; border-radius: 12px; color: var(--text);
  background: linear-gradient(160deg, rgba(var(--area, 79, 195, 255), 0.16), rgba(2, 10, 24, 0.6));
  border: 1px solid rgba(var(--area, 79, 195, 255), 0.4); transition: 0.2s;
}
.folder-card:hover { color: #fff; transform: translateY(-2px); border-color: rgb(var(--area, 79, 195, 255)); box-shadow: 0 0 20px rgba(var(--area, 79, 195, 255), 0.35); }
.folder-card .folder-ic, .folder-title .folder-ic { color: rgb(var(--area, 79, 195, 255)); filter: drop-shadow(0 0 6px rgba(var(--area, 79, 195, 255), 0.6)); }
.folder-card .folder-ic .ic { width: 30px; height: 30px; }
.folder-name { font-size: 16px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-meta { font-size: 12px; color: var(--muted); }
.folder-card .vis-tag, .folder-head .vis-tag { font-size: 11px; }
.vis-tag.vis-private { color: var(--amber); }
.folder-head { padding: 16px 20px; }
.back-link { display: inline-block; font-size: 13px; letter-spacing: 0.08em; margin-bottom: 10px; color: rgb(var(--area, 79, 195, 255)); }
.folder-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.folder-title .folder-ic .ic { width: 40px; height: 40px; }
.folder-title h2 { font-size: 22px; color: #fff; font-weight: 400; }
.folder-title > div:nth-child(2) { flex: 1; min-width: 160px; }
.folder-actions { display: flex; gap: 8px; }
.folder-actions form { margin: 0; }
.empty.small { padding: 10px 4px; text-align: left; font-size: 14px; }
.small-note { font-size: 12px; margin: 10px 0 0; }
dialog.dlg .field { margin-top: 12px; }
.move-form { margin: 0; }
.move-select {
  max-width: 150px; height: 36px; padding: 0 8px; border-radius: 9px; font: 400 12px var(--font);
  color: var(--silver); background: rgba(8, 22, 46, 0.8); border: 1px solid var(--line); cursor: pointer;
  font-size: 16px;
}
.gactions { flex-wrap: wrap; }
.gactions .move-select { height: 32px; max-width: 120px; }

/* ===== Galerie: Medienarten mit eigenen Farben ===== */
.kind-mixed { --area: 79, 195, 255; }
.kind-photo { --area: 192, 139, 255; }
.kind-video { --area: 255, 92, 140; }
.kind-audio { --area: 255, 190, 80; }
.kind-all { --area: 79, 195, 255; }
.kind-tag { font-size: 11px; letter-spacing: 0.06em; color: rgb(var(--area)); font-weight: 600; }
.folder-head .kind-tag { font-size: 12px; }

/* Ordner-Art wählen */
.kind-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 6px 0 14px; }
.kind-opt { position: relative; cursor: pointer; }
.kind-opt input { position: absolute; opacity: 0; pointer-events: none; }
.kind-opt span {
  display: block; text-align: center; padding: 10px 6px; border-radius: 10px; font-size: 14px;
  color: rgb(var(--area)); background: rgba(var(--area), 0.08); border: 1px solid rgba(var(--area), 0.35); transition: 0.2s;
}
.kind-opt input:checked + span { color: #fff; background: rgba(var(--area), 0.35); border-color: rgb(var(--area)); box-shadow: 0 0 14px rgba(var(--area), 0.45); }

/* Suche / Sortierung / Filter */
.media-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.search-box { position: relative; flex: 1 1 260px; display: flex; align-items: center; }
.search-box .search-ic { position: absolute; left: 12px; opacity: 0.7; pointer-events: none; }
.search-box input {
  width: 100%; padding: 11px 36px 11px 38px; border-radius: 999px; color: var(--text);
  background: rgba(2, 10, 24, 0.7); border: 1px solid rgba(86, 170, 255, 0.35); outline: none; font-family: var(--font);
}
.search-box input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(79, 195, 255, 0.15); }
.search-clear { position: absolute; right: 12px; font-size: 22px; line-height: 1; color: var(--muted); }
.sort-box { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.sort-box select { padding: 10px 12px; border-radius: 10px; color: var(--text); background: rgba(2, 10, 24, 0.7); border: 1px solid rgba(86, 170, 255, 0.35); font-family: var(--font); }
.kind-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.kchip {
  padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; letter-spacing: 0.04em;
  color: rgb(var(--area)); background: rgba(var(--area), 0.1); border: 1px solid rgba(var(--area), 0.4);
}
.kchip:hover { color: #fff; background: rgba(var(--area), 0.22); }
.kchip.active { color: #fff; background: rgba(var(--area), 0.38); border-color: rgb(var(--area)); box-shadow: 0 0 14px rgba(var(--area), 0.4); }

/* Kacheln je Medienart */
.gitem { border-color: rgba(var(--area), 0.35); }
.gitem:hover { border-color: rgb(var(--area)); box-shadow: 0 0 24px rgba(var(--area), 0.35); }
.kind-badge {
  position: absolute; top: 8px; left: 8px; z-index: 2; padding: 4px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em; color: #fff;
  background: rgba(var(--area), 0.8); box-shadow: 0 0 10px rgba(var(--area), 0.6);
}
.video-thumb { position: relative; display: block; aspect-ratio: 4 / 3; background: #000; overflow: hidden; }
.video-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.play-badge {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; padding-left: 4px;
  font-size: 22px; color: #fff; background: rgba(var(--area), 0.55); border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 24px rgba(var(--area), 0.7); transition: 0.2s;
}
.video-thumb:hover .play-badge { transform: translate(-50%, -50%) scale(1.1); }
.audio-thumb {
  aspect-ratio: 4 / 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: radial-gradient(circle at 50% 40%, rgba(var(--area), 0.35), rgba(2, 10, 24, 0.9) 70%);
}
.audio-ic { font-size: 42px; filter: drop-shadow(0 0 12px rgba(var(--area), 0.8)); }
.audio-wave { display: flex; gap: 4px; align-items: flex-end; height: 24px; }
.audio-wave i { width: 5px; border-radius: 3px; background: rgb(var(--area)); animation: wave 1.2s ease-in-out infinite; }
.audio-wave i:nth-child(1) { height: 30%; animation-delay: 0s; }
.audio-wave i:nth-child(2) { height: 70%; animation-delay: 0.15s; }
.audio-wave i:nth-child(3) { height: 100%; animation-delay: 0.3s; }
.audio-wave i:nth-child(4) { height: 60%; animation-delay: 0.45s; }
.audio-wave i:nth-child(5) { height: 35%; animation-delay: 0.6s; }
@keyframes wave { 50% { transform: scaleY(0.4); } }
.gitem audio { width: 100%; height: 36px; margin: 6px 0 2px; }
.dz-kinds { display: flex; gap: 10px; font-size: 26px; }
.dz-kinds span { filter: drop-shadow(0 0 8px rgba(var(--area), 0.8)); }
.dz-kinds .k-photo { --area: 192, 139, 255; }
.dz-kinds .k-video { --area: 255, 92, 140; }
.dz-kinds .k-audio { --area: 255, 190, 80; }
.lightbox video { max-width: 92vw; max-height: 84vh; border-radius: 10px; background: #000; box-shadow: 0 0 0 1px var(--line), 0 0 60px rgba(255, 92, 140, 0.3); }
@media (max-width: 520px) {
  .sort-box { width: 100%; }
  .sort-box select { flex: 1; }
  .kind-chips { gap: 6px; }
  .kchip { padding: 8px 11px; }
}

/* Einladen */
.invite-intro { margin: -4px 0 18px; line-height: 1.6; }
.invite-cred { color: var(--cyan); font-family: Consolas, Menlo, monospace; letter-spacing: 0.06em; }
.invite-form textarea { min-height: 80px; }

/* Farben der Bereiche (Menü) */
.nav-lounge { --nc: 79, 195, 255; }
.nav-docs { --nc: 110, 168, 255; }
.nav-galerie { --nc: 192, 139, 255; }
.nav-nachrichten { --nc: 255, 179, 92; }
.nav-download { --nc: 67, 224, 166; }
.nav-admin { --nc: 255, 122, 122; }

/* Tablet & Smartphone: Namen statt Symbole, farbig, gut antippbar */
@media (max-width: 1100px) {
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
  .mainnav {
    order: 3; width: 100%; margin: 0;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px;
  }
  .mainnav a {
    justify-content: center; padding: 11px 6px; border-radius: 10px;
    font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
    color: rgb(var(--nc)); background: rgba(var(--nc), 0.1);
    border: 1px solid rgba(var(--nc), 0.45);
  }
  .mainnav a .ic { display: none; }
  .mainnav a span { display: inline; }
  .mainnav a:hover { color: #fff; background: rgba(var(--nc), 0.22); }
  .mainnav a.active {
    color: #fff; background: rgba(var(--nc), 0.38); border-color: rgb(var(--nc));
    box-shadow: 0 0 16px rgba(var(--nc), 0.45), inset 0 0 12px rgba(255, 255, 255, 0.08);
  }
  .mainnav a.active::after { display: none; }
  .mainnav .badge { top: -6px; right: -4px; }
  .userbox { margin-left: auto; }
}
@media (max-width: 380px) {
  .mainnav { grid-template-columns: repeat(3, 1fr); }
  .mainnav a { font-size: 11px; letter-spacing: 0.04em; }
}

/* Titel über der Figur gut lesbar: Tablets, grosse Android-Handys, Foldables, jedes Hochformat */
@media (max-width: 1100px), (orientation: portrait) {
  .page-title {
    padding: 16px 18px; border-radius: 14px;
    background-color: rgba(2, 8, 20, 0.38);
    background-image: linear-gradient(180deg, rgba(2, 8, 20, 0.5), rgba(2, 8, 20, 0.22));
    border: 1px solid var(--line); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  }
  .page-title h1 { background: none; -webkit-background-clip: border-box; background-clip: border-box; -webkit-text-fill-color: #fff; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9), 0 0 24px rgba(79, 195, 255, 0.35); }
  .page-title .lead { color: #e3edf9; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9); }
  .page-title .kicker { text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9); }
}

@media (max-width: 860px) {
  .scene-figure { opacity: 0.5; height: 82vh; }
  .side-right .content, .side-left .content, .fig-wide.side-right .content { padding: 22px 16px 30px; }
  .topbar { top: 6px; margin-top: 6px; width: calc(100% - 12px); }
  .userbox .who { display: none; }
  .chip.logout span { display: none; }
  .msg-layout.with-list { grid-template-columns: 1fr; }
  .dz-grid { grid-template-columns: 1fr; }
  .panel { padding: 18px 16px; }
  .bubble { max-width: 90%; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .dl-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .dz-row, .composer { flex-direction: column; align-items: stretch; }
  .auth-panel { padding: 28px 20px 22px; }
  .lounge-bar .who { display: none; }
  .tbl { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
