/* fynnland launcher. A console home screen: the selected app's picture fills the
   screen, the launcher itself stays neutral (near black, white type) so every app
   can bring its own look through its tile and background. */

@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 500; font-display: swap; src: url('../fonts/jakarta-500.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 600; font-display: swap; src: url('../fonts/jakarta-600.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 700; font-display: swap; src: url('../fonts/jakarta-700.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 800; font-display: swap; src: url('../fonts/jakarta-800.woff2') format('woff2'); }

:root {
  --base: #030508;
  --text: #ffffff;
  --text-2: rgb(255 255 255 / 0.78);
  --text-3: rgb(255 255 255 / 0.6);
  --hair: rgb(255 255 255 / 0.12);
  --chip: rgb(255 255 255 / 0.16);
  --glass: rgb(14 17 22 / 0.72);
  --glass-solid: #0e1116;
  --tile-default: #27272a;

  --gutter: 32px;
  --bar-h: 64px;
  --tile: 80px;
  /* Radius scale, kept small on purpose: square tiles are the launcher's motif,
     soft pill shapes would read as a generic template. */
  --r-s: 3px;   /* labels, markers */
  --r: 6px;     /* buttons, icon buttons, tiles */
  --r-l: 10px;  /* window, sheet, cards */
  --tile-r: var(--r);
  --win-w: 380px;
  --win-r: var(--r-l);
  --legal-h: 44px;

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);

  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.25, 0.64, 1);

  --fade: 400ms;
  --drift: 800ms;
  --lift: 220ms;
  --slide: 240ms;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
* { scrollbar-width: thin; scrollbar-color: rgb(255 255 255 / 0.3) transparent; }

html, body { height: 100%; }
/* No grey or blue flash on tap (Android); buttons and tiles show their own pressed states. */
html { -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  background: var(--base);
  color: var(--text);
  font: 500 16px/1.5 var(--font);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
img { display: block; max-width: 100%; }

:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* Background: two stacked layers so one can fade over the other. The incoming
   picture settles from a slight zoom, like a console home screen. */
.bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
  /* what shows when a category has no picture yet */
  background: radial-gradient(120% 80% at 50% 0%, #11151b 0%, var(--base) 70%);
}
.bg-layer {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transform: scale(1.03);
  transition: opacity var(--fade) var(--ease-out), transform var(--drift) var(--ease-out);
  /* Slow breathing zoom towards the centre and back. It runs on the separate
     `scale` property so it adds to the settle-in transform instead of fighting it. */
  animation: breathe 26s ease-in-out infinite alternate;
  will-change: transform, scale;
}
.bg-layer.is-front { opacity: 1; transform: none; }
@keyframes breathe {
  from { scale: 1; }
  to { scale: 1.14; }
}
/* Moving background: already animated, so no breathing zoom on top. */
.bg-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; pointer-events: none;
  transition: opacity var(--fade) var(--ease-out);
}
.bg-video.is-on { opacity: 1; }
/* Darker at the top for the bar, darkest at the bottom for the title. */
.bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(95% 75% at 50% 32%, transparent 25%, rgb(3 5 8 / 0.65) 80%),
    linear-gradient(rgb(3 5 8 / 0.85) 0%, rgb(3 5 8 / 0.12) 22%, rgb(3 5 8 / 0.35) 55%, rgb(3 5 8 / 0.95) 100%);
}

/* Top bar like a desktop's menu bar: mark and name left, then the tabs, switches and
   clock right. No panel behind it. */
