/* Vybe: "One Thread". The stage (player) on one side, the set and the conversation as one thread on the other.
   Roboto Flex is self-hosted (SIL OFL, see vendor/roboto-flex-OFL.txt) so no request goes to Google. */
@font-face {
  font-family: "Roboto Flex";
  src: url("vendor/roboto-flex-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-stretch: 100% 151%;
  font-display: swap;
}

:root {
  --accent: #6a3fc8;               /* mood color, set by the DJ */
  --on-accent: #fff;
  --page: #fbf8f6;
  --surface: #fff;
  --ink: #1f1a24;
  --ink-2: #62586b;
  --line: #ece4ea;
  --fill: #f4ebf5;
  --container: color-mix(in srgb, var(--accent) 16%, #fff);
  --on-container: color-mix(in srgb, var(--accent) 62%, #000);
  --me-bg: #1f1a24;
  --me-ink: #fff;
  --orange: #ffdbca; --on-orange: #341100;
  --shadow: 0 1px 2px rgba(31, 26, 36, .06), 0 10px 30px -10px rgba(31, 26, 36, .18);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);  /* a small overshoot, for things that glide into place */
  --font: "Roboto Flex", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #121015;
    --surface: #1d1a22;
    --ink: #f3eef6;
    --ink-2: #a9a1b2;
    --line: #2a2530;
    --fill: #231f29;
    --container: color-mix(in srgb, var(--accent) 30%, #121015);
    --on-container: color-mix(in srgb, var(--accent) 30%, #fff);
    --me-bg: #f3eef6;
    --me-ink: #121015;
    --orange: #4a2a14; --on-orange: #ffdbca;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -10px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; overscroll-behavior: none; } /* no rubber-band past the page edge (it showed blank page colour under the player) */
body {
  font-family: var(--font);
  background: var(--page);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.4;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#app { min-height: 100%; }
.view { min-height: 100vh; min-height: 100dvh; animation: viewIn .5s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } }

.wordmark { font-size: clamp(64px, 18vw, 112px); font-weight: 900; font-stretch: 151%; letter-spacing: -.04em; line-height: 1; color: var(--accent); transition: color .8s ease; }
.wordmark.small { font-size: 28px; letter-spacing: -.03em; color: #fff; }

/* Buttons */
.send-btn {
  flex: none; width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  display: grid; place-items: center;
  transition: transform .25s var(--ease), background .8s ease, opacity .2s;
}
.send-btn svg { width: 22px; height: 22px; }
.send-btn.small { width: 48px; height: 48px; }
.send-btn.small svg { width: 20px; height: 20px; }
.send-btn:disabled { opacity: .4; cursor: default; }
.tonal-btn, .pill-btn {
  height: 40px; padding: 0 18px; border-radius: 999px; font-size: 14px; font-weight: 700;
  background: var(--container); color: var(--on-container);
  transition: transform .25s var(--ease), background .8s ease;
}
.pill-btn { background: var(--fill); color: var(--ink); }
.text-btn { height: 40px; padding: 0 6px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.text-btn:hover { color: var(--ink); }
.send-btn:active, .ctl:active, .tonal-btn:active, .pill-btn:active, .mic-btn:active { transform: scale(.96); }

/* Landing */
.landing-inner {
  /* vertically centred in the window */
  max-width: 600px; margin: 0 auto; padding: 48px 24px;
  min-height: 100vh; min-height: 100dvh; justify-content: center;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px;
}
.tagline { font-size: 19px; color: var(--ink-2); margin-top: -6px; }
.mood-form {
  width: 100%; display: flex; align-items: center; gap: 8px; margin-top: 16px;
  min-height: 68px; padding: 8px 8px 8px 26px; border-radius: 34px;  /* buttons stay centred on the right; text wraps left of them */
  background: var(--surface); box-shadow: var(--shadow);
  transition: transform .3s var(--ease);
}
.mood-form:focus-within { transform: scale(1.01); }
/* inputs grow with the text (see autogrow in app.js); the buttons stay at the bottom right */
.mood-input, .chat-input { flex: 1; min-width: 0; border: 0; background: none; outline: none; resize: none; line-height: 1.4; max-height: 40vh; overflow-y: auto; }  /* room for a long message before it scrolls */
.mood-input { font-size: 18px; padding: 13px 0; }
.mood-input::placeholder, .chat-input::placeholder { color: var(--ink-2); }

.segmented { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--fill); margin-top: 8px; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span {
  display: block; padding: 8px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink-2);
  transition: background .25s var(--ease), color .2s;
}
.segmented input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); }

/* Loading */
.loading-inner {
  min-height: 100vh; min-height: 100dvh; max-width: 480px; margin: 0 auto; padding: 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center;
}
.eq { display: flex; align-items: flex-end; gap: 6px; height: 40px; margin-bottom: 8px; }
.eq i { width: 6px; border-radius: 3px; background: var(--accent); height: 30%; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .15s; } .eq i:nth-child(3) { animation-delay: .3s; }
.eq i:nth-child(4) { animation-delay: .45s; } .eq i:nth-child(5) { animation-delay: .6s; }
@keyframes eq { 50% { height: 100%; } }
.loading-inner h2 { font-size: 32px; font-weight: 800; font-stretch: 115%; letter-spacing: -.03em; }
.loading-mood { font-size: 17px; color: var(--ink-2); max-width: 90%; }

/* ---------- Session ---------- */
.session { display: flex; flex-direction: column; }

/* Stage: the player on a blurred-artwork backdrop. Text sits beside the player, never on it. */
.stage { position: relative; isolation: isolate; color: #fff; overflow: hidden; padding: max(16px, env(safe-area-inset-top)) 20px 24px; }
.bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: color-mix(in srgb, var(--accent) 55%, #160c22); transition: background .8s ease; }
.bg-layer {
  position: absolute; inset: -15%;
  background-size: cover; background-position: center;
  filter: blur(70px) saturate(1.5);
  opacity: 0; transition: opacity 1.2s ease;
}
/* The mood backdrop: four soft shapes in the DJ's mood colors, drifting at a pace set by the music's energy
   (see drift in app.js). The cover sits on top as a faint texture so each song still looks like itself. */
.blobs i {
  position: absolute; width: 80%; aspect-ratio: 1; border-radius: 50%; filter: blur(60px);
  background: var(--accent); transition: background-color 2.4s ease; will-change: transform;
}
.blobs i:nth-child(1) { left: -20%; top: -15%; }
.blobs i:nth-child(2) { left: 45%; top: -5%; background: color-mix(in srgb, var(--accent) 55%, #12062a); }
.blobs i:nth-child(3) { left: -10%; top: 45%; background: color-mix(in srgb, var(--accent) 60%, #ff8fb1); }
.blobs i:nth-child(4) { left: 50%; top: 55%; background: color-mix(in srgb, var(--accent) 70%, #000); }
.bg-layer.on { opacity: .35; mix-blend-mode: soft-light; }
.bg-tint { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18, 8, 32, .25), rgba(18, 8, 32, .55)); transition: opacity 1.5s ease; }
.stage-top { display: flex; align-items: center; justify-content: space-between; min-height: 40px; }
.stage-main { width: 100%; max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; padding-top: 16px; }

.art { width: 100%; }
.art-frame {
  position: relative; width: 100%; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #000;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55); transition: transform .6s var(--ease);
  isolation: isolate;
}
body.paused .art-frame { transform: scale(.96); }
/* The iframe is 16:9; widen it so the square tile shows the centred artwork. Always visible, always >= 200px. */
#player, iframe#player {
  position: absolute; top: 0; left: 50%; height: 100%; width: 177.78%; transform: translateX(-50%); border: 0;
}
.art-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .6s ease; z-index: 1; pointer-events: none; }
.art-img.gone { opacity: 0; }
.art-shield { position: absolute; inset: 0; z-index: 2; }

.meta { min-height: 64px; }
.track-title { font-size: clamp(30px, 4.2vw, 52px); font-weight: 800; font-stretch: 112%; letter-spacing: -.035em; line-height: 1; overflow-wrap: anywhere; }
.track-artist { font-size: 19px; color: rgba(255, 255, 255, .85); margin-top: 8px; overflow-wrap: anywhere; }

.bar { position: relative; height: 24px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.bar::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: rgba(255, 255, 255, .3); transition: height .2s var(--ease); }
.bar-fill { position: relative; z-index: 1; height: 2px; width: 0; background: #fff; transition: height .2s var(--ease); }
/* a knob at the end of the fill, shown while hovering or dragging */
.bar-fill::after { content: ""; position: absolute; right: -6px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .2s var(--ease); }
.bar:hover::after, .bar:focus-visible::after, .bar.seeking::after, .bar:hover .bar-fill, .bar:focus-visible .bar-fill, .bar.seeking .bar-fill { height: 5px; }
.bar:hover .bar-fill::after, .bar:focus-visible .bar-fill::after, .bar.seeking .bar-fill::after { transform: scale(1); }
.times { display: flex; justify-content: space-between; font-size: 12px; color: rgba(255, 255, 255, .8); font-variant-numeric: tabular-nums; }

.controls { display: flex; align-items: center; justify-content: center; gap: 32px; }
.ctl { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #fff; transition: transform .25s var(--ease), background .2s; }
.ctl svg { width: 26px; height: 26px; }
.ctl:hover { background: rgba(255, 255, 255, .12); }
.ctl-main { width: 64px; height: 64px; background: #fff; color: #1f1a24; }
.ctl-main:hover { background: #fff; opacity: .9; }

/* Set: header, thread, composer */
.set { display: flex; flex-direction: column; min-width: 0; background: var(--page); }
.set-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 20px 12px; }
.set-title { min-width: 0; }
.eyebrow { font-size: 13px; color: var(--ink-2); }
.set-mood { font-size: 17px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.thread { list-style: none; padding: 4px 20px 16px; display: flex; flex-direction: column; gap: 4px; }
.thread > li, .chat-log > .note { flex-shrink: 0; } /* scrolling lists: rows keep their height, the list scrolls */
.row {
  width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 8px 12px 8px 8px; border-radius: 18px; text-align: left;
  transition: background .2s, transform .25s var(--ease), opacity .3s;
}
.row:hover { background: var(--fill); }
.row:active { transform: scale(.99); }
.row.played { opacity: .5; }
.row.played:hover { opacity: .8; }
.row.now, .row.now:hover { background: none; }
/* one highlight behind the playing row; it glides to the next song instead of jumping (placeHighlight in app.js) */
.thread { position: relative; }
.thread > .hl {
  position: absolute; top: 0; left: 0; z-index: 0; border-radius: 18px; background: var(--container); pointer-events: none;
  transition: transform .6s var(--spring), height .3s var(--ease), background .8s ease;
}
.thread > .hl.instant { transition: none; }
.thread > li:not(.hl) { position: relative; z-index: 1; }
/* new picks rise into the list one after another */
.thread > li.arrive { animation: rowIn .55s var(--ease) both; animation-delay: calc(var(--d) * 1ms); }
@keyframes rowIn { from { opacity: 0; transform: translateY(14px); } }
.eqm { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; margin-right: 7px; vertical-align: -1px; }
.eqm i { width: 3px; height: 30%; border-radius: 2px; background: currentColor; animation: eqm .9s ease-in-out infinite; }
.eqm i:nth-child(2) { animation-delay: .2s; } .eqm i:nth-child(3) { animation-delay: .4s; }
body.paused .eqm i { animation-play-state: paused; }
@keyframes eqm { 50% { height: 100%; } }
.q-art { width: 44px; height: 44px; border-radius: 10px; background: var(--fill) center/cover; }
.q-text { min-width: 0; display: flex; flex-direction: column; }
.q-title, .q-artist { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-title { font-size: 15px; font-weight: 650; }
.q-artist { font-size: 13px; color: var(--ink-2); }
.q-meta { font-size: 12px; font-weight: 650; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.row.now .q-meta { color: var(--on-container); }

/* the conversation is its own section: a divider (outside any scroll area) and space on both sides */
.set-divider { margin: 12px 20px 0; border: 0; border-top: 1px solid var(--line); }
.chat-log { display: flex; flex-direction: column; gap: 4px; margin: 0 20px; padding-top: 12px; }
.chat-log:empty, .set-divider:has(+ .chat-log:empty) { display: none; }
.note { animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
.note.dj { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; padding: 14px 8px 10px; }
.dj-mark { width: 24px; height: 24px; margin-top: 1px; fill: var(--accent); transition: fill .8s ease; }
.note.dj p { font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.note.me { display: flex; justify-content: flex-end; padding: 10px 0 4px; }
.note.me p { max-width: 80%; padding: 10px 16px; border-radius: 20px 20px 6px 20px; background: var(--me-bg); color: var(--me-ink); font-size: 15px; overflow-wrap: anywhere; }
/* while the DJ thinks, its mark breathes and turns (thinking loop in app.js) */
.typing .dj-mark { transform-origin: 50% 50%; }
.end-note { list-style: none; padding: 12px 8px 0; font-size: 13px; color: var(--ink-2); }

.composer {
  position: sticky; bottom: 0; z-index: 3; display: flex; flex-direction: column; gap: 12px;
  padding: 12px 20px calc(20px + env(safe-area-inset-bottom));
  background: var(--page);
}
/* a soft fade above the composer so content scrolling under it doesn't end in a hard line */
.composer::before { content: ""; position: absolute; left: 0; right: 0; top: -24px; height: 24px; background: linear-gradient(180deg, transparent, var(--page)); pointer-events: none; }
.composer-bar {
  display: flex; align-items: flex-end; gap: 8px; min-height: 64px; padding: 8px 8px 8px 22px; border-radius: 32px;
  background: var(--surface); box-shadow: var(--shadow);
}
.chat-input { font-size: 17px; padding: 12px 0; }
.mic-btn { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); transition: transform .25s var(--ease), background .2s; }
.mic-btn svg { width: 20px; height: 20px; }
.mic-btn.listening { background: var(--accent); color: var(--on-accent); animation: listen 1.2s ease-in-out infinite; }
@keyframes listen { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 25%, transparent); } }

/* Auth + pending */
.auth-form { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 14px; text-align: left; margin-top: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); padding-left: 4px; }
.field input {
  width: 100%; height: 52px; padding: 0 18px; border-radius: 16px; font-size: 17px; outline: none;
  background: var(--surface); border: 1px solid var(--line);
}
.field input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.auth-note { min-height: 1.4em; font-size: 14px; color: var(--ink-2); text-align: center; }
.auth-note.err { color: #c0002a; }
.text-btn { align-self: center; background: none; border: 0; padding: 8px; font: inherit; font-size: 14px; color: var(--ink-2); text-decoration: underline; cursor: pointer; }
.text-btn:disabled { opacity: .5; cursor: default; }
@media (prefers-color-scheme: dark) { .auth-note.err { color: #ff8a96; } }
.primary-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 28px; border-radius: 999px; font-size: 17px; font-weight: 700;
  background: var(--accent); color: var(--on-accent); transition: transform .25s var(--ease), opacity .2s, background .8s ease;
}
.primary-btn:active { transform: scale(.98); }
.primary-btn:disabled { opacity: .55; cursor: default; }
.spin { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin1 .8s linear infinite; }
.busy .spin { display: inline-block; }
@keyframes spin1 { to { transform: rotate(360deg); } }
.pending-title { font-size: 28px; font-weight: 800; font-stretch: 112%; letter-spacing: -.025em; }
.pending-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* Account: avatar with a small menu (who is signed in, log out / switch account). Only when login is on. */
.head-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.account { position: relative; flex: none; }
body:not(.auth-on) .account { display: none; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--orange); color: var(--on-orange); font-size: 15px; font-weight: 800;
  transition: transform .25s var(--ease);
}
.avatar:active { transform: scale(.94); }
.account-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; min-width: 220px; padding: 14px 8px 8px;
  border-radius: 20px; background: var(--surface); box-shadow: var(--shadow), 0 0 0 1px var(--line);
  text-align: left; animation: pop .2s var(--ease);
}
.account-label { padding: 0 10px; font-size: 12px; color: var(--ink-2); }
.account-menu .user-name { padding: 2px 10px 10px; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu .user-name:empty { display: none; }
.menu-item { width: 100%; height: 40px; padding: 0 10px; border-radius: 12px; text-align: left; font-size: 14px; font-weight: 600; }
.menu-item:hover { background: var(--fill); }
#landing { position: relative; }
#landing > .account { position: absolute; top: max(16px, env(safe-area-inset-top)); right: 16px; z-index: 1; }

/* Toasts */
.toasts { position: fixed; left: 0; right: 0; bottom: calc(110px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; z-index: 10; padding: 0 16px; }
.toast {
  max-width: 420px; padding: 12px 18px; border-radius: 16px; font-size: 14px; font-weight: 500;
  background: var(--ink); color: var(--page); box-shadow: var(--shadow);
  animation: toastIn .4s var(--ease);
}
.toast.out { opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.96); } }

/* Wide: stage left, thread right, both full height; only the thread scrolls. */
@media (min-width: 900px) {
  .session { flex-direction: row; height: 100vh; height: 100dvh; }
  /* Everything on the stage must fit the window height (browser zoom shrinks it): size the art from what is left. */
  .stage { flex: 1 1 56%; display: flex; flex-direction: column; padding: 24px 44px 28px; overflow-y: auto; }
  .stage-main { flex: 1; justify-content: center; max-width: clamp(240px, calc(100vh - 380px), 520px); max-width: clamp(240px, calc(100dvh - 380px), 520px); padding-top: 0; gap: 16px; }
  .track-title { font-size: clamp(30px, min(4.2vw, 6vh), 52px); }
  .set { flex: 1 1 44%; max-width: 640px; height: 100%; }
  .set-head { padding: 30px 40px 16px; }
  /* the song list fades out at its bottom edge, so it ends softly above the conversation */
  .thread { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 40px 24px;
    -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 32px), transparent);
            mask-image: linear-gradient(180deg, #000 calc(100% - 32px), transparent); }
  /* room below the last song, so the song that is playing can always scroll to the top (see revealNow) */
  .thread::after { content: ""; flex: none; height: calc(100% - 140px); }
  .set-divider { margin: 4px 40px 0; }
  /* scrolls on its own; older messages fade out under the divider instead of being cut off */
  /* keeps its height (the song list gives way, it scrolls anyway) so the DJ's replies are readable */
  .chat-log { position: relative; flex: 0 0 auto; max-height: 40vh; max-height: 40dvh; overflow-y: auto; margin: 14px 40px 0; padding-top: 6px;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 20px);
            mask-image: linear-gradient(180deg, transparent, #000 20px); }
  .composer { padding: 16px 40px 32px; }
  .toasts { left: 56%; }
}


/* Moving between screens (View Transitions; browsers without them just switch).
   build: the mood you typed moves into the loading screen. reveal: the set opens out from the centre.
   back: the session folds away and the small wordmark grows back into the big one. */
#moodInput, #loadingMood, #setMood { view-transition-name: mood; }
#wordmark, #stageMark { view-transition-name: brand; }
::view-transition-group(*) { animation-duration: .6s; animation-timing-function: var(--ease); }
html[data-vt="build"]::view-transition-old(root) { animation: vtOut .35s var(--ease) both; }
html[data-vt="build"]::view-transition-new(root) { animation: vtIn .5s var(--ease) .1s both; }
html[data-vt="reveal"]::view-transition-old(root) { animation: none; }
html[data-vt="reveal"]::view-transition-new(root) { animation: vtReveal 1s cubic-bezier(.65, 0, .25, 1) both; }
html[data-vt="back"]::view-transition-old(root) { animation: vtOutUp .35s var(--ease) both; }
html[data-vt="back"]::view-transition-new(root) { animation: vtIn .5s var(--ease) .05s both; }
@keyframes vtOut { to { opacity: 0; transform: scale(.97); } }
@keyframes vtOutUp { to { opacity: 0; transform: scale(1.02); } }
@keyframes vtIn { from { opacity: 0; transform: scale(1.02); } }
@keyframes vtReveal { from { clip-path: circle(0 at 50% 45%); } to { clip-path: circle(90% at 50% 45%); } }

/* Impressum and privacy pages, plus the links to them */
.legal { max-width: 680px; margin: 0 auto; padding: 32px 16px 64px; line-height: 1.55; }
.legal h1 { font-size: 32px; margin: 16px 0 4px; }
.legal h2 { font-size: 18px; margin: 28px 0 6px; }
.legal p, .legal li { color: var(--ink); margin: 0 0 10px; }
.legal ul { padding-left: 20px; }
.legal a { color: inherit; text-underline-offset: 2px; }
.legal-back { display: inline-block; font-weight: 600; text-decoration: none; }
.legal-note { color: var(--ink-2) !important; font-size: 14px; margin-top: 28px !important; }
.legal-links { font-size: 13px; color: var(--ink-2); text-align: center; margin-top: 20px; }
.legal-links a { color: inherit; }
.account-menu .legal-links { margin: 6px 0 0; text-align: left; padding: 0 10px; }
#landing > .landing-legal { position: absolute; left: 0; right: 0; bottom: max(16px, env(safe-area-inset-bottom)); margin: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
