:root {
  --bg: #0b0b0d;
  --bg-2: #131316;
  --ink: #f3f1ec;
  --muted: #9b988f;
  --accent: #e9a23c;
  --accent-ink: #1a1407;
  --like: #ff4d6d;
  --line: rgba(243, 241, 236, 0.12);
  --radius: 6px;
  --display: "Unbounded", "Oswald", system-ui, sans-serif;
  --body: "Manrope", system-ui, -apple-system, sans-serif;
  --maxw: 1320px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 500;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.ph, [class^="ph-"], [class*=" ph-"] { line-height: 1; }

.eyebrow {
  display: inline-block;
  font-weight: 700;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--accent);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; font-size: 0.98rem;
  border: 1px solid var(--accent); border-radius: var(--radius);
  white-space: nowrap; cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), background 0.18s;
}
.btn:hover { background: #f3b659; }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: rgba(243, 241, 236, 0.06); border-color: var(--ink); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 60; height: 64px;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0 clamp(1rem, 4vw, 3rem);
  background: linear-gradient(to bottom, rgba(11, 11, 13, 0.75), rgba(11, 11, 13, 0));
  backdrop-filter: blur(8px);
}
.nav-brand { font-family: var(--display); font-weight: 800; font-size: 1.15rem; letter-spacing: 0.12em; }
.nav-right {
  display: flex; align-items: center; gap: 1.4rem; margin-left: auto;
  font-size: 0.86rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em;
}
.nav-right a { color: var(--muted); transition: color 0.15s; }
.nav-right a:hover { color: var(--ink); }
.nav-year { color: var(--accent); font-family: var(--display); letter-spacing: 0.08em; }
.nav-acct {
  font: inherit; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent);
  border: 1px solid var(--accent); border-radius: 100px;
  padding: 0.4rem 0.85rem; cursor: pointer; transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.nav-acct:hover { background: #f3b659; }
.nav-acct.in { background: transparent; color: var(--ink); border-color: var(--line); text-transform: none; letter-spacing: 0.02em; }
.nav-acct.in:hover { border-color: var(--ink); }

/* ---------- Auth modal ---------- */
.auth { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 1.2rem; opacity: 0; visibility: hidden; transition: opacity 0.26s, visibility 0.26s; }
.auth.open { opacity: 1; visibility: visible; }
.auth-backdrop { position: absolute; inset: 0; background: rgba(5, 5, 6, 0.78); backdrop-filter: blur(6px); }
.auth-panel {
  position: relative; z-index: 2; width: min(400px, 100%);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px;
  padding: clamp(1.6rem, 4vw, 2.2rem);
  transform: translateY(14px) scale(0.98); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.auth.open .auth-panel { transform: none; }
.auth-close { position: absolute; top: 0.8rem; right: 0.8rem; width: 36px; height: 36px; display: grid; place-items: center; background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.05rem; }
.auth-close:hover { color: var(--ink); }
.auth-panel h3 { font-family: var(--display); font-weight: 700; font-size: 1.8rem; margin: 0.6rem 0 0.4rem; }
.auth-sub { color: var(--muted); font-size: 0.94rem; margin-bottom: 1.3rem; }
.auth-form { display: flex; flex-direction: column; gap: 0.9rem; }
.auth-form label { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.auth-form input { background: rgba(243, 241, 236, 0.06); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 0.9rem; color: var(--ink); font: inherit; font-size: 1rem; }
.auth-form input::placeholder { color: rgba(155, 152, 143, 0.7); }
.auth-form input:focus { outline: none; border-color: var(--accent); }
.auth-form .btn { margin-top: 0.4rem; width: 100%; }
.auth-error { color: var(--like); font-size: 0.86rem; min-height: 1.1em; margin: -0.2rem 0 0; }
.auth-error:empty { min-height: 0; }
.auth-toggle { display: block; width: 100%; margin-top: 1rem; background: none; border: none; color: var(--accent); font: inherit; font-weight: 700; font-size: 0.9rem; cursor: pointer; }
.auth-toggle:hover { text-decoration: underline; }
.auth-note { margin-top: 1rem; color: var(--muted); font-size: 0.76rem; line-height: 1.4; text-align: center; opacity: 0.8; }

/* ---------- Upload FAB ---------- */
.fab {
  position: fixed; right: clamp(1rem, 3vw, 2.2rem); bottom: clamp(1.4rem, 5vh, 2.6rem); z-index: 90;
  width: 58px; height: 58px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
  border: none; border-radius: 50%; cursor: pointer; font-size: 1.7rem;
  box-shadow: 0 14px 34px rgba(233, 162, 60, 0.4);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), background 0.18s;
}
.fab:hover { background: #f3b659; transform: scale(1.06); }
.fab:active { transform: scale(0.94); }
.fab[hidden] { display: none; }

/* ---------- Profile menu ---------- */
.profile-panel { text-align: center; width: min(340px, 100%); }
.profile-ava {
  width: 72px; height: 72px; margin: 0.4rem auto 0.8rem; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--display); font-weight: 800; font-size: 1.7rem; border-radius: 50%; text-transform: uppercase;
}
.profile-panel h3 { margin: 0 0 0.5rem; }
.profile-role {
  display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted); border: 1px solid var(--line); border-radius: 100px; padding: 0.25rem 0.7rem;
}
.profile-role.can { color: var(--accent); border-color: rgba(233, 162, 60, 0.4); }
.profile-actions { display: flex; flex-direction: column; gap: 0.7rem; margin-top: 1.4rem; }
.profile-actions .btn { width: 100%; }
.profile-actions .btn[hidden] { display: none; }

/* ---------- Upload form extras ---------- */
.auth-form label .opt { font-weight: 600; text-transform: none; letter-spacing: 0; color: rgba(155, 152, 143, 0.7); font-size: 0.72rem; }
.file-pick {
  flex-direction: row !important; align-items: center !important; gap: 0.7rem !important;
  background: rgba(243, 241, 236, 0.06); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 1rem; cursor: pointer; text-transform: none !important; letter-spacing: 0 !important;
  color: var(--ink) !important; font-weight: 600 !important; font-size: 0.95rem !important;
  transition: border-color 0.18s, background 0.18s;
}
.file-pick:hover { border-color: var(--accent); background: rgba(243, 241, 236, 0.09); }
.file-pick i { font-size: 1.3rem; color: var(--accent); }
.file-pick.has-file { border-style: solid; border-color: var(--accent); }
.file-pick #fileName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn.loading { opacity: 0.7; pointer-events: none; }

/* ---------- Seen badge ---------- */
.reel-seen {
  position: absolute; top: 0.9rem; right: 0.9rem; z-index: 4;
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: rgba(11, 11, 13, 0.62); color: var(--ink);
  border: 1px solid var(--line); border-radius: 100px;
  padding: 0.32rem 0.7rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  backdrop-filter: blur(6px); opacity: 0; transform: translateY(-4px); transition: opacity 0.25s, transform 0.25s;
}
.reel.seen .reel-seen { opacity: 1; transform: none; }
.reel-seen i { font-size: 0.9rem; color: var(--accent); }

/* ---------- Hero slider (photos shown in full) ---------- */
.hero { position: relative; min-height: 100dvh; display: flex; align-items: flex-end; }
.hero-photo { position: absolute; inset: 0; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.hero-veil {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(11, 11, 13, 0.94) 4%, rgba(11, 11, 13, 0.2) 34%, rgba(11, 11, 13, 0) 58%),
              linear-gradient(to right, rgba(11, 11, 13, 0.5), rgba(11, 11, 13, 0) 42%);
}

.hero-copy { position: relative; z-index: 5; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 3rem) clamp(2.5rem, 7vh, 5rem); }
.hero-title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(3.5rem, 13vw, 11rem); line-height: 0.92; letter-spacing: 0.01em;
  margin: 0.7rem 0 0.6rem; display: flex; align-items: baseline; gap: 0.2em; flex-wrap: wrap;
}
.hero-mark { font-size: 0.34em; font-weight: 500; color: var(--accent); }
.hero-sub { font-size: clamp(1.05rem, 1.7vw, 1.4rem); max-width: 36ch; margin-bottom: 1.7rem; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55); }

