.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(46px, 7vw, 92px) 0 clamp(38px, 5vw, 64px);
  background:
    radial-gradient(900px 460px at 82% 4%, rgba(20, 184, 154, .28), transparent 62%),
    radial-gradient(760px 420px at 6% 96%, rgba(139, 92, 246, .22), transparent 60%),
    linear-gradient(165deg, #0a1a2b 0%, #0d2b3a 48%, #0a3a3a 100%);
  color: #e8f3f1;
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--grain);
  opacity: .35;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.hero-copy { max-width: 40rem; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px 7px 10px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #b9f0e2;
  font-size: .82rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.hero-eyebrow span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-300);
  box-shadow: 0 0 0 0 rgba(110, 227, 200, .7);
  animation: pulse-dot 2.2s var(--e-out) infinite;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2.1rem, 1.1rem + 3.7vw, 4rem);
  letter-spacing: -.03em;
  margin: 18px 0 14px;
}

.page-head {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding: 26px 28px;
  border-radius: var(--r-lg);
  color: #fff;
  background: linear-gradient(135deg, var(--ink-900), var(--brand-900) 70%, var(--brand-800));
  box-shadow: var(--sh-3);
  overflow: hidden;
}

.page-head::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(110, 227, 200, .34), transparent);
  pointer-events: none;
}

.page-head .kicker { color: var(--brand-300); }
.page-head .kicker::before { background: linear-gradient(90deg, var(--brand-300), var(--accent-300)); }
.page-head h1, .page-head h2 { color: #fff; margin: 0 0 4px; }
.page-head p { color: #a9c4c8; margin: 0; max-width: 56ch; font-size: .95rem; }
.page-head .btn, .page-head .text-link { position: relative; z-index: 1; }
.page-head .text-link { color: var(--brand-300); }

.hero h1 em {
  font-style: normal;
  background: linear-gradient(105deg, var(--brand-300), var(--accent-300));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lede {
  font-size: clamp(1rem, .95rem + .3vw, 1.15rem);
  color: #b7cdd4;
  max-width: 46ch;
  margin-bottom: 26px;
}

.hero-search {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--sh-4);
}

.hero-search-field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1.5px solid transparent;
  transition: border-color var(--d-2) var(--e-out), background var(--d-2) var(--e-out);
}

.hero-search-field:focus-within { border-color: var(--brand-300); background: #fff; }
.hero-search-field i { color: var(--brand-600); font-size: 1.05rem; }

.hero-search-field span { display: block; flex: 1; min-width: 0; }

.hero-search-field b {
  display: block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-500);
}

.hero-search-field input,
.hero-search-field select {
  width: 100%;
  border: 0;
  padding: 2px 0 0;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-900);
  background: transparent;
  appearance: none;
  outline: none;
}

.hero-search-field select { cursor: pointer; }

.hero-search-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
}

.hero-search-row .hero-search-field { min-height: 52px; }

.hero-near {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--r-full);
  border: 1.5px dashed var(--brand-400);
  background: var(--brand-50);
  color: var(--brand-800);
  font: inherit;
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--d-2) var(--e-spring), background var(--d-2) var(--e-out);
}

.hero-near:hover { transform: translateY(-2px); background: var(--brand-100); }

.hero-pills {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.hero-pills span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
  font-size: .82rem;
  color: #cfe3e6;
  backdrop-filter: blur(6px);
}

.hero-pills i { color: var(--brand-300); }

.hero-stats {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .12);
}

.hero-stats div b {
  display: block;
  font-size: 1.7rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.02em;
}

.hero-stats div small { font-size: .8rem; color: #93b2b6; }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 320px; }

.hero-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(110, 227, 200, .3);
  animation: orbit-spin 34s linear infinite;
}

.hero-orbit::after {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 11px;
  height: 11px;
  margin-left: -5.5px;
  border-radius: 50%;
  background: var(--accent-400);
  box-shadow: 0 0 16px var(--accent-400);
}

.hero-orbit-a { width: 300px; height: 300px; }
.hero-orbit-b { width: 420px; height: 420px; animation-duration: 48s; animation-direction: reverse; }
.hero-orbit-b::after { background: var(--brand-300); box-shadow: 0 0 16px var(--brand-300); }

.hero-scene {
  position: relative;
  width: min(400px, 100%);
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, .35));
  animation: float-y 7s var(--e-in-out) infinite;
}

.hero-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, .95);
  color: var(--ink-800);
  font-size: .8rem;
  font-weight: 700;
  box-shadow: var(--sh-3);
  white-space: nowrap;
  animation: float-y 5.4s var(--e-in-out) infinite;
}

.hero-chip i { color: var(--brand-600); }
.hero-chip small { display: block; font-size: .68rem; font-weight: 600; color: var(--ink-500); }
.hero-chip-a { top: 6%; left: -4%; }
.hero-chip-b { bottom: 12%; right: -6%; animation-delay: -1.6s; }
.hero-chip-c { bottom: 42%; left: -10%; animation-delay: -3.1s; }

.hero-glass {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.08;
  border-radius: 34px;
  background: var(--brand-700);
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 30px 60px -30px rgba(0, 0, 0, .6);
  overflow: hidden;
  isolation: isolate;
}

/* Photo sits under the brand tint; the existing ::before grain and ::after
   shine layers still sit on top, so the glass look is preserved. */
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  display: block;
  z-index: 0;
}

.hero-glass::before,
.hero-glass::after { z-index: 1; }

.hero-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  opacity: .3;
  mix-blend-mode: overlay;
}

