/* Content Engine: one stylesheet, mobile first. */

/* The storefront's look (public/store/store.css): warm paper and ink, serif headings, one red accent.
   Fonts are the storefront's own, self-hosted (the CSP allows nothing from a CDN). */
@font-face { font-family: "Newsreader"; src: url("/store/fonts/newsreader-latin-opsz-normal.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/store/fonts/newsreader-latin-opsz-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/store/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/store/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #f5f3ee;
  --surface: #fbfaf7;
  --surface-2: #ece9e1;
  --line: #dcd7cb;
  --text: #171614;
  --muted: #6d695f;
  --faint: #8d887c;
  --accent: #c8371f;      /* the storefront's red: active tab, progress, "working" */
  --on-accent: #fff;
  --primary: #171614;     /* buttons and switches are ink, like the storefront's */
  --on-primary: #f5f3ee;
  --good: #2f7a4a;
  --warn: #9a6200;
  --bad: #b3261e;
  --yt: #c4501f;   /* chart series: YouTube */
  --ig: #2f6db5;   /* chart series: Instagram */
  --shadow: 0 1px 0 #e7e3d9, 0 18px 36px -30px rgb(30 25 15 / 0.35);
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", -apple-system, "Segoe UI", system-ui, sans-serif;
  --mono: "Plex Mono", ui-monospace, Menlo, monospace;
  --radius: 8px;
  --pad: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121210; --surface: #1c1b18; --surface-2: #262420; --line: #2f2d28;
    --text: #ece9e1; --muted: #9b968a; --faint: #767165;
    --accent: #e0553b; --on-accent: #121210; --primary: #ece9e1; --on-primary: #121210;
    --good: #5fb37a; --warn: #d9a441; --bad: #ef6b5a; --yt: #d95926; --ig: #3987e5;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
html { -webkit-text-size-adjust: 100%; }
body {
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- layout */

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 12px) var(--pad) 12px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { font: 400 25px/1.15 var(--serif); letter-spacing: -0.02em; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar .back { color: var(--muted); text-decoration: none; font-size: 22px; line-height: 1; padding: 0 4px 2px 0; }
.topbar .right { display: flex; gap: 8px; align-items: center; flex: none; }
main { max-width: 680px; margin: 0 auto; padding: 4px var(--pad) 32px; }

.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 10;
  display: grid; grid-template-columns: repeat(5, 1fr);
  max-width: 680px; margin: 0 auto;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0;
  text-decoration: none; color: var(--faint); font-size: 11px; font-weight: 600; letter-spacing: 0.01em;
}
.tabbar a svg { width: 23px; height: 23px; }
.tabbar a.active svg { color: var(--accent); }
.tabbar a.active { color: var(--text); }

/* ---------- type */

.label {
  font: 500 11px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em;
  margin: 30px 0 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
}
.label a, .label button { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; font-size: 13px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }
.num { font-variant-numeric: tabular-nums; }
.empty { color: var(--muted); padding: 14px var(--pad); }
p { margin: 8px 0; }

/* ---------- surfaces */

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel.pad { padding: 14px var(--pad); }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.row {
  display: flex; align-items: center; gap: 12px; padding: 12px var(--pad); width: 100%;
  border: 0; border-top: 1px solid var(--line); background: none; text-align: left; text-decoration: none; min-height: 52px;
}
.row:first-child { border-top: 0; }
a.row:active, button.row:active { background: var(--surface-2); }
button.row { cursor: pointer; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .sub { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .chev { color: var(--faint); flex: none; font-size: 18px; }
.row .time { width: 64px; flex: none; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; }
.row.stack { flex-direction: column; align-items: stretch; gap: 8px; }

.notice { border-radius: var(--radius); padding: 12px 14px; margin: 12px 0; font-size: 14px; border: 1px solid var(--line); background: var(--surface); }
.notice b { font-weight: 650; }
.notice.warn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 9%, var(--bg)); }
.notice.bad { border-color: color-mix(in srgb, var(--bad) 45%, transparent); background: color-mix(in srgb, var(--bad) 9%, var(--bg)); }
.notice.good { border-color: color-mix(in srgb, var(--good) 40%, transparent); background: color-mix(in srgb, var(--good) 7%, var(--bg)); }
a.notice { display: block; text-decoration: none; }
.notice a { overflow-wrap: anywhere; }

/* ---------- small pieces */

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.status.good { color: var(--good); } .status.good::before { background: var(--good); }
.status.warn { color: var(--warn); } .status.warn::before { background: var(--warn); }
.status.bad { color: var(--bad); } .status.bad::before { background: var(--bad); }
.status.busy { color: var(--accent); } .status.busy::before { background: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 7px;
  font-size: 12px; font-weight: 650; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
}
.chip.good { color: var(--good); border-color: color-mix(in srgb, var(--good) 35%, var(--line)); }
.chip.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.chip.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.chip.busy { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
button.chip { cursor: pointer; }

.bar { height: 4px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width 0.4s; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 12px 0; }
.stats > div { background: var(--surface); padding: 12px 10px; text-align: center; }
.stats b { display: block; font: 400 25px/1.15 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.stats span { font-size: 12px; color: var(--muted); }

.segmented { display: flex; gap: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin: 12px 0 4px; overflow-x: auto; }
.segmented button { flex: 1; border: 0; background: none; padding: 7px 10px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.segmented button.on { background: var(--surface-2); color: var(--text); }

/* ---------- forms */

label.field { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 16px 0 6px; }
input[type=text], input[type=search], input[type=password], input[type=time], input[type=url], input[type=email], input[type=datetime-local], select, textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 11px 13px; font-size: 16px;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--text); outline-offset: -1px; border-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hint { font-size: 12.5px; color: var(--faint); margin-top: 6px; }
.error { color: var(--bad); font-size: 13.5px; min-height: 1em; margin: 8px 0 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 16px;
  border-radius: 6px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 15px;
  text-decoration: none; cursor: pointer; white-space: nowrap; transition: background 0.15s, opacity 0.15s;
}
.btn:active { opacity: 0.8; }
.btn.primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn.danger { background: none; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn.ghost { background: none; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 5px; }
.btn.icon { width: 34px; padding: 0; }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: default; }
.actions { display: flex; gap: 8px; margin-top: 14px; }
.actions > * { flex: 1; }
.actions.wrap { flex-wrap: wrap; }
.actions.wrap > * { flex: 1 1 calc(50% - 4px); }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px var(--pad); border-top: 1px solid var(--line); }
.switch:first-child { border-top: 0; }
.switch input { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); position: relative; cursor: pointer; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform 0.15s, background 0.15s; }
.switch input:checked { background: var(--primary); border-color: var(--primary); }
.switch input:checked::after { transform: translateX(18px); background: var(--on-primary); }

.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 26px 16px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface); text-align: center; cursor: pointer; }
.dropzone.has { border-style: solid; border-color: var(--accent); }
.dropzone input { display: none; }

