/* Pixel Lusitano: direção visual "Azulejo e Ouro" (especificação §5). */

@font-face {
  font-family: "Jersey 10";
  src: url("/fonts/jersey-10-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/atkinson-hyperlegible-next-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/atkinson-hyperlegible-next-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/atkinson-hyperlegible-next-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --noite: #0E0C2C;
  --noite-2: #15123F;
  --noite-3: #1E1A55;
  --ouro: #E8A515;
  --ouro-claro: #F8CB4A;
  --ouro-sombra: #9C6C06;
  --cobalto: #2452C9;
  --cobalto-escuro: #1A3A94;
  --azulejo: #EEF2FA;
  --texto-2: #B7BEDC;
  --lacre: #C42B2B;
  --titulo: "Jersey 10", "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --texto: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --tile-claro: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'><rect width='40' height='40' fill='%23EEF2FA'/><g fill='none' stroke='%231A3A94' stroke-width='1.4'><circle cx='0' cy='0' r='12'/><circle cx='40' cy='0' r='12'/><circle cx='0' cy='40' r='12'/><circle cx='40' cy='40' r='12'/><rect x='13' y='13' width='14' height='14' transform='rotate(45 20 20)'/></g><g fill='%232452C9'><circle cx='0' cy='0' r='8'/><circle cx='40' cy='0' r='8'/><circle cx='0' cy='40' r='8'/><circle cx='40' cy='40' r='8'/><path d='M20 11 Q22.5 17.5 29 20 Q22.5 22.5 20 29 Q17.5 22.5 11 20 Q17.5 17.5 20 11Z'/><circle cx='20' cy='3' r='1.6'/><circle cx='3' cy='20' r='1.6'/><circle cx='37' cy='20' r='1.6'/><circle cx='20' cy='37' r='1.6'/></g><circle cx='20' cy='20' r='2.4' fill='%23EEF2FA'/></svg>");
  --tile-noite: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'><rect width='40' height='40' fill='%23110F33'/><g fill='none' stroke='%23263393' stroke-width='1.1'><circle cx='0' cy='0' r='12'/><circle cx='40' cy='0' r='12'/><circle cx='0' cy='40' r='12'/><circle cx='40' cy='40' r='12'/><rect x='13' y='13' width='14' height='14' transform='rotate(45 20 20)'/></g><g fill='%231C2470'><circle cx='0' cy='0' r='8'/><circle cx='40' cy='0' r='8'/><circle cx='0' cy='40' r='8'/><circle cx='40' cy='40' r='8'/><path d='M20 11 Q22.5 17.5 29 20 Q22.5 22.5 20 29 Q17.5 22.5 11 20 Q17.5 17.5 20 11Z'/></g><circle cx='20' cy='20' r='2.4' fill='%23E8A515' fill-opacity='.55'/></svg>");
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* O atributo hidden ganha sempre (um .btn com display: inline-flex apareceria na mesma). */
[hidden] { display: none !important; }
html { background: var(--noite); color: var(--azulejo); font-family: var(--texto); font-size: 18px; line-height: 1.55; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { min-height: 100vh; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.pixel { image-rendering: pixelated; }
h1, h2, h3 { font-family: var(--titulo); font-weight: 400; line-height: .95; }

:focus-visible { outline: 3px solid var(--ouro); outline-offset: 3px; }
.saltar { position: absolute; left: 16px; top: -60px; z-index: 20; background: var(--ouro); color: var(--noite); font-weight: 700; padding: 10px 16px; min-height: 44px; text-decoration: none; }
.saltar:focus { top: 12px; }

/* Cabeçalho */
.cabecalho { position: relative; z-index: 3; }
.cabecalho-linha { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 18px; }
.marca { display: flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; }
.marca img { width: 46px; height: 46px; clip-path: circle(46.5%); }
.marca span { font-family: var(--titulo); font-size: 34px; line-height: 1; color: var(--ouro); }
.cabecalho nav { display: flex; gap: 8px; margin-left: auto; font-size: 16px; }
.cabecalho nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; text-decoration: none; color: var(--texto-2); }
.cabecalho nav a:hover { color: var(--azulejo); }
.lingua { display: flex; border: 1px solid #3A3F86; border-radius: 999px; overflow: hidden; font-size: 14px; font-weight: 600; }
.lingua a, .lingua span { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 12px; text-decoration: none; }
.lingua [aria-current] { background: var(--azulejo); color: var(--noite); }
.lingua a:hover { background: var(--noite-3); }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 22px; border-radius: 4px; font-weight: 700; font-size: 17px; text-decoration: none; cursor: pointer; font-family: inherit; transition: transform .15s, background .15s, border-color .15s; }
.btn.ouro { background: var(--ouro); color: var(--noite); box-shadow: 0 4px 0 var(--ouro-sombra); border: 0; }
.btn.ouro:hover { background: var(--ouro-claro); }
.btn.linha { border: 2px solid #4B56B8; color: var(--azulejo); background: transparent; }
.btn.linha:hover { border-color: var(--azulejo); }
.acoes { display: flex; flex-wrap: wrap; gap: 14px; }

/* Topo do início */
.heroi { position: relative; min-height: min(calc(100vh - 90px), 860px); display: flex; align-items: center; padding: 24px 0 96px; overflow: hidden; }
.campo { position: absolute; inset: 0 0 0 38%; display: grid; grid-template-columns: repeat(14, 72px); grid-auto-rows: 72px; overflow: hidden;
  -webkit-mask-image: radial-gradient(closest-side at 56% 48%, #000 35%, transparent 100%); mask-image: radial-gradient(closest-side at 56% 48%, #000 35%, transparent 100%); }
.campo i { background: var(--tile-noite) center / 72px 72px; opacity: 0; transform: scale(.4) rotate(90deg); animation: assentar .75s cubic-bezier(.2, .9, .25, 1) forwards; animation-delay: var(--d); }
@keyframes assentar { to { opacity: 1; transform: none; } }
.sem-animacao .campo i { animation: none; opacity: 1; transform: none; }
.heroi-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 48px; width: 100%; }
.heroi h1 { font-size: clamp(64px, 7.4vw, 116px); line-height: .86; }
.heroi-texto > p { margin-top: 26px; font-size: 21px; color: var(--texto-2); max-width: 31ch; }
.heroi-texto .acoes { margin-top: 34px; }
.medalhao { justify-self: center; filter: drop-shadow(0 0 70px rgba(232, 165, 21, .28)); animation: surgir 1.1s .9s both; }
.medalhao img { display: block; width: min(500px, 100%); clip-path: circle(46.5%); }
.sem-animacao .medalhao { animation: none; }
@keyframes surgir { from { opacity: 0; transform: translateY(24px) scale(.96); } }

/* Secções */
.seccao { padding: 56px 0 96px; }
.seccao h2 { font-size: 84px; line-height: 1; margin-bottom: 12px; }
.seccao .intro { color: var(--texto-2); max-width: 52ch; margin-bottom: 48px; }
.seccao .intro + .aviso-android { margin: -30px 0 48px; max-width: 72ch; }

/* Painéis de jogo */
.paineis { display: grid; grid-template-columns: 1fr 1fr; gap: 56px 40px; }
.moldura { position: relative; padding: 12px; background: var(--tile-claro) 0 0 / 28px 28px; box-shadow: 0 0 0 3px var(--cobalto-escuro), 0 24px 50px rgba(0, 0, 0, .45); transition: transform .25s; }
.moldura::after { content: ""; position: absolute; inset: 0; padding: 12px; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(180px circle at var(--x, 50%) var(--y, 50%), rgba(248, 203, 74, .9), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.moldura > img, .moldura > a > img, .obra { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--noite-2); }
.moldura > a { display: block; }
.moldura.retrato { justify-self: center; width: fit-content; max-width: 100%; }
.moldura.retrato > img { aspect-ratio: auto; width: auto; max-width: 100%; max-height: min(620px, 80vh); }
.info { padding-top: 22px; }
.info h3 { font-size: 46px; line-height: 1; }
.info h3 a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.info h3 a:hover { color: var(--ouro-claro); }
.info > p { margin-top: 8px; color: var(--texto-2); max-width: 44ch; }
.meta { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; font-size: 15px; }
.meta li { display: flex; align-items: center; gap: 8px; }
.meta li::before { content: ""; width: 8px; height: 8px; background: var(--ouro); }
.meta li.breve::before { background: var(--cobalto); }
.info .acoes { margin-top: 20px; }
.info .btn { font-size: 15px; padding: 8px 18px; }
.obra { position: relative; display: grid; grid-template-columns: repeat(16, 1fr); grid-template-rows: repeat(9, 1fr); overflow: hidden; }
.obra i { background: var(--tile-claro) center / 100% 100%; box-shadow: inset 0 0 0 1px rgba(26, 58, 148, .35); }
.obra i.falta { background: transparent; box-shadow: inset 0 0 0 1px rgba(183, 190, 220, .12); }
.obra span { position: absolute; right: 18px; bottom: 14px; font-family: var(--titulo); font-size: 40px; line-height: 1.1; color: var(--ouro); background: var(--noite); padding: 2px 14px 4px; }

/* Sobre e contacto */
.sobre-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; align-items: center; }
.sobre-grid .moldura img { aspect-ratio: 16 / 9; }
.sobre-grid p { font-size: 20px; color: var(--azulejo); max-width: 52ch; }
.contacto-caixa { display: grid; gap: 22px; padding: 40px; background: var(--noite-2); box-shadow: inset 0 0 0 1px #2B2A6B; }
.contacto-caixa p { color: var(--texto-2); }
.contacto-email { font-family: var(--titulo); font-size: clamp(34px, 5vw, 56px); line-height: 1; color: var(--azulejo); text-decoration: none; overflow-wrap: anywhere; }
.contacto-email:hover { color: var(--ouro-claro); }

/* Rodapé */
.rodape { border-top: 1px solid #2B2A6B; padding: 34px 0 44px; color: var(--texto-2); font-size: 15px; }
.rodape-linha { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.rodape .marca span { font-size: 26px; }
.rodape-links { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; margin-left: auto; }
.rodape-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; }

/* Página de jogo */
.jogo-topo { padding: 24px 0 64px; }
.jogo-topo-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.jogo-topo h1 { font-size: clamp(60px, 7vw, 108px); line-height: .9; }
.jogo-topo .frase { margin-top: 14px; font-size: 22px; color: var(--texto-2); max-width: 30ch; }
.jogo-topo .meta { margin-top: 18px; }
.jogo-topo .acoes { margin-top: 26px; }
.jogo-corpo { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 56px; padding-bottom: 96px; }
.jogo-corpo h2 { font-size: 52px; margin: 0 0 18px; }
.jogo-corpo section + section { margin-top: 56px; }
.jogo-corpo .descricao { font-size: 20px; max-width: 60ch; }
.destaques { list-style: none; display: grid; gap: 12px; }
.destaques li { display: flex; gap: 12px; align-items: baseline; }
.destaques li::before { content: ""; flex: none; width: 10px; height: 10px; background: var(--ouro); transform: translateY(-2px) rotate(45deg); }
.galeria { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.galeria a { display: block; padding: 6px; background: var(--tile-claro) 0 0 / 18px 18px; box-shadow: 0 0 0 2px var(--cobalto-escuro); transition: transform .2s; }
.galeria img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--noite-2); }
.galeria.retratos { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.galeria.retratos img { aspect-ratio: 390 / 844; object-position: top; }
.ficha { padding: 28px; background: var(--noite-2); box-shadow: inset 0 0 0 1px #2B2A6B; }
.ficha dl { display: grid; gap: 16px; }
.ficha dt { font-size: 14px; color: var(--texto-2); }
.ficha dd { font-weight: 600; }
.passos { counter-reset: passo; list-style: none; display: grid; gap: 14px; }
.passos li { counter-increment: passo; display: flex; gap: 14px; align-items: baseline; }
.passos li::before { content: counter(passo); flex: none; display: grid; place-items: center; width: 34px; height: 34px; font-family: var(--titulo); font-size: 24px; color: var(--noite); background: var(--ouro); }
.ligacoes { display: grid; gap: 6px; margin-top: 24px; }
.ligacoes a { display: inline-flex; align-items: center; min-height: 44px; }

/* Conteúdo completo dos jogos: etiquetas, secções, citação, aviso do Android e tecnologia */
.etiquetas { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.etiquetas li { padding: 3px 10px; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--azulejo);
  background: var(--cobalto-escuro); box-shadow: inset 0 0 0 1px var(--cobalto); }
.jogo-corpo section > p + p, .jogo-corpo section > p + ul, .jogo-corpo .descricao + .descricao { margin-top: 14px; }
.citacao { margin: 24px 0 0; padding: 18px 22px; font-family: var(--titulo); font-size: 30px; line-height: 1.1; color: var(--ouro);
  background: var(--noite-2); box-shadow: inset 0 0 0 2px var(--ouro), inset 0 0 0 6px var(--noite-2), inset 0 0 0 8px var(--ouro-sombra); }
.aviso-android { margin-top: 18px; padding: 12px 16px; font-size: 15px; color: var(--texto-2); border-left: 4px solid var(--cobalto); background: var(--noite-2); }
.tecnologia { width: 100%; margin-top: 18px; border-collapse: collapse; font-size: 15px; }
.tecnologia th { padding: 10px 12px; text-align: left; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--azulejo); background: var(--cobalto-escuro); }
.tecnologia td { padding: 12px; vertical-align: top; border-bottom: 1px solid #2B2A6B; overflow-wrap: anywhere; }
.tecnologia td:first-child { font-weight: 700; color: var(--ouro); }
.notas-tecnologia { margin-top: 18px; font-size: 15px; }

/* Spoiler das notas de versão: o <summary> parece um botão dourado grande; o losango roda ao abrir. */
.spoiler summary { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 14px 22px; cursor: pointer; list-style: none;
  font-family: var(--titulo); font-size: 30px; line-height: 1; color: var(--noite); background: var(--ouro); box-shadow: 0 4px 0 var(--ouro-sombra); }
.spoiler summary::-webkit-details-marker { display: none; }
.spoiler summary::before { content: ""; flex: none; width: 14px; height: 14px; background: var(--noite); transform: rotate(45deg); transition: transform .2s; }
.spoiler[open] summary::before { transform: rotate(135deg) scale(.8); }
.spoiler summary:hover { background: var(--ouro-claro); }
.versoes { display: grid; gap: 16px; margin-top: 22px; }
.versao { padding: 18px 20px; background: var(--noite-2); border-left: 4px solid var(--ouro); overflow-wrap: anywhere; }
.versao.atual { box-shadow: inset 0 0 0 1px var(--ouro); }
.versao header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 10px; }
.versao h3 { font-size: 34px; line-height: 1; color: var(--ouro); }
.versao time { color: var(--texto-2); font-size: 15px; }
.etiqueta-atual { padding: 2px 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--azulejo); background: var(--cobalto); }
.titulo-versao { font-weight: 700; margin-bottom: 8px; }
.versao h4 { margin: 14px 0 8px; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; color: var(--texto-2); }
.versao .destaques { gap: 8px; font-size: 15px; }
.fechar-spoiler { margin-top: 18px; }

/* Feedback: escolhas em forma de botão (o rádio fica escondido mas focável), estrelas e caixas de texto. */
.so-leitor { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.feedback { display: grid; gap: 18px; max-width: 640px; }
.feedback fieldset { border: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.feedback legend { width: 100%; margin-bottom: 10px; font-weight: 700; }
.feedback .armadilha { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.escolha { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px; cursor: pointer;
  border: 2px solid #5D66C2; color: var(--azulejo); font-weight: 700; }
.escolha input, .estrela input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.escolha:has(input:checked) { background: var(--ouro); border-color: var(--ouro); color: var(--noite); }
.escolha:has(input:focus-visible), .estrela:has(input:focus-visible) { outline: 3px solid var(--ouro-claro); outline-offset: 3px; }
.estrelas { display: flex; gap: 4px; }
.estrela { display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; font-size: 34px; line-height: 1; color: transparent; -webkit-text-stroke: 2px #6870C8; }
.estrela:has(input:checked), .estrela:has(~ .estrela input:checked) { color: var(--ouro); -webkit-text-stroke-color: var(--ouro); }
.caixa { display: grid; gap: 8px; font-weight: 700; }
.caixa textarea { width: 100%; padding: 10px 12px; font: inherit; font-weight: 400; color: var(--azulejo); background: var(--noite-2);
  border: 2px solid #5D66C2; resize: vertical; }
.caixa textarea:focus { border-color: var(--ouro); }
.caixa textarea:focus-visible { outline: 3px solid var(--ouro-claro); outline-offset: 2px; }
.aviso-dados { font-size: 14px; color: var(--texto-2); }
.feedback button[type="submit"] { justify-self: start; }
.feedback-estado:empty { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.feedback-estado { font-weight: 700; color: var(--ouro); }
.feedback-mudar { justify-self: start; }
.feedback.compacto { gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #2B2A6B; }
.feedback.compacto legend { margin-bottom: 6px; font-size: 15px; }
.feedback.compacto .escolha { padding: 6px 14px; font-size: 15px; }

/* Galeria aberta */
dialog.galeria-aberta { margin: auto; padding: 0; border: 0; background: transparent; color: var(--azulejo); max-width: min(1200px, 94vw); max-height: 94vh; max-height: 94dvh; }
dialog.galeria-aberta[open] { animation: abrir-galeria .2s ease-out; }
@keyframes abrir-galeria { from { opacity: 0; transform: scale(.96); } }
dialog.galeria-aberta::backdrop { background: rgba(8, 7, 26, .92); }
/* A imagem segue a largura do diálogo e a altura que os controlos deixam livre (uma linha de 44 px, mais o espaço e a moldura):
   cabe tudo ao alto e deitado, até a 320 px. O padding de 9 px deixa a moldura da imagem dentro do diálogo. */
dialog.galeria-aberta figure { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 9px; }
dialog.galeria-aberta img { display: block; max-width: 100%; max-height: calc(94vh - 84px); max-height: calc(94dvh - 84px); margin: 0 auto; box-shadow: 0 0 0 6px var(--azulejo), 0 0 0 9px var(--cobalto-escuro); }
dialog.galeria-aberta .controlos { display: flex; flex-wrap: nowrap; justify-content: center; align-items: center; gap: 10px; }
dialog.galeria-aberta .controlos .btn { min-width: 44px; padding: 0 12px; font-size: 28px; line-height: 1; }
dialog.galeria-aberta .contador { min-width: 0; white-space: nowrap; text-align: center; color: var(--texto-2); }

/* Texto corrido (privacidade) */
.texto-corrido { max-width: 70ch; display: grid; gap: 18px; padding-bottom: 96px; }
.texto-corrido h1 { font-size: clamp(56px, 7vw, 96px); margin-bottom: 10px; }
.texto-corrido h2 { font-size: 40px; margin-top: 20px; }
.texto-corrido ul { padding-left: 1.2em; }
.texto-corrido ul a { display: inline-flex; align-items: center; min-height: 44px; }

/* Erro 404 */
.erro { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 48px 0 96px; }
.erro-blocos { display: grid; gap: 40px; justify-items: center; }
.azulejo-partido { position: relative; width: 160px; height: 160px; }
.azulejo-partido::before, .azulejo-partido::after { content: ""; position: absolute; inset: 0; background: var(--tile-claro) center / 100% 100%; }
.azulejo-partido::before { clip-path: polygon(0 0, 55% 0, 42% 38%, 58% 61%, 40% 100%, 0 100%); transform: translateX(-10px) rotate(-7deg); }
.azulejo-partido::after { clip-path: polygon(55% 0, 100% 0, 100% 100%, 40% 100%, 58% 61%, 42% 38%); transform: translate(12px, 8px) rotate(6deg); }
.erro h1 { font-size: clamp(52px, 7vw, 92px); }
.erro p { margin-top: 10px; color: var(--texto-2); }
.erro .btn { margin-top: 18px; }

/* Página de jogar */
/* 100dvh: no telemóvel, 100vh contava com as barras do browser escondidas e o fundo do jogo ficava tapado. */
body.sem-moldura { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
.barra-jogo { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 16px; min-height: 52px; background: var(--noite); border-bottom: 1px solid #2B2A6B; }
.barra-jogo .marca span { font-size: 26px; }
.barra-jogo .marca img { width: 36px; height: 36px; }
#sair-jogo { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-weight: 700; color: var(--ouro); text-decoration: none; }
.sem-moldura main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
iframe.jogo { flex: 1; width: 100%; border: 0; background: #000; }

/* Telemóvel */
@media (max-width: 900px) {
  .wrap { padding: 0 16px; }
  .cabecalho nav { display: none; }
  .marca span { font-size: 28px; }
  .heroi { min-height: auto; padding: 8px 0 64px; }
  .heroi-grid, .jogo-topo-grid, .sobre-grid, .jogo-corpo { grid-template-columns: 1fr; gap: 32px; }
  .medalhao { order: -1; }
  .medalhao img { width: min(300px, 76vw); }
  .campo { inset: 0; }
  .heroi h1 { font-size: clamp(52px, 15vw, 80px); }
  .heroi-texto > p { font-size: 19px; }
  .seccao { padding: 40px 0 64px; }
  .seccao h2 { font-size: 60px; }
  .paineis { grid-template-columns: 1fr; gap: 48px; }
  .info h3 { font-size: 40px; }
  .obra span { font-size: 30px; right: 10px; bottom: 8px; }
  .jogo-corpo h2 { font-size: 42px; }
  .contacto-caixa { padding: 26px 20px; }
  .rodape-links { margin-left: 0; }
  .galeria { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .galeria.retratos { grid-template-columns: repeat(3, 1fr); }
  .citacao { font-size: 24px; }
}

/* Abaixo de 700 px a tabela da tecnologia passa a cartões: cada célula mostra o nome da coluna. */
@media (max-width: 700px) {
  .tecnologia thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tecnologia, .tecnologia tbody, .tecnologia tr, .tecnologia td { display: block; }
  .tecnologia tr { margin-bottom: 12px; padding: 4px 0; background: var(--noite-2); box-shadow: inset 0 0 0 1px #2B2A6B; }
  .tecnologia td { border: 0; padding: 6px 14px; }
  .tecnologia td::before { content: attr(data-coluna); display: block; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--texto-2); }
}

/* Levantar ao passar o rato: só com rato (num ecrã tátil o :hover fica preso depois de um toque) e sem «reduzir movimento». */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn.ouro:hover { transform: translateY(-1px); }
  .painel:hover .moldura { transform: translateY(-4px); }
  .galeria a:hover { transform: translateY(-3px); }
  .painel:hover .moldura::after, .moldura:hover::after { opacity: 1; }
}

/* Temas de alto contraste do Windows: as cores do site dão lugar às do sistema, por isso a escolha e as estrelas
   marcadas usam a cor de destaque do sistema. */
@media (forced-colors: active) {
  .escolha:has(input:checked) { forced-color-adjust: none; background: Highlight; color: HighlightText; border-color: Highlight; }
  .estrela { forced-color-adjust: none; color: Canvas; -webkit-text-stroke-color: CanvasText; }
  .estrela:has(input:checked), .estrela:has(~ .estrela input:checked) { color: Highlight; -webkit-text-stroke-color: Highlight; }
  /* Com forced-color-adjust: none o contorno do foco ficava dourado, quase invisível nos temas claros. */
  .escolha:has(input:focus-visible), .estrela:has(input:focus-visible) { outline-color: CanvasText; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .campo i { opacity: 1; transform: none; }
  .medalhao { opacity: 1; }
}
