:root {
  --bg: #f3f8fb;
  --surface: #ffffff;
  --surface-alt: #f6fbfe;
  --ink: #15343f;
  --ink-soft: #4f6f7c;
  --brand: #3fa9c9;
  --brand-dark: #2f85a0;
  --line: #c7dbe4;
  --good: #2f8f7a;
  --fair: #f2b233;
  --poor: #ba3e3e;
  --radius-lg: 12px;
  --radius-md: 10px;
  --shadow-sm: 0 10px 24px rgba(0, 0, 0, 0.35);
  --tab-shell-offset: 0px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body {
  position: relative;
}

.startup-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 320ms ease;
}

.startup-splash__logo {
  width: min(76vw, 340px);
  height: auto;
  object-fit: contain;
}

.startup-splash--hide {
  opacity: 0;
  pointer-events: none;
}

.startup-splash--hidden {
  display: none;
}

.hidden {
  display: none !important;
}

body.onboarding-open {
  overflow: hidden;
}

.hero {
  background:
    radial-gradient(420px 140px at 0% 0%, rgba(90, 185, 216, 0.18), rgba(90, 185, 216, 0)),
    linear-gradient(180deg, #fbfeff 0%, #eef6fa 100%);
  color: var(--ink);
  border-bottom: 1px solid #d7e6ed;
  padding: calc(env(safe-area-inset-top, 0px) + 0.65rem) 1rem 0.7rem;
}

.hero__inner,
.container,
.footer {
  max-width: 1080px;
  margin: 0 auto;
}

.hero__masthead {
  display: grid;
  gap: 0.12rem;
}

.hero__eyebrow {
  margin: 0;
  color: #2d859f;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero__title {
  margin: 0;
  font-size: clamp(1.35rem, 5.4vw, 2rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: #113340;
}

.hero__caption {
  margin: 0.16rem 0 0;
  max-width: 28rem;
  color: #55717d;
  font-size: 0.9rem;
  line-height: 1.3;
}

.planner {
  margin-top: 0.7rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(199, 219, 228, 0.92);
  border-radius: 16px;
  padding: 0.58rem;
  display: grid;
  gap: 0.55rem;
  box-shadow: 0 10px 24px rgba(26, 55, 72, 0.08);
}

.planner-bar {
  margin-top: 0.55rem;
  display: block;
}

.planner-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border-radius: 16px;
  border: 1px solid #c8d9e1;
  background: #ffffff;
  color: #17404e;
  padding: 0.72rem 0.82rem;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(24, 64, 78, 0.08);
  text-align: left;
}

.planner-toggle__copy {
  display: grid;
  gap: 0.14rem;
  min-width: 0;
}

.planner-toggle__label {
  color: #62808b;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.planner-toggle__value {
  color: #163b49;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.planner-toggle__chevron {
  flex: 0 0 auto;
  color: #6c8793;
  font-size: 1.5rem;
  line-height: 1;
  transform: translateY(-1px);
  transition: transform 160ms ease, color 160ms ease;
}

.planner-toggle[aria-expanded="true"] {
  border-color: #8dbfd0;
  background: #f6fbfd;
}

.planner-toggle[aria-expanded="true"] .planner-toggle__chevron {
  color: #2d859f;
  transform: rotate(90deg);
}

.brand-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
}

.brand-logo {
  display: block;
  width: clamp(184px, 32vw, 264px);
  max-height: 88px;
  height: auto;
  object-fit: contain;
}

.planner__group {
  display: grid;
  gap: 0.34rem;
}

.planner__label {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.scenario-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 0.4rem;
}

.scenario {
  text-align: left;
  border: 1px solid #c8d9e1;
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink-soft);
  padding: 0.44rem 0.54rem;
  cursor: pointer;
}

.scenario strong {
  display: block;
  font-size: 0.79rem;
  line-height: 1.2;
}

.scenario span {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.7rem;
  opacity: 0.95;
}

.scenario--active {
  background: #e9f5f8;
  color: var(--brand-dark);
  border-color: #b8dbe4;
}

.chip {
  border-radius: 999px;
  border: 1px solid #c8d9e1;
  background: #ffffff;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.38rem 0.62rem;
  cursor: pointer;
}

.chip--active {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
  font-weight: 700;
}

