/* maloy.studio – Konsole im Panel (nach dem Vorbild alter Flash-Agentur-Seiten)
   Zustände am #console: data-state="idle" (dunkles Panel, Lichtkegel, Emblem)
                         data-state="console" (Flüssigmetall, Fenster, Navigation)
   Klassen: .is-hover (Emblem-Hover im Ruhezustand), .has-module, .is-lit, .is-loading */

.console {
  position: relative;
  pointer-events: auto;
  width: min(1180px, 94vw);
  /* gebürstetes Metall: horizontal gestreckter Rauschfilter */
  --brushed: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='640' height='320'><filter id='b'><feTurbulence type='fractalNoise' baseFrequency='0.0035 0.9' numOctaves='2' seed='7' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .11 -.03'/></filter><rect width='100%' height='100%' filter='url(%23b)'/></svg>");
}

.console-frame {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 8px 14px 12px;
  border: 1px solid #000;
  background: radial-gradient(ellipse 70% 85% at 50% 50%, #1c1d21 0%, #0e0e11 55%, #050506 100%);
  box-shadow:
    0 0 0 6px #0c0c10,
    0 0 0 7px #2c2d33,
    0 0 0 8px #000,
    0 40px 110px rgba(0, 0, 0, .85),
    inset 0 0 0 1px rgba(255, 255, 255, .04),
    inset 0 0 80px rgba(0, 0, 0, .7);
}
.console-frame:focus-visible { outline: 2px solid var(--accent); outline-offset: 12px; }

/* Auftritt mit dem Opener-Akkord: der Rahmen blitzt einmal silbern auf */
.console-frame.is-arrive { animation: arrive 1.8s ease-out; }
@keyframes arrive {
  from {
    box-shadow:
      0 0 0 6px #0c0c10,
      0 0 0 7px rgba(225, 229, 236, .85),
      0 0 0 8px #000,
      0 0 60px 10px rgba(225, 229, 236, .12),
      inset 0 0 0 1px rgba(255, 255, 255, .05),
      inset 0 0 80px rgba(0, 0, 0, .7);
  }
}

/* Beben beim Einschlag */
.console.is-shake .console-frame { animation: shake .42s cubic-bezier(.3, .7, .4, 1); }
@keyframes shake {
  0% { transform: translate(0, 0); }
  12% { transform: translate(-5px, 3px); }
  26% { transform: translate(4px, -3px); }
  42% { transform: translate(-3px, 2px); }
  60% { transform: translate(2px, -1px); }
  80% { transform: translate(-1px, 1px); }
  100% { transform: none; }
}

/* ---------- Hintergründe: Lichtkegel (Ruhe) und Flüssigmetall (Konsole) ---------- */
.console-cone, .console-metal, .console-cut {
  position: absolute; inset: 0;
  pointer-events: none;
}
.console-cone {
  background:
    radial-gradient(ellipse 16% 62% at 50% 50%, rgba(255, 255, 255, .2), rgba(255, 255, 255, .05) 55%, transparent 75%),
    radial-gradient(ellipse 34% 90% at 50% 50%, rgba(255, 255, 255, .05), transparent 70%);
  transition: opacity .5s ease;
}
.console.is-hover .console-cone { opacity: 1.4; filter: brightness(1.3); }
.console-metal {
  width: 100%; height: 100%;
  opacity: 0;
}
.console[data-state="console"] .console-cone { opacity: 0; transition-duration: .08s; }
.console[data-state="console"] .console-metal { opacity: 1; transition: opacity .22s ease-out; }
.console[data-state="idle"] .console-metal { transition: opacity .5s ease; }
/* harter Schnitt: ein Frame Weiß, dann Metall aus dem Dunkeln */
.console-cut { background: #fff; opacity: 0; z-index: 5; }
.console.is-cut .console-cut { animation: cut .32s ease-out; }
@keyframes cut { 0% { opacity: .85; } 100% { opacity: 0; } }

.console-head, .console-body, .console-nav { position: relative; z-index: 1; }

/* ---------- Kopfzeile ---------- */
.console-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  height: 24px;
  opacity: 0;
  transition: opacity .25s ease;
}
.console[data-state="console"] .console-head { opacity: 1; transition-delay: .25s; }
.console-led {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: rgba(230, 232, 238, .7);
  text-shadow: 0 1px 2px #000;
}
.console-led::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px 2px rgb(var(--accent-rgb) / calc(.25 + .6 * var(--pulse, 0)));
}
.console-close {
  padding: 4px 8px;
  border: 0;
  background: none;
  color: rgba(230, 232, 238, .7);
  font: 600 10px/1 var(--font);
  letter-spacing: .26em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px #000;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, color .2s ease;
}
.console.has-module .console-close { opacity: 1; pointer-events: auto; }
.console-close:hover { color: #fff; }

/* ---------- Körper: Fenster | Emblem | Fenster ---------- */
.console-body {
  display: grid;
  grid-template-columns: 1fr clamp(200px, 20vw, 270px) 1fr;
  gap: 16px;
  height: clamp(320px, 56vh, 540px);
}

.win-slot { position: relative; min-width: 0; }
.win {
  position: absolute; inset: 0;
  overflow: hidden;
  border-radius: 16px;
  background:
    radial-gradient(ellipse 80% 60% at 30% 0%, rgba(255, 255, 255, .08), transparent 70%),
    linear-gradient(160deg, #3a3b41 0%, #222327 42%, #131417 100%);
  box-shadow:
    0 0 0 1px #000,
    inset 0 0 0 1px rgba(255, 255, 255, .07),
    inset 0 2px 0 rgba(255, 255, 255, .08),
    inset 0 -40px 80px rgba(0, 0, 0, .5),
    0 14px 34px rgba(0, 0, 0, .65);
  /* Maske statt Skalierung: Inhalt und Ecken bleiben unverzerrt */
  clip-path: inset(0 50% 0 50% round 16px);
  visibility: hidden;
}
/* Öffnen: die Maske zieht aus der Mittellinie auf, schnell und weich auslaufend */
.win.is-open {
  clip-path: inset(0 0 0 0 round 16px);
  visibility: visible;
  transition: clip-path .46s cubic-bezier(.16, 1, .3, 1);
}
/* Schließen: links fällt die Höhe zur Mittellinie, rechts die Breite */
.win--l.is-closing { clip-path: inset(50% 0 50% 0 round 16px); transition: clip-path .3s cubic-bezier(.7, 0, .84, 0); }
.win--r.is-closing { clip-path: inset(0 50% 0 50% round 16px); transition: clip-path .3s cubic-bezier(.7, 0, .84, 0); }

/* zwei Lichtkanten fahren beim Öffnen von der Mitte nach außen */
.win-slot::before, .win-slot::after {
  content: "";
  position: absolute; z-index: 4; top: 4%; bottom: 4%; left: 50%;
  width: 2px; margin-left: -1px;
  border-radius: 2px;
  background: linear-gradient(180deg, transparent, #fff 18%, #fff 82%, transparent);
  box-shadow: 0 0 10px 2px rgb(var(--accent-rgb) / .8), 0 0 26px 4px rgba(255, 255, 255, .35);
  opacity: 0;
  pointer-events: none;
}
.win-slot.is-opening::before { animation: edge-l .46s cubic-bezier(.16, 1, .3, 1); }
.win-slot.is-opening::after { animation: edge-r .46s cubic-bezier(.16, 1, .3, 1); }
@keyframes edge-l { 0% { left: 50%; opacity: 1; } 75% { opacity: 1; } 100% { left: 0%; opacity: 0; } }
@keyframes edge-r { 0% { left: 50%; opacity: 1; } 75% { opacity: 1; } 100% { left: 100%; opacity: 0; } }

/* Lichtstreif zieht über das Glas, darunter ein weicher Weißschleier */
.win-flash {
  position: absolute; inset: 0; z-index: 3;
  border-radius: 16px;
  background:
    linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, .55) 45%, rgba(255, 255, 255, .95) 50%, rgba(255, 255, 255, .55) 55%, transparent 68%) 120% 0 / 300% 100% no-repeat,
    rgba(255, 255, 255, .5);
  opacity: 0;
  pointer-events: none;
}
.win-slot.is-flash .win-flash { animation: win-sweep .62s cubic-bezier(.3, .6, .2, 1); }
@keyframes win-sweep {
  0% { opacity: 1; background-position: 120% 0, 0 0; }
  30% { opacity: .9; }
  100% { opacity: 0; background-position: -20% 0, 0 0; }
}
/* Schließen: es bleibt eine leuchtende Linie stehen, die erlischt */
.win-slot.is-closing .win-flash {
  background: linear-gradient(90deg, transparent, #fff 12%, #fff 88%, transparent);
  box-shadow: 0 0 14px 3px rgb(var(--accent-rgb) / .8);
  animation: line-out .62s ease-out;
}
.win-slot--l.is-closing .win-flash { inset: calc(50% - 1px) 3% auto 3%; height: 2px; }
.win-slot--r.is-closing .win-flash {
  inset: 3% auto 3% calc(50% - 1px); width: 2px;
  background: linear-gradient(180deg, transparent, #fff 12%, #fff 88%, transparent);
}
@keyframes line-out {
  0%, 40% { opacity: 0; transform: scale(1); }
  50% { opacity: 1; }
  100% { opacity: 0; transform: scale(.2); }
}

.win-content {
  position: absolute; inset: 0;
  padding: clamp(18px, 2.2vw, 30px);
  overflow: auto;
  opacity: 0;
  transition: opacity .25s ease;
  scrollbar-width: thin;
  scrollbar-color: #3a3b41 transparent;
}
.win.is-ready .win-content { opacity: 1; }

.win-load {
  position: absolute; left: 0; right: 0; top: 50%;
  margin-top: -6px;
  text-align: center;
  font-size: 10px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--silver-hi);
  font-variant-numeric: tabular-nums;
  opacity: 0;
}
.console.is-loading .win--l .win-load { opacity: 1; animation: blink .16s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }

/* Inhalte kommen gestaffelt aus der Unschärfe */
.win.is-ready .win-content > * { animation: win-in .55s cubic-bezier(.16, 1, .3, 1) both; }
.win.is-ready .win-content > *:nth-child(2) { animation-delay: .06s; }
.win.is-ready .win-content > *:nth-child(3) { animation-delay: .12s; }
.win.is-ready .win-content > *:nth-child(4) { animation-delay: .18s; }
.win.is-ready .win-content > *:nth-child(n+5) { animation-delay: .24s; }
@keyframes win-in { from { opacity: 0; transform: translateY(8px); filter: blur(6px); } }
.win--r.is-ready .win-content > * { animation-delay: .1s; }

/* ---------- Emblem ---------- */
.core {
  position: relative;
  align-self: center;
  justify-self: center;
  width: 76%; /* Luft zu beiden Fenstern */
  aspect-ratio: 1;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  border-radius: 50%;
  transform: scale(calc(1 + .012 * var(--pulse, 0)));
}
.core:focus-visible { outline: 2px solid var(--accent); outline-offset: 8px; }
.core::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #000, 0 0 0 8px rgba(0, 0, 0, .3), 0 22px 46px rgba(0, 0, 0, .85), 0 4px 10px rgba(0, 0, 0, .6);
}
.core > * { position: absolute; border-radius: 50%; pointer-events: none; }

/* Halo und Schockwelle */
.core-halo {
  inset: -7%;
  background: radial-gradient(circle closest-side, transparent 84%, rgb(var(--accent-rgb) / .55) 91%, transparent 100%);
  opacity: calc(.06 + .5 * var(--pulse, 0));
  filter: blur(7px);
}
.console.is-lit .core-halo { opacity: calc(.55 + .35 * var(--pulse, 0)); }
.core-wave {
  inset: 0;
  border: 2px solid rgba(255, 255, 255, .9);
  box-shadow: 0 0 24px 4px rgb(var(--accent-rgb) / .6), inset 0 0 24px 4px rgb(var(--accent-rgb) / .4);
  opacity: 0;
}
.console.is-shake .core-wave { animation: wave .75s cubic-bezier(.1, .7, .3, 1); }
.console.is-shake .core-wave--2 { animation-delay: .12s; }
@keyframes wave { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(3.4); } }

