:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-soft: #fbfbfd;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(29, 29, 31, 0.11);
  --blue: #0a84ff;
  --blue-soft: #eaf4ff;
  --green: #2f9e44;
  --orange: #d97808;
  --red: #c92a2a;
  --dark: #111b22;
  --dark-soft: #18262f;
  --shadow: 0 28px 70px rgba(29, 29, 31, 0.12);
  --radius: 22px;
  --max: 1320px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

.auth-pending body {
  overflow: hidden;
}

.auth-pending body > :not(.login-gate) {
  visibility: hidden;
}

.login-gate {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 24px;
  background:
    radial-gradient(circle at 78% 18%, rgba(10, 132, 255, 0.16), transparent 30%),
    radial-gradient(circle at 16% 82%, rgba(47, 158, 68, 0.13), transparent 32%),
    var(--bg);
  transition: opacity 220ms ease, visibility 220ms ease;
}

.login-gate[hidden] {
  display: none;
}

.login-card {
  width: min(100%, 520px);
  padding: clamp(32px, 6vw, 58px);
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(140%);
}

.login-mark {
  display: block;
  width: 16px;
  height: 16px;
  margin-bottom: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--green));
  box-shadow: 0 0 0 7px rgba(10, 132, 255, 0.08);
}

.login-card h1 {
  margin: 10px 0 0;
  font-size: clamp(3rem, 11vw, 5.4rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.login-intro {
  max-width: 420px;
  margin: 24px 0 30px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.login-form label {
  display: block;
  margin-bottom: 9px;
  font-size: 0.84rem;
  font-weight: 700;
}

.login-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.login-input-row input {
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0 86px 0 16px;
  border: 1px solid rgba(29, 29, 31, 0.16);
  border-radius: 14px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.login-input-row input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.12);
}

.login-password-field {
  position: relative;
  display: block;
  min-width: 0;
}

.login-password-toggle {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 72px;
  height: 44px;
  border: 0;
  border-radius: 11px;
  background: rgba(29, 29, 31, 0.06);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 750;
}

.login-password-toggle:hover,
.login-password-toggle:focus-visible {
  background: rgba(10, 132, 255, 0.12);
  color: #0872dc;
}

.login-submit {
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-weight: 750;
}

.login-submit:disabled {
  cursor: wait;
  opacity: 0.62;
}

.login-hint,
.login-error {
  margin: 11px 2px 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.login-error {
  color: var(--red);
  font-weight: 650;
}

.login-after {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  text-align: center;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  transform: translateY(-160%);
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
}

.skip-link:focus {
  transform: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 11px clamp(14px, 3vw, 34px);
  border-bottom: 1px solid rgba(29, 29, 31, 0.08);
  background: rgba(245, 245, 247, 0.82);
  backdrop-filter: blur(22px) saturate(140%);
}

.topbar-primary,
.brand,
.nav-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-primary {
  flex: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.brand {
  flex: none;
  text-decoration: none;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.topbar-upload,
.topbar-album {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(10, 132, 255, 0.18);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(10, 132, 255, 0.11);
  color: #0872dc;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 780;
  white-space: nowrap;
  backdrop-filter: blur(18px) saturate(150%);
  transition: background 160ms ease, transform 160ms ease;
}

.topbar-album {
  border-color: rgba(29, 29, 31, 0.09);
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
}

.topbar-upload:hover,
.topbar-upload:focus-visible,
.topbar-album:hover,
.topbar-album:focus-visible {
  background: rgba(10, 132, 255, 0.18);
  transform: translateY(-1px);
}

.brand-mark {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--green));
  box-shadow: 0 0 0 5px rgba(10, 132, 255, 0.08);
}

.nav-links {
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  flex: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 160ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
}

.nav-links a.is-current {
  color: var(--blue);
}

.nav-checklist {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.nav-checklist span {
  display: grid;
  min-width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.7rem;
}

main {
  overflow: hidden;
}

.hero,
.answers,
.fact-strip,
.section {
  width: min(var(--max), calc(100% - 28px));
  margin-inline: auto;
}

.hero {
  min-height: calc(100svh - 64px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 76px);
  padding: clamp(42px, 7vw, 92px) 0 48px;
}

.hero-copy h1,
.section-heading h2 {
  margin: 0;
  letter-spacing: -0.055em;
}

.hero-copy h1 {
  max-width: 720px;
  font-size: clamp(3.4rem, 8.4vw, 7.2rem);
  line-height: 0.88;
}

.hero-copy h1:focus,
.media-upload-header h2:focus {
  outline: 0;
}

@media (min-width: 801px) {
  .hero-copy {
    align-self: start;
    padding-top: clamp(84px, 14vh, 150px);
  }
}

.lead {
  max-width: 630px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.55vw, 1.3rem);
  line-height: 1.55;
}

.hero-upload-card {
  position: relative;
  display: grid;
  max-width: 600px;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  margin-top: 28px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 24px;
  padding: 13px 13px 13px 15px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(238, 247, 255, 0.68)),
    rgba(255, 255, 255, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 18px 50px rgba(36, 71, 103, 0.12);
  backdrop-filter: blur(26px) saturate(160%);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.hero-upload-card::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.5), transparent 45%);
  content: "";
  pointer-events: none;
}

.hero-upload-card.is-dragging {
  border-color: rgba(10, 132, 255, 0.7);
  box-shadow: 0 20px 60px rgba(10, 132, 255, 0.2), 0 0 0 4px rgba(10, 132, 255, 0.1);
  transform: translateY(-2px);
}

.hero-upload-icon,
.media-picker-icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 52px;
  height: 52px;
  flex: none;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 17px;
  background: linear-gradient(145deg, #5cb6ff, #087df0);
  color: #fff;
  box-shadow: 0 10px 24px rgba(10, 132, 255, 0.24);
}

.hero-upload-icon::before,
.hero-upload-icon::after,
.hero-upload-icon i {
  position: absolute;
  border-radius: 2px;
  background: #fff;
  content: "";
}

.hero-upload-icon::before {
  width: 21px;
  height: 3px;
}

.hero-upload-icon::after {
  width: 3px;
  height: 21px;
}

.hero-upload-icon i {
  width: 22px;
  height: 15px;
  margin-top: 13px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  background: transparent;
}

.hero-upload-copy {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.hero-upload-copy small {
  margin-bottom: 2px;
  color: #0872dc;
  font-size: 0.65rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-upload-copy strong {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.hero-upload-copy > span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.hero-album-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 7px;
}

.hero-album-actions button {
  position: relative;
  min-height: 44px;
  border: 0;
  border-radius: 15px;
  padding: 0 17px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font-weight: 760;
  box-shadow: 0 8px 20px rgba(10, 132, 255, 0.21);
}

.hero-album-actions .hero-album-add {
  display: inline-flex;
  width: auto;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 13px;
  background: rgba(10, 132, 255, 0.11);
  color: #0872dc;
  box-shadow: none;
  font-size: 1.1rem;
}

.hero-upload-drop-hint {
  position: relative;
  z-index: 1;
  display: none;
  grid-column: 2 / -1;
  margin-top: -8px;
  color: var(--muted);
  font-size: 0.68rem;
}

@media (hover: hover) and (pointer: fine) {
  .hero-upload-drop-hint {
    display: block;
  }
}

.eyebrow,
.micro {
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 750;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--ink);
  color: #fff;
}

.button.secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.74);
}

.hero-visual {
  position: relative;
  overflow: hidden;
  margin: 0;
  border-radius: 32px;
  background: #dce7e3;
  box-shadow: var(--shadow);
}

.hero-visual > img {
  width: 100%;
  height: clamp(510px, 68vh, 760px);
  min-height: 510px;
  object-fit: cover;
}

.hero-float {
  position: absolute;
  right: 20px;
  bottom: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 18px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 38px rgba(16, 35, 40, 0.17);
  backdrop-filter: blur(18px);
}

.hero-float span:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.status-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(47, 158, 68, 0.12);
}

.answers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 16px 45px rgba(29, 29, 31, 0.06);
}

.answers article {
  position: relative;
  min-height: 235px;
  padding: clamp(26px, 4vw, 46px);
}

.answers article + article {
  border-left: 1px solid var(--line);
}

.answer-number {
  position: absolute;
  top: 22px;
  right: 26px;
  color: rgba(29, 29, 31, 0.16);
  font-size: 1.7rem;
  font-weight: 800;
}

.answers h2 {
  margin: 0 0 10px;
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  letter-spacing: -0.045em;
}

.answers p:last-child {
  max-width: 330px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.fact-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 42px 0 70px;
}

.fact-strip div {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0 clamp(10px, 2vw, 28px);
  text-align: center;
}

.fact-strip div + div {
  border-left: 1px solid var(--line);
}

.fact-strip strong {
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  letter-spacing: -0.04em;
}

.fact-strip span {
  color: var(--muted);
  font-size: 0.83rem;
}

.section {
  padding: clamp(78px, 10vw, 140px) 0;
}

.section-heading {
  margin-bottom: 46px;
}

.section-heading h2 {
  font-size: clamp(2.35rem, 5.7vw, 5rem);
  line-height: 0.98;
}

.split-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  align-items: end;
  gap: clamp(34px, 8vw, 110px);
}

.split-heading > p,
.subheading > p {
  max-width: 500px;
  margin: 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.65;
}

.route-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}

.choice-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(25px, 4vw, 40px);
  background: var(--surface);
}

