/* QOL Promo: QOL glass + cobalt, Geist. Mobile-first; no horizontal page scroll at 375px. 8px rhythm. */
:root {
  --bg: #060a18; --bg-2: #04060f;
  --line: rgba(255,255,255,.08); --line-2: rgba(255,255,255,.045);
  --fg: #f4f7ff; --muted: #9aa6c2; --subtle: #7e8aac;
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1240px;
  --hi: inset 0 1px 0 rgba(255,255,255,.07);
  --accent: #3d6bff; --accent-2: #7fb2ff; --accent-3: #22d3ee; --glow: rgba(61,107,255,.45); --btn-ink: #fff;
  --brand: linear-gradient(135deg, #2f5bff 0%, #4f8bff 45%, #22d3ee 100%);
  --ok: #34d399; --warn: #fbbf24; --bad: #fb7185;
  --ease: cubic-bezier(.16,1,.3,1);
  --r: 20px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body { font-family: var(--font); line-height: 1.5; min-height: 100dvh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
h1, h2, h3 { letter-spacing: -.02em; margin: 0; }

.backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(70vmax 46vmax at 90% -12%, rgba(61,107,255,.22), transparent 60%),
    radial-gradient(54vmax 40vmax at -12% 40%, rgba(34,211,238,.08), transparent 60%),
    radial-gradient(60vmax 40vmax at 50% 120%, rgba(61,107,255,.10), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 24px; } }

.glass { position: relative; background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--hi), 0 24px 48px -28px rgba(0,0,0,.7);
  -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2); }
.glass::before { content: ""; position: absolute; inset: 0 0 70% 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.05), transparent); }

/* header */
.top { position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top);
  background: linear-gradient(180deg, rgba(6,10,24,.88), rgba(6,10,24,.62)); border-bottom: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brandmark { display: inline-flex; align-items: baseline; gap: 6px; text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; flex: none; }
.brandmark .promo { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.account { display: flex; align-items: center; gap: 8px; min-width: 0; }
.account .email { color: var(--muted); font-size: .85rem; max-width: 30vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 520px) { .account .email { display: none; } }
.plan-chip { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); }
.plan-chip.is-unlimited { color: #fff; border-color: transparent; background: var(--brand); }

/* buttons */
.btn { position: relative; overflow: hidden; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.05);
  font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .14s var(--ease), border-color .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease); }
.btn:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.26); }
.btn:active { transform: translateY(0); }
.btn:focus-visible, .one-btn:focus-visible, textarea:focus-visible, input:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: .88rem; }
.btn-ghost { background: transparent; }
.btn-primary { background: var(--brand); color: var(--btn-ink); border-color: transparent; box-shadow: 0 10px 30px -12px var(--glow); }
.btn-primary:hover { box-shadow: 0 14px 40px -12px var(--glow); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* hero */
.hero { padding-top: 40px; padding-bottom: 24px; text-align: center; }
.eyebrow { margin: 0 0 12px; font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); }
.eyebrow a { text-decoration: none; }
.hero h1 { font-size: clamp(2rem, 6.4vw, 4.1rem); font-weight: 800; line-height: 1.04; text-wrap: balance; max-width: 19ch; margin: 0 auto; }
.grad { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { color: var(--muted); font-size: clamp(1rem, 2.2vw, 1.15rem); max-width: 60ch; margin: 16px auto 0; text-wrap: pretty; }

/* composer */
.composer-wrap { padding-bottom: 32px; }
.composer { padding: 20px; display: grid; gap: 16px; max-width: 880px; margin: 0 auto; }
@media (min-width: 768px) { .composer { padding: 28px; } }
.field { display: grid; gap: 8px; min-width: 0; }
.field-label { font-size: .82rem; font-weight: 600; color: var(--muted); }
.opt { font-weight: 400; color: var(--subtle); }
textarea, input[type=text], input[type=url], input[type=password] {
  width: 100%; min-width: 0; border-radius: 14px; border: 1px solid var(--line); background: rgba(4,7,18,.55);
  padding: 12px 14px; font-size: 16px; line-height: 1.5; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
textarea { resize: vertical; min-height: 128px; }
textarea:focus, input:focus { border-color: rgba(127,178,255,.6); box-shadow: 0 0 0 4px rgba(61,107,255,.16); outline: none; }
.row2 { display: grid; gap: 16px; }
@media (min-width: 640px) { .row2 { grid-template-columns: 1.4fr 1fr; } }
.image-pick { display: flex; align-items: center; gap: 10px; min-height: 48px; flex-wrap: wrap; }
.image-pick label { cursor: pointer; }
.image-name { color: var(--muted); font-size: .88rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* THE ONE BUTTON */
.one { display: grid; justify-items: center; gap: 10px; padding-top: 4px; }
.one-btn { position: relative; isolation: isolate; overflow: hidden; display: grid; justify-items: center; gap: 2px; width: 100%; max-width: 520px;
  min-height: 76px; padding: 14px 24px; border: 0; border-radius: 22px; cursor: pointer; color: #fff;
  background: var(--brand); box-shadow: 0 18px 50px -16px var(--glow), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .18s var(--ease), box-shadow .3s var(--ease), filter .3s var(--ease); }
.one-btn:hover { transform: translateY(-2px); box-shadow: 0 24px 64px -16px var(--glow), inset 0 1px 0 rgba(255,255,255,.35); }
.one-btn:active { transform: translateY(0) scale(.995); }
.one-btn[disabled] { filter: grayscale(.6) brightness(.7); cursor: not-allowed; transform: none; }
.one-glow { position: absolute; inset: -40%; z-index: -1; background: conic-gradient(from 0deg, transparent, rgba(255,255,255,.35), transparent 30%);
  animation: spin 6s linear infinite; opacity: .5; }
@keyframes spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) { .one-glow { animation: none; } .btn, .one-btn, .card { transition: none; } }
.one-label { font-size: 1.35rem; font-weight: 800; letter-spacing: -.01em; }
.one-sub { font-size: .85rem; opacity: .9; }
.one-note { margin: 0; font-size: .85rem; color: var(--muted); text-align: center; }
.one-warn { margin: 0; font-size: .88rem; color: var(--warn); text-align: center; }
.one-btn.is-busy .one-label::after { content: "\2026"; }

/* section head */
.section-head { display: grid; gap: 6px; margin: 8px 0 16px; }
.section-head h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); font-weight: 750; }
.section-head p { margin: 0; }

