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

* {
  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;
}

.hidden {
  display: none !important;
}

.hero {
  background: #4ea7c4;
  color: #ffffff;
  border-bottom: 1px solid #4297b2;
  padding: calc(env(safe-area-inset-top, 0px) + 1.5rem) 1rem 1.3rem;
}

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

.brand {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.95;
}

h1 {
  margin: 0.4rem 0 0;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 700;
  line-height: 1.2;
}

.subtitle {
  margin: 0.5rem 0 0;
  max-width: 48rem;
  font-size: 1.02rem;
  color: rgba(255, 255, 255, 0.94);
}

.planner {
  margin-top: 1.2rem;
  background: #f8fcfd;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  display: grid;
  gap: 0.7rem;
}

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

.planner__label {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
}

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

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

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

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

.scenario span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.76rem;
  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.86rem;
  padding: 0.44rem 0.72rem;
  cursor: pointer;
}

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

.planner__custom {
  width: 200px;
  border-radius: 8px;
  border: 1px solid #c8d9e1;
  font-size: 0.98rem;
  padding: 0.42rem 0.62rem;
  background: #ffffff;
  color: var(--ink);
}

.last-updated {
  margin: 0.85rem 0 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.92);
}

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

.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.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.ranking-tools__postcode {
  width: 160px;
}

.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: #704b05;
  background: #fff1d8;
}

.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-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: #7a5300;
  background: #fff3d5;
}

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

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

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

.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 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: #b57900;
}

.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: #fff4d8;
}

.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: #7a5200;
  background: #fcedc8;
}

.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) + 1.6rem);
  }

  .planner__custom {
    width: 180px;
  }

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

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

.brand-logo {
  display: block;
  width: clamp(125px, 21.25vw, 188px);
  max-height: 80px;
  height: auto;
  margin: 0;
  object-fit: contain;
}

.brand-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid rgba(26, 67, 88, 0.28);
  border-radius: 16px;
  padding: 0.4rem 0.58rem;
  box-shadow: 0 10px 22px rgba(8, 30, 44, 0.24);
}

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