.choice-card.is-selected {
  border-color: rgba(47, 158, 68, 0.32);
  background: linear-gradient(145deg, #fff, #f1fbf3);
  box-shadow: 0 16px 45px rgba(47, 158, 68, 0.08);
}

.choice-card.is-muted {
  background: rgba(255, 255, 255, 0.46);
}

.choice-topline {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.choice-check,
.choice-x {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 0.82rem;
}

.choice-x {
  background: #e7e7ea;
  color: var(--muted);
}

.choice-card h3 {
  margin: 26px 0 10px;
  font-size: clamp(1.5rem, 2.8vw, 2.25rem);
  letter-spacing: -0.04em;
}

.choice-card > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.choice-metrics {
  display: flex;
  gap: 28px;
  margin-top: 28px;
}

.choice-metrics span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.choice-metrics strong {
  color: var(--ink);
  font-size: 1.2rem;
}

.route-app {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 22px 60px rgba(29, 29, 31, 0.08);
}

.day-tabs {
  display: grid;
  grid-template-columns: repeat(8, minmax(100px, 1fr));
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.day-tabs::-webkit-scrollbar {
  display: none;
}

.day-tab {
  min-height: 76px;
  border: 0;
  border-right: 1px solid var(--line);
  padding: 12px 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
}

.day-tab span,
.day-tab small {
  display: block;
}

.day-tab span {
  margin-bottom: 4px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.day-tab small {
  font-size: 0.78rem;
}

.day-tab:hover,
.day-tab:focus-visible {
  background: var(--surface-soft);
  color: var(--ink);
}

.day-tab[aria-selected="true"] {
  background: var(--ink);
  color: #fff;
}

.route-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(340px, 0.62fr);
  min-height: 610px;
}

.map-shell {
  position: relative;
  min-height: 610px;
  border-right: 1px solid var(--line);
  background: #dfe9e5;
}

#route-map {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.map-legend {
  position: absolute;
  z-index: 500;
  right: 14px;
  bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 13px;
  padding: 10px 13px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 24px rgba(29, 29, 31, 0.12);
  font-size: 0.72rem;
  backdrop-filter: blur(12px);
}

.map-legend span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.legend-line {
  display: block;
  width: 24px;
  height: 4px;
  border-radius: 99px;
  background: var(--blue);
}

.legend-line.faded {
  background: #7b8788;
  opacity: 0.45;
}

.leaflet-control-attribution {
  font-size: 9px !important;
}

.route-marker {
  display: grid;
  width: 26px !important;
  height: 26px !important;
  margin: -13px 0 0 -13px !important;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 5px 16px rgba(29, 29, 31, 0.3);
  font-size: 0.65rem;
  font-weight: 800;
}

.route-marker.is-active {
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(10, 132, 255, 0.2), 0 5px 16px rgba(29, 29, 31, 0.3);
}

.day-panel {
  display: flex;
  min-height: 610px;
  flex-direction: column;
  padding: clamp(28px, 4vw, 50px);
  background: var(--surface);
  container-type: inline-size;
}

.day-visual {
  overflow: hidden;
  margin: 0 0 28px;
  border-radius: 18px;
  background: #e6e6e8;
}

.day-visual img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.day-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.day-meta span {
  border-radius: 999px;
  padding: 7px 10px;
  background: #f1f1f3;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.day-panel h3 {
  margin: 18px 0 8px;
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
  letter-spacing: -0.05em;
}

.day-route-name {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.5;
}

.day-highlights {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.day-highlights li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  line-height: 1.45;
}

.day-highlights li::before {
  content: "✓";
  color: var(--green);
  font-weight: 800;
}

.day-note {
  margin: 26px 0 0;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.day-guide {
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

.day-guide-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 0 9px;
}

.day-guide-heading strong {
  font-size: 0.88rem;
}

.day-guide-heading span {
  color: var(--muted);
  font-size: 0.68rem;
}

.day-activity {
  --activity-accent: var(--blue);
  --activity-soft: var(--blue-soft);
  border-bottom: 1px solid var(--line);
}

.day-activity--market {
  --activity-accent: #287a48;
  --activity-soft: #edf8f1;
}

.day-activity--food {
  --activity-accent: #a65722;
  --activity-soft: #fff3e9;
}

.day-activity--event {
  --activity-accent: #7453a6;
  --activity-soft: #f4effb;
}

.day-activity--bike {
  --activity-accent: #08766d;
  --activity-soft: #e9f8f5;
}

.day-activity summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 0;
  cursor: pointer;
  list-style: none;
}

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

.day-activity summary > span:first-child {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.day-activity summary small {
  width: fit-content;
  border-radius: 999px;
  padding: 3px 7px;
  background: var(--activity-soft);
  color: var(--activity-accent);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.day-activity summary strong {
  overflow: hidden;
  font-size: 0.86rem;
  line-height: 1.3;
  text-overflow: ellipsis;
}

.day-activity-summary-tail {
  display: flex;
  flex: none;
  align-items: center;
  gap: 9px;
}

.day-activity-summary-tail em {
  color: var(--muted);
  font-size: 0.65rem;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.day-activity summary i {
  display: grid;
  width: 26px;
  height: 26px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: #f1f1f3;
  color: var(--muted);
  font-size: 1rem;
  font-style: normal;
  transition: transform 180ms ease, background 180ms ease;
}

.day-activity[open] summary i {
  background: var(--activity-soft);
  color: var(--activity-accent);
  transform: rotate(45deg);
}

.day-activity-body {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 18px;
  padding: 0 0 18px;
}

.day-activity-body.no-gallery {
  grid-template-columns: 1fr;
}

.day-activity-gallery {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, 76px);
  gap: 6px;
}

.day-activity-gallery--1 {
  grid-template-columns: 1fr;
  grid-template-rows: 158px;
}

.day-activity-gallery--2 {
  grid-template-rows: 158px;
}

.day-activity-gallery--3 {
  grid-template-columns: minmax(0, 1.65fr) minmax(84px, 0.8fr);
}

.day-activity-photo {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  padding: 0;
  background: #e6e6e8;
  color: #fff;
  cursor: zoom-in;
  text-align: left;
}

.day-activity-gallery--3 .day-activity-photo.is-main {
  grid-row: 1 / span 2;
}

.day-activity-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease, filter 220ms ease;
}

.day-activity-photo span {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  padding: 24px 9px 8px;
  background: linear-gradient(transparent, rgba(6, 11, 15, 0.74));
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-activity-gallery--3 .day-activity-photo:not(.is-main) span {
  display: none;
}

.day-activity-photo:hover img,
.day-activity-photo:focus-visible img {
  filter: saturate(1.08);
  transform: scale(1.035);
}

.day-activity-photo:focus-visible {
  outline: 3px solid var(--activity-accent);
  outline-offset: 2px;
}

.day-activity-copy {
  min-width: 0;
}

.day-activity-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.day-activity-body .day-activity-meta {
  margin-bottom: 7px;
  color: var(--ink);
  font-weight: 700;
}

.day-activity-access {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  margin-top: 12px;
  border-radius: 12px;
  padding: 9px 10px;
  background: #e9f8f5;
  color: #075f58;
}

.day-activity-access > span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  background: #08766d;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  transform: rotate(-12deg);
}

.day-activity-access p {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 7px;
  color: inherit;
}

.day-activity-access strong {
  width: 100%;
  font-size: 0.68rem;
}

.day-activity-access b,
.day-activity-access small {
  font-size: 0.65rem;
  line-height: 1.35;
}

.day-activity-access b {
  color: #075f58;
}

.day-activity-access small {
  color: #39746f;
}

.day-activity-access small::before {
  content: "· ";
}

.day-activity-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 11px;
}

.day-activity-body a {
  display: inline-flex;
  gap: 5px;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 750;
  text-decoration: none;
}

.day-activity-body a:hover,
.day-activity-body a:focus-visible {
  text-decoration: underline;
}

@container (min-width: 620px) {
  .day-activity-body.has-gallery {
    grid-template-columns: minmax(220px, 0.95fr) minmax(0, 1.05fr);
  }
}

.route-fallback {
  display: flex;
  align-items: baseline;
  gap: 24px;
  margin-top: 16px;
  border-radius: 18px;
  padding: 20px 24px;
  background: #e9edf1;
}

.route-fallback strong {
  flex: none;
}

.route-fallback p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.guide-calculation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(14px, 2.5vw, 30px);
  margin: 14px 0 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(22px, 3vw, 34px);
  background: var(--surface);
}

.guide-calculation > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.guide-calculation > i {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #eeeeef;
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.guide-calculation span,
.guide-calculation small {
  color: var(--muted);
}

.guide-calculation span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.guide-calculation strong {
  font-size: clamp(1.45rem, 2.6vw, 2.1rem);
  letter-spacing: -0.04em;
}

.guide-calculation small {
  font-size: 0.78rem;
  line-height: 1.4;
}

.guide-calculation .calculation-result {
  border-radius: 15px;
  padding: 16px 18px;
  background: var(--blue-soft);
}

.guide-calculation .calculation-result strong,
.guide-calculation .calculation-result span {
  color: #0870d8;
}

.weekend-section,
.boat-section {
  position: relative;
  width: 100%;
  max-width: none;
  padding-inline: max(14px, calc((100vw - var(--max)) / 2));
  background: var(--dark);
  color: #f6f8f9;
}

.light-heading .eyebrow,
.weekend-section .eyebrow,
.boat-section .eyebrow,
.light-heading > p {
  color: #9caab3;
}

.journey {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto;
  align-items: center;
  gap: clamp(10px, 2.5vw, 28px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  padding: clamp(25px, 4vw, 44px);
  background: var(--dark-soft);
}

.journey > i {
  display: block;
  height: 2px;
  background: linear-gradient(90deg, #38505f, var(--blue));
}

.journey-node {
  display: flex;
  min-width: 130px;
  flex-direction: column;
  gap: 4px;
}

.journey-node span {
  color: #9caab3;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.journey-node strong {
  font-size: 1.12rem;
}

.journey-node small {
  color: #9caab3;
  line-height: 1.4;
}

.journey-node.highlight strong {
  color: #70b7ff;
}

.data-caveat {
  margin: 15px 0 0;
  color: #9caab3;
  font-size: 0.79rem;
  line-height: 1.5;
}

.station-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.station-card {
  display: flex;
  min-height: 245px;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.04);
}

.station-card.recommended {
  border-color: rgba(112, 183, 255, 0.38);
  background: linear-gradient(145deg, rgba(10, 132, 255, 0.22), rgba(10, 132, 255, 0.06));
}

.station-rank {
  margin-bottom: auto;
  color: #9caab3;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.station-card h3 {
  margin: 24px 0 7px;
  font-size: 1.2rem;
}

.station-card > strong {
  color: #70b7ff;
  font-size: 0.88rem;
}

.station-card p {
  margin: 12px 0 0;
  color: #9caab3;
  font-size: 0.88rem;
  line-height: 1.5;
}

.sunday-split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.9fr);
  overflow: hidden;
  margin-top: 70px;
  border-radius: 28px;
  background: #f6f8f9;
  color: var(--ink);
}

.weekend-section .sunday-split {
  margin-top: 0;
}

.weekend-subheading {
  margin-top: clamp(70px, 9vw, 110px);
}

.weekend-subheading > p {
  color: #9caab3;
}

.sunday-photo img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
}

.sunday-copy {
  padding: clamp(35px, 6vw, 72px);
}

.sunday-copy h3 {
  margin: 0 0 34px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  letter-spacing: -0.05em;
  line-height: 1;
}

.compact-timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.compact-timeline li {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

.compact-timeline li span {
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 800;
}

.compact-timeline p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.car-plan {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(29, 29, 31, 0.06);
}

.car-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: clamp(28px, 5vw, 58px);
}

.car-flow article {
  min-height: 145px;
}

.flow-time {
  display: block;
  margin-bottom: 14px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
}

.car-flow strong {
  font-size: 1.08rem;
}

.car-flow p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.flow-arrow {
  color: #afb0b4;
  font-size: 1.8rem;
}

.car-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  background: #f0f1f3;
}

.car-summary article {
  display: grid;
  gap: 5px;
  padding: 27px clamp(26px, 4vw, 48px);
}

.car-summary article + article {
  border-left: 1px solid var(--line);
}

.car-summary span {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.car-summary strong {
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.car-summary p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.summary-main strong {
  color: var(--green);
}

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

.vehicle-grid article {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.65);
}

.vehicle-icon {
  display: grid;
  flex: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
}

.vehicle-icon.electric {
  background: var(--green);
}

.vehicle-grid h3 {
  margin: 2px 0 6px;
  font-size: 1rem;
}

.vehicle-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

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

.callout {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border-radius: 17px;
  padding: 19px 22px;
}

.callout > span {
  display: grid;
  flex: none;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  font-weight: 900;
}

.callout.warning {
  background: #fff4e6;
}

.callout.warning > span {
  background: #f4b65c;
  color: #fff;
}

.callout.info {
  background: var(--blue-soft);
}

.callout.info > span {
  background: var(--blue);
  color: #fff;
}

.callout p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.45;
}

.stop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 380px;
  gap: 14px;
}

