:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #152d3e;
  background: #eef3f7;
}

body { background: #eef3f7; }
.shell { background: linear-gradient(#eef3f7, #f7f9fb 62%); }
.shell.view-home { padding-bottom: 0; }

.top {
  min-height: 445px;
  padding: 24px max(22px, calc((100vw - 1040px) / 2)) 125px;
  background: #0d5180 url('/assets/bvi-bay.jpg') center 50% / cover no-repeat;
}
.top::before {
  inset: 0;
  width: auto;
  height: auto;
  right: 0;
  top: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: linear-gradient(180deg, rgba(7, 40, 65, .34) 0%, rgba(9, 50, 76, .22) 33%, rgba(4, 39, 62, .86) 100%);
}
.top::after { display: none; }
.top-inner { max-width: 1040px; margin: auto; }
.view-home .top {
  height: 100dvh;
  min-height: 0;
  background-size: auto 115%;
  background-position: 58% center;
}
.view-home .main {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100dvh;
  margin-top: -100dvh;
  padding: max(220px, 31vh) 17px 108px;
  pointer-events: none;
}
.dashboard-stack { display: grid; width: min(100%, 540px); margin-inline: auto; gap: 12px; pointer-events: auto; }
.countdown-dock { padding-left: 7px; margin-bottom: 5px; }
.countdown-eyebrow { margin: 0 0 7px 3px; color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .18em; line-height: 1; text-transform: uppercase; text-shadow: 0 2px 10px #062b49aa; }
.photo-countdown {
  position: absolute;
  top: clamp(78px, 10vh, 120px);
  left: 0;
  color: #fff;
  text-shadow: 0 2px 12px #062b49aa;
}
.countdown-phrase { max-width: min(78vw, 390px); margin: 0; font-size: clamp(3.6rem, 13vw, 4.5rem); font-weight: 600; line-height: 1.02; letter-spacing: -.055em; }
.countdown-phrase.phrase-medium { font-size: clamp(2.9rem, 10.5vw, 3.8rem); }
.countdown-phrase.phrase-long { font-size: clamp(2.35rem, 8.7vw, 3.2rem); }
.countdown-phrase { text-wrap: balance; overflow-wrap: anywhere; }
.photo-day-heading { max-width: 410px; margin: 0 0 12px; font-size: clamp(2.5rem, 9vw, 3.8rem); font-weight: 650; line-height: 1.02; letter-spacing: -.055em; }
.photo-day-summary { max-width: 410px; margin: 5px 0; font-size: .95rem; font-weight: 600; line-height: 1.4; }
.photo-countdown-time { display: inline-flex; align-items: start; gap: clamp(20px, 6vw, 32px); max-width: 100%; padding: 12px 17px 11px; border: 1px solid #ffffff70; border-radius: 18px; background: #082f4d59; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; text-shadow: 0 2px 12px #062b49aa; }
.countdown-segment { display: grid; gap: 2px; }
.photo-countdown-value { font-size: clamp(2.3rem, 10vw, 3.2rem); font-weight: 680; line-height: 1; letter-spacing: -.055em; }
.photo-countdown-unit { font-size: .71rem; font-weight: 650; letter-spacing: .01em; opacity: .9; }
.next-plan-card {
  padding: 17px 20px;
  border: 1px solid #ffffffec;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 32px #1537511c;
}
.next-plan-label { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid #e8edf0; color: #ed7131; font-size: .7rem; font-weight: 800; letter-spacing: .15em; }
.next-plan-row { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.next-plan-card h2 { margin: 0 0 3px; color: #172c3b; font-size: 1.04rem; line-height: 1.3; }
.next-plan-card p { margin: 2px 0; color: #607985; font-size: .88rem; line-height: 1.35; }
.next-plan-card .text-link { flex: none; white-space: nowrap; font-size: .8rem; }
.brand-word {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 9px 13px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 999px;
  background: rgba(6, 43, 65, .28);
  backdrop-filter: blur(9px);
  font-size: .69rem;
  letter-spacing: .15em;
}
.brand-word span { color: #ffce89; }
.avatar {
  width: 42px;
  height: 42px;
  color: #123d56;
  border: 2px solid rgba(255,255,255,.8);
  background: #fff9ed;
  box-shadow: 0 5px 18px #092b3d35;
}
.hero-title {
  font: 800 clamp(2.7rem, 10vw, 5rem)/1.01 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -.065em;
  text-shadow: 0 2px 18px #082c3f55;
  margin: 102px 0 12px;
  max-width: 790px;
}
.hero-sub { color: #e3f1f2; font-size: .98rem; text-shadow: 0 1px 8px #082c3f66; }
.hero-sub strong { color: #fff; }
.main { margin-top: -85px; padding: 0 17px; }

.hero-card {
  padding: 24px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 27px;
  background: #fff;
  box-shadow: 0 14px 36px #15375120;
}
.hero-card.before { background: #fff; }
.hero-card .eyebrow { color: #fb7c3d; font-size: .72rem; letter-spacing: .17em; }
.hero-card h2 {
  margin: 0 0 8px;
  font: 800 clamp(1.65rem, 6vw, 2.3rem)/1.09 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -.055em;
  color: #172c3b;
}
.hero-card p { color: #68808c; }
.tomorrow-summary { display: grid; gap: 3px; margin-top: 13px; padding-top: 12px; border-top: 1px solid #e4ebee; color: #5d7480; font-size: .84rem; line-height: 1.35; }
.tomorrow-summary strong { color: #172c3b; }
.count {
  display: flex;
  align-items: baseline;
  width: max-content;
  padding: 4px 0 0;
  color: #ff812e;
  font: 800 clamp(3.5rem, 14vw, 5.4rem)/.95 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -.085em;
}
.count span { max-width: 52px; color: #48606a; font-size: .85rem; line-height: 1.15; margin-left: 10px; }
.hero-actions { margin-top: 20px; }
.button {
  border-radius: 15px;
  padding: 13px 17px;
  background: #ff812e;
  color: #fff;
  box-shadow: 0 5px 13px #ff812e25;
}
.button:hover { background: #f36e20; }
.button.secondary { background: #f1f4f7; color: #234456; box-shadow: none; }
.button.secondary:hover { background: #e5edf2; }
.button.danger { background: #ffebe6; color: #9c3e28; box-shadow: none; }
.text-link, .plan-controls button { color: #ed7131; }

.section { margin-top: 31px; }
.section-head { align-items: center; margin: 0 2px 16px; }
.section-head h2 {
  color: #172e3c;
  font: 800 1.5rem/1.18 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -.05em;
}
.section-head p { color: #8296a0; font-size: .9rem; }
.empty { background: #fff; border: 1px dashed #c2d1db; color: #6d838d; }

.day-grid { gap: 13px; }
.plan {
  position: relative;
  grid-template-columns: 66px minmax(0,1fr);
  gap: 14px;
  padding: 18px;
  border: 1px solid #e5edf2;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 6px 19px #1a435b0b;
}
.plan-time {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: start;
  min-height: 58px;
  padding: 7px;
  border-radius: 15px;
  background: #e9f3f8;
  color: #286787;
  text-align: center;
  font-size: .8rem;
  line-height: 1.15;
}
.plan-stay .plan-time { background: #fff0df; color: #a15c2b; }
.stay-boundary .plan-time { font-size: .75rem; }
.plan-ferry .plan-time { background: #e1f5f0; color: #2d776b; }
.plan-transport .plan-time { background: #e8f3ec; color: #307050; }
.plan-event .plan-time { background: #ececff; color: #5d62aa; }
.plan-body { min-width: 0; }
.plan-tag-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.plan-type {
  margin: 0 0 9px;
  padding: 0;
  background: transparent !important;
  color: #637e8e !important;
  font-size: .68rem;
  letter-spacing: .13em;
}
.status { margin: -9px 0 0; background: #fff1e3; color: #b76a2c; text-transform: capitalize; }
.plan-title { font-size: 1.06rem; line-height: 1.3; letter-spacing: -.02em; }
.plan-location { font-weight: 600; color: #4d6b7b; }
.plan-detail { color: #687e89; }
.flight-route {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 15px 0;
  padding: 13px 14px;
  border: 1px solid #e5ebfb;
  border-radius: 15px;
  background: #f5f7ff;
  color: #465bc0;
}
.flight-route strong { font-size: 1.12rem; letter-spacing: .08em; }
.route-track {
  flex: 1;
  height: 1px;
  border-top: 1px dashed #a9b5e9;
  text-align: center;
  line-height: 0;
}
.route-track span { position: relative; top: -1px; padding: 0 7px; background: #f5f7ff; font-size: 1rem; }
.reservation {
  display: flex;
  justify-content: space-between;
  gap: 9px;
  border-top: 1px solid #edf1f4;
  padding-top: 10px;
  margin-top: 12px;
}
.reservation strong { font-size: .8rem; color: #788d99; }
.reservation span { font-weight: 700; color: #244457; text-align: right; }
.plan-meta { gap: 5px; }
.plan-meta span { background: #edf3f6; color: #5b7482; font-size: .75rem; }
.plan-controls { border-top: 1px solid #edf1f4; padding-top: 11px; justify-content: space-between; }
.plan-controls button, .plan-controls .text-link { font-size: .82rem; }

.chip-row { gap: 9px; margin: 0 -17px 12px; padding: 0 17px 12px; }
.chip {
  display: grid;
  place-items: center;
  gap: 1px;
  min-width: 61px;
  min-height: 67px;
  border: 1px solid #e1e9ee;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 4px 12px #214a6208;
  color: #8a9da6;
}
.chip span { font-size: .74rem; }
.chip strong { font-size: 1.18rem; line-height: 1; color: #34566a; }
.chip.active { background: #ffce25; border-color: #ffce25; color: #283b4a; box-shadow: 0 7px 16px #ffce2555; }
.chip.active strong { color: #243948; }

.info-grid { gap: 13px; }
.info-card { padding: 22px; border: 1px solid #e5edf2; border-radius: 24px; box-shadow: 0 6px 19px #1a435b0b; }
.info-card h3 { font: 800 1.15rem -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: -.035em; }
.info-card h3::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 9px;
  border-radius: 50%;
  background: #ff8c44;
}
.info-card:nth-child(2) h3::before { background: #5b76e9; }
.info-card:nth-child(3) h3::before { background: #47bba8; }
.info-card:nth-child(4) h3::before { background: #f7cc35; }
.rental-info .stay-boundaries span { color: #307050; }

.bottom-nav {
  left: 16px;
  right: 16px;
  bottom: 13px;
  grid-template-columns: repeat(3,1fr);
  padding: 8px 7px calc(8px + env(safe-area-inset-bottom));
  border: 1px solid #e4ebee;
  border-radius: 24px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 12px 32px #123c5050;
}
.drawer-open { overflow: hidden; }
.drawer-scrim { position: fixed; inset: 0; z-index: 7; background: #06283e78; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .32s ease, visibility .32s; }
.drawer-open .drawer-scrim { opacity: 1; visibility: visible; pointer-events: auto; }
.trip-drawer { position: fixed; z-index: 8; top: clamp(16px, 5vh, 50px); right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #ffffffc9; border-bottom: 0; border-radius: 27px 27px 0 0; background: #eef3f7; box-shadow: 0 -16px 50px #06283e45; transform: translate3d(0, 105%, 0); visibility: hidden; pointer-events: none; transition: transform .38s cubic-bezier(.2,.75,.25,1), visibility .38s; }
.trip-drawer.is-open { transform: translate3d(0, 0, 0); visibility: visible; pointer-events: auto; }
.drawer-handle { width: 37px; height: 5px; margin: 9px auto 5px; flex: none; border-radius: 999px; background: #b7c8d1; }
.drawer-head { display: flex; align-items: center; gap: 12px; flex: none; padding: 12px 17px 16px; border-bottom: 1px solid #c9d9e2; background: transparent; }
.drawer-back { display: grid; place-items: center; flex: none; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: #eaf1f5; color: #214456; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.drawer-heading { min-width: 0; flex: 1; }
.drawer-heading h1 { margin: 0; color: #172c3b; font-size: clamp(1.65rem, 6.5vw, 2.1rem); font-weight: 800; line-height: 1.1; letter-spacing: -.05em; }
.drawer-subtitle { margin: 3px 0 0; color: #728b98; font-size: .78rem; line-height: 1.3; }
.drawer-action .button { padding: 10px 12px; white-space: nowrap; font-size: .82rem; }
.drawer-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 17px calc(38px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
.drawer-body .section-flush { margin-top: 0; }
.drawer-body .chip-row { margin-bottom: 14px; }
@media (min-width: 900px) { .trip-drawer { width: min(850px, calc(100vw - 64px)); left: 50%; right: auto; transform: translate3d(-50%, 105%, 0); } .trip-drawer.is-open { transform: translate3d(-50%, 0, 0); } }
@media (prefers-reduced-motion: reduce) { .trip-drawer, .drawer-scrim { transition-duration: .01ms; } }
.nav-button { gap: 4px; color: #8799a3; }
.nav-button svg { width: 21px; height: 21px; }
.nav-button.active { color: #203949; }
.nav-button.active svg {
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 50%;
  background: #ffce25;
  box-shadow: 0 4px 10px #ffce2560;
}

.login-page {
  background: linear-gradient(180deg, #0a3d62aa, #062f4eeb), url('/assets/bvi-bay.jpg') center / cover no-repeat;
}
.login-card { border: 1px solid #ffffffa8; box-shadow: 0 25px 65px #06223860; }
.login-card .field { margin-bottom: 18px; }
.login-card .field label { font-size: .88rem; }
.login-select { position: relative; }
.login-name-trigger { width: 100%; min-height: 54px; display: flex; align-items: center; gap: 11px; padding: 8px 15px; border: 1px solid #cbdce5; border-radius: 15px; background: #fff; color: #173343; font: 650 1rem -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; text-align: left; cursor: pointer; box-shadow: 0 3px 10px #153d3d09; }
.login-name-trigger:hover, .login-name-trigger[aria-expanded="true"] { border-color: #ff9b59; }
.login-name-trigger:focus-visible, .login-options [role="option"]:focus-visible { outline: 3px solid #ffbd8f; outline-offset: 2px; }
.login-name-trigger[aria-invalid="true"] { border-color: #b64a36; }
.login-name-avatar, .login-option-avatar { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 50%; background: #e9f1f5; color: #35596c; font-size: .75rem; font-weight: 800; letter-spacing: .02em; }
.login-name-trigger.has-name .login-name-avatar, .login-options [aria-selected="true"] .login-option-avatar { background: #ffce25; color: #183b4b; }
.login-name-value { flex: 1; }
.login-name-trigger:not(.has-name) .login-name-value { color: #708894; font-weight: 500; }
.login-name-chevron { width: 10px; height: 10px; margin: -5px 3px 0 0; border-right: 2px solid #4d6c7b; border-bottom: 2px solid #4d6c7b; transform: rotate(45deg); transition: transform .15s ease; }
.login-name-trigger[aria-expanded="true"] .login-name-chevron { transform: translateY(5px) rotate(225deg); }
.login-options { position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; right: 0; display: grid; gap: 3px; padding: 7px; border: 1px solid #d7e3e9; border-radius: 17px; background: #fff; box-shadow: 0 18px 45px #082d4240; }
.login-options[hidden] { display: none; }
.login-options [role="option"] { width: 100%; min-height: 48px; display: flex; align-items: center; gap: 11px; padding: 7px 10px; border: 0; border-radius: 11px; background: transparent; color: #173343; font: 650 .98rem -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; text-align: left; cursor: pointer; }
.login-options [role="option"]:hover, .login-options [role="option"]:focus-visible { background: #eef5f8; }
.login-options [role="option"][aria-selected="true"] { background: #fff7dd; }
.login-option-check { margin-left: auto; color: #c06920; opacity: 0; font-size: 1.1rem; }
.login-options [aria-selected="true"] .login-option-check { opacity: 1; }
.login-name-error { margin-top: 6px; color: #a53f2d; font-size: .78rem; font-weight: 650; }
.login-card #pin { min-height: 54px; padding: 13px 16px; border-radius: 15px; background: #fff; font-size: 1rem; box-shadow: 0 3px 10px #153d3d09; }
.field label { color: #365568; }
.field input, .field select, .field textarea { border-color: #d4e0e6; background: #fbfcfe; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #ff9b59; }
.stay-fields { grid-column: 1 / -1; }
.stay-boundaries { display: grid; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #e4ebef; }
.stay-boundaries > div { display: grid; gap: 3px; }
.stay-boundaries strong { color: #244457; font-size: .85rem; }
.stay-boundaries span { color: #a15c2b; font-size: .83rem; font-weight: 700; }
.stay-boundaries p { margin: 0; }
.all-trip-pill { display: inline-block; margin-left: 6px; padding: 4px 8px; border-radius: 999px; background: #fff0df; color: #a15c2b; font: 700 .7rem/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; vertical-align: middle; }
.modal { background: #f8fafb; }
.pwa-modal { color: #173343; }
.pwa-intro { color: #607985; margin: 0 0 17px; }
.pwa-instructions { padding: 16px 18px; border-radius: 16px; background: #e8f2f6; color: #254a5c; line-height: 1.45; }
.pwa-install-button { width: 100%; margin-top: 15px; }
.pwa-notifications { border-top: 1px solid #dce8ed; margin-top: 22px; padding-top: 18px; }
.pwa-notifications h3 { margin: 0 0 8px; font-size: 1.05rem; }
.pwa-status { color: #476879; line-height: 1.4; margin: 0 0 12px; }
.pwa-actions .button { width: 100%; }
.pwa-note { color: #718994; font-size: .78rem; line-height: 1.4; margin: 12px 0 0; }
.modal-head h2 { font: 800 1.7rem -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.check { background: #e9f0f5; }
.check input { accent-color: #ff812e; }
.close { background: #eaf0f4; color: #35566b; }

@media (max-width: 520px) {
  .top { min-height: 418px; background-position: 57% center; }
  .hero-title { margin-top: 91px; }
  .hero-sub { max-width: 310px; }
  .hero-card { gap: 4px; }
  .hero-card .button { flex: 1; font-size: .84rem; white-space: nowrap; padding: 12px 9px; }
  .count { order: -1; }
  .section-head .button { padding: 11px 12px; font-size: .84rem; }
  .plan { padding: 14px; grid-template-columns: 58px minmax(0,1fr); gap: 11px; }
  .plan-time { min-height: 52px; font-size: .75rem; }
}

@media (max-width: 520px) and (max-height: 700px) {
  .countdown-phrase, .countdown-phrase.phrase-medium, .countdown-phrase.phrase-long { max-width: 290px; font-size: 2.2rem; line-height: 1.04; }
  .photo-countdown-time { gap: 18px; padding: 9px 13px; }
  .photo-countdown-value { font-size: 2.2rem; }
  .view-home .hero-card { padding: 16px 18px; }
  .view-home .hero-actions { margin-top: 12px; }
  .view-home .next-plan-card { padding: 13px 18px; }
  .view-home .next-plan-location { display: none; }
}

@media (min-width: 700px) {
  .top { min-height: 500px; padding-bottom: 150px; }
  .hero-title { margin-top: 132px; }
  .hero-card { padding: 30px 34px; }
  .main { margin-top: -92px; }
  .day-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .bottom-nav { width: 420px; left: 50%; right: auto; bottom: 16px; transform: translateX(-50%); border-radius: 25px; }
  .chip-row { margin-left: 0; margin-right: 0; padding-left: 0; }
  .login-card { padding: 34px; }
}

@media (min-aspect-ratio: 4/3) {
  .view-home .top { background-size: 115% auto; }
}
