/* SocialHubPro 4 — sade, mobil öncelikli arayüz */
:root {
  --bg: #f6f6f8;
  --surface: #ffffff;
  --surface-2: #f1f1f4;
  --border: #e7e7ec;
  --border-strong: #d6d6de;
  --text: #121218;
  --text-2: #4b4b57;
  --muted: #8a8a96;
  --accent: #5b5bf0;
  --accent-2: #8b5cf6;
  --accent-soft: #ececfe;
  --accent-text: #4343d6;
  --ok: #16a34a; --ok-soft: #e8f7ee;
  --err: #e5484d; --err-soft: #fdecec;
  --warn: #d97706; --warn-soft: #fdf3e2;
  --info: #2563eb; --info-soft: #e9f0fe;
  --ig: #e1306c; --fb: #1877f2; --yt: #ff0033; --tt: #111;
  --radius: 18px; --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(16,16,24,.04), 0 4px 16px rgba(16,16,24,.04);
  --shadow-lg: 0 10px 40px rgba(16,16,24,.12);
  --sidebar: 248px;
  --tabbar: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0c10; --surface: #15151b; --surface-2: #1c1c24; --border: #26262f; --border-strong: #34343f;
    --text: #f2f2f6; --text-2: #b9b9c6; --muted: #7c7c8a;
    --accent: #7c7cff; --accent-2: #a78bfa; --accent-soft: #23234a; --accent-text: #a5a5ff;
    --ok: #3ecf75; --ok-soft: #12291c; --err: #ff6b70; --err-soft: #331618; --warn: #f5a524; --warn-soft: #2f2412; --info: #6aa1ff; --info-soft: #152240;
    --tt: #f2f2f6;
    --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 10px 40px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0c10; --surface: #15151b; --surface-2: #1c1c24; --border: #26262f; --border-strong: #34343f;
  --text: #f2f2f6; --text-2: #b9b9c6; --muted: #7c7c8a;
  --accent: #7c7cff; --accent-2: #a78bfa; --accent-soft: #23234a; --accent-text: #a5a5ff;
  --ok: #3ecf75; --ok-soft: #12291c; --err: #ff6b70; --err-soft: #331618; --warn: #f5a524; --warn-soft: #2f2412; --info: #6aa1ff; --info-soft: #152240;
  --tt: #f2f2f6;
  --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 10px 40px rgba(0,0,0,.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; line-height: 1.2; }
h2 { font-size: 20px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
.ic { flex-shrink: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.nowrap { white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hidden { display: none !important; }
.only-dark { display: none; }
:root[data-theme="dark"] .only-dark { display: inline; } :root[data-theme="dark"] .only-light { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .only-dark { display: inline; } :root:not([data-theme="light"]) .only-light { display: none; } }

/* ---------- Shell ---------- */
.shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); padding: 20px 14px;
  display: flex; flex-direction: column; gap: 18px; border-right: 1px solid var(--border); background: var(--surface);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.02em; font-size: 17px; padding: 0 8px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--text-2); font-weight: 500; transition: background .15s, color .15s; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent-text); }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 8px; border-top: 1px solid var(--border); padding-top: 14px; }
.sidebar-foot .who { flex: 1; font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { margin-left: var(--sidebar); padding: 28px 32px 48px; max-width: calc(1240px + var(--sidebar)); }
.topbar, .tabbar { display: none; }

@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { margin: 0; padding: 12px 16px calc(var(--tabbar) + 28px + env(safe-area-inset-bottom)); }
  .topbar {
    display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 30;
    padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top));
    background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
    border-bottom: 1px solid var(--border);
  }
  .topbar-title { flex: 1; font-size: 17px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--tabbar) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
    border-top: 1px solid var(--border);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 500; color: var(--muted); }
  .tabbar a.active { color: var(--accent-text); }
  .tabbar .tab-fab {
    width: 52px; height: 52px; margin: -18px auto 0; border-radius: 18px; display: grid; place-items: center; color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 45%, transparent);
  }
  .page-head .desk-only { display: none; }
}

