@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,650&family=Inter:wght@400;500;600;700&display=swap');

/* ---------------------------------------------------------
   AIverse — token system (elegant dark / champagne-gold)
   void   #0B0B0D   panel  #17171A   panel-2 #1E1E22
   line   rgba(255,255,255,.09)   gold #E7B24C   gold-bright #F5C86B
   text   #F6F4EF   muted  #A6A399
--------------------------------------------------------- */

:root {
  --void: #0B0B0D;
  --void-deep: #07070A;
  --panel: #17171A;
  --panel-2: #1E1E22;
  --line: rgba(255,255,255,0.09);
  --line-strong: rgba(255,255,255,0.16);
  --gold: #E7B24C;
  --gold-bright: #F5C86B;
  --gold-dim: rgba(231,178,76,0.14);
  --text: #F6F4EF;
  --muted: #A6A399;
  --muted-2: #726F63;
  --danger: #F0776B;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--void);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

button, input, select, textarea {
  font-family: inherit;
}

a { color: inherit; text-decoration: none; }

button {
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}
button:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.search-input:focus, .field:focus, .comment-input:focus, .upload-textarea:focus, .reply-input:focus {
  outline: none;
}

.display { font-family: 'Fraunces', serif; font-optical-sizing: auto; }

.min-h-screen { min-height: 100vh; width: 100%; }

.hidden { display: none !important; }

/* ---------- layout helpers ---------- */
.container-6xl { max-width: 76rem; margin: 0 auto; padding: 0 1.5rem; }
.container-4xl { max-width: 56rem; margin: 0 auto; padding: 0 1.5rem; }

.flex { display: flex; }
.flex-1 { flex: 1 1 0%; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.relative { position: relative; }
.text-center { text-align: center; }
.w-full { width: 100%; }

/* ---------- Logo ---------- */
.logo { display: flex; align-items: center; gap: .55rem; user-select: none; }
.logo-mark {
  display: flex; align-items: center; justify-content: center;
  border-radius: .7rem;
  background: linear-gradient(150deg, var(--gold-bright), #9C6B1F);
  box-shadow: 0 0 20px rgba(231,178,76,0.35);
}
.logo-word { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }

/* ---------- Glass card ---------- */
.glass-card {
  border-radius: 1.1rem;
  border: 1px solid var(--line);
  background: rgba(23,23,26,0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ---------- Protected visual (gradient placeholder block) ---------- */
.protected-visual { position: relative; width: 100%; overflow: hidden; border-radius: 1rem; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.protected-visual.rounded-none { border-radius: 0; }
.protected-visual.rounded-xl { border-radius: .75rem; }
.protected-visual.rounded-2xl { border-radius: 1.1rem; }
.item-visual-ratio { aspect-ratio: 4 / 5; height: auto; }
.protected-visual .pv-fill { position: absolute; inset: 0; }
.protected-visual .pv-sheen {
  position: absolute; inset: 0; opacity: .22; mix-blend-mode: overlay;
  background-image: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.5), transparent 40%);
}
.protected-visual .pv-guard { position: absolute; inset: 0; }
.h-28 { height: 7rem; }
.h-44 { height: 11rem; }
.h-52 { height: 13rem; }
.h-64 { height: 16rem; }
.h-detail { height: 32rem; }

/* ---------- icon button ---------- */
.icon-btn {
  width: 2rem; height: 2rem; border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8,8,10,0.6); border: 1px solid rgba(231,178,76,0.28);
  transition: background .15s, border-color .15s, transform .1s;
}
.icon-btn:active { transform: scale(.92); }
.icon-btn.active { background: var(--gold); border: none; }

.pill-btn {
  width: 2rem; height: 2rem; border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8,8,10,0.6);
}

/* ---------- avatar ---------- */
.avatar {
  border-radius: 9999px; display: flex; align-items: center; justify-content: center;
  font-weight: 600; flex-shrink: 0; color: var(--void);
  background: linear-gradient(150deg, var(--gold-bright), #9C6B1F);
}
.avatar-sm { width: 30px; height: 30px; font-size: 11.5px; }

/* ---------- auth screen ---------- */
.auth-screen {
  min-height: 100vh; width: 100%; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; background:
    radial-gradient(ellipse 70% 55% at 50% -10%, rgba(231,178,76,0.09), transparent 60%),
    var(--void-deep);
}
.auth-glow-a {
  position: absolute; top: -12rem; left: -12rem; width: 34rem; height: 34rem;
  border-radius: 9999px; filter: blur(100px); opacity: .16; background: var(--gold);
}
.auth-glow-b {
  position: absolute; bottom: -12rem; right: -6rem; width: 30rem; height: 30rem;
  border-radius: 9999px; filter: blur(100px); opacity: .12; background: #9C6B1F;
}
.auth-card { width: 392px; max-width: 90vw; padding: 2.25rem 2rem; position: relative; z-index: 10; }
.auth-tabs { display: flex; border-radius: .8rem; padding: .25rem; margin-bottom: 1.6rem; background: var(--void-deep); }
.auth-tab {
  flex: 1; padding: .55rem 0; border-radius: .55rem; font-size: .875rem; font-weight: 500;
  color: var(--muted); background: transparent; transition: all .18s;
}
.auth-tab.active { background: linear-gradient(135deg, var(--gold-bright), var(--gold)); color: var(--void); }
.auth-fields { display: flex; flex-direction: column; gap: .75rem; }
.field {
  width: 100%; padding: .8rem 1rem; border-radius: .8rem; font-size: .875rem;
  background: var(--void-deep); color: var(--text); border: 1px solid var(--line); outline: none;
  transition: border-color .15s;
}
.field:focus { border-color: var(--gold); }
.field-error { color: var(--danger); font-size: .8rem; margin-top: .5rem; min-height: 1rem; }
.btn-cta {
  width: 100%; margin-top: 1.35rem; padding: .8rem 0; border-radius: .8rem;
  font-size: .875rem; font-weight: 600; color: var(--void);
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  box-shadow: 0 10px 26px rgba(231,178,76,0.24);
  transition: transform .12s, box-shadow .15s;
}
.btn-cta:hover { box-shadow: 0 12px 30px rgba(231,178,76,0.32); }
.btn-cta:active { transform: scale(.98); }
.btn-cta:disabled { opacity: .6; cursor: not-allowed; }
.auth-divider { display: flex; align-items: center; gap: .75rem; margin: 1.35rem 0; color: var(--muted-2); font-size: .74rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-google {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .72rem 0; border-radius: .8rem; font-size: .84rem; font-weight: 500;
  background: var(--void-deep); color: var(--text); border: 1px solid var(--line-strong);
  transition: border-color .15s, background .15s;
}
.btn-google:hover { border-color: var(--muted-2); background: #101012; }
.auth-footnote { text-align: center; font-size: .75rem; margin-top: 1.1rem; color: var(--muted-2); }

/* ---------- top nav ---------- */
.topnav {
  position: sticky; top: 0; z-index: 30; width: 100%; border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(11,11,13,0.86); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.topnav-inner { height: 4.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.nav-links { display: flex; align-items: center; gap: .35rem; flex: 1; margin-left: 1.5rem; }
.nav-link {
  display: flex; align-items: center; gap: .4rem; padding: .5rem .9rem; border-radius: .6rem;
  font-size: .84rem; font-weight: 500; color: var(--muted); transition: background .15s, color .15s;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-link.active { background: var(--gold-dim); color: var(--gold-bright); }
.upload-btn {
  display: flex; align-items: center; gap: .4rem; padding: .55rem 1rem; border-radius: .7rem;
  font-size: .82rem; font-weight: 600; color: var(--void); flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  transition: transform .1s, box-shadow .15s; box-shadow: 0 6px 18px rgba(231,178,76,0.22);
}
.upload-btn:hover { box-shadow: 0 8px 22px rgba(231,178,76,0.3); }
.upload-btn:active { transform: scale(.96); }
.nav-browse-pill {
  display: flex; align-items: center; gap: .4rem; padding: .5rem .9rem; border-radius: .5rem;
  font-size: .875rem; font-weight: 500; background: var(--panel); color: var(--gold-bright);
}
.nav-menu {
  position: absolute; right: 0; margin-top: .5rem; width: 12rem; padding: .35rem;
}
.nav-menu-item {
  width: 100%; display: flex; align-items: center; gap: .5rem; padding: .5rem .75rem;
  border-radius: .5rem; font-size: .875rem; text-align: left;
}
.nav-menu-item:hover { background: rgba(255,255,255,0.05); }

/* ---------- browse hero ---------- */
.browse-hero { padding: 2.75rem 0 1.75rem; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .4rem; font-size: .72rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--gold-bright);
  padding: .3rem .7rem; border-radius: 9999px; background: var(--gold-dim); border: 1px solid rgba(231,178,76,0.22);
}
.hero-title {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem); font-weight: 600; line-height: 1.12; letter-spacing: -0.015em;
  margin: .85rem 0 .6rem; max-width: 34rem;
}
.hero-title em { font-style: italic; color: var(--gold-bright); }
.hero-sub { font-size: .95rem; color: var(--muted); max-width: 30rem; line-height: 1.55; margin: 0; }

/* ---------- browse toolbar / filters ---------- */
.browse-toolbar { display: flex; gap: .75rem; align-items: center; margin-top: 2rem; }
.search-wrap {
  flex: 1; display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; border-radius: .9rem;
  background: var(--panel); border: 1px solid var(--line); transition: border-color .15s;
}
.search-wrap:focus-within { border-color: rgba(231,178,76,0.4); }
.search-input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: .875rem; }
.search-input::placeholder { color: var(--muted-2); }
.lang-select {
  padding: .8rem 1rem; border-radius: .9rem; background: var(--panel); color: var(--muted);
  border: 1px solid var(--line); font-size: .82rem; outline: none;
}
.filter-row { display: flex; gap: .55rem; flex-wrap: wrap; margin: 1.35rem 0 1.75rem; }
.filter-chip {
  padding: .5rem 1rem; border-radius: 9999px; font-size: .82rem; font-weight: 500;
  background: var(--panel); color: var(--muted); border: 1px solid var(--line);
  transition: all .15s;
}
.filter-chip:hover { color: var(--text); border-color: var(--line-strong); }
.filter-chip.active { background: linear-gradient(135deg, var(--gold-bright), var(--gold)); color: var(--void); border: none; font-weight: 600; }

/* ---------- grid / item cards (minimalist, image-first) ---------- */
.masonry { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.35rem; }
@media (max-width: 560px) { .masonry { grid-template-columns: 1fr 1fr; gap: .85rem; } }

.item-card { position: relative; }
.item-card-inner {
  position: relative; overflow: hidden; cursor: pointer; border-radius: 1.1rem;
  box-shadow: 0 8px 22px rgba(0,0,0,0.28);
  transition: transform .22s ease, box-shadow .22s ease;
}
.item-card-inner:hover { transform: translateY(-4px); box-shadow: 0 20px 42px rgba(0,0,0,0.48); }

.item-top-row { position: absolute; top: .7rem; left: .7rem; right: .7rem; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.item-badge {
  display: flex; align-items: center; gap: .3rem; font-size: 10px; font-weight: 700; letter-spacing: .03em;
  text-transform: uppercase; padding: .32rem .65rem; border-radius: 9999px; background: rgba(8,8,10,0.62);
  color: #fff; backdrop-filter: blur(4px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 68%;
}
.item-like-pill {
  display: flex; align-items: center; gap: .3rem; padding: .35rem .6rem; border-radius: 9999px;
  background: rgba(8,8,10,0.55); color: #fff; font-size: 11.5px; font-weight: 600;
  backdrop-filter: blur(4px); transition: background .15s, transform .1s; flex-shrink: 0;
}
.item-like-pill:active { transform: scale(.93); }
.item-like-pill.on { background: var(--gold); color: var(--void); }

.item-bottom-fade {
  position: absolute; inset-inline: 0; bottom: 0; z-index: 2; padding: 2.75rem .8rem .8rem;
  background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.4) 55%, transparent);
}
.item-caption {
  font-size: 12.5px; line-height: 1.45; color: rgba(255,255,255,0.94); margin: 0 0 .65rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.item-bottom-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.item-copy-pill {
  display: flex; align-items: center; gap: .35rem; padding: .4rem .75rem; border-radius: 9999px;
  background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.22); color: #fff;
  font-size: 11.5px; font-weight: 600; backdrop-filter: blur(6px); transition: background .15s, transform .1s;
}
.item-copy-pill:hover { background: rgba(255,255,255,0.24); }
.item-copy-pill:active { transform: scale(.94); }
.item-copy-pill.on { background: var(--gold); color: var(--void); border-color: transparent; }
.item-by { font-size: 11px; color: rgba(255,255,255,0.72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42%; }
.empty-note { font-size: .875rem; color: var(--muted-2); grid-column: 1 / -1; }

.play-badge { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 1; pointer-events: none; }
.play-circle {
  width: 3.4rem; height: 3.4rem; border-radius: 9999px; display: flex; align-items: center; justify-content: center;
  background: rgba(8,8,10,0.5); border: 1.5px solid rgba(255,255,255,0.5); backdrop-filter: blur(3px);
  transition: transform .18s, background .18s;
}
.item-card-inner:hover .play-circle { transform: scale(1.08); background: rgba(231,178,76,0.85); border-color: transparent; }
.play-triangle {
  width: 0; height: 0; margin-left: 4px;
  border-top: 9px solid transparent; border-bottom: 9px solid transparent; border-left: 14px solid #fff;
}
.h-detail .play-circle { width: 4.5rem; height: 4.5rem; }
.h-detail .play-triangle { border-top-width: 12px; border-bottom-width: 12px; border-left-width: 18px; }

/* ---------- detail page (fixed left media / scrolling right panel) ---------- */
.detail-fixed {
  position: fixed; inset: 0; z-index: 40;
  display: flex; background: var(--void);
}
.detail-left {
  position: relative;
  flex: 1 1 58%;
  height: 100%;
  background: #050505;
}
.detail-left .protected-visual { height: 100%; border-radius: 0; }
.detail-video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; z-index: 1; }
.detail-right {
  flex: 1 1 42%;
  height: 100%;
  min-width: 340px;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(255,255,255,0.06);
  background: var(--void);
}
@media (max-width: 860px) {
  .detail-fixed { flex-direction: column; }
  .detail-left { flex: 0 0 42vh; }
  .detail-right { max-width: none; min-width: 0; border-left: none; border-top: 1px solid rgba(255,255,255,0.06); }
}

/* minimal overlay controls on the image itself */
.detail-ctrl-tl, .detail-ctrl-tr {
  position: absolute; top: .85rem; z-index: 5;
  display: flex; align-items: center; gap: .5rem;
}
.detail-ctrl-tl { left: .85rem; }
.detail-ctrl-tr { right: .85rem; }
.ghost-btn {
  width: 2.15rem; height: 2.15rem; border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8,8,10,0.55); border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background .15s, transform .1s;
}
.ghost-btn:hover { background: rgba(8,8,10,0.82); }
.ghost-btn:active { transform: scale(.94); }
.ghost-btn.on { background: var(--gold); border-color: transparent; }

.detail-logo-btn {
  display: flex; align-items: center; justify-content: center;
  width: 2.2rem; height: 2.2rem; border-radius: .65rem;
  background: linear-gradient(150deg, var(--gold-bright), #9C6B1F);
  opacity: .55; transition: opacity .15s, transform .1s;
}
.detail-logo-btn:hover { opacity: .95; }
.detail-logo-btn:active { transform: scale(.92); }

.kebab-wrap { position: relative; }
.kebab-menu {
  position: absolute; top: 2.5rem; right: 0; width: 12.5rem; padding: .35rem; z-index: 6;
}
.kebab-menu-item {
  width: 100%; display: flex; align-items: center; gap: .55rem; padding: .55rem .7rem;
  border-radius: .5rem; font-size: .82rem; text-align: left; color: var(--text);
}
.kebab-menu-item:hover { background: rgba(255,255,255,0.06); }
.kebab-menu-item.danger { color: var(--danger); }

/* right panel: scrollable content + pinned footer */
.detail-scroll { flex: 1 1 auto; overflow-y: auto; padding: 1.85rem 1.5rem 1.5rem; }
.detail-footer {
  flex: 0 0 auto; display: flex; gap: .65rem; padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.06); background: rgba(8,8,10,0.55);
}
.cta-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .72rem 0; border-radius: .8rem; font-size: .84rem; font-weight: 600;
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  transition: all .15s;
}
.cta-btn.primary { background: linear-gradient(135deg, var(--gold-bright), var(--gold)); color: var(--void); border: none; }
.cta-btn:active { transform: scale(.98); }

.dp-source-row { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.dp-creator { display: flex; align-items: center; gap: .7rem; flex: 1; min-width: 0; }
.dp-creator-text { display: flex; flex-direction: column; justify-content: center; gap: .2rem; min-width: 0; }
.dp-creator-name-row { display: flex; align-items: center; gap: .35rem; line-height: 1; }
.dp-creator-name-row .creator-name { margin: 0; line-height: 1.2; font-family: 'Fraunces', serif; font-weight: 600; }
.dp-link-icon { display: inline-flex; align-items: center; opacity: .55; margin-top: 1px; transition: opacity .15s; }
.dp-link-icon:hover { opacity: .9; }
.creator-handle { margin: 0; line-height: 1.3; font-size: .82rem; color: var(--muted); }
.dp-source-col { display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; flex-shrink: 0; }
.dp-source-badge {
  display: flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 500;
  padding: .3rem .6rem; border-radius: 9999px; background: var(--panel); border: 1px solid var(--line);
  color: var(--muted); white-space: nowrap;
}
.follow-btn {
  display: flex; align-items: center; gap: .35rem; padding: .42rem .85rem; border-radius: 9999px;
  font-size: .78rem; font-weight: 600; white-space: nowrap;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold)); color: var(--void);
  transition: all .15s;
}
.follow-btn.on { background: var(--panel); color: var(--text); border: 1px solid var(--line-strong); }
.follow-btn:active { transform: scale(.96); }

.dp-engage-row { display: flex; align-items: center; gap: .6rem; margin-top: 1.35rem; }
.eng-btn {
  display: flex; align-items: center; gap: .4rem; padding: .55rem .9rem; border-radius: 9999px;
  font-size: .82rem; font-weight: 500; background: var(--panel); color: var(--text); border: 1px solid var(--line);
  transition: all .15s;
}
.eng-btn:active { transform: scale(.95); }
.eng-btn.on { background: var(--gold); color: var(--void); border: none; }
.eng-btn.icon-only { padding: .55rem; }
.eng-btn.copy { margin-left: auto; }
.eng-btn.copy.on { background: var(--gold); color: var(--void); }

.dp-prompt-block { margin-top: 1.5rem; padding-top: 1.3rem; border-top: 1px solid rgba(255,255,255,0.06); }
.dp-prompt-label { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted-2); }
.dp-prompt-text { font-size: .9rem; line-height: 1.7; color: #DEDCD3; margin: .65rem 0 0; }
.more-toggle { font-size: .78rem; font-weight: 500; margin-top: .65rem; color: var(--gold-bright); }

/* ---------- comments (between prompt and "more like this") ---------- */
.dp-comments-block { margin-top: 1.75rem; padding-top: 1.3rem; border-top: 1px solid rgba(255,255,255,0.06); }
.dp-comments-title { display: flex; align-items: center; gap: .5rem; font-size: .95rem; font-weight: 600; margin: 0 0 1.1rem; color: var(--text); }
.comments-count { color: var(--muted-2); font-family: 'Inter', sans-serif; font-weight: 500; font-size: .82rem; }
.comment-composer { display: flex; gap: .65rem; align-items: flex-start; margin-bottom: 1.4rem; }
.comment-input-wrap {
  flex: 1; display: flex; align-items: flex-end; gap: .5rem; border-bottom: 1px solid var(--line);
  padding-bottom: .5rem; transition: border-color .15s;
}
.comment-input-wrap:focus-within { border-color: var(--gold); }
.comment-input {
  flex: 1; background: none; border: none; outline: none; resize: none; color: var(--text);
  font-size: .85rem; line-height: 1.5; padding: .3rem 0; max-height: 6rem;
}
.comment-input::placeholder { color: var(--muted-2); }
.comment-submit-btn {
  font-size: .78rem; font-weight: 600; padding: .4rem .85rem; border-radius: 9999px;
  background: var(--gold); color: var(--void); transition: opacity .15s;
}
.comment-submit-btn:disabled { opacity: .3; cursor: not-allowed; }
.comment-list { display: flex; flex-direction: column; gap: 1.1rem; }
.comment-row { display: flex; gap: .65rem; align-items: flex-start; }
.comment-body { flex: 1; min-width: 0; }
.comment-meta { display: flex; align-items: baseline; gap: .5rem; }
.comment-name { font-size: .82rem; font-weight: 600; color: var(--text); }
.comment-time { font-size: .72rem; color: var(--muted-2); }
.comment-text { font-size: .84rem; line-height: 1.55; color: #DEDCD3; margin: .3rem 0 .4rem; word-break: break-word; }
.comment-like-btn { display: flex; align-items: center; gap: .3rem; font-size: .72rem; color: var(--muted-2); transition: color .15s; }
.comment-like-btn:hover { color: var(--text); }
.comment-like-btn.on { color: var(--gold-bright); }

.comment-thread { margin-bottom: 0; }
.comment-actions { display: flex; align-items: center; gap: 1rem; margin-top: .1rem; }
.comment-action-btn { display: flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 600; color: var(--muted-2); transition: color .15s; }
.comment-action-btn:hover { color: var(--gold-bright); }
.comment-pinned-tag { display: flex; align-items: center; gap: .3rem; font-size: .68rem; font-weight: 600; color: var(--gold-bright); margin-bottom: .3rem; text-transform: uppercase; letter-spacing: .03em; }
.comment-replies { margin: .8rem 0 0 1.2rem; padding-left: 1rem; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 1.1rem; }
.comment-toggle-replies {
  display: flex; align-items: center; gap: .3rem; margin: .6rem 0 0 3.05rem;
  font-size: .74rem; font-weight: 600; color: var(--gold-bright);
}
.reply-composer { margin-top: .8rem; }
.reply-composer .avatar-sm { width: 26px; height: 26px; font-size: 10.5px; }

.dp-more-block { margin-top: 1.9rem; }
.dp-more-title { font-size: .95rem; font-weight: 600; margin: 0 0 .8rem; color: var(--text); }
.dp-more-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem; }
.dp-more-item { cursor: pointer; }
.dp-more-item .protected-visual { height: 9rem; transition: filter .15s; }
.dp-more-item:hover .protected-visual { filter: brightness(1.12); }


/* ---------- profile page ---------- */
.profile-card { padding: 1.85rem; display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.profile-name-row { display: flex; align-items: center; gap: .55rem; }
.profile-name { font-size: 1.35rem; font-weight: 600; color: var(--text); margin: 0; }
.premium-pill { display: flex; align-items: center; gap: .25rem; padding: .18rem .55rem; border-radius: 9999px; font-size: 11px; font-weight: 500; background: var(--gold-dim); color: var(--gold-bright); border: 1px solid rgba(231,178,76,0.28); }
.profile-sub { font-size: .875rem; margin: .3rem 0 0; color: var(--muted-2); }
.tokens-block { text-align: right; }
.tokens-value { display: flex; align-items: center; gap: .4rem; justify-content: flex-end; color: var(--gold); }
.tokens-num { font-size: 1.6rem; font-weight: 600; }
.tokens-label { font-size: .75rem; margin: .1rem 0 0; color: var(--muted-2); }
.profile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.stat-card { padding: 1.1rem; display: flex; align-items: center; gap: .8rem; }
.stat-icon { width: 2.6rem; height: 2.6rem; border-radius: .8rem; display: flex; align-items: center; justify-content: center; background: var(--gold-dim); }
.stat-title { font-size: .875rem; font-weight: 500; color: var(--text); margin: 0; }
.stat-sub { font-size: .75rem; margin: 0; color: var(--muted-2); }

/* ---------- upload page ---------- */
.upload-tabs { display: flex; gap: .5rem; margin: 2rem 0 1.25rem; }
.upload-tab {
  display: flex; align-items: center; gap: .45rem; padding: .6rem 1.1rem; border-radius: .8rem;
  font-size: .84rem; font-weight: 500; background: var(--panel); color: var(--muted); border: 1px solid var(--line);
  transition: all .15s;
}
.upload-tab.active { background: linear-gradient(135deg, var(--gold-bright), var(--gold)); color: var(--void); border: none; font-weight: 600; }
.upload-card { padding: 1.75rem; margin-bottom: 3rem; }
.upload-dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: .4rem; padding: 2.25rem 1rem; border-radius: 1rem; border: 1.5px dashed var(--line-strong);
  cursor: pointer; transition: border-color .15s, background .15s; margin-bottom: 1.5rem;
}
.upload-dropzone:hover { border-color: var(--gold); background: rgba(231,178,76,0.04); }
.upload-dz-title { font-size: .88rem; font-weight: 500; color: var(--text); margin: .5rem 0 0; }
.upload-dz-sub { font-size: .75rem; color: var(--muted-2); margin: .2rem 0 0; }
.upload-field { margin-bottom: 1.1rem; }
.upload-label { display: block; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-2); margin-bottom: .5rem; }
.upload-textarea { resize: vertical; line-height: 1.55; }

