:root {
  /* Core navy from logo */
  --navy:      #03295b;
  --navy-dark: #021e45;
  --navy-mid:  #054294;
  --navy-soft: rgba(3,41,91,0.85);

  /* App surfaces — navy-tinted darks (preferred v1 feel) */
  --bg:   #080f1c;
  --bg2:  #0d1829;
  --bg3:  #122035;
  --bg4:  #172840;

  --border:  rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.13);

  --text:  #EEF4FF;
  --text2: #7B9BC4;
  --text3: #3e5f88;

  /* Accent — orange from v1, kept exactly */
  --accent:       #FF5C3A;
  --accent2:      #ff7c5e;
  --accentbg:     rgba(255,92,58,0.12);
  --accentborder: rgba(255,92,58,0.30);

  /* Category colours — v1 originals */
  --blue:    #4F8EFF;
  --bluebg:  rgba(79,142,255,0.10);
  --green:   #34D399;
  --greenbg: rgba(52,211,153,0.10);
  --amber:   #FBBF24;
  --amberbg: rgba(251,191,36,0.10);
  --red:     #F87171;
  --redbg:   rgba(248,113,113,0.10);
  --purple:  #A78BFA;
  --purplebg:rgba(167,139,250,0.10);

  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 20px;

  --font-head: 'Clash Display', 'Syne', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── AUTH ── */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-left {
  background: var(--navy);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.auth-left::before {
  content: '';
  position: absolute;
  top: -180px; right: -180px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,92,58,0.14) 0%, transparent 65%);
  pointer-events: none;
}

.auth-left::after {
  content: '';
  position: absolute;
  bottom: -120px; left: -120px;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(3,41,91,0.7) 0%, transparent 70%);
  pointer-events: none;
}

.auth-logo-wrap {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-bottom: 2.5rem;
}

.auth-logo-wrap img {
  width: 220px;
  height: 220px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.auth-headline {
  font-family: var(--font-head);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1.2px;
  color: var(--text);
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.auth-headline span { color: var(--accent2); }

.auth-sub {
  font-size: 0.95rem;
  color: rgba(238,244,255,0.65);
  line-height: 1.65;
  text-align: center;
  max-width: 320px;
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 1;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 300px;
}

.auth-feat {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: rgba(238,244,255,0.6);
}

.feat-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.auth-right {
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.auth-card { width: 100%; max-width: 390px; }

.auth-card h2 {
  font-family: var(--font-head);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 0.35rem;
}

.auth-card > p { font-size: 0.875rem; color: var(--text2); margin-bottom: 2rem; }

.tab-row {
  display: flex;
  gap: 3px;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 1.75rem;
  border: 1px solid var(--border);
}

.tab-btn {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid transparent;
  background: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text2);
  transition: all 0.15s;
}

.tab-btn.active { background: var(--bg4); color: var(--text); border-color: var(--border2); }

label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text3);
  margin-bottom: 0.4rem;
}

input, select, textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
  margin-bottom: 1rem;
}

input:focus, select:focus, textarea:focus { border-color: var(--accent); }
select option { background: var(--bg2); color: var(--text); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
}

.btn-accent { background: var(--accent); color: white; width: 100%; }
.btn-accent:hover { background: var(--accent2); }
.btn-accent:active { transform: scale(0.98); }
.btn-ghost { background: var(--bg3); color: var(--text2); border: 1px solid var(--border2); }
.btn-ghost:hover { color: var(--text); background: var(--bg4); }
.btn-danger { background: var(--redbg); color: var(--red); border: 1px solid rgba(248,113,113,0.2); }

/* ── APP ── */
.app { display: none; min-height: 100vh; }

.topbar {
  height: 56px;
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 200;
}

.topbar-brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }

.topbar-brand img {
  height: 36px;
  width: 36px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.tb-wordmark { line-height: 1.1; }
.tb-top { font-size: 0.58rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(238,244,255,0.5); }
.tb-name { font-family: var(--font-head); font-size: 1.05rem; font-weight: 700; color: var(--text); letter-spacing: -0.2px; }

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50px;
}

.user-av {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: white;
}

.topbar-username { font-size: 0.8rem; color: rgba(238,244,255,0.6); }

.logout-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(238,244,255,0.5);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.15s;
}

.logout-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.25); }

/* ── LAYOUT ── */
.shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 56px);
}

