@font-face { font-family: 'Courier Prime'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/CourierPrime-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Courier Prime'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/CourierPrime-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Courier Prime'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/CourierPrime-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Courier Prime'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/CourierPrime-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --bg: #121212; --fg: #f2f2f2; --muted: #a0a0a0; --line: #2a2a2c; --line2: #3a3a3c; --card: #1c1c1e; --raised: #242426;
  --radius: 18px; --ease: cubic-bezier(.2,.7,.2,1);
  --sans: 'Courier Prime', 'Courier New', Courier, ui-monospace, Menlo, monospace;
  --accent: var(--sans);
  color-scheme: dark;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body { font-family: var(--sans); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
.wrap {
  max-width: 480px; margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 28px) 24px calc(env(safe-area-inset-bottom) + 32px);
  display: flex; flex-direction: column; gap: 28px;
}
.accent { font-family: var(--accent); letter-spacing: .16em; text-transform: uppercase; font-size: 12px; font-weight: 400; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.row-between { display: flex; justify-content: space-between; align-items: baseline; }

.brand { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.brand img { height: 24px; width: auto; display: block; }
.brand { gap: 10px; }
@media (max-width: 359px) { .brand img { height: 20px; } .navbtn { padding: 7px 9px; } }
.hero h1 { font-size: 32px; line-height: 1.15; font-weight: 700; letter-spacing: -.01em; margin: 8px 0 8px; }
.hero p { margin: 0; }

.field { display: flex; flex-direction: column; gap: 12px; }
.label { color: var(--muted); }

.seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.seg button, .chips button {
  appearance: none; border: 1px solid var(--line2); background: transparent; border-radius: 999px;
  padding: 11px 14px; font-size: 15px; font-weight: 400; color: var(--muted);
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .15s var(--ease);
}
.seg button:active, .chips button:active { transform: scale(.97); }
.seg button[aria-checked="true"], .chips button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips button { flex: 1; }

.duration { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(to right, var(--fg) var(--p, 20%), var(--line2) var(--p, 20%)); border-radius: 2px; }
input[type=range]::-moz-range-track { height: 2px; background: var(--line2); }
input[type=range]::-moz-range-progress { height: 2px; background: var(--fg); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -11px; border-radius: 50%; background: var(--fg); box-shadow: 0 0 0 6px rgba(255,255,255,.08); transition: box-shadow .2s; }
input[type=range]:active::-webkit-slider-thumb { box-shadow: 0 0 0 10px rgba(255,255,255,.12); }
input[type=range]::-moz-range-thumb { width: 24px; height: 24px; border: 0; border-radius: 50%; background: var(--fg); }

.advanced { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.advanced summary { list-style: none; cursor: pointer; padding: 16px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 400; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary::after { content: ''; width: 8px; height: 8px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); transition: transform .3s var(--ease); margin-left: 4px; flex: none; }
.advanced[open] summary::after { transform: rotate(-135deg); }
.advanced summary > span:first-child { white-space: nowrap; }
.summary-hint { font-size: 13px; font-weight: 400; margin-left: auto; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adv-body { display: flex; flex-direction: column; gap: 22px; padding: 4px 0 24px; animation: rise .35s var(--ease); }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.knob { width: 48px; height: 28px; border-radius: 999px; background: var(--line2); position: relative; transition: background .25s var(--ease); flex: none; }
.knob::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--muted); transition: transform .25s var(--ease), background .25s; }
.switch input:checked + .knob { background: var(--fg); }
.switch input:checked + .knob::after { transform: translateX(20px); background: var(--bg); }
.switch input:focus-visible + .knob { outline: 2px solid var(--fg); outline-offset: 3px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.select { display: flex; flex-direction: column; gap: 8px; }
.select select, .select input {
  appearance: none; -webkit-appearance: none; width: 100%; background: transparent; border: 1px solid var(--line2); border-radius: 12px;
  padding: 12px 14px; font-size: 16px; outline: none; transition: border-color .2s;
}
.select select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.select input { text-transform: uppercase; letter-spacing: .08em; }
.select select:focus, .select input:focus { border-color: var(--fg); }
option { background: #111; }

.places { position: relative; border: 1px solid var(--line2); border-radius: var(--radius); }
.place { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 100px 12px 18px; }
.place + .swap + .place { border-top: 1px solid var(--line); }
.place input {
  appearance: none; -webkit-appearance: none; border: 0; background: transparent; outline: none; padding: 2px 0;
  font-size: 18px; font-weight: 700; width: 100%; color: var(--fg);
}
.place input::placeholder { color: #555; font-weight: 400; }
.place input::-webkit-search-cancel-button { display: none; }
.place.set input { letter-spacing: .02em; }
.clear { position: absolute; right: 12px; bottom: 12px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--line); color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.swap {
  position: absolute; right: 58px; top: 50%; transform: translateY(-50%); z-index: 2; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line2); background: var(--bg); color: var(--muted); font-size: 16px; cursor: pointer; transition: transform .3s var(--ease), color .2s;
}
.swap:active { transform: translateY(-50%) rotate(180deg); color: var(--fg); }
.suggest {
  list-style: none; margin: 0; padding: 6px; position: absolute; left: -1px; right: -1px; top: 100%; z-index: 10;
  background: var(--raised); border: 1px solid var(--line2); border-radius: 14px; box-shadow: 0 18px 40px rgba(0,0,0,.55);
  animation: rise .2s var(--ease); max-height: 50vh; overflow-y: auto;
}
.suggest li { padding: 10px 12px; border-radius: 10px; cursor: pointer; display: flex; flex-direction: column; gap: 1px; }
.suggest li[aria-selected="true"], .suggest li:active { background: var(--line); }
.suggest .s-main { font-weight: 700; font-size: 15px; }
.suggest .s-main b { letter-spacing: .04em; margin-right: 8px; }
.suggest .s-sub { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest .s-empty { color: var(--muted); cursor: default; font-size: 14px; }
.warn { list-style: none; margin: -6px 0 0; padding: 12px 14px; border: 1px dashed var(--line2); border-radius: 12px; display: flex; flex-direction: column; gap: 4px; color: #c9c9c9; font-size: 13px; }
.warn li::before { content: '! '; font-weight: 700; color: var(--fg); }

.primary {
  appearance: none; border: 0; border-radius: 999px; background: var(--fg); color: var(--bg);
  padding: 18px 24px; font-size: 17px; font-weight: 700; letter-spacing: -.01em; cursor: pointer;
  transition: transform .15s var(--ease), opacity .2s;
}
.primary:active { transform: scale(.98); }
.primary:disabled { opacity: .4; }
.msg { margin: -16px 0 0; min-height: 0; text-align: center; color: var(--muted); font-size: 14px; }
.msg:empty { display: none; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 20px 20px; display: flex; flex-direction: column; gap: 22px; }
.card.show { animation: rise .5s var(--ease); }
.route { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.end { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.end.right { text-align: right; align-items: flex-end; }
.icao { font-family: var(--accent); font-size: 32px; font-weight: 700; letter-spacing: .04em; line-height: 1.2; }
.city { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.path { display: flex; align-items: center; gap: 6px; color: var(--fg); padding-top: 14px; }
.path svg { width: 20px; height: 20px; transform: rotate(90deg); }
.path .dash { width: 18px; border-top: 1.5px dashed var(--line2); }
.card.show .path svg { animation: fly 1.1s var(--ease); }
.stats { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats > div { display: flex; flex-direction: column; padding: 14px 0; }
.stats > div + div { border-left: 1px solid var(--line); padding-left: 16px; }
.stat { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.map { height: 200px; border-radius: 12px; overflow: hidden; background: #1a1a1a; }
.map:empty { display: none; }
.leaflet-container { background: #1a1a1a; font-family: var(--sans); }
.leaflet-control-attribution { background: rgba(0,0,0,.6) !important; color: #666 !important; font-size: 9px !important; }
.leaflet-control-attribution a { color: #888 !important; }
.details { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.details dt { font-weight: 400; font-size: 15px; }
.details dd { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: 10px; }
.ghost {
  flex: 1; appearance: none; text-align: center; text-decoration: none; border: 1px solid var(--line2); background: transparent;
  border-radius: 999px; padding: 12px; font-size: 14px; font-weight: 400; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s, border-color .2s;
}
.ghost[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.foot { text-align: center; line-height: 1.7; padding-top: 8px; }
.foot a { text-decoration: none; border-bottom: 1px solid var(--line2); }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fly { from { opacity: 0; transform: rotate(90deg) translateY(10px); } to { opacity: 1; transform: rotate(90deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (min-width: 560px) { .wrap { padding-top: 64px; } .hero h1 { font-size: 38px; } }

/* ---------- Navegación ---------- */
.brand { justify-content: space-between; }
.home { display: block; line-height: 0; }
.nav { display: flex; gap: 6px; }
.navbtn {
  appearance: none; background: transparent; border: 1px solid var(--line2); border-radius: 999px; color: var(--muted);
  padding: 7px 11px; font: inherit; font-size: 12px; letter-spacing: .06em; white-space: nowrap; text-transform: uppercase; text-decoration: none; cursor: pointer;
  transition: color .2s, border-color .2s, background .2s; position: relative;
}
.navbtn[aria-current="page"] { color: var(--bg); background: var(--fg); border-color: var(--fg); }
.navbtn.on::after { content: ''; position: absolute; top: 4px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--fg); }
.navbtn[aria-current="page"].on::after { background: var(--bg); }
.view { display: flex; flex-direction: column; gap: 28px; }
.view[hidden] { display: none !important; }
.view.enter { animation: rise .35s var(--ease); }

.linkbtn { appearance: none; background: none; border: 0; color: var(--muted); font: inherit; font-size: 14px; padding: 6px; text-align: center; cursor: pointer; text-decoration: none; }
.linkbtn:active { color: var(--fg); }
.as-btn { display: block; text-align: center; text-decoration: none; }

/* ---------- Log ---------- */
.empty { display: flex; flex-direction: column; gap: 18px; padding: 28px 0; border-top: 1px solid var(--line); }
.empty p { margin: 0; }
.empty .big { font-size: 20px; font-weight: 700; }
#logBody { display: flex; flex-direction: column; gap: 28px; }
#logBody[hidden] { display: none; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kpis > div { display: flex; flex-direction: column; padding: 14px 0 14px 12px; }
.kpis > div:nth-child(3n+1) { padding-left: 0; }
.kpis > div:not(:nth-child(3n+1)) { border-left: 1px solid var(--line); }
.kpis > div:nth-child(n+4) { border-top: 1px solid var(--line); }
.log-map { height: 240px; }
.passport { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.passport li { border: 1px solid var(--line2); border-radius: 12px; padding: 10px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.passport .flag { font-size: 24px; line-height: 1.1; }
.passport .cc { font-size: 11px; letter-spacing: .14em; color: var(--muted); }
.flights { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.flights li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 0; border-top: 1px solid var(--line); animation: rise .3s var(--ease); }
.flights li:last-child { border-bottom: 1px solid var(--line); }
.f-route { font-weight: 700; font-size: 18px; letter-spacing: .04em; }
.f-date { color: var(--muted); font-size: 12px; text-align: right; align-self: center; }
.f-meta { color: var(--muted); font-size: 13px; }
.f-notes { grid-column: 1 / -1; font-size: 13px; color: #c9c9c9; }
.f-del { appearance: none; background: none; border: 0; color: #666; font: inherit; font-size: 12px; padding: 0; cursor: pointer; justify-self: end; }
.f-del:active { color: var(--fg); }

/* ---------- Hoja inferior (dialog) ---------- */
.sheet {
  border: 1px solid var(--line2); border-bottom: 0; border-radius: 22px 22px 0 0; background: var(--card); color: var(--fg);
  width: 100%; max-width: 480px; margin: auto auto 0; padding: 26px 24px calc(env(safe-area-inset-bottom) + 24px);
  max-height: 92vh; overflow-y: auto;
}
.sheet[open] { animation: sheetUp .35s var(--ease); }
.sheet::backdrop { background: rgba(0,0,0,.7); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.sheet-x { position: absolute; top: 14px; right: 14px; margin: 0; }
.sheet-x button { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--line); color: var(--muted); font-size: 18px; cursor: pointer; }
#sheetBody { display: flex; flex-direction: column; gap: 18px; }
#sheetBody h2 { margin: 0; font-size: 22px; font-weight: 700; padding-right: 36px; }
#sheetBody p { margin: 0; }
.sheet-route { font-size: 26px; font-weight: 700; letter-spacing: .04em; }
.sheet-form { display: flex; flex-direction: column; gap: 14px; }
.input { display: flex; flex-direction: column; gap: 6px; }
.input input, .input textarea {
  appearance: none; -webkit-appearance: none; background: transparent; border: 1px solid var(--line2); border-radius: 12px; padding: 12px 14px;
  font: inherit; font-size: 16px; color: var(--fg); outline: none; width: 100%; transition: border-color .2s;
}
.input textarea { resize: none; min-height: 72px; }
.input input:focus, .input textarea:focus { border-color: var(--fg); }
.input input[type=date] { min-height: 46px; }
.form-err { color: #ff8a80; font-size: 14px; min-height: 0; }
.form-err:empty { display: none; }
.form-ok { color: var(--fg); font-size: 14px; border: 1px dashed var(--line2); border-radius: 12px; padding: 12px 14px; }
.form-ok:empty { display: none; }
.row-actions { display: flex; flex-direction: column; gap: 6px; }
.primary[aria-busy="true"] { opacity: .6; }

.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 24px); transform: translateX(-50%); z-index: 50;
  background: var(--fg); color: var(--bg); border-radius: 999px; padding: 12px 20px; font-size: 14px; font-weight: 700; white-space: nowrap;
  animation: rise .3s var(--ease); box-shadow: 0 10px 30px rgba(0,0,0,.6);
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Deslizar para borrar ---------- */
.flights li.f-item { display: block; padding: 0; position: relative; overflow: hidden; touch-action: pan-y; }
.f-swipe {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 0; background: var(--bg); position: relative; z-index: 1;
  transition: transform .28s var(--ease); will-change: transform; -webkit-user-select: none; user-select: none;
}
.f-action {
  position: absolute; top: 0; right: 0; bottom: 0; width: 96px; border: 0; background: #e5383b; color: #fff;
  font: inherit; font-weight: 700; font-size: 14px; letter-spacing: .04em; cursor: pointer; opacity: 0; transition: opacity .2s;
}
.f-item.is-open .f-action, .f-item:has(.f-swipe[style*="translate"]) .f-action { opacity: 1; }
.f-item.removing { animation: rowOut .26s var(--ease) forwards; }
.f-del {
  border: 1px solid var(--line2) !important; border-radius: 999px; padding: 5px 12px !important; color: var(--muted) !important; align-self: start;
}
.f-del:hover, .f-del:focus-visible { color: var(--fg) !important; border-color: var(--fg) !important; outline: none; }
.f-action:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
@media (hover: none) and (pointer: coarse) { .f-del { opacity: .75; } }
.toast { display: flex; align-items: center; gap: 14px; }
.toast-btn { appearance: none; border: 0; background: none; color: var(--bg); font: inherit; font-weight: 700; text-decoration: underline; padding: 0; cursor: pointer; }
@keyframes rowOut { to { opacity: 0; transform: translateX(-30px); } }

/* ---------- Tours ---------- */
.back { align-self: flex-start; padding: 0; text-align: left; }
.kicker { color: var(--muted); }
.t-filter { margin-top: -8px; }
.tours { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.tcard { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; overflow: hidden; animation: rise .4s var(--ease) both; transition: border-color .2s, transform .15s var(--ease); }
.tcard:active { transform: scale(.99); }
.tcard:hover { border-color: var(--line2); }
.tcard.done { border-color: var(--line2); }
.tcard h2 { margin: 0; font-size: 21px; line-height: 1.2; font-weight: 700; padding-right: 64px; }
.tcard p { margin: 0; font-size: 14px; color: var(--muted); padding-right: 40px; }
.tcard .kicker { padding-right: 70px; }
.tcard .thumb { position: absolute; top: 12px; right: 10px; width: 66px; height: 66px; }
.tcard .thumb .stamp-svg { width: 100%; height: 100%; }
.chain { font-size: 12px; letter-spacing: .08em; color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chain b { color: var(--fg); font-weight: 400; }
.chain i { font-style: normal; color: #3a3a3a; padding: 0 2px; }
.prog { display: flex; align-items: center; gap: 10px; }
.segs { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; }
.segs span { height: 6px; border-radius: 2px; background: var(--line2); }
.segs span.on { background: var(--fg); }
.segs span.next { background: transparent; box-shadow: inset 0 0 0 1px var(--fg); animation: blink 1.6s steps(2, jump-none) infinite; }
.prog .n { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.tcard .status { font-size: 12px; color: var(--muted); }
.tcard .status b { color: var(--fg); font-weight: 400; }
@keyframes blink { 50% { opacity: .35; } }
.tcard.new { border: 1px dashed var(--line2); background: transparent; }
.tcard.new h2 { padding-right: 0; }
.tcard.new .plus { position: absolute; right: 18px; top: 16px; font-size: 26px; line-height: 1; color: var(--muted); }

/* Detalle */
.tkpis { grid-template-columns: repeat(3, 1fr); }
.tour-map { height: 240px; }
.next-card .badge { align-self: flex-start; border: 1px solid var(--fg); border-radius: 999px; padding: 3px 10px; font-size: 11px; letter-spacing: .16em; }
.next-card .note { margin: -6px 0 0; font-size: 14px; color: #c9c9c9; }
.next-card .row-actions { gap: 4px; }
.legs { list-style: none; margin: 0; padding: 0; counter-reset: leg; }
.legs li { display: grid; grid-template-columns: 34px 1fr auto; gap: 2px 10px; padding: 14px 0; border-top: 1px solid var(--line); align-items: baseline; }
.legs li:last-child { border-bottom: 1px solid var(--line); }
.legs .no { font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.legs .r { font-weight: 700; font-size: 17px; letter-spacing: .04em; }
.legs .st { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }
.legs .m, .legs .why { grid-column: 2 / -1; font-size: 13px; color: var(--muted); }
.legs .why { color: #9a9a9a; font-size: 12px; line-height: 1.45; }
.legs li.ok .no { color: var(--fg); }
.legs li.ok .r::after { content: ' ✓'; font-weight: 400; }
.legs li.cur { background: linear-gradient(90deg, rgba(255,255,255,.05), transparent 70%); }
.legs li.cur .no { color: var(--fg); }
.legs li.cur .st { color: var(--bg); background: var(--fg); border-radius: 999px; padding: 2px 8px; letter-spacing: .1em; }
.legs li.todo .r { color: #777; }
.stamp-goal { display: flex; align-items: center; gap: 16px; border: 1px dashed var(--line2); border-radius: var(--radius); padding: 14px 16px; }
.stamp-goal .stamp-svg { width: 84px; height: 84px; flex: none; }
.stamp-goal p { margin: 0; font-size: 14px; color: var(--muted); }
.stamp-goal p b { color: var(--fg); }

/* Pasaporte: sellos */
.stamps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stamps li { border: 1px solid var(--line); border-radius: 14px; padding: 14px 10px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.stamps li.got { border-color: var(--line2); background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.04), transparent 70%); }
.stamps .stamp-svg { width: 118px; height: 118px; }
.stamps li.got .stamp-svg { animation: thump .5s var(--ease) both; }
.stamps .sn { font-size: 13px; font-weight: 700; line-height: 1.25; }
.stamps .sd { font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.stamps li:not(.got) .sn { color: #777; }
@keyframes thump { 0% { transform: scale(1.35); opacity: 0; } 60% { transform: scale(.96); opacity: 1; } 100% { transform: scale(1); } }
.f-tag { grid-column: 1 / -1; justify-self: start; font-size: 11px; letter-spacing: .08em; border: 1px solid var(--line2); border-radius: 999px; padding: 2px 9px; color: #c9c9c9; margin-top: 4px; }

/* Tour a medida */
.chips.etapas button { flex: 1; }
.gen-legs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.gen-legs li { display: grid; grid-template-columns: 34px 1fr auto; gap: 0 10px; padding: 10px 0; border-top: 1px solid var(--line); align-items: baseline; }
.gen-legs .no { font-size: 12px; color: var(--muted); }
.gen-legs .r { font-weight: 700; letter-spacing: .04em; }
.gen-legs .st { font-size: 12px; color: var(--muted); }
.gen-legs .m { grid-column: 2 / -1; font-size: 12px; color: var(--muted); }



.t-ac { gap: 8px; }
.t-ac .seg { grid-template-columns: repeat(2, 1fr); }
.t-count { margin: -6px 0 -4px; letter-spacing: .04em; }
.t-also { display: block; margin: 8px 0 -2px; }
.fit { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 2px; }
.fit span { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--line2); border-radius: 999px; padding: 1px 8px; color: #8a8a8a; }
.fit span.sel { border-color: var(--fg); color: var(--fg); }
.fit em { font-style: normal; font-size: 11px; color: #ffd166; letter-spacing: .04em; margin-left: 2px; }
.air { grid-column: 2 / -1; font-size: 12px; color: #c9c9c9; letter-spacing: .04em; }
.air b { color: var(--fg); }
.next-card .air { margin: -6px 0 0; display: block; }
.aflag { grid-column: 2 / -1; display: block; font-size: 12px; line-height: 1.45; color: #ffd166; }
.aflag.info { color: #8ecae6; }
.next-card .aflag { margin-top: -4px; }
.excl { border: 1px dashed var(--line2); border-radius: var(--radius); padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; }
.excl ul { margin: 0; padding-left: 16px; font-size: 12px; color: var(--muted); line-height: 1.5; }

/* Sellos (SVG) */

.stamp-svg text { fill: currentColor; stroke: none; font-family: 'Courier Prime', monospace; font-weight: 700; }
.stamp-svg .arc { font-size: 15px; letter-spacing: .14em; }
.stamp-svg .t { font-size: 15px; letter-spacing: .12em; }
.stamp-svg .lbl { font-size: 17px; letter-spacing: .22em; }
.stamp-svg .lbl.dim { font-size: 13px; }
.stamp-svg .frac { font-size: 40px; letter-spacing: .02em; }
.stamp-svg .cut { stroke: var(--bg, #121212); }
.stamp-svg .cutfill { fill: var(--bg, #121212); }

.tcard h2 a { color: inherit; text-decoration: none; }
.tcard h2 a::after { content: ''; position: absolute; inset: 0; }
.tcard .thumb { pointer-events: none; }
.done-card { gap: 16px; }
.stamp-goal.plain { border: 0; padding: 0; }
.stamp-goal.plain .stamp-svg { width: 110px; height: 110px; }
.celebrate { display: flex; justify-content: center; padding: 6px 0 0; }
.celebrate .stamp-svg { width: 170px; height: 170px; animation: thump .6s var(--ease) both; }
.stamps .st-link { display: contents; color: inherit; text-decoration: none; }
.plain-link { text-decoration: none; }
#stampEmpty a { color: var(--fg); }
.t-attr { text-align: center; }
.t-attr a { text-decoration: none; border-bottom: 1px solid var(--line2); }
.tt.leaflet-tooltip { background: var(--bg); color: var(--fg); border: 1px solid var(--line2); font: 700 11px 'Courier Prime', monospace; letter-spacing: .08em; padding: 2px 6px; box-shadow: none; }
.tt.leaflet-tooltip::before { display: none; }
.seg button:disabled { cursor: default; }

/* ---------- Menú (móvil) / nav compacta (escritorio) ---------- */
.brand { position: relative; }
.menubtn { display: inline-flex; align-items: center; gap: 8px; color: var(--fg); }
.menubtn[aria-expanded="true"] { background: var(--raised); border-color: var(--muted); }
.burger { display: inline-flex; flex-direction: column; gap: 3px; width: 14px; }
.burger i { display: block; height: 2px; background: currentColor; border-radius: 1px; transition: transform .25s var(--ease), opacity .2s; }
.menubtn[aria-expanded="true"] .burger i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menubtn[aria-expanded="true"] .burger i:nth-child(2) { opacity: 0; }
.menubtn[aria-expanded="true"] .burger i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
.menubtn.on::after { top: 2px; right: 2px; }
@media (max-width: 639px) {
  .nav { display: none; position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; min-width: 220px; flex-direction: column; gap: 2px; padding: 6px;
    background: var(--raised); border: 1px solid var(--line2); border-radius: 14px; box-shadow: 0 18px 40px rgba(0,0,0,.55); animation: rise .2s var(--ease); }
  .nav.open { display: flex; }
  .nav .navbtn { border: 0; border-radius: 10px; padding: 13px 14px; font-size: 14px; text-align: left; color: var(--fg); }
  .nav .navbtn:active { background: var(--line); }
  .nav .navbtn[aria-current="page"] { background: var(--fg); color: var(--bg); }
  .nav .navbtn.on::after { top: 50%; right: 14px; transform: translateY(-50%); }
}
@media (min-width: 640px) { .menubtn { display: none; } }
