@font-face {
  font-family: "Bricolage";
  src: url("/fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

/* Die Akzentfarbe kommt vom Cover des laufenden Sounds und blendet weich über */
@property --accent { syntax: "<color>"; inherits: true; initial-value: #ffb454; }
@property --glow-color { syntax: "<color>"; inherits: true; initial-value: #5a3b2a; }

:root {
  --nacht: #1a1433;      /* Hintergrund */
  --daemmer: #251c47;    /* Flächen */
  --linie: #3a2f66;      /* Trennlinien */
  --flieder: #a99ad6;    /* Nebentext */
  --papier: #f4f0ff;     /* Haupttext */
  --natrium: #ffb454;    /* Standard-Akzent, wenn nichts läuft */
  --accent: #ffb454;
  --accent-ink: #1a1433; /* Schrift auf Akzentflächen */
  --glow-color: #5a3b2a;
  --fehler: #ff8a8a;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --mini-h: 68px;

  color-scheme: dark;
  transition: --accent .9s ease, --glow-color .9s ease;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--nacht);
  color: var(--papier);
  font-family: "Bricolage", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
  font-variation-settings: "opsz" 14;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8;
      stroke-linecap: round; stroke-linejoin: round; }
svg .fill { fill: currentColor; stroke: none; }

/* ---------- Atmosphäre: Schein in der Farbe des Sounds, leichtes Korn ---------- */

.glow {
  position: fixed; inset: 0 0 auto 0; height: 70vh; z-index: 0; pointer-events: none;
  background: radial-gradient(120% 80% at 50% -10%, color-mix(in srgb, var(--glow-color) 85%, transparent), transparent 70%);
}
.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Grundlayout ---------- */

.layout {
  position: relative; z-index: 1;
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 0 20px;
}
.app {
  width: 100%;
  max-width: 560px;
  padding-top: calc(var(--safe-t) + 18px);
  padding-bottom: calc(var(--mini-h) + var(--safe-b) + 40px);
}
.connect-panel { display: none; }
@media (min-width: 1000px) {
  .connect-panel {
    display: block;
    position: sticky; top: 0;
    align-self: flex-start;
    width: 300px;
    padding-top: 92px;
  }
  #btn-connect { display: none; }
}

.top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.wordmark {
  display: flex; align-items: center; gap: 8px;
  margin: 0;
  font-size: 36px;
  line-height: 1;
  font-weight: 780;
  font-stretch: 76%;
  font-variation-settings: "opsz" 96;
  letter-spacing: -0.02em;
}
.worm { width: 46px; height: 18px; margin-top: 4px; overflow: visible; }
.worm-tail { stop-color: var(--flieder); }
.worm-head { stop-color: var(--accent); }
.worm-path {
  fill: none; stroke: url(#worm-grad); stroke-width: 4.5; stroke-linecap: round;
  animation: wiggle 1.1s linear infinite; animation-play-state: paused;
}
body.is-playing .worm-path { animation-play-state: running; }
@keyframes wiggle { to { transform: translateX(30px); } }
.top-actions { display: flex; gap: 6px; }

.icon-btn {
  width: 44px; height: 44px;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  color: var(--papier);
  background: color-mix(in srgb, var(--daemmer) 85%, transparent);
  transition: background .15s, color .15s, transform .1s;
}
.icon-btn:active { transform: scale(.94); }
.icon-btn.accent { background: var(--accent); color: var(--accent-ink); }
.icon-btn.accent svg { stroke-width: 2.4; }
.icon-btn.plain { background: none; }
.icon-btn.toggle { color: var(--flieder); position: relative; }
.icon-btn.toggle[aria-pressed="true"] { color: var(--accent); }

/* ---------- Verbindungsstatus ---------- */

.status {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: -4px 0 14px;
  font-size: 14px; color: var(--flieder);
}
.status::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--linie);
}
.status.on::before { background: #7fd6a8; }
.status.busy::before { background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
.status.off::before { background: var(--flieder); }
.status.warn { color: var(--papier); }
.status.warn::before { background: var(--accent); }
.status span { flex: 1; min-width: 0; }
.status button { color: var(--accent); font-weight: 650; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- Tabs ---------- */

.tabs {
  display: flex; gap: 22px;
  border-bottom: 1px solid var(--linie);
  margin-bottom: 18px;
}
.tabs button {
  padding: 8px 0 10px;
  font-size: 17px;
  font-weight: 600;
  color: var(--flieder);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs button[aria-selected="true"] { color: var(--papier); border-color: var(--accent); }

/* ---------- Ohrwurm der Woche ---------- */

.hero {
  --hero: var(--natrium);
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 116px 1fr; gap: 16px; align-items: center;
  width: 100%; text-align: left;
  padding: 14px;
  margin-bottom: 18px;
  border-radius: var(--radius-l);
  background:
    radial-gradient(140% 120% at 0% 0%, color-mix(in srgb, var(--hero) 42%, transparent), transparent 65%),
    color-mix(in srgb, var(--daemmer) 80%, transparent);
  border: 1px solid color-mix(in srgb, var(--hero) 28%, transparent);
}
.hero-cover { width: 116px; height: 116px; border-radius: 14px; object-fit: cover; background: var(--daemmer);
  box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--hero) 70%, black); }
.hero-cover.empty { display: grid; place-items: center; color: var(--flieder); }
.hero-text { min-width: 0; }
.hero-label { display: block; font-size: 13px; color: color-mix(in srgb, var(--hero) 55%, var(--papier)); font-weight: 600; }
.hero-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin: 4px 0 2px; font-size: 23px; line-height: 1.1; font-weight: 760; font-stretch: 80%;
  font-variation-settings: "opsz" 60;
}
.hero-meta { display: block; color: var(--flieder); font-size: 14px; }
.hero-play {
  position: absolute; right: 14px; bottom: 14px;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--hero); color: var(--accent-ink);
}
.hero-play svg .fill { fill: var(--accent-ink); }
.hero .hero-text { padding-right: 44px; }

/* ---------- Suche ---------- */

.search {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-m);
  border: 1px solid var(--linie);
  background: color-mix(in srgb, var(--nacht) 60%, transparent);
  margin-bottom: 8px;
  font-size: 16px;
}
.search::placeholder, .field::placeholder { color: var(--flieder); opacity: .8; }

/* ---------- Liste der Sounds ---------- */

.list { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid;
  grid-template-columns: 52px 1fr auto 40px;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}
.row-play {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center;
  grid-column: 1 / 4; text-align: left; min-width: 0;
}
.cover {
  width: 52px; height: 52px; border-radius: var(--radius-s);
  object-fit: cover; background: var(--daemmer);
}
.cover.empty { display: grid; place-items: center; color: var(--flieder); }
.row-text { min-width: 0; }
.row-title, .row-artist {
  display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row-title { font-weight: 600; }
.row-artist { color: var(--flieder); font-size: 14px; }
.row-dur { color: var(--flieder); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row.playing .row-title { color: var(--accent); }
.row.remote .cover, .row.remote .row-text { opacity: .6; }
.not-here { display: inline-flex; vertical-align: -3px; margin-right: 6px; }
.not-here svg { width: 16px; height: 16px; }
.tempo-tag {
  display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 99px; vertical-align: 1px;
  font-size: 11px; line-height: 17px; font-weight: 700; color: var(--accent-ink); background: var(--flieder);
}
.row-more { width: 40px; height: 40px; display: grid; place-items: center; color: var(--flieder); border-radius: 50%; }
.row-more svg { width: 22px; height: 22px; }
.list-head { display: flex; justify-content: space-between; align-items: baseline; margin: 10px 0 2px; }
.list-head h2 { margin: 0; font-size: 15px; font-weight: 650; color: var(--flieder); }

/* ---------- Leere Zustände ---------- */

.empty-state {
  padding: 40px 4px;
  color: var(--flieder);
  max-width: 38ch;
}
.empty-state h2 {
  color: var(--papier);
  font-size: 26px; line-height: 1.15; margin: 0 0 10px;
  font-weight: 760; font-stretch: 80%;
}
.empty-state p { margin: 0 0 18px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px;
  border-radius: 999px;
  font-weight: 650;
  background: var(--daemmer);
}
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn svg { width: 20px; height: 20px; }
.btn.primary svg .fill { fill: var(--accent-ink); }
.text-btn { color: var(--flieder); font-size: 15px; text-decoration: none; padding: 10px 4px; }
.text-btn:hover { color: var(--papier); }

/* ---------- Aufträge (laden / Fehler) ---------- */

.jobs:empty { display: none; }
.jobs { display: grid; gap: 8px; margin-bottom: 14px; }
.job {
  position: relative; overflow: hidden;
  border-radius: var(--radius-m);
  background: var(--daemmer);
  padding: 12px 14px;
  font-size: 14px;
}
.job-url { color: var(--flieder); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.job-status { font-weight: 600; }
.job.loading::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 30%;
  background: var(--accent);
  animation: slide 1.3s ease-in-out infinite;
}
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.job.error .job-status { color: var(--fehler); }
.job.waiting .job-status { color: var(--flieder); }
.job-msg { margin: 4px 0 8px; }
.job-actions { display: flex; gap: 16px; }
.job-actions button { font-weight: 600; color: var(--accent); padding: 4px 0; }
.job-actions button.quiet { color: var(--flieder); }

/* ---------- Playlists ---------- */

.grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 14px; align-items: start;
}
.tile { text-align: left; min-width: 0; display: flex; flex-direction: column; }
.mosaic {
  aspect-ratio: 1; width: 100%;
  border-radius: var(--radius-m); overflow: hidden;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
  background: var(--daemmer);
}
.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.mosaic.one { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.mosaic.blank { display: grid; place-items: center; color: var(--flieder); grid-template-columns: 1fr; grid-template-rows: 1fr; }
.mosaic.blank svg { width: 36px; height: 36px; }
.mosaic.smart {
  display: grid; place-items: center; grid-template-columns: 1fr; grid-template-rows: 1fr;
  color: var(--accent-ink);
}
.mosaic.smart svg { width: 40px; height: 40px; stroke-width: 2; }
.mosaic.smart.fav { background: linear-gradient(150deg, #ff9fb6, #b86bff); }
.mosaic.smart.loop { background: linear-gradient(150deg, var(--natrium), #ff7a59); }
.mosaic.smart.fresh { background: linear-gradient(150deg, #8fe3c5, #6aa8ff); }
.tile.new .mosaic { background: transparent; border: 1.5px dashed var(--linie); }
.tile-name { display: block; margin-top: 8px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-count { display: block; color: var(--flieder); font-size: 14px; }

.pl-head { margin-bottom: 18px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--flieder); padding: 6px 0; margin-bottom: 10px; }
.back svg { width: 20px; height: 20px; }
.pl-hero { display: grid; grid-template-columns: 132px 1fr; gap: 16px; align-items: end; }
.pl-title {
  margin: 0; font-size: 32px; line-height: 1.02; font-weight: 780; font-stretch: 78%;
  font-variation-settings: "opsz" 72; overflow-wrap: anywhere;
}
.pl-sub { margin: 6px 0 0; color: var(--flieder); font-size: 14px; }
.pl-actions { display: flex; gap: 10px; margin-top: 16px; align-items: center; }
.pl-actions .icon-btn { margin-left: auto; }

/* ---------- Mini-Player ---------- */

.mini {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 20;
  display: flex; align-items: center; gap: 4px;
  padding: 10px max(12px, calc((100vw - 600px) / 2)) calc(10px + var(--safe-b));
  background: color-mix(in srgb, color-mix(in srgb, var(--glow-color) 35%, #1e173a) 88%, transparent);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-top: 1px solid var(--linie);
}
.mini-wave {
  position: absolute; left: 0; right: 0; top: -1px; height: 2px;
  background: linear-gradient(to right, var(--accent) var(--p, 0%), transparent var(--p, 0%));
}
.mini-open { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-align: left; }
.mini-cover { width: 46px; height: 46px; border-radius: var(--radius-s); object-fit: cover; background: var(--daemmer); }
.mini-text { min-width: 0; display: grid; }
.mini-title { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-artist { color: var(--flieder); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Großer Player ---------- */

.player {
  --flieder: rgba(244, 240, 255, .72);   /* auf farbigem Grund heller lesbar */
  position: fixed; inset: 0; z-index: 40;
  background: var(--nacht);
  overflow: hidden;
  animation: rise .28s cubic-bezier(.2, .8, .2, 1);
  touch-action: pan-y;
}
@keyframes rise { from { transform: translateY(100%); } to { transform: none; } }
.player-haze {
  position: absolute; inset: -20%;
  background-size: cover; background-position: center;
  filter: blur(60px) saturate(1.4) brightness(.5);
  opacity: .95;
}
.player::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--glow-color) 45%, transparent) 0%, transparent 45%, rgba(10, 6, 24, .55) 100%);
}
.player-inner {
  position: relative; z-index: 1;
  height: 100%;
  max-width: 460px; margin: 0 auto;
  padding: calc(var(--safe-t) + 6px) 24px calc(var(--safe-b) + 12px);
  display: flex; flex-direction: column;
  overflow-y: auto;
}
/* mittig, wenn Platz ist; oben beginnend, wenn der Bildschirm klein ist */
.player-inner::before, .player-inner::after { content: ""; flex: 1 1 0; min-height: 0; }
.player-inner > * { flex-shrink: 0; }
.player-top { display: flex; align-items: center; justify-content: space-between; }
.player-top svg { width: 28px; height: 28px; }
.player-context {
  flex: 1; text-align: center; font-size: 13px; color: var(--flieder); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 8px;
}
.cover-stage { margin: 14px auto 22px; width: 100%; max-width: min(340px, 40vh); touch-action: none; user-select: none; -webkit-user-select: none; }
.player-cover {
  width: 100%; aspect-ratio: 1;
  border-radius: 20px; object-fit: cover; background: var(--daemmer);
  box-shadow: 0 30px 70px -24px color-mix(in srgb, var(--glow-color) 80%, black);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .25s;
  -webkit-user-drag: none;
}
body.is-playing .player-cover { transform: scale(1); }
body:not(.is-playing) .player-cover { transform: scale(.94); }
.cover-stage.dragging .player-cover { transition: none; }
.player-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.player-meta-text { min-width: 0; }
.player-title {
  margin: 0; font-size: 26px; line-height: 1.1; font-weight: 760; font-stretch: 80%;
  font-variation-settings: "opsz" 48;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.player-artist { margin: 4px 0 0; color: var(--flieder); }
#player-fav[aria-pressed="true"] { color: var(--accent); }
#player-fav[aria-pressed="true"] svg path { fill: var(--accent); }

/* Die Wellenform ist der Regler */
.scrub {
  position: relative;
  height: 60px;
  margin: 18px 0 6px;
  touch-action: none;
  cursor: pointer;
}
.bars {
  position: absolute; inset: 0;
  display: flex; align-items: center; gap: 2px;
}
.bars span { flex: 1; border-radius: 2px; min-height: 3px; }
.bars.base span { background: rgba(244, 240, 255, .22); }
.bars.lit { clip-path: inset(0 calc(100% - var(--p, 0%)) 0 0); }
.bars.lit span { background: var(--accent); }
.times { display: flex; justify-content: space-between; color: var(--flieder); font-size: 13px; font-variant-numeric: tabular-nums; }

.controls { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 14px; }
.controls svg { width: 28px; height: 28px; }
.play-big {
  width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--accent) 60%, transparent);
  transition: transform .1s;
}
.play-big:active { transform: scale(.95); }
.play-big svg { width: 32px; height: 32px; }
.play-big svg .fill { fill: var(--accent-ink); }
.repeat-one {
  position: absolute; top: 6px; right: 4px;
  font-size: 10px; font-weight: 800; line-height: 1;
  background: var(--accent); color: var(--accent-ink);
  border-radius: 99px; padding: 2px 4px;
}

/* Tempo: so wie die Slowed- und Sped-up-Edits, Tonhöhe wandert mit */
.tempo {
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 4px; border-radius: 999px;
  background: rgba(10, 6, 24, .35);
  border: 1px solid rgba(244, 240, 255, .08);
}
.tempo button {
  min-height: 36px; border-radius: 999px;
  font-size: 14px; font-weight: 650; color: var(--flieder);
  transition: background .2s, color .2s;
}
.tempo button[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); }

.player-actions {
  display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 14px;
}
.player-actions button {
  display: grid; justify-items: center; gap: 4px; padding: 8px 0;
  color: var(--flieder); font-size: 12px; font-weight: 600;
}
.player-actions button.active { color: var(--accent); }
.player-actions svg { width: 24px; height: 24px; }

/* Kleine iPhones (z. B. SE): alles etwas kompakter */
@media (max-height: 700px) {
  .cover-stage { margin: 4px auto 12px; max-width: min(300px, 34vh); }
  .player-title { font-size: 22px; }
  .scrub { height: 48px; margin-top: 12px; }
  .controls { margin: 8px 0 10px; }
  .player-actions { margin-top: 8px; }
}

/* ---------- Bottom-Sheet ---------- */

.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(8, 5, 20, .6);
}
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51;
  max-width: 560px; margin: 0 auto;
  max-height: 85dvh; overflow-y: auto;
  background: var(--daemmer);
  border-radius: 20px 20px 0 0;
  padding: 10px 20px calc(var(--safe-b) + 20px);
  animation: rise .22s cubic-bezier(.2, .8, .2, 1);
}
.sheet::before {
  content: ""; display: block; width: 40px; height: 4px; border-radius: 4px;
  background: var(--linie); margin: 0 auto 14px;
}
.sheet h3 { margin: 0 0 4px; font-size: 21px; font-weight: 740; font-stretch: 84%; }
.sheet .sheet-sub { margin: 0 0 14px; color: var(--flieder); font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu { list-style: none; margin: 0; padding: 0; }
.menu button, .menu a {
  width: 100%; display: flex; align-items: center; gap: 14px;
  padding: 13px 2px; text-align: left; text-decoration: none; color: var(--papier);
  border-bottom: 1px solid var(--linie);
}
.menu li:last-child button, .menu li:last-child a { border-bottom: 0; }
.menu svg { width: 22px; height: 22px; color: var(--flieder); flex: none; }
.menu .danger { color: var(--fehler); }
.menu .danger svg { color: var(--fehler); }
.menu .check { margin-left: auto; color: var(--accent); }
.menu .current { color: var(--accent); }
.menu .q-cover { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex: none; background: var(--nacht); }
.menu .q-text { min-width: 0; display: grid; }
.menu .q-text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu .q-text span + span { color: var(--flieder); font-size: 14px; }

.field {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-m);
  border: 1px solid var(--linie);
  background: var(--nacht);
  font-size: 16px;
}
textarea.field { resize: none; min-height: 84px; }
label.lbl { display: block; font-size: 14px; color: var(--flieder); margin: 14px 0 6px; }
.sheet .btn.primary { width: 100%; margin-top: 18px; }
.hint { color: var(--flieder); font-size: 14px; margin: 14px 0 0; }
.hint button { color: var(--accent); font-weight: 600; }

/* ---------- Verbinden ---------- */

.connect h2 { margin: 0 0 6px; font-size: 22px; font-weight: 740; font-stretch: 84%; line-height: 1.2; }
.connect p { margin: 0 0 12px; color: var(--flieder); font-size: 15px; }
.qr { width: 180px; height: 180px; background: var(--papier); border-radius: var(--radius-m); padding: 8px; margin: 6px 0 12px; }
.qr img { width: 100%; height: 100%; }
.addr {
  display: inline-block; font-weight: 650; font-variant-numeric: tabular-nums;
  background: var(--nacht); border: 1px solid var(--linie); border-radius: var(--radius-s);
  padding: 6px 10px; margin-bottom: 14px; user-select: all; word-break: break-all;
}
.steps { margin: 0 0 12px; padding-left: 20px; color: var(--flieder); font-size: 15px; }
.steps li { margin-bottom: 6px; }
.steps b { color: var(--papier); font-weight: 600; }
.addr.code { color: var(--accent); }
.warn-text { color: var(--accent) !important; }
.connect-panel .connect { border-left: 1px solid var(--linie); padding-left: 28px; }

/* ---------- Toast ---------- */

.toast {
  position: fixed; left: 50%; z-index: 60;
  bottom: calc(var(--mini-h) + var(--safe-b) + 18px);
  transform: translateX(-50%);
  max-width: min(92vw, 480px);
  background: var(--papier); color: var(--nacht);
  font-weight: 600; font-size: 15px;
  padding: 11px 16px; border-radius: 12px;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .6);
  animation: pop .2s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
