/* Mosaic — Cinema. Camada comum a todas as páginas e ferramentas de gestão.
   As superfícies organizam formulários; as listas deixam os conteúdos respirar. */
:root { --page-top: calc(var(--nav-h) + 28px); }
body::before { content: none; }
body { font-size: 15px; }
h1 { font-size: clamp(25px, 3vw, 34px); letter-spacing: -.035em; }
h2 { font-size: 18px; font-weight: 600; }
h3 { font-weight: 600; }
.page { animation: none; padding-bottom: 64px; }
.container { width: 100%; }
.page-head, .home-head { padding: 14px 0 22px; justify-content: space-between; flex-wrap: wrap; }
.home-head h1 { font-size: clamp(22px, 3vw, 28px); font-weight: 600; }
.page-intro { color: var(--text-2); margin-top: 8px; font-size: 14px; max-width: 60ch; }
.eyebrow { color: var(--text-3); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 6px; }
.block { padding: 24px 0 4px; }
.section-head { padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.section-head h2 { padding: 0; font-size: 15px; letter-spacing: .01em; }
.section-head h2::before { content: none; }
.section-head .muted { font-size: 12px; }
.topnav { background: var(--bg); }
.topnav__inner { gap: 32px; }
.brand { font-weight: 700; font-size: 20px; }
.brand__mark { border-radius: 5px; }
.topnav__link { padding: 10px 12px; border-radius: 0; min-height: 44px; display: inline-flex; align-items: center; }
.topnav__link.is-active { color: var(--accent); background: transparent; }
.topnav__link[aria-current="page"] { box-shadow: inset 0 -2px var(--accent); }
.search-pill { min-height: 40px; border-radius: 6px; border: 0; padding: 8px; }
.icon-btn, .user-chip { border-color: transparent; }
.dropdown__menu { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: var(--shadow-md); border-radius: 8px; }
.dropdown__menu a, .dropdown__menu button { min-height: 44px; display: flex; align-items: center; }
.context-nav { display: flex; gap: 24px; overflow-x: auto; scrollbar-width: thin; border-bottom: 1px solid var(--border); margin: 0 0 16px; }
.context-nav a { display: inline-flex; align-items: center; min-height: 44px; flex-shrink: 0; color: var(--text-2); font-size: 13px; }
.context-nav a:hover, .context-nav a[aria-current="page"] { color: var(--accent); }
.context-nav a[aria-current="page"] { box-shadow: inset 0 -2px var(--accent); }
.btn { min-height: 40px; border-radius: 5px; padding: 9px 14px; font-size: 13px; box-shadow: none; }
.btn--primary { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.btn--primary:hover { background: var(--accent-hover); filter: none; }
.btn--secondary { background: var(--surface-2); border-color: transparent; }
.btn--sm { min-height: 36px; padding: 7px 12px; }
.btn--lg { min-height: 44px; padding: 10px 18px; font-size: 14px; }
.card { box-shadow: none; border-color: var(--hairline); background: var(--surface); border-radius: 8px; }
.input { background: var(--surface); border-radius: 5px; }
.chips { gap: 8px; }
.chip { border: 0; border-radius: 4px; background: transparent; color: var(--text-2); }
.chip.is-active { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 -2px var(--accent); }
.chip--static { padding: 2px 0; font-size: 12px; }
.chip--static + .chip--static::before { content: '·'; margin-right: 8px; }
.hscroll { gap: 12px; scroll-snap-type: x proximity; }
.hscroll > .mcard { scroll-snap-align: start; }
.mcard { --cover-h: 222px; }
.mcard__cover { border-radius: 4px; border-color: var(--border-strong); }
.mcard:hover .mcard__cover, .mcard:focus-visible .mcard__cover { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--accent); }
.mcard:hover .mcard__cover img, .mcard:focus-visible .mcard__cover img { transform: none; }
.mcard__type { display: none; }
.mcard__title { font-size: 12px; line-height: 1.35; font-weight: 500; }
.mcard__sub { font-size: 11px; margin-top: 3px; }
.mcard__meta { padding-top: 7px; }
.covers-grid, .covers-grid--tight, .recs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 20px 12px; }
.covers-grid .mcard, .recs-grid .mcard { width: 100%; }
.covers-grid .mcard__cover, .recs-grid .mcard__cover { height: auto; aspect-ratio: 2/3; }
.home-hero { min-height: 220px; border: 0; border-radius: 6px; padding: 24px; margin-top: 28px; gap: 24px; }
.home-hero__title { font-size: clamp(24px, 3vw, 34px); }
.home-hero__poster { flex-basis: 110px; border-radius: 4px; box-shadow: none; }
.home-hero__badge { border: 0; padding: 0; background: none; backdrop-filter: none; color: var(--accent); font-size: 11px; }
.home-hero__body { gap: 8px; }
.home-hero__desc { font-size: 13px; }
.home-streak { padding: 14px 0; margin-top: 28px; background: transparent; border: 0; border-top: 1px solid var(--border); }
.home-streak__start { max-width: 70ch; }
.act-list.card { background: transparent; border: 0; }
.act { padding: 16px 0; align-items: flex-start; border-bottom-color: var(--border); }
.act__body p { font-size: 14px; line-height: 1.5; }
.act__thumb { width: 40px; flex-basis: 40px; border-radius: 3px; }
.rcard { background: transparent; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 18px 0; }
.rcard__body { color: var(--text-2); font-size: 14px; line-height: 1.7; max-width: 75ch; }
.rcard__cover img { border-radius: 3px; }
.like-btn, .rcard__foot a { min-height: 36px; display: inline-flex; align-items: center; }
.media-hero { padding-top: calc(var(--page-top) + 160px); padding-bottom: 24px; }
.media-hero::before { bottom: 0; max-height: 520px; filter: brightness(.7); }
.media-hero::after, .page-stills + .media-hero::after { background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 18%, transparent), color-mix(in srgb, var(--bg) 60%, transparent) 55%, var(--bg) 100%); }
.page-stills { display: none; }
.media-hero__inner { grid-template-columns: 190px minmax(0, 1fr) 280px; gap: 28px; }
.media-poster { border-radius: 5px; box-shadow: var(--shadow-md); }
.media-info h1 { font-size: clamp(26px, 3.5vw, 40px); }
.media-desc { line-height: 1.7; }
.media-actions { background: var(--surface); border: 0; border-radius: 8px; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 16px; }
.media-actions .media-primary { order: -1; }
.media-primary { display: flex; gap: 6px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.media-primary .btn { flex: 1 1 auto; min-height: 44px; padding: 8px; }
.media-primary .btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.media-score__num { font-size: 30px; }
.media-body > .block { max-width: 100%; }
.badge:not(.badge-pill) { background: transparent; border: 0; padding: 2px 0; color: var(--text-2); }
.profile-banner { height: 220px; }
.profile-head { gap: 20px; }
.profile-head h1 { font-size: 28px; }
.profile-head__actions { flex-wrap: wrap; }
.stat-row { display: flex; gap: 40px; padding: 16px 0; margin: 12px 0 0; border-block: 1px solid var(--border); }
.stat.card { background: transparent; border: 0; padding: 0; flex-direction: row; align-items: baseline; gap: 8px; }
.stat__v { font-size: 22px; }
.activity-grid .card { background: transparent; border: 0; padding-inline: 0; }
.profile-activity { margin-top: 16px; border-bottom: 1px solid var(--border); }
.profile-activity > summary { cursor: pointer; color: var(--text-2); padding: 12px 0; font-size: 13px; }
.tabs { overflow-x: auto; scrollbar-width: thin; flex-wrap: nowrap; }
.tabs__tab { border-radius: 0; white-space: nowrap; min-height: 44px; padding: 12px 14px; }
.tabs__tab.is-active { color: var(--accent); background: none; }
.logcard, .lcard, .uchip, .pcard { background: transparent; box-shadow: none; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding-inline: 0; }
.logcard:hover, .lcard:hover, .pcard:hover { transform: none; box-shadow: none; }
.logcard__cover { border-radius: 3px; }
.shelf { box-shadow: none; background: transparent; border-radius: 0; }
.club-card, .club-panel, .race-card, .race-panel { box-shadow: none; border-radius: 8px; }
.race-hero, .race-detail { background: var(--surface); border-color: var(--border); border-radius: 8px; }
.race-hero h1, .race-detail h1 { font-size: clamp(28px, 4vw, 42px); }
.club-stats { box-shadow: none; background: transparent; border-inline: 0; border-radius: 0; }
.empty-state__icon { background: var(--accent-soft); color: var(--accent); box-shadow: none; border-radius: 8px; }
.hero__accent { background: none; -webkit-text-fill-color: var(--accent); color: var(--accent); }
.auth-split { box-shadow: none; border-radius: 10px; }
.auth-split__panel { background: var(--surface-2); color: var(--text); }
.auth-split__panel::before { content: none; }
.auth-split__sub { color: var(--text-2); }
.toasts { width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--surface); backdrop-filter: none; border-radius: 6px; }
.fab-log .btn { border-radius: 8px; width: 44px; height: 44px; box-shadow: var(--shadow-sm); }
.fab-top { right: 24px; bottom: 80px; }
@media (max-width: 960px) {
  .topnav__inner { gap: 16px; }
  .topnav__link { padding-inline: 9px; }
  .search-pill kbd { display: none; }
  .media-hero__inner { grid-template-columns: 160px minmax(0, 1fr); }
  .media-actions { grid-column: 1 / -1; }
  .media-primary { justify-content: flex-start; }
  .media-primary .btn { flex: 0 1 auto; padding-inline: 16px; }
}
@media (max-width: 720px) {
  :root { --nav-h: 104px; --page-top: 124px; }
  .topnav__inner { height: 104px; position: relative; padding-bottom: 44px; }
  .brand__word { display: inline; font-size: 18px; }
  .topnav__center { position: absolute; left: 20px; right: 20px; bottom: 0; height: 44px; gap: 20px; overflow-x: auto; mask-image: none; -webkit-mask-image: none; }
  .topnav__link { padding: 8px 0; font-size: 13px; }
  .topnav__right { margin-left: auto; gap: 4px; }
  .dropdown__menu--wide { min-width: min(320px, calc(100vw - 40px)); }
  .dropdown__menu { max-width: calc(100vw - 32px); }
  .btn, .btn--sm, .chip { min-height: 44px; }
  .search-pill__label, .search-pill kbd { display: none; }
  .container { padding-inline: 20px; }
  .covers-grid, .covers-grid--tight, .recs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 8px; }
  .mcard { --cover-h: 180px; }
  .mcard__title { font-size: 12px; }
  .home-hero { padding: 18px; min-height: 200px; }
  .home-hero__body { max-width: 100%; }
  .home-hero__poster { display: none; }
  .media-hero { padding-top: calc(var(--page-top) + 80px); }
  .media-hero__inner { grid-template-columns: 100px minmax(0, 1fr); gap: 16px; }
  .media-poster { width: 100%; max-width: none; }
  .media-info h1 { font-size: 23px; }
  .media-info .media-desc, .media-info .media-makers, .media-info .chips { grid-column: 1 / -1; }
  .media-desc { font-size: 13px; }
  .media-actions { margin-top: 8px; }
  .media-primary .btn { flex: 1 1 auto; padding-inline: 10px; }
  .profile-head { flex-wrap: wrap; }
  .profile-head__info { min-width: 0; padding-top: 0; }
  .profile-head h1 { font-size: 24px; }
  .profile-head__actions { width: 100%; }
  .profile-banner { height: 160px; }
  .stat-row { gap: 24px; }
  .stat.card { gap: 6px; }
  .logcard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-grid, .activity-grid { grid-template-columns: minmax(0, 1fr); }
  .context-nav { gap: 20px; }
  .section-head .muted { flex-basis: 100%; order: 3; }
  .fab-log { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); }
  .page { padding-bottom: 80px; }
}
@media (max-width: 370px) {
  .container { padding-inline: 16px; }
  .brand { gap: 6px; }
  .topnav__center { left: 16px; right: 16px; }
  .user-chip { padding-right: 4px; }
  .user-chip__caret { display: none; }
  .stat-row { gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; animation-iteration-count: 1 !important; }
  ::view-transition-group(*) { animation: none; }
}
.home-dashboard { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 32px; align-items: start; }
.home-dashboard > .block { padding-top: 0; }
.home-dashboard .home-hero { margin-top: 0; min-height: 370px; height: 100%; }
.home-dashboard .home-hero__body { max-width: 100%; }
.home-dashboard .home-hero__poster { display: none; }
.home-dashboard .home-hero::after { background: linear-gradient(to top, var(--bg), color-mix(in srgb, var(--bg) 45%, transparent)); }
@media (max-width: 720px) {
  .home-dashboard { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .home-dashboard .home-hero { min-height: 210px; }
}
.tabs { display: flex; background: transparent; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 0; gap: 8px; backdrop-filter: none; -webkit-backdrop-filter: none; }
.tabs__tab { box-shadow: none; }
.tabs__tab.is-active { box-shadow: inset 0 -2px var(--accent); }
.shelf__row { padding-inline: 0; gap: 10px; padding-bottom: 12px; }
.shelf__item, .shelf__item:hover { box-shadow: none; transform: none; }
.shelf__item:not(.shelf__item--person) { border-radius: 4px; }
.shelf__plank { height: 1px; background: var(--border); border: 0; margin: 0; box-shadow: none; }
.shelf__label { text-transform: none; font-size: 13px; letter-spacing: 0; font-weight: 500; }
.mcard { position: relative; min-width: 0; }
.mcard__link { display: block; }
.mcard:focus-within .mcard__log { opacity: 1; transform: none; }
.search-page__status, .search-page__correction { margin-top: 16px; }
.search-page__status:empty { display: none; }
.search-page__group { padding-top: 22px; }
.search-result { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 4px; border-bottom: 1px solid var(--hairline); }
.search-result:hover { background: var(--surface); }
.search-result__image { width: 36px; height: 54px; flex: 0 0 36px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-3); overflow: hidden; border-radius: 4px; }
.search-result__image--person { height: 36px; border-radius: 50%; }
.search-result__image img { width: 100%; height: 100%; object-fit: cover; }
.search-result__copy { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.search-result__copy strong { font-weight: 600; font-size: 14px; }
.search-result__arrow { margin-inline-start: auto; color: var(--text-3); font-size: 20px; }
[data-search-retry] { margin-top: 12px; }
html { scroll-padding-top: calc(var(--nav-h) + 16px); }
.home-dashboard { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 721px) {
  .home-dashboard--split { grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); }
}
.media-action-details { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (max-width: 720px) {
  .media-info { display: contents; }
  .media-identity { grid-column: 2; grid-row: 1; }
  .media-poster { grid-column: 1; grid-row: 1; }
  .media-actions { display: contents; }
  .media-primary { grid-column: 1 / -1; grid-row: 2; }
  .media-info .media-desc { grid-column: 1 / -1; grid-row: 3; margin: 0; max-width: 68ch; }
  .media-action-details { grid-column: 1 / -1; grid-row: 4; padding: 16px; background: var(--surface); border-radius: 8px; }
}

.nav__badge[hidden] { display: none; }
.act-list.card { padding-inline: 0; }
.block--featured { background: transparent; border: 0; padding: 24px 0 4px; }
.block--featured::before, .block--featured::after { content: none; }
.media-primary .later-btn { width: auto; }
.media-primary .pop-anchor .btn { width: 100%; }
.admin-panel, .admin-stat { border-radius: 8px; box-shadow: none; }
@media (max-width: 720px) {
  .media-primary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
  .media-primary > * { grid-column: span 2; }
  .media-primary > :nth-child(n+4) { grid-column: span 3; }
  .media-primary .btn { width: 100%; }
}
[data-search-page] [hidden], [data-search-recent][hidden] { display: none; }
.dropdown__menu:not(.dropdown__menu--wide) { max-height: calc(100dvh - var(--nav-h) - 12px); overflow-y: auto; }
.stat-row { flex-wrap: wrap; row-gap: 8px; }