/* ---------- misc ---------- */
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.spinner {
  width: 2rem; height: 2rem; border-radius: 9999px;
  border: 3px solid rgba(231,178,76,0.25); border-top-color: var(--gold);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; }

.toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  background: var(--panel); border: 1px solid var(--line-strong); color: var(--text);
  padding: .7rem 1.15rem; border-radius: .8rem; font-size: .8rem; z-index: 50;
  box-shadow: 0 10px 28px rgba(0,0,0,0.45);
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: var(--panel-2); border-radius: 8px; }

/* AJAX / media stability */
.avatar-image{width:100%;height:100%;object-fit:cover;border-radius:inherit;display:block}
.card-media-image,.card-media-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.detail-image{width:100%;height:100%;object-fit:contain;display:block;user-select:none}
.profile-avatar-wrap{position:relative;flex:0 0 auto}
.avatar-change-btn{position:absolute;right:-5px;bottom:-5px;width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#FFD100;color:#0A0A0A;border:2px solid #0A0A0A;cursor:pointer}
.profile-edit-card{margin-top:1.25rem;padding:1.4rem;max-width:720px}
.profile-edit-card h3{margin:0 0 1rem;font-size:1.2rem}
.ajax-spinner{display:inline-block;width:13px;height:13px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;vertical-align:-2px;margin-right:7px;animation:ai-spin .65s linear infinite}
.is-busy{opacity:.7;pointer-events:none}
@keyframes ai-spin{to{transform:rotate(360deg)}}
.ajax-popover{position:absolute;right:0;top:calc(100% + .45rem);z-index:50;min-width:170px;padding:.35rem;border:1px solid rgba(255,255,255,.12);background:rgba(25,25,22,.96);backdrop-filter:blur(14px);border-radius:.75rem;box-shadow:0 12px 35px rgba(0,0,0,.35)}
.ajax-popover button{display:flex;width:100%;align-items:center;gap:.55rem;border:0;background:transparent;color:#F5F5F0;padding:.65rem .7rem;border-radius:.55rem;cursor:pointer;text-align:left}
.ajax-popover button:hover{background:rgba(255,255,255,.08)}
.ajax-popover .danger{color:#F87171}
.detail-left .pv-guard{pointer-events:none}

/* AIverse v4.3 visual/interaction fixes */
html, body { max-width: 100%; overflow-x: hidden; }
.avatar, .avatar-image, .comment-row > .avatar-sm, .comment-composer > .avatar-sm, .dp-creator > .avatar { border-radius: 50% !important; overflow: hidden; object-fit: cover; display: block; }
.dp-creator > .avatar, .dp-creator > .avatar.avatar-image { width:44px !important; height:44px !important; min-width:44px !important; max-width:44px !important; min-height:44px !important; max-height:44px !important; border-radius:50% !important; }
.comment-row > .avatar-sm, .comment-composer > .avatar-sm, .comment-row > img.avatar-sm, .comment-composer > div.avatar-sm { width:30px !important; height:30px !important; min-width:30px !important; max-width:30px !important; min-height:30px !important; max-height:30px !important; flex:0 0 30px !important; border-radius:50% !important; }
.dp-creator[data-open-profile] .creator-name { transition:color .18s ease, text-shadow .18s ease; text-decoration:none !important; }
.dp-creator[data-open-profile]:hover .creator-name { color:#F5C86B; text-decoration:none !important; text-shadow:0 0 16px rgba(245,200,107,.18); }
.card-media-image, .card-media-video { width:100% !important; height:100% !important; object-fit:contain !important; object-position:center !important; display:block; background:#050507; }
.detail-image, .detail-video { width:100% !important; height:100% !important; object-fit:contain !important; object-position:center !important; display:block; background:#050507; }
.dp-more-item img, .dp-more-item video { width:100%; height:100%; object-fit:contain !important; object-position:center; background:#050507; }
.portfolio-work-card img, .portfolio-work-card video { object-fit:contain !important; object-position:center; background:#050507; }
.single-upload-preview { align-items:center; justify-content:center; }
.single-upload-preview img, .single-upload-preview video { width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; object-fit:contain !important; object-position:center !important; }
.single-upload-preview.completed { border-color:rgba(245,200,107,.9) !important; box-shadow:0 0 0 1px rgba(245,200,107,.25),0 0 24px rgba(245,200,107,.08); }
.single-upload-preview .upload-progress-orb { display:none; }
.single-upload-preview.uploading .upload-progress-orb { display:grid; }
.upload-complete-ring { display:none !important; }
.username-field { position:relative; }
.username-status { flex:0 0 auto; min-width:74px; text-align:right; font-size:.68rem; font-weight:600; }
.username-status.good { color:#8fd18f; }
.username-status.bad { color:#F5C86B; }
.username-status.checking { color:#F5C86B; }
.username-status.same { color:var(--muted); }
.portfolio-public-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-left:auto; }
.profile-action-small { padding:.58rem .72rem !important; font-size:.72rem !important; }
.profile-action.danger { color:#F5C86B; border-color:rgba(245,200,107,.25); }
.profile-action.danger:hover { border-color:rgba(245,200,107,.5); background:rgba(245,200,107,.06); }
.portfolio-shell { width:100%; max-width:100vw; box-sizing:border-box; overflow:hidden; }
.portfolio-content { min-width:0; max-width:100%; box-sizing:border-box; }
.portfolio-intro, .portfolio-about, .portfolio-works-section { min-width:0; box-sizing:border-box; }
.portfolio-identity-row { min-width:0; flex-wrap:wrap; }
@media (min-width:801px) { .portfolio-public-actions { margin-left:auto; } }
@media (max-width:800px) { .portfolio-public-actions { margin-left:0; width:100%; } .portfolio-shell { width:100%; max-width:100%; } }

/* AIverse portrait banner specification: 186 x 426 (ratio 93:213).
   The same ratio is used for profile display, editor and responsive sizes. */
.portfolio-banner-pane{width:186px;height:426px;position:relative;overflow:hidden;flex:none}
.portfolio-banner-frame{width:186px;height:426px;aspect-ratio:93/213;position:relative;inset:auto;overflow:hidden}
.portfolio-banner-frame img{width:100%;height:100%;object-fit:cover;object-position:var(--banner-pos);transform:scale(var(--banner-zoom));display:block}
.crop-stage.banner{width:186px;height:426px;aspect-ratio:93/213;margin:0 auto;max-width:100%;max-height:70vh}
@media(max-width:800px){
  .portfolio-shell{display:flex;flex-direction:column;height:auto;overflow:visible}
  .portfolio-banner-pane{width:93px;height:213px;margin:0 auto;flex:none}
  .portfolio-banner-frame{width:93px;height:213px}
  .crop-stage.banner{width:93px;height:213px;max-height:60vh}
}
@media(min-width:801px) and (max-width:1100px){
  .portfolio-shell{grid-template-columns:93px minmax(0,1fr)}
  .portfolio-banner-pane{width:93px;height:213px}
  .portfolio-banner-frame{width:93px;height:213px}
  .crop-stage.banner{width:93px;height:213px}
}

/* AIverse banner/layout refinement v4.10
   Canonical banner frame: 636 x 718 (ratio 318:359).
   Smaller screens use proportional 50% sizing: 318 x 359.
*/
html, body { width:100%; max-width:100%; overflow-x:hidden !important; }
body { margin:0; }
.portfolio-shell {
  width:100% !important;
  max-width:100vw !important;
  box-sizing:border-box !important;
  overflow:hidden !important;
  grid-template-columns:minmax(0, 636px) minmax(0, 1fr) !important;
}
.portfolio-banner-pane {
  width:636px !important;
  height:718px !important;
  min-width:636px !important;
  min-height:718px !important;
  max-width:636px !important;
  max-height:718px !important;
  padding:0 !important;
  margin:0 !important;
  position:relative !important;
  overflow:hidden !important;
  box-sizing:border-box !important;
}
.portfolio-banner-frame {
  width:636px !important;
  height:718px !important;
  min-width:636px !important;
  min-height:718px !important;
  max-width:636px !important;
  max-height:718px !important;
  aspect-ratio:636/718 !important;
  padding:0 !important;
  margin:0 !important;
  position:absolute !important;
  inset:0 !important;
  overflow:hidden !important;
  box-sizing:border-box !important;
}
.portfolio-banner-frame img {
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  object-position:var(--banner-pos,50% 50%) !important;
  display:block !important;
}
.portfolio-banner-empty { width:100% !important; height:100% !important; }
.portfolio-content { min-width:0 !important; max-width:100% !important; overflow-x:hidden !important; }

/* No accidental vertical scrolling inside the banner panel. */
.portfolio-banner-pane, .portfolio-banner-frame { overflow:hidden !important; }

/* Card text remains readable over colourful media. */
.item-bottom-fade {
  background:linear-gradient(to top,
    rgba(0,0,0,.94) 0%,
    rgba(0,0,0,.72) 42%,
    rgba(0,0,0,.28) 76%,
    rgba(0,0,0,0) 100%) !important;
}
.item-badge {
  background:rgba(0,0,0,.82) !important;
  border:1px solid rgba(255,255,255,.12);
  backdrop-filter:none !important;
}
.item-like-pill {
  background:rgba(0,0,0,.82) !important;
  color:#fff !important;
  border:1px solid rgba(255,255,255,.12);
  backdrop-filter:none !important;
}
.item-like-pill svg { stroke:#fff !important; color:#fff !important; }
.item-like-pill.on {
  background:rgba(0,0,0,.9) !important;
  color:#fff !important;
  border-color:rgba(255,255,255,.22) !important;
}
.item-like-pill.on svg { fill:#fff !important; stroke:#fff !important; }

/* Responsive proportional banner scaling. */
@media (min-width:801px) and (max-width:1100px) {
  .portfolio-shell { grid-template-columns:318px minmax(0,1fr) !important; }
  .portfolio-banner-pane,
  .portfolio-banner-frame {
    width:318px !important; height:359px !important;
    min-width:318px !important; min-height:359px !important;
    max-width:318px !important; max-height:359px !important;
    aspect-ratio:318/359 !important;
  }
}
@media (max-width:800px) {
  .portfolio-shell {
    width:100% !important; max-width:100vw !important;
    display:block !important; overflow-x:hidden !important;
  }
  .portfolio-banner-pane,
  .portfolio-banner-frame {
    width:318px !important; height:359px !important;
    min-width:318px !important; min-height:359px !important;
    max-width:318px !important; max-height:359px !important;
    aspect-ratio:318/359 !important;
  }
  .portfolio-banner-pane { margin:0 auto !important; }
  .portfolio-banner-frame { position:absolute !important; inset:0 !important; }
}
@media (max-width:340px) {
  .portfolio-banner-pane,
  .portfolio-banner-frame {
    width:calc(100vw - 22px) !important;
    height:calc((100vw - 22px) * 359 / 318) !important;
    min-width:0 !important; min-height:0 !important;
    max-width:318px !important; max-height:359px !important;
  }
}

/* AIverse v5.0 — canonical profile banner 426 × 656 */
html, body { max-width:100%; overflow-x:hidden !important; }
.portfolio-shell {
  width:100% !important;
  max-width:100vw !important;
  box-sizing:border-box !important;
  grid-template-columns:minmax(0,426px) minmax(0,1fr) !important;
  overflow:hidden !important;
}
.portfolio-banner-pane {
  width:426px !important;
  height:656px !important;
  min-width:426px !important;
  min-height:656px !important;
  max-width:426px !important;
  max-height:656px !important;
  padding:0 !important;
  margin:0 !important;
  box-sizing:border-box !important;
  position:relative !important;
  overflow:hidden !important;
}
.portfolio-banner-frame {
  width:426px !important;
  height:656px !important;
  min-width:426px !important;
  min-height:656px !important;
  max-width:426px !important;
  max-height:656px !important;
  aspect-ratio:426/656 !important;
  padding:0 !important;
  margin:0 !important;
  position:absolute !important;
  inset:0 !important;
  overflow:hidden !important;
}
.portfolio-banner-frame img {
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  object-position:var(--banner-pos,50% 50%) !important;
  display:block !important;
}
.portfolio-banner-pane, .portfolio-banner-frame { overflow:hidden !important; }

/* Liked works: black pill, bright red filled heart. */
.item-like-pill { background:rgba(0,0,0,.82) !important; color:#fff !important; }
.item-like-pill svg { stroke:#fff !important; fill:none !important; }
.item-like-pill.on { background:rgba(0,0,0,.92) !important; color:#fff !important; border-color:rgba(255,59,48,.45) !important; }
.item-like-pill.on svg { fill:#FF3B30 !important; stroke:#FF3B30 !important; color:#FF3B30 !important; }

@media (min-width:801px) and (max-width:1100px) {
  .portfolio-shell { grid-template-columns:minmax(0,213px) minmax(0,1fr) !important; }
  .portfolio-banner-pane, .portfolio-banner-frame {
    width:213px !important; height:328px !important;
    min-width:213px !important; min-height:328px !important;
    max-width:213px !important; max-height:328px !important;
    aspect-ratio:213/328 !important;
  }
}
@media (max-width:800px) {
  .portfolio-shell { width:100% !important; max-width:100vw !important; display:block !important; overflow-x:hidden !important; }
  .portfolio-banner-pane {
    width:213px !important; height:328px !important;
    min-width:213px !important; min-height:328px !important;
    max-width:213px !important; max-height:328px !important;
    margin:0 auto !important; padding:0 !important;
  }
  .portfolio-banner-frame {
    width:213px !important; height:328px !important;
    min-width:213px !important; min-height:328px !important;
    max-width:213px !important; max-height:328px !important;
    aspect-ratio:213/328 !important; position:relative !important; inset:auto !important;
  }
  .portfolio-content { width:100% !important; max-width:100% !important; overflow-x:hidden !important; }
}
@media (max-width:230px) {
  .portfolio-banner-pane, .portfolio-banner-frame {
    width:calc(100vw - 18px) !important;
    height:calc((100vw - 18px) * 656 / 426) !important;
    min-width:0 !important; min-height:0 !important;
    max-width:213px !important; max-height:328px !important;
    aspect-ratio:426/656 !important;
  }
}

/* AI Studio Phase 1 workflow */
.ai-next-step{display:flex;align-items:center;gap:.8rem;flex-wrap:wrap;margin-top:1rem;padding:1rem 1.1rem;border:1px solid rgba(231,178,76,.22);border-radius:14px;background:rgba(231,178,76,.055)}
.ai-next-step strong{color:#f1c96b;white-space:nowrap}.ai-next-step span{color:#b9b9b9;font-size:.9rem;line-height:1.45;flex:1;min-width:220px}.ai-next-step .btn-cta{margin-left:auto;white-space:nowrap}
