/* ===== Global (light theme) ===== */
:root{
  --bg: #ffffff;
  --fg: #111111;
  --muted:#4a4a4a;

  /* 4K-friendly bottle sizing (DO NOT ENLARGE) */
  --card-width: clamp(240px, 26vw, 620px);

  /* header/footer heights */
  --header-h: 60px;
  --footer-h: 52px;

  /* All page vars */
  --ad-gutter: 160px;
  --all-gap: 16px;
  --tile-radius: 16px;
  --banner-height: 120px;

  /* UI tokens */
  --chip-bd: rgba(0,0,0,.18);
  --chip-bg: #fff;
  --chip-fg: #111;
  --chip-bg-active:#111;
  --chip-fg-active:#fff;

  --pill-bd:#000;
  --pill-bg:#fff;
  --pill-fg:#000;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; overflow: hidden; }
*::-webkit-scrollbar{ width:0; height:0; }

/* ===== Header ===== */
.site-header{
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  display: flex; justify-content: center; align-items: center;
  z-index: 120; background: transparent;
  pointer-events: none;
}
.nav-left { position: absolute; left: 20px; }
.nav-center{ display: flex; gap: 22px; align-items: center; }
.nav-right{ position: absolute; right: 20px; }
.site-header .nav-link, #loginLink { pointer-events: auto; }

/* ===== Footer ===== */
.site-footer{
  position: fixed; left: 0; right: 0; bottom: 0;
  height: var(--footer-h);
  display: flex; justify-content: center; align-items: center; gap: 18px;
  z-index: 120; background: transparent;
  pointer-events: none;
}
.site-footer .nav-link { pointer-events: auto; }

/* ===== Stage / Carousel ===== */
.stage{
  position: fixed; left: 0; right: 0; top: var(--header-h); bottom: var(--footer-h);
  perspective: 1200px; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: var(--bg); z-index: 1;
}
.stage img, .stage video, .stage canvas { display: block; max-width: 100%; height: auto; pointer-events: none; }

/* Arrows */
.arrow{
  position: fixed; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 999px; border: 1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.85); display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.10); cursor: pointer;
  transition: background .18s ease, transform .12s ease, box-shadow .18s ease;
  z-index: 3000; pointer-events: auto; user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.arrow:hover{ background: rgba(255,255,255,.97); transform: translateY(-50%) scale(1.05); box-shadow: 0 10px 24px rgba(0,0,0,.12); }
.arrow:active{ transform: translateY(-50%) scale(0.98); }
.arrow-left{ left: 24px; } .arrow-right{ right: 24px; }

/* Cards */
.card{ position: absolute; top: 50%; left: 50%; transform-style: preserve-3d; will-change: transform, opacity;
  transition: transform .45s cubic-bezier(.22,.61,.36,1), opacity .35s ease; contain: layout paint size; pointer-events: none; }
.card img{ width: var(--card-width); height: auto; border-radius: 16px; box-shadow: 0 18px 32px rgba(0,0,0,.14); transform: translateZ(0); pointer-events: none; }

/* Positions */
.pos-center{ transform: translate(-50%,-50%) scale(1) rotateY(0) translateZ(0); z-index:3; opacity:1; }
.pos-left{ transform: translate(calc(-50% - 26vw),-50%) scale(.82) rotateY(18deg) translateZ(-120px); z-index:2; opacity:.9; filter: saturate(.98) brightness(.98); }
.pos-right{ transform: translate(calc(-50% + 26vw),-50%) scale(.82) rotateY(-18deg) translateZ(-120px); z-index:2; opacity:.9; filter: saturate(.98) brightness(.98); }
.pos-leftHidden{ transform: translate(calc(-50% - 60vw),-50%) scale(.7) rotateY(18deg) translateZ(-240px); z-index:1; opacity:0; }
.pos-rightHidden{ transform: translate(calc(-50% + 60vw),-50%) scale(.7) rotateY(-18deg) translateZ(-240px); z-index:1; opacity:0; }

/* Meta / More Info */
.meta{ position: fixed; left: 50%; bottom: calc(var(--footer-h) + 28px); transform: translateX(-50%); text-align: center; z-index: 2500; pointer-events: auto; }
.perfume-name{ margin: 8px 0 10px; font-size: clamp(22px, 2.6vw, 44px); font-weight: 800; }

