/* reelay: realQuest family. Navy ink, signal-orange accent, warm paper. Light mode only (brand rule). */
@font-face { font-family: "Space Grotesk"; font-weight: 400; font-display: swap; src: url("/static/fonts/space-grotesk-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 500; font-display: swap; src: url("/static/fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 600; font-display: swap; src: url("/static/fonts/space-grotesk-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-display: swap; src: url("/static/fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); }

:root {
  --paper: #f6f5f1;
  --surface: #ffffff;
  --sunken: #f1f2f4;
  --ink: #0e1726;
  --ink-2: #1f2a3c;
  --text: #1a2233;
  --muted: #5b6475;
  --faint: #8a92a1;
  --border: #e3e6eb;
  --border-strong: #cdd2da;
  --accent: #f2542d;
  --accent-ink: #b83a17;
  --accent-soft: #fdece6;
  --good: #137a3f;   --good-bg: #e6f4ec;
  --warn: #8f5a00;   --warn-bg: #fff3d6;
  --bad: #b42318;    --bad-bg: #fdecea;
  --info: #1f4fd1;   --info-bg: #e9effd;
  --ig: #d62976;
  --yt: #e62117;
  --radius: 16px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(14, 23, 38, 0.05), 0 1px 3px rgba(14, 23, 38, 0.04);
  --shadow-lg: 0 10px 30px rgba(14, 23, 38, 0.10), 0 2px 6px rgba(14, 23, 38, 0.05);
  --display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font: 15px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
h1, h2, h3 { font-family: var(--display); color: var(--ink); letter-spacing: -0.015em; }
h1 { font-size: 1.75rem; line-height: 1.2; margin: 0; font-weight: 600; }
h2 { font-size: 1.1rem; margin: 0 0 0.75rem; font-weight: 600; }
h3 { font-size: 1rem; margin: 0; font-weight: 600; }
p { margin: 0 0 0.75rem; }
code { font-family: var(--mono); background: var(--sunken); padding: 1px 6px; border-radius: 6px; font-size: 0.86em; }
img, video { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon { flex: none; vertical-align: -3px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.wrap-wide { max-width: 1240px; }
.section { padding-top: 28px; padding-bottom: 40px; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.err { color: var(--bad); }
.ok { color: var(--good); }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.inline { display: inline; margin: 0; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.plain li:last-child { border-bottom: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- Top bar ---------- */
.topbar { background: rgba(255, 255, 255, 0.92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.topbar-inner { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { display: block; height: 34px; width: auto; }
.nav { display: flex; gap: 2px; align-items: center; flex: 1; min-width: 0; }
.nav a { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 10px; font-weight: 500; font-size: 0.93rem; position: relative; white-space: nowrap; }
.nav a:hover { background: var(--sunken); color: var(--ink); }
.nav a.active { color: var(--ink); background: var(--sunken); }
.nav a.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -13px; height: 2px; background: var(--accent); border-radius: 2px; }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--sunken); color: var(--muted); font-size: 0.74rem; font-weight: 600; }
.nav .count { background: var(--accent); color: #fff; }
.topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.topbar-public .topbar-inner { justify-content: space-between; }
.demo-banner { display: flex; justify-content: center; align-items: center; gap: 8px; background: var(--warn-bg); color: var(--warn); font-size: 0.84rem; padding: 6px 16px; border-top: 1px solid #f1dfae; }

/* Account menu (details/summary: works without JS) */
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.avatar { position: relative; width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: 0.9rem; user-select: none; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--border); }
.menu[open] .avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent); }
.menu-panel { position: absolute; right: 0; top: calc(100% + 10px); width: 260px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; z-index: 30; }
.menu-head { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; overflow-wrap: anywhere; }
.menu-head .badge { align-self: flex-start; margin-top: 6px; }
.menu-panel a, .menu-panel button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 8px; color: var(--text); text-decoration: none; background: none; border: 0; font: inherit; font-size: 0.93rem; cursor: pointer; text-align: left; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--sunken); }
.menu-panel form { margin: 0; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 6px; }
.menu-panel form button { color: var(--bad); }

/* ---------- App shell: dark sidebar (wide), top bar + bottom tabs (phones) ---------- */
.app { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(90deg, var(--ink) 244px, var(--paper) 244px); }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--ink); color: rgba(255,255,255,.72); display: flex; flex-direction: column; gap: 18px; padding: 22px 14px 14px; z-index: 25; }
.side-brand { padding: 2px 10px 4px; }
.side-brand img { height: 34px; width: auto; display: block; }
.side-new { padding: 11px 14px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: rgba(255,255,255,.7); text-decoration: none; font-weight: 500; position: relative; }
.side-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-nav a.active { background: rgba(255,255,255,.1); color: #fff; }
.side-nav a.active::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.side-nav a.active .icon { color: var(--accent); }
.side-nav .count { margin-left: auto; background: var(--accent); color: #fff; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; color: #fff; }
.side-user:hover, .side-user-menu[open] .side-user { background: rgba(255,255,255,.08); }
.side-user .avatar { width: 34px; height: 34px; background: var(--accent); box-shadow: none; font-size: .8rem; flex: none; }
.side-user-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.side-user-text b { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user-text span { font-size: .75rem; color: rgba(255,255,255,.5); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user > .icon { transform: rotate(180deg); color: rgba(255,255,255,.5); }
.menu-up .menu-panel { top: auto; bottom: calc(100% + 8px); left: 0; right: 0; width: auto; }
.menu-mobile-only { display: none !important; }
.app-main { min-width: 0; display: flex; flex-direction: column; }
.app-main .demo-banner { border-top: 0; border-bottom: 1px solid #f1dfae; }
.content { width: 100%; max-width: 1180px; margin: 0 auto; padding: 32px 32px 40px; flex: 1; }
.content-wide { max-width: 1400px; }
.app .app-footer { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 32px 28px; }
.mobilebar, .tabbar, .mobile-submit { display: none; }
.avatar-dot { position: absolute; top: -1px; right: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px #fff; }
.count-accent { background: var(--accent); color: #fff; margin-left: auto; }
.js .no-js-only { display: none; }

/* ---------- Page structure ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; }
.back { display: inline-block; font-size: 0.86rem; color: var(--muted); text-decoration: none; margin-bottom: 6px; }
.back:hover { color: var(--ink); }
.post-h1 { font-size: 1.5rem; max-width: 760px; overflow-wrap: anywhere; }
.section-title { font-size: 1.6rem; margin-bottom: 24px; }
.section-title-sm { font-size: 1rem; margin: 28px 0 12px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 4px; }
.panel-head h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.panel-bad { border-color: #f3c9c4; }
.panel-bad .panel-head h2 { color: var(--bad); }
.panel-warn { border-color: #f1dfae; padding-bottom: 4px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 20px; margin-bottom: 20px; align-items: start; }
.grid-2 > * { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack > * { margin: 0; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; }
.actions-cell { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.actions-cell form { margin: 0; }
.narrow { max-width: 560px; }
.app-footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--faint); font-size: 0.82rem; padding-bottom: 28px; }
.app-footer a { color: var(--faint); }

/* ---------- Forms ---------- */
label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: 0.92rem; color: var(--ink-2); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-weight: 500; font-size: 0.92rem; color: var(--ink-2); }
.hint { font-weight: 400; font-size: 0.82rem; color: var(--muted); }
input, select, textarea {
  font: inherit; color: var(--text); background: #fff; width: 100%;
  border: 1px solid var(--border-strong); border-radius: 10px; padding: 10px 12px; transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(14, 23, 38, 0.10); }
input[disabled] { background: var(--sunken); color: var(--muted); }
input[type="checkbox"], input[type="radio"] { width: auto; margin: 0; accent-color: var(--ink); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; margin-bottom: 4px; }
.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; flex-wrap: wrap; }
.checks { display: flex; flex-direction: column; gap: 6px; }
textarea { resize: vertical; min-height: 90px; }
.counter { align-self: flex-end; margin-top: -2px; }
.counter.over { color: var(--bad); }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 44px; }
.reveal { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 8px; color: var(--muted); cursor: pointer; border-radius: 8px; }
.reveal:hover { color: var(--ink); background: var(--sunken); }
.code-input { font-family: var(--mono); font-size: 1.4rem; letter-spacing: 0.2em; text-align: center; }

/* Toggle switch */
.switch { flex-direction: row; align-items: center; gap: 12px; font-weight: 400; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { width: 40px; height: 24px; border-radius: 999px; background: var(--border-strong); position: relative; flex: none; transition: background 0.15s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform 0.15s; }
.switch input:checked + .switch-ui { background: var(--ink); }
.switch input:checked + .switch-ui::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Segmented control */
.seg { display: inline-flex; align-self: flex-start; background: var(--sunken); border-radius: 11px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg-block { display: flex; align-self: stretch; }
.seg-block .seg-option { flex: 1; }
.seg-option { flex-direction: row; cursor: pointer; font-weight: 500; }
.seg-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg-option span { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border-radius: 9px; color: var(--muted); transition: background 0.15s; }
.seg-option input:checked + span { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.seg-option input:focus-visible + span { outline: 2px solid var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  font: inherit; font-weight: 600; font-size: 0.92rem; cursor: pointer; text-decoration: none;
  padding: 9px 16px; border-radius: 10px; border: 1px solid var(--border-strong); background: #fff; color: var(--ink);
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:hover { background: var(--sunken); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.btn-primary:hover { background: var(--ink-2); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--sunken); color: var(--ink); }
.btn-danger { color: var(--bad); border-color: #efc4bf; }
.btn-danger:hover { background: var(--bad-bg); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(242,84,45,.28); }
.btn.btn-accent:hover { background: #e2461f; border-color: #e2461f; }
.btn-glass { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.22); color: #fff; }
.btn-glass:hover { background: rgba(255,255,255,.16); }
.btn-icon { padding: 0; width: 38px; height: 38px; flex: none; }
.btn.btn-icon.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 0.86rem; border-radius: 9px; }
.btn-lg { padding: 12px 22px; font-size: 1rem; }
.btn-block { width: 100%; }
.new-post .icon { color: var(--accent); }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }

/* ---------- Badges, platform icons ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 600; padding: 3px 10px 3px 8px; border-radius: 999px; white-space: nowrap; }
.badge .dot, .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; display: inline-block; }
.badge-neutral { background: var(--sunken); color: var(--ink-2); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-good { background: var(--good-bg); color: var(--good); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-muted { background: var(--sunken); color: var(--faint); }
.badge-lg { font-size: .86rem; padding: 6px 12px 6px 10px; }
.badge-glass { background: rgba(11,15,23,.55); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.badge-glass.badge-good .dot { background: #4ade80; } .badge-glass.badge-bad { background: rgba(180,35,24,.85); }
.badge-glass.badge-info .dot { background: #93b4ff; } .badge-glass.badge-neutral .dot { background: var(--accent); }
.dot-neutral { background: var(--faint); } .dot-info { background: var(--info); } .dot-good { background: var(--good); }
.dot-warn { background: #d08a00; } .dot-bad { background: var(--bad); } .dot-muted { background: var(--border-strong); }
.pf { display: inline-grid; place-items: center; border-radius: 8px; color: #fff; flex: none; }
.pf-sm { width: 24px; height: 24px; border-radius: 7px; } .pf-sm .icon { width: 15px; height: 15px; }
.pf-md { width: 34px; height: 34px; border-radius: 10px; } .pf-md .icon { width: 19px; height: 19px; }
.pf-lg { width: 44px; height: 44px; border-radius: 12px; } .pf-lg .icon { width: 24px; height: 24px; }
.pf-instagram { background: linear-gradient(45deg, #f9a03f 0%, #e1306c 50%, #833ab4 100%); }
.pf-youtube { background: var(--yt); }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 16px; background: var(--info-bg); color: #19347f; font-size: 0.93rem; }
.alert .icon { margin-top: 2px; }
.alert-bad { background: var(--bad-bg); color: #7a1a12; }
.alert-good { background: var(--good-bg); color: #0f4d2a; }
.alert-warn { background: var(--warn-bg); color: #6b4300; }
.alert a { color: inherit; font-weight: 600; }
/* Notifications are toasts: top-right on wide screens, above the bottom bar on phones. */
.flash { position: fixed; top: 20px; right: 20px; z-index: 60; width: max-content; max-width: min(420px, calc(100vw - 32px)); display: flex; align-items: center; gap: 10px; border-radius: 12px; padding: 12px 10px 12px 14px; background: var(--ink); color: #fff; box-shadow: 0 16px 40px rgba(14,23,38,.28); animation: toast-in 0.3s ease-out; font-size: .93rem; }
.flash.is-leaving { animation: toast-out 0.25s ease-in forwards; }
.flash-timer { position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; border-radius: 2px; background: var(--accent); transform-origin: left; animation: toast-timer 5s linear forwards; }
.flash:hover .flash-timer { animation-play-state: paused; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-10px) scale(.98); } }
@keyframes toast-timer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.flash .icon { color: #7ee2a8; }
.flash span { flex: 1; }
.flash-close { background: none; border: 0; color: #fff; opacity: 0.7; cursor: pointer; padding: 4px; border-radius: 6px; }
.flash-close:hover { opacity: 1; background: rgba(255,255,255,0.1); }
@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Dashboard ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.tile { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--text); transition: border-color 0.15s, transform 0.15s; }
.tile:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.tile-icon { grid-row: span 2; width: 42px; height: 42px; border-radius: 12px; background: var(--sunken); display: grid; place-items: center; color: var(--ink); }
.tile-value { font-family: var(--display); font-size: 1.6rem; font-weight: 600; color: var(--ink); line-height: 1.1; }
.tile-label { font-size: 0.84rem; color: var(--muted); }
.tile-good .tile-icon { background: var(--good-bg); color: var(--good); }
.tile-bad .tile-icon { background: var(--bad-bg); color: var(--bad); }
.tile-bad .tile-value { color: var(--bad); }
.onboarding { margin-bottom: 20px; }
.todos { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.todo { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.todo > div { flex: 1; }
.todo p { margin: 2px 0 0; }
.todo-check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border-strong); display: grid; place-items: center; flex: none; }
.todo.done .todo-check { background: var(--good); border-color: var(--good); color: #fff; }
.todo.done b { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }

/* Post lists (rows stack when their panel is narrow, e.g. half-width on the dashboard) */
.panel { container-type: inline-size; }
.post-list { list-style: none; margin: 0; padding: 6px 0; }
.post-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 10px 20px; border-top: 1px solid var(--border); }
.post-item:first-child { border-top: 0; }
.post-item:hover { background: #fbfbfa; }
.post-link { display: flex; align-items: center; gap: 14px; min-width: 0; text-decoration: none; color: inherit; }
.post-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.post-title { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-link:hover .post-title { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.post-meta { display: flex; gap: 6px; font-size: 0.82rem; color: var(--ink-2); flex-wrap: wrap; }
.post-meta .icon { width: 14px; height: 14px; color: var(--faint); }
.post-error { font-size: 0.82rem; color: var(--bad); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-error .icon { width: 14px; height: 14px; }
.post-dests { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.thumb { flex: none; display: block; border-radius: 9px; overflow: hidden; background: var(--sunken); }
.thumb img, .thumb video, .thumb .media-empty { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb .media-empty { display: grid; place-items: center; }
.thumb .media-empty .icon { width: 16px; height: 16px; }
.thumb-sm { width: 44px; height: 56px; }
.thumb-lg { width: 120px; height: 160px; }
.thumb-empty { display: grid; place-items: center; color: var(--faint); }
@container (max-width: 720px) {
  .post-item { grid-template-columns: minmax(0, 1fr) auto; row-gap: 8px; }
  .post-dests { grid-column: 1 / -1; justify-content: flex-start; padding-left: 58px; }
  .post-status { grid-row: 1; grid-column: 2; }
}
@container (max-width: 520px) {
  .post-item { grid-template-columns: minmax(0, 1fr); }
  .post-status, .post-meta .muted { display: none; }
}
.dest { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border: 1px solid var(--border); border-radius: 999px; font-size: 0.8rem; text-decoration: none; color: var(--ink-2); background: #fff; max-width: 190px; }
.dest .pf-sm { width: 20px; height: 20px; border-radius: 50%; }
.dest .pf-sm .icon { width: 12px; height: 12px; }
a.dest:hover { border-color: var(--ink); }
.dest-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { text-align: center; padding: 36px 20px; }
.empty h3 { margin: 10px 0 4px; }
.empty p { margin-bottom: 14px; }
.empty-icon { width: 34px; height: 34px; color: var(--faint); stroke-width: 1.5; }

/* Tracker */
.tabs { display: flex; gap: 6px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 8px 7px 14px; color: var(--ink-2); text-decoration: none; font-weight: 500; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); white-space: nowrap; font-size: .92rem; }
.tabs a:hover { border-color: var(--border-strong); }
.tabs a.active { color: #fff; background: var(--ink); border-color: var(--ink); }
.tabs a.active .count { background: rgba(255,255,255,.18); color: #fff; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.filters select, .filters input { width: auto; padding: 8px 10px; font-size: 0.9rem; }
.filters .search { flex: 1 1 240px; position: relative; display: block; }
.filters .search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.filters .search input { width: 100%; padding-left: 36px; }
.filters-extra { display: contents; }
.filters-toggle { display: none; }
.view-toggle { display: flex; gap: 4px; }
.filters select { max-width: 210px; }
.filters .date input { width: 150px; }
.filters .date { flex-direction: row; align-items: center; gap: 6px; font-weight: 400; color: var(--muted); font-size: 0.86rem; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* Post page */
.post-layout { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 20px; align-items: start; }
.media-card { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 24px; }
.media-card .media-meta, .media-card .storage { justify-content: center; }
.player { width: 100%; aspect-ratio: 9 / 16; background: #000; border-radius: 30px; object-fit: contain; display: block; }
.player-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #a5adbb; text-align: center; padding: 20px; font-size: 0.9rem; }
.media-meta { display: flex; gap: 12px; color: var(--muted); font-size: 0.84rem; flex-wrap: wrap; }
.storage { display: flex; align-items: center; gap: 8px; font-size: 0.84rem; color: var(--ink-2); }
.storage.ok .icon { color: var(--good); }
.storage.warn { color: var(--warn); }
.dest-cards { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dest-card { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 90px; }
.dest-card:target { border-color: var(--accent); }
.dest-head { display: flex; align-items: center; gap: 12px; }
.dest-title { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.dest-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.dest-time { display: flex; align-items: center; gap: 6px; color: var(--ink-2); margin: 0; flex-wrap: wrap; }
.dest-time .icon { color: var(--faint); }
.dest-content { background: var(--sunken); border-radius: var(--radius-sm); padding: 12px 14px; }
.dest-content p:last-child { margin-bottom: 0; }
.dest-card .alert { margin: 0; }
.live-note { display: flex; align-items: center; gap: 8px; margin: 0; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(242,84,45,.5); } 70% { box-shadow: 0 0 0 8px rgba(242,84,45,0); } 100% { box-shadow: 0 0 0 0 rgba(242,84,45,0); } }
.timeline { list-style: none; padding: 0; margin: 8px 0 0; font-size: 0.86rem; }
.timeline li { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 7px 0; border-top: 1px dashed var(--border); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
details.more > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--muted); font-size: 0.88rem; font-weight: 500; list-style: none; padding: 4px 0; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary .icon { transition: transform 0.15s; transform: rotate(-90deg); }
details.more[open] > summary .icon { transform: none; }
details.more[open] > summary { margin-bottom: 8px; }
details.more > summary:hover { color: var(--ink); }

/* Composer */
.composer { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.composer-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.step-card { display: flex; flex-direction: column; gap: 16px; }
.step-card h2 { display: flex; align-items: center; gap: 10px; margin: 0; }
.step-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 0.82rem; font-family: var(--display); flex: none; }

.sticky { position: sticky; top: 24px; }
.js .composer:not([data-when="later"]) .when-later { display: none; }
.dot-ig { background: var(--ig); } .dot-yt { background: var(--yt); }
.summary { border-top: 1px solid var(--border); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; }
.summary-row { display: flex; align-items: center; gap: 8px; }
.drop-zone { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 190px; border: 2px dashed var(--border-strong); border-radius: var(--radius); background: #fcfcfb; cursor: pointer; transition: border-color 0.15s, background 0.15s; font-weight: 400; }
.drop-zone:hover, .drop-zone.over { border-color: var(--accent); background: var(--accent-soft); }
.drop-zone:focus-within { border-color: var(--ink); }
.drop-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px; color: var(--ink); }
.drop-empty u { text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.drop-icon { width: 34px; height: 34px; color: var(--accent); }
.drop-file { display: none; gap: 14px; }
.drop.has-file .drop-zone { display: none; }
.drop.has-file .drop-file { display: flex; flex-direction: column; }
.drop-preview { width: 100%; max-height: 380px; background: #0b0f17; border-radius: 10px; }
.drop-info { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.drop-text { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.drop-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress { height: 6px; background: var(--sunken); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }
.acct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.acct-tile { flex-direction: row; align-items: center; gap: 12px; padding: 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; font-weight: 400; position: relative; transition: border-color 0.15s, background 0.15s; }
.acct-tile:hover { border-color: var(--border-strong); }
.acct-tile input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.acct-tile:has(input:checked) { border-color: var(--ink); background: #fafaf8; }
.acct-tile:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.acct-tile.is-disabled { opacity: 0.55; cursor: not-allowed; }
.acct-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.acct-text b { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-check { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: grid; place-items: center; color: transparent; flex: none; }
.acct-check .icon { width: 14px; height: 14px; }
.acct-tile:has(input:checked) .acct-check { background: var(--ink); border-color: var(--ink); color: #fff; }
.tile-connect { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius-sm); text-decoration: none; color: var(--text); }
.tile-connect > span { display: flex; flex-direction: column; flex: 1; }
.tile-connect:hover { border-color: var(--accent); }
.platform-section[hidden] { display: none; }
.image-upload { display: flex; flex-direction: column; gap: 8px; }
.cover-upload { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.cover-thumb { position: relative; flex: none; width: 48px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--sunken); color: var(--faint); display: grid; place-items: center; }
.cover-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cover-text b { font-size: .92rem; color: var(--ink); }
.cover-text b .muted { font-weight: 400; }

/* Accounts */
.connect-card { display: flex; flex-direction: column; gap: 16px; }
.grid-2:has(> .connect-card) { align-items: stretch; }
.connect-card > form { flex: 1; }
.connect-card > form > button { margin-top: auto; }
.connect-head { display: flex; gap: 14px; align-items: center; }
.connect-head h2 { margin: 0; }
.connect-head p { margin: 2px 0 0; }
.connect-instagram { border-top: 3px solid var(--ig); }
.connect-youtube { border-top: 3px solid var(--yt); }
.needs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; color: var(--ink-2); }
.needs li { display: flex; gap: 8px; }
.needs .icon { color: var(--good); margin-top: 1px; }
.acct-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; margin-bottom: 20px; }
.acct-card { display: flex; flex-direction: column; gap: 12px; }
.acct-card > .actions { margin-top: auto; }
.acct-card .dest-head { align-items: flex-start; }
.acct-card .dest-title { gap: 2px; }
.acct-card .dest-title > span:last-child { margin-top: 6px; }
.acct-card-warn { border-color: #f3c9c4; }
.approvals li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; flex-wrap: wrap; }

/* Tables (settings, users) */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; background: #fbfbfa; }
.table tr:last-child td { border-bottom: 0; }

/* 2FA */
.qr { width: 200px; height: 200px; margin: 12px 0; }
.qr svg { width: 100%; height: 100%; }
.secret, .codes { font-family: var(--mono); }
.codes { background: var(--sunken); padding: 14px 18px; border-radius: var(--radius-sm); line-height: 1.9; }
.copy { font-family: var(--mono); font-size: 0.85rem; }

/* ---------- Auth pages ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-aside { background: radial-gradient(90% 70% at 100% 0%, rgba(242,84,45,.32), rgba(242,84,45,0) 60%), linear-gradient(150deg, #0e1726, #1b2940); color: rgba(255,255,255,.8); padding: 40px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; position: relative; overflow: hidden; }
.auth-logo img { height: 44px; width: auto; display: block; }
.auth-pitch h2 { font-size: 2.6rem; line-height: 1.08; margin-bottom: 24px; font-weight: 600; color: #fff; }
.auth-aside .ticks { color: rgba(255,255,255,.85); }
.auth-aside .muted { color: rgba(255,255,255,.5); }
.ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; color: var(--ink-2); }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks .icon { color: var(--accent); margin-top: 2px; }
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; gap: 16px; }
.auth-logo-mobile { display: none; }
.auth-logo-mobile img { height: 40px; width: auto; display: block; }
.auth-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 18px; padding: 32px; }
.auth-card .alert { margin: 0; }
.auth-head h1 { font-size: 1.6rem; }
.auth-head p { margin: 6px 0 0; }
.auth-big-icon { width: 36px; height: 36px; color: var(--accent); margin-bottom: 10px; }
.auth-alt { text-align: center; padding-top: 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.92rem; }
.auth-alt a { font-weight: 600; }
.auth:not(:has(.auth-aside)) { grid-template-columns: 1fr; }
.auth:not(:has(.auth-aside)) .auth-logo-mobile { display: block; }

/* ---------- Homepage ---------- */
.hero { padding: 64px 0 56px; }
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.84rem; font-weight: 600; color: var(--ink-2); background: var(--surface); border: 1px solid var(--border); padding: 5px 12px; border-radius: 999px; margin-bottom: 20px; }
.eyebrow-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); line-height: 1.02; letter-spacing: -0.03em; margin-bottom: 20px; font-weight: 700; }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 540px; margin-bottom: 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.relay { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.relay-src { display: flex; flex-direction: column; gap: 12px; padding: 14px; transform: rotate(-2deg); }
.relay-video { aspect-ratio: 9 / 13; border-radius: 10px; background: linear-gradient(160deg, #1f2a3c, #0e1726 60%, #3a2016); display: grid; place-items: center; color: rgba(255,255,255,.5); }
.relay-video .icon { width: 34px; height: 34px; }
.relay-lines span { display: block; height: 8px; border-radius: 4px; background: var(--sunken); margin-bottom: 6px; }
.relay-lines .short { width: 60%; }
.relay-mark { width: 110px; height: 110px; }
.relay-dests { display: flex; flex-direction: column; gap: 16px; }
.relay-dest { display: flex; gap: 12px; align-items: center; padding: 14px; }
.relay-dest > div { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.relay-dest:first-child { transform: rotate(1.5deg); }
.relay-dest:last-child { transform: rotate(-1deg); }
.band { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 56px 0; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.step .step-n { width: 34px; height: 34px; font-size: 1rem; margin-bottom: 14px; background: var(--accent); }
.step h3 { font-size: 1.15rem; margin-bottom: 6px; }
.step p { color: var(--muted); }
.features { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.feature-icon { width: 26px; height: 26px; color: var(--accent); margin-bottom: 12px; }
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--muted); margin: 0; font-size: 0.93rem; }
.cta-band { padding: 0 0 64px; }
.cta-inner { background: var(--ink); color: #fff; border-radius: 20px; padding: 40px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.cta-inner h2 { color: #fff; font-size: 1.7rem; margin: 0; }
.cta-inner .hero-cta { margin: 0; }
.cta-inner .btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.cta-inner .btn.btn-primary:hover { background: var(--accent-ink); }
.cta-inner .btn:not(.btn-primary) { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 22px 0; }
.site-footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.site-footer-inner > span { display: flex; align-items: center; gap: 12px; }
.site-footer-inner img { height: 24px; width: auto; display: block; }
.site-footer nav { display: flex; gap: 18px; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--ink); }
.prose { max-width: 760px; }
.prose h1 { margin-bottom: 16px; }
.prose h2 { margin-top: 1.6rem; }


/* ---------- Home hero ---------- */
.hello { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: end; padding: 32px; border-radius: 22px; margin-bottom: 24px; color: #fff;
  background: radial-gradient(70% 120% at 100% 0%, rgba(242,84,45,.38), rgba(242,84,45,0) 60%), linear-gradient(135deg, #0e1726 0%, #1b2940 100%); box-shadow: var(--shadow-lg); }
.hello h1 { color: #fff; font-size: 2.2rem; letter-spacing: -0.025em; }
.hello-date { color: rgba(255,255,255,.55); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 8px; font-weight: 600; }
.hello-next { color: rgba(255,255,255,.8); margin: 10px 0 22px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hello-next b { color: #fff; }
.hello-next a { color: #fff; font-weight: 600; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.hello-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hello-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hstat { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); color: #fff; text-decoration: none; transition: background .15s; }
.hstat:hover { background: rgba(255,255,255,.13); }
.hstat-value { font-family: var(--display); font-size: 1.75rem; font-weight: 600; line-height: 1.1; }
.hstat-label { font-size: .8rem; color: rgba(255,255,255,.62); }
.hstat-bad { background: rgba(242,84,45,.22); border-color: rgba(242,84,45,.55); }
.block { margin-bottom: 30px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: 1.2rem; }
.section-head p { margin: 2px 0 0; }
.step-card .section-head { align-items: center; margin: 0; }
.demo-tip { display: flex; align-items: center; justify-content: center; gap: 6px; }
.todo-check { font-family: var(--display); font-weight: 600; color: var(--muted); font-size: .85rem; }

/* ---------- Video cards ---------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 22px 18px; margin-bottom: 22px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 184px; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -6px; padding: 6px 6px 12px; scrollbar-width: thin; }
.rail > * { scroll-snap-align: start; }
.rail:focus-visible { outline-offset: -2px; }
.pcard { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.pcard-media { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; background: #0b0f17; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.pcard:hover .pcard-media { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.pcard:focus-visible { outline: none; }
.pcard:focus-visible .pcard-media { outline: 3px solid var(--accent); outline-offset: 2px; }
.pcard-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 28%, rgba(0,0,0,0) 58%, rgba(0,0,0,.7) 100%); }
.pcard-top { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; }
.pcard-pfs { position: absolute; bottom: 12px; right: 12px; display: flex; gap: 6px; }
.pcard-pf { position: relative; display: inline-flex; }
.pcard-pf .pf-sm { width: 26px; height: 26px; border-radius: 8px; box-shadow: 0 0 0 2px rgba(255,255,255,.9); }
.pcard-pf .dot { position: absolute; top: -4px; right: -4px; width: 11px; height: 11px; box-shadow: 0 0 0 2px #fff; }
.pcard-time { position: absolute; left: 12px; bottom: 15px; color: #fff; font-size: .8rem; font-weight: 600; display: flex; gap: 5px; align-items: center; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.pcard-time .icon { width: 14px; height: 14px; }
.pcard-body { display: flex; flex-direction: column; gap: 2px; padding: 0 2px; min-width: 0; }
.pcard-title { font-weight: 600; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; overflow-wrap: anywhere; }
.pcard:hover .pcard-title { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.pcard-sub { font-size: .8rem; color: var(--muted); }
.pcard-attention .pcard-media { box-shadow: 0 0 0 2px var(--bad), var(--shadow); }
.pcard-cancelled .pcard-media { opacity: .5; }
.media-empty { display: grid; place-items: center; color: rgba(255,255,255,.8); }
.media-empty .icon { width: 34px; height: 34px; stroke-width: 1.4; }
.media-hue-0 { background: linear-gradient(160deg, #f2542d, #6b1d4f); }
.media-hue-1 { background: linear-gradient(160deg, #3b5bdb, #0e1726); }
.media-hue-2 { background: linear-gradient(160deg, #0f9d74, #0e1726); }
.media-hue-3 { background: linear-gradient(160deg, #f59f00, #b83a17); }
.media-hue-4 { background: linear-gradient(160deg, #ae3ec9, #1b2940); }
.media-hue-5 { background: linear-gradient(160deg, #1f2a3c, #f2542d); }
.rail-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 34px 20px; border: 2px dashed var(--border-strong); border-radius: 16px; text-decoration: none; color: var(--ink); }
a.rail-empty:hover { border-color: var(--accent); background: var(--accent-soft); }
.rail-empty-icon { width: 46px; height: 46px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 4px; }

/* ---------- Calendar ---------- */
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-month { font-family: var(--display); font-weight: 600; min-width: 150px; text-align: center; font-size: 1.05rem; color: var(--ink); }
.cal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head { background: #fbfbfa; border-bottom: 1px solid var(--border); }
.cal-head span { padding: 10px 12px; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.cal-cell { min-height: 132px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 8px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-grid .cal-cell:nth-last-child(-n+7) { border-bottom: 0; }
.cal-out { background: repeating-linear-gradient(135deg, #fafaf8 0 8px, #f6f6f3 8px 16px); }
.cal-past { background: #fcfcfb; }
.cal-past .cal-num { color: var(--faint); }
.cal-day { display: flex; justify-content: space-between; align-items: center; }
.cal-num { font-family: var(--display); font-weight: 600; font-size: .9rem; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); }
.cal-today .cal-num { background: var(--accent); color: #fff; }
.cal-add { opacity: 0; color: var(--muted); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; transition: opacity .15s; }
.cal-cell:hover .cal-add, .cal-add:focus-visible { opacity: 1; }
.cal-add:hover { background: var(--accent-soft); color: var(--accent); }
.cal-add .icon { width: 16px; height: 16px; }
.cal-chip { display: flex; align-items: center; gap: 6px; padding: 3px 5px 3px 3px; border-radius: 8px; background: var(--sunken); text-decoration: none; color: var(--ink); min-width: 0; border-left: 3px solid var(--faint); }
.cal-chip:hover { background: #e7e9ed; }
.cal-scheduled { border-left-color: var(--accent); }
.cal-progress { border-left-color: var(--info); }
.cal-published { border-left-color: var(--good); }
.cal-attention { border-left-color: var(--bad); background: var(--bad-bg); }
.cal-cancelled { opacity: .5; }
.cal-thumb { width: 20px; height: 30px; border-radius: 4px; overflow: hidden; flex: none; background: #0b0f17; }
.cal-thumb > * { width: 100%; height: 100%; object-fit: cover; display: block; }
.cal-thumb .icon { display: none; }
.cal-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; flex: 1; }
.cal-time { font-size: .7rem; color: var(--muted); font-weight: 600; }
.cal-title { font-size: .78rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-pfs { display: flex; gap: 2px; }
.cal-pfs .pf-sm { width: 16px; height: 16px; border-radius: 5px; }
.cal-pfs .pf-sm .icon { width: 10px; height: 10px; }
.cal-more { font-size: .75rem; color: var(--muted); padding-left: 4px; }
.agenda { display: none; }
.agenda-day h2 { font-size: .9rem; margin: 18px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.agenda-day.is-today h2 { color: var(--accent); }
.agenda-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.agenda-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; text-decoration: none; color: inherit; border-top: 1px solid var(--border); }
.agenda-list li:first-child .agenda-item { border-top: 0; }
.agenda-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.agenda-text b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }

/* ---------- Phone preview (composer, post page) ---------- */
.side-stack { display: flex; flex-direction: column; gap: 16px; }
.preview-card { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.preview-tabs { display: inline-flex; background: #e9eaee; border-radius: 999px; padding: 3px; gap: 2px; }
.preview-tabs button { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 5px 14px 5px 5px; border-radius: 999px; font: inherit; font-size: .85rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.preview-tabs button.is-on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.preview-tabs .pf-sm { width: 22px; height: 22px; border-radius: 50%; }
.preview-tabs .pf-sm .icon { width: 13px; height: 13px; }
.phone { width: 100%; max-width: 250px; border-radius: 36px; padding: 9px; background: #0b0f17; box-shadow: 0 24px 50px rgba(14,23,38,.22), inset 0 0 0 2px #2a3344; }
.phone-screen { position: relative; aspect-ratio: 9 / 16; border-radius: 28px; overflow: hidden; background: linear-gradient(160deg, #1f2a3c, #0e1726 60%, #3a2016); }
.phone-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phone-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: rgba(255,255,255,.5); font-size: .85rem; }
.phone-empty .icon { width: 30px; height: 30px; stroke-width: 1.4; }
.phone-video:not([hidden]) + .phone-empty { display: none; }
.phone-ui { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 14px 12px; gap: 10px; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.65)); pointer-events: none; }
.phone-meta { flex: 1; min-width: 0; }
.phone-rail { order: 2; display: flex; flex-direction: column; gap: 16px; color: #fff; padding-bottom: 4px; }
.phone-rail .icon { width: 22px; height: 22px; }
.phone-acct { display: flex; align-items: center; gap: 8px; color: #fff; font-size: .82rem; margin-bottom: 6px; }
.phone-acct b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone-avatar { display: inline-flex; }
.phone-avatar .pf-sm { width: 26px; height: 26px; border-radius: 50%; box-shadow: 0 0 0 1.5px #fff; }
.phone[data-mode="instagram"] .phone-avatar .pf-youtube, .phone[data-mode="youtube"] .phone-avatar .pf-instagram { display: none; }
.phone-caption { color: #fff; font-size: .78rem; line-height: 1.38; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; overflow-wrap: anywhere; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.phone[data-mode="youtube"] .phone-caption { font-weight: 600; font-size: .86rem; }
.phone-caption.is-placeholder { opacity: .55; }
.phone-player { max-width: 300px; margin: 0 auto; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .hello { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; background: var(--paper); }
  .no-tabbar .tabbar { display: none; }
  .flash { top: auto; bottom: calc(92px + env(safe-area-inset-bottom)); left: 16px; right: 16px; width: auto; max-width: none; }
  @keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  @keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }
  .sidebar { display: none; }
  .mobilebar { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: rgba(246,245,241,.92); backdrop-filter: saturate(1.4) blur(8px); -webkit-backdrop-filter: saturate(1.4) blur(8px); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--border); }
  .mobilebar .brand img { height: 30px; width: auto; display: block; }
  .mobilebar .avatar { width: 36px; height: 36px; font-size: .82rem; }
  .menu-mobile-only { display: flex !important; }
  .content { padding: 20px 16px 28px; }
  .app .app-footer { padding: 0 16px 24px; }
  .tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--border); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; align-items: flex-end; }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .68rem; color: var(--muted); text-decoration: none; padding: 4px 6px; min-width: 58px; font-weight: 600; }
  .tabbar a.active { color: var(--ink); }
  .tabbar a.active .icon { color: var(--accent); }
  .tabbar .icon { width: 22px; height: 22px; }
  .tabbar .tab-new { width: 54px; height: 54px; min-width: 0; border-radius: 18px; background: var(--accent); color: #fff; justify-content: center; box-shadow: 0 8px 18px rgba(242,84,45,.4); margin: -20px 0 2px; }
  .tabbar .tab-new .icon { width: 28px; height: 28px; stroke-width: 2.4; color: #fff; }
  .app:not(.no-tabbar) .app-main { padding-bottom: 80px; }
  .no-tabbar .app-main { padding-bottom: 84px; }
  .mobile-submit { display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--border); }
  .mobile-submit button { flex: 1; }
  .submit-main, .submit-main + .btn-ghost { display: none; }
}
@media (max-width: 980px) {
  .composer { grid-template-columns: 1fr; }
  .composer-side { order: 2; }
  .phone { max-width: 220px; }
  .sticky, .media-card { position: static; }
  .post-layout { grid-template-columns: 1fr; }
  .player { max-height: 460px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { max-width: 520px; }
  .auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-logo-mobile { display: block; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .hello { padding: 22px; border-radius: 18px; gap: 18px; }
  .hello h1 { font-size: 1.65rem; }
  .hello-next { margin-bottom: 16px; }
  .hello-cta .btn-lg { padding: 10px 16px; font-size: .95rem; }
  .hstat { padding: 12px 14px; }
  .hstat-value { font-size: 1.4rem; }
  .rail { grid-auto-columns: 42vw; margin: 0 -16px; padding: 6px 16px 12px; scroll-padding: 16px; }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .cal { display: none; }
  .agenda { display: block; }
  .cal-nav { width: 100%; justify-content: space-between; }
  .filters-toggle { display: inline-flex; }
  .js .filters:not(.show) .filters-extra { display: none; }
  .filters-extra { display: flex; flex-wrap: wrap; gap: 10px; flex-basis: 100%; }
  .page-head .actions .btn-accent { display: none; }
  .topbar-inner { flex-wrap: wrap; gap: 8px 12px; min-height: 58px; padding-top: 8px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 12px 6px; }
  .nav a.active::after { bottom: 0; }
  .new-post span { display: none; }
  .new-post { padding: 8px 10px; }
  h1 { font-size: 1.45rem; }
  .post-item { padding: 12px 16px; }
  .steps, .features { grid-template-columns: 1fr; }
  .tiles { gap: 10px; }
  .tile { padding: 14px; column-gap: 10px; }
  .tile-icon { width: 36px; height: 36px; }
  .tile-value { font-size: 1.3rem; }
  .card { padding: 18px; }
  .auth-card { padding: 24px; }
  .cta-inner { padding: 28px; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .filters-extra { display: contents; }
.filters-toggle { display: none; }
.view-toggle { display: flex; gap: 4px; }
.filters select { max-width: 210px; }
.filters .date input { width: 150px; }
.filters .date { flex: 1 1 140px; }
  .filters select { flex: 1 1 140px; }
  .relay-mark { width: 70px; height: 70px; }
  .hero { padding-top: 40px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Composer v2 ---------- */
.drop-badge { width: 52px; height: 52px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; margin-bottom: 4px; }
.drop-badge .drop-icon { width: 26px; height: 26px; }
.drop-file .media-tile { margin: 0; }
.media-tile { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.media-thumb { position: relative; flex: none; width: 54px; height: 96px; border-radius: 9px; overflow: hidden; background: var(--sunken); color: var(--faint); display: grid; place-items: center; }
.media-thumb video, .media-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-height: none; border-radius: 0; background: #0b0f17; }
.cover-upload .media-thumb { border: 1.5px dashed var(--border-strong); background: #fbfbfa; }
.cover-upload.has-file .media-thumb { border-style: solid; border-color: transparent; }
.media-kicker { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); }
.media-kicker .muted { font-weight: 500; text-transform: none; letter-spacing: 0; }
.media-tile .drop-text b { color: var(--ink); }
.cover-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.warn-text { color: var(--warn); }
.step-card .platform-section { display: flex; flex-direction: column; gap: 12px; }
.step-card .platform-section + .platform-section:not([hidden]) { border-top: 1px solid var(--border); padding-top: 18px; }
.platform-head { display: flex; align-items: center; gap: 8px; font-size: .98rem; }
.details-empty { display: flex; align-items: center; gap: 8px; margin: 0; padding: 18px; border: 1.5px dashed var(--border-strong); border-radius: 12px; font-size: .93rem; }
.details-empty .icon { transform: rotate(90deg); }
.details-empty[hidden] { display: none; }
.quick-times { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip { font: inherit; font-size: .86rem; font-weight: 500; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: #fff; color: var(--ink-2); cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.acct-tile:has(input[data-platform="instagram"]:checked) { border-color: var(--ig); background: #fdf2f7; }
.acct-tile:has(input[data-platform="youtube"]:checked) { border-color: var(--yt); background: #fef3f2; }
.acct-tile:has(input[data-platform="instagram"]:checked) .acct-check { background: var(--ig); border-color: var(--ig); }
.acct-tile:has(input[data-platform="youtube"]:checked) .acct-check { background: var(--yt); border-color: var(--yt); }

.composer-bar { position: sticky; bottom: 16px; z-index: 15; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 18px; background: rgba(255,255,255,.97); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 12px 32px rgba(14,23,38,.14); }
.bar-summary { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .88rem; color: var(--ink-2); }
.bar-dests { display: flex; flex-wrap: wrap; gap: 6px; }
.bar-dest { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--sunken); max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-todo { display: inline-flex; padding: 3px 10px; border-radius: 999px; border: 1px dashed var(--border-strong); color: var(--muted); }
.bar-when { font-weight: 600; color: var(--ink); white-space: nowrap; }
.composer-bar [data-submit]:not(.is-ready) { opacity: .75; box-shadow: none; }
.shake { animation: shake .4s; }
@keyframes shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.preview-note { margin: 0; max-width: 240px; }
@media (max-width: 900px) {
  .composer-bar { position: fixed; left: 0; right: 0; bottom: 0; border-radius: 0; border-width: 1px 0 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(14,23,38,.08); }
  .bar-cancel, .bar-dests, .bar-todo, .bar-count { display: none; }
  .composer-bar [data-submit] { padding: 11px 18px; }
  .media-tile { flex-wrap: wrap; }
  .cover-actions { width: 100%; justify-content: flex-start; padding-left: 68px; }
}
label.btn { flex-direction: row; }
.seg-block .seg-option span { width: 100%; }
.bar-count { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--sunken); white-space: nowrap; }
.bar-count .dot + .dot { margin-left: -9px; box-shadow: 0 0 0 2px var(--sunken); }

/* =====================================================================
   Liquid Glass (iOS 26 style)
   - vivid wallpaper behind everything
   - clear glass: low tint, heavy blur + saturation, bright specular rim
   - floating chrome (sidebar, tab bar, action bar, toasts, controls) also
     refracts what's behind it via an SVG displacement filter (#lg-refract)
   - capsule controls, concentric corners
   Solid fallbacks at the end for "Reduce transparency".
   ===================================================================== */
:root {
  --lg-tint: rgba(255, 255, 255, 0.42);
  --lg-tint-strong: rgba(255, 255, 255, 0.62);
  --lg-blur: blur(28px) saturate(200%) brightness(1.06);
  --lg-blur-light: blur(14px) saturate(220%) brightness(1.08);
  --lg-shadow: 0 8px 32px rgba(31, 38, 70, 0.12), 0 1.5px 4px rgba(31, 38, 70, 0.08);
  --lg-shadow-float: 0 18px 50px rgba(31, 38, 70, 0.22), 0 3px 10px rgba(31, 38, 70, 0.1);
  --lg-inner: inset 0 1px 1px rgba(255, 255, 255, 0.95), inset 0 -1px 1px rgba(255, 255, 255, 0.35), inset 0 0 18px rgba(255, 255, 255, 0.28);
  --border: rgba(31, 38, 70, 0.1);
  --sunken: rgba(31, 38, 70, 0.06);
}
.lg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Wallpaper ---------- */
html { background: #e9e4f2; }
body { background: transparent; }
body::before {
  content: ""; position: fixed; inset: -20%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(32% 30% at 82% 10%, rgba(255, 112, 67, 0.75), transparent 70%),
    radial-gradient(30% 34% at 12% 22%, rgba(255, 196, 92, 0.6), transparent 70%),
    radial-gradient(36% 34% at 30% 78%, rgba(124, 108, 255, 0.55), transparent 70%),
    radial-gradient(30% 30% at 88% 72%, rgba(46, 197, 182, 0.45), transparent 70%),
    radial-gradient(28% 28% at 55% 40%, rgba(255, 95, 162, 0.42), transparent 70%),
    linear-gradient(160deg, #f6efe8, #ece6f6 55%, #e3eef3);
  filter: blur(30px) saturate(1.1);
}
.app, .app-main { background: transparent; }

/* ---------- Glass recipe ----------
   .surface  = clear glass panel (cards, lists)       – blur only (keeps text crisp)
   .liquid   = floating glass (chrome + controls)     – blur + refraction
   Both get a specular rim drawn by ::after (a masked gradient ring). */
.card, .panel, .cal, .agenda-list, .table-wrap, .feature, .todo, .relay-src, .relay-dest, .rail-empty, .details-empty,
.media-tile, .acct-tile, .tile-connect, .drop-zone, .menu-panel, .tile,
.sidebar, .tabbar, .composer-bar, .flash, .mobilebar, .topbar, .hstat, .seg, .preview-tabs, .tabs a, .chip, .btn:not(.btn-ghost), .dest,
.demo-banner, .bar-dest, .bar-count, .bar-todo {
  isolation: isolate;
  background: var(--lg-tint);
  -webkit-backdrop-filter: var(--lg-blur); backdrop-filter: var(--lg-blur);
  border: 0;
  box-shadow: var(--lg-inner), var(--lg-shadow);
}
.card::after, .panel::after, .cal::after, .agenda-list::after, .table-wrap::after, .feature::after, .todo::after, .rail-empty::after,
.media-tile::after, .acct-tile::after, .tile-connect::after, .menu-panel::after, .tile::after,
.sidebar::after, .tabbar::after, .composer-bar::after, .flash::after, .mobilebar::after, .hstat::after,
.seg::after, .preview-tabs::after, .tabs a::after, .chip::after, .btn:not(.btn-ghost)::after, .dest::after, .details-empty::after, .relay-src::after, .relay-dest::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.25) 28%, rgba(255, 255, 255, 0.08) 55%, rgba(255, 255, 255, 0.55) 85%, rgba(255, 255, 255, 0.9) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
/* Things that aren't already fixed/sticky/absolute need a box for the rim. */
.card, .panel, .cal, .agenda-list, .table-wrap, .feature, .todo, .relay-src, .relay-dest, .rail-empty, .details-empty,
.media-tile, .acct-tile, .tile-connect, .drop-zone, .tile, .hstat, .seg, .preview-tabs, .tabs a, .chip, .btn, .dest,
.demo-banner, .bar-dest, .bar-count, .bar-todo { position: relative; }
/* Refraction layer for floating chrome (Chromium bends the backdrop; other browsers just blur). */
.sidebar::before, .tabbar::before, .composer-bar::before, .flash::before, .hstat::before, .mobilebar::before, .btn-accent::before, .btn-primary::before, .seg::before, .tabs a.active::before, .chip.is-on::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  filter: url(#lg-refract);
}

/* Corners: generous and concentric */
.card, .panel, .cal { border-radius: 26px; }
.agenda-list, .table-wrap { border-radius: 22px; }
.media-tile, .acct-tile, .tile-connect, .todo, .details-empty, .rail-empty { border-radius: 18px; }
.media-thumb { border-radius: 12px; }
.drop-zone { border-radius: 20px; background: rgba(255, 255, 255, 0.3); outline: 1.5px dashed rgba(31, 38, 70, 0.22); outline-offset: -10px; }
.drop-zone:hover, .drop-zone.over { background: rgba(255, 255, 255, 0.55); outline-color: var(--accent); }
.panel-bad { background: rgba(255, 236, 232, 0.55); }
.post-item { border-top-color: rgba(31, 38, 70, 0.07); }
.post-item:hover { background: rgba(255, 255, 255, 0.35); }
.cal-head { background: rgba(255, 255, 255, 0.25); border-bottom-color: rgba(31, 38, 70, 0.07); }
.cal-cell { border-color: rgba(31, 38, 70, 0.07); }
.cal-out { background: rgba(255, 255, 255, 0.12); }
.cal-past { background: transparent; }
.cal-chip { background: rgba(255, 255, 255, 0.6); border-radius: 10px; box-shadow: inset 0 1px 1px #fff, 0 2px 6px rgba(31, 38, 70, 0.08); }
.cal-attention { background: rgba(255, 228, 224, 0.75); }
.table th { background: rgba(255, 255, 255, 0.25); }
.table th, .table td { border-bottom-color: rgba(31, 38, 70, 0.07); }
.dest-content, .codes { background: rgba(255, 255, 255, 0.4); border-radius: 16px; box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.8); }
.acct-tile:has(input[data-platform="instagram"]:checked) { background: rgba(255, 214, 234, 0.55); box-shadow: var(--lg-inner), 0 0 0 2px var(--ig), var(--lg-shadow); }
.acct-tile:has(input[data-platform="youtube"]:checked) { background: rgba(255, 214, 210, 0.55); box-shadow: var(--lg-inner), 0 0 0 2px var(--yt), var(--lg-shadow); }

/* ---------- Floating sidebar (iPadOS 26 style) ---------- */
.app { grid-template-columns: 268px minmax(0, 1fr); }
.sidebar {
  top: 14px; margin: 14px 0 14px 14px; height: calc(100vh - 28px); border-radius: 30px;
  background: rgba(255, 255, 255, 0.34); color: var(--ink-2);
  box-shadow: var(--lg-inner), var(--lg-shadow-float);
  padding: 20px 12px 12px;
}
.side-brand img { filter: none; }
.side-nav a { color: var(--ink-2); border-radius: 999px; padding: 10px 14px; }
.side-nav a:hover { background: rgba(255, 255, 255, 0.4); color: var(--ink); }
.side-nav a.active { background: rgba(255, 255, 255, 0.78); color: var(--ink); box-shadow: inset 0 1px 1px #fff, 0 4px 14px rgba(31, 38, 70, 0.12); }
.side-nav a.active::before { display: none; }
.side-nav a.active .icon { color: var(--accent); }
.side-user { color: var(--ink); border-radius: 999px; }
.side-user:hover, .side-user-menu[open] .side-user { background: rgba(255, 255, 255, 0.45); }
.side-user-text span { color: var(--muted); }
.side-user > .icon { color: var(--muted); }
.side-new { border-radius: 999px; }

/* ---------- Mobile: floating top bar and tab bar ---------- */
.mobilebar { margin: 10px 12px 0; border-radius: 999px; padding: 8px 8px 8px 18px; top: 10px; box-shadow: var(--lg-inner), var(--lg-shadow-float); }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .demo-banner, .app-main .demo-banner { margin: 10px 12px 0; border-radius: 18px; }
  .tabbar { left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.36); box-shadow: var(--lg-inner), var(--lg-shadow-float); justify-content: space-between; align-items: center; }
  .tabbar a { border-radius: 999px; padding: 6px 10px; min-width: 0; flex: 1; }
  .tabbar a.active { background: rgba(255, 255, 255, 0.75); box-shadow: inset 0 1px 1px #fff, 0 3px 10px rgba(31, 38, 70, 0.14); }
  .tabbar .tab-new { flex: none; width: 50px; height: 50px; margin: 0 4px; border-radius: 999px; }
  .app:not(.no-tabbar) .app-main { padding-bottom: 104px; }
  .composer-bar { left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); border-radius: 999px; padding: 8px 8px 8px 20px; }
  .no-tabbar .app-main { padding-bottom: 100px; }
  .flash { bottom: calc(96px + env(safe-area-inset-bottom)); border-radius: 22px; }
}

/* ---------- Hero: vivid content with glass on top ---------- */
.hello {
  background:
    radial-gradient(60% 90% at 100% 0%, rgba(255, 196, 92, 0.85), transparent 60%),
    radial-gradient(70% 90% at 0% 100%, rgba(124, 108, 255, 0.9), transparent 60%),
    linear-gradient(125deg, #ff6a3d 0%, #ff4f8b 45%, #8a5cff 100%);
  border-radius: 30px; border: 0;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), var(--lg-shadow-float);
}
.hello h1, .hello-date, .hello-next { text-shadow: 0 1px 12px rgba(80, 20, 60, 0.25); }
.hello-date { color: rgba(255, 255, 255, 0.85); }
.hello-next { color: rgba(255, 255, 255, 0.95); }
.hello-next a { text-decoration-color: rgba(255, 255, 255, 0.8); }
.hstat { background: rgba(40, 10, 60, 0.14); border-radius: 22px; box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.7), inset 0 0 16px rgba(255, 255, 255, 0.12), 0 8px 24px rgba(80, 20, 60, 0.15); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }
.hstat:hover { background: rgba(40, 10, 60, 0.22); }
.hstat-label { color: rgba(255, 255, 255, 0.9); }
.hstat-bad { background: rgba(120, 10, 30, 0.22); }
.hstat-value, .hstat-label { text-shadow: 0 1px 8px rgba(60, 10, 50, 0.3); }
.hello .btn.btn-accent { background: rgba(255, 255, 255, 0.92); color: var(--accent-ink); }
.hello .btn-accent .icon { color: var(--accent); }
.hello .btn.btn-glass { background: rgba(255, 255, 255, 0.2); color: #fff; }

/* ---------- Toasts: light glass capsule ---------- */
.flash { background: rgba(255, 255, 255, 0.5); color: var(--ink); border-radius: 22px; box-shadow: var(--lg-inner), var(--lg-shadow-float); }
.flash .icon { color: var(--good); }
.flash-close { color: var(--ink); }
.flash-close:hover { background: rgba(31, 38, 70, 0.08); }

/* ---------- Action bar ---------- */
.composer-bar { border-radius: 999px; background: rgba(255, 255, 255, 0.4); box-shadow: var(--lg-inner), var(--lg-shadow-float); padding: 8px 8px 8px 22px; }
.bar-dest, .bar-count, .bar-todo { background: rgba(255, 255, 255, 0.45); box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.9); -webkit-backdrop-filter: none; backdrop-filter: none; }
.bar-todo { border: 0; }

/* ---------- Controls: capsules ---------- */
.btn { border-radius: 999px; border: 0; color: var(--ink); background: rgba(255, 255, 255, 0.5); -webkit-backdrop-filter: var(--lg-blur-light); backdrop-filter: var(--lg-blur-light); box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.95), 0 2px 8px rgba(31, 38, 70, 0.1); }
.btn:not(.btn-ghost):hover { background: rgba(255, 255, 255, 0.72); }
.btn:active { transform: scale(0.97); }
.btn-ghost { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.45); }
.btn.btn-primary { background: rgba(14, 23, 38, 0.82); color: #fff; box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35), 0 6px 18px rgba(14, 23, 38, 0.25); }
.btn.btn-primary:hover { background: rgba(14, 23, 38, 0.9); }
.btn.btn-accent { background: rgba(242, 84, 45, 0.88); color: #fff; box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.55), inset 0 0 14px rgba(255, 255, 255, 0.18), 0 8px 22px rgba(242, 84, 45, 0.38); }
.btn.btn-accent:hover { background: rgba(242, 84, 45, 0.96); }
.btn-danger { color: var(--bad); }
.btn-icon { border-radius: 999px; }
.btn.btn-icon.is-on { background: rgba(14, 23, 38, 0.82); color: #fff; }
input, select, textarea {
  background: rgba(255, 255, 255, 0.5); border: 0; border-radius: 16px;
  -webkit-backdrop-filter: var(--lg-blur-light); backdrop-filter: var(--lg-blur-light);
  box-shadow: inset 0 1px 3px rgba(31, 38, 70, 0.1), inset 0 -1px 1px rgba(255, 255, 255, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.6);
}
input:focus, select:focus, textarea:focus { background: rgba(255, 255, 255, 0.82); box-shadow: inset 0 1px 3px rgba(31, 38, 70, 0.08), 0 0 0 3px rgba(242, 84, 45, 0.25); }
input[type="checkbox"], input[type="radio"] { -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
.seg, .preview-tabs { border-radius: 999px; padding: 4px; background: rgba(255, 255, 255, 0.3); }
.seg-option span, .preview-tabs button { border-radius: 999px; }
.seg-option input:checked + span, .preview-tabs button.is-on { background: rgba(255, 255, 255, 0.9); color: var(--ink); box-shadow: inset 0 1px 1px #fff, 0 4px 14px rgba(31, 38, 70, 0.16); }
.tabs a, .chip { border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.42); color: var(--ink-2); }
.tabs a.active, .chip.is-on, .chip.is-on:hover { background: rgba(14, 23, 38, 0.82); color: #fff; }
.badge { -webkit-backdrop-filter: blur(10px) saturate(180%); backdrop-filter: blur(10px) saturate(180%); }
.badge-neutral, .badge-muted, .count { background: rgba(255, 255, 255, 0.55); }
.badge-good { background: rgba(220, 245, 230, 0.75); } .badge-bad { background: rgba(255, 228, 224, 0.8); }
.badge-info { background: rgba(225, 233, 255, 0.8); } .badge-warn { background: rgba(255, 240, 205, 0.8); }
.switch-ui { background: rgba(31, 38, 70, 0.18); box-shadow: inset 0 1px 3px rgba(31, 38, 70, 0.2); }
.switch input:checked + .switch-ui { background: #34c759; }
.switch-ui::after { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2), inset 0 1px 1px #fff; }
.demo-banner, .app-main .demo-banner { background: rgba(255, 236, 190, 0.45); border: 0; margin: 14px 24px 0; border-radius: 999px; box-shadow: var(--lg-inner); }
.menu-panel { background: rgba(255, 255, 255, 0.55); border-radius: 22px; box-shadow: var(--lg-inner), var(--lg-shadow-float); }
.menu-panel a, .menu-panel button { border-radius: 12px; }
.menu-panel a:hover, .menu-panel button:hover { background: rgba(255, 255, 255, 0.6); }
.menu-head { border-bottom-color: rgba(31, 38, 70, 0.08); }
.avatar { box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), 0 2px 8px rgba(31, 38, 70, 0.2); }
.dest { background: rgba(255, 255, 255, 0.55); }

/* ---------- Media ---------- */
.pcard-media { border-radius: 24px; box-shadow: 0 14px 34px rgba(31, 38, 70, 0.2); }
.pcard-media::after { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25), inset 0 1.5px 1px rgba(255, 255, 255, 0.5); }
.badge-glass { background: rgba(255, 255, 255, 0.22); color: #fff; -webkit-backdrop-filter: blur(12px) saturate(180%); backdrop-filter: blur(12px) saturate(180%); box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5); }
.badge-glass.badge-bad { background: rgba(220, 38, 38, 0.6); }
.phone { border-radius: 44px; background: rgba(20, 24, 34, 0.9); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.25), inset 0 1.5px 1px rgba(255, 255, 255, 0.4), var(--lg-shadow-float); }
.phone-screen { border-radius: 36px; }
.thumb { border-radius: 10px; }

/* ---------- Public + auth ---------- */
.topbar { margin: 10px 14px 0; border-radius: 999px; top: 10px; }
.site-footer, .band { background: rgba(255, 255, 255, 0.25); -webkit-backdrop-filter: var(--lg-blur); backdrop-filter: var(--lg-blur); border: 0; }
.auth-aside { margin: 14px; border-radius: 32px; }
.cta-inner { border-radius: 30px; }

/* ---------- Accessibility & fallbacks ---------- */
@media (prefers-reduced-transparency: reduce) {
  body::before { filter: none; opacity: 0.35; }
  .card, .panel, .cal, .agenda-list, .table-wrap, .feature, .todo, .media-tile, .acct-tile, .tile-connect, .menu-panel, .tile,
  .sidebar, .tabbar, .composer-bar, .flash, .mobilebar, .topbar, .seg, .preview-tabs, .tabs a, .chip, .btn:not(.btn-ghost):not(.btn-primary):not(.btn-accent), .dest, input, select, textarea {
    background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .sidebar::before, .tabbar::before, .composer-bar::before, .flash::before, .hstat::before, .mobilebar::before, .btn-accent::before, .btn-primary::before, .seg::before, .tabs a.active::before, .chip.is-on::before { display: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card, .panel, .cal, .agenda-list, .table-wrap, .menu-panel, .sidebar, .mobilebar, .tabbar, .composer-bar, .flash { background: rgba(255, 255, 255, 0.92); }
}
.filters .search .icon { z-index: 1; }

/* ---------- Users page ---------- */
.users-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; margin-bottom: 20px; }
.users-side { display: flex; flex-direction: column; gap: 20px; }
.users-side .card, .people-card { margin: 0; }
.people-list { list-style: none; margin: 0; padding: 0; }
.person { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 14px 4px; border-top: 1px solid rgba(31, 38, 70, 0.07); }
.panel .person { padding: 12px 20px; }
.people-list > .person:first-child { border-top: 0; }
.person.is-disabled { opacity: 0.55; }
.person-avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-family: var(--display); font-weight: 600; box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), 0 4px 12px rgba(31, 38, 70, 0.15); flex: none; }
.av-0 { background: linear-gradient(135deg, #ff7a45, #f2542d); } .av-1 { background: linear-gradient(135deg, #8a5cff, #5b3fd9); }
.av-2 { background: linear-gradient(135deg, #2ec5b6, #138a7f); } .av-3 { background: linear-gradient(135deg, #ff5fa2, #d6336c); }
.av-4 { background: linear-gradient(135deg, #3b82f6, #1f4fd1); } .av-5 { background: linear-gradient(135deg, #f59f00, #d97706); }
.person-name { display: flex; align-items: center; gap: 8px; color: var(--ink); min-width: 0; }
.person-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.you-chip { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: rgba(242, 84, 45, 0.14); color: var(--accent-ink); }
.person-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 0.78rem; font-weight: 500; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.55); color: var(--ink-2); box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.9), 0 0 0 1px rgba(31, 38, 70, 0.06); }
.tag .icon { width: 13px; height: 13px; }
.tag-admin { background: rgba(14, 23, 38, 0.82); color: #fff; box-shadow: none; }
.tag-good { color: var(--good); } .tag-warn { color: var(--warn); }
.person-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.person-menu { position: relative; }
.person-menu > summary { list-style: none; }
.person-menu > summary::-webkit-details-marker { display: none; }
.person-menu .menu-panel { right: 0; top: calc(100% + 6px); width: 250px; }
.person-menu .menu-panel form { border: 0; margin: 0; padding: 0; }
.person-menu .menu-panel form button { color: var(--text); }
.person-menu .menu-panel button.danger { color: var(--bad); }
.role-cards { display: grid; gap: 8px; }
.role-card { flex-direction: row; align-items: flex-start; gap: 12px; padding: 12px; border-radius: 16px; cursor: pointer; font-weight: 400; background: rgba(255, 255, 255, 0.4); box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.9), 0 0 0 1px rgba(31, 38, 70, 0.08); position: relative; }
.role-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.role-card > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.role-card b { color: var(--ink); }
.role-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(31, 38, 70, 0.06); color: var(--ink-2); flex: none; }
.role-card:has(input:checked) { background: rgba(255, 255, 255, 0.85); box-shadow: inset 0 1px 1px #fff, 0 0 0 2px var(--accent), 0 6px 18px rgba(242, 84, 45, 0.15); }
.role-card:has(input:checked) .role-ic { background: var(--accent); color: #fff; }
.role-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.modes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.modes li { display: flex; gap: 10px; align-items: flex-start; opacity: 0.65; }
.modes li > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.modes li.is-current { opacity: 1; }
.mode-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: rgba(31, 38, 70, 0.2); flex: none; }
.modes li.is-current .mode-dot { background: #34c759; box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.18); }
.events { list-style: none; margin: 0; padding: 0; }
.event { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(31, 38, 70, 0.06); }
.events > .event:first-child { border-top: 0; }
.event-ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.event-ic .icon { width: 16px; height: 16px; }
.tone-good { background: rgba(52, 199, 89, 0.14); color: var(--good); }
.tone-bad { background: rgba(220, 38, 38, 0.12); color: var(--bad); }
.tone-warn { background: rgba(245, 159, 0, 0.16); color: var(--warn); }
.tone-info { background: rgba(59, 130, 246, 0.13); color: var(--info); }
.tone-muted { background: rgba(31, 38, 70, 0.06); color: var(--muted); }
.event-text { font-size: 0.92rem; color: var(--ink-2); overflow-wrap: anywhere; }
.event-text b { color: var(--ink); font-weight: 600; }
.event-meta { white-space: nowrap; }
.link-card { margin-bottom: 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--lg-inner), 0 0 0 2px rgba(52, 199, 89, 0.5), var(--lg-shadow); }
.link-head { display: flex; gap: 14px; align-items: flex-start; }
.link-head h2 { margin: 0 0 2px; }
.link-head p { margin: 0; }
.link-ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #34c759; color: #fff; flex: none; }
.copy-row { display: flex; gap: 10px; }
.copy-row input { flex: 1; }
@media (max-width: 1100px) { .users-layout { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .person { grid-template-columns: auto minmax(0, 1fr) auto; }
  .person-side { grid-column: 2; grid-row: 2; flex-direction: row; align-items: center; justify-content: flex-start; text-align: left; flex-wrap: wrap; }
  .person-menu, .person-act { grid-column: 3; grid-row: 1; }
  .event { grid-template-columns: auto minmax(0, 1fr); }
  .event-meta { grid-column: 2; }
  .copy-row { flex-direction: column; }
}
.mode-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mode-title .badge { padding: 1px 8px; }

/* Review fixes */
/* Menus sit over busy content: keep them glassy but readable. */
.menu-panel { background: rgba(255, 255, 255, 0.86); -webkit-backdrop-filter: blur(40px) saturate(180%); backdrop-filter: blur(40px) saturate(180%); }
/* Public pages: the pill is the bar itself; the demo notice sits under it. */
.topbar { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; margin: 10px 14px 0; border-radius: 0; }
.topbar::after { display: none; }
.topbar .topbar-inner { position: relative; isolation: isolate; background: rgba(255, 255, 255, 0.5); -webkit-backdrop-filter: var(--lg-blur); backdrop-filter: var(--lg-blur); border-radius: 999px; padding: 0 12px 0 24px; min-height: 60px; box-shadow: var(--lg-inner), var(--lg-shadow); }
.topbar .demo-banner { margin: 8px auto 0; max-width: 1080px; }
/* Signed-in devices */
.device { display: flex; gap: 12px; align-items: flex-start; }
.device > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.device-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(31, 38, 70, 0.06); color: var(--ink-2); flex: none; }
.device .badge { margin-left: 6px; padding: 1px 8px; }
/* Bars that contain pop-up menus must not be a "backdrop root", or the menu can't blur the page
   behind it. Their frost lives on the ::before layer instead. */
.mobilebar, .sidebar { -webkit-backdrop-filter: none; backdrop-filter: none; }
.mobilebar::before, .sidebar::before { -webkit-backdrop-filter: blur(28px) saturate(200%) brightness(1.06); backdrop-filter: blur(28px) saturate(200%) brightness(1.06); }

/* ---------- Users page v2: people grid, then invite | activity ---------- */
.people-card { margin-bottom: 20px; }
.user-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.user-tile { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 20px; background: rgba(255, 255, 255, 0.5); box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.95), 0 0 0 1px rgba(31, 38, 70, 0.06), 0 6px 18px rgba(31, 38, 70, 0.06); min-width: 0; }
.user-tile.is-disabled { opacity: 0.6; }
.ut-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ut-id { flex: 1; min-width: 0; }
.user-tile .person-tags { margin: 0; }
.ut-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 10px 0 0; border-top: 1px solid rgba(31, 38, 70, 0.07); }
.ut-stats div { min-width: 0; }
.ut-stats dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; }
.ut-stats dd { margin: 2px 0 0; font-family: var(--display); font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ut-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.users-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; align-items: stretch; }
.users-row > .card { margin: 0; }
.invite-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.role-cards { grid-template-columns: 1fr 1fr; }
.signup-note { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 0; padding-top: 14px; border-top: 1px solid rgba(31, 38, 70, 0.07); }
.signup-note .mode-dot { background: #34c759; box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.18); }
.activity-card { display: flex; flex-direction: column; min-height: 0; }
/* Activity scrolls inside the card so the two cards stay the same height. */
.activity-card .events-scroll { flex: 1 1 0; min-height: 240px; overflow-y: auto; margin: 0 -8px; padding: 0 8px; scrollbar-width: thin; -webkit-mask: linear-gradient(#000 calc(100% - 28px), transparent); mask: linear-gradient(#000 calc(100% - 28px), transparent); }
@media (max-width: 1100px) {
  .users-row { grid-template-columns: 1fr; }
  .activity-card .events-scroll { flex: none; max-height: 420px; }
}
@media (max-width: 640px) {
  .invite-fields, .role-cards { grid-template-columns: 1fr; }
}
/* New post: the preview column runs the full height of the form, so the phone stays in view while scrolling. */
.composer-side { align-self: stretch; }
.composer-side .sticky { position: sticky; top: 20px; }
@media (max-width: 980px) { .composer-side { align-self: auto; } .composer-side .sticky { position: static; } }

/* ---------- Edit / Post now / Drafts / Week view ---------- */
.post-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.post-actions form { margin: 0; }
.acct-tile.is-locked { cursor: not-allowed; opacity: 0.8; background: rgba(255, 255, 255, 0.3); }
.acct-check.is-lock { color: var(--muted); border-color: transparent; background: rgba(31, 38, 70, 0.06); }
.bar-draft { white-space: nowrap; }
.draft-card .pcard-body { gap: 8px; }
.draft-actions { display: flex; gap: 6px; align-items: center; }
.draft-actions form { margin: 0; }
.tabs a .icon { width: 15px; height: 15px; }

/* Month / Week switch */
.cal-views { padding: 3px; }
.seg-link { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 0.88rem; }
.seg-link:hover { color: var(--ink); }
.seg-link.is-on { background: rgba(255, 255, 255, 0.9); color: var(--ink); box-shadow: inset 0 1px 1px #fff, 0 4px 14px rgba(31, 38, 70, 0.16); }
.cal-nav { flex-wrap: wrap; justify-content: flex-end; }

/* Week board: seven glass columns, posts as cards in time order */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
.wk-day { position: relative; isolation: isolate; display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 420px; padding: 10px; border-radius: 22px;
  background: rgba(255, 255, 255, 0.38); -webkit-backdrop-filter: var(--lg-blur); backdrop-filter: var(--lg-blur); box-shadow: var(--lg-inner), var(--lg-shadow); }
.wk-day.is-past { background: rgba(255, 255, 255, 0.2); }
.wk-day.is-today { box-shadow: var(--lg-inner), 0 0 0 2px var(--accent), var(--lg-shadow); }
.wk-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px; }
.wk-dow { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.wk-num { font-family: var(--display); font-weight: 600; font-size: 1.15rem; color: var(--ink); }
.wk-day.is-today .wk-num { background: var(--accent); color: #fff; border-radius: 999px; padding: 0 9px; }
.wk-day.is-past .wk-num { color: var(--faint); }
.wk-count { margin-left: auto; font-size: 0.74rem; font-weight: 700; color: var(--ink-2); background: rgba(31, 38, 70, 0.07); border-radius: 999px; padding: 1px 8px; }
.wk-list { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.wk-card { display: flex; gap: 8px; padding: 6px; border-radius: 14px; text-decoration: none; color: inherit; background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 1px #fff, 0 2px 8px rgba(31, 38, 70, 0.08); border-left: 3px solid var(--faint); transition: transform 0.15s, box-shadow 0.15s; min-width: 0; }
.wk-card:hover { transform: translateY(-1px); box-shadow: inset 0 1px 1px #fff, 0 6px 16px rgba(31, 38, 70, 0.14); }
.wk-card.cal-scheduled { border-left-color: var(--accent); }
.wk-card.cal-progress { border-left-color: var(--info); }
.wk-card.cal-published { border-left-color: var(--good); }
.wk-card.cal-attention { border-left-color: var(--bad); background: rgba(255, 236, 232, 0.85); }
.wk-card.cal-cancelled { opacity: 0.5; }
.wk-thumb { flex: none; width: 40px; height: 70px; border-radius: 9px; overflow: hidden; background: #0b0f17; }
.wk-thumb > * { width: 100%; height: 100%; object-fit: cover; display: block; }
.wk-thumb .icon { display: none; }
.wk-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.wk-time { font-size: 0.74rem; font-weight: 700; color: var(--ink-2); }
.wk-title { font-size: 0.84rem; font-weight: 600; color: var(--ink); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.wk-meta { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; margin-top: auto; }
.wk-meta .pf-sm { width: 18px; height: 18px; border-radius: 6px; }
.wk-meta .pf-sm .icon { width: 11px; height: 11px; }
.wk-meta .badge { font-size: 0.66rem; padding: 1px 7px 1px 6px; }
.wk-add { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 6px; border-radius: 14px; font-size: 0.8rem; font-weight: 600; color: var(--muted); text-decoration: none;
  outline: 1.5px dashed rgba(31, 38, 70, 0.18); outline-offset: -1.5px; }
.wk-add:hover { color: var(--accent-ink); outline-color: var(--accent); background: rgba(255, 255, 255, 0.5); }
.wk-add .icon { width: 15px; height: 15px; }
.wk-empty { text-align: center; padding: 8px 0; }
@media (max-width: 1200px) { .wk-meta .badge { display: none; } }
@media (max-width: 1000px) {
  .week { grid-template-columns: 1fr; }
  .wk-day { min-height: 0; flex-direction: row; align-items: flex-start; }
  .wk-head { flex-direction: column; align-items: center; gap: 0; width: 46px; flex: none; padding-top: 4px; }
  .wk-count { margin: 4px 0 0; }
  .wk-list { flex-direction: row; flex-wrap: wrap; }
  .wk-card { flex: 1 1 220px; }
  .wk-add { flex: 1 1 140px; }
  .wk-meta .badge { display: inline-flex; }
}
@media (max-width: 900px) {
  .bar-draft { padding: 10px 12px; }
  .bar-draft .icon { display: none; }
}
/* Week cards: the coloured edge shows status on wide screens; the pill only when there's room (stacked layout). */
.wk-meta .badge { display: none; }
@media (max-width: 1000px) { .wk-meta .badge { display: inline-flex; } }
@media (max-width: 760px) {
  .cal-nav { justify-content: space-between; }
  .cal-nav .cal-views { flex-basis: 100%; justify-content: center; }
  .cal-nav .cal-views .seg-link { flex: 1; justify-content: center; }
  .cal-nav .cal-month { flex: 1; min-width: 0; font-size: 0.98rem; }
}

/* ---------- Week time grid (wide screens) ---------- */
.wgrid { display: grid; grid-template-columns: 64px repeat(7, minmax(0, 1fr)); position: relative; isolation: isolate; border-radius: 26px; overflow: hidden;
  background: rgba(255, 255, 255, 0.42); -webkit-backdrop-filter: var(--lg-blur); backdrop-filter: var(--lg-blur); box-shadow: var(--lg-inner), var(--lg-shadow); }
.week { display: none; }
.wg-corner, .wg-dayhead { position: sticky; top: 0; z-index: 3; background: rgba(255, 255, 255, 0.78); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); border-bottom: 1px solid rgba(31, 38, 70, 0.08); }
.wg-dayhead { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px; border-left: 1px solid rgba(31, 38, 70, 0.06); }
.wg-dayhead.is-today .wk-num { background: var(--accent); color: #fff; border-radius: 999px; padding: 0 9px; }
.wg-dayhead.is-past .wk-num { color: var(--faint); }
.wg-hour { padding: 6px 10px 0 0; text-align: right; font-size: 0.72rem; font-weight: 600; color: var(--muted); white-space: nowrap; border-top: 1px solid rgba(31, 38, 70, 0.06); }
.wg-cell { position: relative; min-height: 54px; padding: 4px; display: flex; flex-direction: column; gap: 4px; border-top: 1px solid rgba(31, 38, 70, 0.06); border-left: 1px solid rgba(31, 38, 70, 0.06); min-width: 0; }
.wg-cell.is-today { background: rgba(242, 84, 45, 0.045); }
.wg-cell.is-past { background: rgba(31, 38, 70, 0.025); }
.wg-cell.is-today.is-past { background: rgba(242, 84, 45, 0.03); }
.wg-add { position: absolute; inset: 0; display: grid; place-items: center; color: var(--accent-ink); opacity: 0; text-decoration: none; border-radius: 10px; transition: opacity 0.12s, background 0.12s; z-index: 0; }
.wg-cell:hover .wg-add, .wg-add:focus-visible { opacity: 1; background: rgba(242, 84, 45, 0.07); }
.wg-add .icon { width: 16px; height: 16px; }
.wg-post { position: relative; z-index: 1; display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 4px; border-radius: 10px; text-decoration: none; color: inherit; min-width: 0;
  background: rgba(255, 255, 255, 0.85); box-shadow: inset 0 1px 1px #fff, 0 2px 8px rgba(31, 38, 70, 0.1); border-left: 3px solid var(--faint); transition: transform 0.12s, box-shadow 0.12s; }
.wg-post:hover { transform: translateY(-1px); box-shadow: inset 0 1px 1px #fff, 0 6px 16px rgba(31, 38, 70, 0.16); }
.wg-post.cal-scheduled { border-left-color: var(--accent); }
.wg-post.cal-progress { border-left-color: var(--info); }
.wg-post.cal-published { border-left-color: var(--good); }
.wg-post.cal-attention { border-left-color: var(--bad); background: rgba(255, 236, 232, 0.92); }
.wg-post.cal-cancelled { opacity: 0.5; }
.wg-post.cal-cancelled .wg-title { text-decoration: line-through; }
.wg-thumb { flex: none; width: 22px; height: 38px; border-radius: 6px; overflow: hidden; background: #0b0f17; }
.wg-thumb > * { width: 100%; height: 100%; object-fit: cover; display: block; }
.wg-thumb .icon { display: none; }
.wg-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
.wg-time { font-size: 0.68rem; font-weight: 700; color: var(--ink-2); }
.wg-title { font-size: 0.78rem; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wg-pfs { display: flex; gap: 2px; flex: none; }
.wg-pfs .pf-sm { width: 16px; height: 16px; border-radius: 5px; }
.wg-pfs .pf-sm .icon { width: 10px; height: 10px; }
/* "Now" line, iOS style */
.wg-now { position: absolute; left: -4px; right: 0; height: 2px; background: var(--accent); z-index: 2; pointer-events: none; }
.wg-now::before { content: ""; position: absolute; left: -1px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
@media (max-width: 1500px) { .wg-pfs { display: none; } }
@media (max-width: 1000px) { .wgrid { display: none; } .week { display: grid; } }

/* ---------- Collapsible sidebar (desktop) ---------- */
.app { transition: grid-template-columns 0.25s ease; }
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-mark { display: none; }
.side-toggle { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; flex: none; transition: background 0.15s, color 0.15s; }
.side-toggle:hover { background: rgba(255, 255, 255, 0.6); color: var(--ink); }
.side-toggle .icon { width: 18px; height: 18px; transition: transform 0.25s; }
.side-new { gap: 8px; }

.app.sb-collapsed { grid-template-columns: 100px minmax(0, 1fr); }
.sb-collapsed .sidebar { padding: 18px 10px 12px; align-items: center; }
.sb-collapsed .side-top { flex-direction: column; gap: 10px; }
.sb-collapsed .side-brand { padding: 0; }
.sb-collapsed .side-brand > img:first-child { display: none; }
.sb-collapsed .side-mark { display: block; width: 34px; height: 34px; }
.sb-collapsed .side-toggle .icon { transform: scaleX(-1); }
.sb-collapsed .side-new { width: 48px; height: 48px; padding: 0; border-radius: 999px; }
.sb-collapsed .side-new span { display: none; }
.sb-collapsed .side-nav { align-items: center; width: 100%; }
.sb-collapsed .side-nav a { width: 48px; height: 48px; padding: 0; justify-content: center; position: relative; }
.sb-collapsed .side-nav a > span:not(.count) { display: none; }
.sb-collapsed .side-nav .count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; font-size: 0.68rem; padding: 0 5px; margin: 0; }
.sb-collapsed .side-user { padding: 6px; justify-content: center; }
.sb-collapsed .side-user-text, .sb-collapsed .side-user > .icon { display: none; }
.sb-collapsed .side-user-menu .menu-panel { left: 0; right: auto; width: 250px; }
/* Labels as glass tooltips when collapsed */
.sb-collapsed .side-nav a::after, .sb-collapsed .side-new::after {
  content: attr(data-label); position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%) translateX(-4px);
  white-space: nowrap; padding: 6px 12px; border-radius: 999px; font-size: 0.84rem; font-weight: 600; color: var(--ink);
  background: rgba(255, 255, 255, 0.9); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 1px #fff, 0 6px 18px rgba(31, 38, 70, 0.16); opacity: 0; pointer-events: none; transition: opacity 0.12s, transform 0.12s; z-index: 40;
}
.sb-collapsed .side-nav a:hover::after, .sb-collapsed .side-nav a:focus-visible::after, .sb-collapsed .side-new:hover::after, .sb-collapsed .side-new:focus-visible::after { opacity: 1; transform: translateY(-50%); }
/* .side-new already uses ::after for the glass rim; its tooltip wins only while collapsed. */
.sb-collapsed .side-new::after { inset: auto; padding: 6px 12px; -webkit-mask: none; mask: none; }
@media (prefers-reduced-motion: reduce) { .app { transition: none; } }
.side-brand .side-mark { display: none; }
.sb-collapsed .side-brand .side-mark { display: block; width: 34px; height: 34px; }
.sb-collapsed .side-brand > img:first-child { display: none; }

/* ---------- Settings (iOS-style grouped lists) ---------- */
.settings { display: grid; grid-template-columns: 210px minmax(0, 760px); gap: 28px; align-items: start; justify-content: center; }
.settings-nav { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 2px; padding: 8px; border-radius: 22px; isolation: isolate;
  background: rgba(255, 255, 255, 0.4); -webkit-backdrop-filter: var(--lg-blur); backdrop-filter: var(--lg-blur); box-shadow: var(--lg-inner), var(--lg-shadow); }
.settings-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 0.93rem; }
.settings-nav a:hover { background: rgba(255, 255, 255, 0.55); color: var(--ink); }
.settings-nav a.active { background: rgba(255, 255, 255, 0.9); color: var(--ink); box-shadow: inset 0 1px 1px #fff, 0 3px 10px rgba(31, 38, 70, 0.1); }
.settings-nav a.active .icon { color: var(--accent); }
.settings-nav .count { margin-left: auto; }
.nav-dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 3px rgba(245, 159, 0, 0.2); }
.settings-main { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.settings-main .card { margin: 0; }

.me-card { display: flex; align-items: center; gap: 20px; }
.me-avatar { width: 72px; height: 72px; font-size: 1.5rem; }
.me-id { min-width: 0; flex: 1; }
.me-id h1 { font-size: 1.5rem; margin: 0; }
.me-id p { margin: 2px 0 12px; overflow-wrap: anywhere; }
.sec-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.sec-check { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 6px; border-radius: 999px; font-size: 0.84rem; font-weight: 600; text-decoration: none;
  background: rgba(255, 255, 255, 0.6); box-shadow: inset 0 1px 1px #fff, 0 0 0 1px rgba(31, 38, 70, 0.06); color: var(--ink-2); }
.sec-dot { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.sec-dot .icon { width: 12px; height: 12px; stroke-width: 2.4; }
.sec-check.is-ok .sec-dot { background: #34c759; }
.sec-check.is-todo .sec-dot { background: #ff9f0a; }
.sec-check.is-todo { color: var(--warn); }

.set-group { scroll-margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.set-title { margin: 0 0 0 18px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-family: var(--body); }
.set-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.set-title-row form { margin: 0; }
.set-list { padding: 4px 0; overflow: hidden; }
.set-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-top: 1px solid rgba(31, 38, 70, 0.07); font-weight: 400; cursor: default; min-width: 0; }
.set-list > .set-row:first-of-type, .set-list > input + .set-row, .set-list > :first-child.set-row, .set-list > details:first-child > .set-row { border-top: 0; }
.set-row-top { align-items: flex-start; }
label.set-row { flex-direction: row; cursor: text; }
.set-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: rgba(31, 38, 70, 0.06); color: var(--ink-2); }
.set-ic.tone-good { background: rgba(52, 199, 89, 0.15); color: var(--good); }
.set-ic.tone-warn { background: rgba(245, 159, 0, 0.16); color: var(--warn); }
.set-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.set-label { font-size: 0.8rem; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.set-value { color: var(--ink); overflow-wrap: anywhere; }
.set-aside { flex: none; display: inline-flex; align-items: center; gap: 6px; }
.set-aside .icon { width: 14px; height: 14px; }
.set-input { margin-top: 2px; }
.set-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 20px 14px; border-top: 1px solid rgba(31, 38, 70, 0.07); flex-wrap: wrap; }
.set-form .set-foot { padding: 4px 0 0; border: 0; justify-content: space-between; }
.set-foot .muted .icon { width: 14px; height: 14px; }
.set-expand > summary { list-style: none; cursor: pointer; }
.set-expand > summary::-webkit-details-marker { display: none; }
.set-expand > summary:hover { background: rgba(255, 255, 255, 0.35); }
.set-expand[open] > summary .set-aside .icon, .set-expand[open] > summary > .set-aside > .icon { transform: rotate(180deg); }
.set-expand + .set-expand > summary, .set-row + .set-expand > summary { border-top: 1px solid rgba(31, 38, 70, 0.07); }
.set-form { padding: 6px 20px 18px 68px; }
.set-note { margin: 0 0 0 18px; }
.tz-detect { align-self: flex-start; color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.tz-detect:hover { text-decoration: underline; }
.strength { display: block; height: 6px; border-radius: 999px; background: rgba(31, 38, 70, 0.08); overflow: hidden; margin-top: 4px; }
.strength-bar { display: block; height: 100%; width: 0; border-radius: inherit; transition: width 0.2s, background 0.2s; }
.strength[data-score="1"] .strength-bar { width: 25%; background: var(--bad); }
.strength[data-score="2"] .strength-bar { width: 50%; background: #ff9f0a; }
.strength[data-score="3"] .strength-bar { width: 75%; background: #30b0c7; }
.strength[data-score="4"] .strength-bar { width: 100%; background: #34c759; }
.twofa-off { display: flex; gap: 18px; align-items: flex-start; background: linear-gradient(135deg, rgba(255, 244, 230, 0.75), rgba(255, 255, 255, 0.5)); box-shadow: var(--lg-inner), 0 0 0 1.5px rgba(255, 159, 10, 0.45), var(--lg-shadow); }
.twofa-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(135deg, #ffb340, #ff7a1a); box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), 0 6px 16px rgba(255, 122, 26, 0.3); }
.twofa-ic .icon { width: 26px; height: 26px; }
.twofa-copy h3 { margin: 0 0 4px; font-size: 1.1rem; }
.twofa-copy p { margin: 0 0 12px; }
.twofa-copy form { margin: 0 0 6px; }
@media (max-width: 980px) {
  .settings { grid-template-columns: 1fr; }
  .settings-nav { display: none; }
}
@media (max-width: 640px) {
  .me-card { flex-direction: column; align-items: flex-start; }
  .set-row { padding: 12px 16px; }
  .set-form { padding: 6px 16px 16px; }
  .set-aside.muted { display: none; }
  .twofa-off { flex-direction: column; }
}
/* settings fixes */
.set-label { flex-direction: row; justify-content: flex-start; text-align: left; }
.set-list > .set-row:first-of-type { border-top: 1px solid rgba(31, 38, 70, 0.07); }
.set-list > input[type="hidden"] + .set-row, .set-list > .set-row:first-child, .set-list > details:first-child > .set-row { border-top: 0; }
.set-expand > .set-row:not(summary) { border-top: 1px solid rgba(31, 38, 70, 0.07); }

/* ---------- Confirm dialog (glass sheet) ---------- */
.lg-dialog { border: 0; padding: 0; border-radius: 28px; width: min(420px, calc(100vw - 32px)); background: rgba(255, 255, 255, 0.82); color: var(--text);
  -webkit-backdrop-filter: blur(40px) saturate(200%); backdrop-filter: blur(40px) saturate(200%); box-shadow: var(--lg-inner), 0 30px 80px rgba(14, 23, 38, 0.35); }
.lg-dialog::backdrop { background: rgba(14, 23, 38, 0.28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lg-dialog[open] { animation: sheet-in 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(8px) scale(0.96); } to { opacity: 1; transform: none; } }
.lg-dialog-body { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 26px 24px 20px; }
.lg-dialog-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgba(242, 84, 45, 0.14); }
.lg-dialog-ic::before { content: ""; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px rgba(242, 84, 45, 0.18); }
.lg-dialog.is-danger .lg-dialog-ic { background: rgba(220, 38, 38, 0.12); }
.lg-dialog.is-danger .lg-dialog-ic::before { background: var(--bad); box-shadow: 0 0 0 6px rgba(220, 38, 38, 0.15); }
.lg-dialog-msg { margin: 0; font-size: 1rem; line-height: 1.45; color: var(--ink); font-weight: 500; }
.lg-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin-top: 4px; }
.lg-dialog-actions .btn { width: 100%; padding: 12px; font-size: 0.95rem; }
.btn.btn-danger-solid { background: rgba(220, 38, 38, 0.9); color: #fff; box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), 0 6px 18px rgba(220, 38, 38, 0.3); }
.btn.btn-danger-solid:hover { background: rgba(200, 30, 30, 0.96); }

/* ---------- Post page v2 ---------- */
.when-card { display: flex; align-items: center; gap: 16px; }
.when-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(135deg, #ff8a5c, var(--accent)); box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), 0 6px 16px rgba(242, 84, 45, 0.3); }
.when-ic .icon { width: 24px; height: 24px; }
.when-published .when-ic { background: linear-gradient(135deg, #5ee08a, #1f9d55); box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), 0 6px 16px rgba(31, 157, 85, 0.3); }
.when-attention .when-ic { background: linear-gradient(135deg, #ff7b7b, #d32f2f); box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), 0 6px 16px rgba(211, 47, 47, 0.3); }
.when-progress .when-ic { background: linear-gradient(135deg, #7aa7ff, #2f6bff); }
.when-cancelled .when-ic { background: linear-gradient(135deg, #b8bfcc, #7b8494); box-shadow: none; }
.when-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.when-label { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.when-time { font-family: var(--display); font-size: 1.45rem; font-weight: 600; color: var(--ink); line-height: 1.2; }
.when-sub { font-size: 0.88rem; color: var(--ink-2); }
.when-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.dest-list-card h2, .content-card h2 { margin: 0 0 6px; font-size: 1.05rem; }
.dest-list { list-style: none; margin: 0; padding: 0; }
.dest-row { padding: 14px 0; border-top: 1px solid rgba(31, 38, 70, 0.07); display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 90px; }
.dest-list > .dest-row:first-child { border-top: 0; }
.dest-row:target { background: rgba(242, 84, 45, 0.05); border-radius: 14px; }
.dest-row.is-cancelled { opacity: 0.55; }
.dest-line { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dest-line .dest-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dest-line .dest-title b { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dest-indent { margin: 0 0 0 46px; }
.dest-indent.alert, .dest-indent > .alert { margin-bottom: 0; }
.dest-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dest-actions form { margin: 0; }
.dest-history { margin-left: auto; }
.dest-history[open] { flex-basis: 100%; margin-left: 0; }
.content-card { display: flex; flex-direction: column; gap: 4px; }
.content-block { padding: 12px 0; border-top: 1px solid rgba(31, 38, 70, 0.07); display: flex; flex-direction: column; gap: 8px; }
.content-card h2 + .content-block { border-top: 0; padding-top: 4px; }
.content-head { display: flex; align-items: center; gap: 8px; }
.content-head b { color: var(--ink); }
.content-body { background: rgba(255, 255, 255, 0.45); border-radius: 16px; padding: 12px 14px; box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.85); }
.content-body p { margin: 0 0 6px; }
.content-body p:last-child { margin: 0; }
.content-title { display: block; color: var(--ink); margin-bottom: 4px; }
.content-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
@media (max-width: 640px) {
  .when-card { flex-wrap: wrap; }
  .when-side { flex-direction: row; align-items: center; width: 100%; }
  .dest-indent { margin-left: 0; }
}

/* ---------- Posts: date presets ---------- */
.range-select { flex-direction: row; align-items: center; gap: 0; position: relative; font-weight: 400; }
.range-select .icon { position: absolute; left: 12px; color: var(--muted); pointer-events: none; width: 16px; height: 16px; }
.range-select select { padding-left: 36px; width: auto; min-width: 150px; }
.custom-dates { display: inline-flex; align-items: center; gap: 8px; }
.custom-dates input { width: 150px; }
.range-select .icon { z-index: 1; }
.range-select select { text-align: left; text-align-last: left; }

/* ---------- Posts made outside reelay (read-only, open on the platform) ---------- */
.cal-ext { background: rgba(255, 255, 255, 0.38) !important; border-left-style: dashed !important; border-left-color: #8e8e93 !important; box-shadow: inset 0 0 0 1px rgba(31, 38, 70, 0.1) !important; }
.cal-ext-scheduled { border-left-color: #7c6cff !important; }
.cal-ext .cal-title, .cal-ext .wg-title, .cal-ext .wk-title { color: var(--ink-2); font-weight: 500; }
.cal-ext .cal-time, .cal-ext .wg-time { color: #6b5cff; }
.cal-ext-published .cal-time, .cal-ext-published .wg-time { color: var(--muted); }
.cal-ext img, .ext-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ext-ph { width: 100%; height: 100%; display: grid; place-items: center; background: rgba(31, 38, 70, 0.08); }
.ext-ph .pf-sm { width: 14px; height: 14px; border-radius: 4px; }
.ext-ph .pf-sm .icon { width: 9px; height: 9px; display: block; }
.wg-thumb .ext-ph .icon, .wk-thumb .ext-ph .icon, .cal-thumb .ext-ph .icon { display: block; }
.ext-tag { font-size: 0.68rem; font-weight: 600; color: #5b4fd6; background: rgba(124, 108, 255, 0.12); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.agenda-ext { opacity: 0.9; }
.cal-legend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -6px 0 12px; }
.lg-swatch { width: 18px; height: 12px; border-radius: 4px; background: rgba(255, 255, 255, 0.85); border-left: 3px solid var(--accent); box-shadow: 0 1px 3px rgba(31, 38, 70, 0.12); }
.lg-swatch.lg-ext { background: rgba(255, 255, 255, 0.38); border-left: 3px dashed #7c6cff; margin-left: 8px; }
.ext-note { display: flex; align-items: center; gap: 6px; margin: 0 0 14px; }
.ext-card .pcard-media { outline: 1.5px dashed rgba(124, 108, 255, 0.55); outline-offset: -1.5px; }
.ext-card .media-empty .pf-md { width: 44px; height: 44px; }
.busy-warn { margin: 12px 0 0; }
.busy-warn > div { display: flex; flex-direction: column; gap: 4px; }

/* ---------- Composer action bar v3: one clean row ---------- */
.composer-bar { min-height: 66px; padding: 9px 9px 9px 14px; gap: 12px; background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(30px) saturate(200%); backdrop-filter: blur(30px) saturate(200%);
  box-shadow: inset 0 1px 1px #fff, 0 0 0 1px rgba(31, 38, 70, 0.06), 0 18px 44px rgba(31, 38, 70, 0.18); }
.bar-summary { flex-wrap: nowrap; overflow: hidden; gap: 10px; }
.bar-who { display: inline-flex; align-items: center; gap: 8px; min-width: 0; padding: 5px 12px 5px 6px; border-radius: 999px; background: rgba(31, 38, 70, 0.05); }
.bar-who b { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.bar-pfs { display: inline-flex; flex: none; }
.bar-pf { width: 24px; height: 24px; border-radius: 50%; box-shadow: 0 0 0 2px #fff; display: inline-block; position: relative; }
.bar-pf + .bar-pf { margin-left: -8px; }
.bar-pf::after { content: ""; position: absolute; inset: 6px; border: 1.8px solid #fff; border-radius: 5px; }
.bar-pf-ig { background: linear-gradient(45deg, #f9a03f, #e1306c 50%, #833ab4); }
.bar-pf-yt { background: var(--yt); }
.bar-pf-yt::after { inset: 7px 6px; border-radius: 4px; }
.bar-when { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: 0.88rem; white-space: nowrap; color: var(--ink); background: rgba(31, 38, 70, 0.05); }
.bar-when-ic { width: 8px; height: 8px; border-radius: 50%; background: #34c759; box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.2); }
.bar-when.is-later .bar-when-ic { background: var(--accent); box-shadow: 0 0 0 3px rgba(242, 84, 45, 0.2); }
.bar-todo { display: inline-flex; align-items: center; gap: 8px; border: 0; padding: 6px 12px; border-radius: 999px; background: rgba(245, 159, 0, 0.12); color: var(--warn); font-weight: 600; font-size: 0.88rem; white-space: nowrap; }
.bar-todo-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff9f0a; }
.composer-bar .bar-draft { flex: none; }
.composer-bar [data-submit] { flex: none; }
.bar-dests, .bar-count, .bar-dest { display: none; }
@media (max-width: 900px) {
  .composer-bar { padding: 8px 8px 8px 12px; min-height: 60px; }
  .bar-who b { display: none; }
  .bar-who { padding: 4px; }
  .bar-todo { display: inline-flex; }
  .bar-draft { padding: 10px 12px; }
}
.cal-ext .wg-time, .cal-ext .cal-time { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-draft span { display: inline; }
@media (max-width: 900px) {
  .bar-summary { flex: 1; min-width: 0; }
  .bar-summary .bar-who { display: none; }
  .bar-todo, .bar-when { overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 100%; }
  .bar-draft { width: 44px; height: 44px; padding: 0; }
  .bar-draft span { display: none; }
  .bar-draft .icon { display: inline-block !important; }
}