/* ---------- Shatter ---------- */
.shatter { position: relative; height: 240vh; background: var(--bg); }
.shatter-stage { position: sticky; top: 0; height: 100dvh; display: grid; place-items: center; overflow: hidden; }
.shatter-frame { position: relative; width: min(86vw, 1040px); aspect-ratio: 16 / 9; }
.shatter-grid { --p: 0; position: absolute; inset: 0; display: grid; border-radius: var(--radius); overflow: visible; }
.tile {
  position: relative; background-image: var(--photo); background-repeat: no-repeat; transform-origin: center;
  transform: translate(calc(var(--dx) * var(--p)), calc(var(--dy) * var(--p))) rotate(calc(var(--rz) * var(--p))) scale(calc(1 + var(--p) * 0.25));
  opacity: calc(1 - var(--p) * 0.82); will-change: transform, opacity;
}
.shatter-caption { position: absolute; z-index: 5; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(92vw, 880px); text-align: center; pointer-events: none; mix-blend-mode: difference; opacity: calc(0.15 + var(--cap, 0) * 0.85); }
.shatter-caption h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 4.2vw, 3.4rem); line-height: 1.12; color: #fff; }

/* ---------- Reels ---------- */
.reels {
  position: relative; height: 100dvh; background: #050506;
  overflow-y: auto; overflow-x: hidden;
  scroll-snap-type: y mandatory; -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
}
.reels::-webkit-scrollbar { display: none; }
.reels-track { outline: none; }
.reel { height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 1rem; scroll-snap-align: start; scroll-snap-stop: always; }
.reels-empty { color: var(--muted); text-align: center; font-size: 1rem; }
.reel-media video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.reel-mute { position: absolute; top: 0.9rem; left: 0.9rem; z-index: 3; width: 38px; height: 38px; display: grid; place-items: center; background: rgba(11, 11, 13, 0.5); color: var(--ink); border: 1px solid var(--line); border-radius: 50%; cursor: pointer; font-size: 1rem; }
.reel-mute:hover { background: rgba(11, 11, 13, 0.75); }
.reel-media {
  --card-w: min(430px, 92vw);
  position: relative; width: var(--card-w); height: min(86dvh, calc(var(--card-w) * 1.62));
  border-radius: 16px; overflow: hidden; background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); border: 1px solid var(--line);
}
.reel-media img { width: 100%; height: 100%; object-fit: cover; }
.reel-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 2%, rgba(0, 0, 0, 0) 36%), linear-gradient(to bottom, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0) 22%); }
.reel-meta { position: absolute; left: 0; right: 64px; bottom: 0; padding: 1.2rem 1.2rem 1.4rem; }
.reel-author { font-weight: 700; font-size: 0.9rem; color: var(--accent); }
.reel-title { font-family: var(--display); font-weight: 700; font-size: 1.5rem; line-height: 1.05; margin: 0.35rem 0 0.4rem; }
.reel-caption { font-size: 0.92rem; color: rgba(243, 241, 236, 0.82); }
.reel-actions { position: absolute; right: 0.7rem; bottom: 1.2rem; display: flex; flex-direction: column; gap: 1.1rem; }
.act {
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  background: none; border: none; cursor: pointer; color: var(--ink);
  font-family: var(--body); font-weight: 700; font-size: 0.78rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
  -webkit-tap-highlight-color: transparent;
}
.act i { font-size: 1.85rem; transition: transform 0.18s, color 0.18s; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45)); }
.act:hover i { transform: scale(1.12); }
.act:active i { transform: scale(0.9); }
.act.like.on i { color: var(--like); }
.act.like.pop i { animation: pop 0.4s cubic-bezier(0.18, 1.4, 0.4, 1); }
@keyframes pop { 0% { transform: scale(1); } 45% { transform: scale(1.4); } 100% { transform: scale(1); } }

