/* ==========================================================================
   Componentes — shell (barras), botões, gavetas, cards, stories, carrosséis
   ========================================================================== */

@layer components {
  /* ---------- Tons (cada card/story escolhe um) ---------- */
  [data-tone="grafite"] {
    --tone: var(--grafite);
    --tone-text: var(--creme);
    --tone-accent: var(--salvia);
  }
  [data-tone="terracota"] {
    --tone: var(--terracota);
    --tone-text: var(--grafite);
    --tone-accent: var(--grafite);
  }
  [data-tone="salvia"] {
    --tone: var(--salvia);
    --tone-text: var(--grafite);
    --tone-accent: var(--grafite);
  }
  [data-tone="clara"] {
    --tone: var(--salvia-clara);
    --tone-text: var(--grafite);
    --tone-accent: var(--grafite);
  }
  [data-tone="creme"] {
    --tone: var(--creme);
    --tone-text: var(--grafite);
    --tone-accent: var(--terracota-texto);
  }

  /* ---------- Símbolo da marca (fonte única: assets/brand/simbolo.svg) ---------- */
  .simbolo {
    display: block;
    aspect-ratio: 280 / 442;
    background: currentColor;
    -webkit-mask: url("../brand/simbolo.svg") center / contain no-repeat;
    mask: url("../brand/simbolo.svg") center / contain no-repeat;
  }

  /* ---------- Atalho de pular conteúdo ---------- */
  .skip {
    position: fixed;
    inset: 8px auto auto 8px;
    z-index: 100;
    translate: 0 -200%;
    background: var(--grafite);
    color: var(--creme);
    padding: 12px 18px;
    border-radius: var(--raio-pill);
    font-weight: 700;
  }
  .skip:focus {
    translate: 0 0;
  }

  /* ---------- Barra superior ---------- */
  .topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    height: var(--topbar-h);
    background: color-mix(in srgb, var(--fundo) 84%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    view-transition-name: topbar;
  }
  .topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 100%;
    width: 100%;
    max-width: calc(var(--largura-max) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
  }
  .brand {
    display: block;
    flex: none;
  }
  .brand img {
    height: 26px;
    width: auto;
  }
  .topbar__actions {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .desknav {
    display: none;
  }

  /* ---------- Botões ---------- */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6em;
    min-height: 52px;
    padding: 0 1.6rem;
    border-radius: var(--raio-pill);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.01em;
    line-height: 1;
    white-space: nowrap;
    transition: transform var(--dur) var(--ease), background-color var(--dur), color var(--dur),
      border-color var(--dur);
  }
  .btn:active {
    transform: scale(0.97);
  }
  .btn svg {
    width: 1.25em;
    height: 1.25em;
    flex: none;
  }
  .btn--grafite {
    background: var(--grafite);
    color: var(--creme);
  }
  .btn--grafite:hover {
    background: color-mix(in srgb, var(--grafite) 86%, var(--terracota));
  }
  .btn--branco {
    background: #fff;
    color: var(--grafite);
  }
  .btn--vidro {
    background: rgb(255 255 255 / 0.16);
    color: #fff;
    border: 1.5px solid rgb(255 255 255 / 0.55);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
  .btn--contorno {
    border: 1.5px solid currentColor;
  }
  .btn--small {
    min-height: 40px;
    padding: 0 1.1rem;
    font-size: 0.9rem;
  }
  .btn--block {
    width: 100%;
  }

  .iconbtn {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--grafite) 8%, transparent);
    transition: background-color var(--dur), transform var(--dur) var(--ease);
  }
  .iconbtn:active {
    transform: scale(0.94);
  }
  .iconbtn svg {
    width: 22px;
    height: 22px;
  }

  .link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    padding-bottom: 2px;
    border-bottom: 1.5px solid currentColor;
    white-space: nowrap;
  }
  .link-arrow svg {
    width: 1.1em;
    height: 1.1em;
  }

  /* ---------- Barra inferior (celular): pílula flutuante, só ícones ---------- */
  .tabbar {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: calc(var(--tabbar-gap) + env(safe-area-inset-bottom));
    z-index: 50;
    max-width: 440px;
    height: var(--tabbar-h);
    margin-inline: auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    padding: 6px;
    border-radius: var(--raio-pill);
    background: color-mix(in srgb, #fff 92%, transparent);
    -webkit-backdrop-filter: blur(22px) saturate(1.6);
    backdrop-filter: blur(22px) saturate(1.6);
    box-shadow: 0 10px 32px -8px rgb(0 0 0 / 0.22), 0 0 0 1px rgb(0 0 0 / 0.05);
    view-transition-name: tabbar;
  }
  .tabbar a {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    border-radius: var(--raio-pill);
    color: var(--preto);
    transition: transform var(--dur) var(--ease);
    -webkit-tap-highlight-color: transparent;
  }
  /* fundo que corre até a aba atual (e desliza de uma aba à outra na troca de página) */
  .tabbar__pill {
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 6px;
    width: calc((100% - 12px - 8px) / 5);
    border-radius: var(--raio-pill);
    background: rgb(0 0 0 / 0.09);
    transform: translateX(calc(var(--ativo, 0) * (100% + 2px)));
    pointer-events: none;
    view-transition-name: tab-pill;
  }
  .tabbar[data-sem-aba] .tabbar__pill {
    opacity: 0;
  }
  .tabbar a[data-carregando] svg {
    animation: tab-carregando 0.9s ease-in-out infinite;
  }
  @keyframes tab-carregando {
    50% {
      opacity: 0.35;
      scale: 0.86;
    }
  }
  .tabbar a:active {
    transform: scale(0.92);
  }
  .tabbar svg {
    width: 28px;
    height: 28px;
    stroke-width: 2;
  }

  /* ---------- Gaveta (bottom sheet, <dialog> nativo) ---------- */
  .sheet {
    position: fixed;
    inset: auto 0 0 0;
    width: min(100%, 560px);
    max-width: none;
    max-height: 88dvh;
    margin: 0 auto;
    padding: 0;
    border: 0;
    border-radius: var(--raio-l) var(--raio-l) 0 0;
    background: var(--fundo);
    color: var(--texto);
    overflow: auto;
    overscroll-behavior: contain;
    translate: 0 100%;
    transition: translate 0.42s var(--ease), overlay 0.42s allow-discrete, display 0.42s allow-discrete;
  }
  .sheet[open] {
    translate: 0 0;
  }
  @starting-style {
    .sheet[open] {
      translate: 0 100%;
    }
  }
  .sheet::backdrop {
    background: rgb(61 61 59 / 0);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    transition: background-color 0.42s, overlay 0.42s allow-discrete, display 0.42s allow-discrete;
  }
  .sheet[open]::backdrop {
    background: rgb(61 61 59 / 0.5);
  }
  @starting-style {
    .sheet[open]::backdrop {
      background: rgb(61 61 59 / 0);
    }
  }
  .sheet__grip {
    width: 44px;
    height: 5px;
    margin: 10px auto 0;
    border-radius: var(--raio-pill);
    background: color-mix(in srgb, var(--grafite) 22%, transparent);
  }
  .sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px var(--gutter) 6px;
  }
  .sheet__body {
    padding: 8px var(--gutter) calc(28px + env(safe-area-inset-bottom));
  }
  /* Variante lateral: o menu entra da direita para a esquerda */
  .sheet.sheet--lateral {
    /* ocupa a tela toda; entra pela direita */
    inset: 0;
    width: 100%;
    max-width: none;
    max-height: none;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
    padding-top: env(safe-area-inset-top);
    translate: 100% 0;
  }
  /* em telas largas o conteúdo não estica: fica numa coluna centralizada */
  .sheet--lateral .sheet__head,
  .sheet--lateral .sheet__body {
    width: min(100%, 560px);
    margin-inline: auto;
  }
  .sheet.sheet--lateral[open] {
    translate: 0 0;
  }
  @starting-style {
    .sheet.sheet--lateral[open] {
      translate: 100% 0;
    }
  }
  .sheet--lateral .sheet__grip {
    display: none;
  }
  .sheet--lateral .sheet__head {
    padding-top: 20px;
  }

  .menu-list {
    display: grid;
    gap: 2px;
  }
  .menu-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1.5px solid var(--linha);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
  }
  .menu-list a svg {
    width: 22px;
    height: 22px;
    opacity: 0.5;
  }
  .menu-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
  }

  /* ---------- Cards ---------- */
  .card {
    background: var(--superficie);
    border-radius: var(--raio-l);
    box-shadow: var(--sombra-card);
    overflow: hidden;
  }

  /* ---------- Cabeçalho de seção ---------- */
  .sec-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
  }
  .sec-head h2 {
    margin-top: 8px;
  }

  /* ---------- Carrossel (scroll-snap, sem JS) ---------- */
  .carousel {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 4px var(--gutter) 22px;
    scroll-padding-inline: var(--gutter);
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .carousel::-webkit-scrollbar {
    display: none;
  }
  .carousel > * {
    flex: none;
    scroll-snap-align: start;
  }

  /* ---------- Stories (destaques em círculo) ---------- */
  .stories {
    padding-block: 14px 6px;
  }
  .stories__row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 4px var(--gutter);
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    scroll-padding-inline: var(--gutter);
  }
  .stories__row::-webkit-scrollbar {
    display: none;
  }
  @media (min-width: 1024px) {
    .stories__row {
      max-width: calc(var(--largura-max) + var(--gutter) * 2);
      margin-inline: auto;
      padding-inline: var(--gutter);
      scroll-snap-type: none;
    }
  }
  .story-btn {
    flex: none;
    display: grid;
    justify-items: center;
    gap: 8px;
    width: 74px;
    scroll-snap-align: start;
    -webkit-tap-highlight-color: transparent;
  }
  .story-btn__ring {
    width: 74px;
    height: 74px;
    padding: 3px;
    border-radius: 50%;
    background: var(--story-anel);
    transition: transform var(--dur) var(--ease);
  }
  .story-btn:active .story-btn__ring {
    transform: scale(0.94);
  }
  .story-btn[data-seen] .story-btn__ring {
    background: var(--story-anel-visto);
  }
  .story-btn__face {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--fundo);
    background: var(--tone);
    color: var(--tone-text);
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 0.95;
    text-align: center;
  }
  .story-btn__face .simbolo {
    width: 20px;
  }
  .story-btn__label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Visualizador de stories */
  .story {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent; /* o escuro fica em .story__fundo, que some junto com o arrasto */
    color: var(--creme);
    overflow: hidden;
    touch-action: none; /* o arrasto para fechar é nosso, não rolagem */
    user-select: none;
    -webkit-user-select: none;
    opacity: 0;
    scale: 0.97;
    transition: opacity 0.3s var(--ease), scale 0.3s var(--ease), overlay 0.3s allow-discrete,
      display 0.3s allow-discrete;
  }
  .story[open] {
    opacity: 1;
    scale: 1;
  }
  @starting-style {
    .story[open] {
      opacity: 0;
      scale: 0.97;
    }
  }
  .story::backdrop {
    background: transparent;
  }
  .story__fundo {
    position: absolute;
    inset: 0;
    background: #1d1d1c;
  }
  .story img {
    pointer-events: none;
    -webkit-user-drag: none;
  }
  .story[data-arrastando] .story__frame {
    will-change: transform, clip-path;
  }
  .story__frame {
    position: relative;
    display: block;
    width: min(100%, 480px);
    height: 100%;
    margin-inline: auto;
    background: var(--tone, var(--grafite));
    color: var(--tone-text, var(--creme));
    overflow: hidden;
    touch-action: none;
    transition: background-color 0.4s;
  }
  @media (min-width: 560px) {
    .story__frame {
      height: min(100%, 880px);
      margin-block: auto;
      border-radius: var(--raio-l);
    }
    .story {
      display: none;
    }
    .story[open] {
      display: grid;
      align-items: center;
    }
  }
  .story__bars {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 5px;
    padding: calc(14px + env(safe-area-inset-top)) 14px 0;
    z-index: 3;
  }
  .story__bar {
    flex: 1;
    height: 3px;
    border-radius: var(--raio-pill);
    background: color-mix(in srgb, currentColor 28%, transparent);
    overflow: hidden;
  }
  .story__bar i {
    display: block;
    height: 100%;
    width: 0;
    background: currentColor;
    transform-origin: left;
  }
  .story__bar[data-done] i {
    width: 100%;
  }
  .story__bar[data-active] i {
    animation: story-progress var(--story-dur, 7s) linear forwards;
  }
  .story[data-paused] .story__bar[data-active] i,
  .story[data-pausado] .story__bar[data-active] i {
    animation-play-state: paused;
  }
  @keyframes story-progress {
    to {
      width: 100%;
    }
  }
  .story__close {
    position: absolute;
    top: calc(24px + env(safe-area-inset-top));
    right: 12px;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: inherit;
  }
  .story__pause {
    position: absolute;
    top: calc(24px + env(safe-area-inset-top));
    right: 56px; /* ao lado do X */
    z-index: 4;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: inherit;
  }
  .story__close svg,
  .story__pause svg {
    width: 24px;
    height: 24px;
  }
  .story__who {
    position: absolute;
    top: calc(30px + env(safe-area-inset-top));
    left: 16px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
  }
  .story__who .simbolo {
    width: 14px;
  }
  /* a tela (foto ou cor) ocupa o quadro inteiro, por trás das barras e dos botões */
  .story__slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 18px;
    padding: 72px 24px calc(34px + env(safe-area-inset-bottom));
    isolation: isolate;
  }
  /* sem tracejado de rascunho dentro dos destaques */
  .story [data-exemplo] {
    outline: none !important;
  }
  .story__slide > img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .story__slide[data-foto]::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(
        to top,
        rgb(29 29 28 / 0.94) 6%,
        rgb(29 29 28 / 0.7) 30%,
        rgb(29 29 28 / 0.2) 56%,
        transparent 76%
      ),
      linear-gradient(to bottom, rgb(29 29 28 / 0.55), transparent 24%);
  }
  .story__slide[data-foto] {
    color: #fff;
  }
  /* texto no alto (fotos com gente na parte de baixo) */
  .story__slide[data-topo] {
    justify-content: flex-start;
    padding-top: calc(92px + env(safe-area-inset-top));
  }
  .story__slide[data-foto][data-topo]::before {
    background: linear-gradient(to bottom, rgb(29 29 28 / 0.9) 4%, rgb(29 29 28 / 0.62) 34%, transparent 58%);
  }
  /* slides só de cor: símbolo da marca como marca d'água */
  .story__slide:not([data-foto])::after {
    content: "";
    position: absolute;
    z-index: -1;
    right: -14%;
    top: 14%;
    width: 78%;
    aspect-ratio: 280 / 442;
    background: currentColor;
    opacity: 0.08;
    -webkit-mask: url("../brand/simbolo.svg") center / contain no-repeat;
    mask: url("../brand/simbolo.svg") center / contain no-repeat;
    pointer-events: none;
  }
  .story__title {
    font-size: clamp(2.4rem, 11vw, 3.6rem);
    line-height: 0.98;
  }
  .story__title em {
    color: var(--tone-accent, var(--salvia));
  }
  .story__slide[data-foto] .story__title em {
    color: var(--salvia-clara);
  }
  .story__text {
    font-size: 1.12rem;
    line-height: 1.5;
    max-width: 34ch;
  }
  .story__list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .story__list li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 10px;
    border-bottom: 1.5px solid color-mix(in srgb, currentColor 22%, transparent);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
  }
  .story__list li span:last-child {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
  }
  .story__cta {
    align-self: flex-start;
  }
  .story__tap {
    position: absolute;
    top: 64px;
    bottom: 120px;
    z-index: 2;
    width: 38%;
    -webkit-tap-highlight-color: transparent;
  }
  .story__tap--prev {
    left: 0;
  }
  .story__tap--next {
    right: 0;
    width: 62%;
  }

  /* ---------- Card de mensagem ---------- */
  .msg {
    display: grid;
    gap: 12px;
    align-content: start;
  }
  .msg__thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--raio-video);
    overflow: hidden;
    background: var(--tone, var(--grafite));
    color: var(--tone-text, var(--creme));
  }
  .msg__thumb > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: scale 0.6s var(--ease);
  }
  .msg:hover .msg__thumb > img {
    scale: 1.04;
  }
  .msg__cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px 74px 16px 18px;
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
    font-size: clamp(1.2rem, 1rem + 1.2vw, 1.55rem);
    line-height: 1.12;
    overflow: hidden;
  }
  .msg__cover .simbolo {
    position: absolute;
    right: -6%;
    top: -14%;
    width: 38%;
    opacity: 0.16;
  }
  .msg__play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgb(255 255 255 / 0.94);
    color: var(--grafite);
    box-shadow: 0 4px 14px rgb(0 0 0 / 0.25);
    transition: transform var(--dur) var(--ease);
  }
  .msg:hover .msg__play {
    transform: scale(1.08);
  }
  .msg__play svg {
    width: 20px;
    height: 20px;
    margin-left: 2px;
  }
  .msg__title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.18;
    text-wrap: balance;
  }
  .msg__meta {
    font-size: 0.85rem;
    color: var(--texto-suave);
  }
  .msg--destaque .msg__title {
    font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2rem);
    letter-spacing: -0.03em;
  }
  .msg--destaque .msg__thumb {
    border-radius: var(--raio-video);
  }

  /* ---------- Card de evento ---------- */
  .evt {
    display: grid;
    grid-template-rows: auto 1fr;
    width: min(78vw, 300px);
    background: var(--superficie);
    border-radius: var(--raio-l);
    box-shadow: var(--sombra-card);
    overflow: hidden;
    text-align: left;
    transition: transform var(--dur) var(--ease);
  }
  .evt:active {
    transform: scale(0.98);
  }
  .evt__cover {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    height: 128px;
    padding: 14px;
    background: var(--tone);
    color: var(--tone-text);
    overflow: hidden;
  }
  /* capa com a arte do evento: aparece inteira, e a data vai para o canto de cima à direita */
  .evt--arte .evt__cover {
    height: auto;
    aspect-ratio: 3 / 2;
    justify-content: flex-end;
  }
  .evt__arte {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  /* arte quase quadrada: sobe o enquadramento para não cortar o fim da palavra */
  .evt__arte[src*="sala-de-oracao"] {
    object-position: 50% 30%;
  }
  .evt--arte .evt__cover .simbolo {
    display: none;
  }
  .evento-sheet__arte {
    display: block;
    width: 100%;
    max-height: 260px;
    margin-bottom: 14px;
    border-radius: var(--raio-m, 20px);
    object-fit: cover;
  }
  .evt__cover .simbolo {
    position: absolute;
    right: -6%;
    bottom: -22%;
    width: 36%;
    opacity: 0.16;
  }
  .evt__date {
    display: grid;
    justify-items: center;
    gap: 3px;
    min-width: 56px;
    padding: 9px 12px 8px;
    border-radius: 16px;
    background: #fff;
    color: var(--grafite);
    line-height: 1;
  }
  .evt__day {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.04em;
  }
  .evt__mon {
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }
  .evt__body {
    display: grid;
    align-content: start;
    gap: 6px;
    padding: 16px 18px 20px;
  }
  .evt__title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.15;
  }
  .evt__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.86rem;
    color: var(--texto-suave);
  }
  .evt__meta svg {
    width: 15px;
    height: 15px;
    flex: none;
  }

  /* ---------- Acordeão (<details> nativo) ---------- */
  .acc details {
    border-top: 1.5px solid var(--linha);
  }
  .acc details:last-child {
    border-bottom: 1.5px solid var(--linha);
  }
  .acc summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 0;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    cursor: pointer;
    list-style: none;
  }
  .acc summary::-webkit-details-marker {
    display: none;
  }
  .acc summary::after {
    content: "";
    flex: none;
    width: 11px;
    height: 11px;
    margin-right: 4px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    rotate: 45deg;
    translate: 0 -3px;
    transition: rotate 0.3s var(--ease), translate 0.3s var(--ease);
  }
  .acc details[open] summary::after {
    rotate: -135deg;
    translate: 0 2px;
  }
  .acc__body {
    padding: 0 0 22px;
    color: var(--texto-suave);
    max-width: 62ch;
  }

  /* ---------- Faixa de frases em movimento ---------- */
  .marquee {
    overflow: hidden;
    padding-block: 16px;
    background: var(--terracota);
    color: var(--grafite);
    white-space: nowrap;
  }
  .marquee__track {
    display: inline-flex;
    align-items: center;
    gap: 1.6rem;
    padding-right: 1.6rem;
    animation: marquee 70s linear infinite;
  }
  .marquee__track span {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
    font-size: clamp(1.15rem, 0.95rem + 1vw, 1.6rem);
    line-height: 1.2;
    letter-spacing: -0.005em;
  }
  .marquee__track .simbolo {
    width: clamp(11px, 1.2vw, 14px);
    flex: none;
  }
  @keyframes marquee {
    to {
      transform: translateX(-50%);
    }
  }

  /* ---------- Entrada suave dos blocos ---------- */
  html.js .reveal {
    opacity: 0;
    translate: 0 16px;
    transition: opacity 0.7s var(--ease), translate 0.7s var(--ease);
  }
  html.js .reveal.is-in {
    opacity: 1;
    translate: 0 0;
  }

  /* ---------- Esqueleto de carregamento ---------- */
  .skeleton {
    border-radius: var(--raio-m);
    background: linear-gradient(100deg, transparent 30%, rgb(255 255 255 / 0.6) 50%, transparent 70%) 0 0 / 220% 100%,
      color-mix(in srgb, var(--grafite) 9%, var(--branco));
    animation: shine 1.5s linear infinite;
  }
  @keyframes shine {
    to {
      background-position: -220% 0, 0 0;
    }
  }

  /* ---------- Marca de rascunho (config.js → rascunho: true) ---------- */
  html[data-rascunho="true"] [data-exemplo] {
    outline: 1px dashed color-mix(in srgb, var(--terracota) 65%, transparent);
    outline-offset: 3px;
    border-radius: 4px;
  }

  /* ---------- Transições entre páginas (cross-document) ---------- */
  @view-transition {
    navigation: auto;
  }
}

