/* OmniSocial — base styles (auth + profile). Mobile-first, clean, no framework.
   Past pain was messy mobile layout, so this is built phone-first and widens up. */
:root {
  --bg: #0b0e14; --panel: #141922; --panel-2: #1b212c; --line: #263041;
  --ink: #e8edf5; --ink-dim: #9aa7ba; --brand: #6ea8fe; --brand-ink: #04122b;
  --ok: #37d39a; --warn: #ffcf5c; --err: #ff6b6b; --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 600px at 50% -10%, #14202f 0%, var(--bg) 55%) fixed;
  color: var(--ink); font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column; align-items: center;
  padding: 20px 16px 48px;
}
a { color: var(--brand); }
.brand { text-align: center; margin: 8px 0 4px; }
.brand h1 { margin: 0; font-size: 26px; letter-spacing: .5px; }
.brand .dot { color: var(--brand); }
.brand p { margin: 4px 0 0; color: var(--ink-dim); font-size: 13.5px; }
.card {
  width: 100%; max-width: 440px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; margin-top: 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
.tabs { display: flex; gap: 6px; background: var(--panel-2); padding: 5px; border-radius: 10px; margin-bottom: 16px; }
.tabs button {
  flex: 1; padding: 10px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-dim);
  font-weight: 600; font-size: 14px; cursor: pointer;
}
.tabs button.active { background: var(--brand); color: var(--brand-ink); }
label { display: block; font-size: 13px; color: var(--ink-dim); margin: 12px 0 5px; }
input, select, textarea {
  width: 100%; padding: 12px 13px; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px; color: var(--ink); font-size: 16px; /* 16px = no iOS zoom */
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
textarea { resize: vertical; min-height: 72px; }
.btn {
  width: 100%; margin-top: 16px; padding: 13px; border: 0; border-radius: 11px;
  background: var(--brand); color: var(--brand-ink); font-weight: 700; font-size: 15px; cursor: pointer;
}
.btn:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink-dim); border: 1px solid var(--line); }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.msg { margin-top: 14px; padding: 11px 12px; border-radius: 10px; font-size: 14px; display: none; }
.msg.show { display: block; }
.msg.ok  { background: rgba(55,211,154,.12); color: var(--ok); border: 1px solid rgba(55,211,154,.35); }
.msg.err { background: rgba(255,107,107,.12); color: var(--err); border: 1px solid rgba(255,107,107,.35); }
.msg.info{ background: rgba(110,168,254,.12); color: var(--brand); border: 1px solid rgba(110,168,254,.35); }
.who { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.who .email { font-weight: 600; font-size: 14px; word-break: break-all; }
.who .tag { font-size: 11px; color: var(--ink-dim); background: var(--panel-2); padding: 3px 8px; border-radius: 20px; }
.hint { color: var(--ink-dim); font-size: 12.5px; margin-top: 10px; }
.hr { height: 1px; background: var(--line); margin: 18px 0; border: 0; }
.foot { color: var(--ink-dim); font-size: 12px; text-align: center; margin-top: 22px; max-width: 440px; }
@media (min-width: 560px) { .card { padding: 26px; } }

/* ---- public creator profile (profile.html) ---- */
.state { text-align: center; color: var(--ink-dim); font-size: 14px; padding: 14px 0; }
.pf-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.pf-avatar {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  background: var(--panel-2); border: 1px solid var(--line); display: block;
}
.pf-avatar.ph {
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; font-weight: 700; color: var(--brand); text-transform: uppercase;
}
.pf-name { font-size: 21px; font-weight: 700; margin: 2px 0 0; word-break: break-word; }
.pf-handle { font-size: 14px; color: var(--ink-dim); margin: 0; word-break: break-all; }
.pf-role { font-size: 11px; color: var(--ink-dim); background: var(--panel-2); padding: 3px 10px; border-radius: 20px; }
.pf-bio { color: var(--ink); font-size: 14.5px; line-height: 1.6; margin: 16px 0 0; white-space: pre-wrap; word-break: break-word; }
.pf-support { text-decoration: none; text-align: center; display: block; }

/* ---- shared: page wrap + author row ---- */
.wrap { width: 100%; max-width: 440px; margin-top: 18px; }
.page-title { font-size: 16px; font-weight: 700; margin: 4px 2px 0; color: var(--ink); }
.feed { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.item {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: 0 8px 26px rgba(0,0,0,.28);
}
.item-top { display: flex; align-items: center; gap: 10px; }
.av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: 0 0 40px; background: var(--panel-2); border: 1px solid var(--line); }
.av.ph { display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700; color: var(--brand); text-transform: uppercase; }
.meta { display: flex; flex-direction: column; min-width: 0; }
.author { font-weight: 600; font-size: 14.5px; color: var(--ink); text-decoration: none; word-break: break-word; }
a.author:hover { color: var(--brand); }
.sub { font-size: 12px; color: var(--ink-dim); word-break: break-all; }

/* ---- post feed ---- */
.post-body { margin: 11px 0 0; font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.post-img { margin-top: 11px; width: 100%; max-height: 420px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.stats { margin-top: 11px; font-size: 12px; color: var(--ink-dim); }

/* ---- music ---- */
.track-top { display: flex; align-items: center; gap: 12px; }
.cover { width: 60px; height: 60px; border-radius: 10px; object-fit: cover; flex: 0 0 60px; background: var(--panel-2); border: 1px solid var(--line); }
.cover.ph { display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--brand); }
.track-title { font-weight: 700; font-size: 15px; color: var(--ink); word-break: break-word; }
.track-sub { font-size: 12.5px; color: var(--ink-dim); word-break: break-word; }
.track-sub a { color: var(--ink-dim); text-decoration: none; }
.track-sub a:hover { color: var(--brand); }
audio { width: 100%; margin-top: 12px; }
.track-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 10px; }
.track-support { display: inline-block; padding: 8px 14px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); font-weight: 700; font-size: 13px; text-decoration: none; white-space: nowrap; }