.stop-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #cbd1d0;
}

.stop-card.wide {
  grid-column: span 2;
}

.stop-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.stop-card:hover img {
  transform: scale(1.035);
}

.stop-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.06) 25%, rgba(4, 13, 18, 0.82) 100%);
}

.stop-overlay {
  position: absolute;
  z-index: 1;
  right: 22px;
  bottom: 21px;
  left: 22px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  color: #fff;
}

.stop-overlay > div:first-child {
  display: flex;
  flex-direction: column;
}

.stop-score {
  font-size: 2.05rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.stop-overlay small {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.65rem;
}

.stop-overlay > div:last-child {
  flex: 1;
  text-align: right;
}

.stop-overlay p {
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stop-overlay h3 {
  margin: 0 0 4px;
  font-size: clamp(1.5rem, 2.8vw, 2.35rem);
  letter-spacing: -0.045em;
}

.stop-overlay span:last-child {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
}

.market-section,
.restaurant-section {
  margin-top: clamp(75px, 9vw, 120px);
}

.subheading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 28px;
}

.subheading h3 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.3rem);
  letter-spacing: -0.05em;
}

.market-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.market-list article {
  display: grid;
  min-height: 170px;
  grid-template-rows: auto 1fr auto;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 19px;
  padding: 22px;
  background: var(--surface);
}

.market-list article.market-featured {
  border-color: rgba(47, 158, 68, 0.32);
  background: #f3faf5;
}

.market-list time {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  background: #edf8f1;
  color: #287a48;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.market-list h4,
.restaurant-list h4 {
  margin: 0;
  letter-spacing: -0.025em;
}

.market-list h4 {
  font-size: 1.05rem;
}

.market-list p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.45;
}

.market-list a,
.restaurant-list > article > a {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.restaurant-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.restaurant-list article {
  display: grid;
  min-height: 142px;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 19px;
  padding: 22px;
  background: var(--surface);
}

.restaurant-list article.restaurant-best {
  border-color: rgba(47, 158, 68, 0.3);
  background: #f7fbf8;
}

.restaurant-day {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.restaurant-list h4 {
  font-size: 1.1rem;
}

.restaurant-list p {
  margin: 7px 0 5px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.restaurant-list small {
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.4;
}

.restaurant-list > article > a {
  align-self: center;
}

.avoid-list,
.inspection {
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.55);
}

.avoid-list summary,
.inspection summary,
.source-columns summary {
  cursor: pointer;
  font-weight: 750;
  list-style: none;
}

.avoid-list summary::-webkit-details-marker,
.inspection summary::-webkit-details-marker,
.source-columns summary::-webkit-details-marker {
  display: none;
}

.avoid-list summary {
  padding: 20px 24px;
}

.avoid-list summary::after,
.source-columns summary::after {
  content: "+";
  float: right;
  color: var(--muted);
  font-size: 1.25rem;
  font-weight: 400;
}

.avoid-list[open] summary::after,
.source-columns details[open] summary::after {
  content: "–";
}

.avoid-list > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 20px 24px;
}

.avoid-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.5;
}

.boat-gallery {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  grid-template-rows: repeat(2, 250px);
  gap: 14px;
}

.boat-gallery button,
.plan-image {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  padding: 0;
  background: #24323a;
  cursor: zoom-in;
}

.boat-gallery button.gallery-main {
  grid-row: span 2;
}

.boat-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.boat-gallery button:hover img,
.plan-image:hover img {
  transform: scale(1.025);
}

.boat-gallery button span,
.plan-image span {
  position: absolute;
  right: 14px;
  bottom: 14px;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font-size: 0.73rem;
  font-weight: 750;
  backdrop-filter: blur(10px);
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 38px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
}

.spec-grid div {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 22px 12px;
  text-align: center;
}

.spec-grid div + div {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.spec-grid strong {
  font-size: 1.25rem;
}

.spec-grid span {
  color: #9caab3;
  font-size: 0.75rem;
}

.boat-plan-block {
  display: grid;
  grid-template-columns: minmax(370px, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(35px, 7vw, 95px);
  align-items: center;
  margin: clamp(70px, 10vw, 130px) 0;
}

.plan-copy h3 {
  margin: 0 0 30px;
  font-size: clamp(2rem, 4vw, 3.45rem);
  letter-spacing: -0.05em;
  line-height: 1;
}

.cabin-list {
  display: grid;
}

.cabin-list > div {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 0;
}

.cabin-list span {
  color: #70b7ff;
  font-size: 0.72rem;
  font-weight: 800;
}

.cabin-list p {
  margin: 0;
  color: #9caab3;
  font-size: 0.87rem;
  line-height: 1.45;
}

.cabin-list strong {
  color: #f6f8f9;
}

.plan-image {
  min-height: 470px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #eef1f2;
}

.plan-image img {
  width: 100%;
  height: 100%;
  min-height: 470px;
  object-fit: contain;
}

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

.ops-grid article {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 27px;
  background: rgba(255, 255, 255, 0.04);
}

.ops-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  background: rgba(112, 183, 255, 0.14);
  color: #70b7ff;
  font-size: 1.2rem;
}

.ops-grid h3 {
  margin: 22px 0 18px;
}

.ops-grid ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  color: #9caab3;
  font-size: 0.86rem;
  line-height: 1.4;
  list-style: none;
}

.ops-grid li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 6px;
}

.ops-grid li::before {
  content: "·";
  color: #70b7ff;
  font-weight: 800;
}

.inspection {
  margin-top: 14px;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.inspection summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
}

.inspection summary strong {
  color: #70b7ff;
}

.inspection-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.1);
}

.inspection-list span {
  padding: 15px 20px;
  background: var(--dark-soft);
  color: #b9c2c8;
  font-size: 0.82rem;
}

.equipment-section {
  position: relative;
}

.equipment-snapshot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}

.equipment-snapshot article {
  display: flex;
  min-height: 150px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}

.equipment-snapshot article + article {
  border-left: 1px solid var(--line);
}

.equipment-snapshot strong {
  margin-bottom: 13px;
  color: var(--blue);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  letter-spacing: -0.05em;
}

.equipment-snapshot span {
  font-weight: 750;
}

.equipment-snapshot small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.packing-console {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 14px 0;
  border-radius: 22px;
  padding: 20px 22px;
  background: var(--dark);
  color: #fff;
}

.packing-progress {
  display: grid;
  grid-template-columns: auto auto minmax(100px, 210px);
  align-items: center;
  gap: 4px 12px;
}

.packing-progress > span {
  color: #9caab3;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.packing-progress > strong {
  grid-row: span 2;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
}

.packing-progress > div {
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.packing-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #66d37e;
  transition: width 260ms ease;
}

.packing-progress small {
  grid-column: 3;
  color: #9caab3;
  font-size: 0.7rem;
}

.equipment-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.equipment-filters button {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 9px 13px;
  background: transparent;
  color: #b9c2c8;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 750;
}

.equipment-filters button:hover,
.equipment-filters button:focus-visible {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.equipment-filters button.is-active {
  border-color: #fff;
  background: #fff;
  color: var(--ink);
}

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

.equipment-card {
  position: relative;
  display: flex;
  min-height: 265px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  background: var(--surface);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.equipment-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--blue);
  content: "";
}

.equipment-card.status-bring::before {
  background: var(--orange);
}

.equipment-card.status-confirm::before {
  background: #8b5cf6;
}

.equipment-card:hover {
  border-color: rgba(10, 132, 255, 0.28);
  box-shadow: 0 16px 40px rgba(29, 29, 31, 0.07);
  transform: translateY(-2px);
}

.equipment-card-top,
.equipment-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.equipment-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: var(--blue-soft);
  color: #0870d8;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.status-bring .equipment-icon {
  background: #fff2df;
  color: #a75b00;
}

.status-confirm .equipment-icon {
  background: #f2edff;
  color: #6e42c1;
}

.equipment-status {
  border-radius: 999px;
  padding: 6px 9px;
  background: #eeeeef;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.equipment-card h3 {
  margin: 20px 0 8px;
  font-size: 1.08rem;
  letter-spacing: -0.025em;
}

.equipment-card > p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.equipment-card-bottom {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.equipment-card-bottom > small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
}

.equipment-check {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.equipment-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.equipment-check span {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 1.5px solid #b8b8be;
  border-radius: 7px;
  color: transparent;
  font-size: 0.72rem;
  font-weight: 900;
}

.equipment-check em,
.equipment-included {
  color: var(--muted);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 750;
}

.equipment-check input:focus-visible + span {
  outline: 3px solid rgba(10, 132, 255, 0.28);
  outline-offset: 3px;
}

.equipment-check input:checked + span {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.equipment-card:has(.equipment-check input:checked) {
  border-color: rgba(47, 158, 68, 0.35);
  background: #f6fbf7;
}

.equipment-card:has(.equipment-check input:checked)::before {
  background: var(--green);
}

.equipment-included {
  color: var(--green);
}

.equipment-included i {
  font-style: normal;
}

.packing-layout {
  display: grid;
  grid-template-columns: minmax(310px, 0.76fr) minmax(0, 1.24fr);
  gap: 14px;
}

.personal-packing,
.shared-packing,
.onboard-compact {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}

.personal-packing,
.shared-packing {
  padding: clamp(22px, 3vw, 32px);
}

.personal-packing header,
.shared-packing header,
.onboard-compact header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.personal-packing header span,
.shared-packing header span {
  color: var(--blue);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.personal-packing header h3,
.shared-packing header h3,
.onboard-compact header h3 {
  margin: 6px 0 0;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  letter-spacing: -0.04em;
}

.personal-packing header > strong,
.shared-packing header > strong {
  flex: none;
  border-radius: 999px;
  padding: 7px 10px;
  background: #f1f1f3;
  color: var(--muted);
  font-size: 0.66rem;
}

.personal-packing ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
  margin: 23px 0 0;
  padding: 0;
  list-style: none;
}

.personal-packing li {
  position: relative;
  border-top: 1px solid var(--line);
  padding: 10px 0 10px 20px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.personal-packing li::before {
  position: absolute;
  top: 12px;
  left: 1px;
  color: var(--green);
  content: "✓";
  font-size: 0.72rem;
  font-weight: 850;
}

.shared-packing-intro {
  margin: 20px 0 15px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.shared-packing-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.shared-task {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 12px;
  background: #fbfbfd;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.shared-task:hover,
.shared-task:focus-visible {
  border-color: rgba(10, 132, 255, 0.45);
  background: #f6faff;
  transform: translateY(-1px);
}

.shared-task.is-assigned {
  border-color: rgba(47, 158, 68, 0.28);
  background: #f5fbf6;
}

.shared-task-check {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1.5px solid #b8b8be;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 850;
}

.shared-task.is-assigned .shared-task-check {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.shared-task-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.shared-task-copy strong {
  font-size: 0.77rem;
  line-height: 1.25;
}

.shared-task-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.3;
  text-overflow: ellipsis;
}

.shared-task-owner {
  max-width: 86px;
  overflow: hidden;
  border-radius: 999px;
  padding: 6px 8px;
  background: #ededf0;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-task.is-assigned .shared-task-owner {
  background: #dff4e4;
  color: #237b35;
}

.shared-packing-status {
  min-height: 16px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.67rem;
}

.shared-packing-status.is-error {
  color: var(--red);
}

.onboard-compact {
  margin-top: 14px;
  padding: clamp(24px, 4vw, 38px);
  background: var(--dark);
  color: #fff;
}

.onboard-compact header > span {
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.09);
  color: #aeb8bf;
  font-size: 0.68rem;
}

.onboard-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 26px;
  background: rgba(255, 255, 255, 0.11);
}

.onboard-groups article {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  padding: 23px;
  background: var(--dark);
}

.onboard-groups article > span {
  color: #70b7ff;
  font-size: 0.67rem;
  font-weight: 850;
}

.onboard-groups h4 {
  margin: 0 0 8px;
  font-size: 0.9rem;
}

.onboard-groups p {
  margin: 0;
  color: #aeb8bf;
  font-size: 0.77rem;
  line-height: 1.5;
}

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

.equipment-truths article {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 15px;
  border-radius: 18px;
  padding: 22px;
  background: #eaf2f9;
}

.equipment-truths article > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: rgba(10, 132, 255, 0.11);
  color: #0870d8;
  font-size: 0.72rem;
  font-weight: 850;
}

.equipment-truths strong {
  display: block;
  margin: 2px 0 7px;
  font-size: 0.9rem;
}

.equipment-truths p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.equipment-inventory {
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.equipment-inventory summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
}

.equipment-inventory summary strong {
  color: var(--blue);
}

.inventory-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid var(--line);
  background: var(--line);
}

.inventory-columns > div {
  padding: 22px;
  background: var(--surface);
}

.inventory-columns h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.inventory-columns p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.equipment-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  margin-top: 24px;
}