.bar {
  position: relative; z-index: 3;
  display: flex; align-items: center; gap: 24px;
  height: calc(var(--bar-h) + var(--safe-t));
  padding: var(--safe-t) calc(var(--gutter) + var(--safe-r)) 0 calc(var(--gutter) + var(--safe-l));
}
.tabs {
  order: 1; flex: 1 1 auto;
  display: flex; gap: 4px; min-width: 0;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
  margin-left: -12px;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; position: relative;
  min-height: 44px; min-width: 44px; padding: 0 12px;
  background: none; border: 0; border-radius: var(--r);
  color: rgb(255 255 255 / 0.5);
  font: 700 16px/1 var(--font); letter-spacing: -0.01em;
  cursor: pointer;
  transition: color var(--lift) var(--ease-out);
}
.tab:hover { color: var(--text); }
.tab[aria-selected='true'] { color: var(--text); }
.tab[aria-selected='true']::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 4px;
  height: 2px; background: var(--text);
}
.tab:focus-visible { outline-offset: -2px; }
.brand {
  order: 0; flex: none;
  display: flex; align-items: center; gap: 10px;
  font: 800 17px/1 var(--font); letter-spacing: -0.015em; color: var(--text);
}
.brand-mark { flex: none; display: block; }
/* In the launcher a hairline sets the name apart from the tabs after it. */
.bar:not(.bar--page) .brand { padding-right: 24px; position: relative; }
.bar:not(.bar--page) .brand::after {
  content: ''; position: absolute; right: 0; top: 50%; width: 1px; height: 20px; translate: 0 -50%;
  background: var(--hair);
}
.status {
  order: 3; flex: none;
  font: 600 14px/1 var(--font); color: var(--text-2);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* Desk: everything below the bar */
.desk {
  position: relative; z-index: 1;
  height: calc(100dvh - var(--bar-h) - var(--safe-t));
  --left-w: calc(100% - var(--win-w) - 3 * var(--gutter) - var(--safe-l) - var(--safe-r));
}

.panel {
  position: absolute; top: 8px; left: calc(var(--gutter) + var(--safe-l));
  max-width: var(--left-w);
}
.tiles {
  display: flex; gap: 14px; align-items: center;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
  /* The scroller clips on both axes, so it needs room for the lifted tile and
     its full shadow, otherwise the shadow ends in a hard edge. */
  padding: 16px 32px 44px;
  margin: -16px -32px -44px;
  scroll-snap-type: x proximity;
}
.tiles::-webkit-scrollbar { display: none; }
.tiles > li { flex: none; scroll-snap-align: start; scroll-margin-left: 32px; }
.tiles-empty { padding: 12px 0; color: var(--text-3); }

.tile {
  --tile-c: var(--tile-default);
  position: relative;
  display: grid; place-items: center;
  width: var(--tile); height: var(--tile);
  background: linear-gradient(135deg, color-mix(in srgb, var(--tile-c) 55%, #000) 0%, var(--tile-c) 100%);
  border: 2px solid transparent;
  border-radius: var(--tile-r);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.35);
  opacity: 0.72;
  text-decoration: none;
  transition: transform var(--lift) var(--ease-spring), opacity var(--lift) ease,
              border-color var(--lift) ease, box-shadow var(--lift) ease;
  -webkit-tap-highlight-color: transparent;
}
.tile img { width: 62%; height: 62%; object-fit: contain; pointer-events: none; }
a.tile { cursor: pointer; }
a.tile:hover { opacity: 1; }
.tile[aria-current='true'] {
  opacity: 1;
  border-color: var(--text);
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 6px 14px rgb(0 0 0 / 0.5), 0 12px 26px rgb(0 0 0 / 0.38);
}
a.tile:active { transform: translateY(-2px) scale(1.04); }
.tile:focus-visible { outline: none; }
.tile[aria-current='true']:focus-visible { box-shadow: 0 0 0 3px var(--base), 0 0 0 6px var(--text), 0 12px 26px rgb(0 0 0 / 0.38); }

/* Placeholder and "soon" tiles: an empty slot, dimmer and flat. */
.tile--soon {
  background: rgb(255 255 255 / 0.04);
  border: 2px dashed rgb(255 255 255 / 0.28);
  box-shadow: none;
  opacity: 1;
  color: rgb(255 255 255 / 0.45);
}
.tile--soon img, .tile--soon svg { width: 40%; height: 40%; opacity: 0.55; }
.tile--soon .soon {
  position: absolute; left: 0; right: 0; bottom: 9px;
  text-align: center; font: 700 12px/1 var(--font); letter-spacing: 0.01em; color: var(--text-3);
}
.tile--soon:has(.soon) img, .tile--soon:has(.soon) svg { margin-bottom: 14px; }
/* Concept tiles keep the app's colour, but the dashed edge of an empty slot
   says the thing itself is not built yet. */
.tile--concept { border-style: dashed; border-color: rgb(255 255 255 / 0.5); }
.tile--concept[aria-current='true'] { border-color: var(--text); }

/* Name plate: tags, title, tagline, straight on the picture */
.plate {
  position: absolute; left: calc(var(--gutter) + var(--safe-l));
  bottom: calc(var(--gutter) + var(--safe-b));
  max-width: min(640px, var(--left-w));
  text-shadow: 0 1px 12px rgb(0 0 0 / 0.45);
}
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin-bottom: 12px; }
.tags:empty { display: none; }
.tags li { font: 500 12px/1.2 var(--font); color: var(--text-2); }
.tags li + li::before { content: '·'; margin: 0 9px; color: var(--text-3); }
.tags li:first-child {
  margin-right: 6px; padding: 4px 9px;
  background: var(--chip); border-radius: var(--r-s);
  font-weight: 700; color: var(--text); text-shadow: none;
}
.tags li:first-child + li::before { content: none; }
.title {
  font: 800 clamp(36px, 3.6vw, 52px)/1.04 var(--font); letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}
.tagline { margin-top: 10px; font: 500 15px/1.5 var(--font); color: var(--text-2); max-width: 48ch; }
.tagline:empty { display: none; }
.plate-error { margin-top: 14px; display: grid; gap: 14px; justify-items: start; color: var(--text-2); }
.plate-error[hidden] { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px;
  background: rgb(255 255 255 / 0.12); color: var(--text);
  border: 1px solid rgb(255 255 255 / 0.2); border-radius: var(--r);
  font: 700 15px/1 var(--font); text-decoration: none; cursor: pointer;
  transition: background-color var(--lift) ease;
}
.btn:hover { background: rgb(255 255 255 / 0.2); }

/* App window: the one glass surface, so the picture stays visible behind it.
   It never closes while an app is selected; it folds down to its title bar. */
.window {
  position: absolute; z-index: 2;
  top: 8px; right: calc(var(--gutter) + var(--safe-r));
  width: var(--win-w);
  display: flex; flex-direction: column;
  max-height: calc(100% - 8px - 2 * var(--gutter) - var(--legal-h) - var(--safe-b));
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid var(--hair);
  border-radius: var(--win-r);
  /* the one surface that floats above the picture */
  box-shadow: 0 16px 40px rgb(0 0 0 / 0.4);
  visibility: hidden; opacity: 0; transform: translateX(20px);
  transition: opacity var(--slide) var(--ease-out), transform var(--slide) var(--ease-out), visibility 0s linear var(--slide);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .window { background: var(--glass-solid); }
}
.window[data-shown='true'] {
  visibility: visible; opacity: 1; transform: none;
  transition: opacity var(--slide) var(--ease-out), transform var(--slide) var(--ease-out), visibility 0s;
}
.win-bar {
  flex: none; display: flex; align-items: center; gap: 12px;
  padding: 8px 8px 8px 22px; min-height: 60px;
}
.window[data-collapsed='true'] .win-bar { cursor: pointer; }
.win-title { flex: 1; min-width: 0; font: 800 20px/1.2 var(--font); letter-spacing: -0.015em; overflow-wrap: anywhere; }
.win-toggle {
  flex: none; display: grid; place-items: center;
  width: 44px; height: 44px;
  background: rgb(255 255 255 / 0.08); border: 1px solid var(--hair); border-radius: var(--r);
  color: var(--text-2); cursor: pointer;
  transition: background-color var(--lift) ease, color var(--lift) ease;
}
.win-toggle svg { transition: transform var(--slide) var(--ease-out); }
.window[data-collapsed='true'] .win-toggle svg { transform: rotate(180deg); }
.win-toggle:hover, .window[data-collapsed='true'] .win-bar:hover .win-toggle { background: rgb(255 255 255 / 0.16); color: var(--text); }
/* Folding animates the row height from its content size to zero. */
.win-content {
  flex: 0 1 auto; min-height: 0;
  display: grid; grid-template-rows: 1fr;
  transition: grid-template-rows var(--slide) var(--ease-out);
}
.window[data-collapsed='true'] .win-content { grid-template-rows: 0fr; }
/* No folding animation while the window is still hidden (first load). */
.window:not([data-shown='true']) .win-content,
.window:not([data-shown='true']) .win-toggle svg { transition: none; }
.win-inner { min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.win-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 22px 8px; overscroll-behavior: contain; }
.win-tagline { display: none; margin-bottom: 14px; color: var(--text-2); }
.win-about { display: grid; gap: 10px; }
.win-about li { position: relative; padding-left: 16px; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.win-about li::before {
  content: ''; position: absolute; left: 0; top: 0.62em;
  width: 5px; height: 5px; background: var(--text-3);
}
.win-foot { flex: none; display: grid; gap: 10px; padding: 14px 22px 20px; }
.win-foot .win-play { display: none; }
/* Wins over the phone rule that shows the play button in the sheet. */
.win-foot .win-play[hidden] { display: none; }
.btn-wide { display: flex; width: 100%; }
/* Shown instead of a play button when an entry is only a concept. */
.concept-note { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.concept-note[hidden] { display: none; }

/* Play button under the title */
.plate-actions { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; }
.plate-actions[hidden] { display: none; }
.plate-actions .btn-play { display: inline-flex; min-height: 58px; min-width: 200px; padding: 0 36px; font-size: 18px; text-shadow: none; }

/* Loading: three dots after "Lädt" */
.dots span { display: inline-block; animation: dot 1.2s ease-in-out infinite; }
.dots span:nth-child(2) { animation-delay: 0.15s; }
.dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot {
  0%, 60%, 100% { opacity: 0.25; transform: none; }
  30% { opacity: 1; transform: translateY(-0.12em); }
}

/* The one solid white control on screen: start the selected app. */
.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  background: var(--text); color: #000;
  border-radius: var(--r);
  font: 700 15px/1 var(--font); letter-spacing: -0.01em; text-decoration: none;
  transition: transform 120ms ease, background-color var(--lift) ease;
}
.btn-primary::before {
  content: ''; width: 0; height: 0;
  border-left: 10px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent;
}
.btn-primary:hover { background: #e9ebee; }
.btn-primary:active { transform: scale(0.98); }

/* Imprint and privacy, small and quiet in the corner */
.legal {
  position: absolute; right: calc(var(--gutter) + var(--safe-r) - 10px); bottom: calc(var(--gutter) + var(--safe-b) - 10px);
  display: flex; gap: 4px;
}
.legal a {
  display: flex; align-items: center; min-height: var(--legal-h); padding: 0 10px;
  border-radius: var(--r);
  font-size: 13px; font-weight: 600; color: var(--text-3); text-decoration: none;
}
.legal a:hover { color: var(--text); }
.legal a:focus-visible { outline-offset: -3px; }

/* Text pages (imprint, privacy) */
body.page { overflow: auto; background: radial-gradient(120% 80% at 50% 0%, #11151b 0%, var(--base) 70%) fixed; }
.bar--page .brand { font-size: 18px; text-decoration: none; min-height: 44px; }
/* App pages: the music switch sits on the right, as in the launcher. */
.bar--page .status { margin-left: auto; }
.sheet {
  max-width: 720px; margin: 24px auto 48px; padding: 28px;
  margin-inline: max(16px, calc((100% - 720px) / 2));
  background: rgb(255 255 255 / 0.04); border: 1px solid var(--hair); border-radius: var(--r-l);
  display: grid; gap: 16px; justify-items: start;
}
.sheet h1 { font: 800 40px/1.05 var(--font); letter-spacing: -0.025em; }
.sheet-note { color: var(--text-2); }

/* App pages (/<slug>/): picture on top, then the long description.
   The hub stays neutral; each page takes its colours from the package through the
   generated /<slug>/theme.css (tileColor -> panel, page and edge; accentColor -> play
   button). The values below are the fallback without that file. */
body.app-page {
  --panel: #27272a; --page-bg: #1d1d20; --panel-edge: #141415; --panel-line: #4a4a4d;
  --accent: #ffffff; --accent-hover: #e9ebee; --accent-ink: #000000;
  --edge-h: 4px;
  background: var(--page-bg);
}
.app-page .bar--page { position: absolute; top: 0; left: 0; right: 0; }
/* One accent: the app's own colour on the button that starts it. */
.app-page .btn-play { background: var(--accent); color: var(--accent-ink); }
.app-page .btn-play:hover { background: var(--accent-hover); }
.app-hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: min(68vh, 720px);
  display: flex; align-items: flex-end;
  padding: calc(var(--bar-h) + 24px) calc(var(--gutter) + var(--safe-r)) 40px calc(var(--gutter) + var(--safe-l));
}
.app-hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  object-fit: cover; z-index: -2;
}
/* The moving background lies over the still (its first frame) and shows once it plays. */
.app-hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -2; opacity: 0;
  transition: opacity var(--fade) var(--ease-out);
}
.app-hero-video.is-on { opacity: 1; }
.app-hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(rgb(3 5 8 / 0.7) 0%, rgb(3 5 8 / 0.1) 30%, rgb(3 5 8 / 0.45) 65%, var(--page-bg) 100%);
}
.app-hero-text { position: relative; max-width: 680px; text-shadow: 0 1px 12px rgb(0 0 0 / 0.45); }
.app-hero .title { font-size: clamp(40px, 5vw, 64px); }
.app-hero .plate-actions .btn { min-height: 58px; padding: 0 24px; text-shadow: none; }
.app-hero .concept-note { margin-top: 16px; font-size: 16px; }
/* A concept without a picture: no empty picture area above the text. */
.app-hero--plain { min-height: 0; padding-top: calc(var(--bar-h) + 72px); }

.article {
  max-width: 760px; margin: 0 auto; padding: 8px max(var(--gutter), 16px) 40px;
  color: var(--text-2); font-size: 17px; line-height: 1.7;
}
.article h2 { margin: 0 0 14px; color: var(--text); font: 800 28px/1.2 var(--font); letter-spacing: -0.02em; }
.article h3 { margin: 28px 0 10px; color: var(--text); font: 700 20px/1.3 var(--font); }
/* Sections are spaced wider than paragraphs, so the headings start new chapters. */
.article > section + section, .article > .outro { margin-top: 56px; }
.article p, .article ul, .article ol { margin: 0 0 16px; }
.article ul, .article ol { padding-left: 22px; }
.article ul { list-style: disc; }
.article li + li { margin-top: 6px; }
.article strong { color: var(--text); }
.article a { color: var(--text); text-underline-offset: 3px; }
/* Panel motif: the app's colour with a 1px line and a hard bottom edge instead of a soft
   shadow. Used for the overview, the media frames, the FAQ and the closing block. */
.article .facts, .media-frame, .faq, .outro {
  background: var(--panel); border: 1px solid var(--panel-line); border-radius: 2px;
  box-shadow: 0 var(--edge-h) 0 var(--panel-edge);
}
.article .facts {
  list-style: none; padding: 6px 20px; margin-bottom: 0;
  display: grid; column-gap: 28px; grid-template-columns: minmax(0, 1fr);
}
.article .facts li {
  margin: 0; padding: 12px 0;
  border-bottom: 1px solid var(--panel-line);
  font-size: 15px; line-height: 1.5;
}
/* The last row has no line under it (one or two cells, depending on the columns). */
.article .facts li:last-child { border-bottom: 0; }
@media (min-width: 700px) {
  .article .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article .facts li:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
}

/* Article media (media.json): column width, framed, one caption line below. */
.media { margin: 28px 0 32px; }
.media-frame { padding: 6px; }
.media-frame img, .media-frame video { display: block; width: 100%; height: auto; }
.media figcaption { margin-top: calc(var(--edge-h) + 10px); font-size: 14px; line-height: 1.4; color: var(--text-3); }
.media-loop { position: relative; }
/* The video covers its poster and only shows once it really plays (page.js). */
.media-loop video {
  position: absolute; inset: 0; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity var(--fade) var(--ease-out);
}
.media-loop video.is-on { opacity: 1; }
.media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; margin: 28px 0 8px; }
.media-grid .media { margin: 0 0 24px; }

