:root {
  --bg: #0f1419;
  --card: #1a212b;
  --card-2: #222b38;
  --line: #2c3744;
  --text: #eef2f6;
  --muted: #9fb0c0;
  --accent: #c9a24b;     /* warm gold — vacation feel */
  --accent-2: #6db8a8;   /* lake teal */
  --danger: #e0726a;
  --radius: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-font-smoothing: antialiased;
}

/* ---- Header ---- */
header {
  position: sticky; top: 0; z-index: 10;
  background: linear-gradient(180deg, #131a22 0%, rgba(15,20,25,.92) 100%);
  backdrop-filter: blur(8px);
  padding: calc(env(safe-area-inset-top) + 14px) 18px 12px;
  border-bottom: 1px solid var(--line);
}
header h1 { margin: 0; font-size: 19px; letter-spacing: .3px; }
header .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
header.branded { text-align: center; }
header.branded .brand { height: 82px; width: auto; border-radius: 16px; display: inline-block; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
header.branded .sub { margin-top: 8px; }

/* ---- Views ---- */
main { padding: 16px 14px 90px; max-width: 680px; margin: 0 auto; }
.view { display: none; }
.view.active { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---- Cards ---- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}
.card h2 { margin: 0 0 2px; font-size: 17px; }
.card .meta { color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; }
.card .town { color: var(--muted); font-size: 14px; margin: 2px 0 10px; }

.section-label { color: var(--accent-2); font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; margin: 12px 0 6px; }
ul.facts { margin: 0; padding-left: 18px; }
ul.facts li { margin-bottom: 6px; color: #dbe4ec; }

.day-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 4px; }
.day-tabs button {
  flex: 0 0 auto; background: var(--card-2); color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600;
}
.day-tabs button.active { background: var(--accent); color: #1a1205; border-color: var(--accent); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; border: none; border-radius: 14px; padding: 15px;
  font-size: 16px; font-weight: 700; color: #1a1205; background: var(--accent);
}
.btn.secondary { background: var(--card-2); color: var(--text); border: 1px solid var(--line); }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn:active { transform: scale(.98); }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---- Memories ---- */
.mem {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 14px;
}
.mem img { width: 100%; display: block; aspect-ratio: 4/3; object-fit: cover; background: #000; }
.mem .body { padding: 12px 14px; }
.mem .body .when { color: var(--muted); font-size: 13px; }
.mem .body .where { color: var(--accent-2); font-size: 13px; margin-top: 2px; }
.mem .body .note { margin-top: 8px; }
.mem .body .actions { display: flex; gap: 10px; margin-top: 10px; }
.mem .body .actions button { flex: 1; font-size: 13px; padding: 9px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); color: var(--text); }
.mem .body .actions button.del { color: var(--danger); }

.flight-banner {
  background: linear-gradient(135deg, rgba(201,162,75,.16), rgba(201,162,75,.05));
  border: 1px solid var(--accent); border-radius: var(--radius);
  padding: 13px 16px; margin: 0 0 14px;
}
.flight-banner .fb-label { color: var(--accent); font-weight: 800; font-size: 12px; letter-spacing: .7px; text-transform: uppercase; margin-bottom: 4px; }
.flight-banner .fb-text { color: #fff; font-size: 15px; font-weight: 600; line-height: 1.45; }

.empty { text-align: center; color: var(--muted); padding: 50px 20px; }
.empty .big { font-size: 40px; margin-bottom: 10px; }

/* ---- Camera sheet ---- */
.sheet {
  position: fixed; inset: 0; z-index: 50; background: #000; display: none; flex-direction: column;
}
.sheet.open { display: flex; }
.sheet video, .sheet img.preview { flex: 1; width: 100%; object-fit: contain; background: #000; }
.sheet .cam-bar { padding: 16px 16px calc(env(safe-area-inset-bottom) + 20px); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.shutter { width: 70px; height: 70px; border-radius: 50%; border: 5px solid #fff; background: #fff; }
.sheet .cam-bar .txt { color: #fff; background: transparent; border: none; font-size: 16px; font-weight: 600; }
.cam-note { width: 100%; padding: 12px; border-radius: 10px; border: 1px solid #333; background: #111; color: #fff; font-size: 15px; margin-bottom: 12px; }
.cam-fields { padding: 14px 16px; background: #0c0c0c; }
.cam-fields select { width: 100%; padding: 12px; border-radius: 10px; border: 1px solid #333; background: #111; color: #fff; font-size: 15px; margin-bottom: 10px; }
.gps-chip { color: var(--accent-2); font-size: 13px; margin-bottom: 10px; }

/* ---- Bottom nav ---- */
nav.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  display: flex; background: #131a22; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
nav.tabbar button {
  flex: 1; background: transparent; border: none; color: var(--muted);
  padding: 10px 0 12px; font-size: 11px; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 3px;
}
nav.tabbar button .ico { font-size: 21px; height: 22px; display: flex; align-items: center; }
nav.tabbar button .ico svg { display: block; }
nav.tabbar button.active { color: var(--accent); }

.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%);
  background: #000; color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px;
  border: 1px solid var(--line); z-index: 100; opacity: 0; transition: opacity .2s; pointer-events: none;
}
.toast.show { opacity: 1; }

/* ---- Capture chooser ---- */
.chooser { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.55); display: none; align-items: flex-end; }
.chooser.open { display: flex; animation: fade .15s ease; }
.chooser-card {
  width: 100%; background: var(--card); border-top-left-radius: 22px; border-top-right-radius: 22px;
  padding: 18px 18px calc(env(safe-area-inset-bottom) + 18px); border-top: 1px solid var(--line);
}
.chooser-card h3 { margin: 4px 0 14px; text-align: center; font-size: 16px; }
.chooser-card .btn { margin-bottom: 10px; }
.chooser-card .btn:last-child { margin-bottom: 0; }

/* ---- Guide tab ---- */
.guide-blurb { color: var(--muted); font-size: 14px; margin: 2px 0 6px; }
details.guide {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 12px; overflow: hidden;
}
details.guide summary {
  list-style: none; cursor: pointer; padding: 15px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
details.guide summary::-webkit-details-marker { display: none; }
details.guide summary .nm { font-size: 16px; font-weight: 700; }
details.guide summary .rg { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
details.guide summary .chev { color: var(--muted); transition: transform .2s; }
details.guide[open] summary .chev { transform: rotate(90deg); }
details.guide .inner { padding: 0 16px 14px; }
details.guide .inner .guide-blurb { margin-top: 0; }
.ref-h { font-size: 15px; font-weight: 800; letter-spacing: .3px; margin: 22px 4px 8px; color: var(--text); }
.ref-h .em { color: var(--accent); }
.ref-item { border-bottom: 1px solid var(--line); padding: 11px 2px; }
.ref-item:last-child { border-bottom: none; }
.ref-item .t { font-weight: 700; }
.ref-item .s { color: var(--accent-2); font-size: 13px; margin-top: 1px; }
.ref-item .d { color: #cdd8e2; font-size: 14px; margin-top: 4px; }
.ref-item .links { margin-top: 6px; display: flex; gap: 14px; }
.ref-item .links a { color: var(--accent); font-size: 13px; font-weight: 600; text-decoration: none; }
.diff { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; margin-top: 4px; }
.diff.open { background: rgba(109,184,168,.18); color: #8fd3c4; }
.diff.closed { background: rgba(224,114,106,.18); color: #f0a39c; }
.diff.easy { background: rgba(201,162,75,.18); color: #e4c477; }
