:root {
  --ink: #1b1915;
  --card: rgba(255, 253, 249, 0.74);
  --card-border: rgba(255, 255, 255, 0.55);
  --card-ink: #1b1915;
  --accent: #c4692b;
  --text-on-sky: #1b1915;
  --radius: 20px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 18px 40px -12px rgba(20, 25, 35, 0.35);
  --ease: cubic-bezier(.2, .8, .2, 1);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; color: var(--text-on-sky); transition: color .8s; background: #2b3440; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- THEMES ---------- */
body[data-theme="sol"]        { --sky-a: #2b7fd6; --sky-b: #8cc4ef; --sky-c: #f6e3bf; --accent: #d97a22; }
body[data-theme="nublado"]    { --sky-a: #7f95a8; --sky-b: #b8c6d1; --sky-c: #dde3e7; --accent: #557189; }
body[data-theme="chuva"]      { --sky-a: #46525f; --sky-b: #6f7d8a; --sky-c: #949ea8; --accent: #2f6fae; }
body[data-theme="tempestade"] { --sky-a: #161c24; --sky-b: #333e4b; --sky-c: #56606b; --accent: #9fb4ff; }
body[data-theme="neve"]       { --sky-a: #a9bccc; --sky-b: #dbe5ee; --sky-c: #f4f7fa; --accent: #3f7fbf; }
body[data-theme="nevoeiro"]   { --sky-a: #c4cacf; --sky-b: #c9ced3; --sky-c: #d3d7db; --accent: #66727d; }
body[data-theme="noite"]      { --sky-a: #040817; --sky-b: #121c3a; --sky-c: #26304d; --accent: #a9bbff; }
body[data-theme="tornado"]    { --sky-a: #262c20; --sky-b: #444c38; --sky-c: #6f7559; --accent: #d8c27a; }
body[data-theme="terremoto"]  { --sky-a: #c9783a; --sky-b: #e2a868; --sky-c: #f1d3a5; --accent: #a8401c; }

.sky {
  position: fixed; inset: 0; z-index: -2;
  background: linear-gradient(180deg, var(--sky-a, #7f95a8) 0%, var(--sky-b, #b8c6d1) 55%, var(--sky-c, #dde3e7) 100%);
  transition: background 1.2s ease;
}
body[data-theme="noite"], body[data-theme="tempestade"], body[data-theme="tornado"] {
  --text-on-sky: #eef2f8;
  --card: rgba(18, 24, 38, 0.66); --card-border: rgba(255, 255, 255, 0.1); --card-ink: #eef2f8;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 18px 40px -12px rgba(0, 0, 0, 0.6);
}

.grain {
  position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.flash { position: fixed; inset: 0; z-index: 50; pointer-events: none; background: #eef3ff; opacity: 0; }
.flash.on { animation: flash .5s ease-out; }
@keyframes flash { 0% { opacity: .65; } 20% { opacity: .08; } 35% { opacity: .45; } 100% { opacity: 0; } }

/* ---------- LOADER ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 40%, #3a4553, #1c222b); color: #e8ecf1;
  transition: opacity .8s var(--ease), visibility .8s;
}
.loader p { margin: 26px 0 0; font-size: .85rem; letter-spacing: .1em; opacity: .7; }
.ld-swing { display: flex; flex-direction: column; align-items: center; transform-origin: top center; animation: ldswing 1.6s ease-in-out infinite; }
.ld-rope { width: 2px; height: 70px; background: #b8925a; }
.ld-rock {
  width: 64px; height: 48px; margin-top: -4px; border-radius: 48% 52% 44% 56% / 55% 50% 50% 45%;
  background: radial-gradient(circle at 35% 30%, #9a958d, #3f3b36 70%);
  box-shadow: 0 10px 25px rgba(0, 0, 0, .4);
}
@keyframes ldswing { 0%, 100% { transform: rotate(14deg); } 50% { transform: rotate(-14deg); } }
body.ready .loader { opacity: 0; visibility: hidden; }

/* ---------- TOPBAR ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 16px clamp(16px, 4vw, 40px);
  transition: background .4s, padding .4s, box-shadow .4s, color .4s;
}
.topbar.scrolled {
  padding-top: 10px; padding-bottom: 10px;
  background: color-mix(in srgb, var(--sky-a, #555) 72%, transparent);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .12);
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: "Bree Serif", serif; font-size: 1.35rem; text-decoration: none; letter-spacing: -.01em; }
.brand-rock { width: 22px; height: 17px; border-radius: 48% 52% 44% 56% / 55% 50% 50% 45%; background: radial-gradient(circle at 35% 30%, #a39e95, #46423c); position: relative; margin-top: 9px; box-shadow: 0 2px 4px rgba(0, 0, 0, .3); }
.brand-rock::before { content: ""; position: absolute; left: 50%; top: -11px; width: 2px; height: 12px; background: #b8925a; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 600; font-size: .9rem; padding: 7px 12px; border-radius: 999px; opacity: .85; transition: background .2s, opacity .2s; }
.nav a:hover { opacity: 1; background: rgba(255, 255, 255, .2); }
.loc-btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--card-border); background: var(--card); color: var(--card-ink);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: 999px; padding: 8px 14px 8px 11px; font-weight: 600; font-size: .88rem;
  max-width: 260px; white-space: nowrap; box-shadow: var(--shadow);
}
.loc-btn svg { width: 16px; height: 16px; flex: none; color: var(--accent); }
.loc-btn span { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 860px) { .nav { display: none; } .loc-btn { margin-left: auto; } }

/* ---------- HERO ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 640px; overflow: hidden; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 80% 75% at 50% 45%, transparent 55%, rgba(10, 14, 22, .32) 100%); }

.card {
  background: var(--card); color: var(--card-ink);
  border: 1px solid var(--card-border); border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  transition: background .8s, color .8s, border-color .8s;
}

.verdict { position: absolute; top: 92px; left: clamp(16px, 4vw, 40px); padding: 20px 22px 18px; width: min(340px, calc(100% - 32px)); z-index: 5; animation: rise .9s var(--ease) both .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.verdict-place { font-size: .82rem; font-weight: 600; opacity: .7; }
.verdict-row { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.verdict-icon {
  flex: none; width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent);
  transition: background .8s, color .8s;
}
.verdict-icon svg { width: 34px; height: 34px; }
.verdict-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; opacity: .6; }
.verdict-main { font-family: "Bree Serif", serif; font-size: clamp(1.9rem, 4.4vw, 2.5rem); line-height: 1.02; letter-spacing: -.01em; }
.verdict-sign { font-size: .92rem; opacity: .82; margin-top: 10px; }
.verdict-temp { font-size: 3.1rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; margin-top: 14px; }
.verdict-temp:empty { display: none; }
.verdict-temp small { font-size: .85rem; font-weight: 600; letter-spacing: 0; opacity: .6; margin-left: 8px; }
.verdict-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; font-size: .78rem; font-weight: 600; }
.verdict-meta:empty { display: none; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 999px; background: rgba(127, 127, 127, .14); white-space: nowrap; }
.pill svg { width: 14px; height: 14px; opacity: .75; }
.pill.sim-note, .pill.extra { white-space: normal; background: color-mix(in srgb, var(--accent) 18%, transparent); }

.bubble {
  position: absolute; z-index: 6; pointer-events: none;
  max-width: 240px; padding: 10px 14px; border-radius: 14px;
  background: #fff; color: #1b1915; font-size: .9rem; font-weight: 600;
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .35); opacity: 0; transform: translate(-50%, -100%) scale(.9);
  transition: opacity .25s, transform .3s var(--ease);
}
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -7px; margin-left: -7px; border: 7px solid transparent; border-bottom: 0; border-top-color: #fff; }
.bubble.show { opacity: 1; transform: translate(-50%, -100%) scale(1); }

.hero-hint { position: absolute; right: clamp(16px, 4vw, 40px); top: 96px; z-index: 5; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; font-size: .82rem; font-weight: 500; animation: rise .9s var(--ease) both .5s; }
.hint-text { opacity: .75; }
.poke {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--card-border); background: var(--card); color: var(--card-ink);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: 999px; padding: 8px 14px 8px 11px; font-weight: 600; font-size: .85rem; box-shadow: var(--shadow);
  transition: transform .2s var(--ease);
}
.poke svg { width: 17px; height: 17px; color: var(--accent); }
.poke:hover { transform: translateY(-2px); }
.poke:active { transform: scale(.96); }
@media (max-width: 860px) { .hero-hint { top: auto; bottom: 150px; right: 16px; } .hint-text { display: none; } }

.simulate { position: absolute; left: 0; right: 0; bottom: 46px; z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0 16px; animation: rise .9s var(--ease) both .7s; }
.sim-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .16em; font-weight: 700; opacity: .75; }
.chips {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; max-width: 1000px; padding: 5px;
  border-radius: 22px; background: var(--card); border: 1px solid var(--card-border); box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; color: var(--card-ink);
  border-radius: 999px; padding: 8px 12px; font-size: .83rem; font-weight: 600;
  transition: background .2s, color .2s, transform .2s var(--ease);
}
.chip svg { width: 17px; height: 17px; opacity: .8; }
.chip:hover { background: rgba(127, 127, 127, .15); }
.chip:active { transform: scale(.95); }
.chip.active { background: var(--card-ink); color: #fff; }
body[data-theme="noite"] .chip.active, body[data-theme="tempestade"] .chip.active, body[data-theme="tornado"] .chip.active { color: #111; }
.chip.active svg { opacity: 1; }
@media (max-width: 640px) { .chip span { display: none; } .chip { padding: 9px; } .chip[data-sim="real"] span { display: inline; } }

.scroll-cue { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); z-index: 5; width: 30px; height: 30px; opacity: .55; animation: bob 2s infinite; }
@keyframes bob { 50% { transform: translate(-50%, 5px); } }

/* ---------- LOCATION PANEL ---------- */
.loc-panel { position: absolute; z-index: 10; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100% - 32px)); padding: 30px 28px 24px; text-align: center; animation: pop .5s var(--ease) both; --card: rgba(255, 253, 249, .92); --card-ink: #1b1915; }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -46%) scale(.97); } }
.loc-illu { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 18px; background: color-mix(in srgb, var(--accent) 18%, transparent); display: grid; place-items: center; }
.loc-illu span { width: 24px; height: 24px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--accent); position: relative; }
.loc-illu span::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #fff; }
.loc-panel h2 { font-family: "Bree Serif", serif; margin: 0 0 8px; font-size: 1.6rem; }
.loc-panel p { margin: 0 0 20px; opacity: .75; line-height: 1.5; font-size: .95rem; }
.btn-primary { width: 100%; border: 0; border-radius: 14px; padding: 14px 16px; background: var(--accent); color: #fff; font-weight: 700; font-size: 1rem; box-shadow: 0 10px 24px -10px var(--accent); transition: transform .2s var(--ease), filter .2s; }
.btn-primary:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn-secondary { border: 0; border-radius: 12px; padding: 10px 16px; background: #1b1915; color: #fff; font-weight: 600; }
.or { display: flex; align-items: center; gap: 10px; margin: 18px 0; opacity: .5; font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .4; }
.search { display: flex; gap: 8px; }
.search input { flex: 1; min-width: 0; border: 1px solid rgba(0, 0, 0, .14); border-radius: 12px; padding: 10px 13px; font: inherit; background: #fff; color: #111; }
.results { list-style: none; margin: 10px 0 0; padding: 0; text-align: left; max-height: 210px; overflow: auto; }
.results li button { width: 100%; text-align: left; border: 0; background: transparent; color: inherit; padding: 9px 11px; border-radius: 10px; }
.results li button:hover { background: rgba(0, 0, 0, .06); }
.results small { opacity: .6; }
.loc-error { color: #b3261e; font-size: .86rem; min-height: 1em; margin: 10px 0 0 !important; }
.close { position: absolute; top: 10px; right: 12px; border: 0; background: transparent; color: inherit; font-size: 1.6rem; line-height: 1; opacity: .5; }

/* ---------- SECTIONS ---------- */
.section { position: relative; padding: 100px clamp(16px, 5vw, 60px) 40px; max-width: 1180px; margin: 0 auto; }
.eyebrow { text-align: center; text-transform: uppercase; letter-spacing: .18em; font-size: .72rem; font-weight: 700; opacity: .6; margin: 0 0 10px; }
.section-title { font-family: "Bree Serif", serif; font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin: 0 0 32px; text-align: center; letter-spacing: -.01em; }
.muted { opacity: .65; }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* wooden sign */
.sign-wrap { max-width: 880px; margin: 0 auto; perspective: 1200px; }
.sign {
  position: relative; padding: 46px clamp(18px, 5vw, 56px) 36px; border-radius: 8px; color: #fbf4e8;
  background-color: #5a3a22;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='900' height='420'><filter id='w'><feTurbulence type='fractalNoise' baseFrequency='0.0035 0.12' numOctaves='4' seed='7'/><feColorMatrix values='0 0 0 0 0.2  0 0 0 0 0.11  0 0 0 0 0.05  0 0 0 1.6 -0.45'/></filter><rect width='100%' height='100%' filter='url(%23w)'/></svg>"),
    radial-gradient(ellipse 60% 80% at 50% 40%, rgba(140, 95, 58, .7), transparent 75%),
    linear-gradient(180deg, #6b4428, #4a2e1a);
  background-size: 900px 420px, 100% 100%, 100% 100%;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .06), inset 0 0 50px rgba(0, 0, 0, .45);
  transform: rotateX(2deg);
}
.nail { position: absolute; width: 13px; height: 13px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #f0f0f0, #6a6a6a 70%); box-shadow: 0 2px 3px rgba(0, 0, 0, .6); }
.nail.tl { top: 16px; left: 16px; } .nail.tr { top: 16px; right: 16px; } .nail.bl { bottom: 16px; left: 16px; } .nail.br { bottom: 16px; right: 16px; }
.sign-title { font-family: "Bree Serif", serif; text-transform: uppercase; text-align: center; font-size: clamp(1.35rem, 4vw, 2.4rem); margin: 0 0 22px; letter-spacing: .02em; text-shadow: 0 2px 0 rgba(0, 0, 0, .45); }
.rules { list-style: none; margin: 0; padding: 0; }
.rules li {
  position: relative;
  display: grid; grid-template-columns: 1fr 12px 1fr; align-items: center; gap: 18px;
  padding: 10px 14px; border-radius: 10px; font-family: "Bree Serif", serif; font-size: clamp(1rem, 2.4vw, 1.35rem);
  transition: background .5s var(--ease), box-shadow .5s var(--ease), transform .5s var(--ease);
}
.rules li + li::before { content: ""; position: absolute; left: -56px; right: -56px; top: -1px; height: 2px; background: linear-gradient(180deg, rgba(0, 0, 0, .45), rgba(255, 220, 170, .07)); pointer-events: none; }
.rules .if { text-align: right; text-shadow: 0 2px 0 rgba(0, 0, 0, .45); }
.rules .then { display: flex; align-items: center; gap: 10px; text-shadow: 0 2px 0 rgba(0, 0, 0, .45); }
.rules .then svg { width: 22px; height: 22px; opacity: .5; flex: none; }
.rules .bar { width: 6px; height: 26px; border-radius: 3px; background: #fbf4e8; margin: 0 auto; box-shadow: 0 2px 0 rgba(0, 0, 0, .4); }
.rules li.on { background: rgba(255, 210, 120, .16); box-shadow: inset 0 0 0 1.5px rgba(255, 210, 120, .75), 0 0 30px rgba(255, 200, 100, .15); transform: scale(1.015); }
.rules li.on .then svg { opacity: 1; color: #ffd27a; }
.rules li.on .then::after { content: "agora"; font-family: "Inter", sans-serif; font-size: .6em; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #2a1a0c; background: #ffd27a; padding: 3px 8px; border-radius: 999px; text-shadow: none; }
.sign-foot { text-align: center; margin: 22px 0 0; font-size: .9rem; opacity: .7; font-style: italic; }
@media (max-width: 560px) { .rules li { grid-template-columns: 1fr 6px .9fr; gap: 10px; padding: 8px 6px; } .rules .then svg { display: none; } .rules li.on .then::after { content: "•"; padding: 0 6px; } }

/* hourly */
.hours { display: flex; gap: 12px; overflow-x: auto; padding: 8px 4px 22px; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: rgba(127, 127, 127, .5) transparent; }
.hour { flex: 0 0 124px; scroll-snap-align: start; padding: 18px 12px 16px; text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; transition: transform .3s var(--ease); }
.hour:hover { transform: translateY(-4px); }
.hour.now { box-shadow: var(--shadow), inset 0 0 0 2px color-mix(in srgb, var(--accent) 70%, transparent); }
.hour .t { font-weight: 700; font-size: .85rem; opacity: .7; }
.hour .i { width: 40px; height: 40px; color: var(--accent); }
.hour .i svg { width: 100%; height: 100%; }
.hour .v { font-family: "Bree Serif", serif; font-size: 1.02rem; line-height: 1.15; }
.hour .s { font-size: .72rem; opacity: .65; line-height: 1.3; min-height: 2.6em; }
.hour .temp { font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.stat { padding: 18px 20px; display: grid; grid-template-columns: 1fr auto; column-gap: 10px; align-items: start; }
.stat .k { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; opacity: .6; font-weight: 700; }
.stat .ico { grid-column: 2; grid-row: 1 / span 3; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.stat .ico svg { width: 20px; height: 20px; }
.stat .val { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; }
.stat .sub { font-size: .78rem; opacity: .65; margin-top: 2px; }
.updated { text-align: center; font-size: .8rem; opacity: .6; margin-top: 20px; }

/* about */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.about .card { padding: 24px; }
.about-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); margin-bottom: 14px; }
.about-ico svg { width: 24px; height: 24px; }
.about h3 { margin: 0 0 8px; font-family: "Bree Serif", serif; font-size: 1.2rem; }
.about p { margin: 0; line-height: 1.6; opacity: .85; font-size: .95rem; }

.footer { text-align: center; padding: 70px 16px 50px; font-size: .9rem; }
.footer p { margin: 4px 0; }
.footer-rock { width: 34px; height: 26px; margin: 30px auto 14px; border-radius: 48% 52% 44% 56% / 55% 50% 50% 45%; background: radial-gradient(circle at 35% 30%, #a39e95, #46423c); position: relative; }
.footer-rock::before { content: ""; position: absolute; left: 50%; top: -30px; width: 2px; height: 30px; background: #b8925a; }

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

/* ---------- SOM ---------- */
.poke.sound[aria-pressed="true"] svg { color: #2e9e5b; }

/* ---------- NEVOEIRO TENEBROSO ---------- */
body[data-theme="nevoeiro"] { --sky-a: #7d7f7e; --sky-b: #9a9b98; --sky-c: #a9a9a5; --accent: #8a2f24; }
body[data-theme="nevoeiro"] .grain { opacity: .2; animation: grainshift .18s steps(2) infinite; }
@keyframes grainshift { 0% { transform: translate(0, 0); } 50% { transform: translate(-3%, 2%); } 100% { transform: translate(2%, -3%); } }
body[data-theme="nevoeiro"] .vignette { background: radial-gradient(ellipse 70% 65% at 50% 45%, transparent 35%, rgba(12, 10, 8, .65) 100%); }
body[data-theme="nevoeiro"] .verdict-main { font-family: "Special Elite", "Courier New", monospace; letter-spacing: .02em; }
.flashlight {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; z-index: 1;
  --fx: 50%; --fy: 48%;
  background: radial-gradient(circle at var(--fx) var(--fy), rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 90px, rgba(14, 12, 10, .5) 230px, rgba(8, 7, 6, .72) 520px);
}
.radio {
  position: absolute; left: clamp(16px, 4vw, 40px); bottom: 130px; z-index: 5;
  display: none; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 12px;
  background: rgba(20, 16, 14, .72); color: #e9d9c4; font-family: "Special Elite", "Courier New", monospace; font-size: .85rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}
body[data-theme="nevoeiro"] .radio { display: inline-flex; }
.radio-bars { display: flex; align-items: flex-end; gap: 2px; height: 16px; }
.radio-bars i { width: 3px; height: 3px; background: #c9412f; border-radius: 1px; }
.radio-txt { opacity: .35; transition: opacity .1s; }
.radio.burst .radio-txt { opacity: 1; }
.radio.burst .radio-bars i { animation: bars .12s steps(3) infinite alternate; }
.radio.burst .radio-bars i:nth-child(2) { animation-delay: -.04s; }
.radio.burst .radio-bars i:nth-child(3) { animation-delay: -.08s; }
.radio.burst .radio-bars i:nth-child(4) { animation-delay: -.02s; }
.radio.burst .radio-bars i:nth-child(5) { animation-delay: -.06s; }
.radio.burst { animation: radiojit .09s steps(2) infinite; }
@keyframes bars { from { height: 3px; } to { height: 16px; } }
@keyframes radiojit { 50% { transform: translate(1px, -1px); } }
@media (max-width: 860px) { .radio { bottom: 196px; } }
body[data-theme="nevoeiro"] .topbar:not(.scrolled) { color: #ece6dc; }

/* ---------- CENÁRIOS ---------- */
.hint-btns { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.envs {
  display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--card-border); box-shadow: var(--shadow);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.envs button {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--card-ink);
  padding: 6px 11px; border-radius: 999px; font-size: .8rem; font-weight: 600; transition: background .2s, color .2s;
}
.envs button svg { width: 16px; height: 16px; }
.envs button:hover { background: rgba(127, 127, 127, .15); }
.envs button.active { background: var(--card-ink); color: #fff; }
body[data-theme="noite"] .envs button.active, body[data-theme="tempestade"] .envs button.active, body[data-theme="tornado"] .envs button.active { color: #111; }

/* placa: linhas não vazam */
.sign { overflow: hidden; }

/* ---------- MOBILE ---------- */
@media (max-width: 640px) {
  .topbar { padding: 12px 14px; }
  .brand { font-size: 1.15rem; }
  .loc-btn { max-width: 170px; padding: 7px 12px 7px 10px; font-size: .8rem; }

  .verdict {
    top: 62px; left: 12px; right: 12px; width: auto; padding: 12px 14px;
    display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px;
    grid-template-areas: "place place" "row temp" "sign sign" "meta meta";
  }
  .verdict-place { grid-area: place; font-size: .75rem; }
  .verdict-row { grid-area: row; margin-top: 6px; gap: 10px; }
  .verdict-icon { width: 42px; height: 42px; border-radius: 12px; }
  .verdict-icon svg { width: 26px; height: 26px; }
  .verdict-label { font-size: .62rem; }
  .verdict-main { font-size: 1.55rem; }
  .verdict-temp { grid-area: temp; margin: 6px 0 0; font-size: 2.3rem; }
  .verdict-temp small { display: none; }
  .verdict-sign { grid-area: sign; margin-top: 6px; font-size: .8rem; }
  .verdict-meta { grid-area: meta; flex-wrap: nowrap; overflow-x: auto; margin-top: 8px; scrollbar-width: none; }
  .verdict-meta::-webkit-scrollbar { display: none; }

  .hero-hint { top: auto; bottom: 74px; left: 12px; right: 12px; flex-direction: row; align-items: center; justify-content: space-between; }
  .hint-btns { flex-direction: row; gap: 8px; }
  .poke { width: 42px; height: 42px; padding: 0; justify-content: center; font-size: 0; }
  .poke svg { width: 20px; height: 20px; }
  .poke span { display: none; }
  .envs button { padding: 8px 10px; }
  .envs button span { display: none; }
  .envs button.active span { display: inline; }

  .simulate { bottom: 14px; padding: 0 12px; }
  .sim-label { display: none; }
  .chips { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; max-width: 100%; border-radius: 999px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .chip.active span { display: inline; }
  .scroll-cue { display: none; }
  .radio { left: 12px; bottom: auto; top: 232px; }

  .section { padding-top: 72px; }
  .sign { padding: 34px 14px 26px; transform: none; }
  .sign-title { font-size: 1.25rem; }
  .rules li { padding: 8px 6px; font-size: .95rem; }
  .rules li + li::before { left: -20px; right: -20px; }
  .rules li.on .then::after { content: "agora"; font-size: .55em; padding: 2px 6px; }
  .verdict-temp:empty + .verdict-meta { margin-top: 6px; }
}

/* ---------- HORÁRIO ---------- */
.dock { display: flex; align-items: center; gap: 6px; max-width: 100%; }
.time-toggle {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--card-border); background: var(--card); color: var(--card-ink); box-shadow: var(--shadow);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); transition: background .2s, color .2s;
}
.time-toggle svg { width: 20px; height: 20px; }
.time-toggle.active { background: var(--card-ink); color: #fff; }
body[data-theme="noite"] .time-toggle.active, body[data-theme="tempestade"] .time-toggle.active, body[data-theme="tornado"] .time-toggle.active { color: #111; }
.timebar {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px; width: min(460px, 100%);
  background: var(--card); color: var(--card-ink); border: 1px solid var(--card-border); box-shadow: var(--shadow);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.timebar[hidden] { display: none; }
.timebar svg { width: 18px; height: 18px; flex: none; opacity: .7; }
.timebar input { flex: 1; min-width: 0; accent-color: var(--accent); }
.timebar output { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 3.2em; }
.timebar button { border: 0; border-radius: 999px; padding: 5px 11px; font-size: .78rem; font-weight: 700; background: var(--accent); color: #fff; }
@media (max-width: 640px) {
  .time-toggle { width: 40px; height: 40px; }
  .dock { width: 100%; }
  .dock .chips { flex: 1; min-width: 0; }
  .hero.time-open .hero-hint { bottom: 128px; }
  .timebar { width: 100%; }
}

#scene.pixel { image-rendering: pixelated; filter: saturate(1.3) contrast(1.06); }

.poke.sensor.on { background: var(--accent); color: #fff; border-color: transparent; }
.poke.sensor.on svg { color: #fff; }
.poke[hidden] { display: none; }

/* ---------- AR ---------- */
.ar-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.poke.ar-btn.on { background: var(--accent); color: #fff; border-color: transparent; }
.poke.ar-btn.on svg { color: #fff; }
body.ar .vignette { background: radial-gradient(ellipse 85% 80% at 50% 45%, transparent 60%, rgba(0, 0, 0, .25) 100%); }
body.ar .flashlight { display: none; }
body.ar { --card: rgba(18, 24, 38, .62); --card-ink: #eef2f8; --card-border: rgba(255, 255, 255, .14); --text-on-sky: #fff; }
body.ar .chip.active, body.ar .envs button.active, body.ar .time-toggle.active { color: #111; }
@media (max-width: 640px) {
  .hint-btns { gap: 6px; }
  .poke { width: 38px; height: 38px; }
  .poke svg { width: 18px; height: 18px; }
  .envs button { padding: 7px 8px; }
  .envs button.active span { display: none; }
}

/* ---------- ajuda de permissões ---------- */
.perm-panel { text-align: left; z-index: 12; }
.perm-panel h2 { text-align: center; }
.perm-panel ol { margin: 6px 0 14px; padding-left: 22px; line-height: 1.5; font-size: .95rem; }
.perm-panel li { margin: 6px 0; }
.perm-extra { font-size: .85rem; opacity: .7; margin: 0 0 16px !important; }
