/*
  Athens & Egypt trip page.
  Reading layout from the place guide: one centered column, each place a card with the photo
  on the left and notes on the right. The one loud thing is the lapis "now" panel at the top.
*/

:root {
  --bg: #f3f4f7;
  --surface: #ffffff;
  --ink: #15171c;
  --muted: #5a6171;
  --line: #e0e3ea;
  --lapis: #1f3c88;
  --lapis-soft: #e7ecf8;
  --gold: #9c6d18;
  --gold-soft: #f7efdf;
  --sun: #e3a21a;
  --warn: #9a3412;
  --warn-bg: #fff3ea;
  --done: #1f7a6f;
  --now-bg: #1f3c88;
  --now-ink: #ffffff;
  --now-muted: rgba(255, 255, 255, 0.72);
  --font-display: "Nanum Myeongjo", "AppleMyungjo", "Batang", serif;
  --font-body: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --radius: 14px;
  --bar-h: 112px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1116;
    --surface: #171a21;
    --ink: #e9ebf0;
    --muted: #a2a9b7;
    --line: #2a2f3a;
    --lapis: #8fa9ff;
    --lapis-soft: #1d2640;
    --gold: #e2b65c;
    --gold-soft: #2c2416;
    --warn: #ffb68a;
    --warn-bg: #2e1d14;
    --done: #6fd3c4;
    --now-bg: #1a2b63;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

a {
  color: var(--lapis);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 2px solid var(--lapis);
  outline-offset: 2px;
  border-radius: 6px;
}

button {
  font: inherit;
  color: inherit;
}

code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--bg);
  font-size: 0.9em;
}

h1,
h2 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
}

.skip:focus {
  top: 12px;
}

.small {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}

/* ---------- masthead ---------- */

.mast {
  padding: 22px 0 28px;
  border-bottom: 1px solid var(--line);
}

