/* AEON · Scene. Gemeinsame Darstellung für AEON (/) und OS (/os/), nach dem Silvae-Dashboard-Konzept:
   Vollbild-Visual, Daten als Glas-Panels darüber, schmale Icon-Leiste mit Beschriftung beim Überfahren,
   Einflug beim Start, Balken füllen sich. Eine Akzentfarbe (Amber). Keine Daten, keine Funktionen geändert:
   alles hier ist reine Darstellung und lässt sich durch Entfernen der Zeile <link href="…aeon-scene.css"> abschalten. */
html.scene:root { --accent: #E9A35B; --scene-glass: rgba(16, 16, 18, .52); --scene-glass-2: rgba(255, 255, 255, .06);
  --scene-ring: rgba(255, 255, 255, .10); --scene-ease: cubic-bezier(.23, 1, .32, 1); }

/* ── Visual + Glow ── */
html.scene-aeon, html.scene-aeon body { background: #050506; }
html.scene-aeon::before { content: ""; display: block; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: linear-gradient(180deg, rgba(5,5,6,.55), rgba(5,5,6,.9) 75%), url(/bg/aeon.jpg) center / cover no-repeat; opacity: .9; }
html.scene::after { content: ""; display: block; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60vmax 40vmax at 78% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%); }
html.scene-os::before { opacity: .5 !important; filter: grayscale(.4) !important; }

