/* Matheus Gambaro Copy — estilo "museu anos 70": borda preta 2px + sombra sólida deslocada. */
:root {
  --bg: #EFEDE2;
  --bg-glow: #F8F7EF;
  --card: #F7F5EC;
  --ink: #1A1A1A;
  --muted: #55554C;
  --red: #C8352E;
  --blue-bg: #DCE7F3;
  --blue: #2A5BA6;
  --line: 2px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --shadow-lg: 7px 7px 0 var(--ink);
  --radius: 12px;
  --f-title: "Fredoka", "Trebuchet MS", sans-serif;
  --f-serif: "Instrument Serif", Georgia, serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(.22, .7, .2, 1);
  --t: 500ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(ellipse 70% 55% at 50% 38%, var(--bg-glow) 0%, var(--bg) 70%) fixed, var(--bg);
  font: 400 16px/1.6 var(--f-mono);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
hr { border: 0; border-top: var(--line); margin: 20px 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: var(--card); padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

/* ---------- Peças base ---------- */
.box { background: var(--card); border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.label {
  margin: 0 0 8px;
  font: 600 12px/1.4 var(--f-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
}
.label a { text-decoration: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px;
  font: 500 15px/1.2 var(--f-mono);
  text-decoration: none;
  color: var(--ink); background: var(--card);
  border: var(--line); border-radius: 8px; box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 150ms var(--ease), box-shadow 150ms var(--ease);
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn--primary { background: var(--ink); color: var(--bg); }
.btn--blue { background: var(--blue-bg); color: var(--blue); }
.btn--blue { border-color: var(--blue); box-shadow: 2px 2px 0 var(--blue); }
.btn--lg { padding: 14px 30px; font-size: 17px; }
/* Contato: verde de telefone antigo e marrom da câmera do Instagram de 2010, com a faixa arco-íris */
.btn--whatsapp { background: #2F6B45; color: var(--card); }
.btn--instagram {
  background: linear-gradient(90deg, #E2463C 25%, #F2B53A 0 50%, #4FA45A 0 75%, #3B7BC0 0) bottom / 100% 5px no-repeat, #6B4630;
  color: var(--card); padding-bottom: 17px;
}
.btn--sm { padding: 6px 10px; font-size: 13px; box-shadow: 2px 2px 0 var(--ink); }
.btn--danger { color: var(--red); }

.tabs {
  display: inline-flex; flex-wrap: wrap;
  gap: 4px; padding: 4px;
  border: var(--line); border-radius: 8px; box-shadow: var(--shadow);
  background: var(--card);
}
.tabs a {
  padding: 6px 14px;
  font: 500 15px/1.4 var(--f-mono);
  text-decoration: none; color: var(--muted);
  border-radius: 5px;
}
.tabs a:hover { background: var(--blue-bg); color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--bg); }
/* Filtro de nicho: lista suspensa no mesmo visual das abas */
.filter-select { align-items: center; gap: 10px; padding-left: 14px; }
.filter-select label { font: 500 15px/1.4 var(--f-mono); color: var(--muted); }
.filter-select select {
  max-width: 60vw; padding: 6px 32px 6px 12px;
  font: 500 15px/1.4 var(--f-mono); color: var(--bg);
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23EFEDE2' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 0; border-radius: 5px; appearance: none; cursor: pointer;
}

/* ---------- Navbar flutuante ---------- */
.nav-wrap { position: sticky; top: 0; z-index: 20; padding: 16px 20px 0; }
.nav {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 10px 14px;
}
.nav > :last-child { justify-self: end; }
.nav__brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; } /* painel */
/* Site: dois links | título | dois links */
.nav__title { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 19px/1.2 var(--f-title); white-space: nowrap; }
.nav__sign { height: 52px; width: auto; margin: -8px 0; } /* assinatura é diagonal: mais alta que a barra, sem engrossar a navbar */
.nav__links { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.nav__links a { display: block; padding: 6px 14px; border-radius: 6px; font: 500 15px/1.4 var(--f-mono); color: var(--muted); text-decoration: none; }
.nav__links a:hover { background: var(--blue-bg); color: var(--ink); }
.nav__links a[aria-current="page"] { background: var(--ink); color: var(--bg); }
/* Surpreenda-me: aba em trapézio pendurada embaixo da navbar. O trapézio é o ::before inclinado
   em perspectiva (com borda e sombra); o texto fica reto por cima. */
.nav__tab {
  position: relative; isolation: isolate; display: block; width: fit-content; margin: 0 auto; padding: 7px 34px 9px;
  font: 500 14px/1.2 var(--f-mono); color: var(--blue); text-decoration: none;
}
.nav__tab::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--blue-bg); border: var(--line); border-top: 0; border-radius: 0 0 10px 10px;
  box-shadow: 3px 3px 0 var(--ink);
  transform: perspective(40px) rotateX(-7deg); transform-origin: top; /* base mais estreita que o topo */
  transition: background 150ms;
}
.nav__tab:hover::before { background: #CBDCEF; }
.mnav { display: none; } /* linha de links: só no celular */

/* ---------- Home ---------- */
.stage { max-width: 1240px; margin: 0 auto; padding: 40px 20px 24px; text-align: center; overflow-x: clip; } /* objetos laterais saem da tela de propósito */
/* Altura da citação mais longa, alinhada por baixo: trocar de citação não mexe no carrossel */
.stage__head { min-height: 230px; display: flex; flex-direction: column; justify-content: flex-end; }
.stage__title {
  margin: 0 0 6px;
  font: 600 clamp(40px, 4.6vw, 66px)/1.05 var(--f-title);
  letter-spacing: -.01em;
}
.quote { margin: 0 auto; max-width: 720px; }
.quote blockquote { margin: 0; }
.quote p { margin: 0; font: italic 400 clamp(20px, 2vw, 26px)/1.3 var(--f-serif); color: var(--muted); }
.quote p::before { content: "“"; } .quote p::after { content: "”"; }
.quote figcaption { margin-top: 6px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.quote cite { font-style: normal; }
.stage__head > * { transition: opacity 250ms ease; }
.stage__head.is-swapping > * { opacity: 0; }

.carousel { position: relative; height: clamp(300px, 42vw, 480px); margin: 8px 0 28px; touch-action: pan-y; user-select: none; }
.carousel__num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 700 clamp(220px, 36vw, 520px)/1 var(--f-title);
  color: var(--ink); opacity: .06; pointer-events: none;
}
.carousel__track { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.carousel__item {
  position: absolute; left: 50%; top: 50%;
  width: clamp(240px, 36vw, 440px);
  transform: translate(-50%, -50%) translateX(calc(var(--x, 0) * 1%)) scale(var(--s, 1));
  filter: blur(var(--b, 0)) saturate(var(--sat, 1));
  opacity: var(--o, 1);
  transition: transform var(--t) var(--ease), filter var(--t) var(--ease), opacity var(--t) var(--ease);
  z-index: var(--z, 1);
}
.carousel__item:not(.is-active) { --o: 0; } /* sem JS só o item central aparece; o JS sobrescreve */
.carousel__item a { display: block; text-decoration: none; }
.carousel__item img { width: 100%; pointer-events: none; }
.carousel__arrow {
  position: absolute; top: 50%; z-index: 10; transform: translateY(-50%);
  width: 46px; height: 46px; display: grid; place-items: center;
  border: var(--line); border-radius: 50%; background: var(--card); box-shadow: var(--shadow);
  color: var(--ink); cursor: pointer;
}
.carousel__arrow:hover { background: var(--blue-bg); }
.carousel__arrow--prev { left: 0; }
.carousel__arrow--next { right: 0; }

/* Liga/desliga som: no rodapé, no estilo dos botões redondos do carrossel */
.sound-toggle {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: var(--line); border-radius: 50%; background: var(--card); box-shadow: 3px 3px 0 var(--ink); color: var(--ink); cursor: pointer;
}
.sound-toggle:hover { background: var(--blue-bg); }
.sound-toggle .sound-toggle__off, .sound-toggle.is-off .sound-toggle__on { display: none; }
.sound-toggle.is-off .sound-toggle__off { display: inline; }
.stage__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 0; }

/* Bolinhas das seções e dica de arrastar (só em tela de toque) */
.dots { display: flex; justify-content: center; gap: 10px; margin: -10px 0 22px; }
.dots__dot { width: 12px; height: 12px; padding: 0; border: 2px solid var(--ink); border-radius: 50%; background: transparent; cursor: pointer; transition: background 200ms; }
.dots__dot[aria-current="true"] { background: var(--ink); }
.swipe-hint { display: none; margin: -12px 0 18px; font-size: 12px; color: var(--muted); transition: opacity 400ms; }
@media (hover: none) { .swipe-hint { display: block; } }
.swipe-hint.is-done { opacity: 0; }

/* Seções que sobem ao entrar na tela (só com JS, para nunca ficarem invisíveis sem ele) */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

.specs {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  max-width: 900px; margin: 0 auto 28px; padding: 0; text-align: center;
}
.specs__col { padding: 14px 18px; border-left: var(--line); min-width: 0; }
.specs__col:first-child { border-left: 0; }
.specs dt { font: 600 11px/1.4 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.specs dd { margin: 2px 0 0; font: 500 17px/1.35 var(--f-mono); overflow-wrap: anywhere; }
.specs dd a { text-decoration: none; }

.contact { max-width: 900px; margin: 56px auto 0; padding: 0 20px; scroll-margin-top: 100px; text-align: center; }
.contact__title { margin: 0 0 28px; font: 600 clamp(28px, 3.6vw, 44px)/1.15 var(--f-title); }
.contact__title mark { background: none; color: var(--red); }
.contact__buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.contact__form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 18px; padding: 24px; }

/* ---------- Formulários ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { font: 600 12px/1.4 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }
.field__opt { color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 400; }
.field input:not([type="checkbox"]):not([type="file"]), .field textarea, .field select {
  width: 100%; padding: 10px 12px;
  font: 400 15px/1.5 var(--f-mono); color: var(--ink);
  background: #FFFEF8; border: var(--line); border-radius: 8px;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { outline: 3px solid var(--blue); outline-offset: 1px; }
.field__err { min-height: 1em; font-size: 12px; color: var(--red); }
.field__hint { margin: 4px 0; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 8px; text-transform: none !important; letter-spacing: 0 !important; font-weight: 400 !important; }
.form__status { grid-column: 1 / -1; margin: 0; min-height: 1.4em; font-weight: 600; }
.form__status.is-ok { color: #1E6B3A; }
.form__status.is-err { color: var(--red); }
.contact__form .btn { grid-column: 1 / -1; justify-self: start; }

.footer { max-width: 1240px; margin: 64px auto 0; padding: 24px 20px 40px; display: flex; flex-direction: column; align-items: center; gap: 10px; border-top: var(--line); text-align: center; }
.footer .label { margin: 0; color: var(--ink); }
.footer__links { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: 18px; font-size: 13px; }

/* ---------- Listagens ---------- */
.list { max-width: 1240px; margin: 0 auto; padding: 48px 20px 0; }
.list__head { max-width: 760px; margin: 0 auto 36px; text-align: center; }
.list__title { margin: 0 0 14px; font: 700 clamp(40px, 6vw, 72px)/1 var(--f-title); }
.list__text { margin: 0; color: var(--muted); }
.notice { display: inline-block; margin: 0 0 14px; padding: 12px 16px; background: var(--blue-bg); color: var(--blue); font-weight: 500; }
.seal {
  display: inline-block; margin: 0 0 16px; padding: 8px 16px;
  font: 500 14px/1.45 var(--f-mono);
  border: var(--line); border-radius: 14px; background: var(--blue-bg); color: var(--blue);
}
.seal--page { margin-top: 18px; }
.filters { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-bottom: 36px; }
.empty { max-width: 520px; margin: 0 auto; padding: 24px; text-align: center; }

/* flex em vez de grid: linha incompleta (ex.: 1 peça só) fica centralizada */
.grid { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 36px 28px; }
.card { width: calc((100% - 56px) / 3); }
.card__link { display: block; text-decoration: none; text-align: center; }
.card__media {
  display: block; aspect-ratio: 1 / 1; overflow: hidden; margin-bottom: 14px;
  background: var(--card); border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}
.card__media.is-loading { animation: skeleton 1.1s ease-in-out infinite alternate; } /* pulsa enquanto o mockup carrega */
@keyframes skeleton { from { background-color: var(--card); } to { background-color: #E4E1D2; } }
.card__media img { width: 100%; height: 100%; object-fit: contain; } /* mockup fora do 1:1 aparece inteiro, sem corte */
.card__link:hover .card__media, .card__link:focus-visible .card__media { transform: translate(-3px, -6px); box-shadow: 9px 12px 0 var(--ink); }
.card__label { display: block; margin-bottom: 2px; }
.card__title { display: block; font: 600 21px/1.2 var(--f-title); }
.pager { display: flex; width: fit-content; margin: 44px auto 0; }

/* ---------- Modal ---------- */
.modal {
  width: min(1120px, calc(100vw - 40px)); max-width: none;
  max-height: calc(100vh - 40px); padding: 0; border: 0; background: transparent; color: var(--ink);
  overflow: visible;
}
.modal[open]:not(:modal) { position: fixed; inset: 20px; margin: auto; z-index: 50; } /* sem JS */
.modal::backdrop { background: rgba(26, 26, 26, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal__card {
  position: relative; max-height: calc(100vh - 40px); overflow: hidden;
  background: var(--card); border: var(--line); border-radius: 16px; box-shadow: var(--shadow-lg);
}
.modal[open] .modal__card { animation: pop 260ms var(--ease); }
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.modal__close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 40px; height: 40px; display: grid; place-items: center;
  border: var(--line); border-radius: 50%; background: var(--card); box-shadow: 2px 2px 0 var(--ink);
}
.modal__close:hover { background: var(--blue-bg); }
/* Barra de leitura: sticky para acompanhar também quando o cartão inteiro rola (celular) */
.modal__progress {
  position: sticky; top: 0; z-index: 3; height: 4px; margin-bottom: -4px;
  background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform 80ms linear;
}
.sheet__tools { margin: 0 0 16px; }

.sheet { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
/* Cada coluna limita a própria altura; sem isso a linha do grid cresce com a copy e nada rola */
.sheet__media, .sheet__text { max-height: calc(100vh - 44px); }
.sheet__media { padding: 28px; display: flex; flex-direction: column; align-items: center; gap: 18px; border-right: var(--line); background: var(--bg); overflow: auto; }
.sheet__media img { width: 100%; max-height: calc(100vh - 180px); object-fit: contain; border-radius: 8px; }
.sheet__text { padding: 30px 34px; overflow-y: auto; overscroll-behavior: contain; }
.sheet__title { margin: 0 52px 6px 0; font: 700 clamp(28px, 3.4vw, 42px)/1.05 var(--f-title); }
.sheet__meta { margin: 0; color: var(--muted); }
.sheet hr { margin: 18px 0; }
.sheet__sign { display: block; height: 96px; width: auto; margin: 28px 0 0 auto; } /* assina no fim, canto inferior direito */
.copytext { white-space: pre-wrap; overflow-wrap: anywhere; font: 400 15px/1.75 var(--f-mono); }
.bts { margin-bottom: 22px; padding: 14px 18px; background: var(--bg); box-shadow: 3px 3px 0 var(--ink); }
.bts dl { margin: 0; display: grid; gap: 8px; }
.bts dt { font: 600 11px/1.4 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.bts dd { margin: 0; }

.prose { font: 400 16px/1.75 var(--f-mono); }
.prose h1, .prose h2, .prose h3 { font-family: var(--f-title); font-weight: 600; line-height: 1.15; margin: 1.4em 0 .5em; }
.prose h1 { font-size: 30px; } .prose h2 { font-size: 26px; } .prose h3 { font-size: 21px; }
.prose > :first-child { margin-top: 0; }
.prose blockquote { margin: 1.2em 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--red); font: italic 22px/1.35 var(--f-serif); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose code { background: var(--bg); padding: 1px 5px; border-radius: 4px; }

/* ---------- Sobre mim ---------- */
.about { max-width: 980px; margin: 56px auto 0; padding: 0 20px; }
.about__card { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); overflow: hidden; }
.about__photo { width: 100%; height: 100%; object-fit: cover; border-right: var(--line); }
.about__text { padding: 32px 36px; align-self: center; }
.about__text .prose p { margin: 0 0 1em; }

/* ---------- Baú ---------- */
.chest { margin: 64px auto 0; padding: 0 20px; text-align: center; }
.chest__link { display: inline-block; width: min(280px, 70vw); transition: transform 200ms var(--ease); }
.chest__link:hover, .chest__link:focus-visible { transform: translateY(-6px) rotate(-2deg); }
.chest__link img { width: 100%; }
.chest__link.is-open { transform: scale(1.06); }
.chest__hint { margin-top: 6px; color: var(--muted); }
.chest__title { margin: 0 0 8px; font: 600 clamp(28px, 3.6vw, 44px)/1.15 var(--f-title); }
.flash__title { font-size: clamp(32px, 4.4vw, 54px); line-height: 1.1; }
.deck__hint { margin: 14px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.flash__letter { margin: 40px 0 0; text-align: center; }
.deck__more { margin: 14px 0 0; text-align: center; }
.notfound { text-align: center; }
.notfound__img { width: min(240px, 60vw); margin: 0 auto 8px; transform: rotate(-6deg); }
.notfound__back { margin: 0; }
.deck:not(.is-stacked) :is(.deck__nav, .deck__hint, .deck__more) { display: none; } /* sem JS: só a lista */
/* Círculo que sai do baú e cobre a tela: o JS posiciona e define a escala final */
.iris {
  position: fixed; z-index: 100; width: 100px; height: 100px; border-radius: 50%;
  background: var(--ink); pointer-events: none;
  transform: scale(0); will-change: transform;
  transition: transform 750ms cubic-bezier(.6, 0, .4, 1);
}

/* Chegada no /bau: o círculo se abre do centro, como no fim dos desenhos antigos */
@property --iris { syntax: "<length>"; inherits: false; initial-value: 0px; }
.page-flash::after {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; background: var(--ink);
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent var(--iris), #000 calc(var(--iris) + 1px));
  mask: radial-gradient(circle at 50% 50%, transparent var(--iris), #000 calc(var(--iris) + 1px));
  animation: iris-open 850ms cubic-bezier(.6, 0, .4, 1) 100ms forwards;
}
@keyframes iris-open { to { --iris: 150vmax; } }

/* ---------- Flashcards ---------- */
.deck { max-width: 600px; margin: 0 auto; }
.deck__cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; } /* sem JS: lista simples */
.fcard {
  display: flex; flex-direction: column; justify-content: center; gap: 14px;
  padding: 32px 36px; text-align: center; overflow-y: auto;
}
.fcard .label { margin: 0; }
.fcard__text { margin: 0; white-space: pre-line; }
.fcard--hook .fcard__text { font: 600 clamp(22px, 3vw, 30px)/1.25 var(--f-title); }
.fcard--pilula { background: var(--blue-bg); }
.fcard--pilula .label { color: var(--blue); }
.fcard--pilula .fcard__text { font: 400 17px/1.65 var(--f-mono); }
.fcard__source { margin: 0; font-size: 13px; color: var(--muted); }

/* Com JS: pilha de cartões de visita, só o de cima à mostra */
.deck.is-stacked .deck__cards { display: block; position: relative; aspect-ratio: 1.6; margin: 0 14px 14px 0; cursor: pointer; }
.deck.is-stacked .fcard {
  position: absolute; inset: 0; margin: 0;
  transition: transform 450ms var(--ease), opacity 450ms var(--ease);
}
.fcard[data-pos="0"] { z-index: 3; }
.fcard[data-pos="1"] { z-index: 2; transform: translate(7px, 8px) rotate(1.5deg); }
.fcard[data-pos="2"] { z-index: 1; transform: translate(14px, 16px) rotate(3deg); }
.fcard[data-pos="hidden"] { z-index: 0; opacity: 0; transform: translate(14px, 16px) rotate(3deg); }
.fcard[data-pos="out"] { z-index: 4; opacity: 0; transform: translateX(-115%) rotate(-10deg); }
.deck.is-stacked .fcard:not([data-pos="0"]) > * { visibility: hidden; } /* cartas de trás: só a borda aparece */
.deck__nav { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 28px; }
.deck__btn { position: static; transform: none; }
.deck__count { margin: 0; color: var(--ink); min-width: 70px; }

/* ---------- Admin ---------- */
.admin { max-width: 1100px; margin: 0 auto; padding: 36px 20px 0; }
.page-admin .nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.page-admin .nav form { margin: 0; }
.admin-tabs { box-shadow: none; }
.admin__title { margin: 0 0 22px; font: 700 40px/1.05 var(--f-title); }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-card { padding: 24px; margin-bottom: 20px; }
.admin-login { max-width: 420px; margin: 40px auto; display: grid; gap: 14px; }
.admin-form { display: grid; gap: 18px; }
.admin-form .btn--primary { justify-self: start; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.admin-actions form { margin: 0; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid #C9C6B6; vertical-align: middle; }
.table th { font: 600 11px/1.4 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
.table tr:last-child td { border-bottom: 0; }
.table__actions { display: flex; gap: 8px; justify-content: flex-end; }
.table__actions form { margin: 0; }
.mono { font-family: var(--f-mono); }
.thumb { width: 80px; height: 80px; object-fit: cover; border: var(--line); border-radius: 6px; }
.md-preview { padding: 18px; margin-top: 10px; }
.msg.is-read { opacity: .7; }
.msg__name { margin: 0; font: 600 24px/1.2 var(--f-title); }
.msg__meta { margin: 4px 0 12px; color: var(--muted); }

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
  /* Telas menores: título em cima; os dois pares de links lado a lado embaixo */
  .nav { grid-template-columns: 1fr 1fr; row-gap: 6px; column-gap: 6px; }
  .nav__title { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
  .nav__links--left { grid-row: 2; justify-self: end; }
  .nav .nav__links--right { grid-row: 2; justify-self: start; } /* .nav vence o ".nav > :last-child" */
}
@media (max-width: 1000px) {
  .card { width: calc((100% - 28px) / 2); }
}
@media (max-width: 760px) {
  /* ===== Mobile: uma ideia por tela, navegação no polegar, nada flutuando sobre o texto ===== */
  /* ===== Mobile: leitura fácil para qualquer idade — imagens grandes, letra maior, toques de 44px ===== */

  /* Topo: título + Surpreenda-me ficam presos no topo; a linha de links vem logo abaixo e some ao rolar */
  .nav-wrap { padding: 10px 12px 6px; }
  .nav { display: flex; justify-content: center; padding: 8px 12px; }
  .nav .nav__links { display: none; }
  .nav__title { font-size: 17px; gap: 6px; }
  .nav__sign { height: 40px; margin: -6px 0; }
  .nav__tab { font-size: 15px; padding: 8px 28px 10px; }
  .admin-tabs { order: 3; }
  .mnav { display: flex; justify-content: center; flex-wrap: wrap; gap: 2px; padding: 12px 10px 0; }
  .mnav a {
    min-height: 44px; display: flex; align-items: center; padding: 0 12px; border-radius: 8px;
    font: 500 15px/1.2 var(--f-mono); color: var(--ink); text-decoration: none;
  }
  .mnav a[aria-current="page"] { background: var(--ink); color: var(--bg); }

  /* Home: mesma ordem do computador (título, citação, objeto), só que maior */
  .stage { padding: 18px 16px 4px; }
  .stage__head { min-height: 218px; justify-content: flex-start; } /* medido: citação mais longa a 360px; sobra fica embaixo */
  .stage__title { font-size: 38px; margin-bottom: 8px; }
  .quote p { font-size: 18px; }
  .quote figcaption { font-size: 12px; }
  .carousel { height: 320px; margin: 0 0 10px; }
  .carousel__item { width: min(290px, 74vw); }
  .carousel__item:not(.is-active) { opacity: 0 !important; } /* só o objeto em foco, grande e nítido */
  .carousel__num { font-size: 240px; }
  .carousel__arrow { width: 44px; height: 44px; box-shadow: 2px 2px 0 var(--ink); }
  .dots { gap: 14px; margin: 0 0 18px; }
  .dots__dot { width: 14px; height: 14px; }
  .swipe-hint { margin: -10px 0 14px; font-size: 13px; }
  /* Números: sem caixa pesada, só fios finos; letra legível */
  .specs { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); width: 100%; margin-bottom: 20px; background: none; border: 0; box-shadow: none; }
  .specs__col { padding: 10px; border-left: 1px solid #CFCBBC; }
  .specs__col:nth-child(odd) { border-left: 0; }
  .specs__col:nth-child(n+3) { border-top: 1px solid #CFCBBC; }
  .specs__col:only-child { grid-column: 1 / -1; }
  .specs dt { font-size: 12px; }
  .specs dd { font-size: 17px; }
  .btn--lg { padding: 15px 28px; font-size: 17px; }

  /* Sobre mim: a foto inteira, sem corte */
  .about { margin-top: 48px; padding: 0 16px; }
  .about__card { grid-template-columns: 1fr; }
  .about__photo { height: auto; border-right: 0; border-bottom: var(--line); }
  .about__text { padding: 22px 20px 24px; }
  .about__text .prose { font-size: 16px; line-height: 1.75; }

  .contact { margin-top: 48px; padding: 0 16px; }
  .contact__title { font-size: 26px; margin-bottom: 20px; }
  .contact__buttons { flex-direction: column; align-items: stretch; max-width: 360px; margin: 0 auto; gap: 14px; }
  .contact__buttons .btn { padding: 16px 20px; font-size: 17px; }
  .contact__form { grid-template-columns: 1fr; padding: 18px; }

  .chest { margin-top: 52px; }
  .chest__title { font-size: 28px; }
  .chest__link { width: min(280px, 72vw); }
  .chest__hint { font-size: 13px; }
  .footer { margin-top: 44px; }
  .footer__links { font-size: 15px; }

  /* Listagens: mockups na largura toda, textos maiores */
  .list { padding: 24px 16px 0; }
  .list__head { margin-bottom: 22px; }
  .list__title { font-size: 34px; }
  .list__text, .notice, .seal { font-size: 15px; line-height: 1.6; }
  .notice { padding: 12px 14px; box-shadow: none; }
  .seal { box-shadow: none; }
  .filters { gap: 10px; margin-bottom: 24px; }
  .tabs { box-shadow: none; }
  .tabs a { padding: 10px 14px; font-size: 15px; } /* toque confortável */
  .grid { gap: 32px; }
  .card { width: 100%; }
  .card__media { box-shadow: 3px 3px 0 var(--ink); }
  .card__label { font-size: 12px; }
  .card__title { font-size: 21px; }

  /* Baú */
  .flash__title { font-size: 30px; }
  .deck.is-stacked .deck__cards { aspect-ratio: 1; margin: 0 10px 10px 0; }
  .fcard { padding: 24px 22px; }
  .fcard--hook .fcard__text { font-size: 24px; }
  .fcard--pilula .fcard__text { font-size: 17px; }
  .fcard__source { font-size: 14px; }
  .deck__nav { margin-top: 22px; }
  .deck__count { font-size: 14px; }
  .deck__hint { font-size: 14px; }
  .deck__more .btn { border: 0; box-shadow: none; background: none; text-decoration: underline; color: var(--ink); font-size: 15px; }
  .flash__letter { margin-top: 28px; }

  /* Modal em tela cheia: mockup grande para entender a peça, texto confortável */
  .modal, .modal[open]:not(:modal) { width: 100vw; height: 100dvh; max-height: none; margin: 0; inset: 0; }
  .modal__card { height: 100%; max-height: none; border-radius: 0; border: 0; overflow-y: auto; }
  .sheet { display: block; }
  .sheet__media, .sheet__text { max-height: none; } /* no celular o cartão inteiro rola */
  .sheet__media { border-right: 0; border-bottom: var(--line); padding: 64px 16px 18px; overflow: visible; }
  .sheet__media img { width: 100%; max-height: 62vh; }
  .sheet__text { padding: 22px 18px 48px; overflow: visible; }
  .sheet__title { margin-right: 0; font-size: 28px; }
  .sheet__meta { font-size: 15px; }
  .copytext { font-size: 16px; line-height: 1.75; }
  .prose { font-size: 16px; }
  .modal__close { width: 46px; height: 46px; }
  .modal__close { position: fixed; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .page-flash::after { display: none; } /* sem animação, o véu do círculo ficaria preto */
}