.equipment-links a {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.equipment-links a:hover,
.equipment-links a:focus-visible {
  color: var(--blue);
}

.check-progress {
  display: grid;
  grid-template-columns: auto minmax(100px, 220px);
  align-items: center;
  gap: 10px 16px;
}

.check-progress strong {
  font-size: 1.25rem;
}

.check-progress > span {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #dedee2;
}

.check-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 260ms ease;
}

.check-progress small {
  grid-column: 2;
  color: var(--muted);
}

.check-progress small.is-error {
  color: var(--red);
}

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

.check-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: start;
  gap: 14px;
  min-height: 98px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  background: var(--surface);
  cursor: pointer;
  transition: opacity 180ms ease, border-color 180ms ease;
}

.check-item:hover {
  border-color: rgba(10, 132, 255, 0.4);
}

.check-item:has(input:disabled) {
  cursor: wait;
  opacity: 0.65;
}

.check-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check-box {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1.5px solid #babac0;
  border-radius: 8px;
  color: transparent;
  transition: background 160ms ease, border 160ms ease;
}

.check-item input:checked + .check-box {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.check-item input:focus-visible + .check-box {
  outline: 3px solid rgba(10, 132, 255, 0.28);
  outline-offset: 3px;
}

.check-copy strong,
.check-copy small {
  display: block;
}

.check-copy strong {
  margin-bottom: 5px;
}

.check-copy small {
  color: var(--muted);
  line-height: 1.45;
}

.check-tag {
  border-radius: 999px;
  padding: 5px 8px;
  background: #eeeeef;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.check-tag.urgent {
  background: #ffe6e6;
  color: var(--red);
}

.check-tag.soon {
  background: #fff1db;
  color: #a65c00;
}

.check-item:has(input:checked) {
  opacity: 0.55;
}

.check-item:has(input:checked) .check-copy {
  text-decoration: line-through;
}

.reset-button {
  display: block;
  margin: 24px auto 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  text-decoration: underline;
}

.sources {
  border-top: 1px solid var(--line);
}

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

.source-columns details {
  align-self: start;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
}

.source-columns summary {
  padding: 20px 22px;
}

.source-columns ul {
  display: grid;
  gap: 1px;
  margin: 0;
  border-top: 1px solid var(--line);
  padding: 0;
  background: var(--line);
  list-style: none;
}

.source-columns li {
  background: var(--surface);
}

.source-columns a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.4;
  text-decoration: none;
}

.source-columns a:hover {
  color: var(--blue);
}

.photo-credit {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  margin-top: 40px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.photo-credit p {
  max-width: 600px;
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.privacy-note {
  text-align: right;
}

footer {
  display: flex;
  width: min(var(--max), calc(100% - 28px));
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 28px 0 38px;
  color: var(--muted);
  font-size: 0.78rem;
}

.shared-task-dialog {
  width: min(470px, calc(100vw - 28px));
  max-width: none;
  border: 0;
  border-radius: 24px;
  padding: 0;
  background: #fff;
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.32);
}

.shared-task-dialog::backdrop {
  background: rgba(17, 27, 34, 0.64);
  backdrop-filter: blur(7px);
}

.shared-task-dialog form {
  padding: clamp(25px, 6vw, 38px);
}

.shared-task-dialog-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 13px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 900;
}

.shared-task-dialog h2 {
  margin: 7px 0 28px;
  font-size: clamp(1.6rem, 6vw, 2.25rem);
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.shared-task-dialog label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.77rem;
  font-weight: 750;
}

.shared-task-dialog input {
  width: 100%;
  border: 1px solid #c9c9cf;
  border-radius: 13px;
  padding: 13px 14px;
  background: #fbfbfd;
  color: var(--ink);
  outline: 0;
}

.shared-task-dialog input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.12);
}

.shared-task-dialog-actions {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 8px;
  margin-top: 24px;
}

.shared-task-dialog-actions button {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.73rem;
  font-weight: 800;
}

.shared-task-release {
  background: #fff0f0;
  color: var(--red);
}

.shared-task-cancel {
  background: #ededf0;
  color: var(--ink);
}

.shared-task-save {
  background: var(--ink);
  color: #fff;
}

.lightbox {
  width: min(1200px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  border: 0;
  border-radius: 22px;
  padding: 10px 56px;
  background: #fff;
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.45);
}

.lightbox[open] {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr);
}

.lightbox::backdrop {
  background: rgba(9, 14, 17, 0.84);
  backdrop-filter: blur(8px);
}

.lightbox figure {
  min-width: 0;
  margin: 0;
}

.lightbox img {
  width: 100%;
  max-height: calc(100vh - 132px);
  border-radius: 14px;
  object-fit: contain;
}

.lightbox figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 9px 5px 1px;
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.35;
}

.lightbox figcaption > span {
  font-weight: 750;
}

.lightbox figcaption small {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px 10px;
  color: var(--muted);
  font-size: 0.62rem;
  text-align: right;
}

.lightbox figcaption a {
  color: inherit;
  text-decoration: none;
}

.lightbox figcaption a:hover,
.lightbox figcaption a:focus-visible {
  color: var(--blue);
  text-decoration: underline;
}

.lightbox-close {
  position: fixed;
  z-index: 2;
  top: 24px;
  right: 24px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.5rem;
}

.lightbox-nav {
  position: fixed;
  z-index: 2;
  top: 50%;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  font-size: 1.8rem;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 22px;
}

.lightbox-next {
  right: 22px;
}

.lightbox-nav[hidden],
.lightbox figcaption a[hidden] {
  display: none;
}

.media-gallery-dialog,
.media-upload-dialog {
  width: min(720px, calc(100% - 28px));
  max-width: none;
  max-height: min(860px, calc(100svh - 32px));
  overflow: visible;
  margin: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
}

.media-gallery-dialog::backdrop,
.media-upload-dialog::backdrop {
  background: rgba(15, 24, 31, 0.42);
  backdrop-filter: blur(12px) saturate(120%);
}

.media-gallery-dialog {
  width: min(1180px, calc(100% - 28px));
  max-height: min(900px, calc(100svh - 24px));
}

.media-gallery-sheet {
  position: relative;
  display: flex;
  height: min(860px, calc(100svh - 24px));
  max-height: min(860px, calc(100svh - 24px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 34px;
  background:
    radial-gradient(circle at 88% -5%, rgba(76, 170, 255, 0.2), transparent 33%),
    radial-gradient(circle at 0 100%, rgba(124, 211, 164, 0.12), transparent 31%),
    rgba(247, 250, 253, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 35px 110px rgba(7, 19, 30, 0.3);
  backdrop-filter: blur(38px) saturate(165%);
}

.media-gallery-handle {
  display: none;
}

.media-gallery-header {
  display: flex;
  flex: none;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 27px 30px 20px;
}

.media-gallery-header .eyebrow {
  margin-bottom: 7px;
  color: var(--blue);
}

.media-gallery-header h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.055em;
  line-height: 0.96;
}

.media-gallery-header h2:focus {
  outline: 0;
}

.media-gallery-header p:not(.eyebrow) {
  max-width: 690px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.media-gallery-header .media-gallery-summary {
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 720;
}

.media-gallery-close,
.media-gallery-viewer-actions button {
  display: inline-flex;
  height: 44px;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px 0 11px;
  background: rgba(29, 29, 31, 0.07);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 780;
  white-space: nowrap;
}

.media-gallery-close span:first-child,
.media-gallery-viewer-actions button span:first-child {
  font-size: 1.35rem;
  font-weight: 430;
  line-height: 1;
}

.media-gallery-toolbar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 30px;
  border-block: 1px solid rgba(29, 29, 31, 0.075);
  background: rgba(255, 255, 255, 0.36);
}

.media-gallery-tabs {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 3px;
  overflow-x: auto;
  border: 1px solid rgba(29, 29, 31, 0.075);
  border-radius: 16px;
  padding: 3px;
  background: rgba(29, 29, 31, 0.045);
  scrollbar-width: none;
}

.media-gallery-tabs::-webkit-scrollbar {
  display: none;
}

.media-gallery-tabs button {
  display: inline-flex;
  min-height: 42px;
  flex: none;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 12px;
  padding: 0 13px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 760;
  white-space: nowrap;
}

.media-gallery-tabs button span {
  display: grid;
  min-width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.07);
  font-size: 0.63rem;
}

.media-gallery-tabs button.is-active,
.media-gallery-tabs button[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: 0 4px 15px rgba(31, 50, 67, 0.09);
}

.media-gallery-tabs button.is-active span,
.media-gallery-tabs button[aria-selected="true"] span {
  background: rgba(10, 132, 255, 0.12);
  color: #0872dc;
}

.media-gallery-toolbar-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 7px;
}

.media-gallery-toolbar-actions button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 14px;
  padding: 0 14px;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 780;
}

.media-gallery-refresh {
  border: 1px solid rgba(29, 29, 31, 0.09);
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
}

.media-gallery-refresh[aria-busy="true"] span:first-child {
  animation: media-gallery-spin 800ms linear infinite;
}

.media-gallery-add {
  border: 0;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 24px rgba(10, 132, 255, 0.2);
}

.media-gallery-content {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 30px calc(30px + env(safe-area-inset-bottom));
}

.media-gallery-bulk {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  margin-bottom: 18px;
  border: 1px solid rgba(10, 132, 255, 0.18);
  border-radius: 22px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(224, 241, 255, 0.68)),
    rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 12px 30px rgba(20, 94, 155, 0.09);
  backdrop-filter: blur(22px) saturate(155%);
}

.media-gallery-bulk[hidden] {
  display: none;
}

.media-gallery-bulk-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  background: rgba(10, 132, 255, 0.12);
  color: #0872dc;
  font-size: 1.55rem;
  font-weight: 720;
}