/* Teal wash keeps the floating chips readable on top of any photo. */
.hero-glass {
  background-image:
    radial-gradient(420px 320px at 26% 18%, rgba(110, 227, 200, .34), transparent 62%),
    radial-gradient(380px 300px at 82% 78%, rgba(251, 191, 36, .22), transparent 60%),
    linear-gradient(150deg, rgba(4, 122, 108, .34), rgba(3, 78, 69, .5));
}

.hero-glass::after {
  content: "";
  position: absolute;
  top: -30%;
  left: -30%;
  width: 60%;
  height: 160%;
  background: linear-gradient(100deg, transparent 40%, rgba(255, 255, 255, .3) 50%, transparent 60%);
  transform: rotate(14deg);
  animation: shine-sweep 5.5s var(--e-in-out) infinite;
}

.text-brand { color: var(--brand-600); }

.assurance {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.assurance span {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink-700);
  box-shadow: var(--sh-1);
}

.assurance i {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--brand-50);
  color: var(--brand-600);
}

.assurance b { display: block; font-size: .9rem; color: var(--ink-900); }
.assurance small { display: block; color: var(--ink-500); font-size: .78rem; font-weight: 500; line-height: 1.5; }

.cat-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 14px;
}

.cat-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 20px 18px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-800);
  text-align: center;
  box-shadow: var(--sh-1);
  overflow: hidden;
  transition: transform var(--d-3) var(--e-out), box-shadow var(--d-3) var(--e-out), border-color var(--d-3) var(--e-out);
}

.cat-card::before {
  content: "";
  position: absolute;
  inset: auto -30% -60% -30%;
  height: 120%;
  background: radial-gradient(closest-side, rgba(20, 184, 154, .18), transparent);
  opacity: 0;
  transition: opacity var(--d-4) var(--e-out), transform var(--d-4) var(--e-out);
}

.cat-card:hover { transform: translateY(-6px); box-shadow: var(--sh-3); border-color: var(--brand-200); color: var(--ink-900); }
.cat-card:hover::before { opacity: 1; transform: translateY(-14%); }

.cat-card > span:first-child {
  position: relative;
  width: 54px;
  height: 54px;
  margin-inline: auto;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-size: 1.6rem;
  background: linear-gradient(140deg, var(--brand-50), var(--brand-100));
  border: 1px solid var(--line-2);
  transition: transform var(--d-3) var(--e-spring);
}

.cat-card:hover > span:first-child { transform: rotate(-8deg) scale(1.08); }
.cat-card b { position: relative; font-size: .95rem; }
.cat-card small { position: relative; color: var(--ink-500); font-size: .78rem; }

.cat-arrow {
  position: absolute;
  top: 12px;
  right: 14px;
  color: var(--ink-300);
  font-size: .8rem;
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity var(--d-2) var(--e-out), transform var(--d-2) var(--e-spring);
}

.cat-card:hover .cat-arrow { opacity: 1; transform: translate(0, 0); color: var(--brand-500); }

.prov-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-800);
  box-shadow: var(--sh-1);
  transition: transform var(--d-3) var(--e-out), box-shadow var(--d-3) var(--e-out), border-color var(--d-3) var(--e-out);
}

.prov-card:hover { transform: translateY(-5px); box-shadow: var(--sh-3); border-color: var(--brand-200); color: var(--ink-900); }
.prov-card h3 { margin: 0; font-size: 1.02rem; display: flex; align-items: center; gap: 7px; }
.prov-card .prov-meta { color: var(--ink-500); font-size: .84rem; }
.prov-card .prov-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.prov-price { font-weight: 800; color: var(--brand-700); font-size: 1.02rem; }

.trust-meter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: var(--ok-soft);
  color: #047857;
  font-size: .76rem;
  font-weight: 800;
}

.trust-ring { font-weight: 800; color: var(--brand-700); }

.post-card {
  position: relative;
  padding: 20px;
  margin-bottom: 18px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
  transition: transform var(--d-3) var(--e-out), box-shadow var(--d-3) var(--e-out), border-color var(--d-3) var(--e-out);
}

.post-card:hover { transform: translateY(-4px); box-shadow: var(--sh-3); border-color: var(--brand-200); }

.post-head { display: flex; align-items: center; gap: 12px; }

.post-head b { display: flex; align-items: center; gap: 6px; font-size: .98rem; }
.post-head b a { color: var(--ink-900); }
.post-head b a:hover { color: var(--brand-700); }
.post-head small { color: var(--ink-500); font-size: .8rem; }

