:root {
  --bg: #f4efe6;
  --surface: #fffaf0;
  --ink: #18323c;
  --muted: #66787d;
  --line: rgba(24, 50, 60, 0.14);
  --sea: #1b9aaa;
  --coral: #ff7a59;
  --sand: #f0c36a;
  --shadow: 0 24px 70px rgba(24, 50, 60, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(244, 239, 230, 0.9);
  backdrop-filter: blur(14px);
}

.brand,
nav,
.actions,
.grid {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 900;
}

.brand span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--sea);
  color: #ffffff;
}

nav {
  gap: 18px;
  color: var(--muted);
}

nav a[aria-current="page"] {
  color: var(--sea);
  font-weight: 900;
}

.hero {
  position: relative;
  min-height: 82vh;
  overflow: hidden;
  padding: 118px clamp(18px, 5vw, 72px) 60px;
}

#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, var(--bg), transparent 78%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(3rem, 10vw, 8rem);
  line-height: 0.96;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.1;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
}

p {
  color: var(--muted);
}

.actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.actions a {
  min-height: 48px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  padding: 11px 18px;
  font-weight: 900;
}

.actions a:first-child {
  background: var(--ink);
  color: var(--bg);
}

.section {
  padding: 82px clamp(18px, 5vw, 72px);
}

.payment-hero {
  padding: 118px clamp(18px, 5vw, 72px) 72px;
  background:
    linear-gradient(135deg, rgba(27, 154, 170, 0.16), rgba(255, 122, 89, 0.1)),
    var(--bg);
}

.payment-hero h1 {
  max-width: 860px;
}

.payment-hero p {
  max-width: 760px;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.accounting-hero {
  padding: 118px clamp(18px, 5vw, 72px) 72px;
  background:
    linear-gradient(135deg, rgba(240, 195, 106, 0.18), rgba(27, 154, 170, 0.12)),
    var(--bg);
}

.accounting-hero h1,
.accounting-hero p {
  max-width: 820px;
}

.itinerary-hero {
  padding: 96px clamp(18px, 5vw, 72px) 38px;
  background: var(--bg);
}

.itinerary-hero h1 {
  max-width: 980px;
}

.itinerary-hero p {
  max-width: 760px;
  font-size: clamp(1.02rem, 2vw, 1.18rem);
}

.alt {
  background: var(--surface);
}

.grid {
  align-items: stretch;
  gap: 16px;
}

.three article,
.two article,
.stay-layout article,
.weather-panel,
.weather-card,
.aircraft-card,
.expense-form,
.settlement-panel,
.checklist,
.days li {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.9);
  box-shadow: var(--shadow);
}

.three article,
.two article,
.stay-layout article {
  flex: 1;
  padding: 24px;
}

.accounting-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(320px, 1fr);
  gap: 18px;
  align-items: start;
}

.expense-form,
.settlement-panel {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.expense-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 900;
}

.expense-form small {
  color: var(--muted);
  font-weight: 700;
}

.expense-form input,
.expense-form select {
  min-height: 46px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
}

.expense-form select[multiple] {
  min-height: 178px;
}

.splitter-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.splitter-option {
  display: flex !important;
  min-height: 42px;
  grid-template-columns: none !important;
  gap: 8px !important;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px 10px;
}

.splitter-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--sea);
}

.expense-form button,
.records-heading button,
.expense-table button {
  min-height: 42px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  cursor: pointer;
  padding: 8px 14px;
  font: inherit;
  font-weight: 900;
}

.accounting-source,
.settlement-hint {
  margin: 0;
  font-size: 0.94rem;
}

.settlement-list {
  display: grid;
  gap: 10px;
}

.settlement-item,
.settlement-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 239, 230, 0.64);
  padding: 14px;
}

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

.settlement-item b {
  color: var(--coral);
  font-size: 1.08rem;
}

.records-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.9);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.records-details summary {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  padding: 22px 24px;
}

.records-details summary::-webkit-details-marker {
  display: none;
}

.records-details summary h2,
.records-details summary p {
  margin-bottom: 0;
}

.records-details summary > span {
  color: var(--muted);
  font-weight: 900;
}

.records-details summary::after {
  content: "+";
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--sea);
  font-weight: 900;
}

.records-details[open] summary::after {
  content: "-";
}

