/* White Sound Noise. Night palette by default, paper palette in light mode. */
:root {
  --bg: #11131f;
  --bg-2: #161929;
  --card: #1b1f32;
  --card-on: #262a3f;
  --line: rgba(236, 231, 218, .1);
  --line-2: rgba(236, 231, 218, .2);
  --ink: #ece7da;
  --mute: #a2a3b4;
  --accent: #e9c37a;
  --accent-ink: #1c1608;
  --ring: #e9c37a;
  --track: rgba(236, 231, 218, .14);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 14px;
  --wrap: 1080px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f0e6;
    --bg-2: #ece6d8;
    --card: #fffdf8;
    --card-on: #fbf3e2;
    --line: rgba(30, 32, 48, .11);
    --line-2: rgba(30, 32, 48, .22);
    --ink: #1e2030;
    --mute: #5c5e6f;
    --accent: #8f5d0e;
    --accent-ink: #fffaf0;
    --ring: #b07a26;
    --track: rgba(30, 32, 48, .13);
    --shadow: 0 10px 28px rgba(60, 45, 20, .12);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button, input, select { font: inherit; color: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -40px; background: var(--accent); color: var(--accent-ink); padding: 6px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; }

/* ---------- header / footer ---------- */
.site-head { border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-size: 17px; letter-spacing: .01em; }
.brand b { font-weight: 600; color: var(--accent); }
.brand span { font-weight: 400; }
.brand-mark { width: 26px; height: 26px; color: var(--accent); stroke-width: 2; }
.head-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.head-nav a { text-decoration: none; padding: 7px 11px; border-radius: 999px; color: var(--mute); font-size: 15px; white-space: nowrap; }
.head-nav a:hover { color: var(--ink); }
.head-nav a[aria-current="page"] { color: var(--ink); background: var(--card); }
@media (max-width: 640px) {
  .head-row { flex-direction: column; align-items: flex-start; gap: 2px; padding-top: 10px; padding-bottom: 6px; }
  .head-nav { margin: 0 -11px; max-width: calc(100% + 22px); }
}

.site-foot { margin-top: 80px; border-top: 1px solid var(--line); background: var(--bg-2); padding: 44px 0 26px; font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr .7fr; gap: 32px; }
.foot-about p { color: var(--mute); max-width: 34ch; }
.site-foot h2 { font: 600 13px/1.4 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--mute); margin: 4px 0 12px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.site-foot nav a { text-decoration: none; }
.site-foot nav a:hover { text-decoration: underline; }
.foot-base { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--mute); font-size: 13px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-about { grid-column: 1 / -1; } }

/* ---------- hero ---------- */
.hero { padding: 48px 0 12px; }
.hero-app { text-align: center; padding-top: 40px; }
.hero h1 { font: 500 clamp(30px, 5vw, 48px)/1.12 var(--serif); letter-spacing: -.01em; margin: 0 auto 12px; max-width: 20ch; text-wrap: balance; }
.hero-app h1 { margin-left: auto; margin-right: auto; }
.kicker { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
.lede { font-size: 18px; color: var(--mute); max-width: 58ch; margin: 0; text-wrap: pretty; }
.hero-app .lede { margin: 0 auto; }

/* ---------- mixer ---------- */
.mixer { position: relative; margin-top: 8px; }
.stage { position: relative; display: grid; place-items: center; width: min(100%, 380px); aspect-ratio: 1; margin: 0 auto; }
.viz { position: absolute; inset: 0; width: 100%; height: 100%; }
.mixbg { position: absolute; inset: 0; pointer-events: none; }
.bg-ic {
  position: absolute; width: var(--s, 10%); aspect-ratio: 1; transform: translate(-50%, -50%);
  color: var(--accent); opacity: 0; transition: width .5s ease, opacity .5s ease;
}
.bg-ic.on { opacity: calc(var(--o, .3) * .55); }
.is-playing .bg-ic.on { opacity: var(--o, .3); }
.bg-ic svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.is-playing .bg-ic svg { animation: bgfloat 7s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes bgfloat { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-5%) rotate(3deg); } }
@media (prefers-reduced-motion: reduce) { .is-playing .bg-ic svg { animation: none; } }
.play {
  position: relative; z-index: 1; width: 104px; height: 104px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; box-shadow: var(--shadow);
  transition: transform .15s ease;
}
.play:hover { transform: scale(1.04); }
.play:active { transform: scale(.97); }
.play svg { width: 40px; height: 40px; grid-area: 1 / 1; }
.play .ic-play { transform: translateX(2px); }
.play .ic-pause, .is-playing .play .ic-play { display: none; }
.is-playing .play .ic-pause { display: block; }
.now { z-index: 1; position: absolute; bottom: 2%; left: 0; right: 0; margin: 0; text-align: center; color: var(--mute); font-size: 15px; padding: 0 10px; }

.controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 6px auto 30px; }
.ctl { display: inline-flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; min-height: 46px; }
.ctl > svg { width: 20px; height: 20px; color: var(--mute); }
.ctl-vol { flex: 1 1 260px; max-width: 340px; }
.ctl-vol .range { flex: 1; }
.ctl select { appearance: none; -webkit-appearance: none; background: transparent; border: 0; padding: 4px 2px; cursor: pointer; }
.ctl select option { background: var(--card); color: var(--ink); }
.timer-left { font-variant-numeric: tabular-nums; color: var(--accent); font-size: 14px; }
.timer-left:empty { display: none; }
.ctl-btn { cursor: pointer; }
.ctl-btn:hover, .ctl-timer:hover { border-color: var(--line-2); }

.mini-h { font: 600 13px/1.4 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--mute); margin: 0 0 12px; }
.mixes { margin-bottom: 30px; }
.mix-row { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mix-chip {
  border: 1px solid var(--line-2); background: transparent; border-radius: 999px; padding: 8px 15px;
  cursor: pointer; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; min-height: 40px;
}
.mix-chip:hover { background: var(--card); }
.mix-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.mix-chip.add { border-style: dashed; color: var(--mute); }
.mix-chip.add svg { width: 16px; height: 16px; }
.user-mix { display: inline-flex; align-items: center; }
.user-mix .mix-chip { border-top-right-radius: 0; border-bottom-right-radius: 0; padding-right: 10px; }
.mix-del { border: 1px solid var(--line-2); border-left: 0; background: transparent; border-radius: 0 999px 999px 0; min-height: 40px; padding: 0 10px 0 8px; cursor: pointer; color: var(--mute); display: grid; place-items: center; }
.mix-del:hover { color: var(--ink); background: var(--card); }
.mix-del svg { width: 14px; height: 14px; }

.group { margin-bottom: 28px; }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.tile {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  display: flex; flex-direction: column; transition: border-color .2s, background .2s;
}
.tile.on { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: var(--card-on); }
.tile-toggle {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  text-align: left; background: none; border: 0; padding: 16px 16px 8px; cursor: pointer; border-radius: var(--r) var(--r) 0 0;
}
.tile-ic { grid-row: 1 / span 2; width: 34px; height: 34px; color: var(--mute); transition: color .2s; }
.tile.on .tile-ic { color: var(--accent); }
.tile-name { font-weight: 600; font-size: 16px; }
.tile-blurb { font-size: 13px; line-height: 1.4; color: var(--mute); }
.tile .tile-vol { margin: 6px 16px 16px; width: calc(100% - 32px); }
.tile.loading .tile-ic { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (max-width: 520px) {
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile-toggle { grid-template-columns: 1fr; padding: 14px 14px 6px; row-gap: 6px; }
  .tile-ic { grid-row: auto; width: 28px; height: 28px; }
  .tile-blurb { display: none; }
  .tile .tile-vol { margin: 4px 14px 14px; width: calc(100% - 28px); }
}

/* range */
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; --fill: 0%; }
.range::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--accent) var(--fill), var(--track) var(--fill)); }
.range::-moz-range-track { height: 4px; border-radius: 4px; background: var(--track); }
.range::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--accent); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: var(--ink); border: 0; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--ink); border: 0; }
.tile:not(.on) .range::-webkit-slider-thumb { background: var(--mute); }

