/* Montenegro · five days — editorial low-poly travel plan */

:root {
  --paper: #eef1ef;
  --paper-soft: #e3e9e5;
  --surface: #f8faf9;
  --ink: #14201d;
  --ink-soft: #4d5c56;
  --ink-faint: #6c7c75;
  --line: #d2dbd6;
  --sea: #2b6c78;
  --sea-deep: #1a4d57;
  --forest: #2e5a4b;
  --moss: #7d9885;
  --clay: #a1794a;
  --sun: #c1a068;
  --wash: radial-gradient(96% 62% at 50% 0%, #f8faf8 0%, rgba(248, 250, 248, 0) 68%);
  --shadow: 0 22px 44px -30px rgba(14, 30, 28, .5);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Songti SC", "Noto Serif CJK SC", "Noto Serif SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0c1412;
    --paper-soft: #131e1b;
    --surface: #16221f;
    --ink: #eef2ef;
    --ink-soft: #a7b3ad;
    --ink-faint: #7c8a84;
    --line: #26332f;
    --sea: #74b4bd;
    --sea-deep: #93cdd4;
    --forest: #8ab89f;
    --moss: #9dbaa6;
    --clay: #c9a377;
    --sun: #dcc189;
    --wash: radial-gradient(96% 62% at 50% 0%, #13201c 0%, rgba(19, 32, 28, 0) 70%);
    --shadow: 0 22px 44px -30px rgba(0, 0, 0, .85);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  background-image: var(--wash);
  background-repeat: no-repeat;
  background-size: 100% 900px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: .01em;
  margin: 0;
}

p { margin: 0; }

.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.brand b { font-weight: 600; }

.brand span { color: var(--ink-faint); }

.topnav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.topnav a {
  text-decoration: none;
  font-size: 12.5px;
  letter-spacing: .06em;
  color: var(--ink-soft);
  padding: 7px 11px;
  border-radius: 999px;
  white-space: nowrap;
}

.topnav a:hover,
.topnav a:focus-visible { background: var(--paper-soft); color: var(--ink); }

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 38px;
  align-items: end;
  padding: 46px 0 34px;
}

.hero-copy { padding-bottom: 6px; }

.hero-num {
  font-family: var(--serif);
  font-size: 52px;
  line-height: 1;
  color: var(--ink);
  letter-spacing: .02em;
}

.hero-rule {
  width: 34px;
  height: 1px;
  background: var(--ink-faint);
  margin: 16px 0 20px;
}

.hero h1 {
  font-size: clamp(32px, 4.4vw, 44px);
  margin-bottom: 14px;
}

.hero h1 em {
  font-style: normal;
  color: var(--sea-deep);
}

.hero-lede {
  color: var(--ink-soft);
  font-size: 14px;
  max-width: 30ch;
}

.hero-meta {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 10px;
}

.hero-meta i { font-style: normal; color: var(--ink-faint); opacity: .6; }

/* browser frame */

.frame {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.frame-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-soft);
}

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.dot:nth-child(1) { background: #b98a63; }
.dot:nth-child(2) { background: var(--sun); }
.dot:nth-child(3) { background: var(--moss); }

.frame-url {
  margin-left: 10px;
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--ink-faint);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.frame-body {
  position: relative;
  aspect-ratio: 16 / 9.6;
  overflow: hidden;
  background: #a6c2c6;
}

.frame-body > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}

.frame-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(12, 32, 38, .52) 0%, rgba(12, 32, 38, .28) 38%, rgba(12, 32, 38, 0) 66%),
    linear-gradient(to top, rgba(12, 32, 38, .34) 0%, rgba(12, 32, 38, 0) 44%);
}

.frame-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: clamp(14px, 2.2vw, 24px);
  color: #f8faf9;
}

.frame-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.frame-nav .fn-links { display: none; }

.frame-nav .fn-links a {
  text-decoration: none;
  color: rgba(248, 250, 249, .84);
  margin-left: 16px;
}

.frame-nav .fn-brand { font-weight: 600; letter-spacing: .2em; }

.frame-cta {
  border: 1px solid rgba(248, 250, 249, .55);
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}

