:root {
  --scoodle-navy: #002147;
  --scoodle-deep-navy: #001a33;
  --scoodle-green: #0b3d2e;
  --scoodle-club-green: #006747;
  --scoodle-dark-green: #004830;
  --scoodle-cream: #fff9ea;
  --scoodle-soft-cream: #f7f1e3;
  --scoodle-gold: #c8a44d;
  --scoodle-muted-gold: #a9873d;
  --scoodle-text: #102a43;
  --scoodle-border: rgba(200, 164, 77, 0.38);
  --scoodle-card-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

html {
  width: 100%;
  max-width: 100%;
  height: 100%;
  overflow-x: hidden;
}

body.clubhouse-page {
  width: 100%;
  max-width: 100%;
  min-height: 100dvh;
  margin: 0;
  background: #006747;
  color: var(--scoodle-text);
  overflow: hidden;
}

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

.clubhouse-shell {
  --clubhouse-gutter: clamp(14px, 3.8vw, 24px);
  width: min(100%, 480px);
  max-width: 480px;
  height: 100dvh;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #006747;
  position: relative;
  overflow-x: hidden;
}

.clubhouse-brand-bar {
  position: relative;
  z-index: 4;
  min-height: 78px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  padding: 8px clamp(14px, 4.6vw, 24px);
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 33, 71, 0.12);
}

.clubhouse-brand {
  grid-column: 2;
  display: grid;
  justify-items: center;
  min-width: 0;
}

.clubhouse-brand img {
  width: min(280px, 70vw);
  height: 62px;
  object-fit: contain;
}

.clubhouse-profile-button {
  grid-column: 3;
  position: relative;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--scoodle-green);
  cursor: pointer;
}

.clubhouse-profile-button::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 3px;
  width: 10px;
  height: 10px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #c4143f;
}

.clubhouse-profile-button img {
  width: 42px;
  height: 42px;
  display: block;
}

.clubhouse-content {
  display: grid;
  align-content: start;
  gap: clamp(8px, 1.1dvh, 14px);
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0 var(--clubhouse-gutter) clamp(7px, 1.4dvh, 12px);
  background: #006747;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.clubhouse-content::-webkit-scrollbar {
  display: none;
}

.clubhouse-loading {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  color: var(--scoodle-cream);
}

.clubhouse-loading strong {
  font-size: 1.2rem;
}

.clubhouse-hero {
  --clubhouse-hero-message-height: clamp(82px, 17vw, 104px);
  --clubhouse-hero-photo-x: 50%;
  --clubhouse-hero-photo-y: 40%;
  --clubhouse-hero-photo-top: var(--clubhouse-hero-message-height);
  --clubhouse-hero-frame: clamp(6px, 1.7vw, 10px);
  position: relative;
  isolation: isolate;
  min-height: clamp(282px, 58vw, 380px);
  display: grid;
  justify-items: center;
  align-content: start;
  margin: 0 calc(var(--clubhouse-gutter) * -1) -6px;
  padding: 0 var(--clubhouse-hero-frame) 72px;
  overflow: hidden;
  color: var(--scoodle-cream);
  background: #006747;
}

.clubhouse-hero::before {
  content: "";
  position: absolute;
  inset: var(--clubhouse-hero-photo-top) var(--clubhouse-hero-frame) 0;
  z-index: -2;
  background: url("../assets/clubhouse-hero-bright.png") var(--clubhouse-hero-photo-x) var(--clubhouse-hero-photo-y) / cover;
  filter: saturate(1.13) brightness(1.12) contrast(1.03);
  transform: none;
}

.clubhouse-hero::after {
  content: "";
  position: absolute;
  inset: var(--clubhouse-hero-photo-top) var(--clubhouse-hero-frame) 0;
  z-index: -1;
  background:
    linear-gradient(
      180deg,
      rgba(0, 30, 63, 0.04) 0%,
      rgba(0, 30, 63, 0) 38%,
      rgba(0, 30, 63, 0) calc(100% - 15px),
      #006747 100%
    );
}

.clubhouse-hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: var(--clubhouse-hero-message-height);
  align-content: center;
  padding: 10px clamp(14px, 4vw, 24px) 11px;
  background: #006747;
  text-align: center;
}

