:root {
  --ink: #17221e;
  --muted: #6b6254;
  --paper: #f7efe0;
  --paper-strong: #fff8e8;
  --teal: #0f5b54;
  --teal-dark: #093a36;
  --red: #a83a2f;
  --gold: #d7a64f;
  --jade: #72a987;
  --line: rgba(23, 34, 30, 0.14);
  --shadow: 0 18px 45px rgba(39, 28, 16, 0.16);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang HK", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: #153b36;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% -10%, rgba(215, 166, 79, 0.38), transparent 26rem),
    linear-gradient(180deg, #0f4d48 0%, #1d625a 24rem, var(--paper) 24rem, var(--paper) 100%);
  overflow-x: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(100vw, 390px);
  max-width: 390px;
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(247, 239, 224, 0.88), rgba(247, 239, 224, 0.94)),
    url("https://images.unsplash.com/photo-1528127269322-539801943592?auto=format&fit=crop&w=900&q=80");
  background-size: cover;
  background-attachment: fixed;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0 70px rgba(0, 0, 0, 0.32);
}

.hero {
  position: relative;
  min-height: 310px;
  padding: 28px 22px 22px;
  overflow: hidden;
  color: #fff8e8;
  background:
    linear-gradient(180deg, rgba(9, 58, 54, 0.1), rgba(9, 58, 54, 0.88)),
    url("https://images.unsplash.com/photo-1559592413-7cec4d0cae2b?auto=format&fit=crop&w=900&q=80");
  background-size: cover;
  background-position: center;
  border-bottom-left-radius: 30px;
  border-bottom-right-radius: 30px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -24px;
  height: 70px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(247, 239, 224, 0.95) 0 64%, transparent 66%),
    linear-gradient(90deg, transparent, rgba(215, 166, 79, 0.45), transparent);
  opacity: 0.95;
}

.hero__content {
  position: relative;
  z-index: 2;
  padding-top: 112px;
}

.trip-date {
  margin: 0 0 8px;
  color: #f4c86b;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: 42px;
  line-height: 0.98;
  letter-spacing: 0;
}

.hero__subtitle {
  max-width: 330px;
  margin: 0;
  color: rgba(255, 248, 232, 0.9);
  font-size: 15px;
  line-height: 1.55;
}

.lantern {
  position: absolute;
  top: 24px;
  width: 45px;
  height: 64px;
  border-radius: 24px 24px 30px 30px;
  z-index: 1;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.26));
}

.lantern::before {
  content: "";
  position: absolute;
  inset: 9px 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.48);
  border-right: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: inherit;
}

.lantern::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -18px;
  width: 1px;
  height: 20px;
  background: rgba(255, 248, 232, 0.8);
}

