:root {
  --bg: #f5f6f2;
  --surface: #ffffff;
  --surface-soft: #eef2ef;
  --ink: #1e2423;
  --muted: #687572;
  --line: #dce4df;
  --brand: #1f5e5b;
  --brand-dark: #174746;
  --brand-soft: #e1efec;
  --warning: #9c6500;
  --warning-soft: #fff4d6;
  --success: #177245;
  --success-soft: #e3f4e9;
  --danger: #ae3028;
  --danger-soft: #fde8e5;
  --shadow: 0 12px 32px rgba(31, 55, 49, 0.08);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-width: 320px; background: var(--bg); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.38; }

.app-shell { min-height: 100vh; max-width: 720px; margin: 0 auto; }
.site-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: calc(18px + env(safe-area-inset-top)) 18px 14px; background: var(--bg); }
.site-header h1 { margin: 2px 0 0; font-size: clamp(1.2rem, 5vw, 1.55rem); letter-spacing: -0.04em; }
.site-header h1 span { color: var(--brand); }
.eyebrow { margin: 0; color: var(--brand); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; }
.offline-badge { flex: 0 0 auto; padding: 7px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface); font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.offline-badge.is-ready { color: var(--success); border-color: #bfe2ca; background: var(--success-soft); }

#app-content { padding: 4px 16px calc(92px + env(safe-area-inset-bottom)); outline: none; }
.view { animation: appear 180ms ease-out; }
@keyframes appear { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.view-fallback { padding: 28px 4px; }
.view-fallback h2 { margin: 8px 0; font-size: 1.8rem; }
.view-fallback p:last-child { color: var(--muted); line-height: 1.7; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 12px 2px 14px; }
.compact-heading { align-items: center; }
.page-heading h2 { margin: 3px 0 0; font-size: clamp(1.7rem, 8vw, 2.4rem); letter-spacing: -0.06em; line-height: 1; }
.muted-separator { color: #a7b4b0; font-weight: 400; }
.date-range, .section-count { color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.intro-copy { margin: 0 2px 18px; color: var(--muted); line-height: 1.6; }

.hero-card, .next-action-card, .content-section, .notice-card, .info-card { margin-top: 14px; }
.hero-card { padding: 20px; border: 1px solid #d6e5e0; border-radius: 24px; background: var(--brand-soft); }
.hero-card h3 { margin: 6px 0 8px; font-size: clamp(1.25rem, 5.5vw, 1.65rem); letter-spacing: -0.04em; line-height: 1.25; }
.hero-card .hero-subtitle { margin: 0 0 5px; color: var(--brand-dark); font-weight: 800; }
.hero-card p:last-child { margin: 0; color: #46635d; line-height: 1.6; }
.next-action-card { padding: 22px 20px; border-radius: 24px; color: #fff; background: var(--brand); box-shadow: 0 14px 28px rgba(31, 94, 91, 0.2); }
.next-action-label { display: flex; align-items: center; gap: 8px; color: #cce6df; font-size: 0.78rem; font-weight: 800; }
.pulse-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #f3c75b; box-shadow: 0 0 0 5px rgba(243, 199, 91, 0.14); }
.next-action-time { margin-top: 13px; font-size: clamp(2.4rem, 14vw, 4rem); font-weight: 850; letter-spacing: -0.08em; line-height: 0.95; }
.next-action-title { margin-top: 10px; font-size: 1.15rem; font-weight: 800; }

.day-switcher { display: flex; gap: 6px; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; color: var(--brand-dark); background: var(--surface); font-size: 1.1rem; }
.icon-button:focus-visible, .nav-item:focus-visible, .day-summary:focus-visible, .filter-button:focus-visible, .text-button:focus-visible { outline: 3px solid #f0c65f; outline-offset: 2px; }

.transport-card { margin-top: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.critical-transport { color: #fff; border-color: var(--brand-dark); background: var(--brand-dark); }
.transport-topline, .info-card-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.transport-kicker { color: #b8ddd5; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; }
.transport-icon { font-size: 1.25rem; }
.transport-card h3 { margin: 8px 0 13px; font-size: 1.5rem; }
.route-row, .info-ktx-route { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.route-row > div:last-child, .info-ktx-route > div:last-child { text-align: right; }
.route-row strong, .info-ktx-route strong { display: block; font-size: 1.35rem; letter-spacing: -0.04em; }
.route-row span:not(.route-arrow), .info-ktx-route span:not(.route-arrow) { display: block; margin-top: 2px; color: #b8ddd5; font-size: 0.8rem; font-weight: 700; }
.route-arrow { color: #f4cf65; font-size: 1.4rem; font-weight: 800; text-align: center; }
.seat-row { display: flex; justify-content: space-between; gap: 10px; margin-top: 15px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.18); color: #fff; font-size: 0.92rem; font-weight: 800; }
.flight-card { border-left: 5px solid var(--brand); }
.flight-card .transport-kicker { color: var(--brand); }
.flight-card .route-row span:not(.route-arrow) { color: var(--muted); }
.flight-card .seat-row { border-color: var(--line); color: var(--ink); }
.booking-card { margin-top: 14px; padding: 18px; border: 1px solid #b8dfc4; border-radius: 22px; background: var(--success-soft); box-shadow: var(--shadow); }
.booking-topline { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.booking-kicker { color: var(--success); font-size: 0.76rem; font-weight: 850; letter-spacing: 0.04em; }
.booking-status { padding: 5px 8px; border-radius: 999px; color: #fff; background: var(--success); font-size: 0.65rem; font-weight: 900; letter-spacing: 0.06em; white-space: nowrap; }
.booking-card h3 { margin: 10px 0 13px; font-size: 1.28rem; letter-spacing: -0.03em; }
.booking-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.booking-meta div { padding-top: 9px; border-top: 1px solid #c9e7d1; }.booking-meta span, .booking-meta strong { display: block; }.booking-meta span { color: #4d7160; font-size: 0.73rem; }.booking-meta strong { margin-top: 2px; font-size: 0.88rem; }
.booking-confirmed-note { margin: 13px 0 0; color: var(--success); font-size: 0.8rem; font-weight: 800; }

.content-section { padding-top: 6px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 2px 9px; }
.section-heading h3 { margin: 0; font-size: 1.05rem; letter-spacing: -0.02em; }
.timeline { padding: 5px 0 2px; }
.timeline-item { display: grid; grid-template-columns: minmax(74px, 0.36fr) 18px 1fr; min-height: 49px; }
.timeline-time { padding-top: 2px; color: var(--muted); font-size: 0.8rem; font-weight: 750; line-height: 1.3; }
.timeline-line { position: relative; display: flex; justify-content: center; }
.timeline-line::before { content: ""; position: absolute; top: 0; bottom: -2px; width: 2px; background: var(--line); }
.timeline-item:last-child .timeline-line::before { bottom: 24px; }
.timeline-line span { position: relative; z-index: 1; width: 9px; height: 9px; margin-top: 5px; border: 2px solid var(--brand); border-radius: 50%; background: var(--bg); }
.timeline-body { padding: 0 0 17px 10px; line-height: 1.35; }
.timeline-body strong { display: block; font-size: 0.94rem; }
.timeline-body small { display: block; margin-top: 3px; color: var(--muted); font-size: 0.75rem; }
.timeline-item.important .timeline-time, .timeline-item.deadline .timeline-time { color: var(--brand-dark); }
.timeline-item.important .timeline-line span { background: var(--brand); }
.timeline-item.deadline .timeline-line span { border-color: var(--danger); background: var(--danger); }
.timeline-item.deadline .timeline-body strong { font-weight: 850; }

.reminder-section { padding: 17px 17px 15px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.reminder-list, .plain-list, .plan-card ul { margin: 0; padding: 0; list-style: none; }
.reminder-list { display: grid; gap: 10px; }
.reminder-list li { position: relative; padding-left: 23px; line-height: 1.5; }
.reminder-list li::before { content: "✓"; position: absolute; left: 0; top: 1px; color: var(--success); font-weight: 900; }
.notice-card { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.notice-icon { display: grid; flex: 0 0 auto; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; background: var(--brand); font-size: 0.8rem; font-weight: 850; }
.notice-card strong { display: block; font-size: 0.88rem; }
.notice-card p { margin: 3px 0 0; color: var(--muted); font-size: 0.82rem; line-height: 1.5; }
.pending-card { border-color: #efc8a6; background: #fff8ed; }
.pending-card .notice-icon { background: var(--warning); }
.neutral-card { margin-bottom: 6px; }

.plans-grid { display: grid; gap: 10px; }
.plan-card { padding: 15px; border: 1px solid var(--line); border-left: 5px solid; border-radius: 17px; background: var(--surface); }
.plan-green { border-left-color: var(--success); background: var(--success-soft); }
.plan-yellow { border-left-color: #d28d00; background: var(--warning-soft); }
.plan-red { border-left-color: var(--danger); background: var(--danger-soft); }
.plan-heading { display: flex; align-items: flex-start; gap: 9px; }
.plan-dot { flex: 0 0 auto; width: 12px; height: 12px; margin-top: 4px; border-radius: 50%; background: currentColor; }
.plan-green .plan-dot { color: var(--success); }.plan-yellow .plan-dot { color: #d28d00; }.plan-red .plan-dot { color: var(--danger); }
.plan-heading strong, .plan-heading span { display: block; }.plan-heading strong { font-size: 0.9rem; }.plan-heading span { margin-top: 2px; font-size: 0.78rem; }
.plan-card ul { display: grid; gap: 5px; margin-top: 11px; padding-left: 21px; list-style: disc; color: #45524f; font-size: 0.82rem; line-height: 1.35; }
.detail-section { padding: 16px; border-radius: 18px; background: var(--surface); }
.packing-section { padding: 16px; border-radius: 18px; background: var(--surface); }
.packing-grid { display: flex; flex-wrap: wrap; gap: 7px; }.packing-chip { padding: 7px 9px; border: 1px solid var(--line); border-radius: 999px; color: #465552; background: var(--surface-soft); font-size: 0.78rem; font-weight: 700; }
.plain-list { display: grid; gap: 8px; color: #465552; font-size: 0.86rem; line-height: 1.5; }
.plain-list li { position: relative; padding-left: 18px; }.plain-list li::before { content: "•"; position: absolute; left: 2px; color: var(--brand); font-weight: 900; }
.tone-warning li::before { color: var(--warning); }.detail-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }.detail-groups > div > strong { display: block; margin-bottom: 7px; font-size: 0.85rem; }

.day-list { display: grid; gap: 10px; }
.day-card { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 5px 18px rgba(31, 55, 49, 0.04); }
.day-seven-card { border-color: #a8d1ca; box-shadow: 0 8px 24px rgba(31, 94, 91, 0.1); }
.day-summary { display: grid; grid-template-columns: 62px 1fr 22px; gap: 10px; width: 100%; padding: 15px 13px; border: 0; color: var(--ink); background: transparent; text-align: left; }
.day-number { color: var(--brand); font-size: 0.83rem; font-weight: 850; }.day-number small { display: block; margin-top: 3px; color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.day-summary-copy strong, .day-summary-copy span { display: block; }.day-summary-copy strong { font-size: 0.92rem; line-height: 1.35; }.day-summary-copy span { margin-top: 4px; color: var(--muted); font-size: 0.76rem; line-height: 1.35; }
.chevron { align-self: center; color: var(--muted); font-size: 1.3rem; transition: transform 160ms ease; }.day-card.is-open .chevron { transform: rotate(180deg); }
.day-details { padding: 0 13px 16px; border-top: 1px solid var(--line); }.day-details .transport-card { margin-top: 13px; }.day-details .timeline { margin-top: 13px; }.day-details .plans-section { margin-top: 15px; }.day-details .plans-section .section-heading { display: none; }.day-details .notice-card { margin-top: 14px; }
.text-button { margin-top: 14px; padding: 7px 0; border: 0; color: var(--brand); background: transparent; font-size: 0.82rem; font-weight: 800; }

.prep-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 2px 15px; }.prep-toolbar p { margin: 0; color: var(--muted); font-size: 0.78rem; }.filter-button { padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--brand); background: var(--surface); font-size: 0.76rem; font-weight: 800; white-space: nowrap; }.filter-button.is-active { color: #fff; border-color: var(--brand); background: var(--brand); }
.remaining-count { display: flex; flex-direction: column; align-items: flex-end; color: var(--muted); font-size: 0.72rem; line-height: 1.1; }.remaining-count strong { color: var(--danger); font-size: 1.65rem; letter-spacing: -0.06em; }
.checklist-groups { display: grid; gap: 18px; }.checklist-heading { display: flex; justify-content: space-between; align-items: baseline; margin: 0 3px 8px; }.checklist-heading-button { display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; color: var(--ink); background: transparent; text-align: left; }.checklist-heading h3 { margin: 0; font-size: 1rem; }.checklist-heading h3 span { margin-right: 5px; }.checklist-heading > span { color: var(--muted); font-size: 0.74rem; font-weight: 700; }.category-chevron { font-size: 1.1rem; transition: transform 160ms ease; }.checklist-heading-button[aria-expanded="true"] .category-chevron { transform: rotate(180deg); }
.checklist-card { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }.check-item { display: flex; align-items: center; gap: 11px; min-height: 52px; padding: 9px 13px; border-bottom: 1px solid var(--line); cursor: pointer; }.check-item:last-child { border-bottom: 0; }.check-item input { position: absolute; opacity: 0; pointer-events: none; }.check-box { display: grid; flex: 0 0 auto; place-items: center; width: 23px; height: 23px; border: 2px solid #b7c5c0; border-radius: 7px; color: transparent; font-size: 0.9rem; font-weight: 900; }.check-label { font-size: 0.88rem; line-height: 1.4; }.check-item.is-checked .check-box { border-color: var(--success); color: #fff; background: var(--success); }.check-item.is-checked .check-label { color: var(--muted); text-decoration: line-through; }

.info-grid { display: grid; gap: 12px; }.info-card { padding: 17px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }.info-card-heading { margin-bottom: 13px; }.info-card-heading h3 { margin: 0; font-size: 1rem; }.info-card-heading span { font-size: 1.25rem; }.info-row { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 0.84rem; }.info-row strong { grid-row: span 2; font-size: 1rem; }.info-row span { color: var(--muted); }.info-block { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 0.84rem; }.info-block span { color: var(--muted); white-space: nowrap; }.info-card-critical { color: #fff; border-color: var(--brand-dark); background: var(--brand-dark); }.info-card-critical .info-card-heading h3 { color: #fff; }.info-card-critical .info-ktx-route span:not(.route-arrow) { color: #b8ddd5; }.info-card-critical .seat-row { border-color: rgba(255,255,255,0.18); }.info-card .plain-list { font-size: 0.85rem; }.info-card .plain-list li { padding-left: 15px; }

.bottom-nav { position: fixed; z-index: 10; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(4, 1fr); max-width: 720px; margin: 0 auto; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,0.94); box-shadow: 0 -8px 24px rgba(31, 55, 49, 0.06); backdrop-filter: blur(12px); }.nav-item { display: grid; justify-items: center; gap: 2px; padding: 4px 0; border: 0; color: var(--muted); background: transparent; font-size: 0.72rem; font-weight: 750; }.nav-icon { font-size: 1.12rem; filter: grayscale(0.8); }.nav-item.is-active { color: var(--brand); }.nav-item.is-active .nav-icon { filter: none; }
.noscript-note { position: fixed; z-index: 20; right: 12px; bottom: 100px; left: 12px; padding: 12px; border-radius: 12px; color: #fff; background: var(--danger); font-size: 0.82rem; }

@media (min-width: 600px) {
  .site-header { padding-right: 24px; padding-left: 24px; }
  #app-content { padding-right: 24px; padding-left: 24px; }
  .info-grid { grid-template-columns: 1fr 1fr; }.info-card-critical { grid-column: span 2; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