/* ---- shared nav header (all app pages) ---- */
.nav {
  display: flex; gap: 6px; width: 100%; max-width: 440px; margin: 14px auto 0;
  padding: 5px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.nav a {
  flex: 1 0 auto; text-align: center; padding: 9px 12px; border-radius: 8px;
  color: var(--ink-dim); text-decoration: none; font-weight: 600; font-size: 13.5px; white-space: nowrap;
}
.nav a:hover { color: var(--ink); }
.nav a.active { background: var(--brand); color: var(--brand-ink); }

/* ---- support page ---- */
.support-for { display: flex; align-items: center; gap: 12px; margin: 2px 0 6px; }
.support-for .who { display: flex; flex-direction: column; min-width: 0; }
.support-for .n { font-weight: 700; font-size: 15px; color: var(--ink); word-break: break-word; }
.support-for .h { font-size: 12.5px; color: var(--ink-dim); word-break: break-all; }
.receipt { display: none; margin-top: 16px; padding: 14px; border: 1px dashed var(--ok); border-radius: 12px; }
.receipt.show { display: block; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 14px; }
.kv b { color: var(--ok); }
.kv.dim { color: var(--ink-dim); font-size: 12.5px; }
.ref { font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: var(--brand); word-break: break-all; }
.rcpt-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.rcpt-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 11px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.rcpt-row .l { display: flex; flex-direction: column; min-width: 0; }
.rcpt-row .r { text-align: right; white-space: nowrap; }
.rcpt-row .when { color: var(--ink-dim); font-size: 11.5px; }

/* ---- social actions (follow / like / comment) ---- */
.pf-social { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.pf-followers { font-size: 13px; color: var(--ink-dim); }
.pf-followers b { color: var(--ink); }
#followBtn { width: auto; margin-top: 0; padding: 9px 20px; font-size: 14px; }
#followBtn.following { background: transparent; color: var(--ink-dim); border: 1px solid var(--line); }
.actions { display: flex; gap: 8px; margin-top: 11px; align-items: center; flex-wrap: wrap; }
.act-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-dim); font-size: 13px; font-weight: 600; cursor: pointer; }
.act-btn:hover { color: var(--ink); }
.act-btn.on { color: var(--brand); border-color: var(--brand); }
.act-btn:disabled { cursor: default; opacity: .7; }
.act-static { display: inline-flex; align-items: center; gap: 6px; padding: 7px 2px; color: var(--ink-dim); font-size: 13px; }
.comments { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; display: none; }
.comments.show { display: block; }
.cmt { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cmt:last-child { border-bottom: 0; }
.cmt-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.cmt-author { font-weight: 600; font-size: 13px; color: var(--ink); text-decoration: none; word-break: break-word; }
a.cmt-author:hover { color: var(--brand); }
.cmt-time { font-size: 11px; color: var(--ink-dim); white-space: nowrap; }
.cmt-body { font-size: 13.5px; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.cmt-del { align-self: flex-start; background: none; border: 0; color: var(--err); font-size: 11.5px; cursor: pointer; padding: 2px 0; }
.cmt-add { display: flex; gap: 8px; margin-top: 10px; }
.cmt-add input { flex: 1; }
.cmt-add button { width: auto; margin-top: 0; padding: 0 16px; font-size: 13px; }
.cmt-note { font-size: 12.5px; color: var(--ink-dim); padding: 6px 0; }

/* ---- creator studio ---- */
.studio-stats { display: flex; gap: 12px; margin-top: 12px; }
.stat { flex: 1; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 10px; text-align: center; }
.stat .num { font-size: 22px; font-weight: 800; color: var(--ink); }
.stat .lbl { font-size: 12px; color: var(--ink-dim); margin-top: 2px; }
.section-h { font-size: 14px; font-weight: 700; color: var(--ink); margin: 20px 2px 8px; }
.badge { font-size: 11px; padding: 2px 7px; border-radius: 20px; background: var(--panel-2); color: var(--ink-dim); border: 1px solid var(--line); white-space: nowrap; }
.studio-item { display: flex; flex-direction: column; gap: 3px; }
.studio-item .l1 { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.studio-item .t { font-weight: 600; font-size: 14px; color: var(--ink); word-break: break-word; }
.studio-item .m { font-size: 12px; color: var(--ink-dim); }
