:root {
  --bg: #0C0C0E;
  --surface: #16161A;
  --surface-2: #1F1F25;
  --line: rgba(255, 255, 255, 0.09);
  --ink: #F8F7F4;
  --muted: #A1A1AA;
  --accent: #E5A035;
  --accent-ink: #161004;
  --done: #22C55E;
  --food: #F97316;
  --sight: #38BDF8;
  --transit: #A78BFA;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Cairo', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  padding-bottom: 88px;
  min-height: 100dvh;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(12, 12, 14, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand-title { font-size: 17px; font-weight: 800; }
.brand-sub { font-size: 11.5px; color: var(--muted); font-weight: 600; }

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hotel-btn {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
}
.hotel-btn:active { border-color: var(--accent); }

.lang-btn {
  background: var(--ink);
  color: var(--bg);
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

/* Day Strip */
.day-strip {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 14px 10px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.day-strip::-webkit-scrollbar { display: none; }
.day-strip.hidden { display: none; }

.day-pill {
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 14px;
  padding: 6px 14px;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}
.day-pill strong { font-size: 13px; color: var(--ink); }
.day-pill span { font-size: 11px; }
.day-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.day-pill.active strong { color: var(--accent-ink); }

/* Main */
.main {
  max-width: 720px;
  margin: 0 auto;
  padding: 14px;
}

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

/* Day Hero */
.day-hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dh-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.dh-area {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}
.dh-cost {
  font-size: 12.5px;
  font-weight: 800;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: 999px;
}

.dh-title { font-size: 21px; font-weight: 800; line-height: 1.25; }
.dh-alert {
  background: rgba(229, 160, 53, 0.12);
  border: 1px solid rgba(229, 160, 53, 0.35);
  color: #FDE68A;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 12px;
}
.dh-rain { font-size: 12.5px; color: var(--muted); }

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stop-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  transition: opacity 0.18s;
}
.stop-card.is-done {
  opacity: 0.62;
  border-color: rgba(34, 197, 94, 0.45);
}

/* Uncropped Photo Viewer */
.stop-media {
  position: relative;
  width: 100%;
  height: 230px;
  background: #060608;
  overflow: hidden;
  cursor: pointer;
}
.stop-bg {
  position: absolute;
  inset: -14px;
  width: calc(100% + 28px);
  height: calc(100% + 28px);
  object-fit: cover;
  filter: blur(20px) brightness(0.42);
}
.stop-img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  z-index: 2;
}
.m-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 18px;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 5;
}
.m-prev { left: 10px; }
.m-next { right: 10px; }
.m-cnt {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.72);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  z-index: 5;
}

.stop-body {
  padding: 14px 15px 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stop-time-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.stop-time {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  background: var(--surface-2);
  padding: 2px 9px;
  border-radius: 8px;
}
.stop-type {
  font-size: 11.5px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
}
.type-activity { background: rgba(229,160,53,0.16); color: var(--accent); }
.type-food { background: rgba(249,115,22,0.16); color: var(--food); }
.type-sight { background: rgba(56,189,248,0.16); color: var(--sight); }
.type-transit { background: rgba(167,139,250,0.16); color: var(--transit); }

.done-toggle {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 11px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.stop-card.is-done .done-toggle {
  background: var(--done);
  border-color: var(--done);
  color: #041D0F;
}

.stop-title { font-size: 18px; font-weight: 800; line-height: 1.3; }
.stop-desc { font-size: 13.5px; color: var(--muted); }
.stop-price { font-size: 13px; font-weight: 800; color: var(--ink); }

.stop-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.s-btn {
  flex: 1;
  min-width: 120px;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 10px;
}
.s-btn.primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* Budget & Checklist Blocks */
.card-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 14px;
}
.card-block h2 { font-size: 19px; font-weight: 800; margin-bottom: 4px; }
.muted { font-size: 13px; color: var(--muted); margin-bottom: 14px; }

.conv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.conv-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 700;
}
.conv-field input {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: inherit;
  font-size: 20px;
  font-weight: 800;
  padding: 10px 12px;
  border-radius: 12px;
  width: 100%;
}

.b-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.b-row:last-child { border-bottom: none; font-weight: 800; color: var(--accent); font-size: 16px; }

.chk-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chk-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 12px 14px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}
.chk-item.checked {
  opacity: 0.55;
  text-decoration: line-through;
  border-color: rgba(34,197,94,0.4);
}
.chk-box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--muted);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 13px;
}
.chk-item.checked .chk-box {
  background: var(--done);
  border-color: var(--done);
  color: #041D0F;
}

/* Bottom Nav */
.bnav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 70;
  background: rgba(12, 12, 14, 0.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  gap: 8px;
}
.bnav-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px;
  cursor: pointer;
}
.bnav-btn.active { color: var(--accent); }