/* video progress (thin scrubber at the bottom edge) */
.reel-progress { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; height: 3px; background: rgba(255, 255, 255, 0.18); opacity: 0; transition: opacity 0.3s; }
.reel.is-video .reel-progress { opacity: 1; }
.reel-progress span { display: block; height: 100%; width: 0; background: var(--ink); transition: width 0.12s linear; }

/* buffering spinner */
.reel-loader { position: absolute; inset: 0; z-index: 3; display: none; place-items: center; pointer-events: none; }
.reel.buffering .reel-loader { display: grid; }
.reel-loader .spinner { width: 40px; height: 40px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.22); border-top-color: var(--ink); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* center play/pause hint (shown while a video is tapped to pause) */
.reel-pause { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity 0.2s; }
.reel-pause i { font-size: 4.6rem; color: rgba(255, 255, 255, 0.94); filter: drop-shadow(0 6px 22px rgba(0, 0, 0, 0.55)); transform: scale(0.7); }
.reel.paused .reel-pause { opacity: 1; }
.reel.paused .reel-pause i { animation: pausepop 0.3s cubic-bezier(0.18, 1.2, 0.4, 1) forwards; }
@keyframes pausepop { from { transform: scale(0.7); opacity: 0.3; } to { transform: scale(1); opacity: 1; } }

