:root {
  --bg: #f4f1eb;
  --surface: #fffdf9;
  --surface-soft: #faf7f1;
  --ink: #282522;
  --muted: #77716a;
  --faint: #a59d93;
  --line: rgba(40, 37, 34, .12);
  --accent: #bb5d32;
  --accent-dark: #92451f;
  --accent-soft: #fff0e9;
  --green: #287d5a;
  --blue: #376f9f;
  --shadow: 0 8px 24px rgba(72, 52, 32, .07);
  --radius: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); }
body { color: var(--ink); font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", sans-serif; -webkit-font-smoothing: antialiased; }
button { border: 0; font: inherit; cursor: pointer; }
button:focus-visible { outline: 3px solid rgba(55,111,159,.32); outline-offset: 2px; }
.app { width: min(100%, 760px); margin: 0 auto; padding: 18px 16px calc(40px + env(safe-area-inset-bottom)); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; color: white; background: linear-gradient(145deg, #bb5d32, #e38a5c); box-shadow: 0 6px 15px rgba(187, 93, 50, .22); font-size: 21px; }
.brand-name { font-size: 16px; font-weight: 800; letter-spacing: -.4px; }
.brand-sub { margin-top: 2px; color: var(--muted); font-size: 11px; }
.connection { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface); font-size: 10px; font-weight: 750; white-space: nowrap; }
.connection.connected { color: var(--green); background: #eff9f3; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.connected .dot { background: var(--green); box-shadow: 0 0 0 3px rgba(40, 125, 90, .12); }
.hero { position: relative; overflow: hidden; padding: 24px 21px 21px; border: 1px solid var(--line); border-radius: 25px; background: var(--surface); box-shadow: var(--shadow); }
.hero::after { content: ""; position: absolute; width: 190px; height: 190px; right: -78px; top: -85px; border-radius: 50%; background: rgba(187, 93, 50, .09); }
.eyebrow { position: relative; z-index: 1; color: var(--accent); font-size: 10px; font-weight: 850; letter-spacing: .16em; }
h1 { position: relative; z-index: 1; margin: 9px 0 8px; font-size: 31px; line-height: 1.14; letter-spacing: -1.5px; }
.hero-copy { position: relative; z-index: 1; max-width: 540px; min-height: 22px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.hero-meta { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.hero-meta span { padding: 6px 9px; border-radius: 999px; color: var(--muted); background: var(--surface-soft); font-size: 11px; font-weight: 700; }
.hero-actions { position: relative; z-index: 1; display: flex; gap: 8px; margin-top: 19px; }
.primary, .secondary { min-height: 42px; padding: 0 14px; border-radius: 12px; font-size: 12px; font-weight: 800; }
.primary { color: #fff; background: var(--accent); box-shadow: 0 5px 13px rgba(187, 93, 50, .2); }
.primary:active { background: var(--accent-dark); }
.secondary { color: var(--ink); border: 1px solid var(--line); background: var(--surface-soft); }
.section { margin-top: 25px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 0 2px 11px; }
.section-title { margin: 0; font-size: 17px; letter-spacing: -.5px; }
.section-caption { color: var(--faint); font-size: 10px; }
.trip-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.trip-card { min-height: 105px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: var(--surface); box-shadow: var(--shadow); text-align: left; transition: transform .15s, border-color .15s, box-shadow .15s; }
.trip-card:active { transform: translateY(1px); }
.trip-card.active { border-color: rgba(187, 93, 50, .55); box-shadow: 0 0 0 3px rgba(187, 93, 50, .10), var(--shadow); }
.trip-status { display: inline-block; padding: 4px 7px; border-radius: 7px; color: var(--accent); background: var(--accent-soft); font-size: 9px; font-weight: 850; }
.trip-name { display: block; margin-top: 9px; font-size: 14px; font-weight: 850; letter-spacing: -.3px; }
.trip-meta { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.summary { min-height: 77px; padding: 13px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.summary strong { display: block; font-size: 19px; letter-spacing: -.8px; }
.summary span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.timeline-list { display: flex; flex-direction: column; gap: 10px; }
.day-label { margin: 9px 2px 0; color: var(--accent); font-size: 12px; font-weight: 850; }
.timeline-card { display: grid; grid-template-columns: 42px minmax(0, 1fr) 22px; gap: 11px; width: 100%; padding: 13px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: var(--surface); box-shadow: var(--shadow); text-align: left; }
.timeline-card:active { transform: translateY(1px); }
.timeline-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--accent-soft); font-size: 18px; }
.timeline-main { min-width: 0; }
.timeline-top { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.timeline-title { margin: 0; font-size: 13px; font-weight: 850; letter-spacing: -.2px; }
.timeline-time { flex: 0 0 auto; color: var(--accent); font-size: 11px; font-weight: 850; white-space: nowrap; }
.timeline-detail { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.timeline-cost { display: inline-block; margin-top: 8px; padding: 4px 7px; border-radius: 7px; color: var(--accent); background: var(--accent-soft); font-size: 10px; font-weight: 800; }
.timeline-arrow { align-self: center; color: var(--faint); font-size: 20px; }
.guide-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.guide-card { display: flex; align-items: flex-start; gap: 9px; min-height: 83px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--surface); box-shadow: var(--shadow); text-align: left; }
.guide-card:active { transform: translateY(1px); }
.guide-icon { font-size: 21px; line-height: 1; }
.guide-card b { display: block; font-size: 12px; }
.guide-card small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.privacy-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 23px; padding: 13px; border: 1px solid rgba(40, 125, 90, .16); border-radius: 14px; color: #4c675a; background: #f0f8f3; }
.privacy-note span { font-size: 16px; }
.privacy-note p { margin: 0; font-size: 10px; line-height: 1.5; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 50; max-width: calc(100% - 32px); padding: 11px 14px; border-radius: 12px; color: #fff; background: rgba(40, 37, 34, .9); font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 8px); transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(40, 37, 34, .42); backdrop-filter: blur(2px); }
.modal-sheet { position: relative; z-index: 1; width: min(100%, 760px); max-height: min(88vh, 760px); overflow: auto; padding: 18px 17px calc(22px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: var(--surface); box-shadow: 0 -12px 35px rgba(40, 37, 34, .18); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.modal-kicker { color: var(--accent); font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.modal-close { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface-soft); font-size: 21px; line-height: 1; }
.modal-title { margin: 0; font-size: 23px; line-height: 1.2; letter-spacing: -.8px; }
.modal-lead { margin: 9px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.modal-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.modal-badge { padding: 6px 8px; border-radius: 8px; color: var(--accent); background: var(--accent-soft); font-size: 10px; font-weight: 800; }
.detail-section { margin-top: 19px; padding-top: 15px; border-top: 1px solid var(--line); }
.detail-heading { margin: 0 0 7px; font-size: 13px; font-weight: 850; }
.detail-text { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.detail-list { display: flex; flex-direction: column; gap: 7px; margin: 0; padding: 0; list-style: none; }
.detail-list li { position: relative; padding-left: 16px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.detail-list li::before { content: "•"; position: absolute; left: 2px; color: var(--accent); font-weight: 900; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.detail-link { display: inline-flex; align-items: center; min-height: 38px; padding: 0 12px; border-radius: 10px; color: #fff; background: var(--accent); text-decoration: none; font-size: 11px; font-weight: 800; }
.detail-link.secondary-link { color: var(--ink); border: 1px solid var(--line); background: var(--surface-soft); }
.guide-modal .modal-title { font-size: 21px; }
.checkin-box { margin-top: 19px; padding: 15px; border: 1px solid rgba(55, 111, 159, .20); border-radius: 15px; background: #f3f8fc; }
.checkin-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.checkin-lock { padding: 4px 7px; border-radius: 7px; color: var(--blue); background: #e6f1fa; font-size: 9px; font-weight: 850; }
.checkin-note { margin: 5px 0 13px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.checkin-label { display: block; margin: 10px 0 5px; color: var(--ink); font-size: 10px; font-weight: 800; }
.checkin-input { width: 100%; min-height: 39px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; outline: none; color: var(--ink); background: var(--surface); font-size: 12px; }
.checkin-input:focus { border-color: rgba(55, 111, 159, .55); box-shadow: 0 0 0 3px rgba(55, 111, 159, .10); }
.checkin-password-row { display: flex; gap: 7px; }
.checkin-password-row .checkin-input { flex: 1; min-width: 0; }
.checkin-toggle { min-width: 52px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface); font-size: 10px; font-weight: 800; }
.checkin-actions { display: flex; gap: 7px; margin-top: 12px; }
.checkin-actions .detail-link { min-height: 35px; border: 0; cursor: pointer; }
.checkin-status { margin: 9px 0 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
@media (max-width: 500px) {
  .app { padding-left: 13px; padding-right: 13px; }
  h1 { font-size: 28px; }
  .hero-actions { flex-direction: column; }
  .primary, .secondary { width: 100%; }
  .timeline-top { display: block; }
  .timeline-time { display: block; margin-top: 4px; }
}
@media (max-width: 360px) {
  .trip-picker, .guide-grid { grid-template-columns: 1fr; }
  .summary strong { font-size: 17px; }
}