/* ── SIDEBAR ── */
.sidebar {
  background: var(--navy-dark);
  border-right: 1px solid rgba(255,255,255,0.08);
  padding: 1.5rem 0.75rem;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidegroup { margin-bottom: 1.75rem; }

.sidelabel {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(238,244,255,0.3);
  padding: 0 0.6rem;
  margin-bottom: 0.5rem;
}

.sideitem {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.12s;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(238,244,255,0.55);
  border: 1px solid transparent;
  background: none;
  width: 100%;
  text-align: left;
}

.sideitem:hover { background: rgba(255,255,255,0.07); color: var(--text); }

.sideitem.active {
  background: var(--accentbg);
  color: var(--accent2);
  border-color: var(--accentborder);
}

.side-icon { font-size: 14px; width: 18px; text-align: center; opacity: 0.85; }

.conf-badge {
  margin-left: auto;
  background: var(--red);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
  display: none;
}

/* ── MAIN ── */
.main { padding: 2rem 2.5rem; }

.section { display: none; }
.section.active { display: block; }

.phead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
}

.ptitle {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -1.2px;
  line-height: 1.1;
}

.psub { font-size: 0.85rem; color: var(--text2); margin-top: 0.3rem; }

/* ── COUNTDOWN — navy branded ── */
.countdown {
  background: var(--navy);
  border: 1px solid rgba(255,92,58,0.2);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.countdown::before {
  content: '';
  position: absolute;
  right: -80px; top: -80px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,92,58,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.cd-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent2);
  margin-bottom: 0.75rem;
}

.cd-nums { display: flex; align-items: baseline; gap: 0.5rem; }
.cd-unit { text-align: center; }

.cd-n {
  font-family: var(--font-head);
  font-size: 3.2rem;
  font-weight: 700;
  letter-spacing: -2px;
  color: var(--text);
  line-height: 1;
  display: block;
}

.cd-u {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(238,244,255,0.4);
  margin-top: 4px;
}

.cd-sep { font-size: 2rem; color: rgba(238,244,255,0.2); margin-bottom: 0.6rem; }

.cd-right { text-align: right; position: relative; }
.cd-trip { font-family: var(--font-head); font-size: 1.05rem; font-weight: 700; color: var(--text); }
.cd-info { font-size: 0.8rem; color: rgba(238,244,255,0.45); margin-top: 4px; }

/* ── STATS ── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.stat {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  transition: border-color 0.15s;
}

.stat:hover { border-color: var(--border2); }
.stat.click { cursor: pointer; }

.stat-lbl { font-size: 0.67rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text3); margin-bottom: 0.5rem; }
.stat-val { font-family: var(--font-head); font-size: 2.1rem; font-weight: 700; letter-spacing: -1.2px; color: var(--text); line-height: 1; }
.stat-sub { font-size: 0.72rem; color: var(--text3); margin-top: 3px; }

/* ── CARD ── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  
}

.card-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.card-title { font-family: var(--font-head); font-size: 0.95rem; font-weight: 600; letter-spacing: -0.1px; }

/* ── FORM GRID ── */
.fg { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.fg1 { grid-column: 1 / -1; }
.fg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.fg3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 1rem; }
input[list] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2rem; }
.field-locked { opacity: 0.5; cursor: not-allowed; background-image: none !important; }

/* ── LIST ITEMS ── */
.item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.8rem 0.9rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  transition: border-color 0.15s;
}

.item:hover { border-color: var(--border2); }

.item-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.ico-sky    { background: var(--bluebg); }
.ico-green  { background: var(--greenbg); }
.ico-amber  { background: var(--amberbg); }
.ico-purple { background: var(--purplebg); }
.ico-coral  { background: var(--accentbg); }
.ico-navy   { background: rgba(3,41,91,0.4); }

.item-body { flex: 1; min-width: 0; }
.item-name { font-size: 0.875rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-meta { font-size: 0.775rem; color: var(--text2); margin-top: 2px; }

.badge {
  font-size: 0.67rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.b-green  { background: var(--greenbg);  color: var(--green); }
.b-blue   { background: var(--bluebg);   color: var(--blue); }
.b-amber  { background: var(--amberbg);  color: var(--amber); }
.b-red    { background: var(--redbg);    color: var(--red); }
.b-coral  { background: var(--accentbg); color: var(--accent2); }

.del-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text3);
  font-size: 13px;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.15s;
  flex-shrink: 0;
}

.del-btn:hover { color: var(--red); background: var(--redbg); }