.frame-headline {
  margin-top: auto;
  max-width: 15ch;
}

.frame-headline h2 {
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: .96;
  letter-spacing: .01em;
  text-shadow: 0 2px 24px rgba(8, 25, 30, .35);
}

.frame-headline .zh {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: clamp(14px, 1.7vw, 18px);
  letter-spacing: .16em;
  color: rgba(248, 250, 249, .92);
}

.frame-actions {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 18px;
  border-radius: 999px;
  background: #f8faf9;
  color: #12302f;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .7);
}

.pill-link:hover { background: #e3ebe7; }

.frame-index {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  color: rgba(248, 250, 249, .92);
}

.frame-arrow {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(248, 250, 249, .5);
  display: grid;
  place-items: center;
  font-size: 11px;
}

.frame-tags {
  position: absolute;
  top: 50%;
  right: clamp(14px, 2.2vw, 24px);
  transform: translateY(-50%);
  text-align: right;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .2em;
  line-height: 2.1;
  text-transform: uppercase;
  color: rgba(248, 250, 249, .8);
}

/* ---------- stats ---------- */

.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat {
  padding: 20px 18px 22px;
  border-left: 1px solid var(--line);
}

.stat:first-child { border-left: 0; padding-left: 0; }

.stat .val {
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.2;
}

.stat .val small { font-size: .55em; letter-spacing: .04em; color: var(--ink-soft); }

.stat .lab { margin-top: 6px; font-size: 9.5px; }

/* ---------- section shell ---------- */

.section { padding: 74px 0 0; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 30px;
}

.section-head .kicker { display: block; margin-bottom: 12px; }

.section-head h2 {
  font-size: clamp(26px, 3.6vw, 36px);
}

.section-head .sub {
  max-width: 40ch;
  color: var(--ink-soft);
  font-size: 13.5px;
  padding-bottom: 4px;
}

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

.route-list {
  border-top: 1px solid var(--line);
}

.route-row {
  display: grid;
  grid-template-columns: 44px 104px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}

.route-row:hover .route-title { color: var(--sea-deep); }

.route-row .rn {
  font-family: var(--serif);
  font-size: 19px;
  color: var(--ink-faint);
}

.route-thumb {
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--paper-soft);
}

.route-thumb img { width: 100%; height: 100%; object-fit: cover; }

.route-title {
  font-family: var(--serif);
  font-size: clamp(17px, 2.1vw, 21px);
  transition: color .2s ease;
}

.route-sub {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.route-meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--ink-faint);
  text-transform: uppercase;
  text-align: right;
  white-space: nowrap;
}

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

.foot {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  padding: 26px 22px 60px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: baseline;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-faint);
}

.foot .mono { font-size: 9.5px; }

/* ---------- responsive ---------- */