.post-id { min-width: 0; }
.post-id b { line-height: 1.3; }
.post-id b a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-id small { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.post-id small i { color: var(--ink-300); font-size: .72rem; }
.dot-sep { color: var(--ink-300); }

.post-tag {
  margin-inline-start: auto;
  padding: 5px 12px;
  border-radius: var(--r-full);
  background: var(--brand-50);
  color: var(--brand-800);
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
}

.post-card h3 { margin: 14px 0 6px; font-size: 1.16rem; }
.post-card .post-title a { color: var(--ink-900); }
.post-card .post-body { color: var(--ink-600); margin-bottom: 12px; }

.post-media { display: grid; gap: 8px; margin-bottom: 12px; }

.post-media img,
.post-media video {
  width: 100%;
  max-height: 430px;
  object-fit: cover;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  border: 1px solid var(--line-2);
}

.post-media-fallback {
  display: grid;
  place-items: center;
  height: 190px;
  margin-bottom: 12px;
  border-radius: var(--r-sm);
  font-size: 3.2rem;
  background: linear-gradient(140deg, var(--brand-50), var(--surface-3) 55%, var(--accent-100));
  border: 1px solid var(--line-2);
}

.price-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.price-row strong { color: var(--brand-700); font-size: 1.3rem; font-weight: 800; }
.badge-soft.off { background: var(--danger-soft); color: #be123c; }
.badge-soft.off::before { display: none; }

.countdown {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 7px 14px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, #fff1f2, #ffe4e6);
  color: #9f1239;
  font-size: .82rem;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(225, 29, 72, .18);
  animation: drop-in var(--d-3) var(--e-spring) both;
}

.countdown i { color: var(--danger); }
.countdown::before { display: none; }
.countdown.is-ended { background: var(--surface-3); color: var(--ink-500); box-shadow: none; animation: none; }
.countdown.is-ended i { color: var(--ink-400); }

.post-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  padding: 10px 0;
  margin: 10px 0;
  border-block: 1px solid var(--line-2);
}

.post-act {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 0;
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--ink-700);
  font: inherit;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  transition: transform var(--d-2) var(--e-spring), background var(--d-2) var(--e-out), color var(--d-2) var(--e-out);
}

.post-act i { font-size: .92rem; }
.post-act b { font-weight: 800; color: var(--ink-500); }
.post-act:hover { transform: translateY(-2px); background: var(--brand-50); color: var(--brand-800); }
.post-act:hover b { color: var(--brand-700); }

.post-act.on { background: var(--brand-600); color: #fff; box-shadow: 0 8px 16px -10px rgba(10, 148, 130, .9); }
.post-act.on b { color: rgba(255, 255, 255, .82); }
.post-act.on i { color: #ffc2cd; }

.post-act.sub { background: transparent; color: var(--ink-400); }
.post-act.sub:hover { background: var(--danger-soft); color: var(--danger); }

.post-cta { display: flex; gap: 9px; flex-wrap: wrap; }
.post-cta .btn { flex: 1 1 120px; }

.feed-layout { display: grid; grid-template-columns: minmax(0, 1fr) 322px; gap: 22px; align-items: start; }

.side-card {
  padding: 18px;
  margin-bottom: 16px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
}

.side-card h3 { margin: 0 0 10px; font-size: 1.02rem; display: flex; align-items: center; gap: 9px; }
.side-card p { color: var(--ink-600); font-size: .92rem; }
.side-card .side-item { padding: 10px 0; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 10px; font-size: .9rem; font-weight: 600; }
.side-card .side-item i { width: 20px; text-align: center; }
.side-card .side-item:last-child { border-bottom: 0; }

.side-check { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; font-size: .9rem; color: var(--ink-700); }
.side-check i { margin-top: .3em; color: var(--brand-500); }

.side-banner {
  position: relative;
  padding: 22px;
  margin-bottom: 16px;
  border-radius: var(--r);
  color: #fff;
  background: linear-gradient(150deg, var(--brand-700), var(--ink-900));
  box-shadow: var(--sh-3);
  overflow: hidden;
}

.side-banner::after {
  content: "";
  position: absolute;
  right: -50px;
  bottom: -60px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(110, 227, 200, .35), transparent);
}

.side-banner h3 { margin: 0 0 6px; color: #fff; }
.side-banner p { color: #b8d3d8; font-size: .9rem; }
.side-banner .btn { margin-top: 12px; background: #fff; color: var(--brand-800); box-shadow: none; }
.side-banner .btn:hover { background: var(--brand-50); }

.offer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px; }

.offer-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--sh-1);
  transition: transform var(--d-3) var(--e-out), box-shadow var(--d-3) var(--e-out);
}

.offer-card:hover { transform: translateY(-6px); box-shadow: var(--sh-3); }

.offer-visual {
  position: relative;
  display: grid;
  place-items: center;
  height: 132px;
  font-size: 3rem;
  background: linear-gradient(140deg, var(--accent-100), #ffe9c9 55%, var(--brand-50));
}

.offer-visual .badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 11px;
  border-radius: var(--r-full);
  background: var(--danger);
  color: #fff;
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .08em;
  box-shadow: 0 6px 14px -6px rgba(225, 29, 72, .9);
}

.offer-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; flex: 1; }
.offer-body h3 { margin: 0; font-size: 1rem; }
.offer-body p { margin: 0; color: var(--ink-500); font-size: .85rem; }
.offer-body .offer-price { display: flex; align-items: baseline; gap: 9px; margin-top: 6px; }
.offer-body .offer-price strong { color: var(--brand-700); font-size: 1.16rem; }
.offer-body .btn { margin-top: 12px; }

/* Avatar always straddles the cover's bottom edge: the pull-up equals half the
   avatar height, and align-self:start keeps that true in the stacked layout. */
.profile-cover {
  position: relative;
  height: 168px;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: linear-gradient(120deg, var(--brand-600), var(--brand-400));
}

.profile-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(520px 190px at 88% 0%, rgba(255, 255, 255, .32), transparent 70%),
    linear-gradient(180deg, transparent 58%, rgba(4, 110, 97, .3));
}

.profile-cover.has-img {
  background-size: cover;
  background-position: center 32%;
  background-repeat: no-repeat;
}

/* Teal scrim keeps the avatar ring and identity row readable over any photo. */
.profile-cover.has-img::after {
  background:
    linear-gradient(180deg, rgba(4, 122, 108, .4) 0%, rgba(4, 122, 108, .12) 42%, rgba(3, 78, 69, .72) 100%),
    radial-gradient(520px 190px at 88% 0%, rgba(255, 255, 255, .2), transparent 70%);
}