/* the grid of live previews */
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; padding-bottom: 40px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { --pc: var(--accent); position: relative; display: grid; grid-template-rows: auto 1fr auto; min-width: 0; border-radius: var(--r);
  border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
  box-shadow: var(--hi), 0 24px 48px -30px rgba(0,0,0,.8); overflow: hidden;
  transition: transform .25s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease), opacity .3s var(--ease); }
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--pc), color-mix(in srgb, var(--pc) 30%, transparent)); }
.card::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 60% at 0% 0%, color-mix(in srgb, var(--pc) 16%, transparent), transparent 55%); }
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--pc) 45%, var(--line)); box-shadow: var(--hi), 0 30px 60px -30px color-mix(in srgb, var(--pc) 45%, #000); }
.card.is-off { opacity: .45; }
.card.is-over { border-color: rgba(251,113,133,.55); }
.card-head { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px; min-width: 0; }
.mono { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; font-weight: 800; font-size: .82rem;
  color: #fff; background: linear-gradient(135deg, var(--pc), color-mix(in srgb, var(--pc) 55%, #000)); box-shadow: 0 6px 16px -8px var(--pc); }
.card-title { display: grid; justify-items: start; gap: 4px; min-width: 0; flex: 1; }
.card-name { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mode { flex: none; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.mode--direct { color: #052e1f; background: var(--ok); border-color: transparent; }
.switch { position: relative; flex: none; width: 40px; height: 24px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.08); cursor: pointer; padding: 0; }
.switch::before { content: ""; position: absolute; inset: -10px -6px; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
.switch[aria-checked="true"] { background: var(--pc); border-color: transparent; }
.switch[aria-checked="true"]::after { transform: translateX(16px); }
.card-body { position: relative; z-index: 1; padding: 0 14px 12px; min-width: 0; display: grid; gap: 10px; align-content: start; }
.post { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; padding: 12px; border-radius: 14px; background: rgba(2,4,12,.5); border: 1px solid var(--line-2); min-width: 0; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-3)); }
.post-meta { font-size: .8rem; color: var(--muted); display: flex; gap: 6px; min-width: 0; }
.post-meta b { color: var(--fg); font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-text { margin-top: 4px; font-size: .92rem; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; min-height: 1.5em; }
.post-text a, .post-text .tag { color: color-mix(in srgb, var(--pc) 70%, #fff); text-decoration: none; }
.post-text .ph { color: var(--subtle); }
.post-img { margin-top: 8px; width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line-2); display: block; }
.post-link { margin-top: 8px; display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); font-size: .8rem; color: var(--muted); min-width: 0; }
.post-link b { color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edit { display: grid; gap: 8px; }
.edit textarea { min-height: 120px; font-size: 16px; }
.card-foot { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 10px 14px 14px; border-top: 1px solid var(--line-2); min-width: 0; flex-wrap: wrap; }
.ring { width: 30px; height: 30px; flex: none; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3.2; }
.ring .bg { stroke: rgba(255,255,255,.1); }
.ring .fg { stroke: var(--pc); stroke-linecap: round; transition: stroke-dashoffset .3s var(--ease), stroke .3s; }
.card.is-near .ring .fg { stroke: var(--warn); }
.card.is-over .ring .fg { stroke: var(--bad); }
.count { font-size: .82rem; font-variant-numeric: tabular-nums; color: var(--muted); min-width: 0; }
.card.is-over .count { color: var(--bad); font-weight: 600; }
.fitted { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-2); }
.card-actions { margin-left: auto; display: flex; gap: 6px; }
.chip-btn { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font-size: .8rem; font-weight: 600; cursor: pointer; }
.chip-btn:hover { border-color: rgba(255,255,255,.3); }
.chip-btn[aria-pressed="true"] { background: rgba(255,255,255,.1); }
.card-note { font-size: .78rem; color: var(--subtle); margin: 0; }

/* lower panels */
.two-col { display: grid; gap: 16px; padding-bottom: 40px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1.3fr 1fr; align-items: start; } }
.side { display: grid; gap: 16px; }
.panel { padding: 20px; display: grid; gap: 14px; }
.panel h2 { font-size: 1.2rem; font-weight: 750; }
.panel > p { margin: 0; }
.conn { display: grid; gap: 10px; padding: 14px; border-radius: 16px; border: 1px solid var(--line-2); background: rgba(2,4,12,.35); }
.conn-head { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.conn-state { margin-left: auto; font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.conn-state.is-on { color: var(--ok); }
.conn-form { display: grid; gap: 8px; }
@media (min-width: 560px) { .conn-form { grid-template-columns: 1fr 1fr auto; } #mastoForm { grid-template-columns: 1fr auto; } }
.hint { margin: 0; font-size: .8rem; color: var(--subtle); }
.hint a { color: var(--accent-2); }
.plans { gap: 12px; }
.plan-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); }
.plan-row div { display: grid; gap: 2px; min-width: 0; }
.plan-row--hi { border-color: rgba(127,178,255,.4); background: linear-gradient(135deg, rgba(61,107,255,.14), rgba(34,211,238,.05)); }
.price { font-weight: 800; font-size: 1.3rem; white-space: nowrap; }
.price small { font-size: .8rem; font-weight: 600; color: var(--muted); }
.soon { overflow: hidden; }
.soon-tag { justify-self: start; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
  background: rgba(251,191,36,.14); color: var(--warn); border: 1px solid rgba(251,191,36,.3); }

/* history */
.history { list-style: none; margin: 0 0 48px; padding: 0; display: grid; gap: 10px; }
.hist { padding: 14px 16px; display: grid; gap: 8px; min-width: 0; }
.hist-top { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.hist-text { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hist-when { font-size: .8rem; color: var(--subtle); }
.hist-targets { display: flex; flex-wrap: wrap; gap: 6px; }
.tgt { font-size: .74rem; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); text-decoration: none; }
.tgt--posted { color: #052e1f; background: var(--ok); border-color: transparent; }
.tgt--opened { color: var(--fg); border-color: rgba(127,178,255,.5); }
.tgt--failed { color: var(--bad); border-color: rgba(251,113,133,.5); }

/* footer */
.foot { border-top: 1px solid var(--line-2); padding: 24px 0 calc(24px + env(safe-area-inset-bottom)); color: var(--muted); font-size: .85rem; }
.foot-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--fg); }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; }

/* modals */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(2,4,12,.72);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal-card { width: 100%; max-width: 480px; max-height: calc(100dvh - 32px); overflow: auto; padding: 24px; display: grid; gap: 14px; background: rgba(10,14,30,.92); }
.modal-card h2 { font-size: 1.3rem; }
.modal-card p { margin: 0; }
.seq-direct { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.seq-direct li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); font-size: .9rem; min-width: 0; overflow-wrap: anywhere; }
.seq-direct .ok { color: var(--ok); font-weight: 700; }
.seq-direct .bad { color: var(--bad); font-weight: 700; }
.seq-step { display: grid; gap: 10px; justify-items: center; text-align: center; }
.seq-count { margin: 0; color: var(--muted); font-size: .85rem; }
.one-btn--step { min-height: 68px; }

.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; max-width: calc(100vw - 32px);
  padding: 12px 18px; border-radius: 14px; background: rgba(12,18,40,.95); border: 1px solid var(--line); box-shadow: 0 20px 40px -20px #000; font-size: .9rem; }