.media-gallery-bulk-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.media-gallery-bulk-copy strong {
  font-size: 0.88rem;
  letter-spacing: -0.015em;
}

.media-gallery-bulk-copy > span {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.38;
}

.media-gallery-bulk-copy .media-gallery-bulk-ios {
  margin-top: 3px;
  color: #31546f;
  font-weight: 620;
}

.media-gallery-bulk-action {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 15px;
  padding: 0 15px;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 9px 24px rgba(10, 132, 255, 0.22);
  font-size: 0.76rem;
  font-weight: 790;
  text-decoration: none;
  white-space: nowrap;
}

.media-gallery-bulk.is-downloading .media-gallery-bulk-action {
  opacity: 0.68;
}

.media-gallery-bulk-action[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.media-gallery-error {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  margin-bottom: 18px;
  border: 1px solid rgba(201, 42, 42, 0.14);
  border-radius: 18px;
  padding: 11px;
  background: rgba(255, 241, 241, 0.82);
  color: #a61e1e;
}

.media-gallery-error[hidden] {
  display: none;
}

.media-gallery-error > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgba(201, 42, 42, 0.1);
  font-weight: 850;
}

.media-gallery-error p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
}

.media-gallery-error button {
  min-height: 42px;
  border: 1px solid rgba(201, 42, 42, 0.15);
  border-radius: 12px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.82);
  color: inherit;
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 780;
}

.media-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.media-gallery-day-separator {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 12px;
  margin: 8px 0 -1px;
  color: #405a6e;
  font-size: 0.7rem;
  font-weight: 790;
  letter-spacing: 0.012em;
}

.media-gallery-day-separator:first-child {
  margin-top: 0;
}

.media-gallery-day-separator::after {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, rgba(56, 91, 117, 0.18), rgba(56, 91, 117, 0.02));
  content: "";
}

.media-gallery-day-separator time {
  flex: none;
}

.media-gallery-item {
  position: relative;
  min-width: 0;
}

.media-gallery-pagination {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 8px;
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 18px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.66);
}

.media-gallery-pagination-summary {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 740;
  white-space: nowrap;
}

.media-gallery-pagination-actions {
  display: flex;
  gap: 7px;
}

.media-gallery-pagination button {
  min-height: 42px;
  border: 1px solid rgba(10, 132, 255, 0.16);
  border-radius: 13px;
  padding: 0 13px;
  background: rgba(238, 247, 255, 0.9);
  color: #0872dc;
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 780;
}

.media-gallery-pagination button:disabled {
  cursor: default;
  opacity: 0.38;
}

.media-gallery-card {
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(29, 29, 31, 0.075);
  border-radius: 21px;
  padding: 0;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  box-shadow: 0 9px 28px rgba(25, 46, 65, 0.07);
  cursor: pointer;
  text-align: left;
  transition: border-color 170ms ease, box-shadow 170ms ease, transform 170ms ease;
}

.media-gallery-card:hover,
.media-gallery-card:focus-visible {
  border-color: rgba(10, 132, 255, 0.34);
  box-shadow: 0 14px 34px rgba(25, 46, 65, 0.13);
  transform: translateY(-2px);
}

.media-gallery-card-visual {
  position: relative;
  display: grid;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  place-items: center;
  background:
    radial-gradient(circle at 70% 20%, rgba(10, 132, 255, 0.16), transparent 34%),
    linear-gradient(145deg, #e9f1f7, #dfe8ee);
}

.media-gallery-card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease;
}

.media-gallery-card:hover .media-gallery-card-visual img {
  transform: scale(1.025);
}

.media-gallery-card-fallback {
  color: rgba(29, 29, 31, 0.4);
  font-size: 2rem;
}

.media-gallery-kind,
.media-gallery-owner {
  position: absolute;
  top: 9px;
  z-index: 1;
  min-height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 999px;
  padding: 5px 8px 4px;
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.055em;
  line-height: 1;
  backdrop-filter: blur(14px) saturate(150%);
}

.media-gallery-kind {
  left: 9px;
  background: rgba(18, 26, 33, 0.65);
  color: #fff;
}

.media-gallery-owner {
  right: 9px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
}

.media-gallery-owner.is-mine {
  background: rgba(10, 132, 255, 0.82);
  color: #fff;
}

.media-gallery-card-copy {
  display: block;
  padding: 12px 56px 13px 13px;
}

.media-gallery-card-delete {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  display: grid;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 50%;
  padding: 0;
  place-items: center;
  background: rgba(255, 235, 235, 0.9);
  color: #c62828;
  box-shadow: 0 5px 16px rgba(92, 19, 19, 0.15);
  cursor: pointer;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
  backdrop-filter: blur(14px) saturate(150%);
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.media-gallery-card-delete:hover,
.media-gallery-card-delete:focus-visible {
  background: rgba(255, 220, 220, 0.98);
  box-shadow: 0 7px 20px rgba(92, 19, 19, 0.22);
  transform: translateY(-1px) scale(1.04);
}

.media-gallery-card-copy strong,
.media-gallery-card-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-gallery-card-copy strong {
  font-size: 0.8rem;
  letter-spacing: -0.015em;
}

.media-gallery-card-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.65rem;
}

.media-gallery-empty {
  display: grid;
  min-height: 350px;
  place-items: center;
  align-content: center;
  padding: 34px;
  text-align: center;
}

.media-gallery-empty[hidden] {
  display: none;
}

.media-gallery-empty-icon {
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 23px;
  background: linear-gradient(145deg, rgba(96, 182, 255, 0.2), rgba(255, 255, 255, 0.7));
  color: #0872dc;
  box-shadow: 0 16px 40px rgba(43, 95, 139, 0.12);
  font-size: 1.8rem;
}

.media-gallery-empty h3 {
  margin: 18px 0 0;
  font-size: 1.3rem;
  letter-spacing: -0.035em;
}