.profile-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  margin-top: -56px; /* 112 / 2 -> only the avatar straddles the cover edge */
  padding-inline: 18px;
  position: relative;
  z-index: 2;
}

.profile-head .avatar {
  align-self: start;
  box-shadow: 0 0 0 4px var(--surface);
}

/* Facebook layout: the name and the action row start below the cover, so no
   text ever sits on the photo. Offset equals the avatar's half height. */
.profile-head .profile-id { margin-top: 56px; }
.profile-head .profile-cta { margin-top: 56px; }

.profile-id { min-width: 0; }
.profile-id h1 { margin: 0; font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem); display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
/* Facebook-style @username line under the name. */
.profile-username { margin: 2px 0 0; color: var(--ink-500); font-size: .9rem; font-weight: 600; }
.profile-id .profile-meta { display: flex; gap: 8px 16px; flex-wrap: wrap; margin-top: 6px; color: var(--ink-500); font-size: .89rem; }
.profile-id .profile-meta span { display: inline-flex; align-items: center; gap: 6px; }

.profile-cta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 1120px) {
  .profile-head { grid-template-columns: auto minmax(0, 1fr); }
  .profile-cta { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Facebook-style profile tabs: flat underline row pinned under the identity
   block, horizontally scrollable on narrow screens instead of wrapping. */
.profile-tabs {
  display: flex;
  gap: 4px;
  margin-top: 18px;
  padding: 0 6px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

.profile-tabs::-webkit-scrollbar { display: none; }

.profile-tab {
  flex: 0 0 auto;
  scroll-snap-align: center;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px 12px;
  margin-bottom: -1px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  color: var(--ink-500);
  font: inherit;
  font-size: .92rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}

.profile-tab:hover { color: var(--ink-900); background: var(--surface-2); }
.profile-tab i { font-size: .95em; opacity: .8; }
.profile-tab .tab-count {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-600);
  font-size: .74rem;
  font-weight: 700;
  text-align: center;
}

.profile-tab[aria-selected="true"] {
  color: var(--brand-700);
  border-bottom-color: var(--brand-600);
}

.profile-tab[aria-selected="true"] .tab-count {
  background: var(--brand-100);
  color: var(--brand-800);
}

.profile-tab:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: -3px;
  border-radius: 8px 8px 0 0;
}

/* Panes are plain blocks, not a horizontal slider: tab switching only toggles
   visibility so scroll position and analytics stay predictable. */
.profile-pane { display: none; }
.profile-pane.on { display: block; animation: paneIn .22s ease both; }
.profile-pane > :first-child { margin-top: 18px; }

@keyframes paneIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .profile-pane.on { animation: none; }
}

@media (max-width: 720px) {
  .profile-tabs { padding: 0 2px; margin-top: 14px; }
  .profile-tab { padding: 10px 10px 11px; font-size: .86rem; }
}

/* Review summary: big average on the left, per-star bars on the right. */
.rate-sum {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.rate-score { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 116px; }
.rate-score > b { font-size: 2.6rem; line-height: 1; font-weight: 800; letter-spacing: -.02em; }
.rate-score .star-row { font-size: .95rem; }
.rate-score small { font-size: .8rem; }

.rate-bars { flex: 1 1 240px; min-width: 0; display: grid; gap: 5px; }
.rate-bar { display: grid; grid-template-columns: 26px minmax(0, 1fr) 26px; align-items: center; gap: 9px; font-size: .78rem; }
.rate-bar > small:first-child { text-align: right; color: var(--ink-500); }
.rate-bar > small:first-child i { font-size: .72rem; }
.rate-bar > small:last-child { text-align: left; }
.rate-bar .bar { display: block; height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.rate-bar .bar > b { display: block; height: 100%; border-radius: 999px; background: var(--brand-500); min-width: 0; }

/* Facebook-style review grid: equal-height cells, author row on top. */
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.review-cell {
  display: flex;
  flex-direction: column;
  padding: 14px 15px 15px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.review-cell:hover {
  border-color: var(--brand-300);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(6, 95, 85, .08);
}

.review-cell > header { display: flex; align-items: center; gap: 10px; }
.review-cell .rv-avatar { width: 38px; height: 38px; font-size: 1rem; font-weight: 700; flex: 0 0 auto; background: var(--brand-100); color: var(--brand-800); }
.review-cell .rv-who { min-width: 0; display: flex; flex-direction: column; }
.review-cell .rv-who > b { font-size: .93rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-cell .rv-who > small { color: var(--ink-500); font-size: .76rem; }
.review-cell .rv-stars { margin-left: auto; font-size: .74rem; flex: 0 0 auto; }
.review-cell .rv-vp { display: inline-flex; align-items: center; gap: 5px; margin: 9px 0 0; font-size: .76rem; font-weight: 600; color: var(--brand-700); }
.review-cell .rv-body { margin: 8px 0 0; font-size: .89rem; line-height: 1.55; color: var(--ink-700); overflow-wrap: anywhere; }

@media (max-width: 520px) {
  .rate-sum { gap: 16px; }
  .rate-score { min-width: 0; }
  .review-grid { grid-template-columns: 1fr; }
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 14px; }

.stat {
  position: relative;
  padding: 16px 18px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
  overflow: hidden;
  transition: transform var(--d-3) var(--e-out), box-shadow var(--d-3) var(--e-out);
}

.stat:hover { transform: translateY(-4px); box-shadow: var(--sh-3); }
.stat::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand-400), var(--brand-700));
}

.stat b { display: block; font-size: 1.7rem; font-weight: 800; color: var(--ink-900); letter-spacing: -.02em; line-height: 1.2; }
.stat small { color: var(--ink-500); font-size: .82rem; }
.stat .stat-ico { position: absolute; top: 14px; right: 14px; color: var(--brand-200); font-size: 1.4rem; }
.stat.violet::after { background: linear-gradient(180deg, #c4b5fd, #7c3aed); }
.stat.gold::after { background: linear-gradient(180deg, var(--accent-300), var(--accent-600)); }
.stat.rose::after { background: linear-gradient(180deg, #fda4af, var(--danger)); }

.kpi { display: flex; gap: 12px; flex-wrap: wrap; }
.kpi .stat { flex: 1 1 150px; }

.dash-banner {
  position: relative;
  padding: 26px 28px;
  margin-bottom: 18px;
  border-radius: var(--r-lg);
  color: #fff;
  background: linear-gradient(140deg, var(--brand-700), var(--ink-900));
  box-shadow: var(--sh-3);
  overflow: hidden;
}

.dash-banner::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -70px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(110, 227, 200, .32), transparent);
}

.dash-banner h2 { margin: 0; color: #fff; }
.dash-banner p { margin: 6px 0 0; color: #b6d2d6; }

.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 12px; }

.quick-grid a {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 18px 12px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-800);
  font-weight: 700;
  font-size: .88rem;
  text-align: center;
  box-shadow: var(--sh-1);
  transition: transform var(--d-3) var(--e-spring), box-shadow var(--d-3) var(--e-out), border-color var(--d-3) var(--e-out), color var(--d-3) var(--e-out);
}

.quick-grid a i {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--brand-50), var(--brand-100));
  color: var(--brand-700);
  font-size: 1.05rem;
  transition: transform var(--d-3) var(--e-spring);
}

.quick-grid a:hover { transform: translateY(-5px); box-shadow: var(--sh-3); border-color: var(--brand-200); color: var(--brand-800); }
.quick-grid a:hover i { transform: rotate(-10deg) scale(1.1); }

.dash { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 22px; align-items: start; margin-top: 20px; }

.dash-side {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  padding: 12px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-2);
  display: grid;
  gap: 3px;
}