.clubhouse-kicker-row,
.clubhouse-hero-divider {
  width: min(100%, 320px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(8px, 2.6vw, 14px);
  color: var(--scoodle-gold);
}

.clubhouse-kicker-row span,
.clubhouse-hero-divider span {
  height: 2px;
  background: currentColor;
}

.clubhouse-kicker-row em {
  color: var(--scoodle-cream);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(11px, 2.9vw, 17px);
  font-style: normal;
  font-weight: 800;
  letter-spacing: clamp(0.08em, 1.35vw, 0.16em);
  text-transform: uppercase;
  white-space: nowrap;
}

.clubhouse-hero h1 {
  justify-self: center;
  margin: 2px auto 0;
  color: var(--scoodle-cream);
  font-family: Georgia, "Times New Roman", serif;
  width: max-content;
  max-width: 100%;
  font-size: clamp(25px, 6.45vw, 38px);
  font-weight: 650;
  line-height: 0.94;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 2px 7px rgba(0, 0, 0, 0.42);
  white-space: nowrap;
}

.clubhouse-hero-divider {
  display: none;
  width: min(100%, 248px);
}

.clubhouse-hero-divider i {
  width: 26px;
  height: 23px;
  display: grid;
  place-items: center;
  color: var(--scoodle-gold);
}

.clubhouse-hero-divider img {
  width: 25px;
  height: 25px;
  display: block;
  object-fit: contain;
}

.clubhouse-hero p {
  margin: 2px 0 0;
  color: var(--scoodle-gold);
  font-family: Georgia, "Times New Roman", serif;
  width: 100%;
  max-width: 100%;
  font-size: clamp(12px, 3vw, 16px);
  font-style: italic;
  font-weight: 650;
  line-height: 1.15;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
}

.clubhouse-master-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1dvh, 12px);
  width: 100%;
  min-width: 0;
  margin-top: clamp(8px, 1.5dvh, 16px);
}

.clubhouse-master-card,
.clubhouse-around-row {
  color: var(--scoodle-text);
  background:
    radial-gradient(circle at 92% 12%, rgba(255, 255, 255, 0.78), transparent 28%),
    linear-gradient(135deg, var(--scoodle-cream), var(--scoodle-soft-cream));
  border: 1px solid var(--scoodle-border);
  border-radius: 10px;
  box-shadow: var(--scoodle-card-shadow);
  text-decoration: none;
}

.clubhouse-master-card {
  position: relative;
  min-width: 0;
  min-height: 60px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 10px;
  align-items: center;
  column-gap: 8px;
  padding: 7px 9px;
  overflow: hidden;
}

.clubhouse-master-icon,
.clubhouse-around-icon {
  display: grid;
  place-items: center;
  color: #145c36;
}

.clubhouse-master-icon img {
  width: 42px;
  height: 42px;
  display: block;
}

.clubhouse-master-copy,
.clubhouse-around-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
  align-content: center;
}

.clubhouse-master-copy strong,
.clubhouse-around-copy strong {
  color: #174b2f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.98rem, 3.65vw, 1.46rem);
  line-height: 1.08;
  overflow-wrap: normal;
}

.clubhouse-master-copy strong {
  font-size: clamp(0.72rem, 2.35vw, 0.84rem);
  line-height: 1.02;
}

.clubhouse-around-copy strong {
  font-size: clamp(0.84rem, 2.75vw, 1.05rem);
}