.media-gallery-empty p {
  max-width: 480px;
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.media-gallery-empty button {
  min-height: 48px;
  border: 0;
  border-radius: 15px;
  padding: 0 17px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font-weight: 760;
}

.media-gallery-skeleton {
  overflow: hidden;
  border: 1px solid rgba(29, 29, 31, 0.05);
  border-radius: 21px;
  padding-bottom: 13px;
  background: rgba(255, 255, 255, 0.55);
}

.media-gallery-skeleton span,
.media-gallery-skeleton i {
  display: block;
  overflow: hidden;
  background: linear-gradient(100deg, rgba(29, 29, 31, 0.05) 20%, rgba(255, 255, 255, 0.72) 45%, rgba(29, 29, 31, 0.05) 70%);
  background-size: 220% 100%;
  animation: media-gallery-shimmer 1.4s ease-in-out infinite;
}

.media-gallery-skeleton span {
  aspect-ratio: 4 / 3;
}

.media-gallery-skeleton i {
  height: 9px;
  margin: 12px 13px 0;
  border-radius: 999px;
}

.media-gallery-skeleton i:last-child {
  width: 55%;
  height: 7px;
  margin-top: 7px;
}

.media-gallery-viewer {
  width: min(1380px, calc(100% - 20px));
  max-width: none;
  height: min(940px, calc(100svh - 20px));
  max-height: calc(100svh - 20px);
  overflow: hidden;
  margin: auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  padding: 0;
  background: rgba(10, 16, 21, 0.91);
  color: #fff;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(34px) saturate(130%);
}

.media-gallery-viewer::backdrop {
  background: rgba(3, 7, 10, 0.74);
  backdrop-filter: blur(15px);
}

.media-gallery-viewer-shell {
  display: grid;
  height: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.media-gallery-viewer-header {
  display: flex;
  min-width: 0;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 17px 13px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.media-gallery-viewer-header > div:first-child,
.media-gallery-header > div:first-child {
  min-width: 0;
}

.media-gallery-viewer-header h2 {
  overflow: hidden;
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.25rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-gallery-viewer-header h2:focus {
  outline: 0;
}

.media-gallery-viewer-header p {
  overflow: hidden;
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.67rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-gallery-viewer-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}

.media-gallery-viewer-actions a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0 15px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 740;
  text-decoration: none;
}

.media-gallery-viewer-actions button {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.media-gallery-viewer-actions .media-gallery-viewer-delete {
  background: rgba(255, 69, 58, 0.16);
  color: #ff8a82;
}

.media-gallery-viewer-delete:disabled {
  cursor: wait;
  opacity: 0.55;
}

.media-gallery-delete-dialog {
  width: min(430px, calc(100% - 28px));
  max-width: none;
  margin: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
}

.media-gallery-delete-dialog::backdrop {
  background: rgba(7, 13, 18, 0.58);
  backdrop-filter: blur(14px) saturate(120%);
}

.media-gallery-delete-card {
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 28px;
  padding: 28px;
  background:
    radial-gradient(circle at 85% 0, rgba(255, 69, 58, 0.12), transparent 36%),
    rgba(250, 252, 254, 0.94);
  box-shadow: 0 30px 90px rgba(7, 19, 30, 0.35);
  text-align: center;
  backdrop-filter: blur(34px) saturate(155%);
}

.media-gallery-delete-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 17px;
  background: rgba(255, 59, 48, 0.12);
  color: #c9251b;
  font-size: 1.55rem;
  font-weight: 700;
}

.media-gallery-delete-card .eyebrow {
  margin: 0 0 7px;
  color: #c9251b;
}

.media-gallery-delete-card h2 {
  margin: 0;
  font-size: 1.55rem;
  letter-spacing: -0.04em;
}

.media-gallery-delete-card > p:not(.eyebrow) {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.media-gallery-delete-card > p strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.media-gallery-delete-card .media-gallery-delete-error {
  border-radius: 13px;
  padding: 10px 12px;
  background: rgba(255, 59, 48, 0.1);
  color: #a91d15;
  font-weight: 650;
}

.media-gallery-delete-actions {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 9px;
  margin-top: 22px;
}

.media-gallery-delete-actions button {
  min-height: 48px;
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 15px;
  padding: 9px 12px;
  background: rgba(29, 29, 31, 0.06);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 780;
}

.media-gallery-delete-actions button:last-child {
  border-color: transparent;
  background: #d92d20;
  color: #fff;
}

.media-gallery-delete-actions button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.media-gallery-viewer-stage {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
  place-items: center;
  background:
    radial-gradient(circle at 50% 45%, rgba(55, 78, 95, 0.42), transparent 45%),
    #080d11;
}

.media-gallery-viewer-nav {
  position: absolute;
  z-index: 3;
  top: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(16, 25, 32, 0.58);
  color: #fff;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  backdrop-filter: blur(18px) saturate(145%);
  transition: background 160ms ease, transform 160ms ease;
}

.media-gallery-viewer-nav:hover,
.media-gallery-viewer-nav:focus-visible {
  background: rgba(30, 43, 53, 0.86);
  transform: translateY(-50%) scale(1.04);
}

.media-gallery-viewer-nav.is-previous {
  left: 22px;
}

.media-gallery-viewer-nav.is-next {
  right: 22px;
}

.media-gallery-viewer-nav[hidden] {
  display: none;
}

.media-gallery-viewer-media {
  display: block;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.media-gallery-viewer-stage video {
  outline: 0;
}

.media-gallery-viewer-loading,
.media-gallery-viewer-error {
  position: absolute;
  z-index: 1;
  max-width: min(440px, calc(100% - 40px));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(15, 24, 31, 0.74);
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.72rem;
  text-align: center;
  backdrop-filter: blur(16px);
}

.media-gallery-viewer-error {
  border-radius: 16px;
  color: #fff;
}

.media-gallery-viewer-navigation {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 8px 18px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.media-gallery-viewer-navigation span {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.7rem;
  text-align: center;
}

.media-gallery-viewer-navigation span[hidden] {
  display: none;
}

@keyframes media-gallery-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes media-gallery-shimmer {
  to {
    background-position: -220% 0;
  }
}

.media-upload-sheet {
  position: relative;
  display: flex;
  max-height: min(860px, calc(100svh - 32px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 32px;
  background:
    radial-gradient(circle at 90% 0, rgba(76, 170, 255, 0.18), transparent 34%),
    rgba(248, 251, 253, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 35px 100px rgba(7, 19, 30, 0.28);
  backdrop-filter: blur(34px) saturate(160%);
}

.media-upload-handle {
  display: none;
  width: 42px;
  height: 5px;
  flex: none;
  margin: 9px auto 0;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.18);
}

.media-upload-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px 22px;
  border-bottom: 1px solid rgba(29, 29, 31, 0.08);
}

.media-upload-header .eyebrow {
  margin-bottom: 8px;
  color: var(--blue);
}

.media-upload-header h2 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  letter-spacing: -0.045em;
}

.media-upload-header p:last-child {
  max-width: 520px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.media-ios-preflight {
  position: absolute;
  z-index: 8;
  display: grid;
  inset: 0;
  place-items: center;
  overflow-y: auto;
  padding: 22px;
  background: rgba(235, 242, 248, 0.62);
  backdrop-filter: blur(24px) saturate(145%);
}

.media-ios-preflight[hidden] {
  display: none;
}

.media-ios-preflight-card {
  width: min(100%, 470px);
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 28px;
  padding: 28px;
  background:
    radial-gradient(circle at 82% 0, rgba(10, 132, 255, 0.18), transparent 38%),
    rgba(252, 253, 255, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 26px 70px rgba(7, 19, 30, 0.2);
  text-align: center;
}

.media-ios-preflight-spinner {
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border: 4px solid rgba(10, 132, 255, 0.16);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: media-ios-preflight-spin 900ms linear infinite;
}

.media-ios-preflight-card .eyebrow {
  margin: 0 0 7px;
  color: var(--blue);
}

.media-ios-preflight-card h3 {
  margin: 0;
  font-size: clamp(1.45rem, 5vw, 2rem);
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.media-ios-preflight-card > p:not(.eyebrow) {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.48;
}

.media-ios-preflight-card .media-ios-preflight-wait {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(10, 132, 255, 0.15);
  border-radius: 16px;
  padding: 11px 12px;
  background: rgba(237, 247, 255, 0.72);
  color: var(--ink);
  font-weight: 720;
  text-align: left;
}

.media-ios-preflight-wait > span {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 6px rgba(10, 132, 255, 0.11);
  animation: media-ios-preflight-pulse 1.5s ease-in-out infinite;
}

.media-ios-preflight-card .media-ios-preflight-limit {
  font-size: 0.7rem;
}

.media-ios-preflight-actions {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.media-ios-preflight-actions button {
  min-height: 48px;
  border: 1px solid rgba(10, 132, 255, 0.15);
  border-radius: 15px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--blue);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 780;
}

.media-ios-preflight-actions button:first-child {
  border-color: transparent;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 24px rgba(10, 132, 255, 0.22);
}

@keyframes media-ios-preflight-spin {
  to { transform: rotate(360deg); }
}

@keyframes media-ios-preflight-pulse {
  50% { opacity: 0.45; transform: scale(0.86); }
}

.media-upload-close {
  display: grid;
  width: 44px;
  height: 44px;
  flex: none;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: rgba(230, 232, 235, 0.72);
  color: var(--muted);
  cursor: pointer;
  font-size: 1.45rem;
  backdrop-filter: blur(14px);
}

.media-upload-content {
  min-height: 0;
  overflow-y: auto;
  padding: 24px 30px 10px;
  overscroll-behavior: contain;
}

.media-picker {
  position: relative;
  display: flex;
  min-height: 184px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1.5px dashed rgba(10, 132, 255, 0.4);
  border-radius: 25px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.64);
  cursor: pointer;
  text-align: center;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.media-picker:hover,
.media-picker:focus-within,
.media-picker.is-dragging {
  border-color: var(--blue);
  background: rgba(234, 246, 255, 0.88);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.09);
  transform: translateY(-1px);
}

.media-picker.is-uploading {
  cursor: default;
  opacity: 0.58;
  transform: none;
}

.media-picker-input {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.media-picker-icon {
  width: 54px;
  height: 54px;
  margin-bottom: 13px;
  font-size: 1.75rem;
  font-weight: 350;
}

.media-picker strong {
  font-size: 1rem;
}

.media-picker-drop-copy {
  display: none;
  margin-top: 4px;
  color: var(--blue);
  font-size: 0.82rem;
}

.media-picker small {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.68rem;
}

.media-ios-picker-note,
.media-picker-recovery {
  margin: 12px 0 0;
  border: 1px solid rgba(10, 132, 255, 0.16);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(238, 248, 255, 0.9), rgba(255, 255, 255, 0.7));
}

.media-ios-picker-note {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
}

.media-ios-picker-note[hidden],
.media-picker-recovery[hidden] {
  display: none;
}

.media-ios-picker-note > span:first-child {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: rgba(10, 132, 255, 0.12);
  color: var(--blue);
  font-size: 1.15rem;
}

.media-ios-picker-note strong,
.media-ios-picker-note small {
  display: block;
}

.media-ios-picker-note strong {
  font-size: 0.76rem;
}

.media-ios-picker-note small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.media-picker-recovery {
  border-color: rgba(255, 149, 0, 0.3);
  padding: 15px;
  background: linear-gradient(135deg, rgba(255, 248, 235, 0.95), rgba(255, 255, 255, 0.76));
}

.media-picker-recovery-heading {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
}

.media-picker-recovery-heading > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 149, 0, 0.15);
  color: #9b5700;
  font-weight: 850;
}

.media-picker-recovery-heading strong {
  display: block;
  font-size: 0.82rem;
}

.media-picker-recovery-heading p,
.media-picker-recovery details p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.4;
}

.media-picker-recovery ol {
  margin: 12px 0;
  padding-left: 21px;
  color: var(--ink);
  font-size: 0.76rem;
  line-height: 1.45;
}

.media-picker-recovery-warning {
  margin: -3px 0 12px;
  border-radius: 12px;
  padding: 9px 10px;
  background: rgba(255, 149, 0, 0.11);
  color: #7a4800;
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1.4;
}

.media-picker-recovery-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.media-picker-recovery-actions button,
.media-files-picker {
  position: relative;
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 1px solid rgba(10, 132, 255, 0.18);
  border-radius: 14px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--blue);
  cursor: pointer;
  font: inherit;
  font-size: 0.73rem;
  font-weight: 760;
  text-align: center;
}

.media-picker-recovery-actions button:first-child {
  border-color: transparent;
  background: var(--blue);
  color: #fff;
}

.media-files-picker input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.media-picker-recovery details {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.73rem;
}

.media-picker-recovery summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 700;
}

@media (hover: hover) and (pointer: fine) {
  .media-picker-drop-copy {
    display: block;
  }
}

.media-resume-note {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  margin: 12px 0 0;
  border: 1px solid rgba(10, 132, 255, 0.14);
  border-radius: 18px;
  padding: 11px 13px;
  background: linear-gradient(135deg, rgba(238, 248, 255, 0.86), rgba(255, 255, 255, 0.66));
  color: var(--ink);
  text-align: left;
}

.media-resume-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: rgba(10, 132, 255, 0.12);
  color: var(--blue);
  font-size: 1.2rem;
  font-weight: 750;
}

.media-resume-note strong,
.media-resume-note small {
  display: block;
}

.media-resume-note strong {
  font-size: 0.76rem;
}

.media-resume-note small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.media-queue {
  margin-top: 22px;
}

.media-queue-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.media-queue-heading h3 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.025em;
}

.media-queue-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.media-queue-count {
  display: grid;
  min-width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
}

.media-overall-progress,
.media-file-progress {
  width: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.09);
  accent-color: var(--blue);
}

.media-overall-progress {
  display: block;
  height: 7px;
  margin-bottom: 13px;
}

.media-file-progress {
  height: 5px;
  margin-top: 8px;
}

.media-overall-progress::-webkit-progress-bar,
.media-file-progress::-webkit-progress-bar {
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.09);
}

.media-overall-progress::-webkit-progress-value,
.media-file-progress::-webkit-progress-value {
  border-radius: 999px;
  background: var(--blue);
}