.drag-h { color: var(--text3); cursor: grab; font-size: 13px; padding: 2px; flex-shrink: 0; }
.item.dragging { opacity: 0.4; }
.item.dov { border-color: var(--accent); background: var(--accentbg); }

/* Park split */
.item-split { align-items: flex-start; }
.split-body { flex: 1; min-width: 0; }
.split-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.6rem; }
.split-date { font-size: 0.775rem; font-weight: 600; color: var(--text2); }
.split-parks { display: flex; align-items: center; gap: 0; }
.split-row { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; padding: 0.5rem 0.65rem; background: var(--bg); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.split-divider { font-size: 0.75rem; color: var(--text3); padding: 0 0.4rem; flex-shrink: 0; }

/* ── FLIGHT DISPLAY ── */
.flight-route {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.r-ap { font-family: var(--font-head); font-size: 2.2rem; font-weight: 700; letter-spacing: -1.5px; color: var(--blue); }
.r-time { font-size: 0.85rem; font-weight: 500; color: var(--text2); margin-top: 4px; }
.r-mid { text-align: center; }
.r-arrow { font-size: 1.3rem; color: var(--accent); display: block; margin-bottom: 4px; }
.r-fn { font-size: 0.72rem; color: var(--text3); }

/* ── TIMELINE ── */
.tl-day { margin-bottom: 2.5rem; }
.tl-dhead { display: flex; align-items: center; gap: 12px; margin-bottom: 1rem; }

.day-chip {
  background: var(--accent);
  color: white;
  font-family: var(--font-head);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

.day-label { font-size: 0.9rem; font-weight: 600; color: var(--text); }

.tl-evs {
  border-left: 1px solid var(--border2);
  margin-left: 10px;
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tl-ev {
  position: relative;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg2);
  border: 1px solid var(--border);
}

.tl-ev::before {
  content: '';
  position: absolute;
  left: -1.65rem; top: 0.9rem;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--bg3);
  border: 2px solid var(--border2);
}

.tl-ev.flight::before  { background: var(--blue);   border-color: var(--blue); }
.tl-ev.park::before    { background: var(--green);  border-color: var(--green); }
.tl-ev.dining::before  { background: var(--amber);  border-color: var(--amber); }
.tl-ev.activity::before{ background: var(--purple); border-color: var(--purple); }

.tl-time { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text3); }
.tl-name { font-size: 0.875rem; font-weight: 500; color: var(--text); margin-top: 2px; }

/* ── CONFLICTS ── */
.conf-it {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.6rem;
  border: 1px solid;
}

.conf-error { background: var(--redbg);   border-color: rgba(248,113,113,0.2); }
.conf-warn  { background: var(--amberbg); border-color: rgba(251,191,36,0.2); }
.conf-ico   { font-size: 14px; margin-top: 1px; flex-shrink: 0; }
.conf-body  { font-size: 0.85rem; }
.conf-ttl   { font-weight: 600; color: var(--text); margin-bottom: 2px; }
.conf-det   { color: var(--text2); }

/* ── SHARE ── */
.share-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.share-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text2);
}

.share-card:hover { border-color: var(--border2); color: var(--text); background: var(--bg4); }
.share-card.primary { border-color: var(--accentborder); color: var(--accent2); background: var(--accentbg); }
.share-card.primary:hover { background: rgba(255,92,58,0.18); }
.share-icon { font-size: 1.4rem; display: block; margin-bottom: 0.5rem; }

/* ── EMPTY ── */
.empty { text-align: center; padding: 2.5rem; color: var(--text3); }
.empty-ico { font-size: 1.75rem; margin-bottom: 0.75rem; opacity: 0.4; }
.empty p { font-size: 0.85rem; }

/* ── LOOKUP ── */
.lookup-row { display: flex; gap: 0.75rem; margin-bottom: 1.25rem; }
.lookup-row input { flex: 1; margin: 0; }
.lookup-row .btn { flex-shrink: 0; padding: 0.65rem 1rem; }

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%) translateY(1rem);
  background: var(--navy);
  border: 1px solid rgba(255,92,58,0.35);
  color: var(--text);
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 1000;
  opacity: 0;
  transition: all 0.25s;
  white-space: nowrap;
  pointer-events: none;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── RESPONSIVE ── */