/* double-tap heart burst */
.heart-burst { position: absolute; z-index: 5; pointer-events: none; color: var(--like); font-size: 6rem; transform: translate(-50%, -50%) scale(0.2); filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.45)); animation: burst 0.8s cubic-bezier(0.18, 1.2, 0.4, 1) forwards; }
@keyframes burst {
  0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0; }
  18% { opacity: 1; }
  42% { transform: translate(-50%, -50%) scale(1.18); }
  68% { transform: translate(-50%, -54%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -74%) scale(0.9); opacity: 0; }
}

.reels-nav {
  position: absolute; right: clamp(1rem, 3vw, 2.4rem); z-index: 6;
  width: 46px; height: 46px; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.08); color: var(--ink);
  border: 1px solid var(--line); border-radius: 50%; cursor: pointer; font-size: 1.1rem;
  backdrop-filter: blur(6px); transition: background 0.18s;
}
.reels-nav:hover { background: rgba(255, 255, 255, 0.16); }
.reels-nav.up { top: calc(50% - 56px); }
.reels-nav.down { top: calc(50% + 10px); }
.reels-progress { position: absolute; left: clamp(1rem, 3vw, 2.4rem); top: 50%; transform: translateY(-50%); z-index: 6; display: flex; flex-direction: column; gap: 0.5rem; }
.reels-progress span { width: 4px; height: 22px; border-radius: 2px; background: rgba(243, 241, 236, 0.25); transition: background 0.25s; }
.reels-progress span.on { background: var(--accent); }

/* ---------- Comment sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; opacity: 0; visibility: hidden; transition: opacity 0.28s, visibility 0.28s; }
.sheet.open { opacity: 1; visibility: visible; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(5, 5, 6, 0.7); backdrop-filter: blur(4px); }
.sheet-panel {
  position: relative; z-index: 2; width: min(520px, 100%);
  max-height: 76dvh; display: flex; flex-direction: column;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 18px 18px 0 0; overflow: hidden;
  transform: translateY(100%); transition: transform 0.34s cubic-bezier(0.16, 1, 0.3, 1);
}
.sheet.open .sheet-panel { transform: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); font-weight: 700; }
.sheet-close { width: 34px; height: 34px; display: grid; place-items: center; background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.1rem; }
.sheet-close:hover { color: var(--ink); }
.sheet-list { list-style: none; overflow-y: auto; padding: 0.6rem 1.2rem; flex: 1; display: flex; flex-direction: column; gap: 0.9rem; }
.sheet-list li { font-size: 0.95rem; line-height: 1.4; }
.sheet-list .cn { font-weight: 700; color: var(--ink); margin-right: 0.45rem; }
.sheet-list li { color: rgba(243, 241, 236, 0.82); }
.sheet-empty { color: var(--muted); font-size: 0.92rem; padding: 0.5rem 0; }
.sheet-form { display: flex; gap: 0.6rem; padding: 0.9rem 1.2rem calc(0.9rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.sheet-form input {
  flex: 1; background: rgba(243, 241, 236, 0.06); border: 1px solid var(--line); border-radius: 100px;
  padding: 0.7rem 1rem; color: var(--ink); font: inherit; font-size: 0.95rem;
}
.sheet-form input::placeholder { color: var(--muted); }
.sheet-form input:focus { outline: none; border-color: var(--accent); }
.sheet-send { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); border: none; border-radius: 50%; cursor: pointer; font-size: 1.15rem; }
.sheet-send:hover { background: #f3b659; }

/* ---------- Footer ---------- */
.footer { text-align: center; padding: clamp(4rem, 12vh, 9rem) clamp(1rem, 4vw, 3rem) clamp(2.5rem, 6vh, 4rem); background: radial-gradient(110% 80% at 50% 0%, rgba(233, 162, 60, 0.08), transparent 58%), var(--bg-2); border-top: 1px solid var(--line); }
.footer-title { font-family: var(--display); font-weight: 800; font-size: clamp(2.6rem, 9vw, 7.5rem); line-height: 0.9; margin-bottom: 2rem; }
.footer-copy { margin-top: 1.6rem; color: var(--muted); font-size: 0.85rem; }