.planner__custom {
  width: 180px;
  border-radius: 8px;
  border: 1px solid #c8d9e1;
  font-size: 0.92rem;
  padding: 0.36rem 0.56rem;
  background: #ffffff;
  color: var(--ink);
}

.planner__help {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--ink-soft);
}

.last-updated {
  margin: 0;
  font-size: 0.9rem;
  color: #486c78;
}

.status-strip {
  margin-top: -0.2rem;
}

.status-strip .last-updated {
  font-size: 0.84rem;
  line-height: 1.35;
}

.container {
  padding: 1.15rem 1rem;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 1rem);
  display: grid;
  gap: 1rem;
}

.tab-shell {
  position: sticky;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1500;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.45rem 0.7rem calc(env(safe-area-inset-bottom, 0px) + 0.35rem);
  background: linear-gradient(180deg, rgba(243, 248, 251, 0.2), rgba(243, 248, 251, 0.98) 42%, rgba(243, 248, 251, 1) 100%);
  border-top: 1px solid rgba(157, 184, 198, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: none;
  will-change: auto;
}

.tab-shell__btn {
  border: 1px solid #aac4d2;
  border-radius: 12px;
  background: #ffffff;
  color: #315b6a;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 0.56rem 0.44rem;
  cursor: pointer;
}

.tab-shell__btn.is-active {
  border-color: #2f8f7a;
  background: linear-gradient(180deg, #2f8f7a, #277865);
  color: #ffffff;
}

.onboarding {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: linear-gradient(180deg, #1296d1 0%, #1ba4dc 54%, #0b8ad3 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  padding: calc(env(safe-area-inset-top, 0px) + 0.9rem) 1.05rem calc(env(safe-area-inset-bottom, 0px) + 1rem);
}

.onboarding__slides {
  flex: 1;
  display: flex;
}

.onboarding__slide {
  display: none;
  width: 100%;
  align-self: stretch;
  padding: 0.2rem 0.1rem 0;
}

.onboarding__slide.is-active {
  display: block;
}

.onboarding__mark {
  width: 84px;
  height: 84px;
  margin: 0.6rem auto 0;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.5), rgba(104, 185, 255, 0.2) 70%);
  display: grid;
  place-items: center;
  font-size: 2rem;
  box-shadow: 0 18px 35px rgba(0, 70, 120, 0.3);
}

.onboarding__mark--logo {
  width: 120px;
  height: 120px;
  margin-top: 0.35rem;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 20px 40px rgba(0, 70, 120, 0.22),
    0 10px 18px rgba(0, 0, 0, 0.08);
  padding: 14px;
}

.onboarding__logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.onboarding__title {
  margin: 1rem 0 0;
  text-align: center;
  font-size: clamp(2rem, 8vw, 3rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.onboarding__text {
  margin: 0.85rem auto 0;
  text-align: center;
  max-width: 19rem;
  font-size: 1.18rem;
  line-height: 1.33;
  color: rgba(255, 255, 255, 0.9);
}

.onboarding__feature-card {
  margin-top: 1.15rem;
  border: 1px solid rgba(189, 231, 255, 0.45);
  background: rgba(255, 255, 255, 0.13);
  border-radius: 20px;
  padding: 0.9rem 0.95rem;
  box-shadow: 0 12px 36px rgba(5, 52, 90, 0.25);
}

.onboarding__feature-card h3 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.onboarding__feature-card p {
  margin: 0.45rem 0 0;
  font-size: 1.08rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.93);
}

.onboarding__level-list {
  margin-top: 1rem;
  display: grid;
  gap: 0.55rem;
}

.onboarding__level {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(201, 236, 255, 0.34);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
  padding: 0.75rem 0.8rem;
}

.onboarding__level strong {
  display: block;
  font-size: 1.4rem;
}

.onboarding__level span {
  display: block;
  margin-top: 0.22rem;
  font-size: 1.03rem;
  color: rgba(233, 248, 255, 0.95);
}

.onboarding__level.is-selected {
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2) inset;
  background: rgba(255, 255, 255, 0.2);
}

.onboarding__secondary {
  margin-top: 0.85rem;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 0.7rem 0.95rem;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
}

.onboarding__hint {
  margin: 0.45rem 0 0;
  text-align: center;
  font-size: 0.95rem;
  color: rgba(233, 248, 255, 0.86);
}

.onboarding__bullets {
  list-style: none;
  padding: 0;
  margin: 1.05rem 0 0;
  display: grid;
  gap: 0.7rem;
}

.onboarding__bullet {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: start;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 14px 26px rgba(2, 44, 92, 0.16);
}

.onboarding__bullet-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.26);
  font-size: 1.15rem;
}

