*, *::before, *::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

.clubtap-page {
  --bg: #eef1ed;
  --panel: #fffaf1;
  --ink: #15191a;
  --muted: #68706d;
  --line: #d9ddd6;
  --green: #0f5c3f;
  --green-dark: #083d2a;
  --gold: #e0ac33;
  --red: #d94a38;
  background: var(--bg);
  color: var(--ink);
  font-family: "Barlow", sans-serif;
}

.clubtap-shell {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  height: 100vh;
  width: 100vw;
}

.hud {
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  overflow-y: auto;
  padding: 22px;
  z-index: 3;
}

.hud__top {
  align-items: center;
  display: flex;
  gap: 16px;
}

.eyebrow,
.club-card__label,
.result-card__label,
.score-grid span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hud h1 {
  color: var(--green-dark);
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(2.35rem, 4.4vw, 4.25rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.9;
}

.intro-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  gap: 8px;
  font-size: 0.96rem;
  line-height: 1.38;
  padding: 13px 14px;
}

.intro-card p {
  margin: 0;
}

.club-card,
.final-card,
.result-card,
.summary-card,
.score-grid {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.club-card {
  align-items: center;
  background: #ffffff;
  display: grid;
  gap: 15px;
  grid-template-columns: 70px minmax(0, 1fr);
  padding: 14px;
}

.club-card__logo {
  align-items: center;
  background: #e7ece6;
  border-radius: 7px;
  color: var(--green);
  display: flex;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  height: 70px;
  justify-content: center;
  overflow: hidden;
  width: 70px;
}

.club-card__logo img {
  display: block;
  height: 50px;
  object-fit: contain;
  width: 50px;
}

.club-card h2 {
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(2rem, 7vw, 3.7rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.9;
  overflow-wrap: anywhere;
}

.final-card {
  background: var(--green-dark);
  color: white;
  padding: 18px 20px;
}

.final-card .club-card__label {
  color: rgb(255 255 255 / 0.72);
}

.final-card strong {
  display: block;
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(3.2rem, 8vw, 5.3rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.85;
}

.final-card p:last-child {
  color: rgb(255 255 255 / 0.76);
  font-size: 1rem;
  line-height: 1.35;
  margin-top: 8px;
}

.round-track {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.round-dot {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  height: 10px;
}

.round-dot--active {
  background: var(--gold);
  border-color: var(--gold);
}

.round-dot--done {
  background: var(--green);
  border-color: var(--green);
}

.score-grid {
  background: var(--green-dark);
  color: white;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 96px;
  overflow: hidden;
}

.score-grid div {
  min-width: 0;
  padding: 18px 20px;
}

.score-grid div + div {
  border-left: 1px solid rgb(255 255 255 / 0.18);
}

.score-grid span {
  color: rgb(255 255 255 / 0.68);
  display: block;
  margin-bottom: 5px;
}

.score-grid strong {
  display: block;
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(2rem, 3vw, 2.65rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

#distance-value {
  font-size: clamp(1.75rem, 2.55vw, 2.35rem);
}

.result-card,
.summary-card {
  align-items: center;
  background: #ffffff;
  display: grid;
  gap: 14px;
  padding: 14px;
}

.result-card {
  grid-template-columns: minmax(0, 1fr);
}

.summary-card {
  align-items: start;
}

.summary-card__head {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
}

.result-card h3,
.summary-card h3 {
  font-size: 1.25rem;
  line-height: 1.05;
  margin: 3px 0 4px;
}

.result-card p,
.summary-card p,
.status-line {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.4;
}

.guess-verdict {
  color: var(--green-dark) !important;
  font-weight: 700;
  margin-top: 8px;
}

.fact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.fact-list span {
  background: #eef1ed;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
  padding: 7px 9px;
}

.summary-list {
  display: grid;
  gap: 8px;
  width: 100%;
}

.summary-row {
  align-items: center;
  background: transparent;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  border-left: 0;
  border-right: 0;
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 8px;
  grid-template-columns: 34px 42px minmax(0, 1fr) auto;
  font: inherit;
  padding-top: 8px;
  text-align: left;
  width: 100%;
}

.summary-row strong,
.summary-row span {
  min-width: 0;
}

.summary-row__logo {
  align-items: center;
  background: #eef1ed;
  border-radius: 6px;
  display: flex;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  object-fit: contain;
  padding: 4px;
  width: 30px;
}

.summary-row__logo--text {
  color: var(--green-dark);
  font-size: 0.9rem;
  line-height: 1;
}

.summary-row span {
  color: var(--muted);
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-row--active {
  color: var(--green-dark);
}

.summary-row--active span {
  color: var(--green-dark);
  font-weight: 700;
}

.share-button {
  align-items: center;
  background: var(--gold);
  border: 0;
  border-radius: 8px;
  color: #1d1706;
  cursor: pointer;
  display: flex;
  gap: 8px;
  height: 46px;
  justify-content: center;
  padding: 0 14px;
}

.share-button svg {
  fill: currentColor;
  height: 20px;
  width: 20px;
}

.share-button span {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.share-button--copied {
  background: var(--green);
  color: white;
}

.next-button {
  background: var(--green);
  border: 0;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0;
  padding: 12px 16px;
  text-transform: uppercase;
}

.status-line {
  margin-top: 0;
}

.map-wrap {
  min-height: 0;
  position: relative;
}

#map {
  height: 100%;
  width: 100%;
}

.clubtap-page [hidden] {
  display: none !important;
}

.map-toast {
  background: rgb(8 61 42 / 0.94);
  border-radius: 8px;
  bottom: 24px;
  color: white;
  font-weight: 700;
  left: 50%;
  max-width: min(90vw, 480px);
  padding: 12px 16px;
  position: absolute;
  text-align: center;
  transform: translateX(-50%);
  z-index: 4;
}

.guess-marker,
.answer-marker {
  align-items: center;
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgb(0 0 0 / 0.25);
  display: flex;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.guess-marker {
  background: var(--red);
}

.answer-marker {
  background: var(--green);
}

.answer-marker::after {
  background: white;
  border-radius: 50%;
  content: "";
  display: block;
  height: 8px;
  width: 8px;
}

@media (max-width: 820px) {
  html,
  body {
    overflow: auto;
  }

  .clubtap-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(460px, 1fr);
    height: auto;
    min-height: 100vh;
  }

  .hud {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    overflow: visible;
    padding: 16px;
  }

  .status-line {
    margin-top: 0;
  }
}

@media (max-width: 520px) {
  .club-card {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .club-card__logo {
    height: 56px;
    width: 56px;
  }

  .club-card__logo img {
    height: 42px;
    width: 42px;
  }

  .score-grid div {
    padding: 12px 10px;
  }
}