.records-heading {
  display: flex;
  gap: 16px;
  align-items: end;
  justify-content: space-between;
  padding: 0 24px 18px;
}

.records-heading p {
  margin: 0;
}

.expense-table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--line);
}

.expense-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

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

.expense-table th {
  color: var(--sea);
  font-size: 0.84rem;
  text-transform: uppercase;
}

.expense-table button {
  min-height: 34px;
  background: transparent;
  color: var(--muted);
}

.my-spending {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.my-spending article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 239, 230, 0.64);
  padding: 14px;
}

.my-spending span {
  color: var(--sea);
  font-size: 0.84rem;
  font-weight: 900;
}

.my-spending strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.my-spending p {
  margin: 4px 0 0;
  font-size: 0.9rem;
}

.weather-section {
  background:
    linear-gradient(135deg, rgba(27, 154, 170, 0.08), rgba(240, 195, 106, 0.12)),
    var(--bg);
}

.weather-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
  padding: 24px;
}

.weather-panel span,
.weather-card span {
  color: var(--sea);
  font-size: 0.84rem;
  font-weight: 900;
}

.weather-panel p,
.weather-card p {
  margin-bottom: 0;
}

.weather-panel button {
  min-height: 46px;
  flex: 0 0 auto;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  cursor: pointer;
  padding: 10px 16px;
  font: inherit;
  font-weight: 900;
}

.weather-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.weather-card {
  padding: 20px;
  border-top: 8px solid var(--sea);
}

.weather-card:nth-child(2n) {
  border-top-color: var(--coral);
}

.weather-card:nth-child(3n) {
  border-top-color: var(--sand);
}

.weather-temp {
  display: block;
  margin: 10px 0 6px;
  color: var(--ink);
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 900;
  line-height: 1;
}

.weather-note {
  max-width: 860px;
  margin: 16px 0 0;
  font-size: 0.95rem;
}

.payment-card {
  position: relative;
  overflow: hidden;
}

.payment-card::after {
  position: absolute;
  right: -28px;
  bottom: -34px;
  width: 110px;
  height: 110px;
  border: 18px solid rgba(27, 154, 170, 0.12);
  border-radius: 999px;
  content: "";
}

.warning-card {
  border-color: rgba(255, 122, 89, 0.45);
}

.payment-list {
  display: grid;
  gap: 14px;
  max-width: 960px;
}

.payment-list article,
.quick-math {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.9);
  box-shadow: var(--shadow);
}

.payment-list article {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  padding: 20px;
}

.payment-list strong {
  color: var(--sea);
  font-size: 1.05rem;
}

.exchange-section .grid {
  margin-bottom: 16px;
}

.rate-card h3 {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.quick-math {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  padding: 18px 20px;
}

.quick-math span {
  color: var(--coral);
  font-weight: 900;
}

.quick-math p {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
}

.itinerary-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(230px, 1fr));
  gap: 16px;
  align-items: start;
  padding: 0 clamp(18px, 3vw, 38px) 72px;
  overflow-x: auto;
}

.day-column {
  display: grid;
  gap: 10px;
  min-width: 230px;
  border-radius: 8px;
  padding: 8px;
}

.day-column h2 {
  justify-self: start;
  margin: 0;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 1rem;
  line-height: 1.35;
}

.day-blue {
  background: #eef7ff;
}

.day-blue h2 {
  background: #b9ddff;
  color: #12619b;
}

.day-green {
  background: #eef8f2;
}

.day-green h2 {
  background: #bee6cb;
  color: #276f45;
}

.day-gray {
  background: #f4f2ef;
}

.day-gray h2 {
  background: #ded9d3;
  color: #5b5651;
}

.day-pink {
  background: #fff1f7;
}

.day-pink h2 {
  background: #f6c6d9;
  color: #a33767;
}

.day-yellow {
  background: #fff9e5;
}

.day-yellow h2 {
  background: #f0d783;
  color: #7a5b00;
}