.onboarding__bullet-text {
  color: rgba(255, 255, 255, 0.96);
  font-size: 1.02rem;
  line-height: 1.35;
}

.onboarding__bullet-text strong {
  font-weight: 800;
}

.onboarding__footer {
  margin-top: auto;
}

.onboarding__dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.7rem;
}

.onboarding__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

.onboarding__dot.is-active {
  width: 20px;
  background: #ffffff;
}

.onboarding__cta {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.1;
  padding: 1rem 1.1rem;
  background: #1e86f1;
  box-shadow:
    0 18px 34px rgba(4, 74, 150, 0.32),
    0 8px 16px rgba(0, 0, 0, 0.12);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
  -webkit-tap-highlight-color: transparent;
}

.onboarding__cta:active {
  transform: translateY(1px);
  box-shadow:
    0 14px 28px rgba(4, 74, 150, 0.28),
    0 6px 12px rgba(0, 0, 0, 0.12);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

#debugBanner {
  border-left: 4px solid #ba3e3e;
  background: #fff2f2;
  color: #7f2020;
  font-weight: 700;
}

.panel--muted {
  background: var(--surface-alt);
}

.disclaimer {
  border-left: 4px solid #d18d00;
  background: #fffaf0;
}

.disclaimer p {
  margin: 0.62rem 0 0;
  color: #4e3f1f;
}

