/* ============================================================
   COMPONENTES — ver docs/DESIGN.md
   ============================================================ */

/* ------------------------------ mídia ------------------------------ */
/* imagem cobre o container; o fundo do container é o fallback quando
   o arquivo falta (o <img> se remove sozinho no onerror). */
.media-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
}
.media-img--veil { filter: brightness(.58) saturate(1.08); }
/* conteúdo acima da imagem */
.on-media { position: relative; z-index: 1; }
.post__media { position: relative; }
/* conteúdo acima da imagem — especificidade zero para não sobrescrever
   o position dos filhos que já se posicionam sozinhos (ex.: botão play) */
:where(.video-card, .event-card, .event-hero, .hero-media, .post__media) > :where(:not(.media-img)) { position: relative; z-index: 1; }

/* ------------------------------ tab bar ------------------------------ */
.tabbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: var(--z-tabbar);
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-top: 1px solid var(--line);
}
.tabbar[hidden] { display: none; }

.tab {
  position: relative;
  height: 100%;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--txt-3);
  transition: color var(--d-1) var(--e-out);
  -webkit-tap-highlight-color: transparent;
}
.tab .ico { transition: transform var(--d-2) var(--e-spring); }
.tab__label {
  font-size: var(--fs-xs);
  line-height: 1;
  font-weight: 600;
  letter-spacing: .02em;
}
.tab:active .ico { transform: scale(.88); }
.tab[aria-current="page"] { color: var(--accent); }
.tab[aria-current="page"] .ico { transform: translateY(-1px) scale(1.06); }
.tab[aria-current="page"]::before {
  content: "";
  position: absolute;
  top: 0;
  width: 22px; height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  animation: tab-in var(--d-2) var(--e-spring);
}
@keyframes tab-in { from { transform: scaleX(.2); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }

/* ------------------------------ header ------------------------------ */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--pad) var(--sp-3);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  transition: border-color var(--d-2) var(--e-out);
  border-bottom: 1px solid transparent;
}
.header[data-stuck="true"] { border-bottom-color: var(--line); }
.header__title {
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  font-weight: 700;
  letter-spacing: -.02em;
  flex: 1 1 auto;
  min-width: 0;
}
.header__sub { font-size: var(--fs-sm); color: var(--txt-3); font-weight: 500; }

/* ------------------------------ botões ------------------------------ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 52px;
  padding: 0 var(--sp-6);
  border-radius: var(--r-md);
  font-size: var(--fs-h3);
  font-weight: 650;
  letter-spacing: -.01em;
  white-space: nowrap;
  transition: transform var(--d-1) var(--e-out),
              background-color var(--d-1) var(--e-out),
              opacity var(--d-1) var(--e-out),
              box-shadow var(--d-2) var(--e-out);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:active { transform: scale(.97); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .42; pointer-events: none; }

.btn--primary {
  background: var(--accent-grad);
  color: var(--accent-ink);
  box-shadow: var(--sh-accent);
}
.btn--primary:hover { box-shadow: 0 16px 40px rgba(255, 77, 0, .38); }

.btn--secondary {
  background: var(--bg-elev-2);
  color: var(--txt);
  border: 1px solid var(--line);
}
.btn--secondary:hover { background: var(--bg-elev-3); }

.btn--ghost { background: transparent; color: var(--txt-2); }
.btn--ghost:hover { background: var(--bg-elev-2); color: var(--txt); }

.btn--danger { background: var(--danger); color: #fff; }
.btn--ok { background: var(--ok-soft); color: var(--ok); border: 1px solid rgba(50, 215, 75, .3); }

.btn--block { width: 100%; }
.btn--sm { min-height: 40px; padding: 0 var(--sp-4); font-size: var(--fs-sm); border-radius: var(--r-sm); }
.btn--pill { border-radius: var(--r-full); }

.btn--icon {
  min-height: 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--r-full);
  background: var(--bg-elev-2);
  color: var(--txt);
  border: 1px solid var(--line);
}
.btn--icon:hover { background: var(--bg-elev-3); }
.btn--icon.is-active { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

.btn__spinner {
  width: 18px; height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------ avatar ------------------------------ */
