:root { --abas-altura: calc(64px + env(safe-area-inset-bottom,0px)); }
main { height:calc(100dvh - var(--abas-altura)); }
.abas { position:relative; z-index:10; height:var(--abas-altura);
  display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); grid-template-rows:minmax(0,1fr); gap:6px; padding:6px max(10px,env(safe-area-inset-right,0px)) calc(6px + env(safe-area-inset-bottom,0px)) max(10px,env(safe-area-inset-left,0px));
  background:#27172d; border-top:1px solid #734a6d; }
.abas button { display:grid; justify-items:center; align-content:center; gap:4px; min-height:0; min-width:0; padding:0 4px; border:0; background:transparent;
  border-radius:16px; color:#d5bacf; font-size:12px; line-height:1.15; font-weight:650; }
.abas button[aria-current] { background:#623d60; color:#ffe2ee; }
.abas svg { width:22px; height:22px; }
@media (min-width:600px) {
  html { background:#100d19; }
  body { --preview-height:min(860px,calc(100dvh - 32px)); width:420px;
    margin:calc((100dvh - var(--preview-height))/2) auto; border-radius:22px;
    overflow:hidden; outline:1px solid #68495f; box-shadow:0 12px 48px #0008; }
  main { height:calc(var(--preview-height) - var(--abas-altura)); }
}
main:not([data-page="mapa"]) #mapa { visibility:hidden; pointer-events:none; }
#mapa { --tools-top:max(10px, env(safe-area-inset-top)); --tools-end:calc(var(--tools-top) + 54px); }
.map-tools { position:absolute; z-index:6; display:flex; align-items:start;
  gap:8px; top:var(--tools-top); inset-inline:12px; pointer-events:none; }
.lookup { position:relative; flex:1; min-width:0; pointer-events:auto; }
#busca, .map-tool { height:44px; box-shadow:0 4px 16px #160f2a44; border:1px solid #a36c91; }
#busca { border-radius:14px; background:#271931f5; }
.map-tool { display:grid; place-items:center; flex:0 0 44px; padding:0;
  border-radius:14px; background:#271931f5; pointer-events:auto; }
.map-tool svg { width:23px; height:23px; }
.map-tool[aria-expanded="true"] { background:#643a61; }
#sugestoes, .filter-dropdown { background:#261832; border:1px solid #98678e; border-radius:14px;
  overscroll-behavior:contain; box-shadow:0 12px 30px #130a1e88; overflow:auto; }
#sugestoes { position:absolute; inset:48px 0 auto; margin:0; padding:4px; max-height:min(53dvh,420px); list-style:none; }
#sugestoes li { padding:9px; cursor:pointer; border-radius:8px; }
#sugestoes [aria-selected="true"], #sugestoes li:hover { background:#523352; }
#sugestoes strong,#sugestoes small { display:block; overflow-wrap:anywhere; }
#sugestoes strong { font-size:.9rem; }
#sugestoes small { color:#e4c4dd; margin-top:3px; }
.filter-dropdown { position:absolute; z-index:5; inset:var(--tools-end) auto auto 12px;
  width:min(620px,calc(100% - 24px)); max-height:calc(100% - var(--tools-end) - 10px); padding:12px; }
.filter-dropdown .all-markers { margin-bottom:12px; }
.category-header { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:5px; }
.category-disclosure { display:flex; align-items:center; gap:6px; min-width:0; min-height:32px;
  padding:3px 2px; text-align:left; overflow-wrap:anywhere; font-size:14px; font-weight:800;
  color:var(--peach); background:transparent; border-color:transparent; }
.category-disclosure::before { content:""; flex:0 0 6px; height:6px; border:solid currentColor;
  border-width:0 1.5px 1.5px 0; transform:rotate(-45deg); }
.category-disclosure[aria-expanded="true"]::before { transform:rotate(45deg); }
.filter-section > .category-header > .category-disclosure { color:#fff2f8; font-size:16px; }
.category-header .category-actions { gap:3px; margin:0; }
.category-header .category-actions button { font-size:11px; min-height:29px; padding:3px 5px; }
.category-content > .category-grid { margin-top:5px; }
#limpar-destaque:not([hidden]) { margin-block:9px; }
.quick-controls { position:absolute; z-index:3; right:12px; bottom:12px; }
#alternar-controles { width:40px; height:40px; border-radius:11px; }
#alternar-controles svg { width:20px; height:20px; }
#alternar-controles[aria-expanded="true"] { background:#603552; border-color:var(--accent); }
.quick-controls .zoom {
  position:absolute; inset:auto 0 calc(100% + 7px) auto; gap:4px;
  width:max-content; max-width:calc(100vw - 24px); max-height:min(450px,calc(100dvh - var(--abas-altura) - 75px));
  overflow:auto; overscroll-behavior:contain; padding:5px; border:1px solid #8a5b7c;
  border-radius:12px; background:#28172df5; box-shadow:0 4px 15px #160c1c88;
}
.quick-controls .zoom button {
  width:100%; min-height:36px; height:auto; display:flex; justify-content:flex-start;
  gap:9px; padding:5px 9px; font-size:12px; text-align:left; box-shadow:none;
}
.quick-controls .zoom button svg { width:18px; height:18px; flex:none; }
.quick-controls #mapa-noturno { margin-top:0; font-size:12px; }
.map-day-icon, #mapa-noturno[aria-pressed="true"] .map-night-icon { display:none; }
#mapa-noturno[aria-pressed="true"] .map-day-icon { display:inline; }
.wiki { position:absolute; inset:0; overflow:auto; padding:18px 14px 28px; background:linear-gradient(#35203c,#211228); }
.wiki h1 { margin:0 0 12px; font-size:29px; }
.wiki-switch,.wiki-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.wiki-switch button { flex:1; font-size:13px; min-height:42px; }
#wiki-layer { width:100%; margin:10px 0 14px; font-size:13px; }
.wiki button[aria-pressed="true"] { background:#6c4165; border-color:#d79bc3; }
.wiki-chapter { border:1px solid var(--line); border-radius:13px; padding:9px; margin-bottom:9px; }
.wiki-chapter > summary { padding:4px; color:var(--peach); font-weight:700; cursor:pointer; }
.wiki-card { border-top:1px solid var(--line); margin-top:9px; padding:10px 4px 2px; }
.wiki-card h3 { font-size:15px; margin:0 0 7px; }
.wiki-actions button,.wiki-actions small { font-size:12px; }
.wiki-actions [data-wiki-complete]::before { content:"○"; margin-right:5px; }
.wiki-actions [data-wiki-complete][aria-pressed="true"]::before { content:"✓"; }
.wiki-meta { display:flex; gap:5px; flex-wrap:wrap; margin:5px 0 8px; }
.wiki-meta span { font-size:11px; border-radius:8px; padding:3px 6px; color:#ffe1ef; background:#593955; }
.wiki-spoiler { border:1px solid var(--line); border-radius:9px; padding:6px 8px; margin:6px 0; }
.wiki-spoiler summary { cursor:pointer; font-size:12px; color:var(--accent); }
.wiki-spoiler-text { margin:6px 0 1px; font-size:13px; line-height:1.45; white-space:pre-line; }
.wiki-spoiler-preview { display:block; width:max-content; padding:2px 0; color:var(--muted); filter:blur(3px); user-select:none; }
.wiki-open-mission { font-size:12px; }
.wiki-source { display:flex; gap:4px 8px; flex-wrap:wrap; font-size:11px; color:var(--muted); margin:6px 0; }
.wiki-source a { color:var(--accent); }
main[data-page="mapa"] #detalhe {
  inset:var(--tools-end) 12px auto 12px;
  width:auto; max-width:440px; max-height:calc(100% - var(--tools-end) - 78px); padding:0; z-index:4;
  display:flex; flex-direction:column; overflow:hidden; border-radius:17px;
}
#rolagem-detalhe {
  min-height:0; margin-block:5px; margin-right:4px; padding:9px 11px 9px 14px;
  overflow:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#c381af transparent;
}
#acoes-detalhe { flex:none; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px;
  padding:9px 13px 11px; border-top:1px solid #5e3b57; background:#2e1a32; }
#acoes-detalhe button { display:flex; align-items:center; justify-content:center; gap:6px;
  width:100%; min-width:0; min-height:39px; margin:0; padding:5px 8px; font-size:.82rem; font-weight:750; }
#acoes-detalhe [aria-pressed="true"] { background:#6a375d; border-color:#ed9fc9; color:#fff4fb; }
.detail-button-icon { display:grid; place-items:center; font-size:17px; line-height:1; }
.detail-filter-icon { width:15px; height:13px;
  background:linear-gradient(currentColor,currentColor) center 2px / 15px 1.5px no-repeat,
             linear-gradient(currentColor,currentColor) center 6px / 10px 1.5px no-repeat,
             linear-gradient(currentColor,currentColor) center 10px / 5px 1.5px no-repeat; }
#detalhe .detail-close { display:grid; place-items:center; }
#detalhe .detail-close::before, #detalhe .detail-close::after { content:"";
  grid-area:1 / 1; width:13px; height:1.8px; border-radius:2px; background:currentColor; transform:rotate(45deg); }
#detalhe .detail-close::after { transform:rotate(-45deg); }
@supports selector(::-webkit-scrollbar) {
  #rolagem-detalhe { scrollbar-width:auto; scrollbar-color:auto; }
  #rolagem-detalhe::-webkit-scrollbar { width:5px; height:5px; }
  #rolagem-detalhe::-webkit-scrollbar-track { background:transparent; margin-block:5px; }
  #rolagem-detalhe::-webkit-scrollbar-thumb { border-radius:99px; background:#c381af; }
  #rolagem-detalhe::-webkit-scrollbar-button,
  #rolagem-detalhe::-webkit-scrollbar-button:single-button { display:none; width:0; height:0; }
}
@media (pointer:coarse) {
  #rolagem-detalhe { scrollbar-width:none; }
  #rolagem-detalhe::-webkit-scrollbar { display:none; }
}

.news { position:absolute; inset:0; overflow:auto; padding:max(24px,env(safe-area-inset-top)) 18px 24px;
  background:linear-gradient(180deg,#220f2b20,#1d102962), url("data/news/fundo-praia-roxo.png") center / cover no-repeat #24152e; }
.news-brand,.news-list-head,.news-feed { max-width:600px; margin-inline:auto; }
.news-brand { margin-bottom:28px; }
.news-identity { display:flex; align-items:center; gap:13px; }
.news-identity > img:first-child { flex:none; border-radius:16px; }
.news-wordmark { display:block; width:208px; max-width:calc(100% - 81px); height:auto; }
.news-list-head { margin-bottom:12px; display:flex; align-items:center; flex-wrap:wrap; justify-content:space-between; gap:8px; }
.news-list-head h1 { margin:0; font-size:1.6rem; line-height:1.2; }
.news-filter-menu { position:relative; z-index:3; }
#alternar-filtro-noticias { width:40px; height:40px; }
#alternar-filtro-noticias.is-filtered { background:#643a61; border-color:#ffbba5; }
.news-filters { position:absolute; top:calc(100% + 7px); right:0; width:148px; padding:5px;
  display:grid; gap:4px; border:1px solid #98678e; border-radius:12px; background:#261832; box-shadow:0 9px 20px #130a1e88; }
.news-filters button { min-height:34px; padding:5px 9px; text-align:left; font-size:.78rem; font-weight:700; border-radius:7px; }
.news-filters [aria-pressed="true"] { color:#27152d; background:#ffbba5; border-color:#ffbba5; }
.news-story-label { display:inline-block; margin-bottom:5px; padding:2px 5px; border-radius:4px; border:1px solid #d18e6e;
  color:#ffd3bc; font-size:.62rem; font-weight:750; }
.news-editorial-art { display:grid; place-items:center; padding:6px; text-align:center;
  background:linear-gradient(150deg,#703a58,#332644); color:#ffdac4; border:1px solid #aa6e91; font-size:.68rem; }
.news-feed { display:grid; gap:10px; }
.news-card { display:grid; grid-template-columns:minmax(74px,29%) minmax(0,1fr); align-items:center; gap:11px;
  width:100%; padding:9px; border:1px solid #5b3b5a; border-radius:14px; background:#2a2038; text-align:left; }
.news-card:hover,.news-card:focus-visible { background:#372741; }
.news-thumbnail { width:100%; aspect-ratio:1.22; border-radius:9px; object-fit:cover; background:#332644; }
.news-patch { border-color:#735970; }
.news-patch-featured { border-color:#dc946f; background:linear-gradient(110deg,#4a2944,#2a2038 77%); }
.news-patch-featured:hover,.news-patch-featured:focus-visible { background:linear-gradient(110deg,#59344d,#372741 77%); }
.news-patch-label { display:inline-block; margin-bottom:5px; padding:3px 6px; border-radius:5px;
  background:#ffd09d; color:#3c2137; font-size:.59rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.news-patch-art { display:grid; place-content:center; justify-items:center; gap:3px; height:100%; min-height:78px;
  background:repeating-linear-gradient(128deg,#ffffff0d 0 1px,transparent 1px 9px), linear-gradient(155deg,#59385b,#2a2342);
  border:1px solid #a36c91; color:#ffdfbf; }
.news-patch-featured .news-patch-art {
  background:repeating-linear-gradient(128deg,#ffffff18 0 1px,transparent 1px 9px), linear-gradient(153deg,#874c63,#342746);
  border-color:#dc946f; }
.news-patch-art strong { font-size:.69rem; letter-spacing:.17em; }
.news-patch-art small { font-size:.59rem; font-variant-numeric:tabular-nums; white-space:nowrap; }
.patch-symbol { display:grid; place-items:center; width:24px; height:22px; margin-bottom:2px;
  border:1.5px solid currentColor; border-radius:4px; }
.patch-symbol::before { content:""; width:9px; height:5px; border:solid currentColor;
  border-width:0 0 2px 2px; transform:translateY(-1px) rotate(-45deg); }
.news-card-copy h2 { font-size:.95rem; margin:4px 0; line-height:1.2; overflow-wrap:anywhere; }
.news-meta,.news-reader footer { color:#e0bfdb; font-size:.77rem; margin:0; }
.news-excerpt { color:#e6d6e6; font-size:.78rem; line-height:1.35; margin:0;
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
.news-reader { max-width:600px; margin-inline:auto; }
.news-back { margin-bottom:20px; min-height:42px; border-radius:22px; }
.news-reader h1 { font-size:clamp(1.35rem,6vw,1.8rem); line-height:1.13; margin:8px 0 15px; outline:none; }
.news-cover { width:100%; aspect-ratio:16/9; object-fit:cover; display:block; border-radius:14px; }
.news-copy { font-size:.96rem; line-height:1.6; }
.news-copy h2 { margin:21px 0 4px; font-size:1.08rem; line-height:1.3; color:#ffd9be; }
.news-copy h2 + p { margin-top:0; }
.news-reader footer { border-top:1px solid #533752; padding:12px 0; }
#radios { position:absolute; inset:0; padding:max(22px,env(safe-area-inset-top)) 17px 24px; overflow:auto;
  background:linear-gradient(180deg,#25132b33,#18121eef),url("data/news/fundo-praia-roxo.png") center / cover no-repeat #24152e; }
.radio-header h1 { margin:0; font-size:clamp(1.65rem,8vw,2rem); letter-spacing:-.035em; }
.radio-header p { margin:3px 0 16px; color:#e0bfdb; font-size:.85rem; }
.radio-dial { padding:13px; border:1px solid #af6d99; border-radius:18px; text-align:center;
  background:radial-gradient(ellipse at center,#562845,#29192f 75%); }
.radio-position { font-variant-numeric:tabular-nums; color:#efaccc; }
.radio-position { margin:0; font-size:.76rem; letter-spacing:.14em; }
.radio-dial-row { display:grid; grid-template-columns:36px minmax(0,1fr) 36px; align-items:center; gap:6px; margin-block:10px; }
.radio-dial-row button { min-height:38px; padding:0; font-size:24px; line-height:1; }
#radio-dial-logo { display:block; width:96px; height:96px; object-fit:contain; margin:0 auto 6px; filter:drop-shadow(0 4px 8px #0f081eb3); }
.radio-station-display h2 { margin:0; font-size:1.18rem; line-height:1.15; overflow-wrap:anywhere; outline:none; }
.radio-station-display p { margin:4px 0 0; color:#dcbfd6; font-size:.78rem; }
.radio-play { display:inline-grid; place-items:center; min-height:42px; padding:7px 17px; border-radius:20px;
  background:#aaf6cf; color:#192c26; text-decoration:none; font-size:.84rem; font-weight:800; }
.radio-collections,.radio-sources { display:flex; flex-wrap:wrap; gap:6px 12px; font-size:.77rem; }
.radio-collections { margin:14px 0 17px; }
.radio-list-title { font-size:1.12rem; margin:0 0 8px; }
#radio-stations { display:grid; gap:5px; list-style:none; padding:0; margin:0; }
.radio-station { display:grid; width:100%; grid-template-columns:40px minmax(0,1fr); gap:2px 9px; padding:6px 9px; align-items:center;
  border-color:#624160; background:#2a1a34ed; text-align:left; }
.radio-station[aria-pressed="true"] { border-color:#eaa9cc; background:#593458; }
.radio-list-logo { grid-row:span 2; display:block; width:38px; height:38px; object-fit:contain; }
.radio-station-name { font-size:.86rem; font-weight:750; }
.radio-station small { grid-column:2; color:#e0bfdb; font-size:.72rem; }
.radio-sources { margin-top:16px; padding-top:11px; border-top:1px solid #684361; color:#e0bfdb; }
.abas [data-page="radios"] { font-size:11px; }
#configuracoes { position:absolute; inset:0; overflow:auto; padding:max(20px,env(safe-area-inset-top)) 18px 24px;
  background:linear-gradient(155deg,#4d2a49,#27172d 55%); }
#configuracoes h1 { margin:0 auto 20px; max-width:560px; font-size:25px; }
#opcoes-inferiores { display:grid; gap:8px; max-width:560px; margin:auto; }
#opcoes-inferiores > button, #instalar-pwa { display:flex; gap:10px; align-items:center; min-height:46px; text-align:left; }
#opcoes-inferiores svg { width:20px; height:20px; }
#opcoes-inferiores .icon-size { display:flex; gap:8px; align-items:center; margin:8px 0; }
.icon-size span { flex:1; }
.icon-size button { min-width:44px; min-height:44px; }
#fontes-mapa { position:static; padding:8px 0; }
#fontes-mapa ul { position:static; width:auto; }
#instalar-pwa { margin:10px auto; width:min(100%,560px); }
#status:not(:empty) { position:absolute; z-index:6; top:auto; bottom:7px; left:8px; right:8px;
  padding:8px 12px; margin:0; border-radius:10px; background:#27172def; pointer-events:none; }
#carregando{position:absolute;left:12px;bottom:12px;margin:0;padding:8px 12px;border-radius:10px;background:#27172def;pointer-events:none}

@media (prefers-reduced-motion:no-preference) {
  #busca-painel, #sugestoes, #filtros, #controles-mapa, #news-filters {
    --menu-shift:-6px;
    opacity:1;
    translate:0 0;
    transition:opacity 160ms ease, translate 180ms ease, display 180ms allow-discrete;
  }
  #busca-painel { --menu-shift:0px; }
  #controles-mapa { --menu-shift:8px; }
  :is(#busca-painel, #sugestoes, #filtros, #controles-mapa, #news-filters)[hidden] {
    opacity:0;
    translate:0 var(--menu-shift);
    pointer-events:none;
  }
  @starting-style {
    #busca-painel, #sugestoes, #filtros, #controles-mapa, #news-filters {
      opacity:0;
      translate:0 var(--menu-shift);
    }
  }
}
@media (prefers-reduced-motion:reduce) {
  #alternar-controles svg { transition:none; }
}