/* polierte Lünette mit feiner Riffelung */
.core-bezel {
  inset: 0;
  background:
    radial-gradient(circle closest-side, transparent 84%, rgba(255, 255, 255, .7) 84.7%, rgba(0, 0, 0, .5) 86%, transparent 88%),
    radial-gradient(circle closest-side, transparent 97%, rgba(255, 255, 255, .45) 98.2%, transparent 99.6%),
    repeating-conic-gradient(rgba(255, 255, 255, .13) 0deg .75deg, rgba(0, 0, 0, .2) .75deg 1.5deg),
    conic-gradient(from 200deg, #4a4d54, #eef0f4 25deg, #9a9da5 55deg, #2b2c31 100deg, #8f929a 140deg, #f6f7f9 185deg, #b2b5bc 215deg, #3a3b41 260deg, #1d1e22 290deg, #c3c6cc 330deg, #4a4d54 360deg);
  -webkit-mask: radial-gradient(circle closest-side, transparent 83.6%, #000 84.4%);
          mask: radial-gradient(circle closest-side, transparent 83.6%, #000 84.4%);
}
/* Glanzlicht, das beim Hover einmal um die Lünette kreist */
@property --orbit { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.core-orbit {
  inset: 0;
  background: conic-gradient(from var(--orbit), transparent 0deg, rgba(255, 255, 255, .95) 10deg, transparent 34deg, transparent 360deg);
  -webkit-mask: radial-gradient(circle closest-side, transparent 84%, #000 85%, #000 99%, transparent 100%);
          mask: radial-gradient(circle closest-side, transparent 84%, #000 85%, #000 99%, transparent 100%);
  mix-blend-mode: screen;
  opacity: 0;
}
.console.is-hover .core-orbit, .console.is-shake .core-orbit { animation: orbit .9s cubic-bezier(.5, 0, .3, 1); }
@keyframes orbit {
  0% { --orbit: -40deg; opacity: 0; }
  12% { opacity: 1; }
  85% { opacity: 1; }
  100% { --orbit: 330deg; opacity: 0; }
}
/* Bezel-Blitz beim Einschlag */
.core-bezel-flash {
  inset: 0;
  background: radial-gradient(circle closest-side, transparent 82%, #fff 88%, #fff 97%, transparent 100%);
  opacity: 0;
}
.console.is-shake .core-bezel-flash { animation: cut .45s ease-out; }

/* eingelassene Rille: Licht scheint von hinten durch */
.core-track {
  inset: 8%;
  background:
    radial-gradient(circle closest-side, transparent 80%, rgb(var(--accent-rgb) / calc(.08 + .45 * var(--pulse, 0))) 91%, transparent 99%),
    radial-gradient(circle closest-side, #0b0b0d 78%, #050506 100%);
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, .95), inset 0 -1px 0 rgba(255, 255, 255, .08);
}
.console.is-lit .core-track {
  background:
    radial-gradient(circle closest-side, transparent 78%, rgb(var(--accent-rgb) / .95) 88%, rgb(var(--accent-rgb) / .6) 94%, transparent 99%),
    radial-gradient(circle closest-side, #0b0b0d 78%, #050506 100%);
  animation: flicker 2.6s steps(1) infinite;
}
@keyframes flicker {
  0%, 100% { filter: none; }
  7% { filter: brightness(1.35); }
  9% { filter: brightness(.85); }
  11% { filter: none; }
  53% { filter: brightness(1.2); }
  55% { filter: none; }
}

/* Ladebogen in der Rille */
.core-arc { inset: 0; width: 100%; height: 100%; overflow: visible; transform: rotate(-90deg); }
.core-arc circle {
  fill: none;
  stroke: #fff;
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 483 483;
  stroke-dashoffset: 483;
  filter: drop-shadow(0 0 4px rgb(var(--accent-rgb)));
  opacity: 0;
}
.console.is-loading .core-arc circle { opacity: 1; animation: arc .6s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes arc { 70% { stroke: #fff; } to { stroke-dashoffset: 0; stroke: var(--accent-core); } }

.core-ticks { inset: 0; width: 100%; height: 100%; overflow: visible; }
.core-ticks .tick {
  stroke: rgba(205, 209, 217, .4);
  stroke-width: .9;
  stroke-linecap: round;
  transition: stroke .18s ease;
}
.core-ticks .tick--major { stroke: rgba(236, 239, 244, .88); stroke-width: 1.7; }
.console.is-lit .core-ticks .tick { stroke: rgba(255, 255, 255, .55); }
.console.is-lit .core-ticks .tick--major { stroke: #fff; }

/* Zifferblatt mit Sonnenschliff */
.core-dial {
  inset: 15%;
  background:
    radial-gradient(circle, transparent 30%, rgba(0, 0, 0, .45) 100%),
    repeating-conic-gradient(rgba(255, 255, 255, .045) 0deg 1deg, rgba(0, 0, 0, .06) 1deg 2deg),
    radial-gradient(circle at 50% 30%, #3c3d43 0%, #1a1b1f 55%, #0b0b0d 100%);
  box-shadow:
    0 0 0 1.5px #08080a,
    0 0 0 2.5px rgba(255, 255, 255, .16),
    inset 0 8px 18px rgba(0, 0, 0, .75),
    inset 0 -2px 6px rgba(255, 255, 255, .05);
}
.core-dial::after {
  content: "";
  position: absolute; left: 26%; right: 26%; top: 60%; height: 20%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .65), transparent);
  filter: blur(4px);
}

/* schwarze Glaskugel: fährt beim Hover wie eine Blende nach hinten */
.core-ball {
  inset: 17%;
  background:
    radial-gradient(circle at 38% 26%, rgba(255, 255, 255, .95) 0, rgba(255, 255, 255, .55) 3.5%, rgba(255, 255, 255, 0) 11%),
    radial-gradient(ellipse 40% 22% at 50% 16%, rgba(255, 255, 255, .28), transparent 70%),
    radial-gradient(circle at 50% 120%, rgba(150, 155, 170, .45), transparent 45%),
    radial-gradient(circle at 46% 38%, #3a3b42 0%, #141519 42%, #040405 78%);
  box-shadow: inset 0 -10px 18px rgba(0, 0, 0, .8), inset 0 4px 10px rgba(255, 255, 255, .06), 0 6px 14px rgba(0, 0, 0, .8);
  transition: transform .35s cubic-bezier(.6, 0, .3, 1), opacity .3s ease, filter .35s ease;
}
.console.is-hover .core-ball,
.console[data-state="console"] .core-ball { transform: scale(.42); opacity: 0; filter: brightness(.4); }

.core-m {
  left: 24%; top: 24%;
  width: 52%; height: 52%;
  border-radius: 0;
  transform: scale(calc(1 + .035 * var(--pulse, 0)));
}

/* Glas über dem Zifferblatt */
.core-glass {
  inset: 15%;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, .04) 34%, transparent 35%),
    radial-gradient(circle at 50% 125%, rgba(255, 255, 255, .07), transparent 50%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
}

/* ---------- Navigationsleiste ---------- */
.console-nav {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  transform: translateY(160%);
  opacity: 0;
}
.console[data-state="console"] .console-nav {
  transform: none;
  opacity: 1;
  transition: transform .28s cubic-bezier(.15, .9, .3, 1) .22s, opacity .1s linear .22s;
}
/* gleitender Leuchtbalken unter der Maus */
.nav-glide {
  position: absolute; bottom: -1px; left: 0;
  height: 3px;
  width: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, rgb(var(--accent-rgb) / .2), var(--accent-core), rgb(var(--accent-rgb) / .2));
  box-shadow: 0 0 12px 2px rgb(var(--accent-rgb) / .7);
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  transition: transform .18s cubic-bezier(.2, .8, .3, 1), width .18s cubic-bezier(.2, .8, .3, 1), opacity .2s ease;
}
.tab {
  position: relative;
  height: 32px;
  border: 1px solid #3a3b41;
  border-radius: 2px;
  background: linear-gradient(180deg, #1c1d21, #0d0e10);
  color: var(--silver);
  font: 600 11px/1 var(--font);
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease, box-shadow .15s ease;
}
.tab::after {
  content: "";
  position: absolute; top: 0; right: 0;
  border-style: solid;
  border-width: 0 9px 9px 0;
  border-color: transparent var(--accent) transparent transparent;
}
.tab:hover { border-color: #66676e; color: #fff; }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tab[aria-current="true"] {
  border-color: #a585ff;
  color: #fff;
  background: linear-gradient(180deg, #8c62ff, #5a2fe0);
  box-shadow: 0 0 20px rgb(var(--accent-rgb) / .45);
}
.tab[aria-current="true"]::after { border-right-color: var(--accent-core); }
.tab .ext { margin-left: 6px; letter-spacing: 0; }

.console-foot {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  margin-top: 14px;
  padding: 0 4px;
  font-size: 10px;
  letter-spacing: .14em;
  color: #6b6d74;
  text-shadow: 0 1px 0 #000;
  opacity: 0;
  transition: opacity .4s ease;
}
.console[data-state="console"] .console-foot { opacity: 1; }
.console-foot button {
  padding: 0; border: 0; background: none;
  color: inherit; font: inherit; letter-spacing: inherit;
  cursor: pointer;
}
.console-foot button:hover { color: var(--silver); }

/* ---------- Typografie in den Fenstern ---------- */
/* Überschriften: Syncopate, gesperrte Versalien in gebürstetem Silber */
.mod-h {
  position: relative;
  margin: 0 0 20px;
  padding-bottom: 12px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(17px, 1.7vw, 24px);
  line-height: 1.15;
  letter-spacing: .16em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 0%, #dfe2e8 40%, #9a9ea7 62%, #cfd2d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .8));
}
.mod-h::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: min(220px, 70%);
  height: 1px;
  background: linear-gradient(90deg, rgba(230, 233, 240, .55), rgb(var(--accent-rgb) / .5) 40%, transparent);
}
.mod-lead { margin: 0 0 18px; font-size: 16px; line-height: 1.55; color: var(--silver-hi); max-width: 46ch; }
.mod-text { margin: 0 0 12px; font-size: 14px; line-height: 1.6; color: var(--muted); max-width: 52ch; }
.mod-label { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--silver-hi); }
.mod-list { margin: 0; padding: 0; list-style: none; }
.mod-list li { padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, .07); }
.mod-list h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; color: var(--silver-hi); }
.mod-list p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
.mod-n {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 11px;
  color: var(--accent-core);
  margin-right: 10px;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  color: var(--muted);
  font: 500 12px/1 var(--font);
  cursor: pointer;
  transition: color .25s ease, border-color .25s ease, background .25s ease;
}
.chip:hover { color: var(--silver-hi); }
.chip[aria-pressed="true"] { color: #0a0a0c; background: var(--silver-hi); border-color: var(--silver-hi); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  color: var(--silver-hi);
  font: 500 14px/1 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: border-color .3s ease, background .3s ease;
}
.btn:hover { border-color: rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .06); }
.btn .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px 2px rgb(var(--accent-rgb) / .55);
}

/* ---------- Werke ---------- */
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.thumb {
  position: relative;
  aspect-ratio: 4 / 5;
  padding: 0;
  border: 0;
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08);
  transition: box-shadow .25s ease, transform .25s ease;
}
.thumb canvas { width: 100%; height: 100%; }
.thumb:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(255, 255, 255, .3); }
.thumb[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent-core), 0 0 18px rgb(var(--accent-rgb) / .45); }
.thumb[hidden] { display: none; }

.viewer { display: grid; grid-template-rows: 1fr auto; height: 100%; gap: 14px; }
.viewer-stage {
  position: relative;
  min-height: 0;
  display: grid; place-items: center;
}
.viewer-frame {
  position: relative;
  height: 100%;
  max-width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 20px 50px rgba(0, 0, 0, .6);
}
.viewer-frame canvas, .viewer-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.viewer-frame .uv { opacity: 0; transition: opacity .7s ease; }
.viewer-frame.is-uv .uv { opacity: 1; }
.viewer-frame.is-swap { animation: swap .45s ease; }
@keyframes swap { 0% { filter: brightness(2.4) contrast(.6); opacity: .2; } 100% { filter: none; opacity: 1; } }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.viewer-title { color: var(--silver-hi); }
.viewer-meta { color: var(--muted); margin-left: 8px; }

.uv-switch {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 5px 5px 5px 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  color: var(--silver);
  font: 500 12px/1 var(--font);
  cursor: pointer;
}
.uv-switch .track {
  width: 34px; height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  position: relative;
  transition: background .3s ease, box-shadow .3s ease;
}
.uv-switch .track::after {
  content: "";
  position: absolute; top: 3px; left: 3px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--silver-hi);
  transition: transform .3s ease, background .3s ease;
}
.uv-switch[aria-pressed="true"] .track { background: rgb(var(--accent-rgb) / .55); box-shadow: 0 0 14px rgb(var(--accent-rgb) / .5); }
.uv-switch[aria-pressed="true"] .track::after { transform: translateX(14px); background: var(--accent-core); }

/* Studio: ein Werk wechselt langsam zwischen Tageslicht und UV */
.studio-visual { height: 100%; display: grid; place-items: center; gap: 12px; grid-template-rows: 1fr auto; }
.studio-visual .viewer-frame .uv { animation: uv-breathe 7s ease-in-out infinite alternate; }
@keyframes uv-breathe { 0%, 35% { opacity: 0; } 65%, 100% { opacity: 1; } }
.studio-visual p { margin: 0; font-size: 12px; letter-spacing: .08em; color: var(--muted); }

/* ---------- Ausstellungen ---------- */
.show-btn {
  display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: baseline;
  width: 100%;
  padding: 14px 6px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, .07);
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 2px;
  transition: background .25s ease;
}
.show-btn:hover { background: rgba(255, 255, 255, .03); }
.show-btn[aria-pressed="true"] { background: rgb(var(--accent-rgb) / .12); }
.show-btn .y { font-family: var(--font-head); font-weight: 700; letter-spacing: .08em; font-size: 16px; color: var(--silver-hi); }
.show-btn .t { color: var(--silver-hi); font-size: 15px; }
.show-btn .p { display: block; color: var(--muted); font-size: 13px; }
.photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
.photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; }
.photos span {
  aspect-ratio: 4 / 3;
  display: grid; place-items: center;
  border-radius: 2px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .01)), #0f0f12;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
  color: #4d4f56;
  font-size: 11px;
  letter-spacing: .1em;
}