@media (min-width: 760px) {
  .frame-nav .fn-links { display: flex; }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    align-items: start;
    padding-top: 30px;
  }
  .hero h1 { font-size: clamp(30px, 7.2vw, 40px); }
  .hero-num { font-size: 40px; }
  .hero-lede { max-width: 46ch; }
  .frame-tags { display: none; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { border-left: 0; border-top: 1px solid var(--line); padding: 16px 0 18px; }
  .stat:nth-child(2n) { padding-left: 18px; border-left: 1px solid var(--line); }
  .stat:nth-child(1), .stat:nth-child(2) { border-top: 0; }
  .route-row { grid-template-columns: 32px 74px minmax(0, 1fr); gap: 12px; padding: 13px 0; }
  .route-meta { display: none; }
  .section { padding-top: 56px; }
  .foot { padding: 24px 18px 48px; }
  .frame-headline { max-width: 100%; }
  .frame-headline h2 { font-size: clamp(27px, 8.4vw, 38px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
/* ---------- map / route explorer ---------- */

.map-card {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.map-figure {
  position: relative;
  margin: 0;
  padding: 10px 6px;
  background: var(--paper-soft);
  border-right: 1px solid var(--line);
  min-width: 0;
}

.map-figure svg { width: 100%; height: auto; display: block; }

.map-note {
  position: absolute;
  left: 14px;
  bottom: 10px;
  font-size: 9px;
  letter-spacing: .16em;
  color: var(--ink-faint);
}

:root {
  --map-sea: #2b6c78;
  --map-sea-2: #35808c;
  --map-sea-3: #1d5159;
  --map-sea-4: #5493a0;
  --map-land: #e2e8e4;
  --map-land-2: #d3dcd6;
  --map-land-3: #eef2ef;
  --map-mount: #a6b7ac;
  --map-mount-2: #8b9e93;
  --map-mount-3: #c6d2c9;
  --map-route: #f7faf7;
  --map-pin: #a1794a;
  --map-pin-active: #14201d;
  --map-pin-text: #f8faf9;
  --map-shadow: rgba(20, 40, 36, .18);
}

@media (prefers-color-scheme: dark) {
  :root {
    --map-sea: #1d5560;
    --map-sea-2: #246772;
    --map-sea-3: #16434c;
    --map-sea-4: #2f7d89;
    --map-land: #26332d;
    --map-land-2: #202c27;
    --map-land-3: #2e3d35;
    --map-mount: #3a4d40;
    --map-mount-2: #2d3d33;
    --map-mount-3: #465b4a;
    --map-route: #eef2ef;
    --map-pin: #c9a377;
    --map-pin-active: #eef2ef;
    --map-pin-text: #16211d;
    --map-shadow: rgba(0, 0, 0, .5);
  }
}

.pin {
  cursor: pointer;
  outline: none;
}

.pin circle {
  fill: var(--map-pin);
  stroke: var(--map-route);
  stroke-width: 2.5;
  transition: r .18s ease, fill .18s ease;
}

.pin text {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  fill: #f8faf9;
  text-anchor: middle;
  pointer-events: none;
}

.pin .pin-hit { fill: transparent; stroke: none; }

.pin:hover circle,
.pin:focus-visible circle { r: 16; }

.pin.is-active circle { fill: var(--map-pin-active); r: 17; }
.pin.is-active text { fill: var(--map-pin-text); }

.pin-label {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .14em;
  fill: var(--map-land-3);
  paint-order: stroke;
  stroke: rgba(20, 45, 42, .38);
  stroke-width: 3;
  stroke-linejoin: round;
  pointer-events: none;
  text-transform: uppercase;
}

@media (prefers-color-scheme: dark) {
  .pin-label { fill: #e6ece8; stroke: rgba(0, 0, 0, .45); }
  .pin text { fill: #f8faf9; }
  .pin.is-active text { fill: var(--map-pin-text); }
}

.map-route-line {
  fill: none;
  stroke: var(--map-route);
  stroke-width: 2.4;
  stroke-dasharray: 7 8;
  stroke-linecap: round;
  opacity: .9;
}

.map-compass {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .2em;
  fill: var(--map-land-3);
  opacity: .8;
}

.map-panel {
  padding: 26px clamp(18px, 2.4vw, 30px) 22px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.map-panel .stop-kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--sea-deep);
  text-transform: uppercase;
}

.map-panel h3 {
  margin-top: 10px;
  font-size: clamp(22px, 2.6vw, 27px);
}

.map-panel .stop-desc {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 13.5px;
}

.map-facts {
  margin: 18px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.map-facts div { min-width: 0; }

.map-facts dt {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.map-facts dd {
  margin: 2px 0 0;
  font-family: var(--serif);
  font-size: 15px;
}

.map-jump {
  margin-top: 18px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  text-decoration: none;
}

.map-jump:hover { background: var(--ink); color: var(--paper); }

.map-chips {
  margin-top: auto;
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 32px;
  padding: 4px 11px;
  cursor: pointer;
}

.chip:hover { border-color: var(--ink-faint); color: var(--ink); }

.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

@media (max-width: 860px) {
  .map-card { grid-template-columns: minmax(0, 1fr); }
  .map-figure { border-right: 0; border-bottom: 1px solid var(--line); }
  .map-panel { padding: 20px 18px; }
  .map-chips { padding-top: 18px; }
}

/* ---------- day chapters ---------- */

.pace-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  margin-bottom: 34px;
}

.pace-bar p { font-size: 12.5px; color: var(--ink-soft); }

.pace-switch {
  display: inline-flex;
  padding: 3px;
  gap: 3px;
  background: var(--paper-soft);
  border-radius: 999px;
  border: 1px solid var(--line);
}

.pace-switch button {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 12.5px;
  min-height: 34px;
  padding: 5px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.pace-switch button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.day {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(20px, 3.4vw, 46px);
  padding: 34px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 80px;
}

.day:first-of-type { border-top: 0; padding-top: 0; }

.day-visual { min-width: 0; }

.day-img {
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--paper-soft);
}

.day-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }

.day:hover .day-img img { transform: scale(1.02); }

.day-num {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--ink-faint);
  margin-top: 14px;
  text-transform: uppercase;
}

.day-num b { font-family: var(--serif); font-size: 26px; font-weight: 500; color: var(--ink); letter-spacing: 0; }

.day-body { min-width: 0; }

.day-body h3 {
  font-size: clamp(23px, 3vw, 30px);
  margin-bottom: 6px;
}

.day-place {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sea-deep);
}

.day-lede {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 14px;
}

.timeline {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.timeline li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.timeline .t {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink-faint);
}

.timeline .what { font-size: 13.5px; }

.timeline .what b { font-weight: 500; }

.timeline .what span { display: block; color: var(--ink-soft); font-size: 12.5px; margin-top: 2px; }

.day-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.tag {
  font-size: 11px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
}

.day-tip {
  margin-top: 16px;
  padding: 12px 14px;
  border-left: 2px solid var(--clay);
  background: rgba(161, 121, 74, .09);
  background: color-mix(in srgb, var(--clay) 7%, transparent);
  border-radius: 0 10px 10px 0;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.day-tip b {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

.day.is-flash { animation: flash 1.4s ease; }

@keyframes flash {
  0%, 100% { background: transparent; }
  25% { background: rgba(43, 108, 120, .1); }
  25% { background: color-mix(in srgb, var(--sea) 9%, transparent); }
}

.alt-note {
  display: none;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--ink-soft);
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}

body[data-pace="mountain"] .alt-note { display: block; }

@media (max-width: 820px) {
  .day { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 26px 0; }
  .day-img { aspect-ratio: 16 / 10; }
  .day-num { margin-top: 10px; }
}
/* ---------- budget ---------- */

.budget {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.budget-controls {
  padding: 24px clamp(18px, 2.4vw, 26px);
  border-right: 1px solid var(--line);
  background: var(--paper-soft);
  min-width: 0;
}

.control + .control { margin-top: 22px; }

.control-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.control-head label,
.control-head .cl {
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--ink-soft);
}

.control-head output {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 26px;
  margin: 6px 0 0;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 3px;
  background: var(--line);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -8.5px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--paper-soft);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
}

input[type="range"]::-moz-range-track {
  height: 3px;
  border-radius: 3px;
  background: var(--line);
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--paper-soft);
}

.seg {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.seg button {
  flex: 1;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  font-family: var(--sans);
  cursor: pointer;
  padding: 4px 6px;
}

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

.switchline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.switchline button {
  flex: none;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--line);
  position: relative;
  cursor: pointer;
  padding: 0;
}

.switchline button::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
  transition: transform .18s ease;
}

.switchline button[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); }
.switchline button[aria-pressed="true"]::after { transform: translateX(20px); }