.clubhouse-master-copy small,
.clubhouse-around-copy small {
  color: var(--scoodle-text);
  font-size: clamp(0.74rem, 2.55vw, 0.98rem);
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.clubhouse-chevron {
  width: 14px;
  height: 14px;
  position: relative;
  right: auto;
  top: auto;
  background:
    image-set(
      url("../public/icons/scoodle/chevron.png?v=clubhouse-33") 1x,
      url("../public/icons/scoodle/chevron@2x.png?v=clubhouse-33") 2x,
      url("../public/icons/scoodle/chevron@3x.png?v=clubhouse-33") 3x
    )
    center / contain no-repeat;
  border: 0;
  transform: none;
  justify-self: end;
}

.clubhouse-around-row .clubhouse-chevron {
  right: auto;
}

.clubhouse-around-section {
  display: grid;
  gap: clamp(7px, 0.9dvh, 11px);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  justify-self: stretch;
  margin-top: auto;
  padding-top: clamp(7px, 1dvh, 14px);
}

.clubhouse-around-heading {
  display: grid;
  justify-items: center;
  gap: 5px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  color: var(--scoodle-gold);
  text-align: center;
}

.clubhouse-heading-rule {
  width: min(100%, 258px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 11px;
}

.clubhouse-heading-rule span {
  height: 2px;
  background:
    linear-gradient(90deg, transparent, currentColor 16%, currentColor 84%, transparent);
  opacity: 0.88;
}

.clubhouse-heading-rule i {
  width: 36px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--scoodle-gold);
}

.clubhouse-heading-rule img {
  width: 34px;
  height: 34px;
  display: block;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(67%) sepia(34%) saturate(591%) hue-rotate(4deg) brightness(92%) contrast(87%);
}

.clubhouse-around-heading h2 {
  margin: 0;
  color: var(--scoodle-cream);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.9rem, 3vw, 1.22rem);
  font-weight: 620;
  line-height: 1;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.32);
  white-space: nowrap;
}

.clubhouse-around-list {
  display: grid;
  gap: clamp(8px, 0.9dvh, 12px);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  justify-self: stretch;
}

.clubhouse-around-row {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 40px;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) 10px;
  align-items: center;
  column-gap: 7px;
  padding: 5px 9px;
  position: relative;
  overflow: hidden;
}

.clubhouse-around-icon {
  height: 29px;
  border-right: 1px solid rgba(200, 164, 77, 0.34);
}

.clubhouse-around-icon img {
  width: 28px;
  height: 28px;
  display: block;
}

.clubhouse-bottom-nav {
  position: relative;
  left: auto;
  bottom: auto;
  z-index: 32;
  width: 100%;
  max-width: 480px;
  transform: none;
  min-height: clamp(42px, 6.4dvh, 54px);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: clamp(1px, 0.45dvh, 3px) 0 calc(clamp(1px, 0.45dvh, 3px) + env(safe-area-inset-bottom));
  background: #ffffff;
  border-top: 1px solid rgba(0, 33, 71, 0.12);
  box-shadow: 0 -8px 22px rgba(0, 0, 0, 0.08);
}

.clubhouse-bottom-nav a,
.clubhouse-bottom-nav button {
  min-width: 0;
  min-height: clamp(34px, 5.1dvh, 44px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  border: 0;
  border-right: 1px solid rgba(0, 33, 71, 0.16);
  border-radius: 0;
  color: var(--scoodle-green);
  background: transparent;
  font: inherit;
  font-size: clamp(0.42rem, 1.35vw, 0.58rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.clubhouse-bottom-nav a:last-child,
.clubhouse-bottom-nav button:last-child {
  border-right: 0;
}

.clubhouse-bottom-nav a.active,
.clubhouse-bottom-nav button.active {
  color: var(--scoodle-gold);
}

.clubhouse-nav-icon {
  position: relative;
  width: clamp(18px, 2.85dvh, 23px);
  height: clamp(18px, 2.85dvh, 23px);
  display: block;
  background: var(--clubhouse-nav-icon-url) center / contain no-repeat;
}

[data-clubhouse-nav="home"] .clubhouse-nav-icon {
  --clubhouse-nav-icon-url: image-set(
    url("../public/icons/scoodle/clubhouse-active.png?v=clubhouse-33") 1x,
    url("../public/icons/scoodle/clubhouse-active@2x.png?v=clubhouse-33") 2x,
    url("../public/icons/scoodle/clubhouse-active@3x.png?v=clubhouse-33") 3x
  );
}

[data-clubhouse-nav="scorecard"] .clubhouse-nav-icon {
  --clubhouse-nav-icon-url: image-set(
    url("../public/icons/scoodle/scorecard-footer.png?v=clubhouse-33") 1x,
    url("../public/icons/scoodle/scorecard-footer@2x.png?v=clubhouse-33") 2x,
    url("../public/icons/scoodle/scorecard-footer@3x.png?v=clubhouse-33") 3x
  );
}

[data-clubhouse-nav="results"] .clubhouse-nav-icon {
  --clubhouse-nav-icon-url: image-set(
    url("../public/icons/scoodle/results-footer.png?v=clubhouse-33") 1x,
    url("../public/icons/scoodle/results-footer@2x.png?v=clubhouse-33") 2x,
    url("../public/icons/scoodle/results-footer@3x.png?v=clubhouse-33") 3x
  );
}

[data-clubhouse-nav="stats"] .clubhouse-nav-icon {
  --clubhouse-nav-icon-url: image-set(
    url("../public/icons/scoodle/stats.png?v=clubhouse-33") 1x,
    url("../public/icons/scoodle/stats@2x.png?v=clubhouse-33") 2x,
    url("../public/icons/scoodle/stats@3x.png?v=clubhouse-33") 3x
  );
}

[data-clubhouse-nav="more"] .clubhouse-nav-icon {
  --clubhouse-nav-icon-url: image-set(
    url("../public/icons/scoodle/more.png?v=clubhouse-33") 1x,
    url("../public/icons/scoodle/more@2x.png?v=clubhouse-33") 2x,
    url("../public/icons/scoodle/more@3x.png?v=clubhouse-33") 3x
  );
}

.clubhouse-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.48);
}

.clubhouse-dialog-backdrop[hidden] {
  display: none;
}

.clubhouse-dialog {
  width: min(100%, 390px);
  max-height: min(82vh, 620px);
  overflow: auto;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.26);
}