details.more > summary { list-style: none; cursor: pointer; color: var(--muted); font-size: 13.5px; font-weight: 600; padding: 4px 0; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: " +"; }
details.more[open] > summary::after { content: " −"; }
.steps { margin: 6px 0 0; padding-left: 20px; color: var(--muted); font-size: 13.5px; }
.steps li { margin: 4px 0; }

/* ---------- media */

.player { width: 100%; max-height: 62vh; background: #000; border-radius: var(--radius); display: block; margin-top: 12px; }
.shorts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 600px) { .shorts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.short { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.short video, .short .ph { width: 100%; aspect-ratio: 9 / 16; background: #000; display: block; object-fit: cover; }
.short .ph { display: flex; align-items: center; justify-content: center; color: var(--faint); font-size: 13px; }
.short .meta { padding: 10px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.short .hook { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.short.skipped { opacity: 0.45; }

.timeline { list-style: none; margin: 0; padding: 4px var(--pad); }
.timeline li { display: flex; align-items: center; gap: 10px; padding: 6px 0; color: var(--faint); font-size: 14px; }
.timeline li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--faint); flex: none; }
.timeline li.done { color: var(--text); } .timeline li.done::before { background: var(--good); border-color: var(--good); }
.timeline li.now { color: var(--text); font-weight: 600; } .timeline li.now::before { background: var(--accent); border-color: var(--accent); }

.cut { padding: 12px var(--pad); border-top: 1px solid var(--line); }
.cut:first-child { border-top: 0; }
.cut .when { font-size: 12.5px; color: var(--faint); }
.cut .what { margin: 3px 0; overflow-wrap: anywhere; }
.cut .why { font-size: 13px; color: var(--muted); }

/* ---------- sheet (bottom drawer) */

.sheet-backdrop { position: fixed; inset: 0; background: rgb(23 22 20 / 0.45); z-index: 20; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-height: 86vh; overflow: auto;
  background: var(--surface); border-top: 1px solid var(--line); border-radius: 16px 16px 0 0;
  padding: 10px var(--pad) calc(20px + env(safe-area-inset-bottom));
}
.sheet::before { content: ""; display: block; width: 36px; height: 4px; border-radius: 99px; background: var(--line); margin: 0 auto 12px; }
.sheet h2 { font: 400 23px/1.2 var(--serif); letter-spacing: -0.015em; margin: 0 0 4px; }
@media (min-width: 700px) { .sheet { left: 50%; transform: translateX(-50%); width: 640px; bottom: 24px; border-radius: 16px; border: 1px solid var(--line); } }

.toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30; background: var(--text); color: var(--bg); padding: 9px 14px; border-radius: 6px; font-weight: 600; font-size: 14px; max-width: calc(100% - 32px); }

/* ---------- sign-in */

.signin { max-width: 380px; margin: 0 auto; padding: 16vh 24px 24px; }
.signin .brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; margin-bottom: 44px; }
.mark { width: 22px; height: 22px; border-radius: 5px; background: var(--text); position: relative; flex: none; }
.mark::after { content: ""; position: absolute; inset: 6.5px; border-radius: 50%; background: var(--accent); }
.signin h1 { font: 650 30px/1.1 var(--sans); margin: 0 0 10px; letter-spacing: -0.025em; }
.signin .muted { margin: 0 0 8px; }
.signin .muted:empty { display: none; }
.signin .btn.block { margin-top: 18px; height: 48px; }
.signin .alt { margin: 20px 0 0; font-size: 14px; color: var(--muted); text-align: center; }
.signin .alt a { color: var(--muted); }
.signin .alt a:hover { color: var(--text); }
/* Settings → Sign-in and security */
.qr { display: block; width: 200px; height: 200px; margin: 12px auto; image-rendering: pixelated; border-radius: 8px; background: #fff; padding: 6px; }
.secret { font: 500 14px var(--mono); letter-spacing: 0.04em; word-break: break-all; user-select: all; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; font: 500 15px var(--mono); margin: 10px 0; user-select: all; }
.status-on { color: var(--good); font-weight: 600; }
.status-off { color: var(--muted); }
.short button.meta { border: 0; background: none; text-align: left; cursor: pointer; width: 100%; color: inherit; }
.day-head { font-size: 13px; font-weight: 650; color: var(--muted); margin: 22px 0 8px; }
.inline { display: flex; align-items: center; gap: 12px; }
.inline .grow { flex: 1; min-width: 0; }
.inline .title { font-weight: 600; }
.inline .sub { color: var(--muted); font-size: 13px; }
.time-chip { height: 40px; padding: 0 4px 0 6px; }
.time-chip input { width: auto; background: none; border: 0; padding: 4px; font-size: 15px; color: var(--text); }
.time-chip button { border: 0; background: none; color: var(--faint); font-size: 18px; cursor: pointer; padding: 0 6px; }
.sheet .player { max-height: 34vh; width: auto; max-width: 100%; margin: 12px auto 0; }

.ramp-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 14px; color: var(--muted); }
.ramp-row input { width: 64px; padding: 8px 10px; text-align: center; }
.ramp-row button { border: 0; background: none; color: var(--faint); font-size: 18px; cursor: pointer; }
.results { margin: 10px 0 0; padding: 0; list-style: none; font-size: 13.5px; }
.results li { padding: 3px 0; }
.results .ok { color: var(--good); } .results .no { color: var(--bad); }

/* Settings: caption height preview (a 9:16 phone) */
.cap-row { gap: 16px; align-items: center; }
.cap-phone { position: relative; flex: none; width: 76px; aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden;
  background: linear-gradient(170deg, #4a3a2e, #241b15); border: 1px solid var(--line); }
.cap-hook { position: absolute; top: 12%; left: 50%; transform: translate(-50%, -50%); font-size: 7px; font-weight: 800;
  padding: 2px 5px; border-radius: 3px; background: #f6f2ea; color: #171614; }
.cap-ui { position: absolute; left: 0; right: 0; bottom: 0; height: 15%; background: repeating-linear-gradient(135deg,
  rgba(255,255,255,0.08) 0 4px, transparent 4px 8px); border-top: 1px dashed var(--faint); }
.cap-line { position: absolute; left: 50%; transform: translate(-50%, -50%); white-space: nowrap; font-size: 8px; font-weight: 900;
  color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000; transition: top 0.1s; }
.cap-line b { color: var(--accent); }
.cap-row input[type="range"] { width: 100%; margin: 10px 0 6px; accent-color: var(--accent); }

/* ---------- stats */

.stats.four { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 520px) { .stats.four { grid-template-columns: repeat(4, 1fr); } }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.swatch.youtube { background: var(--yt); } .swatch.instagram { background: var(--ig); }
.chart { width: 100%; height: 120px; display: block; }
.chart .day { cursor: pointer; }
.chart .day.on rect:not(.hit) { opacity: 1; } .chart:has(.day.on) .day:not(.on) rect:not(.hit) { opacity: 0.45; }
.axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--faint); margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.row .wrap { white-space: normal; overflow: visible; }
.report-head p { margin: 8px 0 0; font-size: 15.5px; font-weight: 600; line-height: 1.4; }
details.idea > summary { list-style: none; cursor: pointer; }
details.idea > summary::-webkit-details-marker { display: none; }
details.idea[open] > summary .sub { color: var(--text); }

/* Style testing */
.style-card .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.style-card.denied video { opacity: 0.55; }
.style-card.long { padding: 0; overflow: hidden; margin-bottom: 18px; }
.style-card.long video, .style-card.long .ph { width: 100%; aspect-ratio: 16 / 9; background: #000; display: block; }
.style-card.long .meta { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }

/* Pull to refresh (phones) */
.ptr {
  position: fixed; top: env(safe-area-inset-top); left: 50%; z-index: 30; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line); color: var(--faint);
  transform: translate(-50%, -44px); opacity: 0; pointer-events: none;
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.35);
}
.ptr svg { width: 18px; height: 18px; }
.ptr.ready { color: var(--accent); border-color: var(--accent); }
.ptr.spin svg { animation: ptr-spin 0.7s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }

/* Grow */
.mail { white-space: pre-wrap; font-size: 13.5px; line-height: 1.55; background: var(--surface-2); border-radius: 10px; padding: 12px; margin: 8px 0; }

/* More: big tappable cards for the pages under it */
.tiles { display: grid; gap: 10px; margin-top: 14px; }
.tile { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); text-decoration: none; box-shadow: var(--shadow); }
.tile:active { background: var(--surface-2); }
.tile .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tile .title { font-weight: 650; font-size: 16px; }
.tile .sub { color: var(--muted); font-size: 13px; }
.tile .chev { color: var(--faint); font-size: 18px; }
.tile-icon { flex: none; width: 42px; height: 42px; border-radius: 6px; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-2)); color: var(--accent); }
.tile-icon svg { width: 22px; height: 22px; }