/* dialog + toast */
.dialog { border: 1px solid var(--line-2); border-radius: 18px; background: var(--card); color: var(--ink); padding: 24px; width: min(92vw, 400px); box-shadow: var(--shadow); }
.dialog::backdrop { background: rgba(5, 6, 12, .6); }
.dialog h2 { font: 500 24px/1.2 var(--serif); margin: 0 0 6px; }
.dialog p { color: var(--mute); font-size: 14px; margin: 0 0 16px; }
.dialog label { display: block; font-size: 14px; margin-bottom: 6px; }
.dialog input { width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.btn { border: 0; border-radius: 999px; padding: 10px 20px; background: var(--accent); color: var(--accent-ink); font-weight: 600; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); font-weight: 400; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px; transition: opacity .2s, transform .2s; z-index: 20; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.noscript { text-align: center; color: var(--mute); }

/* ---------- prose ---------- */
.prose { margin-top: 56px; max-width: 760px; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font: 500 clamp(24px, 3.2vw, 31px)/1.2 var(--serif); margin: 52px 0 14px; letter-spacing: -.005em; }
.prose h3 { font-size: 18px; margin: 30px 0 8px; }
.prose p, .prose li { color: color-mix(in srgb, var(--ink) 88%, var(--mute)); }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--ink); }
.prose .note { border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; margin: 24px 0; color: var(--ink); }
.table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--line); border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 520px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; background: var(--bg-2); }
tr:last-child td { border-bottom: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; padding: 0; list-style: none; margin: 20px 0; }
.cards li { margin: 0; }
.cards a { display: block; height: 100%; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.cards a:hover { border-color: var(--line-2); }
.cards b { display: block; color: var(--ink); margin-bottom: 4px; }
.cards span { font-size: 14px; color: var(--mute); }

.faq { margin-top: 52px; }
.faq details { border-top: 1px solid var(--line); padding: 4px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 14px 28px 14px 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-weight: 400; font-size: 20px; color: var(--mute); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 16px; }

.more { margin-top: 64px; }
.more h2 { font: 500 22px/1.2 var(--serif); margin: 0 0 14px; }
.more-grid { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.more-grid a { display: inline-block; text-decoration: none; border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 14px; font-size: 15px; }
.more-grid a:hover { background: var(--card); }

.not-found { text-align: center; padding: 80px 0 20px; }
.not-found .btn { display: inline-block; text-decoration: none; margin-top: 12px; }

/* ---------- app shell (phones and tablets) ---------- */
.tabbar { display: none; }
.install-btn { border: 1px solid var(--line-2); background: transparent; border-radius: 999px; padding: 6px 13px; font-size: 14px; cursor: pointer; white-space: nowrap; }
.install-btn[hidden], .install-card[hidden] { display: none; }
.resume-pending .play { animation: breathe 1.8s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: var(--shadow), 0 0 0 14px color-mix(in srgb, var(--accent) 22%, transparent); } }

.sheet {
  margin: auto auto 0; width: 100%; max-width: 640px; max-height: 86vh; max-height: 86dvh;
  border: 0; border-radius: 22px 22px 0 0; padding: 0 0 env(safe-area-inset-bottom);
  background: var(--card); color: var(--ink); box-shadow: 0 -10px 40px rgba(0, 0, 0, .3);
  flex-direction: column;
}
.sheet[open] { display: flex; }
.sheet::backdrop { background: rgba(5, 6, 12, .55); }
.sheet.in { animation: sheet-in .24s cubic-bezier(.2, .8, .2, 1); }
.sheet.out { transition: transform .18s ease-in; transform: translateY(100%) !important; }
@keyframes sheet-in { from { transform: translateY(100%); } }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 8px auto 2px; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 20px 4px; flex: none; }
.sheet-head h2 { font: 500 23px/1.2 var(--serif); margin: 0; }
.sheet-x { background: var(--bg-2); border: 0; border-radius: 50%; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; color: var(--mute); }
.sheet-x svg { width: 16px; height: 16px; }
.sheet-body { overflow-y: auto; padding: 0 20px 24px; overscroll-behavior: contain; }
.sheet-body h3 { font: 600 12px/1.4 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--mute); margin: 18px 0 8px; }
.sheet-links { list-style: none; margin: 0; padding: 0; background: var(--bg-2); border-radius: 14px; overflow: hidden; }
.sheet-links a { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; text-decoration: none; border-bottom: 1px solid var(--line); }
.sheet-links li:last-child a { border-bottom: 0; }
.sheet-links a::after { content: "\203A"; color: var(--mute); font-size: 20px; line-height: 1; }
.sheet-links a[aria-current] { color: var(--accent); }
.install-card { margin-top: 20px; background: var(--bg-2); border-radius: 14px; padding: 14px 16px; }
.install-card h3 { margin: 0 0 4px; color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 16px; }
.install-card p { margin: 0 0 10px; color: var(--mute); font-size: 14px; }
.install-card p:last-child { margin-bottom: 0; }
.sheet-note { color: var(--mute); font-size: 13px; margin: 18px 0 0; }