.promo {
  border: 1px solid #b9d9e4;
  background:
    radial-gradient(460px 160px at 100% 0%, rgba(78, 167, 196, 0.14), rgba(78, 167, 196, 0)),
    linear-gradient(180deg, #ffffff 0%, #f8fcfe 100%);
}

.promo p {
  margin: 0.65rem 0 0;
  color: #2c4d57;
  line-height: 1.45;
}

.promo__actions {
  margin-top: 0.72rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.52rem;
}

.promo__link {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #b7d5df;
  background: #ffffff;
  color: #0f5b70;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.42rem 0.78rem;
}

.promo__link--primary {
  background: #2f8f7a;
  border-color: #2f8f7a;
  color: #ffffff;
}

.panel h2 {
  margin: 0;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.recommendation {
  position: relative;
  overflow: hidden;
  border: 1px solid #bad9e3;
  border-left: 5px solid var(--brand);
  background:
    radial-gradient(380px 120px at 100% 0%, rgba(78, 167, 196, 0.14), rgba(78, 167, 196, 0)),
    linear-gradient(180deg, #ffffff 0%, #f7fcfe 100%);
}

.recommendation__text {
  margin: 0.38rem 0 0;
  font-size: clamp(1.16rem, 2.2vw, 1.55rem);
  line-height: 1.25;
  color: #0f3f4c;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.recommendation__meta {
  margin: 0.62rem 0 0;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #4e7580;
  font-weight: 700;
}

.recommendation__link {
  display: inline-flex;
  align-items: center;
  margin-top: 0.72rem;
  border-radius: 999px;
  border: 1px solid #b7d5df;
  background: #ffffff;
  color: #0f5b70;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.42rem 0.78rem;
}

.best-list {
  margin: 0.78rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.ranking-tools {
  margin-top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.ranking-tools__search {
  position: relative;
  min-width: 160px;
}

.ranking-tools__postcode {
  width: 160px;
}

.ranking-tools__suggestions {
  position: absolute;
  top: calc(100% + 0.3rem);
  left: 0;
  right: 0;
  z-index: 120;
  display: grid;
  gap: 0.2rem;
  padding: 0.28rem;
  border: 1px solid #cfe0e7;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(8, 30, 44, 0.12);
}

.ranking-tools__suggestion {
  border: 0;
  background: #ffffff;
  border-radius: 8px;
  padding: 0.42rem 0.48rem;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.ranking-tools__suggestion:hover,
.ranking-tools__suggestion:focus-visible {
  background: #edf6fa;
  outline: none;
}

.ranking-tools__suggestion strong {
  display: block;
  font-size: 0.82rem;
  line-height: 1.2;
  color: #1f3f4b;
}

.ranking-tools__suggestion span {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.72rem;
  line-height: 1.2;
  color: #57727d;
}

.ranking-tools__status {
  margin: 0;
  width: 100%;
  font-size: 0.78rem;
  font-weight: 700;
  color: #4f6c78;
}

.view-toggle {
  margin-top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.view-fab {
  border: 1px solid #4e7ea3;
  border-radius: 999px;
  background: linear-gradient(180deg, #29567a, #1d3f5a);
  color: #ffffff;
  padding: 0.66rem 1.2rem;
  min-width: 156px;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(160, 220, 248, 0.2) inset;
  cursor: pointer;
}

.view-fab:focus-visible {
  outline: 3px solid #9fd8ea;
  outline-offset: 2px;
}

body.view-mode-map .view-fab {
  background: linear-gradient(180deg, #2c8f7a, #1d6f5f);
  border-color: #4ab39a;
}

.view-fab-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1400;
  display: flex;
  justify-content: center;
  padding: 0.45rem 0.85rem calc(env(safe-area-inset-bottom, 0px) + 0.55rem);
  background: linear-gradient(180deg, rgba(243, 248, 251, 0), rgba(243, 248, 251, 0.94) 48%, rgba(243, 248, 251, 0.99) 100%);
  border-top: 1px solid rgba(157, 184, 198, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#beachMapWrap {
  margin-top: 0.74rem;
  position: relative;
}

.beach-map {
  width: 100%;
  height: min(58vh, 460px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

body.view-mode-map .beach-map {
  height: min(72vh, 620px);
}

.map-popup {
  min-width: 170px;
  font-size: 0.86rem;
  line-height: 1.35;
}

.map-popup .badge {
  margin-right: 0.35rem;
}

.map-popup a {
  color: #0f5b70;
  font-weight: 700;
  text-decoration: none;
}

.map-score-icon {
  background: transparent;
  border: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.map-score-pin {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.map-alert-flag {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 900;
  color: #ffffff;
  background: #d94848;
  border: 1px solid #fff2f2;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
}

.map-good-heart {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.64rem;
  font-weight: 900;
  color: #ffffff;
  background: #2f8f7a;
  border: 1px solid #e8fff8;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
}

.map-score-pin--good {
  color: #0f5346;
  background: #dff3ee;
}

.map-score-pin--fair {
  color: #6a4a00;
  background: #fff6e4;
}

.map-score-pin--poor {
  color: #7b2424;
  background: #fde3e3;
}

.map-score-name {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: #1f4f61;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(102, 145, 175, 0.72);
  white-space: nowrap;
}

.map-beach-preview {
  position: absolute;
  left: 0.62rem;
  right: 0.62rem;
  bottom: 0.62rem;
  z-index: 900;
  border: 1px solid #b7ceda;
  border-radius: 14px;
  background: #f7fcff;
  padding: 0.58rem;
  max-height: min(38%, 250px);
  overflow: auto;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.map-card-detail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.map-card-detail__head h3 {
  margin: 0;
  font-size: clamp(0.88rem, 2.6vw, 1.05rem);
  color: #133f4d;
}

.map-card-detail__summary {
  margin: 0.34rem 0 0;
  font-size: 0.74rem;
  color: #355d6d;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.map-card-detail__distance {
  margin: 0.32rem 0 0;
  color: #638493;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.map-card-detail .stat-grid {
  margin-top: 0.5rem;
}

.map-card-detail--compact .card__rating {
  gap: 0.3rem;
}

.map-card-detail--compact .score {
  font-size: 0.64rem;
}

.map-card-detail--compact .badge {
  font-size: 0.62rem;
  padding: 0.14rem 0.34rem;
}

.map-kv-grid {
  margin: 0.48rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.34rem 0.5rem;
}

.map-kv {
  border: 1px solid #bfd4df;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.26rem 0.4rem;
}

.map-kv dt {
  margin: 0;
  font-size: 0.58rem;
  color: #648392;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

.map-kv dd {
  margin: 0.08rem 0 0;
  font-size: 0.68rem;
  color: #214b5a;
  font-weight: 700;
  line-height: 1.2;
}

.map-card-detail__close {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  border: 1px solid #adc8d7;
  border-radius: 999px;
  background: #ffffff;
  color: #24566a;
  font-size: 0.64rem;
  font-weight: 800;
  padding: 0.24rem 0.5rem;
  cursor: pointer;
}

.map-card-detail .card__maplink {
  margin-top: 0.5rem;
  font-size: 0.68rem;
  padding: 0.28rem 0.56rem;
}

@media (max-width: 720px) {
  .map-beach-preview {
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.5rem;
    max-height: min(44%, 270px);
    padding: 0.52rem;
  }
}

.suggestion-panel p {
  margin: 0.62rem 0 0;
  color: #3e5f6c;
}

.suggestion-panel__form {
  margin-top: 0.72rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.suggestion-panel__form input {
  flex: 1 1 300px;
  max-width: 420px;
  border: 1px solid #bfd5df;
  border-radius: 8px;
  padding: 0.44rem 0.62rem;
  font-size: 0.92rem;
  background: #ffffff;
  color: #1f2933;
}

.suggestion-panel__form button {
  border: 1px solid #2f8f7a;
  border-radius: 999px;
  background: #2f8f7a;
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.44rem 0.8rem;
  cursor: pointer;
}

.suggestion-panel__status {
  margin-top: 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1f6d5c;
}

.rank-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.rank-badges {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
}

.rank-distance {
  font-size: 0.74rem;
  font-weight: 800;
  color: #42606f;
  background: #edf4f8;
  border: 1px solid #d2e2ea;
  border-radius: 999px;
  padding: 0.14rem 0.42rem;
  white-space: nowrap;
}

.rank-note {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #1f6d5c;
  background: #e4f5f0;
  border: 1px solid #c3e7dd;
  border-radius: 999px;
  padding: 0.12rem 0.42rem;
}

.best-list > li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 0.72rem;
  align-items: center;
  padding: 0.7rem 0.74rem;
  border: 1px solid #d6e4eb;
  border-radius: 12px;
  background: #ffffff;
}

.rank-num {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 900;
  color: #24596a;
  background: #e8f3f8;
  border: 1px solid #cfe1e9;
}

.rank-body {
  min-width: 0;
  display: grid;
  gap: 0.32rem;
}

.rank-summary {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.rank-summary .rank-track {
  margin-top: 0.32rem;
}

.rank-name {
  display: block;
  font-size: 1rem;
  line-height: 1.2;
  color: #1f2d3d;
}

.rank-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.rank-points {
  font-size: 0.82rem;
  color: #54717d;
  font-weight: 800;
}

.rank-label {
  border-radius: 999px;
  padding: 0.2rem 0.48rem;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rank-track {
  height: 7px;
  border-radius: 999px;
  background: #e7eef2;
  overflow: hidden;
}

.rank-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.rank-tone--good {
  color: #176654;
  background: #e2f3ee;
}

.rank-fill.rank-tone--good {
  background: linear-gradient(90deg, #2f8f7a, #5cbfa8);
}

.rank-tone--fair {
  color: #7a5609;
  background: #fff6e6;
}

.rank-fill.rank-tone--fair {
  background: linear-gradient(90deg, #f2b233, #ffc95f);
}

.rank-tone--poor {
  color: #8b2f2f;
  background: #fde8e8;
}

.rank-fill.rank-tone--poor {
  background: linear-gradient(90deg, #ba3e3e, #d06767);
}

.saved-remove {
  border: 1px solid #c5d8e2;
  border-radius: 999px;
  background: #ffffff;
  color: #41606f;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.2rem 0.46rem;
  cursor: pointer;
}

.saved-item {
  align-items: start !important;
}

.saved-summary-wrap {
  display: flex;
  gap: 0.55rem;
  align-items: start;
}

.saved-summary {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.saved-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  border: 1px solid #cfe1e9;
  background: #eef6fa;
  color: #2f5f71;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

.saved-detail {
  grid-column: 1 / -1;
  margin-top: 0;
  padding-top: 0.55rem;
  border-top: 1px solid #dbe8ee;
}

.saved-detail .card__summaryline--back {
  margin-top: 0;
}

.saved-detail .stat-grid {
  margin-top: 0.72rem;
}

.saved-detail__empty {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.beach-grid {
  margin-top: 0.72rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.85rem;
  align-items: start;
}

.card {
  position: relative;
  border-radius: var(--radius-md);
  perspective: 1200px;
  cursor: pointer;
  transition: height 0.28s ease;
}

.card:focus-visible {
  outline: 3px solid #7cc3d8;
  outline-offset: 2px;
}

.card__flip {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 0.55s ease;
  will-change: transform, height;
}

.card.is-flipped .card__flip {
  transform: rotateY(180deg);
}

.card__face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
  padding: 1rem 0.9rem 0.95rem;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
}

.card__face--back {
  transform: rotateY(180deg);
}

.card--a {
  background: transparent;
}

.card--b {
  background: transparent;
}

.card__face::before,
.card__face::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 8px;
}

.card__face::before {
  top: 0;
}

.card__face::after {
  bottom: 0;
}

.card--a .card__face {
  background: #ffffff;
  border-color: #dfe9ed;
}

.card--a .card__face::before,
.card--a .card__face::after {
  background: #4ea7c4;
}

.card--b .card__face {
  background: #e9f3f8;
  border-color: #bdd5df;
}

.card--b .card__face::before,
.card--b .card__face::after {
  background: #2f8eae;
}

.card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin: -1rem -0.9rem 0.45rem;
  padding: 0.64rem 0.9rem;
  color: #ffffff;
}

.card__head-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  flex: 1 1 auto;
  min-width: 0;
}

.card__save {
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.2rem 0.48rem;
  cursor: pointer;
  white-space: nowrap;
}

.card__save.is-saved {
  background: #ffffff;
  color: #1d6656;
  border-color: #ffffff;
}

.card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
  color: #ffffff;
}

.card__rating {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.score {
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 700;
}

.card--a .card__head {
  background: #4ea7c4;
}

.card--b .card__head {
  background: #2f8eae;
}

.card--cond-good .card__face::before,
.card--cond-good .card__face::after,
.card--cond-good .card__head {
  background: #2f8f7a;
}

.card--cond-fair .card__face::before,
.card--cond-fair .card__face::after,
.card--cond-fair .card__head {
  background: #f2b233;
}

.card--cond-poor .card__face::before,
.card--cond-poor .card__face::after,
.card--cond-poor .card__head {
  background: #ba3e3e;
}

.badge {
  display: inline-block;
  margin-top: 0.2rem;
  border-radius: 999px;
  padding: 0.24rem 0.5rem;
  font-size: 0.74rem;
  font-weight: 700;
}

.badge--good {
  color: var(--good);
  background: #e3f3ef;
}

.badge--fair {
  color: var(--fair);
  background: #fff7e8;
}

.badge--poor {
  color: var(--poor);
  background: #ffe7e7;
}

.card__head .badge {
  margin-top: 0;
}

.factors {
  margin: 0.62rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.factors li {
  margin-top: 0.24rem;
  line-height: 1.35;
  display: flex;
  align-items: flex-start;
  gap: 0.38rem;
}

.factors--summary {
  font-size: 0.92rem;
}

.factors--summary li {
  margin-top: 0.34rem;
}

.card__maplink {
  display: inline-flex;
  align-items: center;
  margin-top: 0.72rem;
  border-radius: 999px;
  border: 1px solid #b7d5df;
  background: #ffffff;
  color: #0f5b70;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.38rem 0.74rem;
}

.card__fliphint {
  margin: auto 0 0;
  padding-top: 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #54747f;
}

.card__callout {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.38rem 0.68rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  width: fit-content;
  margin-top: 0.3rem;
}

.card__topline {
  margin-top: 0.3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
}

.card__topline .card__callout {
  margin-top: 0;
}

.card__weatherchip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  padding: 0.3rem 0.56rem;
  font-size: 0.74rem;
  font-weight: 800;
  color: #1f4d5c;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid #bfd9e3;
  white-space: nowrap;
  margin-left: auto;
}

.card__weathericon {
  width: 14px;
  height: 14px;
}

.card__weatherchip--sun {
  background: #ffe18a;
  border-color: #efc45a;
  color: #704e00;
}

.card__weatherchip--cloud {
  background: #dee8ef;
  border-color: #bfd0dc;
  color: #3a5261;
}

.card__weatherchip--rain {
  background: #cde9ff;
  border-color: #a8d0f2;
  color: #1c4f70;
}

.card__weatherchip--storm {
  background: #ffd9d9;
  border-color: #efb1b1;
  color: #822b2b;
}

.card__weatherchip--mixed {
  background: #e8eff5;
  border-color: #c8d6e0;
  color: #425d6c;
}

.card--wx-sun .card__face--front {
  background: linear-gradient(180deg, #fff9e7 0%, #ffffff 26%);
}

.card--wx-cloud .card__face--front {
  background: linear-gradient(180deg, #f2f6f9 0%, #ffffff 26%);
}

.card--wx-rain .card__face--front {
  background: linear-gradient(180deg, #eaf5ff 0%, #ffffff 26%);
}

.card--wx-storm .card__face--front {
  background: linear-gradient(180deg, #fff0f0 0%, #ffffff 26%);
}

.card--wx-mixed .card__face--front {
  background: linear-gradient(180deg, #f3f8fb 0%, #ffffff 26%);
}

.callout--great {
  color: #116655;
  background: #d8eee8;
}

.callout--care {
  color: #7a5609;
  background: #fff4de;
}

.callout--poor {
  color: #8d2f2f;
  background: #f9dddd;
}

.icon--callout {
  width: 17px;
  height: 17px;
}

.card__summaryline {
  margin: 0.55rem 0 0;
  color: #2a4c58;
  font-size: 0.94rem;
  line-height: 1.35;
  font-weight: 600;
}

.card__cafe {
  margin: 0.4rem 0 0;
  font-size: 0.76rem;
  color: #8fa8bb;
  line-height: 1.25;
  font-weight: 700;
}

.card__cafe a {
  color: #9edff5;
  text-decoration: none;
}

.card__distance {
  margin: 0.36rem 0 0;
  color: #51707d;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card__summaryline--back {
  margin-top: 0.42rem;
}

.card__quickfacts {
  margin: 0.68rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.42rem;
}

.card__quickfacts li {
  display: flex;
  align-items: flex-start;
  gap: 0.42rem;
  font-size: 0.88rem;
  line-height: 1.35;
  color: #2b4f5b;
}

.stat-grid {
  margin: 0.72rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.48rem;
}

.stat-grid--front {
  grid-template-columns: 1fr;
}

.stat-tile {
  border: 1px solid #cfe0e7;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  padding: 0.46rem 0.52rem;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "icon label"
    "icon value";
  column-gap: 0.4rem;
  row-gap: 0.14rem;
}

.card--b .stat-tile {
  background: rgba(255, 255, 255, 0.6);
}

.stat-tile__icon {
  grid-area: icon;
  color: #2f6f82;
  display: inline-flex;
  align-items: center;
}

.stat-tile__icon .icon--metric {
  margin-top: 0;
}

.stat-tile__label {
  grid-area: label;
  font-size: 0.72rem;
  color: #55727d;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  line-height: 1.2;
}

.stat-tile__value {
  grid-area: value;
  font-size: 0.86rem;
  color: #214651;
  line-height: 1.25;
}

.metric__label {
  font-weight: 600;
}

.metric__value {
  color: #244751;
}

.icon {
  width: 16px;
  height: 16px;
  color: currentColor;
  flex: 0 0 auto;
}

.icon--inline {
  margin-top: -1px;
}

.icon--metric {
  margin-top: 2px;
  color: #2e6e7f;
}

.footer {
  color: #5d7a84;
  font-size: 0.8rem;
  padding: 0 1rem 1.4rem;
}

@media (max-width: 720px) {
  .hero {
    padding-top: calc(env(safe-area-inset-top, 0px) + 0.5rem);
  }

  .planner__custom {
    width: 154px;
  }

  .hero__caption {
    max-width: 17rem;
    font-size: 0.84rem;
  }

  .planner-bar {
    margin-top: 0.45rem;
  }

  .planner-toggle {
    padding: 0.62rem 0.74rem;
  }

  .planner-toggle__label {
    font-size: 0.64rem;
  }

  .planner-toggle__value {
    font-size: 0.9rem;
  }

  .planner {
    padding: 0.46rem;
    gap: 0.48rem;
  }

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

  .chip-row {
    gap: 0.32rem;
  }

  .chip {
    font-size: 0.76rem;
    padding: 0.34rem 0.54rem;
  }

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

  .view-fab {
    min-width: 150px;
    font-size: 0.9rem;
    padding: 0.62rem 1.06rem;
  }

  .status-strip .last-updated {
    font-size: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card__flip {
    transition: none;
  }
}