@layer components {
  @media (prefers-reduced-motion: no-preference) {
    /* a barra inferior nunca sai do lugar nem faz fade: só a versão nova aparece, na hora */
    ::view-transition-group(tabbar) {
      animation: none;
    }
    ::view-transition-old(tabbar) {
      display: none;
    }
    ::view-transition-new(tabbar) {
      animation: none;
      opacity: 1;
    }
    ::view-transition-group(tab-pill) {
      animation-duration: 0.42s;
      animation-timing-function: cubic-bezier(0.3, 0.9, 0.25, 1);
    }
    ::view-transition-old(root) {
      animation: 0.2s var(--ease) both vt-out;
    }
    ::view-transition-new(root) {
      animation: 0.34s var(--ease) both vt-in;
    }
    @keyframes vt-out {
      to {
        opacity: 0;
        translate: 0 -6px;
      }
    }
    @keyframes vt-in {
      from {
        opacity: 0;
        translate: 0 14px;
      }
    }
  }
  @media (prefers-reduced-motion: reduce) {
    @view-transition {
      navigation: none;
    }
    .marquee__track {
      animation: none;
    }
  }
}

/* ---------- Desktop: menu no topo, sem barra inferior ---------- */
@media (min-width: 1024px) {
  .tabbar,
  .topbar .menu-btn {
    display: none;
  }
  .brand img {
    height: 30px;
  }
  .desknav {
    display: flex;
    gap: 2px;
    margin-inline: auto 12px;
  }
  .desknav a {
    padding: 10px 16px;
    border-radius: var(--raio-pill);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    transition: background-color var(--dur), color var(--dur);
  }
  .desknav a:hover {
    background: color-mix(in srgb, var(--grafite) 8%, transparent);
  }
  .desknav a[aria-current="page"] {
    background: var(--grafite);
    color: var(--creme);
  }
  .carousel:not(.proximas__lista) {
    max-width: calc(var(--largura-max) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
  }
  .evt {
    width: 300px;
  }
}
