/* Aguaje — estilos públicos · paleta del logo: negro, naranja→amarillo, azules */
:root {
  --bg: #05080f; --ink: #eaf2ff; --soft: #9db0cc; --line: rgba(255,255,255,.11);
  --card: rgba(9,16,32,.68); --card-2: rgba(255,255,255,.06); --card-solid: #0b1426;
  --blue: #1aa7e8; --blue-2: #0b5fb8; --navy: #0a2a5c; --orange: #ff5a1f; --yellow: #ffc21a;
  --grad: linear-gradient(90deg, #ff5a1f, #ffc21a);
  --ok: #3ddc97; --medio: #ffc21a; --alto: #ff7a1f; --critico: #ff3b4e;
  --r: 16px; --r-s: 10px; --shadow: 0 8px 28px -14px rgba(0,0,0,.7);
  --f-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --f-body: 'Figtree', 'Segoe UI', system-ui, sans-serif;
  --wrap: 1260px; --rail: 160px;
  /* nombres usados por el diálogo y componentes heredados */
  --tinta: var(--ink); --suave: var(--soft); --linea: var(--line); --marea: var(--blue); --sol: var(--yellow); --rio: #070d1a; --papel: var(--card-solid);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--f-body); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: #6fd0ff; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.15; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.02rem; font-weight: 700; }
p { margin: 0 0 .6rem; }
.muted { color: var(--soft); } .small { font-size: .84rem; }
.wrap { width: min(100% - 24px, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: #000; padding: 8px 12px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 6px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
[hidden] { display: none !important; }

/* ---------- Fondo animado según el clima ---------- */
.wxbg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #0a1730; transition: background 1.2s; }
.wxbg[data-theme="clear"] { background: linear-gradient(180deg, #0a4a96 0%, #1aa7e8 42%, #f5a04a 100%); }
.wxbg[data-theme="cloud"] { background: linear-gradient(180deg, #1c3556 0%, #4a6a8f 55%, #8aa0b8 100%); }
.wxbg[data-theme="rain"]  { background: linear-gradient(180deg, #0a1426 0%, #17304f 60%, #2b4a6b 100%); }
.wxbg[data-theme="storm"] { background: linear-gradient(180deg, #05070f 0%, #141c38 55%, #2a2450 100%); }
.wxbg[data-theme="night"] { background: linear-gradient(180deg, #02050d 0%, #0a1a3e 60%, #123a78 100%); }
.wxbg video, .wxbg canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wxbg video { opacity: 0; transition: opacity 1s; } .wxbg.has-video video { opacity: 1; }
.wxbg::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(5,8,15,0) 0, rgba(5,8,15,.32) 40%, rgba(5,8,15,.72) 100%); }

/* ---------- Encabezado ---------- */
.top { background: rgba(5,8,15,.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; }
.brand__mark { width: 40px; height: 40px; object-fit: contain; border-radius: 10px; }
.brand__name { font: 800 1.35rem var(--f-display); letter-spacing: -.02em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.top__nav { display: flex; align-items: center; gap: 16px; font-size: .9rem; }
.top__nav a { color: #c4d4ee; text-decoration: none; } .top__nav a:hover { color: #fff; text-decoration: underline; }
@media (max-width: 720px) { .top__nav a { display: none; } }

.btn { font: 600 .88rem var(--f-body); border: 1px solid var(--line); background: var(--card-2); color: var(--ink); border-radius: 999px; padding: 8px 14px; cursor: pointer; min-height: 36px; }
.btn:hover { border-color: var(--blue); }
.btn--sm { padding: 5px 11px; min-height: 30px; font-size: .82rem; }
.btn--alert { background: var(--grad); border-color: transparent; color: #1a0d02; font-weight: 700; }
.btn--alert:hover { filter: brightness(1.08); border-color: transparent; }
.btn--ghost { background: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn--install { background: transparent; border-color: rgba(255,255,255,.28); color: #fff; }
.dlg--sm { width: min(440px, calc(100% - 24px)); } .dlg__box { padding: 20px; display: grid; gap: 12px; } .dlg__box ol { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
/* ---------- Avisos y franja demo ---------- */
.alerts { display: grid; gap: 6px; margin-top: 8px; } .alerts:empty { display: none; }
.alert { display: flex; gap: 10px; padding: 9px 12px; border-radius: var(--r-s); border-left: 5px solid var(--blue); background: var(--card-solid); box-shadow: var(--shadow); }
.alert--watch { border-color: var(--medio); } .alert--warning { border-color: var(--alto); } .alert--danger { border-color: var(--critico); }
.alert strong { display: block; } .alert p { margin: 2px 0 0; color: var(--soft); font-size: .88rem; }
.demo-bar { background: #3a2c00; color: #ffe08a; font-size: .8rem; padding: 4px 0; text-align: center; }

/* ---------- Banners propios ---------- */
.bn { position: relative; margin: 0 auto; width: min(100%, var(--w)); }
.bn a { display: block; line-height: 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #0b1426; }
.bn__img { width: 100%; height: auto; display: block; }
.bn__lbl { position: absolute; right: 6px; bottom: 5px; font: 600 9.5px/1 var(--f-body); letter-spacing: .03em; color: rgba(255,255,255,.7); background: rgba(0,0,0,.45); padding: 3px 6px; border-radius: 5px; pointer-events: none; }
.bn__fb { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; line-height: 1.3; padding: 14px 18px; min-height: 60px; background: linear-gradient(120deg, #0b1426, #0a2a5c 70%, #0b5fb8); color: #fff; }
.bn__fb small { color: var(--yellow); font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.bn__fb strong { font: 800 1.2rem var(--f-display); } .bn__fb em { font-style: normal; font-weight: 700; margin-left: auto; background: var(--grad); color: #1a0d02; padding: 6px 12px; border-radius: 999px; font-size: .85rem; }
.bn__fb--mob { display: none; }
@media (max-width: 719px) { .bn__img--desk { display: none; } .bn__fb--mob { display: flex; } }
.bnwrap { margin-top: 10px; } .bnwrap:empty { display: none; }
.bnwrap--foot { margin-block: 14px 0; }
.col-main > .bn { width: 100%; max-width: var(--w); }
.bn--ghost { border: 2px dashed var(--orange); border-radius: 8px; padding: 14px; text-align: center; color: var(--soft); font-size: .84rem; aspect-ratio: var(--ar); display: grid; place-items: center; max-height: 160px; }
.bn--preview a { outline: 2px dashed var(--orange); outline-offset: 2px; }
.bn__slot { position: absolute; left: 8px; top: -9px; background: var(--orange); color: #fff; font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; z-index: 2; }

/* ---------- Estructura: laterales + columna central ---------- */
.stage { display: block; padding-block: 12px 8px; }
.rail { display: none; }
.col-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.col-main > * { min-width: 0; }
@media (min-width: 1280px) {
  .stage { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr) var(--rail); gap: 16px; align-items: start; }
  .rail { display: block; position: sticky; top: 64px; }
  .rail:empty { visibility: hidden; }
  .rail .bn { width: var(--rail); }
}
.card { background: var(--card); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px; }
.card--tight h2 { margin-bottom: 8px; }
.card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; } .card__head h2 { margin: 0; }
.duo { display: grid; gap: 12px; }
@media (min-width: 760px) { .duo { grid-template-columns: 1.7fr 1fr; } }

/* ---------- Pestañas de ciudad ---------- */
.citytabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 560px) { .citytabs { display: flex; overflow-x: auto; scrollbar-width: none; } .citytabs::-webkit-scrollbar { display: none; } }
.tab { flex: 0 0 auto; font: 700 .9rem var(--f-body); padding: 7px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); backdrop-filter: blur(8px); color: var(--ink); cursor: pointer; display: flex; align-items: center; gap: 8px; justify-content: center; }
.tab .t { font: 800 1rem var(--f-display); } .tab .ico { width: 22px; height: 22px; }
.tab[aria-pressed="true"] { background: var(--grad); border-color: transparent; color: #1a0d02; }
.tab .lvl { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 2px rgba(0,0,0,.35); }
.tab .lvl--1 { background: var(--medio); } .tab .lvl--2 { background: var(--alto); } .tab .lvl--3 { background: var(--critico); }

/* ---------- Héroe compacto: clima actual + riesgo ---------- */
.hero { --bg: rgba(9,16,32,.7); background: var(--bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 20px; padding: 14px; box-shadow: var(--shadow); position: relative; }
.hero__skeleton { padding: 40px 0; text-align: center; color: var(--soft); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.hero__grid > * { min-width: 0; }
@media (min-width: 820px) { .hero__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; } }
.hero__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.1); border-radius: 999px; padding: 4px 11px 4px 8px; font-weight: 700; font-size: .88rem; }
.pill svg { width: 15px; height: 15px; color: var(--orange); }
.hero__upd { font-size: .76rem; color: var(--soft); }
.hero__main { display: flex; align-items: center; gap: 10px; margin: 4px 0 8px; }
.hero .hero__ico { width: 84px; height: 84px; flex: 0 0 auto; filter: drop-shadow(0 8px 14px rgba(0,0,0,.4)); }
.hero__t { font: 800 clamp(58px, 12vw, 76px)/.95 var(--f-display); letter-spacing: -.05em; display: block; }
.hero__cond { font: 700 1.05rem var(--f-display); display: block; }
.hero__feels { font-size: .82rem; color: var(--soft); }
.ico { display: inline-block; width: 1em; height: 1em; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stat { background: var(--card-2); border-radius: 10px; padding: 6px 8px; }
.stat small { display: block; font-size: .68rem; color: var(--soft); }
.stat b { font: 700 .95rem var(--f-display); }
.stat--hl { background: linear-gradient(135deg, rgba(26,167,232,.35), rgba(11,95,184,.35)); border: 1px solid rgba(26,167,232,.5); }
@media (max-width: 480px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.parts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; text-align: center; }
.part { padding: 5px 2px; border-radius: 10px; background: var(--card-2); }
.part .ico { width: 24px; height: 24px; }
.part b { display: block; font: 700 .92rem var(--f-display); } .part small { display: block; font-size: .68rem; color: var(--soft); }

.risk { --lvl: var(--ok); background: var(--card-2); border: 1px solid var(--line); border-top: 4px solid var(--lvl); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 7px; }
.risk--1 { --lvl: var(--medio); } .risk--2 { --lvl: var(--alto); } .risk--3 { --lvl: var(--critico); }
.risk__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.risk__head span { font-size: .8rem; color: var(--soft); font-weight: 600; }
.risk__head strong { font: 800 1.5rem var(--f-display); color: var(--lvl); letter-spacing: -.02em; }
.risk__meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.risk__meter i { height: 6px; border-radius: 4px; background: rgba(255,255,255,.14); }
.risk--0 .risk__meter i:nth-child(-n+1) { background: var(--ok); }
.risk--1 .risk__meter i:nth-child(-n+2) { background: var(--medio); }
.risk--2 .risk__meter i:nth-child(-n+3) { background: var(--alto); }
.risk--3 .risk__meter i { background: var(--critico); }
.risk__msg { margin: 0; font-weight: 600; font-size: .92rem; }
.risk__why { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; font-size: .82rem; color: var(--soft); }
.risk__why li { display: flex; gap: 7px; } .risk__why li::before { content: ""; flex: 0 0 6px; height: 6px; margin-top: .5em; border-radius: 50%; background: var(--lvl); }
.risk__chart { margin-top: auto; }
.rc { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; align-items: end; height: 34px; }
.rc i { display: block; background: linear-gradient(#5ad1ff, #0b5fb8); border-radius: 4px 4px 1px 1px; min-height: 3px; }
.rc i.z { background: rgba(255,255,255,.14); }
.rc__lbl { display: flex; justify-content: space-between; font-size: .68rem; color: var(--soft); margin-top: 2px; }
.risk__chart small { display: block; color: var(--soft); font-size: .7rem; }
.risk__note { margin: 0; font-size: .7rem; color: var(--soft); }

/* ---------- Mapa ---------- */
.mapcard { background: #060b16; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.mapcard__bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: 600 .8rem var(--f-body); color: #c4d4ee; background: rgba(255,255,255,.07); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; cursor: pointer; }
.chip[aria-pressed="true"] { background: linear-gradient(90deg, #0b5fb8, #1aa7e8); color: #fff; border-color: transparent; }
.mapwrap { position: relative; }
#map { height: min(54vh, 430px); min-height: 300px; background: #0a1220; }
.map-note { position: absolute; left: 10px; bottom: 10px; z-index: 500; background: rgba(5,8,15,.85); color: #e5f0ee; padding: 5px 9px; border-radius: 8px; font-size: .76rem; max-width: 70%; }
.map-pick { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 600; background: var(--grad); color: #1a0d02; padding: 7px 8px 7px 14px; border-radius: 999px; font-weight: 700; font-size: .88rem; display: flex; align-items: center; gap: 10px; box-shadow: 0 8px 20px rgba(0,0,0,.45); width: max-content; max-width: calc(100% - 20px); }
.map-pick .btn { background: rgba(0,0,0,.18); color: #1a0d02; border-color: transparent; }
.picking #map { cursor: crosshair; }
.map-loc { position: absolute; right: 10px; top: 10px; z-index: 500; width: 38px; height: 38px; border-radius: 10px; border: 0; background: #fff; color: #0a2a5c; cursor: pointer; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.tl { display: flex; align-items: center; gap: 10px; padding: 7px 12px; background: rgba(255,255,255,.04); border-top: 1px solid var(--line); }
.tl__play { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--grad); color: #1a0d02; font-size: .8rem; cursor: pointer; flex: 0 0 auto; }
.tl input[type=range] { flex: 1; accent-color: var(--orange); min-width: 0; }
.tl__t { font-size: .8rem; font-weight: 700; white-space: nowrap; min-width: 118px; text-align: right; color: #d6e4fb; }
.mapcard__foot { display: flex; justify-content: space-between; align-items: center; gap: 8px 14px; padding: 7px 12px 9px; flex-wrap: wrap; font-size: .76rem; color: var(--soft); }
.legend { display: flex; gap: 10px; flex-wrap: wrap; } .legend span { display: inline-flex; align-items: center; gap: 5px; }
.ramp { display: grid; grid-template-columns: auto 120px; grid-template-rows: auto auto; column-gap: 8px; align-items: center; }
.ramp > span { grid-row: span 2; font-weight: 700; }
.ramp__bar { height: 7px; border-radius: 5px; background: linear-gradient(90deg, #5ad1ff, #28a0ff 18%, #28d778 32%, #96e63c 44%, #ffe13c 58%, #ffa01e 72%, #ff503a 84%, #e61e5a 93%, #be28ff); }
.ramp small { display: none; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--medio); }
.dot--1 { background: var(--medio); } .dot--2 { background: var(--alto); } .dot--3 { background: var(--critico); }
.diamond { display: inline-block; width: 9px; height: 9px; background: var(--blue); transform: rotate(45deg); border-radius: 2px; }
.mapcard .btn--ghost { color: #c4d4ee; border-color: rgba(255,255,255,.25); }

.map-dark .leaflet-tile-pane { filter: invert(1) hue-rotate(195deg) saturate(.6) brightness(.92) contrast(.92); }
.leaflet-container { font-family: var(--f-body); background: #0a1220; }
.leaflet-popup-content-wrapper { border-radius: 12px; }
.leaflet-popup-content { margin: 10px 12px; min-width: 200px; color: #10272c; }
.pop h3 { font-size: 1rem; margin-bottom: 4px; } .pop p { margin: 0 0 6px; font-size: .88rem; }
.pop .row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pop .btn { padding: 5px 10px; min-height: 30px; font-size: .8rem; color: #10272c; background: #eef3f7; border-color: #cfd9e4; }
.pop img { width: 100%; border-radius: 10px; margin-top: 6px; }
.rep-mk { position: relative; width: 22px; height: 22px; }
.rep-mk i { position: absolute; inset: 3px; border-radius: 50%; background: var(--c); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.rep-mk::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--c); animation: pulse 2s ease-out infinite; }
.rep-mk--unv i { opacity: .75; }
@keyframes pulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
.hs-mk { width: 15px; height: 15px; background: var(--c); border: 2px solid #fff; transform: rotate(45deg); border-radius: 4px; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.me-mk { width: 16px; height: 16px; border-radius: 50%; background: #3b82f6; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(59,130,246,.3); }
.bolt-mk { font-size: 20px; line-height: 20px; text-align: center; filter: drop-shadow(0 0 6px #ffc21a) drop-shadow(0 0 2px #000); animation: zap 1.6s steps(1) infinite; }
@keyframes zap { 0%, 55%, 100% { opacity: 1; } 60%, 70% { opacity: .25; } 65% { opacity: 1; } }

/* ---------- Pronóstico por horas ---------- */
.hourly { display: flex; gap: 4px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 2px 8px; margin: 0 -2px; scrollbar-width: thin; }
.hr { flex: 0 0 54px; scroll-snap-align: start; display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; text-align: center; }
.hr--now { background: var(--grad); color: #1a0d02; }
.hr time { font-size: .74rem; color: var(--soft); font-weight: 600; } .hr--now time, .hr--now small { color: #3a2208; }
.hr .ico { width: 28px; height: 28px; }
.hr b { font: 700 .95rem var(--f-display); }
.hr__bar { width: 14px; height: 34px; border-radius: 7px; background: rgba(255,255,255,.1); display: flex; align-items: flex-end; overflow: hidden; }
.hr--now .hr__bar { background: rgba(0,0,0,.18); }
.hr__bar i { display: block; width: 100%; background: linear-gradient(#5ad1ff, #0b5fb8); border-radius: 7px; }
.hr small { font-size: .7rem; color: var(--soft); }

/* ---------- Marea ---------- */
.tide__top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tide__now { font: 800 1.7rem var(--f-display); letter-spacing: -.03em; } .tide__now small { font: 600 .85rem var(--f-body); color: var(--soft); }
.tide__dir { font-weight: 700; font-size: .84rem; padding: 3px 10px; border-radius: 999px; background: var(--card-2); }
.tide__dir--hi { background: rgba(255,90,31,.2); color: #ffb08a; }
.tide__svg { width: 100%; height: auto; display: block; margin-top: 2px; }
.tide__svg text { font: 600 15px var(--f-body); fill: var(--soft); }
.tide__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }
.tide__list li { background: var(--card-2); border-radius: 10px; padding: 5px 9px; font-size: .8rem; color: var(--soft); }
.tide__list b { display: block; font: 700 .9rem var(--f-display); color: var(--ink); }
.tide__src { margin: 8px 0 0; font-size: .74rem; color: var(--soft); }
.badge { display: inline-block; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--card-2); color: var(--soft); }
.badge--ok { background: rgba(61,220,151,.18); color: #7df0bd; } .badge--warn { background: rgba(255,194,26,.18); color: #ffd763; }

/* ---------- Ríos ---------- */
.river { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .88rem; }
.river li { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; }
.river .lvl { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); margin-top: .45em; }
.river .lvl--watch { background: var(--medio); } .river .lvl--warn { background: var(--alto); } .river .lvl--bad { background: var(--critico); }
.river b { display: block; } .river small { color: var(--soft); display: block; }

/* ---------- Semana (tarjetas) ---------- */
.daily { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 6px; }
.day { display: grid; justify-items: center; gap: 1px; padding: 8px 4px; border-radius: 12px; background: var(--card-2); text-align: center; }
.day > b { font-weight: 700; text-transform: capitalize; font-size: .85rem; }
.day .ico { width: 34px; height: 34px; }
.day__t { font: 700 .95rem var(--f-display); } .day__t span { color: var(--soft); font-weight: 500; margin-left: 5px; }
.day__rain { font-size: .74rem; color: var(--soft); } .day__rain strong { color: #6fd0ff; font-weight: 700; }

/* ---------- Reportes ---------- */
.rep { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); align-items: start; }
.rep:first-child { border-top: 0; }
.rep__sev { width: 12px; height: 12px; border-radius: 50%; margin-top: .35em; }
.rep__t { font-weight: 700; font-size: .92rem; } .rep__m { font-size: .8rem; color: var(--soft); } .rep__n { font-size: .88rem; margin-top: 2px; }
.rep__act { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rep img { width: 60px; height: 60px; object-fit: cover; border-radius: 10px; }
.empty { padding: 12px; background: var(--card-2); border-radius: 12px; text-align: center; color: var(--soft); font-size: .9rem; }
@media (max-width: 560px) { .rep { grid-template-columns: auto 1fr; } .rep__act { grid-column: 2; } }
.prose details { border-top: 1px solid var(--line); padding: 8px 0; } .prose details:first-of-type { border-top: 0; }
.prose summary { cursor: pointer; font-weight: 700; font-size: .92rem; } .prose details p { margin: 6px 0 0; color: var(--soft); font-size: .88rem; }

/* ---------- Diálogo de reporte ---------- */
.dlg { border: 0; border-radius: 20px; padding: 0; width: min(560px, calc(100% - 24px)); max-height: calc(100dvh - 24px); background: var(--card-solid); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.dlg::backdrop { background: rgba(5,20,24,.62); backdrop-filter: blur(3px); }
.dlg form { padding: 20px; display: grid; gap: 14px; }
.dlg__head { display: flex; justify-content: space-between; align-items: center; }
.dlg__x { border: 0; background: var(--card-2); color: var(--tinta); width: 36px; height: 36px; border-radius: 50%; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.f { border: 1px solid var(--linea); border-radius: 16px; padding: 12px 14px 14px; margin: 0; display: grid; gap: 10px; }
.f legend { font-weight: 700; padding: 0 6px; }
.f__row { display: flex; gap: 8px; flex-wrap: wrap; }
.f__loc { margin: 0; font-size: .9rem; color: var(--suave); }
.f__loc.is-set { color: var(--ok); font-weight: 600; }
.f__lbl { display: grid; gap: 4px; font-size: .88rem; font-weight: 600; }
.f input[type=text], .f input:not([type]), .f textarea, .f input[type=file] { font: 400 1rem var(--f-body); padding: 10px 12px; border-radius: 12px; border: 1px solid var(--linea); background: var(--card-2); color: var(--tinta); width: 100%; }
.sev { display: grid; gap: 8px; }
.sev__opt input { position: absolute; opacity: 0; }
.sev__opt span { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; padding: 10px 12px; border: 2px solid var(--linea); border-radius: 14px; cursor: pointer; align-items: center; }
.sev__opt small { grid-column: 2; color: var(--suave); }
.sev__opt input:checked + span { border-color: var(--marea); background: var(--card-2); }
.sev__opt input:focus-visible + span { outline: 3px solid var(--sol); }
.f__err { color: var(--critico); font-weight: 600; margin: 0; }
.dlg__foot { display: flex; justify-content: flex-end; gap: 8px; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--rio); color: #fff; padding: 12px 18px; border-radius: 14px; z-index: 900; box-shadow: 0 10px 30px rgba(0,0,0,.4); max-width: calc(100% - 24px); }


.f input[type=text], .f input:not([type]), .f textarea, .f input[type=file] { color-scheme: dark; }
.sev__opt input:checked + span { border-color: var(--orange); background: rgba(255,90,31,.12); }
.toast { background: #0b1426 !important; border: 1px solid var(--line); }

/* ---------- Pie ---------- */
.foot { background: rgba(3,5,10,.92); color: #b7c7e2; padding: 22px 0 18px; font-size: .86rem; margin-top: 14px; border-top: 1px solid var(--line); }
.foot a { color: #8fd8ff; } .foot h2 { font-size: .92rem; color: #fff; margin-bottom: 6px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.foot__warn { background: rgba(255,255,255,.06); border-radius: 12px; padding: 10px 12px; margin: 0; }
.foot__cols { display: grid; gap: 18px; margin: 16px 0; }
@media (min-width: 820px) { .foot__cols { grid-template-columns: 1.4fr 1fr 1fr; } }
.foot__copy { margin: 0; opacity: .7; }

/* ---------- Páginas de contenido ---------- */
.page { background: radial-gradient(1200px 500px at 85% -10%, rgba(255,120,30,.22), transparent 60%), radial-gradient(900px 500px at 10% 0%, rgba(26,167,232,.18), transparent 60%), var(--bg); }
.page .content { width: min(100% - 24px, 780px); margin: 20px auto 40px; background: var(--card); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 20px; padding: 22px clamp(16px, 4vw, 30px); }
.page .content h1 { font-size: clamp(1.7rem, 5vw, 2.3rem); margin-bottom: 12px; }
.page .content h2 { margin: 24px 0 8px; font-size: 1.2rem; }
.page .content li { margin-bottom: 6px; }
.page .content .bn { margin: 22px auto; }
.note { background: var(--card-2); border-left: 5px solid var(--orange); padding: 10px 14px; border-radius: 0 12px 12px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