.clubhouse-dialog-head {
  display: grid;
  grid-template-columns: 1fr 38px;
  gap: 10px;
  align-items: start;
  padding: 14px;
  color: #ffffff;
  background: var(--scoodle-navy);
}

.clubhouse-dialog-head strong {
  display: block;
  font-size: 1.12rem;
}

.clubhouse-dialog-head span {
  display: block;
  margin-top: 3px;
  font-size: 0.78rem;
  font-weight: 750;
  opacity: 0.88;
}

.clubhouse-dialog-head button {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  color: #ffffff;
  background: transparent;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

.clubhouse-member-form,
.clubhouse-more-list,
.clubhouse-groups-list {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.clubhouse-member-form label {
  display: grid;
  gap: 6px;
}

.clubhouse-member-form label > span {
  color: var(--scoodle-text);
  font-size: 0.76rem;
  font-weight: 950;
}

.clubhouse-member-form input {
  min-width: 0;
  min-height: 42px;
  border: 1px solid rgba(16, 42, 67, 0.16);
  border-radius: 6px;
  background: #ffffff;
  color: var(--scoodle-text);
  font: inherit;
  padding: 0 10px;
}

.clubhouse-check-row {
  grid-template-columns: 22px 1fr;
  align-items: center;
}

.clubhouse-check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--scoodle-navy);
}

.clubhouse-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.clubhouse-dialog-actions button,
.clubhouse-more-list a,
.clubhouse-more-list button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--scoodle-navy);
  font: inherit;
  font-weight: 950;
  text-decoration: none;
  cursor: pointer;
}

.clubhouse-dialog-actions button.secondary,
.clubhouse-more-list button:first-child {
  color: var(--scoodle-navy);
  background: #ffffff;
  border-color: rgba(0, 33, 71, 0.22);
}

.clubhouse-more-list [data-clubhouse-office-slot]:empty,
#clubhouseGroupsDialog {
  display: none;
}

@media (min-width: 500px) {
  body.clubhouse-page {
    background:
      linear-gradient(90deg, rgba(0, 26, 51, 0.18), rgba(0, 26, 51, 0.02) 34%, rgba(0, 26, 51, 0.02) 66%, rgba(0, 26, 51, 0.18)),
      url("../assets/Ballybunion-background.jpg?v=clubhouse-33") center center / cover no-repeat fixed,
      #006747;
  }

  .clubhouse-shell {
    margin: 0 auto;
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.28);
  }
}