.dash-side em {
  margin-inline-start: auto;
  min-width: 20px;
  padding: 1px 7px;
  border-radius: var(--r-full);
  background: var(--danger);
  color: #fff;
  font-size: .68rem;
  font-style: normal;
  font-weight: 800;
  text-align: center;
  animation: pulse-badge 2.4s var(--e-in-out) infinite;
}

.dash-side a.active em { background: rgba(255, 255, 255, .25); animation: none; }

.dash-side-label {
  padding: 10px 12px 6px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-400);
}

.dash-side a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  border-radius: var(--r-xs);
  color: var(--ink-700);
  font-weight: 600;
  font-size: .92rem;
  transition: transform var(--d-2) var(--e-out), background var(--d-2) var(--e-out), color var(--d-2) var(--e-out);
}

.dash-side a i { width: 20px; text-align: center; color: var(--ink-400); transition: color var(--d-2) var(--e-out), transform var(--d-2) var(--e-spring); }
.dash-side a:hover { background: var(--brand-50); color: var(--brand-800); transform: translateX(3px); }
.dash-side a:hover i { color: var(--brand-600); }
.dash-side a.active { background: linear-gradient(120deg, var(--brand-600), var(--brand-800)); color: #fff; box-shadow: 0 10px 20px -12px rgba(10, 148, 130, .95); }
.dash-side a.active i { color: #fff; }

.dash-topbar { display: flex; align-items: center; gap: 14px; margin-top: 20px; }
.dash-topbar h1 { margin: 0; font-size: clamp(1.3rem, 3vw, 1.7rem); letter-spacing: -.02em; }
.dash-topbar small { color: var(--ink-500); }
.dash-topbar .dash-toggle { display: none; }

@media (max-width: 900px) {
  .dash-topbar { margin-bottom: 4px; }
  .dash-topbar .dash-toggle { display: inline-flex; }
  .dash { margin-top: 12px; }
}

.auth-wrap { display: grid; place-items: center; padding-block: clamp(24px, 5vw, 64px); }

.auth-card {
  position: relative;
  width: 100%;
  max-width: 470px;
  padding: 32px;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-4);
  overflow: hidden;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-400), var(--accent-400), var(--violet));
}

.auth-card h1 { font-size: 1.6rem; margin-bottom: 6px; }
.auth-card > p { color: var(--ink-500); font-size: .92rem; }
.auth-head { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }

.auth-head-icon {
  width: 48px;
  height: 48px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(140deg, var(--brand-400), var(--brand-700));
  color: #fff;
  font-size: 1.15rem;
  box-shadow: 0 12px 22px -12px rgba(10, 148, 130, .9);
}

.auth-foot { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-2); font-size: .9rem; color: var(--ink-500); text-align: center; }

.otp-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 6px; }

.otp-row input {
  width: 100%;
  aspect-ratio: 1 / 1.15;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink-900);
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  border-radius: var(--r-xs);
  transition: border-color var(--d-2) var(--e-out), box-shadow var(--d-2) var(--e-out), background var(--d-2) var(--e-out), transform var(--d-2) var(--e-spring);
  -moz-appearance: textfield;
}

.otp-row input::-webkit-outer-spin-button,
.otp-row input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.otp-row input:focus {
  outline: none;
  border-color: var(--brand-400);
  background: #fff;
  box-shadow: var(--ring);
  transform: translateY(-2px);
}