.lantern--gold {
  right: 28px;
  background: linear-gradient(160deg, #f5d377, var(--gold) 62%, #b8732e);
}

.lantern--red {
  right: 88px;
  top: 52px;
  width: 34px;
  height: 50px;
  background: linear-gradient(160deg, #d96a51, var(--red));
}

.bamboo {
  position: absolute;
  top: -18px;
  width: 7px;
  height: 180px;
  background: rgba(245, 222, 155, 0.42);
  transform: rotate(18deg);
}

.bamboo::before,
.bamboo::after {
  content: "";
  position: absolute;
  left: -18px;
  width: 42px;
  height: 1px;
  background: rgba(245, 222, 155, 0.42);
}

.bamboo::before {
  top: 54px;
  transform: rotate(34deg);
}

.bamboo::after {
  top: 102px;
  transform: rotate(-28deg);
}

.bamboo--left {
  left: 22px;
}

.bamboo--right {
  right: 12px;
  transform: rotate(-15deg);
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 12px 14px;
  margin-top: -2px;
  background: rgba(247, 239, 224, 0.86);
  backdrop-filter: blur(18px);
}

.tab {
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(255, 248, 232, 0.76);
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 390px) {
  h1 {
    font-size: 38px;
  }

  .tabs {
    gap: 6px;
    padding-inline: 10px;
  }

  .tab {
    font-size: 13px;
  }
}

.tab.is-active {
  color: #fff8e8;
  background: var(--teal);
  border-color: var(--teal);
  box-shadow: 0 10px 18px rgba(15, 91, 84, 0.24);
}

main {
  padding: 4px 14px 28px;
}

.panel {
  display: none;
}

.panel.is-active {
  display: block;
}

.section-heading {
  padding: 20px 4px 12px;
}

.section-heading h2 {
  margin-bottom: 6px;
  color: var(--teal-dark);
  font-size: 28px;
  line-height: 1.1;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.day-card,
.advice-card,
.weather-card,
.link-item,
.backup-item,
.food-item,
.guide-card {
  border: 1px solid rgba(119, 81, 42, 0.17);
  border-radius: 18px;
  background: rgba(255, 248, 232, 0.86);
  box-shadow: var(--shadow);
}

.day-card {
  margin-bottom: 14px;
  overflow: hidden;
}

.day-summary {
  display: grid;
  grid-template-columns: 58px 1fr 18px;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.day-summary strong {
  display: block;
  font-size: 16px;
  line-height: 1.25;
}

.day-summary small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.date-badge {
  display: grid;
  place-items: center;
  min-height: 72px;
  border-radius: 15px;
  color: #fff8e8;
  background: linear-gradient(180deg, var(--red), #7e2b26);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.date-badge strong {
  font-size: 28px;
  line-height: 0.9;
}

.date-badge small {
  margin: 0;
  color: rgba(255, 248, 232, 0.86);
  font-size: 10px;
  font-weight: 800;
}

.chevron {
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--teal);
  border-bottom: 2px solid var(--teal);
  transform: rotate(45deg);
  transition: transform 180ms ease;
}

.day-summary[aria-expanded="true"] .chevron {
  transform: rotate(225deg);
}

.day-detail {
  display: none;
  padding: 0 14px 16px;
}

.day-detail.is-open {
  display: block;
}

.timeline {
  position: relative;
  padding-left: 4px;
}

.timeline__item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.timeline__item time {
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
}

.timeline__item strong {
  display: block;
  margin-bottom: 4px;
  color: var(--teal-dark);
  font-size: 15px;
}

.timeline__item p,
.mini-card p,
.advice-card p,
.backup-item p,
.link-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.52;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.action-row a,
.link-item a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: #fff8e8;
  background: var(--teal);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.option-grid,
.weather-grid {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.mini-card {
  padding: 12px;
  border-radius: 14px;
  background: rgba(15, 91, 84, 0.08);
}

.mini-card strong {
  display: block;
  margin-bottom: 5px;
  color: var(--teal-dark);
  font-size: 14px;
}

.weather-grid {
  grid-template-columns: 1fr 1fr;
}

.weather-card {
  min-height: 152px;
  padding: 16px;
  background:
    linear-gradient(160deg, rgba(15, 91, 84, 0.9), rgba(8, 49, 45, 0.94)),
    url("https://images.unsplash.com/photo-1583417319070-4a69db38a482?auto=format&fit=crop&w=500&q=80");
  background-size: cover;
  color: #fff8e8;
}

.weather-card span {
  display: block;
  color: #f4c86b;
  font-size: 12px;
  font-weight: 900;
}

.weather-card strong {
  display: block;
  margin: 20px 0 6px;
  font-size: 25px;
  line-height: 1;
}

.weather-card p {
  margin: 0;
  color: rgba(255, 248, 232, 0.82);
  font-size: 12px;
  line-height: 1.45;
}

.forecast-section {
  margin-top: 16px;
}

.forecast-section h3 {
  margin: 0 0 10px 4px;
  color: var(--teal-dark);
  font-size: 20px;
  line-height: 1.2;
}

.forecast-group {
  margin-bottom: 14px;
}

.forecast-group h4 {
  margin: 0 0 8px 4px;
  color: var(--red);
  font-size: 14px;
  font-weight: 900;
}

.forecast-list {
  display: grid;
  gap: 8px;
}

.forecast-item {
  display: grid;
  grid-template-columns: minmax(82px, 0.9fr) minmax(60px, 0.8fr) minmax(104px, 1.15fr);
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid rgba(119, 81, 42, 0.14);
  border-radius: 14px;
  background: rgba(255, 248, 232, 0.84);
  box-shadow: 0 10px 24px rgba(39, 28, 16, 0.08);
}

.forecast-item strong {
  color: var(--teal-dark);
  font-size: 13px;
  line-height: 1.25;
}

.forecast-item span {
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
}

.forecast-item small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
}

.forecast-item--muted {
  opacity: 0.72;
}

.advice-card {
  margin-top: 14px;
  padding: 16px;
}

.advice-card h3,
.backup-section h3 {
  margin-bottom: 8px;
  color: var(--teal-dark);
  font-size: 18px;
}

.advice-card ul {
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.link-list,
.backup-list,
.food-list,
.guide-list {
  display: grid;
  gap: 10px;
}

.link-item,
.backup-item,
.food-item,
.guide-card {
  padding: 14px;
}

.link-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.link-item strong,
.backup-item strong,
.food-item strong,
.guide-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--teal-dark);
  font-size: 15px;
}

.food-section,
.guide-section {
  margin-bottom: 18px;
}

.food-section h3,
.guide-section h3 {
  margin: 0 0 10px 4px;
  color: var(--teal-dark);
  font-size: 20px;
}

.food-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.food-item span {
  display: block;
  margin-bottom: 6px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.food-item p,
.guide-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.52;
}

.food-item a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 999px;
  color: #fff8e8;
  background: var(--teal);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.backup-section {
  margin-bottom: 18px;
}

.backup-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.rating {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  color: #6a3e08;
  background: rgba(215, 166, 79, 0.28);
  font-size: 12px;
  font-weight: 900;
}

@media (min-width: 700px) {
  body {
    padding: 24px 0;
  }

  .app-shell {
    margin: 0 auto;
    border-radius: 34px;
    overflow: hidden;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .panel.is-active {
    animation: panelIn 220ms ease both;
  }

  @keyframes panelIn {
    from {
      opacity: 0;
      transform: translateY(8px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
