/*
 * Munch screen styles built on ui.css primitives. Loaded last.
 */

/* ====================== Retrospectiva ====================== */
.retro-head .back-link { margin-bottom: var(--s-3); }
.retro-head .screen-title { margin-bottom: var(--s-4); }
.page-retrospectiva .segmented { margin-bottom: var(--s-3); }
.page-retrospectiva .period-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); min-height: 0; margin-bottom: var(--s-5); }
.page-retrospectiva .period-tabs__buttons { flex: 0 1 auto; min-width: 0; margin-inline: 0; padding: 0; margin-right: 0; padding-right: 0; flex-wrap: nowrap; gap: var(--s-2); }
.page-retrospectiva .period-tabs a.chip { padding-inline: 14px; font-size: .86rem; }
.page-retrospectiva .retrospectiva-month-picker { flex: none; margin: 0; animation: none; clip-path: none; }
.chip-select, .page-retrospectiva .retrospectiva-month-picker select {
  width: auto; min-height: 38px; padding: 7px 36px 7px 14px;
  border: 0; border-radius: var(--r-control);
  background-color: var(--surface-2); background-position: right 12px center;
  font-size: .86rem; font-weight: 700;
}
.retrospectiva-month-fallback { border-radius: var(--r-md); background: var(--surface-2); }

.retro-launch {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center; gap: var(--s-4);
  width: 100%; min-height: 148px; margin: 0 0 var(--s-4); padding: var(--s-5);
  border: 0; border-radius: var(--r-lg);
  background: var(--orange);
  color: var(--ink); text-align: left;
}
.retro-launch__art { position: relative; flex: none; width: 92px; height: 108px; }
.retro-launch__art img {
  position: absolute; width: 60px; aspect-ratio: 2/3; object-fit: cover;
  border-radius: 8px; box-shadow: 0 0 0 2px var(--orange);
}
.retro-launch__art img:nth-child(1) { left: 0; top: 14px; transform: rotate(-9deg); }
.retro-launch__art img:nth-child(2) { left: 18px; top: 4px; z-index: 1; }
.retro-launch__art img:nth-child(3) { left: 34px; top: 16px; transform: rotate(8deg); z-index: 2; }
.retro-launch__art:empty { background: url("/icons/mascot-384-v2.png") center / contain no-repeat; }
.retro-launch__copy { display: grid; gap: 2px; }
.retro-launch__copy small { font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.retro-launch__copy strong { font-family: var(--font-display); font-size: 1.6rem; font-weight: 400; line-height: 1.02; }
.retro-launch__copy span { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: .86rem; font-weight: 800; }
.retro-launch__copy .ui-icon { width: 16px; height: 16px; }

.page-retrospectiva .stat-strip { margin-bottom: var(--s-3); }
.page-retrospectiva .stat-strip > div { text-align: left; }
.retro-details, .page-retrospectiva .retrospectiva-position { margin: 0 0 var(--s-3); padding: 0; max-width: none; }
.retrospectiva-detail { padding-right: var(--s-6); }
.retrospectiva-detail .list-row__lead { width: 24px; height: 24px; }
.list-row__lead--rank { width: auto; min-width: 48px; padding: 0 10px; font-family: var(--font-display); font-size: 1.3rem; color: var(--yellow); }
.retro-section { margin-top: var(--s-6); }
.retro-works { --carousel-item: 120px; }
.retro-share { display: flex; justify-content: center; margin: var(--s-6) 0 0; }
.retro-share .share-actions { margin: 0; width: 100%; }
.retro-share .share-actions__trigger { width: 100%; }
.retro-empty { margin-top: var(--s-2); }

.retrospectiva-paywall { text-align: center; }
.retrospectiva-paywall h2 { margin-top: var(--s-4); }
.retrospectiva-paywall .stat-strip { max-width: 26rem; margin: 0 auto var(--s-3); }
.retrospectiva-paywall .stat-strip > div { text-align: center; }
.retrospectiva-paywall__includes { display: grid; gap: var(--s-2); max-width: 26rem; margin: var(--s-4) auto; padding: 0; list-style: none; text-align: left; }
.retrospectiva-paywall__includes li { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); font-weight: 700; }
.retrospectiva-paywall__includes li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: .55em; border-radius: 50%; background: var(--orange); }
.retrospectiva-example { margin: 0; padding: 0; border: 0; }
.retrospectiva-paywall .button--full { max-width: 26rem; margin-inline: auto; display: flex; }
.retro-paywall__teaser { position: relative; height: 170px; margin: var(--s-2) auto 0; max-width: 260px; }
.retro-paywall__slide {
  position: absolute; top: 0; left: 50%; width: 104px; height: 168px; border-radius: 12px;
  
}
.retro-paywall__slide--orange { background: var(--orange); transform: translateX(-130%) rotate(-10deg); }
.retro-paywall__slide--yellow { background: var(--yellow); transform: translateX(30%) rotate(10deg); }
.retro-paywall__slide--ink { z-index: 1; display: grid; place-items: center; background: var(--surface-3); transform: translateX(-50%); }
.retro-paywall__slide--ink img { width: 64px; }

