/* Creator Shout public creator page. Mobile-first. */
:root {
  --bg: #0b0b20;
  --bg2: #12122b;
  --text: #f2f0ff;
  --muted: #a7a3c7;
  --purple: #8b5cf6;
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --gradient: linear-gradient(135deg, #8b5cf6, #3b82f6);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  background-image:
    radial-gradient(600px 300px at 20% -5%, rgba(139,92,246,.18), transparent),
    radial-gradient(500px 260px at 85% 10%, rgba(59,130,246,.14), transparent);
  background-attachment: fixed;
}

/* ---------- page slots (neutral naming: ad-blocker resistance, PRD 13.4) ---------- */
.page-slot { width: 100%; }
.page-slot[hidden] { display: none; }
.slot-top.is-sticky {
  position: sticky; top: 0; z-index: 30;
  padding: 6px 10px 0;
}
.slot-bottom.is-sticky {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  padding: 0 10px calc(8px + env(safe-area-inset-bottom));
  pointer-events: none;
}
.slot-bottom.is-sticky > * { pointer-events: auto; }
.slot-infeed { margin: 14px 0; }
/* Reserve space so rotation never shifts layout (PRD 13: no layout shift). */
.page-slot:not([hidden]) .slot-frame { min-height: 84px; }
.slot-frame { animation: slotfade .3s ease; }
@keyframes slotfade { from { opacity: 0; } to { opacity: 1; } }
.slot-creative {
  display: block; max-width: 560px; margin: 0 auto;
  border-radius: 12px; overflow: hidden; text-decoration: none;
  border: 1px solid rgba(139,92,246,.35);
  background: var(--bg2);
}
.slot-creative-img { display: block; width: 100%; height: auto; }
.slot-creative-text {
  display: flex; align-items: center; justify-content: center;
  min-height: 84px; padding: 14px;
  background: var(--gradient); color: #fff; font-weight: 800;
  font-size: .9rem; letter-spacing: .04em; text-align: center;
}
.rent-space {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  flex-wrap: wrap; text-align: center;
  background: linear-gradient(135deg, rgba(139,92,246,.16), rgba(59,130,246,.16));
  border: 1px dashed rgba(139,92,246,.55);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text); text-decoration: none;
  font-size: .8rem; letter-spacing: .06em;
  max-width: 560px; margin: 0 auto;
}
.rs-title { font-weight: 800; }
.rs-sub { color: var(--muted); font-size: .72rem; }
.rs-cta {
  background: var(--gradient); color: #fff; font-weight: 800; font-size: .72rem;
  border-radius: 999px; padding: 6px 16px; letter-spacing: .08em;
}

