:root {
  color-scheme: light;
  --sea-logo-light: block;
  --sea-logo-dark: none;
  --sea-logo-glow: none;
  --paper: #f5f5ee;
  --white: #fffefa;
  --ink: #172f37;
  --muted: #4a636b;
  --line: #dce5df;
  --green: #086372;
  --green-dark: #096777;
  --lime: #d7edeb;
  --shadow: 0 12px 35px #0e40440e;
  --field: #f7faf6;
  --active: #e5f2ee;
  --accent-ink: #054b56;
  --blue: #123d51;
  --button-text: #fff;
  --ad-bg: #fce4c5;
  --ad-ink: #73350d;
  --legend: #e9f1eb;
}

:root[data-portal-theme="dark"] {
  color-scheme: dark;
  --sea-logo-light: none;
  --sea-logo-dark: block;
  --sea-logo-glow: drop-shadow(0 0 4px #41f5dd66);
  --paper: #111d25;
  --white: #1b2b35;
  --ink: #f2f7f5;
  --muted: #b1c6c8;
  --line: #334853;
  --green: #86dfd8;
  --green-dark: #89d9d3;
  --lime: #284a4e;
  --shadow: 0 13px 30px #0003;
  --field: #162631;
  --active: #233e48;
  --accent-ink: #b8efea;
  --blue: #172f41;
  --button-text: #153139;
  --ad-bg: #592e1b;
  --ad-ink: #ffd2ad;
  --legend: #202f38;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-portal-theme]) {
    color-scheme: dark;
    --sea-logo-light: none;
    --sea-logo-dark: block;
    --sea-logo-glow: drop-shadow(0 0 4px #41f5dd66);
    --paper: #111d25;
    --white: #1b2b35;
    --ink: #f2f7f5;
    --muted: #b1c6c8;
    --line: #334853;
    --green: #86dfd8;
    --green-dark: #89d9d3;
    --lime: #284a4e;
    --shadow: 0 13px 30px #0003;
    --field: #162631;
    --active: #233e48;
    --accent-ink: #b8efea;
    --blue: #172f41;
    --button-text: #153139;
    --ad-bg: #592e1b;
    --ad-ink: #ffd2ad;
    --legend: #202f38;
  }
}

:focus-visible { outline-color: #df8046; }
.kp-skip:focus, .kp-site-header, .kp-city-options, .kp-search, .atlas-city-dock a,
.atlas-shortcut, .atlas-event, .kp-pill, .pagination .page-numbers { background: var(--white); }
.kp-header-links a { color: var(--muted); }
.kp-coast-logo { width: clamp(154px, 17vw, 216px); min-height: 44px; flex: none; }
.kp-coast-logo img { width: 100%; height: auto; }
.kp-sea-logo-light { display: var(--sea-logo-light); }
.kp-sea-logo-dark { display: var(--sea-logo-dark); filter: var(--sea-logo-glow); }
.kp-city-options a:hover, .atlas-shortcut:hover, .kp-pill:hover, .kp-pill.is-active { background: var(--active); border-color: var(--line); }
.kp-header-actions { gap: 12px; }
.kp-theme-switch {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--green);
}
.kp-theme-switch:hover { background: var(--active); }
.kp-theme-switch > span { display: flex; }
.kp-theme-switch .kp-switch-night, .kp-theme-switch[aria-pressed="true"] .kp-switch-day { display: none; }
.kp-theme-switch[aria-pressed="true"] .kp-switch-night { display: flex; }
.kp-button, #wp-submit { background: var(--green-dark); color: var(--button-text); }
.kp-button:hover { background: var(--green); color: var(--button-text); filter: brightness(.92); }
.kp-button.is-outline, .kp-search { border-color: var(--line); color: var(--ink); background: var(--white); }
.kp-button.is-outline:hover, .kp-button[aria-pressed="true"] { border-color: var(--line); color: var(--accent-ink); background: var(--active); }
.kp-search button { background: var(--green-dark); color: var(--button-text); }
.kp-search button:hover { background: var(--green); filter: brightness(.94); }
.kp-search .dashicons { color: var(--muted); }
.kp-search input, .kp-search select { color: var(--ink); }
.kp-field input, .kp-field select, .kp-field textarea, #loginform input[type="text"], #loginform input[type="password"] {
  background: var(--field);
  border-color: var(--line);
  color: var(--ink);
}
.kp-notice, .kp-message.is-own, .kp-flag { background: var(--active); color: var(--accent-ink); border-color: var(--line); }
.kp-message { background: var(--legend); }
.kp-byline .dashicons, .atlas-event-end { color: var(--green); }
.kp-stars { color: var(--ad-ink); }
.kp-demo-tag, .kp-sponsored { background: var(--ad-bg); color: var(--ad-ink); }
.kp-card-specs { font-weight: 730; margin-bottom: 5px !important; color: var(--accent-ink) !important; }
.kp-square { background: var(--active); color: var(--green); }
.tone-sea { background: #d9eae7; color: #15555f; }
.tone-sand { background: #f6e5d2; color: #75401c; }
.tone-rose { background: #f3ddd9; color: #74353b; }
.tone-sky { background: #e1e9fa; color: #314a86; }
.atlas-destination .kp-square, .atlas-shortcut .kp-square { color: var(--green); }
.atlas-destination { background: var(--legend); border-color: var(--line); }
.atlas-destination:hover { color: var(--ink); border-color: var(--green); }
.atlas-destination .kp-square { background: var(--white); }
.atlas-destination .kp-section-copy small, .atlas-city-dock a, .atlas-event-info > span { color: var(--muted); }
.atlas-city-dock a:hover, .atlas-city-dock a[aria-current], .atlas-event time { background: var(--active); border-color: var(--line); color: var(--accent-ink); }

.atlas-hero {
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  min-height: 430px;
  border: 0;
  background: #0c303e;
  isolation: isolate;
}
.atlas-hero-content { color: #f7f4e9; }
.atlas-hero h1 {
  color: #fcf8ec;
  font-size: clamp(43px, 5.85vw, 91px);
  line-height: .96;
}
.atlas-hero h1 em { color: #ffba86; }
.atlas-kicker { background: #ffffff19; color: #daf2ef; font-weight: 650; }
.atlas-lead { color: #d3e6e5; }
.atlas-hero-photo img { object-position: 50% center; }
.atlas-hero-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #0c303e 0%, #0c303e32 12%, transparent 28%);
  pointer-events: none;
}
.atlas-hero-photo figcaption { z-index: 1; background: #102b38db; border: 1px solid #ffffff50; color: #fff6e9; left: auto; right: 15px; }
.atlas-hero .kp-search { box-shadow: none; }

.portal-travel-rail { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; margin: 20px 0 9px; }
.portal-travel-rail a {
  display: grid;
  grid-template-columns: 39px minmax(0,1fr) 17px;
  align-items: center;
  gap: 10px;
  min-height: 67px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
}
.portal-travel-rail a:hover { border-color: var(--green); }
.portal-travel-rail strong, .portal-travel-rail small { display: block; }
.portal-travel-rail small { color: var(--muted); font-size: 12px; }
.portal-travel-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--ad-bg); color: var(--ad-ink); }
.portal-travel-rail > a > .dashicons { color: var(--green); }

.portal-footer { background: #102e37; color: #eaf3eb; padding: 37px 0 18px; }
.portal-footer .kp-coast-logo { --sea-logo-light: none; --sea-logo-dark: block; width: min(185px, 100%); }
.portal-footer a, .portal-footer .kp-logo { color: #eaf3eb; }
.portal-footer a:hover { color: #ffb987; }
.portal-footer-layout { display: grid; grid-template-columns: 1.18fr 1.35fr .8fr .95fr; gap: 24px; }
.portal-footer-brand p { margin: 10px 0 18px; max-width: 20ch; color: #bdcfce; font-size: 14px; }
.portal-footer-social { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.portal-footer-social a { display: inline-flex; gap: 4px; align-items: center; min-height: 40px; padding: 4px 10px; border: 1px solid #4d6971; border-radius: 9px; text-decoration: none; font-size: 13px; }
.portal-footer-group h2 { font-size: 15px; margin-bottom: 12px; color: #fff; }
.portal-footer-group nav { display: grid; grid-template-columns: 1fr; gap: 7px 10px; }
.portal-footer-group:nth-child(2) nav { grid-template-columns: repeat(2, minmax(0,1fr)); }
.portal-footer-group nav a { font-size: 13px; width: fit-content; text-decoration: none; overflow-wrap: anywhere; }
.portal-footer-baseline { margin-top: 24px; border-top: 1px solid #4e6870; padding-top: 12px; color: #c1d5d3; }
.portal-mobile-nav { display: none; }

.kp-account-summary, .kp-public-profile { min-width: 0; margin-bottom: 16px; }
.kp-account-stats, .kp-showcase { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(150px,100%),1fr)); gap: 10px; }
.kp-account-stats > *, .kp-showcase > * { min-width: 0; }
.kp-auth-social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.portal-guide-intro { margin: 0 0 22px; background: var(--active); border: 1px solid var(--line); border-radius: 22px; padding: clamp(20px,4vw,48px); }
.portal-guide-intro h1 { font-size: clamp(36px,6vw,67px); margin: 0 0 8px; line-height: 1.04; letter-spacing: -.05em; }
.portal-guide-intro p { max-width: 46ch; color: var(--muted); }
.portal-guide-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
.portal-guide-grid article > img { width: 100%; aspect-ratio: 1.65; height: auto; object-fit: cover; }
.portal-guide-grid h2 { font-size: 21px; margin: 0 0 6px; }
.portal-guide-credit { display: block; margin-top: 9px; color: var(--muted); }

@media (max-width: 820px) {
  .atlas-hero { grid-template-columns: minmax(0,1fr) minmax(0,.92fr); min-height: 360px; }
  .portal-footer-layout { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 680px) {
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .kp-header-row { min-height: 63px; }
  .kp-site-header .kp-coast-logo { width: clamp(124px, 42vw, 165px); }
  .kp-site-header .kp-header-cta, .kp-site-header .kp-account-link { display: none; }
  .kp-theme-switch { width: 44px; height: 44px; }
  .kp-city-menu summary { min-height: 44px; }
  .portal-travel-rail { grid-template-columns: 1fr; gap: 6px; margin-top: 14px; }
  .portal-travel-rail a { min-height: 56px; padding: 6px 10px; }
  .portal-mobile-nav {
    position: fixed;
    z-index: 12;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(5,minmax(0,1fr));
    padding: 4px 5px calc(5px + env(safe-area-inset-bottom));
    min-height: 60px;
    background: var(--white);
    border-top: 1px solid var(--line);
    box-shadow: 0 -7px 24px #0d353713;
  }
  .portal-mobile-nav a {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 3px;
    min-height: 47px;
    margin: 0 1px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 690;
    text-decoration: none;
  }
  .portal-mobile-nav a[aria-current="page"] { color: var(--accent-ink); background: var(--active); }
  .portal-mobile-nav a:nth-child(3) { color: var(--green); }
  .portal-mobile-nav a:nth-child(3) > .dashicons { color: var(--button-text); background: var(--green-dark); border-radius: 50%; width: 25px; height: 25px; display: grid; place-items: center; }
}

@media (max-width: 590px) {
  .atlas-hero { grid-template-columns: minmax(0,1fr); min-height: 0; }
  .atlas-hero-photo { min-height: 176px; }
  .atlas-hero-photo::after { background: linear-gradient(180deg,#0c303e 0%,transparent 33%); }
  .atlas-hero-photo figcaption { right: 9px; left: auto; }
  .portal-footer-layout { gap: 17px; }
  .portal-footer-group:nth-child(2) nav { grid-template-columns: 1fr; }
  .portal-guide-grid { grid-template-columns: 1fr; }
}
