:root {
  color-scheme: light;
  --paper: #f8f5ed;
  --white: #fffcf6;
  --ink: #232c31;
  --subtle: #5f655f;
  --line: #e4ddd0;
  --accent: #ad412d;
  --accent-hover: #963723;
  --tint: #f8e7dc;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font: 15px/1.5 var(--sans);
  background: var(--paper);
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden], dialog:not([open]) { display: none !important; }
body { margin: 0; min-width: 280px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid #167683;
  outline-offset: 3px;
}
h1, h2, p, figure { margin: 0; }
.shell { width: min(1660px, calc(100% - 80px)); margin-inline: auto; }
.sprites { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65;
  stroke-linecap: round; stroke-linejoin: round;
}
.topbar { border-bottom: 1px solid var(--line); }
.topbar-inner, .topbar-right, .brand { display: flex; align-items: center; }
.topbar-inner { justify-content: space-between; min-height: 66px; gap: 20px; }
.brand { gap: 12px; }
.brand-mark {
  display: grid; place-items: center; width: 41px; height: 41px; border: 1px solid #e4c7b7;
  border-radius: 12px; background: #f5e7dc; color: var(--accent);
}
.brand-mark .icon { width: 24px; height: 24px; stroke-width: 1.2; }
.brand strong { display: block; font: 700 18px/1.1 var(--serif); }
.brand span, .private-label, .eyebrow, .map-label, .page-footer { letter-spacing: .13em; }
.brand span { display: block; margin-top: 6px; color: var(--subtle); font-size: 9px; font-weight: 700; }
.topbar-right { gap: 23px; }
.private-label {
  display: inline-flex; align-items: center; gap: 8px; color: #555e56;
  font-size: 11px; font-weight: 630; letter-spacing: .02em;
}
.private-label span, .eyebrow span, .map-label span { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.private-label span { background: #648d73; box-shadow: 0 0 0 3px #648d7322; }
.button {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 43px;
  border: 1px solid transparent; border-radius: 10px; padding: 9px 15px;
  font-size: 13px; font-weight: 700; transition: background-color .18s, border-color .18s;
}
.primary { background: var(--accent); color: #fffdf9; }
.primary:hover { background: var(--accent-hover); }
.secondary { border: 1px solid var(--line); background: var(--white); color: var(--ink); }
.secondary:hover { background: #f3ecdf; }
.intro { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 27px 0 21px; }
.eyebrow { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 750; color: var(--accent); }
.eyebrow span { background: #c95c41; }
.intro h1 {
  font: 400 clamp(42px, 5.5vw, 74px)/1.03 var(--serif);
  letter-spacing: -.072em; margin: 5px 0 7px;
}
.intro h1 em { color: var(--accent); font-weight: 400; padding-right: .11em; }
.subtitle { color: var(--subtle); font-size: clamp(14px, 1.35vw, 17px); }
.stats {
  display: grid; grid-template-columns: repeat(3, minmax(65px, 1fr)); align-items: center;
  border-block: 1px solid var(--line); padding: 10px 0; min-width: 250px;
}
.stats div { padding: 3px 15px; text-align: center; }
.stats div + div { border-left: 1px solid var(--line); }
.stats strong { display: block; font: 400 33px/1.1 var(--serif); }
.stats span { display: block; color: var(--subtle); font-size: 11px; margin-top: 4px; }
.dashboard { display: grid; grid-template-columns: minmax(0, 1fr) clamp(266px, 23vw, 350px); gap: 16px; align-items: stretch; }
.map-card, .stops-card { height: clamp(570px, calc(100svh - 258px), 950px); border-radius: 20px; overflow: hidden; }
.map-card {
  position: relative; isolation: isolate; color: #f5f6ee; background:
    radial-gradient(ellipse at 49% 55%, #152e4a 2%, #09162a 59%, #050d1b 92%);
  border: 1px solid #16394b;
}
#earth, #globe, .pins { position: absolute; inset: 0; width: 100%; height: 100%; }
#earth { pointer-events: none; }
.map-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, #050d1bce, #050d1b00 112px, #050d1b00 calc(100% - 72px), #050d1bd8);
}
.pins { z-index: 1; }
.map-heading, .map-footer, .map-selector, .map-controls { z-index: 2; }
#globe:focus-visible { outline: 2px solid #a2e5e6; outline-offset: -4px; }
#globe { cursor: grab; touch-action: none; }
#globe.dragging { cursor: grabbing; }
.pins { pointer-events: none; }
.pin {
  pointer-events: auto; position: absolute; z-index: 1; left: 0; top: 0;
  display: grid; place-items: center; width: 24px; height: 24px;
  color: #32201d; background: #ffae8e; border: 2px solid #fff0df; border-radius: 50%;
  font-size: 10px; font-weight: 800; box-shadow: 0 0 0 4px #f688652e, 0 2px 9px #0005;
}
.pin:hover, .pin:focus-visible { z-index: 2; background: #fff4de; }
.base-pin { width: 27px; height: 27px; color: #482619; background: #ffb26b; box-shadow: 0 0 0 5px #f9aa583e, 0 2px 9px #0005; }
.map-heading, .map-footer { position: absolute; left: 23px; right: 23px; pointer-events: none; }
.map-heading { top: 21px; }
.map-label { display: flex; gap: 8px; align-items: center; color: #add1d9; font-size: 9px; font-weight: 750; }
.map-label span { background: #70c7c1; box-shadow: 0 0 0 3px #70c7c128; }
.map-heading h2 { margin-top: 5px; font: 400 29px/1.12 var(--serif); }
.map-controls { position: absolute; right: 18px; bottom: 44px; display: grid; gap: 6px; }
.icon-button {
  display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0;
  border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--white);
}
.icon-button:hover { background: #f3ecdf; }
.map-button { border-color: #63869c67; background: #142e44; color: #e9f6fb; }
.map-button:hover { background: #254c65; }
.map-button:focus-visible, .pin:focus-visible { outline-color: #a2e5e6; }
.map-reset { margin-top: 4px; }
.map-footer {
  bottom: 15px; display: flex; justify-content: space-between; gap: 10px;
  align-items: center; color: #d2e2e8; font-size: 10px;
}
.map-footer b { color: #f6a385; padding: 0 3px; }
.map-credit { font-size: 9px; font-weight: 700; letter-spacing: .13em; white-space: nowrap; color: #a4c2cb; }
.stops-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); }
.stops-heading { padding: 19px 17px 12px; }
.stops-heading h2 { display: flex; align-items: center; gap: 10px; font: 400 33px/1.12 var(--serif); margin-top: 6px; letter-spacing: -.045em; }
#stops-count { border-radius: 8px; padding: 4px 7px; background: #d9eaff; color: #135ab0; font: 750 10px/1 var(--sans); letter-spacing: .04em; }
#stops-count[data-kind=passport] { background: #ffe1d6; color: #a73921; }
.demo-banner { margin: 0 15px 8px; border: 1px solid #ecddca; background: #faf1e2; border-radius: 9px; padding: 8px 10px; color: #6c513e; }
.demo-banner p { font-size: 11px; }
.demo-banner strong { display: block; font-size: 12px; }
.stops-list { min-height: 0; overflow: auto; padding: 0 12px; flex: 1; scrollbar-width: thin; scrollbar-color: #d8cbb8 transparent; }
.stop-card {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 5px;
  border: 1px solid transparent; border-bottom-color: #efe9df; background: transparent;
  text-align: left; color: var(--ink); min-height: 45px;
}
.stop-card:hover { background: #f8f1e5; border-radius: 10px; border-color: #eee1ce; }
.stop-card:focus-visible { outline-offset: -3px; border-radius: 9px; }
.stop-order {
  display: grid; place-items: center; position: relative; overflow: hidden; width: 34px; height: 34px; flex: none;
  font: 750 11px/1 var(--sans); letter-spacing: .04em;
  color: #345d5d; background: #e8eeea; border-radius: 8px;
}
.base-order { background: var(--tint); color: #963e2a; }
.stop-summary { min-width: 0; flex: 1; }
.stop-name, .stop-meta { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.stop-name { font: 700 16px/1.15 var(--serif); }
.stop-meta { margin-top: 3px; color: var(--subtle); font-size: 11px; }
.mini-count { display: flex; align-items: center; gap: 4px; color: var(--subtle); font-size: 10px; }
.mini-count .icon { width: 14px; height: 14px; }
.stop-arrow { width: 16px; height: 16px; color: #756a5a; }
.stops-footer { margin: 4px 15px 10px; padding: 6px 5px 0; }
.text-button {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--accent);
  padding: 5px 3px; font-size: 13px; font-weight: 750; text-align: left;
}
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.page-footer { display: flex; justify-content: space-between; gap: 12px; color: var(--subtle); font-size: 9px; font-weight: 680; padding: 17px 0 24px; }
.empty-stops, .empty-album {
  display: grid; justify-items: center; text-align: center; gap: 7px; padding: 28px 15px;
  color: var(--subtle); background: #f8f3e9; border: 1px dashed #dfd1bb; border-radius: 11px;
}
.empty-stops { margin: 9px 7px; }
.empty-stops strong, .empty-album strong { color: var(--ink); font: 700 19px/1.2 var(--serif); }
.empty-stops p, .empty-album p { font-size: 13px; }
.empty-stops .icon, .empty-album .icon { color: var(--accent); width: 28px; height: 28px; }
.loading { padding: 13px 8px; color: var(--subtle); font-size: 13px; }
dialog {
  width: min(550px, calc(100% - 28px)); max-height: min(90dvh, 850px); overflow: auto;
  color: var(--ink); background: var(--white); border: 1px solid var(--line);
  border-radius: 17px; padding: 23px; box-shadow: 0 20px 80px #091b3870;
}
dialog::backdrop { background: #071927a8; backdrop-filter: blur(2px); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 13px; margin-bottom: 15px; }
.dialog-heading h2 { font: 400 clamp(27px, 5vw, 39px)/1.12 var(--serif); letter-spacing: -.035em; margin-top: 5px; overflow-wrap: anywhere; }
.close-button { flex: none; }
form { display: grid; gap: 13px; }
label { display: block; color: var(--ink); font-size: 13px; font-weight: 700; }
input, textarea, select {
  display: block; width: 100%; border: 1px solid #d9cfc0; background: #fffdfa; color: var(--ink);
  padding: 8px 10px; min-height: 40px; margin: 5px 0 0; border-radius: 8px; font-size: 15px; font-weight: 400;
}
textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.form-row > label { min-width: 0; }
.fields { display: grid; gap: 10px; }
.help, .optional { color: var(--subtle); font-size: 11px; font-weight: 500; }
.help { margin-top: 5px; }
.help:empty { display: none; }
.manual-toggle { padding: 4px 0 0; font-size: 11px; }
.chosen-city { border: 1px solid #cedfd7; background: #edf5ed; color: #34594b; padding: 7px 10px; border-radius: 8px; font-size: 13px; font-weight: 700; }
.city-results { display: grid; max-height: 176px; overflow: auto; }
.city-result { background: transparent; color: var(--ink); padding: 7px 8px; border: 0; border-bottom: 1px solid var(--line); text-align: left; display: grid; gap: 2px; }
.city-result:hover { background: #f7eee0; }
.city-result:focus-visible { outline-offset: -3px; }
.city-result span { color: var(--subtle); font-size: 11px; }
#stop-form-dialog { overflow-x: hidden; }
#stop-form-dialog .dialog-heading > div { min-width: 0; }
#stop-form-dialog h2, #stop-form-dialog .form-error { overflow-wrap: anywhere; }
#stop-form, #stop-form > *, #stop-form label { min-width: 0; max-width: 100%; }
#stop-form input, #stop-form select, #stop-form textarea { min-width: 0; width: 100%; max-width: 100%; }
#stop-form .chosen-city, #stop-form .city-result, #stop-type-help { overflow-wrap: anywhere; }
#stop-type-help { display: block; line-height: 1.35; }
.visit-date-control { display: flex; align-items: stretch; gap: 4px; min-width: 0; }
#stop-form .visit-date-control > #date { flex: 1; min-width: 0; width: 0; }
.visit-date-calendar {
  position: relative; flex: 0 0 34px; display: grid; place-items: center; margin-top: 5px;
  border: 1px solid #d9cfc0; border-radius: 8px; background: #fffdfa; color: #34594b;
}
.visit-date-calendar > .icon { width: 18px; height: 18px; pointer-events: none; }
#stop-form #date-calendar {
  position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; min-width: 0;
  margin: 0; padding: 0; opacity: 0; cursor: pointer; font-size: 16px;
}
#date-calendar::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; cursor: pointer; }
.visit-date-calendar:focus-within { outline: 2px solid #487a69; outline-offset: 2px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.form-error { color: #932a1b; background: #f9e7dd; padding: 8px 10px; border-radius: 8px; font-size: 13px; }
.album-dialog { width: min(880px, calc(100% - 28px)); }
.album-meta { color: var(--subtle); font-size: 13px; margin-top: 5px; }
.album-notes { white-space: pre-wrap; overflow-wrap: anywhere; padding: 0 0 0 10px; border-left: 2px solid #d8a38c; color: #505956; font-size: 14px; margin-bottom: 14px; }
.album-toolbar, .album-buttons { display: flex; align-items: center; gap: 7px; }
.album-toolbar { justify-content: space-between; margin-bottom: 11px; }
.album-buttons { flex-wrap: wrap; justify-content: flex-end; }
.album-buttons .button, .album-buttons .icon-button { min-height: 38px; }
.album-buttons .button { padding-block: 6px; }
.album-count { font-size: 12px; font-weight: 750; color: var(--subtle); }
#album-error { margin-bottom: 10px; }
.danger { color: var(--accent); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 186px), 1fr)); gap: 12px; }
.photo-card { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.open-photo { display: block; width: 100%; aspect-ratio: 4 / 3; border: 0; padding: 0; background: #eae2d4; position: relative; }
.open-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-card figcaption { display: grid; gap: 3px; padding: 5px 7px; font-size: 11px; }
.photo-card figcaption span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-memory { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #63705f; font-size: 11px; white-space: pre-wrap; }
.photo-card .icon-button { width: 32px; height: 32px; border-color: transparent; }
.photo-card .icon { width: 15px; height: 15px; }
.photo-dialog {
  width: min(1200px, calc(100% - 24px)); height: min(900px, 94dvh); max-height: 94dvh;
  padding: 12px; overflow: hidden; background: #0c1723; color: #fff9ec; border-color: #304451;
}
.photo-view { height: 100%; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 8px; }
.photo-view-toolbar, .photo-view-controls { display: flex; align-items: center; gap: 6px; }
.photo-view-toolbar { justify-content: space-between; }
#photo-position { font-size: 13px; font-variant-numeric: tabular-nums; padding-inline: 5px; }
.photo-view-controls button, .photo-nav {
  color: #fff7e5; background: #1d3041; border: 1px solid #74869a65; border-radius: 10px; min-width: 42px; min-height: 42px;
}
.photo-view-controls button:hover, .photo-nav:hover { background: #304659; }
.photo-view-controls #photo-reset { font-size: 12px; min-width: 57px; padding: 4px 7px; }
.photo-view-content { position: relative; min-height: 0; overflow: hidden; border-radius: 10px; background: #060d14; }
.photo-stage { position: absolute; inset: 0; touch-action: none; user-select: none; overflow: hidden; }
.photo-stage.is-zoomed { cursor: grab; }
.photo-stage.is-zoomed:active { cursor: grabbing; }
#full-photo { width: 100%; height: 100%; display: block; object-fit: contain; transform-origin: center; }
#photo-load-status { position: absolute; top: 50%; width: 100%; padding: 24px; text-align: center; }
.photo-nav { position: absolute; top: calc(50% - 24px); z-index: 1; width: 44px; height: 48px; background: #132436d9; }
#photo-previous { left: 10px; }
#photo-previous .icon { transform: rotate(180deg); }
#photo-next { right: 10px; }
#photo-caption { overflow-wrap: anywhere; text-align: center; font-size: 12px; max-height: 3em; overflow: auto; padding-inline: 8px; }
.photo-view-caption { min-height: 0; max-height: 18dvh; overflow: auto; text-align: center; }
#photo-description { white-space: pre-wrap; overflow-wrap: anywhere; color: #e5e0d2; font-size: 13px; padding: 7px 12px; }
@media (max-width: 380px) {
  .photo-view-controls { gap: 2px; }
  .photo-view-controls button { min-width: 32px; width: 32px; }
}
@media (max-width: 340px) {
  .photo-view-toolbar { flex-wrap: wrap; }
  .photo-view-controls { margin-left: auto; }
}
.backups-list { display: grid; gap: 9px; margin-top: 14px; }
.backup-card { display: grid; grid-template-columns: minmax(0,1fr) auto; column-gap: 10px; padding: 12px; border: 1px solid #dde2d4; border-radius: 12px; background: #fafbf5; }
.backup-card strong { font-size: 14px; }
.backup-card > span { grid-column: 1; font-size: 11px; color: #60705e; padding-top: 5px; }
.backup-card .button { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 12px; }
.restore-backup-panel { margin-top: 14px; padding: 15px; border: 1px solid #b57952; border-radius: 12px; background: #fbefe0; }
.restore-backup-panel h3 { font: 700 22px var(--serif); margin: 0 0 8px; }
#backups-dialog > .help { margin: 10px 0; }
#backups-status { margin-top: 10px; }
#photo-details-name { margin-bottom: 15px; overflow-wrap: anywhere; }
.photo-dialog:fullscreen, .photo-dialog.photo-expanded {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; inset: 0; border: 0; border-radius: 0;
  padding: max(9px, env(safe-area-inset-top, 0px)) max(9px, env(safe-area-inset-right, 0px)) max(9px, env(safe-area-inset-bottom, 0px)) max(9px, env(safe-area-inset-left, 0px));
}
@media (max-width: 760px) {
  .photo-dialog {
    position: fixed; inset: max(8px, env(safe-area-inset-top, 0px)) 6px max(8px, env(safe-area-inset-bottom, 0px));
    margin: 0; padding: 9px; width: auto; height: auto; max-height: none;
  }
  .photo-dialog:fullscreen, .photo-dialog.photo-expanded {
    inset: 0; width: 100vw; height: 100dvh;
    padding: max(9px, env(safe-area-inset-top, 0px)) max(9px, env(safe-area-inset-right, 0px)) max(9px, env(safe-area-inset-bottom, 0px)) max(9px, env(safe-area-inset-left, 0px));
  }
  .photo-view-controls { gap: 4px; }
  .photo-view-controls button { min-width: 38px; min-height: 44px; }
  .photo-view-controls #photo-reset { min-width: 49px; }
}
.toast { position: fixed; right: 16px; bottom: 16px; z-index: 10; padding: 9px 13px; background: #233935; color: #fff; border-radius: 9px; font-size: 13px; }

.map-selector { position: absolute; top: 17px; right: 18px; width: 194px; }
.continent-label { color: #d6e4ef; font-size: 10px; font-weight: 680; margin: 0 0 5px; }
.continent-picker > summary {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px; min-height: 38px;
  list-style: none; cursor: pointer; color: #f6f8f8; background: #101e32ee;
  border: 1px solid #7695b16b; border-radius: 9px; font-size: 12px; font-weight: 700;
}
.continent-picker > summary::-webkit-details-marker { display: none; }
.continent-picker > summary .icon { flex: none; width: 16px; height: 16px; color: #add4e4; }
.continent-chevron { margin-left: auto; }
.continent-picker[open] .continent-chevron { transform: rotate(180deg); }
.continent-options {
  display: grid; gap: 2px; padding: 4px; margin-top: 4px; max-height: 220px;
  overflow: auto; overscroll-behavior: contain; background: #101e32ee;
  border: 1px solid #7695b16b; border-radius: 9px;
}
.continent-options button {
  min-height: 34px; padding: 6px 8px; text-align: left; border: 0; border-radius: 6px;
  color: #edf6ff; background: transparent; font-size: 12px;
}
.continent-options button:hover { background: #e4f1ff20; }
.continent-options button[aria-current="true"] { background: #2d4e6d; font-weight: 750; }
.continent-picker :focus-visible { outline: 2px solid #a2e5e6; outline-offset: -2px; }
.pin-tooltip {
  position: absolute; visibility: hidden; opacity: 0; pointer-events: none;
  left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  color: #f7fafc; background: #0a1b2bf5; border: 1px solid #809db375; border-radius: 8px;
  padding: 5px; min-width: max-content; max-width: 142px; box-shadow: 0 5px 20px #0007;
}
.pin-tooltip strong { display: block; max-width: 135px; padding: 3px 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pin-tooltip img { display: block; width: 124px; height: 72px; object-fit: cover; border-radius: 5px; }
.pin:hover .pin-tooltip, .pin:focus-visible .pin-tooltip { visibility: visible; opacity: 1; }
.sidebar-subtitle { margin-top: 4px; color: var(--subtle); font-size: 11px; }
.demo-banner .text-button { padding: 4px 0 0; font-size: 11px; }
.region-group { margin: 1px 0 9px; }
.region-group summary {
  list-style: none; display: flex; align-items: center; gap: 7px; cursor: pointer;
  min-height: 32px; padding: 4px 6px; border-radius: 6px;
}
.region-group summary::-webkit-details-marker { display: none; }
.region-group summary:focus-visible { outline: 2px solid #167683; outline-offset: -2px; }
.region-group > summary { color: #214d53; background: #e7efeb; font-weight: 760; font-size: 12px; }
.country-group > summary { font-size: 11px; font-weight: 750; color: #a73921; }
.country-group > summary:hover { background: #f7f1e8; }
.region-group summary .icon { width: 13px; height: 13px; }
.region-group details:not([open]) > summary .icon, .region-group:not([open]) > summary .icon { transform: rotate(-90deg); }
.group-title { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.group-count { flex: none; min-width: 19px; text-align: center; font-size: 9px; color: var(--subtle); }
.country-group { margin: 3px 0 0 6px; border-left: 1px solid #e8dfd2; padding-left: 4px; }
.country-body { padding-left: 4px; }
.country-actions { display: flex; gap: 4px; padding: 4px 0 2px; justify-content: end; }
.country-actions .icon-button { width: 29px; height: 26px; border-radius: 6px; }
.country-actions .icon { width: 13px; height: 13px; }
.stop-order img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.base-order img { border: 2px solid #d77d61; border-radius: 8px; }
#album-cover { margin: 0 0 14px; }
.cover-photo {
  position: relative; display: block; width: 100%; height: clamp(150px, 28vh, 290px);
  overflow: hidden; padding: 0; border: 0; border-radius: 10px; background: #eae2d4;
}
.cover-photo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.cover-photo > span {
  position: absolute; bottom: 10px; left: 10px; color: #fff9ed; background: #0b192bc9;
  border-radius: 5px; padding: 4px 6px; font-size: 9px; font-weight: 780; letter-spacing: .075em;
}
.photo-guide { color: var(--subtle); margin: 0 0 9px; font-size: 12px; }
.photo-actions { display: flex; gap: 4px; }
.photo-name { display: block; }
.photo-actions .selected-cover { color: #9b481f; opacity: 1; cursor: default; background: #f8e7dc; }
.photo-actions .selected-cover .icon { fill: #ce7939; }
#film-preview { display: block; width: 100%; max-height: 52vh; background: #091728; border-radius: 8px; }
#film-preview-panel { margin: 14px 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
#film-preview-panel h3 { font: 700 19px var(--serif); }
.film-player { margin-top: 8px; overflow: hidden; border-radius: 9px; background: #0a1019; color: #fff; }
#film-canvas { display: block; max-width: 100%; max-height: 46vh; height: auto; margin: auto; object-fit: contain; }
.film-transport { padding: 4px 8px 7px; background: #151f2d; }
.film-transport-buttons, .film-preview-sound { display: flex; align-items: center; gap: 2px; }
.film-transport-buttons { flex-wrap: wrap; }
.film-player-button { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: inherit; }
.film-player-button:hover { background: #ffffff20; }
.film-player-button:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
#film-time { margin-right: auto; font-variant-numeric: tabular-nums; font-size: 12px; }
#film-seek, #film-preview-volume { min-height: 24px; margin: 0; padding: 0; accent-color: #ffc292; }
#film-preview-volume { width: clamp(46px, 10vw, 84px); }
.film-player:is(:fullscreen, .film-expanded) {
  display: grid; grid-template-rows: minmax(0, 1fr) auto; width: 100%; height: 100%; margin: 0; border-radius: 0;
}
.film-player.film-expanded { position: fixed; inset: 0; z-index: 1; }
.film-player:is(:fullscreen, .film-expanded) #film-canvas { width: 100%; height: 100%; max-height: none; }
.film-player:is(:fullscreen, .film-expanded) .film-transport {
  padding: 4px max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}
.film-preview-actions { flex-wrap: wrap; }
#film-progress { display: block; width: 100%; accent-color: var(--accent); }
#film-error, #film-status { margin-top: 8px; }
#download-film { text-decoration: none; }

@media (max-width: 1110px) {
  .shell { width: calc(100% - 56px); }
}
@media (max-width: 900px) {
  .dashboard { grid-template-columns: minmax(0, 1fr) minmax(242px, 34%); gap: 12px; }
  .map-card, .stops-card { height: 565px; }
  .stops-heading { padding-inline: 16px; }
  .demo-banner { margin-inline: 16px; }
  .stops-list { padding-inline: 8px; }
}
@media (max-width: 710px) {
  .shell { width: calc(100% - 32px); }
  .topbar-inner { min-height: 66px; gap: 9px; }
  .private-label { display: none; }
  .brand { gap: 8px; }
  .brand strong { font-size: 15px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 8px; }
  .brand-mark .icon { width: 20px; height: 20px; }
  .topbar .button { padding: 8px 10px; min-height: 38px; font-size: 11px; white-space: nowrap; }
  .topbar .button .icon { width: 15px; height: 15px; }
  .intro { display: grid; gap: 14px; padding-top: 27px; padding-bottom: 18px; }
  .intro h1 { margin: 6px 0 8px; }
  .stats { width: 100%; padding-block: 5px; }
  .stats strong { font-size: 25px; }
  .stats span { margin-top: 2px; }
  .dashboard { grid-template-columns: 1fr; }
  .map-card { height: clamp(360px, 109vw, 530px); border-radius: 15px; }
  .map-heading, .map-footer { left: 13px; right: 13px; }
  .map-heading { top: 13px; }
  .map-heading h2 { font-size: 20px; max-width: 145px; }
  .map-selector { top: 10px; right: 10px; width: min(158px, 45%); }
  .map-controls { right: 9px; bottom: 45px; gap: 4px; }
  .map-controls .icon-button { width: 34px; height: 34px; }
  .map-footer { bottom: 10px; font-size: 9px; }
  .map-credit { font-size: 7px; }
  .stops-card { height: auto; max-height: 550px; border-radius: 15px; }
  .stops-heading { padding-top: 16px; }
  .stops-heading h2 { font-size: 29px; }
  .stops-list { min-height: 66px; }
  .page-footer { font-size: 8px; }
}
@media (max-width: 360px) {
  .shell { width: calc(100% - 22px); }
  .brand strong { font-size: 14px; }
  .intro h1 { font-size: 40px; }
  .map-credit { display: none; }
  dialog { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}

/* Immersive atlas */
body { overflow: hidden; background: #071221; }
body > main.shell, .dashboard { display: block; width: 100%; margin: 0; }
.topbar { position: fixed; z-index: 800; inset: 20px 24px auto; border: 0; pointer-events: none; }
.topbar-inner { width: 100%; min-height: 50px; }
.brand { pointer-events: auto; padding: 12px 17px; background: #fffcf5f2; border: 1px solid #e4ddd0; border-radius: 15px; box-shadow: 0 6px 22px #0002; }
.topbar-right { pointer-events: auto; }
.private-label { color: #fff9ee; text-shadow: 0 1px 4px #000; }
.topbar-right .button { box-shadow: 0 4px 18px #0002; min-height: 46px; }
.intro { position: fixed; z-index: 700; bottom: 33px; left: 27px; padding: 0; pointer-events: none; }
.intro > div:first-child { display: none; }
.stats { min-width: 220px; border: 1px solid #f5eed635; background: #101e30dc; border-radius: 14px; backdrop-filter: blur(12px); color: #fff8e8; padding: 10px 6px; }
.stats div + div { border-color: #f5eed62b; }
.stats strong { font-size: 29px; }
.stats span { color: #d7dfe2; font-size: 10px; }
#stat-world { white-space: nowrap; font-variant-numeric: tabular-nums; }
.map-card { position: fixed; inset: 0; width: 100%; height: 100dvh; border: 0; border-radius: 0; }
.map-heading { top: 100px; left: 30px; right: auto; }
.map-heading h2 { font-size: 40px; max-width: none; }
.map-label { font-size: 9px; }
.map-selector { top: 190px; left: 28px; right: auto; width: 205px; padding: 12px; border: 1px solid #a8c0d33a; background: #0d1d32eb; border-radius: 13px; backdrop-filter: blur(14px); }
.map-selector .map-modes { display: flex; gap: 3px; margin-bottom: 12px; padding: 3px; background: #071427; border-radius: 7px; }
.map-modes button { color: #b8c9d7; padding: 7px 6px; border: 0; border-radius: 5px; background: transparent; font-size: 10px; flex: 1; }
.map-modes button.active { color: #172a32; background: #f5e9d5; font-weight: 800; }
#map-status { color: #ffdcbb; font-size: 11px; margin-top: 8px; }
.map-controls { left: 28px; right: auto; bottom: 143px; display: flex; }
.map-reset { margin-top: 0; }
.map-footer { left: 28px; bottom: 9px; right: 26px; font-size: 9px; z-index: 500; }
.map-footer > span:first-child { display: none; }
.map-credit { margin-left: auto; }
.stops-card { position: fixed; z-index: 750; right: 24px; top: 95px; width: 302px; height: auto; max-height: calc(100dvh - 121px); min-height: 270px; background: #fffcf5f5; backdrop-filter: blur(18px); box-shadow: 0 10px 40px #0003; border-radius: 20px; }
.stops-list { max-height: calc(100dvh - 310px); flex: 0 1 auto; }
.stops-heading { padding: 20px 19px 14px; }
.stops-footer { padding: 9px 6px 5px; }
.page-footer { display: none; }
#toggle-destinations { position: fixed; z-index: 850; right: 24px; bottom: 27px; display: flex; box-shadow: 0 4px 16px #0002; }
body.panel-hidden .stops-card { display: none; }
.pin { width: auto; height: 30px; display: flex; gap: 0; background: #fffbf0; border: 1px solid #f9e7cf; border-radius: 9px; color: #223340; box-shadow: 0 2px 12px #0006; overflow: visible; }
.pin b { width: 27px; display: grid; place-items: center; align-self: stretch; background: #bc5038; color: white; border-radius: 7px 0 0 7px; font-size: 11px; }
.pin-city-name { max-width: 126px; padding: 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 750; }
.base-pin b { background: #316a65; }
.pin-tooltip { min-width: 140px; }
#detail-map { position: absolute; inset: 0; z-index: 0; background: #deded6; }
#detail-map[data-style="satellite"] { background: #101c2b; }
body.detail-view .map-card::after { display: none; }
body.detail-view .map-heading { color: #233234; text-shadow: 0 1px 5px #fff; }
body.detail-view .map-label { color: #23535c; }
body.detail-view .private-label { color: #243e36; text-shadow: 0 1px 4px #fff; }
body.satellite-view .map-heading, body.satellite-view .private-label { color: #fff9ef; text-shadow: 0 1px 6px #000; }
body.satellite-view .map-label { color: #a7e1e7; }
.leaflet-control-attribution { margin-bottom: 6px !important; font: 10px var(--sans) !important; }
.map-city-label { display: flex; align-items: center; width: max-content; border: 1px solid #d6c7b5; border-radius: 8px; background: #fffdf6; color: #21323c; padding: 0; min-height: 29px; box-shadow: 0 2px 8px #0003; font: 750 12px var(--sans); white-space: nowrap; }
.map-city-label b { background: #b34c34; color: white; padding: 8px 9px; border-radius: 7px 0 0 7px; }
.map-city-label.city-base b { background: #316a65; }
.map-city-label span { padding: 0 9px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
body.detail-view .stats { margin-bottom: 10px; }
#film-form { margin: 14px 0; }
.film-fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
.film-modes {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 13px;
  border: 1px solid var(--line); border-radius: 12px; background: #eae4da;
}
.film-modes button {
  flex: 1; min-height: 42px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink); font: 700 13px var(--sans);
}
.film-modes button[aria-pressed="true"] { background: #173b3a; color: #fffdf7; }
.film-fieldset h3 { font: 700 19px var(--serif); margin-bottom: 4px; }
.film-ai {
  display: flex; flex-wrap: wrap; align-items: end; gap: 12px;
  padding: 14px; border: 1px solid #d6dfd7; border-radius: 12px; background: #eff4ec;
}
.film-ai > div:first-child { flex: 1 1 195px; }
.film-ai p { color: #516355; font-size: 13px; }
.film-target { display: flex; flex: 1 1 235px; flex-wrap: wrap; gap: 8px; }
.film-target label { flex: 1 1 100px; }
.film-target label:first-child { flex-basis: 146px; }
#start-film { margin-top: 13px; }
.film-output-settings { display: flex; flex-wrap: wrap; align-items: start; gap: 10px; margin-top: 13px; }
.film-output-settings > label { flex: 1 1 150px; min-width: 0; }
#film-audio-controls { flex: 1 1 155px; }
#film-music-start-label { margin-bottom: 8px; }
#film-volume { min-height: 20px; margin: 0; padding: 0; accent-color: var(--accent); }
.film-fade { display: flex; align-items: center; gap: 6px; }
.film-fade input { margin: 0; width: 17px; height: 17px; min-height: 0; accent-color: var(--accent); }
.film-timeline { padding: 0; margin: 8px 0; list-style: none; max-height: 42vh; overflow: auto; }
.film-clip {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 8px;
  margin-bottom: 6px; border: 1px solid var(--line); border-radius: 10px; background: #fffcf6;
}
.film-clip-name { display: flex; align-items: center; gap: 8px; flex: 2 1 175px; min-width: 0; }
.film-clip-name img { width: 46px; height: 42px; object-fit: cover; border-radius: 5px; }
.film-clip-name span { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.film-clip label { flex: 1 1 75px; font-size: 11px; }
.film-clip label + label { flex-basis: 120px; }
.film-clip input, .film-clip select { font-size: 13px; min-height: 36px; }
.film-clip-actions { display: flex; gap: 4px; align-self: end; margin-left: auto; }
.film-clip-actions button { min-width: 38px; min-height: 38px; padding: 4px; }
#film-manual-empty { padding-block: 6px; }
.film-selection { display: grid; grid-template-columns: repeat(auto-fill,minmax(92px,1fr)); gap: 8px; margin: 13px 0 6px; max-height: 235px; overflow: auto; }
.film-choice { position: relative; display: block; cursor: pointer; border: 2px solid transparent; border-radius: 9px; overflow: hidden; aspect-ratio: 4/3; background: #e5e1d9; }
.film-choice:has(input:checked) { border-color: #34685c; }
.film-choice img { width: 100%; height: 100%; object-fit: cover; display: block; }
.film-choice input { position: absolute; right: 5px; top: 5px; width: 17px; height: 17px; min-height: 0; margin: 0; accent-color: #34685c; }
.film-choice span { position: absolute; left: 4px; bottom: 4px; background: #142b31ce; color: white; border-radius: 4px; padding: 2px 5px; font-size: 10px; }

@media (max-width: 760px) {
  .topbar { inset: 12px 12px auto; }
  .brand { padding: 10px; }
  .brand strong { font-size: 14px; }
  .map-heading { top: 94px; left: 16px; }
  .map-heading h2 { font-size: 29px; }
  .map-selector { top: 160px; left: 15px; width: 178px; padding: 9px; }
  .stops-card { right: 12px; top: auto; bottom: 76px; width: min(310px,calc(100% - 24px)); max-height: 52dvh; }
  .stops-list { max-height: 28dvh; }
  #toggle-destinations { display: flex; right: 12px; bottom: 20px; }
  body.panel-hidden .stops-card { display: none; }
  .intro { left: 14px; bottom: 25px; }
  .stats { min-width: 178px; padding: 6px 1px; }
  .stats div { padding: 2px 10px; }
  .stats strong { font-size: 23px; }
  .map-controls { left: 15px; bottom: 120px; }
  .map-card { height: 100dvh; }
}

/* Atlas · memoria y álbum junto al mapa */
.stops-card { width: 332px; max-height: calc(100dvh - 178px); }
.stops-heading h2 { font-size: 30px; }
.stops-list { max-height: calc(100dvh - 400px); }
.stop-order { display: grid; place-items: center; }
.stop-order > .icon { width: 17px; height: 17px; }
.journal-tabs { display: flex; margin: 0 14px 10px; background: #eee9df; border-radius: 9px; padding: 3px; }
.journal-tabs button { flex: 1; border: 0; padding: 8px 5px; background: transparent; color: #627069; border-radius: 7px; font-size: 11px; font-weight: 700; }
.journal-tabs button[aria-pressed=true] { color: #274c44; background: #fffdf7; box-shadow: 0 1px 5px #34352512; }
.screen-reader-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.journal-search { display: grid; grid-template-columns: minmax(0,1fr) 104px; gap: 6px; padding: 0 14px 10px; flex-shrink: 0; }
.journal-search input, .journal-search select { min-width: 0; width: 100%; min-height: 36px; padding: 7px 8px; font-size: 11px; border-radius: 8px; margin: 0; }
.filter-summary { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; gap: 6px; color: #5b7166; font-size: 10px; }
.filter-summary .text-button { flex: none; font-size: 10px; padding: 0; }
@media (max-width:760px) {
  .journal-search { padding-inline: 12px; gap: 5px; }
  .journal-search input, .journal-search select { min-height: 42px; font-size: 16px; }
  .filter-summary .text-button { min-height: 34px; font-size: 11px; }
}
.passport-memory, .travel-timeline { overflow: auto; padding: 0 15px 8px; max-height: calc(100dvh - 400px); scrollbar-width: thin; }
.timeline-year { padding: 2px 0 12px 13px; border-left: 1px solid #d1dacd; margin: 3px 0 0 4px; }
.timeline-year h3 { font: 500 27px/1.2 var(--serif); color: #365c50; margin: 2px 0 8px; }
.timeline-year h4 { font: 700 11px/1.3 var(--sans); color: #6d776c; text-transform: uppercase; letter-spacing: .1em; margin: 15px 0 8px; }
.timeline-card {
  display: block; width: 100%; padding: 0; margin-bottom: 12px; overflow: hidden; text-align: left;
  background: #fffdf7; border: 1px solid #e2ddd0; border-radius: 13px; color: var(--ink);
  box-shadow: 0 3px 9px #3343320a;
}
.timeline-card:hover { border-color: #7da697; background: #fff; }
.timeline-text { display: grid; gap: 4px; padding: 11px 12px; }
.timeline-text strong { font: 700 23px/1.05 var(--serif); }
.timeline-text > span { font-size: 11px; color: #626a60; }
.timeline-text small { font-size: 10px; color: #3c6c5b; }
.upload-dialog { width: min(740px, calc(100% - 24px)); }
.upload-drop {
  display: grid; justify-items: center; gap: 11px; text-align: center; padding: 22px 16px;
  border: 1px dashed #a4b9a4; background: #edf2e8; border-radius: 14px; color: #426352;
}
.upload-drop > .icon { width: 28px; height: 28px; }
.upload-drop p { max-width: 38ch; font-size: 13px; }
.upload-drop.drag-over { outline: 2px solid #3b8069; outline-offset: -3px; background: #dcebd9; }
.upload-summary { padding: 11px 0 9px; font-size: 13px; font-weight: 700; }
.upload-list { display: grid; gap: 8px; max-height: 35dvh; overflow: auto; overscroll-behavior: contain; }
.upload-file { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 8px; border: 1px solid #e1e1d6; border-radius: 12px; background: #fffdf7; }
.upload-thumb { position: relative; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: #eee8dc; color: #72806b; }
.upload-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.upload-file-details { display: grid; gap: 5px; min-width: 0; }
.upload-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.upload-file-status { font-size: 11px; color: #667261; overflow-wrap: anywhere; }
.upload-file progress { width: 100%; height: 5px; accent-color: #428168; }
.upload-file[data-status="failed"] { border-color: #ca9984; }
.upload-file[data-status="failed"] .upload-file-status { color: #9c3d29; }
.upload-file[data-status="saved"] .upload-file-status { color: #36765c; }
.upload-dialog > .help { margin-top: 9px; }
.memory-continent h3 { display: flex; justify-content: space-between; align-items: baseline; margin: 9px 2px; font: 700 18px var(--serif); color: #2f5c50; }
.memory-continent h3 small { font: 500 10px var(--sans); color: #6c7b70; }
.country-memory { border: 1px solid #e0d9ca; border-radius: 12px; padding: 12px; margin-bottom: 11px; background: linear-gradient(125deg,#fffdf6,#f5efe2); }
.country-memory-heading { border: 0; background: transparent; padding: 0; display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; color: #263f37; }
.country-memory-heading > span:nth-child(2) { flex: 1; }
.country-memory-heading strong { display: block; font: 700 22px var(--serif); color: #a73921; }
.country-memory-heading small { display: block; font-size: 10px; margin-top: 4px; color: #697363; }
.country-memory-heading > .icon { width: 17px; opacity: .7; }
.country-stamp { width: 43px; height: 43px; display: grid; place-items: center; flex: none; color: #4b7261; border: 1px dashed #80a18d; box-shadow: inset 0 0 0 3px #f3f2e5; border-radius: 50%; background: #e8eddd; font: 800 12px var(--sans); letter-spacing: .12em; transform: rotate(-9deg); }
.memory-cities { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 11px; }
.memory-city { border: 1px solid #8bb6ed; background: #e5f0ff; color: #135ab0; padding: 4px 9px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.memory-city:hover { background: #cce1ff; }
.memory-base { border-color: #d6a345; background: #fff0ca; color: #8b4806; }
.memory-empty { color: var(--subtle); padding: 18px 5px; font-size: 13px; }
.city-marker { position: absolute; left: 0; top: 0; pointer-events: auto; display: inline-flex; align-items: center; gap: 7px; width: max-content; max-width: 160px; min-height: 31px; padding: 6px 11px; color: #25372f; background: #fffdf2; border: 1px solid #e0ceb3; border-radius: 9px; box-shadow: 0 3px 14px #0005; font: 750 12px/1.3 var(--sans); white-space: nowrap; }
.city-marker::before { content: ''; width: 6px; height: 6px; flex: none; border-radius: 50%; background: #b9573c; }
.city-marker-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.city-marker:hover, .city-marker:focus-visible { z-index: 5; background: #fff; }
.city-marker.base-marker::before { background: #3e8a71; box-shadow: 0 0 0 3px #44836520; }
.cluster-marker { background: #224e49; color: #fffbe9; border: 1px solid #a2cdb5; border-radius: 20px; padding: 8px 14px; box-shadow: 0 0 0 4px #80b8a323, 0 4px 14px #0005; }
.cluster-marker::before { background: #b6dbc4; box-shadow: 3px -3px 0 -1px #b6dbc480; }
.cluster-marker:hover, .cluster-marker:focus-visible { background: #37695e; }
.city-marker.selected-marker { z-index: 6; outline: 2px solid #e6bb6f; outline-offset: 3px; }
.map-city-icon .city-marker { transform: translate(-50%,-50%); }
.visited-legend { position: absolute; left: 28px; bottom: 196px; z-index: 2; display: flex; gap: 7px; align-items: center; padding: 6px 9px; border: 1px solid #a3c5b52e; border-radius: 7px; color: #d0ebd6; background: #162a31d9; font-size: 10px; pointer-events: none; }
.visited-legend > span { width: 11px; height: 8px; border: 1px solid #a6edbe; background: #72c19766; border-radius: 2px; }
body.album-open .stops-card { visibility: hidden; }
#album-dialog { position: fixed; inset: 100px 24px 88px auto; width: 370px; max-width: calc(100% - 24px); height: auto; max-height: none; margin: 0; z-index: 790; border-radius: 20px; padding: 20px; background: #fffcf5f8; box-shadow: 0 12px 48px #0004; backdrop-filter: blur(18px); overflow: auto; }
#album-dialog .dialog-heading { position: sticky; top: -20px; margin: -5px -3px 13px; padding: 12px 3px 9px; z-index: 3; background: #fffcf5f5; }
#album-dialog h2 { font-size: clamp(27px, 3.2vw, 40px); overflow-wrap: anywhere; }
#album-dialog .eyebrow { font-size: 9px; letter-spacing: .14em; }
.album-heading-copy { min-width: 0; }
.album-visits { margin-bottom: 15px; padding: 11px; border: 1px solid #d9e0d1; border-radius: 12px; background: #eaf0e4a0; }
.album-visits > p { font-size: 11px; margin-bottom: 7px; color: #3d554b; }
.album-visit-controls { display: flex; flex-wrap: wrap; gap: 7px; }
.album-visit-picker { position: relative; flex: 1 1 100%; min-width: 0; }
.album-visit-picker > summary {
  display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 8px;
  list-style: none; border: 1px solid #cbd6c6; border-radius: 8px;
  background: #fffdf7; color: #304b40; font-size: 12px; cursor: pointer;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.album-visit-picker > summary::-webkit-details-marker { display: none; }
#album-visit-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album-visit-picker > summary .icon { flex: none; width: 12px; height: 12px; }
.album-visit-picker > summary[aria-disabled=true] { cursor: default; }
.album-visit-picker > summary[aria-disabled=true] .icon { visibility: hidden; }
.album-visit-picker[open] > summary .icon { transform: rotate(180deg); }
#album-visit-options {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 5;
  display: grid; gap: 2px; padding: 4px; max-height: min(200px, 32dvh);
  overflow: auto; overscroll-behavior: contain; border: 1px solid #cbd6c6;
  border-radius: 9px; background: #fffdf7; box-shadow: 0 6px 18px #14291f26;
}
#album-visit-options button {
  min-height: 32px; padding: 6px; border: 0; border-radius: 5px;
  background: transparent; color: #304b40; text-align: left; font-size: 12px; overflow-wrap: anywhere;
}
#album-visit-options button:hover, #album-visit-options button[aria-current=true] { background: #e4eddf; }
.album-visit-picker :focus-visible { outline: 2px solid #487a69; outline-offset: -2px; }
.album-visit-controls .button { flex: 1; justify-content: center; font-size: 12px; min-height: 40px; }
#album-dialog .close-button { flex: none; }
#album-dialog .album-toolbar { flex-direction: column; align-items: stretch; gap: 9px; }
.album-section-heading, .album-tools { display: flex; align-items: center; gap: 6px; }
.album-section-heading { justify-content: space-between; }
.album-section-heading h3 { font: 700 20px/1.15 var(--serif); }
#album-dialog .album-count { padding: 4px 8px; border-radius: 20px; background: #e9eee6; color: #38534b; white-space: nowrap; }
#album-dialog .album-buttons { justify-content: stretch; gap: 7px; }
#album-dialog .album-buttons .button { flex: 1 1 115px; justify-content: center; white-space: nowrap; }
.album-tools { justify-content: flex-end; padding-block: 2px; }
#album-dialog .photo-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
#album-dialog .photo-card { margin: 0; min-width: 0; border-radius: 12px; background: #fffdf7; }
#album-dialog .open-photo { aspect-ratio: 1; }
#album-dialog .photo-actions { flex-wrap: wrap; gap: 0; }
#album-dialog .photo-card .icon-button { width: clamp(25px, 2.3vw, 34px); height: 32px; }
#album-dialog .photo-card figcaption { padding: 5px 6px; }
#album-dialog .cover-photo { height: auto; aspect-ratio: 16 / 10; border-radius: 13px; box-shadow: 0 5px 14px #403b2924; }
#album-dialog .cover-photo > span { border-radius: 30px; padding: 6px 10px; }
#album-dialog .empty-album { padding: 20px 12px; background: linear-gradient(135deg, #eef1e7, #f8eee0); }
#album-dialog .photo-guide { font-size: 11px; }
.cluster-destination { width: 100%; display: block; text-align: left; padding: 12px; margin-top: 7px; border: 1px solid var(--line); border-radius: 8px; background: #f5f3e9; }
#toast { z-index: 1000; }
@media(max-width:760px) {
  .stops-card { width: min(332px,calc(100% - 24px)); max-height: 57dvh; }
  .passport-memory, .travel-timeline, .stops-list { max-height: 30dvh; }
  .visited-legend { left: 15px; bottom: 169px; font-size: 9px; }
  #album-dialog { inset: auto 10px 77px auto; width: min(370px,calc(100% - 20px)); max-height: 55dvh; padding: 16px; }
  #album-dialog .dialog-heading { top: -16px; }
  .brand { gap: 7px; }
  .brand strong { font-size: 12px; }
  .brand span { font-size: 7px; }
}

/* Atlas personal */
#account-dialog, #maps-dialog, #delete-map-dialog, #profile-dialog { width: min(480px, calc(100% - 24px)); }
#account-dialog::backdrop { background: #071927c7; backdrop-filter: blur(5px); }
.maps-list { display: grid; gap: 8px; max-height: 38dvh; overflow: auto; margin: 16px 0; padding: 2px; }
.map-option { display: flex; gap: 5px; align-items: center; padding: 3px; border: 1px solid var(--line); border-radius: 10px; }
.map-option.active { border-color: #8ca99a; background: #e8f0e9; }
.map-option > button:first-child { display: flex; align-items: center; flex: 1; min-width: 0; gap: 10px; text-align: left; border: 0; background: transparent; color: #24463d; padding: 8px; }
.map-option strong { display: block; font: 700 18px var(--serif); overflow-wrap: anywhere; }
.map-option small { color: #5d6a60; }
.map-option > .icon-button { flex: none; }
.map-form-row { display: flex; align-items: center; gap: 8px; }
.map-form-row input { min-width: 0; }
.map-form-row button { flex: none; }
.photo-more { margin-top: 12px; width: 100%; }
@media (max-height: 680px) {
  .map-selector { max-height: calc(100dvh - 350px); overflow: auto; }
}
@media (max-width: 760px) and (max-height: 680px) {
  .map-selector { max-height: calc(100dvh - 340px); }
}


/* Atlas name and map switcher */
.atlas-header { display: flex; align-items: stretch; gap: 9px; min-width: 0; pointer-events: auto; }
.glass-surface {
  color: #f9f4e9;
  background: linear-gradient(145deg, #a7c0db28, #52698224 42%, #283c52a6);
  border: 1px solid #d7e8ff55;
  box-shadow: inset 0 1px 1px #ffffff3b, inset 0 -1px 2px #afc7e820, 0 7px 22px #0004;
  backdrop-filter: blur(18px) saturate(1.4);
}
.brand.glass-surface {
  min-width: 0; max-width: min(37vw, 400px); padding: 9px 12px; border-radius: 17px;
  text-align: left; font-family: inherit; opacity: 1;
}
.brand .brand-mark {
  flex: none; display: grid; place-items: center; margin: 0; color: #f5e5ca;
  background: #e9f3ff1c; border: 1px solid #deedff36;
}
.brand .atlas-brand-copy { min-width: 0; margin: 0; color: inherit; letter-spacing: normal; }
.atlas-brand-copy strong, #active-map-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atlas-brand-copy small, .map-switcher-copy small {
  display: block; margin-top: 5px; color: #bdd0e3; letter-spacing: .11em; font: 750 9px var(--sans);
}
.atlas-edit-icon { flex: none; width: 15px; height: 15px; color: #cbdaed; }
.map-switcher { position: relative; min-width: 0; }
.map-switcher summary {
  display: flex; align-items: center; gap: 12px; min-width: 0; height: 100%; padding: 9px 13px;
  border-radius: 17px; cursor: pointer; list-style: none;
}
.map-switcher summary::-webkit-details-marker { display: none; }
.map-switcher summary:hover, .brand.glass-surface:hover { border-color: #e4efffaa; }
.map-switcher-copy { display: block; min-width: 0; }
.map-switcher-copy small { margin: 0 0 5px; }
#active-map-name { display: block; max-width: min(25vw, 245px); font: 750 14px/1.25 var(--sans); }
.map-switcher-chevron { width: 15px; height: 15px; flex: none; transition: transform .18s ease; }
.map-switcher[open] .map-switcher-chevron { transform: rotate(180deg); }
.map-switcher-menu {
  position: absolute; left: 0; top: calc(100% + 8px); width: min(285px, 90vw);
  padding: 10px; border-radius: 17px; background-color: #101f33e0; z-index: 1;
}
.map-switcher-heading { margin: 4px 6px 7px; color: #c1d4e8; font-size: 11px; font-weight: 750; }
.quick-map-list { display: grid; gap: 3px; max-height: min(42dvh, 340px); overflow: auto; }
.quick-map-option, #my-maps {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 35px; padding: 6px 8px;
  border: 1px solid transparent; border-radius: 8px; background: transparent; color: #f0f5fa;
  font: 650 12px var(--sans); text-align: left; overflow-wrap: anywhere;
}
.quick-map-option .icon, #my-maps .icon { flex: none; width: 15px; height: 15px; }
.quick-map-option:hover, #my-maps:hover { background: #e4f1ff20; }
.quick-map-option[aria-current=true] { color: #fff6dd; background: #f6e9cf24; border-color: #f9ecd148; }
#my-maps { margin-top: 3px; }
.atlas-menu-divider { border: 0; border-top: 1px solid #d7e8ff36; margin: 7px 0; }
#install-steps { margin: 12px 0; padding-inline-start: 23px; }
#install-steps li { padding: 4px 0; }
#sign-out { position: fixed; right: 24px; bottom: var(--atlas-action-bottom); z-index: 850; }
#toggle-destinations { bottom: calc(var(--atlas-action-bottom) + var(--atlas-action-height) + 8px); }
.map-credit { margin-left: 0; margin-right: auto; }
.stops-card { max-height: calc(100dvh - 211px); }
#album-dialog { bottom: calc(var(--atlas-action-bottom) + 2 * var(--atlas-action-height) + 16px); }
@media (max-width: 760px) {
  .atlas-header { position: relative; gap: 5px; }
  .topbar-right { flex: none; }
  .map-switcher { position: static; }
  .brand.glass-surface { padding: 7px 8px; max-width: 37vw; gap: 5px; }
  .brand .brand-mark { width: 29px; height: 29px; }
  .brand .brand-mark .icon { width: 17px; height: 17px; }
  .atlas-edit-icon { display: none; }
  .atlas-brand-copy small, .map-switcher-copy small { font-size: 7px; }
  .map-switcher summary { gap: 5px; padding: 6px 8px; }
  #active-map-name { font-size: 11px; }
  .map-switcher-menu { width: min(250px, calc(100vw - 32px)); }
  #sign-out { right: 12px; }
  .stops-card { bottom: calc(var(--atlas-action-bottom) + 2 * var(--atlas-action-height) + 16px); max-height: 52dvh; }
}
@media (max-width: 430px) {
  .brand .brand-mark { display: none; }
}

/* Shared action sizes and the globe's cartography credit */
:root { --atlas-action-width: 134px; --atlas-action-height: 44px; --atlas-action-bottom: 12px; }
#new-stop, #account-submit, #toggle-destinations, #sign-out {
  width: var(--atlas-action-width);
  height: var(--atlas-action-height);
  min-height: var(--atlas-action-height);
  flex-shrink: 0;
  justify-content: center;
  padding: 0 8px;
  font-size: 12px;
  white-space: nowrap;
}
#new-stop .icon { width: 17px; height: 17px; flex: none; }
.map-footer { justify-content: flex-start; }
.map-credit { margin-right: 0; }
#globe-map-credit { color: #e6f0f8; background: #101d2bed; padding: 2px 5px; border-radius: 3px; pointer-events: auto; text-decoration: underline; }
body.detail-view #globe-map-credit { display: none; }
#globe-detail-status { color: #ffdcbb; font-size: 11px; margin-top: 8px; }
body.detail-view #globe-detail-status { display: none; }
@media (max-width: 760px) {
  :root { --atlas-action-width: 110px; --atlas-action-bottom: 9px; }
  #new-stop, #account-submit, #toggle-destinations, #sign-out { font-size: 11px; }
  #new-stop .icon { width: 14px; height: 14px; }
}
@media (max-width: 430px) {
  :root { --atlas-action-width: 106px; }
  #new-stop { font-size: 10px; }
}

/* Cristal azul para el mapa y papel cálido para el cuaderno. */
:root {
  --glass-edge: #c0d8f450;
  --glass-panel: linear-gradient(145deg, #2b425ce3, #17293df0 56%, #0d1d30f2);
  --glass-control: linear-gradient(150deg, #b7d5fa29, #7797bb12 48%, #4b72962e);
  --glass-highlight: linear-gradient(145deg, #6c9bca8a, #335e8dd9 56%, #274a73ec);
  --glass-shine: inset 0 1px 1px #eaf5ff38, inset 0 -1px 1px #9bc3e720;
  --paper-glass: linear-gradient(155deg, #fffcf6fa, #f5f1e9f2);
  --paper-glass-edge: #fffdf8b8;
  --paper-glass-shadow: inset 0 1px 0 #ffffffc4, 0 12px 36px #07142340;
}
.map-selector, .stats {
  background: var(--glass-panel);
  border-color: var(--glass-edge);
  box-shadow: var(--glass-shine), 0 12px 38px #020a1680;
  backdrop-filter: blur(20px) saturate(1.3);
}
.map-selector .map-modes { background: #06142568; border: 1px solid #afc9e32a; }
.map-modes button.active {
  color: #f3f7fc;
  background: var(--glass-highlight);
  box-shadow: var(--glass-shine);
}
.map-button {
  background: var(--glass-control), #112a43c9;
  border-color: var(--glass-edge);
  box-shadow: var(--glass-shine);
}
.map-button:hover { background: var(--glass-highlight), #173657; }
.visited-legend { border-color: var(--glass-edge); box-shadow: var(--glass-shine); }
.stops-card, #album-dialog, dialog:not(.photo-dialog), #toggle-destinations {
  background: var(--paper-glass);
  border-color: var(--paper-glass-edge);
  box-shadow: var(--paper-glass-shadow);
  backdrop-filter: blur(18px);
}
#toggle-destinations:hover { background: #fffdf6; }
#album-dialog .dialog-heading { background: #fffcf6f5; }
.journal-tabs { box-shadow: inset 0 1px 2px #594b3212; }
.journal-tabs button[aria-pressed=true] { box-shadow: inset 0 1px 0 #fff, 0 1px 5px #34352512; }

/* El mapa conserva espacio cuando cambia el tamaño de la ventana. */
#new-stop {
  width: clamp(158px, 17vw, 202px);
  height: 52px;
  min-height: 52px;
  font-size: 14px;
  border-radius: 12px;
}
#new-stop .icon { width: 19px; height: 19px; }
.stops-card {
  width: min(332px, 31vw);
  min-height: 0;
}
#album-dialog {
  width: min(410px, 34vw);
  height: fit-content;
  max-height: calc(100dvh - 116px - var(--atlas-action-bottom) - 2 * var(--atlas-action-height));
}
.stops-list, .passport-memory, .travel-timeline {
  flex: 0 1 auto;
  min-height: 0;
  max-height: none;
}
.stops-heading, .journal-tabs, .stops-footer { flex-shrink: 0; }
.map-selector > summary { display: none; }
.map-selector:not([open]) > :not(summary) { display: none; }

@media (max-width: 760px), (max-height: 640px) {
  .map-selector {
    width: min(172px, 48vw);
    max-height: min(52dvh, 290px);
    overflow: auto;
    padding: 7px;
  }
  .map-selector > summary {
    display: block;
    cursor: pointer;
    padding: 4px 6px;
    color: #edf6ff;
    font-size: 12px;
    font-weight: 750;
  }
  .map-selector > summary::after {
    content: "";
    float: right;
    width: 6px;
    height: 6px;
    margin: 4px 3px 0 8px;
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
  }
  .map-selector[open] > summary { margin-bottom: 6px; }
  .map-selector[open] > summary::after { transform: rotate(225deg); }
}
@media (max-height: 640px) and (min-width: 761px) {
  .map-heading { top: 86px; }
  .map-heading h2 { font-size: 29px; }
  .map-selector { top: 150px; }
  .stops-heading { padding: 12px 14px 8px; }
  .stops-heading h2 { font-size: 26px; }
  .stops-footer { margin-block: 2px 5px; padding-block: 3px; }
  .stats { min-width: 178px; }
  .stats strong { font-size: 23px; }
}
@media (max-width: 760px) {
  #new-stop {
    width: clamp(112px, 34vw, 150px);
    height: 44px;
    min-height: 44px;
    font-size: 11px;
  }
  #new-stop .icon { width: 14px; height: 14px; }
  .map-heading { top: 78px; }
  .map-heading h2 { font-size: 25px; }
  .map-selector { top: 124px; }
  .stops-card, #album-dialog {
    width: min(330px, calc(100% - 24px));
    max-height: 43dvh;
  }
  .stops-heading { padding: 12px 13px 8px; }
  .stops-heading h2 { font-size: 25px; }
  .stops-heading .sidebar-subtitle { display: none; }
  .stops-footer { margin-block: 2px 5px; padding-block: 3px; }
  .journal-tabs { margin-bottom: 5px; }
  .stats { min-width: 0; }
  .stats div { padding-inline: 8px; }
  body:not(.panel-hidden) .map-controls, body.album-open .map-controls {
    top: 124px;
    right: 12px;
    bottom: auto;
    left: auto;
  }
  body:not(.panel-hidden) .visited-legend, body.album-open .visited-legend { display: none; }
}
@media (max-height: 460px) {
  .stops-card { overflow: auto; }
  .stops-list, .passport-memory, .travel-timeline { flex-shrink: 0; overflow: visible; }
}


/* Mobile atlas */
.mobile-continent-filter, .mobile-atlas-map, .mobile-atlas-chevron, .photo-actions-toggle, .mobile-dock, .mobile-search-toggle, .mobile-destinations-label, .mobile-sheet-close, .country-actions-toggle,
.country-action-label, #mobile-atlas-menu, .map-selector > .mobile-map-settings-heading {
  display: none;
}
#pins .city-marker { touch-action: none; }
.brand .mobile-atlas-map { display: none; }
.topbar, .topbar *, .map-heading, .map-selector, .map-selector *, .map-controls,
.mobile-dock, .city-marker, .pin-tooltip {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}

@media (max-width: 760px) {
  :root {
    --mobile-dock-bottom: calc(var(--atlas-viewport-bottom, 0px) + max(6px, env(safe-area-inset-bottom, 0px)));
    --mobile-sheet-bottom: calc(var(--mobile-dock-bottom) + 60px);
  }

  .mobile-destinations-label { display: inline; }
  .desktop-destinations-label, .map-heading, .visited-legend { display: none; }
  .topbar {
    top: calc(var(--atlas-viewport-top, 0px) + max(10px, env(safe-area-inset-top, 0px)));
    left: calc(var(--atlas-viewport-left, 0px) + max(12px, env(safe-area-inset-left, 0px)));
    right: auto;
    width: calc(var(--atlas-viewport-width, 100vw) - max(12px, env(safe-area-inset-left, 0px)) - max(12px, env(safe-area-inset-right, 0px)));
  }
  .topbar-inner { display: block; min-height: 0; margin: 0; }
  .atlas-header {
    display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    grid-template-areas: "brand stats" "filter ."; gap: 6px 8px; width: 100%;
  }
  .mobile-continent-filter { display: block; grid-area: filter; position: relative; min-width: 0; width: 50%; }
  .mobile-continent-filter .continent-picker > summary {
    min-height: 26px; padding: 4px 6px; gap: 4px; border-radius: 9px;
    font-size: 11px; line-height: 16px; font-weight: 600;
    background: #102338df; backdrop-filter: blur(14px);
  }
  .mobile-continent-filter #continent-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-continent-filter .continent-picker > summary .icon { width: 10px; height: 10px; }
  .mobile-continent-filter .continent-picker > summary .icon:first-child { display: none; }
  .mobile-continent-filter .continent-options {
    position: absolute; top: 100%; left: 0; z-index: 2;
    width: max(100%, 210px); max-width: calc(100vw - 24px);
    max-height: min(340px, 50dvh); background: #102338f5;
    box-shadow: 0 10px 24px #0004; backdrop-filter: blur(14px);
  }
  .mobile-continent-filter .continent-options button { min-height: 32px; padding: 5px 7px; font-size: 12px; }
  .brand.glass-surface { grid-area: brand; width: 100%; max-width: none; min-height: 62px; padding: 9px 10px; border-radius: 17px; gap: 6px; }
  .brand .brand-mark, .brand .atlas-edit-icon, .atlas-brand-copy small { display: none; }
  .brand .atlas-brand-copy { flex: 1; min-width: 0; }
  .brand strong { display: block; font-size: 17px; line-height: 1.12; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .brand .mobile-atlas-map { display: block; margin-top: 5px; font: 500 10px/1.3 var(--sans); color: #c5d5e2; letter-spacing: normal; overflow-wrap: anywhere; }
  #mobile-active-map-name { display: inline; margin: 0; color: #f8f3e7; font: inherit; font-weight: 650; letter-spacing: normal; }
  .mobile-atlas-chevron { display: block; flex: none; width: 13px; height: 13px; color: #d2e2ed; }
  .map-switcher { display: none; }
  .atlas-header > .stats {
    grid-area: stats; display: grid; align-items: center; width: 100%; min-width: 0; min-height: 62px;
    margin: 0; padding: 9px 3px; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 17px;
    pointer-events: none;
  }
  .atlas-header > .stats div { min-width: 0; padding: 1px 2px; text-align: center; }
  .atlas-header > .stats div + div { border-left: 1px solid #d8e9ee24; }
  .atlas-header > .stats strong { display: block; font: 400 clamp(16px,4.6vw,22px)/1.1 var(--serif); font-variant-numeric: tabular-nums; }
  .atlas-header > .stats #stat-world { font-size: clamp(11px,3.6vw,16px); white-space: nowrap; letter-spacing: -.04em; }
  .atlas-header > .stats span { display: block; font-size: 8px; line-height: 1.2; margin-top: 5px; letter-spacing: .015em; color: #c5d5e2; }
  .intro, .map-controls { display: none; }
  input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
  select, textarea, .album-visit-controls select, .film-clip select { font-size: 16px; }
  .mobile-dock {
    position: fixed; z-index: 850; display: flex; gap: 12px; align-items: center;
    left: var(--atlas-viewport-left, 0px); bottom: var(--mobile-dock-bottom);
    width: var(--atlas-viewport-width, 100vw); padding: 0 max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px));
    pointer-events: none;
  }
  #mobile-dock > #toggle-destinations, #mobile-dock > #new-stop {
    position: static; inset: auto; margin: 0; height: 52px; min-height: 52px;
    font-size: 14px; border-radius: 14px; pointer-events: auto;
  }
  #mobile-dock > #toggle-destinations { flex: 1 1 auto; width: auto; min-width: 0; }
  #mobile-dock > #new-stop { flex: 0 0 52px; width: 52px; padding: 0; border-radius: 50%; }
  #new-stop .icon { width: 25px; height: 25px; }
  #new-stop .new-stop-label { display: none; }

  #mobile-atlas-menu:not([hidden]) {
    display: grid;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: min(320px, calc(100vw - 24px));
    max-height: calc(100dvh - var(--atlas-header-bottom, 90px) - var(--mobile-sheet-bottom) - 16px);
    overflow: auto; overscroll-behavior: contain; padding: 9px; border-radius: 17px;
    background: #13263af5; z-index: 3;
  }
  #mobile-atlas-menu .map-switcher-menu {
    position: static; width: 100%; padding: 0; margin-bottom: 0;
    border: 0; border-radius: 0;
    background: transparent; box-shadow: none; backdrop-filter: none;
  }
  #mobile-atlas-menu .quick-map-list { max-height: min(32dvh, 230px); gap: 2px; }
  #mobile-atlas-menu #my-maps { min-height: 34px; font-size: 11px; }
  #mobile-atlas-menu .quick-map-option,
  #mobile-atlas-menu #sign-out {
    position: static;
    width: 100%;
    min-height: 34px;
    height: auto;
    text-decoration: none;
    padding: 5px 7px;
    gap: 6px;
    font-size: 11px;
  }
  #mobile-atlas-menu #sign-out {
    justify-content: flex-start;
    border: 1px solid transparent;
    border-top-color: #d7e8ff36;
    border-radius: 8px;
    background: transparent;
    color: #ffe7d9;
    font-size: 11px;
  }
  #mobile-atlas-menu #sign-out:hover { background: #e4f1ff20; }
  .map-selector:not([open]), .map-selector > summary { display: none; }
  .map-selector {
    top: calc(var(--atlas-header-bottom, 78px) + 10px);
    width: min(220px, calc(100% - 24px));
    max-height: min(65dvh, 370px);
  }
  .map-selector > .mobile-map-settings-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 7px;
    padding: 0 3px 6px;
    color: #edf6ff;
    font-size: 13px;
  }
  .mobile-map-settings-heading .icon-button { width: 40px; height: 40px; }
  .continent-picker > summary, .continent-options button { min-height: 44px; }
  .continent-options { max-height: min(220px, 36dvh); }
  .map-modes button { min-height: 39px; }

  .intro { bottom: var(--mobile-sheet-bottom); }
  body:not(.panel-hidden) .intro, body.album-open .intro { visibility: hidden; }
  .map-footer { bottom: calc(var(--mobile-sheet-bottom) + 8px); left: 14px; }
  .map-controls { left: auto; right: 12px; bottom: var(--mobile-sheet-bottom); }
  .map-controls .icon-button { width: 42px; height: 42px; }
  body:not(.panel-hidden) .map-controls, body.album-open .map-controls { top: 70px; }

  .stops-card, #album-dialog {
    inset: calc(var(--atlas-header-bottom, 78px) + 10px) 8px var(--mobile-sheet-bottom);
    width: auto;
    max-width: none;
    height: auto;
    max-height: none;
    border-radius: 23px;
  }
  .stops-card { overflow: hidden; }
  #album-dialog { padding: 14px; }
  .memory-country-tools { display: flex; align-items: center; gap: 4px; }
  .memory-country-tools .country-memory-heading { flex: 1; min-width: 0; }
  .memory-country-tools > .icon-button { flex: none; width: 40px; height: 44px; }
  #passport-memory, #travel-timeline { min-height: 0; flex: 1 1 auto; overflow: auto; max-height: none; }
  #album-dialog .dialog-heading { top: -14px; }
  #album-dialog .album-tools .icon-button { width: 44px; height: 44px; }
  #album-dialog .photo-card .icon-button { width: 34px; height: 36px; }
  .stops-heading { position: relative; padding: 14px 112px 13px 14px; min-height: 52px; }
  .stops-heading .eyebrow { display: none; }
  .stops-heading h2 { margin: 0; font-size: clamp(22px, 6vw, 28px); }
  .mobile-sheet-close {
    display: grid;
    place-items: center;
    position: absolute;
    top: 5px;
    right: 8px;
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }
  .mobile-search-toggle {
    display: grid; place-items: center; position: absolute; right: 56px; top: 5px;
    width: 44px; height: 44px; border-radius: 13px;
  }
  .mobile-search-toggle.has-filters::after { content: ""; position: absolute; width: 7px; height: 7px; right: 9px; top: 9px; border-radius: 50%; background: var(--accent); }
  .mobile-search-toggle[aria-expanded=true] { background: #e5eee9; border-color: #94b4a7; }
  .journal-search { display: none; }
  .search-expanded .journal-search { display: grid; }
  .journal-tabs { margin: 0 12px 5px; }
  .journal-tabs button { min-height: 40px; font-size: 12px; }
  .stops-list, .passport-memory, .travel-timeline, #album-dialog { overscroll-behavior-y: contain; }
  .upload-file { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 8px; padding: 7px; }
  .upload-thumb { width: 52px; height: 60px; }
  .upload-file > button { min-width: 42px; min-height: 44px; }
  .upload-drop { padding: 16px 12px; }
  .stops-list { padding: 4px 11px 14px; min-height: 0; flex: 1 1 auto; overflow: auto; max-height: none; }
  .region-group > summary, .country-group > summary { min-height: 40px; }
  .country-group { position: relative; }
  .country-group[open] > summary { min-height: 44px; padding-right: 48px; }
  .country-body { display: flex; flex-direction: column; padding: 0 2px 3px; }
  .country-actions-toggle {
    display: grid;
    place-items: center;
    position: absolute;
    right: 1px;
    top: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: transparent;
  }
  .country-actions-toggle[aria-expanded="false"] + .country-actions { display: none; }
  .country-actions {
    order: -1;
    display: flex;
    gap: 3px;
    padding: 2px 0;
  }
  .country-actions .icon-button {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    height: 44px;
    font-size: 11px;
  }
  .country-action-label { display: inline; }
  .stop-card {
    min-height: 53px;
    margin: 2px 0;
    padding: 5px;
    gap: 8px;
    border: 1px solid #e8e0d3;
    border-radius: 11px;
    background: #fffdf8;
  }
  .stop-order { width: 39px; height: 39px; border-radius: 8px; }
  .stop-name { font-size: 16px; }
  .stop-meta { font-size: 10px; }
  .mini-count:not(:empty) {
    padding: 3px 5px;
    color: #345d5d;
    background: #edf1ec;
    border-radius: 12px;
  }
  .stops-footer { display: none; }
  #album-dialog .dialog-heading .close-button, #album-dialog .album-buttons .button,
  #album-dialog .album-buttons .icon-button { min-height: 44px; }
  /* Álbum móvil: las fotos tienen prioridad sobre la cabecera y la portada. */
  #album-dialog { padding: 10px; }
  #album-dialog .dialog-heading { top: -10px; margin: -2px 0 8px; padding: 8px 0; gap: 8px; }
  #album-dialog h2 { font-size: 23px; margin-top: 0; }
  #album-dialog .dialog-heading .eyebrow { display: none; }
  #album-dialog .album-meta { font-size: 10px; line-height: 1.4; margin-top: 4px; }
  #album-dialog .dialog-heading .close-button { width: 40px; height: 40px; min-height: 40px; }
  #album-dialog .album-visits { padding: 5px 6px; margin-bottom: 6px; border-radius: 8px; }
  #album-dialog .album-visits > p { font-size: 9px; margin-bottom: 3px; }
  #album-dialog .album-visit-controls { flex-wrap: nowrap; gap: 4px; }
  #album-dialog .album-visit-picker { flex: 1 1 0; }
  #album-dialog .album-visit-picker > summary { min-height: 28px; padding: 4px 6px; font-size: 11px; line-height: 18px; }
  #album-dialog #album-visit-options button { min-height: 30px; font-size: 11px; }
  #album-dialog #new-visit { flex: 0 0 28px; width: 28px; min-height: 28px; height: 28px; padding: 0; border-radius: 7px; }
  #album-dialog #new-visit .icon { width: 14px; height: 14px; }
  #album-dialog .new-visit-label, #album-dialog #album-cover, #album-dialog .photo-guide { display: none; }
  #album-dialog .album-notes { font-size: 12px; margin-bottom: 8px; }
  #album-dialog .album-toolbar { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px; margin-bottom: 8px; }
  #album-dialog .album-section-heading { min-width: 0; gap: 4px; }
  #album-dialog .album-section-heading h3 { font-size: 15px; }
  #album-dialog .album-count { padding: 3px 5px; font-size: 9px; }
  #album-dialog .album-tools { grid-column: 2; grid-row: 1; gap: 3px; padding: 0; }
  #album-dialog .album-tools .icon-button { width: 32px; height: 32px; }
  #album-dialog .album-buttons { grid-column: 1 / -1; grid-row: 2; flex-wrap: nowrap; gap: 6px; }
  #album-dialog .album-buttons .button { min-height: 34px; height: 34px; padding: 4px 6px; gap: 5px; font-size: 10px; }
  #album-dialog .album-buttons .icon { width: 14px; height: 14px; }
  #album-dialog .photo-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; align-items: start; }
  #album-dialog .photo-card { position: relative; border-radius: 7px; }
  #album-dialog .photo-card figcaption { display: block; padding: 0; }
  #album-dialog .photo-name, #album-dialog .photo-memory { display: none; }
  #album-dialog .photo-card.is-cover::before { content: "★"; position: absolute; z-index: 1; top: 3px; left: 3px; color: #fff6cf; background: #19383ed9; padding: 1px 3px; border-radius: 4px; font-size: 9px; pointer-events: none; }
  #album-dialog .photo-card .photo-actions-toggle {
    display: grid; place-items: center; position: absolute; z-index: 1; top: 3px; right: 3px;
    width: 26px; height: 26px; padding: 0; border-radius: 7px; background: #102a39b8; color: #fffdf0;
  }
  #album-dialog .photo-actions-toggle[aria-expanded=false] + .photo-actions { display: none; }
  #album-dialog .photo-actions-toggle[aria-expanded=true] { background: #eaf0e6; color: #193e39; }
  #album-dialog .photo-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 3px; }
  #album-dialog .photo-actions .icon-button { width: 100%; min-width: 0; height: 30px; }
  /* Formulario compacto sin reducir el texto de los campos de iOS. */
  #stop-form-dialog { width: min(440px,calc(100% - 20px)); max-height: calc(100dvh - max(12px,env(safe-area-inset-top,0px)) - max(12px,env(safe-area-inset-bottom,0px))); padding: 14px; border-radius: 20px; }
  #stop-form-dialog .dialog-heading { margin-bottom: 10px; gap: 8px; }
  #stop-form-dialog .dialog-heading h2 { font-size: 26px; margin-top: 0; }
  #stop-form-dialog .dialog-heading .eyebrow { display: none; }
  #stop-form-dialog .close-button { width: 40px; height: 40px; }
  #stop-form { gap: 8px; }
  #stop-form label { font-size: 11px; }
  #stop-form input, #stop-form select, #stop-form textarea { min-width: 0; max-width: 100%; min-height: 38px; margin-top: 3px; padding: 6px 8px; }
  #stop-form .visit-date-calendar { margin-top: 3px; flex-basis: 32px; }
  #stop-form #notes { height: 64px; min-height: 64px; }
  #stop-form .form-row, #stop-form .fields { gap: 8px; }
  #stop-form .city-results { max-height: min(150px,24dvh); }
  #stop-form .city-result { min-height: 44px; }
  #stop-form .help { font-size: 10px; margin-top: 4px; }
  #stop-form .manual-toggle { font-size: 11px; min-height: 32px; }
  #stop-form .chosen-city { font-size: 12px; padding: 6px 8px; }
  #stop-form .dialog-actions { padding-top: 2px; gap: 6px; }
  #stop-form .dialog-actions .button { flex: 1; min-height: 42px; padding: 7px 8px; font-size: 12px; }

}
.storage-warning {
  position: fixed; z-index: 900; left: 24px; bottom: 80px; width: min(340px, calc(100vw - 48px));
  margin: 0; padding: 10px 13px; border: 1px solid #e3b35b; border-radius: 12px;
  background: #fff2d8f5; color: #6e4012; box-shadow: 0 5px 20px #0002; font-size: 12px; line-height: 1.4;
}
.storage-warning[data-full="true"] { background: #ffe8e3f7; color: #8c3020; border-color: #d77f6b; }
.storage-warning[hidden] { display: none; }
.storage-usage-button { font-size: 10px; line-height: 1.4; opacity: .9; }
@media (max-width: 760px) { .storage-warning { left: 12px; bottom: calc(80px + env(safe-area-inset-bottom)); width: min(340px, calc(100vw - 24px)); font-size: 11px; } }