/* ---------- Stories ---------- */
.stories {
  position: fixed; inset: 0;
  width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh;
  margin: 0; padding: 0; border: 0;
  background: var(--bg); color: var(--text);
  overflow: hidden; user-select: none; -webkit-user-select: none;
  touch-action: manipulation;
}
.stories::backdrop { background: #000; }
.stories[open] { display: block; }
@media (min-width: 700px) {
  .stories { inset: 0; width: min(440px, 100vw); height: min(860px, 100dvh); margin: auto; border-radius: 20px; }
  .stories::backdrop { background: #000d; }
}
.stories__bars {
  position: absolute; z-index: 5; top: calc(10px + env(safe-area-inset-top)); left: 12px; right: 12px;
  display: flex; gap: 4px;
}
.stories__bars > span { flex: 1; height: 3px; border-radius: 3px; background: #ffffff40; overflow: hidden; }
.stories__bars i { display: block; height: 100%; background: #fff; transform-origin: left; transform: scaleX(var(--p, 0)); }
.stories__close { position: absolute; z-index: 6; top: calc(22px + env(safe-area-inset-top)); right: 8px; color: inherit; }
.stories__close .ui-icon { width: 24px; height: 24px; }

.story {
  position: absolute; inset: 0; z-index: 1;
  display: none;
  padding: calc(70px + env(safe-area-inset-top)) 28px calc(40px + env(safe-area-inset-bottom));
  overflow: hidden;
}
.story.is-active { display: flex; }
.story--orange { background: var(--orange); color: var(--ink); }
.story--yellow { background: var(--yellow); color: var(--ink); }
.story--ink { background: var(--bg); }
.story--cover { margin: 0; }
.story--orange .stories__close, .story--yellow .stories__close { color: var(--ink); }
.stories:has(.story--orange.is-active, .story--yellow.is-active) .stories__close { color: var(--ink); }
.stories:has(.story--orange.is-active, .story--yellow.is-active) .stories__bars > span { background: #0f0f1033; }
.stories:has(.story--orange.is-active, .story--yellow.is-active) .stories__bars i { background: var(--ink); }

.story__inner { display: flex; flex-direction: column; justify-content: center; gap: var(--s-3); width: 100%; }
.story__inner--bottom { justify-content: flex-end; position: relative; z-index: 1; }
.story__inner--top { justify-content: flex-start; }
.story__kicker { margin: 0; font-size: .95rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.story__display { margin: 0; font-size: clamp(2.4rem, 11vw, 3.4rem); line-height: 1; overflow-wrap: anywhere; }
.story__display--yellow { color: var(--yellow); }
.story__giant { margin: 0; font-family: var(--font-display); font-size: clamp(6rem, 38vw, 10rem); line-height: .85; letter-spacing: -.03em; }
.story--ink .story__giant { color: var(--orange); }
.story__giant--word { font-size: clamp(3.4rem, 17vw, 5.4rem); line-height: .95; overflow-wrap: anywhere; }
.story__lead { margin: 0; font-size: 1.25rem; font-weight: 700; line-height: 1.3; }
.story__pill { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; margin: var(--s-2) 0 0; padding: 10px 16px; border-radius: var(--r-control); background: #0f0f101f; font-weight: 700; }
.story--ink .story__pill, .story--cover .story__pill { background: #ffffff17; }
.story__pill .ui-icon { width: 18px; height: 18px; }
.story__mascot { width: 120px; align-self: flex-start; margin-top: var(--s-4); }
.story--final .story__inner { align-items: center; text-align: center; }
.story--final .story__mascot { align-self: center; margin: 0 0 var(--s-2); }
.story__counts { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-2); margin: var(--s-5) 0 0; padding: 0; list-style: none; }
.story__counts li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; padding: 12px; overflow-wrap: anywhere; border-radius: var(--r-md); background: #ffffff0f; color: var(--muted); font-weight: 700; }
.story__counts strong { color: var(--text); font-size: 1.2rem; }
.story__counts .ui-icon { color: var(--orange); width: 18px; height: 18px; }
.story--cover .story__inner { align-items: center; text-align: center; }
.story--cover .cover { margin: var(--s-3) 0; }
.story--cover .story__pill { align-self: center; }
.story__mosaic { position: absolute; inset: -6%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; transform: rotate(-8deg) scale(1.1); opacity: .55; }
.story__mosaic img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 10px; }
.story--mosaic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, var(--bg) 85%); }
.story__awards { display: grid; gap: var(--s-2); margin: var(--s-3) 0 0; padding: 0; list-style: none; }
.story__awards li { display: flex; align-items: center; gap: var(--s-3); padding: 12px 14px; border-radius: var(--r-md); background: #ffffff0f; }
.story__awards span:last-child { display: grid; }
.story__awards small { color: var(--yellow); font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.story__awards .avatar-stack { --avatar-ring: var(--surface-2); }
.story__actions { width: 100%; max-width: 320px; margin-top: var(--s-4); }
.story__actions .share-actions { margin: 0; }
.story__actions .share-actions__trigger { width: 100%; }
.button--ink { background: var(--ink); color: var(--text); }
.button--ink:hover { background: var(--surface-hover); }

.story.is-active .story__anim { animation: story-rise 520ms var(--ease-out) both; }
.story.is-active .story__anim:nth-child(2) { animation-delay: 90ms; }
.story.is-active .story__anim:nth-child(3) { animation-delay: 180ms; }
.story.is-active .story__anim:nth-child(4) { animation-delay: 270ms; }
.story.is-active .story__anim:nth-child(5) { animation-delay: 360ms; }
.story.is-active .story__awards .story__anim:nth-child(n) { animation-delay: calc(var(--i, 1) * 80ms); }
.story.is-active .story__giant { animation-name: story-pop; }
@keyframes story-rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes story-pop { 0% { opacity: 0; transform: scale(.7); } 70% { transform: scale(1.04); } }
.stories.is-paused .story__anim { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .story.is-active .story__anim { animation: none; }
}

/* ---------- Podium (shared: stories, ranking, group home) ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: var(--s-2); margin: var(--s-4) 0 0; padding: 0; list-style: none; }
.podium__place { display: grid; justify-items: center; gap: 6px; min-width: 0; text-align: center; }
.podium__name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; font-size: .9rem; }
.podium__step {
  display: grid; place-items: center; align-content: center; width: 100%;
  border-radius: 10px 10px 6px 6px; background: var(--surface-3);
  font-family: var(--font-display);
}
.podium__step strong { font-size: 1.7rem; font-weight: 400; line-height: 1; }
.podium__step small { font-family: var(--font-body); color: var(--muted); font-weight: 800; }
.podium__place--1 .podium__step { height: 108px; background: var(--orange); color: var(--ink); }
.podium__place--1 .podium__step small { color: #0f0f10b3; }
.podium__place--2 .podium__step { height: 80px; }
.podium__place--3 .podium__step { height: 62px; }
.podium__place--1 .avatar { box-shadow: 0 0 0 3px var(--yellow); }
.podium__crown { color: var(--yellow); width: 26px; height: 26px; margin-bottom: -4px; }
.podium__crown .ui-icon { width: 26px; height: 26px; fill: currentColor; }

/* ====================== Challenges (shared card) ====================== */
.challenge-card { display: grid; gap: 10px; padding: var(--s-4); border-radius: var(--r-lg); background: var(--surface-2); color: inherit; }
.challenge-card + .challenge-card { margin-top: var(--s-2); }
.challenge-card__top { display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.challenge-card__icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: #ff6a001f; color: var(--orange); }
.challenge-card.is-done .challenge-card__icon { background: #5ed39a22; color: var(--success); }
.challenge-card__icon .ui-icon { width: 20px; height: 20px; }
.challenge-card__title { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.challenge-card__title strong, .challenge-card__title small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.challenge-card__title small { color: var(--muted); font-size: .8rem; font-weight: 700; }
.challenge-card__pct { font-family: var(--font-display); font-size: 1.4rem; color: var(--yellow); }
.challenge-card.is-done .challenge-card__pct { color: var(--success); }
.challenge-card__meta { display: flex; justify-content: space-between; gap: var(--s-2); color: var(--muted); font-size: .8rem; font-weight: 700; }

/* ====================== Group home ====================== */
.group-hero { margin-bottom: var(--s-5); }
.group-hero .back-link { margin-bottom: var(--s-3); }
.group-hero__faces { margin-bottom: var(--s-3); }
.group-hero__faces .avatar-stack { --avatar-size: 44px; }
.group-hero__faces .avatar { --avatar-size: 44px; }
.group-hero .group-title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.group-hero .group-title h1 { margin: 0; }
.group-hero__meta { margin: var(--s-1) 0 var(--s-4); font-size: .9rem; }
.group-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.group-hero__actions .button { min-height: 44px; }
.group-hero__form { margin: 0; }
.group-detail-heading__copy-button .ui-icon { width: 18px; height: 18px; }
.group-first-steps { margin: 0 0 var(--s-4); padding: 0; list-style: none; }
.group-first-steps .list-row__lead { font-family: var(--font-display); font-size: 1.15rem; }
.group-first-steps .list-row__lead.is-done { background: #5ed39a22; color: var(--success); }
.group-destinations { margin: var(--s-6) 0 var(--s-2); }
.group-destinations .tile { display: flex; align-items: center; min-height: 68px; gap: var(--s-3); padding: var(--s-3); }
.group-destinations .tile > span:last-child { min-width: 0; }
.group-destinations .tile strong { font-size: .95rem; }
.group-destinations .tile small { display: block; font-size: .76rem; line-height: 1.2; }
.tile-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.group-section { margin-top: var(--s-7); }
.group-section .section-title { margin-top: 0; }
.pick-card {
  display: flex; align-items: center; gap: var(--s-4);
  margin: 0 0 var(--s-3); padding: var(--s-4);
  border-radius: var(--r-lg); color: inherit;
}
.pick-card.backdrop { margin-inline: 0; }
.pick-card.backdrop::after { background: linear-gradient(90deg, #0f0f10aa, #0f0f1066); }
.pick-card__body { display: grid; gap: 2px; min-width: 0; }
.pick-card__body small { color: var(--yellow); font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.pick-card__body strong { font-family: var(--font-display); font-size: 1.5rem; font-weight: 400; line-height: 1.05; }
.pick-card__body span { color: var(--muted); font-size: .85rem; font-weight: 700; }
/* Capas da lista: cabem ~3,3 por vez, então a próxima aparece cortada na borda e mostra que dá para arrastar. */
.group-watchlist-carousel, .carousel.home-suggestions { --carousel-item: min(132px, calc((100% - 2 * var(--s-3)) / 3.3)); }
.group-members .section-title span { font-weight: 800; }
.group-members .list-row > .ui-icon { flex: none; color: var(--text-subtle); }
.group-members .list-row__value { color: var(--yellow); }
.invite-panel {
  position: relative; overflow: hidden;
  padding: var(--s-6) var(--s-5) var(--s-5); border-radius: var(--r-lg);
  background: var(--surface-2);
}
.invite-panel h2 { max-width: 15ch; margin: 0 0 var(--s-1); font-size: 1.6rem; }
.invite-panel__art { position: absolute; top: 14px; right: 14px; width: 72px; transform: rotate(8deg); }
.invite-panel__art img { width: 100%; }
.invite-link { margin: var(--s-4) 0 var(--s-2); }
.invite-link input { border: 0; border-radius: var(--r-control); background: var(--surface-3); font-size: .85rem; color: var(--muted); }
.invite-link .button { border-radius: var(--r-control); }
.invite-panel__rotate { margin-top: var(--s-2); font-size: .85rem; }
.invite-panel form { margin: 0; }
.group-invite-limit { display: grid; gap: var(--s-2); justify-items: start; }
/* No topo da página, o aviso precisa respirar antes dos atalhos do grupo. */
.group-detail-heading + .group-invite-limit { margin: var(--s-4) 0 var(--s-4); }
.group-invite-limit p { margin: 0; }
.button--danger { background: #ff948222; color: var(--danger); }
.button--danger:hover { background: #ff948233; }
.danger-zone { margin-top: var(--s-8); padding: var(--s-5); border-radius: var(--r-lg); background: color-mix(in srgb, var(--danger) 16%, var(--surface-1)); }
.danger-zone h2 { margin: 0 0 var(--s-1); font-size: 1.3rem; color: var(--danger); }
.danger-zone form { margin: 0; }
.sheet .list-row { min-height: 60px; }
.sheet .list-row form, .sheet form.button_to { margin: 0; }
.list form.button_to { margin: 0; }
.list form.button_to + *, .list > * + form.button_to { box-shadow: inset 0 1px 0 #ffffff0f; }

/* ====================== Groups list ====================== */
.groups-heading { align-items: flex-end; margin-bottom: var(--s-5); }
.groups-heading .eyebrow { margin: 0; }
.groups-heading .screen-title { margin: var(--s-1) 0 0; }
.groups-heading .button .ui-icon { width: 16px; height: 16px; }
.group-list { gap: var(--s-3); }
.group-tile {
  position: relative;
  display: grid; gap: var(--s-3); align-items: stretch; justify-content: stretch;
  padding: var(--s-5); border-radius: var(--r-lg); background: var(--surface-2); color: inherit;
}
.group-tile.is-current { box-shadow: inset 0 0 0 2px var(--orange); }
.group-tile__top { display: flex; align-items: center; justify-content: space-between; --avatar-ring: var(--surface-2); }
.group-tile__name { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.group-tile__name-link { color: inherit; text-decoration: none; }
.group-tile__name-link::after { content: ""; position: absolute; inset: 0; }
.group-tile__name-link:focus-visible::after { outline: 2px solid var(--orange); outline-offset: -2px; border-radius: var(--r-lg); }
.group-tile__bite { position: relative; z-index: 1; }
.group-tile__name strong { font-family: var(--font-display); font-size: 1.7rem; font-weight: 400; line-height: 1.05; overflow-wrap: anywhere; }
.group-tile__meta { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.group-tile__meta p { margin: 0; color: var(--muted); font-size: .88rem; font-weight: 700; }
.group-tile__rank { flex: none; padding: 4px 12px; border-radius: var(--r-control); background: #ffc43d1f; color: var(--yellow); font-size: .85rem; font-weight: 800; }
.group-tile__rank--idle { background: var(--surface-3); color: var(--muted); }
.plan-strip { margin-top: var(--s-6); padding: var(--s-4); border-radius: var(--r-md); background: var(--surface-1); }
.plan-strip p { margin: 0; color: var(--muted); font-size: .88rem; }
.plan-strip strong { color: var(--text); }
.plan-strip .groups-upgrade { margin-top: var(--s-2); }

/* ====================== Social rows (lists in social screens) ====================== */
.social-row { padding: var(--s-4) var(--s-5); border-radius: var(--r-lg); background: var(--surface-2); }
.social-list { gap: var(--s-2); }
.challenges-heading { align-items: flex-end; }
.challenges-heading .eyebrow { margin-top: 0; }
.challenges-heading .screen-title { margin: var(--s-1) 0 0; }
.challenges-heading .button .ui-icon { width: 16px; height: 16px; }
.challenge-row { align-items: flex-start; }
.challenge-row__body { flex: 1; min-width: 0; }
.challenge-row__body .progress-bar { margin: var(--s-3) 0 var(--s-1); }
.challenge-row__metric { color: var(--yellow); font-size: .9rem; }
.challenge-row.is-done .challenge-row__metric { color: var(--success); }
.challenge-row__dates { color: var(--muted); font-weight: 700; }
.challenge-row { position: relative; }
.challenge-row__title-line { padding-right: 104px; }
.challenge-row__status { position: absolute; top: var(--s-4); right: var(--s-4); flex: none; }
.challenge-feed-settings { margin: var(--s-6) 0 0; padding: 0 var(--s-4) var(--s-2); border: 0; border-radius: var(--r-lg); background: var(--surface-1); }
.challenge-feed-settings[open] { padding-bottom: var(--s-4); }

/* Challenge creation shares one centered axis with the navigation. */
.challenge-form-heading { max-width: 620px; margin-inline: auto; }

/* ---------- Challenge detail ---------- */
.challenge-detail__heading .eyebrow { margin: 0; }
.challenge-detail__heading .screen-title { margin: var(--s-1) 0 0; }
.challenge-detail__meta { align-items: center; gap: var(--s-2) var(--s-3); }
.challenge-detail { padding: var(--s-5); border-radius: var(--r-lg); background: var(--surface-2); }
.challenge-detail__hero { display: flex; align-items: baseline; gap: var(--s-3); margin-bottom: var(--s-3); }
.challenge-detail__percent { font-family: var(--font-display); font-size: clamp(3.6rem, 18vw, 5rem); line-height: .9; color: var(--orange); }
.challenge-detail.is-done .challenge-detail__percent { color: var(--success); }
.challenge-detail__bar { height: 12px; }
.challenge-detail__bar::-webkit-progress-value { background: var(--orange); }
.challenge-detail__bar::-moz-progress-bar { background: var(--orange); }
.challenge-detail.is-done .challenge-detail__bar::-webkit-progress-value { background: var(--success); }
.challenge-detail.is-done .challenge-detail__bar::-moz-progress-bar { background: var(--success); }
.challenge-detail__remaining { margin: var(--s-5) 0 var(--s-3); }
.challenge-detail__rule { padding-top: var(--s-4); box-shadow: inset 0 1px 0 #ffffff12; }
.challenge-detail__invite, .challenge-detail__management { border-top: 0; }
.challenge-celebration {
  display: flex; align-items: center; gap: var(--s-4); max-width: 680px; margin: 0 0 var(--s-3); padding: var(--s-4) var(--s-5);
  border-radius: var(--r-lg); background: var(--yellow); color: var(--ink);
}
.challenge-detail__heading, .challenge-detail, .challenge-celebration, .challenge-detail__share, .challenge-detail__invite, .challenge-detail__management { margin-inline: auto; }
.challenge-celebration__art { width: 64px; flex: none; animation: celebrate-bounce 900ms var(--ease-out) both; }
.challenge-celebration strong { font-family: var(--font-display); font-size: 1.6rem; font-weight: 400; }
.challenge-celebration p { margin: 0; font-weight: 700; }
@keyframes celebrate-bounce { 0% { transform: scale(.4) rotate(-20deg); opacity: 0; } 60% { transform: scale(1.15) rotate(6deg); opacity: 1; } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .challenge-celebration__art { animation: none; } }
.challenge-detail__share .share-actions { margin-top: var(--s-4); }
.challenge-detail__share .share-actions__trigger { width: 100%; }

/* ====================== Munch Awards ====================== */
.awards-header { position: relative; margin-bottom: var(--s-5); }
.awards-header__trophy {
  display: grid; place-items: center; width: 64px; height: 64px; margin: var(--s-2) 0 var(--s-3);
  border-radius: 14px; background: var(--yellow); color: var(--ink);
  transform: rotate(-6deg);
}
.awards-header__trophy .ui-icon { width: 34px; height: 34px; stroke-width: 2.2; }
.awards-header .screen-title { margin: 0 0 var(--s-1); }
.awards-periods { margin-bottom: var(--s-5); }
.awards-list { gap: var(--s-2); }
.award-card {
  padding: var(--s-4) var(--s-5); border: 0; border-radius: var(--r-lg);
  background: var(--surface-2);
}
.award-card:target { box-shadow: inset 0 0 0 2px var(--orange); }
.award-card__main { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--s-3) var(--s-4); }
.award-card__faces { position: relative; --avatar-ring: var(--surface-2); }
.award-card__medal {
  position: absolute; right: -6px; bottom: -6px; display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%; background: var(--yellow); color: var(--ink);
  box-shadow: 0 0 0 3px var(--surface-2);
}
.award-card__medal .ui-icon { width: 15px; height: 15px; stroke-width: 2.6; }
.award-card h2 { margin: 0 0 2px; font-size: 1.25rem; color: var(--yellow); }
.award-card__winner span { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.award-card__result { grid-column: 2; border: 0; border-radius: var(--r-control); background: var(--surface-3); color: var(--text); font-weight: 800; font-size: .85rem; min-height: 30px; padding: 4px 12px; }
@media (min-width: 600px) {
  .award-card__main { grid-template-columns: auto minmax(0, 1fr) auto; }
  .award-card__result { grid-column: 3; }
}
.awards-share { margin: var(--s-5) 0 0; padding: var(--s-4); border: 0; border-radius: var(--r-lg); background: var(--surface-1); text-align: center; }
.awards-share .share-actions__trigger { width: 100%; }
.awards-upgrade { border: 0; border-radius: var(--r-md); background: var(--surface-1); }

/* ====================== Compatibility (Blend) ====================== */
.blend-head .eyebrow { margin: 0; }
.blend-head .screen-title { margin: var(--s-1) 0 var(--s-5); overflow-wrap: anywhere; }
.blend { padding: 0; background: transparent; text-align: center; }
.blend h2 { margin: var(--s-4) 0 var(--s-1); font-size: 1.9rem; color: var(--text); }
.blend > p { margin: 0 auto var(--s-5); max-width: 36ch; }
.blend__ring {
  display: grid; place-items: center; width: 220px; aspect-ratio: 1; margin: 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--orange) calc(var(--pct) * 1%), var(--surface-3) 0);
  position: relative;
}
.blend__ring::before { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: var(--bg); }
.blend__faces { position: relative; display: flex; }
.blend__faces .avatar { --avatar-size: 76px; box-shadow: 0 0 0 4px var(--bg); }
.blend__faces .avatar + .avatar { margin-left: -18px; }
.blend__highlights { text-align: left; }
.blend__highlights .list-row { align-items: flex-start; }
.blend__highlights .list-row__title { white-space: normal; }

/* Compatibilidade lacrada (sem Bite no grupo): anel tracejado vazio, cadeado e faixas no lugar dos dados. */
.blend__ring--locked { background: repeating-conic-gradient(var(--surface-3) 0 6deg, transparent 6deg 12deg); }
.blend__ring--locked .blend__faces { filter: grayscale(.6); opacity: .85; }
.blend__seal { position: absolute; bottom: 8px; left: 50%; display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 50%; background: var(--mustard); color: var(--ink); transform: translateX(-50%); }
.blend__seal .ui-icon { width: 22px; height: 22px; }
.blend__hidden-number { display: inline-block; min-width: 2ch; padding: 0 6px; margin-right: 2px; border-radius: 8px;
  background: var(--surface-3); color: var(--mustard); }
.blend__highlights--locked .list-row { align-items: center; }
.blend__highlights--locked .list-row > .ui-icon { flex: none; width: 18px; height: 18px; color: var(--muted); }
.blend__redacted { display: block; width: var(--redacted, 60%); height: 14px; margin-top: 6px; border-radius: 4px; background: var(--surface-3); }
.blend__redacted--small { height: 10px; background: var(--surface-hover); }
.blend__lead--agree { color: var(--rose); background: color-mix(in srgb, var(--rose) 12%, transparent); }
.blend__lead--fight { color: var(--yellow); background: #ffc43d1f; }

/* ====================== Group watchlist ====================== */
.watchlist-heading { align-items: flex-end; }
.watchlist-heading .eyebrow { margin: 0; }
.watchlist-heading .screen-title { margin: var(--s-1) 0 0; }
.watchlist-heading .button .ui-icon { width: 16px; height: 16px; }
.pick-hero { display: flex; gap: var(--s-4); align-items: flex-start; margin-top: 0; margin-bottom: var(--s-5); padding-top: var(--s-5); border-radius: 0; }
.pick-hero__body { flex: 1; min-width: 0; display: grid; gap: var(--s-1); }
.pick-hero h2 { margin: 0; color: var(--yellow); font-family: var(--font-body); font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.pick-hero__title { margin: 0; }
.pick-hero__title strong { color: var(--text); font-family: var(--font-display); font-size: 1.7rem; font-weight: 400; line-height: 1.05; }
.pick-hero p.muted { margin: 0 0 var(--s-2); font-size: .85rem; }
.pick-hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.pick-hero__actions form { margin: 0; }
.pick-hero .share-actions { margin: var(--s-1) 0 0; }
.pick-hero .share-actions__trigger { padding-inline: 0; min-height: 36px; color: var(--muted); }
.watchlist-list { margin-top: 0; }
.watchlist-item { flex-wrap: nowrap; align-items: center; gap: var(--s-3); padding: var(--s-3); }
.watchlist-item__rank { flex: none; width: 18px; color: var(--text-subtle); font-family: var(--font-display); font-size: 1.1rem; text-align: center; }
.watchlist-item__body { flex: 1; min-width: 0; }
.watchlist-item__body h3 { margin: 0; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.watchlist-item__body p { margin: 0; font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.watchlist-item__body small { font-weight: 700; }
.watchlist-item .social-row__actions { flex: none; display: flex; align-items: center; gap: 0; width: auto; padding-top: 0; border-top: 0; }
.chip--vote { min-height: 34px; padding: 5px 14px; }
.chip--vote.is-active { background: #ff6a0026; color: var(--orange); }
.chip--vote .ui-icon { fill: currentColor; }
.watchlist-item__more { margin-left: -4px; background: var(--surface-3); color: var(--text); }
.watchlist-item__more:hover { background: var(--surface-hover); color: var(--orange); }
.watchlist-item__more .ui-icon { width: 20px; height: 20px; }
.watchlist-archived { margin-top: var(--s-6); }
.watchlist-archived > summary { display: flex; align-items: center; gap: var(--s-2); min-height: 44px; color: var(--muted); font-weight: 800; list-style: none; cursor: pointer; }
.watchlist-archived > summary::-webkit-details-marker { display: none; }
.watchlist-archived > summary .ui-icon { width: 16px; height: 16px; }
.watchlist-archived form { margin: 0; }
.watchlist-item__manage { border-top: 0; }

/* ====================== Notifications ====================== */
.notifications-read-all { margin: 0 0 var(--s-2); }
form:has(> .notifications-read-all) { display: flex; justify-content: flex-end; margin: 0; }
.notifications-day { margin: var(--s-5) 0 var(--s-2); color: var(--muted); font-family: var(--font-body); font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.notifications-list { gap: 2px; margin: 0; border-radius: var(--r-lg); overflow: hidden; }
.notifications-list form { margin: 0; }
.social-notification {
  display: flex; flex-wrap: nowrap; align-items: center; gap: var(--s-3);
  min-height: 72px; padding: var(--s-3) var(--s-4); border-radius: 0; background: var(--surface-2);
}
.social-notification.is-unread { background: var(--surface-3); }
.social-notification__face { position: relative; flex: none; }
.social-notification__face .avatar { --avatar-size: 44px; }
.social-notification__face .avatar img { object-fit: contain; padding: 4px; }
.social-notification__face .avatar:has(img[src*="rails"]) img, .social-notification__face .avatar img[src*="rails"] { object-fit: cover; padding: 0; }
.social-notification__kind {
  position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: var(--r-control-sm); background: var(--orange); color: var(--ink);
  box-shadow: 0 0 0 2px var(--surface-2);
}
.social-notification__kind .ui-icon { width: 12px; height: 12px; stroke-width: 2.6; }
.social-notification__kind--reaction_received { background: var(--rose); }
.social-notification__kind--comment_received { background: var(--yellow); }
.social-notification__kind--challenge_completed { background: var(--success); }
.social-notification__body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.social-notification__text { line-height: 1.3; overflow-wrap: anywhere; }
.social-notification small { color: var(--muted); font-weight: 700; }
.social-notification__dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--orange); }
.notifications-more { margin-top: var(--s-4); }

/* Header bell opens the list as a sheet on phones. */
.notifications-dialog { border: 0; border-radius: var(--r-lg); background: var(--surface-1); }
.notifications-dialog__header { border-bottom: 0; padding: var(--s-5) var(--s-5) var(--s-2); }
.notifications-dialog__close { border: 0; border-radius: var(--r-control); background: var(--surface-2); }
.notifications-dialog__content { padding: 0 var(--s-4) var(--s-5); }
.notifications-dialog .notifications-heading { display: none; }
.notifications-dialog .notifications-day:first-of-type { margin-top: var(--s-2); }
@media (max-width: 699px) {
  .notifications-dialog { width: 100%; max-width: 100%; max-height: 86dvh; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .notifications-dialog[open] { animation: sheet-in 260ms var(--ease-out); }
}
@media (prefers-reduced-motion: reduce) { .notifications-dialog[open] { animation: none; } }

/* ====================== Feed events ====================== */
.social-feed-event { gap: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--r-lg); background: var(--surface-1); color: inherit; }
.social-feed-event:hover { background: var(--surface-2); }
.social-feed-event__icon { width: 36px; height: 36px; border-radius: 12px; background: #ffc43d1a; }
.social-feed-event__icon .ui-icon { width: 18px; height: 18px; }
.social-feed-event__body { flex: 1; min-width: 0; display: grid; gap: 1px; font-size: .92rem; line-height: 1.3; }
.social-feed-event > .ui-icon { flex: none; width: 18px; height: 18px; color: var(--text-subtle); }

/* ====================== Invitation landing ====================== */
.invite-landing {
  position: relative; overflow: hidden; padding: var(--s-7) var(--s-5) var(--s-6); border-radius: var(--r-lg);
  background: var(--surface-1);
}
.invite-landing .avatar img { width: 100%; }
.invite-landing__faces { display: flex; justify-content: center; margin-bottom: var(--s-4); --avatar-ring: var(--surface-1); }
.invite-landing h1 { margin: var(--s-1) 0 var(--s-2); font-size: clamp(2.2rem, 10vw, 3rem); overflow-wrap: anywhere; }
.invite-landing__lead { max-width: 34ch; margin: 0 auto var(--s-4); color: var(--muted); }
.invite-landing__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2); margin-bottom: var(--s-5); }
.invite-landing__top { margin: 0 0 var(--s-5); text-align: left; background: var(--surface-2); }
.invite-landing__top .list-row { min-height: 52px; }
.invite-landing__top .list-row__lead--rank { min-width: 40px; height: 32px; font-size: 1rem; background: transparent; }
.invite-landing__full { padding: var(--s-4); border-radius: var(--r-md); background: var(--surface-2); }
.invite-landing form { margin: 0 0 var(--s-3); }

/* ====================== Ranking ====================== */
.ranking-heading { align-items: flex-end; margin-bottom: var(--s-4); }
.ranking-heading .eyebrow { margin: 0; }
.ranking-heading .screen-title { margin: var(--s-1) 0 0; }
.ranking-heading .share-actions { margin: 0; }
.ranking-toolbar { justify-content: flex-start; gap: var(--s-3); margin-bottom: var(--s-3); }
.ranking-toolbar__season { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .85rem; font-weight: 700; }
.ranking-toolbar__season .ui-icon { width: 16px; height: 16px; }
.ranking-toolbar .chip-select { width: auto; }
.ranking-categories { margin-bottom: var(--s-5); }
.ranking-podium { margin-bottom: var(--s-3); }
.ranking-podium .podium { margin: 0; }
.ranking-gap {
  display: flex; align-items: center; gap: var(--s-3); margin: 0 0 var(--s-5); padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md); background: var(--surface-2); font-weight: 700; line-height: 1.3;
}
.ranking-gap .ui-icon { flex: none; width: 22px; height: 22px; color: var(--orange); }
.ranking-gap strong { color: var(--yellow); }
.ranking-gap--lead .ui-icon { color: var(--yellow); fill: currentColor; }
.rank-list { border-radius: var(--r-lg); background: var(--surface-2); }
.rank-row { gap: var(--s-3); padding: var(--s-3) var(--s-4); border-bottom: 0; box-shadow: inset 0 -1px 0 #ffffff0d; }
.rank-row--interactive { width: 100%; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.rank-row--interactive:hover { background: var(--surface-3); }
.rank-row--interactive:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
.rank-row--me { background: var(--surface-selected); }
.rank-row__position { width: 28px; font: 400 1.35rem var(--font-display); color: var(--muted); }
.rank-row--top1 .rank-row__position { color: var(--orange); }
.rank-row--top2 .rank-row__position, .rank-row--top3 .rank-row__position { color: var(--yellow); }
.rank-row__score { font: 400 1.35rem var(--font-display); }
.rank-row__score small { color: var(--muted); }
.ranking-summary__period { margin: 0 0 var(--s-4); color: var(--muted); }
.ranking-summary__total { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-4); }
.ranking-summary__total-points { margin-left: auto; color: var(--yellow); font-weight: 700; font-variant-numeric: tabular-nums; }
.ranking-summary__total strong { font: 400 2.5rem var(--font-display); color: var(--orange); }
.ranking-summary__counts { margin: 0; }
.ranking-summary__counts div { display: flex; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) 0; border-top: 1px solid var(--line); }
.ranking-summary__counts dt, .ranking-summary__counts dd { margin: 0; }
.ranking-summary__counts dd { display: flex; align-items: baseline; gap: var(--s-1); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ranking-summary__counts dd small { color: var(--muted); font-size: .75rem; font-weight: 400; }
.ranking-summary__counts dd span { margin-left: var(--s-2); color: var(--yellow); }
.ranking-empty { margin-top: var(--s-4); }
.ranking-tie-note { font-size: .82rem; }
.ranking-extras { display: grid; gap: var(--s-2); padding-top: 0; border-top: 0; }
.ranking-recap-link { border-radius: var(--r-lg); background: var(--surface-2); }
.points-disclosure { margin: 0; padding: 0 var(--s-4); border: 0; border-radius: var(--r-lg); background: var(--surface-2); }
.points-disclosure > summary { color: var(--text); min-height: 60px; }
.points-disclosure[open] { padding-bottom: var(--s-4); }
.ranking-extras .points-disclosure { margin: 0; }
.ranking-champions { margin-top: var(--s-7); }
.champions-carousel { --carousel-item: 132px; }
.champion-tile { position: relative; display: grid; justify-items: center; gap: 4px; padding: var(--s-4) var(--s-2); border-radius: var(--r-lg); background: var(--surface-2); text-align: center; }
.champion-tile strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.champion-tile small { color: var(--muted); font-weight: 700; }
.champion-tile__crown { color: var(--yellow); }
.champion-tile__crown .ui-icon { width: 20px; height: 20px; fill: currentColor; }
.podium__place.is-me .podium__name { color: var(--yellow); }
.podium__place--1 { grid-column: 2; grid-row: 1; }
.podium__place--2 { grid-column: 1; grid-row: 1; }
.podium__place--3 { grid-column: 3; grid-row: 1; }

/* ====================== Profile ====================== */
.profile-head { display: flex; align-items: center; gap: var(--s-4); margin: var(--s-2) 0 var(--s-4); }
.profile-head__id { flex: 1; min-width: 0; }
.profile-head h1 { margin: 0; font-size: clamp(1.9rem, 8vw, 2.6rem); overflow-wrap: anywhere; }
.profile-head p { margin: 2px 0 0; }
.profile-head .button { flex: none; }
.profile-avatar.avatar { --avatar-size: 80px; font-size: 2.2rem; }
.streak-band {
  display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md); background: var(--orange); color: var(--ink); font-weight: 700; line-height: 1.3;
}
.streak-band__icon .ui-icon { width: 26px; height: 26px; fill: currentColor; }
.streak-band strong { font-weight: 800; }
.streak-band--cold { background: var(--surface-2); color: var(--text); }
.streak-band--cold .streak-band__icon { color: var(--muted); }
.streak-band--cold .ui-icon { fill: none; }
.profile-section { margin-top: var(--s-7); }
.profile-section .section-title { margin-top: 0; }
.profile-retro {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  margin-top: var(--s-2); padding: var(--s-4); border-radius: var(--r-md); background: var(--yellow); color: var(--ink);
}
.profile-retro__copy { display: grid; }
.profile-retro small { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.profile-retro strong { font-family: var(--font-display); font-size: 1.3rem; font-weight: 400; line-height: 1.1; }
.profile-retro .ui-icon { flex: none; width: 22px; height: 22px; }
.profile-stats-card { margin-top: var(--s-2); }
.profile-stats-card > .profile-retro { margin-top: 0; }
.profile-stats-card:has(.profile-stats-card__nudge) > .profile-retro { border-radius: var(--r-md) var(--r-md) 0 0; }
.profile-stats-card__nudge { display: grid; justify-items: start; gap: var(--s-1); padding: var(--s-4); border-radius: 0 0 var(--r-md) var(--r-md); background: var(--surface-2); }
.profile-stats-card__nudge strong { font-size: 1rem; }
.profile-stats-card__nudge p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.4; }
.profile-stats-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-top: var(--s-2); }
.profile-activity-card { padding: 0; border: 0; background: transparent; }
.profile-activity-list { max-height: none; overflow: visible; padding: 0; }
.profile-custom-cover { color: var(--accent-text); }
.profile-actions { display: block; margin-top: var(--s-7); text-align: left; }
.profile-actions form { margin: 0; }

/* ====================== Profile edit / onboarding ====================== */
.avatar-picker { margin-bottom: var(--s-2); }
.avatar-picker__label { position: relative; display: flex; align-items: center; gap: var(--s-4); cursor: pointer; }
.avatar-picker__preview { --avatar-size: 84px; font-size: 2.2rem; }
.avatar-picker__badge {
  position: absolute; left: 60px; top: 58px; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%; background: var(--text); color: var(--ink);
  box-shadow: 0 0 0 3px var(--bg);
}
.avatar-picker__badge .ui-icon { width: 14px; height: 14px; }
.avatar-picker__text { display: grid; }
.avatar-picker__text small { color: var(--muted); font-weight: 600; }
.avatar-picker:has(input:focus-visible) .avatar-picker__preview { outline: 3px solid var(--orange); outline-offset: 3px; }
.step-progress { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 0 0 var(--s-5); }
.step-progress span { height: 5px; border-radius: 99px; background: var(--surface-3); }
.step-progress span.is-done { background: var(--orange); }
.account-deletion.danger-zone { padding: var(--s-4) var(--s-5); }
.account-deletion.danger-zone > summary { color: var(--danger); font-weight: 800; cursor: pointer; }

/* ====================== Group form ====================== */
.category-switches { display: flex; flex-wrap: wrap; gap: var(--s-2); padding: 0; border: 0; }
.category-switches legend { padding: 0; margin-bottom: var(--s-2); }
.form-stack .category-switches__option {
  min-height: 42px; padding: 8px 16px; border-radius: var(--r-control); background: var(--surface-2);
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
}
.category-switches__option:hover { background: var(--surface-3); }
.category-switches__option:has(input:checked) { background: var(--orange); color: var(--ink); }
.category-switches__option input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.category-switches__option:has(input:focus-visible) { outline: 3px solid var(--orange); outline-offset: 2px; }
.category-switches__option span { flex: none; }
.category-switches .field-hint { flex-basis: 100%; margin: 0 0 var(--s-1); }
.form-stack .category-switches__option { box-shadow: inset 0 0 0 1px var(--line); }
.form-stack .category-switches__option:has(input:checked) { box-shadow: none; }
.category-switches__mark {
  display: inline-grid; place-items: center; width: 20px; height: 20px;
  border: 2px solid var(--muted); border-radius: 4px; box-sizing: border-box;
  transition: background var(--t-press), border-color var(--t-press);
}
.category-switches__mark .ui-icon { width: 14px; height: 14px; stroke-width: 3.5; opacity: 0; }
.category-switches__option:has(input:checked) .category-switches__mark { background: var(--ink); border-color: var(--ink); }
.category-switches__option:has(input:checked) .category-switches__mark .ui-icon { opacity: 1; color: var(--orange); }
@media (prefers-reduced-motion: reduce) { .category-switches__mark { transition: none; } }
.group-points-advanced { border-radius: var(--r-lg); background: var(--surface-1); padding: 0 var(--s-4); }
.group-points-advanced > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 64px; list-style: none; cursor: pointer; }
.group-points-advanced > summary::-webkit-details-marker { display: none; }
.group-points-advanced > summary span { display: grid; }
.group-points-advanced > summary small { color: var(--muted); font-weight: 700; }
.group-points-advanced > summary .ui-icon { width: 18px; height: 18px; color: var(--muted); }
.group-points-advanced[open] > summary .ui-icon { transform: rotate(180deg); }
.group-points-advanced[open] { padding-bottom: var(--s-4); }
.group-points-advanced .group-points { margin-top: 0; }

/* ====================== Billing & Bite ====================== */
.billing-page { padding-top: 0; }
.billing-page > .eyebrow { margin: 0; }
.billing-page > .screen-title { margin: var(--s-1) 0 var(--s-5); font-family: var(--font-display); }
.billing-card { margin: 0 0 var(--s-3); padding: var(--s-5); border: 0; border-radius: var(--r-lg); background: var(--surface-2); }
.billing-card h2 { font-size: 2rem; }
.billing-card--bite { background: var(--bite); color: #fff; }
.billing-card--bite .billing-kicker { color: #fff; opacity: .75; }
.billing-card--bite .progress-bar { background: #ffffff33; }
.billing-card--bite .progress-bar > span { background: #fff; }
.billing-alert { padding: var(--s-3); border-radius: var(--r-md); background: #0f0f1033; }
.billing-usage { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 6px var(--s-3); }
.billing-usage span { font-weight: 700; opacity: .85; }
.billing-usage strong { font-family: var(--font-display); font-size: 1.4rem; font-weight: 400; }
.billing-usage .progress-bar { grid-column: 1 / -1; }
.billing-card .billing-portal-action { margin: var(--s-4) calc(var(--s-5) * -1) calc(var(--s-5) * -1); }
.billing-card__portal { display: flex; align-items: center; gap: var(--s-3); width: 100%; padding: var(--s-3) var(--s-5);
  border: 0; border-top: 1px solid #ffffff14; border-radius: 0 0 var(--r-lg) var(--r-lg); background: transparent;
  color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background var(--dur-fast) ease; }
.billing-card__portal:hover { background: #ffffff0d; }
.billing-card__portal > span { display: grid; flex: 1; min-width: 0; }
.billing-card__portal strong { font-size: .95rem; }
.billing-card__portal small { opacity: .75; font-size: .78rem; }
.billing-card__portal .ui-icon { flex: none; width: 18px; height: 18px; }
.billing-card--bite .billing-card__portal { border-top-color: #ffffff33; }
.billing-cancel { padding: 0 var(--s-4); border-radius: var(--r-lg); background: var(--surface-1); }
.billing-cancel > summary { display: flex; align-items: center; justify-content: space-between; min-height: 56px; color: var(--muted); font-weight: 800; list-style: none; cursor: pointer; }
.billing-cancel > summary::-webkit-details-marker { display: none; }
.billing-cancel > summary .ui-icon { width: 16px; height: 16px; }
.billing-cancel[open] { padding-bottom: var(--s-4); }
.billing-cancel-help { color: var(--muted); font-size: .88rem; }
.billing-boosts { margin-top: var(--s-6); }
.billing-boosts + .billing-cancel { margin-top: var(--s-6); }
.billing-boosts .section-title { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); margin: 0 0 var(--s-1); }
.billing-boosts .section-title h2 { margin: 0; }
.billing-boosts__count { color: var(--mustard); font-size: .85rem; font-weight: 800; white-space: nowrap; }
.billing-boosts__intro { margin: 0 0 var(--s-4); font-size: .9rem; }
.boost-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-3); }
.boost-slot { display: grid; align-content: start; gap: var(--s-1); min-width: 0; padding: var(--s-4); border-radius: var(--r-lg); background: var(--surface-2); }
.boost-slot__state { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.boost-slot__state .ui-icon { width: 14px; height: 14px; }
.boost-slot--active .boost-slot__state { color: var(--orange); }
.boost-slot--cooling .boost-slot__state { color: var(--muted); }
.boost-slot--free .boost-slot__state { color: var(--teal); }
.boost-slot--free { background: transparent; box-shadow: inset 0 0 0 2px var(--surface-3); }
.boost-slot__title { overflow: hidden; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.boost-slot__title a { color: inherit; }
.boost-slot__meta { color: var(--muted); font-size: .8rem; }
.boost-slot form { margin: var(--s-2) 0 0; }
.billing-boosts__subtitle { margin: var(--s-5) 0 var(--s-2); font-size: 1rem; }
.billing-boosts__note { margin: var(--s-4) 0 0; font-size: .88rem; }
.billing-boosts__rule { display: flex; gap: var(--s-2); align-items: flex-start; margin: var(--s-4) 0 0; color: var(--muted); font-size: .82rem; line-height: 1.4; }
.billing-boosts__rule .ui-icon { flex: none; width: 15px; height: 15px; margin-top: 2px; }
.billing-upgrade {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  margin-top: 0; padding: var(--s-4) var(--s-5); border-radius: var(--r-lg); background: var(--bite); color: #fff; text-align: left;
}
.billing-upgrade span { display: grid; }
.billing-upgrade small { font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.billing-upgrade strong { font-family: var(--font-display); font-size: 1.3rem; font-weight: 400; line-height: 1.1; }
.billing-upgrade .ui-icon { flex: none; }
.billing-hero { text-align: center; }
.billing-hero__art { width: 120px; margin: var(--s-5) auto 0; display: block; }
.billing-hero h1 { font-family: var(--font-display); font-weight: 400; }
.billing-hero .button + .button { margin-top: var(--s-2); }

.bite-feature { min-height: 0; padding: var(--s-6) var(--s-5); border-radius: var(--r-lg); background: var(--bite); color: #fff; }
.bite-feature::after { display: none; }
.bite-feature .home-intro__eyebrow, .bite-feature__benefits strong, .bite-feature .bite-name { color: #fff; }
.bite-feature .home-intro__eyebrow { opacity: .8; }
.bite-feature h1 { font-size: clamp(2.4rem, 10vw, 3.6rem); }
.bite-feature__benefits { margin-top: var(--s-4); }
.bite-checkout { margin-top: var(--s-6); }
.bite-page .bite-price-card, .bite-page .bite-plan-card { border: 0; border-radius: var(--r-lg); background: var(--surface-2); }
.bite-page .bite-price-card--recommended, .bite-page .bite-plan-card--premium { background: #17283d; box-shadow: inset 0 0 0 2px var(--bite); }
.bite-price-card__badge { padding: 2px 10px; border-radius: var(--r-control); background: var(--bite); color: #fff; font-size: .78rem; align-self: flex-start; }
.bite-price-card__badge--secondary { background: var(--surface-3); color: var(--muted); }
.bite-page .bite-benefit-grid article { display: grid; gap: var(--s-1); align-content: start; border: 0; border-radius: var(--r-lg); background: var(--surface-2); }
.bite-page .bite-benefit-grid h3 { margin: var(--s-2) 0 0; color: var(--text); font-size: 1.15rem; }
.bite-page .bite-benefit-grid p { margin: 0; color: var(--muted); font-size: .9rem; }
.bite-page .bite-benefit-grid .tile__icon { background: #2e73b833; color: #9bdcff; }
.bite-compare { margin-top: var(--s-6); padding: 0 var(--s-4); border-radius: var(--r-lg); background: var(--surface-1); }
.bite-compare > summary { display: flex; align-items: center; justify-content: space-between; min-height: 60px; list-style: none; cursor: pointer; }
.bite-compare > summary::-webkit-details-marker { display: none; }
.bite-compare > summary h2 { margin: 0; font-size: 1.3rem; }
.bite-compare > summary .ui-icon { width: 18px; height: 18px; color: var(--muted); }
.bite-compare[open] { padding-bottom: var(--s-4); }
.billing-page { padding-inline: 0; }
@media (max-width: 640px) {
  .bite-page .bite-benefit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
  .bite-page .bite-benefit-grid article { padding: var(--s-4); }
  .bite-page .bite-benefit-grid h3 { font-size: 1rem; }
  .bite-page .bite-benefit-grid p { font-size: .8rem; }
}

/* ====================== Activity card (feed post) ====================== */
.activity-card { padding: var(--s-4); border-radius: var(--r-lg); background: var(--surface-2); }
.activity-card__top { gap: var(--s-3); }
.activity-card__who { flex: 1; min-width: 0; padding-right: 0 !important; }
.activity-card__who p { margin: 0; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-card__who p span { color: var(--muted); }
.activity-card__who small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; }
.activity-card__rank { padding: 0 8px; border-radius: var(--r-control); background: #ffc43d1f; color: var(--yellow) !important; font-weight: 800; }
.activity-card__score { color: inherit !important; }
.activity-card__more { margin-right: -6px; color: var(--muted); }
.activity-card__media { gap: var(--s-4); margin: var(--s-4) 0 var(--s-3); color: inherit; align-items: flex-start; }
a.activity-card__media { border-radius: var(--r-md); }
.activity-card__media > div, .activity-card__media > .activity-card__media-text { min-width: 0; padding-top: 2px; }
.activity-card__media-text { display: block; color: inherit; text-decoration: none; border-radius: var(--r-md); }
/* Registro de categoria: o título é o link para o detalhe, sublinhado sempre visível
   (no celular não há hover para sugerir o toque). */
.activity-card__media .activity-card__title-link { text-decoration: underline; text-decoration-color: var(--c-you); text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover .activity-card__title-link, a:focus-visible .activity-card__title-link { color: var(--c-you); }
.activity-card__media h3 { font-size: 1.35rem; line-height: 1.08; overflow-wrap: anywhere; }
.activity-card .media-cover { height: auto; aspect-ratio: 2/3; }
.activity-card__custom-icon { color: var(--accent-text); }
.activity-card__points {
  margin: var(--s-2) 0 0; padding: 3px 10px; border: 0; border-radius: var(--r-control);
  background: var(--surface-3); color: var(--text);
}
.activity-card__points span { font-size: .9rem; }
.activity-card__points small { color: var(--muted); }
.activity-card__body { margin: 0 0 var(--s-2); padding-left: var(--s-3); box-shadow: inset 3px 0 0 var(--orange); color: var(--text); }
.engagement { gap: var(--s-2); border-top: 0; padding-top: var(--s-1); }
.engagement__button, .engagement__count { min-height: 38px; padding: 4px 12px; border-radius: var(--r-control); background: var(--surface-3); }
.engagement__button:hover, .engagement__count:hover { background: var(--surface-hover); }
.engagement__button.is-reacted { background: color-mix(in srgb, var(--rose) 14%, transparent); color: var(--rose); }
.engagement__count[aria-expanded="true"] { background: var(--surface-hover); }
.comment { border-bottom: 0; box-shadow: inset 0 -1px 0 #ffffff0d; }
.comment-form input { border: 0; border-radius: var(--r-control); background: var(--surface-3); padding: 0 var(--s-4); }
.comment-form input.comment-form__submit { border-radius: var(--r-control); background: var(--orange); color: var(--ink); padding: 0 var(--s-4); }
.feed-list { display: grid; gap: var(--s-3); }
.feed-list > * + * { margin-top: 0; }

/* Stars: five glyphs filled to the rating, flat colors. */
.rating { margin-top: var(--s-1); }
.stars { display: inline-flex; align-items: center; gap: 6px; }
.stars__glyphs {
  font-size: 1rem; letter-spacing: 1px; line-height: 1;
  background: linear-gradient(90deg, var(--yellow) calc(var(--rating) / 5 * 100%), var(--surface-hover) 0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stars__value { color: var(--text); font-weight: 800; font-size: .9rem; }

/* ====================== Home ====================== */
.feed-context { display: grid; gap: var(--s-2); margin: var(--s-2) 0 0; border: 0; }
.feed-context__link { border: 0 !important; }
.feed-hero { display: grid; gap: 2px; padding: var(--s-5); border-radius: var(--r-lg); background: var(--orange); color: var(--ink); }
.feed-hero__label { font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
.feed-hero__row { display: flex; align-items: baseline; gap: var(--s-3); }
.feed-hero__row strong { font-family: var(--font-display); font-size: 3.6rem; font-weight: 400; line-height: .95; }
.feed-hero__row span { font-family: var(--font-display); font-size: 1.6rem; }
.feed-hero small { font-size: .85rem; font-weight: 700; }
.feed-pick { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--r-lg); background: var(--surface-2); color: inherit; }
.feed-goals { margin-top: var(--s-6); }
.feed-goals__grid { display: grid; gap: var(--s-2); grid-template-columns: 1fr; }
.feed-goal { display: grid; gap: 10px; padding: var(--s-4); border: 0; border-radius: var(--r-lg); background: var(--surface-2); color: inherit; }
.feed-goal__top { display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.feed-goal__name { display: grid; flex: 1; min-width: 0; }
.feed-goal__name strong, .feed-goal__category { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-goal__category { color: var(--muted); font-size: .8rem; font-weight: 700; }
.feed-goal__pct { font-family: var(--font-display); font-size: 1.4rem; color: var(--yellow); }
.feed-goal progress { width: 100%; height: 8px; appearance: none; border: 0; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.feed-goal progress::-webkit-progress-bar { background: var(--surface-3); }
.feed-goal progress::-webkit-progress-value { background: var(--orange); border-radius: 99px; }
.feed-goal progress::-moz-progress-bar { background: var(--orange); }
.feed-goal.is-done progress::-webkit-progress-value { background: var(--success); }
.feed-goal__meta { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; font-weight: 700; }
.page-home .feed-list { margin-top: var(--s-5); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.feed-explore { margin-top: var(--s-7); }
.feed-explore .list { margin-top: var(--s-3); }
.home-social-section { margin: 0; padding: 0; border: 0; }
.home-suggestions { display: grid; }
.home-intro { position: relative; overflow: hidden; padding: var(--s-6) var(--s-5) var(--s-8); border-radius: var(--r-lg); background: var(--orange); color: var(--ink); }
.home-intro::after, .home-intro__waves { display: none; }
.home-intro__eyebrow { color: var(--ink) !important; opacity: .7; }
.home-intro h1 { max-width: 12ch; }
.home-intro__mascot { position: absolute; right: 14px; bottom: 10px; width: 96px; transform: rotate(-6deg); }
.feed-goals--pair .feed-goals__grid, .feed-goals .feed-goals__grid { grid-template-columns: 1fr; }
.feed-goal { min-height: 0; }
.feed-goal progress { display: block; position: static; opacity: 1; clip-path: none; }
.feed-pick { flex-direction: row; justify-content: flex-start; }
.feed-pick .list-row__body { display: grid; flex: 1; text-align: left; }
.feed-hero__row { justify-content: flex-start; }

/* ====================== Search ====================== */
.search-heading { margin-bottom: var(--s-4); }
.search-heading .screen-title { margin: 0; }
.search-form input[type="search"] { border: 0; border-radius: var(--r-control); background: var(--surface-2); padding-left: 20px; font-size: 1.05rem; }
.search-form .button { border-radius: var(--r-control); }
.search-results { gap: var(--s-2); }
.search-result-unit { position: relative; display: flex; align-items: center; border: 0; border-radius: var(--r-lg); background: var(--surface-2); }
.search-result { flex: 1; min-width: 0; min-height: 88px; padding: var(--s-3); padding-right: 0; }
.search-result img, .search-result__placeholder { width: 56px; height: 84px; border-radius: 8px; background: var(--surface-3); }
.search-result__placeholder { color: var(--accent-text); }
.search-result__action { border: 0; border-radius: var(--r-control); background: var(--orange); color: var(--ink); }
.search-result__add { flex: none; margin: 0 var(--s-3) 0 var(--s-2); }
.sheet .watchlist-add-form { display: grid; gap: var(--s-3); padding: 0; border: 0; background: transparent; }
.sheet .watchlist-add-form .button { width: 100%; }
.search-form input[type="search"] { flex: 1; } .search-form .button { flex: none; padding-inline: 22px; }
.publish-bar { position: static; }
.page-activities .activity-date-field, .page-custom_entries .activity-date-field { display: grid; gap: var(--s-2); min-width: 0; }
.page-activities .activity-date-field > label, .page-custom_entries .activity-date-field > label { margin: 0; }
.page-activities .activity-date-field .field-hint, .page-custom_entries .activity-date-field .field-hint { margin: 0; }
.page-activities .date-chips, .page-custom_entries .date-chips { display: grid; gap: var(--s-2); min-width: 0; }
.page-activities .date-chips__shortcuts, .page-custom_entries .date-chips__shortcuts { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.page-activities .date-chips__shortcuts .chip, .page-custom_entries .date-chips__shortcuts .chip { min-height: 40px; padding-inline: 14px; }
.page-activities .form-stack .date-chips__input, .page-custom_entries .form-stack .date-chips__input { box-sizing: border-box; display: block; width: 100%; min-width: 0; min-height: 44px; margin: 0; padding: 8px 14px; }

/* ====================== Rating picker (wave) ====================== */
.page-activities .rating-picker { margin-top: var(--s-2); padding: var(--s-4); border: 0; border-radius: var(--r-lg); background: var(--surface-2); }
.page-activities .rating-picker__heading { gap: var(--s-2); align-items: center; }
.page-activities .rating-picker__heading output { flex: none; font-family: var(--font-display); font-size: 1.35rem; line-height: 1; color: var(--orange); }
.page-activities .rating-picker:not(.is-selected) .rating-picker__heading output { font-family: var(--font-body); font-size: .9rem; color: var(--muted); }
.page-activities .rating-picker__mood { display: block; margin-top: var(--s-1); color: var(--text); font-size: .9rem; font-weight: 800; }
.page-activities .rating-picker__mood:empty { display: none; }
.page-activities .rating-picker__control { height: 48px; margin-top: var(--s-1); }
.page-activities .rating-picker__rail { top: 12px; height: 24px; background: var(--surface-3); }
.page-activities .rating-picker__rail::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent calc(25% - 1px), #0f0f1040 calc(25% - 1px) calc(25% + 1px), transparent 0 calc(50% - 1px), #0f0f1040 0 calc(50% + 1px), transparent 0 calc(75% - 1px), #0f0f1040 0 calc(75% + 1px), transparent 0);
}
.page-activities .rating-picker__wave {
  -webkit-mask-size: 32px 32px; mask-size: 32px 32px;
  animation: rating-wave-drift 2.4s linear infinite;
}
.page-activities .rating-picker:not(.is-selected) .rating-picker__wave { opacity: 0; }
@keyframes rating-wave-drift { to { -webkit-mask-position: 32px 0; mask-position: 32px 0; } }
.page-activities .rating-picker__ends { margin: 0 12px; color: var(--muted); font-size: .76rem; font-weight: 800; }
.page-activities .rating-picker > .field-hint { margin: var(--s-2) 0 0; }
.page-activities .rating-picker__slider { height: 48px; }
@media (prefers-reduced-motion: reduce) { .rating-picker__wave { animation: none; } }

/* ====================== Activity detail ====================== */
.activity-hero { display: grid; justify-items: center; gap: var(--s-1); margin-bottom: var(--s-4); text-align: center; }
.activity-hero .back-link { justify-self: start; margin-bottom: var(--s-3); }
.activity-hero .cover { margin-bottom: var(--s-3); }
.activity-hero .eyebrow { margin: 0; }
.activity-hero__title { margin: 0; font-size: clamp(2rem, 9vw, 2.8rem); overflow-wrap: anywhere; }
.activity-hero p.muted { margin: 0; }
.activity-share .share-actions { margin: 0 0 var(--s-4); }
.activity-share .share-actions__trigger { width: 100%; }
.activity-card__summary { display: flex; align-items: center; gap: var(--s-3); margin: var(--s-3) 0; }
.activity-card__summary .activity-card__points, .activity-card__summary .rating { margin: 0; }
.search-form input[type="search"] { flex: 1 1 0; min-width: 0; width: auto; } .search-form .button, .search-form input[type="submit"] { flex: 0 0 auto; width: auto; }

/* ====================== Quantity stepper ====================== */
.stepper { display: flex; align-items: center; gap: var(--s-3); }
.stepper__button { width: 52px; height: 52px; font-size: 1.6rem; font-weight: 800; background: var(--surface-3); }
.form-stack .stepper__input { flex: 1; min-width: 0; height: 52px; border: 0; border-radius: var(--r-md); background: var(--surface-2); font-family: var(--font-display); font-size: 1.6rem; text-align: center; -moz-appearance: textfield; }
.stepper__input::-webkit-inner-spin-button, .stepper__input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.challenge-templates { margin-bottom: var(--s-5); } .challenge-templates .eyebrow { margin-bottom: var(--s-2); }
.challenge-templates .chip-row { margin-inline: 0; padding-inline: 0; flex-wrap: wrap; overflow: visible; }
.challenge-templates .chip { background: var(--surface-3); border: 0; color: var(--text); }

/* ====================== Auth ====================== */
.password-field { position: relative; display: block; }
.password-field input { padding-right: 92px; }
.password-field__toggle {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  min-height: 36px; padding: 0 12px; border: 0; border-radius: var(--r-control);
  background: var(--surface-hover); color: var(--text); font-size: .8rem; font-weight: 800;
}
.password-field__toggle:active { transform: translateY(-50%) scale(.96); }
.confirmation-panel { border: 0; border-radius: var(--r-lg); }
.confirmation-panel .button + .button, .confirmation-panel form + .button { margin-top: var(--s-2); }
.legal-acceptance-page .legal-consent { padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--surface-3); }

/* =====================================================================
   MUNCH SYSTEM — dark retro-modern (the approved "F" direction)
   Warm near-black surfaces, orange first, mustard / teal / rose / olive
   accents, cream only as text. Anton for screen and section titles,
   Instrument Sans for everything else. Ink doodles and the flat mascot.
   No glow, no decorative gradients, no brush shapes, no emojis.
   ===================================================================== */

/* Ink doodles (sprite in shared/_doodles). */
.doodle { flex: none; width: 36px; height: 36px; color: var(--text); }

/* Posters without art: a vintage ticket over a colored ground. */
.pattern-poster { position: relative; overflow: hidden; display: block; container-type: inline-size; background: var(--ticket-ground); color: var(--ticket-ink);
  --ticket-ground: var(--surface-2); --ticket-paper: var(--c-data); --ticket-ink: var(--on-color); --ticket-stamp: var(--c-structure); }
.pattern-poster--c1 { --ticket-paper: var(--c-you); --ticket-ink: var(--on-color); --ticket-stamp: var(--on-color); }
.pattern-poster--c2 { --ticket-paper: var(--text); --ticket-ink: var(--on-color); --ticket-stamp: var(--c-you); }
.pattern-poster--c3 { --ticket-paper: var(--c-structure); --ticket-ink: var(--text); --ticket-stamp: var(--c-win); }
.pattern-poster--c4 { --ticket-paper: var(--c-win); --ticket-ink: var(--on-color); --ticket-stamp: var(--c-structure); }
.pattern-poster--c5 { --ticket-paper: var(--rose); --ticket-ink: var(--on-color); --ticket-stamp: var(--on-color); }
.poster-ticket { position: absolute; inset: 6cqi; border-radius: max(1.5px, calc(var(--cover-radius, 10px) - 6cqi)); /* concêntrico com a capa */ background: var(--ticket-paper); text-align: left; }
.poster-ticket::before, .poster-ticket::after { content: ""; position: absolute; top: 87cqi; width: 10cqi; height: 10cqi; border-radius: 50%; background: var(--ticket-ground); }
.poster-ticket::before { left: -5cqi; }
.poster-ticket::after { right: -5cqi; }
.poster-ticket__head { position: absolute; top: 6cqi; left: 7cqi; right: 7cqi; display: flex; justify-content: space-between; gap: 3cqi; padding-bottom: 3cqi; border-bottom: max(1px, 1cqi) solid currentColor; white-space: nowrap; }
.poster-ticket__head, .poster-ticket__seat { font-family: var(--font-body); font-size: 6.5cqi; font-weight: 700; line-height: 1.25; }
.poster-ticket__title { position: absolute; top: 19cqi; left: 7cqi; right: 7cqi; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-family: var(--font-display); font-size: 14cqi; font-weight: 400; line-height: 1.34; text-transform: uppercase; overflow-wrap: anywhere; }
.poster-ticket__perforation { position: absolute; top: 91.5cqi; left: 7cqi; right: 7cqi; border-top: max(1px, 1cqi) dashed currentColor; }
.poster-ticket__seat { position: absolute; left: 7cqi; bottom: 7cqi; }
.poster-ticket__stamp { position: absolute; right: 6cqi; bottom: 6cqi; padding: 0 2.5cqi; border: max(1px, .9cqi) solid var(--ticket-stamp); color: var(--ticket-stamp); font-family: var(--font-display); font-size: 10cqi; line-height: 1.4; transform: rotate(-8deg); }
.poster-ticket__initials { display: none; }
@container (max-width: 71px) {
  .poster-ticket > span:not(.poster-ticket__initials) { display: none; }
  .poster-ticket__initials { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 36cqi; line-height: 1.34; text-transform: uppercase; }
}
.pattern-poster__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; color: transparent; font-size: 0; }
.media-cover--empty.pattern-poster { border: 0; }

/* Section titles in Anton. */
.section-title h2, .feed-goals__heading h2 { font-size: 1.9rem; }
.section-title a { color: var(--text); text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.text-link { color: var(--orange); }
a[href^="/bite"]:not(.button):not(.badge):not(.billing-upgrade) { color: var(--bite-hover); }
a[href^="/bite"]:not(.button):not(.badge):not(.billing-upgrade):hover { color: #72bce4; }

/* Progress: teal fill on a line track; olive when done. */
.progress-bar { background: var(--line); }
.progress-bar > span { background: var(--teal); }
.progress-bar--done > span { background: var(--olive); }

/* Cards and lists use the warm surface with generous corners. */
.card, .list, .tile, .challenge-card, .activity-card, .feed-goal, .rank-list { border-radius: var(--radius-xl); background: var(--surface-2); }
.list-row__lead { background: var(--surface-3); color: var(--orange); }
.list-row--teal { background: var(--teal); color: var(--on-accent); }
.list-row--teal .list-row__meta, .list-row--teal .list-row__chevron, .list-row--teal .doodle { color: var(--on-accent); }
.list .doodle { width: 38px; height: 32px; }
.badge--orange { background: color-mix(in srgb, var(--orange) 15%, transparent); color: var(--orange); }
.badge--yellow { background: color-mix(in srgb, var(--mustard) 15%, transparent); color: var(--mustard); }
.badge--success { background: color-mix(in srgb, var(--olive) 15%, transparent); color: var(--olive); }

/* Activity card (feed post). */
.activity-card { padding: var(--s-4); }
.activity-card--mine { box-shadow: inset 4px 0 0 var(--orange); }
.activity-card__top .mini-avatar { width: 40px; height: 40px; }
.activity-card__name { font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; line-height: 1; text-transform: uppercase; letter-spacing: .01em; }
.activity-card__who p span { color: var(--muted); font-weight: 600; }
.activity-card__rank { background: var(--mustard) !important; color: var(--on-accent) !important; }
.activity-card .media-type { color: var(--muted); letter-spacing: .08em; }
.activity-card__media h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.3rem; letter-spacing: -.03em; }
.activity-card .rating { display: inline-flex; padding: 3px 10px; border-radius: var(--r-control); background: var(--surface-3); }
.activity-card__points { border: 2px solid var(--orange); background: transparent; color: var(--orange); }
.activity-card__points small, .activity-card__points span { color: var(--orange); }
.activity-card__body { box-shadow: none; padding-left: 0; font-weight: 600; }
.stars__glyphs { background: linear-gradient(90deg, var(--mustard) calc(var(--rating) / 5 * 100%), var(--line) 0); -webkit-background-clip: text; background-clip: text; }

/* Like / comment: outlined pills; liked = solid orange, comments open = rose. */
.engagement__button, .engagement__count { border: 2px solid var(--line); background: transparent; color: var(--text); }
.engagement__button:hover, .engagement__count:hover { background: var(--surface-3); }
.engagement__button.is-reacted { border-color: var(--orange); background: var(--orange); color: var(--on-accent); }
.engagement__count[aria-expanded="true"] { border-color: var(--rose); background: transparent; color: var(--rose); }
.comment strong { color: var(--rose); }
.comment-form input { background: var(--surface-3); border: 2px solid var(--line); }
.comment-form input.comment-form__submit { border-color: var(--orange); background: var(--orange); color: var(--on-accent); }

/* Home. */
.feed-hero { position: relative; overflow: hidden; border-radius: var(--radius-xl); background: var(--orange); color: var(--on-accent); }
.feed-hero__row strong, .feed-hero__row span { font-family: var(--font-display); font-weight: 400; }
.feed-hero__doodle { position: absolute; right: 18px; top: 18px; width: 58px; height: 58px; color: var(--on-accent); transform: rotate(10deg); }
.feed-pick { border-radius: 16px; background: var(--surface-2); }
.feed-pick .list-row__meta:first-child { color: var(--mustard); font-weight: 700; }
.feed-goal__pct { color: var(--mustard); font-family: var(--font-display); }
.feed-goal progress { background: var(--line); }
.feed-goal progress::-webkit-progress-bar { background: var(--line); }
.feed-goal progress::-webkit-progress-value { background: var(--teal); }
.feed-goal progress::-moz-progress-bar { background: var(--teal); }
.feed-goal.is-done progress::-webkit-progress-value { background: var(--olive); }
.feed-goal .doodle { width: 34px; height: 34px; }
.social-feed-event { border: 2px dashed color-mix(in srgb, var(--mustard) 40%, transparent); border-radius: 16px; background: transparent; }
.social-feed-event:hover { background: var(--surface-1); }
.social-feed-event__icon.doodle { width: 34px; height: 34px; border-radius: 0; background: transparent; color: var(--mustard); }
.home-intro { background: var(--surface-2); color: var(--text); }
.page-home .home-intro::before { content: ""; position: absolute; right: -20px; bottom: -20px; width: 170px; height: 130px; border-radius: 40px 0 0 0; background: var(--orange); }
.home-intro__eyebrow { color: var(--muted) !important; opacity: 1; }
.home-intro .button--ink { background: var(--orange); color: var(--on-accent); }
.home-intro__mascot { z-index: 1; }
/* Empty feed card: the mascot sits in the corner on the card surface, text keeps clear of it. */
.page-home .home-intro { padding: var(--s-6) var(--s-5); }
.page-home .home-intro::before { display: none; }
.home-intro > .home-intro__mascot { position: absolute; right: 14px; bottom: 16px; width: 112px; transform: rotate(-6deg); }
.page-home .home-intro:not(.bite-feature) h1 { margin: var(--s-2) 0 var(--s-3); }
.page-home .home-intro:not(.bite-feature) > p:not(.home-intro__eyebrow) { max-width: 46ch; margin: 0; }
.home-intro__actions { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); margin-top: var(--s-5); padding-right: 132px; }
.home-intro__actions .text-link { padding: var(--s-1) 0; }
@media (min-width: 560px) {
  .home-intro__actions { flex-direction: row; align-items: center; gap: var(--s-5); }
}
.cover-tile__meta { color: var(--mustard); }
.activity-card__who p { line-height: 1.35; padding-top: 5px; }
/* Icons stand on their own: no colored rounded-square backgrounds. */
.list-row__lead { background: transparent; color: var(--orange); }
.list-row__lead--rank { color: var(--mustard); }
.tile__doodle { width: 40px; height: 40px; }
.challenge-card .doodle { width: 36px; height: 36px; }
.group-destinations .tile { background: var(--surface-2); }
/* Auth: no blurred orange glow behind the waves. */
.page-sessions::before, .page-sessions::after,
:is(.page-confirmations, .page-passwords)::before, :is(.page-confirmations, .page-passwords)::after { display: none; }
.app-header { backdrop-filter: none; -webkit-backdrop-filter: none; }
.story--teal { background: var(--teal); color: var(--on-accent); }
.stories:has(.story--teal.is-active) .stories__close { color: var(--on-accent); }
.stories:has(.story--teal.is-active) .stories__bars > span { background: color-mix(in srgb, var(--on-color) 20%, transparent); }
.stories:has(.story--teal.is-active) .stories__bars i { background: var(--on-accent); }
.story--teal .story__pill { background: color-mix(in srgb, var(--on-color) 12%, transparent); }
.home-intro.bite-feature { background: var(--bite); color: #fff; } .bite-feature .home-intro__eyebrow { color: #fff !important; opacity: .8; }

/* ====================== Bite (paid plan) ======================
   Bite blue is an identity accent only (tag, plan numbers, recommended
   outline); actions follow the app: solid orange, outlined orange. */
.bite-page { --bite-ink: #7fb0ec; }
.bite-hero { position: relative; overflow: hidden; margin: var(--s-2) 0 var(--s-7); }
.bite-tag { display: inline-flex; padding: 4px 12px; border-radius: var(--r-control); background: var(--bite); color: #fff; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.bite-hero h1 { max-width: 9ch; margin: var(--s-3) 0 var(--s-3); font-size: clamp(2.8rem, 14vw, 4rem); line-height: .92; }
.bite-hero__lead { max-width: 30ch; margin: 0 0 var(--s-5); color: var(--muted); }
.bite-hero__mascot { position: absolute; top: 34px; right: -26px; width: 150px; pointer-events: none; }
.bite-numbers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); margin: 0; }
.bite-numbers > div { display: flex; flex-direction: column-reverse; gap: 2px; padding: var(--s-4) var(--s-3); border-radius: var(--radius-xl); background: var(--surface-2); }
.bite-numbers dt { color: var(--muted); font-size: .8rem; font-weight: 600; line-height: 1.2; }
.bite-numbers dd { display: grid; margin: 0; font-family: var(--font-display); font-size: 2.6rem; line-height: 1; color: var(--bite-ink); }
.bite-numbers dd small { font-family: var(--font-body); font-size: .72rem; font-weight: 600; color: var(--text-subtle); text-decoration: line-through; }
.bite-checkout { margin: 0 0 var(--s-7); }
.bite-checkout h2, .bite-benefits h2 { margin: 0 0 var(--s-4); font-size: 1.9rem; }
.bite-status { margin: 0 0 var(--s-4); color: var(--muted); }
.bite-pricing-grid { display: grid; gap: var(--s-3); grid-template-columns: 1fr; }
.bite-page .bite-price-card { display: grid; gap: var(--s-2); padding: var(--s-5); border: 0; border-radius: var(--radius-xl); background: var(--surface-2); }
.bite-page .bite-price-card--recommended { background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--bite-ink); }
.bite-price-card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.bite-price-card h3 { margin: 0; font-size: 1.2rem; }
.bite-price-card__badge { margin: 0; padding: 3px 10px; border-radius: var(--r-control); background: var(--bite); color: #fff; font-size: .75rem; font-weight: 700; }
.bite-price-card__badge--secondary { background: var(--surface-3); color: var(--muted); }
.bite-page .billing-price { margin: 0; font-family: var(--font-display); font-size: 2.6rem; font-weight: 400; line-height: 1; }
.bite-price-equivalent { margin: 0; color: var(--muted); }
.bite-price-equivalent strong { color: var(--text); }
.bite-savings { color: var(--mustard); font-weight: 700; }
.bite-price-card__note { margin: 0 0 var(--s-2); color: var(--text-subtle); font-size: .85rem; }
.bite-price-card form { margin: 0; }
.bite-pricing-note { margin: var(--s-4) 0 0; color: var(--text-subtle); font-size: .82rem; text-align: left; }
.bite-pricing-note a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.bite-benefits { margin-bottom: var(--s-6); }
.bite-benefit-list { margin: 0; padding: 0; list-style: none; }
.bite-benefit-list li { display: flex; gap: var(--s-4); align-items: flex-start; padding: var(--s-4) 0; border-top: 1px solid var(--line); }
.bite-benefit-list li:last-child { border-bottom: 1px solid var(--line); }
.bite-benefit-list .doodle { width: 44px; height: 40px; color: var(--bite-ink); }
.bite-benefit-list h3 { margin: 0 0 2px; font-size: 1.1rem; }
.bite-benefit-list p { margin: 0; color: var(--muted); font-size: .92rem; }
.bite-page .bite-plan-card { background: var(--surface-1); }
.bite-page .bite-plan-card--premium { background: var(--surface-1); box-shadow: inset 0 0 0 2px var(--bite-ink); }
@media (min-width: 640px) { .bite-pricing-grid { grid-template-columns: 1fr 1fr; } }
.bite-numbers > div { display: grid; flex-direction: initial; align-content: start; }
.bite-numbers dd { order: 1; }
.bite-numbers dt { order: 2; margin-top: 4px; }
.bite-numbers .bite-numbers__free { order: 3; font-family: var(--font-body); font-size: .72rem; font-weight: 600; color: var(--text-subtle); }
.bite-pricing-note .bite-stripe-link { display: inline; font-size: inherit; text-align: left; }
.bite-hero h1 { position: relative; z-index: 1; max-width: 8ch; }
.bite-hero__mascot { top: 70px; right: -34px; width: 124px; }
/* Mascot peeks over the recommended plan, biting its top edge. */
.bite-hero h1 { max-width: 10ch; }
.bite-pricing-grid { padding-top: 46px; }
.bite-page .bite-price-card--recommended { position: relative; overflow: visible; }
.bite-price-card__mascot { position: absolute; top: -58px; right: 18px; width: 108px; pointer-events: none; }
.bite-status { display: flex; align-items: center; gap: var(--s-3); }
.bite-status__mascot { flex: none; width: 76px; }
.page-media_search .points-disclosure { margin-top: var(--s-6); }

/* Livros em leitura */
.group-picker { display: grid; gap: var(--s-3); margin: 0; padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); min-width: 0; }
.group-picker__current, .group-picker__others { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.group-picker__label { color: var(--muted); font-size: .875rem; font-weight: 500; }
.group-picker__option { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 var(--s-3); border: 1px solid var(--line); border-radius: var(--r-control); color: var(--muted); font-size: .875rem; font-weight: 500; line-height: 1; white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* .form-stack dá margem a todo label que não é o primeiro; aqui desalinhava os chips. */
.form-stack .group-picker label.group-picker__option, .group-picker__option { margin: 0; }
.group-picker__option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; outline: none; appearance: none; }
.group-picker__option::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.group-picker__option:has(input:checked) { border-color: var(--orange); color: var(--text); }
.group-picker__option:has(input:checked)::before { background: var(--orange); }
/* Só teclado mostra foco; clique ou toque não deixam contorno. */
.group-picker__option:has(input:focus-visible) { outline: 2px solid var(--orange); outline-offset: 2px; }
.group-picker__more summary { display: inline-flex; align-items: center; gap: 4px; list-style: none; color: var(--muted); font-size: .875rem; font-weight: 600; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.group-picker__more summary::-webkit-details-marker { display: none; }
.group-picker__more summary:focus { outline: none; }
.group-picker__more summary:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
.group-picker__more summary .ui-icon { width: 16px; height: 16px; transition: transform .15s; }
.group-picker__more[open] summary .ui-icon { transform: rotate(180deg); }
.group-picker__more { padding-top: var(--s-3); border-top: 1px solid var(--line); }
.group-picker__current + .group-picker__more { margin-top: 0; }
.group-picker__more[open] .group-picker__others { margin-top: var(--s-3); }
.group-picker__fixed { margin: 0; color: var(--muted); }
.start-reading { margin-top: var(--s-5); padding: var(--s-4); border-radius: var(--r-lg); background: var(--surface-1); }
.start-reading--only { margin-top: var(--s-4); padding: 0; background: none; }
.start-reading h2 { margin: 0 0 var(--s-1); font-size: 1.05rem; }
.current-reading { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--r-lg); background: var(--surface-2); }
.current-reading__body { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 2px; }
.current-reading__label { color: var(--yellow); font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.current-reading__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.current-reading__actions { display: flex; flex: none; gap: var(--s-2); }
.current-reading--game { flex-wrap: wrap; }
.current-reading--game .current-reading__body { flex-basis: 0; }
.current-reading--game .current-reading__body .text-link { color: var(--muted); font-size: .85rem; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.current-reading--game .current-reading__actions { width: 100%; }
.current-reading--game .current-reading__actions .button { flex: 1; }
.reading-row { align-items: center; gap: var(--s-3); }
.reading-row__actions { display: flex; flex: none; gap: var(--s-2); }
.reading-row__actions form { margin: 0; }
.book-started-event { display: flex; align-items: center; }
.book-started-event .cover { flex: none; }
.still-reading-link { display: inline-flex; align-items: center; gap: 4px; justify-self: start; align-self: flex-start; font-size: .875rem; }
.still-reading-link span { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.still-reading-link .ui-icon { width: 16px; height: 16px; flex: none; transition: transform .15s; }
.still-reading-link:hover .ui-icon { transform: translateX(2px); }
.search-result__reading { flex: none; margin: 0 var(--s-2) 0 var(--s-2); min-height: 44px; padding: 8px 14px; border: 1.5px solid var(--orange); border-radius: var(--r-control); background: transparent; color: var(--orange); font-size: .84rem; font-weight: 800; }
.search-result__reading:hover { background: var(--orange); color: var(--ink); }
.search-result__reading:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
/* Livros têm três ações; no celular, Lendo e + descem para uma linha própria. */
@media (max-width: 520px) {
  .search-result-unit:has(.search-result__reading) { flex-wrap: wrap; justify-content: flex-end; }
  .search-result-unit:has(.search-result__reading) .search-result { flex-basis: 100%; padding-right: var(--s-3); }
  .search-result-unit:has(.search-result__reading) .search-result__reading,
  .search-result-unit:has(.search-result__reading) .search-result__add { margin-bottom: var(--s-3); }
}
@media (max-width: 420px) {
  .reading-row { flex-wrap: wrap; }
  .reading-row__actions { width: 100%; justify-content: flex-end; }
}

/* Duas metas lado a lado, com progresso em círculo */
.feed-goals--pair .feed-goals__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feed-goal--frame { position: relative; display: grid; align-content: start; gap: 2px; min-width: 0; padding: var(--s-3) var(--s-4); }
.feed-goal--frame > :not(svg) { position: relative; min-width: 0; }
.feed-goal__frame { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; border-radius: inherit; pointer-events: none; }
.feed-goal__frame rect { fill: none; stroke-width: 6; }
.feed-goal__frame-track { stroke: var(--line); }
.feed-goal__frame-fill { stroke: var(--teal); stroke-linecap: butt; }
.feed-goal--frame.is-done .feed-goal__frame-fill { stroke: var(--olive); }
.feed-goal__head { display: flex; align-items: baseline; gap: var(--s-2); }
.feed-goal--frame .feed-goal__pct { flex: none; font-size: 1.25rem; line-height: 1.1; }
.feed-goal--frame .feed-goal__title, .feed-goal--frame .feed-goal__category, .feed-goal--frame .feed-goal__meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-goal--frame .feed-goal__meta { display: block; margin-top: var(--s-1); font-size: .75rem; }
.feed-goal--frame progress { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* Foto e nome no card do feed abrem as ações da pessoa */
.activity-card__person { flex: none; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: var(--radius-pill, 999px); }
.activity-card__person.activity-card__name { font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; line-height: 1; text-transform: uppercase; letter-spacing: .01em; }
.activity-card__person:hover .mini-avatar, .activity-card__person.activity-card__name:hover { color: var(--orange); }
.activity-card__person:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.member-sheet { display: block; }
.member-sheet__who { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); }
.member-sheet__loading { padding: var(--s-4) 0; text-align: center; }

/* Estatísticas pessoais */
.personal-stats { display: grid; gap: var(--s-4); }
.personal-stats__head h1 { margin: 0; }
.personal-stats__head p { margin: var(--s-1) 0 0; }
.personal-stats__genres { display: grid; gap: var(--s-2); margin: 0; padding: 0; list-style: none; }
.personal-stats__genres li { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.personal-stats__rhythm { display: grid; gap: var(--s-2); margin: 0; padding: 0; list-style: none; }
.personal-stats__rhythm li { display: grid; grid-template-columns: 52px 1fr 32px; align-items: center; gap: var(--s-3); }
.personal-stats__month { color: var(--muted); font-size: .82rem; font-weight: 700; }
.personal-stats__count { font-weight: 800; text-align: right; }
.personal-stats__locked { display: grid; gap: var(--s-3); }
.personal-stats__locked h2 { margin: 0; }
.personal-stats__locked > .muted { margin: 0; font-size: .9rem; }
.locked-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s-2); margin: 0; padding: 0; list-style: none; }
.locked-features li { display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--surface-3); }
.locked-features .ui-icon { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--orange); }
.locked-features span { display: grid; gap: 2px; min-width: 0; }
.locked-features strong { font-size: .95rem; }
.locked-features small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
@media (min-width: 720px) {
  .personal-stats__locked { padding: var(--s-6); }
  .personal-stats__locked .button--full { justify-self: start; width: auto; padding-inline: var(--s-7); }
}
.personal-stats__head .share-actions { margin-top: var(--s-3); }

/* Cards do Bite: discretos, no visual do Munch, sempre com "Agora não". */
.bite-nudge { display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-4); border: 1px solid var(--line); background: var(--surface-2); }
.bite-nudge__art { flex: none; width: 44px; height: 44px; color: var(--accent-text); }
.bite-nudge__copy { display: grid; gap: var(--s-2); min-width: 0; }
.bite-nudge__copy .badge { justify-self: start; }
.bite-nudge__title { font-size: 1rem; line-height: 1.25; }
.bite-nudge__body { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.4; }
.bite-nudge__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-top: var(--s-1); }
.bite-nudge__dismiss-form { margin: 0; }
.bite-nudge__dismiss { padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; }
.bite-nudge__dismiss:hover { color: var(--text); }

/* Munch Pick: escolha do próximo item da lista */
.munch-pick-picker { display: grid; gap: var(--s-2); margin: var(--s-4) 0; padding: var(--s-4); border-radius: var(--r-md); background: var(--surface-2); }
.munch-pick-picker h2 { margin: 0; }
.munch-pick-picker p { margin: 0; }
.munch-pick-picker__modes { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.munch-pick-picker__modes form { margin: 0; }

/* Cards de evento no feed: cada tipo com cara própria, sem brilho */
.feed-event-pick, .feed-awards { display: flex; gap: var(--s-3); align-items: center; padding: var(--s-4); border-radius: var(--r-md); background: var(--surface-2); color: var(--text); text-decoration: none; }
.feed-event-pick__body, .feed-awards__body { display: grid; gap: 2px; min-width: 0; }
.feed-event-pick__kicker, .feed-awards__kicker { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .04em; font-size: .8rem; color: var(--orange); }
.feed-awards__kicker { color: var(--mustard); }
.feed-event-pick__title, .feed-awards__title { font-size: 1.05rem; }
.feed-event-pick small, .feed-awards small { color: var(--muted); }
.feed-awards__doodle { width: 56px; height: 56px; flex: none; }
.feed-moment { display: block; padding: var(--s-3) var(--s-4); border-left: 4px solid var(--mustard); border-radius: var(--r-md); background: var(--surface-1); color: var(--text); text-decoration: none; }
.feed-moment__body { display: grid; gap: 2px; }
.feed-moment__kicker { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .04em; font-size: .75rem; color: var(--mustard); }
.feed-moment__text { font-size: 1rem; }
.feed-moment small { color: var(--muted); }
.feed-moment--lead-taken, .feed-moment--personal-record { border-left-color: var(--orange); }
.feed-moment--rating-match, .feed-moment--everyone-watched { border-left-color: var(--teal); }
.feed-moment--lone-dissent { border-left-color: var(--rose); }
.consensus { display: grid; gap: var(--s-2); margin: var(--s-4) 0; padding: var(--s-4); border-radius: var(--r-md); background: var(--surface-1); }
.consensus h2, .consensus p { margin: 0; }
.consensus__average strong { font-family: var(--font-display); font-size: 2.4rem; color: var(--mustard); }
/* Histórias do grupo: um card por história, com a cor de acento do tipo. */
.group-insights .section-title { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.group-insights .section-title .muted { font-size: .85rem; }
.group-insights__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); margin: 0; padding: 0; list-style: none; }
.insight-card { --insight-accent: var(--orange);
  display: grid; grid-template-rows: auto 72px auto 1fr; gap: var(--s-2); min-width: 0;
  padding: var(--s-4); border-radius: var(--r-lg); background: var(--surface-2); }
.insight-card--taste-twin { --insight-accent: var(--teal); }
.insight-card--most-consensus-media { --insight-accent: var(--mustard); }
.insight-card--most-divisive-media { --insight-accent: var(--rose); }
.insight-card--contrarian { --insight-accent: var(--olive); }
.insight-card__label { justify-self: start; padding: 3px 10px; border-radius: var(--r-control);
  background: var(--insight-accent); color: var(--ink); font-size: .72rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.insight-card__art { display: flex; align-items: center; }
.insight-card__art .cover { --cover-w: 48px; }
.insight-card__headline { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  font-size: 1.05rem; line-height: 1.2; }
.insight-card--taste-twin .insight-card__headline { color: var(--insight-accent); font-family: var(--font-display); font-size: 2rem; line-height: 1; }
.insight-card__detail { color: var(--muted); font-size: .85rem; line-height: 1.35; }
.rank-row__movement { display: block; font-size: .7rem; font-weight: 700; line-height: 1; }
.rank-row__movement--up { color: var(--olive); }
.rank-row__movement--down { color: var(--rose); }

/* Web Push opt-in (shared/_push_prompt): card in the notifications panel, plain block in the profile. */
.push-prompt[hidden], .push-prompt [hidden] { display: none; }
.push-prompt { margin-bottom: var(--s-4); }
.push-prompt__state { display: grid; grid-template-columns: auto 1fr; gap: var(--s-2) var(--s-3); align-items: start; }
.push-prompt__doodle { width: 56px; height: 40px; color: var(--orange); }
.push-prompt__copy { display: grid; gap: var(--s-1); min-width: 0; }
.push-prompt__title { font-size: 1rem; line-height: 1.25; }
.push-prompt__text, .push-prompt__note { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.4; }
.push-prompt__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-2); }
.push-prompt__error { margin: var(--s-2) 0 0; color: var(--orange); font-size: .875rem; }
.push-prompt--settings { padding: var(--s-4); border-radius: var(--r-lg); background: var(--surface-2); }
.push-prompt--settings .push-prompt__state { grid-template-columns: 1fr; }

/* Convite (groups/_invites): um link por grupo, com regras que só quem modera altera. */
.invite-panel__manage { margin-top: var(--s-4); border-radius: var(--r-lg); background: var(--surface-3); }
.invite-panel__dropdown { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  min-height: 56px; padding: var(--s-3) var(--s-4); list-style: none; cursor: pointer; user-select: none; }
.invite-panel__dropdown::-webkit-details-marker { display: none; }
.invite-panel__dropdown-label { display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.invite-panel__dropdown-label > .ui-icon { flex: none; width: 18px; height: 18px; color: var(--orange); }
.invite-panel__dropdown-label small { display: block; color: var(--muted); font-size: .75rem; font-weight: 700; }
.invite-panel__dropdown-label strong { display: block; font-size: .95rem; }
.invite-panel__dropdown-action { display: inline-flex; flex: none; align-items: center; gap: 4px; color: var(--orange); font-size: .85rem; font-weight: 700; }
.invite-panel__dropdown-action .ui-icon { width: 16px; height: 16px; transition: transform var(--dur-fast) ease; }
.invite-panel__manage[open] .invite-panel__dropdown-action .ui-icon { transform: rotate(180deg); }
.invite-panel__dropdown-body { padding: 0 var(--s-4) var(--s-4); }
.invite-panel__manage .invite-rules .chip { background: var(--surface-2); }
.invite-panel__hint { margin: 0 0 var(--s-3); color: var(--muted); font-size: .85rem; }
.invite-panel__revoke { margin-top: var(--s-3); color: var(--muted); font-size: .85rem; }
.invite-panel__revoke:hover { color: var(--text); }
.invite-panel > .invite-rules { margin-top: var(--s-4); }
.invite-rules { display: grid; gap: var(--s-4); margin: 0; }
.invite-rules .choice-group { margin: 0; padding: 0; border: 0; min-width: 0; }
.invite-rules legend { margin-bottom: var(--s-2); padding: 0; color: var(--muted); font-size: .85rem; font-weight: 700; }
.invite-rules .chip-row { flex-wrap: wrap; margin: 0; padding: 0; overflow: visible; }
.invite-rules .chip { background: var(--surface-3); }
.invite-rules .chip:hover { background: var(--surface-hover); }
.invite-rules input:checked + .chip { background: var(--orange); color: var(--ink); }

/* Moderação do grupo (groups/_moderation): pedidos e denúncias, só quando há pendências. */
.group-moderation-alert { margin-bottom: var(--s-4); border-radius: var(--r-lg); background: var(--surface-selected); }
.group-moderation__decision { display: flex; gap: var(--s-1); align-items: center; }
.group-moderation__decision form { margin: 0; }

/* Plano do grupo (groups/_plan_status): lotação, Bite e Boost num card só. */
.group-plan { display: grid; gap: var(--s-3); }
.group-plan__kicker { justify-self: start; padding: 3px 10px; border-radius: var(--r-control); background: var(--surface-3); color: var(--muted);
  font-size: .72rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.group-plan__title { margin: 0; font-family: var(--font-body, inherit); font-size: 1.15rem; text-transform: none; }
.group-plan__rows { display: grid; gap: var(--s-3); margin: 0; padding: 0; list-style: none; }
.group-plan__rows li { display: flex; gap: var(--s-3); align-items: flex-start; color: var(--muted); font-size: .9rem; line-height: 1.4; }
.group-plan__rows li strong { color: var(--text); }
.group-plan__rows .ui-icon { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--mustard); }
.group-plan__rows .text-link { display: inline; min-height: 0; }
.group-plan__actions { display: grid; gap: var(--s-2); }
.group-plan__actions:empty { display: none; }
.group-plan__actions form { margin: 0; }
.group-plan__hint { margin: 0; color: var(--muted); font-size: .8rem; text-align: center; }

/* Card de pontos: a explicação fica separada da linha de valores. */
.media-points-card .field-hint { margin: var(--s-3) 0 0; line-height: 1.4; }

/* Tutorial de instalação (shared/_install_guide): mascote, benefícios e passos numerados. */
.install-guide { display: grid; gap: var(--s-4); padding-bottom: var(--s-2); }
.install-guide__mascot { justify-self: center; width: 112px; }
.install-guide__perks { display: grid; gap: var(--s-2); margin: 0; padding: 0; list-style: none; }
.install-guide__perks li { display: flex; gap: var(--s-3); align-items: center; color: var(--muted); font-size: .92rem; line-height: 1.35; }
.install-guide__perks .ui-icon { flex: none; width: 20px; height: 20px; color: var(--orange); }
.install-guide__variant[hidden] { display: none; }
.install-guide__steps { display: grid; gap: var(--s-2); margin: 0; padding: 0; list-style: none; }
.install-guide__steps li { display: flex; gap: var(--s-3); align-items: center; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--surface-3); line-height: 1.4; }
.install-guide__number { display: grid; flex: none; place-items: center; width: 28px; height: 28px; border-radius: var(--r-control-sm);
  background: var(--orange); color: var(--on-accent); font-weight: 800; font-size: .9rem; }
.install-guide__key { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: 2px; vertical-align: middle;
  border-radius: 6px; background: var(--surface-2); color: var(--text); }
.install-guide__key .ui-icon { width: 16px; height: 16px; }
.install-guide__note { margin: 0 0 var(--s-3); color: var(--muted); line-height: 1.4; }
.install-guide__actions { display: grid; }
/* No app instalado, o atalho do Perfil não faz sentido. */
@media (display-mode: standalone) { .profile-install-link { display: none; } }
.profile-install-link { margin-top: var(--s-3); border-radius: var(--r-lg); background: var(--surface-2); }

/* Jogos: pergunta "Jogou algumas partidas?" antes do formulário */
.game-mode-question { display: grid; gap: var(--s-3, 12px); padding-block: var(--s-4, 16px); }
.game-mode-question h2 { margin: 0; font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 1.75rem; line-height: 1.05; letter-spacing: .01em; text-wrap: balance; }
.game-mode-question p { margin: 0; color: var(--muted); max-width: 40ch; }
.game-mode-question__actions { display: grid; gap: var(--s-2, 8px); margin-top: var(--s-2, 8px); }
.page-activities .date-chips__input[hidden] { display: none; }

/* Aviso de novidade (shared/_announcement) */
.announcement { display: grid; gap: 14px; }
.announcement__tag { justify-self: start; background: var(--teal); color: var(--on-accent); font-weight: 700; font-size: .8125rem; padding: 6px 12px; border-radius: var(--r-control); }
.announcement__mascot { width: 84px; height: auto; }
.announcement__body { margin: 0; color: var(--muted); }
.announcement__items { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.announcement__items li { display: grid; gap: 2px; padding-left: 12px; border-left: 3px solid var(--mustard); }
.announcement__items li:last-child { border-left-color: var(--orange); }
.announcement__items span { color: var(--muted); font-size: .875rem; }

/* Atalhos de data numa linha só, mesmo com "Outra data" em telas de 360px */
/* Quebram linha quando não cabem (telas estreitas): rolagem lateral escondida não deixava ver "Outra data". */
.page-activities .date-chips__shortcuts, .page-custom_entries .date-chips__shortcuts { flex-wrap: wrap; overflow: visible; }
.page-activities .date-chips__shortcuts::-webkit-scrollbar, .page-custom_entries .date-chips__shortcuts::-webkit-scrollbar { display: none; }
.page-activities .date-chips__shortcuts .chip, .page-custom_entries .date-chips__shortcuts .chip { flex: 1 1 auto; min-width: 0; justify-content: center; padding-inline: 10px; font-size: .875rem; white-space: nowrap; }

/* Perfil: liga/desliga os lembretes */
.profile-reminder-toggle { width: 100%; border: 0; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.profile-reminder-toggle__state { flex: none; color: var(--accent-text); font-weight: 700; font-size: .875rem; }

/* Duração no registro (modo de pontuação por tempo) */
:is(.page-activities, .page-custom_entries) .duration-field { display: grid; gap: var(--s-2); min-width: 0; }
:is(.page-activities, .page-custom_entries) .duration-field > label, :is(.page-activities, .page-custom_entries) .duration-field legend { margin: 0; }
:is(.page-activities, .page-custom_entries) .duration-field__chips { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: var(--s-2); }
/* Durações numa grade de 4 colunas iguais: o flex com quebra deixava cada linha com um número e largura diferentes. */
:is(.page-activities, .page-custom_entries) .duration-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-2); }
:is(.page-activities, .page-custom_entries) .duration-chips .chip { justify-content: center; min-width: 0; min-height: 40px; padding-inline: var(--s-1); font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* A pergunta é um legend: sem o recuo nativo e com o mesmo peso de "Quando você jogou?". */
:is(.page-activities, .page-custom_entries) .duration-field legend { padding: 0; font-weight: 800; }
:is(.page-activities, .page-custom_entries) .duration-field__input[hidden] { display: none; }
:is(.page-activities, .page-custom_entries) .duration-field__input { display: flex; align-items: center; gap: var(--s-2); }
:is(.page-activities, .page-custom_entries) .duration-field__input input { max-width: 8rem; }
:is(.page-activities, .page-custom_entries) .duration-field__unit { color: var(--muted); }
:is(.page-activities, .page-custom_entries) .duration-field .field-hint { margin: 0; }

/* Modo de pontuação nas configurações do grupo */
.scoring-mode, .season-length { display: grid; gap: var(--s-2); margin: 0 0 var(--s-4); padding: 0; border: 0; min-width: 0; }
.scoring-mode__title { font-family: var(--font-display); text-transform: uppercase; font-size: 1rem; letter-spacing: .02em; margin: 0 0 var(--s-2); padding: 0; }
.scoring-mode__option { display: grid; grid-template-columns: 1fr auto; gap: 2px var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--surface-2); color: inherit; border: 2px solid transparent; cursor: pointer; }
.scoring-mode__option strong { grid-column: 1; }
.scoring-mode__option span { grid-column: 1; color: var(--muted); font-size: .9rem; }
.scoring-mode__option small { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-weight: 700; color: var(--muted); }
.scoring-mode__option:hover { background: var(--surface-3); }
.scoring-mode__input:checked + .scoring-mode__option { border-color: var(--orange); }
.scoring-mode__input:focus-visible + .scoring-mode__option { outline: 3px solid var(--orange); outline-offset: 2px; }
.scoring-mode .field-hint, .season-length .field-hint { margin: 0; }
.group-points-help--time { display: none; }
.group-points-advanced:has(.scoring-mode__input[value="time"]:checked) .group-points { display: none; }
.group-points-advanced:has(.scoring-mode__input[value="time"]:checked) .group-points-help--time { display: block; }

/* Página: pontuação por tempo */
.help-page__hero { display: flex; align-items: center; gap: var(--s-3); }
.help-page__hero h1 { font-family: var(--font-display); text-transform: uppercase; margin: 0; }
.help-page__mascot { width: 56px; height: auto; flex: none; }
.help-page h2 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .02em; }
.help-page__rule { display: grid; gap: 2px; margin: var(--s-4) 0; padding: var(--s-4); border-radius: var(--r-lg); background: var(--orange); color: var(--ink); }
.help-page__rule strong { font-family: var(--font-display); font-size: 2.4rem; line-height: 1; text-transform: uppercase; color: var(--ink); }
.help-page__rule span { font-weight: 700; }
.legal-page .help-page__examples { list-style: none; padding: 0; display: grid; gap: var(--s-2); }
.legal-page .help-page__examples li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s-3); margin: 0; padding: var(--s-3); border-radius: var(--r-md); background: var(--surface-2); color: var(--text); }
.help-page__examples .doodle { width: 32px; height: 32px; }
.help-page__examples strong { white-space: nowrap; }
.help-page__examples span { display: grid; }
.help-page__credited { color: var(--muted); font-size: .85rem; }
.activity-card__time { display: block; margin-top: var(--s-1); color: var(--muted); font-size: .85rem; }
.activity-card__summary .activity-card__time { margin-top: 0; }

/* ---------- Importar histórico ---------- */
.import-page .section-title { margin-top: var(--s-5); }
.import-help { display: grid; gap: var(--s-2); margin-top: var(--s-5); padding: var(--s-4); border-radius: var(--r-lg); background: var(--surface-2); }
.import-help h2 { margin: 0; font-size: 1.2rem; }
.import-help p { margin: 0; color: var(--muted); font-size: .9rem; }
.import-count { margin: var(--s-2) 0 0; color: var(--muted); font-size: .85rem; font-weight: 700; }
.import-row { align-items: flex-start; }
.import-row__select { width: 100%; margin-top: var(--s-2); }
.import-missing { margin-top: var(--s-4); color: var(--muted); }
.import-missing summary { cursor: pointer; font-weight: 800; color: var(--text); }
.import-missing ul { margin: var(--s-2) 0 0; padding-left: var(--s-5); font-size: .9rem; }

/* ---------- Minha lista ---------- */
.personal-list { display: grid; gap: var(--s-4); }
.personal-list h1, .personal-list > p { margin: 0; }
.personal-list .list-row .chip { flex: none; }

/* Sheet "Ver depois": Minha lista e lista do grupo como duas opções separadas. */
.sheet .later-option { gap: var(--s-3); }
.sheet .later-option + .later-option { margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid #ffffff14; }
.later-option__head { display: grid; gap: 2px; }
.later-option__head strong { font-size: 1rem; font-weight: 800; color: var(--text); }
.later-option__head small { color: var(--muted); font-size: .85rem; }
.sheet .later-option select { width: 100%; }

/* Episódios marcados juntos */
.episode-batch { margin: 0 0 var(--s-3); }
.episode-batch > summary { cursor: pointer; list-style: none; font-size: .875rem; }
.episode-batch > summary::-webkit-details-marker { display: none; }
.episode-batch[open] > summary { margin-bottom: var(--s-2); }

/* Episódio que a pessoa já viu, no seletor */
.episode-result__watched { margin-left: auto; flex: 0 0 auto; padding: 2px 10px; border-radius: var(--r-control-sm); background: var(--surface-3); color: var(--muted); font-size: .75rem; font-weight: 700; }

/* Login: Google primeiro, e-mail recolhido */
.google-button {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; min-height: 44px; padding: 0 20px; margin-top: var(--s-4);
  background: #131314; color: #E3E3E3; border: 1px solid #8E918F; border-radius: var(--r-control);
  font: 500 .95rem Roboto, var(--font-body); cursor: pointer;
}
.google-button:hover { background: #1F1F20; }
.google-button:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.google-button__logo { width: 20px; height: 20px; flex-shrink: 0; }
form:has(> .google-button) { margin: 0; }
.auth-legal { margin: var(--s-2) 0 0; color: var(--muted); font-size: .78rem; text-align: center; }
.auth-legal a { color: inherit; text-decoration: underline; }
.auth-choice[hidden], .auth-email[hidden] { display: none; }
.auth-choice:not([hidden]), .auth-email:not([hidden]) { animation: auth-panel-in 220ms ease-out; }
.auth-choice h1 { margin-bottom: var(--s-2); }
.auth-choice .muted { margin-bottom: var(--s-5); }
.auth-choice .google-button { margin-top: 0; }
.auth-choice__email { margin-top: var(--s-3); min-height: 44px; }
.auth-panel > .auth-legal { margin-top: var(--s-4); }
.auth-choice__email:not(:hover) { border-color: var(--line-strong); color: var(--text); }
.auth-email__back { display: inline-block; min-height: 44px; line-height: 44px; margin-bottom: var(--s-2); font-size: .88rem; }
.auth-panel #auth-login h2, .auth-panel #auth-signup h2 { font: 400 1.6rem var(--font-display); text-transform: uppercase; margin: 0 0 var(--s-3); }
@media (prefers-reduced-motion: reduce) { .auth-choice:not([hidden]), .auth-email:not([hidden]) { animation: none; } }

/* Celular: o oceano fecha a página. */
@media (max-width: 700px) {
  body.page-sessions { display: flex; flex-direction: column; min-height: 100dvh; }
  .page-sessions .app-main--auth { flex: 1 0 auto; display: flex; flex-direction: column; align-self: stretch; margin: 0; max-width: none; min-height: 0; }
  .page-sessions .auth-shell { flex: 1 0 auto; padding-bottom: 190px; }
  .page-sessions .auth-panel { margin-block: auto; }
}

/* Admin: visão geral */
.admin-page--wide { width: 100%; max-width: 1120px; }
.admin-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-4); padding: var(--s-3) var(--s-4); background: var(--paper); border-radius: var(--r-md); }
.admin-filters__periods { display: flex; gap: var(--s-1); overflow-x: auto; }
.admin-filters__periods a { flex: none; padding: 6px 12px; border-radius: var(--r-control); color: var(--muted); font-weight: 700; font-size: .9rem; }
.admin-filters__periods a:hover { background: var(--surface-hover); color: var(--text); }
.admin-filters__periods a[aria-current="true"] { background: var(--orange); color: var(--on-accent); }
.admin-filters__controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-left: auto; }
.admin-filters select, .admin-filters input[type="date"] { width: auto; min-height: 36px; padding: 4px 10px; font-size: .9rem; }
.admin-filters select { padding-right: 32px; }
.admin-filters__check { display: flex; align-items: center; gap: var(--s-2); margin: 0; color: var(--muted); font-size: .9rem; font-weight: 400; cursor: pointer; }
.admin-filters input[type="checkbox"] { appearance: auto; flex: none; width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; accent-color: var(--orange); }
.admin-filters input[type="submit"] { width: auto; min-height: 36px; padding: 4px 16px; }
.admin-filters .text-link { margin: 0; font-size: .9rem; }
.admin-period-summary { margin: var(--s-2) var(--s-1) 0; color: var(--muted); font-size: .85rem; }
.admin-attention { margin: var(--s-5) 0 0; padding: var(--s-4) var(--s-5); background: var(--surface-3); border-left: 4px solid var(--danger); border-radius: var(--r-sm); }
.admin-attention h2 { margin: 0 0 var(--s-2); }
.admin-attention ul { display: grid; gap: var(--s-1); margin: 0; padding: 0; list-style: none; }
.admin-attention strong { color: var(--danger); }
.admin-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); margin-top: var(--s-5); }
.admin-kpi { display: flex; flex-direction: column; gap: var(--s-1); padding: var(--s-4); background: var(--paper); border-radius: var(--r-md); }
.admin-kpi--lead { grid-column: span 2; padding: var(--s-5); background: var(--surface-3); }
.admin-kpi > span { color: var(--muted); font-size: .9rem; }
.admin-kpi__value { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-1); }
.admin-kpi__value strong { color: var(--yellow); font-size: 2rem; line-height: 1.1; }
.admin-kpi--lead .admin-kpi__value strong { font-size: 2.75rem; }
.admin-kpi > small { color: var(--muted); }
.admin-kpi .admin-chart { margin: var(--s-4) 0 0; padding: var(--s-4); background: var(--paper); border-radius: var(--r-md); }
.admin-chart__legend { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-bottom: var(--s-3); color: var(--muted); font-size: .85rem; }
.admin-chart__key { display: inline-flex; align-items: center; gap: var(--s-2); }
.admin-chart__key::before { content: ""; width: 12px; height: 12px; background: var(--orange); }
.admin-chart__key--previous::before { width: 18px; height: 0; background: none; border-top: 2px dashed var(--text); }
.admin-chart__body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-2); }
.admin-chart__scale { display: flex; flex-direction: column; justify-content: space-between; min-width: 24px; height: 220px; color: var(--muted); font-size: .8rem; line-height: 1; text-align: right; }
.admin-chart__grid { background: linear-gradient(var(--line), var(--line)) 0 50% / 100% 1px no-repeat; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line-strong); }
.admin-chart__plot { display: block; width: 100%; height: 220px; }
.admin-chart__bar { fill: var(--orange); }
.admin-chart__previous { fill: none; stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.admin-chart__hit { fill: transparent; }
.admin-chart__column:hover .admin-chart__hit { fill: var(--surface-hover); }
.admin-chart__axis { display: flex; justify-content: space-between; margin: var(--s-2) 0 0 32px; color: var(--muted); font-size: .8rem; }
.admin-tabs { display: flex; gap: var(--s-1); margin-top: var(--s-2); overflow-x: auto; }
.admin-tabs a { flex: none; padding: 6px 12px; border-radius: var(--r-control); color: var(--muted); font-weight: 700; font-size: .9rem; }
.admin-tabs a:hover { background: var(--surface-hover); color: var(--text); }
.admin-tabs a[aria-current="true"] { background: var(--surface-selected); color: var(--text); }
.admin-chart-stats { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); margin: var(--s-3) 0 0; }
.admin-chart-stats dt { color: var(--muted); font-size: .85rem; }
.admin-chart-stats dd { margin: 0; font-size: 1.25rem; font-weight: 700; }
.admin-chart-stats small { color: var(--muted); font-size: .8rem; font-weight: 400; }
.admin-data { margin-top: var(--s-3); }
.admin-data summary { color: var(--accent-text); font-weight: 700; cursor: pointer; }
.admin-data .admin-table-wrap { max-height: 320px; margin-top: var(--s-2); overflow-y: auto; }
.admin-weeks { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: var(--s-1); margin: var(--s-2) 0 var(--s-1); padding: 0; list-style: none; text-align: center; font-weight: 700; }
.admin-weeks li { padding: var(--s-1) 0; background: var(--paper); border-radius: 6px; }
.admin-weeks li:last-child { background: var(--surface-selected); }
.admin-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); align-items: stretch; }
.admin-columns > .section-block { display: flex; flex-direction: column; min-width: 0; }
.admin-columns > .section-block > .admin-panel-fill { flex: 1; }
.admin-funnel { margin: var(--s-4) 0 0; padding: var(--s-4); background: var(--paper); border-radius: var(--r-md); }
.admin-funnel__steps { display: grid; gap: var(--s-3); margin: 0 0 var(--s-3); padding: 0; list-style: none; }
.admin-funnel__head { display: flex; align-items: baseline; gap: var(--s-2); margin-bottom: var(--s-1); }
.admin-funnel__head span { flex: 1; }
.admin-funnel__head small { color: var(--muted); }
.admin-funnel__track { height: 10px; background: var(--surface-3); border-radius: var(--r-pill); overflow: hidden; }
.admin-funnel__bar { display: block; height: 100%; background: var(--orange); }
.admin-funnel__loss { display: block; margin-top: var(--s-1); color: var(--muted); font-size: .8rem; }
.is-worst .admin-funnel__loss { color: var(--danger); font-weight: 700; }
.admin-retention { display: flex; gap: var(--s-6); margin: var(--s-2) 0 0; padding-top: var(--s-3); border-top: 1px solid var(--line); }
.admin-retention dt { color: var(--muted); font-size: .85rem; }
.admin-retention dd { margin: 0; font-weight: 700; }
.admin-stats--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: var(--s-4) 0 0; padding: var(--s-2) var(--s-4); background: var(--paper); border-radius: var(--r-md); }
.admin-stats--compact > div { display: flex; align-items: baseline; gap: var(--s-2); padding: var(--s-2) 0; background: none; border: 0; border-radius: 0; }
.admin-stats--compact strong { order: 1; margin-left: auto; font-size: 1rem; }
.admin-stats--compact span { font-size: .85rem; }
.admin-stats--compact > div { padding-inline: var(--s-2); }
.admin-cohorts-wrap { margin-top: var(--s-4); }
.admin-cohorts { width: 100%; border-collapse: separate; border-spacing: 2px; text-align: center; font-size: .85rem; }
.admin-cohorts th, .admin-cohorts td { min-width: 48px; padding: 6px 4px; white-space: nowrap; }
.admin-cohorts thead th, .admin-cohorts tbody th, .admin-cohorts tfoot th { color: var(--muted); font-weight: 700; }
.admin-cohorts td small { display: block; font-size: .7rem; opacity: .8; }
.admin-cohorts td { border-radius: 4px; }
.admin-cohorts td.is-partial { outline: 1px dashed var(--text); outline-offset: -2px; }
.admin-cohorts tfoot td { font-weight: 700; }
.admin-paywalls { margin-top: var(--s-4); }
.admin-health { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); margin-top: var(--s-4); }
.admin-health a { display: grid; gap: 2px; padding: var(--s-3) var(--s-4); background: var(--paper); border-radius: var(--r-sm); }
.admin-health a:hover { background: var(--surface-hover); }
.admin-health a[aria-current="true"] { background: var(--surface-selected); }
.admin-health strong { color: var(--yellow); font-size: 1.5rem; line-height: 1.1; }
.admin-health span { color: var(--muted); font-size: .85rem; }
@media (max-width: 900px) {
  .admin-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-columns { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .admin-filters__controls { width: 100%; margin-left: 0; }
  .admin-kpi--lead { grid-column: 1 / -1; }
  .admin-stats--compact { grid-template-columns: minmax(0, 1fr); }
  .admin-health { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.admin-chart-frame { display: block; }

/* ---------- Biblioteca ---------- */
.library .screen-title { margin-top: var(--s-1); }
.library-totals { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin: var(--s-4) 0 0; }
.library-totals div { display: flex; flex-direction: column-reverse; }
.library-totals dt { font-size: .8rem; color: var(--muted); }
.library-totals dd { margin: 0; font: 400 1.9rem/1 var(--font-display); }
.library-totals div:first-child dd { color: var(--c-data); }
.library-section { margin-top: var(--s-7); }
.library-progress { display: flex; gap: var(--s-3); overflow-x: auto; scrollbar-width: none; }
.library-progress__item { flex: none; width: 170px; display: grid; gap: var(--s-1); padding: var(--s-4); border-radius: var(--r-lg); background: var(--surface-1); }
.library-progress__item .cover { width: 56px; margin-bottom: var(--s-2); }
.library-progress__item .button { margin-top: var(--s-2); justify-self: start; }
.library-empty { padding: var(--s-4) 0; }
.library .text-link { display: inline-block; margin-top: var(--s-3); }

/* ---------- Feed (direção D): a obra lidera ----------
   Uma superfície para o feed inteiro, divisórias entre registros, capa de ingresso
   de 64px à esquerda com o avatar de quem registrou no canto, título em Anton,
   nota em selo coral, citação com traço Lagoon, ações em pílulas. */
.feed-list { gap: 0; padding: 0 var(--s-4); border-radius: var(--radius-xl); background: var(--surface-1); }
.page-home .feed-list { padding-top: 0; border-top: 0; }
.feed-list > .activity-card, .feed-list > .group-event-card, .feed-list > article {
  border-radius: 0; background: transparent; box-shadow: none; padding: var(--s-4) 0;
}
.feed-list > * + * { border-top: 1px solid var(--line); }
.feed-list > .bite-nudge, .feed-list > [id^="bite-nudge"] { margin: var(--s-3) 0; border-top: 0; }
.feed-list > [id^="bite-nudge"] + * { border-top: 0; }

.feed-list .activity-card { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: var(--s-4); align-items: start; }
.feed-list .activity-card > * { grid-column: 2; }
.feed-list .activity-card__top { grid-row: 1; gap: var(--s-2); }
.feed-list .activity-card__top > :first-child { position: absolute; left: 42px; top: calc(var(--s-4) + 80px); z-index: 1; }
.feed-list .activity-card__top .mini-avatar { width: 30px; height: 30px; font-size: .7rem; box-shadow: 0 0 0 3px var(--surface-1); }
.feed-list .activity-card__name { font-family: var(--font-body); font-size: .9rem; font-weight: 700; text-transform: none; letter-spacing: 0; }
.feed-list .activity-card__who p { white-space: normal; font-size: .9rem; }
.feed-list .activity-card__who small { font-size: .75rem; }
.feed-list .activity-card__media { display: contents; }
.feed-list .activity-card__media > .cover, .feed-list .activity-card__media > .media-cover { grid-column: 1; grid-row: 1 / span 4; width: 64px; margin: 0; --cover-radius: var(--r-sm); border-radius: var(--cover-radius); }
.feed-list .activity-card__media > div, .feed-list .activity-card__media > .activity-card__media-text { grid-column: 2; padding-top: var(--s-1); }
.feed-list .activity-card .media-type { display: none; }
.feed-list .activity-card__media h3 { margin: 0; font: 400 1.3rem/1.05 var(--font-display); text-transform: uppercase; letter-spacing: .005em; }
.feed-list .activity-card__media p { margin: 2px 0 0; color: var(--muted); font-size: .85rem; }
.feed-list .activity-card__body { margin: var(--s-2) 0 0; padding-left: var(--s-3); box-shadow: inset 3px 0 0 var(--c-structure); font-size: .95rem; }
.feed-list .activity-card > .activity-card__review { grid-column: 1 / -1; }
.feed-list .activity-card--mine { box-shadow: none; }
.feed-list .engagement { margin-top: var(--s-2); }
.feed-list .engagement__button, .feed-list .engagement__count { min-height: 34px; padding: 0 12px; border: 0; background: var(--surface-2); color: var(--muted); font-size: .8rem; font-weight: 600; }
.feed-list .engagement__button.is-reacted { background: color-mix(in srgb, var(--c-you) 16%, transparent); color: var(--c-you); }
.feed-list .engagement__button.is-reacted .ui-icon { animation: heart-pop var(--t-state) var(--ease-spring); }
@keyframes heart-pop { 50% { transform: scale(1.4) rotate(-8deg); } }
@media (prefers-reduced-motion: reduce) { .feed-list .engagement__button.is-reacted .ui-icon { animation: none; } }

/* ---------- Início (direção D) ---------- */
/* Posição: bloco coral com número grande e o trilho do grupo. */
.feed-hero { position: relative; grid-template-columns: 1fr; padding: var(--s-5); border-radius: var(--radius-xl); background: var(--c-you); color: var(--on-color); }
.feed-hero__label { opacity: 1; text-transform: none; letter-spacing: 0; font-weight: 700; }
.feed-hero__row strong { font-size: 4.4rem; line-height: .85; }
.feed-hero__doodle { position: absolute; right: var(--s-4); top: var(--s-4); width: 34px; height: 34px; color: var(--on-color); opacity: .55; }
.standing-track { position: relative; display: block; height: 4px; margin: var(--s-4) 6px var(--s-1); border-radius: 4px; background: color-mix(in srgb, var(--on-color) 22%, transparent); }
.standing-track i { position: absolute; left: var(--x); top: -3px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--on-color); opacity: .45; }
.standing-track i.is-me { top: -6px; width: 16px; height: 16px; margin-left: -8px; opacity: 1; border: 3px solid var(--c-you); outline: 2px solid var(--on-color); }

/* Escolha do grupo: o ingresso, em Lagoon, com o título em Anton. */
.feed-pick { padding: var(--s-3) var(--s-4) var(--s-3) var(--s-3); border-radius: var(--radius-xl); background: var(--c-structure); color: var(--text); }
.feed-pick .list-row__meta { color: var(--text); }
.feed-pick .list-row__meta:first-child { color: var(--c-data); }
.feed-pick .list-row__title { font: 400 1.6rem/1 var(--font-display); text-transform: uppercase; }
.feed-pick .cover { width: 56px; }
.feed-pick .list-row__chevron { color: var(--text); }

/* Em andamento: livro com capa grande e ações; jogo compacto. */
.current-reading { gap: var(--s-4); padding: var(--s-4); border-radius: var(--radius-xl); background: var(--surface-1); align-items: flex-start; flex-wrap: wrap; }
.current-reading .cover { width: 96px; }
.current-reading__label { color: var(--c-data); font-size: .8rem; font-weight: 600; }
.current-reading__title { white-space: normal; font: 400 1.6rem/1 var(--font-display); text-transform: uppercase; }
.current-reading__actions { width: 100%; }
.current-reading__actions .button { flex: 1; }
.current-reading--game .cover { width: 56px; }
.current-reading--game .current-reading__title { font-size: 1.3rem; }

/* Desafio do grupo: número à esquerda, barra com crista. */
.feed-goal { gap: var(--s-2); padding: var(--s-5); border-radius: var(--radius-xl); background: var(--surface-2); }
.feed-goal .doodle { display: none; }
.feed-goal__title { font: 400 1.6rem/1 var(--font-display); text-transform: uppercase; }
.feed-goal__pct { display: none; }
.feed-goal__count { font: 600 .9rem var(--font-body); color: var(--muted); }
.feed-goal__count b { font: 400 3.2rem/1 var(--font-display); color: var(--c-win); margin-right: 2px; }
.feed-goal.is-done .feed-goal__count b { animation: goal-tick var(--t-state) var(--ease-spring); }
@keyframes goal-tick { 50% { transform: translateY(-5px); } }
.feed-goal__count b { display: inline-block; }

/* Retrospectiva: ícone de stories no lugar do mascote. */
.doodle--retro { color: var(--c-data); }
.list-row--retro .doodle--retro { color: var(--on-color); width: 44px; height: 44px; }
@media (prefers-reduced-motion: reduce) { .feed-goal.is-done .feed-goal__count b { animation: none; } }
.feed-list .activity-card .rating { display: inline-flex; padding: 0; background: none; }
.feed-list .activity-card__points { display: inline-flex; gap: 3px; margin-left: var(--s-2); padding: 0; border: 0; background: none; box-shadow: none; color: var(--muted); }
.feed-list .activity-card__points small { color: var(--muted); }
.feed-list .activity-card__rank { background: var(--surface-2) !important; color: var(--muted) !important; }
.feed-list .social-feed-event { margin: 0; padding: var(--s-4) 0; border: 0; border-radius: 0; background: transparent; }
.feed-list .social-feed-event .doodle { color: var(--c-structure); }

/* ---------- Avatares e pódio (direção D) ---------- */
/* Avatares sem foto: superfície com iniciais em mint; lime fica só para conquista. */
.mini-avatar, .profile-avatar, .avatar:not(:has(img)) { background: var(--surface-3); color: var(--c-data); }
/* Pódio: 1º lugar em Lagoon, você em Coral, degraus sobem com mola. */
.podium__step { animation: podium-rise var(--t-data) var(--ease-spring) both; transform-origin: bottom; }
.podium__place--1 .podium__step { background: var(--c-structure); color: var(--text); animation-delay: 80ms; }
.podium__place--1 .podium__step small { color: var(--text); opacity: .8; }
.podium__place--3 .podium__step { animation-delay: 160ms; }
.podium__place.is-me .podium__step { background: var(--c-you); color: var(--on-color); }
.podium__place.is-me .podium__step small { color: var(--on-color); opacity: .75; }
.podium__place--1 .avatar { box-shadow: 0 0 0 3px var(--c-win); }
.podium__crown { color: var(--c-win); }
@keyframes podium-rise { from { transform: scaleY(0); } }
@media (prefers-reduced-motion: reduce) { .podium__step { animation: none; } }

/* ---------- Registro (activities/show) ---------- */
.page-activities .activity-card .stars__glyphs { display: none; }
.page-activities .activity-card__summary .stars__value { font: 400 3.6rem/1 var(--font-display); color: var(--c-you); }
.page-activities .activity-card__summary .stars[style*="--rating: 5.0"] .stars__value { color: var(--c-win); }
.page-activities .activity-card__summary .rating { padding: 0; background: none; }

/* ---------- Perfil (direção D) ---------- */
/* Atalhos do perfil: superfície neutra; a Retrospectiva em Lagoon. Lime fica para conquista. */
.profile-retro { border-radius: var(--radius-xl); background: var(--surface-1); color: var(--text); }
.profile-retro small { color: var(--muted); opacity: 1; letter-spacing: 0; text-transform: none; font-weight: 600; font-size: .8rem; }
.profile-retro .ui-icon { color: var(--muted); }
a.profile-retro[href*="retrospectiva"] { background: var(--c-structure); }
a.profile-retro[href*="retrospectiva"] small, a.profile-retro[href*="retrospectiva"] .ui-icon { color: var(--text); }

/* ---------- Estatísticas (direção D) ---------- */
.personal-stats .stat-strip:first-of-type > div:first-child { grid-column: 1 / -1; background: var(--c-data); color: var(--on-color); }
.personal-stats .stat-strip:first-of-type > div:first-child strong { font-size: 5rem; line-height: .85; }
.personal-stats .stat-strip:first-of-type > div:first-child span { color: var(--on-color); }
.personal-stats__streaks strong { color: var(--c-you); }
.personal-stats__rhythm .progress-bar > span { background: var(--c-data); animation: wave-fill var(--t-data) var(--ease) both; }
.personal-stats__rhythm li:last-child .progress-bar > span { background: var(--c-you); }
@media (prefers-reduced-motion: reduce) { .personal-stats__rhythm .progress-bar > span { animation: none; } }
.personal-stats__retro { margin: var(--s-5) 0; } .personal-stats__retro .doodle--retro { color: var(--text); width: 40px; height: 40px; }

/* ---------- Nota em onda (direção D) ---------- */
.rating-picker { border: 0; border-radius: var(--radius-xl); background: var(--surface-1); }
.rating-picker__heading output { font: 400 1.9rem/1 var(--font-display); color: var(--c-you); }
.rating-picker__mood { color: var(--c-data); font-weight: 600; }
.rating-picker__wave { animation: wave-scroll 2.6s linear infinite; transition: width var(--t-state) var(--ease); }
@keyframes wave-scroll { to { -webkit-mask-position: 24px 0; mask-position: 24px 0; } }
.rating-picker.is-max .rating-picker__wave { background: var(--c-win); }
.rating-picker.is-max .rating-picker__heading output { color: var(--c-win); }
@media (prefers-reduced-motion: reduce) { .rating-picker__wave { animation: none; } }

/* ---------- Início, fidelidade à direção D ---------- */
/* Cabeçalho: só o wordmark, como no protótipo; o jacaré fica nos estados vazios e no login. */
.app-header .brand-lockup .brand-mark { display: none; }
.app-header .brand-lockup .brand-word { display: inline; font: 700 1.85rem/1 var(--font-brand); letter-spacing: -0.05em; color: var(--text); }
.app-header .header-notifications { width: 44px; height: 44px; border: 1.5px solid var(--line); border-radius: var(--r-control); background: transparent; }

/* Títulos de seção menores: um só título grande por tela. */
.section-title h2, .section-title h3 { font-size: 1.4rem; letter-spacing: .02em; }

.home-hello { margin-top: var(--s-4); }
.home-hello .screen-title { margin: var(--s-2) 0 0; font-size: clamp(2.4rem, 11vw, 2.9rem); line-height: .98; }
.streak-chip { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 2px 10px 2px 6px; border-radius: var(--r-control); background: var(--surface-2); color: var(--text); font-weight: 600; }
.doodle--xs { width: 16px; height: 16px; }

/* Posição em duas colunas: rótulo e #N à esquerda; pontos, texto e trilho à direita. */
.feed-context { margin-top: var(--s-5); }
.feed-hero { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: var(--s-4); padding: var(--s-5); }
.feed-hero__pos { display: grid; gap: 2px; }
.feed-hero__label { font-size: .75rem; }
.feed-hero__n { font: 400 4.6rem/.85 var(--font-display); }
.feed-hero__body { display: grid; gap: 2px; padding-right: var(--s-6); }
.feed-hero__pts { font: 400 1.7rem/1 var(--font-display); }
.feed-hero small { font-size: .85rem; font-weight: 600; }
.feed-hero .standing-track { margin: var(--s-3) 4px var(--s-1) 2px; }

.home-progress { margin-top: var(--s-6); }
.home-progress .current-reading + .current-reading { margin-top: var(--s-3); }
.feed-goals { margin-top: var(--s-6); }

/* Desafio: prazo em cima, título à esquerda, número grande à direita, barra com crista. */
.feed-goals__grid > .feed-goal:only-child { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s-3); }
.feed-goal:only-child .feed-goal__top { display: contents; }
.feed-goal:only-child .feed-goal__meta { grid-column: 1 / -1; grid-row: 1; justify-content: flex-start; gap: 6px; color: var(--muted); font-size: .78rem; font-weight: 600; }
.feed-goal:only-child .feed-goal__meta > :first-child { display: none; }
.feed-goal:only-child .feed-goal__meta::before { content: "Desafio ·"; }
.feed-goal:only-child .feed-goal__name { grid-column: 1; grid-row: 2; }
.feed-goal:only-child .feed-goal__count { grid-column: 2; grid-row: 2; align-self: start; }
.feed-goal:only-child .progress-bar--wave { grid-column: 1 / -1; grid-row: 3; margin-top: var(--s-3); }
.feed-goal__category { color: var(--muted); font-size: .9rem; }

/* Escolha do grupo com canhoto. */
.feed-pick { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-6); padding: var(--s-3) 0 var(--s-3) var(--s-3); }
.feed-pick__stub { align-self: stretch; display: grid; align-content: center; justify-items: center; padding: 0 var(--s-4); border-left: 2px dashed color-mix(in srgb, var(--text) 45%, transparent); font-size: .8rem; text-align: center; }
.feed-pick__stub b { font: 400 1.4rem/1 var(--font-display); }
.page-home .feed-list { margin-top: var(--s-6); }
.home-feed-title { margin-top: var(--s-7); }
.page-home .home-feed-title + .feed-list, .page-home .home-feed-title ~ .feed-list { margin-top: var(--s-3); }
.feed-pick .cover, .feed-pick .media-cover { width: 64px; flex: none; }
.feed-pick .list-row__title { white-space: normal; overflow: visible; text-overflow: clip; }
.feed-pick .list-row__body { min-width: 0; }

/* ---------- Grupo (direção D) ---------- */
.group-podium { background: transparent; padding: 0; overflow: visible; }
.group-rest { margin-top: var(--s-3); list-style: none; }
.group-rest__row { position: relative; gap: var(--s-3); }
.group-rest__pos { width: 22px; font: 400 1.25rem var(--font-display); color: var(--muted); }
.group-rest__pts { font: 400 1.25rem var(--font-display); }
.group-rest__bar { position: absolute; left: 72px; right: 0; bottom: 6px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--c-structure) var(--x), transparent var(--x)); }
.group-rest__row.is-me .group-rest__pos, .group-rest__row.is-me .list-row__title { color: var(--c-you); }
/* Histórias do grupo em grade 2×2; o primeiro destaque em Lagoon. */
.group-insights__list { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.group-insights__list .insight-card { padding: var(--s-4); border-radius: var(--r-lg); background: var(--surface-1); }
.group-insights__list .insight-card:first-child { background: var(--c-structure); }
.insight-card__label { background: none !important; padding: 0 !important; color: var(--muted); font-size: .78rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.insight-card:first-child .insight-card__label { color: var(--text); }
.insight-card__headline { font-weight: 700; line-height: 1.15; }
/* Áreas do grupo: lista numa superfície, não grade de tiles. */
.group-destinations.tile-grid { display: grid; grid-template-columns: 1fr; gap: 0; margin-top: var(--s-7); padding: 0 var(--s-4); border-radius: var(--radius-xl); background: var(--surface-1); }
.group-destinations .tile { border-radius: 0; background: transparent; padding: var(--s-3) 0; min-height: 0; flex-direction: row; align-items: center; gap: var(--s-3); }
.group-destinations .tile + .tile { border-top: 1px solid var(--line); }
.group-destinations .tile__doodle { width: 32px; height: 32px; color: var(--c-data); }

/* ---------- Estatísticas: notas e ritmo como no protótipo D ---------- */
.personal-stats .profile-section:has(h2) .stat-strip { grid-template-columns: repeat(4, 1fr); }
.personal-stats .profile-section .stat-strip > div:first-child:not(:only-child) { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--s-3); background: var(--surface-2); }
.personal-stats .profile-section .stat-strip > div:first-child:not(:only-child) strong { font-size: 3.4rem; color: var(--c-you); }
.rhythm-chart { display: block; width: 100%; height: auto; overflow: visible; }
.rhythm-chart text { font: 600 9px var(--font-body); fill: var(--text-subtle); text-anchor: middle; }
.rhythm-chart__area { fill: var(--c-structure); opacity: .45; }
.rhythm-chart__line { fill: none; stroke: var(--c-data); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 700; animation: rhythm-draw var(--t-data) var(--ease) both; }
@keyframes rhythm-draw { from { stroke-dashoffset: 700; } to { stroke-dashoffset: 0; } }
.rhythm-chart__dot { fill: var(--c-you); stroke: var(--bg); stroke-width: 3; }
.rhythm-chart .rhythm-chart__val { font: 400 14px var(--font-display); fill: var(--c-you); }
@media (prefers-reduced-motion: reduce) { .rhythm-chart__line { animation: none; } }
.library-shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.library-shelf .cover-tile__meta { color: var(--muted); }
.score { justify-self: start; display: inline-block; margin-top: 3px; padding: 0 8px; border-radius: var(--r-control); background: var(--c-you); color: var(--on-color); font: 400 .85rem/1.6 var(--font-display); }
.score--max { background: var(--c-win); }
.group-insights__list .insight-card__headline { color: var(--text); font: 400 1.6rem/1 var(--font-display); }
.group-insights__list .insight-card:first-child .insight-card__headline { color: var(--c-win); }
/* Escolha do grupo na página do grupo: ingresso Lagoon, sem fundo borrado. */
.group-section .pick-card { background: var(--c-structure) !important; border-radius: var(--radius-xl); }
.group-section .pick-card::before, .group-section .pick-card::after { display: none; }
.group-section .pick-card small { color: var(--c-data); }
.group-section .pick-card strong { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 1.8rem; line-height: 1; }
/* Cartão de desafio (lista do grupo e tela de desafios) no mesmo desenho do desafio da Início. */
.challenge-card { padding: var(--s-5); border-radius: var(--radius-xl); background: var(--surface-2); }
.challenge-card__icon { display: none; }
.challenge-card__title strong { font: 400 1.5rem/1 var(--font-display); text-transform: uppercase; white-space: normal; }
.challenge-card__pct { font-size: 2.4rem; color: var(--c-win); }
.challenge-card .progress-bar { height: 16px; }
.challenge-card .progress-bar > span { background: var(--c-win); border-radius: 0;
  -webkit-mask: var(--wave) 0 0 / 24px 20px repeat-x, linear-gradient(#000, #000) 0 6px / 100% 100% no-repeat;
  mask: var(--wave) 0 0 / 24px 20px repeat-x, linear-gradient(#000, #000) 0 6px / 100% 100% no-repeat;
  animation: wave-crest 2.6s linear infinite; }
@media (prefers-reduced-motion: reduce) { .challenge-card .progress-bar > span { animation: none; } }

/* ---------- Registro: foco na capa (direção D) ----------
   Sem bloco de cor: sobre o fundo do app, a capa grande centralizada lidera e o título
   Anton vem embaixo, também centralizado. Mesma largura do resto da tela. */
.activity-back { margin-bottom: var(--s-4); }
.activity-back .back-link { margin: 0; color: var(--text); }
.activity-hero { display: grid; gap: var(--s-5); margin: 0 0 var(--s-5); padding: 0; background: none; text-align: center; justify-items: center; }
.activity-hero__head { display: grid; justify-items: center; gap: var(--s-5); width: 100%; }
.activity-hero__head > .media-cover, .activity-hero__head > .cover { --cover-w: 180px; --cover-radius: var(--r-sm); width: var(--cover-w); margin: 0; border-radius: var(--cover-radius); }
.activity-hero__text { display: grid; justify-items: center; gap: var(--s-2); min-width: 0; max-width: 100%; }
.activity-hero .eyebrow { margin: 0; color: var(--c-data); }
.activity-hero__title { margin: 0; font-size: clamp(2.2rem, 9vw, 3.4rem); line-height: .95; text-wrap: balance; overflow-wrap: anywhere; }
.activity-hero__sub { margin: 0; color: var(--muted); font-weight: 600; }
@media (min-width: 800px) { .activity-hero__head > .media-cover, .activity-hero__head > .cover { --cover-w: 220px; } }
/* Capa que desliza para mostrar as notas do Munch (cover_stats_controller.js). */
.cover-stage { --cover-w: 180px; --cover-radius: var(--r-sm); position: relative; width: var(--cover-w); }
.cover-stage__frame { position: relative; aspect-ratio: 2 / 3; overflow: hidden; border-radius: var(--cover-radius); }
.cover-stage__cover, .cover-stats { position: absolute; inset: 0; transition: transform var(--t-screen) ease, opacity var(--t-screen) ease; }
.cover-stage__cover > .cover { width: 100%; height: 100%; margin: 0; border-radius: var(--cover-radius); object-fit: cover; }
.cover-stats { --pad: var(--s-3); display: grid; align-content: center; justify-items: center; gap: var(--s-2); padding: var(--s-4) var(--pad);
  border-radius: var(--cover-radius); background: var(--surface-2); transform: translateX(100%); opacity: 0; }
.cover-stage.is-open .cover-stage__cover { transform: translateX(-100%); opacity: 0; }
.cover-stage.is-open .cover-stats { transform: none; opacity: 1; }
/* Centralizado sem transform: o button:active global usa transform e faria o botão pular no clique. */
.cover-stage__toggle { position: absolute; inset-block: 0; margin-block: auto; inset-inline-start: calc(100% + var(--s-3)); }
.cover-stage.is-open .cover-stage__toggle { background: var(--c-data); color: var(--bg); }
/* Uma cor da paleta por faixa; a nota 5 é Lime (conquista). */
.cover-stats__slice--5 { --slice: var(--c-win); }
.cover-stats__slice--4 { --slice: var(--c-data); }
.cover-stats__slice--3 { --slice: var(--c-structure); }
.cover-stats__slice--2 { --slice: var(--c-you); }
.cover-stats__slice--1 { --slice: color-mix(in srgb, var(--c-you) 45%, var(--surface-3)); }
.cover-stats__average { display: grid; justify-items: center; margin: 0; line-height: 1; }
.cover-stats__average strong { font-family: var(--font-display); font-size: 2.6rem; color: var(--c-data); }
.cover-stats__average small { margin-top: 4px; font-size: .72rem; color: var(--muted); }
.cover-stats__kicker { margin-bottom: 4px; color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.cover-stats__label { margin: 0 0 var(--s-1); font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c-data); }
.cover-stats__bars { display: grid; gap: var(--s-2); width: 100%; margin: 0; padding: 0; list-style: none; font-size: .72rem; }
.cover-stats__bars li { display: grid; grid-template-columns: 3.2em minmax(0, 1fr) 2.6em; align-items: center; gap: var(--s-1); }
.cover-stats__range { white-space: nowrap; font-variant-numeric: tabular-nums; }
.cover-stats__track { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.cover-stats__fill { display: block; width: var(--w); height: 100%; border-radius: inherit; background: var(--slice);
  transform-origin: left; transition: transform var(--t-data) ease; transform: scaleX(0); }
.cover-stage.is-open .cover-stats__fill { transform: none; transition-delay: 120ms; }
.cover-stats__pct { text-align: end; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (min-width: 800px) { .cover-stage { --cover-w: 220px; } .cover-stats__bars { font-size: .78rem; } }
@media (prefers-reduced-motion: reduce) { .cover-stage__cover, .cover-stats, .cover-stats__fill { transition: none; } }


/* ---------- Telas menores (direção D) ---------- */
/* Fundo borrado da capa sai: superfície chapada, como no protótipo. */
.backdrop::before, .backdrop::after { display: none; }
.backdrop { background: var(--surface-1); }
/* Awards: coroa em traço, sem quadrado colorido. */
.awards-header__trophy { width: auto; height: auto; background: none !important; border-radius: 0; color: var(--c-win); }
.awards-header__trophy .doodle { width: 48px; height: 48px; color: var(--c-win); }
/* Retrospectiva: card de início em Lagoon com o ícone de stories. */
.retro-launch { background: var(--c-structure) !important; color: var(--text); }
.retro-launch::before, .retro-launch::after { display: none; }
.retro-launch small { color: var(--c-data); }
.retro-launch .doodle--retro { width: 20px; height: 20px; color: var(--text); vertical-align: middle; }
/* Busca: resultados numa superfície só, com divisórias. */
.search-results { gap: 0; padding: 0 var(--s-4); border-radius: var(--radius-xl); background: var(--surface-1); }
.search-result-unit { border: 0; border-radius: 0; background: transparent; }
.search-result-unit + .search-result-unit { border-top: 1px solid var(--line); }
.search-result { padding-left: 0; padding-right: 0; }
.search-results__heading { padding-top: var(--s-4); }

/* Pódio e lista separados: degraus com base arredondada e espaço antes da lista (direção D). */
.podium { margin-bottom: var(--s-3); }
.podium__step { border-radius: 14px 14px 10px 10px; }
.group-podium + .rank-list, .podium + .rank-list, .ranking-podium + .rank-list { margin-top: var(--s-3); }
.rank-list { border-radius: var(--radius-xl); overflow: hidden; }

/* Busca: título sem quebrar no meio da palavra; ações compactas. */
.search-result__copy { flex: 1; min-width: 0; }
.search-result strong { overflow-wrap: normal; word-break: normal; hyphens: auto; }
.search-result__action { flex: none; }
/* Cartão de desafio sem ícone decorativo. */
.challenge-card .doodle { display: none; }
.rank-row--top2 .rank-row__position, .rank-row--top3 .rank-row__position { color: var(--muted); }
.rank-row--me .rank-row__position { color: var(--c-you); }
/* Regra de desempate como rodapé da própria lista do ranking. */
.rank-list__note { display: flex; align-items: center; gap: var(--s-2); margin: 0; padding: var(--s-3) var(--s-4); border-top: 1px solid var(--line); background: var(--surface-1); color: var(--muted); font-size: .8rem; line-height: 1.35; }
.rank-list__note .ui-icon { flex: none; width: 16px; height: 16px; color: var(--muted); }

/* Busca: hover sem bloco de fundo. O título fica mint e a capa sobe um pouco. */
.search-results .search-result:hover, .search-results .search-result:focus-visible { background: transparent; }
.search-results .search-result strong { transition: color var(--t-state) ease; }
.search-results .search-result:hover strong, .search-results .search-result:focus-visible strong { color: var(--c-data); }
.search-results .search-result .cover, .search-results .search-result .media-cover { transition: transform var(--t-state) var(--ease-spring); }
.search-results .search-result:hover .cover, .search-results .search-result:hover .media-cover { transform: translateY(-3px) rotate(-2deg); }
.search-results .search-result:focus-visible { outline: 2px solid var(--c-data); outline-offset: 4px; border-radius: var(--r-md); }
@media (prefers-reduced-motion: reduce) { .search-results .search-result:hover .cover, .search-results .search-result:hover .media-cover { transform: none; } }

/* Registrar: cabeçalho da obra alinhado aos outros cards, com espaço antes de "Sobre o filme". */
.register-hero.backdrop { margin: var(--s-2) 0 var(--s-3); padding: var(--s-4); border-radius: var(--radius-xl); background: var(--surface-1); }
.register-hero + .movie-details, .register-hero ~ .movie-details { margin-top: var(--s-3); }
.movie-details { border-radius: var(--radius-xl); }
/* "Vi a temporada toda" com a lupa ao lado; a busca de episódio abre embaixo. */
.season-tools { display: flex; align-items: stretch; gap: var(--s-2); }
.season-tools .season-choice { flex: 1 1 auto; min-width: 0; }
.season-tools__search { flex: none; width: 52px; height: auto; border-radius: var(--r-control); }
.season-tools .season-tools__search .ui-icon { width: 24px; height: 24px; stroke-width: 2.2; }
.season-tools__search[aria-expanded="true"] { background: var(--c-you); color: var(--on-accent); }
.episode-search { display: grid; gap: var(--s-1); min-width: 0; margin-top: var(--s-2); }
.episode-search__row { display: flex; gap: var(--s-2); align-items: center; min-width: 0; }
.episode-search[hidden] { display: none; }
/* Campo e botão com a mesma altura; o botão não sobe no hover para não sair da linha do campo. */
.episode-search .button:hover { transform: none; }
.episode-search { --search-h: 48px; }
.episode-search .search-input > input[type="search"] { height: var(--search-h); min-height: 0; }
.episode-search .button { flex: none; width: auto; height: var(--search-h); min-height: 0; padding-block: 0; padding-inline: var(--s-4); }
/* Lista do grupo: o destaque da escolha alinhado aos cards, em Lagoon. */
.pick-hero.backdrop { margin: var(--s-2) 0 var(--s-4); border-radius: var(--radius-xl);
  /* Lagoon puxado para o fundo do tema: o texto creme lê bem nos dois temas (no clássico o Lagoon é claro). */
  background: color-mix(in srgb, var(--c-structure) 62%, var(--bg)); }
/* Texto secundário e ação de compartilhar em creme translúcido: o --muted some sobre o Lagoon. */
.pick-hero.backdrop p.muted, .pick-hero.backdrop .share-actions__trigger { color: color-mix(in srgb, var(--text) 82%, transparent); }
.pick-hero.backdrop h2 { color: var(--c-win); }
/* Compartilhar é um link discreto aqui: hover clareia e sublinha, sem fundo nem levantar. */
.pick-hero.backdrop .share-actions__trigger:hover, .pick-hero.backdrop .share-actions__trigger:focus-visible { background: transparent; color: var(--text); transform: none; text-decoration: underline; text-underline-offset: 4px; }
/* Stories da Retrospectiva: a capa borrada é a imagem do slide; ela continua. */
.story.backdrop::before, .story.backdrop::after { display: block; }
.story.backdrop { background: transparent; }

/* Biblioteca: a nota numa faixa escura na base da capa, como o canhoto do ingresso. */
.library-shelf__art { position: relative; display: block; overflow: hidden; border-radius: var(--r-md); }
.library-shelf__rating {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center;
  gap: 6px; height: 32px; background: var(--c-ground-deep);
  border-top: 2px dashed color-mix(in srgb, var(--text) 30%, transparent);
}
.library-shelf__rating::before { content: "nota"; color: var(--muted); font: 600 .7rem var(--font-body); }
.library-shelf__rating .score { margin: 0; padding: 0; background: none; color: var(--c-you); font: 400 1.05rem/1 var(--font-display); letter-spacing: .02em; }
.library-shelf__rating.is-max .score { color: var(--c-win); }

/* ---------- Biblioteca com ritmo (direção D) ---------- */
/* Placar: o tipo que você mais devora em bloco mint, os outros em fila. */
.library-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); margin: var(--s-5) 0 0; }
.library-board__item { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: var(--s-3); border-radius: var(--r-lg); background: var(--surface-1); }
.library-board__item dd { order: 1; margin: 0; font: 400 1.9rem/1 var(--font-display); }
.library-board__item dt { order: 2; color: var(--muted); font-size: .78rem; font-weight: 600; }
.library-board__doodle { width: 22px; height: 22px; margin-bottom: var(--s-2); color: var(--c-data); }
.library-board__item.is-lead { grid-column: 1 / -1; padding: var(--s-5); background: var(--c-data); color: var(--on-color); }
.library-board__item.is-lead dd { font-size: 5rem; line-height: .85; }
.library-board__item.is-lead dt { color: var(--on-color); font-size: .95rem; font-weight: 700; }
.library-board__item dd.library-board__note { order: 3; margin-top: 2px; color: var(--c-data); font: 600 .7rem/1.2 var(--font-body); }
.library-board__item.is-lead dd.library-board__note { color: var(--on-color); font-size: .85rem; }
.library-board__item.is-lead .library-board__doodle { position: absolute; right: var(--s-4); bottom: var(--s-3); width: 88px; height: 88px; margin: 0; color: var(--on-color); opacity: .35; }

.library-progress { display: grid; gap: var(--s-3); }

/* Estante: o último em destaque largo; o resto em grade com a faixa de nota. */
/* Filtro da estante: busca pelo nome e mês na mesma faixa, acima das capas. */
/* minmax(0, 1fr): sem isso a coluna crescia até a largura natural do campo e a busca vazava da tela no celular. */
.library-filter { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s-2); margin-bottom: var(--s-4); }
.library-filter__search { display: flex; gap: var(--s-2); min-width: 0; margin: 0; }

.library-filter__search .button { flex: 0 0 auto; width: auto; }
.library-filter__month { width: auto; max-width: 9.5rem; border-radius: var(--r-control); }
.library-filter__summary { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-2);
  margin: 0 0 var(--s-4); color: var(--muted); font-size: .9rem; font-weight: 600; }
/* Grade da estante: a capa sozinha num quadro 2:3 recortado, e embaixo dela só a nota ou as sessões. */
.library-shelf > .cover-tile:not(.library-shelf__lead) { gap: var(--s-1); }
.library-shelf > .cover-tile:not(.library-shelf__lead) .library-shelf__art { overflow: hidden; isolation: isolate; }
.library-shelf > .cover-tile:not(.library-shelf__lead) .library-shelf__art::after {
  content: ""; position: absolute; inset: 0; border: var(--cover-edge-w) solid var(--cover-edge); border-radius: inherit; pointer-events: none; }
.library-shelf__under { display: flex; justify-content: center; align-items: center; min-height: 1.1rem; }
.library-shelf__under .stars__value { display: none; }
.library-shelf__under .stars__glyphs { font-size: .85rem; letter-spacing: 1px;
  background: linear-gradient(90deg, var(--c-you) calc(var(--rating) / 5 * 100%), var(--line) 0); -webkit-background-clip: text; background-clip: text; }
.library-shelf__under.is-max .stars__glyphs { background: var(--c-win); -webkit-background-clip: text; background-clip: text; }
.library-shelf__under .library-shelf__count { font-size: .74rem; }
.library .library-shelf { gap: var(--s-3); }
.library-shelf__more { margin-top: var(--s-4); }
/* Estante: mais colunas quando há largura; o destaque ocupa a linha inteira. */
@media (min-width: 640px) { .library .library-shelf { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 960px) { .library .library-shelf { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
/* Placar compacto: os quatro totais numa superfície só, com divisórias. As regras de .library-board
   continuam valendo para o placar das estatísticas do perfil. */
.library-board--compact { --pad: var(--s-2); grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-1); margin-top: var(--s-4); padding: var(--pad); border-radius: var(--r-lg); background: var(--surface-1); }
/* Linhas fixas (ícone, número, rótulo, nota): todas as colunas alinham mesmo quando só "jogos" tem nota. */
.library-board--compact .library-board__item, .library-board--compact .library-board__item.is-lead {
  grid-column: auto; display: grid; grid-template-rows: 22px auto auto 14px; justify-items: center; align-items: center; row-gap: 2px;
  padding: var(--s-3) var(--s-1) var(--s-2); border-radius: calc(var(--r-lg) - var(--pad)); background: none; color: inherit; text-align: center; overflow: visible; }
.library-board--compact .library-board__item.is-lead { background: var(--c-data); color: var(--on-color); }
.library-board--compact .library-board__doodle, .library-board--compact .is-lead .library-board__doodle {
  position: static; order: 0; width: 22px; height: 22px; margin: 0; opacity: 1; color: var(--muted); }
.library-board--compact .is-lead .library-board__doodle { color: var(--on-color); }
.library-board--compact .library-board__item dd, .library-board--compact .library-board__item.is-lead dd { order: 1; font-size: 1.8rem; line-height: 1; }
.library-board--compact .library-board__item dt, .library-board--compact .library-board__item.is-lead dt { order: 2; color: var(--muted); font-size: .74rem; font-weight: 600; }
.library-board--compact .library-board__item.is-lead dt { color: var(--on-color); }
.library-board--compact .library-board__item dd.library-board__note, .library-board--compact .library-board__item.is-lead dd.library-board__note {
  order: 3; margin: 0; color: var(--c-data); font-size: .64rem; line-height: 1; }
.library-board--compact .library-board__item.is-lead dd.library-board__note { color: var(--on-color); }
.library-shelf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4) var(--s-3); }
.library-shelf__lead { grid-column: 1 / -1; display: grid; grid-template-columns: 132px 1fr; gap: var(--s-4); align-items: end; padding: var(--s-4); border-radius: var(--radius-xl); background: var(--surface-1); }
.library-shelf__lead .library-shelf__art { width: 132px; }
.library-shelf__copy { display: grid; gap: 2px; min-width: 0; }
.library-shelf__lead .cover-tile__title { font: 400 1.7rem/1 var(--font-display); text-transform: uppercase; white-space: normal; }
.library-shelf__big-rating { display: flex; align-items: baseline; gap: var(--s-2); margin-top: var(--s-3); }
.library-shelf__big-rating small { color: var(--muted); font-size: .8rem; font-weight: 600; }
.library-shelf__big-rating b { font: 400 2.6rem/1 var(--font-display); color: var(--c-you); }
.library-shelf__big-rating.is-max b { color: var(--c-win); }

/* Minha lista: carrossel de capas com o botão de registrar embaixo. */
.library-list { --carousel-item: 128px; margin-top: var(--s-3); }
.library-list__item { display: grid; gap: 4px; }
.library-list__item .button { justify-self: start; margin-top: var(--s-1); }
.library-shelf__lead .cover-tile__title { display: block; -webkit-line-clamp: unset; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }

/* Estante: todas as células com a mesma altura. Capa sempre 2:3, título em até 2 linhas
   com altura reservada, data numa linha. */
.library-shelf > .cover-tile:not(.library-shelf__lead) { display: grid; grid-template-rows: auto auto auto; align-content: start; }
.library-shelf > .cover-tile:not(.library-shelf__lead) .library-shelf__art { aspect-ratio: 2 / 3; width: 100%; }
.library-shelf__art > .cover, .library-shelf__art > img, .library-shelf__art > .media-cover, .library-shelf__art > .pattern-poster {
  width: 100% !important; height: 100% !important; aspect-ratio: auto; object-fit: cover; display: block;
}
.library-shelf > .cover-tile:not(.library-shelf__lead) .cover-tile__title:not(.visually-hidden) {
  display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; margin-top: var(--s-1);
}
.library-shelf > .cover-tile:not(.library-shelf__lead) .cover-tile__meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.library-shelf > .cover-tile:not(.library-shelf__lead) .library-shelf__copy { display: grid; gap: 2px; }
/* Faixa da estante com estrelas no lugar de "nota X" (exibição; o seletor continua a onda). */
.library-shelf__rating::before { content: none; }
.library-shelf__rating .stars__value { display: none; }
.library-shelf__rating .stars__glyphs { font-size: .95rem; letter-spacing: 1px;
  background: linear-gradient(90deg, var(--c-you) calc(var(--rating) / 5 * 100%), var(--line-strong) 0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.library-shelf__rating.is-max .stars__glyphs { background: var(--c-win); -webkit-background-clip: text; background-clip: text; }
/* Todas as capas da estante em 2:3, inclusive a do destaque (sem isso a capa do destaque colapsava). */
.library-shelf__art { aspect-ratio: 2 / 3; }
.library-shelf__lead .library-shelf__art { width: 132px; }
/* Destaque: estrelas grandes, com o número ao lado. */
.library-shelf__big-rating { align-items: center; }
.library-shelf__big-rating .stars__glyphs { font-size: 1.5rem; letter-spacing: 2px;
  background: linear-gradient(90deg, var(--c-you) calc(var(--rating) / 5 * 100%), var(--line-strong) 0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.library-shelf__big-rating .stars__value { color: var(--c-you); font: 400 1.3rem/1 var(--font-display); }
.library-shelf__big-rating.is-max .stars__glyphs { background: var(--c-win); -webkit-background-clip: text; background-clip: text; }
.library-shelf__big-rating.is-max .stars__value { color: var(--c-win); }
.library-shelf__big-rating { flex-wrap: wrap; gap: 2px var(--s-2); } .library-shelf__big-rating small { flex-basis: 100%; } .library-shelf__big-rating .stars__glyphs { font-size: 1.35rem; }
/* Canhoto da estante: data à esquerda, estrelas à direita. Embaixo da capa só o título. */
.library-shelf__rating { justify-content: space-between; padding: 0 8px; }
.library-shelf__rating time { color: var(--muted); font: 600 .68rem/1 var(--font-body); white-space: nowrap; }
.library-shelf__rating .stars__glyphs { font-size: .78rem; letter-spacing: 0; }
/* Obra com vários episódios ou sessões: a contagem toma o lugar das estrelas (dado, Mint). */
.library-shelf__count { color: var(--c-data); font: 700 .7rem/1 var(--font-body); white-space: nowrap; }
.library-shelf__rating:not(:has(.stars)) { justify-content: center; }
/* Cabeçalho de seção com legenda curta colada ao título. */
.library-section__head { align-items: flex-start; }
.library-section__sub { margin: 4px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.35; }
.library-section__head + .chip-row { margin-top: var(--s-3); }
.cover-tile__meta { color: var(--muted); }

/* Encaixe dos raios nos cards que recebem capa no canto (ver "Raios encaixados" em ui.css). */
.feed-pick > .cover, .feed-pick > .media-cover { --cover-radius: calc(var(--radius-xl) - var(--s-3)); }
.current-reading > .cover, .current-reading > .media-cover { --cover-radius: calc(var(--radius-xl) - var(--s-4)); }
.register-hero > .cover, .register-hero > .media-cover, .register-hero > img { --cover-radius: calc(var(--radius-xl) - var(--s-4)); border-radius: var(--cover-radius); }
.group-section .pick-card > .cover, .group-section .pick-card > .media-cover { --cover-radius: calc(var(--radius-xl) - var(--s-4)); }
.library-shelf__lead .library-shelf__art { border-radius: calc(var(--radius-xl) - var(--s-4)); }
.library-shelf__art > .cover, .library-shelf__art > .media-cover, .library-shelf__art > .pattern-poster { --cover-radius: 0px; }
.library-shelf > .cover-tile:not(.library-shelf__lead) .library-shelf__art { border-radius: var(--r-sm); }
/* O ingresso dentro da estante herda o raio da moldura que recorta a capa. */
.library-shelf__art .poster-ticket { border-radius: max(1.5px, calc(var(--r-md) - 6cqi)); }
.library-shelf__lead .library-shelf__art .poster-ticket { border-radius: max(1.5px, calc(var(--radius-xl) - var(--s-4) - 6cqi)); }
.pick-hero.backdrop { --hero-pad: var(--s-5); padding: var(--hero-pad); }
@media (min-width: 800px) { .pick-hero.backdrop { --hero-pad: var(--s-6); } }
/* Barra de quem já registrou: sobre o Lagoon, o preenchimento teal sumia. Trilho escuro e preenchimento Mint (progresso). */
.pick-hero .progress-bar { background: color-mix(in srgb, var(--bg) 45%, transparent); }
.pick-hero .progress-bar > span { background: var(--c-data); }
/* A capa não encosta no canto do card (recuo > raio), então usa o raio padrão das capas. Sobre o Lagoon,
   o contorno creme some em pôsteres claros: aqui ele é escuro translúcido. */
.pick-hero > .cover, .pick-hero > .media-cover { --cover-radius: var(--r-sm); --cover-edge: color-mix(in srgb, var(--bg) 45%, transparent); border-radius: var(--cover-radius); }
/* Capa na primeira/última linha de uma lista arredondada encosta no canto da lista. */
.list > .list-row:first-child > .cover:first-child, .list > .list-row:last-child > .cover:first-child,
.list > .list-row:first-child > .media-cover:first-child, .list > .list-row:last-child > .media-cover:first-child { --cover-radius: calc(var(--radius-xl) - var(--s-4)); }

/* Raios encaixados na busca. */
.search-results .search-result__placeholder, .search-results .cover { --cover-radius: 4px; border-radius: var(--cover-radius); }
.segmented--media-search .segmented__indicator { border-radius: var(--r-control); }
.feed-goal { position: relative; }

/* ---------- Início ----------
   Um título grande, a posição numa faixa coral baixa, "Agora" numa lista só e o
   feed: registros em card grande, eventos do grupo em linhas compactas (sozinho,
   um mini-card; seguidos, um card "No grupo"). */
.home-hello { margin-top: var(--s-2); }

.home-standing { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: var(--s-4);
  margin-top: var(--s-5); padding: var(--s-4); border-radius: var(--radius-xl); background: var(--c-you); color: var(--on-color); text-decoration: none; }
.home-standing__n { font: 400 3.2rem/.9 var(--font-display); }
.home-standing__body { display: grid; gap: 2px; min-width: 0; }
.home-standing__pts { font-size: 1.05rem; font-weight: 700; }
.home-standing small { font-size: .82rem; font-weight: 500; }
.home-standing .standing-track { margin: var(--s-2) 6px 0; }
.home-standing .list-row__chevron, .home-standing > .ui-icon { color: var(--on-color); }

.home-now, .home-feed { margin-top: var(--s-6); }
.home-now .section-title, .home-feed .section-title { margin-bottom: var(--s-3); }
.home-now .section-title h2, .home-feed .section-title h2 { font-size: 1.4rem; }
/* Feed separado do que vem acima por uma linha. Título e link centralizados pela altura das
   maiúsculas (text-box), não pela caixa da fonte: o Anton tem folga desigual em cima e embaixo. */
.home-feed { padding-top: var(--s-5); border-top: 1px solid var(--line); }
.home-feed .section-title h2 { text-box: trim-both cap alphabetic; }
.home-feed .section-title a { display: block; min-height: 0; padding-block: 10px; text-box: trim-both cap alphabetic; }
.home-now__list { display: grid; padding: 0 var(--s-4); border-radius: var(--radius-xl); background: var(--surface-1); }
.now-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; align-items: center; column-gap: var(--s-3);
  min-height: 64px; padding: var(--s-3) 0; color: var(--text); text-decoration: none; }
.now-row + .now-row { border-top: 1px solid var(--line); }
.now-row .cover { width: 40px; margin: 0; --cover-radius: 4px; border-radius: var(--cover-radius); }
.now-row__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-control); background: var(--surface-2); }
.now-row__icon .doodle { width: 22px; height: 22px; color: var(--c-structure); }
.now-row--goal .now-row__icon .doodle, .now-row--empty .now-row__icon .doodle { color: var(--c-win); }
.now-row--pick .now-row__icon .doodle { color: var(--c-you); }
.now-row__body { display: grid; gap: 2px; min-width: 0; color: inherit; text-decoration: none; }
.now-row__meta { color: var(--muted); font-size: .78rem; font-weight: 600; }
.now-row__meta--data { color: var(--c-data); }
.now-row__title { font-size: 1rem; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.now-row .progress-bar { height: 6px; margin-top: var(--s-1); }
.now-row__value { color: var(--muted); font-size: .78rem; text-align: right; line-height: 1.2; }
.now-row__value b { display: block; color: var(--c-data); font-size: 1rem; }
.now-row--goal .now-row__value b { display: inline; color: var(--c-win); font: 400 1.4rem var(--font-display); }
.now-row .current-reading__actions { display: flex; grid-column: 3 / -1; }
.now-row.current-reading { gap: 0; padding: var(--s-3) 0; border-radius: 0; background: transparent; flex-wrap: nowrap; }
.now-row.feed-goal, .now-row.feed-pick { min-height: 64px; padding: var(--s-3) 0; border: 0; border-radius: 0; background: transparent; }
.now-row .list-row__chevron { color: var(--text-subtle); }
/* Só linhas que são links mudam no hover; obra em andamento (div, ações no "+") fica parada. */
a.now-row:hover .now-row__title { color: var(--c-data); }

/* Feed: cards de registro. */
.feed-list { display: grid; gap: var(--s-3); margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.feed-list > * + * { margin-top: 0; border-top: 0; }
.feed-list > .activity-card, .feed-list > .group-event-card, .feed-list > article {
  padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface-1); box-shadow: none; }
.feed-list .activity-card { grid-template-columns: 76px minmax(0, 1fr); }
.feed-list .activity-card__media > .cover, .feed-list .activity-card__media > .media-cover { width: 76px; --cover-radius: 6px; }
.feed-list .activity-card__top > :first-child { left: calc(var(--s-3) + 54px); top: calc(var(--s-3) + 96px); }
.feed-list .activity-card__media h3 { font-size: 1.5rem; }
.feed-list .activity-card__rank { padding: 0 !important; border-radius: 0; background: none !important; color: var(--text) !important; font-weight: 700; }
.feed-list .activity-card__who small { display: flex; flex-wrap: wrap; gap: 0 var(--s-2); align-items: baseline; }
.feed-list .activity-card > turbo-frame { display: block; grid-column: 1 / -1; margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--line); }
.feed-list .activity-card > turbo-frame .engagement { margin-top: 0; padding-top: 0; }
.feed-list .engagement__button, .feed-list .engagement__count { border-radius: 10px; }
.feed-list > .bite-nudge, .feed-list > [id^="bite-nudge"] { margin: 0; }

/* Comentários abertos: o botão fica em Lagoon (estrutura), como uma aba selecionada. */
.feed-list .engagement__count[aria-expanded="true"] { background: color-mix(in srgb, var(--c-structure) 26%, transparent); color: var(--text); }
.feed-list .engagement__count[aria-expanded="true"] .ui-icon { color: var(--c-structure); }

/* Detalhe do registro: o mesmo card do feed, numa coluna só. A capa e o título já estão no
   topo da tela, então saem daqui; nota e comentário ganham mais espaço, e a lista de
   comentários não tem altura máxima (a página rola). */
.feed-list--detail .activity-card { grid-template-columns: minmax(0, 1fr); padding: var(--s-5); }
.feed-list--detail .activity-card > *, .feed-list--detail .activity-card__media > div { grid-column: 1; }
.feed-list--detail .activity-card__top > :first-child { position: static; }
.feed-list--detail .activity-card__top .mini-avatar { width: 40px; height: 40px; box-shadow: none; }
.feed-list--detail .activity-card__media > .cover, .feed-list--detail .activity-card__media > .media-cover, .feed-list--detail .activity-card__media h3 { display: none; }
.feed-list--detail .activity-card__media > div { padding-top: 0; }
.feed-list--detail .activity-card__body { margin-top: var(--s-4); font-size: 1.05rem; line-height: 1.5; }
.feed-list--detail .comments { max-height: none; overflow: visible; }

/* Feed: eventos do grupo. Mesmo fundo dos cards, sem contorno, mais baixos. */
.feed-event, .feed-digest { border-radius: var(--r-lg); background: var(--surface-1); }
.feed-event { padding: 0 var(--s-4); }
.feed-digest { padding: var(--s-1) var(--s-4); }
.feed-digest__label { margin: var(--s-2) 0 0; color: var(--text-subtle); font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.event-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; column-gap: var(--s-3);
  min-height: 48px; padding: var(--s-2) 0; color: var(--text); font-size: .88rem; line-height: 1.3; text-decoration: none; }
.feed-digest .event-row + .event-row { border-top: 1px solid var(--line); }
.event-row__icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-control-sm); background: var(--surface-2); }
.event-row__icon :is(.doodle, .ui-icon) { width: 16px; height: 16px; }
.event-row__icon--structure { color: var(--c-structure); }
.event-row__icon--data { color: var(--c-data); }
.event-row__icon--win { color: var(--c-win); }
.event-row__cover .cover { width: 28px; margin: 0; --cover-radius: 3px; border-radius: var(--cover-radius); }
.event-row__cover .poster-ticket { display: none; }
.event-row__text { min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.event-row__text b, .event-row__text strong { font-weight: 700; }
.event-row__time { color: var(--text-subtle); font-size: .75rem; white-space: nowrap; }
a.event-row:hover .event-row__text { color: var(--c-data); }

.home-retro { margin-top: var(--s-6); }

/* Neutraliza estilos antigos de .feed-goal, .feed-moment, .feed-awards e
   .social-feed-event dentro das linhas novas da Início. */
.home-now__list > .now-row { margin: 0; padding: var(--s-3) 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; column-gap: var(--s-3); row-gap: 0; }
.home-now__list > .now-row + .now-row { border-top: 1px solid var(--line); }
.home-now__list .now-row__icon .doodle { display: block; }
.home-now__list .feed-goal__category { display: inline; margin: 0; font: inherit; color: inherit; }
.home-now__list .now-row__title.feed-goal__title { font: 700 1rem/1.25 var(--font-body); text-transform: none; }
.home-now__list .now-row .progress-bar { display: block; width: 100%; }

.event-row.event-row { margin: 0; padding: var(--s-2) 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
  display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 0 var(--s-3); color: var(--text); font-size: .88rem; line-height: 1.3; text-align: left; }
.feed-digest .event-row.event-row + .event-row { border-top: 1px solid var(--line); }
.event-row.event-row::before, .event-row.event-row::after { content: none; }
.event-row.event-row:hover { background: transparent; }
.event-row .feed-moment__text { font: inherit; text-transform: none; }
.event-row__icon .doodle, .event-row__icon .ui-icon { display: block; }
/* Em andamento: as ações ficam numa linha abaixo do título, alinhadas ao texto,
   para caber "Registrar sessão" e "Terminei" sem apertar o nome da obra. */
.home-now__list > .now-row.current-reading { grid-template-columns: 40px minmax(0, 1fr); align-items: start; }
.home-now__list > .now-row.current-reading > .cover { grid-row: 1 / span 2; }
.home-now__list .now-row .current-reading__actions { grid-column: 2; grid-row: 2; display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-2); width: auto; }
.home-now__list .now-row .current-reading__actions .button { flex: 0 0 auto; gap: 6px; }
.home-now__list .now-row .current-reading__actions .ui-icon { width: 16px; height: 16px; }
/* Em andamento: um "+" redondo, igual para livro e jogo, abre as ações da obra. */
.home-now__list > .now-row.current-reading { grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; }
.home-now__list > .now-row.current-reading > .cover { grid-row: auto; }
.home-now__list .now-row .current-reading__actions { grid-column: 3; grid-row: auto; margin: 0; }
.home-now__list .round .ui-icon { width: 20px; height: 20px; }
/* Ações da obra em andamento: ícones da barra (ui_icon), cada um com a cor do que faz. */
.now-sheet .list-row__lead { width: 40px; height: 40px; background: none; }
.now-sheet .list-row .list-row__lead .ui-icon { width: 26px; height: 26px; stroke-width: 2; color: var(--c-data); transition: transform var(--t-press) ease; }
.now-sheet .now-sheet__session .list-row__lead .ui-icon { color: var(--c-you); }
.now-sheet .now-sheet__finish .list-row__lead .ui-icon { color: var(--c-win); }
.now-sheet .list-row--danger .list-row__lead .ui-icon { color: var(--danger); }
.now-sheet .list-row:hover .list-row__lead .ui-icon, .now-sheet .list-row:focus-visible .list-row__lead .ui-icon { transform: scale(1.1); }
@media (prefers-reduced-motion: reduce) { .now-sheet .list-row__lead .ui-icon { transition: none; } .now-sheet .list-row:hover .ui-icon { transform: none; } }
.home-now__list .round.round--solid .ui-icon { width: 22px; height: 22px; stroke-width: 2.4; }
/* Estante: "Em andamento" usa a mesma lista da Início, com o "+" de ações. */
.library-progress.home-now__list { display: grid; gap: 0; overflow: visible; }
.home-now__list--solo { margin-top: var(--s-5); }

/* ---------- Estatísticas ----------
   Placar igual ao da Biblioteca, sequências numa superfície dividida e notas,
   gêneros e ritmo em painéis com barras finas de dado (mint). */
.personal-stats { gap: var(--s-5); }
.personal-stats .profile-section { margin: 0; }
.personal-stats .section-title { margin-bottom: var(--s-3); }
.personal-stats .section-title h2 { font-size: 1.4rem; }
.stats-board { margin: 0; }
.stats-board .library-board__item dt { text-transform: lowercase; }
.stats-board .library-board__item.is-lead dt { text-transform: none; }

.stats-streaks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: var(--radius-xl); background: var(--surface-1); }
.stats-streaks > div { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 6px; padding: var(--s-4); }
.stats-streaks > div + div { border-left: 1px solid var(--line); }
.stats-streaks strong { font: 400 2.6rem/1 var(--font-display); color: var(--c-you); }
.stats-streaks span { color: var(--muted); font-size: .85rem; font-weight: 600; }
.stats-streaks small { grid-column: 1 / -1; margin-top: var(--s-1); color: var(--text); font-size: .85rem; font-weight: 600; }

.stats-panel { padding: var(--s-4); border-radius: var(--radius-xl); background: var(--surface-1); }
.stats-panel__lead { display: flex; align-items: baseline; gap: var(--s-3); padding-bottom: var(--s-3); margin-bottom: var(--s-3); border-bottom: 1px solid var(--line); }
.stats-panel__lead strong { font: 400 3rem/1 var(--font-display); color: var(--c-you); }
.stats-panel__lead span { color: var(--muted); font-size: .9rem; font-weight: 600; }
.stats-panel__empty { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.4; }
.stats-bars { display: grid; gap: var(--s-3); margin: 0; padding: 0; list-style: none; }
.stats-bars li { display: grid; grid-template-columns: minmax(72px, 30%) minmax(0, 1fr) 36px; align-items: center; column-gap: var(--s-3); font-size: .88rem; }
.stats-bars li > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-bars b { text-align: right; font-weight: 700; }
.stats-bars__track { display: block; height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.stats-bars__track i { display: block; width: var(--w); height: 100%; border-radius: 6px; background: var(--c-data); transform-origin: left; animation: stats-grow var(--t-data) var(--ease) both; }
@keyframes stats-grow { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .stats-bars__track i { animation: none; } }
.personal-stats .stats-panel .rhythm-chart { margin-top: var(--s-3); }
.personal-stats .surface-list .list-row small { font-size: .78rem; }

/* Saudação e sequência: chip alinhado ao "Oi", número em destaque e espaços
   garantidos por gap (não por espaço de texto, que a fonte aperta). */
.home-hello__greet { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); font-size: .9rem; }
.streak-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; margin: 0; padding: 0 12px 0 8px; border-radius: var(--r-control);
  background: var(--surface-2); color: var(--muted); font-size: .8rem; font-weight: 600; line-height: 1; }
.streak-chip__icon { flex: none; width: 16px; height: 16px; color: var(--c-you); }
.streak-chip b { color: var(--c-you); font: 400 1rem/1 var(--font-display); letter-spacing: .01em; }
.home-hello .screen-title { margin-top: var(--s-3); }
.streak-chip > span { word-spacing: .08em; }

/* Topo das Estatísticas mais alto: o "Voltar" encosta no título e o texto de
   apoio fica menor, para o placar aparecer logo na primeira tela. */
.personal-stats { gap: var(--s-4); }
.personal-stats > .back-link { margin: calc(var(--s-2) * -1) 0 calc(var(--s-4) * -1); justify-self: start; }
.personal-stats__head h1 { margin: 0; }
.personal-stats__head p { margin: var(--s-2) 0 0; font-size: .85rem; line-height: 1.4; max-width: 42ch; }
.personal-stats__head .share-actions { margin-top: var(--s-3); }
.personal-stats__head .share-actions .button { min-height: 40px; padding-block: 0; font-size: .88rem; }

/* Título de seção e link na mesma linha, centralizados um no outro: o Anton
   tem caixa alta sem descendentes e o link é texto corrido, então a linha de
   base deixava o link mais baixo. */
.section-title { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.section-title h2, .section-title h3 { line-height: 1; }
.section-title a { display: inline-flex; align-items: center; min-height: 32px; line-height: 1; }
/* Cabeçalho com subtítulo (Minha lista): o link acompanha a linha do título. */
.section-title.library-section__head { align-items: flex-start; }
.section-title.library-section__head > a { min-height: 0; height: 1.4rem; }
.section-title.library-section__head > a { align-self: flex-start; margin: 0; padding-block: 0; }

/* Início com respiros menores: a posição encosta mais na saudação e as
   seções ficam a 24px uma da outra (a margem antes somava duas vezes). */
.page-home .feed-context { margin: var(--s-4) 0 0; }
.page-home .home-standing { margin-top: 0; }
.page-home .home-now, .page-home .home-feed { margin-top: var(--s-5); }
.page-home .home-hello { margin-top: var(--s-2); }
/* A margem de 32px do .section-title vazava pela seção (margin collapse). */
.page-home .home-now > .section-title, .page-home .home-feed > .section-title { margin-top: 0; }
/* Sequência sem ícone: o número é o próprio selo (círculo coral), legível em
   qualquer tamanho; o texto ao lado diz o que ele conta. */
.streak-chip { gap: 8px; height: 28px; padding: 0 12px 0 3px; }
.streak-chip b { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-control-sm);
  background: var(--c-you); color: var(--on-color); font: 400 .95rem/1 var(--font-display); }
.streak-chip > span { color: var(--text); font-size: .8rem; font-weight: 600; }
/* Sequência logo abaixo da pergunta, como resposta a ela. */
.home-hello__streak { margin: var(--s-3) 0 0; }
.home-hello .screen-title { margin-top: var(--s-1); }
/* Sequência na mesma linha do título, logo depois do "hoje?", centrada na
   altura das maiúsculas. Quebra inteira para a linha de baixo se não couber. */
.home-hello .screen-title .streak-chip { display: inline-flex; vertical-align: .32em; margin-left: var(--s-2);
  font-family: var(--font-body); text-transform: none; letter-spacing: 0; white-space: nowrap; }
/* Título um pouco menor e selo curto ("5 dias") para caber depois do "hoje?". */
.page-home .home-hello .screen-title { font-size: clamp(2.1rem, 9.4vw, 2.7rem); }
.home-hello .screen-title .streak-chip { height: 30px; padding: 0 10px 0 4px; gap: 6px; }
.home-hello .screen-title .streak-chip > span { font-size: .85rem; }
/* Número do selo em Instrument Sans: o Anton tem métricas verticais
   desiguais e fica fora do centro num círculo de 22px. */
.streak-chip b { font: 800 .8rem/1 var(--font-body); font-variant-numeric: tabular-nums; letter-spacing: 0; }

/* Sequência como continuação do título: mesmo Anton, em coral e menor.
   Por ser a mesma fonte, sobe o bastante para o meio da maiúscula dela
   coincidir com o meio da maiúscula do título (conta em em, sem depender do
   motor do navegador). Não quebra no meio; desce inteira se não couber. */
.home-hello .screen-title .title-streak { display: inline-block; margin-left: .12em; color: var(--c-you); font-size: .42em;
  letter-spacing: .02em; white-space: nowrap; vertical-align: .62em; }
/* Sequência como carimbo: faixa coral sólida, Anton escuro, levemente
   inclinada, como o selo de um ingresso. O padding desigual compensa as
   métricas do Anton (o desenho da maiúscula fica acima do centro da caixa). */
.home-hello .screen-title .title-streak { padding: .2em .42em .1em; border-radius: 6px; background: var(--c-you); color: var(--on-color);
  transform: rotate(-4deg); transform-origin: left center; margin-left: .2em; }
@media (prefers-reduced-motion: no-preference) {
  .home-hello .screen-title .title-streak { animation: stamp-in var(--t-state) var(--ease-spring) both; animation-delay: 120ms; }
}
@keyframes stamp-in { from { transform: rotate(-12deg) scale(1.25); opacity: 0; } }
/* Gira em torno do próprio centro, para o centro do carimbo continuar no meio da maiúscula. */
.home-hello .screen-title .title-streak { transform-origin: center; }
/* A cor do carimbo acompanha a sequência: começo (1 a 2 dias) em superfície,
   pegando fogo (3 a 6) em coral, uma semana ou mais em lime, que é conquista. */
.home-hello .screen-title .title-streak--start { background: var(--surface-3); color: var(--text); }
.home-hello .screen-title .title-streak--hot { background: var(--c-you); color: var(--on-color); }
.home-hello .screen-title .title-streak--win { background: var(--c-win); color: var(--on-color); }
/* Carimbo com mais presença: maior, número grande e picote tracejado por dentro. */
.home-hello .screen-title .title-streak { position: relative; font-size: .5em; padding: .26em .5em .14em; border-radius: 7px; transform: rotate(-5deg); }
.home-hello .screen-title .title-streak b { font-size: 1.45em; font-weight: 400; margin-right: .08em; }
.home-hello .screen-title .title-streak::after { content: ""; position: absolute; inset: 3px; border: 1.5px dashed currentColor; border-radius: 4px; opacity: .45; pointer-events: none; }
@keyframes stamp-in { from { transform: rotate(-14deg) scale(1.3); opacity: 0; } }
.home-hello .screen-title .title-streak { vertical-align: .18em; }
.home-hello .screen-title .title-streak { vertical-align: .1em; }
/* Mais folga: inclinação menor (o canto direito não encosta na linha de cima),
   número menos desproporcional e o picote longe das letras. */
.home-hello .screen-title .title-streak { font-size: .44em; padding: .38em .7em .26em; transform: rotate(-3deg); }
.home-hello .screen-title .title-streak b { font-size: 1.25em; }
.home-hello .screen-title .title-streak::after { inset: 4px; }
.home-hello .screen-title .title-streak { vertical-align: .38em; }
/* A cor vai esquentando dia a dia: do Lagoon (1 dia) ao coral (4 dias) e ao
   lime (7 dias ou mais). É uma escala de dado, não enfeite. */
.home-hello .screen-title .title-streak {
  background: color-mix(in oklab, var(--c-structure), var(--c-you) min(calc(var(--heat) * 2), 100%));
  color: var(--on-color);
}
.home-hello .screen-title .title-streak:is(.title-streak--hot, .title-streak--win) {
  background: color-mix(in oklab, var(--c-you), var(--c-win) max(calc((var(--heat) - 50%) * 2), 0%));
}
/* Lagoon e coral misturados viram cinza; o começo fica em Lagoon puro e a
   escala esquenta só do coral (3 dias) ao lime (7). */
.home-hello .screen-title .title-streak--start { background: var(--c-structure); color: var(--on-color); }
/* Texto no meio do carimbo, longe do picote: número e "dias seguidos" na mesma
   linha de base, line-height 1 para não sobrar entrelinha embaixo, e mais folga
   entre as letras e o tracejado. */
.home-hello .screen-title .title-streak { display: inline-flex; align-items: baseline; gap: .22em; line-height: 1;
  padding: .5em .8em .42em; }
.home-hello .screen-title .title-streak b { margin-right: 0; line-height: 1; }
.home-hello .screen-title .title-streak::after { inset: 4px; }

/* ---------- Mordida ao publicar (activities/_bite, bite_controller) ----------
   Duas mandíbulas Coral com dentes em zigue-zague: fecham sobre o formulário ao publicar e abrem
   revelando o registro. Exceção pedida ao teto de 360ms: é o momento de comemorar (~2,5s com a
   pausa; o toque abre na hora). Dentes são recorte (mask), não desenho; sem sombra nem brilho. */
/* view-transition-name: sem ele, cabeçalho e barra (que têm nome) passam por cima durante a troca de tela. */
/* 100vw centralizado: o html reserva a calha da barra de rolagem dos dois lados (scrollbar-gutter), e inset: 0 deixava faixas nas laterais. */
.bite { --tooth-w: 44px; --tooth-h: 26px; position: fixed; top: 0; bottom: 0; left: 50%; width: 100vw; margin-left: -50vw; z-index: 1000; overflow: hidden; cursor: pointer; view-transition-name: bite; }
.bite.is-opening { pointer-events: none; }
/* Fechada, as mandíbulas param a 3px uma da outra sobre o fundo escuro: a fresta vira uma linha
   em zigue-zague no centro, os dentes se tocando (e some o fio de antialiasing que aparecia ali). */
.bite.is-closed:not(.is-opening) { background: var(--bg); }
/* No desktop o html reserva a calha da barra de rolagem dos dois lados, e nada fixo pinta ali.
   Enquanto a mordida existe, a página não rola e a calha some: a boca cobre a tela inteira, e a do
   formulário e a do registro ficam com a mesma largura (sem pulo na troca de tela). */
html:has(.bite) { overflow: hidden; scrollbar-gutter: auto; }
/* A boca do formulário e a do registro são elementos diferentes com o mesmo nome de transição:
   troca seca, sem o navegador animar uma até a outra. */
::view-transition-group(bite), ::view-transition-old(bite), ::view-transition-new(bite) { animation: none; }
::view-transition-old(bite) { display: none; }
.bite__jaw { position: absolute; left: 0; right: 0; height: calc(50% + var(--tooth-h) / 2 - 1.5px); background: var(--c-you); color: var(--on-accent); }
.bite__jaw--top { top: 0;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth-h)) no-repeat,
    conic-gradient(from -40deg at 50% 100%, #000 80deg, #0000 0) bottom / var(--tooth-w) var(--tooth-h) repeat-x;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth-h)) no-repeat,
    conic-gradient(from -40deg at 50% 100%, #000 80deg, #0000 0) bottom / var(--tooth-w) var(--tooth-h) repeat-x; }
/* Dentes de baixo: o recorte exatamente complementar ao de cima, então encaixam sem vão. */
.bite__jaw--bottom { bottom: 0;
  -webkit-mask: linear-gradient(#000 0 0) bottom / 100% calc(100% - var(--tooth-h)) no-repeat,
    conic-gradient(from -40deg at 50% 100%, #0000 80deg, #000 0) top / var(--tooth-w) var(--tooth-h) repeat-x;
  mask: linear-gradient(#000 0 0) bottom / 100% calc(100% - var(--tooth-h)) no-repeat,
    conic-gradient(from -40deg at 50% 100%, #0000 80deg, #000 0) top / var(--tooth-w) var(--tooth-h) repeat-x; }
.bite__face { position: absolute; left: 0; right: 0; display: grid; gap: var(--s-2); padding: 0 var(--s-5); text-align: center; justify-items: center; }
.bite__jaw--top .bite__face { bottom: calc(var(--tooth-h) + var(--s-6)); }
.bite__jaw--bottom .bite__face { top: calc(var(--tooth-h) + var(--s-6)); }
.bite p { margin: 0; }
.bite__label { font: 700 .8rem/1.2 var(--font-body); letter-spacing: .08em; text-transform: uppercase; }
.bite__title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
  font: 400 clamp(2.4rem, 11vw, 4rem)/.95 var(--font-display); text-transform: uppercase; overflow-wrap: anywhere; }
.bite__stamp { font: 400 clamp(2rem, 9vw, 3rem)/1 var(--font-display); text-transform: uppercase; animation: bite-stamp 300ms 200ms var(--ease) both; }
.bite__rating { display: flex; align-items: baseline; gap: var(--s-2); font: 400 1.6rem/1 var(--font-display); }
.bite__rating small { font: 700 .75rem/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; }
.bite__mascot { width: 64px; height: 64px; object-fit: contain; }
@keyframes bite-stamp { from { opacity: 0; transform: scale(1.6) rotate(-8deg); } }
@media (prefers-reduced-motion: reduce) { .bite { display: none; } }

/* Editar o que achou (sheet do card): campo e botão empilhados. */
.review-form { display: grid; gap: var(--s-3); }
.review-form__field { width: 100%; min-height: 8rem; resize: vertical; }

/* Detalhe do registro: episódios e sessões que a estante junta num card. */
.media-history { margin-top: var(--s-6); }
.media-history .section-title { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.media-history__total { color: var(--c-data); font-weight: 700; font-size: .9rem; white-space: nowrap; }
.media-history__list { margin: var(--s-3) 0 0; padding: 0; list-style: none; }
.media-history__list .list-row__title { overflow-wrap: anywhere; }
.media-history__more { margin-top: var(--s-3); font-size: .85rem; }

/* Contorno das capas: separa capas escuras do fundo sem sombra. outline com offset negativo funciona
   em <img> e segue o border-radius. Na estante a capa é recortada pelo quadro, que desenha o contorno. */
:root { --cover-edge: color-mix(in srgb, var(--text) 25%, transparent); --cover-edge-w: 1px; }
.cover, .media-cover, .pattern-poster { outline: var(--cover-edge-w) solid var(--cover-edge); outline-offset: calc(-1 * var(--cover-edge-w)); }
.library-shelf__art > .cover, .library-shelf__art > .media-cover, .library-shelf__art > .pattern-poster, .library-shelf__art > img { outline: none; }
.library-shelf__lead .library-shelf__art::after { content: ""; position: absolute; inset: 0; border: var(--cover-edge-w) solid var(--cover-edge); border-radius: inherit; pointer-events: none; }

/* Pesquisa do beta */
.page-beta_surveys .app-main { padding-bottom: 0; }
.beta-survey { margin-bottom: 0; padding-bottom: 0; }
.beta-survey__title + .beta-survey__options { padding-top: 4px; }
.beta-survey__eyebrow { margin: 0 0 8px; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--c-data); }
.beta-survey h1 { margin-bottom: 12px; }
.form-page > p.beta-survey__lead { margin-bottom: 24px; }
.beta-survey__card { background: var(--surface-1); border-radius: var(--radius-xl); }
.beta-survey__question { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; margin: 0; padding: 20px 20px 22px 16px; border: 0; border-top: 1px solid var(--line); min-width: 0; }
.beta-survey__question:first-child { border-top: 0; }
.beta-survey__number { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; color: var(--c-data); padding-top: 2px; }
.beta-survey__body { min-width: 0; }
.beta-survey__title { float: left; width: 100%; padding: 0; font-size: 1rem; font-weight: 700; line-height: 1.35; color: var(--text); }
.beta-survey__hint { clear: both; margin: 0; padding-top: 4px; font-size: .8rem; color: var(--text-subtle); }
.beta-survey__options { clear: both; margin-top: 14px; }
.beta-survey__options--chips { display: flex; flex-wrap: wrap; gap: 8px; }
.beta-survey__options--split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.beta-survey__options--split .chip { justify-content: center; }
.beta-survey__options--rows { display: grid; gap: 6px; }
.beta-survey__row {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 14px;
  border-radius: var(--r-control); background: var(--surface-2); color: var(--text);
  font-size: .92rem; font-weight: 600; line-height: 1.3; cursor: pointer;
  transition: background var(--t-state) ease;
}
.beta-survey__row:hover { background: var(--surface-3); }
.beta-survey__mark { flex: none; width: 18px; height: 18px; border: 2px solid var(--line-strong); border-radius: 5px; transition: background var(--t-state) ease, border-color var(--t-state) ease; }
.beta-survey__mark--radio { border-radius: 50%; }
input:checked + .beta-survey__row { background: var(--surface-selected); }
input:checked + .beta-survey__row .beta-survey__mark { border-color: var(--c-you); background: var(--c-you); box-shadow: inset 0 0 0 3px var(--surface-selected); }
.chip-input:focus-visible + .beta-survey__row { outline: 3px solid var(--orange); outline-offset: 2px; }
.beta-survey__other { display: none; margin-top: 10px; }
.beta-survey__question:has([data-other]:checked) .beta-survey__other { display: block; }
.beta-survey__submit { padding: 20px 0 8px; }
.beta-survey__later { display: grid; gap: var(--s-2); padding-bottom: 8px; text-align: center; }
.beta-survey__later .field-hint { margin: 0; }
.beta-survey__form { display: grid; gap: 0; }
@media (prefers-reduced-motion: reduce) { .beta-survey__row, .beta-survey__mark { transition: none; } }

/* Admin: pesquisa do beta */
.survey-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-bottom: 36px; }
.survey-summary__card { padding: 20px; background: var(--paper); border-radius: var(--radius-xl); }
.survey-summary__card h2 { margin: 0 0 14px; font-size: 1rem; }
.survey-summary__list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.survey-summary__row { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-size: .9rem; }
.survey-summary__count { flex: none; color: var(--c-data); font-variant-numeric: tabular-nums; font-weight: 700; }
.survey-summary__others { margin: 14px 0 0; font-size: .85rem; color: var(--text-subtle); }
.survey-responses__title { margin: 0 0 12px; }
.survey-responses th { white-space: nowrap; overflow-wrap: normal; }
.survey-responses td { vertical-align: top; white-space: normal; overflow-wrap: normal; }
.admin-table.survey-responses { width: 100%; max-width: 100%; table-layout: fixed; }
.survey-responses th:nth-child(1) { width: 13%; } .survey-responses th:nth-child(2) { width: 17%; }
.survey-responses th:nth-child(3) { width: 12%; } .survey-responses th:nth-child(4) { width: 15%; }
.survey-responses th:nth-child(5) { width: 25%; } .survey-responses th:nth-child(6) { width: 8%; }
.survey-responses th:nth-child(7) { width: 10%; }
.survey-responses .badge { max-width: 100%; white-space: normal !important; text-align: left; }
@media (max-width: 900px) { .admin-table.survey-responses { table-layout: auto; } }
.survey-responses th, .survey-responses td { padding: 14px 12px; }
.survey-responses__date { white-space: nowrap !important; color: var(--text-subtle); }
.survey-badges { display: flex; flex-wrap: wrap; gap: 6px; }

/* Categoria personalizada com modo mídia: a foto é a capa do card (mesma
   caixa das capas de obra); tocar abre a foto inteira (photo_viewer_controller). */
.activity-card__photo-cover { display: block; aspect-ratio: 2 / 3; padding: 0; border: 0; overflow: hidden; background: var(--surface-3); cursor: zoom-in; transition: transform var(--t-press) ease; }
.activity-card__photo-cover:active { transform: scale(.98); }
.activity-card__photo-cover:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.activity-card__photo-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* No detalhe a foto fica no topo, no lugar e tamanho da capa das obras. */
.activity-hero__photo > .cover { --cover-w: 180px; --cover-radius: var(--r-sm); width: var(--cover-w); margin: 0; border-radius: var(--cover-radius); }
.photo-viewer { position: fixed; inset: 0; width: min(calc(100% - 32px), 720px); max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 0; border-radius: var(--r-lg); background: var(--surface-1); box-shadow: 0 24px 80px #000c; overflow: hidden; }
.photo-viewer[open] { display: grid; animation: sheet-fade var(--t-state) ease; }
.photo-viewer::backdrop { background: color-mix(in srgb, var(--c-ground-deep) 88%, transparent); animation: sheet-fade var(--t-state) ease; }
.photo-viewer__image { display: block; width: 100%; max-height: calc(100dvh - 32px); object-fit: contain; }
.photo-viewer__close { position: absolute; top: var(--s-2); right: var(--s-2); z-index: 1; background: var(--surface-2); }
@media (prefers-reduced-motion: reduce) {
  .photo-viewer[open], .photo-viewer::backdrop, .activity-card__photo-cover { animation: none; transition: none; }
}