.media-file-list {
  display: flex;
  max-height: 300px;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.media-file-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(29, 29, 31, 0.07);
  border-radius: 18px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.media-file-kind {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: var(--blue-soft);
  color: #0872dc;
  font-size: 0.62rem;
  font-weight: 850;
}

.media-file-info {
  min-width: 0;
}

.media-file-info strong {
  display: block;
  overflow: hidden;
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-file-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
}

.media-file-item.is-success .media-file-kind {
  background: rgba(47, 158, 68, 0.12);
  color: var(--green);
}

.media-file-item.is-duplicate .media-file-kind {
  background: rgba(10, 132, 255, 0.12);
  color: #0872dc;
}

.media-file-item.is-duplicate .media-file-meta {
  color: #0872dc;
  font-weight: 720;
}

.media-file-item.is-error .media-file-kind {
  background: rgba(201, 42, 42, 0.1);
  color: var(--red);
}

.media-file-item.is-paused .media-file-kind,
.media-file-item.is-needs-file .media-file-kind {
  background: rgba(255, 159, 10, 0.14);
  color: #a85e00;
}

.media-file-item.is-finalizing .media-file-kind,
.media-file-item.is-preparing .media-file-kind {
  background: rgba(94, 92, 230, 0.12);
  color: #4f46c8;
}

.media-file-remove {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(29, 29, 31, 0.06);
  color: var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
}

.media-file-reselect {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid rgba(10, 132, 255, 0.2);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(10, 132, 255, 0.1);
  color: #0872dc;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 800;
}

.media-file-reselect:hover,
.media-file-reselect:focus-visible {
  border-color: var(--blue);
  background: rgba(10, 132, 255, 0.16);
}

.media-file-remove:disabled,
.media-file-reselect:disabled {
  cursor: default;
  opacity: 0.35;
}

.media-upload-status,
.media-upload-error {
  margin: 14px 2px 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: center;
}

.media-upload-error {
  color: var(--red);
  font-weight: 650;
}

.media-upload-actions {
  display: flex;
  width: 100%;
  flex: none;
  align-items: center;
  justify-content: flex-end;
  flex-direction: row;
  gap: 10px;
  margin: 0;
  border-top: 1px solid rgba(29, 29, 31, 0.08);
  padding: 18px 30px calc(18px + env(safe-area-inset-bottom));
  color: inherit;
  font-size: inherit;
}

.media-upload-actions button {
  min-height: 50px;
  border-radius: 16px;
  padding: 0 20px;
  cursor: pointer;
  font-weight: 760;
}

.media-upload-secondary {
  border: 1px solid rgba(29, 29, 31, 0.1);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
}

.media-upload-submit {
  border: 0;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 28px rgba(10, 132, 255, 0.24);
}

.media-upload-submit:disabled {
  cursor: wait;
  opacity: 0.55;
}

.trip-chat-launcher {
  position: fixed;
  z-index: 80;
  bottom: calc(20px + env(safe-area-inset-bottom));
  right: 20px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 9px 17px 9px 9px;
  background: rgba(17, 27, 34, 0.96);
  color: #fff;
  box-shadow: 0 18px 50px rgba(10, 17, 22, 0.28);
  cursor: pointer;
  text-align: left;
  backdrop-filter: blur(16px);
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 160ms ease;
}

.trip-chat-launcher:hover,
.trip-chat-launcher:focus-visible {
  box-shadow: 0 22px 60px rgba(10, 17, 22, 0.36);
  transform: translateY(-2px);
}

.trip-chat-launcher.is-open {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.trip-chat-launcher > span:last-child,
.trip-chat-identity > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trip-chat-launcher strong,
.trip-chat-identity strong {
  font-size: 0.83rem;
  letter-spacing: -0.01em;
}

.trip-chat-launcher small,
.trip-chat-identity small {
  color: #9caab3;
  font-size: 0.68rem;
}

.trip-chat-orb {
  position: relative;
  display: grid;
  width: 39px;
  height: 39px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #0a84ff, #53b16a);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.trip-chat-orb::before,
.trip-chat-orb::after,
.trip-chat-orb i {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.trip-chat-orb::before {
  transform: translate(-7px, -3px);
}

.trip-chat-orb::after {
  transform: translate(7px, -3px);
}

.trip-chat-orb i {
  width: 12px;
  height: 2px;
  transform: translateY(7px);
}

.trip-chat-panel {
  position: fixed;
  z-index: 81;
  bottom: calc(92px + env(safe-area-inset-bottom));
  right: 20px;
  display: grid;
  width: min(400px, calc(100vw - 40px));
  height: min(610px, calc(100svh - 120px));
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  overflow: hidden;
  border: 1px solid rgba(29, 29, 31, 0.1);
  border-radius: 25px;
  background: #f8f8fa;
  color: var(--ink);
  box-shadow: 0 32px 90px rgba(10, 17, 22, 0.27);
  animation: chat-arrive 180ms ease-out;
}

.trip-chat-panel[hidden] {
  display: none;
}

@keyframes chat-arrive {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.trip-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 15px 16px;
  background: var(--surface);
}

.trip-chat-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.trip-chat-identity .trip-chat-orb {
  width: 35px;
  height: 35px;
}

.trip-chat-header > button {
  display: grid;
  width: 34px;
  height: 34px;
  flex: none;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #eeeeef;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.25rem;
}

.trip-chat-messages {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 18px 16px;
  overscroll-behavior: contain;
}

.trip-chat-message {
  display: flex;
  max-width: 92%;
  align-items: flex-end;
  gap: 8px;
}

.trip-chat-message > span {
  display: grid;
  width: 27px;
  height: 27px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: var(--dark);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 850;
}

.trip-chat-message p {
  margin: 0;
  border-radius: 17px 17px 17px 5px;
  padding: 11px 13px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(29, 29, 31, 0.04);
  font-size: 0.82rem;
  line-height: 1.48;
  white-space: pre-wrap;
}

.trip-chat-message.is-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.trip-chat-message.is-user > span {
  background: var(--blue);
}

.trip-chat-message.is-user p {
  border-radius: 17px 17px 5px 17px;
  background: var(--blue);
  color: #fff;
}

.trip-chat-message.is-loading p {
  color: var(--muted);
  letter-spacing: 0.16em;
}

.trip-chat-suggestions {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 0 16px 12px;
  scrollbar-width: none;
}

.trip-chat-suggestions[hidden] {
  display: none;
}

.trip-chat-suggestions::-webkit-scrollbar {
  display: none;
}

.trip-chat-suggestions button {
  flex: none;
  border: 1px solid rgba(10, 132, 255, 0.2);
  border-radius: 999px;
  padding: 8px 10px;
  background: var(--blue-soft);
  color: #0870d8;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 750;
}

.trip-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  align-items: end;
  gap: 8px;
  margin: 0 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 7px 7px 7px 13px;
  background: var(--surface);
}

.trip-chat-form:focus-within {
  border-color: rgba(10, 132, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.08);
}

.trip-chat-form textarea {
  width: 100%;
  max-height: 96px;
  resize: none;
  border: 0;
  outline: 0;
  padding: 8px 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.84rem;
  line-height: 1.35;
}

.trip-chat-form textarea::placeholder {
  color: #929299;
}

.trip-chat-form > button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 13px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 850;
  transition: opacity 160ms ease, transform 160ms ease;
}

.trip-chat-form > button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.trip-chat-form > button:disabled {
  opacity: 0.28;
  cursor: default;
}

.trip-chat-status {
  margin: 0;
  padding: 9px 16px 13px;
  color: #8a8a91;
  font-size: 0.64rem;
  line-height: 1.35;
  text-align: center;
}

@media (max-width: 1050px) {
  .media-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero {
    grid-template-columns: minmax(0, 0.85fr) minmax(350px, 1.15fr);
  }

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

  .map-shell {
    min-height: 520px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .day-panel {
    min-height: auto;
  }

  .day-visual {
    max-width: 440px;
  }

  .day-note {
    margin-top: 30px;
  }

  .equipment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .packing-layout {
    grid-template-columns: 1fr;
  }

  .station-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .station-card {
    min-height: 220px;
  }

  .journey {
    grid-template-columns: repeat(7, auto);
  }

  .journey-node {
    min-width: 110px;
  }

  .stop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stop-card.wide {
    grid-column: span 1;
  }

  .market-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .boat-plan-block {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding-block: 12px;
  }

  .topbar-primary {
    width: 100%;
    justify-content: space-between;
  }

  .media-gallery-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .media-gallery-tabs {
    width: 100%;
  }

  .media-gallery-tabs button {
    flex: 1;
    justify-content: center;
  }

  .media-gallery-toolbar-actions {
    justify-content: flex-end;
  }

  .media-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-links {
    width: calc(100vw - 28px);
    gap: 14px;
    padding-bottom: 1px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 28px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 28px), transparent 100%);
  }

  .nav-links a {
    font-size: 0.84rem;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 55px;
  }

  .hero-visual {
    max-height: 72vh;
  }

  .hero-visual > img {
    height: min(72vh, 620px);
    min-height: 420px;
  }

  .answers {
    grid-template-columns: 1fr;
  }

  .answers article {
    min-height: auto;
  }

  .answers article + article {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .fact-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 0;
  }

  .fact-strip div:nth-child(odd) {
    border-left: 0;
  }

  .fact-strip div:last-child {
    grid-column: 1 / -1;
  }

  .split-heading {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .route-choice,
  .restaurant-list,
  .vehicle-grid,
  .callout-grid,
  .ops-grid,
  .source-columns {
    grid-template-columns: 1fr;
  }

  .market-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guide-calculation {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .guide-calculation > i {
    width: 28px;
    height: 28px;
    margin-left: 18px;
  }

  .equipment-snapshot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .equipment-snapshot article:nth-child(3) {
    border-left: 0;
  }

  .equipment-snapshot article:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .packing-console {
    align-items: stretch;
    flex-direction: column;
  }

  .equipment-filters {
    justify-content: flex-start;
  }

  .equipment-truths,
  .inventory-columns {
    grid-template-columns: 1fr;
  }

  .onboard-groups {
    grid-template-columns: 1fr;
  }

  .journey {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .journey > i {
    width: 2px;
    height: 25px;
    margin-left: 14px;
  }

  .journey-node {
    min-width: 0;
  }

  .sunday-split {
    grid-template-columns: 1fr;
  }

  .sunday-photo img {
    min-height: 360px;
  }

  .car-flow {
    grid-template-columns: 1fr;
  }

  .car-flow article {
    min-height: auto;
  }

  .flow-arrow {
    transform: rotate(90deg);
  }

  .car-summary {
    grid-template-columns: 1fr;
  }

  .car-summary article + article {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .subheading {
    align-items: flex-start;
    flex-direction: column;
  }

  .avoid-list > div {
    grid-template-columns: 1fr;
  }

  .boat-gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 370px 220px;
  }

  .boat-gallery button.gallery-main {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .spec-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .spec-grid div:nth-child(4) {
    border-left: 0;
  }

  .spec-grid div:nth-child(n + 4) {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .inspection-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .photo-credit {
    flex-direction: column;
  }

  .privacy-note {
    text-align: left;
  }
}

@media (max-width: 540px) {
  .topbar-actions {
    gap: 5px;
  }

  .topbar-upload,
  .topbar-album {
    width: 44px;
    justify-content: center;
    gap: 0;
    padding: 0;
    font-size: 0;
  }

  .topbar-upload span,
  .topbar-album span {
    font-size: 1rem;
  }

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

  .market-list article {
    min-height: 0;
    grid-template-columns: 68px minmax(0, 1fr) auto;
    grid-template-rows: auto;
    align-items: center;
    gap: 12px;
    padding: 18px;
  }

  .market-list article > a {
    align-self: center;
  }

  .day-guide-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .day-activity-summary-tail em {
    display: none;
  }

  .day-activity-gallery {
    grid-template-rows: repeat(2, 84px);
  }

  .day-activity-gallery--1,
  .day-activity-gallery--2 {
    grid-template-rows: 174px;
  }

  .lightbox {
    width: calc(100vw - 12px);
    max-height: calc(100svh - 12px);
    border-radius: 16px;
    padding: 6px;
  }

  .lightbox img {
    max-height: calc(100svh - 126px);
    border-radius: 11px;
  }

  .lightbox figcaption {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    padding: 8px 7px 4px;
  }

  .lightbox figcaption small {
    justify-content: flex-start;
    text-align: left;
  }

  .lightbox-close {
    top: 12px;
    right: 12px;
  }

  .lightbox-nav {
    width: 38px;
    height: 38px;
    font-size: 1.5rem;
  }

  .lightbox-prev {
    left: 12px;
  }

  .lightbox-next {
    right: 12px;
  }

  .restaurant-list article {
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 18px;
  }

  html {
    scroll-padding-top: 110px;
  }

  .hero,
  .answers,
  .fact-strip,
  .section {
    width: min(var(--max), calc(100% - 20px));
  }

  .weekend-section,
  .boat-section {
    width: 100%;
    padding-inline: 10px;
  }

  .hero-copy h1 {
    font-size: clamp(3.2rem, 18vw, 5rem);
  }

  .hero-upload-card {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    border-radius: 22px;
    padding: 13px;
  }

  .hero-upload-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }

  .hero-album-actions {
    grid-column: 1 / -1;
    width: 100%;
  }

  .hero-album-actions .hero-album-open {
    min-height: 48px;
    flex: 1;
  }

  .hero-album-actions .hero-album-add {
    width: auto;
    min-height: 48px;
    flex: 0.72;
    padding-inline: 12px;
  }

  .hero-upload-drop-hint {
    display: none;
  }

  .media-gallery-dialog,
  .media-upload-dialog {
    position: fixed;
    inset: auto 0 0;
    width: 100%;
    max-height: calc(100svh - 8px);
    margin: 0;
  }

  .media-gallery-sheet {
    height: calc(100svh - 8px);
    max-height: calc(100svh - 8px);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 30px 30px 0 0;
  }

  .media-gallery-handle {
    display: block;
    width: 42px;
    height: 5px;
    flex: none;
    margin: 9px auto 0;
    border-radius: 999px;
    background: rgba(29, 29, 31, 0.18);
  }

  .media-gallery-header {
    gap: 12px;
    padding: 14px 16px;
  }

  .media-gallery-header h2 {
    font-size: 1.8rem;
  }

  .media-gallery-header p:not(.eyebrow) {
    font-size: 0.78rem;
  }

  .media-gallery-header .media-gallery-summary {
    display: none;
  }

  .media-gallery-toolbar {
    gap: 9px;
    padding: 9px 16px;
  }

  .media-gallery-tabs button {
    min-height: 44px;
    padding-inline: 9px;
    font-size: 0.7rem;
  }

  .media-gallery-toolbar-actions {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .media-gallery-toolbar-actions button {
    width: 100%;
    min-height: 46px;
  }

  .media-gallery-refresh {
    padding: 0;
  }

  .media-gallery-refresh span:last-child {
    display: none;
  }

  .media-gallery-content {
    padding: 14px 16px calc(22px + env(safe-area-inset-bottom));
  }

  .media-gallery-bulk {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    border-radius: 19px;
    padding: 12px;
  }

  .media-gallery-bulk-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .media-gallery-bulk-action {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 48px;
  }

  .media-gallery-grid {
    gap: 10px;
  }

  .media-gallery-day-separator {
    gap: 9px;
    margin: 10px 4px 1px;
    font-size: 0.66rem;
  }

  .media-gallery-day-separator:first-child {
    margin-top: 2px;
  }

  .media-gallery-card {
    border-radius: 16px;
  }

  .media-gallery-card-copy {
    min-height: 58px;
    padding: 10px 54px 10px 10px;
  }

  .media-gallery-card-delete {
    right: 7px;
    bottom: 7px;
    width: 44px;
    height: 44px;
    backdrop-filter: none;
  }

  .media-gallery-kind,
  .media-gallery-owner {
    backdrop-filter: none;
  }

  .media-gallery-pagination {
    display: grid;
    gap: 8px;
    margin-top: 6px;
    padding: 10px;
    text-align: center;
  }

  .media-gallery-pagination-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .media-gallery-pagination button {
    min-height: 46px;
    padding-inline: 8px;
  }

  .media-gallery-card-copy strong {
    font-size: 0.74rem;
  }

  .media-gallery-kind,
  .media-gallery-owner {
    top: 7px;
    min-height: 22px;
    padding: 5px 7px 4px;
    font-size: 0.52rem;
  }

  .media-gallery-kind {
    left: 7px;
  }

  .media-gallery-owner {
    right: 7px;
  }

  .media-gallery-error {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .media-gallery-error button {
    min-height: 44px;
    grid-column: 1 / -1;
  }

  .media-gallery-viewer {
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    width: 100vw;
    min-width: 0;
    max-width: 100vw;
    height: 100svh;
    max-height: 100svh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .media-gallery-viewer-shell {
    width: 100%;
    min-width: 0;
  }

  .media-gallery-viewer-header {
    min-height: 72px;
    gap: 10px;
    padding: calc(8px + env(safe-area-inset-top)) 10px 8px 14px;
  }

  .media-gallery-viewer-header p {
    max-width: 65vw;
  }

  .media-gallery-viewer-actions a {
    width: 44px;
    justify-content: center;
    padding: 0;
    font-size: 0.68rem;
  }

  .media-gallery-viewer-actions {
    gap: 6px;
  }

  .media-gallery-viewer-actions button {
    width: 44px;
    padding: 0;
  }

  .media-gallery-viewer-actions a span:last-child,
  .media-gallery-viewer-actions button span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .media-gallery-delete-dialog {
    width: calc(100% - 24px);
  }

  .media-gallery-delete-card {
    border-radius: 25px;
    padding: 25px 20px 20px;
  }

  .media-gallery-delete-actions {
    grid-template-columns: 1fr;
  }

  .media-gallery-viewer-nav {
    width: 50px;
    height: 50px;
    font-size: 1.85rem;
  }

  .media-gallery-viewer-nav.is-previous {
    left: max(10px, env(safe-area-inset-left));
  }

  .media-gallery-viewer-nav.is-next {
    right: max(10px, env(safe-area-inset-right));
  }

  .media-gallery-viewer-navigation {
    min-height: 42px;
  }

  .media-upload-sheet {
    max-height: calc(100svh - 8px);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 30px 30px 0 0;
  }

  .media-upload-handle {
    display: block;
  }

  .media-upload-header {
    gap: 12px;
    padding: 16px;
  }

  .media-upload-header h2 {
    font-size: 1.75rem;
  }

  .media-upload-header p:last-child {
    font-size: 0.82rem;
  }

  .media-ios-preflight {
    align-items: end;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
  }

  .media-ios-preflight-card {
    border-radius: 26px;
    padding: 25px 20px 20px;
  }

  .media-upload-content {
    padding: 16px 16px 10px;
  }

  .media-picker {
    min-height: 166px;
    border-radius: 22px;
    padding: 20px 16px;
  }

  .media-resume-note {
    border-radius: 16px;
    padding: 10px;
  }

  .media-picker-recovery-actions {
    grid-template-columns: 1fr;
  }

  .media-file-list {
    max-height: min(280px, 32svh);
  }

  .media-upload-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  }

  .media-upload-actions button {
    width: 100%;
    padding-inline: 12px;
  }

  .hero-visual,
  .route-app,
  .car-plan,
  .sunday-split {
    border-radius: 21px;
  }

  .hero-visual > img {
    height: min(72vh, 540px);
    min-height: 390px;
  }

  .hero-float {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .fact-strip {
    padding-bottom: 35px;
  }

  .section {
    padding-block: 80px;
  }

  .section-heading h2 {
    font-size: clamp(2.35rem, 13vw, 3.5rem);
  }

  .route-choice {
    gap: 10px;
  }

  .equipment-grid {
    grid-template-columns: 1fr;
  }

  .personal-packing ul,
  .shared-packing-list {
    grid-template-columns: 1fr;
  }

  .day-activity-body {
    grid-template-columns: 1fr;
  }

  .day-activity-gallery {
    grid-template-rows: repeat(2, 84px);
  }

  .day-activity-gallery--1,
  .day-activity-gallery--2 {
    grid-template-rows: 174px;
  }

  .shared-task-dialog-actions {
    grid-template-columns: 1fr 1fr;
  }

  .shared-task-dialog-actions > span {
    display: none;
  }

  .shared-task-save {
    grid-column: 2;
  }

  .equipment-card {
    min-height: 245px;
  }

  .packing-progress {
    grid-template-columns: auto auto minmax(70px, 1fr);
  }

  .equipment-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .equipment-filters button {
    text-align: center;
  }

  .map-shell {
    min-height: 410px;
  }

  .map-legend {
    right: 8px;
    bottom: 8px;
    left: 8px;
  }

  .route-fallback {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .station-grid {
    grid-template-columns: 1fr;
  }

  .station-card {
    min-height: 205px;
  }

  .stop-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 390px;
  }

  .boat-gallery {
    grid-template-rows: 330px 170px;
  }

  .boat-plan-block {
    grid-template-columns: minmax(0, 1fr);
  }

  .plan-image,
  .plan-image img {
    min-height: 290px;
  }

  .check-item {
    grid-template-columns: 28px 1fr;
  }

  .check-tag {
    grid-column: 2;
    justify-self: start;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .trip-chat-launcher {
    width: 58px;
    height: 58px;
    justify-content: center;
    bottom: calc(12px + env(safe-area-inset-bottom));
    right: 12px;
    padding: 0;
  }

  .trip-chat-launcher > span:last-child {
    display: none;
  }

  .trip-chat-panel {
    right: 10px;
    bottom: calc(80px + env(safe-area-inset-bottom));
    left: 10px;
    width: auto;
    height: min(620px, calc(100svh - 105px));
    border-radius: 22px;
  }

  .trip-chat-form textarea {
    font-size: 1rem;
  }

  .trip-chat-suggestions button,
  .trip-chat-status {
    font-size: 0.75rem;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .topbar,
  .topbar-album,
  .topbar-upload,
  .hero-upload-card,
  .media-gallery-sheet,
  .media-gallery-tabs button.is-active,
  .media-upload-sheet,
  .media-ios-preflight,
  .media-ios-preflight-card,
  .media-picker,
  .media-ios-picker-note,
  .media-picker-recovery,
  .media-resume-note {
    background: #f8fafc;
    backdrop-filter: none;
  }

  .media-gallery-viewer {
    background: #080d11;
    backdrop-filter: none;
  }

  .media-gallery-dialog::backdrop,
  .media-upload-dialog::backdrop {
    background: rgba(15, 24, 31, 0.72);
    backdrop-filter: none;
  }
}

@supports not (backdrop-filter: blur(1px)) {
  .topbar,
  .topbar-album,
  .hero-upload-card,
  .media-gallery-sheet,
  .media-gallery-tabs button.is-active,
  .media-upload-sheet,
  .media-ios-preflight,
  .media-ios-preflight-card,
  .media-picker,
  .media-ios-picker-note,
  .media-picker-recovery,
  .media-resume-note {
    background: #f8fafc;
  }

  .media-gallery-viewer {
    background: #080d11;
  }
}

@media (forced-colors: active) {
  .topbar-upload,
  .topbar-album,
  .hero-upload-card,
  .media-gallery-sheet,
  .media-gallery-tabs,
  .media-gallery-card,
  .media-gallery-toolbar-actions button,
  .media-gallery-viewer,
  .media-upload-sheet,
  .media-ios-preflight-card,
  .media-picker,
  .media-ios-picker-note,
  .media-picker-recovery,
  .media-resume-note,
  .media-file-item,
  .media-file-reselect,
  .media-upload-actions button {
    border: 1px solid ButtonText;
  }

  .hero-album-actions button,
  .media-gallery-add,
  .media-gallery-empty button,
  .media-upload-submit {
    background: Highlight;
    color: HighlightText;
  }
}

@media (max-width: 480px) {
  .login-gate {
    place-items: end center;
    padding:
      max(12px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(12px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }

  .login-card {
    padding: 34px 24px;
    border-radius: 28px;
  }

  .login-input-row {
    grid-template-columns: 1fr;
  }

  .login-submit {
    width: 100%;
  }
}

@media print {
  .login-gate,
  .hero-upload-card,
  .media-gallery-dialog,
  .media-gallery-viewer,
  .media-upload-dialog,
  .topbar,
  .hero-actions,
  .day-tabs,
  .map-shell,
  .packing-console,
  .reset-button,
  .trip-chat,
  .shared-task-dialog,
  .lightbox {
    display: none !important;
  }

  body,
  .weekend-section,
  .boat-section {
    background: #fff;
    color: #000;
  }

  .section {
    break-inside: avoid;
  }
}