.plan-card {
  border: 1px solid rgba(24, 50, 60, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(24, 50, 60, 0.08);
  padding: 14px;
}

.plan-card time {
  display: inline-block;
  margin-right: 6px;
  color: var(--ink);
  font-weight: 900;
}

.plan-card h3 {
  display: inline;
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}

.plan-card p {
  margin: 8px 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.tag {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  margin: 8px 6px 0 0;
  border-radius: 4px;
  background: #eef0f2;
  color: var(--ink);
  padding: 1px 8px;
  font-size: 0.82rem;
  font-weight: 800;
}

.tag-paid {
  background: #ffd9d1;
  color: #a23a25;
}

.tag-pass {
  background: #eadcff;
  color: #6c3c9d;
}

.tag-free {
  background: #d9ecff;
  color: #246aa7;
}

.tag-metro {
  background: #d9f5eb;
  color: #1f7658;
}

.tag-transfer {
  background: #fff0c7;
  color: #816000;
}

article span {
  color: var(--sea);
  font-size: 0.84rem;
  font-weight: 900;
}

.stay-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 16px;
  margin-top: 24px;
}

.link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.link-actions a {
  min-height: 46px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 900;
}

.link-actions a:first-child {
  background: var(--ink);
  color: var(--bg);
}

.stay-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stay-list li {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 239, 230, 0.56);
}

.stay-list strong {
  color: var(--sea);
}

.stay-list span {
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 700;
}

.ticket h3 {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
}

.flight-grid {
  margin-bottom: 16px;
}

.flight-route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 18px 0;
}

.flight-route strong {
  display: block;
  color: var(--ink);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1;
}

.flight-route p {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 900;
}

.flight-route small {
  color: var(--muted);
  font-weight: 800;
}

.flight-line {
  height: 2px;
  background: linear-gradient(90deg, var(--sea), var(--coral));
  position: relative;
}

.flight-line::after {
  position: absolute;
  top: 50%;
  right: -1px;
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--coral);
  border-right: 2px solid var(--coral);
  content: "";
  transform: translateY(-50%) rotate(45deg);
}

.aircraft-card {
  padding: 24px;
  border-left: 8px solid var(--sea);
}

.aircraft-card span {
  color: var(--sea);
  font-size: 0.84rem;
  font-weight: 900;
}

.aircraft-card p {
  max-width: 920px;
}

.days {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.days li {
  display: grid;
  gap: 8px;
  padding: 20px;
  border-top: 8px solid var(--sea);
}

.days li:nth-child(2n) {
  border-top-color: var(--coral);
}

.days span {
  color: var(--muted);
}

.notes {
  background: var(--ink);
  color: var(--bg);
}

.notes .eyebrow {
  color: var(--sand);
}

.checklist {
  display: grid;
  max-width: 680px;
  overflow: hidden;
  background: rgba(244, 239, 230, 0.16);
}

.checklist-tools {
  display: grid;
  gap: 12px;
  max-width: 680px;
  margin-bottom: 14px;
}

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

.checklist-add input {
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--bg);
  padding: 10px 14px;
  font: inherit;
}

.checklist-add input::placeholder {
  color: rgba(244, 239, 230, 0.58);
}

.checklist-add button,
.checklist label button {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: var(--sand);
  color: var(--ink);
  cursor: pointer;
  padding: 8px 14px;
  font: inherit;
  font-weight: 900;
}

.checklist-tools p,
.checklist-status {
  max-width: 680px;
  color: rgba(244, 239, 230, 0.72);
}

.checklist label {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin: 0;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--bg);
  font-weight: 800;
}

.checklist label button {
  min-height: 34px;
  background: transparent;
  color: rgba(244, 239, 230, 0.78);
}

.checklist input {
  width: 18px;
  height: 18px;
  accent-color: var(--sand);
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    width: 100%;
    overflow-x: auto;
  }

  .grid,
  .stay-layout,
  .weather-grid,
  .accounting-layout,
  .days {
    display: grid;
    grid-template-columns: 1fr;
  }

  .payment-list article {
    grid-template-columns: 1fr;
  }

  .flight-route {
    grid-template-columns: 1fr;
  }

  .flight-line {
    width: 2px;
    height: 34px;
  }

  .weather-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .checklist-add,
  .checklist label {
    grid-template-columns: 1fr;
  }

  .records-heading,
  .records-details summary,
  .my-spending,
  .settlement-item {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .records-details summary {
    display: grid;
  }
}

@media (max-width: 1180px) {
  .itinerary-board {
    grid-template-columns: repeat(5, 260px);
  }
}
