/* Astraforge Idle — Site V3
   Camada editorial independente do CSS das notas históricas.
   Componentes: header, hero, cards, filtros, download e navegação responsiva.
*/
:root { --site-gold:#ecc58c; --site-stroke:rgba(222,181,121,.23); --site-surface:#101e2e; }
html { scroll-padding-top:105px; }
body { text-rendering:optimizeLegibility; }
.site-header { background:rgba(8,15,26,.95); border-bottom:1px solid var(--site-stroke); }
.header-inner { min-height:76px; }
.nav-links { gap:clamp(.6rem,1.3vw,1.3rem); }
.nav-links a { font-size:.82rem; }
.nav-links .nav-download { background:linear-gradient(110deg,#eac38a,#f5dfb4); color:#122034; border:0; padding:.68rem 1.1rem; border-radius:8px; font-weight:800; white-space:nowrap; }
.nav-links .nav-download:hover { color:#122034; background:#ffebcb; }
.home-hero { background:radial-gradient(ellipse 46% 70% at 85% 40%,rgba(62,106,135,.2),transparent 80%),linear-gradient(115deg,#080f1a,#102236 58%,#08111e); }
.home-hero:before { background-image:linear-gradient(90deg,rgba(7,15,26,.96),rgba(7,15,26,.1)),url('../screenshots/world4.webp'); opacity:.12; background-position:center; background-size:cover; }
.hero-inner { padding-block:clamp(2.6rem,4.4vw,4.5rem); gap:clamp(2rem,5vw,5rem); }
.hero-copy { max-width:610px; }
.hero-copy h1 { font-size:clamp(3.5rem,5.9vw,5.8rem); margin-bottom:1.1rem; }
.hero-copy .lede { font-family:Georgia,serif; font-size:clamp(1.28rem,2vw,1.66rem); color:#fff1dd; max-width:600px; }
.hero-copy .actions { margin:1.65rem 0 1rem; }
.hero-facts { display:flex; flex-wrap:wrap; gap:.6rem; margin:1.55rem 0 .2rem; }
.hero-facts span { display:inline-flex; align-items:center; gap:.4rem; padding:.48rem .74rem; border:1px solid var(--site-stroke); background:#14283a88; border-radius:8px; font-size:.8rem; color:#c4d0de; }
.hero-facts strong { color:#f7dcae; font-size:1.04rem; }
.hero-frame { position:relative; width:min(100%,350px); padding:.4rem; background:linear-gradient(150deg,#27354b,#0e1726); border:1px solid #c6a473; border-radius:18px; box-shadow:0 26px 75px #0009; }
.hero-frame .phone-shot { padding:0; background:none; border:0; width:100%; border-radius:12px; box-shadow:none; max-height:625px; object-fit:contain; }
.frame-label { position:absolute; bottom:1rem; left:1rem; font-size:.68rem; font-weight:750; letter-spacing:.05em; color:#f7e8ce; background:#071422e8; border:1px solid #e9ca8c77; padding:.4rem .55rem; border-radius:5px; }
.hero-art figcaption { margin-top:.85rem; font-size:.76rem; }
.hero-links-wrap { padding-block:1.4rem; }
.experience-rail { grid-template-columns:repeat(4,minmax(0,1fr)); border-radius:12px; }
.experience-rail a { padding:1.15rem 1.35rem; min-height:122px; }
.experience-rail strong { font-size:clamp(1rem,1.35vw,1.26rem); }
.experience-rail .rail-detail { font-size:.73rem; }
.experience-rail .rail-arrow { right:.9rem; top:.85rem; }
#download { padding:3.6rem 0; border:1px solid #b18b5340; }
.download-inner { gap:clamp(2rem,5vw,4.5rem); }
/* Destaque editorial da atualização, independente da consulta dinâmica do APK. */
.release-notes-feature {
  margin:1.45rem 0 1.65rem;
  padding:1.3rem 1.45rem;
  border:1px solid #d9ad6d8c;
  border-left:4px solid #eac38a;
  border-radius:12px;
  background:linear-gradient(122deg,#20364b,#102338 78%);
  box-shadow:0 14px 32px #0003;
}
.release-notes-feature .release-notes-feature-label {
  color:#f4c98a; font-size:.7rem; font-weight:800;
  letter-spacing:.13em; line-height:1.55; margin:0 0 .65rem;
}
.release-notes-feature-label span { margin-right:.25rem; }
.release-notes-feature h3 {
  color:#faf0dc; font:600 clamp(1.2rem,1.8vw,1.55rem)/1.28 Georgia,serif;
  margin:0 0 .55rem; letter-spacing:-.01em;
}
.release-notes-feature p:not(.release-notes-feature-label) {
  color:#cbd9e8; font-size:.91rem; line-height:1.65; margin:0 0 .8rem;
}
.release-notes-feature a {
  display:inline-flex; align-items:center; gap:.5rem;
  padding:.35rem 0; color:#f5d499; font-weight:800;
  font-size:.9rem; text-decoration:underline; text-underline-offset:4px;
  transition:color .18s;
}
.release-notes-feature a:hover { color:#fff4dc; }
@media (max-width:510px) {
  .release-notes-feature { padding:1.05rem 1.1rem; margin:1.2rem 0 1.4rem; }
  .release-notes-feature h3 { font-size:1.3rem; }
}

.download h2 { font-size:clamp(2rem,3.4vw,3.1rem); }
.download-state { border-radius:15px; box-shadow:0 24px 60px #0006; }
.download-state .release-number { font-size:clamp(2rem,3vw,2.7rem); margin-bottom:.2rem; }
.download-state [data-release-name] { margin-bottom:.25rem; }
.release-meta { color:#bcd0e3; font-size:.78rem; margin-bottom:.9rem; }
.release-links { gap:.7rem; }
.release-links .button { flex:1 1 180px; text-align:center; min-width:0; }
.section-heading { max-width:750px; }
.section-heading h2 { text-wrap:balance; }
.world-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; }
.world-card { border-radius:13px; }
.world-card>img { height:280px; object-position:center 40%; }
.world-caption { display:flex; flex-direction:column; min-height:245px; }
.world-caption h3 { min-height:0; font-size:clamp(1.3rem,1.65vw,1.65rem); }
.world-caption p { flex:1; }
.world-caption .range { width:max-content; border-radius:5px; }
.world-card:nth-child(5) .world-caption { border-top:2px solid #aa6ab0; }
.chapter-world5 .chapter-art:after { content:'MUNDO V'; }
.chapter-world5 .chapter-art img { object-position:center 30%; }
.chapter-stat { flex-wrap:wrap; }
.chapter-stat strong { font-size:clamp(1.55rem,2.2vw,2rem); }
.character { align-content:start; }
.character img { image-rendering:pixelated; }
.character[hidden], .gallery a[hidden], .update-card[hidden] { display:none!important; }
.filter-toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.9rem; margin:0 0 1.4rem; }
.filter-bar { display:none; flex-wrap:wrap; gap:.5rem; }
.js .filter-bar { display:flex; }
.filter-bar button { cursor:pointer; padding:.55rem .92rem; border-radius:999px; font-weight:650; font-size:.8rem; line-height:1.2; color:#c7d4e3; border:1px solid rgba(208,180,140,.28); background:#142437; transition:background .16s,border-color .16s; }
.filter-bar button:hover { border-color:#f0d29e; color:#fff; }
.filter-bar button[aria-pressed="true"] { background:#eac38a; border-color:#eac38a; color:#192437; }
.filter-result { font-size:.76rem; color:#aebed0; margin:0; }
.lightbox-controls { display:flex; flex-wrap:wrap; justify-content:center; gap:.8rem; margin-top:1.1rem; }
.lightbox-controls[hidden] { display:none; }
.lightbox-controls button { min-height:44px; padding:.55rem 1rem; border-radius:8px; border:1px solid #b98e56; background:#1a2b3f; color:#ffe4b3; cursor:pointer; }
.lightbox-controls button:hover { background:#31445c; }
.gallery { gap:1rem; }
.gallery a { border-radius:12px; }
.gallery img { aspect-ratio:3/4; }
.update-search-bar { display:none; align-items:center; gap:.6rem; margin:1.5rem 0 1.1rem; }
.js .update-search-bar { display:flex; }
.update-search-bar label { font-weight:650; color:#dfc799; }
.update-search-bar input { width:min(100%,440px); background:#102135; color:#f6f0e8; border:1px solid #967953; padding:.8rem 1rem; border-radius:9px; font:inherit; }
.update-search-bar input::placeholder { color:#a8b9cd; }
.update-search-bar input:focus-visible { outline:3px solid #6dc9ef; outline-offset:3px; }
.update-list .update-card:first-child { border:1px solid #e4be82aa; }
.update-card h2 a { text-decoration:none; }
.site-footer { padding:2rem 0; }
a,button { touch-action:manipulation; }
@media(max-width:1120px) {
  .nav-links { gap:.55rem; }
  .nav-links a { font-size:.75rem; }
  .experience-rail a { padding:1.05rem .95rem; }
  .experience-rail strong { font-size:1.08rem; }
  .world-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .world-card>img { height:330px; }
}
@media(max-width:760px) {
  .header-inner { min-height:70px; }
  .js .nav-links { background:rgba(9,18,31,.98); border-radius:0 0 12px 12px; padding:.65rem 0 1rem; }
  .js .nav-links a { font-size:.95rem; padding:.72rem 1rem; }
  .js .nav-links .nav-download { margin-top:.4rem; }
  .hero-inner { padding-block:2.8rem 2.3rem; }
  .hero-copy h1 { font-size:clamp(3.3rem,10.8vw,5rem); }
  .hero-copy .lede { font-size:1.3rem; }
  .hero-frame { width:min(100%,320px); }
  .experience-rail { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .experience-rail a { min-height:110px; }
  .experience-rail a:nth-child(3) { border-left:0; border-top:1px solid var(--site-stroke); }
  .experience-rail a:nth-child(4) { border-top:1px solid var(--site-stroke); }
  #download { padding:2.9rem 0; }
  .world-card>img { height:280px; }
  .world-caption { min-height:0; }
  .filter-result { width:100%; }
  .chapter-stat { gap:1rem; }
}
@media(max-width:510px) {
  .experience-rail { grid-template-columns:1fr; }
  .experience-rail a { min-height:94px; }
  .experience-rail a + a { border-left:0; border-top:1px solid var(--site-stroke); }
  .world-grid { grid-template-columns:1fr; }
  .world-card>img { height:340px; }
  .hero-facts { gap:.4rem; }
  .hero-facts span { font-size:.72rem; padding:.35rem .5rem; }
  .filter-toolbar { gap:.6rem; }
  .filter-bar button { padding:.54rem .74rem; }
  .update-search-bar { align-items:stretch; flex-direction:column; }
  .update-search-bar input { width:100%; }
}
@media(prefers-reduced-motion:reduce) { :root { scroll-behavior:auto; } }

/* Auditoria responsiva 2026-10-17: faixas intermediárias e legibilidade */
@media (max-width: 920px) {
  .site-header .header-inner { flex-wrap:wrap; gap:.5rem; padding-block:.65rem; }
  .js .site-header .menu-toggle { display:block; margin-left:auto; min-height:44px; font-weight:750; }
  .js .site-header .nav-links {
    display:none; width:100%; flex-direction:column; align-items:stretch; gap:.25rem;
    border-top:1px solid var(--site-stroke); padding:.65rem 0 .35rem;
  }
  .js .site-header .nav-links.open { display:flex; }
  .site-header .nav-links a { display:block; font-size:.95rem; padding:.75rem 1rem; border-radius:7px; }
  .site-header .nav-links a:not(.nav-download):after { display:none; }
  .site-header .nav-links .nav-download { text-align:center; margin:.4rem 0 0; }
  .hero-inner { grid-template-columns:minmax(0,1fr); gap:1.5rem; padding-block:3.1rem; }
  .hero-copy { max-width:680px; }
  .hero-art { justify-self:center; margin:1rem 0 0; }
  .experience-rail { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .experience-rail a:nth-child(3) { border-left:0; border-top:1px solid var(--site-stroke); }
  .experience-rail a:nth-child(4) { border-top:1px solid var(--site-stroke); }
  .download-inner { grid-template-columns:minmax(0,1fr); }
  .download-state { width:100%; }
  .chapter { grid-template-columns:minmax(0,1fr); gap:2rem; }
  .chapter-art { max-width:680px; margin-inline:auto; order:2; }
  .chapter-art img { height:410px; }
  .system-row { grid-template-columns:minmax(0,1fr); gap:1.7rem; }
  .system-row:nth-child(odd) .system-image { order:0; }
  .system-image img { max-height:410px; }
  .grid.three { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:760px) {
  .grid.three { grid-template-columns:minmax(0,1fr); }
  .experience-rail a { min-height:100px; }
}
@media (max-width:510px) {
  .experience-rail { grid-template-columns:minmax(0,1fr); }
  .experience-rail a + a { border-left:0; border-top:1px solid var(--site-stroke); }
  .site-header .brand { min-width:0; }
  .hero-facts { gap:.5rem; }
  .hero-copy .actions { gap:.75rem; }
  .hero-copy .actions a { width:100%; }
  .chapter-art img { height:350px; }
}
.install-help { margin-top:.9rem; }
.install-help summary { cursor:pointer; color:#e9c58d; font-weight:700; }
.install-help p { font-size:.88rem; margin:.65rem 0 0; }
@media (hover:none) { .world-card:hover>img, .gallery a:hover { transform:none; } }

/* Elementos interativos com área confortável de toque */
.filter-bar button { min-height:44px; }
.lightbox > button { min-height:44px; min-width:44px; }
.download details summary { padding-block:.45rem; }
.character summary { padding-block:.45rem; min-height:42px; }
[data-release-status] { overflow-wrap:anywhere; }
@media (max-width:510px) {
  .release-links .button { flex-basis:100%; }
  .site-header .nav-links { max-height:calc(100svh - 76px); overflow-y:auto; }
}

/* GA4: transparente, opcional e responsivo. O banner só aparece com ID válido. */
.analytics-consent {
  position:fixed; z-index:9998; left:clamp(.6rem,2vw,1.5rem);
  right:clamp(.6rem,2vw,1.5rem); bottom:clamp(.6rem,2vw,1.5rem);
  display:flex; align-items:center; justify-content:space-between; gap:1.5rem;
  max-width:1040px; margin-inline:auto; padding:1.1rem 1.35rem;
  background:#0c1c2df7; border:1px solid #d5ae73; color:#f7f1e7;
  border-radius:13px; box-shadow:0 15px 60px #000b;
}
.analytics-consent strong { display:block; color:#f4d39a; font-size:1rem; }
.analytics-consent p { margin:.3rem 0 .35rem; font-size:.88rem; line-height:1.55; color:#d3dde7; }
.analytics-consent a { color:#e9d09f; text-decoration:underline; font-size:.84rem; }
.analytics-consent-actions { display:flex; flex-wrap:wrap; gap:.6rem; flex-shrink:0; }
.analytics-consent-actions button { cursor:pointer; min-height:44px; padding:.7rem 1rem; border-radius:7px; font-weight:700; font-size:.82rem; line-height:1.2; font-family:inherit; border:1px solid #e5c184; background:transparent; color:#f3deb9; }
.analytics-consent-actions [data-analytics-accept] { background:#eac38a; color:#152235; }
.analytics-consent-actions button:hover { filter:brightness(1.12); }
.analytics-consent-actions button:focus-visible { outline:3px solid #6dd2f6; outline-offset:3px; }
.release-highlight { display:flex; justify-content:space-between; align-items:center; gap:1.3rem; padding:1.1rem 1.4rem; margin:0 0 1.4rem; border:1px solid #d8af7766; border-radius:12px; background:linear-gradient(110deg,#192d42,#0e1c2d); }
.release-highlight[hidden] { display:none!important; }
.release-highlight strong { display:block; color:#f4e1c5; font-size:1.1rem; }
.release-highlight .eyebrow { font-size:.7rem; }
.release-highlight p { color:#b8cbdb; margin:.25rem 0 0; font-size:.85rem; }
.release-highlight a { flex-shrink:0; color:#f5d39c; text-decoration:underline; }
.release-highlight a[hidden] { display:none!important; }
.privacy-content { max-width:840px; min-height:60vh; }
.privacy-content h1 { font-size:clamp(2rem,4.5vw,3.5rem); }
.privacy-content h2 { margin-top:2rem; font-size:1.35rem; }
.privacy-content p { max-width:72ch; line-height:1.75; }
.privacy-content a { color:#e5c48f; }
@media (max-width:760px) {
  .analytics-consent,.release-highlight { flex-direction:column; align-items:stretch; }
  .analytics-consent-actions button { flex:1 1 145px; }
  .release-highlight a { align-self:flex-start; }
}

/* PT-BR / EN switcher. Keep the existing navigation behavior on mobile. */
.language-picker{display:flex;align-items:center;gap:3px;flex:0 0 auto;margin-left:.2rem;padding:4px;border:1px solid rgba(236,197,140,.3);border-radius:10px;background:rgba(8,18,31,.88)}
.language-picker button{display:inline-flex;gap:.35rem;align-items:center;justify-content:center;min-height:36px;padding:.35rem .55rem;color:#c4cddd;background:transparent;border:1px solid transparent;border-radius:7px;font-size:.78rem;font-weight:800;letter-spacing:.03em;cursor:pointer;transition:background .16s,color .16s}
.language-picker button:hover{background:#25374a;color:#fff}
.language-picker button.active,.language-picker button[aria-pressed="true"]{background:linear-gradient(110deg,#eac38a,#f5dfb4);color:#152131;border-color:rgba(255,230,190,.5)}
.language-picker button:focus-visible{outline:2px solid #6dc9ef;outline-offset:2px}
@media(max-width:1120px){
  .site-header .header-inner{flex-wrap:wrap;gap:.5rem;padding-block:.65rem}
  .site-header .brand{order:1}
  .site-header .language-picker{order:2;margin-left:auto}
  .js .site-header .menu-toggle{display:block;order:3;margin-left:0;min-height:42px}
  .js .site-header .nav-links{display:none;order:4;width:100%;flex-direction:column;align-items:stretch;gap:.25rem;border-top:1px solid var(--site-stroke);padding:.65rem 0 .4rem}
  .js .site-header .nav-links.open{display:flex}
  .site-header .nav-links a{display:block;font-size:.95rem;padding:.75rem 1rem;border-radius:7px}
  .site-header .nav-links .nav-download{display:block;text-align:center}
}
@media(max-width:430px){
  .site-header .brand{gap:.45rem;font-size:1rem}
  .site-header .brand img{width:38px;height:38px}
  .language-picker{padding:3px}
  .language-picker button{min-height:34px;padding:.3rem .4rem}
  .language-picker button span{display:none}
  .js .site-header .menu-toggle{padding:.42rem .57rem;font-size:.82rem}
}

/* Static locale selector remains visible while JS loads. */
.site-header .language-picker{display:inline-flex;visibility:visible;opacity:1;position:relative;z-index:2;white-space:nowrap;align-self:center}
.site-header .nav-links{margin-left:auto}
@media(min-width:1121px){.site-header .header-inner{gap:clamp(.5rem,1.1vw,1rem)}.site-header .nav-links{gap:clamp(.45rem,.8vw,1rem)}.site-header .language-picker{margin-left:.1rem}}
@media(max-width:1120px){.site-header .nav-links{margin-left:0}.site-header .language-picker{order:2;margin-left:auto}.site-header .menu-toggle{order:3}.site-header .nav-links{order:4}}
@media(max-width:430px){.site-header .language-picker button{font-size:20px;min-width:38px}.site-header .language-picker{margin-left:auto}}