.otp-row input:not(:placeholder-shown) { border-color: var(--brand-500); background: var(--brand-50); }

.role-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }

.role-switch a {
  display: grid;
  place-items: center;
  gap: 5px;
  padding: 13px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink-600);
  font-weight: 700;
  font-size: .88rem;
  text-align: center;
  transition: transform var(--d-2) var(--e-spring), border-color var(--d-2) var(--e-out), background var(--d-2) var(--e-out), color var(--d-2) var(--e-out);
}

.role-switch a i { font-size: 1.1rem; }
.role-switch a:hover { transform: translateY(-2px); border-color: var(--brand-300); }
.role-switch a.active { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-800); box-shadow: var(--ring); }

.port-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 14px; }
.port-grid img, .port-grid video { width: 100%; height: 150px; object-fit: cover; border-radius: var(--r-sm); }
.port-grid .card { padding: 12px; }

.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.gal-grid img { width: 100%; height: 120px; object-fit: cover; border-radius: var(--r-xs); cursor: zoom-in; transition: transform var(--d-3) var(--e-out); }
.gal-grid img:hover { transform: scale(1.04); }

.review-item { padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.review-item:last-child { border-bottom: 0; }
.review-item .review-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.review-item p { margin: 7px 0 4px; color: var(--ink-600); }
.review-item small { color: var(--ink-400); }

.review-card { padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); margin-bottom: 12px; }

.list-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-2);
}

.list-row:last-child { border-bottom: 0; }
.list-row .row-main { flex: 1; min-width: 0; }
.list-row .row-main b { display: block; font-size: .96rem; }
.list-row .row-main small { color: var(--ink-500); }
.row-actions { display: flex; gap: 7px; flex-wrap: wrap; }

.notif-item {
  display: flex;
  gap: 13px;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  margin-bottom: 10px;
  transition: transform var(--d-2) var(--e-out), box-shadow var(--d-2) var(--e-out);
}

.notif-item:hover { transform: translateX(4px); box-shadow: var(--sh-2); }
.notif-item .notif-ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 13px; background: var(--brand-50); color: var(--brand-600); }
.notif-item b { display: block; }
.notif-item p { margin: 2px 0 4px; color: var(--ink-600); font-size: .9rem; }
.notif-item small { color: var(--ink-400); }

.notif-item.unread {
  background: var(--brand-50);
  border-color: var(--brand-200);
  border-inline-start: 3px solid var(--brand-500);
}
.notif-item.unread .notif-ico { background: var(--brand-100); color: var(--brand-700); }
.notif-item.unread b { color: var(--brand-900); }
.notif-item .notif-dot { width: 8px; height: 8px; flex: none; align-self: center; border-radius: 50%; background: var(--brand-500); box-shadow: 0 0 0 4px rgba(10, 148, 130, .16); }

.gate-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.gate-card {
  padding: 18px 14px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1.5px solid var(--line);
  text-align: center;
  font-weight: 700;
  color: var(--ink-700);
  transition: transform var(--d-2) var(--e-spring), border-color var(--d-2) var(--e-out), background var(--d-2) var(--e-out);
}

.gate-card:hover { transform: translateY(-3px); border-color: var(--brand-300); }
.gate-card.sel { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-800); }
.gate-card i { display: block; font-size: 1.5rem; margin-bottom: 7px; }

.filter-bar { padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-2); }
.filter-bar .form-row { margin-bottom: 4px; }

.result-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 22px 0 14px; color: var(--ink-500); }
.result-line b { color: var(--ink-900); }

.skeleton {
  position: relative;
  border-radius: var(--r);
  background: var(--surface-3);
  overflow: hidden;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .75), transparent);
  animation: shimmer 1.5s var(--e-in-out) infinite;
}

.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid var(--line);
  border-top-color: var(--brand-500);
  animation: spin 700ms linear infinite;
}

.center { display: grid; place-items: center; text-align: center; padding-block: 40px; }
.center h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.2rem); }
.center p { color: var(--ink-500); max-width: 46ch; }

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; min-height: 240px; }
  .hero-orbit-b { width: 330px; height: 330px; }
  .hero-orbit-a { width: 240px; height: 240px; }
  .hero-chip-c { display: none; }
  .feed-layout { grid-template-columns: 1fr; }
  .dash { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .dash-side {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 268px;
    max-width: 84vw;
    height: 100%;
    z-index: 92;
    border-radius: 0;
    transform: translateX(-105%);
    visibility: hidden;
    overflow-y: auto;
    transition: transform var(--d-4) var(--e-out), visibility var(--d-4) var(--e-out);
  }

  .dash-side.open { transform: translateX(0); visibility: visible; }
  .feed-layout .side-card { margin-bottom: 12px; }
}