@media (max-width: 560px) {
  .clubhouse-master-card {
    grid-template-columns: 38px minmax(0, 1fr) 10px;
    min-height: 58px;
    column-gap: 8px;
    padding: 6px 7px;
  }

  .clubhouse-master-icon img {
    width: 38px;
    height: 38px;
  }

  .clubhouse-master-copy strong {
    font-size: clamp(0.68rem, 2.55vw, 0.74rem);
    line-height: 1.03;
  }

  .clubhouse-master-copy small {
    font-size: clamp(0.62rem, 2.45vw, 0.72rem);
    line-height: 1.24;
  }

  .clubhouse-chevron {
    width: 12px;
    height: 12px;
  }

  .clubhouse-around-row {
    grid-template-columns: 31px minmax(0, 1fr) 10px;
    gap: 7px;
    min-height: 40px;
    padding: 5px 8px;
  }

  .clubhouse-around-icon img {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 420px) {
  .clubhouse-shell {
    --clubhouse-gutter: 14px;
  }

  .clubhouse-brand-bar {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    min-height: 66px;
    padding: 6px 12px;
  }

  .clubhouse-brand img {
    width: min(264px, 68vw);
    height: 58px;
  }

  .clubhouse-profile-button {
    width: 36px;
    height: 36px;
  }

  .clubhouse-profile-button img {
    width: 36px;
    height: 36px;
  }

  .clubhouse-hero {
    --clubhouse-hero-message-height: clamp(74px, 18vw, 88px);
    min-height: clamp(282px, 72vw, 318px);
    padding-top: 0;
    padding-bottom: 58px;
  }

  .clubhouse-kicker-row em {
    letter-spacing: 0.1em;
  }

  .clubhouse-hero h1 {
    font-size: clamp(27px, 7.1vw, 31px);
    letter-spacing: 0;
  }

  .clubhouse-hero p {
    font-size: clamp(12px, 3.2vw, 15px);
  }

  .clubhouse-master-grid {
    gap: 10px;
    margin-top: clamp(8px, 1.3dvh, 14px);
  }

  .clubhouse-content {
    gap: clamp(8px, 1.1dvh, 12px);
    padding-bottom: clamp(7px, 1.4dvh, 12px);
  }

  .clubhouse-bottom-nav a,
  .clubhouse-bottom-nav button {
    min-height: clamp(34px, 5.1dvh, 42px);
    font-size: 0.48rem;
  }

  .clubhouse-nav-icon {
    width: clamp(18px, 2.85dvh, 22px);
    height: clamp(18px, 2.85dvh, 22px);
  }

}

@media (max-height: 760px) and (max-width: 520px) {
  .clubhouse-brand-bar {
    min-height: clamp(54px, 8.7dvh, 66px);
    padding-block: 4px;
  }

  .clubhouse-brand img {
    height: clamp(48px, 6.6dvh, 58px);
  }

  .clubhouse-profile-button,
  .clubhouse-profile-button img {
    width: clamp(30px, 5.2dvh, 36px);
    height: clamp(30px, 5.2dvh, 36px);
  }

  .clubhouse-hero {
    --clubhouse-hero-message-height: clamp(68px, 11dvh, 82px);
    min-height: clamp(228px, 36dvh, 270px);
    padding-top: 0;
    padding-bottom: clamp(44px, 7dvh, 58px);
  }

  .clubhouse-hero h1 {
    font-size: clamp(24px, 6.65vw, 29px);
  }

  .clubhouse-master-grid {
    margin-top: clamp(7px, 1.2dvh, 12px);
  }

  .clubhouse-around-section {
    gap: 6px;
    padding-top: 7px;
  }

  .clubhouse-around-heading {
    gap: 2px;
  }

  .clubhouse-heading-rule i {
    width: 30px;
    height: 22px;
  }

  .clubhouse-heading-rule img {
    width: 28px;
    height: 28px;
  }

  .clubhouse-around-row {
    min-height: 39px;
  }

  .clubhouse-bottom-nav {
    min-height: 42px;
  }
}

@media (max-width: 350px) {
  .clubhouse-master-grid {
    grid-template-columns: 1fr;
  }
}