.home {
  display: inline-block;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.home:hover {
  color: var(--lapis);
}

.mast .kicker {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.mast h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.25;
}

.mast .sub {
  max-width: 62ch;
  margin: 12px 0 0;
  color: var(--muted);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 16px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 14px;
  list-style: none;
}

.meta b {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---------- panels ---------- */

.grid2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.lead-grid {
  margin: 28px 0 0;
}

@media (max-width: 820px) {
  .grid2 {
    grid-template-columns: 1fr;
  }
}

.panel {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.panel h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.panel.alert {
  border-color: color-mix(in srgb, var(--warn) 35%, var(--line));
  background: var(--warn-bg);
}

.panel.alert h2 {
  color: var(--warn);
}

.panel.alert ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.panel.alert ol li::marker {
  color: var(--warn);
  font-weight: 700;
}

.panel.alert ol a {
  font-weight: 600;
}

/* ---------- now panel ---------- */

.now {
  padding: 22px 24px 20px;
  border-radius: var(--radius);
  background: var(--now-bg);
  color: var(--now-ink);
}

.now a {
  color: inherit;
}

.now :focus-visible {
  outline-color: #fff;
}

.now-date {
  margin: 0;
  color: var(--now-muted);
  font-size: 14px;
}

.now-label {
  margin: 14px 0 0;
  color: #f7c95c;
  font-size: 14px;
  font-weight: 700;
}

.now-time {
  margin: 0;
  font-size: clamp(56px, 9vw, 80px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
}

.now-title {
  margin: 8px 0 0;
  font-family: var(--font-body);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.4;
}

.now-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 10px 0 0;
  font-size: 15px;
}

.now-go,
.now-day {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.now-go:hover,
.now-day:hover {
  background: rgba(255, 255, 255, 0.14);
}

.now-current {
  margin: 10px 0 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 14px;
}

.river {
  margin: 22px 0 0;
}

.river-line {
  position: relative;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
}

.river-flow {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  border-radius: 2px;
  background: #f7c95c;
}

.river-dot {
  position: absolute;
  top: 50%;
  left: 0;
  width: 14px;
  height: 14px;
  border: 3px solid var(--now-bg);
  border-radius: 50%;
  background: #f7c95c;
  transform: translate(-50%, -50%);
}

.river-regions {
  position: relative;
  height: 22px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.river-regions li {
  position: absolute;
  top: 0;
  overflow: hidden;
  padding-left: 6px;
  border-left: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--now-muted);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.clocks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 14px 0 0;
}

.clocks div {
  display: flex;
  gap: 6px;
  align-items: baseline;
}

.clocks dt {
  color: var(--now-muted);
  font-size: 13px;
}

.clocks dd {
  margin: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------- route ---------- */

.route {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 0;
  margin: 16px 0 0;
  padding: 0;
  overflow: hidden;
}

.route-map {
  min-height: 460px;
  background: var(--lapis-soft);
}

.route-body {
  padding: 20px 22px;
}

@media (max-width: 820px) {
  .route {
    grid-template-columns: 1fr;
  }

  .route-map {
    min-height: 340px;
  }
}

.journey {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.journey li {
  position: relative;
  padding: 0 0 0 22px;
}

.journey li::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 6px;
  border-left: 2px solid var(--lapis-soft);
}

.journey li:first-child::before {
  top: 12px;
}

.journey li:last-child::before {
  bottom: calc(100% - 12px);
}

.journey-place::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 1px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--lapis);
  border-radius: 50%;
  background: var(--surface);
}

.journey-place a {
  display: block;
  padding: 2px 0 6px;
  color: inherit;
  text-decoration: none;
}

.journey-place a:hover strong {
  color: var(--lapis);
  text-decoration: underline;
}

.journey-place strong {
  font-weight: 700;
}

.journey-when,
.journey-extra {
  margin-left: 8px;
  color: var(--muted);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.journey-extra {
  color: var(--gold);
  font-weight: 600;
}

.journey-leg {
  padding-top: 2px !important;
  padding-bottom: 8px !important;
  color: var(--muted);
  font-size: 13.5px;
}

.journey-mode {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- chips, legend ---------- */

.chip {
  display: inline-block;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.chip.must {
  background: var(--lapis);
  color: var(--surface);
}

.chip.rec {
  border-color: color-mix(in srgb, var(--lapis) 30%, transparent);
  background: var(--lapis-soft);
  color: var(--lapis);
}

.chip.opt {
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}

.chip.skip {
  border: 1px dashed var(--muted);
  background: transparent;
  color: var(--muted);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
  padding: 0 22px 14px;
  font-size: 14px;
  list-style: none;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

/* ---------- sticky bar ---------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 500;
  margin-top: 28px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.bar .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filters button {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
}

.filters button span {
  margin-left: 2px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.filters button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.filters button[aria-pressed="true"] span {
  color: inherit;
  opacity: 0.7;
}

.wallet-go {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--lapis);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.wallet-go:hover {
  filter: brightness(1.1);
}

@media (prefers-color-scheme: dark) {
  .wallet-go {
    color: #0f1116;
  }
}

.now .now-wallet {
  border-color: #fff;
  background: #fff;
  color: #1f3c88;
}

.now .now-wallet:hover {
  background: #e7ecf8;
}

.daynav {
  display: flex;
  gap: 2px;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.daynav::-webkit-scrollbar {
  display: none;
}

.daynav a {
  position: relative;
  display: grid;
  justify-items: center;
  min-width: 46px;
  padding: 3px 6px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}

.daynav a b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.daynav a span {
  font-size: 11px;
}

.daynav a:hover {
  background: var(--lapis-soft);
  color: var(--lapis);
}

.daynav a[aria-current="true"] {
  background: var(--lapis);
  color: var(--surface);
}

.daynav a.is-today::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sun);
}

@media (max-width: 720px) {
  .filters {
    flex-wrap: nowrap;
    width: 100%;
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .filters button {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

/* ---------- overview board ---------- */

.board {
  margin: 28px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.board h2 {
  margin: 0;
  padding: 18px 22px 8px;
  font-size: 20px;
}

.brow {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 22px;
  border-top: 1px solid var(--line);
}

.bdate b {
  display: block;
  font-variant-numeric: tabular-nums;
}

.bdate span {
  color: var(--muted);
  font-size: 13.5px;
}

.bpills {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
}

.pill {
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
}

.pill.must {
  border-color: var(--lapis);
  background: var(--lapis);
  color: var(--surface);
}

.pill.rec {
  border-color: color-mix(in srgb, var(--lapis) 30%, transparent);
  background: var(--lapis-soft);
  color: var(--lapis);
}

.pill.opt {
  color: var(--muted);
}

.pill.skip {
  border-style: dashed;
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent);
}

@media (max-width: 640px) {
  .brow {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* ---------- day sections ---------- */

.day {
  margin: 48px 0 0;
  scroll-margin-top: calc(var(--bar-h) + 12px);
}

.dayhead {
  display: grid;
  gap: 2px;
  margin: 0 0 14px;
  padding-left: 14px;
  border-left: 3px solid var(--gold);
}

.dayhead .date {
  margin: 0;
  color: var(--gold);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.dayhead h2 {
  margin: 0;
  font-size: clamp(22px, 3.2vw, 28px);
  line-height: 1.3;
}

.dayhead .lead {
  margin: 2px 0 0;
  color: var(--muted);
}

.dayhead .stay {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.dayhead .stay b {
  color: var(--ink);
  font-weight: 600;
}

.day-map-box {
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}

.day-map-box summary {
  padding: 9px 14px;
  color: var(--lapis);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.day-map-box summary::-webkit-details-marker {
  display: none;
}

.day-map-box summary::before {
  content: "▸";
  display: inline-block;
  width: 1.2em;
  transition: transform 0.15s;
}

.day-map-box[open] summary::before {
  transform: rotate(90deg);
}

.day-map-box summary span {
  margin-left: 4px;
  color: var(--muted);
  font-weight: 400;
}

.day-map {
  height: 320px;
  border-top: 1px solid var(--line);
  background: var(--lapis-soft);
}

@media (max-width: 640px) {
  .day-map {
    height: 260px;
  }
}

/* ---------- timeline: thin rows between place cards ---------- */

.tl {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 4px;
  border-radius: 10px;
  scroll-margin-top: calc(var(--bar-h) + 12px);
}

.row + .row {
  border-top: 1px dashed var(--line);
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.row-time {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

.row-time .until {
  color: var(--muted);
  font-weight: 400;
}

.row-time .zone {
  display: block;
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
}

.row-body h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}

.row-text {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 14.5px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 6px 0 0;
  font-size: 14px;
}

.show-on-map,
.go {
  padding: 0;
  border: 0;
  background: none;
  color: var(--lapis);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.row.is-minor h3 {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}

.row.is-minor .row-time {
  color: var(--muted);
  font-weight: 500;
}

.row.is-minor .row-text {
  font-size: 13.5px;
}

.row.kind-flight,
.row.kind-train {
  background: var(--lapis-soft);
}

.row.kind-flight h3::before {
  content: "비행기";
  display: inline-block;
  margin-right: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--lapis);
  color: var(--surface);
  font-size: 11.5px;
  font-weight: 600;
  vertical-align: 2px;
}

.row.is-highlight {
  background: var(--gold-soft);
}

.row.is-highlight h3 {
  color: var(--gold);
}

.row.kind-flight + .row,
.row.is-highlight + .row,
.cards + .row {
  border-top-color: transparent;
}

.flag-opt {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.row.is-past .row-time,
.card.is-past .when {
  opacity: 0.55;
}

.row.is-current,
.row.is-next {
  box-shadow: inset 3px 0 0 var(--sun);
}

.row.is-current {
  background: color-mix(in srgb, var(--sun) 14%, var(--surface));
}

.row.is-focused h3,
.card.is-focused h3 {
  color: var(--lapis);
}

.live-badge {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--sun);
  color: #1b2142;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  vertical-align: 2px;
}

.day-note {
  margin: 14px 0 0;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 14.5px;
}

.day-note h3 {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 14px;
}

.day-note ul {
  display: grid;
  gap: 3px;
  margin: 0;
  padding-left: 18px;
}

.day-note p {
  margin: 6px 0 0;
  color: var(--muted);
}

/* ---------- place cards ---------- */

.cards {
  display: grid;
  gap: 14px;
  margin: 10px 0;
}

.card {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  scroll-margin-top: calc(var(--bar-h) + 12px);
}

.card.is-current,
.card.is-next {
  border-color: var(--sun);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--sun) 45%, transparent);
}

@media (max-width: 760px) {
  .card {
    grid-template-columns: 1fr;
  }
}

.media {
  display: grid;
  gap: 2px;
  background: var(--surface);
}

.media.two {
  grid-template-columns: 1fr 1fr;
}

.ph {
  position: relative;
  margin: 0;
  background: var(--lapis-soft);
}

.ph img {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.media.two .ph img {
  aspect-ratio: 3 / 4;
}

@media (min-width: 761px) {
  .ph {
    display: flex;
    flex-direction: column;
  }

  .ph img,
  .media.two .ph img {
    flex: 1 1 auto;
    height: 0;
    min-height: 300px;
    aspect-ratio: auto;
  }
}

@media (max-width: 760px) {
  .media.two .ph img {
    aspect-ratio: 4 / 5;
  }
}

.ph figcaption {
  padding: 5px 8px 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.ph figcaption a {
  color: inherit;
}

.ph.noimg img {
  visibility: hidden;
}

.ph.noimg::before {
  content: "사진을 불러오지 못했어요 (인터넷 연결이 필요해요)";
  position: absolute;
  inset: 0 0 28px 0;
  display: grid;
  place-items: center;
  padding: 16px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.body {
  min-width: 0;
  padding: 20px 24px 22px;
}

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

.when {
  color: var(--muted);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.body h3 {
  margin: 10px 0 0;
  font-size: 21px;
  line-height: 1.35;
  text-wrap: balance;
}

.body h3 .en {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.one {
  margin: 10px 0 0;
  font-weight: 600;
}

.desc {
  max-width: 64ch;
  margin: 8px 0 0;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg);
  font-size: 14px;
}

.facts div {
  min-width: 0;
}

.facts dt {
  color: var(--muted);
  font-size: 12.5px;
}

.facts dd {
  margin: 2px 0 0;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

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

.body h4 {
  margin: 16px 0 6px;
  color: var(--gold);
  font-size: 14px;
}

.tips {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  font-size: 15px;
}

.tips li.warn {
  margin-left: -18px;
  padding: 9px 12px;
  border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
  border-radius: 8px;
  background: var(--warn-bg);
  color: var(--ink);
  list-style: none;
}

.tips .flag {
  display: inline-block;
  margin-right: 8px;
  color: var(--warn);
  font-size: 12px;
  font-weight: 700;
}

.memo {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13.5px;
}

.memo span + span::before {
  content: "· ";
}

.memo .memo-label {
  color: var(--ink);
  font-weight: 600;
}

.memo .memo-label + span::before {
  content: "";
}

.card .actions {
  margin-top: 10px;
}

/* filtered by rating: show only matching place cards */
body.is-filtered .row,
body.is-filtered .day-map-box,
body.is-filtered .day-note {
  display: none;
}

.empty {
  margin: 32px 0;
  color: var(--muted);
}

/* ---------- preparation ---------- */

.prep {
  display: grid;
  gap: 16px;
  margin: 56px 0 0;
}

.money {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.money th,
.money td {
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.money td.num {
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.money td.num span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.booking-groups,
.todo-groups {
  columns: 2;
  column-gap: 32px;
}

.booking-group,
.todo-group {
  break-inside: avoid;
}

.booking-group:first-child h3,
.todo-group:first-child h3 {
  margin-top: 8px;
}

@media (max-width: 820px) {
  .booking-groups,
  .todo-groups {
    columns: 1;
  }
}

.booking-group h3,
.todo-group h3 {
  margin: 18px 0 6px;
  color: var(--gold);
  font-size: 14px;
}

.booking-list,
.todo-group ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.booking {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.booking-title {
  margin: 0;
  font-weight: 600;
}

.booking-when {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}

.booking-fields {
  display: grid;
  gap: 2px;
  margin: 6px 0 0;
  font-size: 14px;
}

.booking-fields div {
  display: grid;
  grid-template-columns: 7.5em minmax(0, 1fr);
  gap: 8px;
}

.booking-fields dt {
  color: var(--muted);
}

.booking-fields dd {
  margin: 0;
}

.booking-fields .none {
  color: var(--muted);
  opacity: 0.7;
}

.copy {
  margin-left: 6px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--lapis);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.copy:hover {
  border-color: var(--lapis);
}

.todo-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.todo-reset {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13.5px;
  text-decoration: underline;
  cursor: pointer;
}

.todo-count {
  margin-left: 4px;
  color: var(--muted);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.todo-group.is-done .todo-count {
  color: var(--done);
  font-weight: 600;
}

.todo-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
  cursor: pointer;
}

.todo-item input {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--done);
}

.todo-item small {
  color: var(--muted);
  font-size: 13.5px;
}

.todo-item input:checked + span {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent);
}

/* ---------- footer ---------- */

.foot {
  margin: 56px 0 0;
  padding: 28px 0 56px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.foot h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 18px;
}

.foot h3 {
  margin: 12px 0 4px;
  color: var(--ink);
  font-size: 14px;
}

.foot ul {
  display: grid;
  gap: 4px;
  margin: 0 0 18px;
  padding-left: 18px;
}

/* ---------- map markers ---------- */

.leaflet-container {
  background: var(--lapis-soft);
  font-family: inherit;
}

.leaflet-tile-pane {
  filter: grayscale(1) contrast(0.88) brightness(1.06);
}

@media (prefers-color-scheme: dark) {
  .leaflet-tile-pane {
    filter: grayscale(1) invert(1) contrast(0.85) brightness(0.9);
  }
}

.stop-pin-icon,
.city-icon {
  border: 0;
  background: none;
}

.stop-pin {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #1f3c88;
  box-shadow: 0 1px 5px rgba(27, 33, 66, 0.35);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stop-pin.is-small {
  width: 14px;
  height: 14px;
  font-size: 0;
}

.stop-pin.is-optional {
  border-color: #1f3c88;
  background: #fff;
  color: #1f3c88;
}

.stop-pin.is-active {
  background: var(--sun);
  color: #1b2142;
  box-shadow: 0 0 0 5px rgba(227, 162, 26, 0.35), 0 1px 5px rgba(27, 33, 66, 0.35);
}

.city {
  position: absolute;
  top: 0;
  left: 0;
}

.city-dot {
  position: absolute;
  top: -7px;
  left: -7px;
  width: 14px;
  height: 14px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #1f3c88;
  box-shadow: 0 0 0 1px #1f3c88, 0 1px 5px rgba(27, 33, 66, 0.3);
}

.city.is-via .city-dot {
  top: -5px;
  left: -5px;
  width: 10px;
  height: 10px;
  border: 2px solid #1f3c88;
  background: #fff;
  box-shadow: none;
}

.city.is-optional .city-dot {
  border-style: dotted;
}

.city-label {
  position: absolute;
  top: -12px;
  left: 12px;
  padding: 2px 8px;
  border: 1px solid #dde1ea;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(27, 33, 66, 0.12);
  color: #1b2142;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.city[data-side="left"] .city-label {
  right: 12px;
  left: auto;
}

.city[data-side="top"] .city-label,
.city[data-side="bottom"] .city-label {
  left: 0;
  transform: translateX(-50%);
}

.city[data-side="top"] .city-label {
  top: auto;
  bottom: 12px;
}

.city[data-side="bottom"] .city-label {
  top: 12px;
}

.city.is-label-hidden .city-label {
  display: none;
}

.city-icon:hover .city-label,
.city-icon:focus-visible .city-label {
  border-color: #1f3c88;
  color: #1f3c88;
}

.city-icon:focus-visible,
.stop-pin-icon:focus-visible {
  outline: none;
}

.city-icon:focus-visible .city-dot,
.stop-pin-icon:focus-visible .stop-pin {
  box-shadow: 0 0 0 4px rgba(31, 60, 136, 0.4);
}

.leaflet-popup-content-wrapper {
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(27, 33, 66, 0.18);
}

.leaflet-popup-content {
  margin: 12px 14px;
  color: #15171c;
  font-size: 14px;
  line-height: 1.5;
}

.leaflet-container .leaflet-popup-content p {
  margin: 0;
}

.popup-name {
  font-size: 15px;
  font-weight: 600;
}

.popup-note {
  color: #5a6171;
}

.popup-link {
  display: inline-block;
  margin-top: 4px;
  color: #1f3c88;
  font-weight: 600;
}

/* ---------- access lock (only when a code is set) ---------- */

.lock {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--now-bg);
  color: #fff;
}

.lock-form {
  width: min(100%, 340px);
}

.lock-form h2 {
  margin: 0;
  font-size: 24px;
}

.lock-form p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
}

.lock-form input {
  width: 100%;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font: inherit;
  font-size: 26px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3em;
  text-align: center;
}

.lock-form button {
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: #1f3c88;
  font-weight: 700;
  cursor: pointer;
}

.lock-form .lock-error {
  min-height: 1.5em;
  color: #f7c95c;
  font-weight: 600;
}

body.is-locked > :not(.lock) {
  visibility: hidden;
}

@media print {
  .bar,
  .day-map-box,
  .route-map,
  .actions,
  .copy,
  .todo-reset {
    display: none !important;
  }
}

/* Wallet drawer (assets/js/trip-wallet.js): the wallet slides in from the right. */
.wallet-scrim {
  position: fixed;
  z-index: 1100;
  inset: 0;
  background: rgba(15, 17, 22, 0.45);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.wallet-scrim.is-open {
  opacity: 1;
}

.wallet-drawer {
  position: fixed;
  z-index: 1101;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(460px, calc(100% - 28px));
  overflow: hidden;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  border-radius: 18px 0 0 18px;
  background: #f3f4f7;
  box-shadow: -12px 0 32px rgba(15, 17, 22, 0.3);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.wallet-drawer.is-open {
  transform: none;
}

.wallet-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #f3f4f7;
}

html.wallet-open,
html.wallet-open body {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .wallet-scrim,
  .wallet-drawer {
    transition: none;
  }
}