/* FAQ: question and answer side by side in one panel, set apart from the running text. */
.faq { padding: 24px 24px 8px; }
.faq h2 { margin-bottom: 4px; }
.faq .qa { padding: 16px 0; border-top: 1px solid var(--panel-line); }
.faq .qa:first-of-type { border-top: 0; }
.faq .qa h3 { margin: 0 0 6px; font-size: 17px; line-height: 1.4; }
.faq .qa-a p { margin: 0 0 8px; font-size: 16px; line-height: 1.6; }
@media (min-width: 700px) {
  .faq .qa { display: grid; grid-template-columns: 16em minmax(0, 1fr); gap: 24px; }
  .faq .qa h3 { margin: 0; }
}

/* Closing block: the app's mark, name and the play button once more. */
.outro {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px 20px;
  padding: 20px 24px; margin-bottom: var(--edge-h);
}
.outro-tile {
  display: grid; place-items: center; width: 72px; height: 72px; border-radius: var(--r);
  background: linear-gradient(135deg, color-mix(in srgb, var(--tile-c, var(--panel)) 55%, #000) 0%, var(--tile-c, var(--panel)) 100%);
  border: 1px solid var(--panel-line);
}
.outro-tile img { width: 62%; height: 62%; }
.outro-text p { margin: 0; }
.outro-name { color: var(--text); font: 800 24px/1.2 var(--font); letter-spacing: -0.015em; }
.outro-line { font-size: 15px; line-height: 1.5; }
.outro .plate-actions { grid-column: 1 / -1; margin-top: 4px; }
.outro .plate-actions .btn { min-height: 58px; padding: 0 24px; }
.outro .plate-actions .btn-play { min-width: 0; padding: 0 32px; }
@media (min-width: 700px) {
  .outro { grid-template-columns: auto minmax(0, 1fr) auto; }
  .outro .plate-actions { grid-column: auto; margin-top: 0; flex-wrap: nowrap; }
}
.legal--page { position: static; justify-content: center; padding: 8px 16px 32px; }

.noscript {
  position: fixed; z-index: 5; left: 16px; right: 16px; bottom: 16px;
  padding: 16px; background: var(--glass-solid); border: 1px solid var(--hair); border-radius: var(--r-l);
}

/* Narrower desktops and tablets in landscape: smaller window and tiles */
@media (max-width: 1180px) {
  :root { --gutter: 28px; --win-w: 340px; --tile: 76px; }
}

/* Portrait tablets and phones: the window becomes a bottom sheet. Short
   landscape screens (phone on its side) keep the side window. */
@media (max-width: 899px) and (orientation: portrait), (max-width: 639px) {
  :root { --gutter: 16px; --bar-h: 56px; --tile: 68px; }
  .bar { gap: 12px; }
  .tabs { margin-left: -10px; }
  .tab { padding: 0 10px; font-size: 15px; }
  .tab[aria-selected='true']::after { left: 10px; right: 10px; }
  .brand { font-size: 15px; gap: 8px; }
  .brand-mark { width: 20px; height: 20px; }
  .status { font-size: 13px; }

  .desk { --left-w: calc(100% - 2 * var(--gutter) - var(--safe-l) - var(--safe-r)); }
  .tiles { gap: 12px; }
  .title { font-size: clamp(32px, 9vw, 44px); }
  .tagline { font-size: 15px; }
  /* room for the folded sheet (its title bar) at the bottom */
  .desk { --peek: 61px; }
  .plate {
    bottom: calc(var(--peek) + var(--legal-h) + 8px + var(--safe-b));
    right: calc(var(--gutter) + var(--safe-r)); max-width: none;
  }
  .legal { left: calc(var(--gutter) + var(--safe-l) - 10px); right: auto; bottom: calc(var(--peek) + 4px + var(--safe-b)); }
  .plate-actions .btn-play { min-height: 52px; font-size: 17px; }

  .window {
    position: fixed; z-index: 4;
    top: auto; left: 0; right: 0; bottom: 0;
    width: auto; max-height: calc(100dvh - var(--bar-h) - var(--safe-t) - var(--tile) - 40px);
    padding-bottom: var(--safe-b);
    border-width: 1px 0 0; border-radius: var(--r-l) var(--r-l) 0 0;
    box-shadow: 0 -12px 40px rgb(0 0 0 / 0.45);
    transform: translateY(28px);
  }
  .win-tagline { display: block; }
  .win-foot .win-play { display: flex; }
  /* The sheet unfolds upwards: the arrow points up while folded and down while open. */
  .win-toggle svg { transform: rotate(180deg); }
  .window[data-collapsed='true'] .win-toggle svg { transform: none; }
  /* The open sheet carries name, tagline and play button, so the plate fades back
     while the sheet rises, and returns as it folds. */
  .plate { transition: opacity var(--slide) var(--ease-out), visibility 0s; }
  .desk:has(.window[data-shown='true'][data-collapsed='false']) .plate {
    visibility: hidden; opacity: 0;
    transition: opacity calc(var(--slide) / 2) ease-out, visibility 0s linear calc(var(--slide) / 2);
  }
}

/* Phones upright: the tabs get a row of their own under mark, name and switches,
   so all three stay readable next to the name. */
@media (max-width: 639px) and (min-height: 521px) {
  .bar:not(.bar--page), .desk { --bar-h: 100px; }
  .bar:not(.bar--page) { flex-wrap: wrap; align-content: flex-start; row-gap: 0; }
  .bar:not(.bar--page) .brand, .bar:not(.bar--page) .status { height: 56px; }
  .bar:not(.bar--page) .brand { padding-right: 0; }
  .bar:not(.bar--page) .brand::after { display: none; }
  .bar:not(.bar--page) .status { margin-left: auto; }
  .bar:not(.bar--page) .tabs { order: 4; flex: 1 0 100%; height: 44px; }
}

@media (max-width: 420px) {
  /* Phones show the time in their own status bar. */
  #clock { display: none; }
  .tabs { margin-left: -8px; }
  .tab { padding: 0 8px; }
  .tab[aria-selected='true']::after { left: 8px; right: 8px; }
}
/* Below about 360px the tabs still scroll; a fading edge says there is more on that side. */
.tabs[data-fade='end'] { mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.tabs[data-fade='start'] { mask-image: linear-gradient(90deg, transparent, #000 28px); }
.tabs[data-fade='both'] { mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); }

@media (max-width: 639px) {
  .app-hero { min-height: 62vh; padding-bottom: 28px; }
  .article { font-size: 16px; }
  .article h2 { font-size: 24px; }
  .article > section + section, .article > .outro { margin-top: 44px; }
  .media-frame { padding: 4px; }
  .media-grid { grid-template-columns: minmax(0, 1fr); }
  .article .facts { padding: 4px 16px; }
  .faq { padding: 20px 16px 4px; }
  .outro { padding: 18px 16px; }
  .outro .plate-actions .btn-play { flex: 1 1 auto; min-width: 0; }
}

/* Landscape phones: tight height */
@media (max-height: 520px) and (orientation: landscape) {
  :root { --gutter: 18px; --bar-h: 50px; --tile: 60px; --win-w: 330px; }
  .title { font-size: 30px; }
  .tagline { font-size: 14px; margin-top: 6px; }
  .tags { margin-bottom: 8px; }
  .plate { bottom: calc(var(--gutter) + var(--legal-h) + var(--safe-b)); }
  /* Legal links move under the plate so the window can use the full height. */
  .legal { left: calc(var(--gutter) + var(--safe-l) - 10px); right: auto; bottom: calc(var(--safe-b) + 4px); }
  .window { max-height: calc(100% - 8px - var(--gutter) - var(--safe-b)); }
  .win-bar { padding: 8px 8px 0 18px; }
  .win-title { font-size: 18px; }
  .win-body { padding: 8px 18px 4px; }
  .win-about { gap: 6px; }
  .win-about li { font-size: 13px; }
  .win-foot { padding: 10px 18px 14px; }
  .btn-primary { min-height: 44px; }
  .plate-actions { margin-top: 12px; }
  .plate-actions .btn-play { min-height: 46px; min-width: 0; font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  :root { --fade: 0ms; --drift: 0ms; --lift: 0ms; --slide: 0ms; }
  .bg-layer { transform: none; animation: none; }
  .tile[aria-current='true'] { transform: none; }
  a.tile:active, .btn-primary:active { transform: none; }
  .window, .window[data-shown='true'] { transform: none; }
  .dots span { animation: none; opacity: 1; }
  /* page.js never starts the loops here; this keeps their posters in front either way. */
  .media-loop video, .app-hero-video { display: none; }
}

/* Sound switch in the bar */
.status { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: grid; place-items: center;
  width: 44px; height: 44px; margin: 0 -2px;
  background: none; border: 0; border-radius: var(--r);
  color: var(--text-2); cursor: pointer;
  transition: background-color var(--lift) ease, color var(--lift) ease;
}
.icon-btn[hidden] { display: none; }
.icon-btn:hover { background: rgb(255 255 255 / 0.1); color: var(--text); }
.icon-btn .ico-off, .icon-btn[aria-pressed='false'] .ico-on { display: none; }
.icon-btn[aria-pressed='false'] .ico-off { display: block; }
.icon-btn[aria-pressed='false'] { color: var(--text-3); }

/* Account link before the clock: a person glyph and "Anmelden", or the initial and name. */
.account {
  display: flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 10px 0 6px; margin: 0 2px;
  border-radius: var(--r);
  color: var(--text-2); text-decoration: none;
  transition: background-color var(--lift) ease, color var(--lift) ease;
}
.account:hover { background: rgb(255 255 255 / 0.1); color: var(--text); }
.account-ico {
  flex: none; display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgb(255 255 255 / 0.12);
  font: 800 13px/1 var(--font);
}
.account.is-signed-in { color: var(--text); }
.account.is-signed-in .account-ico { background: var(--text); color: var(--base); }
.account-name { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Phones: only the round glyph or initial; the link's label stays for screen readers. */
@media (max-width: 639px) {
  .account { padding: 0 9px; margin: 0; }
  .account-name { display: none; }
}

/* Fade to black when an app starts */
.veil {
  position: fixed; inset: 0; z-index: 10; background: #000;
  opacity: 0; pointer-events: none;
  transition: opacity 280ms var(--ease-out);
}
.veil.is-on { opacity: 1; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .veil { transition: none; } }

/* Legal pages: imprint and privacy. Same sheet as before, with a reading measure,
   quiet section rules and a visible marker for details the owner still has to fill in. */
.sheet--legal { gap: 20px; }
.legal-lead { color: var(--text-2); font-size: 17px; line-height: 1.6; max-width: 60ch; }
.legal-sec {
  display: grid; gap: 12px; width: 100%;
  padding-top: 22px; border-top: 1px solid var(--hair);
}
.legal-sec h2 { font: 800 22px/1.25 var(--font); letter-spacing: -0.015em; }
.legal-sec p, .legal-sec li, .legal-sec address {
  max-width: 64ch; color: var(--text-2); line-height: 1.65; font-style: normal;
}
.legal-sec ul { display: grid; gap: 6px; padding-left: 22px; list-style: disc; }
.legal-sec a { color: var(--text); text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal-sec strong { color: var(--text); }
.legal-sec code { font: 600 0.92em/1 var(--font); color: var(--text); overflow-wrap: anywhere; }
/* Art. 21 (4) GDPR: the right to object is shown apart from the other information. */
.legal-box { padding: 14px 16px; border: 1px solid var(--chip); border-radius: var(--r); background: rgb(255 255 255 / 0.04); }
/* Placeholder for missing owner details; must be gone before launch. */
.missing {
  padding: 0 4px; border: 1px dashed rgb(255 214 102 / 0.7); border-radius: var(--r-s);
  background: rgb(255 214 102 / 0.12); color: var(--text);
}
.legal--page a[aria-current='page'] { color: var(--text); }
@media (max-width: 480px) {
  .sheet--legal { padding: 22px 18px; }
  .sheet--legal h1 { font-size: 34px; }
}
