/* Universo Rabisco — página da série.
   Tokens do design system da família (docs/identidade/Universo Rabisco — design system.md);
   pauta, fita, borda rasgada e marca-texto seguem a home ilustrada do Distrito Rabisco.
   Kraft vem do tema Cardboard do Distrito. */

@font-face { font-family: 'Patrick Hand'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/patrick-hand-400.woff2) format('woff2'); }
@font-face { font-family: 'Caveat'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/caveat-600.woff2) format('woff2'); }

:root {
  --ink: #1018ad;
  --ink-2: #242f91;
  --ink-kraft: #17275f;
  --marker: #ffcf23;
  --red: #be3a3c;
  --paper: #f6f3e6;
  --paper-layer: #f8f5e9;
  --paper-field: #fffdf7;
  --paper-veil: #fffdf477;
  --kraft: #bf976b;
  --kraft-deep: #a8825a;
  --rules: repeating-linear-gradient(0deg, transparent 0 27px, #496abb14 27px 28px);
  --marker-fill: repeating-linear-gradient(137deg, #ffcd27 0 4px, #ffe987 4px 5px, #ffd434 5px 10px);
  --torn-edge: polygon(.6% 3%, 3% 1%, 8% 2%, 13% 0, 19% 2%, 25% 1%, 30% 2%, 36% 0, 42% 2%, 49% 1%, 55% 2%, 63% 0, 69% 2%, 74% 1%, 81% 2%, 89% 0, 95% 2%, 99.6% 0, 99% 12%, 100% 23%, 99.3% 37%, 100% 52%, 99.2% 69%, 100% 84%, 99.3% 99%, 94% 97%, 88% 100%, 82% 98%, 75% 100%, 67% 97%, 60% 100%, 53% 98%, 46% 100%, 38% 98%, 31% 100%, 24% 98%, 17% 100%, 10% 98%, 3% 100%, 0 97%, 1% 84%, 0 70%, .8% 55%, 0 40%, .8% 25%, 0 12%);
  --tape-edge: polygon(0 6%, 7% 0, 11% 7%, 18% 2%, 23% 7%, 31% 0, 38% 5%, 46% 0, 53% 8%, 61% 1%, 67% 5%, 77% 0, 84% 5%, 91% 0, 100% 6%, 98% 94%, 91% 100%, 83% 95%, 76% 100%, 68% 96%, 59% 100%, 51% 95%, 42% 100%, 34% 95%, 26% 100%, 18% 95%, 8% 100%, 0 94%);
  --font-hand: 'Patrick Hand', 'Comic Sans MS', cursive;
  --font-note: 'Caveat', 'Patrick Hand', cursive;
  --font-body: Arial, Helvetica, sans-serif;
  --r-action: 5px 8px 3px 6px;
  --r-panel: 3px 6px 3px 5px;
  --head: 64px;
  --margin-x: clamp(34px, 6.4vw, 104px);
  --gutter: clamp(16px, 3.2vw, 52px);
  --cursor-pen: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M3 29l3-8L24 3l5 5L11 26z' fill='%23fffdf7' stroke='%231018ad' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M3 29l3-8 5 5z' fill='%231018ad'/%3E%3Cpath d='M20 7l5 5' stroke='%231018ad' stroke-width='1.6'/%3E%3C/svg%3E") 3 29, crosshair;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: calc(var(--head) + 8px); -webkit-text-size-adjust: 100%; }
body {
  position: relative; margin: 0; min-height: 100vh; overflow-x: clip;
  color: var(--ink); font: 16px/28px var(--font-body);
  background: var(--rules), var(--paper);
}
/* Margem dupla vermelha e furos do caderno correm a página inteira. */
body::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: var(--margin-x); width: 5px; z-index: 0; pointer-events: none;
  border-left: 1.5px solid #e2999b; border-right: 1px solid #edbcbd;
}
body::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: clamp(8px, 1.6vw, 26px); width: 18px; z-index: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, #ddd5bf 0 5px, #c8bd9f 5.6px 6.4px, transparent 7px) 0 20px / 18px 56px repeat-y;
}
::selection { background: #ffe36e; color: var(--ink); }
img { max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px dashed #b82030; outline-offset: 4px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 8px 14px; background: var(--paper-field); border: 2px solid var(--ink); font: 20px/1 var(--font-hand); text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- Topo ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 40; height: var(--head);
  display: flex; align-items: center; gap: clamp(12px, 3vw, 40px);
  padding: 0 var(--gutter) 0 calc(var(--margin-x) + 18px);
  background: #f6f3e6e0; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border-bottom: 1.5px solid #1018ad1c;
  transition: transform .35s ease, background-color .35s ease;
}
.topbar.is-kraft { background: #bf976be6; border-bottom-color: #17275f30; }
.brand { display: flex; align-items: center; gap: 5px; text-decoration: none; white-space: nowrap; }
.brand__prefix { font: 600 22px/1 var(--font-note); transform: rotate(-5deg); }
.brand__logo { display: block; width: auto; height: 43px; }
.nav { display: flex; gap: clamp(10px, 2vw, 28px); margin-left: auto; }
.nav a { position: relative; text-decoration: none; font: 22px/1.2 var(--font-hand); padding: 6px 4px; }
.nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 4px; height: 7px; z-index: -1;
  background: var(--marker-fill); border-radius: 60% 20% 40% 15%; transform: scaleX(0) rotate(-2deg); transform-origin: 0 50%;
  transition: transform .22s ease;
}
.nav a:hover::after, .nav a:focus-visible::after { transform: scaleX(1) rotate(-2deg); }
.sound-toggle {
  display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 4px 12px 4px 8px; cursor: pointer;
  background: var(--paper-veil); border: 1.5px solid currentColor; border-radius: var(--r-action);
  font: 19px/1 var(--font-hand); white-space: nowrap;
}
.sound-toggle svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sound-toggle__body { fill: #fffdf7; }
.sound-toggle__on { display: none; }
.sound-toggle[aria-pressed=true] .sound-toggle__on { display: inline; }
.sound-toggle[aria-pressed=true] .sound-toggle__off { display: none; }
.sound-toggle[aria-pressed=true] { background: var(--marker-fill); border-color: #d9a406; }

/* ---------- Peças comuns ---------- */
.eyebrow { margin: 0 0 6px; font: 600 24px/1.1 var(--font-note); color: var(--red); transform: rotate(-1.5deg); transform-origin: 0 50%; }
.margin-note { font: 600 23px/1.05 var(--font-note); color: var(--ink-2); margin: 0; }
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 8px 22px; cursor: pointer; text-decoration: none; white-space: nowrap;
  font: 400 clamp(22px, 2vw, 30px)/1 var(--font-hand); color: var(--ink);
  border: 2px solid var(--ink); border-radius: var(--r-action);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.btn img { width: 36px; height: 36px; mix-blend-mode: multiply; transition: transform 160ms ease; }
.btn--marker { background: var(--marker-fill); transform: rotate(-.8deg); }
.btn--marker::before { content: ''; position: absolute; inset: -6px -5px; border: 2px solid #f6b807; border-radius: 8px 2px 7px 4px; transform: rotate(1.5deg); pointer-events: none; }
.btn--marker:hover { transform: translateY(-3px) rotate(-1.4deg); box-shadow: 3px 5px 0 #b7852138; }
.btn--marker:hover img { transform: translateX(4px); }
.btn--paper { background: var(--paper-veil); }
.btn--paper:hover { transform: translateY(-2px) rotate(.6deg); box-shadow: 2px 4px 0 #1018ad22; }
.btn:active { transform: translateY(2px) scale(.99); box-shadow: none; }
.tape {
  position: absolute; z-index: 4; width: 92px; height: 34px; pointer-events: none;
  background: #e1d6bd url(../assets/paper-fiber.webp); background-blend-mode: multiply; opacity: .9;
  clip-path: var(--tape-edge); box-shadow: 1px 2px 3px #473c4a44;
}
.tape--l { top: -14px; left: 26px; transform: rotate(-9deg); }
.tape--r { top: -12px; right: 26px; transform: rotate(8deg); }
.toy .tape { left: 50%; right: auto; margin-left: -46px; }

.section-head { position: relative; z-index: 2; max-width: 1040px; margin: 0 auto; padding: 0 var(--gutter); text-align: center; }
.section-title--stack span { display: block; }
.section-title { text-wrap: balance; position: relative; display: inline-block; margin: 0 0 18px; font: 400 clamp(46px, 6.4vw, 96px)/1 var(--font-hand); letter-spacing: -1px; -webkit-text-stroke: 1px currentColor; }
.section-title::after {
  content: ''; position: absolute; left: -2%; right: -4%; bottom: -8px; height: 10px; z-index: -1;
  background: var(--marker-fill); border-radius: 60% 20% 40% 15%; box-shadow: 0 4px 0 -1px #ffcc26;
  transform: scaleX(0) rotate(-1.6deg); transform-origin: 0 50%; transition: transform .7s cubic-bezier(.2,.8,.2,1) .15s;
}
.section-title.is-in::after { transform: scaleX(1) rotate(-1.6deg); }
.section-lead { text-wrap: pretty; margin: 0 auto; max-width: 640px; font: 400 clamp(21px, 1.9vw, 27px)/1.2 var(--font-hand); }
.fineprint { margin: 14px auto 0; max-width: 560px; font: 13px/1.5 var(--font-body); opacity: .82; }

/* ---------- Abertura ----------
   Um gesto principal: o título em duas linhas, o retalho da folha de exercício que sobrou do
   rasgo e o elenco andando na mesma linha de chão que os rabiscos vivos. Cabe inteiro na tela. */
.hero {
  --ground: clamp(92px, 12vh, 124px);
  position: relative; isolation: isolate; min-height: max(100svh, 640px); overflow: hidden;
  perspective: 1150px; perspective-origin: var(--ox, 50%) var(--oy, 34%);
  display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr); align-items: center; column-gap: clamp(16px, 3vw, 56px);
  padding: calc(var(--head) + clamp(18px, 3.5vh, 44px)) var(--gutter) calc(var(--ground) + 18px) calc(var(--margin-x) + clamp(22px, 3.4vw, 56px));
}
.hero__canvas { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; cursor: var(--cursor-pen); touch-action: pan-y; }
.hero.is-drawing .hero__canvas { touch-action: none; }
.hero__ground { position: absolute; z-index: 1; left: var(--margin-x); right: 0; bottom: calc(var(--ground) - 7px); width: calc(100% - var(--margin-x)); height: 14px; overflow: visible; pointer-events: none; }
.hero__ground path { fill: none; stroke: var(--ink); stroke-linecap: round; vector-effect: non-scaling-stroke; }
.hero__ground-line { stroke-width: 2.4; }
.hero__ground-echo { stroke-width: 1; opacity: .35; }
.hero__ground { clip-path: inset(-10px 100% -10px 0); }
.hero.is-awake .hero__ground, html:not(.has-exercise) .hero__ground { animation: reveal-ground 1s cubic-bezier(.5,0,.3,1) .3s forwards; }

.hero__copy { position: relative; grid-row: 1; grid-column: 1; min-width: 0; }
.hero__copied { position: relative; display: block; width: fit-content; margin: 0 0 clamp(8px, 1.6vh, 16px) -6px; font: 600 clamp(17px, 1.6vw, 24px)/1.2 'Courier New', ui-monospace, monospace; letter-spacing: .5px; color: #5b6470; -webkit-text-stroke: 0; filter: drop-shadow(1px 2px 1px #2a19053a) drop-shadow(2px 6px 6px #2a19051f); transform: rotate(-2.2deg); transform-origin: 0 100%; }
/* Retalho da folha de exercício: papel quadriculado frio, bordas rasgadas, preso com fita. */
.hero__copied s {
  position: relative; display: block; padding: 12px 26px 13px 20px; text-decoration: none;
  background: linear-gradient(#b9c2cc66 1px, transparent 1px) 0 0 / 14px 14px, linear-gradient(90deg, #b9c2cc66 1px, transparent 1px) 0 0 / 14px 14px, #eef0f2;
  clip-path: polygon(0 8%, 4% 0, 9% 6%, 15% 1%, 22% 7%, 29% 2%, 36% 8%, 44% 1%, 51% 6%, 58% 0, 66% 7%, 73% 2%, 80% 8%, 87% 1%, 93% 6%, 100% 2%, 99% 50%, 100% 97%, 94% 92%, 88% 99%, 81% 93%, 74% 100%, 66% 94%, 59% 99%, 51% 92%, 43% 100%, 35% 94%, 27% 99%, 19% 92%, 11% 100%, 5% 94%, 0 98%, 1% 52%);
}
.hero__copied s::after {
  content: ''; position: absolute; left: 12px; right: 16px; top: 49%; height: 4px; border-radius: 3px;
  background: #d42a2f; transform: scaleX(0) rotate(-1.5deg); transform-origin: 0 50%;
}
.hero__copied::before {
  content: ''; position: absolute; z-index: 2; left: -18px; top: -9px; width: 64px; height: 24px;
  background: #e1d6bd url(../assets/paper-fiber.webp); background-blend-mode: multiply; opacity: .9;
  clip-path: var(--tape-edge); transform: rotate(-24deg);
}
.hero__void {
  position: absolute; z-index: 1; right: -30px; bottom: -20px; padding: 3px 8px; transform: rotate(8deg);
  font: 700 11px/1.1 'Courier New', monospace; letter-spacing: 1.5px; text-transform: uppercase; color: #b4575a;
  border: 2px double #b4575a; border-radius: 3px; opacity: .75; mix-blend-mode: multiply; white-space: nowrap;
}
.hero__void::after { content: ''; position: absolute; inset: 40% -6px auto -6px; height: 3px; background: #d42a2f; transform: rotate(-9deg); border-radius: 2px; }
.hero.is-awake .hero__copied, html:not(.has-exercise) .hero__copied { animation: slap-in .42s steps(4, end) .05s both; }
.hero.is-awake .hero__copied s::after, html:not(.has-exercise) .hero__copied s::after { animation: sweep-strike .4s cubic-bezier(.3,.7,.2,1) .5s forwards; }

.hero__title { margin: 0 0 6px; font: 400 clamp(46px, min(6.6vw, 12.8vh), 150px)/.95 var(--font-hand); letter-spacing: -1.5px; -webkit-text-stroke: 1.2px var(--ink); }
.hero__title .line { display: block; clip-path: inset(-20% 100% -20% 0); white-space: nowrap; }
.hero.is-awake .hero__title .line, html:not(.has-exercise) .hero__title .line { animation: write .8s cubic-bezier(.6,.05,.3,1) .45s both; }
.hero.is-awake .hero__title .line:nth-of-type(2), html:not(.has-exercise) .hero__title .line:nth-of-type(2) { animation-delay: .9s; }
.marker-word { position: relative; isolation: isolate; background: none; color: inherit; }
.marker-word::before {
  content: ''; position: absolute; z-index: -1; left: -3%; right: -5%; top: 50%; bottom: 2%;
  background: var(--marker-fill); border-radius: 40% 12% 30% 8% / 60% 24% 50% 30%;
  transform: scaleX(0) rotate(-2deg); transform-origin: 0 50%;
}
.hero.is-awake .marker-word::before, html:not(.has-exercise) .marker-word::before { animation: sweep .55s cubic-bezier(.3,.7,.2,1) 1.6s forwards; }
.hero__by { margin: clamp(14px, 2.6vh, 24px) 0 4px; font: 600 23px/1 var(--font-note); color: var(--red); transform: rotate(-1deg); transform-origin: 0 50%; animation: fade-in .6s ease 1.1s both; }
.hero__lead { max-width: 34em; margin: 0 0 clamp(18px, 3.2vh, 30px); font-size: 18px; line-height: 28px; color: var(--ink-2); text-wrap: pretty; animation: fade-in .7s ease 1.2s both; }
.hero__actions { position: relative; z-index: 3; display: flex; flex-wrap: wrap; gap: 18px 22px; align-items: center; animation: fade-in .7s ease 1.4s both; }
.toolbox { position: absolute; z-index: 3; left: calc(var(--margin-x) + clamp(22px, 3.4vw, 56px)); bottom: calc(var(--ground) - 62px); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; animation: fade-in .7s ease 1.6s both; }
.toolbox__label { font: 600 22px/1 var(--font-note); }
.pens { display: flex; gap: 8px; }
.pen {
  position: relative; width: 34px; height: 34px; padding: 0; cursor: pointer; border: 0; background: none;
}
.pen::before { content: ''; position: absolute; inset: 5px; border-radius: 48% 52% 45% 55%; background: var(--pen); box-shadow: inset -3px -3px 0 #00000026; }
.pen::after { content: ''; position: absolute; inset: 0; border: 2px solid transparent; border-radius: 50% 44% 52% 46%; transition: border-color .15s, transform .15s; }
.pen[aria-checked=true]::after { border-color: var(--pen); transform: rotate(-12deg) scale(1.08); }
.pen:hover::before { transform: translateY(-2px); }
.toolbox__draw { display: none; min-height: 44px; padding: 4px 14px; cursor: pointer; background: var(--paper-veil); border: 1.5px solid var(--ink); border-radius: var(--r-action); font: 20px/1 var(--font-hand); }
.toolbox__draw[aria-pressed=true] { background: var(--marker-fill); }
.toolbox__count { font: 600 21px/1 var(--font-note); color: var(--ink-2); }
.toolbox__clear { min-height: 44px; padding: 0 6px; cursor: pointer; border: 0; background: none; font: 20px/1 var(--font-hand); text-decoration: underline wavy #be3a3c88; text-underline-offset: 5px; }

/* Elenco em pé na linha de chão: recortes de papel que saltaram da folha (pop-up). */
.hero__stage {
  --h: min(56vh, 31vw, 580px);
  /* Mesmo nível do canvas e depois dele no DOM: os rabiscos vivem na folha, atrás do elenco que saltou dela. */
  position: relative; z-index: 2; grid-row: 1; grid-column: 2; align-self: end; justify-self: end;
  width: calc(var(--h) * 1.2); height: var(--h); margin: 0 clamp(20px, 4.5vw, 90px) -18px 0; pointer-events: none;
  transform-style: preserve-3d;
}
.standee { position: absolute; bottom: 0; transform-style: preserve-3d; }
.standee--rabisco { right: 0; height: 100%; aspect-ratio: 720 / 635; transform: translateZ(90px); }
.standee--desvairado { left: -16%; height: 43%; aspect-ratio: 360 / 433; transform: translateZ(34px); }
.standee__fold { position: absolute; inset: 0; transform-style: preserve-3d; transform-origin: 50% 100%; transform: rotateX(var(--fold, 0deg)); }
.standee__pop { position: absolute; inset: 0; transform-style: preserve-3d; transform-origin: 50% 100%; }
.standee__art {
  position: absolute; inset: auto 0 -1.5% 0; width: 100%; height: auto; max-width: none; transform-origin: 50% 96%;
  /* Borda de papel recortado: a espessura aparece como um fio claro e sombra de contato. */
  filter: drop-shadow(0 0 .6px #9ea3b8) drop-shadow(1px 1px 0 #ffffff);
}
.hero__rabisco { animation: hero-run 4.6s ease-in-out infinite; }
.hero__desvairado { animation: tag-along 5.2s ease-in-out infinite; }
.hero.is-awake .standee--rabisco .standee__pop, html:not(.has-exercise) .standee--rabisco .standee__pop { animation: pop-up .9s cubic-bezier(.3,1.5,.5,1) .55s both; }
.hero.is-awake .standee--desvairado .standee__pop, html:not(.has-exercise) .standee--desvairado .standee__pop { animation: pop-up .9s cubic-bezier(.3,1.5,.5,1) .85s both; }
/* Sombra no piso, na profundidade de cada recorte. */
.standee__floorshadow {
  position: absolute; left: 8%; right: 8%; bottom: 0; height: 90px; transform-origin: 50% 100%; transform: rotateX(90deg);
  background: radial-gradient(ellipse 50% 40% at 50% 70%, #2a190547, #2a190500 72%);
}
/* Sombra projetada na parede (z = 0): a separação muda quando o ponto de vista se move. */
.standee-shadow {
  position: absolute; bottom: 0; width: auto; max-width: none; pointer-events: none; opacity: calc(.13 * (1 - var(--folded, 0)));
  filter: brightness(0) blur(5px); transform-origin: 50% 100%; transform: translateX(7%) skewX(-14deg) scaleY(.96);
}
.standee-shadow--rabisco { right: 0; height: 100%; }
.standee-shadow--desvairado { left: -16%; height: 43%; }
.standee-shadow { transition: opacity .2s linear; }
html.has-exercise .hero:not(.is-awake) .standee-shadow { opacity: 0; }

/* Piso do cartão: a parte da folha abaixo da dobra, deitada em perspectiva, com pauta e margem. */
.hero__floor {
  position: absolute; z-index: 0; left: 0; right: 0; bottom: 0; height: 520px; pointer-events: none;
  transform-origin: 50% 0; transform: translateY(calc(100% - var(--ground))) rotateX(90deg);
  background:
    linear-gradient(90deg, transparent calc(var(--margin-x) - 1px), #e2999b calc(var(--margin-x) - 1px) calc(var(--margin-x) + 1px), transparent calc(var(--margin-x) + 1px)),
    repeating-linear-gradient(180deg, transparent 0 27px, #496abb1c 27px 28px),
    linear-gradient(180deg, #ece7d6, var(--paper) 30%);
}
.hero.is-awake .hero__floor, html:not(.has-exercise) .hero__floor { animation: fade-in .5s ease .2s both; }
.hero__meet {
  position: absolute; left: -6%; top: 6%; width: 11em; font-size: clamp(19px, 1.5vw, 23px); text-align: right; transform: rotate(-6deg);
  animation: fade-in .6s ease 1.8s both;
}
.hero__meet::after { content: ''; position: absolute; right: -52px; top: 18px; width: 56px; height: 46px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 46'%3E%3Cpath d='M3 6c18-4 36 4 46 30M49 36l-12-3M49 36l2-12' fill='none' stroke='%23242f91' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }

.hero__hint {
  position: absolute; z-index: 3; left: 46%; bottom: calc(var(--ground) + 18px); width: 180px; pointer-events: none;
  color: var(--red); transform: rotate(-4deg); animation: fade-in .6s ease 2.2s both; transition: opacity .4s ease;
}
.hero__hint.is-faded { opacity: 0; }
.hint-arrow { display: block; width: 70px; height: 40px; margin: 0 0 0 110px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 160; stroke-dashoffset: 160; animation: draw-stroke .9s ease 2.6s forwards; }
.hero__next { position: absolute; z-index: 3; left: 50%; bottom: calc(var(--ground) - 56px); translate: -50% 0; display: flex; align-items: center; gap: 6px; text-decoration: none; font: 600 22px/1 var(--font-note); color: var(--ink-2); }
.hero__next svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; animation: nudge 1.8s ease-in-out infinite; }
@media (max-height: 740px) and (min-width: 761px) { .hero__hint { display: none; } }

/* ---------- Faixa ---------- */
.band { position: relative; z-index: 6; margin: -34px -2vw 0; padding: 10px 0 8px; overflow: hidden; transform: rotate(-1.4deg); background: var(--marker-fill); border-block: 2px solid #efb207; box-shadow: 0 6px 12px -8px #6c4a0a88; }
.band__track { display: flex; align-items: center; gap: 26px; width: max-content; animation: marquee 42s linear infinite; font: 400 clamp(26px, 2.6vw, 38px)/1 var(--font-hand); white-space: nowrap; }
.band__track i { font-style: normal; color: var(--red); font-size: .8em; }

/* ---------- Jogos: mesa de papelão ---------- */
.games {
  --ink: var(--ink-kraft);
  position: relative; z-index: 3; color: var(--ink); padding: 120px 0 18vh; margin-top: -12px;
  background: linear-gradient(#00000008, #00000008), url(../assets/kraft-256.webp) repeat 0 0 / 256px 256px var(--kraft);
}
/* Papelão de verdade: rasgos com sombra, diorama em camadas e luz de mesa. */
.tear { position: absolute; left: 0; right: 0; pointer-events: none; }
.tear--paper { top: -2px; height: 46px; z-index: 5; }
.tear--card { top: 100%; height: 42px; margin-top: -1px; z-index: 6; }
.cardscape { position: relative; pointer-events: none; }
.cardscape__svg { display: block; width: 100%; height: 100%; overflow: visible; }
.collage { position: absolute; inset: 0; }
.cardscape--land.is-raster { overflow: clip; overflow-clip-margin: 24px; }
.cardscape--sky.is-raster { overflow: clip; }
.collage__piece { position: absolute; height: auto; max-width: none; user-select: none; filter: drop-shadow(0 2px 1px #2a19058c) drop-shadow(2px 9px 8px #2a190552); }
.cardscape--land { height: clamp(260px, 32vw, 480px); margin: 10px 0 70px; }
.cardscape--land.is-vector { height: clamp(170px, 21vw, 290px); }
.cardscape--sky { position: absolute; inset: 0; z-index: 0; }
.games .section-title, .games .section-lead, .margins .section-title, .margins .section-lead { text-shadow: -1px -1px 0 #fff3dc8c; }
.flipbook.is-3d .flipbook__stage::before { content: ''; position: absolute; inset: -40px 0 0; z-index: 0; pointer-events: none; background: radial-gradient(ellipse 70% 62% at 50% 46%, transparent 58%, #2a19053d); }
.games .section-head { margin-bottom: 70px; }
.games .eyebrow { color: #7a1c1e; }
.games .section-title::after { box-shadow: 0 4px 0 -1px #d9a406; }
.games .fineprint { opacity: .9; }

.tabs { position: fixed; right: 0; top: 50%; z-index: 30; display: flex; flex-direction: column; gap: 6px; transform: translate(110%, -50%); transition: transform .45s cubic-bezier(.2,.8,.2,1); }
body.in-games .tabs { transform: translate(0, -50%); }
.tabs a {
  position: relative; display: block; width: 46px; padding: 14px 0 14px 8px; text-decoration: none;
  background: linear-gradient(#fff4e01f, #fff4e01f), url(../assets/kraft-256.webp) 0 0 / 256px 256px #c7a071; border: 0; border-left: 2px solid #efd6ab; border-radius: 3px 0 0 4px;
  box-shadow: -1px 2px 1px #2a190566, -4px 8px 10px #2a190540; transform: translateX(8px); transition: transform .24s steps(3, end);
}
.tabs a::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--accent); border-radius: 6px 0 0 6px; }
.tabs a span { display: block; writing-mode: vertical-rl; transform: rotate(180deg); font: 19px/1 var(--font-hand); color: var(--ink-kraft); }
.tabs a:hover, .tabs a[aria-current=true] { transform: translateX(0) rotate(-1deg); }
.tabs a[aria-current=true] { box-shadow: -5px 4px 0 #17275f30; }
.tabs a[aria-current=true]::before { width: 9px; }

.sheet {
  --ink: #1018ad; --covered: 0;
  position: relative; margin: 0 0 56px; color: var(--ink);
  transform: rotate(var(--tilt, 0deg)); transform-origin: 50% 0;
}
.sheet::before { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: 2px 5px 3px 2px; box-shadow: 0 1px 0 #00000012, 0 22px 44px -20px #2a1905aa, 0 5px 12px #2a190533; }
.sheet::after { content: ''; position: absolute; inset: 0; z-index: 8; pointer-events: none; background: linear-gradient(#2a1905, #2a190500 70%); opacity: calc(var(--shade, 0) * .55); border-radius: 3px; }
.sheet__back {
  position: absolute; inset: 0; z-index: 1; padding: 40px 44px; transform: rotateX(180deg);
  background: var(--rules), #efebdd url(../assets/paper-fiber.webp); border-radius: 2px 5px 3px 2px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  -webkit-mask: radial-gradient(circle at 22px calc(100% - 16px), transparent 6px, #000 7px) 0 0 / 44px 100% repeat-x;
  mask: radial-gradient(circle at 22px calc(100% - 16px), transparent 6px, #000 7px) 0 0 / 44px 100% repeat-x;
  display: none;
}
.sheet__back p { position: absolute; right: 8%; bottom: 22%; margin: 0; font: 600 26px/1.1 var(--font-note); color: #242f91aa; transform: rotate(-4deg) scaleY(-1); }
.sheet__paper {
  position: relative; height: 100%; padding: 40px clamp(20px, 3vw, 44px) 26px calc(clamp(20px, 3vw, 44px) + 30px);
  background: var(--rules), var(--paper-layer) url(../assets/paper-fiber.webp);
  border-radius: 2px 5px 3px 2px; z-index: 1;
  -webkit-mask: radial-gradient(circle at 22px 16px, transparent 6px, #000 7px) 0 0 / 44px 100% repeat-x;
  mask: radial-gradient(circle at 22px 16px, transparent 6px, #000 7px) 0 0 / 44px 100% repeat-x;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.sheet__paper::before { content: ''; position: absolute; top: 0; bottom: 0; left: 38px; width: 4px; border-left: 1.5px solid #e2999b; border-right: 1px solid #edbcbd; pointer-events: none; }
.sheet__meta { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 36px; margin-bottom: 4px; }
.sheet__page { font: 600 24px/1 var(--font-note); color: var(--red); }
.stamp {
  --stamp: var(--ink); display: inline-block; padding: 5px 14px 3px; transform: rotate(-5deg);
  font: 400 19px/1 var(--font-hand); letter-spacing: 1.5px; text-transform: uppercase; color: var(--stamp);
  border: 2.5px solid var(--stamp); border-radius: 4px 7px 3px 6px; box-shadow: inset 0 0 0 1.5px #fffdf7, inset 0 0 0 3px var(--stamp);
  opacity: .88; mix-blend-mode: multiply;
}
.stamp--live { --stamp: #1f7a34; }
.stamp--demo { --stamp: #c2410c; }
.stamp--desk { --stamp: #1018ad; }
.stamp--wip { --stamp: #be3a3c; transform: rotate(4deg); }
.stamp--new { --stamp: #7a3fb5; transform: rotate(-3deg); }
.sheet__grid { display: grid; grid-template-columns: minmax(280px, .92fr) minmax(340px, 1.3fr) minmax(150px, .46fr); gap: clamp(22px, 3vw, 48px); align-items: center; }
.sheet__info { min-width: 0; }
.sheet__logo { margin: 0 0 6px; line-height: 0; }
.sheet__logo img { display: block; width: auto; max-width: 100%; height: clamp(110px, 17vh, 170px); object-fit: contain; object-position: left center; margin-left: -12px; }
.sheet__title { margin: 0 0 14px; font: 400 clamp(46px, 4.6vw, 70px)/.95 var(--font-hand); -webkit-text-stroke: 1px currentColor; }
.sheet__tagline { margin: 0 0 10px; font: 400 clamp(23px, 2vw, 29px)/1.15 var(--font-hand); color: var(--ink-2); }
.sheet__desc { margin: 0 0 16px; max-width: 470px; font-size: 16px; line-height: 28px; color: #202a7e; }
.chips { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 0 0 22px; padding: 0; list-style: none; }
.chips li { padding: 1px 12px 0; font: 18px/28px var(--font-hand); border: 1.5px solid #1018ad99; border-radius: 55% 45% 52% 48% / 60% 50% 55% 45%; background: #fffdf7aa; }
.chips li:nth-child(even) { transform: rotate(1.2deg); }
.chips li:nth-child(odd) { transform: rotate(-.8deg); }
.sheet__actions { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; }

.toy { position: relative; margin: 0; display: flex; flex-direction: column; min-width: 0; }
.toy__canvas {
  display: block; width: 100%; aspect-ratio: 4 / 3; max-height: min(58vh, 520px); cursor: pointer; touch-action: manipulation;
  background: #fcfaf1 url(../assets/paper-fiber.webp);
  border: 1.5px solid #2937bf; border-radius: 1px 2px 5px 1px;
  box-shadow: 2px 4px 1px #1725991c, -5px 4px 0 #fbf9eb, -7px 6px 0 #2432bd45;
  -webkit-user-select: none; user-select: none;
}
.toy__canvas--pen, .toy__canvas--grab { touch-action: none; }
.toy__canvas--pen { cursor: var(--cursor-pen); }
.toy__canvas--grab { cursor: grab; }
.toy__canvas--grab.is-grabbing { cursor: grabbing; }
@media (pointer: fine) { .toy__canvas--aim { cursor: none; } }
.toy__canvas--aim[data-toy=guerra] { touch-action: none; }
/* Aviso honesto e provocação: a miniatura é só um rabisco; o jogo é bem mais legal. */
.toy__tease {
  position: absolute; z-index: 5; right: -14px; top: -30px; display: block; max-width: 230px; padding: 9px 14px 10px;
  text-decoration: none; text-align: left; color: #b0282c; transform: rotate(3deg);
  background: #fff7b8; box-shadow: 1px 2px 1px #2a190530, 2px 8px 10px -4px #2a190540; border-radius: 1px 2px 6px 1px;
  transition: transform .18s steps(2, end);
}
.toy__tease span { display: block; font: 600 20px/1.05 var(--font-note); }
.toy__tease b { display: block; margin-top: 3px; font: 400 21px/1.05 var(--font-hand); color: var(--ink); text-decoration: underline wavy #d42a2f99; text-underline-offset: 4px; }
.toy__tease:hover, .toy__tease:focus-visible { transform: rotate(-1deg) scale(1.05); }
.toy__tease::before { content: ''; position: absolute; left: 50%; top: -8px; width: 46px; height: 16px; margin-left: -23px; background: #e1d6bd url(../assets/paper-fiber.webp); background-blend-mode: multiply; opacity: .85; clip-path: var(--tape-edge); transform: rotate(-4deg); }
.toy__note { margin: 14px 0 0 6px; font: 600 23px/1.1 var(--font-note); color: var(--ink-2); }
.toy__note::before { content: '✎ '; font-family: var(--font-hand); color: var(--red); }
.toy__reset { position: absolute; right: 10px; bottom: calc(100% - 46px); z-index: 3; min-height: 36px; padding: 2px 12px; cursor: pointer; background: #fffdf7e6; border: 1.5px solid var(--ink); border-radius: var(--r-action); font: 18px/1 var(--font-hand); }
.toy__reset:hover { background: var(--marker-fill); }
.toy__reset { top: auto; bottom: -4px; right: 0; }
.toy:has(.toy__reset) .toy__note { padding-right: 140px; }
.cover { position: relative; margin: 0; transform: rotate(2.6deg); transition: transform .3s ease; }
.cover:hover { transform: rotate(.5deg) scale(1.03); }
.cover::before { content: ''; position: absolute; z-index: 2; top: -12px; left: 50%; width: 70px; height: 26px; margin-left: -35px; background: #e1d6bd url(../assets/paper-fiber.webp); background-blend-mode: multiply; opacity: .9; clip-path: var(--tape-edge); transform: rotate(-4deg); box-shadow: 1px 2px 3px #473c4a44; }
.cover--shot { transform: rotate(-2deg); }
.cover--shot img { border: 6px solid #fffdf7; box-shadow: 0 14px 26px -12px #2a1905aa, 0 2px 6px #2a190540; }
.cover img { display: block; width: 100%; height: auto; border-radius: 2px; box-shadow: 0 14px 26px -12px #2a1905aa, 0 2px 6px #2a190540; }

/* Caderno de espiral: a folha vira por cima do arame conforme a rolagem. Só quando a tela comporta a folha inteira. */
.flipbook { position: relative; max-width: 1420px; margin: 0 auto; padding: 0 clamp(16px, 4.2vw, 72px); }
.flipbook.is-3d { height: calc(var(--pages) * 100svh); padding: 0; max-width: none; }
.flipbook.is-3d .flipbook__stage {
  position: sticky; top: var(--head); height: calc(100svh - var(--head));
  perspective: 5200px; perspective-origin: 50% 35%;
}
.flipbook__spiral { display: none; }
.flipbook.is-3d .flipbook__spiral {
  display: block; position: absolute; z-index: 30; top: 6px; height: 46px; pointer-events: none;
  left: calc(max(16px, (100vw - 1420px) / 2 + clamp(16px, 4.2vw, 72px))); right: calc(max(16px, (100vw - 1420px) / 2 + clamp(16px, 4.2vw, 72px)));
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='46' viewBox='0 0 44 46'%3E%3Cdefs%3E%3ClinearGradient id='m' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%236f7480'/%3E%3Cstop offset='.45' stop-color='%23e9ebef'/%3E%3Cstop offset='1' stop-color='%23595e69'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M17 44C12 30 12 12 19 5c5-5 10 0 9 9-1 10-3 22-6 30' fill='none' stroke='url(%23m)' stroke-width='3.4' stroke-linecap='round'/%3E%3C/svg%3E") 0 0 / 44px 46px repeat-x;
  filter: drop-shadow(0 3px 2px #2a190566);
}
.flipbook img { content-visibility: visible; }
.flipbook.is-3d .sheet {
  position: absolute; margin: 0; top: 34px; bottom: 18px;
  left: calc(max(16px, (100vw - 1420px) / 2 + clamp(16px, 4.2vw, 72px))); right: calc(max(16px, (100vw - 1420px) / 2 + clamp(16px, 4.2vw, 72px)));
  transform-origin: 50% 0; transform-style: preserve-3d;
  transform: rotateX(calc(var(--flip, 0) * 180deg)) rotateZ(var(--jit, 0deg)) translate(var(--jx, 0px), var(--jy, 0px));
  z-index: calc(10 - var(--i, 0));
  will-change: transform;
}
.flipbook.is-3d .sheet.is-gone { visibility: hidden; }
.flipbook.is-3d .sheet__back { display: block; }
.flipbook.is-3d .sheet::before { opacity: calc(1 - var(--flip, 0) * 1.6); }
.flipbook.is-3d .sheet__paper::after {
  content: ''; position: absolute; inset: 0; z-index: 9; pointer-events: none;
  background: linear-gradient(to top, #2a190566, #2a190500 65%), linear-gradient(to top, #ffffff00 40%, #fffdf755);
  opacity: calc(var(--lift, 0) * 1.1);
}
.flipbook.is-3d .sheet__grid { height: calc(100% - 42px); }
.flipbook.is-3d .toy__canvas { aspect-ratio: auto; height: min(calc(100svh - var(--head) - 280px), 520px); max-height: none; }

/* ---------- Elenco ---------- */
.cast { position: relative; z-index: 2; padding: clamp(120px, 16vh, 180px) 0 110px; }
.cast__line {
  position: relative; display: flex; align-items: flex-end; justify-content: center; gap: clamp(4px, 1.4vw, 24px);
  max-width: 1320px; margin: 140px auto 0; padding: 0 var(--gutter); list-style: none;
}
.cast__line::after { content: ''; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 6px; height: 3px; background: var(--ink); border-radius: 40%; transform: rotate(-.4deg); opacity: .85; }
.cast__line li { position: relative; width: var(--w, 14%); }
.figure {
  display: block; width: 100%; padding: 0; cursor: pointer; background: none; border: 0; border-radius: 12px;
  transform-origin: 50% 100%; transform: translate(var(--px, 0px), 0) rotate(var(--rot, 0deg));
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.figure img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; pointer-events: none; }
.cast__line li.is-on .figure { animation: hop .62s cubic-bezier(.3,.7,.3,1); }
.figure__note {
  position: absolute; left: 50%; bottom: calc(100% + 6px); z-index: 5; width: 230px; margin: 0; padding: 12px 16px 12px;
  font: 600 20px/1.08 var(--font-note); color: var(--ink-2); text-align: left;
  background: #fffef8; border: 2px solid var(--ink); border-radius: 58% 46% 53% 48% / 40% 50% 44% 52%;
  opacity: 0; transform: translate(-50%, 12px) rotate(-3deg); pointer-events: none; transition: opacity .22s ease, transform .3s cubic-bezier(.2,.8,.2,1);
}
.figure__note b { display: block; margin-bottom: 4px; font: 400 27px/1 var(--font-hand); color: var(--ink); }
.figure__note small { display: block; margin-top: 8px; font: 11px/1.3 var(--font-body); letter-spacing: .6px; text-transform: uppercase; color: var(--red); }
.cast__line li:hover .figure__note, .cast__line li.is-on .figure__note, .cast__line li:focus-within .figure__note { opacity: 1; transform: translate(-50%, 0) rotate(-3deg); }
.cast__line li:nth-child(n+5) .figure__note { left: auto; right: -10%; transform: translate(0, 12px) rotate(2deg); }
.cast__line li:nth-child(n+5):hover .figure__note, .cast__line li:nth-child(n+5).is-on .figure__note, .cast__line li:nth-child(n+5):focus-within .figure__note { transform: translate(0, 0) rotate(2deg); }
.cast__line li:first-child .figure__note { left: 10%; transform: translate(0, 12px) rotate(-3deg); }
.cast__line li:first-child:hover .figure__note, .cast__line li:first-child.is-on .figure__note, .cast__line li:first-child:focus-within .figure__note { transform: translate(0, 0) rotate(-3deg); }

/* ---------- Do rabisco ao jogo ---------- */
.compare { position: relative; z-index: 2; padding: 80px var(--gutter) 120px calc(var(--margin-x) + 16px); }
.compare__maps { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; margin: 26px auto 34px; }
.compare__maps button {
  min-height: 44px; padding: 4px 16px; cursor: pointer; font: 21px/1 var(--font-hand);
  background: #faf8ee url(../assets/paper-fiber.webp); border: 1px solid #1829aa66; border-radius: 1px 5px 2px 1px; box-shadow: 1px 2px 2px #36384920; transform: rotate(-.45deg);
  transition: transform .18s ease, box-shadow .18s ease;
}
.compare__maps button:nth-child(even) { transform: rotate(.35deg); }
.compare__maps button:hover { transform: translateY(-2px) rotate(-.6deg); box-shadow: 2px 3px 0 #1829aa44; }
.compare__maps button[aria-pressed=true] { border: 2px solid #f4b90b; background: repeating-linear-gradient(137deg, #ffde43 0 3px, #fff09a 3px 4px, #ffdc3c 4px 9px); box-shadow: 0 0 0 2px #ffcf38, 2px 3px 0 #e0a71555; }
.compare__frame {
  --pos: 50%; position: relative; max-width: 1120px; margin: 0 auto; aspect-ratio: 16 / 9;
  border: 1.5px solid #2937bf; border-radius: 1px 2px 5px 1px; background: #f4f1e4;
  box-shadow: 2px 4px 1px #1725991c, -5px 4px 0 #fbf9eb, -7px 6px 0 #2432bd45, 0 30px 50px -30px #1018ad55;
}
.compare__frame:has(.compare__range:focus-visible) { outline: 3px dashed #b82030; outline-offset: 6px; }
.compare__render { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .25s ease; }
.compare__render.is-loading { opacity: .3; }
.compare__sketch { position: absolute; inset: 0; overflow: hidden; background: var(--rules), #fbf9ef url(../assets/paper-fiber.webp); clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare__sketch::before { content: ''; position: absolute; top: 0; bottom: 0; left: 7%; border-left: 1.5px solid #e2999b88; }
.compare__doodle {
  position: absolute; left: 3%; right: 3%; top: 50%; aspect-ratio: 3 / 1; transform: translateY(-46%);
  background-repeat: no-repeat; background-size: 200% 400%;
  background-position: calc(var(--cx) * 100%) calc(var(--cy) * 33.3333%); mix-blend-mode: multiply;
}
.compare.is-near .compare__doodle { background-image: url(../assets/maps/doodles-1536.webp); }
.compare__pencil { position: absolute; top: -26px; bottom: -34px; left: var(--pos); z-index: 3; width: 0; pointer-events: none; }
.compare__pencil span {
  position: absolute; left: -11px; top: 0; bottom: 0; width: 22px;
  background:
    linear-gradient(#f0a5a8, #e28589) top / 100% 26px no-repeat,
    linear-gradient(#c9ccd4, #9aa0ad) 0 26px / 100% 10px no-repeat,
    linear-gradient(90deg, #f3b400 0 33%, #ffd23c 33% 66%, #e7a800 66%) 0 36px / 100% calc(100% - 76px) no-repeat;
  border-radius: 5px 5px 0 0; filter: drop-shadow(3px 4px 2px #1018ad33);
}
.compare__pencil span::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 40px;
  background: linear-gradient(#f2d7a8 0 62%, #3a3a46 62%); clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.compare__label { position: absolute; bottom: 14px; z-index: 2; padding: 3px 12px 4px; font: 600 22px/1 var(--font-note); background: #fffdf7e8; border: 1.5px solid var(--ink); border-radius: var(--r-action); pointer-events: none; }
.compare__label--l { left: 14px; transform: rotate(-3deg); }
.compare__label--r { right: 14px; transform: rotate(2deg); }
.compare__range { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; touch-action: pan-y; }

/* ---------- Fim ---------- */
.finale { position: relative; z-index: 2; padding: 60px var(--gutter) 20px calc(var(--margin-x) + 16px); }
.picks { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(14px, 2.6vw, 40px); max-width: 1240px; margin: 34px auto 0; padding: 0; list-style: none; }
.picks a { display: block; width: clamp(128px, 15vw, 206px); text-decoration: none; transform: rotate(var(--r)); transition: transform .28s cubic-bezier(.2,.8,.2,1); }
.picks a:hover, .picks a:focus-visible { transform: translateY(-12px) rotate(0deg) scale(1.04); }
.picks .pick--shot { aspect-ratio: 512 / 768; object-fit: cover; }
.picks img { display: block; width: 100%; height: auto; border-radius: 2px; box-shadow: 0 12px 24px -12px #1018ad88, 0 2px 5px #1018ad2a; }
.picks span { display: block; margin-top: 10px; text-align: center; font: 22px/1.05 var(--font-hand); }
.keeper { position: relative; max-width: 1200px; margin: 50px auto 0; }
.keeper__canvas { display: block; width: 100%; height: 230px; }
.keeper__note { position: absolute; left: 4%; top: 12px; transform: rotate(-4deg); }

.foot { position: relative; z-index: 2; padding: 30px var(--gutter) 46px calc(var(--margin-x) + 16px); text-align: center; border-top: 2px dashed #1018ad33; }
.foot p { margin: 0 auto 6px; max-width: 760px; }
.foot__sign { font: 400 30px/1.2 var(--font-hand); }
.foot__sign b { font-weight: 400; background: linear-gradient(transparent 55%, #ffe36e 55% 92%, transparent 92%); padding: 0 4px; }
.foot__links { font: 22px/1.4 var(--font-hand); }
.foot__links a { text-decoration: underline wavy #1018ad66; text-underline-offset: 5px; }
.foot__links a[aria-current=page] { text-decoration-color: #be3a3c88; }

.credits {
  position: relative; z-index: 2;
  max-width: 760px;
  padding: calc(var(--head) + 48px) var(--gutter) 80px calc(var(--margin-x) + 16px);
}
.credits .section-head { margin: 0 0 36px; padding: 0; text-align: left; }
.credits h2 { margin: 28px 0 10px; font: 400 36px/1.1 var(--font-hand); }
.credits p, .credits li { font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.credits ul { margin: 0; padding: 0; list-style: none; }
.credits li { margin: 0 0 8px; padding-left: 1.1em; text-indent: -1.1em; }
.credits li::before { content: '✎ '; color: var(--red); font-family: var(--font-hand); }
.credits a { color: inherit; text-decoration: underline wavy #1018ad66; text-underline-offset: 5px; }

/* ---------- Telas menores ---------- */
@media (max-width: 1180px) {
  .sheet__grid { grid-template-columns: minmax(200px, .85fr) minmax(260px, 1.2fr) minmax(110px, .36fr); }
}
@media (max-width: 999px) {
  .sheet__grid { grid-template-columns: 1fr; }
  .sheet__info { max-width: 620px; }
  .toy__canvas { aspect-ratio: 4 / 3; max-height: 62vh; }
  .cover { display: block; width: min(46%, 220px); margin: 6px auto 0; }
  .tabs { display: none; }
  .cast__line { flex-wrap: wrap; row-gap: 90px; margin-top: 110px; }
  .cast__line li { width: 30% !important; }
  .cast__line::after { display: none; }
}
@media (max-width: 760px) {
  :root { --head: 58px; --margin-x: 26px; }
  .toy__tease { right: -6px; top: -26px; max-width: none; padding: 7px 11px 8px; }
  .toy__tease b { white-space: nowrap; }
  .toy__tease span { font-size: 17px; }
  .toy__tease b { font-size: 18px; }
  body::after { display: none; }
  .nav { display: none; }
  .sound-toggle { margin-left: auto; }
  .sound-toggle span { display: none; }
  .brand__prefix { font-size: 20px; }
  .brand__logo { height: 38px; }
  .hero { --ground: 58px; display: flex; flex-direction: column; align-items: stretch; min-height: auto; padding-bottom: var(--ground); }
  .hero__copy { order: 1; }
  .toolbox { order: 2; position: relative; left: auto; bottom: auto; margin-top: 18px; }
  .hero__stage { order: 3; }
  .hero__title { font-size: clamp(44px, 12.4vw, 64px); }
  .hero__title .line { white-space: normal; }
  .hero__copied { font-size: 15px; }
  .hero__void { right: -8px; bottom: -22px; }
  .hero__stage { --h: 60vw; align-self: flex-end; width: 100%; margin: 26px 0 0; }
  .standee--rabisco { transform: translateZ(70px); }
  .standee--desvairado, .standee-shadow--desvairado { left: 2%; height: 46%; }
  .hero__meet { display: none; }
  .hero__hint { display: none; }
  .hero__next { display: none; }
  .toolbox__draw { display: inline-block; }
  .hero__actions .btn { flex: 1 1 auto; }
  .sheet__paper { padding-left: calc(20px + 38px); }
  .sheet__paper::before { left: 42px; }
  .sheet__logo img { height: 110px; }
  .figure__note { width: 190px; font-size: 18px; }
  .cast__line li { width: 46% !important; }
  .compare__label { font-size: 18px; }
  .picks a { width: 40vw; }
}
@media (pointer: coarse) { .toolbox__draw { display: inline-block; } }

/* ---------- Movimento ---------- */
@keyframes write { to { clip-path: inset(-20% -2% -20% 0); } }
@keyframes sweep { to { transform: scaleX(1) rotate(-2deg); } }
@keyframes sweep-strike { to { transform: scaleX(1) rotate(-2deg); } }
@keyframes fade-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes enter-right { from { opacity: 0; translate: 60px 20px; } }
@keyframes enter-top { from { opacity: 0; translate: 0 -40px; } }
@keyframes reveal-ground { to { clip-path: inset(-10px -2% -10px 0); } }
@keyframes slap-in { 0% { opacity: 0; transform: rotate(-9deg) scale(1.35) translateY(-18px); } 45% { opacity: 1; transform: rotate(1deg) scale(.97); } 70% { transform: rotate(-3deg) scale(1.01); } 100% { opacity: 1; transform: rotate(-2.2deg); } }
@keyframes pop-up { 0% { transform: rotateX(86deg); } 60% { transform: rotateX(-8deg); } 80% { transform: rotateX(3deg); } 100% { transform: rotateX(0deg); } }
@keyframes tag-along { 0%, 100% { transform: translateY(0) rotate(-4deg); } 35% { transform: translateY(-14%) rotate(3deg); } 55% { transform: translateY(-9%) rotate(0deg); } 80% { transform: translateY(0) rotate(-2deg); } }
@keyframes hero-run { 0%, 100% { transform: translateY(0) rotate(0deg); } 30% { transform: translateY(-9px) rotate(-1.5deg); } 60% { transform: translateY(-3px) rotate(1deg); } }
@keyframes peek { 0%, 100% { transform: rotate(-9deg) translateY(0); } 50% { transform: rotate(-4deg) translateY(-8px); } }
@keyframes draw-stroke { to { stroke-dashoffset: 0; } }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes hop { 0% { transform: translate(var(--px, 0px), 0) rotate(var(--rot, 0deg)) scale(1, 1); } 18% { transform: translate(var(--px, 0px), 0) scale(1.08, .88); } 45% { transform: translate(var(--px, 0px), -34px) rotate(-4deg) scale(.95, 1.06); } 72% { transform: translate(var(--px, 0px), 0) scale(1.06, .92); } 100% { transform: translate(var(--px, 0px), 0) rotate(var(--rot, 0deg)) scale(1, 1); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .band__track { animation: none; }
  .sheet { transform: rotate(var(--tilt, 0deg)) !important; }
}

/* ---------- Ato 0: a folha de exercício ---------- */
.exercise { display: none; }
html.has-exercise .exercise {
  --mx: 50%; --my: 50%; --mr: 0px;
  display: block; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(#b9c2cc55 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(90deg, #b9c2cc55 1px, transparent 1px) 0 0 / 28px 28px, #eef0f2;
  color: #5b6470; font-family: 'Courier New', ui-monospace, monospace;
}
html.has-exercise .hero:not(.is-awake) :is(.hero__copy, .hero__stage, .hero__hint, .hero__next, .margin-infinity, .hero__ground, .hero__floor, .toolbox) { opacity: 0; pointer-events: none; }
.hero.is-awake :is(.hero__copy, .toolbox) { transition: opacity .5s ease .2s; }
.exercise.is-breaking {
  -webkit-mask: radial-gradient(circle at var(--mx) var(--my), transparent var(--mr), #000 calc(var(--mr) + 90px));
  mask: radial-gradient(circle at var(--mx) var(--my), transparent var(--mr), #000 calc(var(--mr) + 90px));
}
.exercise__sheet { position: relative; max-width: 780px; margin: 0 auto; padding: calc(var(--head) + 44px) 28px 0; }
.exercise__head { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0 0 22px; font-size: 15px; line-height: 28px; }
.exercise__head b { font-weight: 400; }
.exercise__task { margin: 0 0 12px; font-size: 16px; line-height: 28px; font-weight: 700; letter-spacing: .4px; color: #3f4650; }
.exercise__lines { margin: 0; padding: 0 0 0 34px; font-size: clamp(14px, 1.45vw, 18px); line-height: 28px; color: #6b7280; }
.exercise__lines li { white-space: nowrap; padding-left: 4px; }
.exercise__lines li::marker { color: #9aa3ad; font-size: 13px; }
.exercise__lines span { display: inline-block; transition: transform 1s cubic-bezier(.4,.1,.6,1), color .5s ease, opacity 1s ease; transition-delay: var(--delay, 0s); }
.exercise.is-breaking .exercise__lines span { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); color: #1018ad; opacity: 0; }
.exercise__stamp {
  position: absolute; right: 36px; top: calc(var(--head) + 110px); padding: 10px 16px; transform: rotate(-11deg) scale(1.6); opacity: 0;
  font: 700 18px/1.15 'Courier New', monospace; letter-spacing: 2px; text-align: center; color: #b4575a;
  border: 3px double #b4575a; border-radius: 4px; mix-blend-mode: multiply;
  transition: transform .18s cubic-bezier(.5,1.6,.6,1), opacity .12s ease;
}
.exercise__stamp.is-on { transform: rotate(-11deg) scale(1); opacity: .82; }
.exercise__stamp svg { position: absolute; inset: -6px -10px; width: calc(100% + 20px); height: calc(100% + 12px); fill: none; stroke: #d42a2f; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 520; stroke-dashoffset: 520; }
.exercise.is-breaking .exercise__stamp svg { transition: stroke-dashoffset .5s ease; stroke-dashoffset: 0; }
.exercise__clock { position: absolute; right: -90px; top: calc(var(--head) + 20px); width: 64px; height: 64px; fill: #fbfbfc; stroke: #6b7280; stroke-width: 2; stroke-linecap: round; }
.exercise__sec { stroke: #b4575a; transform-origin: 30px 30px; transition: transform .12s cubic-bezier(.4,2,.6,1); }
.exercise__min { transform-origin: 30px 30px; transform: rotate(40deg); }
.exercise__note { position: absolute; left: -160px; top: calc(var(--head) + 250px); width: 150px; margin: 0; font: 600 25px/1.05 var(--font-note); color: #1018ad; transform: rotate(-8deg); opacity: 0; transition: opacity .6s ease; }
.exercise__note.is-on { opacity: 1; }
@media (max-width: 1100px) { .exercise__clock { right: 10px; top: calc(var(--head) + 8px); width: 48px; height: 48px; } .exercise__note { left: auto; right: 20px; top: auto; bottom: -70px; } }
@media (max-width: 760px) { .exercise__sheet { padding-left: 18px; padding-right: 12px; } .exercise__stamp { right: 14px; top: auto; bottom: 18%; font-size: 14px; } .exercise__lines { padding-left: 24px; font-size: 3vw; } .exercise__head { font-size: 13px; } }

/* ---------- Ato 2: o Automático ---------- */
.auto { position: relative; z-index: 2; padding: 96px var(--gutter) 90px calc(var(--margin-x) + 16px); }
.auto .section-head { margin-bottom: 0; }
.auto__frame { position: relative; max-width: 1320px; margin: 26px auto 0; }
.auto__canvas {
  display: block; width: 100%; height: clamp(360px, 58vh, 580px); touch-action: pan-y; cursor: var(--cursor-pen);
  background: linear-gradient(#aeb7c255 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(90deg, #aeb7c255 1px, transparent 1px) 0 0 / 24px 24px, #eceef1;
  border: 1.5px solid #8a93a0; border-radius: 2px;
  box-shadow: 0 24px 44px -28px #1f2a3a88, 6px 6px 0 #d9dce2;
}
.auto__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; font: 600 24px/1 var(--font-note); color: var(--ink-2); }
.auto__bar .toy__reset { position: static; }

/* ---------- Ato 4: margens entre cadernos ---------- */
.margins { position: relative; margin: 120px calc(-1 * var(--gutter)) 0 calc(-1 * (var(--margin-x) + 16px)); padding-top: 90px;
  background: linear-gradient(#00000008, #00000008), url(../assets/kraft-256.webp) repeat 0 0 / 256px 256px var(--kraft); color: var(--ink-kraft); }
.margins .section-head { --ink: var(--ink-kraft); }
.margins { z-index: 3; }
.margins__desk { margin-bottom: 0; }
.margins__edge { z-index: 1; }
.margins .eyebrow { color: #7a1c1e; }
.margins__desk { position: relative; height: clamp(360px, 52vh, 520px); margin-top: 30px; overflow: hidden; }
.margins__edge { position: absolute; top: 8%; bottom: 8%; width: clamp(70px, 14vw, 220px); box-shadow: 0 18px 30px -16px #2a1905aa; }
.margins__edge--ours { left: 0; background: var(--rules), var(--paper-layer) url(../assets/paper-fiber.webp); clip-path: polygon(0 0, 96% 0, 100% 6%, 97% 14%, 100% 24%, 96% 34%, 100% 45%, 97% 56%, 100% 66%, 96% 77%, 100% 88%, 97% 100%, 0 100%); }
.margins__edge--ours::after { content: ''; position: absolute; top: 0; bottom: 0; right: 22%; border-left: 1.5px solid #e2999b; }
.margins__edge--other { right: 0; background: linear-gradient(#7aa37a40 1px, transparent 1px) 0 0 / 20px 20px, linear-gradient(90deg, #7aa37a40 1px, transparent 1px) 0 0 / 20px 20px, #f3f5ea; transform: rotate(2deg); clip-path: polygon(3% 0, 100% 0, 100% 100%, 2% 100%, 0 90%, 4% 80%, 0 70%, 3% 58%, 0 46%, 4% 35%, 0 24%, 3% 12%); }
.margins__canvas { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }

/* ---------- O infinito e o segredo ---------- */
.margin-infinity, .foot__infinity { padding: 0; border: 0; background: none; cursor: pointer; }
.margin-infinity { position: absolute; z-index: 3; left: calc(var(--margin-x) - 34px); bottom: calc(var(--ground) + 40px); width: 30px; height: 16px; opacity: .55; transform: rotate(-8deg); transition: opacity .2s, transform .2s; }
.margin-infinity:hover { opacity: 1; transform: rotate(-8deg) scale(1.2); }
.margin-infinity svg, .foot__infinity svg, .apenas-pense svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.foot__infinity { display: inline-block; width: 34px; height: 18px; vertical-align: middle; color: var(--ink); opacity: .5; }
.foot__infinity:hover { opacity: 1; }
.apenas-pense {
  position: fixed; left: clamp(8px, 1.4vw, 24px); bottom: 26px; z-index: 45; margin: 0; width: 96px; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink);
  font: 400 24px/.95 var(--font-hand); text-align: center; transform: rotate(-12deg);
}
.apenas-pense[hidden] { display: none; }
.apenas-pense svg { width: 60px; height: 30px; stroke-dasharray: 150; stroke-dashoffset: 150; animation: draw-stroke 1.2s ease forwards; }
.apenas-pense span { clip-path: inset(-10% 100% -10% 0); animation: write 1s cubic-bezier(.6,.05,.3,1) .9s forwards; }
@media (max-width: 760px) { .margin-infinity { left: 2px; bottom: calc(var(--ground) + 22px); top: auto; } .apenas-pense { bottom: 12px; width: 84px; font-size: 20px; } }
@media (prefers-reduced-motion: reduce) { .apenas-pense svg { stroke-dashoffset: 0; } .apenas-pense span { clip-path: none; } }
