/* Eclipse 2026 — Memories + Upload pages.
   Cosmic dark theme matching the trip site: #050811 night, corona-gold
   accents, Cormorant Garamond display / Inter body. Self-contained (does
   not depend on eclipse.css). */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
:root {
  --night:   #050811;
  --night-2: #0a1020;
  --night-3: #101830;
  --line:        rgba(212, 190, 130, 0.14);
  --line-strong: rgba(212, 190, 130, 0.30);
  --fg:      #f5e8c4;
  --fg-soft: rgba(232, 228, 212, 0.75);
  --fg-faint:rgba(232, 228, 212, 0.45);
  --gold:    #d4a456;
  --gold-hi: #f0cf8e;
  --mallorca:#5cbcc4;
  --como:    #4d9d7c;
  --milan:   #d4a456;
  --glass:   rgba(14, 20, 38, 0.72);
  --r-lg: 20px; --r-md: 13px; --r-sm: 9px;
}
body {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 16px; line-height: 1.6;
  color: var(--fg); background: var(--night);
  background-image:
    radial-gradient(ellipse 90% 60% at 70% -10%, rgba(212,164,86,0.10), transparent 60%),
    radial-gradient(ellipse 120% 80% at 20% 0%, var(--night-3), var(--night) 70%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

/* starfield dust */
.bg-stars { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image:
    radial-gradient(1px 1px at 12% 22%, #fff8, transparent 50%),
    radial-gradient(1px 1px at 34% 68%, #fff5, transparent 50%),
    radial-gradient(1.5px 1.5px at 56% 14%, #fff7, transparent 50%),
    radial-gradient(1px 1px at 71% 41%, #fff4, transparent 50%),
    radial-gradient(1px 1px at 88% 76%, #fff6, transparent 50%),
    radial-gradient(1.5px 1.5px at 45% 89%, #fff5, transparent 50%),
    radial-gradient(1px 1px at 5% 55%, #fff4, transparent 50%); }

/* ── Hero ─────────────────────────────────────────────────────── */
.m-hero { position: relative; z-index: 2; text-align: center;
  padding: 64px 20px 36px; }
.m-corona { font-size: 44px; display: inline-block;
  filter: drop-shadow(0 0 18px rgba(212, 164, 86, .55)); }
.m-hero-title { font-family: 'Cormorant Garamond', serif; font-weight: 600;
  font-size: clamp(38px, 7vw, 64px); letter-spacing: .01em;
  margin: 10px 0 4px; color: var(--gold-hi);
  text-shadow: 0 0 34px rgba(212, 164, 86, .35); }
.m-hero-dates { color: var(--fg-soft); font-size: 15px; margin: 0 0 6px; }
.m-hero-stats { color: var(--fg-faint); font-size: 13.5px; margin: 0 0 14px; }

/* who-uploaded-what legend + rings */
.who-legend { display: flex; gap: 9px; justify-content: center; flex-wrap: wrap;
  margin: 0 0 20px; }
.who-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px;
  color: var(--fg-soft); background: var(--glass); border: 1px solid var(--line);
  border-radius: 16px; padding: 5px 13px; }
.who-chip i { width: 10px; height: 10px; border-radius: 50%; flex: none;
  box-shadow: 0 0 8px currentColor; }
.who-chip b { color: var(--fg); font-weight: 600; }
.who-chip .n { color: var(--fg-faint); font-size: 11px; }
.m-photos > .m-tile[data-who-ring], .m-photos > .m-stack[data-who-ring] {
  outline: 2px solid var(--who, transparent); outline-offset: 1px; }
.lb-who { display: flex; align-items: center; gap: 7px; font-size: 12.5px;
  color: var(--fg-soft); margin: 5px 0 0; }
.lb-who i { width: 10px; height: 10px; border-radius: 50%; flex: none;
  box-shadow: 0 0 8px currentColor; }
.lb-who b { color: var(--fg); }
.m-hero-nav { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.m-nav-btn { display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 500; text-decoration: none; cursor: pointer;
  color: var(--fg); background: var(--glass); border: 1px solid var(--line);
  border-radius: 22px; padding: 9px 17px; transition: all .18s ease;
  font-family: 'Inter', sans-serif; }
.m-nav-btn:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.m-nav-btn--primary { border-color: rgba(212,164,86,.55);
  background: rgba(212,164,86,.14); color: var(--gold-hi); }
.m-hero-cue { color: var(--fg-faint); font-size: 12.5px; margin-top: 26px;
  animation: cue 2.4s ease-in-out infinite; }
@keyframes cue { 50% { transform: translateY(4px); opacity: .6; } }

/* ── Split: sticky map + timeline ─────────────────────────────── */
.m-split { position: relative; z-index: 2; display: grid;
  grid-template-columns: minmax(320px, 44%) 1fr; gap: 0;
  max-width: 1500px; margin: 0 auto; }
.m-map-wrap { position: sticky; top: 0; height: 100vh; padding: 18px;
  z-index: 3; }
#leafletMap { width: 100%; height: 100%; border-radius: var(--r-lg);
  border: 1px solid var(--line); box-shadow: 0 22px 60px -20px rgba(0,0,0,.7);
  background: var(--night-2); }
.m-map-overlay { position: absolute; left: 34px; top: 34px; z-index: 800;
  background: var(--glass); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 10px 16px; pointer-events: none; max-width: 70%; }
.m-map-showbtn { pointer-events: auto; margin-top: 8px; padding: 5px 12px;
  font-size: 12px; }
.m-map-day { font-family: 'Cormorant Garamond', serif; font-weight: 600;
  font-size: 19px; color: var(--gold-hi); line-height: 1.2; }
.m-map-sub { font-size: 12px; color: var(--fg-soft); }

.m-timeline { padding: 26px 30px 80px; min-width: 0; }

/* ── Leg sections ─────────────────────────────────────────────── */
.m-leg { margin-bottom: 56px; }
.m-leg-head { position: relative; padding: 22px 24px 18px; margin-bottom: 22px;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: linear-gradient(140deg,
    color-mix(in srgb, var(--acc, #d4a456) 14%, transparent), transparent 55%),
    var(--glass); overflow: hidden; }
.m-leg-head::before { content: ""; position: absolute; inset: 0 0 auto 0;
  height: 3px; background: linear-gradient(90deg, var(--acc), transparent); }
.m-leg-icon { font-size: 30px; }
.m-leg-name { font-family: 'Cormorant Garamond', serif; font-weight: 600;
  font-size: clamp(28px, 4vw, 40px); margin: 4px 0 2px; color: var(--fg);
  letter-spacing: .01em; }
.m-leg-sub { color: var(--fg-soft); font-size: 13.5px; margin: 0; }

.m-day { margin: 0 0 26px; }
.m-day-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.m-day-label { font-family: 'Cormorant Garamond', serif; font-size: 21px;
  font-weight: 600; color: var(--fg); }
.m-day-count { font-size: 12px; color: var(--fg-faint); }
.m-day--eclipse .m-day-label { color: var(--gold-hi); }
.m-eclipse-badge { font-size: 11.5px; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: #0a0d18;
  background: linear-gradient(90deg, var(--gold-hi), var(--gold));
  border-radius: 14px; padding: 3px 11px;
  box-shadow: 0 0 18px rgba(212,164,86,.5); }

/* photo grid + tiles — uniform square grid at every size */
.m-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px; }
.m-tile { position: relative; margin: 0; border-radius: var(--r-md);
  overflow: hidden; cursor: pointer; aspect-ratio: 1; background: var(--night-3);
  border: 1px solid var(--line);
  opacity: 0; transform: translateY(16px) scale(.97);
  transition: opacity .5s ease, transform .5s ease, box-shadow .25s ease; }
.m-tile.in-view { opacity: 1; transform: none; }
.m-tile:hover { box-shadow: 0 8px 30px -8px rgba(212,164,86,.35);
  border-color: var(--line-strong); }
.m-tile img { width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .4s ease; }
.m-tile:hover img { transform: scale(1.06); }
.m-tile-vid { position: absolute; right: 8px; bottom: 8px; width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 8, 17, .72); border-radius: 50%; font-size: 11px;
  color: var(--gold-hi); border: 1px solid var(--line-strong); }
.m-tile-fallback { display: flex; flex-direction: column; gap: 6px; height: 100%;
  align-items: center; justify-content: center; font-size: 26px;
  color: var(--fg-faint); padding: 10px; text-align: center; }
.m-tile-fallback span { font-size: 10px; word-break: break-all; }

/* ── Duplicate stacks ─────────────────────────────────────────── */
.m-stack { position: relative; aspect-ratio: 1; }
.m-stack:not(.open)::before,
.m-stack:not(.open)::after { content: ""; position: absolute; inset: 0;
  border-radius: var(--r-md); border: 1px solid var(--line-strong);
  background: var(--night-3); z-index: 0; pointer-events: none; }
.m-stack:not(.open)::before { transform: rotate(3.5deg) translate(3px, 2px); opacity: .7; }
.m-stack:not(.open)::after  { transform: rotate(-2.5deg) translate(-3px, 3px); opacity: .5; }
.m-stack:not(.open) .m-tile { position: relative; z-index: 1; }
.m-stack:not(.open) .m-tile:not(:first-child) { display: none; }
.m-stack-badge { position: absolute; top: 8px; right: 8px; z-index: 4;
  font-family: 'Inter', sans-serif; font-size: 11.5px; font-weight: 600;
  color: var(--gold-hi); background: rgba(5, 8, 17, .82);
  border: 1px solid rgba(212,164,86,.55); border-radius: 14px;
  padding: 3px 10px; cursor: pointer; transition: all .15s ease; }
.m-stack-badge:hover { background: rgba(212,164,86,.25); transform: scale(1.06); }
.m-stack.open { aspect-ratio: auto; grid-column: 1 / -1; grid-row: auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px; padding: 12px; padding-top: 40px;
  border: 1px dashed rgba(212,164,86,.45); border-radius: var(--r-md);
  background: rgba(212,164,86,.05); }
.m-stack.open .m-tile { opacity: 1; transform: none; }
.m-stack.open .m-tile:first-child { outline: 2px solid var(--gold);
  outline-offset: -2px; }
.m-stack.open .m-tile:first-child::after { content: "★ best"; position: absolute;
  left: 8px; top: 8px; font-size: 10px; font-weight: 600; color: #0a0d18;
  background: linear-gradient(90deg, var(--gold-hi), var(--gold));
  border-radius: 10px; padding: 2px 8px; }
.m-stack.open .m-stack-badge { top: 8px; right: 10px; }

/* delete button (lightbox) */
.m-nav-btn--danger { border-color: rgba(255, 120, 120, .5); color: #ffb3b3; }
.m-nav-btn--danger:hover { background: rgba(255, 120, 120, .12);
  border-color: #ff8a8a; }

.m-unplaced-head { display: flex; align-items: baseline; gap: 10px;
  margin: 6px 0 10px; color: var(--fg-soft); font-size: 14px; }
.m-unplaced-head .hint { font-size: 12px; color: var(--fg-faint); }

.m-end { text-align: center; padding: 30px 0 10px; color: var(--fg-faint); }
.m-end-actions { display: flex; gap: 10px; justify-content: center;
  flex-wrap: wrap; margin-top: 14px; }
.m-empty { text-align: center; border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg); padding: 60px 24px; color: var(--fg-soft); }
.m-empty .big { font-size: 40px; margin-bottom: 10px; }

/* map markers */
.m-dest-label { background: transparent; border: none; box-shadow: none;
  font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: 15px;
  color: var(--fg); text-shadow: 0 1px 6px #000; white-space: nowrap; }
.leaflet-container { font-family: 'Inter', sans-serif; }
.leaflet-tooltip.m-tip { background: var(--glass); color: var(--fg);
  border: 1px solid var(--line-strong); border-radius: 8px; font-size: 12px; }

/* ── Lightbox ─────────────────────────────────────────────────── */
.m-lightbox { position: fixed; inset: 0; z-index: 2000;
  background: rgba(3, 5, 12, .93); backdrop-filter: blur(10px);
  display: flex; flex-direction: column; }
.m-lightbox[hidden] { display: none; }
.lb-viewport { flex: 1; min-height: 0; display: flex; align-items: center;
  justify-content: center; padding: 46px 70px 8px; }
.lb-viewport img, .lb-viewport video { max-width: 100%; max-height: 100%;
  border-radius: 10px; box-shadow: 0 30px 90px -20px #000; }
.lb-close { position: absolute; top: 14px; right: 16px; z-index: 5;
  font-size: 20px; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--glass);
  color: var(--fg); cursor: pointer; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  font-size: 30px; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--glass);
  color: var(--fg); cursor: pointer; line-height: 1; }
.lb-nav:hover, .lb-close:hover { border-color: var(--gold); color: var(--gold-hi); }
.lb-prev { left: 14px; } .lb-next { right: 14px; }
.lb-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 20px 16px; }
.lb-name { font-family: 'Cormorant Garamond', serif; font-size: 19px;
  margin: 0; color: var(--gold-hi); }
.lb-info { font-size: 12.5px; color: var(--fg-soft); margin: 2px 0 0; }
.lb-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Slideshow ────────────────────────────────────────────────── */
.m-show { position: fixed; inset: 0; z-index: 2500; background: #030510;
  display: grid; grid-template-columns: 42% 58%; }
.m-show[hidden] { display: none; }
#showMap { width: 100%; height: 100%; background: var(--night-2); }
.show-stage { position: relative; overflow: hidden; cursor: pointer; }
.show-stage img, .show-stage video { position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: contain; opacity: 0;
  transition: opacity .8s ease; }
.show-stage img.on, .show-stage video.on { opacity: 1; }
.show-caption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  padding: 40px 22px 16px; pointer-events: none;
  background: linear-gradient(transparent, rgba(3,5,16,.88));
  text-shadow: 0 1px 4px #000; }
.show-caption h3 { font-family: 'Cormorant Garamond', serif; margin: 0;
  font-size: 22px; color: var(--gold-hi); }
.show-caption p { margin: 2px 0 0; font-size: 13px; color: var(--fg-soft); }
.show-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: linear-gradient(rgba(3,5,16,.85), transparent); }
.show-btn { font-size: 16px; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--glass);
  color: var(--fg); cursor: pointer; line-height: 1; flex: none; }
.show-btn:hover { border-color: var(--gold); color: var(--gold-hi); }
.show-speed { display: flex; align-items: center; gap: 8px; font-size: 12px;
  color: var(--fg-soft); margin-left: auto; }
.show-speed input[type=range] { width: 120px; accent-color: var(--gold); }
.show-count { font-size: 12px; color: var(--fg-faint); font-variant-numeric: tabular-nums; }
.show-hint { position: absolute; bottom: 8px; right: 14px; z-index: 4;
  font-size: 11px; color: var(--fg-faint); pointer-events: none; }
.show-pin { position: relative; }
.show-pin .pp-core { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px;
  margin: -7px 0 0 -7px; border-radius: 50%; background: var(--gold-hi);
  border: 2px solid #0a0d18; box-shadow: 0 0 14px var(--gold); }
.show-pin .pp-ring { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px;
  margin: -7px 0 0 -7px; border-radius: 50%; border: 2px solid var(--gold-hi);
  animation: showping 1.6s ease-out infinite; }
@keyframes showping { 0% { transform: scale(1); opacity: .9; }
  100% { transform: scale(3.4); opacity: 0; } }
@media (max-width: 980px) {
  .m-show { grid-template-columns: 1fr; grid-template-rows: 38% 62%; }
  .show-speed input[type=range] { width: 80px; }
}

/* ── Editor modals ────────────────────────────────────────────── */
.m-locedit { position: fixed; inset: 0; z-index: 2100;
  background: rgba(3,5,12,.8); display: flex; align-items: center;
  justify-content: center; padding: 18px; }
.m-locedit[hidden] { display: none; }
.le-card { width: min(620px, 100%); max-height: 92vh; overflow: auto;
  background: var(--night-2); border: 1px solid var(--line-strong);
  border-radius: var(--r-lg); padding: 20px 22px; }
.le-head { display: flex; align-items: center; justify-content: space-between; }
.le-head h3 { font-family: 'Cormorant Garamond', serif; margin: 0;
  font-size: 24px; color: var(--gold-hi); }
.le-close { border: none; background: transparent; color: var(--fg-soft);
  font-size: 18px; cursor: pointer; }
.le-help { color: var(--fg-soft); font-size: 13px; }
.le-map { height: 300px; border-radius: var(--r-md); border: 1px solid var(--line);
  margin: 10px 0; }
.le-stops { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.le-stop-btn { font-size: 12px; padding: 6px 12px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--glass); color: var(--fg);
  cursor: pointer; font-family: 'Inter', sans-serif; }
.le-stop-btn:hover { border-color: var(--gold); color: var(--gold-hi); }
.le-current { font-size: 12.5px; color: var(--fg-soft); min-height: 18px; }
.le-pw label { display: block; font-size: 12.5px; color: var(--fg-soft); }
.le-pw input, .de-inputwrap input { width: 100%; margin-top: 5px;
  background: var(--night-3); color: var(--fg); font-size: 14px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 9px 12px; font-family: 'Inter', sans-serif; }
.le-pw input:focus, .de-inputwrap input:focus { outline: none; border-color: var(--gold); }
.le-actions { display: flex; gap: 9px; justify-content: flex-end; margin-top: 14px; }
.de-quickrow { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px;
  align-items: center; }
.de-quicklabel { font-size: 12px; color: var(--fg-faint); width: 100%; }
.de-label { font-size: 12.5px; color: var(--fg-soft); display: block; }

/* ── Upload page ──────────────────────────────────────────────── */
.upload-content { position: relative; z-index: 2; max-width: 720px;
  margin: 0 auto; padding: 0 20px 80px; }
.up-card { background: var(--glass); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 22px 24px; margin-bottom: 18px; }
.up-card h2 { font-family: 'Cormorant Garamond', serif; font-weight: 600;
  margin: 0 0 12px; font-size: 24px; color: var(--gold-hi); }
.up-label { display: block; font-size: 13px; color: var(--fg-soft);
  margin-bottom: 12px; }
.up-label input { width: 100%; margin-top: 6px; background: var(--night-3);
  color: var(--fg); font-size: 15px; border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 11px 13px; font-family: 'Inter', sans-serif; }
.up-label input:focus { outline: none; border-color: var(--gold); }
.up-hint { font-size: 12px; color: var(--fg-faint); margin: 0; }
.dropzone { border: 1.5px dashed var(--line-strong); border-radius: var(--r-md);
  padding: 34px 20px; text-align: center; cursor: pointer;
  transition: all .18s ease; margin-bottom: 14px; }
.dropzone.dz--over { border-color: var(--gold); background: rgba(212,164,86,.08); }
.dz-big { font-size: 19px; margin: 0 0 8px; color: var(--fg); }
.dz-sub { font-size: 12.5px; color: var(--fg-faint); margin: 0; line-height: 1.7; }
.btn-primary { font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600;
  cursor: pointer; color: #0a0d18; border: none; border-radius: 22px;
  background: linear-gradient(90deg, var(--gold-hi), var(--gold));
  padding: 11px 22px; transition: all .18s ease; }
.btn-primary:hover { transform: translateY(-1px);
  box-shadow: 0 8px 26px -8px rgba(212,164,86,.6); }
.btn-primary:disabled { opacity: .4; cursor: default; transform: none; box-shadow: none; }
.queue { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.qrow { border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--night-2); padding: 10px 14px; }
.qmeta { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.qname { color: var(--fg); word-break: break-all; }
.qsize { color: var(--fg-faint); white-space: nowrap; }
.badge { display: inline-block; margin-top: 5px; font-size: 11.5px;
  padding: 2px 10px; border-radius: 12px; border: 1px solid var(--line); }
.badge.ok  { color: #a6e0b8; border-color: rgba(78,169,106,.5); }
.badge.dup { color: var(--gold-hi); border-color: rgba(212,164,86,.5); }
.badge.err { color: #ffb3b3; border-color: rgba(255,120,120,.5); }
.badge.up  { color: #9fdcf0; border-color: rgba(92,188,196,.5); }
.badge.pend{ color: var(--fg-faint); }
.qbar { height: 6px; border-radius: 4px; background: var(--night-3);
  overflow: hidden; margin-top: 8px; }
.qbar-fill { height: 100%; background: linear-gradient(90deg, var(--gold-hi), var(--gold)); }
.queue-foot { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--fg-soft); }
.up-fineprint { text-align: center; font-size: 12px; color: var(--fg-faint); }
.upload-back { margin-top: 6px; font-size: 13px; }
.upload-back a { color: var(--fg-soft); text-decoration: none; }
.upload-back a:hover { color: var(--gold-hi); }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 980px) {
  .m-split { grid-template-columns: 1fr; }
  /* Map pinned to the top on mobile (like the Ireland site) — the
     timeline scrolls underneath it. Solid bg hides passing content. */
  .m-map-wrap { position: sticky; top: 0; height: 48vh; padding: 10px;
    background: var(--night); z-index: 20; }
  .m-map-overlay { left: 22px; top: 20px; padding: 7px 12px; }
  .m-map-day { font-size: 16px; }
  .m-timeline { padding: 18px 16px 60px; }
  .lb-viewport { padding: 46px 12px 8px; }
  .lb-nav { display: none; }
}