/* ── Glas-Panels ── */
html.scene-aeon .card, html.scene-aeon .group, html.scene-aeon .login-card,
html.scene-os section.s, html.scene-os .cmp {
  background: var(--scene-glass); border-radius: 22px; border: 0;
  box-shadow: inset 0 0 0 1px var(--scene-ring), 0 30px 80px -34px rgba(0, 0, 0, .9);
  -webkit-backdrop-filter: blur(28px) saturate(160%); backdrop-filter: blur(28px) saturate(160%);
}
html.scene-aeon .card .card, html.scene-aeon .group .card { background: var(--scene-glass-2); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
html.scene-os section.s, html.scene-os section.s.first { padding: 24px 24px 22px; margin: 0 0 14px; }
html.scene-os section.s.first { padding-top: 24px; }
html.scene-os .card { background: var(--scene-glass-2); }

/* ── Icon-Leiste (OS: Tabs; AEON: Seitenleiste) ── */
html.scene-os .tab .ic { display: none; }
@media (min-width: 1000px) {
  html.scene-os .top { position: fixed; z-index: 30; left: 22px; top: 50%; transform: translateY(-50%); width: auto; padding: 0; background: none; display: block; }
  html.scene-os .top .mark { position: fixed; left: 28px; top: 24px; }
  html.scene-os .tabs { display: flex; flex-direction: column; gap: 4px; padding: 8px; width: 56px; overflow: hidden; border-radius: 26px;
    background: var(--scene-glass); box-shadow: inset 0 0 0 1px var(--scene-ring), 0 30px 80px -34px #000;
    -webkit-backdrop-filter: blur(28px) saturate(160%); backdrop-filter: blur(28px) saturate(160%);
    transition: width .32s var(--scene-ease); }
  html.scene-os .tabs:hover, html.scene-os .tabs:focus-within { width: 176px; }
  html.scene-os .tab { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 10px; border-radius: 16px; white-space: nowrap; font-size: 13px; text-align: left; }
  html.scene-os .tabs .tab .ic { display: block; flex: none; width: 20px; height: 20px; }
  html.scene-os .tab .tl { opacity: 0; transition: opacity .2s; }
  html.scene-os .tabs:hover .tl, html.scene-os .tabs:focus-within .tl { opacity: 1; }
  html.scene-os .tab[aria-selected="true"] { background: var(--accent); color: #000; }

  /* OS: Netz füllt den Bildschirm, Panels schweben rechts */
  html.scene-os .hero { position: fixed; inset: 0 auto 0 0; width: calc(100vw - min(560px, 42vw) - clamp(24px, 3vw, 56px) - 24px); height: 100vh !important; margin: 0; z-index: 0; }
  html.scene-os .greet { left: 112px; }
  html.scene-os .hero::after { display: none; }
  html.scene-os .wrap { position: relative; z-index: 2; max-width: none; width: min(560px, 42vw); margin: 0 clamp(24px, 3vw, 56px) 0 auto; padding: 84px 0 120px; pointer-events: none; }
  html.scene-os .wrap > * { pointer-events: auto; }

  /* AEON: Seitenleiste wird schmale Glas-Leiste */
  html.scene-aeon { --sidebar-width: 84px; }
  html.scene-aeon #aeon-sidebar { width: 84px; left: 14px; top: 14px; bottom: 14px; inset-block: 14px; border: 0; border-radius: 28px; padding: 22px 10px; overflow: hidden;
    background: var(--scene-glass); box-shadow: inset 0 0 0 1px var(--scene-ring), 0 30px 80px -34px #000;
    -webkit-backdrop-filter: blur(28px) saturate(160%); backdrop-filter: blur(28px) saturate(160%); transition: width .32s var(--scene-ease); }
  html.scene-aeon #aeon-sidebar:hover, html.scene-aeon #aeon-sidebar:focus-within { width: 218px; }
  html.scene-aeon #aeon-sidebar .sidebar-brand { white-space: nowrap; overflow: hidden; }
  html.scene-aeon #aeon-sidebar .tabs button { white-space: nowrap; overflow: hidden; }
  html.scene-aeon #aeon-sidebar .tabs button[aria-current="page"] { background: var(--accent); color: #000; border-radius: 16px; }
  html.scene-aeon #aeon-sidebar .tabs button[aria-current="page"] svg { stroke: #000; }
  html.scene-aeon #aeon-sidebar .sidebar-footer { opacity: 0; transition: opacity .2s; white-space: nowrap; }
  html.scene-aeon #aeon-sidebar:hover .sidebar-footer { opacity: 1; }
}

/* ── Start: Einflug ── */
@keyframes scene-rise { from { opacity: 0; transform: translateY(26px) scale(.965); filter: blur(10px); } }
@keyframes scene-fade { from { opacity: 1; } to { opacity: 0; visibility: hidden; } }
html.scene-boot.scene-os section.s, html.scene-boot.scene-os .cmp, html.scene-boot.scene-aeon .card { animation: scene-rise .9s both var(--scene-ease); }
html.scene-boot.scene-os section.s:nth-of-type(2), html.scene-boot.scene-aeon .card:nth-of-type(2) { animation-delay: 90ms; }
html.scene-boot.scene-os section.s:nth-of-type(3), html.scene-boot.scene-aeon .card:nth-of-type(3) { animation-delay: 180ms; }
html.scene-boot.scene-os section.s:nth-of-type(n+4), html.scene-boot.scene-aeon .card:nth-of-type(n+4) { animation-delay: 260ms; }
html.scene-boot.scene-os .tabs, html.scene-boot.scene-aeon #aeon-sidebar { animation: scene-rise .9s .15s both var(--scene-ease); }
.scene-veil { position: fixed; inset: 0; z-index: 9999; background: #000; pointer-events: none; animation: scene-fade .9s .1s both var(--scene-ease); }

/* ── Balken füllen sich ── */
@keyframes scene-fill { from { transform: scaleX(0); } }
html.scene .bar i, html.scene .prog i, html.scene .meter i, html.scene [role="progressbar"] > * { transform-origin: left; animation: scene-fill .9s .2s both var(--scene-ease); }

@media (prefers-reduced-motion: reduce) {
  html.scene *, html.scene-boot * { animation: none !important; transition: none !important; }
  .scene-veil { display: none; }
}

/* ── Szene (Hintergrund) ── */
#scene-bg { position: fixed; inset: 0; z-index: -3; width: 100%; height: 100%; pointer-events: none; display: block; }
html.scene-bgon, html.scene-bgon body { background: #050506 !important; }
html.scene-bgon body { background: transparent !important; }
html.scene-bgon::before, html.scene-bgon body::before { display: none !important; content: none !important; }
#scene-btn { position: fixed; z-index: 60; right: 20px; bottom: 20px; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; color: #F5F5F7;
  background: var(--scene-glass, rgba(16,16,18,.52)); box-shadow: inset 0 0 0 1px var(--scene-ring, rgba(255,255,255,.1)), 0 16px 40px -16px #000;
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%); display: flex; align-items: center; justify-content: center;
  transition: transform .16s var(--scene-ease, ease), color .2s; touch-action: manipulation; }
#scene-btn:active { transform: scale(.94); } #scene-btn[aria-expanded="true"] { color: var(--accent); }
#scene-btn:focus-visible, #scene-panel button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#scene-panel { position: fixed; z-index: 61; right: 20px; bottom: 78px; width: 300px; max-width: calc(100vw - 32px); padding: 18px; border-radius: 22px; color: #F5F5F7; font: 400 14px/1.4 Inter, system-ui, sans-serif;
  background: rgba(16,16,18,.72); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 30px 80px -30px #000; -webkit-backdrop-filter: blur(32px) saturate(170%); backdrop-filter: blur(32px) saturate(170%); }
#scene-panel[hidden] { display: none; }
#scene-panel .sc-t { font-weight: 500; font-size: 17px; letter-spacing: -.02em; margin-bottom: 12px; }
#scene-panel .sc-l { font: 500 11px "JetBrains Mono", ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; color: #8E8E93; margin: 14px 0 8px; }
#scene-panel .sc-seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 16px; background: rgba(255,255,255,.06); }
#scene-panel .sc-seg button { flex: 1 1 auto; min-height: 36px; padding: 0 10px; border: 0; border-radius: 13px; background: none; color: #A1A1A6; font: inherit; font-size: 13px; cursor: pointer; transition: background .2s, color .2s; }
#scene-panel .sc-seg button[aria-pressed="true"] { background: var(--accent); color: #000; font-weight: 500; }
#scene-panel .sc-sl { display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 10px; margin-top: 10px; color: #A1A1A6; font-size: 13px; }
#scene-panel input[type=range] { width: 100%; accent-color: var(--accent); min-height: 28px; }
#scene-panel input[disabled] { opacity: .4; }
@media (max-width: 759px) { html.scene-aeon #scene-btn { bottom: calc(78px + env(safe-area-inset-bottom)); } html.scene-aeon #scene-panel { bottom: calc(136px + env(safe-area-inset-bottom)); } }

#scene-panel .sc-go { width: 100%; min-height: 44px; margin-top: 6px; border: 0; border-radius: 16px; background: rgba(255,255,255,.08); color: var(--accent); font: 500 13px inherit; font-family: inherit; cursor: pointer; }
#scene-panel .sc-go:hover { background: rgba(255,255,255,.14); }

/* ── AEON mobil: schwebende Glas-Leiste, Glas statt Vollfläche, mehr Szene sichtbar ── */
html.scene-aeon :is(.aeon-cockpit, .aeon-cockpit-media, .ironman-card, .swim-hero, .diag-hero) {
  background: rgba(16,16,18,.46) !important; -webkit-backdrop-filter: blur(26px) saturate(165%); backdrop-filter: blur(26px) saturate(165%);
  border: 0 !important; border-radius: 24px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 18px 50px rgba(0,0,0,.28) !important; }
html.scene-aeon .aeon-cockpit { padding: clamp(18px, 4.6vw, 32px); }
html.scene-aeon .aeon-cockpit h2 { font-size: clamp(24px, 6.6vw, 40px); letter-spacing: -.035em; margin-bottom: 12px; }
html.scene-aeon .aeon-cockpit .btn { border-radius: 99px; min-height: 44px; }
html.scene-aeon .aeon-cockpit .btn:not(.primary) { background: rgba(255,255,255,.08); border: 0; color: #F5F5F7; }
@media (max-width: 759px) {
  html.scene-aeon body.has-sidebar .mobile-dock { left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 6px; border: 0; border-radius: 30px;
    background: rgba(16,16,18,.52); -webkit-backdrop-filter: blur(28px) saturate(170%); backdrop-filter: blur(28px) saturate(170%);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 14px 40px rgba(0,0,0,.45); }
  html.scene-aeon .mobile-dock a, html.scene-aeon .mobile-dock button { border-radius: 24px; color: rgba(245,245,247,.62); transition: transform .16s cubic-bezier(.23,1,.32,1), background-color .2s; }
  html.scene-aeon .mobile-dock [aria-current=page] { background: rgba(233,163,91,.16); color: var(--accent); }
  html.scene-aeon body.has-sidebar main.app { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
  html.scene-aeon #scene-btn { bottom: calc(96px + env(safe-area-inset-bottom)); }
  html.scene-aeon #scene-panel { bottom: calc(150px + env(safe-area-inset-bottom)); }
}