@media (max-width: 1024px) {
  html { -webkit-tap-highlight-color: transparent; }
  html.standalone body { overscroll-behavior-y: none; }
  body { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  button, a, .range, select { touch-action: manipulation; }
  .tile-toggle, .mix-chip, .tab, .ctl, .play { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

  /* top app bar */
  .site-head {
    position: sticky; top: 0; z-index: 15; border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 84%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
    padding-top: env(safe-area-inset-top);
  }
  .head-row { flex-direction: row; align-items: center; min-height: 52px; padding-top: 0; padding-bottom: 0; }
  .head-nav { display: none; }
  .wrap { padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }

  /* compact hero */
  .hero, .hero-app { padding: 20px 0 2px; }
  .hero h1 { font-size: clamp(26px, 6.4vw, 34px); margin-bottom: 8px; }
  .kicker { margin-bottom: 6px; font-size: 12px; }
  .lede { font-size: 15px; line-height: 1.5; }
  .stage { width: min(80vw, 340px); }
  .play { width: 90px; height: 90px; }
  .play:hover { transform: none; }
  .play svg { width: 34px; height: 34px; }
  .controls { margin-bottom: 24px; }

  /* mixes scroll sideways like an app carousel */
  .mix-row { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; margin: 0 -18px; padding: 2px 18px 8px; scrollbar-width: none; }
  .mix-row::-webkit-scrollbar { display: none; }
  .mix-row > li { flex: none; scroll-snap-align: start; }
  .mixes, .group, .anchor { scroll-margin-top: 66px; }
  .anchor { display: block; }
  .tile { transition: border-color .2s, background .2s, transform .12s; }
  .tile:active { transform: scale(.975); }

  /* save dialog becomes a sheet */
  .dialog { margin: auto auto 0; width: 100%; max-width: 640px; border-radius: 22px 22px 0 0; border: 0; padding-bottom: calc(24px + env(safe-area-inset-bottom)); animation: sheet-in .24s cubic-bezier(.2, .8, .2, 1); }

  .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
  .prose { margin-top: 44px; }

  /* footer: the sheet carries the links */
  .site-foot { margin-top: 56px; padding: 28px 0 20px; }
  .foot-grid { display: block; }
  .foot-grid > nav { display: none; }
  .foot-base { margin-top: 18px; }

  /* bottom tab bar */
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 16;
    padding: 4px max(8px, env(safe-area-inset-left)) calc(4px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg-2) 88%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(16px); backdrop-filter: saturate(1.4) blur(16px);
    border-top: 1px solid var(--line);
  }
  .tab {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 54px; padding: 4px 0; border: 0; background: none; color: var(--mute);
    font-size: 11px; font-weight: 500; letter-spacing: .01em; text-decoration: none; cursor: pointer;
  }
  .tab svg { width: 23px; height: 23px; }
  .tab:active { color: var(--ink); }
  .tab.on { color: var(--accent); font-variant-numeric: tabular-nums; }
  .tab-play { justify-content: flex-start; }
  .tab-play-disc {
    width: 58px; height: 58px; margin-top: -20px; border-radius: 50%; display: grid; place-items: center;
    background: var(--accent); color: var(--accent-ink);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .3), 0 0 0 5px var(--bg-2);
    transition: transform .12s;
  }
  .tab-play:active .tab-play-disc { transform: scale(.94); }
  .tab-play-disc svg { width: 26px; height: 26px; grid-area: 1 / 1; }
  .tab-play .ic-play { transform: translateX(1px); }
  .tab-play .ic-pause, .is-playing .tab-play .ic-play { display: none; }
  .is-playing .tab-play .ic-pause { display: block; }
}
@media (min-width: 641px) and (max-width: 1024px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .tabbar { padding-left: max(15%, env(safe-area-inset-left)); padding-right: max(15%, env(safe-area-inset-right)); }
}