.avatar {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: var(--r-full);
  background: var(--av-bg, linear-gradient(140deg, #6C3BD1, #3B1E7A));
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .02em;
  overflow: hidden;
  user-select: none;
}
.avatar--sm { width: 36px; height: 36px; font-size: 13px; }
.avatar--lg { width: 76px; height: 76px; font-size: 26px; }
.avatar--xs { width: 28px; height: 28px; font-size: 11px; }
.avatar--ring { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.avatar--ring-muted { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--line-strong); }
.avatar__dot {
  position: absolute;
  right: -1px; bottom: -1px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--ok);
  border: 2.5px solid var(--bg);
}
.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -10px; box-shadow: 0 0 0 2.5px var(--bg); }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* --------------------- ação circular (assinatura) --------------------- */
.actions {
  display: flex;
  gap: var(--sp-3);
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 var(--pad) var(--sp-1);
  scroll-snap-type: x proximity;
}
.actions::-webkit-scrollbar { display: none; }

.action {
  flex: 0 0 auto;
  width: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  scroll-snap-align: start;
  -webkit-tap-highlight-color: transparent;
}
.action__circle {
  position: relative;
  width: 60px; height: 60px;
  border-radius: var(--r-full);
  display: grid;
  place-items: center;
  background: var(--accent-grad);
  color: var(--accent-ink);
  box-shadow: 0 8px 22px rgba(255, 77, 0, .26);
  transition: transform var(--d-1) var(--e-out), box-shadow var(--d-2) var(--e-out);
}
.action:active .action__circle { transform: scale(.93); }
.action__circle .ico { width: 25px; height: 25px; stroke-width: 1.9; }
.action__label {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--txt-2);
  text-align: center;
  letter-spacing: .01em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.action--outline .action__circle {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: none;
  border: 1px solid rgba(255, 77, 0, .22);
}
.action--danger .action__circle { background: var(--danger); color: #fff; box-shadow: 0 8px 22px rgba(255, 59, 48, .3); }
.action__badge {
  position: absolute;
  top: -3px; right: -3px;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  border-radius: var(--r-full);
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid var(--bg);
  line-height: 1;
}

/* ------------------------------ card ------------------------------ */
.card {
  background: var(--bg-elev);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  border: 1px solid var(--line);
  transition: transform var(--d-1) var(--e-out), background-color var(--d-2) var(--e-out);
}
.card--flat { background: var(--bg-elev-2); border-color: transparent; }
.card--interactive { cursor: pointer; }
.card--interactive:hover { background: var(--bg-elev-2); }
.card--interactive:active { transform: scale(.985); }
.card--flush { padding: 0; overflow: hidden; }
.card--accent {
  background: linear-gradient(150deg, rgba(255, 122, 51, .18), rgba(255, 77, 0, .05) 60%), var(--bg-elev);
  border-color: rgba(255, 77, 0, .24);
}

.card__title { font-size: var(--fs-h3); font-weight: 650; letter-spacing: -.01em; }
.card__sub { font-size: var(--fs-sm); color: var(--txt-3); }

/* ------------------------------ seção ------------------------------ */
.section { margin-top: var(--sp-8); }
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 0 var(--pad);
  margin-bottom: var(--sp-3);
}
.section__title {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  font-weight: 680;
  letter-spacing: -.02em;
}
.section__link {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 44px;
  padding-left: var(--sp-2);
}
.section__link:active { opacity: .7; }