/* ---------- Home preview grid ---------- */
.grid { max-width: var(--maxw); margin: 0 auto; padding: clamp(2.5rem, 7vh, 5rem) clamp(1rem, 4vw, 3rem) clamp(3.5rem, 9vh, 6rem); }
.grid-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.grid-title { font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1; }
.grid-all { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--accent); font-weight: 700; font-size: 0.9rem; transition: gap 0.18s; }
.grid-all i { font-size: 1.2rem; }
.grid-all:hover { gap: 0.6rem; }
.grid-items { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.45rem; }
.tile { display: block; -webkit-tap-highlight-color: transparent; }
.tile-media { position: relative; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); }
.tile-media img, .tile-media video { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1); }
.tile:hover .tile-media img, .tile:hover .tile-media video { transform: scale(1.06); }
.tile-play { position: absolute; top: 0.5rem; right: 0.5rem; width: 26px; height: 26px; display: grid; place-items: center; background: rgba(11, 11, 13, 0.5); border-radius: 50%; color: var(--ink); font-size: 0.8rem; backdrop-filter: blur(4px); }
.tile-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.6rem 0.65rem 0.55rem; font-family: var(--display); font-weight: 700; font-size: 0.82rem; line-height: 1.1; background: linear-gradient(to top, rgba(0, 0, 0, 0.78), transparent); }
@media (min-width: 560px) { .grid-items { grid-template-columns: repeat(3, 1fr); gap: 0.6rem; } }
@media (min-width: 900px) { .grid-items { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1240px) { .grid-items { grid-template-columns: repeat(5, 1fr); } }

/* upload FAB belongs to the feed page only */
.page-home .fab { display: none !important; }
/* back affordance in the feed-page nav */
.nav-brand.back { display: inline-flex; align-items: center; gap: 0.3rem; }
.nav-brand.back i { font-size: 1.1rem; color: var(--accent); }

/* ---------- User profile page ---------- */
.userpage { padding-top: 64px; min-height: 100dvh; }
.profile-hero { max-width: var(--maxw); margin: 0 auto; padding: clamp(2rem, 6vh, 3.5rem) clamp(1rem, 4vw, 3rem) 1.5rem; display: flex; flex-direction: column; align-items: center; text-align: center; }
.profile-ava-lg { width: 96px; height: 96px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-family: var(--display); font-weight: 800; font-size: 2.4rem; border-radius: 50%; text-transform: uppercase; }
.profile-name { font-family: var(--display); font-weight: 800; font-size: clamp(1.8rem, 6vw, 2.8rem); margin: 1rem 0 0.6rem; }
.profile-stat { color: var(--muted); font-size: 0.9rem; margin-top: 0.8rem; max-width: 40ch; }
.grid-flush { padding-top: 1rem; }
.page-user .fab { display: none !important; }

/* clickable author / commenter */
.reel-author { transition: opacity 0.15s; }
.reel-author:hover { opacity: 0.82; text-decoration: underline; }
.sheet-list a.cn { color: var(--ink); font-weight: 700; margin-right: 0.45rem; transition: color 0.15s; }
.sheet-list a.cn:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
  /* fullbleed reels: edge-to-edge like Instagram/TikTok */
  .reel { padding: 0; }
  .reel-media {
    width: 100%; height: 100dvh; max-height: none;
    border-radius: 0; border: none; box-shadow: none;
  }
  .reels-nav, .reels-progress { display: none; }

  /* keep top controls clear of the fixed nav + notch */
  .reel-mute, .reel-seen { top: calc(env(safe-area-inset-top) + 4.4rem); }

  /* bigger touch targets, lifted above the home indicator */
  .reel-actions { right: 0.5rem; bottom: calc(env(safe-area-inset-bottom) + 1.4rem); gap: 1.45rem; }
  .act i { font-size: 2.05rem; }
  .reel-meta { right: 4.6rem; padding-bottom: calc(env(safe-area-inset-bottom) + 1.4rem); }
  .reel-progress { bottom: env(safe-area-inset-bottom); }

  /* upload lives in the profile menu on mobile (clean feed, no floating button) */
  .fab { display: none !important; }

  /* compact nav over the immersive feed */
  .nav { gap: 1rem; }
  .nav-year { display: none; }
}