/* ---------- profile ---------- */
.page {
  max-width: 560px; margin: 0 auto;
  padding: 26px 18px calc(110px + env(safe-area-inset-bottom));
}
.profile { text-align: center; margin-bottom: 22px; }
.avatar {
  width: 96px; height: 96px; border-radius: 50%;
  margin: 0 auto 14px;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; font-weight: 800; color: #fff;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(139,92,246,.4);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.name { font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; }
.bio { color: var(--muted); font-size: .92rem; line-height: 1.55; }

/* ---------- link blocks ---------- */
.blocks { display: flex; flex-direction: column; gap: 12px; }
.block {
  display: block; text-align: center;
  background: var(--gradient);
  color: #fff; text-decoration: none; font-weight: 700; font-size: .95rem;
  padding: 15px 18px; border-radius: 14px;
  box-shadow: 0 6px 20px rgba(99,102,241,.35);
  transition: transform .12s ease, filter .12s ease;
}
.block:active { transform: scale(.98); filter: brightness(1.15); }
.divider { border-top: 1px solid rgba(139,92,246,.3); margin: 6px 0; }

/* ---------- footer / states ---------- */
.foot { text-align: center; margin-top: 30px; font-size: .8rem; color: var(--muted); }
.foot a { color: var(--muted); text-decoration: none; }
.foot strong {
  background: var(--gradient); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.state {
  min-height: 70vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  text-align: center; padding: 24px;
}
.state[hidden] { display: none; }
.state h2 { margin-bottom: 4px; }
.muted { color: var(--muted); font-size: .9rem; line-height: 1.6; }
.btn {
  display: inline-block; margin-top: 14px;
  background: var(--gradient); color: #fff; text-decoration: none; font-weight: 700;
  padding: 12px 26px; border-radius: 999px;
}
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(139,92,246,.25); border-top-color: var(--purple);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 640px) {
  .page { padding-top: 40px; }
  .name { font-size: 1.7rem; }
}

/* ---------- Page Editor block kinds ---------- */
.block.has-thumb {
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 10px 18px 10px 10px;
}
.block-thumb {
  width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none;
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.block-label { flex: 1; }
.card-block {
  display: block; text-decoration: none; color: var(--text);
  background: var(--bg2); border: 1px solid rgba(139,92,246,.3);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.card-block img { display: block; width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; }
.card-meta { display: block; padding: 12px 16px; }
.card-meta strong { display: block; font-size: .95rem; }
.card-meta small { color: var(--muted); font-size: .82rem; }
.text-block {
  color: var(--text); font-size: .92rem; line-height: 1.65;
  padding: 4px 6px; text-align: left;
}
.header-block { text-align: center; padding: 6px 0 2px; }
.header-block h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 4px; }
.header-block p { color: var(--muted); font-size: .88rem; }
.social-row {
  display: flex; justify-content: center; gap: 12px; flex-wrap: wrap;
  padding: 4px 0;
}
.soc {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; text-decoration: none;
  background: var(--gradient); box-shadow: 0 6px 20px rgba(99,102,241,.35);
}
.video-block { border-radius: 14px; overflow: hidden; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.video-block iframe { display: block; width: 100%; aspect-ratio: 16/9; border: 0; }
.embed-block { border-radius: 14px; overflow: hidden; }
.embed-block iframe { display: block; width: 100%; border: 0; }
.capture-block {
  background: var(--bg2); border: 1px solid rgba(139,92,246,.35);
  border-radius: 14px; padding: 18px; text-align: center;
  display: flex; flex-direction: column; gap: 10px;
}
.capture-block strong { font-size: 1rem; }
.capture-block p { color: var(--muted); font-size: .85rem; }
.cap-input {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid rgba(139,92,246,.4); background: rgba(0,0,0,.25);
  color: var(--text); font-size: .9rem;
}
.cap-btn {
  background: var(--gradient); color: #fff; font-weight: 800; font-size: .9rem;
  border: 0; border-radius: 999px; padding: 12px; cursor: pointer;
}
.capture-block.is-inactive { opacity: .75; border-style: dashed; }
.cap-note { font-size: .75rem !important; }

/* ---------- link style variants (Page Editor > Design) ---------- */
#blocks.ls-solid .block { background: var(--accent); box-shadow: 0 6px 20px rgba(0,0,0,.35); }
#blocks.ls-outline .block {
  background: transparent; border: 2px solid var(--accent);
  color: var(--accent); box-shadow: none;
}
#blocks.ls-outline .block.has-thumb .block-thumb { background: rgba(139,92,246,.12); }

/* ---------- avatar shapes (Page Editor > Design) ---------- */
.avatar.av-rounded { border-radius: 22%; }
.avatar.av-square { border-radius: 14px; }

/* ---------- safe preview banner (preview.html only) ---------- */
.pv-banner {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #3b2f04; color: #ffe9a8; font-size: .82rem;
  padding: 10px 14px; border-bottom: 1px solid #8a6d1c;
}
.pv-banner a { color: #ffe9a8; font-weight: 700; }
.pv-slot-note {
  border: 1px dashed rgba(139,92,246,.5); border-radius: 12px;
  padding: 12px; text-align: center; color: var(--muted);
  font-size: .78rem; letter-spacing: .06em;
}

/* ============================================================
   Page rehaul v2: cover header, verified badge, share button,
   8 link styles, and the new block kinds (shout, music, qr,
   countdown).
   ============================================================ */

/* ---------- profile glow-up ---------- */
.profile { position: relative; }
.cover {
  height: 150px; margin: -26px -18px 0;
  background-size: cover; background-position: center;
  border-radius: 0 0 18px 18px; position: relative;
}
.cover::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 25%, var(--bg) 98%);
  border-radius: inherit;
}
.profile.has-cover .avatar {
  margin-top: -34px; position: relative; z-index: 2;
  border: 3px solid var(--bg);
}
.verified { display: inline-flex; vertical-align: -3px; margin-left: 6px; }
.verified svg { width: 20px; height: 20px; display: block; }
.verified svg circle { fill: var(--accent); }
.page-loc { color: var(--muted); font-size: .82rem; margin-top: 6px; }
.share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px; padding: 8px 18px; border-radius: 999px;
  border: 1px solid rgba(139,92,246,.5); background: rgba(139,92,246,.12);
  color: var(--text); font-size: .82rem; font-weight: 700; cursor: pointer;
}
.share-btn svg { width: 15px; height: 15px; display: block; }
.share-btn.copied { border-color: #22c55e; color: #22c55e; }

/* ---------- link style variants (Page Editor > Design) ---------- */
#blocks.ls-glass .block {
  background: rgba(255,255,255,.08);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.2); color: var(--text);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