/* ---------- install banner + guide ---------- */
.ins { position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(88px + env(safe-area-inset-bottom)); max-width: 460px; margin: 0 auto;
  background: var(--card); border: 1px solid var(--line-2); border-radius: 20px; padding: 16px 16px 14px; box-shadow: var(--shadow), 0 0 0 1px rgba(233, 195, 122, .08);
  transform: translateY(24px) scale(.98); opacity: 0; transition: transform .28s cubic-bezier(.2, .8, .2, 1), opacity .28s; }
.ins[hidden] { display: none; }
.ins.in { transform: none; opacity: 1; }
@media (min-width: 1025px) { .ins { bottom: 24px; left: auto; right: 24px; margin: 0; } }
.ins-x { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; display: grid; place-items: center; background: none; border: 0; color: var(--mute); border-radius: 50%; cursor: pointer; }
.ins-x svg { width: 18px; height: 18px; }
.ins-x:hover { background: var(--card-on); color: var(--ink); }
.ins-main { display: flex; gap: 12px; align-items: center; padding-right: 26px; }
.ins-icon { border-radius: 12px; flex: none; box-shadow: 0 2px 10px rgba(0, 0, 0, .3); }
.ins h2 { margin: 0; font: 600 17px/1.25 var(--sans); color: var(--ink); }
.ins-text p { margin: 3px 0 0; font-size: 13.5px; line-height: 1.4; color: var(--mute); }
.ins-perks { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ins-perks li { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--card-on); color: var(--ink); border: 1px solid var(--line); }
.ins-perks li::before { content: "✓ "; color: var(--accent); }
.ins-actions { display: flex; gap: 8px; margin-top: 14px; }
.ins-go { flex: 1; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 12px; padding: 12px 16px; font-weight: 650; font-size: 15px; cursor: pointer; }
.ins-go:active { transform: scale(.98); }
.ins-later { background: transparent; color: var(--mute); border: 0; padding: 12px 14px; font-size: 14px; border-radius: 12px; cursor: pointer; }
.ins.guide .ins-later { flex: 1; background: var(--accent); color: var(--accent-ink); font-weight: 650; font-size: 15px; }
.ins-steps { margin-top: 14px; }
.ins-steps h3 { margin: 0 0 4px; font-size: 14px; color: var(--ink); text-transform: none; letter-spacing: 0; }
.ins-note { margin: 0 0 8px; font-size: 13px; color: var(--mute); }
.ins-steps ol { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.ins-steps li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; animation: ins-pop .5s both; animation-delay: var(--d, 0s); }
.ins-n { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; }
.ins-ic { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--card-on); color: var(--accent); border: 1px solid var(--line-2); }
.ins-ic svg { width: 20px; height: 20px; }
.ins-t { font-size: 14px; line-height: 1.35; color: var(--ink); }
.ins-t small { color: var(--mute); font-size: 12px; }
.ins-copy { margin-top: 10px; width: 100%; background: transparent; color: var(--ink); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px; cursor: pointer; }
@keyframes ins-pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* bouncing arrow pointing at Safari's Share button */
.ins-arrow { position: fixed; z-index: 31; left: 50%; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--accent); font-size: 12px; font-weight: 700; pointer-events: none; transform: translateX(-50%); }
.ins-arrow svg { width: 34px; height: 34px; stroke-width: 2.4; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .5)); }
.ins-arrow span { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 2px 10px; }
.ins-arrow.bottom { bottom: calc(4px + env(safe-area-inset-bottom)); animation: ins-bob-b 1s ease-in-out infinite; }
.ins-arrow.top { top: 4px; flex-direction: column-reverse; animation: ins-bob-t 1s ease-in-out infinite; }
.ins-arrow.top svg { transform: rotate(180deg); }
@keyframes ins-bob-b { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }
@keyframes ins-bob-t { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -8px); } }