.budget-result {
  padding: 24px clamp(18px, 2.6vw, 30px) 26px;
  min-width: 0;
}

.budget-total-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.budget-total {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.budget-total strong {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 5vw, 46px);
  line-height: 1;
  color: var(--sea-deep);
}

.budget-total .cny {
  font-size: 12.5px;
  color: var(--ink-soft);
}

.budget-sub {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-soft);
}

.breakdown {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.breakdown li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.bd-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.bd-row span:last-child { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; }

.bd-bar {
  height: 4px;
  margin-top: 7px;
  border-radius: 4px;
  background: var(--paper-soft);
  overflow: hidden;
}

.bd-bar i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--sea);
  transition: width .35s ease;
}

.breakdown li:nth-child(2) .bd-bar i { background: var(--moss); }
.breakdown li:nth-child(3) .bd-bar i { background: var(--clay); }
.breakdown li:nth-child(4) .bd-bar i { background: var(--sun); }

.budget-note {
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--ink-faint);
  line-height: 1.6;
}

/* ---------- tips ---------- */

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.tip-card {
  padding: 22px 20px 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.tip-card .n {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--clay);
}

.tip-card h3 {
  margin-top: 10px;
  font-size: 19px;
}

.tip-card p {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.tip-card strong { color: var(--ink); font-weight: 500; }

@media (max-width: 820px) {
  .budget { grid-template-columns: minmax(0, 1fr); }
  .budget-controls { border-right: 0; border-bottom: 1px solid var(--line); }
}
/* ---------- packing list ---------- */

.packing {
  display: grid;
  grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 30px;
}

.packing-side { min-width: 0; }

.pack-progress {
  position: relative;
  width: 132px;
  height: 132px;
}

.ring { width: 132px; height: 132px; transform: rotate(-90deg); }

.ring-bg {
  fill: none;
  stroke: var(--line);
  stroke-width: 6;
}

.ring-fg {
  fill: none;
  stroke: var(--sea);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 326.7;
  transition: stroke-dashoffset .4s ease;
}

.pack-num {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.pack-num strong {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
  line-height: 1;
}

.pack-num .mono { font-size: 9px; }

.pack-status {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-soft);
  max-width: 26ch;
}

.pack-warning {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--clay);
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  min-width: 0;
}