/* ---------- Page head ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 28px; font-weight: 700; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
@media (max-width: 900px) { .page-head h1 { display: none; } .page-head { margin-bottom: 14px; } }
.section { margin-top: 28px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head a { font-size: 13px; color: var(--accent-text); font-weight: 550; }

/* ---------- Cards / grids ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.grid { display: grid; gap: 14px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
@media (max-width: 600px) { .kpis { grid-template-columns: 1fr 1fr; gap: 10px; } }
.kpi { padding: 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kpi-label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.kpi-value { font-size: 26px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-foot { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
@media (max-width: 600px) { .kpi { padding: 14px; } .kpi-value { font-size: 22px; } }
.kpi.hero { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border: 0; }
.kpi.hero .kpi-label, .kpi.hero .kpi-foot { color: rgba(255,255,255,.8); }
.kpi.hero .delta { background: rgba(255,255,255,.18); color: #fff; }

.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 12px; padding: 2px 7px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--ok); background: var(--ok-soft); }
.delta.down { color: var(--err); background: var(--err-soft); }
.delta.flat { color: var(--muted); background: var(--surface-2); }
.delta.big { font-size: 14px; padding: 4px 10px; }

.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-err { background: var(--err-soft); color: var(--err); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-info { background: var(--info-soft); color: var(--info); }
.pill-muted { background: var(--surface-2); color: var(--text-2); }

/* ---------- Avatars / badges ---------- */
.avatar { position: relative; width: var(--s); height: var(--s); flex-shrink: 0; }
.avatar > img, .avatar-fallback { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar > img { position: absolute; inset: 0; }
.avatar-fallback { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: calc(var(--s) * .4); }
.avatar .pbadge { position: absolute; right: -3px; bottom: -3px; border: 2px solid var(--surface); }
.pbadge { display: inline-grid; place-items: center; border-radius: 50%; padding: 3px; color: #fff; line-height: 0; }
.p-instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.p-facebook { background: var(--fb); }
.p-youtube { background: var(--yt); }
.p-tiktok { background: #111; }

/* ---------- Buttons / forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; transition: transform .08s, background .15s, border-color .15s, opacity .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--border-strong); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--text); color: var(--bg); border-color: transparent; }
.btn-primary:hover { opacity: .9; }
.btn-accent { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border: 0; }
.btn-danger { color: var(--err); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; border: 0; background: transparent; color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.compose-btn { height: 46px; border-radius: 14px; }

label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 550; color: var(--text-2); }
.input, textarea.input, select.input {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.input { resize: vertical; min-height: 140px; line-height: 1.55; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.form-grid { display: grid; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.spacer { flex: 1; }

/* Segmented control */
.seg { display: inline-flex; padding: 3px; background: var(--surface-2); border-radius: 12px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg a, .seg button, .seg label { border: 0; background: transparent; padding: 7px 13px; border-radius: 9px; font: inherit; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.seg .on, .seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.seg label { padding: 0; }
.seg label span { padding: 7px 13px; border-radius: 9px; display: inline-flex; gap: 6px; align-items: center; }
.seg input { display: none; }

/* ---------- Lists ---------- */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); min-width: 0; }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover { background: var(--surface-2); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; font-size: 14.5px; }
.list-item .meta { font-size: 12.5px; color: var(--muted); }
.thumb { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--surface-2); flex-shrink: 0; display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-lg { width: 64px; height: 80px; }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .ic { margin: 0 auto 10px; opacity: .6; }
.empty h3 { color: var(--text); margin-bottom: 6px; }

/* Stat chips inside content rows */
.stats { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.stats span { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; font-variant-numeric: tabular-nums; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.brand-row td { background: var(--surface-2); font-weight: 650; font-size: 13px; padding: 8px 14px; }
.tbl .num { text-align: right; white-space: nowrap; }
@media (max-width: 700px) { .tbl .hide-sm { display: none; } }

/* ---------- Insights ---------- */
.insights { display: grid; gap: 10px; }
.insight { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); font-size: 14px; }
.insight .ic-wrap { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.insight.up .ic-wrap { background: var(--ok-soft); color: var(--ok); }
.insight.down .ic-wrap { background: var(--err-soft); color: var(--err); }
.insight.info .ic-wrap { background: var(--info-soft); color: var(--info); }
.insight.tip .ic-wrap { background: var(--accent-soft); color: var(--accent-text); }

/* Top content cards */
.top-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.top-card { display: flex; flex-direction: column; overflow: hidden; }
.top-card .cover { aspect-ratio: 4/5; background: var(--surface-2); position: relative; overflow: hidden; }
.top-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.top-card .cover .rank { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.6); color: #fff; font-weight: 700; font-size: 12px; padding: 3px 9px; border-radius: 999px; backdrop-filter: blur(6px); }
.top-card .cover .kind { position: absolute; top: 10px; right: 10px; }
.top-card .body { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 600px) {
  .top-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 72%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; margin: 0 -16px; padding-inline: 16px; scrollbar-width: none; }
  .top-grid > * { scroll-snap-align: start; }
}

.chart-box { position: relative; height: 260px; }
@media (max-width: 600px) { .chart-box { height: 210px; } }

.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; }
@media (max-width: 1000px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- Account grid ---------- */
.brand-group { margin-bottom: 18px; }
.brand-group > h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px 4px; }
.acc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.acc-card { display: flex; align-items: center; gap: 12px; padding: 14px; }
.acc-card .grow { flex: 1; min-width: 0; }

/* ---------- Composer ---------- */
.composer { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .composer { grid-template-columns: 1fr; } .preview-col { order: 2; } }
.step { padding: 18px; }
.step + .step { margin-top: 14px; }
.step-title { display: flex; align-items: center; gap: 10px; font-weight: 650; margin-bottom: 14px; }
.step-num { width: 24px; height: 24px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.type-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 600px) { .type-picker { grid-template-columns: repeat(2, 1fr); } }
.type-opt { position: relative; }
.type-opt input { position: absolute; opacity: 0; }
.type-opt span { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border: 1.5px solid var(--border); border-radius: 14px; font-weight: 600; font-size: 13px; cursor: pointer; text-align: center; transition: all .15s; }
.type-opt span small { font-weight: 400; color: var(--muted); font-size: 11px; }
.type-opt input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }

.dropzone { display: block; border: 1.5px dashed var(--border-strong); border-radius: 16px; padding: 26px 16px; text-align: center; color: var(--muted); cursor: pointer; transition: all .15s; }
.dropzone.drag { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.dropzone strong { color: var(--text); display: block; margin: 6px 0 2px; }
.media-strip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; margin-top: 12px; }
.media-strip:empty { display: none; }
.media-tile { position: relative; width: 96px; height: 120px; border-radius: 12px; overflow: hidden; flex-shrink: 0; background: var(--surface-2); cursor: grab; border: 1px solid var(--border); }
.media-tile img, .media-tile video { width: 100%; height: 100%; object-fit: cover; }
.media-tile .bar { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--accent); transition: width .2s; }
.media-tile .rm { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; cursor: pointer; }
.media-tile .idx { position: absolute; top: 4px; left: 4px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(0,0,0,.55); border-radius: 6px; padding: 1px 6px; }
.media-tile .badge { position: absolute; left: 4px; bottom: 8px; font-size: 10.5px; color: #fff; background: rgba(0,0,0,.55); border-radius: 6px; padding: 1px 6px; }
.media-tile.err { outline: 2px solid var(--err); }

.acc-pick-group { border: 1px solid var(--border); border-radius: 14px; margin-bottom: 8px; overflow: hidden; }
.acc-pick-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface-2); font-weight: 600; font-size: 14px; cursor: pointer; }
.acc-pick-head input { width: 18px; height: 18px; accent-color: var(--accent); }
.acc-pick-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
.acc-chip { position: relative; }
.acc-chip input { position: absolute; opacity: 0; }
.acc-chip > span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1.5px solid var(--border); font-size: 13px; font-weight: 550; cursor: pointer; transition: all .15s; }
.acc-chip input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.acc-chip.disabled > span { opacity: .4; cursor: not-allowed; }
.acc-chip .why { display: none; }