#blocks.ls-glass .block.has-thumb .block-thumb { background: rgba(255,255,255,.14); }
#blocks.ls-neon .block {
  background: rgba(5,5,15,.55); border: 2px solid var(--accent); color: #fff;
  text-shadow: 0 0 10px var(--accent);
  box-shadow: 0 0 18px rgba(139,92,246,.45), inset 0 0 14px rgba(139,92,246,.18);
}
#blocks.ls-pill .block {
  border-radius: 999px; padding: 17px 22px;
  font-size: 1rem; letter-spacing: .02em;
}
#blocks.ls-shadow .block {
  background: #fff; color: #151524; border: 2px solid #151524;
  border-radius: 12px; box-shadow: 6px 6px 0 var(--accent);
}
#blocks.ls-shadow .block.has-thumb .block-thumb { background: rgba(0,0,0,.06); }
#blocks.ls-minimal .block {
  background: transparent; box-shadow: none; border-radius: 0;
  border-bottom: 1px solid rgba(139,92,246,.35); color: var(--text);
  text-align: left; padding: 14px 4px; font-weight: 600;
}
#blocks.ls-minimal .block:active { background: rgba(139,92,246,.08); transform: none; }

/* ---------- shout block (creator post) ---------- */
.shout-block {
  background: var(--bg2); border: 1px solid rgba(139,92,246,.3);
  border-radius: 16px; padding: 14px;
}
.shout-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.shout-ava {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: var(--gradient); color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.shout-ava img { width: 100%; height: 100%; object-fit: cover; }
.shout-meta strong { display: block; font-size: .88rem; }
.shout-meta small { color: var(--muted); font-size: .75rem; }
.shout-text { font-size: .92rem; line-height: 1.6; margin-bottom: 8px; }
.shout-text:last-child { margin-bottom: 0; }
.shout-img { width: 100%; border-radius: 12px; display: block; }

/* ---------- music block ---------- */
.music-block { border-radius: 14px; overflow: hidden; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.music-block iframe { display: block; width: 100%; height: 152px; border: 0; }

/* ---------- QR block ---------- */
.qr-block {
  text-align: center; background: var(--bg2);
  border: 1px solid rgba(139,92,246,.3); border-radius: 16px; padding: 18px;
}
.qr-block img {
  width: 180px; height: 180px; border-radius: 12px;
  background: #fff; padding: 8px;
}
.qr-block p { color: var(--muted); font-size: .82rem; margin-top: 10px; }

/* ---------- countdown block ---------- */
.countdown-block {
  background: var(--gradient); border-radius: 16px; padding: 18px;
  text-align: center; color: #fff;
  box-shadow: 0 6px 20px rgba(99,102,241,.35);
}
.countdown-block > strong { font-size: 1rem; letter-spacing: .03em; }
.cd-timer { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.cd-cell {
  background: rgba(0,0,0,.28); border-radius: 12px;
  padding: 10px 0; min-width: 62px;
}
.cd-cell b { display: block; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.cd-cell i {
  font-style: normal; font-size: .66rem; opacity: .8;
  text-transform: uppercase; letter-spacing: .08em;
}
.cd-live { font-weight: 800; letter-spacing: .1em; }

/* ---------- misc ---------- */
.video-cap { text-align: center; color: var(--muted); font-size: .82rem; margin-top: 8px; }
.soc svg { width: 22px; height: 22px; display: block; }
