:root {
  color-scheme: dark;
  --navy: #0a1628;
  --navy-light: #10233c;
  --gold: #d4af37;
  --gold-soft: rgba(212, 175, 55, .13);
  --blue: #8fb4e8;
  --text: #e8edf5;
  --muted: #9aacc4;
  --line: rgba(220, 230, 245, .12);
  font-family: "PingFang TC", "Microsoft JhengHei", sans-serif;
}

* { box-sizing: border-box; }
body {
  min-width: 320px;
  margin: 0;
  padding-inline: env(safe-area-inset-left, 0px) env(safe-area-inset-right, 0px);
  color: var(--text);
  background:
    radial-gradient(ellipse at 12% 4%, rgba(212, 175, 55, .08), transparent 34rem),
    radial-gradient(ellipse at 95% 58%, rgba(74, 124, 201, .09), transparent 38rem),
    var(--navy);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; }
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
[hidden] { display: none !important; }

.page-shell { width: min(100%, 900px); margin: 0 auto; padding-bottom: 32px; }
.dev-chip {
  position: fixed;
  z-index: 20;
  top: max(12px, env(safe-area-inset-top, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  padding: 8px 18px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #d52332;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: .12em;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
}
.dev-chip:hover { background: #ec3342; box-shadow: 0 6px 22px rgba(0, 0, 0, .55); }
.dev-chip:focus-visible { outline-color: #fff; outline-offset: 4px; }
.hero {
  position: relative;
  min-height: 218px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 38px 20px 34px;
  text-align: center;
  background: linear-gradient(180deg, rgba(20, 42, 69, .76), rgba(10, 22, 40, .72));
  border-bottom: 1px solid rgba(212, 175, 55, .2);
}
.hero::before, .hero::after {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  content: "";
  filter: blur(60px);
  opacity: .2;
  pointer-events: none;
}
.hero::before { top: -110px; left: -60px; background: var(--gold); }
.hero::after { right: -80px; bottom: -150px; background: #4a7cc9; }
.snow {
  position: absolute;
  inset: 12px 0 auto;
  color: rgba(255,255,255,.16);
  font-size: 15px;
  letter-spacing: 8px;
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .2em;
}
h1, h2, h3, p { overflow-wrap: anywhere; }
.hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.7rem, 6vw, 2.45rem);
  letter-spacing: .08em;
  line-height: 1.35;
  text-shadow: 0 0 32px rgba(212,175,55,.18);
}
.hero h1 span { color: var(--gold); }
.hero-copy { margin: 9px 0 0; color: #b7c6db; font-size: .95rem; }

.tabs-wrap {
  position: sticky;
  z-index: 5;
  top: env(safe-area-inset-top, 0px);
  padding: 12px 18px;
  background: rgba(10, 22, 40, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  width: 100%;
  margin: 0 auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.035);
}
.tab {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 45px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 8px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.tab[aria-current="page"] { color: var(--navy); background: var(--gold); }
.tab:focus-visible { position: relative; z-index: 1; }
.tab-emoji { display: none; }
.tab-label { line-height: 1.35; }
.tab-meta {
  min-height: 1em;
  color: #a9bdd8;
  font-size: .66rem;
  font-weight: 500;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-align: center;
}
.tab-meta:empty { display: none; }
.tab[aria-current="page"] .tab-meta { color: #34445a; }
.tab[aria-disabled="true"] { cursor: not-allowed; }
.tab[aria-disabled="true"] .tab-meta { color: #c6a849; }
.tab-lock {
  position: absolute;
  top: 3px;
  right: 4px;
  font-size: .62rem;
  line-height: 1;
}
.tab-announcement {
  width: 100%;
  min-height: 0;
  margin: 0 auto;
  color: #c6d6ec;
  font-size: .78rem;
  text-align: center;
}
.tab-announcement:empty { display: none; }

.tab-panel { padding: 28px clamp(16px, 5vw, 42px) 0; }
.content-heading { margin: 0 0 20px; }
.content-heading .eyebrow { margin-bottom: 1px; }
.content-heading h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: #fff;
  font-size: 1.35rem;
  letter-spacing: .08em;
}
.content-heading h2::after {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, rgba(212,175,55,.48), transparent);
  content: "";
}
.content-heading > p:last-child { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.status {
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid rgba(143,180,232,.28);
  border-radius: 12px;
  background: rgba(74,124,201,.09);
  color: #cbd9ed;
}
.status-error { border-color: rgba(255,139,139,.45); background: rgba(160,47,55,.17); color: #ffd2d2; }
.status[hidden] { display: none; }
.fact-note, .choice-hint {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: .79rem;
}
.fact-note { padding-top: 12px; border-top: 1px solid var(--line); }
.choice-hint { margin: 0 0 14px; }

.content-grid { display: grid; gap: 14px; }
.data-intro {
  margin: 0;
  padding: 12px 15px;
  border: 1px solid rgba(143,180,232,.2);
  border-left: 3px solid var(--gold);
  border-radius: 11px;
  background: linear-gradient(110deg, rgba(212,175,55,.07), rgba(74,124,201,.06));
  color: #d3deec;
}
.data-section { margin: 23px 0 0; }
.trip-card-grid { display: grid; gap: 10px; }
.trip-card-grid > .data-card, .trip-card-grid > .data-card + .data-card { margin: 0; }
.data-section > h3, .group-title {
  margin: 0 0 11px;
  color: var(--gold);
  font-size: 1rem;
  letter-spacing: .06em;
}
.data-card, .shop-card, .item-card, .empty-state {
  min-width: 0;
  padding: clamp(13px, 2vw, 17px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
}
.data-card + .data-card, .shop-card + .shop-card, .item-card + .item-card { margin-top: 10px; }
.data-card h4, .shop-title, .item-title { margin: 0; color: #fff; font-size: 1rem; }
.data-card p { margin: 7px 0 0; color: #c4d1e2; }
.data-card h4 a {
  color: #b7d3ff;
  text-decoration: underline;
  text-underline-offset: .2em;
}
.data-card h4 a:hover { color: #fff; }
.data-card dl { display: grid; grid-template-columns: minmax(5.5rem, .38fr) minmax(0, 1fr); gap: 4px 12px; margin: 10px 0 0; }
.data-card dt, .data-card dd { min-width: 0; overflow-wrap: anywhere; }
.data-card dt { color: var(--muted); }
.data-card dd { margin: 0; color: #d6e0ee; }
.data-card h4, .shop-title, .item-title, .shop-description, .item-note, .data-list li { overflow-wrap: anywhere; }
.data-list { margin: 8px 0 0; padding-left: 1.25rem; color: #c4d1e2; }
.data-list li + li { margin-top: 5px; }
.shop-card { display: grid; gap: 13px; }
.shop-heading { min-width: 0; }
.shop-title { font-weight: 700; }
.shop-description, .item-note { margin: 4px 0 0; color: var(--muted); font-size: .87rem; }
.shop-levels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.level-button {
  min-width: 0;
  min-height: 44px;
  padding: 7px 5px;
  border: 1px solid rgba(220,230,245,.2);
  border-radius: 9px;
  background: rgba(255,255,255,.025);
  color: #c3cfde;
  font-size: clamp(.75rem, 2.4vw, .82rem);
  overflow-wrap: anywhere;
  cursor: pointer;
}
.level-button:hover { border-color: var(--gold); color: var(--gold); }
.level-button[aria-pressed="true"] { border-color: var(--gold); background: var(--gold-soft); color: var(--gold); font-weight: 700; }
.level-button[data-level="must"][aria-pressed="true"] { background: var(--gold); color: var(--navy); }
.level-button[data-level="explore"][aria-pressed="true"] { border-color: #6899d8; background: rgba(74,124,201,.2); color: var(--blue); }
.level-button:disabled, .native-check:disabled { cursor: wait; opacity: .6; }
.item-groups { display: grid; gap: 22px; }
.item-grid { display: grid; gap: 9px; }
.item-card { display: flex; align-items: flex-start; gap: 12px; padding: clamp(12px, 1.8vw, 15px); }
.native-check {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin: 3px 0 0;
  accent-color: var(--gold);
  cursor: pointer;
}
.item-copy { min-width: 0; }
.item-title { display: block; font-size: .94rem; font-weight: 600; }
.empty-state { color: var(--muted); text-align: center; }
.placeholder-grid { display: grid; gap: 12px; }
.placeholder-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
}
.placeholder-card h3 { margin: 0; color: var(--gold); font-size: 1rem; }
.placeholder-card p { margin: 7px 0 0; color: var(--muted); }
.photo-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.photo-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.file-picker, .photo-download, .photo-delete {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid rgba(212,175,55,.48);
  border-radius: 10px;
  background: var(--gold-soft);
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.file-picker:hover, .photo-download:hover, .photo-delete:hover { background: rgba(212,175,55,.22); }
.photo-delete:disabled { cursor: wait; opacity: .6; }
.photo-tools:focus-within .file-picker { outline: 3px solid #fff; outline-offset: 3px; }
.photo-notice { margin: 14px 0; color: var(--muted); font-size: .85rem; }
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.photo-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.035);
}
.photo-card img { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 8px; object-fit: cover; background: var(--navy-light); }
.photo-name { margin: 8px 0; color: #d6e0ee; font-size: .82rem; overflow-wrap: anywhere; }
.photo-meta { margin: -5px 0 8px; color: var(--muted); font-size: .72rem; overflow-wrap: anywhere; }
.photo-download { min-height: 40px; font-size: .85rem; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-delete {
  min-height: 40px;
  padding: 7px 12px;
  border: 1px solid rgba(255,139,139,.4);
  border-radius: 10px;
  background: rgba(160,47,55,.12);
  color: #ffd2d2;
  font-weight: 700;
  cursor: pointer;
}
.footer { padding: 34px 16px 0; color: #7488a3; text-align: center; font-size: .76rem; letter-spacing: .1em; }
.footer span { color: var(--gold); }

.packing-list {
  margin: 0;
  padding: 4px 0 0;
  list-style: none;
}
.packing-list li {
  margin: 9px 0;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
  color: #d6e0ee;
}
.packing-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.packing-summary { cursor: pointer; min-height: 44px; padding: 8px 0; }
.packing-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr); gap: 10px; align-items: center; }
.packing-info { min-width: 0; }
.packing-label { padding: 0; color: #fff; font-weight: 700; overflow-wrap: anywhere; }
.packing-note { margin: 4px 0 0; color: var(--muted); font-size: .87rem; }
.packing-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.packing-choice {
  display: flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(220,230,245,.25);
  border-radius: 9px;
  background: rgba(255,255,255,.025);
  color: #e8edf5;
  cursor: pointer;
  font-size: .8rem;
  overflow-wrap: anywhere;
}
.packing-choice input { width: 15px; height: 15px; flex: 0 0 auto; margin: 0; accent-color: var(--gold); }
.packing-choice input:checked + span { font-weight: 700; color: #f2d472; }
.packing-choice:has(input:focus-visible) { outline: 3px solid #fff; outline-offset: 2px; }
.packing-fieldset:disabled .packing-choice { cursor: wait; opacity: .65; }
.packing-feedback { margin: 8px 0 0; color: #cbd9ed; font-size: .85rem; }
.packing-feedback:empty { display: none; }
.packing-feedback.status-error { padding: 8px; border: 1px solid rgba(255,139,139,.45); border-radius: 8px; }
.packing-retry {
  min-height: 44px;
  margin-top: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(212,175,55,.6);
  border-radius: 9px;
  background: var(--gold-soft);
  color: #f2d472;
  font-weight: 700;
  cursor: pointer;
}
.route-notice { margin: 12px 18px 0; }

@media (min-width: 680px) {
  .hero { min-height: 258px; }
  .trip-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-card { grid-template-columns: minmax(0, 1fr) minmax(280px, .7fr); align-items: center; }
  .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .placeholder-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 850px) {
  .tabs { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .packing-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
  .packing-choices { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 679px) {
  .hero { padding-inline: clamp(16px, 5vw, 24px); }
  .tabs-wrap { padding-inline: clamp(12px, 4vw, 18px); }
  .tab-panel { padding-top: 24px; }
  .shop-levels { gap: clamp(4px, 1.5vw, 7px); }
  .tab { min-height: 52px; padding: 7px 3px; font-size: .84rem; }
  .tab-meta { font-size: .59rem; }
  .tab-lock { top: 2px; right: 2px; }
  .dev-chip { padding: 6px 13px; font-size: 1rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .tab { transition: background-color .24s ease, color .24s ease, box-shadow .24s ease; }
  .tab::after { transition: transform .24s ease, opacity .24s ease; }
  .level-button, .item-card { transition: background-color .16s ease, border-color .16s ease, color .16s ease; }
}

/* Original leaflet styling, scoped so the other app tabs keep their own layout. */
.trip-panel { padding: 28px clamp(16px, 5vw, 42px) 0; }
.leaflet {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 0 40px;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(212,175,55,.08) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(100,149,237,.07) 0%, transparent 50%),
    linear-gradient(180deg, #0b1a2f 0%, #0f2038 50%, #0a1628 100%);
}
.trip-hero {
  position: relative;
  display: block;
  width: 100%;
  max-width: 820px;
  margin-inline: auto;
  min-height: 0;
  padding: 16px 24px;
  overflow: hidden;
  text-align: center;
  border: 0;
  background:
    radial-gradient(ellipse at 50% -20%, rgba(212,175,55,.18) 0%, transparent 65%),
    linear-gradient(180deg, rgba(15,32,56,.6) 0%, rgba(10,22,40,.95) 100%);
}
.trip-hero::before, .trip-hero::after {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .35;
  content: "";
}
.trip-hero::before { width: 260px; height: 260px; top: -80px; left: -60px; background: #d4af37; }
.trip-hero::after { width: 200px; height: 200px; right: -40px; bottom: -60px; background: #4a7cc9; }
.trip-hero .snowflakes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  padding: 20px;
  color: rgba(255,255,255,.18);
  font-size: 14px;
  letter-spacing: 28px;
  line-height: 55px;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}
.trip-hero .hero-content { position: relative; z-index: 2; }
.trip-hero .hero-badge {
  display: inline-block;
  margin: 0;
  padding: 6px clamp(12px, 4vw, 18px);
  border: 1px solid rgba(212,175,55,.5);
  border-radius: 20px;
  color: #d4af37;
  font-size: clamp(12px, 3.8vw, 14px);
  font-weight: 500;
  letter-spacing: clamp(1px, .32vw, 2px);
  text-transform: uppercase;
}
.trip-hero .hero-message {
  max-width: 100%;
  margin: 8px auto 0;
  color: #e6d9b8;
  font-size: clamp(13px, 3.8vw, 15px);
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.source-date-notice {
  margin: 32px 40px 0;
  padding: 9px 13px;
  border-left: 2px solid #d4af37;
  border-radius: 5px;
  background: rgba(212,175,55,.07);
  color: #c5d3e8;
  font-size: 12px;
}
.leaflet .section { margin-top: 42px; padding: 0 40px; }
.leaflet .section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  color: #fff;
  font-family: "Noto Serif TC", "Noto Sans TC", serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 3px;
}
.leaflet .section-title::after { height: 1px; flex: 1; background: linear-gradient(90deg, rgba(212,175,55,.45), transparent); content: ""; }
.leaflet .section-desc { margin: 0 0 18px; color: #8fa4c0; font-size: 13px; letter-spacing: .5px; }
.leaflet .weather-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 28px 30px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
}
.leaflet .weather-temp { color: #d4af37; font-family: "Noto Serif TC", serif; font-size: 36px; font-weight: 700; line-height: 1.2; }
.leaflet .weather-temp small { display: block; margin-top: 4px; color: #8fa4c0; font-size: 14px; font-weight: 400; letter-spacing: 1px; }
.leaflet .weather-range { color: #7a8faa; font-size: 18px; }
.leaflet .weather-label { margin-bottom: 6px; color: #d4af37; font-size: 12px; font-weight: 500; letter-spacing: 2px; }
.leaflet .weather-list, .leaflet .list-box ul { margin: 0; padding: 0; list-style: none; color: #c5d3e8; font-size: 13px; }
.leaflet .weather-list li, .leaflet .list-box li { position: relative; padding: 5px 0 5px 20px; }
.leaflet .weather-list li::before { position: absolute; top: 7px; left: 0; color: #d4af37; font-size: 10px; content: "✦"; }
.leaflet .two-col, .leaflet .grid-3 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.leaflet .source-spaced { margin-top: 14px; }
.leaflet .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.leaflet .list-box, .leaflet .mini-card {
  min-width: 0;
  padding: 22px 24px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
}
.leaflet .list-box h3, .leaflet .mini-card h3 {
  margin: 0 0 12px;
  color: #d4af37;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
}
.leaflet .list-box li::before { position: absolute; top: 7px; left: 0; color: rgba(212,175,55,.6); font-size: 10px; content: "❄"; }
.leaflet .event-card {
  position: relative;
  margin-bottom: 16px;
  padding: 26px 28px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.055), rgba(255,255,255,.015));
}
.leaflet .event-card::before { position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: linear-gradient(180deg, #d4af37, rgba(212,175,55,.1)); content: ""; }
.leaflet .event-name { margin: 0 0 2px; color: #fff; font-size: 16px; font-weight: 700; letter-spacing: 1px; }
.leaflet .event-name-jp { margin-bottom: 12px; color: #7a8faa; font-size: 11px; letter-spacing: 1.5px; }
.leaflet .event-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; color: #a8b8d0; font-size: 12px; }
.leaflet .event-meta span::before { color: #d4af37; content: "▸ "; }
.leaflet .event-highlight { color: #d0daea; font-size: 13px; line-height: 1.8; }
.leaflet .event-highlight strong { color: #d4af37; font-weight: 500; }
.leaflet .mini-card { padding: 20px 18px; }
.leaflet .mini-card-icon { display: block; margin-bottom: 8px; font-size: 22px; }
.leaflet .mini-card h3 { margin-bottom: 6px; letter-spacing: 1px; }
.leaflet .mini-card p { margin: 0; color: #b8c8dc; font-size: 12.5px; line-height: 1.7; }
.leaflet .list-box li { padding-left: 20px; }
.leaflet .souvenir-list { columns: 2; column-gap: 28px; }
.leaflet .souvenir-list li { break-inside: avoid; }
.leaflet .closing {
  margin: 50px 40px 0;
  padding: 38px 30px;
  border-top: 1px solid rgba(212,175,55,.18);
  border-bottom: 1px solid rgba(212,175,55,.18);
  border-radius: 18px;
  background: radial-gradient(ellipse at 50% 50%, rgba(212,175,55,.06), transparent 70%);
  text-align: center;
}
.leaflet .closing p { margin: 0; color: #c5d3e8; font-size: 14px; letter-spacing: 1.5px; line-height: 2; }
.leaflet .closing .sig { margin-top: 14px; color: #d4af37; font-family: "Noto Serif TC", serif; font-size: 17px; font-weight: 600; letter-spacing: 3px; }
.leaflet .footer-note { margin-top: 28px; color: #4a5e78; font-size: 10px; letter-spacing: 2px; text-align: center; }
.footer { padding-top: 25px; }
@media (max-width: 650px) {
  .leaflet .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .packing-row { grid-template-columns: minmax(0, 1fr); }
  .leaflet .weather-card, .leaflet .two-col { grid-template-columns: 1fr; }
  .trip-hero { padding: 12px 16px; }
  .leaflet .section { padding: 0 22px; }
  .source-date-notice { margin-inline: 22px; }
  .leaflet .closing { margin-inline: 22px; padding-inline: 18px; }
}
@media (max-width: 380px) {
  .leaflet .souvenir-list { columns: 1; }
  .leaflet .section-title { font-size: 18px; letter-spacing: 1.5px; }
}
/* One scrollable navigation row, including at the narrowest viewport. */
.tabs {
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto;
  min-width: 110px;
  min-height: 48px;
  white-space: nowrap;
}
.tab::after {
  position: absolute;
  right: 20%;
  bottom: 3px;
  left: 20%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: "";
  opacity: 0;
  transform: scaleX(.55);
  pointer-events: none;
}
.tab[aria-current="page"] { box-shadow: 0 2px 12px rgba(212,175,55,.25); }
.tab[aria-current="page"]::after { opacity: .6; transform: scaleX(1); }
.tab-locked { opacity: .9; }
@media (max-width: 679px) {
  .page-shell { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .tabs-wrap {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column-reverse;
    padding: 6px max(8px, env(safe-area-inset-right, 0px))
      calc(6px + env(safe-area-inset-bottom, 0px))
      max(8px, env(safe-area-inset-left, 0px));
    border-top: 1px solid var(--line);
    border-bottom: 0;
  }
  .tabs { gap: 2px; padding: 3px; }
  .tab { flex: 1 0 44px; min-width: 44px; min-height: 48px; padding: 5px 2px; }
  .tab-emoji { display: block; font-size: 1.35rem; line-height: 1.2; }
  .tab-label { display: none; }
  .tab-meta {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .tab-lock { top: 2px; right: 3px; font-size: .6rem; }
  .tab-announcement:not(:empty) { padding: 4px 8px; }
}
.welcome {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}
.page-shell:has(.welcome:not([hidden])) { padding-bottom: 0; }
.welcome-card {
  width: min(100%, 520px);
  padding: clamp(24px, 7vw, 48px) clamp(18px, 6vw, 36px);
  border: 1px solid rgba(212,175,55,.3);
  border-radius: 24px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(212,175,55,.15), transparent 60%),
    linear-gradient(160deg, #10243f, #0a1628);
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  text-align: center;
}
.welcome-eyebrow { margin: 0; color: var(--gold); font-size: .72rem; letter-spacing: .15em; }
.welcome h1 { margin: 18px 0 8px; color: #fff; font-size: clamp(1.6rem, 7vw, 2.2rem); }
.welcome-message { margin: 0; color: #e6d9b8; font-size: .95rem; }
.countdown {
  padding: 16px;
  border: 1px solid rgba(212,175,55,.25);
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  text-align: center;
}
.countdown-home { margin: 24px 0 18px; }
.countdown-trip { margin: 0 0 26px; }
.countdown-label { margin: 0; color: var(--gold); font-size: .85rem; }
.countdown-value { margin: 4px 0; color: #fff; font-size: clamp(1.1rem, 5vw, 1.5rem); font-weight: 700; }
.welcome-start, .welcome-retry {
  min-height: 48px;
  padding: 10px 24px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}
.welcome-start { background: var(--gold); color: var(--navy); }
.welcome-start:disabled { opacity: .7; cursor: wait; }
.welcome-retry { margin: 0 0 12px; background: transparent; color: var(--text); }
.journey { margin-top: 20px; }
.journey-status { margin: 0 0 8px; color: #c5d3e8; font-size: .9rem; }
.journey-route {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding-top: 32px;
  color: var(--gold);
  font-size: .85rem;
}
.journey-route::before {
  position: absolute;
  top: 16px;
  right: 0;
  left: 0;
  border-top: 1px dashed rgba(212,175,55,.6);
  content: "";
}
.journey-plane {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 1.4rem;
  animation: journey-flight 1.65s ease-in-out forwards;
}
@keyframes journey-flight {
  from { left: 0; transform: translateY(3px); }
  50% { transform: translateY(-10px); }
  to { left: calc(100% - 1.4rem); transform: translateY(3px); }
}
@media (prefers-reduced-motion: reduce) {
  .journey-plane { animation: none; }
}
.packing-choice:has(input:checked) {
  border-color: var(--gold);
  background: var(--gold-soft);
}
.photo-tools:has(.photo-input:disabled) .file-picker { opacity: .6; cursor: not-allowed; }
@page { size: A4 portrait; margin: 0; }
@media print {
  .tabs-wrap, .source-date-notice, .footer { display: none !important; }
  .leaflet { max-width: none; width: 100%; padding: 0; margin: 0; }
  .trip-hero, .leaflet .weather-card, .leaflet .event-card, .leaflet .mini-card, .leaflet .list-box, .leaflet .closing { break-inside: avoid; page-break-inside: avoid; }
  .leaflet .page-break { break-before: page; page-break-before: always; }
  .leaflet .section-title { break-after: avoid; page-break-after: avoid; }
}
