/* Brand ground from CLAUDE.md §3.6 — deliberately one theme, matching every bot asset. */
  :root {
    --ground: #1A1512; --surface: #241D18; --surface-hi: #2A2118; --line: #3A2E26;
    --amber: #F2A93B; --amber-dim: #6b4a17; --green: #3ECF8E; --green-dim: #1d5d41;
    --text: #C9CDD6; --muted: #8A7A6A;
    --r-sm: 8px; --r-md: 12px; --r-lg: 18px;
    --sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  }
  * { box-sizing: border-box; }
  html, body { height: 100%; }
  body {
    margin: 0; background: var(--ground); color: var(--text);
    font-family: var(--sans); font-size: 0.875rem; line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .app { display: flex; flex-direction: column; height: 100%; max-width: 560px; margin: 0 auto; }

  header {
    padding: 13px 14px 10px; border-bottom: 1px solid var(--line);
    display: flex; align-items: center; gap: 11px; flex: none;
  }
  .mark { width: 32px; height: 32px; flex: none; }
  .disc { transform-box: view-box; transform-origin: 256px 256px; animation: spin 6s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
  .arm { transform-box: view-box; transform-origin: 403px 46px; animation: track 14s ease-in-out infinite alternate; }
  @keyframes track { from { transform: rotate(0deg); } to { transform: rotate(14deg); } }
  .wordmark { font-variation-settings: "wdth" 112; font-weight: 800; font-size: 1rem; letter-spacing: -0.015em; line-height: 1.1; }
  .eyebrow { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
  .tier {
    margin-left: auto; appearance: none; font-family: var(--mono); font-size: 10px; letter-spacing: .07em;
    padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line);
    color: var(--muted); background: transparent; cursor: pointer; white-space: nowrap;
  }
  .tier.on { color: var(--amber); border-color: var(--amber-dim); background: rgba(242,169,59,.07); }

  .tabs { display: flex; gap: 2px; padding: 9px 11px; flex: none; border-bottom: 1px solid var(--line); }
  .tab {
    flex: 1; appearance: none; background: transparent; border: 0; color: var(--muted);
    font-family: inherit; font-size: .75rem; font-weight: 600; padding: 8px 4px 9px;
    border-radius: var(--r-sm); cursor: pointer; position: relative;
  }
  .tab[aria-selected="true"] { color: var(--text); background: var(--surface); }
  .tab[aria-selected="true"]::after {
    content: ""; position: absolute; left: 27%; right: 27%; bottom: 2px; height: 2px;
    border-radius: 2px; background: var(--amber);
  }
  .tab .count { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-left: 4px; }
  :focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

  .scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .view { padding: 11px 11px 24px; display: none; flex-direction: column; gap: 9px; }
  .view.active { display: flex; }

  .search {
    display: flex; align-items: center; gap: 9px; padding: 10px 12px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); flex: none;
  }
  .search:focus-within { border-color: var(--amber-dim); }
  .search svg { width: 15px; height: 15px; flex: none; color: var(--muted); }
  .search input {
    flex: 1; min-width: 0; background: transparent; border: 0; outline: none;
    color: var(--text); font-family: inherit; font-size: 1rem;  /* 16px: iOS zooms the page below this */
  }
  .search input::placeholder { color: var(--muted); }
  .clear { appearance: none; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 15px; }

  .result-line {
    font-family: var(--mono); font-size: 10.5px; color: var(--muted); letter-spacing: .03em;
    padding: 0 3px; display: flex; justify-content: space-between; gap: 10px; min-height: 16px;
  }
  .section-label {
    font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted);
    font-weight: 700; margin: 7px 3px 1px; display: flex; align-items: center; gap: 7px;
  }
  .section-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

  .row {
    display: flex; align-items: center; gap: 11px; padding: 10px 11px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
    width: 100%; text-align: left; font-family: inherit; color: var(--text); cursor: pointer;
  }
  .row.followed { border-color: var(--amber-dim); }
  .row.paused { background: transparent; border-style: dashed; }
  .initial {
    width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none;
    font-weight: 800; font-size: 1rem; font-variation-settings: "wdth" 110;
    color: var(--muted); background: var(--surface-hi); box-shadow: inset 0 0 0 1px var(--line);
  }
  .row.followed .initial { background: var(--amber); color: var(--ground); box-shadow: none; }
  .row-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
  .row-name {
    font-weight: 700; font-variation-settings: "wdth" 103;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .row-name mark { background: rgba(242,169,59,.22); color: var(--amber); border-radius: 2px; }
  .row-sub { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
  /* A narrowed follow is the one whose silence needs explaining, so it reads as set, not as chrome. */
  .row-sub.filtered { color: var(--amber); }
  .icon-btn {
    appearance: none; flex: none; width: 30px; height: 30px; padding: 0; line-height: 1;
    font-size: 13px; border-radius: var(--r-sm); cursor: pointer;
    border: 1px solid var(--line); background: transparent; color: var(--muted);
  }
  .icon-btn[disabled] { opacity: .5; cursor: progress; }
  .btn {
    appearance: none; flex: none; font-family: inherit; font-size: 11px; font-weight: 700;
    padding: 7px 12px; border-radius: var(--r-sm);
    border: 1px solid var(--amber); background: transparent; color: var(--amber); cursor: pointer;
  }
  .btn.on { border-color: var(--line); color: var(--muted); }
  .btn.go { border-color: var(--green-dim); color: var(--green); }
  .btn[disabled] { opacity: .5; cursor: progress; }

  .slots {
    display: flex; align-items: center; gap: 9px; padding: 9px 11px;
    border: 1px dashed var(--line); border-radius: var(--r-md); font-size: 11.5px; color: var(--muted); flex: none;
  }
  .pips { display: flex; gap: 4px; flex: none; }
  .pip { width: 18px; height: 4px; border-radius: 2px; background: var(--line); }
  .pip.on { background: var(--amber); }
  .slots .link {
    margin-left: auto; appearance: none; border: 0; background: transparent; color: var(--amber);
    font-family: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; padding: 0;
  }

  .drop {
    display: grid; grid-template-columns: 64px 1fr; gap: 11px; padding: 10px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  }
  .drop.sold { opacity: .5; }
  .cover {
    width: 64px; height: 64px; border-radius: var(--r-sm); flex: none; overflow: hidden;
    background: linear-gradient(145deg, #2b211a, #1d1713); position: relative;
  }
  .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .cover .fmt {
    position: absolute; left: 6px; bottom: 5px; font-family: var(--mono); font-size: 8.5px;
    font-weight: 700; letter-spacing: .1em; color: rgba(201,205,214,.85);
  }
  .drop-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
  .drop-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
  .signal { font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .1em; padding: 3px 6px; border-radius: 4px; }
  .signal.SIGNED { background: var(--amber); color: var(--ground); }
  .signal.EXCLUSIVE { background: rgba(242,169,59,.16); color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber-dim); }
  .signal.LIMITED { background: rgba(62,207,142,.14); color: var(--green); box-shadow: inset 0 0 0 1px var(--green-dim); }
  .signal.PREORDER { background: rgba(201,205,214,.09); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
  .watch-tag { font-family: var(--mono); font-size: 9px; letter-spacing: .06em; color: var(--green); display: flex; align-items: center; gap: 4px; }
  .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); flex: none; }
  .drop-artist { font-weight: 700; }
  .drop-title { font-size: .75rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .drop-meta { font-family: var(--mono); font-size: 10.5px; display: flex; gap: 6px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
  .price { color: var(--text); font-weight: 600; }
  .sep { color: var(--line); }
  .store { color: var(--muted); }

  .scrim { position: fixed; inset: 0; background: rgba(10,8,7,.68); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .scrim.open { opacity: 1; pointer-events: auto; }
  .sheet {
    position: fixed; left: 0; right: 0; bottom: 0; max-height: 88%; max-width: 560px; margin: 0 auto;
    background: var(--surface-hi); border-top: 1px solid var(--line);
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    padding: 8px 14px calc(16px + env(safe-area-inset-bottom));
    transform: translateY(102%); transition: transform .26s cubic-bezier(.2,.7,.3,1);
    display: flex; flex-direction: column; gap: 12px; overflow-y: auto;
  }
  .sheet.open { transform: translateY(0); }
  .grabber { width: 34px; height: 4px; border-radius: 2px; background: var(--line); align-self: center; flex: none; }
  .sheet-head { display: flex; align-items: center; gap: 11px; }
  .sheet-head h2 { margin: 0; font-size: 1.25rem; font-variation-settings: "wdth" 108; letter-spacing: -0.015em; }
  .sheet-sub { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
  .field-label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }

  .cover-list { display: flex; flex-direction: column; gap: 6px; }
  .cover-store {
    display: flex; align-items: center; gap: 9px; padding: 9px 11px; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--r-sm); text-decoration: none; color: var(--text);
  }
  .cs-name { font-size: .75rem; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .stat { padding: 9px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); display: flex; flex-direction: column; gap: 1px; }
  .stat b { font-family: var(--mono); font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
  .stat.sig b { color: var(--amber); }
  .stat.lim b { color: var(--green); }
  .stat span { font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
  /* Scope is navigation, not a filter value, so it reads as one control with a selected segment
     rather than as three more chips competing with the signal/format ones below it. */
  .seg {
    display: flex; gap: 3px; padding: 3px; flex: none;
    background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  }
  .seg button {
    appearance: none; flex: 1; min-width: 0; padding: 7px 6px; border: 0; border-radius: 999px;
    background: transparent; color: var(--muted); cursor: pointer; white-space: nowrap;
    font-family: var(--mono); font-size: 11px; letter-spacing: .03em;
  }
  .seg button[aria-pressed="true"] { background: var(--surface-hi); color: var(--text); font-weight: 700; }

  .rail { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .chip {
    appearance: none; flex: none; font-family: var(--mono); font-size: 11px; letter-spacing: .04em;
    padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line);
    background: var(--surface); color: var(--muted); cursor: pointer;
  }
  .chip[aria-pressed="true"] { color: var(--ground); background: var(--amber); border-color: var(--amber); font-weight: 700; }
  .chip.static { cursor: default; }
  .sheet-action {
    appearance: none; font-family: inherit; font-size: .875rem; font-weight: 700; padding: 13px;
    border: 0; border-radius: var(--r-md); background: var(--amber); color: var(--ground); cursor: pointer; flex: none;
  }
  .sheet-action.off { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
  .compare { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
  .compare table { width: 100%; border-collapse: collapse; }
  .compare th, .compare td { padding: 9px 10px; text-align: left; font-size: .75rem; border-bottom: 1px solid var(--line); }
  .compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
  .compare thead th { font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
  .compare th { font-weight: 600; color: var(--text); }
  .compare td { color: var(--muted); font-family: var(--mono); font-size: 10.5px; }
  .compare td.pro { color: var(--amber); }
  .compare .col-pro { background: rgba(242,169,59,.05); box-shadow: inset 1px 0 0 var(--amber-dim); }
  .note { font-size: 11px; color: var(--muted); line-height: 1.55; margin: 0; }

  .toast {
    position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom));
    transform: translate(-50%, 8px); background: var(--surface-hi); border: 1px solid var(--line);
    color: var(--text); font-size: .75rem; padding: 9px 15px; border-radius: 999px;
    opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
    max-width: calc(100% - 30px); text-align: center; z-index: 10;
  }
  .toast.show { opacity: 1; transform: translate(-50%, 0); }

  .state { text-align: center; color: var(--muted); font-size: .75rem; padding: 34px 20px; line-height: 1.6; }
  .state .sheet-action { margin-top: 14px; display: inline-block; padding: 10px 18px; }
  .skeleton { height: 60px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); animation: fade 1.2s ease-in-out infinite; }
  @keyframes fade { 50% { opacity: .45; } }

  @media (prefers-reduced-motion: reduce) {
    .disc, .arm, .skeleton { animation: none; }
    .sheet, .scrim, .toast { transition: none; }
  }

/* ── Added when the app moved to the real API ──────────────────────────────── */
.stack { display: flex; flex-direction: column; gap: 8px; }

.load-more {
  appearance: none; font-family: inherit; font-size: .75rem; font-weight: 700;
  padding: 11px; margin-top: 2px; border-radius: var(--r-md);
  border: 1px dashed var(--line); background: transparent; color: var(--muted); cursor: pointer;
}
.load-more:hover { color: var(--text); border-color: var(--muted); }
.load-more[disabled] { cursor: progress; opacity: .6; }

.tappable { cursor: pointer; }
.sheet-body { display: flex; flex-direction: column; gap: 12px; }

.row-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.row-sub .stores { color: var(--text); }
.row-sub .sig { color: var(--amber); }
.row-sub .sep { color: var(--line); }

/* ── Plan picker (Stars purchase from inside the app) ──────────────────────── */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.plan {
  position: relative; display: flex; flex-direction: column; gap: 2px;
  padding: 12px 11px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); color: var(--text); font-family: inherit;
  text-align: left; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.plan[aria-pressed="true"] { border-color: var(--amber); background: rgba(242,169,59,.07); }
.plan-stars {
  font-family: var(--mono); font-size: 1.25rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.plan-term { font-size: 11px; color: var(--muted); }
.plan-rate { font-family: var(--mono); font-size: 10px; color: var(--green); }
.save {
  position: absolute; top: -8px; right: 8px;
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .06em;
  background: var(--green); color: var(--ground); padding: 2px 6px; border-radius: 3px;
}