@media (max-width: 720px) {
  .hero-search-row { grid-template-columns: 1fr; }
  .hero-near { width: 100%; justify-content: center; }
  .hero-stats { gap: 20px; }
  .hero-stats div b { font-size: 1.35rem; }
  .cat-row { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 11px; }
  .cat-card { padding: 15px 12px; }
  .gate-grid { grid-template-columns: 1fr; }
  .profile-head { grid-template-columns: auto minmax(0, 1fr); margin-top: -38px; padding-inline: 14px; gap: 14px; }
  .profile-head .avatar { width: 76px; height: 76px; font-size: 2rem; }
  .profile-head .profile-id,
  .profile-head .profile-cta { margin-top: 38px; }
  .profile-cta { grid-column: 1 / -1; justify-content: flex-start; }
  .offer-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .auth-card { padding: 24px 20px; border-radius: var(--r-lg); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 420px) {
  .cat-row { grid-template-columns: repeat(2, 1fr); }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .post-cta .btn { flex: 1 1 100%; }
}

/* ============================================================
   Facebook-style post card
   Scoped to .post-* so every other page keeps its current look.
   ============================================================ */
.post-card {
  padding: 0;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
  transition: box-shadow var(--d-3) var(--e-out);
}
.post-card:hover { transform: none; box-shadow: var(--sh-2); border-color: var(--line); }

.post-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px 0; }
.fb-avatar { width: 40px; height: 40px; font-size: 1.15rem; flex: 0 0 auto; }
.post-head b { font-size: .95rem; font-weight: 700; }
.post-head small { font-size: .8rem; color: var(--ink-500); }
/* permalink (FB timestamp link) */
.post-time { color: inherit; }
.post-time:hover { color: var(--ink-800); text-decoration: underline; }
.post-card .post-title a { color: inherit; }
.post-card .post-title a:hover { text-decoration: underline; }

/* ---------- share sheet (FB-style) ---------- */
.share-veil {
  position: fixed; inset: 0; z-index: 600;
  background: rgba(4, 8, 15, .55);
  backdrop-filter: blur(3px);
  display: grid; place-items: end center;
}
.share-panel {
  width: min(480px, 100%); padding: 10px 14px calc(16px + env(safe-area-inset-bottom, 0px));
  border-radius: 20px 20px 0 0; background: var(--surface);
  box-shadow: var(--sh-4); display: grid; gap: 6px;
  animation: sheet-up .25s var(--e-out) both;
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
.share-grip { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 2px auto 8px; }
.share-opt {
  display: flex; align-items: center; gap: 13px; width: 100%;
  padding: 11px 12px; border: 0; border-radius: 14px;
  background: transparent; cursor: pointer; text-align: start;
  color: var(--ink-900); font: inherit;
}
.share-opt:hover { background: var(--surface-2); }
.share-opt i {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center;
  border-radius: 50%; background: var(--surface-3); color: var(--ink-800); font-size: 1.05rem;
}
.share-opt span { display: grid; }
.share-opt b { font-size: .95rem; }
.share-opt small { color: var(--ink-500); font-size: .78rem; }
.share-cancel {
  margin-top: 6px; padding: 12px; border: 0; border-radius: 14px;
  background: var(--surface-2); color: var(--ink-800);
  font: inherit; font-weight: 700; cursor: pointer;
}
@media (min-width: 700px) {
  .share-veil { place-items: center; padding: 20px; }
  .share-panel { border-radius: 20px; padding-bottom: 16px; }
}

/* ---------- shared (reposted) card ---------- */
.share-note { display: flex; align-items: center; gap: 6px; margin: 2px 16px 10px; color: var(--ink-500); font-size: .82rem; }
.share-note i { color: var(--brand-600); }
.share-embed {
  margin: 0 16px 14px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  overflow: hidden; background: var(--surface-2);
}
.share-embed-head { display: flex; align-items: center; gap: 9px; padding: 10px 12px 0; }
.share-embed-head .avatar { width: 34px; height: 34px; font-size: 1rem; }
.share-embed-head b { font-size: .88rem; color: var(--ink-900); display: flex; align-items: center; gap: 5px; }
.share-embed-head small { color: var(--ink-500); font-size: .75rem; }
.share-embed-title { margin: 8px 12px 0; font-size: .92rem; font-weight: 700; color: var(--ink-900); }
.share-embed-text { margin: 2px 12px 0; font-size: .85rem; color: var(--ink-600); line-height: 1.55; }
.share-embed-img { display: block; width: 100%; margin-top: 10px; padding: 0; border: 0; background: var(--surface-3); cursor: zoom-in; }
.share-embed-img img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.share-embed-foot { display: flex; gap: 8px; padding: 10px 12px; }
@media (max-width: 620px) {
  .share-note { margin-inline: 12px; }
  .share-embed { margin: 0 12px 12px; }
}
.post-id { min-width: 0; flex: 1 1 auto; }
.post-id b a { white-space: normal; overflow: visible; text-overflow: clip; }

/* overflow menu */
.post-menu-wrap { position: relative; flex: 0 0 auto; }
.post-more {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 0; border-radius: var(--r-full);
  background: transparent; color: var(--ink-500);
  font-size: 1.05rem; cursor: pointer;
  transition: background var(--d-2) var(--e-out), color var(--d-2) var(--e-out);
}
.post-more:hover { background: var(--surface-3); color: var(--ink-800); }
.post-menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 6px);
  z-index: 30; min-width: 186px; padding: 6px;
  border: 1px solid var(--line); border-radius: var(--r-xs);
  background: var(--surface); box-shadow: var(--sh-3);
}
.post-menu[hidden] { display: none; }
.post-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink-700);
  font: inherit; font-size: .88rem; font-weight: 600; text-align: start; cursor: pointer;
}
.post-menu button:hover { background: var(--surface-3); }
.post-menu button i { width: 16px; text-align: center; color: var(--ink-500); }
.post-menu button.danger, .post-menu button.danger i { color: var(--danger); }
.post-menu button.danger:hover { background: var(--danger-soft); }

/* text block */
.post-text { padding: 10px 16px 0; }
.post-card .post-title { margin: 0 0 3px; font-size: 1rem; font-weight: 700; color: var(--ink-900); }
.post-card .post-body { margin: 0; font-size: .95rem; line-height: 1.55; color: var(--ink-700); }

