/* Fontes hospedadas no próprio site (subconjunto latino). */
@font-face { font-family: "DM Sans"; src: url("../fonts/dm-sans-300-600.woff2") format("woff2"); font-weight: 300 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono-latin.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --bg: #f7f7f5;
  --grid: #ececE8;
  --surface: #ffffff;
  --ink: #1e1a15;
  --label: #2d2d2d;
  --text: #404040;
  --muted: #5f5f5c;
  --faint: #8a8a87;
  --line: rgb(0 0 0 / 0.08);

  /* Único acento: verde de planilha. */
  --accent: #1d7a4a;
  --accent-soft: #3f8f63;
  --live: #22c55e;

  /* Console: Joy-Cons e tela do minijogo. */
  --jc-left: #19b8dc;
  --jc-left-dark: #0f97b8;
  --jc-right: #f4554b;
  --jc-right-dark: #d63b32;
  --console: #2a2c31;
  --console-dark: #1b1c20;
  --scr-bg: #14171c;
  --scr-dot: #262b33;
  --scr-bar: #2fbf71;
  --scr-bar-top: #a3f2c4;
  --scr-block: #eef4ff;
  --scr-ground: #3d4450;
  --scr-floor: #1c2027;
  --scr-duck: #f6c744;
  --scr-beak: #f08c2a;
  --scr-bad: #ff5f57;
  --scr-sel: #19b8dc;
  --scr-panel: #22262d;
  --scr-text: #eef4ff;

  --sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  /* Títulos: mono em peso médio, com tracking apertado. */
  --display: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pb: clamp(40px, 6.3vw, 100px);
  --toy-w: clamp(230px, 20vw, 300px);

  /* Cantos: cartões 18px, janelas 12px, mídia 10px, controles em pílula. */
  --r-card: 18px;
  --r-window: 12px;
  --r-media: 10px;

  /* Camadas */
  --z-colophon: 5;
  --z-dock: 30;
  --z-case: 40;
  --z-drag: 60;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.locked { overflow: hidden; }
body {
  margin: 0; min-height: 100svh; color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.5;
  background-color: var(--bg);
  background-image:
    radial-gradient(120% 90% at 50% 38%, rgb(255 255 255 / 0.65), rgb(255 255 255 / 0) 62%),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 100% 100%, 24px 24px, 24px 24px;
  background-attachment: fixed, scroll, scroll;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: #cfe8d9; color: var(--ink); }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; transition: top 0.2s; }
.skip:focus { top: 16px; }
.pixel-title { filter: url(#pixelate-sm); }

/* ---------- Barra de topo ---------- */
.top-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px clamp(20px, 5vw, 48px); }
@media (min-width: 1440px) { .top-nav { padding: 24px 64px; } }
.nav-left { display: inline-flex; align-items: center; gap: 12px; }
.nav-logo {
  display: inline-flex; align-items: center; justify-content: center; gap: 1px; width: 40px; height: 40px; flex-shrink: 0; border-radius: 11px;
  background: var(--ink); box-shadow: 0 1px 2px rgb(30 26 21 / 0.2), inset 0 1px 0 rgb(255 255 255 / 0.08);
  font-family: var(--mono); font-weight: 600; font-size: 15px; letter-spacing: -0.06em; line-height: 1; color: #fff;
  transition: transform 0.4s var(--ease);
}
.nav-caret { width: 6px; height: 13px; margin-left: 1px; border-radius: 1px; background: var(--live); }
.js .nav-caret { animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.nav-left:hover .nav-logo { transform: translateY(-1px) rotate(-4deg); }
.nav-identity { display: flex; flex-direction: column; gap: 2px; }
.nav-name { font-family: var(--mono); font-size: 15px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text); line-height: 1.1; }
.nav-role { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.04em; color: var(--muted); line-height: 1.1; }
.nav-right { display: none; align-items: center; gap: clamp(16px, 2vw, 28px); }
@media (min-width: 760px) { .nav-right { display: flex; } }
.nav-link { font-family: var(--mono); font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); transition: color 0.15s; }
.nav-link:hover { color: var(--accent); }

/* ---------- Painéis ---------- */
.main { display: block; }
.panel { width: 100%; padding: clamp(8px, 2vh, 24px) clamp(16px, 4vw, 48px) 168px; }
.panel[hidden] { display: none; }
.panel.enter { animation: panel-in 0.4s var(--ease) both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Pôster (início) ---------- */
#panel-inicio { padding-bottom: 0; }

/* Artes do fundo: só aparecem num círculo em volta do mouse (ou do dedo). Posição de cada uma por painel. */
.panel:has(.arts) { position: relative; overflow: hidden; }
.arts {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  -webkit-mask-image: radial-gradient(circle var(--r, 0px) at var(--x, 50%) var(--y, 50%), #000 0%, rgb(0 0 0 / 0.85) 45%, transparent 100%);
  mask-image: radial-gradient(circle var(--r, 0px) at var(--x, 50%) var(--y, 50%), #000 0%, rgb(0 0 0 / 0.85) 45%, transparent 100%);
}
.art { position: absolute; max-width: none; height: auto; width: auto; user-select: none; -webkit-user-drag: none; --fx: 0.5; --fy: 0.4; }
.art--statue { image-rendering: pixelated; opacity: 0.62; }
.art--owl { opacity: 0.5; }
.art--bird { opacity: 0.6; }
.art--flower { opacity: 0.9; }
.art--hand { opacity: 0.75; }
.panel > :not(.arts, .sr-only) { position: relative; z-index: 1; }

/* Início: estátua na direita, coruja na esquerda, pássaro no alto, flor embaixo. */
#panel-inicio .art--statue { right: -1%; top: 2%; height: 96%; width: auto; --fx: 0.55; --fy: 0.3; }
#panel-inicio .art--owl { left: -3%; bottom: -6%; height: 70%; width: auto; --fy: 0.3; }
#panel-inicio .art--bird { left: 15%; top: 0; width: clamp(240px, 24vw, 400px); --fx: 0.55; --fy: 0.35; }
#panel-inicio .art--flower { right: 30%; bottom: 0; height: 34%; width: auto; --fy: 0.45; }
@media (max-width: 899px) {
  #panel-inicio .art--statue { right: -60px; top: 0; height: 430px; --fy: 0.32; }
  #panel-inicio .art--owl { left: -50px; top: auto; bottom: 140px; height: 420px; --fx: 0.4; --fy: 0.25; }
  #panel-inicio .art--bird { left: -40px; top: 40px; width: 300px; --fx: 0.45; }
  #panel-inicio .art--flower { right: -10px; bottom: 60px; height: 260px; }
}

/* Projetos: a mão à direita, o pássaro embaixo à esquerda. Os cartões são translúcidos, então a arte aparece por trás. */
#panel-projetos .art--hand { right: -4%; top: 0; width: clamp(300px, 42vw, 640px); --fx: 0.6; --fy: 0.45; }
#panel-projetos .art--bird { left: -3%; bottom: 40px; width: clamp(260px, 30vw, 460px); --fx: 0.5; --fy: 0.4; }

/* Laboratório: coruja ao lado do título, flor no meio, mão perto dos adesivos. */
#panel-lab .art--owl { right: 2%; top: -10px; height: clamp(360px, 40vw, 560px); width: auto; --fy: 0.3; }
#panel-lab .art--flower { left: -2%; top: 46%; height: clamp(260px, 26vw, 420px); width: auto; }
#panel-lab .art--hand { right: -6%; bottom: 60px; width: clamp(300px, 38vw, 560px); --fx: 0.65; }
@media (max-width: 899px) { #panel-lab .art--owl { right: -60px; height: 340px; } }

/* Perfil: estátua atrás das fotos, flor e pássaro do lado do texto. */
#panel-perfil .art--statue { left: 4%; top: 0; height: clamp(420px, 52vw, 680px); width: auto; --fy: 0.3; }
#panel-perfil .art--flower { right: 1%; top: 2%; height: clamp(240px, 24vw, 360px); width: auto; }
#panel-perfil .art--bird { right: 6%; bottom: 40px; width: clamp(260px, 28vw, 420px); }
@media (max-width: 860px) { #panel-perfil .art--statue { left: -40px; height: 440px; } #panel-perfil .art--flower { top: auto; bottom: 30%; } }

.poster {
  min-height: calc(100svh - 92px); padding-bottom: 120px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; align-content: center; column-gap: clamp(20px, 2.6vw, 44px);
}
.poster-side { display: flex; flex-direction: column; width: max-content; }
.poster-left { justify-self: end; }
.poster-right { justify-self: start; }
.poster p { margin: 0; white-space: nowrap; }
.poster-hello { font-family: var(--mono); font-size: clamp(14px, 1.15vw, 18px); letter-spacing: 0.04em; color: var(--text); line-height: 20px; margin-bottom: 14px !important; align-self: flex-start; padding-left: 0.3em; }
.poster-big { font-size: var(--pb); line-height: 1; color: var(--label); }
.poster-big--sans { font-weight: 300; letter-spacing: -0.02em; }
.poster-big--serif { font-family: var(--display); font-weight: 600; letter-spacing: -0.06em; color: var(--accent); filter: url(#pixelate); }
.poster-sub { margin-top: 14px !important; font-family: var(--mono); font-weight: 300; font-size: clamp(13px, 1.1vw, 17px); letter-spacing: 0.04em; color: var(--faint); align-self: flex-start; padding-left: 0.25em; }
.poster-right .poster-sub { padding-left: 0.1em; }
.poster-sub--merged { display: none; }
.handle { color: #4d8a68; transition: color 0.15s; }
.handle:hover { color: var(--accent); }

.js .poster-hello, .js .poster-big, .js .poster-sub { animation: rise 0.5s var(--ease) both; }
.js .poster-big { animation-delay: 0.15s; }
.js .poster-sub { animation-delay: 0.55s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 899px) {
  .poster { grid-template-columns: 1fr; justify-items: center; row-gap: 0; padding: 12px 0 140px; min-height: calc(100svh - 76px); align-content: center; }
  .poster-side { display: contents; }
  .poster-hello { order: 1; align-self: center !important; padding: 0; }
  .poster-big--sans { order: 2; }
  .toy-col { order: 3; margin: 26px 0 22px; }
  .poster-big--serif { order: 4; }
  .poster-hello--spacer, .poster-left .poster-sub, .poster-right .poster-sub { display: none; }
  .poster-sub--merged { display: block; order: 5; text-align: center; align-self: center !important; white-space: normal !important; padding: 0 16px; }
  :root { --pb: clamp(44px, 14vw, 72px); --toy-w: min(calc(100vw - 72px), 320px); }
}

/* Stack: uma fileira de teclas com os logos. */
.stack { grid-column: 1 / -1; justify-self: center; display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: clamp(28px, 5vh, 52px); }
.stack-title { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.stack-keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 12px; margin: 0; padding: 0; list-style: none; max-width: 940px; }
.key { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 62px; }
.key-cap {
  display: grid; place-items: center; width: 50px; height: 50px; border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f1f1ee); border: 1px solid #e3e3df;
  box-shadow: inset 0 -4px 0 #e6e6e1, inset 0 1px 0 #fff, 0 1px 0 #d0d0cb, 0 6px 12px -4px rgb(30 26 21 / 0.14);
  transition: transform 0.15s var(--ease), box-shadow 0.15s;
}
.key-cap svg { width: 24px; height: 24px; margin-top: -3px; fill: var(--c); }
.key-label { font-family: var(--mono); font-size: 11px; letter-spacing: -0.01em; color: var(--muted); white-space: nowrap; }
.key:hover .key-cap { transform: translateY(2px); box-shadow: inset 0 -2px 0 #e6e6e1, inset 0 1px 0 #fff, 0 1px 0 #d0d0cb, 0 3px 6px -3px rgb(30 26 21 / 0.14); }
.js .key { animation: rise 0.5s var(--ease) both; animation-delay: calc(0.6s + var(--i) * 45ms); }
@media (max-width: 899px) {
  .stack { order: 6; margin-top: 30px; }
  .stack-keys { max-width: 360px; gap: 12px 8px; }
  .key { min-width: 0; width: 62px; }
  .key-label { white-space: normal; text-align: center; line-height: 1.25; }
}

/* ---------- Console portátil retrô (sem marca) ---------- */
.toy-col { display: flex; flex-direction: column; align-items: center; }
.toy { position: relative; width: var(--toy-w); aspect-ratio: 0.7; container-type: inline-size; }
.toy-float { position: absolute; inset: 0; }
.js .toy-float { animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-6px) rotate(0.5deg); } }
.console {
  position: relative; width: 100%; height: 100%; border-radius: 7cqw 7cqw 12cqw 12cqw;
  background:
    radial-gradient(70% 35% at 28% 6%, rgb(255 255 255 / 0.7), rgb(255 255 255 / 0) 60%),
    linear-gradient(180deg, #e6e6e3, #d5d5d1 55%, #c7c7c3);
  box-shadow:
    inset 0 2px 0 rgb(255 255 255 / 0.85), inset 0 -7px 14px rgb(0 0 0 / 0.09), inset 5px 0 10px rgb(255 255 255 / 0.35),
    0 32px 44px -20px rgb(30 40 60 / 0.38), 0 8px 14px rgb(30 40 60 / 0.12);
}
.hh-face {
  position: absolute; left: 6cqw; right: 6cqw; top: 5cqw; padding: 5cqw 5cqw 6cqw; border-radius: 4.5cqw;
  background: linear-gradient(180deg, #202226, #121316);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.09), 0 1px 0 rgb(255 255 255 / 0.75);
}
.hh-led { position: absolute; left: 2.2cqw; top: 2.1cqw; width: 1.3cqw; aspect-ratio: 1; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 1.2cqw #3ddc84; }
.console-screen {
  position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 1cqw; background: var(--scr-bg);
  box-shadow: 0 0 0 1px #000, inset 0 0 18px rgb(0 0 0 / 0.5);
}
.console-screen canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; cursor: pointer; touch-action: none; }
.console-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(155deg, rgb(255 255 255 / 0.1), rgb(255 255 255 / 0) 40%); }

/* Direcional */
.hh-dpad {
  position: absolute; left: 25cqw; top: 93cqw; width: 30cqw; height: 30cqw; transform: translate(-50%, -50%);
  display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  filter: drop-shadow(0 0.7cqw 0 #8e8e8a) drop-shadow(0 1.4cqw 1.6cqw rgb(0 0 0 / 0.16));
}
.hh-d { position: relative; display: grid; place-items: center; background: linear-gradient(180deg, #36373c, #25262a); transition: filter 0.06s; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.hh-up { grid-area: 1 / 2; border-radius: 1.8cqw 1.8cqw 0 0; }
.hh-down { grid-area: 3 / 2; border-radius: 0 0 1.8cqw 1.8cqw; }
.hh-left { grid-area: 2 / 1; border-radius: 1.8cqw 0 0 1.8cqw; }
.hh-right { grid-area: 2 / 3; border-radius: 0 1.8cqw 1.8cqw 0; }
.hh-center { grid-area: 2 / 2; }
.hh-center::after { content: ""; position: absolute; inset: 26%; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #1b1c20, #2c2d32); }
.hh-up::before, .hh-down::before, .hh-left::before, .hh-right::before { content: ""; width: 0; height: 0; border: 1.3cqw solid transparent; }
.hh-up::before { border-bottom: 1.8cqw solid #5a5c63; border-top-width: 0; }
.hh-down::before { border-top: 1.8cqw solid #5a5c63; border-bottom-width: 0; }
.hh-left::before { border-right: 1.8cqw solid #5a5c63; border-left-width: 0; }
.hh-right::before { border-left: 1.8cqw solid #5a5c63; border-right-width: 0; }
.hh-up::after { content: ""; position: absolute; inset: -3cqw -1.5cqw 0; }
.hh-down::after { content: ""; position: absolute; inset: 0 -1.5cqw -3cqw; }
.hh-left::after { content: ""; position: absolute; inset: -1.5cqw 0 -1.5cqw -3cqw; }
.hh-right::after { content: ""; position: absolute; inset: -1.5cqw -3cqw -1.5cqw 0; }
.hh-d:active, .hh-d.held { filter: brightness(0.78); }

/* Grade do alto-falante */
.hh-speaker { position: absolute; left: 50cqw; top: 84cqw; transform: translate(-50%, -50%); display: grid; grid-template-columns: repeat(2, 5.5cqw); gap: 1.5cqw 1.8cqw; }
.hh-speaker i { height: 1.3cqw; border-radius: 1cqw; background: #a2a29e; box-shadow: inset 0 0.35cqw 0.4cqw rgb(0 0 0 / 0.35); }

/* Botões XYAB */
.hh-abxy { position: absolute; left: 75cqw; top: 93cqw; width: 33cqw; height: 33cqw; transform: translate(-50%, -50%); }
.hh-b {
  position: absolute; width: 11.5cqw; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%);
  display: grid; place-items: center; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  background: radial-gradient(circle at 40% 32%, #3c3d42, #1e1f23 72%);
  box-shadow: 0 0.8cqw 0 #8e8e8a, 0 1.6cqw 2cqw rgb(0 0 0 / 0.22), inset 0 0.3cqw 0 rgb(255 255 255 / 0.1);
  font-family: var(--sans); font-weight: 700; font-size: 5cqw; line-height: 1; color: var(--c);
  transition: transform 0.06s, box-shadow 0.06s;
}
.hh-x { left: 50%; top: 16%; --c: #4f8df7; }
.hh-y { left: 16%; top: 50%; --c: #34d27a; }
.hh-a { left: 84%; top: 50%; --c: #f25a52; }
.hh-bb { left: 50%; top: 84%; --c: #f2c230; }
.hh-b::after { content: ""; position: absolute; inset: -2.6cqw; border-radius: 50%; }
.hh-b:active, .hh-b.held { transform: translate(-50%, calc(-50% + 0.6cqw)); box-shadow: 0 0.2cqw 0 #8e8e8a, 0 0.6cqw 1cqw rgb(0 0 0 / 0.2), inset 0 0.3cqw 0 rgb(255 255 255 / 0.1); }

/* Menu, Select e Start */
.hh-pill {
  position: absolute; width: 6.6cqw; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  background: radial-gradient(circle at 40% 32%, #3c3d42, #1e1f23 72%); box-shadow: 0 0.55cqw 0 #8e8e8a, inset 0 0.3cqw 0 rgb(255 255 255 / 0.1);
  transition: transform 0.06s, box-shadow 0.06s;
}
.hh-fn { left: 50cqw; top: 97cqw; }
.hh-select { left: 39cqw; top: 107cqw; }
.hh-start { left: 61cqw; top: 107cqw; }
.hh-label { position: absolute; left: 50%; top: 100%; transform: translate(-50%, 1.6cqw); font-family: var(--mono); font-weight: 500; font-size: 2.5cqw; line-height: 1; letter-spacing: 0.06em; text-transform: uppercase; color: #8a8a86; white-space: nowrap; pointer-events: none; }
.hh-pill::after { content: ""; position: absolute; inset: -3.5cqw; border-radius: 50%; }
.hh-pill:active, .hh-pill.held { transform: translate(-50%, calc(-50% + 0.4cqw)); box-shadow: 0 0.15cqw 0 #8e8e8a, inset 0 0.3cqw 0 rgb(255 255 255 / 0.1); }

/* Chaveiro: alça na lateral do console (no celular, um ilhós no canto) e o chaveiro pendurado nela.
   O ponto de giro é o topo da argola: --kc-px e --kc-py, em fração da imagem (430x604, proporção --kc-ar).
   --kc-rest é o ângulo em que o peso fica embaixo do ponto de giro. */
.toy { --kc-w: 38cqw; --lug-x: 102cqw; --lug-y: 108cqw; --kc-rest: 5deg; --kc-px: 0.434; --kc-py: 0.015; --kc-ar: 1.405; }
.hh-lug {
  position: absolute; left: calc(100% - 0.5cqw); top: calc(var(--lug-y) - 4.5cqw); width: 5.6cqw; height: 9cqw;
  border: 1.9cqw solid #b9b9b4; border-left: 0; border-radius: 0 4.5cqw 4.5cqw 0;
  box-shadow: 0.3cqw 0.4cqw 0.6cqw rgb(0 0 0 / 0.12), inset -0.3cqw 0 0 rgb(255 255 255 / 0.6);
}
.keychain { position: absolute; inset: 0; z-index: 3; pointer-events: none; filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.28)) drop-shadow(0 10px 12px rgb(30 40 60 / 0.22)); }
.kc-anchor { position: absolute; left: var(--lug-x); top: var(--lug-y); width: 0; height: 0; }
.kc-swing {
  position: absolute; left: calc(var(--lug-x) - var(--kc-w) * var(--kc-px)); top: calc(var(--lug-y) - var(--kc-w) * var(--kc-ar) * var(--kc-py)); width: var(--kc-w);
  transform-origin: calc(var(--kc-px) * 100%) calc(var(--kc-py) * 100%); transform: rotate(var(--kc-rest)); pointer-events: auto; cursor: grab; touch-action: none; will-change: transform;
}
.kc-swing:active { cursor: grabbing; }
.kc-swing img { width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
@media (max-width: 899px) {
  .toy { --kc-w: 26cqw; --lug-x: 94cqw; --lug-y: 133cqw; }
  .hh-lug {
    left: calc(var(--lug-x) - 2.6cqw); top: calc(var(--lug-y) - 2.6cqw); width: 5.2cqw; height: 5.2cqw; border: 0; border-radius: 50%;
    background: radial-gradient(circle, #5a5a57 0 45%, #b9b9b5 52%, #e4e4e0 70%); box-shadow: inset 0 0.4cqw 0.6cqw rgb(0 0 0 / 0.3);
  }
  .toy-col { margin-bottom: 100px !important; }
}

/* Analógicos */
.hh-stick {
  position: absolute; top: 125cqw; width: 25cqw; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, #2a2b2f 0 55%, #b4b4b0 57%, #d9d9d5 70%, #c5c5c1 100%);
  box-shadow: inset 0 0.6cqw 1cqw rgb(0 0 0 / 0.22), 0 0.4cqw 0 rgb(255 255 255 / 0.6);
}
.hh-stick::after {
  content: ""; position: absolute; inset: 21%; border-radius: 50%;
  background: radial-gradient(circle at 45% 38%, #404146, #1c1d21 70%);
  box-shadow: 0 0.7cqw 1.1cqw rgb(0 0 0 / 0.4), inset 0 0.3cqw 0 rgb(255 255 255 / 0.12);
  transition: transform 0.25s var(--ease);
}
.hh-stick--l { left: 24cqw; }
.hh-stick--r { left: 76cqw; }
.console:hover .hh-stick--l::after { transform: translate(-5%, -6%); }
.console:hover .hh-stick--r::after { transform: translate(6%, 5%); }
.hh-d:focus-visible, .hh-b:focus-visible, .hh-pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.toy p { white-space: normal; }
.btn-glyph {
  display: inline-grid; place-items: center; width: 1.5em; aspect-ratio: 1; border-radius: 50%;
  background: var(--scr-text); color: var(--scr-bg); font-family: var(--sans); font-weight: 600; font-size: 0.95em; line-height: 1;
}

/* Tela inicial de jogos */
.scr-menu {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding: 3.2% 4% 3%;
  background: radial-gradient(120% 90% at 50% 0%, #2a2f38, var(--scr-panel) 70%);
  font-family: var(--mono); color: var(--scr-text);
}
.scr-menu[hidden] { display: none; }
.scr-top { align-self: stretch; display: flex; align-items: center; justify-content: space-between; }
.scr-user { width: 5.29cqw; aspect-ratio: 1; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 0.44cqw rgb(255 255 255 / 0.85); background: #000; }
.scr-user img { width: 100%; height: 100%; object-fit: cover; }
.scr-clock { font-size: 2.65cqw; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; opacity: 0.85; }
.scr-name { margin: auto 0 1.26cqw; font-family: var(--sans); font-weight: 500; font-size: 3.28cqw; color: var(--scr-sel); }
.scr-tiles { display: flex; gap: 2.27cqw; margin-bottom: auto; }
.scr-tile {
  position: relative; width: 11.84cqw; aspect-ratio: 1; border-radius: 1.01cqw; overflow: hidden;
  background: #2f3540; box-shadow: 0 0.38cqw 1.01cqw rgb(0 0 0 / 0.35); transition: transform 0.15s var(--ease);
}
.scr-tile canvas { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.scr-tile.sel { transform: scale(1.06); box-shadow: 0 0 0 0.44cqw #fff, 0 0 0 0.95cqw var(--scr-sel), 0 0.76cqw 1.51cqw rgb(0 0 0 / 0.4); }
.js .scr-tile.sel { animation: sel-pulse 1.4s ease-in-out infinite; }
@keyframes sel-pulse { 50% { box-shadow: 0 0 0 0.44cqw #fff, 0 0 0 0.95cqw #7fe0f4, 0 0.76cqw 1.51cqw rgb(0 0 0 / 0.4); } }
.scr-tile:focus-visible { outline: 0.5cqw solid #fff; outline-offset: 0.76cqw; }
.scr-hint { margin: 1.51cqw 0 0; align-self: stretch; display: flex; align-items: center; gap: 0.5em; font-size: 2.52cqw; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.9; }
.scr-best { margin-left: auto; opacity: 0.7; font-variant-numeric: tabular-nums; }

/* Placar e cartões durante o jogo */
.scr-hud {
  position: absolute; left: 3.5%; right: 3.5%; top: 4%; display: flex; justify-content: space-between; gap: 1em; pointer-events: none;
  font-family: var(--mono); font-weight: 500; font-size: 2.52cqw; letter-spacing: 0.06em; text-transform: uppercase; color: rgb(238 244 255 / 0.88);
  font-variant-numeric: tabular-nums;
}
.scr-hud[hidden] { display: none; }
.scr-card {
  position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); width: 74%; padding: 3.02cqw 3.28cqw; border-radius: 1.51cqw; cursor: pointer;
  background: rgb(20 23 28 / 0.88); box-shadow: 0 0 0 1px rgb(255 255 255 / 0.12); text-align: center; color: var(--scr-text);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.scr-card[hidden] { display: none; }
.scr-card p { margin: 0; }
.scr-card-title { font-family: var(--sans); font-weight: 600; font-size: 3.91cqw; line-height: 1.15; }
.scr-card-text { margin-top: 1.01cqw !important; font-family: var(--sans); font-size: 2.65cqw; line-height: 1.35; opacity: 0.85; }
.scr-card-hint { margin-top: 1.76cqw !important; display: flex; justify-content: center; align-items: center; gap: 0.45em; font-family: var(--mono); font-size: 2.33cqw; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.9; }

/* ---------- Dock ---------- */
.dock { position: fixed; left: 0; right: 0; bottom: max(20px, env(safe-area-inset-bottom)); z-index: var(--z-dock); display: flex; justify-content: center; pointer-events: none; }
.dock-inner {
  pointer-events: auto; display: flex; align-items: flex-end; gap: 16px; padding: 9px 18px 7px;
  border-radius: 24px; border: 1px solid rgb(255 255 255 / 0.85);
  background: rgb(255 255 255 / 0.42);
  backdrop-filter: blur(26px) saturate(170%); -webkit-backdrop-filter: blur(26px) saturate(170%);
  box-shadow: inset 1px 1px 0 rgb(255 255 255 / 0.95), inset 0 -10px 18px -14px rgb(29 122 74 / 0.25), 0 14px 36px rgb(40 70 60 / 0.16);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .dock-inner { background: rgb(255 255 255 / 0.94); } }
.dock-item { display: flex; flex-direction: column; align-items: center; gap: 5px; -webkit-tap-highlight-color: transparent; }
.dock-icon { display: grid; place-items: center; width: 50px; height: 50px; transition: transform 0.18s var(--ease); }
.dock-item:hover .dock-icon { transform: translateY(-3px); }
.dock-item:active .dock-icon { transform: translateY(0) scale(0.94); }
.dock-item.bounce .dock-icon { animation: bounce 0.7s var(--ease); }
@keyframes bounce { 0% { transform: translateY(0); } 35% { transform: translateY(-12px); } 65% { transform: translateY(0); } 82% { transform: translateY(-4px); } 100% { transform: translateY(0); } }
.dock-icon svg { width: 100%; height: 100%; }
.dock-icon--folder { filter: drop-shadow(0 2px 2px rgb(40 80 130 / 0.18)); }
.dock-icon--lab, .dock-icon--profile { width: 44px; height: 44px; margin-bottom: 3px; border-radius: 11px; overflow: hidden; box-shadow: 2px 3px 4px #dedede, 0 0 0 0.5px rgb(0 0 0 / 0.08); }
.dock-icon--lab { background: linear-gradient(180deg, #f2fbf5, #d7f0e0); color: var(--accent); padding: 8px; }
.dock-icon--profile { background: #000; }
.dock-icon--profile img { width: 100%; height: 100%; object-fit: cover; }
.dock-label { padding: 0 6px; border-radius: 5px; font-size: 13px; font-weight: 500; line-height: 21px; letter-spacing: -0.01em; color: var(--ink); }
.dock-item[aria-current="page"] .dock-label { background: var(--accent); color: #fff; }

.colophon {
  position: fixed; right: 24px; bottom: 20px; z-index: var(--z-colophon); margin: 0; pointer-events: none;
  font-family: var(--mono); font-size: 12px; line-height: 1.5; letter-spacing: 0.12em; text-transform: uppercase; text-align: right; color: #a7a7a3;
}
@media (max-width: 899px) { .colophon { display: none; } }
body:not([data-view="inicio"]) .colophon { display: none; }

/* ---------- Projetos ---------- */
.works-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; width: 100%; max-width: 1180px; margin: clamp(8px, 3vh, 32px) auto 0; }
@media (max-width: 760px) { .works-grid { grid-template-columns: 1fr; gap: 16px; } }
.work-card {
  position: relative; display: flex; flex-direction: column; padding: 8px; border-radius: calc(var(--r-card) + 4px);
  background: rgb(255 255 255 / 0.78); box-shadow: 0 1px 8px rgb(0 0 0 / 0.05), 0 0 0 1px rgb(0 0 0 / 0.03);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.work-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgb(0 0 0 / 0.09), 0 0 0 1px rgb(0 0 0 / 0.04); }
.work-card:active { transform: translateY(-2px) scale(0.995); }
.work-card:focus-visible { outline-offset: 4px; border-radius: calc(var(--r-card) + 4px); }
.panel.dealing .work-card { animation: deal 0.85s var(--ease) both; animation-delay: calc(var(--i) * 70ms); }
@keyframes deal {
  0% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(0.82); }
  35% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
.work-preview { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-media); overflow: hidden; background: #eeeeec; }
.work-logo { position: absolute; inset: 0; display: flex; padding: var(--pad, 0); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.05); }
.work-preview .work-logo img { flex: 1; min-width: 0; width: 100%; height: 100%; object-fit: var(--fit, contain); transition: transform 0.6s var(--ease); }
.work-card:hover .work-logo img { transform: scale(1.04); }
.work-mark { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.04); }
.work-mark svg { width: auto; height: 30%; color: var(--c); fill: currentColor; transition: transform 0.6s var(--ease); }
.work-mark span { font-family: var(--mono); font-weight: 600; font-size: clamp(14px, 1.3vw, 18px); letter-spacing: -0.03em; color: var(--ink); }
.work-card:hover .work-mark svg { transform: scale(1.06) rotate(-3deg); }

/* Abas Profissional / Pessoal */
.works-tabs {
  display: flex; width: max-content; max-width: 100%; margin: clamp(4px, 2vh, 20px) auto 0; padding: 4px; gap: 2px; border-radius: 999px;
  background: rgb(255 255 255 / 0.7); border: 1px solid rgb(0 0 0 / 0.07); box-shadow: 0 1px 6px rgb(0 0 0 / 0.04);
}
.works-tab {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 18px; border-radius: 999px;
  font-size: 15px; font-weight: 500; color: var(--muted); transition: background-color 0.2s, color 0.2s;
}
.works-tab:hover { color: var(--ink); }
.works-tab[aria-selected="true"] { background: var(--accent); color: #fff; }
.works-count { font-family: var(--mono); font-size: 12px; opacity: 0.75; font-variant-numeric: tabular-nums; }
.works-grid.swap .work-card { animation: rise 0.45s var(--ease) both; animation-delay: calc(var(--i) * 60ms); }
.work-preview img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.work-card:hover .work-preview img { transform: scale(1.03); }
.work-stats {
  position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; gap: 4%; padding: 0 7%;
  background: radial-gradient(90% 120% at 50% 0%, #ffffff, var(--tint, #eef6f1) 70%), var(--tint, #eef6f1);
}
.stat { padding: 16% 10%; border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 0.05), 0 0 0 1px rgb(0 0 0 / 0.04); }
.stat-value { display: block; font-family: var(--mono); font-weight: 500; font-size: clamp(15px, 1.8vw, 28px); line-height: 1.1; letter-spacing: -0.03em; white-space: nowrap; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-label { display: block; margin-top: 8px; font-family: var(--mono); font-size: clamp(10px, 0.9vw, 13px); line-height: 1.2; color: var(--muted); }
.work-meta { display: flex; flex-direction: column; gap: 12px; padding: 18px 14px 16px; }
.work-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.work-company { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); }
.status {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 7px; border-radius: 999px; white-space: nowrap;
  background: rgb(34 197 94 / 0.1); color: #15803d; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.02em;
}
.status svg { width: 14px; height: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 8px; border-radius: 8px;
  background: #fff; border: 1px solid #e7e7e4; box-shadow: 0 1px 0 rgb(0 0 0 / 0.03);
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: -0.01em; color: var(--text); white-space: nowrap;
}
.chip svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--c); fill: currentColor; }
.chip--plain { padding: 0 10px; color: var(--muted); }
.work-title { margin: 0; font-family: var(--display); font-weight: 500; font-size: clamp(21px, 2vw, 29px); line-height: 1.15; letter-spacing: -0.045em; color: var(--ink); text-wrap: balance; }

/* ---------- Janela de estudo de caso ---------- */
.case { position: fixed; inset: 0; z-index: var(--z-case); display: flex; justify-content: center; align-items: flex-end; }
.case[hidden] { display: none; }
.case-backdrop { position: absolute; inset: 0; background: rgb(247 247 245 / 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade 0.25s both; }
.case-window {
  position: relative; width: min(1000px, calc(100% - 24px)); height: calc(100svh - 28px); margin-top: 28px;
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--r-window) var(--r-window) 0 0; background: var(--surface);
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.08), 0 -10px 40px rgb(30 26 21 / 0.12);
  animation: sheet-up 0.5s var(--ease) both;
}
.case.closing .case-window { animation: sheet-down 0.35s cubic-bezier(0.65, 0, 0.35, 1) both; }
.case.closing .case-backdrop { animation: fade 0.3s reverse both; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
@keyframes sheet-down { to { transform: translateY(60px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.window-bar {
  position: relative; flex-shrink: 0; display: flex; align-items: center; height: 34px; padding: 0 12px;
  background: linear-gradient(#ffffff, #f4f4f4 40%, #eaeaea); border-bottom: 1px solid #d9d9d9;
}
.window-dots { display: inline-flex; gap: 7px; }
.window-dot { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 0.5px rgb(0 0 0 / 0.2); }
.window-dot--red { background: #ff5f57; display: grid; place-items: center; }
.window-dot--yellow { background: #febc2e; }
.window-dot--green { background: #28c840; }
.window-dot--red svg { width: 8px; height: 8px; color: rgb(80 0 0 / 0.65); opacity: 0; transition: opacity 0.15s; }
.window-dot--red:hover svg, .window-dot--red:focus-visible svg { opacity: 1; }
.window-name { position: absolute; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 12px; color: var(--ink); opacity: 0.8; white-space: nowrap; }
.case-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.case-in { max-width: 760px; margin: 0 auto; padding: clamp(32px, 6vw, 64px) clamp(20px, 5vw, 40px) 96px; }
.case-company { margin: 0; font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.case-title { margin: 12px 0 0; font-family: var(--display); font-weight: 600; font-size: clamp(32px, 4.6vw, 52px); line-height: 1.05; letter-spacing: -0.055em; color: var(--ink); text-wrap: balance; }
.case-title:focus { outline: none; }
.case-tagline { margin: 18px 0 0; font-size: clamp(17px, 1.8vw, 20px); font-weight: 300; line-height: 1.55; color: var(--text); }
.case-chips { margin-top: 22px; }
.case-figure { margin: 40px 0 0; }
.case-figure img { width: 100%; border-radius: var(--r-media); border: 1px solid var(--line); background: #f3f3f1; }
.case-figure figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; font-family: var(--mono); font-size: 12px; color: var(--faint); }
.fake-tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; border-radius: 999px; white-space: nowrap;
  background: #fff6db; border: 1px solid #f0dea0; color: #8a6a00; font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.02em;
}
.fake-tag svg { width: 13px; height: 13px; fill: currentColor; }
.fake-tag--real { background: #eaf6ef; border-color: #bfe3cd; color: #1d6b42; }
.case-phones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 2vw, 20px); padding: clamp(14px, 4vw, 40px); border-radius: var(--r-media); background: #f3f6f4; }
.case-phones img { border-radius: clamp(10px, 2vw, 22px); border: 1px solid var(--line); background: #fff; }
.case-secs { margin-top: 48px; display: grid; gap: 32px; }
.case-sec h2 { margin: 0 0 8px; font-size: 19px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); }
.case-sec p { margin: 0; font-size: 17px; font-weight: 300; line-height: 1.65; color: var(--text); }
.case-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 48px; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 20px; border-radius: 999px; font-size: 14px; font-weight: 500; white-space: nowrap; transition: transform 0.15s, background-color 0.2s, border-color 0.2s; }
.btn svg { width: 15px; height: 15px; }
.btn:active { transform: scale(0.98); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #17663d; }
.btn-ghost { border: 1px solid #dcdcd8; background: #fff; color: var(--ink); }
.btn-ghost:hover { border-color: #b9b9b4; }

/* ---------- Laboratório ---------- */
.lab { width: 100%; max-width: 1180px; margin: clamp(8px, 3vh, 32px) auto 0; }
.lab-title { margin: 0 0 12px; font-family: var(--display); font-weight: 600; font-size: clamp(30px, 3.6vw, 52px); line-height: 1.1; letter-spacing: -0.055em; color: var(--label); }
.lab-dots i { font-style: inherit; opacity: 0; animation: dot 2.4s steps(1, end) infinite; }
.lab-dots i:nth-child(2) { animation-name: dot2; }
.lab-dots i:nth-child(3) { animation-name: dot3; }
@keyframes dot { 0%, 100% { opacity: 0; } 25%, 99% { opacity: 1; } }
@keyframes dot2 { 0%, 100% { opacity: 0; } 50%, 99% { opacity: 1; } }
@keyframes dot3 { 0%, 100% { opacity: 0; } 75%, 99% { opacity: 1; } }
.lab-sub { margin: 0 0 32px; max-width: 60ch; font-size: clamp(16px, 1.3vw, 19px); font-weight: 300; line-height: 1.6; color: var(--text); }
.lab { position: relative; }
.lab-projects { display: grid; gap: clamp(44px, 7vh, 72px); }
.lab-project { position: relative; }
.lp-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px dashed #d9d9d4; }
.lp-num { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.lp-name { margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(20px, 1.9vw, 26px); line-height: 1.2; letter-spacing: -0.05em; color: var(--ink); }
.lp-origin { margin-left: auto; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--faint); }
.lp-body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(20px, 3vw, 44px); align-items: start; }
.lp-files { display: grid; gap: 14px; }
.lp-note {
  position: relative; position: sticky; top: 24px; padding: 18px 20px 18px; border-radius: 4px; transform: rotate(0.6deg);
  background: #fdfbef; border: 1px solid rgb(0 0 0 / 0.07); box-shadow: 0 1px 2px rgb(0 0 0 / 0.05), 0 10px 22px rgb(30 26 21 / 0.07);
}
.lab-project:nth-child(even) .lp-note { transform: rotate(-0.7deg); }
.lp-arrow { position: absolute; left: -54px; top: 22px; width: 50px; color: #b9a64a; }
.lp-text { margin: 0 0 12px; font-size: 16px; font-weight: 400; line-height: 1.5; color: var(--ink); }
.lp-points { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.lp-points li { position: relative; padding-left: 20px; font-size: 14.5px; font-weight: 300; line-height: 1.5; color: var(--text); }
.lp-points li::before { content: "↳"; position: absolute; left: 0; top: 0; font-family: var(--mono); color: var(--accent); }
.lp-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-family: var(--mono); font-size: 12.5px; color: #4d8a68; }
.lp-link svg { width: 13px; height: 13px; fill: currentColor; }
.lp-link:hover { color: var(--accent); }
@media (max-width: 860px) {
  .lp-body { grid-template-columns: 1fr; }
  .lp-note { position: relative; top: 0; margin: 0 6px; }
  .lp-arrow { left: 18px; top: -30px; width: 40px; transform: rotate(70deg); }
}
.tile {
  display: block; border-radius: 10px; overflow: hidden; background: #fafafa; border: 1px solid rgb(0 0 0 / 0.08);
  box-shadow: inset 0 1px 0 #fffc, 0 6px 18px rgb(30 26 21 / 0.08), 0 1px 3px rgb(0 0 0 / 0.06);
  transition: transform 0.2s var(--ease), box-shadow 0.2s, border-color 0.2s;
}
.tile:hover { transform: translateY(-2px); border-color: rgb(0 0 0 / 0.14); box-shadow: inset 0 1px 0 #fffe, 0 10px 24px rgb(30 26 21 / 0.1), 0 1px 3px rgb(0 0 0 / 0.07); }
.tile.span-2 { grid-column: span 2; }
@media (max-width: 640px) { .tile.span-2 { grid-column: auto; } }
.tile-bar {
  position: relative; display: flex; align-items: center; height: 26px; padding: 0 9px;
  background: linear-gradient(#ffffff, #f7f7f7 30%, #ececec 55%, #e6e6e6); border-bottom: 1px solid #d5d5d5;
}
.tile-dots { display: inline-flex; gap: 5px; }
.tile-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgb(0 0 0 / 0.09); box-shadow: inset 0 0 0 0.5px rgb(0 0 0 / 0.15); transition: background-color 0.2s; }
.tile:hover .tile-dots i:nth-child(1) { background: #ff5f57; }
.tile:hover .tile-dots i:nth-child(2) { background: #febc2e; }
.tile:hover .tile-dots i:nth-child(3) { background: #28c840; }
.tile-name { position: absolute; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 11.5px; color: var(--ink); opacity: 0.8; white-space: nowrap; }
.tile-open { position: absolute; right: 9px; width: 13px; height: 13px; color: var(--muted); opacity: 0; transition: opacity 0.2s; }
.tile:hover .tile-open, .tile:focus-visible .tile-open { opacity: 1; }
.tile-code {
  position: relative; margin: 0; padding: 16px 18px 18px; overflow-x: auto; background: #fcfcfb;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.65; color: #3a3a38; white-space: pre; tab-size: 4;
}
.tok-k { color: #1d7a4a; font-weight: 500; }
.tok-s { color: #a0522d; }
.tok-c { color: #9a9a95; }
.tok-n { color: #2f5e9e; }
.tok-f { color: #6b3fa0; }
.tile-img { position: relative; display: block; background: #fff; padding: 10px; }
.tile-img img { width: 100%; height: auto; max-height: 300px; object-fit: contain; }
.tile-img .fake-tag { position: absolute; right: 12px; bottom: 12px; }
/* ---------- Adesivos ---------- */
.board { margin-top: clamp(56px, 8vh, 96px); }
.board-title { margin: 0 0 20px; font-family: var(--display); font-weight: 600; font-size: clamp(22px, 2.1vw, 32px); letter-spacing: -0.05em; color: var(--label); }
.board-desk { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; }
@media (max-width: 760px) { .board-desk { grid-template-columns: 1fr; } }
.board-sheet { border-radius: var(--r-card); background: #fff; border: 1px solid var(--line); box-shadow: 0 6px 18px rgb(30 26 21 / 0.06); padding: 14px 16px 16px; }
.board-sheet-head { display: flex; align-items: center; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--faint); }
.board-reset { padding: 3px 10px; border-radius: 999px; border: 1px solid #e2e2df; font-family: var(--mono); font-size: 12px; color: var(--muted); transition: border-color 0.15s, color 0.15s; }
.board-reset:hover { border-color: #bdbdb8; color: var(--ink); }
.board-stickers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 14px; padding: 16px; border-radius: 12px; background-color: #f6f6f3; background-image: radial-gradient(#e3e3de 1px, transparent 1px); background-size: 12px 12px; }
.board-hint { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.sticker {
  position: relative; display: grid; place-items: center; aspect-ratio: 1; width: 100%; padding: 0;
  cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent; user-select: none;
}
.sticker:active { cursor: grabbing; }
.sticker:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 50%; }
.sticker.is-peeling { z-index: 3; }
.peel { position: relative; width: 100%; height: 100%; }
.peel-hole, .peel-front, .peel-shade, .peel-flap, .peel-back { position: absolute; display: block; }
/* O que fica na cartela quando ele sai: a marca do adesivo. */
.peel-hole { inset: 3%; border-radius: 50%; background: #ebebe6; box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.1); }
.peel-front { inset: 0; transition: opacity 0.35s ease; }
.peel-shade { inset: -100%; visibility: hidden; pointer-events: none; transition: opacity 0.35s ease; }
.peel-flap { inset: 0; }
.peel-back {
  left: calc(100% / 3); top: calc(100% / 3); width: calc(100% / 3); height: calc(100% / 3); border-radius: 50%;
  transform-origin: 0 0; background-color: #f3f3f0; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.06);
}
.sticker.is-peeled .peel-front, .sticker.is-peeled .peel-shade { opacity: 0; transition: none; }
/* A face do adesivo: disco branco com o logo. */
.st-face {
  position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50%; background: #fff;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.05); filter: drop-shadow(0 1px 1.5px rgb(0 0 0 / 0.2)) drop-shadow(0 3px 6px rgb(0 0 0 / 0.08));
}
.st-face svg { width: 56%; height: 56%; fill: var(--c); }

.sticker-ghost { position: fixed; left: 0; top: 0; z-index: var(--z-drag); pointer-events: none; perspective: 600px; filter: drop-shadow(0 10px 14px rgb(0 0 0 / 0.18)); }
.ghost-flip { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; }
.ghost-flip .st-face { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.ghost-back { position: absolute; inset: 0; border-radius: 50%; background: #f3f3f0; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.07); transform: translateZ(-1px); }

.placed {
  position: absolute; z-index: 4; width: var(--s, 64px); height: var(--s, 64px); transform: translate(-50%, -50%) rotate(var(--rot));
  cursor: grab; touch-action: none; user-select: none;
}
.placed .st-face { filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.22)); }
.placed.slap { animation: slap 0.42s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
.placed.lifted { transform: translate(-50%, -50%) rotate(var(--rot)) scale(1.06); }
.placed.lifted .st-face { filter: drop-shadow(0 8px 10px rgb(0 0 0 / 0.2)); }
@keyframes slap { from { transform: translate(-50%, -50%) rotate(var(--rot)) scale(1.18); } }

.board-paper {
  position: relative; min-height: 300px; padding: 40px 28px 28px 56px; border-radius: 4px; transform: rotate(0.8deg);
  background-color: #fffefa;
  background-image:
    linear-gradient(90deg, transparent 40px, rgb(230 120 120 / 0.35) 40px, rgb(230 120 120 / 0.35) 41px, transparent 41px),
    repeating-linear-gradient(transparent 0 31px, rgb(110 150 200 / 0.22) 31px 32px);
  background-position: 0 0, 0 18px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08), 0 12px 28px rgb(30 26 21 / 0.1);
}
.tape { position: absolute; left: 50%; top: -12px; width: 110px; height: 26px; transform: translateX(-50%) rotate(-3deg); background: rgb(220 236 226 / 0.85); box-shadow: 0 1px 2px rgb(0 0 0 / 0.08); }
.paper-head { margin: 0 0 6px; font-family: var(--mono); font-size: 15px; color: var(--ink); line-height: 32px; }
.paper-todo { list-style: none; margin: 0; padding: 0; }
.paper-todo li { position: relative; font-family: var(--mono); font-size: 15px; line-height: 32px; color: var(--text); padding-left: 26px; }
.paper-todo li::before { content: ""; position: absolute; left: 0; top: 9px; width: 13px; height: 13px; border: 1.5px solid #8a8a85; border-radius: 3px; }
.paper-todo li.done { color: var(--faint); }
.paper-todo li.done::before { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 2px #fffefa; }
.paper-todo li.done span { text-decoration: line-through; text-decoration-color: rgb(0 0 0 / 0.35); }

/* ---------- Perfil ---------- */
.profile { width: 100%; max-width: 1120px; margin: clamp(8px, 3vh, 32px) auto 0; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 860px) { .profile { grid-template-columns: 1fr; } }
.prints { position: relative; height: clamp(380px, 46vw, 560px); }
@media (max-width: 860px) { .prints { height: min(380px, 92vw); max-width: 400px; margin: 0 auto; width: 100%; } }
.print {
  position: absolute; margin: 0; width: 68%; padding: 4.5% 4.5% 16%; background: #fff; border-radius: 2px; cursor: pointer;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08), 0 14px 30px rgb(30 26 21 / 0.14);
  transform: rotate(var(--r)); transition: transform 0.6s var(--ease), box-shadow 0.25s, z-index 0s;
  container-type: inline-size;
}
.print:hover { box-shadow: 0 1px 2px rgb(0 0 0 / 0.08), 0 18px 36px rgb(30 26 21 / 0.18); }
.print:nth-child(1) { left: 2%; top: 6%; --r: -5deg; }
.print:nth-child(2) { left: 28%; top: 18%; --r: 4deg; }
.print.front { z-index: 2; }
.print.swap { transform: rotate(var(--r)) translateY(-18px); }
.print-photo { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: #111; }
.print-photo img { width: 100%; height: 100%; object-fit: cover; filter: contrast(1.06) saturate(1.06); user-select: none; -webkit-user-drag: none; }
.stamp {
  position: absolute; right: 6%; bottom: 5%; font-family: var(--mono); font-weight: 500; font-size: clamp(9px, 4cqw, 13px); letter-spacing: 0.08em;
  color: #ff9a3c; text-shadow: 0 0 2px rgb(255 140 40 / 0.9), 0 0 6px rgb(255 120 20 / 0.45); mix-blend-mode: screen; pointer-events: none;
}
.print-tape { position: absolute; left: 50%; top: -10px; width: 34%; height: 22px; transform: translateX(-50%) rotate(2deg); background: rgb(255 240 200 / 0.75); box-shadow: 0 1px 2px rgb(0 0 0 / 0.08); }
.profile-col { padding-top: clamp(0px, 3vh, 24px); }
.profile-heading { margin: 0 0 24px; font-family: var(--display); font-weight: 600; font-size: clamp(32px, 3.6vw, 52px); line-height: 1.05; letter-spacing: -0.055em; color: var(--label); }
.profile-body { margin: 0 0 14px; font-size: clamp(16px, 1.35vw, 19px); font-weight: 300; line-height: 1.65; color: var(--text); }
.profile-body em { font-style: normal; font-weight: 500; color: var(--accent); }
.facts { display: grid; gap: 12px; margin-top: 28px; }
.txt-card { padding: 12px 16px 14px; border-radius: 12px; background: #fff; border: 1px solid rgb(0 0 0 / 0.07); transition: border-color 0.2s; }
.txt-card:hover { border-color: #a9c9b6; }
.txt-name { display: block; font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.txt-text { margin: 6px 0 0; font-size: 16px; font-weight: 300; line-height: 1.55; color: var(--text); }
.txt-text a { color: #4d8a68; white-space: nowrap; }
.txt-text a:hover { color: var(--accent); }
.links-card { margin-top: 12px; }
.links-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; }
.links-list a { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 15px; color: var(--ink); }
.links-list a svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--muted); transition: color 0.15s; }
.links-list a:hover svg { color: var(--accent); }
.links-list .hint { margin-left: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 12px; color: var(--faint); }

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; animation-delay: 0ms !important; }
  .js .toy-float, .badge-dot, .lab-dots i, .js .nav-caret { animation: none !important; opacity: 1; }
}