/* ------------------------------ chip ------------------------------ */
.chips {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 var(--pad);
  scroll-snap-type: x proximity;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 var(--sp-4);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--r-full);
  background: var(--bg-elev-2);
  color: var(--txt-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: transform var(--d-1) var(--e-out), background-color var(--d-1) var(--e-out), color var(--d-1) var(--e-out);
  -webkit-tap-highlight-color: transparent;
}
.chip:active { transform: scale(.95); }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.chip--ghost { background: transparent; border: 1px solid var(--line); }

/* ------------------------------ segmented ------------------------------ */
.segmented {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--bg-elev-2);
  border-radius: var(--r-full);
}
.segmented__opt {
  flex: 1 1 0;
  min-height: 34px;
  padding: 0 var(--sp-3);
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: 620;
  color: var(--txt-3);
  transition: background-color var(--d-2) var(--e-out), color var(--d-2) var(--e-out);
}
.segmented__opt[aria-selected="true"] { background: var(--bg-elev-3); color: var(--txt); }
[data-theme="light"] .segmented__opt[aria-selected="true"] { background: #fff; box-shadow: var(--sh-1); }

/* ------------------------------ lista ------------------------------ */
.list { background: var(--bg-elev); border-radius: var(--r-lg); overflow: hidden; }
.list--plain { background: transparent; border-radius: 0; }

.list__item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  min-height: 64px;
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  transition: background-color var(--d-1) var(--e-out);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.list__item::after {
  content: "";
  position: absolute;
  left: 76px; right: 0; bottom: 0;
  height: 1px;
  background: var(--line);
}
.list__item:last-child::after { display: none; }
.list__item:hover { background: var(--bg-elev-2); }
.list__item:active { background: var(--bg-elev-3); }
.list__item--plain::after { left: var(--sp-4); }

.list__body { flex: 1 1 auto; min-width: 0; }
.list__title { font-size: var(--fs-h3); font-weight: 600; letter-spacing: -.01em; }
.list__sub { font-size: var(--fs-sm); color: var(--txt-3); }
.list__meta { font-size: var(--fs-xs); color: var(--txt-3); font-weight: 600; text-align: right; flex: 0 0 auto; }
.list__chev { color: var(--txt-3); }

.badge {
  min-width: 20px; height: 20px;
  padding: 0 6px;
  border-radius: var(--r-full);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
  line-height: 1;
}
.badge--muted { background: var(--bg-elev-3); color: var(--txt-2); }
.badge--ok { background: var(--ok-soft); color: var(--ok); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }

/* ------------------------------ hero da home ------------------------------ */
.hero {
  padding: var(--sp-2) var(--pad) var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.hero__greet {
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  font-weight: 720;
  letter-spacing: -.035em;
}
.hero__number {
  font-size: var(--fs-body);
  color: var(--txt-3);
  font-weight: 500;
  margin-top: 2px;
}
.hero__actions { display: flex; gap: var(--sp-2); }

/* ------------------------------ campos ------------------------------ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--txt-3);
  padding-left: 2px;
}
.field__control, .input, .textarea, .select {
  width: 100%;
  min-height: 52px;
  padding: 0 var(--sp-4);
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--txt);
  font-size: var(--fs-h3);
  transition: border-color var(--d-2) var(--e-out), background-color var(--d-2) var(--e-out);
  -webkit-appearance: none;
  appearance: none;
}
.textarea { min-height: 112px; padding: var(--sp-3) var(--sp-4); resize: none; line-height: 1.5; }
.field__control::placeholder, .input::placeholder, .textarea::placeholder { color: var(--txt-3); }
.field__control:focus, .input:focus, .textarea:focus {
  border-color: var(--accent);
  background: var(--bg-elev-3);
  outline: none;
}
.field__hint { font-size: var(--fs-xs); color: var(--txt-3); padding-left: 2px; }
.field__error { font-size: var(--fs-xs); color: var(--danger); font-weight: 600; padding-left: 2px; }
.field[data-invalid="true"] .field__control,
.field[data-invalid="true"] .input,
.field[data-invalid="true"] .textarea { border-color: var(--danger); }

.select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A8A8A' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  padding-right: 44px;
}
.select option { background: var(--bg-elev); color: var(--txt); }

.search {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  height: 48px;
  padding: 0 var(--sp-4);
  background: var(--bg-elev-2);
  border-radius: var(--r-full);
  border: 1px solid transparent;
  transition: border-color var(--d-2) var(--e-out);
}
.search:focus-within { border-color: var(--accent); }
.search .ico { color: var(--txt-3); }
.search input {
  flex: 1 1 auto;
  min-width: 0;
  background: none;
  border: 0;
  color: var(--txt);
  font-size: var(--fs-body);
}
.search input::placeholder { color: var(--txt-3); }

/* ------------------------------ switch ------------------------------ */
.switch {
  position: relative;
  width: 50px; height: 30px;
  border-radius: var(--r-full);
  background: var(--bg-elev-3);
  transition: background-color var(--d-2) var(--e-out);
  flex: 0 0 auto;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--sh-1);
  transition: transform var(--d-2) var(--e-spring);
}
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }

/* ------------------------------ sheet ------------------------------ */
.sheet-overlay {
  position: absolute;
  inset: 0;
  z-index: var(--z-sheet);
  background: var(--overlay);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  animation: fade-in var(--d-2) var(--e-out) both;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }
.sheet-overlay[data-closing="true"] { animation: fade-out var(--d-2) var(--e-out) both; }

.sheet {
  width: 100%;
  max-height: 86%;
  display: flex;
  flex-direction: column;
  background: var(--bg-elev);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  border-top: 1px solid var(--line);
  padding-bottom: calc(var(--safe-b) + var(--sp-4));
  animation: sheet-up var(--d-3) var(--e-spring) both;
  box-shadow: var(--sh-3);
}
@keyframes sheet-up { from { transform: translate3d(0, 100%, 0); } to { transform: translate3d(0, 0, 0); } }
.sheet-overlay[data-closing="true"] .sheet { animation: sheet-down var(--d-2) var(--e-out) both; }
@keyframes sheet-down { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, 100%, 0); } }

.sheet__grip {
  width: 36px; height: 4px;
  border-radius: var(--r-full);
  background: var(--line-strong);
  margin: var(--sp-3) auto var(--sp-2);
  flex: 0 0 auto;
}
.sheet__head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--pad) var(--sp-4);
}
.sheet__title { font-size: var(--fs-h2); font-weight: 680; letter-spacing: -.02em; flex: 1 1 auto; }
.sheet__body { padding: 0 var(--pad); overflow-y: auto; scrollbar-width: none; }
.sheet__body::-webkit-scrollbar { display: none; }
.sheet__foot { padding: var(--sp-4) var(--pad) 0; display: flex; gap: var(--sp-3); }

/* ------------------------------ toast ------------------------------ */
.toast-root {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  pointer-events: none;
  padding: 0 var(--pad);
}
.toast {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  max-width: 100%;
  padding: 10px var(--sp-4);
  border-radius: var(--r-full);
  background: var(--bg-elev-3);
  border: 1px solid var(--line);
  color: var(--txt);
  font-size: var(--fs-sm);
  font-weight: 600;
  box-shadow: var(--sh-2);
  animation: toast-in var(--d-3) var(--e-spring) both;
}
.toast[data-leaving="true"] { animation: toast-out var(--d-2) var(--e-out) both; }
@keyframes toast-in { from { opacity: 0; transform: translate3d(0, 14px, 0) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translate3d(0, 10px, 0) scale(.97); } }
.toast .ico { color: var(--accent); }
.toast[data-kind="ok"] .ico { color: var(--ok); }
.toast[data-kind="warn"] .ico { color: var(--warn); }
.toast[data-kind="danger"] .ico { color: var(--danger); }