/* ---------- Prozess ---------- */
.step {
  display: grid; grid-template-columns: 34px 1fr; gap: 2px 8px;
  width: 100%;
  padding: 13px 6px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, .07);
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.step-n { grid-row: span 2; font-family: var(--font-head); font-weight: 700; letter-spacing: .08em; font-size: 12px; color: var(--muted); padding-top: 3px; }
.step-title { font-size: 15px; font-weight: 600; color: var(--silver); }
.step-text { display: grid; grid-template-rows: 0fr; color: var(--muted); font-size: 13px; line-height: 1.55; transition: grid-template-rows .4s ease; }
.step-text > span { overflow: hidden; }
.step[aria-pressed="true"] .step-n { color: var(--accent-core); text-shadow: 0 0 10px rgb(var(--accent-rgb) / .8); }
.step[aria-pressed="true"] .step-title { color: var(--silver-hi); }
.step[aria-pressed="true"] .step-text { grid-template-rows: 1fr; padding-top: 4px; }
.printer { height: 100%; display: grid; grid-template-rows: 1fr auto; gap: 10px; }
.printer canvas { width: 100%; height: 100%; min-height: 0; }
.printer-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.printer-play {
  padding: 5px 11px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  background: none;
  color: var(--silver);
  font: 500 12px/1 var(--font);
  cursor: pointer;
}

