/* PM app shell (revamp, 19 Nov 2026). One shell, two brands:
   - Peculiar People (body[data-ws="pp"]): the store palette from BRAND.md,
     black, white and the sky accent; Montserrat 400 headings, Arial body
     and buttons. Text on sky is always white.
   - Peculiar Marketing (body[data-ws="pm"]): black and white, after the
     PM logo; the system font, set tight, like Apple's own pages.
   - The picker at / (data-ws="home") uses the PM look. */
:root {
  --ink: #141414;
  --paper: #ffffff;
  --sky: #9dbbd6;
  --sky-soft: #e6eef5;
  --muted: #6b6b6b;
  --line: #e4e4e4;
  --error: #b42318;
  --radius: 16px;
  --radius-lg: 24px;
  --canvas: #f5f5f7;
  --shadow: 0 1px 2px rgba(20, 20, 20, 0.04), 0 4px 16px rgba(20, 20, 20, 0.05);
  --shadow-lift: 0 2px 4px rgba(20, 20, 20, 0.04), 0 18px 40px rgba(20, 20, 20, 0.10);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  /* Fonts on the PP side match peculiarpeopleco.com: Montserrat 400 for
     headings, Arial for everything else, buttons in Arial bold. */
  --head: "Montserrat", sans-serif;
  --body: Arial, sans-serif;
  --sys: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --sys-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --accent: var(--sky);
  --on-accent: #ffffff;
  --bar: rgba(20, 20, 20, 0.86);
  --bar-ink: #ffffff;
}
body[data-ws="pm"], body[data-ws="home"] {
  --ink: #0a0a0a;
  --muted: #6e6e73;
  --line: #e2e2e6;
  --head: var(--sys-display);
  --body: var(--sys);
  --accent: #0a0a0a;
  --on-accent: #ffffff;
  --bar: rgba(255, 255, 255, 0.8);
  --bar-ink: #0a0a0a;
  --sky-soft: #ededf0;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
  font: 16px/1.5 var(--body);
}
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); font-weight: 400; letter-spacing: 0.78px; line-height: 1.23; margin: 0; }
h1 { font-size: 26px; }
h2 { font-size: 18px; }
body[data-ws="pm"] h1, body[data-ws="pm"] h2, body[data-ws="pm"] h3,
body[data-ws="home"] h1, body[data-ws="home"] h2, body[data-ws="home"] h3 { font-weight: 600; letter-spacing: -0.02em; }
body[data-ws="pm"] h1, body[data-ws="home"] h1 { font-size: 34px; line-height: 1.08; }

/* Top bar: frosted, sticky. Row 1 is the logo and the workspace switch,
   row 2 the sections of this workspace. */