/* ------------------------------ estado vazio ------------------------------ */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-2);
  padding: var(--sp-10) var(--sp-6);
}
.empty__icon {
  width: 64px; height: 64px;
  border-radius: var(--r-full);
  background: var(--bg-elev-2);
  display: grid;
  place-items: center;
  color: var(--txt-3);
  margin-bottom: var(--sp-1);
}
.empty__title { font-size: var(--fs-h3); font-weight: 650; }
.empty__text { font-size: var(--fs-sm); color: var(--txt-3); max-width: 260px; }
.empty .btn { margin-top: var(--sp-3); }

/* ------------------------------ contador ------------------------------ */
.counter {
  display: flex;
  align-items: center;
  gap: 6px;
}
.counter__unit {
  min-width: 46px;
  padding: 8px 0 6px;
  border-radius: var(--r-md);
  background: var(--bg-elev-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.counter__num {
  font-size: 22px;
  line-height: 1;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.counter__lbl {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--txt-3);
  text-transform: uppercase;
}
.counter__sep { color: var(--accent); font-weight: 700; font-size: 18px; padding-bottom: 12px; }

/* ------------------------------ produto ------------------------------ */
.product {
  flex: 0 0 auto;
  width: 148px;
  text-align: left;
  scroll-snap-align: start;
  -webkit-tap-highlight-color: transparent;
}
.product__media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-elev-2);
  display: grid;
  place-items: center;
  transition: transform var(--d-2) var(--e-spring);
}
.product:active .product__media { transform: scale(.97); }
.product__media .ico { width: 34px; height: 34px; color: rgba(255, 255, 255, .34); }
.product__tag {
  position: absolute;
  top: 8px; left: 8px;
  padding: 3px 8px;
  border-radius: var(--r-full);
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .03em;
}
.product__fav {
  position: absolute;
  top: 6px; right: 6px;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(8px);
  color: #fff;
}
.product__fav .ico { width: 17px; height: 17px; }
.product__fav[aria-pressed="true"] { color: var(--accent); }
.product__fav[aria-pressed="true"] .ico { fill: var(--accent); }
.product__name {
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-top: var(--sp-2);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product__price {
  font-size: var(--fs-h3);
  font-weight: 720;
  margin-top: 2px;
  letter-spacing: -.02em;
}
.product__meta { font-size: var(--fs-xs); color: var(--txt-3); margin-top: 2px; }

.scroller {
  display: flex;
  gap: var(--sp-3);
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 var(--pad) var(--sp-1);
  scroll-snap-type: x proximity;
}
.scroller::-webkit-scrollbar { display: none; }

/* ------------------------------ mídia / vídeo ------------------------------ */
.video-card {
  position: relative;
  margin: 0 var(--pad);
  border-radius: var(--r-xl);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(120% 120% at 20% 10%, rgba(255, 122, 51, .5), transparent 60%),
    linear-gradient(160deg, #2A1206, #0D0D0D 70%);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--sp-4);
  cursor: pointer;
  transition: transform var(--d-2) var(--e-spring);
}
.video-card:active { transform: scale(.985); }
.video-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .78), transparent 62%);
}
.video-card__play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 62px; height: 62px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .16);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .3);
  color: #fff;
  transition: transform var(--d-2) var(--e-spring), background-color var(--d-2) var(--e-out);
}
.video-card:hover .video-card__play { transform: translate(-50%, -50%) scale(1.08); background: rgba(255, 255, 255, .26); }
.video-card__play .ico { width: 22px; height: 22px; margin-left: 3px; }
.video-card__body { position: relative; z-index: 1; }
.video-card__kicker { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; color: var(--accent-2); text-transform: uppercase; }
.video-card__title { font-size: var(--fs-h2); font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }

/* ------------------------------ evento / destaque ------------------------------ */
.event-card {
  position: relative;
  margin: 0 var(--pad);
  border-radius: var(--r-xl);
  overflow: hidden;
  padding: var(--sp-5);
  background:
    radial-gradient(130% 100% at 100% 0%, rgba(255, 77, 0, .5), transparent 58%),
    linear-gradient(200deg, #1F0E05, #121212 70%);
  border: 1px solid rgba(255, 77, 0, .2);
  color: #fff;
}
.event-card__kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.event-card__title {
  font-size: 26px;
  line-height: 1.08;
  font-weight: 780;
  letter-spacing: -.035em;
  margin-top: 6px;
  text-transform: uppercase;
}
.event-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  color: var(--txt-2);
  margin-top: var(--sp-2);
}
.event-card .counter { margin-top: var(--sp-4); }

/* ------------------------------ stats ------------------------------ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
  padding: 0 var(--pad);
}
.stat {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-3) var(--sp-2);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat__value {
  font-size: 20px;
  font-weight: 740;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.stat__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--txt-3);
}

/* ------------------------------ gráfico ------------------------------ */
.chart {
  display: flex;
  align-items: flex-end;
  gap: var(--sp-2);
  height: 132px;
  padding: var(--sp-3) var(--sp-4) 0;
}
.chart__col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart__bar {
  width: 100%;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(to top, var(--accent), var(--accent-2));
  min-height: 6px;
  transform-origin: bottom;
  animation: bar-grow var(--d-4) var(--e-reveal) both;
  box-shadow: 0 0 18px rgba(255, 77, 0, .22);
}
@keyframes bar-grow { from { transform: scaleY(0); opacity: .2; } to { transform: scaleY(1); opacity: 1; } }
.chart__lbl { font-size: 10px; font-weight: 700; color: var(--txt-3); letter-spacing: .04em; }

/* ------------------------------ feed ------------------------------ */
.post {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.post__head { display: flex; align-items: center; gap: var(--sp-3); }
.post__author { font-size: var(--fs-h3); font-weight: 620; }
.post__time { font-size: var(--fs-xs); color: var(--txt-3); }
.post__text { font-size: var(--fs-body); line-height: 1.55; color: var(--txt-2); }
.post__media {
  border-radius: var(--r-md);
  aspect-ratio: 16 / 10;
  background: linear-gradient(150deg, rgba(255, 77, 0, .28), var(--bg-elev-3));
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .3);
}
.post__foot { display: flex; align-items: center; gap: var(--sp-4); }
.post__act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  font-size: var(--fs-sm);
  font-weight: 620;
  color: var(--txt-3);
  transition: color var(--d-1) var(--e-out), transform var(--d-1) var(--e-out);
}
.post__act:active { transform: scale(.94); }
.post__act[aria-pressed="true"] { color: var(--accent); }
.post__act[aria-pressed="true"] .ico { fill: var(--accent); }

/* ------------------------------ chat ------------------------------ */
.chat {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--pad) var(--sp-3);
}
.bubble {
  max-width: 76%;
  padding: 10px var(--sp-4);
  border-radius: var(--r-lg);
  font-size: var(--fs-body);
  line-height: 1.45;
  animation: rise var(--d-2) var(--e-reveal) both;
  word-wrap: break-word;
}
.bubble--them {
  align-self: flex-start;
  background: var(--bg-elev-2);
  border-bottom-left-radius: 6px;
}
.bubble--me {
  align-self: flex-end;
  background: var(--accent-grad);
  color: var(--accent-ink);
  font-weight: 550;
  border-bottom-right-radius: 6px;
}
.bubble__time { display: block; font-size: 10px; opacity: .62; margin-top: 3px; text-align: right; font-weight: 600; }

.typing { display: flex; gap: 4px; padding: 14px var(--sp-4); }
.typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--txt-3);
  animation: blink 1.2s infinite;
}
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 60%, 100% { opacity: .32; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.composer {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--pad) calc(var(--sp-3) + var(--safe-b));
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
}
.composer__input {
  flex: 1 1 auto;
  min-height: 46px;
  max-height: 120px;
  padding: 12px var(--sp-4);
  background: var(--bg-elev-2);
  border-radius: var(--r-full);
  border: 1px solid transparent;
  color: var(--txt);
  font-size: var(--fs-body);
  resize: none;
  line-height: 1.35;
}
.composer__input:focus { border-color: var(--accent); outline: none; }
.composer__send {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  transition: transform var(--d-1) var(--e-out), opacity var(--d-1) var(--e-out);
}
.composer__send:active { transform: scale(.92); }
.composer__send[disabled] { opacity: .35; }