/* "See more" collapse: clamp to 3 lines with a soft fade, expand in place. */
.post-card .post-body.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  mask-image: linear-gradient(180deg, #000 68%, transparent 100%);
}

.post-card .post-body.is-clamped.open {
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: horizontal;
  overflow: visible;
  mask-image: none;
}

.post-more-text {
  display: inline-block;
  margin: 4px 0 0;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--ink-500);
  font: inherit;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
}

.post-more-text:hover { color: var(--brand-700); text-decoration: underline; }
.post-more-text:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; border-radius: 4px; }

/* media: edge to edge, no inner border */
.post-media { display: grid; gap: 3px; margin: 12px 0 0; background: var(--surface-3); }
.post-media img, .post-media video {
  display: block; width: 100%; aspect-ratio: 16 / 10;
  object-fit: cover; border: 0; border-radius: 0; background: var(--surface-3);
}
.post-media.duo { grid-template-columns: 1fr 1fr; }
.post-media.duo img, .post-media.duo video { aspect-ratio: 1 / 1; }

/* Clickable image wrapper: fills the grid cell, keeps the image edge-to-edge. */
.post-shot {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--surface-3);
  cursor: zoom-in;
  overflow: hidden;
}

.post-shot:focus-visible { outline: 3px solid var(--brand-500); outline-offset: -3px; }
.post-shot img { transition: transform .28s var(--e-out); }
.post-shot:hover img { transform: scale(1.035); }

.post-zoom-hint {
  position: absolute;
  right: 10px; bottom: 10px;
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(8, 15, 28, .58);
  color: #fff;
  font-size: .78rem;
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}

.post-shot:hover .post-zoom-hint,
.post-shot:focus-visible .post-zoom-hint { opacity: 1; }

@media (hover: none) {
  .post-zoom-hint { opacity: .85; }
}

/* Fullscreen image viewer */
.sk-zoom {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal, 9999);
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 10, 18, .93);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .2s ease;
}

.sk-zoom.on { opacity: 1; }

.sk-zoom[hidden] { display: none; }

.sk-zoom > img {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
  transform: scale(.97);
  transition: transform .22s var(--e-out);
}

.sk-zoom.on > img { transform: none; }

.sk-zoom-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  color: rgba(255, 255, 255, .82);
  font-size: .85rem;
  text-align: center;
}

.sk-zoom-x {
  position: absolute;
  top: 14px; right: 14px;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 1.05rem;
  cursor: pointer;
  transition: background .15s ease;
}

.sk-zoom-x:hover { background: rgba(255, 255, 255, .26); }
.sk-zoom-x:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .sk-zoom, .sk-zoom > img, .post-shot img { transition: none; }
}

.post-media-fallback {
  display: grid; place-items: center;
  height: 190px; margin: 12px 0 0;
  font-size: 3.2rem;
  background: linear-gradient(140deg, var(--brand-50), var(--surface-3) 55%, var(--accent-100));
}

.price-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 10px 16px 0; }
.countdown { margin: 8px 16px 0; }

/* engagement summary */
.post-stats {
  display: flex; align-items: center; gap: 8px;
  margin: 10px 16px 0; padding-top: 9px;
  border-top: 1px solid var(--line-2);
  font-size: .84rem; color: var(--ink-500);
}
.post-stats .s-likes { display: inline-flex; align-items: center; gap: 6px; }
.post-stats .s-likes i { color: var(--brand-600); font-size: .82rem; }
.post-stats .s-likes b { color: var(--ink-600); font-weight: 600; }
.post-stats .s-right { margin-inline-start: auto; color: var(--ink-500); }
.post-stats .s-right:hover { color: var(--ink-800); text-decoration: underline; }

/* action bar: flat, evenly spread, no pill fill */
.post-actions {
  display: flex; align-items: stretch; gap: 0;
  margin: 0; padding: 4px 8px;
  border: 0; border-top: 1px solid var(--line-2);
}
.post-act {
  flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 6px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink-600);
  font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer;
  transition: background var(--d-2) var(--e-out), color var(--d-2) var(--e-out);
}
.post-act i { font-size: .95rem; }
.post-act b { display: none; }
.post-act:hover { transform: none; background: var(--surface-3); color: var(--ink-900); }
.post-act:hover b { color: var(--ink-700); }
.post-act.on { background: transparent; color: var(--brand-700); box-shadow: none; }
.post-act.on i { color: var(--brand-600); }
.post-act.on b { color: var(--brand-700); }
.post-act.tail { flex: 0 0 auto; }

/* CTA row: compact pills, labels shrink to icons well before mobile. */
.post-cta { display: flex; gap: 7px; flex-wrap: wrap; padding: 9px 16px 12px; }
.post-cta .btn { flex: 1 1 104px; }
.post-cta .btn span { white-space: nowrap; }

@media (max-width: 620px) {
  .post-head { padding: 11px 12px 0; }
  .post-text { padding: 9px 12px 0; }
  .post-stats { margin-inline: 12px; }
  .post-act span { font-size: .82rem; }
  .price-row, .countdown { margin-inline: 12px; }
}

@media (max-width: 400px) {
  /* Not enough room for three labels: fall back to icon-first buttons. */
  .post-cta { padding: 8px 12px 11px; gap: 6px; }
  .post-cta .btn { flex: 1 1 0; padding: 7px 8px; }
  .post-cta .btn span { display: none; }
  .post-cta .btn i { font-size: 1rem; }
}