/* Home: one quiet line for the computers (details under More) */
.mac-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; margin: 26px 0 0;
  color: var(--faint); font-size: 13px; text-decoration: none; }
.mac-line span:not(.status) { color: var(--muted); }

/* Queue: finished days folded away */
details.earlier { margin-top: 28px; }
details.earlier > summary { list-style: none; cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 600;
  padding: 12px var(--pad); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
details.earlier > summary::-webkit-details-marker { display: none; }
details.earlier > summary::after { content: "›"; float: right; color: var(--faint); transition: transform 0.15s; }
details.earlier[open] > summary::after { transform: rotate(90deg); }

/* Settings: section switcher stays in reach while scrolling */
#sec-tabs { position: sticky; top: calc(env(safe-area-inset-top) + 58px); z-index: 5; margin-top: 12px;
  box-shadow: 0 8px 16px -8px var(--bg); }
section[data-sec] > .label:first-child { margin-top: 20px; }

/* Trial reels */
.trial { display: flex; gap: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; }
.trial.posted { opacity: 0.6; }
.trial-vid { width: 96px; flex: none; }
.trial-vid video, .trial-vid .ph { width: 96px; aspect-ratio: 9 / 16; border-radius: 8px; background: #000; display: flex; align-items: center; justify-content: center; object-fit: cover; }
.trial-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.trial-meta .title { font-weight: 650; }
.trial-meta .sub { color: var(--muted); font-size: 13px; }
.trial-meta .cap { color: var(--muted); margin: 2px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.trial-meta .actions { margin-top: 6px; }

/* Public profile editor */
.profile-link { display: flex; flex-direction: column; gap: 4px; }
.profile-link .actions { margin-top: 10px; }
.photo-row { display: flex; align-items: center; gap: 16px; }
.photo-row .grow { flex: 1; min-width: 0; }
.photo-row .hint { margin: 2px 0 8px; }
.avatar-pick { flex: none; width: 84px; height: 84px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px dashed var(--line); color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; }
.avatar-pick img { width: 100%; height: 100%; object-fit: cover; }
.prefix-input { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.prefix-input span { padding: 0 2px 0 13px; color: var(--muted); font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.prefix-input input { border: 0; padding-left: 0; background: none; font-family: var(--mono); font-size: 14px; }
.prefix-input:focus-within { outline: 2px solid var(--text); outline-offset: -1px; border-color: transparent; }
.prefix-input input:focus { outline: none; }
* + .panel:has(> label.switch) { margin-top: 12px; }
.switch .sub { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.link-row { display: grid; grid-template-columns: 1fr 34px; gap: 6px; padding: 12px; margin-bottom: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.link-row input[data-l="url"] { grid-column: 1; }
.link-row [data-drop] { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 20px; color: var(--muted); border: 0; }
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.swatch-pick { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); cursor: pointer; font-weight: 600; font-size: 14px; }
.swatch-pick i { width: 18px; height: 18px; border-radius: 50%; background: var(--swatch); flex: none; }
.swatch-pick.on { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.swatch-pick.accent-clay { --swatch: #c8371f; } .swatch-pick.accent-rose { --swatch: #b8576b; } .swatch-pick.accent-sage { --swatch: #5f7a5c; }
.swatch-pick.accent-gold { --swatch: #a5783a; } .swatch-pick.accent-sky { --swatch: #3c6e9e; } .swatch-pick.accent-ink { --swatch: #171614; }
@media (prefers-color-scheme: dark) { .swatch-pick.accent-ink { --swatch: #ece9e1; } }

/* Public profile editor: photo crop, live preview, "Words on your page" */
.crop { width: 280px; height: 280px; margin: 14px auto 4px; border-radius: 50%; overflow: hidden; border: 1px solid var(--line);
  box-shadow: 0 0 0 6px var(--surface-2); touch-action: none; cursor: grab; }
.crop canvas { width: 280px; height: 280px; display: block; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.page-preview { margin: 12px 0 4px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.page-preview iframe { display: block; width: 100%; height: 640px; border: 0; }
.text-sec { padding: 0; margin-bottom: 8px; }
.text-sec summary { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; cursor: pointer; list-style: none; }
.text-sec summary::-webkit-details-marker { display: none; }
.text-sec[open] summary .chev { transform: rotate(90deg); }
.text-sec[open] { padding-bottom: 14px; }
.text-sec > label, .text-sec > input, .text-sec > textarea { margin-left: 16px; margin-right: 16px; width: calc(100% - 32px); display: block; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font-size: 12px; font-weight: 600; cursor: pointer; }

/* Sign-ups and brand inquiries */
.search { margin-bottom: 10px; }
.inquiry-msg { white-space: pre-wrap; margin: 8px 0 4px; font-size: 14px; line-height: 1.5; }
.row.unread .title::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 1px; }
.mail-edit input { margin-bottom: 8px; }
.mail-edit textarea { min-height: 220px; }
.row.faded { opacity: 0.55; }