/* ------------------------------ detalhe produto ------------------------------ */
.hero-media {
  margin: 0 var(--pad);
  border-radius: var(--r-xl);
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(90% 90% at 25% 15%, rgba(255, 122, 51, .36), transparent 62%),
    var(--bg-elev-2);
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .26);
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}
.hero-media .ico { width: 56px; height: 56px; }

.price {
  font-size: 30px;
  font-weight: 780;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}

.pay-opt {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--r-md);
  background: var(--bg-elev-2);
  border: 1px solid transparent;
  transition: border-color var(--d-1) var(--e-out), background-color var(--d-1) var(--e-out);
  width: 100%;
  text-align: left;
}
.pay-opt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.pay-opt__icon {
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  background: var(--bg-elev-3);
  display: grid;
  place-items: center;
  color: var(--accent);
  flex: 0 0 auto;
}

/* ------------------------------ métrica / transação ------------------------------ */
.tx {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  position: relative;
}
.tx::after { content: ""; position: absolute; left: 68px; right: 0; bottom: 0; height: 1px; background: var(--line); }
.tx:last-child::after { display: none; }
.tx__icon {
  width: 40px; height: 40px;
  border-radius: var(--r-full);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--ok-soft);
  color: var(--ok);
}
.tx__icon--out { background: var(--danger-soft); color: var(--danger); }
.tx__amount { font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* ------------------------------ agenda ------------------------------ */
.agenda-day { display: flex; gap: var(--sp-3); padding: 0 var(--pad); }
.agenda-date {
  flex: 0 0 auto;
  width: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding-top: 10px;
}
.agenda-date__num { font-size: 20px; font-weight: 740; letter-spacing: -.03em; line-height: 1; }
.agenda-date__mon { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--txt-3); }
.agenda-items { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.agenda-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-elev);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  width: 100%;
  text-align: left;
  transition: transform var(--d-1) var(--e-out), background-color var(--d-1) var(--e-out);
}
.agenda-item:active { transform: scale(.985); background: var(--bg-elev-2); }

/* ------------------------------ misc ------------------------------ */
.divider { height: 1px; background: var(--line); margin: var(--sp-4) var(--pad); }

.pill-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.pill {
  padding: 5px 10px;
  border-radius: var(--r-full);
  background: var(--bg-elev-2);
  font-size: var(--fs-xs);
  font-weight: 650;
  color: var(--txt-2);
}

.slider-note { font-size: var(--fs-xs); color: var(--txt-3); text-align: center; padding: var(--sp-3); }

.fab {
  position: absolute;
  right: var(--pad);
  bottom: calc(var(--tabbar-h) + var(--safe-b) + var(--sp-4));
  z-index: 30;
  height: 52px;
  padding: 0 var(--sp-5) 0 var(--sp-4);
  border-radius: var(--r-full);
  background: var(--accent-grad);
  color: var(--accent-ink);
  font-weight: 680;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  box-shadow: var(--sh-accent);
  transition: transform var(--d-1) var(--e-out);
}
.fab:active { transform: scale(.95); }

.sos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.sos-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: var(--sp-4);
  border-radius: var(--r-md);
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  text-align: left;
  transition: transform var(--d-1) var(--e-out), background-color var(--d-1) var(--e-out);
}
.sos-tile:active { transform: scale(.97); }
.sos-tile .ico { color: var(--danger); }
.sos-tile__title { font-size: var(--fs-sm); font-weight: 650; }
.sos-tile__sub { font-size: 11px; color: var(--txt-3); }