.info-button{
  --btn-r: 999px; --pad-y: 0.6rem; --pad-x: 1rem;
  display: inline-flex; align-items: center; gap: .45rem; padding: var(--pad-y) var(--pad-x);
  border-radius: var(--btn-r); border: 1px solid #000; background: #fff; color: #000; font: inherit; letter-spacing: .01em;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease, opacity .18s ease;
}
.info-button::after{ content: "→"; display: inline-block; transform: translateX(0); transition: transform .18s ease, opacity .18s ease; opacity: .9; }
.info-button[disabled]{ opacity: .5; cursor: not-allowed; }
.info-button:not([disabled]):hover{ transform: translateY(-1px); background:#000; color:#fff; box-shadow:0 8px 20px rgba(0,0,0,.12); }
.info-button:not([disabled]):active{ transform: translateY(0); box-shadow: 0 4px 12px rgba(0,0,0,.10); }
.info-button:not([disabled]):hover::after{ transform: translateX(2px); }
.info-button:focus-visible{ outline: none; box-shadow: 0 0 0 3px rgba(0,0,0,.16); }

/* Modal */
.modal{ position: fixed; inset: 0; background: rgba(0,0,0,.45); display:flex; align-items:center; justify-content:center; z-index: 5000; }
.modal.hidden{ display: none; }
.modal-content{ background:#ffffff; color:#111; border-radius:12px; max-width:600px; width:90%; padding: 1.5rem; box-shadow: 0 8px 24px rgba(0,0,0,.20); max-height: 80vh; overflow:auto; }
.modal-close{ background:none; border:none; color:#111; font-size:1.6rem; float:right; cursor:pointer; }
.dim{ opacity:.75; }

/* Auth box (hidden) */
#authBox{ position: relative; z-index: 200; background: #fff; border: 1px solid rgba(0,0,0,.06); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.08); padding: 10px; }

/* Nav link */
.nav-link { color: var(--fg); text-decoration: none; font-weight: 600; letter-spacing: 0.3px; padding: 6px 10px; border-radius: 8px; transition: background 0.2s ease, transform 0.15s ease, opacity .15s ease; opacity: .9; }
.nav-link:hover { background: rgba(0,0,0,.06); transform: scale(1.04); opacity: 1; }
.nav-right.is-signed-in { font-weight: 700; }

@media (min-width: 1920px){
  .pos-left  { transform: translate(calc(-50% - 24vw),-50%) scale(.86) rotateY(16deg) translateZ(-120px); }
  .pos-right { transform: translate(calc(-50% + 24vw),-50%) scale(.86) rotateY(-16deg) translateZ(-120px); }
}
@media (prefers-reduced-motion: reduce){
  .card{ transition: none; }
  .arrow, .info-button { transition: none; }
}

/* ======================= Mobile layout + hamburger ======================= */
.menu-btn{ display:none; }

@media (max-width: 768px) {
  :root{ --header-h: 56px; --footer-h: 84px; --card-width: clamp(200px, 62vw, 380px); }
  .site-header{ padding: 10px 12px; justify-content: space-between; gap: 10px; }
  .nav-left, .nav-center{ display: none !important; }
  .nav-right{ position: static; flex: 0 0 auto; white-space: nowrap; }

  .menu-btn{
    display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 999px;
    border: 1px solid rgba(0,0,0,.12); background: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.08); cursor: pointer; -webkit-tap-highlight-color: transparent; pointer-events: auto;
  }
  .menu-btn span{ display:block; width:18px; height:2px; border-radius:2px; background:#111; margin:3px 0; transition:transform .2s, opacity .2s; }
  .menu-btn.open span:nth-child(1){ transform: translateY(5px) rotate(45deg); }
  .menu-btn.open span:nth-child(2){ opacity:0; }
  .menu-btn.open span:nth-child(3){ transform: translateY(-5px) rotate(-45deg); }

  .mobile-menu{
    position: fixed; top: var(--header-h); left: 12px; right: 12px;
    background: rgba(255,255,255,.98); backdrop-filter: blur(6px);
    border: 1px solid rgba(0,0,0,.08); border-radius: 14px; box-shadow: 0 20px 40px rgba(0,0,0,.12);
    padding: 10px; display: grid; gap: 8px; z-index: 4000; transform-origin: 16px top;
    opacity: 0; transform: scale(.96) translateY(-6px); transition: opacity .18s ease, transform .18s ease; pointer-events: auto;
  }
  .mobile-menu.open{ opacity: 1; transform: scale(1) translateY(0); }
  .mobile-menu .mm-item{
    display:flex; align-items:center; gap:10px; padding: 10px 12px; border-radius: 12px; background:#fff; color:inherit; text-decoration:none; border: 1px solid rgba(0,0,0,.08);
    transition: background .15s ease, color .15s ease, transform .12s ease;
  }
  .mobile-menu .mm-item:hover{ background:#111; color:#fff; transform: translateY(-1px); }

  .stage{ top: var(--header-h); bottom: var(--footer-h); }
  .arrow{ width: 52px; height: 52px; }
  .arrow-left{ left: 16px; } .arrow-right{ right: 16px; }
  .meta{ bottom: calc(var(--footer-h) + 16px); }
  .perfume-name{ font-size: clamp(20px, 6vw, 28px); margin-top: 0; }
  .info-button{ padding: .55rem .95rem; border-radius: 18px; font-size: 16px; }
  .site-footer{ padding: 8px 12px; gap: 24px; flex-wrap: wrap; }
  .site-footer .nav-link { font-size: 14px; }
}

/* =======================================================
   NON-HOME PAGES: enable scrolling
   ======================================================= */

  body.all-page,
  body.search-page,
  body.shelf-page,
  body.account-page,
  body.login-page,
  body.doc-page,
  body.profile-page,
  /* ✅ allow scroll on Community route too */
  body.community-page {
    overflow-y: auto !important;
    overflow-x: hidden;
  }
  html:has(body.all-page),
  html:has(body.search-page),
  html:has(body.shelf-page),
  html:has(body.account-page),
  html:has(body.login-page),
  html:has(body.doc-page),
  html:has(body.profile-page),
  /* ✅ allow scroll on Community route too */
  html:has(body.community-page) {
    overflow-y: auto !important;
    height: auto !important;
  }


/* =======================================================
   ALL PAGE
   ======================================================= */
.all-page .all-main{
  padding-top: calc(var(--header-h) + 12px);
  padding-bottom: calc(var(--footer-h) + 24px);
  padding-inline: var(--ad-gutter);
}
.all-page .all-banner{ min-height: var(--banner-height); margin: 16px 0 8px; }
.all-page .all-content{ padding-block: 8px 24px; }

.filters-wrap{ padding: 8px 0; }
.filters{ display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; align-items: end; }
@media (max-width: 900px){ .filters{ grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 520px){ .filters{ grid-template-columns: 1fr; } }
.filters .control{ display: grid; gap: 6px; }
.filters select, .filters input{ border: 1px solid rgba(0,0,0,.12); border-radius: 10px; padding: 10px 12px; font: inherit; background: #fff; }
.chips{ display: flex; flex-wrap: wrap; gap: 8px; max-height: 96px; overflow: auto; border: 1px solid rgba(0,0,0,.12); border-radius: 10px; padding: 8px; background: #fff; }
.chip{ border: 1px solid var(--chip-bd); border-radius: 999px; padding: 6px 10px; cursor: pointer; user-select: none; font-size: 14px; transition: background .15s ease, color .15s ease, border-color .15s ease, transform .12s ease; background: var(--chip-bg); color: var(--chip-fg); }
.chip:hover{ transform: translateY(-1px); }
.chip.active{ background:var(--chip-bg-active); color:var(--chip-fg-active); border-color:#111; }
.pill{ border:1px solid var(--pill-bd); background:var(--pill-bg); color:var(--pill-fg); padding:6px 10px; border-radius:999px; font-size:14px; transition: background .15s ease, color .15s ease, transform .12s ease, box-shadow .15s ease; }
.pill:hover{ background:#000; color:#fff; transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0,0,0,.10); }
.mini-btn{ border:1px solid #000; background:#fff; color:#000; padding:6px 10px; border-radius:999px; font-size:13px; transition: background .15s ease, color .15s ease, transform .12s ease, box-shadow .15s ease; }
.mini-btn:hover{ background:#000; color:#fff; transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0,0,0,.10); }

.all-page .all-grid{ display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: var(--all-gap); }
.all-page .all-grid .tile{ aspect-ratio: 3 / 4; background: #fff; border-radius: var(--tile-radius); box-shadow: 0 1px 2px rgba(0,0,0,.06); display: flex; align-items: center; justify-content: center; overflow: hidden; border: 0; cursor: pointer; }
.all-page .all-grid .tile img{ display: block; max-width: 90%; max-height: 90%; object-fit: contain; }

.all-page .pager{ display: flex; align-items: center; justify-content: center; gap: 12px; margin: 24px 0 8px; }
.all-page .pager .btn{ padding: 10px 14px; border-radius: 999px; border: 1px solid rgba(0,0,0,.12); background: #fff; cursor: pointer; }
.all-page .pager .btn:disabled{ opacity:.45; cursor:not-allowed; }

@media (max-width: 1400px){ :root{ --ad-gutter: 112px; } .all-page .all-grid{ grid-template-columns: repeat(6,1fr); } }
@media (max-width: 1150px){ :root{ --ad-gutter: 72px; } .all-page .all-grid{ grid-template-columns: repeat(5,1fr); } }
@media (max-width: 960px){ :root{ --ad-gutter: 24px; } .all-page .all-grid{ grid-template-columns: repeat(4,1fr); } }
@media (max-width: 720px){ .all-page .all-grid{ grid-template-columns: repeat(3,1fr); } }
@media (max-width: 520px){ .all-page .all-grid{ grid-template-columns: repeat(2,1fr); } }

/* =======================================================
   SINGLE PERFUME PAGE
   ======================================================= */
.single.hidden{ display:none; }
.single{ position: fixed; inset: var(--header-h) 0 var(--footer-h) 0; overflow: auto; padding: 16px clamp(14px,4vw,36px); }
.single-header{ display:flex; justify-content: space-between; align-items:center; gap: 10px; margin-bottom: 10px; }
.single-actions{ display:flex; gap:8px; flex-wrap:wrap; }
.single-layout{ display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.single-media img{ width: var(--card-width); height: auto; border-radius: 16px; box-shadow: 0 18px 32px rgba(0,0,0,.14); display:block; }
.badge-row{ display:flex; gap:8px; margin: 10px 0; flex-wrap: wrap; }
.badge{ display:inline-flex; align-items:center; gap:6px; padding: 4px 10px; border-radius: 999px; background:#f5f5f5; border:1px solid rgba(0,0,0,.08); font-size: 12px; }
.badge-disc{ background: #111; color:#fff; }
.action-rail{ display:flex; gap:8px; flex-wrap: wrap; margin-top: 8px; }
.action-rail .chip.toggle{ border-color:#000; }
.action-rail .chip.toggle.active{ background:#000; color:#fff; }

.single-title{ margin: 6px 0; font-size: clamp(24px, 3vw, 44px); font-weight: 800; }
.single-sub{ margin:0 0 10px; opacity:.8; }
.meta-link{ color: inherit; opacity:.8; text-decoration: underline; text-underline-offset: 3px; }

.chip-row{ display:flex; gap:8px; flex-wrap:wrap; margin: 8px 0 12px; }

.pyramid{ margin-top: 8px; }
.section-title{ margin: 18px 0 10px; font-size: 18px; font-weight: 700; }
.pyramid-grid{ display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.note-list{ margin: 0; padding-left: 18px; }
.note-list li{ margin: 2px 0; }

.ratings .rating-row{ display:flex; align-items:center; gap: 14px; margin: 4px 0 6px; }
.stars{ display:flex; gap: 6px; }
.star{ font-size: 22px; border: 0; background: transparent; cursor: pointer; opacity: .45; }
.star.on{ opacity: 1; }
.avg-wrap{ display:flex; align-items: baseline; gap: 6px; }
.avg-score{ font-size: 22px; font-weight: 700; }
.avg-count{ font-size: 12px; opacity: .7; }

.hist{ display:grid; gap:4px; margin: 8px 0; }
.hist-row{ display:grid; grid-template-columns: 32px 1fr 40px; align-items:center; gap: 8px; }
.hist-bar{ height: 8px; background: rgba(0,0,0,.06); border-radius: 999px; position: relative; overflow: hidden; }
.hist-bar::after{ content:""; position:absolute; left:0; top:0; bottom:0; width: var(--w,0%); background:#000; }

.copy{ line-height: 1.55; }

.related-grid{ display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.card-mini{ background:#fff; border:1px solid rgba(0,0,0,.08); border-radius:14px; padding:12px; display:flex; gap:12px; align-items:center; box-shadow: 0 6px 16px rgba(0,0,0,.06); }
.card-mini img{ width:78px; height:78px; object-fit:cover; border-radius:10px; pointer-events:none; }
.card-mini h3{ margin:0 0 2px; font-size:16px; }
.card-mini p{ margin:0; opacity:.75; font-size:13px; }

.history-strip{ display:flex; gap: 10px; overflow:auto; padding-bottom: 4px; }
.history-strip figure{ margin:0; }
.history-strip img{ width: 180px; height: 240px; object-fit: cover; border-radius: 12px; display:block; }
.history-strip figcaption{ font-size: 12px; opacity:.75; margin-top: 4px; }

@media (max-width: 1024px){
  .single-layout{ grid-template-columns: 1fr; }
  .single-media img{ width: min(var(--card-width), 90vw); }
  .related-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* =======================================================
   SHELF PAGE
   ======================================================= */
.sheet.hidden{ display:none; }
.sheet{ position: fixed; inset: 0; background: rgba(0,0,0,.45); display:flex; align-items:flex-end; justify-content:center; z-index: 6000; }
.sheet > .sheet-header, .sheet > .shelf-grid{
  background:#fff; color:#111; width: min(980px, 92vw);
}
.sheet-header{ display:flex; align-items:center; justify-content: space-between; gap: 8px; padding: 12px 16px; border: 1px solid rgba(0,0,0,.06); border-bottom: 0; border-radius: 12px 12px 0 0; }
.shelf-grid{ display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; max-height: 68vh; overflow: auto; padding: 12px 16px 18px; border: 1px solid rgba(0,0,0,.06); border-top: 0; border-radius: 0 0 12px 12px; }
.shelf-list{ display:grid; gap:10px; }
@media (min-width: 900px){ .shelf-grid{ grid-template-columns: repeat(4, minmax(0,1fr)); } }

/* =======================================================
   MOBILE TAB BAR (Random added)
   ======================================================= */

/* Hide mobile tab bar by default (desktop) */
.tabbar, .fab { display: none; }

/* Show and style on mobile only */
@media (max-width: 768px){
  .menu-btn, .mobile-menu { display: none !important; }
  .site-footer { display: none !important; }

  :root{ --footer-h: 76px; }

  .tabbar{
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 5000;
    display: grid; grid-template-columns: repeat(5, 1fr);
    align-items: center; gap: 8px;
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
    background: #fff; border-top: 1px solid rgba(0,0,0,.08); box-shadow: 0 -10px 24px rgba(0,0,0,.06);
  }
  .tabbar .tab{
    display:inline-flex; flex-direction:column; align-items:center; justify-content:center;
    gap:2px; min-height:56px; padding:6px; border-radius:12px; text-decoration:none; color:inherit; -webkit-tap-highlight-color: transparent;
  }
  .tabbar .tab svg{ width:22px; height:22px; stroke: currentColor; stroke-width:1.8; fill:none; opacity:.72; transition: opacity .15s, transform .12s; }
  .tabbar .tab span{ font-size:11px; line-height:1; opacity:.72; letter-spacing:.1px; }
  .tabbar .tab:active svg{ transform: scale(.96); }
  .tabbar .tab.active svg, .tabbar .tab.active span{ opacity:1; }
  .tabbar .tab.active{ font-weight:700; }
}

/* Defensive: always white desktop background */
@media (min-width: 769px){
  html, body, .site-footer { background: #fff !important; }
}

/* =======================================================
   DOC PAGES (Privacy, Terms, Contact)
   ======================================================= */
.doc-main{
  padding-top: calc(var(--header-h) + 28px);
  padding-bottom: calc(var(--footer-h) + 32px);
  padding-left: clamp(16px, 6vw, 40px);
  padding-right: clamp(16px, 6vw, 40px);
}

.doc-hero{ max-width: 980px; margin: 0 auto 16px; padding: 18px 0; }
.doc-hero h1{ margin: 0 0 6px; font-size: clamp(28px,3.4vw,44px); font-weight: 800; }
.doc-hero p{ margin: 0; opacity: .75; }

.doc-container{ max-width: 980px; margin: 0 auto; display: grid; gap: 14px; }

.doc-card{
  background:#fff; border:1px solid rgba(0,0,0,.08); border-radius:16px;
  box-shadow:0 8px 22px rgba(0,0,0,.06);
  padding: clamp(16px, 2.4vw, 24px);
}
.doc-card h2{ margin:0 0 8px; font-size:20px; font-weight:700; }
.doc-card p{ margin:0 0 10px; line-height:1.6; }
.doc-card ul{ margin:0 0 10px 18px; }

.contact-grid{ display:grid; grid-template-columns:1.2fr 1fr; gap:16px; align-items:start; }
@media (max-width:900px){ .contact-grid{ grid-template-columns:1fr; } }

.contact-form{ display:grid; gap:10px; }
.contact-form label{ font-size:14px; opacity:.85; }
.contact-form input, .contact-form textarea{
  width:100%; padding:12px; border:1px solid rgba(0,0,0,.12); border-radius:12px; font:inherit; background:#fff;
}
.contact-form button{
  align-self:start; margin-top:4px; border:1px solid #000; background:#000; color:#fff;
  padding:10px 14px; border-radius:999px; cursor:pointer; transition:transform .12s, box-shadow .15s;
}
.contact-form button:hover{ transform:translateY(-1px); box-shadow:0 6px 14px rgba(0,0,0,.12); }

/* ===== Profile Page (scoped) ===== */
body.profile-page { background:#fff; }

.profile-page .prof-wrap{
  max-width:1100px;
  margin:0 auto;
  padding:calc(var(--header-h) + 20px) 16px calc(var(--footer-h) + 24px);
}

.profile-page .prof-header{
  display:flex; gap:16px; align-items:center; flex-wrap:wrap;
}

.profile-page .prof-ava{
  width:84px; height:84px; border-radius:18px;
  object-fit:cover; background:#f6f7f8; border:1px solid rgba(0,0,0,.08);
}

.profile-page .prof-title{
  margin:0; font-size:clamp(22px,4vw,32px); font-weight:800; letter-spacing:-.2px;
}

.profile-page .prof-sub{ color:rgba(0,0,0,.7); margin-top:4px; }
.profile-page .prof-bio{ margin-top:10px; color:rgba(0,0,0,.85); max-width:70ch; }

.profile-page .prof-stats{ display:flex; gap:10px; margin-top:12px; flex-wrap:wrap; }
.profile-page .stat{ background:#fff; border:1px solid rgba(0,0,0,.08); border-radius:14px; padding:10px 12px; }
.profile-page .stat .num{ font-weight:800; }

.profile-page .prof-tabs{ display:flex; gap:10px; margin:18px 0 10px; flex-wrap:wrap; }
.profile-page .tabbtn{
  border:1px solid rgba(0,0,0,.18); background:#fff; border-radius:999px;
  padding:8px 12px; cursor:pointer; transition:background .15s, color .15s, border-color .15s;
}
.profile-page .tabbtn:hover{ border-color:#111; }
.profile-page .tabbtn.active{ background:#111; color:#fff; border-color:#111; }

.profile-page .grid{ display:grid; gap:18px; grid-template-columns: repeat(5, minmax(0,1fr)); }
@media (max-width: 1100px){ .profile-page .grid{ grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 820px){  .profile-page .grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px){  .profile-page .grid{ grid-template-columns: 1fr; } }

.profile-page .tile{
  background:#fff; border:1px solid rgba(0,0,0,.08); border-radius:16px; padding:10px; display:block;
  box-shadow:0 8px 20px rgba(0,0,0,.06);
}
.profile-page .tile img{
  width:100%; aspect-ratio:1/1; object-fit:cover; border-radius:12px; background:#f6f6f7;
}
.profile-page .tile h3{ font-size:14px; margin:8px 0 2px; }
.profile-page .tile p{ font-size:12px; opacity:.75; margin:0; }

.profile-page .empty{
  padding:16px; border:1px dashed rgba(0,0,0,.2); border-radius:12px;
  text-align:center; color:rgba(0,0,0,.6);
}
.profile-page .notice{
  padding:14px; border:1px solid rgba(0,0,0,.1); border-radius:12px; background:#fff9f2;
}

.profile-page .spinner{
  width:40px; height:40px; border-radius:12px; box-shadow:0 18px 40px rgba(0,0,0,.08);
  display:grid; place-items:center; margin:48px auto;
}

/* Optional: tweak accent just on profile pages */
.profile-page { --accent: #111; }
.profile-page .tabbtn.active{ background: var(--accent); border-color: var(--accent); }

/* =======================================================
   COMMUNITY PAGE SAFETY (Community is now styled by /community.css)
   These rules prevent the global carousel layer from covering it,
   and ensure scrolling works even if style.css is loaded on /community.
   ======================================================= */

body.community-page{
  overflow-y: auto !important;
  overflow-x: hidden;
}
html:has(body.community-page){
  overflow-y: auto !important;
  height: auto !important;
}
body.community-page .stage,
body.community-page .arrow,
body.community-page .meta{
  display: none !important;
}