.topbar {
  position: sticky; top: 0; z-index: 5;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 0;
  background: var(--bar); color: var(--bar-ink);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(128, 128, 128, 0.18);
}
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 8px; max-width: 1080px; margin: 0 auto; }
.topbar a { text-decoration: none; }
.wordmark { display: flex; align-items: center; min-width: 0; }
.wordmark img { display: block; height: 24px; width: auto; }
body[data-ws="pm"] .wordmark img { height: 30px; }
.ws-switch {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  min-height: 34px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid currentColor; color: inherit; background: none;
  font: 700 13px var(--body); letter-spacing: 0.02em; cursor: pointer; opacity: 0.85;
  transition: opacity 0.2s var(--ease), background 0.2s var(--ease);
}
.ws-switch:hover { opacity: 1; }
.ws-switch svg { width: 14px; height: 14px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 12px 10px; max-width: 1112px; }
@media (min-width: 1112px) { .tabs { margin: 0 auto; } }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; padding: 7px 13px;
  font: 700 14px var(--body); letter-spacing: 0.2px; color: inherit; opacity: 0.68;
  border-radius: 999px; transition: opacity 0.2s var(--ease), background 0.2s var(--ease);
}
.tab:hover { opacity: 1; }
.tab[aria-current="page"] { opacity: 1; background: var(--accent); color: var(--on-accent); }
body[data-ws="pm"] .tab[aria-current="page"] { background: #0a0a0a; color: #fff; }

.login-logo { display: block; width: min(280px, 100%); height: auto; margin: 12px 0 28px; }

main { max-width: 640px; margin: 0 auto; padding: 20px 16px 40px; }
.sub { color: var(--muted); margin: 6px 0 20px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 16px;
  border: 1.5px solid var(--ink); border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font: 700 15px var(--body); letter-spacing: 1px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.15s var(--ease), background 0.2s var(--ease);
}
.btn:active { transform: scale(0.97); }
body[data-ws="pm"] .btn, body[data-ws="home"] .btn { letter-spacing: 0; }
/* Text on sky is always white (BRAND.md, 11 Oct 2026), knowing the contrast is low. */
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.dark { background: var(--ink); color: var(--paper); }
.btn.quiet { border-color: var(--line); color: var(--muted); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.small { min-height: 38px; padding: 7px 16px; font-size: 14px; letter-spacing: 0.5px; }

.footbar {
  max-width: 640px; margin: 0 auto; padding: 20px 16px calc(32px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.footbar .who { margin: 0; font-size: 14px; color: var(--muted); }
.foot-actions { display: flex; gap: 8px; }
.foot-actions .btn { color: var(--ink); }
.foot-actions .btn[aria-current="page"] { border-color: var(--ink); }

input, textarea, select {
  width: 100%; font: 16px/1.4 var(--body); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--paper);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
label { display: block; font-weight: 700; font-size: 14px; margin: 14px 0 6px; }

/* Tool tiles on each workspace's home. */
.tiles { display: grid; gap: 12px; }
@media (min-width: 720px) { main.wide .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile {
  display: block; padding: 20px; border-radius: var(--radius-lg);
  background: var(--paper); box-shadow: var(--shadow); text-decoration: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.tile:active { transform: scale(0.985); }
.tile p { margin: 4px 0 0; color: var(--muted); }
.tile .eyebrow { display: block; margin-bottom: 6px; }
.tile.soon { opacity: 0.55; pointer-events: none; box-shadow: none; border: 1.5px dashed var(--line); background: none; }
.tile .count { float: right; background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 2px 10px; font: 700 13px var(--body); }
.eyebrow { font: 700 12px var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

main.wide { max-width: 1080px; }
.hero { padding: 28px 0 22px; }
.hero h1 { font-size: clamp(34px, 7vw, 56px); }
.hero .sub { font-size: 18px; max-width: 46ch; margin-top: 10px; }

/* The workspace picker at / */
.picker { min-height: 100svh; display: flex; flex-direction: column; max-width: 1080px; margin: 0 auto; padding: calc(28px + env(safe-area-inset-top, 0px)) 16px calc(28px + env(safe-area-inset-bottom, 0px)); }
.picker-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.picker-head .who { color: var(--muted); font-size: 14px; margin: 0; }
.picker .hero { padding: 36px 0 24px; }
.ws-cards { display: grid; gap: 14px; flex: 1; align-content: start; }
@media (min-width: 760px) { .ws-cards { grid-template-columns: 1fr 1fr; gap: 20px; } }
.ws-card {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  min-height: 240px; padding: 26px; border-radius: 28px; text-decoration: none; overflow: hidden;
  box-shadow: var(--shadow); transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
@media (min-width: 760px) { .ws-card { min-height: 420px; padding: 36px; } }
.ws-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.ws-card:active { transform: scale(0.985); }
.ws-card.pm { background: #0a0a0a; color: #fff; }
.ws-card.pp { background: #fff; color: #141414; }
.ws-card .logo { height: 44px; width: auto; align-self: flex-start; }
.ws-card.pm .logo { height: 64px; }
.ws-card h2 { font: 600 28px/1.1 var(--sys-display); letter-spacing: -0.02em; }
.ws-card p { margin: 8px 0 0; opacity: 0.72; max-width: 38ch; }
.ws-card .go { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font: 700 15px var(--sys); }
.ws-card .go::after { content: "→"; transition: transform 0.3s var(--ease); }
.ws-card:hover .go::after { transform: translateX(4px); }
.ws-card.pp::before { content: ""; position: absolute; right: -70px; bottom: -90px; width: 220px; height: 220px; border-radius: 50%; background: var(--sky); opacity: 0.55; }
.ws-card.pm::before { content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.18); box-shadow: 0 0 0 40px rgba(255, 255, 255, 0.04), 0 0 0 80px rgba(255, 255, 255, 0.025); }
.ws-card > * { position: relative; }
.ws-card .last { position: absolute; top: 18px; right: 18px; font: 700 11px var(--sys); letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; background: rgba(128, 128, 128, 0.22); }

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

.pace {
  padding: 14px 16px; border-radius: var(--radius); background: var(--sky-soft); margin-bottom: 16px;
}
.pace .bar { height: 6px; background: var(--paper); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.pace .bar span { display: block; height: 100%; background: var(--ink); }
.pace p { margin: 6px 0 0; }

.card { border: 1.5px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.card.claimed { border-color: var(--sky); }
.card .post { display: flex; gap: 12px; padding: 12px; }
.card .thumb { width: 88px; height: 88px; flex: none; border-radius: 8px; object-fit: cover; background: var(--sky-soft); }
.card .meta { min-width: 0; }
.card .account { font-weight: 700; overflow-wrap: anywhere; }
.tag { display: inline-block; font: 700 11px var(--body); text-transform: uppercase; letter-spacing: 0.06em; background: var(--sky-soft); border-radius: 4px; padding: 2px 6px; margin-left: 6px; vertical-align: middle; }
.caption { color: var(--muted); font-size: 14px; margin: 4px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.caption.open { -webkit-line-clamp: unset; }
.card .draft { padding: 0 12px 12px; }
.card textarea { resize: vertical; }
.card .ask { margin: 0 0 6px; }
.card .ask .tag { margin-left: 0; }
.card .actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 12px 12px; }
.card .actions .btn { flex: 1 1 auto; }
button.alt { background: none; border: 0; color: var(--muted); font-size: 14px; text-decoration: underline; padding: 6px 0 0; cursor: pointer; }
.card { position: relative; }
.card .pick { position: absolute; top: 6px; right: 6px; display: flex; padding: 6px; margin: 0; cursor: pointer; }
.card .pick input { width: 22px; height: 22px; margin: 0; accent-color: var(--ink); }
.card .post .meta { padding-right: 28px; }
.card.picked { border-color: var(--ink); }
.queue-tools { margin: 0 0 16px; }
.queue-tools .tools-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.queue-tools .sort { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; }
.queue-tools .sort select { width: auto; min-width: 0; }
.queue-tools .bulk { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.queue-tools .skip-line { display: flex; gap: 8px; }
.queue-tools .skip-line select { flex: 1 1 auto; min-width: 0; }
.more { text-align: center; margin: 0 0 16px; }
.card .skip { display: flex; flex-direction: column; gap: 8px; padding: 0 12px 12px; }
.card .skip-line { display: flex; gap: 8px; }
.card .skip-line select { flex: 1 1 auto; min-width: 0; }
.card .skip .hint { margin: 0; }
label.check { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; }
label.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); flex: none; }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.notice { padding: 12px 14px; border-radius: 10px; background: #fdeceb; color: var(--error); margin-bottom: 16px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px;
  font: 700 14px var(--body); opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.toast.show { opacity: 1; }

details.history { margin-top: 32px; }
details.history summary { cursor: pointer; font: 400 16px var(--head); letter-spacing: 0.78px; }
.history ul { list-style: none; padding: 0; margin: 12px 0 0; }
.history li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.history li span { color: var(--muted); }

details.add { margin-bottom: 16px; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
details.add summary { cursor: pointer; font: 400 16px var(--head); letter-spacing: 0.78px; }
details.add label:first-of-type { margin-top: 10px; }
details.add .btn { margin-top: 12px; width: 100%; }
.hint { color: var(--muted); font-size: 14px; margin: 10px 0 0; }
.drafting { color: var(--muted); font-size: 14px; margin: -4px 0 16px; }
.note { font-size: 14px; margin: 4px 0 0; overflow-wrap: anywhere; }
.flag { margin: 0 12px 12px; padding: 10px 12px; border-radius: 8px; background: var(--sky-soft); font-size: 14px; }

.panel { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.panel h2 { margin-bottom: 8px; }
.panel h2:not(:first-child) { margin-top: 20px; }
.panel p { margin: 8px 0 0; }
.panel .row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.panel .row .btn { flex: 1 1 auto; }
code { font: 14px/1.4 ui-monospace, Menlo, monospace; background: var(--sky-soft); border-radius: 4px; padding: 1px 4px; overflow-wrap: anywhere; }
.token { margin-top: 12px; padding: 12px; border-radius: 10px; border: 1.5px solid var(--sky); }
.token code { display: block; padding: 10px; margin: 8px 0 10px; }
.token .btn { width: 100%; }
.steps { padding-left: 22px; margin: 0; }
.steps li { margin: 0 0 10px; }
.copyline { display: flex; align-items: baseline; gap: 8px; margin: 6px 0; }
.copyline button.alt { padding: 0; flex: none; }

.sources { list-style: none; padding: 0; margin: 0 0 16px; }
.source { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 12px; }
.source-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.source-name { font-weight: 700; overflow-wrap: anywhere; }
.source .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.source .actions .btn { flex: 1 1 auto; }
#add-source .btn { width: 100%; margin-top: 12px; }
.source.off { opacity: 0.6; }
.acct-stats { margin: 2px 0 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.acct-stats span { white-space: nowrap; }
.partners { margin: 8px 0 0; padding-left: 26px; }
.partners li { padding: 8px 0; border-top: 1px solid var(--line); }
.partners li:first-child { border-top: 0; }
.partners li.off { opacity: 0.6; }
.partners .followers { float: right; font-weight: 700; }
.partners .caption { margin: 2px 0 0; }
.switch { margin: 0 0 0 auto; display: inline-flex; align-items: center; gap: 6px; font: 700 13px var(--body); }
.switch input { width: 20px; height: 20px; accent-color: var(--ink); margin: 0; }
.caption.warn { color: var(--error); }
#finder .notice { margin: 8px 0 0; }
.draft-tools { display: flex; justify-content: space-between; gap: 12px; }


/* Polish: white cards that lift off the canvas, and press feedback. */
.card, .panel, .tile, .source, details.add, .result {
  background: var(--paper); border-color: transparent; box-shadow: var(--shadow);
}
.tile { transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.tile:hover { border-color: transparent; box-shadow: 0 2px 4px rgba(20, 20, 20, 0.06), 0 10px 28px rgba(20, 20, 20, 0.08); }
.card.claimed { border-color: var(--sky); }
.btn { transition: transform 0.12s var(--ease), background-color 0.2s, opacity 0.2s; -webkit-tap-highlight-color: transparent; }
.btn:active:not(:disabled), .chip:active, .tile:active { transform: scale(0.97); }
.btn.quiet { background: var(--paper); }
.footbar { border-top-color: rgba(20, 20, 20, 0.08); }
.tab { transition: opacity 0.2s, border-color 0.2s; }
.pace { background: var(--paper); box-shadow: var(--shadow); }
.pace .bar { background: var(--sky-soft); }
input, textarea, select { background: var(--paper); }

/* Results */
.seg {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 3px; margin: 0 0 8px; border-radius: 12px;
  background: rgba(20, 20, 20, 0.06);
}
.seg button {
  min-height: 34px; padding: 6px 12px; border: 0; border-radius: 9px; cursor: pointer;
  background: transparent; color: var(--ink); font: 700 13px var(--body); letter-spacing: 0.2px;
  transition: background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.seg button[aria-pressed="true"] { background: var(--paper); box-shadow: 0 1px 3px rgba(20, 20, 20, 0.12); }
.custom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: end; margin: 8px 0 0; }
.custom label { margin: 0 0 4px; font-size: 12px; color: var(--muted); }
.custom .btn { grid-column: 1 / -1; }
.range-label { margin: 6px 2px 18px; font-size: 14px; color: var(--muted); }

.hero { padding: 20px; }
.hero .kicker { font-size: 13px; color: var(--muted); margin: 0; }
.hero .big { font: 400 52px/1.05 var(--head); letter-spacing: -0.5px; margin: 4px 0 2px; }
.hero .sub2 { margin: 0; font-size: 14px; color: var(--muted); }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.kpi .label { font-size: 13px; color: var(--muted); }
.kpi .value { display: block; font: 400 30px/1.15 var(--head); margin: 2px 0; }
.kpi .note { font-size: 12px; color: var(--muted); }
.fineprint { font-size: 13px; color: var(--muted); margin: -4px 2px 16px; }

.chart-card h2 { margin-bottom: 2px; }
.chart-card .hint { margin: 0 0 10px; }
.chart { position: relative; touch-action: pan-y; }
.chart svg { display: block; width: 100%; height: 180px; overflow: visible; }
.chart .grid line { stroke: rgba(20, 20, 20, 0.08); stroke-width: 1; }
.chart .axis text { fill: var(--muted); font: 11px var(--body); }
.chart .bar { fill: var(--ink); }
.chart .bar.dim { opacity: 0.35; }
.chart .hit { fill: transparent; cursor: pointer; }
.tip {
  position: absolute; top: -6px; transform: translate(-50%, -100%); pointer-events: none;
  background: var(--ink); color: var(--paper); border-radius: 10px; padding: 6px 10px;
  font: 12px/1.4 var(--body); white-space: nowrap; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.tip strong { display: block; font-size: 12px; }
details.as-table { margin-top: 10px; font-size: 14px; }
details.as-table summary { cursor: pointer; color: var(--muted); }
.as-table table, .groups table { width: 100%; border-collapse: collapse; font-size: 14px; }
.as-table td, .as-table th { text-align: right; padding: 5px 0 5px 8px; border-top: 1px solid var(--line); }
.as-table td:first-child, .as-table th:first-child { text-align: left; padding-left: 0; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.stat { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 12px; background: var(--canvas); }
.stat strong { font: 400 22px/1.2 var(--head); }
.stat-label, .stat-sub { font-size: 12px; color: var(--muted); }

.groups h3 { font-size: 15px; margin: 16px 0 6px; }
.groups th { text-align: right; font-weight: 700; color: var(--muted); font-size: 12px; padding: 4px 0 4px 8px; }
.groups td { text-align: right; padding: 7px 0 7px 8px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.groups td:first-child, .groups th:first-child { text-align: left; padding-left: 0; overflow-wrap: anywhere; }
.meter { display: inline-block; width: 36px; height: 4px; border-radius: 2px; background: var(--sky-soft); vertical-align: middle; margin-left: 6px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--ink); border-radius: 2px; }

.list-head { margin: 28px 2px 12px; }
.posted { list-style: none; padding: 0; margin: 0; }
.result { border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.result-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.result .account { text-decoration: none; font-weight: 700; }
.result .caption { color: var(--ink); font-size: 15px; margin-top: 6px; }
.result .hint { margin-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  flex: 1 1 auto; min-height: 36px; padding: 6px 10px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); font: 700 13px var(--body);
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.12s var(--ease);
}
/* Text on sky is always white. */
.chip[aria-pressed="true"] { background: var(--sky); border-color: var(--sky); color: var(--paper); }
.more { width: 100%; }
.loading { opacity: 0.5; transition: opacity 0.2s; }
.custom input { min-width: 0; -webkit-appearance: none; appearance: none; min-height: 44px; }

/* iOS-style switch for the finder's on/off */
.switch input {
  -webkit-appearance: none; appearance: none; position: relative; flex: none;
  width: 44px; height: 26px; border-radius: 13px; margin: 0; cursor: pointer;
  background: rgba(20, 20, 20, 0.16); transition: background-color 0.2s var(--ease);
}
.switch input::before {
  content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--paper); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.2s var(--ease);
}
.switch input:checked { background: var(--ink); }
.switch input:checked::before { transform: translateX(18px); }
.switch input:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }

/* Temple designer (docs/temple-designer.md). Phone first: one viewer that flips
   Photo / A / B and one side's settings at a time. From 900px both sides sit
   next to each other with their own pictures. */
.designer-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 14px; }
.head-right { display: inline-flex; align-items: center; gap: 8px; }
.temple-btn {
  display: inline-flex; align-items: baseline; gap: 8px; min-height: 44px; padding: 4px 2px;
  border: 0; background: none; color: var(--ink); cursor: pointer; text-align: left;
  font: 400 24px/1.2 var(--head); letter-spacing: 0.78px;
}
.temple-btn .chev { font-size: 14px; color: var(--muted); }
.muted { color: var(--muted); }
.balance {
  display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--paper); box-shadow: var(--shadow);
  font: 700 13px var(--body); color: var(--ink); white-space: nowrap;
}
.balance.warn { color: var(--error); }
.wide-only { display: none; }

.view-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.view-bar .seg { flex: 1; margin: 0; }
.seg.three { grid-template-columns: repeat(3, 1fr); }
.seg.two { grid-template-columns: repeat(2, 1fr); }

.viewer {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1 / 1; max-height: 70vh; width: 100%;
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.viewer.zoomed { touch-action: none; cursor: grab; }
.viewer-img { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center; -webkit-user-drag: none; pointer-events: none; }
.viewer-empty { margin: 0; padding: 24px; color: var(--muted); text-align: center; }
.view-info { margin: 8px 2px 0; font-size: 13px; color: var(--muted); min-height: 1em; overflow-wrap: anywhere; }
.gen-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.gen-actions:empty { display: none; }
.gen-actions .save-list { margin: 0; }
.act-row { display: flex; gap: 8px; }
.act-row > .btn, .act-row > .more-menu { flex: 1 1 0; min-width: 0; }
.act-row .btn { padding: 7px 4px; font-size: 13px; letter-spacing: 0.2px; white-space: normal; line-height: 1.15; }
.more-menu { position: relative; }
.more-menu > summary { width: 100%; list-style: none; }
.more-menu > summary::-webkit-details-marker { display: none; }
.more-menu .menu {
  position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 4; min-width: 200px; padding: 6px;
  background: var(--paper); border-radius: 14px; box-shadow: 0 8px 28px rgba(20, 20, 20, 0.18);
}
.more-menu .menu button { display: block; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: 700 14px var(--body); text-align: left; cursor: pointer; }
.more-menu .menu button:hover, .more-menu .menu button:focus-visible { background: var(--canvas); }
.folder-line { margin: -6px 2px 12px; font-size: 13px; color: var(--muted); }
.folder-line a { color: var(--ink); font-weight: 700; }
.folder-line.warn { color: var(--error); }
.ref-folder { position: absolute; top: 5px; right: 5px; width: 15px; height: 11px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 0 1.5px var(--paper); }
.ref-folder::before { content: ""; position: absolute; top: -3px; left: 0; width: 7px; height: 4px; border-radius: 2px 2px 0 0; background: var(--ink); }
.hist-save { position: absolute; top: 6px; right: 6px; padding: 1px 6px; border-radius: 6px; background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(20, 20, 20, 0.2); font: 700 10px/1.5 var(--body); }
.hist-save.failed, .hist-save.asleep { color: var(--error); }
.hist-save.done { background: var(--ink); color: var(--paper); }
#temple-form { position: sticky; top: -18px; z-index: 2; margin: 0 -18px; padding: 6px 18px 4px; background: var(--paper); }
#temple-search { margin: 0; -webkit-appearance: none; appearance: none; }
.pick-head { margin: 14px 2px 6px; font: 700 13px var(--body); letter-spacing: 0.4px; color: var(--muted); }
.pick-list { border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.pick-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 8px 12px;
  border: 0; border-top: 1px solid var(--line); background: var(--paper); color: var(--ink); text-align: left; cursor: pointer; font: 15px var(--body);
}
.pick-row:first-child { border-top: 0; }
.pick-row:active, .pick-row.on { background: var(--sky-soft); }
.pick-row img, .pick-blank { flex: none; width: 44px; height: 44px; border-radius: 8px; object-fit: contain; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.pick-blank { display: flex; align-items: center; justify-content: center; background: var(--sky-soft); box-shadow: none; font: 400 18px var(--head); color: var(--muted); }
.pick-main { display: flex; flex-direction: column; min-width: 0; }
.pick-main strong { overflow-wrap: anywhere; }
.pick-main .hint { margin: 0; font-size: 12px; }

.side-switch { margin: 18px 0 12px; }
.side-switch button { min-height: 44px; }
.switch-status { font-weight: 400; color: var(--muted); }

.side-card { display: none; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.side-card.active { display: block; }
.side-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.side-status { font-size: 13px; color: var(--muted); text-align: right; }
.side-status.bad { color: var(--error); }
.side-picture { display: none; margin-top: 12px; }
.side-controls > label:first-child { margin-top: 10px; }
.side-controls .label { display: block; font-weight: 700; font-size: 14px; margin: 14px 0 6px; }
.prompt-preview {
  display: block;
  width: 100%; margin-top: 8px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--canvas); color: var(--ink); font: 14px/1.45 var(--body); text-align: left; white-space: pre-wrap; cursor: pointer;
}
.prompt-preview .clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.prompt-preview.empty { color: var(--muted); }
.hint.count { margin: 4px 2px 0; font-size: 12px; }
.hint.opt-hint { margin: 6px 2px 0; font-size: 13px; }
.prompt-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.prompt-row .hint.count { margin: 0 2px; }

.refs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.ref-toggle, .ref-add {
  position: relative; flex: none; width: 60px; height: 60px; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer;
  border: 2px solid var(--line); background: var(--sky-soft);
}
.ref-toggle img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.55; transition: opacity 0.15s; }
.ref-toggle[aria-pressed="true"] { border: 3px solid var(--sky); }
.ref-toggle[aria-pressed="true"] img { opacity: 1; }
.ref-badge { position: absolute; left: 3px; bottom: 3px; padding: 0 4px; border-radius: 4px; background: var(--ink); color: var(--paper); font: 700 10px/1.5 var(--body); }
.ref-add { display: flex; flex-direction: column; align-items: center; justify-content: center; border-style: dashed; background: var(--paper); color: var(--ink); font: 700 12px var(--body); }
.ref-add span:first-child { font-size: 20px; line-height: 1; }

.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin-top: 0; padding-bottom: 4px; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar, .refs::-webkit-scrollbar, .strip::-webkit-scrollbar { display: none; }
.chips.scroll .chip { flex: none; min-width: 52px; }
.gen-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.gen-row .cost { font-size: 13px; color: var(--muted); }
.gen-row .btn { min-width: 150px; }

.designer-history { margin-top: 28px; }
.history-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.history-tools { display: flex; gap: 8px; }
.select-bar { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 14px; }
.select-bar span { flex: 1; color: var(--muted); }
.strip { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; scroll-snap-type: x proximity; scrollbar-width: none; }
.hist { position: relative; flex: none; width: 96px; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; scroll-snap-align: start; color: var(--ink); }
.hist img, .hist-wait { display: flex; width: 96px; height: 96px; border-radius: 10px; object-fit: cover; background: var(--paper); box-shadow: var(--shadow); }
.hist.on img { outline: 3px solid var(--sky); outline-offset: -3px; }
.hist.picked img, .hist.picked .hist-wait { outline: 3px solid var(--ink); outline-offset: -3px; }
.hist-wait { align-items: center; justify-content: center; padding: 6px; text-align: center; font: 700 12px var(--body); color: var(--muted); background: var(--sky-soft); }
.hist-wait.bad { color: var(--error); background: #fdeceb; }
.hist-side { position: absolute; top: 6px; left: 6px; padding: 1px 7px; border-radius: 6px; background: var(--ink); color: var(--paper); font: 700 11px/1.5 var(--body); }
.hist-time { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist.more { height: 96px; border: 1.5px dashed var(--line); border-radius: 10px; font: 700 13px var(--body); text-align: center; }
.storage { font-size: 12px; margin-top: 6px; }

/* Sheets and the full-screen Compare view */
dialog.sheet {
  width: min(560px, calc(100% - 24px)); max-height: calc(100dvh - 32px); overflow: auto;
  border: 0; border-radius: 20px; padding: 18px; background: var(--paper); color: var(--ink); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
dialog::backdrop { background: rgba(20, 20, 20, 0.45); }
dialog.sheet h2 { margin-bottom: 6px; }
.sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sheet-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.sheet-actions .btn { flex: 1 1 auto; }
#editor-text { height: 58dvh; resize: vertical; font: 14px/1.5 var(--body); }
.hint.warn, .add-log li.bad { color: var(--error); }
.add-way { margin: 6px 0 18px; }
.add-way h3 { font: 400 16px var(--head); letter-spacing: 0.78px; margin: 0 0 8px; }
.add-way .btn { width: 100%; }
.add-way .row { margin-top: 10px; }
.link-row { display: flex; gap: 8px; margin-top: 10px; }
.link-row input { flex: 1; min-width: 0; }
.link-row .btn { width: auto; }
.add-log { list-style: none; margin: 0 0 16px; padding: 0; font-size: 14px; }
.add-log li { padding: 8px 10px; border-radius: 8px; background: var(--canvas); margin-bottom: 6px; overflow-wrap: anywhere; }
.add-log li.warn { background: var(--sky-soft); }
.add-log li.working { color: var(--muted); }
.ref-list { list-style: none; margin: 0; padding: 0; }
.ref-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.ref-list img { width: 44px; height: 44px; flex: none; border-radius: 8px; object-fit: cover; background: var(--sky-soft); }
.ref-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.archived-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.archived-item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; background: var(--canvas); display: block; }
.archived-item .hist-wait { width: 100%; height: auto; aspect-ratio: 1 / 1; }
.archived-item .hint { margin: 4px 0 6px; font-size: 12px; }
.archived-item .row { display: flex; gap: 6px; }
.archived-item .row .btn { flex: 1; padding-left: 6px; padding-right: 6px; }
.wide-btn { width: 100%; margin-top: 16px; }
.used-text {
  max-height: 55dvh; overflow: auto; margin: 10px 0 0; padding: 12px; border-radius: 10px; background: var(--canvas);
  font: 14px/1.5 var(--body); white-space: pre-wrap; overflow-wrap: anywhere;
}

dialog.compare {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 12px;
  border: 0; background: var(--canvas); color: var(--ink);
}
dialog.compare[open] { display: flex; flex-direction: column; gap: 8px; }
.compare-bar { display: flex; align-items: center; gap: 8px; }
.compare-bar .seg { flex: 1; margin: 0; max-width: 480px; }
dialog.compare .viewer { flex: 1; aspect-ratio: auto; max-height: none; min-height: 0; }

@media (min-width: 900px) {
  main.wide { max-width: 1200px; }
  .phone-view, .side-switch { display: none; }
  .wide-only { display: inline-flex; }
  .sides { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .side-card, .side-card.active { display: block; }
  .side-picture { display: block; }
  .side-picture .viewer { max-height: 56vh; }
  .archived-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Temple folders (the temple store): the list mirrors Finder
   (TO DO, READY by state, Temples), then one page per temple. */
.folder-count { display: inline-block; min-width: 24px; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: rgba(20, 20, 20, 0.06); font: 700 12px/1.6 var(--body); color: var(--muted); text-align: center; vertical-align: middle; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.status-line { margin: 4px 2px 0; font-size: 14px; color: var(--muted); }
.status-line.warn { color: var(--error); }
.status-line:last-of-type { margin-bottom: 14px; }
.folder-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 8px 0 6px; }
.folder-tools .btn { padding-left: 8px; padding-right: 8px; }
.file-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.file-actions .btn { flex: 1 1 auto; padding-left: 10px; padding-right: 10px; text-decoration: none; text-align: center; white-space: nowrap; }
.file-actions:empty { display: none; }
.place-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 0; }
.place-chips .chip { padding-left: 4px; padding-right: 4px; font-size: 13px; text-align: center; }
.place-state label .muted { font-weight: 400; color: var(--muted); }
.muted { color: var(--muted); }
.removed-hint { margin: -4px 2px 10px; }
.removed-list { list-style: none; margin: 0; padding: 0; }
.removed-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--paper); box-shadow: var(--shadow); margin-bottom: 6px; font-size: 14px; }
.removed-name { min-width: 0; overflow-wrap: anywhere; }
.removed-list .btn { flex: none; }
.version-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.version-list li { display: grid; grid-template-columns: 48px 1fr; gap: 6px 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--paper); box-shadow: var(--shadow); font-size: 14px; }
.version-thumb { width: 48px; height: 48px; border-radius: 8px; object-fit: contain; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.version-thumb.blank { display: flex; align-items: center; justify-content: center; background: var(--sky-soft); box-shadow: none; font: bold 11px Arial, sans-serif; color: var(--muted); }
.version-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.version-actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
.folder-search { margin: 0 0 10px; -webkit-appearance: none; appearance: none; }
.folder-sort { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 0 0 14px; font-size: 15px; color: var(--muted); }
.folder-sort select { width: auto; min-width: 0; }
.folder-group { margin-bottom: 18px; }
.folder-group > summary {
  display: flex; align-items: center; min-height: 44px; padding: 0 2px; cursor: pointer; list-style: none;
  font: 400 18px/1.23 var(--head); letter-spacing: 0.78px;
}
.folder-group > summary::-webkit-details-marker { display: none; }
.folder-group > summary::after { content: "›"; margin-left: auto; font: 400 22px var(--body); color: var(--muted); transition: transform 0.2s var(--ease); }
.folder-group[open] > summary::after { transform: rotate(90deg); }
.folder-state { margin: 14px 4px 6px; font: 700 13px var(--body); letter-spacing: 0.4px; color: var(--muted); }
.folder-list { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.folder-state + .folder-row, .folder-list > .folder-state:first-child { border-top: 0; }
.folder-row {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) 16px; align-items: center; gap: 12px;
  min-height: 76px; padding: 10px 12px; text-decoration: none; color: var(--ink); border-top: 1px solid var(--line);
  -webkit-tap-highlight-color: transparent;
}
.folder-row:first-child { border-top: 0; }
.folder-row:active { background: var(--canvas); }
.folder-thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: contain; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.folder-thumb.photo { object-fit: cover; opacity: 0.85; }
.folder-thumb.blank { display: flex; align-items: center; justify-content: center; background: var(--sky-soft); box-shadow: none; font: 400 22px var(--head); color: var(--muted); }
.folder-thumb.blank.ext { font: bold 12px Arial, sans-serif; letter-spacing: 0.04em; }
.folder-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.folder-name { font-weight: 700; overflow-wrap: anywhere; }
.folder-name .tag { margin-left: 6px; }
.folder-meta { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.fchip { padding: 1px 8px; border-radius: 999px; background: var(--canvas); color: var(--muted); font: 700 12px/1.6 var(--body); white-space: nowrap; }
.fchip.need { background: var(--ink); color: var(--paper); }
.fchip.has { background: var(--sky-soft); color: var(--ink); }
.fchip.busy { background: var(--sky-soft); color: var(--ink); }
.fchip.bad { background: #fdeceb; color: var(--error); }
/* Live on the store, or not (functions/lib/live.ts). */
.fchip.notlive { background: var(--error); color: var(--paper); }
.fchip.live { background: var(--sky-soft); color: var(--ink); }
.live-added .hint { display: block; margin-top: 2px; }
.fchip.added { background: var(--canvas); color: var(--ink); font-weight: 400; }
.folder-group summary .fchip { margin-left: 4px; }
.live-block { display: grid; gap: 6px; margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: var(--paper); box-shadow: var(--shadow); }
.live-block.notlive { box-shadow: inset 3px 0 0 var(--error), var(--shadow); }
.live-block p { margin: 0; }
.live-block .hint { margin: 0; }
.live-checks summary { cursor: pointer; font-size: 14px; font-weight: 700; }
.live-checks ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.folder-row .chev { font-size: 22px; color: var(--muted); }

.crumbs { display: flex; flex-wrap: wrap; gap: 0 2px; margin: 0 2px 8px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--ink); font-weight: 700; text-decoration: none; }
.folder-title { overflow-wrap: anywhere; }
.folder-title .tag { font-family: var(--body); }
.folder-title + .sub { margin: 4px 0 14px; }
.folder-title:not(:has(+ .sub)) { margin-bottom: 14px; }
.folder-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 6px; }
.save-list { list-style: none; margin: 10px 0 0; padding: 0; font-size: 14px; }
.save-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--paper); box-shadow: var(--shadow); margin-bottom: 6px; overflow-wrap: anywhere; }
.save-list li.failed { background: #fdeceb; color: var(--error); box-shadow: none; }
.save-list li.asleep { color: var(--error); }
.save-list li .btn { flex: none; }
.file-section { margin-top: 26px; }
.file-section h2 { display: flex; align-items: center; margin: 0 2px 10px; }
.file-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.file-tile { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 0; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.file-tile img, .file-ext { width: 100%; aspect-ratio: 1 / 1; border-radius: 10px; object-fit: cover; background: var(--paper); box-shadow: var(--shadow); display: block; }
.file-tile.plain { cursor: default; }
.file-ext { display: flex; align-items: center; justify-content: center; font: 700 13px var(--body); color: var(--muted); background: var(--canvas); box-shadow: inset 0 0 0 1px var(--line); }
.file-name { font-size: 12px; line-height: 1.3; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.file-badge { position: absolute; left: 4px; top: 4px; padding: 0 6px; border-radius: 6px; background: var(--ink); color: var(--paper); font: 700 11px/1.6 var(--body); }
.look-name { flex: 1; min-width: 0; margin: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* The Add photos sheet's photo site tab */
.add-tabs { margin: 0 0 14px; }
.hint.first { margin-top: 0; }
.site-group h3 { font: 700 13px var(--body); letter-spacing: 0.4px; color: var(--muted); margin: 14px 0 6px; }
.site-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.site-tile { position: relative; padding: 0; border: 0; border-radius: 8px; overflow: hidden; aspect-ratio: 1 / 1; background: var(--sky-soft); cursor: pointer; }
.site-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.site-tile.have img { opacity: 0.45; }
.site-tile:disabled { cursor: default; }
.site-badge { position: absolute; left: 4px; bottom: 4px; padding: 0 6px; border-radius: 6px; background: var(--ink); color: var(--paper); font: 700 11px/1.6 var(--body); }

@media (min-width: 900px) {
  .file-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .site-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Adjust with Claude */
#adjust-dialog label, #adjust-dialog .label { display: block; font-weight: 700; font-size: 14px; margin: 14px 0 6px; }
#adj-ask { width: 100%; resize: vertical; font: 15px/1.45 var(--body); }
.adj-ask-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 14px 0 6px; }
#adjust-dialog .adj-ask-row label { margin: 0 0 2px; }
/* Speak: quiet until it listens, then sky with white text (.btn.primary). */
.btn.adj-mic { flex: none; padding: 7px 12px; font-size: 13px; letter-spacing: 0; }
.adj-mic-note { margin: 6px 0 0; }
.adj-intro { margin-top: 0; }
.adj-from { margin-top: 4px; }
.adj-models { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.adj-model {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; text-align: left; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font: 13px/1.35 var(--body);
}
.adj-model strong { font-size: 15px; }
.adj-model[aria-pressed="true"] { border: 3px solid var(--sky); padding: 8.5px 10.5px; }
.adj-cost { color: var(--muted); font-size: 12px; }
.adj-step { margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--canvas); }
.adj-asked { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.adj-note { margin: 6px 0 0; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.adj-change {
  margin: 8px 0 0; padding: 10px; border-radius: 8px; background: var(--paper);
  font: 13px/1.5 var(--body); white-space: pre-wrap; overflow-wrap: anywhere;
}
.adj-change del { background: #fdeceb; color: var(--error); }
.adj-change ins { background: #e5f3e8; color: #1d5e2c; text-decoration: none; font-weight: 700; }
.adj-meta { margin-top: 8px; font-size: 12px; }
.adj-done { margin-top: 6px; }
.adj-error { margin: 14px 0 0; }

/* Post finder: Sources and Filters */
.subtabs { display: flex; gap: 2px; padding: 3px; margin: 12px 0 4px; border-radius: 12px; background: rgba(20, 20, 20, 0.06); }
.subtabs a {
  flex: 1; min-height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 9px;
  text-decoration: none; font: 700 14px var(--body); color: var(--muted);
}
.subtabs a[aria-current="page"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(20, 20, 20, 0.12); }
.phrases { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.phrase { display: inline-flex; align-items: center; max-width: 100%; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); font-size: 14px; }
.phrase span { padding: 4px 0 4px 12px; overflow-wrap: anywhere; }
.phrase button { min-width: 36px; min-height: 34px; border: 0; background: transparent; color: var(--muted); font: 700 18px/1 var(--body); cursor: pointer; }
.phrase-add { display: flex; gap: 8px; margin-top: 10px; }
.phrase-add input { flex: 1; min-width: 0; }
.rule-edit textarea { width: 100%; margin-top: 10px; resize: vertical; font: 15px/1.45 var(--body); }
.rule-edit .actions { justify-content: flex-end; }
.rule-edit .actions .btn { flex: 0 0 auto; }
.panel .label { font-weight: 700; font-size: 14px; margin: 16px 0 6px; }
.rule-edit .actions:has(> .btn[hidden]) { display: none; }

/* Filters tab: blocked accounts */
.blocked { list-style: none; margin: 0; padding: 0; }
.blocked li { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.blocked li:first-child { border-top: 0; }
.blocked li > div { min-width: 0; overflow-wrap: anywhere; }
.blocked .note { margin: 4px 0 0; }

/* Story highlights (/stories/): a row of highlight circles, then the open
   one's stories as small circles, in order, with sections as boxes. */
.sh-circles { display: flex; gap: 12px; overflow-x: auto; margin: 0 -16px 16px; padding: 4px 16px 8px; scrollbar-width: none; }
.sh-circles::-webkit-scrollbar { display: none; }
.sh-circ { flex: none; width: 76px; display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink); }
.sh-ring { display: block; width: 70px; height: 70px; border-radius: 50%; padding: 3px; background: var(--line); transition: transform 0.12s var(--ease), background-color 0.2s; }
.sh-circ.active .sh-ring { background: var(--ink); }
.sh-ring > span {
  display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
  border: 3px solid var(--canvas); background: var(--paper); font: 400 17px var(--head); letter-spacing: 0.5px;
}
.sh-ring img { width: 100%; height: 100%; object-fit: cover; }
.sh-circ.plain .sh-ring > span { color: var(--muted); }
.sh-circ.new .sh-ring { background: transparent; }
.sh-circ.new .sh-ring > span { border: 2px dashed var(--line); background: transparent; font-size: 26px; color: var(--muted); }
.sh-nm { font: 700 12px/1.2 var(--body); max-width: 76px; text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.sh-badge { font: 700 11px var(--body); color: var(--muted); min-height: 1em; }
body.sh-dragging .sh-circ:not(.new) .sh-ring { background: var(--sky); }
.sh-circ.hover .sh-ring { transform: scale(1.12); background: var(--ink) !important; }

.sh-head { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.sh-title { flex: 1 1 160px; min-width: 0; }
.sh-title h2 { overflow-wrap: anywhere; }
.sh-title .hint { margin: 2px 0 0; }
.sh-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.sh-grid { display: grid; grid-template-columns: repeat(auto-fill, 60px); gap: 14px 12px; min-height: 64px; align-items: start; }
.sh-grid > .sh-sec, .sh-grid > .sh-empty, .sh-grid > .sh-drop-hint { grid-column: 1 / -1; }
.sh-tile {
  position: relative; width: 60px; height: 60px; border-radius: 50%; padding: 2px; cursor: pointer;
  background: var(--paper); border: 2px solid var(--ink); user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.sh-tile img, .sh-tile video { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; border-radius: 50%; pointer-events: none; }
.sh-txt { position: absolute; inset: 2px; border-radius: 50%; display: grid; place-items: center; padding: 4px; text-align: center; font: 700 9px/1.1 var(--body); overflow: hidden; overflow-wrap: anywhere; background: var(--sky-soft); }
.sh-num { position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); z-index: 3; font: 700 10px/1.4 var(--body); background: var(--ink); color: var(--paper); border-radius: 999px; padding: 0 6px; border: 1.5px solid var(--canvas); }
.sh-multi { position: absolute; top: -6px; left: -7px; z-index: 3; font: 700 10px/1.4 var(--body); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 0 5px; border: 1px solid var(--line); }
.sh-tick {
  position: absolute; top: -8px; right: -8px; z-index: 3; width: 26px; height: 26px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--paper); background: rgba(20, 20, 20, 0.3); color: var(--paper); display: grid; place-items: center; font: 700 14px var(--body);
}
.sh-tile.done { border-color: var(--sky); }
.sh-tile.done::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: rgba(20, 20, 20, 0.45); pointer-events: none; }
/* Text on sky is always white. */
.sh-tile.done .sh-tick { background: var(--sky); border-color: var(--sky); color: var(--paper); }
.sh-ghost { opacity: 0.35; }
.sh-chosen { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); }
.sortable-fallback { opacity: 0.9 !important; transform: rotate(2deg); }

.sh-sec { background: var(--paper); border-radius: 14px; box-shadow: var(--shadow); padding: 10px 10px 16px; }
.sh-sec-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.sh-sec-head b { flex: 1 1 auto; min-width: 0; font: 400 15px var(--head); letter-spacing: 0.5px; overflow-wrap: anywhere; }
.sh-sec-head .hint { margin: 0; font-size: 12px; }
.sh-sec-head .alt { padding: 0; }
.sh-grip { cursor: grab; color: var(--muted); font-size: 20px; line-height: 1; padding: 4px; touch-action: none; user-select: none; -webkit-user-select: none; }
.sh-drop-hint { margin: 0; }
.sh-empty { border: 2px dashed var(--line); border-radius: 14px; padding: 22px 16px; margin: 0; text-align: center; color: var(--muted); }

.sh-legend { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.sh-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.sh-tag { font: 700 12px var(--body); border-radius: 999px; padding: 2px 9px; border: 1.5px solid var(--ink); white-space: nowrap; }
.sh-tag.on { background: var(--sky); border-color: var(--sky); color: var(--paper); }
.sh-tag.none { border-color: var(--line); color: var(--muted); border-style: dashed; }
.sh-group { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 14px; }
.sh-group-head { display: flex; align-items: baseline; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.sh-group-head b { flex: 1; min-width: 0; font: 400 15px var(--head); letter-spacing: 0.5px; overflow-wrap: anywhere; }
.sh-group-head .hint { margin: 0; font-size: 13px; }
.sh-row { display: flex; gap: 12px; align-items: center; width: 100%; padding: 10px 12px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; cursor: pointer; color: var(--ink); font: 15px var(--body); }
.sh-group-head + .sh-row { border-top: 0; }
.sh-th { flex: none; position: relative; width: 44px; aspect-ratio: 9 / 16; border-radius: 6px; overflow: hidden; background: var(--sky-soft); }
.sh-th img, .sh-th video { width: 100%; height: 100%; object-fit: cover; display: block; }
.sh-th .sh-txt { inset: 0; border-radius: 0; }
.sh-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sh-t { font-weight: 700; overflow-wrap: anywhere; }

.sh-field { margin-top: 14px; }
.sh-label { display: block; font: 700 14px var(--body); margin-bottom: 6px; }
.sh-field > .btn { width: 100%; }
.sh-story-top { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.sh-pv { flex: none; position: relative; width: min(140px, 38vw); aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; border: 0; padding: 0; background: var(--sky-soft); color: var(--muted); cursor: pointer; display: grid; place-items: center; font: 13px var(--body); }
.sh-pv img, .sh-pv video { width: 100%; height: 100%; object-fit: cover; }
.sh-fields { flex: 1 1 160px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.sh-row-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sh-row-btns .alt { padding: 0; }
.sh-memb { border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; }
.sh-mrow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); }
.sh-mrow:first-child { border-top: 0; }
.sh-dot { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); color: var(--muted); font: 400 12px var(--head); }
.sh-mrow.on .sh-dot { border-color: var(--ink); color: var(--ink); }
.sh-mname { flex: 1; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.sh-via { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.sh-added { display: flex; align-items: center; gap: 5px; margin: 0; font: 13px var(--body); color: var(--muted); white-space: nowrap; }
.sh-added input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.sh-sw { position: relative; flex: none; width: 48px; height: 30px; padding: 0; border: 0; border-radius: 999px; background: var(--line); cursor: pointer; }
.sh-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--paper); transition: left 0.15s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
.sh-sw[aria-checked="true"] { background: var(--ink); }
.sh-sw[aria-checked="true"]::after { left: 21px; }
.sh-sw:disabled { opacity: 0.55; cursor: default; }
.sh-spacer { flex: 1 1 0 !important; }
.sheet-actions .alt { padding: 0; flex: none; }
.sh-confirm { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.btn.sh-danger { background: var(--error); border-color: var(--error); color: var(--paper); }
.sh-look { flex: 1; min-height: 0; display: grid; place-items: center; }
.sh-look img, .sh-look video { max-width: 100%; max-height: calc(100dvh - 90px); border-radius: 12px; display: block; }
@media (prefers-reduced-motion: reduce) { .sh-ring, .sh-sw::after { transition: none; } }
.sh-ig { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin: -8px 0 14px; }
.sh-ig .hint { flex: 1 1 200px; margin: 0; }
.sh-ig-error { flex: 1 1 100%; margin: 0; }
.sh-posted { margin: 0; }
.sh-suggs { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 12px; margin-bottom: 16px; }
.sh-suggs-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sh-suggs-head b { font: 400 15px var(--head); letter-spacing: 0.5px; }
.sh-suggs-head .alt { padding: 0; }
.sh-suggs ul { list-style: none; margin: 6px 0 0; padding: 0; }
.sh-sugg { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.sh-sugg:first-child { border-top: 0; }
.sh-sugg .sh-th { border: 0; padding: 0; cursor: pointer; }
.sh-sugg .sh-info { flex: 1 1 120px; gap: 2px; }
.sh-why { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.sh-sugg-btns { display: flex; align-items: center; gap: 10px; }
.sh-sugg-btns .alt { padding: 0; }
.sh-sugg-line { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--sky-soft); font-size: 14px; }
.sh-sugg-line > span { flex: 1 1 160px; overflow-wrap: anywhere; }
.sh-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.sh-stat { background: var(--canvas); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; }
.sh-stat b { font: 400 18px var(--head); }
.sh-stat span { font-size: 12px; color: var(--muted); line-height: 1.3; }
.sh-stats + .hint { margin-top: 6px; }
.sh-reach { margin: 0; font-size: 13px; }

/* Story highlights: Planned */
.sh-gaps { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--sky-soft); font-size: 14px; }
.sh-day { margin-bottom: 18px; }
.sh-day h3 { font: 400 16px var(--head); letter-spacing: 0.5px; margin: 0 0 8px; }
.sh-day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sh-day-head .alt { padding: 0; }
.sh-none { margin: 0; }
.sh-plan, .sh-idea { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; margin-bottom: 10px; }
.sh-plan.posted, .sh-plan.skipped { opacity: 0.75; }
.sh-plan.waiting { box-shadow: 0 0 0 2px var(--sky), var(--shadow); }
.sh-plan-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sh-plan-head b { flex: 1; min-width: 0; font: 400 16px var(--head); letter-spacing: 0.5px; overflow-wrap: anywhere; }
.sh-plan-head .alt { padding: 0; }
.sh-plan-meta { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.sh-plan-meta .sh-tag { color: var(--ink); }
.sh-frames { display: flex; gap: 6px; overflow-x: auto; margin-top: 10px; scrollbar-width: none; }
.sh-frames::-webkit-scrollbar { display: none; }
.sh-frames .sh-th { border: 0; padding: 0; cursor: pointer; }
.sh-notes { margin: 8px 0 0; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.sh-plan-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.sh-plan-actions .hint { flex: 1 1 100%; margin: 0; }
.sh-plan-actions .alt { padding: 0; }
.sh-past { list-style: none; margin: 0; padding: 0; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.sh-past li + li { border-top: 1px solid var(--line); }
.sh-past-row { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 10px 12px; border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink); font: 15px var(--body); }
.sh-past-row .hint { margin: 0; font-size: 13px; }
.sh-two { display: flex; gap: 12px; flex-wrap: wrap; }
.sh-two > .sh-field { flex: 1 1 140px; min-width: 0; }
.sh-two input { width: 100%; min-width: 0; box-sizing: border-box; }
.sh-name-msg { margin: 6px 0 0; }
.sh-count { max-width: 120px; }
.sh-frame-list { list-style: none; margin: 0 0 8px; padding: 0; }
.sh-frame-list li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.sh-frame-list li:first-child { border-top: 0; }
.sh-frame-btns { display: flex; align-items: center; gap: 10px; }
.sh-frame-btns .alt { padding: 0; }
.sh-field > label.btn { width: 100%; }
.sh-ideas { margin-top: 10px; }
.sh-idea { box-shadow: none; border: 1.5px solid var(--line); }
.sh-outline { margin: 8px 0 0; padding-left: 20px; font-size: 14px; }
.sh-outline li { margin-bottom: 2px; overflow-wrap: anywhere; }
.sh-idea .hint { margin: 6px 0 0; }
.sh-post { display: grid; gap: 8px; margin-top: 10px; }
.sh-post .hint { margin: 0; }
.sh-post .alt { justify-self: start; padding: 0; }
.sh-post-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); font: bold 15px var(--body); text-align: left; cursor: pointer; text-decoration: none; box-sizing: border-box; }
.sh-post-row.done { border-color: var(--sky); background: var(--sky-soft); }

/* Tee winners: the giveaway wheel. Ink, sky and white only (BRAND.md). */
.spin-area { display: flex; flex-direction: column; align-items: center; margin-bottom: 20px; }
.live-line { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; min-height: 1.5em; font: 700 14px var(--body); color: var(--muted); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sky); box-shadow: 0 0 0 0 rgba(157, 187, 214, 0.7); animation: live 2s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(157, 187, 214, 0); } 100% { box-shadow: 0 0 0 0 rgba(157, 187, 214, 0); } }
.wheel-wrap { position: relative; width: min(100%, 420px); aspect-ratio: 1; margin-top: 14px; }
.wheel { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 8px 28px rgba(20, 20, 20, 0.14); }
.wheel-pointer {
  position: absolute; z-index: 2; top: -14px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; border-left: 16px solid transparent; border-right: 16px solid transparent; border-top: 30px solid var(--ink);
  filter: drop-shadow(0 2px 2px rgba(20, 20, 20, 0.2));
}
.wheel-pointer::after {
  content: ""; position: absolute; left: -10px; top: -27px;
  border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 19px solid var(--sky);
}
.wheel-hub {
  position: absolute; top: 50%; left: 50%; width: 30%; aspect-ratio: 1; transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: var(--ink); border: 4px solid var(--paper); box-shadow: 0 0 0 2px var(--ink);
}
.wheel-hub img { width: 78%; height: auto; }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 20; }
.readout { margin: 16px 0 10px; min-height: 1.3em; font: 400 24px/1.3 var(--head); letter-spacing: 0.78px; text-align: center; overflow-wrap: anywhere; }
.readout.tick { animation: tick 0.12s var(--ease); }
@keyframes tick { from { transform: translateY(-3px); opacity: 0.6; } }
.spin-btn { min-width: 200px; min-height: 52px; font-size: 18px; letter-spacing: 2px; }
.winner { width: 100%; margin: 20px 0 0; text-align: center; background: var(--paper); border-color: var(--sky); }
.winner-label { margin: 0; font: 700 12px var(--body); letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.winner-name { margin: 4px 0 0; font: 400 30px/1.2 var(--head); letter-spacing: 0.78px; overflow-wrap: anywhere; }
.winner-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.month-row { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; font-weight: 700; font-size: 14px; }
.month-row input { font: 16px var(--body); padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); }
.file-btn { margin-top: 10px; }
.followers-status { margin: 0; font-size: 15px; }
.flag.gap { margin: 10px 0 0; }
.how { margin-top: 12px; }
.how summary { cursor: pointer; font: 700 14px var(--body); }
.how .steps { margin-top: 6px; }
.find { width: 100%; margin: 0 0 10px; font: 16px var(--body); padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper); }
.check { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; font-weight: 700; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.entries-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.entries { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; max-height: 260px; overflow-y: auto; }
.entry { display: inline-flex; align-items: center; gap: 2px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--canvas); font-size: 14px; }
.entry.more-names { padding-right: 10px; color: var(--muted); }
.entry-x { border: 0; background: none; font-size: 18px; line-height: 1; padding: 2px 6px; color: var(--muted); cursor: pointer; }
.history { list-style: none; padding: 0; margin: 10px 0 0; }
.history-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.history-row:first-child { border-top: 0; }
.history-row.voided strong { text-decoration: line-through; color: var(--muted); }
.hint.tight { margin: 0; }
.cutoff-note { margin: 4px 0 0 26px; }
.cutoff-note:empty { display: none; }

/* Facebook groups (/groups/) */
.seg.four { grid-template-columns: repeat(4, 1fr); }
.seg.four button { padding: 6px 4px; }
.pace-row { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pace-row:last-of-type { border-bottom: 0; }
.group-card .meta { padding-right: 0; }
.group-card a.account { text-decoration: none; }
.note.quote { border-left: 3px solid var(--sky); padding-left: 10px; white-space: pre-wrap; }
.link-text { overflow-wrap: anywhere; flex: 1 1 auto; min-width: 0; }
.source.group details.group-check { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.source.group details.group-check summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.check-form .row .btn { width: 100%; }
.tag.score.strong { background: var(--ink); color: var(--paper); }
.tag.score.ok { background: var(--sky); color: var(--paper); }
.tag.score.weak, .tag.score.unchecked { background: var(--canvas); color: var(--muted); }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.clamp.open { display: block; }
.result-inputs { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
label.inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 14px; }
.small-num { width: 72px; }
.seg.four button { font-size: 12px; line-height: 1.2; }
.find-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.find-list .btn { width: 100%; margin: 0; justify-content: flex-start; text-align: left; }

/* Planning/notes (public/planning/). Every rule sits under body.planning so
   it can't change another tab. */
.planning #views { margin-bottom: 16px; }
.planning .week-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.planning .week-nav .btn { min-width: 44px; padding: 7px 0; font-size: 20px; line-height: 1; }
.planning .week-label { flex: 1; text-align: center; }
.planning .week-label strong { display: block; font: 400 18px var(--head); letter-spacing: 0.78px; }
.planning .week-label span { font-size: 13px; color: var(--muted); }
.planning .back-week { display: block; margin: 0 auto 8px; }
.planning button.alt.inline { padding: 0; font-size: inherit; }
.planning .day { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px 10px; margin-bottom: 12px; }
.planning .day.today { outline: 2px solid var(--sky); }
.planning .day.past { opacity: 0.7; }
.planning .day-head { display: flex; align-items: baseline; gap: 8px; }
.planning .day-head h2 { font-size: 17px; }
.planning .day-date { font-size: 13px; color: var(--muted); }
.planning .day-head .tag { margin-left: auto; align-self: center; }
.planning .day-empty { margin: 6px 0 0; }
.planning .slots, .planning .stories, .planning .schedule, .planning .temple-list, .planning .features { list-style: none; padding: 0; margin: 0; }
.planning .slot { border-top: 1px solid var(--line); padding: 10px 0 2px; margin-top: 10px; }
.planning .day > .slots .slot:first-child { border-top: 0; margin-top: 4px; }
.planning .slot-head { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.planning .slot-title { font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 12px; }
.planning .slot-time { color: var(--muted); }
.planning .slot .plan { margin: 6px 0 8px; width: 100%; }
.planning .stories { margin-top: 2px; }
.planning .story, .planning .temple { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; }
.planning .temple { border-bottom: 1px solid var(--line); }
.planning .tick { flex: none; width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--ink); }
.planning .story-open { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 0; border: 0; background: none; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.planning .story-title { font-weight: 700; overflow-wrap: anywhere; }
.planning .story.done .story-title { text-decoration: line-through; color: var(--muted); }
.planning .story-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.planning .story-tags:empty { display: none; }
.planning .story-tags .tag { margin-left: 0; text-transform: none; letter-spacing: 0; font-size: 12px; }
.planning .tag.plain { background: var(--canvas); }
.planning .story-title .tag { margin-left: 8px; }
.planning .temple-line { font-size: 13px; color: var(--muted); }
.planning .temple.done .story-title { color: var(--muted); }
.planning .seg.five { grid-template-columns: repeat(5, 1fr); }
.planning .seg.five button { padding: 6px 2px; font-size: 12px; line-height: 1.2; }
.planning .schedule { margin-top: 4px; }
.planning .day .schedule-row { grid-template-columns: 76px 1fr; }
.planning .schedule-row { width: 100%; display: grid; grid-template-columns: 96px 1fr; gap: 2px 10px; padding: 10px 0; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.planning .schedule li:first-child .schedule-row { border-top: 0; }
.planning .schedule-day { font-weight: 700; }
.planning .schedule-note { grid-column: 2; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.planning .find-row { display: flex; gap: 8px; margin-bottom: 10px; }
.planning .find-row .find { flex: 1; min-width: 0; }
.planning .find { width: 100%; margin-bottom: 10px; }
.planning .find-row .find { margin-bottom: 0; }
.planning .idea { display: flex; flex-direction: column; gap: 4px; width: 100%; margin-bottom: 10px; padding: 14px 16px; border: 0; border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); text-align: left; font: inherit; color: inherit; cursor: pointer; }
.planning .idea-title { font-weight: 700; overflow-wrap: anywhere; }
.planning .idea-when { font-size: 13px; color: var(--muted); }
.planning .idea .caption { margin: 0; white-space: pre-line; }
.planning .pick { width: 100%; margin-bottom: 12px; }
.planning .temple-list { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px 16px; margin-bottom: 16px; }
.planning .temple-list li:last-child { border-bottom: 0; }
.planning details.add form .btn { width: 100%; }
.planning .chat { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 12px; }
.planning .chat-head h3 { font: 400 16px var(--head); letter-spacing: 0.78px; overflow-wrap: anywhere; }
.planning .chat .caption { white-space: pre-line; cursor: pointer; }
.planning .chat .chip { flex: 0 1 auto; text-align: left; }
.planning .chat-actions { display: flex; gap: 8px; margin-top: 12px; }
.planning .chat-actions .btn { flex: 1 1 auto; }
.planning .pick-chips .chip { flex: 0 1 auto; }
.planning label.check { display: flex; align-items: center; gap: 10px; font-weight: 400; margin-top: 18px; }
.planning .btn.danger { color: var(--error); }
.planning .sheet-sub { font: 400 16px var(--head); letter-spacing: 0.78px; margin: 18px 0 4px; }
.planning #sheet .flag { margin: 8px 0 0; }
.planning #sheet .row { display: flex; margin-top: 12px; }
.planning #sheet .row .btn { flex: 1; }
.planning .features li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.planning .feature-note { display: block; font-size: 13px; overflow-wrap: anywhere; }
.planning dialog.sheet textarea { resize: vertical; }
.planning .idea { cursor: default; padding: 0; }
.planning .idea-open { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 14px 16px; border: 0; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.planning .place { padding: 0 16px 14px; }
.planning .place summary { cursor: pointer; font-size: 14px; color: var(--muted); text-decoration: underline; }
.planning .place .chips { margin-top: 4px; }
.planning .place .chip { flex: 0 1 auto; }
.planning .idea-tools { display: flex; justify-content: space-between; gap: 12px; margin: -2px 2px 12px; }
.planning .idea-tools button.alt { padding: 0; }
.planning .frames { margin: 0; padding: 0; list-style: none; counter-reset: frame; }
.planning .frames li { margin-bottom: 10px; counter-increment: frame; }
.planning .frames li::before { content: "Frame " counter(frame); display: block; margin-bottom: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.planning .frames textarea { width: 100%; }
.planning .frame-actions { display: flex; gap: 16px; }
.planning .frame-actions button.alt { padding: 2px 0 0; }
.planning .setup-text { white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.45 ui-monospace, Menlo, monospace; background: var(--canvas); border-radius: 10px; padding: 10px 12px; margin: 12px 0 0; max-height: 40dvh; overflow: auto; }

/* Yearly calendar */
#series-bar select { margin-top: 4px; }
.series-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; box-shadow: 0 0 0 1.5px var(--paper); flex: none; }
.series-chip { display: inline-flex; align-items: center; }
.tag.series-tag { margin-left: 0; margin-bottom: 4px; display: inline-flex; align-items: center; background: var(--canvas); color: var(--ink); }
.cal-list-title .tag.series-tag { margin-left: 6px; margin-bottom: 0; }
.cal-day .cal-dots { position: absolute; left: 3px; bottom: 3px; display: flex; gap: 2px; pointer-events: none; }
.cal-day .cal-dots .series-dot { width: 7px; height: 7px; margin: 0; }
.series-pick { flex-direction: column; align-items: stretch; }
.series-pick .btn { display: inline-flex; align-items: center; justify-content: center; }
.cal-summary .year-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cal-summary .year-row h2 { margin: 0; font-size: 22px; }
.cal-summary .year-row .btn { min-width: 44px; font-size: 18px; }
.cal-summary .stats { margin: 12px 0; }
.cal-summary .seg.two { margin: 0; }
.cal-month h2 { margin-bottom: 10px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { text-align: center; font: 700 12px var(--body); color: var(--muted); padding-bottom: 2px; }
.cal-day {
  position: relative; aspect-ratio: 1 / 1; min-height: 40px; border: 0; border-radius: 10px; padding: 0;
  background: var(--canvas); color: var(--ink); font: 15px var(--body); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* Text on sky is always white (BRAND.md). */
.cal-day.planned { background: var(--sky); color: var(--paper); font-weight: 700; }
.cal-day.done { background: var(--ink); color: var(--paper); font-weight: 700; }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--ink); }
.cal-day.today.done, .cal-day.today.planned { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.cal-day:active { transform: scale(0.94); }
.cal-count {
  position: absolute; top: 2px; right: 4px; z-index: 1; font: 700 10px/1 var(--body);
}
.cal-num { position: relative; z-index: 1; }
/* A day with a photo shows it, the date small in the corner on a dark wash
   so it stays readable on any picture. */
.cal-day.has-photo { overflow: hidden; background: var(--ink); }
.cal-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cal-day.has-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(20, 20, 20, 0.55), rgba(20, 20, 20, 0) 55%);
}
.cal-day.has-photo .cal-num {
  position: absolute; top: 3px; left: 5px; z-index: 2;
  font: 700 11px/1 var(--body); color: var(--paper); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.cal-day.has-photo .cal-count { z-index: 2; color: var(--paper); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.cal-day.has-photo.done .cal-thumb { opacity: 0.55; }
.cal-split { position: absolute; inset: 0; display: grid; gap: 1px; background: var(--paper); }
.cal-split.two { grid-template-columns: 1fr 1fr; }
.cal-split.four { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.cal-split img { width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: cover; display: block; }
/* Text on sky is always white (BRAND.md). */
.cal-tile { background: var(--sky); color: var(--paper); font: 700 10px var(--body); display: flex; align-items: center; justify-content: center; padding-top: 4px; }
.cal-day.has-photo.done .cal-split { opacity: 0.55; }
.cal-tick {
  position: absolute; right: 3px; bottom: 3px; z-index: 2; width: 16px; height: 16px; border-radius: 50%;
  background: var(--ink); color: var(--paper); font: 700 10px/16px var(--body); text-align: center;
}
.cal-day.today.has-photo { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.cal-month .alt { display: block; margin-top: 8px; }
.cal-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cal-key { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: middle; }
.cal-key.planned { background: var(--sky); }
.cal-key.done { background: var(--ink); margin-left: 10px; }
.cal-list { list-style: none; margin: 0; padding: 0; }
.cal-list li { border-top: 1px solid var(--line); }
.cal-list li:first-child { border-top: 0; }
.cal-list-row {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 0; border: 0; background: none;
  text-align: left; font: 15px/1.4 var(--body); color: var(--ink); cursor: pointer;
}
.cal-list-date { flex: none; width: 26px; font: 400 18px var(--head); text-align: right; }
.cal-list-row img, .cal-list-noimg { flex: none; width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--sky-soft); }
.cal-list-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.day-posts { list-style: none; margin: 0; padding: 0; }
.day-post { padding: 14px 0; border-top: 1px solid var(--line); }
.day-post:first-child { border-top: 0; padding-top: 4px; }
.day-post h3 { font-size: 17px; margin: 0 0 4px; overflow-wrap: anywhere; }
.day-post .caption { white-space: pre-wrap; -webkit-line-clamp: 5; }
.day-post .caption.open { -webkit-line-clamp: unset; }
.day-photo img { display: block; width: 100%; max-height: 320px; object-fit: contain; border-radius: 12px; background: var(--canvas); margin-bottom: 10px; }
.day-post .row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.day-post .row .btn { flex: 1 1 auto; }
.posted-switch { margin: 10px 0 0; font-size: 15px; }
.date-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 8px; }
.date-row label { margin-top: 0; }
.photo-pick { display: flex; align-items: center; gap: 12px; }
.photo-pick video, .photo-none { width: 88px; height: 88px; flex: none; border-radius: 10px; object-fit: cover; background: var(--canvas); }
.photo-none { display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); }
.day-video { display: block; width: 100%; max-height: 420px; border-radius: 12px; background: var(--ink); margin-bottom: 10px; }
.cal-play {
  position: absolute; left: 4px; bottom: 3px; z-index: 2;
  font: 9px/1 var(--body); color: var(--paper); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}
.photo-pick img { width: 88px; height: 88px; flex: none; border-radius: 10px; object-fit: cover; background: var(--canvas); }
.photo-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
button.alt.danger { color: var(--error); display: block; margin-top: 14px; }
.cal-summary .year-row h2.range { font-size: 17px; text-align: center; line-height: 1.3; }
.cal-summary > .alt { display: block; margin: 8px auto 0; }

/* Runs page (/pm/runs/). The dot pulses on a healthy job; red on a broken one. */
.runs { display: grid; gap: 12px; }
@media (min-width: 760px) { .runs { grid-template-columns: 1fr 1fr; } }
.run-card { background: var(--paper); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 18px 18px 14px; display: grid; gap: 6px; align-content: start; min-width: 0; --state: #1f9d55; }
.run-card.state-failed, .run-card.state-late { --state: #d92d20; box-shadow: 0 0 0 1.5px #d92d20, var(--shadow); }
.run-card.state-waiting, .run-card.state-due { --state: #b7791f; }
.run-card.state-off { --state: #a1a1a6; opacity: 0.7; }
.run-top { display: flex; align-items: flex-start; gap: 12px; }
.run-title { flex: 1; min-width: 0; }
.run-title h2 { font-size: 18px; }
.run-when { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.run-badge { flex: none; font: 700 12px var(--body); padding: 4px 9px; border-radius: 999px; color: #fff; background: var(--state); white-space: nowrap; }
.pulse { flex: none; position: relative; width: 12px; height: 12px; margin-top: 6px; border-radius: 50%; background: var(--state); }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--state); animation: pulse 2.4s var(--ease) infinite; }
.state-off .pulse::after, .state-waiting .pulse::after { animation: none; }
@keyframes pulse { 0% { transform: scale(1); opacity: 0.55; } 80%, 100% { transform: scale(3); opacity: 0; } }
.run-reason { margin: 4px 0 0; overflow-wrap: anywhere; }
.state-failed .run-reason, .state-late .run-reason { color: #b42318; font-weight: 700; }
.run-last, .run-what { margin: 0; color: var(--muted); font-size: 14px; }
.run-fix { margin: 4px 0 0; padding: 10px 12px; border-radius: 12px; background: #fef3f2; font-size: 14px; }
.run-history { margin-top: 4px; font-size: 14px; }
.run-history summary { cursor: pointer; color: var(--muted); font-weight: 700; padding: 4px 0; }
.run-history ol { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.run-history li { display: grid; grid-template-columns: 10px auto 1fr; gap: 8px; align-items: baseline; overflow-wrap: anywhere; }
.run-history .dot { width: 8px; height: 8px; border-radius: 50%; background: #1f9d55; }
.run-history .hist-failed .dot { background: #d92d20; }
.run-history .hist-nothing .dot { background: #a1a1a6; }
.hist-when { color: var(--muted); white-space: nowrap; }
.hint { color: var(--muted); font-size: 14px; }
.health { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 14px; border-radius: 999px; background: var(--paper); box-shadow: var(--shadow); font: 700 14px var(--body); text-decoration: none; color: var(--ink); }
.health .pulse { margin-top: 0; width: 9px; height: 9px; --state: #1f9d55; }
.health.bad .pulse { --state: #d92d20; }

/* Temple pipeline (/temples/pipeline/). */
.pipe-strip { display: flex; gap: 4px; margin: 4px 0 10px; overflow: hidden; border-radius: 14px; }
.pipe-seg { flex: 1 1 0; min-width: 56px; padding: 10px 10px 9px; background: var(--paper); text-decoration: none; display: grid; gap: 2px; box-shadow: var(--shadow); }
.pipe-seg b { font: 400 22px var(--head); }
.pipe-seg span { font-size: 12px; color: var(--muted); line-height: 1.2; }
.pipe-seg.seg-live { background: var(--sky); }
.pipe-seg.seg-live b, .pipe-seg.seg-live span { color: #fff; }
.pipe-stage { margin-top: 22px; }
.pipe-stage h2 { margin-bottom: 8px; }
.pipe-count { font: 700 13px var(--body); color: var(--muted); }
.pipe-list { list-style: none; margin: 0; padding: 0; background: var(--paper); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.pipe-temple { padding: 12px 16px; border-top: 1px solid var(--line); display: grid; gap: 2px; overflow-wrap: anywhere; }
.pipe-temple:first-child { border-top: 0; }
.pipe-temple > a { font-weight: 700; text-decoration: none; }
.pipe-detail { display: block; color: var(--muted); font-size: 14px; }
.pipe-fails summary { cursor: pointer; color: var(--error); font-weight: 700; font-size: 14px; }
.pipe-fails ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
@media (max-width: 520px) { .pipe-strip { flex-wrap: wrap; } .pipe-seg { flex-basis: 30%; } }

/* Ad Bounty Hub (/pm/bounties/). The brand's accent shows as --brand. */
.brand-grid { display: grid; gap: 14px; }
@media (min-width: 760px) { .brand-grid { grid-template-columns: repeat(2, 1fr); } }
.brand-card { display: grid; gap: 10px; padding: 22px; border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow); text-decoration: none; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); border-top: 4px solid var(--brand, #0a0a0a); }
.brand-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.brand-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.brand-logo { width: 140px; height: 52px; display: flex; align-items: center; }
.brand-logo img { max-width: 100%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.brand-logo.empty { width: 52px; border-radius: 14px; background: #0a0a0a; color: #fff; justify-content: center; font: 700 18px var(--body); text-transform: uppercase; }
.brand-status { margin: 0; color: var(--muted); }
.stat-row { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.stat { display: grid; }
.stat b { font: 600 24px/1.1 var(--head); letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: 13px; }
.stat-row.big { padding: 18px 20px; background: var(--paper); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.stat-row.big .stat b { font-size: 32px; }
.fine { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.chip { display: inline-flex; align-items: center; font: 700 12px var(--body); padding: 4px 9px; border-radius: 999px; background: #ededf0; color: var(--ink); white-space: nowrap; }
.chip.ok { background: #e6f4ea; color: #146c2e; }
.chip.warn { background: #fff4e5; color: #8a4b00; }
.chip.bad { background: #fdeceb; color: #b42318; }
.chip.brief { background: #f1eafd; color: #5b21b6; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hero-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.link-pill { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border-radius: 999px; background: #0a0a0a; color: #fff; font: 700 14px var(--body); text-decoration: none; }
.link-pill.quiet { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.text-link { font: 700 14px var(--body); text-decoration: none; }
.seg { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 4px; margin: 0 0 16px; background: #e8e8ed; border-radius: 999px; }
.seg::-webkit-scrollbar { display: none; }
.seg-item { flex: none; padding: 8px 14px; border-radius: 999px; font: 700 14px var(--body); text-decoration: none; color: var(--muted); }
.seg-item[aria-current="page"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.tab-body { display: grid; gap: 14px; }
.panel { background: var(--paper); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 18px; min-width: 0; }
.panel > h2, .panel summary h2 { font-size: 20px; margin-bottom: 10px; }
.panel .count { font: 700 13px var(--body); color: var(--muted); }
.callout { padding: 20px; border-radius: var(--radius-lg); background: #0a0a0a; color: #fff; display: grid; gap: 6px; }
.callout .eyebrow { color: rgba(255, 255, 255, 0.6); }
.callout p { margin: 0; opacity: 0.8; }
.stages { list-style: none; margin: 0; padding: 0; display: grid; }
.stage { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 9px 0; position: relative; }
.stage:not(:last-child)::before { content: ""; position: absolute; left: 6px; top: 26px; bottom: -8px; width: 2px; background: var(--line); }
.stage-dot { width: 14px; height: 14px; border-radius: 50%; margin-top: 4px; border: 2px solid #c7c7cc; background: var(--paper); position: relative; z-index: 1; }
.st-done .stage-dot { background: #0a0a0a; border-color: #0a0a0a; }
.st-done:not(:last-child)::before { background: #0a0a0a; }
.st-waiting_on_evan .stage-dot { border-color: var(--brand, #0a0a0a); background: var(--brand, #0a0a0a); box-shadow: 0 0 0 0 var(--brand, #0a0a0a); animation: ring 2s var(--ease) infinite; }
.st-failed .stage-dot { background: #d92d20; border-color: #d92d20; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(10, 10, 10, 0.35); } 100% { box-shadow: 0 0 0 10px rgba(10, 10, 10, 0); } }
.stage > div { display: grid; gap: 2px; min-width: 0; }
.stage-meta { color: var(--muted); font-size: 13px; }
.stage-quote { font-size: 13px; font-style: italic; overflow-wrap: anywhere; }
.st-blocked b, .st-ready b { color: var(--muted); font-weight: 400; }
blockquote { margin: 0; padding: 4px 0 4px 14px; border-left: 3px solid var(--brand, #0a0a0a); }
.batch-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.batch-links { display: flex; gap: 8px; flex-wrap: wrap; }
.ad-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 12px; overflow-x: auto; margin: 14px -18px -4px; padding: 0 18px 8px; scroll-snap-type: x mandatory; }
.ad-card { scroll-snap-align: start; display: grid; gap: 10px; align-content: start; }
.ad-thumb { position: relative; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; background: #ededf0; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.ad-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ad-label { position: absolute; top: 8px; left: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(10, 10, 10, 0.78); color: #fff; font: 700 12px var(--body); }
.ad-meta { display: grid; gap: 8px; }
.ad-headline { margin: 0; font-weight: 700; line-height: 1.3; }
.concept-grid { display: grid; gap: 14px; }
@media (min-width: 760px) { .concept-grid { grid-template-columns: 1fr 1fr; } }
.concept { display: grid; gap: 8px; align-content: start; }
.concept p { margin: 0; }
.concept.chosen { box-shadow: 0 0 0 2px var(--brand, #0a0a0a), var(--shadow); }
.concept:not(.chosen) { opacity: 0.75; }
.headlines { margin: 0; padding-left: 18px; font-size: 14px; }
.rule-grid { display: grid; gap: 14px; }
@media (min-width: 760px) { .rule-grid { grid-template-columns: 1fr 1fr; } }
.rules ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; }
.rules.ok { border-top: 4px solid #1f9d55; }
.rules.bad { border-top: 4px solid #d92d20; }
.rules code { font: 700 11px var(--body); background: #ededf0; padding: 2px 5px; border-radius: 4px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.swatch { display: grid; gap: 2px; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; font: 13px var(--body); color: var(--ink); }
.swatch .sw { height: 56px; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.swatch span:last-child { color: var(--muted); }
.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.doc summary { cursor: pointer; list-style: none; }
.doc summary::-webkit-details-marker { display: none; }
.doc summary h2 { margin: 0; display: flex; justify-content: space-between; gap: 10px; }
.doc summary h2::after { content: "+"; color: var(--muted); }
.doc[open] summary h2::after { content: "−"; }
.doc[open] summary { margin-bottom: 12px; }
.md { overflow-wrap: anywhere; font-size: 15px; }
.md h2 { font-size: 19px; margin: 18px 0 6px; }
.md h3, .md h4 { font-size: 16px; margin: 14px 0 4px; }
.md p { margin: 8px 0; }
.md ul, .md ol { padding-left: 20px; }
.md pre { overflow-x: auto; background: #f5f5f7; padding: 10px; border-radius: 10px; font-size: 13px; }
.md code { font-size: 0.9em; background: #f5f5f7; padding: 1px 4px; border-radius: 4px; }
.md-table { overflow-x: auto; margin: 10px 0; }
.md table { border-collapse: collapse; font-size: 14px; min-width: 100%; }
.md th, .md td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.asset { display: grid; gap: 4px; text-decoration: none; font-size: 13px; color: var(--muted); min-width: 0; }
.asset img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #f5f5f7; border-radius: 12px; }
.asset span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.notice.quiet { background: var(--paper); color: var(--muted); box-shadow: var(--shadow); }

/* Brains (/pm/brains/). */
.search-bar { position: sticky; top: 108px; z-index: 4; margin: 0 0 10px; }
.search-bar input { min-height: 50px; border-radius: 16px; border: 0; padding: 12px 16px 12px 42px; font-size: 17px; box-shadow: var(--shadow); background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center; }
.search-bar input:focus { outline: 2px solid #0a0a0a; }
.filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 0 16px; }
.filters::-webkit-scrollbar { display: none; }
.filter { flex: none; min-height: 34px; padding: 6px 12px; border-radius: 999px; border: 0; background: var(--paper); box-shadow: var(--shadow); font: 700 13px var(--body); color: var(--muted); cursor: pointer; }
.filter[aria-pressed="true"] { background: #0a0a0a; color: #fff; }
.filter-gap { flex: none; width: 8px; }
.hits { display: grid; gap: 10px; }
.hit { display: flex; gap: 12px; width: 100%; text-align: left; padding: 14px; border: 0; border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); cursor: pointer; color: var(--ink); font: inherit; transition: transform 0.2s var(--ease); }
.hit:active { transform: scale(0.99); }
.hit-img { flex: none; width: 96px; }
.hit-img img { width: 96px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; background: #ededf0; }
.kind-ad .hit-img img { aspect-ratio: 1; object-fit: contain; }
.hit-text { min-width: 0; display: grid; gap: 3px; }
.hit-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.hit-meta .chip { text-transform: none; letter-spacing: 0; }
.hit-title { font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.hit-sub { color: var(--muted); font-size: 13px; }
.hit-snip { margin: 2px 0 0; font-size: 14px; color: #3a3a3c; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
mark { background: #fff1a8; color: inherit; border-radius: 3px; padding: 0 1px; }
.brain-cards { display: grid; gap: 12px; margin-bottom: 12px; }
@media (min-width: 760px) { .brain-cards { grid-template-columns: 1fr 1fr; } }
.brain-card h2 { font-size: 24px; }
.answers { list-style: none; margin: 0; padding: 0; display: grid; }
.answers li { display: grid; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); }
.answers li:first-child { border-top: 0; }
.answers a { text-decoration: none; }
dialog.sheet { width: min(720px, 100%); max-width: 100%; max-height: 92svh; margin: auto auto 0; padding: 0; border: 0; border-radius: 24px 24px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2); background: var(--paper); color: var(--ink); }
@media (min-width: 760px) { dialog.sheet { margin: auto; border-radius: 24px; } }
dialog.sheet::backdrop { background: rgba(10, 10, 10, 0.4); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sheet-body { padding: 20px 18px calc(24px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 12px; }
.sheet-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.sheet-head h2 { font-size: 22px; }
.sheet-close { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #ededf0; font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink); }
.sheet-img img { width: 100%; border-radius: 14px; }