.checklist li { border-bottom: 1px solid var(--line); }

.checklist label {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 13px 2px;
  cursor: pointer;
  min-height: 48px;
}

.checklist input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.box {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 6px;
  border: 1px solid var(--ink-faint);
  position: relative;
  transition: background .16s ease, border-color .16s ease;
}

.box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid var(--paper);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform .16s ease;
}

.checklist input:checked + .box {
  background: var(--forest);
  border-color: var(--forest);
}

.checklist input:checked + .box::after { transform: rotate(45deg) scale(1); }

.checklist input:focus-visible + .box {
  outline: 2px solid var(--sea-deep);
  outline-offset: 3px;
}

.checklist span b {
  display: block;
  font-size: 14px;
  font-weight: 500;
}

.checklist span em {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.checklist input:checked ~ span b {
  color: var(--ink-faint);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

/* ---------- join / rsvp ---------- */

.join {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: clamp(22px, 3.4vw, 50px);
  border-top: 1px solid var(--line);
  padding-top: 30px;
}

.join-form { min-width: 0; }

.field + .field { margin-top: 16px; }

.field label,
.field-label {
  display: block;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.field input[type="text"],
.field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 44px;
  resize: vertical;
}

.field input[type="text"]:focus,
.field textarea:focus {
  outline: 2px solid var(--sea-deep);
  outline-offset: 1px;
  border-color: transparent;
}

.field .seg { max-width: 260px; }

.join-submit {
  margin-top: 20px;
  min-height: 46px;
  padding: 10px 26px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 14px;
  cursor: pointer;
}

.join-submit:hover:not(:disabled) { background: var(--forest); border-color: var(--forest); }
.join-submit:disabled { opacity: .55; cursor: progress; }

.join-error {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--clay);
}

.join-ok {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--forest);
}

.join-wall { min-width: 0; }

.wall-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.wall-count { font-family: var(--serif); font-size: 17px; }

.wall-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 420px;
  overflow-y: auto;
}

.wall-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 14px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  color: var(--ink);
}

.wall-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13.5px;
}

.badge {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--forest);
  color: var(--forest);
  text-transform: uppercase;
}

.badge.maybe { border-color: var(--ink-faint); color: var(--ink-faint); }

.wall-note {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.wall-empty {
  padding: 22px 2px;
  font-size: 12.5px;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--line);
}

@media (max-width: 820px) {
  .packing { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .pack-progress, .ring { width: 108px; height: 108px; }
  .pack-num strong { font-size: 28px; }
  .pack-status { max-width: none; }
  .join { grid-template-columns: minmax(0, 1fr); }
  .wall-list { max-height: none; }
}
