:root {
  --ink: #17221f;
  --muted: #68736f;
  --green: #173f38;
  --green-2: #28685d;
  --mist: #e8f0ec;
  --paper: #f7f6f2;
  --white: #fff;
  --gold: #c78d32;
  --line: #dfe3de;
  --danger: #78392f;
  --shadow: 0 18px 50px rgba(19, 35, 31, .16);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); scroll-behavior: smooth; }
body { min-height: 100%; margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: wait; opacity: .72; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3, p { margin-top: 0; overflow-wrap: anywhere; }
.app-shell { min-height: 100vh; padding-bottom: 86px; }

.hero { position: relative; min-height: 300px; padding: max(22px, env(safe-area-inset-top)) 20px 25px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; background: #102f34 url("assets/london-hero.png") 74% 52% / cover no-repeat; isolation: isolate; }
.hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(5, 19, 28, .52), rgba(5, 19, 28, .08) 46%, rgba(5, 19, 28, .86)); }
.hero-topline { display: flex; justify-content: space-between; gap: 16px; font-size: .76rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.hero-copy { max-width: 660px; }
.hero-copy p, .sheet-header p, .viewer-header p { margin-bottom: 6px; color: rgba(255,255,255,.76); font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.hero-copy h1 { margin-bottom: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.7rem, 13vw, 5rem); font-weight: 500; line-height: .95; }
.hero-lock { position: absolute; right: 18px; bottom: 18px; width: 43px; height: 43px; display: grid; place-items: center; color: #fff; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; background: rgba(8,21,27,.58); backdrop-filter: blur(10px); }
.hero-lock[hidden] { display: none; }

.content { width: min(100%, 760px); margin: 0 auto; padding: 18px 16px 38px; }
.eyebrow, .overline { margin-bottom: 5px; color: var(--green-2); font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.welcome-card { padding: 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); box-shadow: 0 8px 28px rgba(20,35,31,.06); }
.welcome-card h2 { margin-bottom: 0; font-family: Georgia, "Times New Roman", serif; font-size: 2rem; font-weight: 500; }
.party { color: var(--muted); font-size: .78rem; font-weight: 800; }
.party small { margin-top: 4px; display: block; font-size: .67rem; font-weight: 600; }
.section-block { margin-top: 28px; }
.section-title { margin: 0 2px 11px; display: flex; align-items: flex-end; justify-content: space-between; }
.section-title h2 { margin-bottom: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.55rem; font-weight: 500; }
.section-title > span { min-width: 27px; height: 27px; display: grid; place-items: center; color: var(--green); border-radius: 50%; background: var(--mist); font-size: .72rem; font-weight: 800; }

.flight-list { display: grid; gap: 12px; }
.flight-card { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.flight-card header { padding: 15px; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 11px; border-bottom: 1px solid var(--line); }
.flight-card h3 { margin-bottom: 0; font-size: 1.07rem; }
.card-icon, .document-icon { width: 40px; height: 40px; display: grid; flex: 0 0 40px; place-items: center; color: var(--green); border-radius: 7px; background: var(--mist); }
.confirmation { padding: 5px 7px; color: var(--green); border-radius: 4px; background: var(--mist); font-size: .7rem; font-weight: 800; letter-spacing: .04em; }
.route { padding: 19px 15px 17px; display: grid; grid-template-columns: minmax(70px, 1fr) minmax(90px, 1.2fr) minmax(70px, 1fr); align-items: center; gap: 12px; }
.route > div:first-child { text-align: left; }
.route > div:last-child { text-align: right; }
.route strong, .route span, .route small { display: block; }
.route strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.28rem; font-weight: 500; }
.route > div > span { margin: 2px 0; color: var(--green); font-size: .8rem; font-weight: 800; }
.route small { color: var(--muted); font-size: .66rem; line-height: 1.25; }
.route-line { color: var(--muted); text-align: center; }
.route-line span { font-size: .62rem; font-weight: 700; }
.route-line i { position: relative; height: 1px; margin-top: 7px; display: block; background: #bdc9c4; }
.route-line i::before, .route-line i::after { content: ""; position: absolute; top: -3px; width: 7px; height: 7px; border: 1px solid #9eb0a9; border-radius: 50%; background: #fff; }
.route-line i::before { left: 0; }.route-line i::after { right: 0; }
.flight-card footer { padding: 11px 15px; display: flex; flex-wrap: wrap; gap: 5px 14px; color: var(--muted); border-top: 1px solid var(--line); background: #fbfbf8; font-size: .66rem; font-weight: 700; }

.stay-card { padding: 17px; display: flex; align-items: flex-start; gap: 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.stay-copy { min-width: 0; flex: 1; }
.stay-copy h3 { margin-bottom: 6px; font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; font-weight: 500; line-height: 1.15; }
.stay-copy > p:not(.overline) { color: var(--muted); font-size: .92rem; }
.compact-facts { margin: 15px 0 0; }
.compact-facts div { padding: 9px 0; display: grid; grid-template-columns: 82px 1fr; gap: 10px; border-top: 1px solid var(--line); }
.compact-facts dt { color: var(--muted); font-size: .7rem; font-weight: 800; }
.compact-facts dd { margin: 0; font-size: .83rem; line-height: 1.35; }

.privacy-note { margin-bottom: 22px; padding: 13px 14px; color: #49625b; border: 1px solid #c9d9d3; border-radius: 7px; background: var(--mist); font-size: .78rem; line-height: 1.45; }
.traveler-group + .traveler-group { margin-top: 28px; }
.traveler-group > header { margin: 0 2px 10px; display: flex; align-items: center; gap: 11px; }
.traveler-group > header h2 { margin-bottom: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.5rem; font-weight: 500; }
.avatar { width: 39px; height: 39px; display: grid; place-items: center; color: #fff; border-radius: 50%; background: var(--green); font-family: Georgia, "Times New Roman", serif; font-size: 1.1rem; }
.document-list { display: grid; gap: 9px; }
.document-row { width: 100%; min-height: 80px; padding: 13px; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); text-align: left; }
.document-row > svg { width: 16px; color: #98a29e; }
.document-row small, .document-row strong, .document-row em { display: block; }
.document-row small { margin-bottom: 3px; color: var(--green-2); font-size: .65rem; font-weight: 800; text-transform: uppercase; }
.document-row strong { font-size: .95rem; }
.document-row em { margin-top: 3px; color: var(--muted); font-size: .68rem; font-style: normal; line-height: 1.35; }
.document-row.pending { cursor: default; background: #fbfbf8; }
.status-pill { padding: 5px 7px; color: #79633f; border-radius: 4px; background: #f4ead9; font-size: .61rem; font-weight: 800; text-transform: uppercase; }
.security-card { margin-top: 28px; padding: 16px; display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 12px; border: 1px solid #bfd0ca; border-radius: 8px; background: var(--mist); }
.security-card > span { color: var(--green); }
.security-card h3 { margin-bottom: 3px; font-size: .92rem; }
.security-card p:last-child { margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.35; }
.security-card button { padding: 7px 9px; color: var(--green); border: 1px solid #aac1b9; border-radius: 5px; background: #fff; font-size: .7rem; font-weight: 800; }

.unlock-card { max-width: 530px; margin: 10px auto 0; padding: 27px 21px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); box-shadow: 0 8px 28px rgba(20,35,31,.07); }
.unlock-icon { width: 50px; height: 50px; margin-bottom: 18px; display: grid; place-items: center; color: var(--green); border-radius: 50%; background: var(--mist); }
.unlock-card h2 { margin-bottom: 9px; font-family: Georgia, "Times New Roman", serif; font-size: 1.7rem; font-weight: 500; }
.unlock-card > p:not(.eyebrow) { color: var(--muted); font-size: .94rem; line-height: 1.55; }
.unlock-primary, .unlock-secondary { width: 100%; min-height: 49px; padding: 11px 14px; border-radius: 6px; font-size: .8rem; font-weight: 800; }
.unlock-primary { margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 9px; color: #fff; border: 0; background: var(--green); }
.unlock-secondary { color: var(--green); border: 1px solid #b9cbc5; background: var(--mist); }
.unlock-divider { margin: 14px 0; display: flex; align-items: center; gap: 10px; color: #909a96; font-size: .7rem; }
.unlock-divider::before, .unlock-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.recovery-field { margin: 14px 0 10px; display: grid; gap: 6px; }
.recovery-field span { color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.recovery-field input { width: 100%; height: 47px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; outline: 0; background: #fff; }
.recovery-field input:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(40,104,93,.12); }
.unlock-status, .unlock-error { margin: 14px 0 0; padding: 10px 11px; border-radius: 5px; font-size: .78rem !important; }
.unlock-status { background: var(--mist); }.unlock-error { color: var(--danger) !important; background: #f7e9e6; }

.wide-button { width: 100%; min-height: 47px; margin-top: 15px; padding: 11px 14px; display: flex; align-items: center; justify-content: space-between; gap: 9px; color: #fff; border: 0; border-radius: 6px; background: var(--green); font-size: .8rem; font-weight: 800; text-decoration: none; }
.wide-button svg { flex: 0 0 auto; }.wide-button svg:first-child { margin-right: auto; }.wide-button svg:last-child { margin-left: auto; }
.tab-bar { position: fixed; right: 0; bottom: 0; left: 0; z-index: 10; height: calc(72px + env(safe-area-inset-bottom)); padding: 7px max(12px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(12px, env(safe-area-inset-left)); display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; border-top: 1px solid rgba(23,34,31,.12); background: rgba(255,255,255,.94); backdrop-filter: blur(18px); }
.tab-bar button { position: relative; min-width: 0; min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font-size: .7rem; font-weight: 800; }
.tab-bar button[aria-current="page"] { color: var(--green); background: var(--mist); box-shadow: inset 0 0 0 1px rgba(40,104,93,.08); }
.tab-bar button[aria-current="page"]::before { content: ""; position: absolute; top: 2px; width: 22px; height: 3px; border-radius: 3px; background: var(--green-2); }

.sheet { position: fixed; inset: auto 0 0; width: min(100%, 760px); max-width: none; max-height: min(90vh, 880px); margin: auto auto 0; padding: 0; overflow: hidden; color: var(--ink); border: 0; border-radius: 13px 13px 0 0; background: var(--white); box-shadow: var(--shadow); }
.sheet::backdrop, .viewer::backdrop { background: rgba(7, 20, 22, .65); backdrop-filter: blur(2px); }
.sheet-handle { width: 42px; height: 4px; margin: 9px auto 3px; border-radius: 4px; background: #cdd2cf; }
.sheet-header, .viewer-header { padding: 12px 18px 15px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.sheet-header p { margin-bottom: 3px; color: var(--green-2); }
.sheet-header h2, .viewer-header h2 { margin-bottom: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.65rem; font-weight: 500; }
.icon-button { width: 40px; height: 40px; display: grid; flex: 0 0 40px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #fff; }
.sheet-body { max-height: calc(90vh - 92px); padding: 18px; overflow-y: auto; overscroll-behavior: contain; }
.facts { margin: 0 0 18px; }
.facts div { padding: 11px 0; display: grid; grid-template-columns: minmax(105px, .65fr) 1fr; gap: 12px; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: .73rem; font-weight: 800; }.facts dd { margin: 0; font-size: .88rem; line-height: 1.4; }
.callout, .in-memory-note { padding: 11px 12px; color: #4c5d58; border-radius: 6px; background: var(--mist); font-size: .74rem; line-height: 1.45; }
.in-memory-note { margin: 11px 0 0; text-align: center; }
.detail-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.detail-section h3 { margin-bottom: 10px; font-size: .92rem; }.detail-section ul { margin: 0; padding-left: 19px; color: #44504c; font-size: .85rem; line-height: 1.5; }.detail-section li + li { margin-top: 7px; }
.pending-panel { padding: 24px 12px; text-align: center; }.pending-panel > span { width: 48px; height: 48px; margin: 0 auto 14px; display: grid; place-items: center; color: var(--green); border-radius: 50%; background: var(--mist); }.pending-panel h3 { margin-bottom: 6px; }.pending-panel p { color: var(--muted); font-size: .84rem; }

.viewer { width: min(96vw, 980px); height: min(92vh, 900px); max-width: none; max-height: none; padding: 0; overflow: hidden; color: var(--ink); border: 0; border-radius: 12px; background: #edf0ed; box-shadow: var(--shadow); }
.viewer-header { height: 74px; background: #fff; }.viewer-header p { margin-bottom: 3px; color: var(--green-2); }.viewer-header h2 { font-size: 1.35rem; }
.viewer-body { height: calc(100% - 112px); display: grid; place-items: center; overflow: auto; background: #dfe4e1; }
.viewer-body iframe { width: 100%; height: 100%; border: 0; background: #fff; }.viewer-body img { max-width: 100%; height: auto; display: block; }
.viewer-note { height: 38px; margin: 0; padding: 10px 14px; color: var(--muted); background: #fff; font-size: .68rem; text-align: center; }

@media (min-width: 760px) {
  .hero { min-height: 400px; padding: 28px max(32px, calc((100vw - 760px) / 2)) 38px; background-position: center 52%; }
  .hero-topline { padding-right: 270px; }
  .content { padding: 24px 0 52px; }
  .tab-bar { top: 20px; right: max(24px, calc((100vw - 760px) / 2)); bottom: auto; left: auto; width: 250px; height: 48px; padding: 4px; border: 1px solid rgba(255,255,255,.26); border-radius: 7px; background: rgba(9,29,35,.5); }
  .tab-bar button { flex-direction: row; color: rgba(255,255,255,.75); }
  .tab-bar button[aria-current="page"] { color: var(--green); background: #fff; }.tab-bar button[aria-current="page"]::before { display: none; }
  .app-shell { padding-bottom: 0; }.sheet { bottom: 24px; border-radius: 13px; }
}

@media (max-width: 420px) {
  .hero { min-height: 280px; }
  .welcome-card { align-items: flex-start; flex-direction: column; gap: 10px; }
  .stay-card { display: block; }.stay-card > .card-icon { margin-bottom: 12px; }
  .flight-card header { grid-template-columns: 40px 1fr; }.confirmation { grid-column: 2; width: max-content; }
  .route { grid-template-columns: minmax(65px, 1fr) 70px minmax(65px, 1fr); gap: 7px; }
  .security-card { grid-template-columns: 32px 1fr; }.security-card button { grid-column: 2; width: max-content; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