.counter { font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.counter.over { color: var(--err); font-weight: 600; }

.sticky-actions { position: sticky; bottom: 0; z-index: 20; display: flex; gap: 10px; align-items: center; padding: 14px 18px; margin-top: 14px; }
@media (max-width: 900px) { .sticky-actions { bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 8px); } }

/* Phone preview */
.preview-col { position: sticky; top: 24px; }
.phone { width: 300px; max-width: 100%; margin: 0 auto; border-radius: 36px; border: 8px solid #111; background: #fff; color: #111; overflow: hidden; box-shadow: var(--shadow-lg); font-size: 13px; }
.phone .ph-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-weight: 600; }
.phone .ph-head .avatar-fallback { background: #eee; color: #333; }
.phone .ph-media { aspect-ratio: 1; background: #f0f0f0; position: relative; overflow: hidden; }
.phone.portrait .ph-media { aspect-ratio: 4/5; }
.phone .ph-media img, .phone .ph-media video { width: 100%; height: 100%; object-fit: cover; position: relative; }
.phone.fit .ph-media img:not(.ph-bg) { object-fit: contain; }
.phone .ph-media .ph-bg { position: absolute; inset: -20px; width: calc(100% + 40px); height: calc(100% + 40px); object-fit: cover; filter: blur(18px) brightness(.8); }
.phone.vertical .ph-media { aspect-ratio: 9/16; }
.phone .ph-cap { padding: 10px 12px 16px; white-space: pre-wrap; word-break: break-word; max-height: 140px; overflow: hidden; }
.phone .ph-dots { display: flex; justify-content: center; gap: 4px; padding: 8px; }
.phone .ph-dots i { width: 6px; height: 6px; border-radius: 50%; background: #ccc; }
.phone .ph-dots i:first-child { background: #3897f0; }
.phone .ph-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #999; }

/* Modal / sheet */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 60; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.sheet { width: 100%; max-width: 520px; max-height: 88vh; overflow: auto; padding: 22px; animation: rise .2s; }
@media (max-width: 600px) { .sheet-bg { place-items: end stretch; padding: 0; } .sheet { max-width: none; border-radius: 22px 22px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }
.progress { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .3s; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 80; padding: 12px 18px; border-radius: 14px; font-weight: 550; font-size: 14px; box-shadow: var(--shadow-lg); background: var(--surface); border: 1px solid var(--border); max-width: calc(100vw - 32px); animation: rise .2s; }
.toast-ok { border-left: 4px solid var(--ok); }
.toast-err { border-left: 4px solid var(--err); }
.toast-warn { border-left: 4px solid var(--warn); }

.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; font-size: 14px; align-items: flex-start; }
.callout-warn { background: var(--warn-soft); }
.callout-info { background: var(--info-soft); }
.callout-err { background: var(--err-soft); }
.callout .ic { margin-top: 2px; }

/* Day groups on posts page */
.day-head { font-size: 13px; font-weight: 650; color: var(--muted); margin: 20px 4px 8px; text-transform: uppercase; letter-spacing: .05em; }
.targets { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.target { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 8px 2px 2px; border-radius: 999px; background: var(--surface-2); }
.target.failed { background: var(--err-soft); color: var(--err); }
.target.published { background: var(--ok-soft); }
.target .pbadge { padding: 3px; }

/* Auth pages */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent), radial-gradient(900px 500px at 110% 110%, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent), var(--bg); }
.auth-card { width: 100%; max-width: 400px; padding: 30px; }
.auth { grid-template-rows: 1fr auto; }
.auth .auth-card { align-self: center; }
.auth-foot { text-align: center; font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; padding: 18px 0 6px; max-width: 520px; }
.auth-foot a { color: var(--text-2); text-decoration: underline; }
.auth-foot .yt-ic { color: var(--yt); }
.auth-card .brand { justify-content: center; margin-bottom: 8px; font-size: 20px; padding: 0; }

/* Range picker */
.range-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.range-bar .custom { display: flex; gap: 6px; align-items: center; }
.range-bar .custom .input { min-height: 36px; padding: 6px 10px; font-size: 13px; width: auto; }

.legal { max-width: 760px; margin: 0 auto; padding: 40px 20px; }
.legal h1 { font-size: 30px; margin-bottom: 8px; }
.legal h2 { margin: 26px 0 8px; font-size: 18px; }
.legal p, .legal li { color: var(--text-2); line-height: 1.7; }