/* Mobile: shatter is a short static section (no 240vh scroll-jack that blocks reels) */
@media (max-width: 760px) {
  .shatter { height: auto; }
  .shatter-stage { position: relative; height: auto; padding: 3rem 0 2rem; }
  .shatter-frame { width: 92vw; }
  .tile { transform: none !important; opacity: 1 !important; }
  .shatter-caption { position: static; transform: none; mix-blend-mode: normal; opacity: 1; margin: 1.5rem auto 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slides.animate { transition: none; }
  .tile { transform: none !important; opacity: 1 !important; }
  .shatter { height: auto; }
  .shatter-stage { position: relative; height: auto; padding: 4rem 0; }
  .shatter-caption { mix-blend-mode: normal; opacity: 1; position: static; transform: none; margin-top: 2rem; }
  .reels-viewport { scroll-behavior: auto; }
}

/* ============ MODERATION / ADMIN ============ */
.ban-badge {
  display: inline-block; margin: 0.2rem 0; padding: 0.22rem 0.7rem;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
  color: #ff6b5e; border: 1px solid rgba(255, 107, 94, 0.5);
  background: rgba(255, 107, 94, 0.1); border-radius: 100px;
}

.admin-mod {
  max-width: 620px; margin: 1.4rem auto 0; padding: 1.1rem 1.2rem;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px;
}
.admin-mod-title { display: flex; align-items: center; gap: 0.45rem; font-family: var(--display); font-size: 1rem; margin: 0 0 0.5rem; }
.admin-mod-title i { color: var(--accent); }
.admin-mod-status { color: var(--muted); font-size: 0.86rem; margin: 0 0 0.9rem; }
.admin-mod-row { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-bottom: 0.8rem; }
.admin-mod-row .btn { flex: 1 1 auto; min-width: 160px; }
.admin-mod-ban { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.admin-mod-label { color: var(--muted); font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.admin-mod-err { color: #ff6b5e; font-size: 0.82rem; margin: 0.6rem 0 0; min-height: 1em; }
.chip {
  background: rgba(243, 241, 236, 0.06); color: var(--ink);
  border: 1px solid var(--line); border-radius: 100px;
  padding: 0.4rem 0.85rem; font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.chip:hover { border-color: var(--accent); }
.chip-danger:hover { border-color: #ff6b5e; color: #ff6b5e; }

/* post tiles: admin hide/delete (visible only when grid has .admin-on) */
.tile-admin { position: absolute; top: 6px; right: 6px; display: none; gap: 6px; z-index: 3; }
.grid-items.admin-on .tile-admin { display: flex; }
.tile-x {
  width: 30px; height: 30px; display: grid; place-items: center;
  background: rgba(11, 11, 13, 0.78); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: 0.95rem;
  backdrop-filter: blur(4px);
}
.tile-x:hover { border-color: var(--accent); }
.tile-del:hover { border-color: #ff6b5e; color: #ff6b5e; }

/* comment delete (admin) */
.sheet-list li { position: relative; }
.c-del {
  margin-left: 0.5rem; background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 0.92rem; padding: 0 0.15rem; vertical-align: middle;
}
.c-del:hover { color: #ff6b5e; }