/* ---------- Kontakt ---------- */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; color: var(--silver); }
.field input, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 2px;
  background: rgba(0, 0, 0, .25);
  color: var(--silver-hi);
  font: 400 15px/1.45 var(--font);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: rgb(var(--accent-rgb) / .8);
  box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / .2);
}
.field input:user-invalid, .field textarea:user-invalid { border-color: #e1192d; }
.topics { display: flex; flex-wrap: wrap; gap: 6px; border: 0; margin: 0; padding: 0; }
.topics legend { margin-bottom: 8px; padding: 0; font-size: 13px; color: var(--silver); }
.topics input { position: absolute; opacity: 0; pointer-events: none; }
.topics label {
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.topics label:hover { color: var(--silver-hi); }
.topics input:checked + label { color: #0a0a0c; background: var(--silver-hi); border-color: var(--silver-hi); }
.topics input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; line-height: 1.5; color: var(--muted); }
.consent input { margin-top: 3px; accent-color: var(--accent); flex: none; }
.consent button { padding: 0; border: 0; background: none; color: var(--silver); font: inherit; text-decoration: underline; cursor: pointer; }
.form-status { min-height: 1.4em; margin: 0; font-size: 13px; color: var(--silver-hi); }

/* ---------- schmale Bildschirme: Fenster untereinander ---------- */
@media (max-width: 820px), (max-height: 520px) {
  .console { width: calc(100vw - 20px); }
  .console-frame { padding: 8px 10px 10px; }
  .console-body {
    height: min(68svh, 640px);
    grid-template-columns: 1fr;
    grid-auto-rows: min-content;
    overflow-y: auto;
    gap: 12px;
  }
  .console[data-state="idle"] .console-body { height: min(58svh, 520px); align-content: center; overflow: hidden; }
  .core { width: min(200px, 52vw); justify-self: center; order: -1; margin: 6px 0 4px; }
  .console[data-state="console"] .core { width: 132px; }
  .win-slot { height: 58svh; min-height: 300px; }
  .console:not(.has-module) .win-slot { display: none; }
  .console-head { padding-right: 44px; }
  .console-led { font-size: 0; }
  .console-nav {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 6px;
  }
  .console-nav::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; padding: 0 16px; }
  .nav-glide { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .win.is-open, .win.is-closing { transition-duration: .01s; }
  .win.is-ready .win-content > * { animation: none; }
  .console.is-shake .console-frame, .console.is-shake .core-wave, .core-orbit { animation: none !important; }
  .console.is-lit .core-track { animation: none; }
  .console.is-loading .win--l .win-load { animation: none; }
  .core-ball { transition: none; }
  .core, .core-m { transform: none; }
}