@media(max-width:900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .shell { grid-template-columns: 1fr; }

  /* Sidebar becomes a fixed-height horizontal scrolling tab bar */
  .sidebar {
    position: sticky;
    top: 54px;
    z-index: 100;
    height: 48px;
    min-height: 48px;
    max-height: 48px;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0.5rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
    gap: 2px;
    /* Hide scrollbar but keep scrollable */
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .sidebar::-webkit-scrollbar { display: none; }

  .sidegroup { display: contents; }
  .sidelabel { display: none; }

  /* Tab items — shrink to content width, fixed height */
  .sideitem {
    white-space: nowrap;
    padding: 0 0.85rem;
    height: 36px;
    min-height: 36px;
    width: auto;
    min-width: unset;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
  }

  /* Hide icon on very small screens to save space */
  @media(max-width:400px) {
    .side-icon { display: none; }
  }

  .conf-badge { font-size: 0.55rem; padding: 1px 4px; }

  .main { padding: 1rem; }
  .fg { grid-template-columns: 1fr; }
  .fg1 { grid-column: 1; }
  .fg3 { grid-template-columns: 1fr 1fr; }
  .countdown { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .cd-right { text-align: left; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .phead { flex-direction: column; }
  .phead .btn { width: 100% !important; }
  .share-grid { grid-template-columns: repeat(2, 1fr); }
}

@media(max-width:560px) {
  .fg2 { grid-template-columns: 1fr; }
  .fg3 { grid-template-columns: 1fr; }
}

/* ── CLICKABLE COUNTDOWN LINK ── */
.cd-trip.linkish {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.18);
  text-underline-offset: 3px;
  transition: color 0.15s, text-decoration-color 0.15s;
}
.cd-trip.linkish:hover {
  color: var(--accent2);
  text-decoration-color: var(--accent2);
}

/* ── ITEM ACTIONS ── */
.item-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text3);
  font-size: 13px;
  padding: 5px 7px;
  border-radius: 6px;
  transition: all 0.15s;
}

.icon-btn:hover {
  color: var(--text);
  background: var(--bg4);
}

.edit-btn:hover {
  color: var(--blue);
  background: var(--bluebg);
}

.warn-text {
  color: var(--amber);
  font-size: 0.76rem;
  margin-top: -0.5rem;
  margin-bottom: 0.85rem;
}

/* ── CHECKLIST ── */
.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 0.95rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.55rem;
}

.checklist-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.checklist-label {
  flex: 1;
  font-size: 0.875rem;
  color: var(--text);
}

.checklist-item.done .checklist-label {
  color: var(--text2);
  text-decoration: line-through;
}

/* ── RESET BOX SIZING ── */
* {
  box-sizing: border-box;
}

/* ── WEATHER FORECAST WRAPPER ── */
.weather-forecast-wrapper {
  width: 100%;
  max-width: 82vw;               /* hard stop: cannot exceed screen width */

  display: flex;
  flex-wrap: nowrap;              /* never wrap to a new line */
  gap: 12px;

  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;

  scroll-snap-type: x mandatory;
  touch-action: pan-x;            /* only this row moves on swipe */
  box-sizing: border-box;         /* prevents padding from expanding width */
  padding: 0 12px 8px;            /* padding replaces your margin hack */
}

/* Desktop: grid layout */
@media (min-width: 769px) {
  .weather-forecast-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;

    overflow-x: visible;
    scroll-snap-type: none;
    padding: 0;                   /* desktop doesn't need padding */
  }
}

/* Weather day card */
.weather-day {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  padding: 14px;
  text-align: center;

  flex: 0 0 auto;                 /* fixed-size items */
  min-width: 130px;
  scroll-snap-align: start;
  box-sizing: border-box;
}

.weather-day-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.weather-date {
  font-size: 0.95rem;
  font-weight: 600;
  color: black;
}

.weather-icon {
  font-size: 1.4rem;
}

.weather-label {
  font-size: 0.9rem;
  color: #000000;
  margin-bottom: 8px;
}

.weather-temps {
  display: flex;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
}

.temp-max {
  color: #111;
}

.temp-min {
  color: #777;
}

/* Hide scrollbar */
.weather-forecast-wrapper::-webkit-scrollbar {
  display: none;
}
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
  }

  .modal {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    width: 340px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    text-align: left;
    animation: fadeIn 0.25s ease-out;
  }

  .modal-close {
    margin-top: 1rem;
    background: none;
    border: none;
    color: var(--text3);
    cursor: pointer;
    font-size: 0.8rem;
  }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
