:root {
  color-scheme: light;
  --club-blue: #053aa6;
  --club-blue-dark: #06235f;
  --club-green: #168247;
  --club-green-deep: #0c5833;
  --club-green-pale: #e8f6dc;
  --club-red: #e32a2f;
  --ink: #182334;
  --muted: #5c6777;
  --line: #d4dfec;
  --white: #ffffff;
  --warm: #f6f9ef;
  --focus: #ffcf33;
  --shadow: 0 18px 45px rgba(6, 35, 95, .15);
  --radius: 8px;
  --content: 1180px;
  --space-1: .5rem;
  --space-2: .75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(232, 246, 220, .5), rgba(255, 255, 255, 0) 34rem),
    var(--white);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: 0;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

a {
  color: var(--club-blue);
  text-decoration-thickness: .09em;
  text-underline-offset: .18em;
}

a:hover {
  color: var(--club-blue-dark);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  z-index: 20;
  border-radius: var(--radius);
  background: var(--club-blue-dark);
  color: var(--white);
  padding: .7rem .9rem;
  font-weight: 800;
  text-decoration: none;
}

.skip-link:focus {
  position: fixed;
  top: .75rem;
  left: .75rem;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  clip-path: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(13rem, 22rem) 1fr auto;
  align-items: center;
  gap: var(--space-4);
  padding: .75rem max(1rem, calc((100vw - var(--content)) / 2));
  border-bottom: 1px solid rgba(212, 223, 236, .9);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px);
}

.brand {
  display: block;
}

.brand img {
  width: min(22rem, 100%);
  height: auto;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .35rem;
}

.site-nav a,
.header-action {
  border-radius: var(--radius);
  color: var(--ink);
  font-size: .94rem;
  font-weight: 800;
  line-height: 1;
  padding: .72rem .82rem;
  text-decoration: none;
}

.site-nav a:hover,
.header-action:hover {
  background: var(--club-green-pale);
  color: var(--club-blue-dark);
}

.header-action {
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 8px 20px rgba(6, 35, 95, .08);
}

.nav-toggle {
  position: relative;
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--club-blue-dark);
  cursor: pointer;
}

.nav-toggle > span,
.nav-toggle > span::before,
.nav-toggle > span::after {
  display: block;
  width: 1.2rem;
  height: 2px;
  background: currentColor;
  content: "";
  transition: transform .18s ease, opacity .18s ease;
}

.nav-toggle > span {
  position: relative;
}

.nav-toggle > span::before,
.nav-toggle > span::after {
  position: absolute;
  top: 0;
  left: 0;
}

.nav-toggle > span::before {
  transform: translateY(-.38rem);
}

.nav-toggle > span::after {
  transform: translateY(.38rem);
}

.nav-toggle[aria-expanded="true"] > span {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] > span::before {
  transform: translateY(0) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] > span::after {
  transform: translateY(0) rotate(-45deg);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(22rem, 1fr);
  align-items: center;
  gap: var(--space-6);
  min-height: 740px;
  padding: var(--space-6) max(1rem, calc((100vw - var(--content)) / 2)) var(--space-5);
  overflow: hidden;
}

.hero__copy {
  position: relative;
  z-index: 1;
}

.hero__crest {
  width: 6.8rem;
  height: auto;
  margin-bottom: var(--space-4);
  filter: drop-shadow(0 14px 20px rgba(6, 35, 95, .12));
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  color: var(--ink);
  line-height: 1.02;
  letter-spacing: 0;
}

h1 {
  max-width: 10ch;
  margin-bottom: var(--space-4);
  font-size: 5.2rem;
  font-weight: 900;
}

h2 {
  max-width: 12ch;
  margin-bottom: var(--space-4);
  font-size: 3.3rem;
  font-weight: 900;
}

.hero__lead {
  max-width: 37rem;
  color: var(--muted);
  font-size: 1.22rem;
  line-height: 1.62;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: var(--space-5) 0 var(--space-4);
}

.button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  padding: .94rem 1.15rem;
  text-align: center;
  text-decoration: none;
}

.button--primary {
  background: var(--club-blue);
  color: var(--white);
  box-shadow: 0 12px 28px rgba(5, 58, 166, .24);
}

.button--primary:hover {
  background: var(--club-blue-dark);
  color: var(--white);
}

.button--secondary {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--club-blue-dark);
}

.button--secondary:hover {
  background: var(--club-green-pale);
}

.button--social {
  border: 1px solid var(--club-blue);
  background: var(--club-blue);
  color: var(--white);
  box-shadow: none;
}

.button--social:hover {
  border-color: var(--club-blue-dark);
  background: var(--club-blue-dark);
  color: var(--white);
}

.quick-contact {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 1rem;
  max-width: 42rem;
  color: var(--muted);
  font-style: normal;
}

.quick-contact span {
  display: inline-flex;
  align-items: center;
  min-height: 1.6rem;
}

.quick-contact span::before {
  content: "";
  width: .45rem;
  height: .45rem;
  margin-right: .55rem;
  border-radius: 50%;
  background: var(--club-green);
}

.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.hero__visual img,
.hero__video {
  width: min(100%, 38rem);
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  object-fit: cover;
  object-position: center;
  box-shadow: var(--shadow);
}

.hero__video {
  background: var(--white);
}

.teaser-card {
  display: grid;
  grid-template-columns: minmax(18rem, .9fr) minmax(18rem, .7fr);
  align-items: center;
  gap: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 14px 34px rgba(6, 35, 95, .09);
  overflow: hidden;
}

.teaser-card__visual {
  min-height: 20rem;
  background: var(--club-green-pale);
}

.teaser-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.teaser-card__copy {
  padding: var(--space-5);
}

.teaser-card__copy h3 {
  margin-bottom: var(--space-3);
  color: var(--ink);
  font-size: 2rem;
  line-height: 1.05;
}

.teaser-card__copy p {
  color: var(--muted);
}

.section {
  scroll-margin-top: 7rem;
  padding: var(--space-6) max(1rem, calc((100vw - var(--content)) / 2));
}

.section__intro {
  display: grid;
  grid-template-columns: minmax(12rem, .54fr) minmax(0, 1fr);
  gap: var(--space-5);
  align-items: start;
}

.section__label {
  margin-bottom: var(--space-2);
  color: var(--club-blue);
  font-size: .86rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.welcome {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(20rem, .7fr);
  gap: var(--space-5);
  border-top: 1px solid var(--line);
  background: linear-gradient(90deg, var(--white), var(--warm));
}

.welcome .section__intro {
  display: block;
}

.welcome__body {
  color: var(--muted);
  font-size: 1.1rem;
}

.club-points {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: var(--space-4) 0 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  list-style: none;
  overflow: hidden;
}

.club-points li {
  min-height: 8.8rem;
  background: var(--white);
  padding: var(--space-4);
}

.club-points span {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--club-green-deep);
  font-weight: 900;
}

.game-section {
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 207, 51, .18), transparent 17rem),
    linear-gradient(180deg, #f7fbf2, var(--white));
}

.game-section .section__intro {
  margin-bottom: var(--space-5);
}

.game-section .section__intro p:last-child {
  max-width: 44rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.game-page,
.game-main {
  background: #10281f;
}

.game-page .site-header {
  position: relative;
}

.bowls-app {
  position: relative;
  width: 100%;
  isolation: isolate;
  background: #173e2e;
  color: var(--white);
  overflow: hidden;
}

.bowls-app [hidden] {
  display: none !important;
}

.bowls-scene {
  position: relative;
  width: 100%;
  height: clamp(36rem, 78vh, 58rem);
  min-height: 36rem;
  background: #427352;
  overflow: hidden;
}

#bowls-game {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  touch-action: none;
}

.render-fallback {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  background: #f8fbf5;
  color: var(--ink);
  padding: 1.5rem;
  text-align: center;
}

.render-fallback h2 {
  max-width: none;
  margin-bottom: .75rem;
  font-size: clamp(1.7rem, 5vw, 2.6rem);
}

.render-fallback > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .65rem;
}

.bowls-status,
.shot-callout {
  position: absolute;
  z-index: 4;
  left: 50%;
  width: min(32rem, calc(100% - 2rem));
  margin: 0;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 6px;
  background: rgba(8, 31, 23, .84);
  color: var(--white);
  font-size: .88rem;
  font-weight: 800;
  line-height: 1.35;
  padding: .55rem .75rem;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.bowls-status {
  top: 5.25rem;
}

.shot-callout {
  top: 8.6rem;
  width: max-content;
  max-width: calc(100% - 2rem);
  border-color: rgba(255, 207, 51, .72);
  background: #06235f;
  color: #fff7cf;
  font-size: 1rem;
  animation: shot-callout-in .28s ease-out both;
}

.delivery-meter {
  position: absolute;
  z-index: 4;
  right: 1.25rem;
  bottom: 7.4rem;
  display: grid;
  grid-template-columns: auto 10rem;
  align-items: center;
  gap: .65rem;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 6px;
  background: rgba(8, 31, 23, .88);
  color: var(--white);
  font-size: .78rem;
  font-weight: 800;
  line-height: 1;
  padding: .65rem .75rem;
  pointer-events: none;
}

.delivery-meter::before {
  position: absolute;
  right: .75rem;
  width: 10rem;
  height: .56rem;
  border-radius: 2px;
  background: rgba(255, 255, 255, .2);
  content: "";
}

.delivery-meter i {
  z-index: 1;
  display: block;
  width: 0;
  height: .56rem;
  border-radius: 2px;
  background: var(--focus);
}

.mat-position-controls {
  position: absolute;
  z-index: 5;
  inset: 0;
  pointer-events: none;
}

.mat-position-button {
  position: absolute;
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff8d6;
  cursor: pointer;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  -webkit-tap-highlight-color: transparent;
}

.mat-position-button::before {
  position: absolute;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid rgba(255, 255, 255, .58);
  border-radius: 50%;
  background: rgba(8, 31, 23, .3);
  box-shadow: 0 0 0 1px rgba(8, 31, 23, .16);
  content: "";
  transform: scaleY(.58);
  transition: background-color .16s ease, border-color .16s ease;
}

.mat-position-button span {
  position: relative;
  z-index: 1;
  display: block;
  width: .82rem;
  height: .82rem;
  border-bottom: 3px solid currentColor;
  border-left: 3px solid currentColor;
}

.mat-position-button--left span {
  transform: rotate(45deg);
}

.mat-position-button--right span {
  transform: rotate(225deg);
}

.mat-position-button:hover::before,
.mat-position-button:focus-visible::before {
  border-color: #fff8d6;
  background: rgba(8, 31, 23, .54);
}

.mat-position-button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: -2px;
}

.mat-position-button:disabled {
  cursor: default;
  opacity: .28;
}

.bowls-hud {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
}

.bowls-hud__top,
.bowls-hud__bottom {
  position: absolute;
  right: 1rem;
  left: 1rem;
  display: grid;
  gap: .65rem;
  align-items: center;
}

.bowls-hud__top {
  top: 1rem;
  grid-template-columns: minmax(10rem, 1fr) auto minmax(10rem, 1fr);
}

.bowls-hud__bottom {
  bottom: 1rem;
  grid-template-columns: minmax(12rem, 20rem) auto;
  align-items: end;
  justify-content: space-between;
}

.turn-badge,
.match-score,
.game-controls,
.delivery-readout,
.hand-control {
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 6px;
  background: rgba(8, 31, 23, .88);
  box-shadow: 0 10px 26px rgba(3, 15, 11, .2);
  pointer-events: auto;
  backdrop-filter: blur(10px);
}

.turn-badge {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: .7rem;
  justify-self: start;
  padding: .5rem .7rem;
}

.turn-badge > span:last-child {
  display: grid;
  min-width: 0;
}

.turn-badge small,
.match-score small,
.delivery-readout small {
  color: rgba(255, 255, 255, .7);
  font-size: .65rem;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.turn-badge strong {
  overflow: hidden;
  max-width: 12rem;
  font-size: .9rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-mark {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 2.25rem;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, .82);
  border-radius: 50%;
  color: var(--white);
  font-size: .7rem;
  font-weight: 900;
}

.player-mark--blue {
  background: var(--club-blue);
}

.player-mark--red {
  background: var(--club-red);
}

.match-score {
  display: flex;
  min-width: 17.5rem;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .48rem .7rem;
}

.match-score > span:first-child {
  display: grid;
  min-width: 3.4rem;
  margin-right: .15rem;
  padding-right: .7rem;
  border-right: 1px solid rgba(255, 255, 255, .22);
}

.match-score__player {
  display: inline-flex;
  min-width: 3.2rem;
  align-items: center;
  justify-content: center;
  gap: .4rem;
}

.match-score__player b {
  font-size: .65rem;
}

.match-score__player--blue b {
  color: #a9c8ff;
}

.match-score__player--red b {
  color: #ffb6b8;
}

.match-score__player strong {
  font-size: 1.2rem;
  line-height: 1;
}

.match-score__divider {
  color: rgba(255, 255, 255, .55);
  font-weight: 800;
}

.game-controls {
  display: flex;
  justify-self: end;
  padding: .25rem;
}

.game-control {
  position: relative;
  display: grid;
  width: 2.55rem;
  height: 2.55rem;
  flex: 0 0 2.55rem;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--white);
  cursor: pointer;
}

.game-control:hover {
  background: rgba(255, 255, 255, .12);
}

.game-control > span,
.game-control > span::before,
.game-control > span::after {
  position: absolute;
  display: block;
  content: "";
}

.game-control--settings > span {
  width: 1.15rem;
  height: .9rem;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.game-control--settings > span::before {
  top: .28rem;
  width: 1.15rem;
  border-top: 2px solid currentColor;
}

.game-control--settings > span::after {
  top: -.2rem;
  left: .22rem;
  width: .2rem;
  height: .2rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: #163b2c;
  box-shadow: .48rem .38rem 0 -1px #163b2c, .48rem .38rem 0 1px currentColor, .08rem .78rem 0 -1px #163b2c, .08rem .78rem 0 1px currentColor;
}

.game-control--sound > span {
  left: .78rem;
  width: .42rem;
  height: .58rem;
  border: 2px solid currentColor;
  border-right: 0;
}

.game-control--sound > span::before {
  top: -.25rem;
  left: .22rem;
  border-top: .43rem solid transparent;
  border-right: .52rem solid currentColor;
  border-bottom: .43rem solid transparent;
}

.game-control--sound > span::after {
  top: -.28rem;
  left: .66rem;
  width: .42rem;
  height: .72rem;
  border-right: 2px solid currentColor;
  border-radius: 50%;
}

.game-control--sound.is-muted > span::after {
  top: -.2rem;
  left: .68rem;
  width: .68rem;
  height: .68rem;
  border: 0;
  border-top: 2px solid currentColor;
  border-radius: 0;
  transform: rotate(45deg);
}

.game-control--pause > span {
  width: .72rem;
  height: 1rem;
  border-left: 3px solid currentColor;
  border-right: 3px solid currentColor;
}

.game-control--restart > span {
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-left-color: transparent;
  border-radius: 50%;
}

.game-control--restart > span::before {
  top: -.18rem;
  left: -.2rem;
  border-top: .24rem solid transparent;
  border-right: .34rem solid currentColor;
  border-bottom: .24rem solid transparent;
  transform: rotate(24deg);
}

.delivery-readout {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .62rem .75rem;
}

.delivery-readout > span {
  display: grid;
  min-width: 0;
}

.delivery-readout strong {
  overflow: hidden;
  font-size: .82rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-clock {
  width: 3.25rem;
  flex: 0 0 3.25rem;
  border-left: 1px solid rgba(255, 255, 255, .22);
  color: var(--white);
  font-variant-numeric: tabular-nums;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
  padding-left: .65rem;
  text-align: right;
}

.delivery-clock.is-warning {
  color: var(--focus);
}

.delivery-clock.is-urgent {
  color: #ff9fa2;
}

.hand-control {
  display: flex;
  min-width: 15rem;
  margin: 0;
  padding: .25rem;
}

.hand-control legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.hand-control label {
  flex: 1 1 50%;
  cursor: pointer;
}

.hand-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.hand-control span {
  display: grid;
  min-height: 2.45rem;
  place-items: center;
  border-radius: 4px;
  color: rgba(255, 255, 255, .72);
  font-size: .72rem;
  font-weight: 900;
  padding: .35rem .55rem;
}

.hand-control input:checked + span {
  background: var(--white);
  color: var(--club-blue-dark);
}

.hand-control input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}

.game-overlay {
  position: absolute;
  z-index: 6;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(4, 20, 14, .74);
  overflow: auto;
}

.game-overlay__surface {
  width: min(42rem, 100%);
  max-height: calc(100% - 1rem);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  background: #f8fbf5;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .32);
  color: var(--ink);
  padding: clamp(1rem, 3vw, 1.7rem);
}

.game-overlay__surface--compact {
  width: min(28rem, 100%);
  text-align: center;
}

.game-overlay__surface h2,
.game-dialog h2 {
  max-width: none;
  margin-bottom: .75rem;
  font-size: clamp(1.55rem, 4vw, 2.15rem);
  line-height: 1.08;
}

.setup-form {
  display: grid;
  gap: 1rem;
}

.orientation-hint {
  display: none;
  margin: 0;
  border-left: 3px solid var(--club-green);
  border-radius: 4px;
  background: var(--club-green-pale);
  color: var(--club-green-deep);
  font-size: .8rem;
  font-weight: 900;
  line-height: 1.3;
  padding: .48rem .6rem;
}

.setup-heading {
  display: flex;
  align-items: center;
  gap: .8rem;
}

.setup-heading img {
  width: 3.4rem;
  height: 3.4rem;
  flex: 0 0 3.4rem;
  object-fit: contain;
}

.setup-heading small {
  color: var(--club-green-deep);
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.setup-heading h2 {
  margin: .1rem 0 0;
}

.setup-group {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.setup-group > legend,
.field-label,
.volume-control {
  color: #334253;
  font-size: .78rem;
  font-weight: 900;
}

.setup-group > legend {
  margin-bottom: .4rem;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
  overflow: hidden;
}

.segmented-control label {
  cursor: pointer;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
}

.segmented-control span {
  display: grid;
  min-height: 2.7rem;
  place-items: center;
  background: var(--white);
  color: var(--muted);
  font-size: .84rem;
  font-weight: 900;
  padding: .45rem .7rem;
}

.segmented-control input:checked + span {
  background: var(--club-blue-dark);
  color: var(--white);
}

.segmented-control input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: -3px;
}

.setup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}

.field-label {
  display: grid;
  gap: .32rem;
  min-width: 0;
}

.field-label input,
.field-label select,
.number-stepper input,
.game-dialog select {
  width: 100%;
  min-width: 0;
  height: 2.7rem;
  border: 1px solid #b7c5d5;
  border-radius: 5px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: .88rem;
  font-weight: 700;
  padding: .5rem .65rem;
}

.ends-picker {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: .55rem .75rem;
}

.ends-picker legend {
  grid-column: 1 / -1;
}

.number-stepper {
  display: grid;
  grid-template-columns: 2.7rem 3.4rem 2.7rem;
  border: 1px solid #b7c5d5;
  border-radius: 5px;
  overflow: hidden;
}

.number-stepper button,
.ends-presets button,
.dialog-heading button {
  border: 0;
  background: var(--white);
  color: var(--club-blue-dark);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.number-stepper button {
  height: 2.7rem;
  font-size: 1.25rem;
}

.number-stepper input {
  height: 2.7rem;
  border-width: 0 1px;
  border-radius: 0;
  padding: .4rem;
  text-align: center;
  appearance: textfield;
}

.number-stepper input::-webkit-inner-spin-button {
  appearance: none;
}

.ends-presets {
  display: grid;
  grid-template-columns: repeat(5, minmax(2.35rem, 1fr));
  gap: .3rem;
}

.ends-presets button {
  min-height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.ends-presets button[aria-pressed="true"] {
  border-color: var(--club-blue);
  background: #e8efff;
}

.setup-audio {
  display: grid;
  grid-template-columns: auto minmax(10rem, 1fr);
  align-items: center;
  gap: 1rem;
  padding-top: .2rem;
}

.switch-control {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: #334253;
  font-size: .8rem;
  font-weight: 900;
  cursor: pointer;
}

.switch-control input {
  position: absolute;
  opacity: 0;
}

.switch-control span {
  position: relative;
  width: 2.5rem;
  height: 1.4rem;
  border-radius: .7rem;
  background: #aeb9c5;
}

.switch-control span::after {
  position: absolute;
  top: .2rem;
  left: .2rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--white);
  content: "";
  transition: transform .18s ease;
}

.switch-control input:checked + span {
  background: var(--club-green);
}

.switch-control input:checked + span::after {
  transform: translateX(1.1rem);
}

.switch-control input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.volume-control {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: .65rem;
}

.volume-control input {
  width: 100%;
  accent-color: var(--club-green);
}

.setup-submit {
  width: 100%;
}

.coin {
  display: grid;
  width: 5.6rem;
  height: 5.6rem;
  margin: 0 auto 1rem;
  place-items: center;
  border: .36rem double #ffcf33;
  border-radius: 50%;
  background: var(--club-blue-dark);
  box-shadow: 0 12px 28px rgba(6, 35, 95, .25);
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 900;
}

.bowls-app.is-tossing .coin {
  animation: coin-toss 1.15s cubic-bezier(.2, .7, .2, 1) both;
}

.coin-choice,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .65rem;
  margin-top: 1.1rem;
}

.game-dialog {
  width: min(38rem, calc(100% - 1.25rem));
  max-height: calc(100svh - 1.25rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf5;
  color: var(--ink);
  padding: clamp(1rem, 3vw, 1.6rem);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .36);
}

.game-dialog::backdrop {
  background: rgba(3, 16, 11, .74);
}

.game-dialog form {
  display: grid;
  gap: 1rem;
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: .75rem;
}

.dialog-heading h2 {
  margin: 0;
}

.dialog-heading button {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .45rem .65rem;
}

.result-dialog {
  text-align: center;
}

.result-score {
  color: var(--club-blue-dark);
  font-size: clamp(2.6rem, 9vw, 4.5rem);
  font-weight: 900;
  line-height: 1;
}

.result-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 1.4rem 0 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
  overflow: hidden;
}

.result-details div {
  display: grid;
  gap: .25rem;
  background: var(--white);
  padding: .75rem .5rem;
}

.result-details dt {
  color: var(--muted);
  font-size: .67rem;
  font-weight: 900;
  text-transform: uppercase;
}

.result-details dd {
  margin: 0;
  color: var(--club-blue-dark);
  font-weight: 900;
}

.result-history {
  margin-top: 1rem;
  text-align: left;
}

.result-history h3 {
  margin-bottom: .45rem;
  font-size: .82rem;
  text-transform: uppercase;
}

.result-history ol {
  display: flex;
  gap: .35rem;
  margin: 0;
  padding: 0 0 .25rem;
  overflow-x: auto;
  list-style: none;
}

.result-history li {
  min-width: 3.4rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  padding: .35rem .45rem;
  text-align: center;
}

@keyframes coin-toss {
  0% { transform: translateY(0) rotateY(0); }
  42% { transform: translateY(-4.2rem) rotateY(720deg); }
  100% { transform: translateY(0) rotateY(1260deg); }
}

@keyframes shot-callout-in {
  from { opacity: 0; transform: translate(-50%, .45rem); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.visit {
  background: var(--club-blue-dark);
  color: var(--white);
}

.visit h2,
.visit .section__label {
  color: var(--white);
}

.visit__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: var(--space-5);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .18);
  overflow: hidden;
}

.contact-block {
  display: flex;
  min-height: 15rem;
  flex-direction: column;
  align-items: flex-start;
  gap: .45rem;
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .84);
  font-style: normal;
  padding: var(--space-4);
}

.contact-block strong {
  margin-bottom: .5rem;
  color: var(--white);
  font-size: 1.1rem;
}

.contact-block a {
  color: var(--white);
}

.contact-block .button--secondary {
  color: var(--club-blue-dark);
}

.contact-block p {
  margin-bottom: var(--space-4);
}

.contact-block--action .button {
  margin-top: auto;
}

.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  border-bottom: 1px solid var(--line);
}

.contact h2 {
  max-width: 13ch;
}

.contact__actions {
  display: flex;
  max-width: min(100%, 38rem);
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.big-email {
  color: var(--club-blue);
  font-size: 1.6rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.posts-shell[hidden] {
  display: none;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) max(1rem, calc((100vw - var(--content)) / 2));
  color: var(--muted);
  font-size: .94rem;
}

.site-footer img {
  width: 3rem;
  height: auto;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: var(--space-5);
  }

  h1 {
    max-width: 12ch;
    font-size: 4rem;
  }

  h2 {
    font-size: 2.8rem;
  }

  .welcome,
  .teaser-card,
  .visit__grid,
  .contact {
    grid-template-columns: 1fr;
  }

  .section__intro {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }

  .contact {
    display: grid;
  }
}

@media (max-width: 820px) {
  .bowls-hud__top {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .match-score {
    grid-column: 1 / -1;
    grid-row: 2;
    width: min(22rem, 100%);
    justify-self: center;
  }

  .bowls-status {
    top: 8.45rem;
  }

  .shot-callout {
    top: 11.75rem;
  }
}

@media (max-width: 660px) {
  .section {
    scroll-margin-top: 5.5rem;
  }

  .site-header,
  .section,
  .hero,
  .site-footer {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .site-header {
    grid-template-columns: minmax(0, 1fr) 2.75rem;
    align-items: center;
    gap: .5rem .75rem;
    padding-top: .65rem;
    padding-bottom: .65rem;
  }

  .site-header .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .nav-toggle {
    display: grid;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .site-header .site-nav {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: .2rem;
    padding-top: .35rem;
    border-top: 1px solid var(--line);
  }

  .site-header.is-nav-open .site-nav {
    display: flex;
  }

  .site-header .site-nav a {
    display: flex;
    min-height: 2.75rem;
    flex: none;
    align-items: center;
    justify-content: flex-start;
    padding: .7rem .6rem;
    text-align: left;
  }

  .site-header .header-action {
    display: none;
    min-height: 2.75rem;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: center;
  }

  .site-header.is-nav-open .header-action {
    display: flex;
  }

  .game-page .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .game-page .site-nav {
    display: none;
  }

  .game-page .header-action {
    display: inline-flex;
    width: auto;
    min-height: 2.75rem;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    padding: .65rem .75rem;
  }

  .game-page .brand img {
    width: min(13.5rem, 100%);
  }

  .brand img {
    width: min(13.5rem, 100%);
  }

  .header-action {
    width: 100%;
    text-align: center;
  }

  .hero__crest {
    display: none;
  }

  .hero {
    gap: var(--space-4);
    padding-top: var(--space-4);
  }

  h1 {
    font-size: 2.8rem;
  }

  h2 {
    max-width: 13ch;
    font-size: 2.25rem;
  }

  .hero__lead,
  .welcome__body {
    font-size: 1rem;
  }

  .button {
    width: 100%;
  }

  .hero__actions {
    margin: var(--space-4) 0 var(--space-3);
  }

  .hero__visual img {
    min-height: 15rem;
    max-height: 18rem;
  }

  .hero__video {
    width: min(100%, 18rem);
    min-height: 0;
    max-height: none;
  }

  .teaser-card__copy {
    padding: var(--space-4);
  }

  .club-points {
    grid-template-columns: 1fr;
  }

  .bowls-scene {
    height: clamp(32rem, 78svh, 48rem);
    min-height: 32rem;
  }

  .bowls-hud__top,
  .bowls-hud__bottom {
    right: .5rem;
    left: .5rem;
  }

  .bowls-hud__top {
    top: .5rem;
    gap: .4rem;
  }

  .bowls-hud__bottom {
    bottom: .5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .35rem;
  }

  .delivery-readout,
  .hand-control {
    grid-row: 1;
  }

  .turn-badge {
    max-width: 11rem;
    padding: .38rem .48rem;
  }

  .turn-badge strong {
    max-width: 7.5rem;
    font-size: .82rem;
  }

  .player-mark {
    width: 1.95rem;
    height: 1.95rem;
    flex-basis: 1.95rem;
  }

  .game-control {
    width: 2.75rem;
    height: 2.75rem;
    flex-basis: 2.75rem;
  }

  .match-score {
    min-width: 0;
    width: min(20rem, 100%);
    padding: .38rem .5rem;
  }

  .bowls-status {
    top: 7.55rem;
    font-size: .84rem;
  }

  .shot-callout {
    top: 10.75rem;
    font-size: .88rem;
  }

  .delivery-readout {
    gap: .4rem;
    padding: .48rem .5rem;
  }

  .delivery-readout strong {
    font-size: .82rem;
  }

  .delivery-clock {
    width: 2.85rem;
    flex-basis: 2.85rem;
    font-size: .96rem;
    padding-left: .4rem;
  }

  .hand-control {
    min-width: 0;
    padding: .2rem;
  }

  .hand-control span {
    min-height: 2.75rem;
    font-size: .78rem;
    padding: .25rem .2rem;
  }

  .delivery-meter {
    right: .5rem;
    bottom: 4.8rem;
    grid-template-columns: auto 6.5rem;
  }

  .delivery-meter::before {
    width: 6.5rem;
  }

  .game-overlay {
    place-items: start center;
    padding: .5rem;
  }

  .game-overlay__surface {
    width: 100%;
    max-height: calc(100% - .25rem);
    padding: .75rem;
  }

  .setup-form {
    gap: .5rem;
  }

  .setup-heading {
    gap: .6rem;
  }

  .setup-heading img {
    width: 2.8rem;
    height: 2.8rem;
    flex-basis: 2.8rem;
  }

  .setup-group > legend {
    margin-bottom: .25rem;
  }

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

  .setup-grid--play-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ends-picker {
    grid-template-columns: 1fr;
    gap: .35rem;
  }

  .number-stepper {
    justify-self: start;
  }

  .setup-audio {
    grid-template-columns: 1fr;
    gap: .35rem;
    padding-top: 0;
  }

  .result-details {
    font-size: .82rem;
  }

  .big-email {
    font-size: 1.15rem;
  }
}

@media (max-width: 380px) {
  .turn-badge small {
    display: none;
  }

  .turn-badge strong {
    max-width: 5.2rem;
  }

  .game-control {
    width: 2.75rem;
    height: 2.75rem;
    flex-basis: 2.75rem;
  }

  .match-score {
    gap: .35rem;
  }

  .match-score > span:first-child {
    min-width: 3rem;
    padding-right: .4rem;
  }

  .delivery-readout small,
  .hand-control span {
    font-size: .75rem;
  }

  .setup-heading img {
    width: 2.8rem;
    height: 2.8rem;
    flex-basis: 2.8rem;
  }

  .ends-presets {
    grid-template-columns: repeat(5, minmax(2rem, 1fr));
  }
}

@media (max-width: 660px) and (orientation: portrait) {
  .game-page .orientation-hint {
    display: block;
  }
}

@media (max-width: 1024px) and (max-height: 520px) and (orientation: landscape) {
  .game-page {
    height: 100svh;
    overflow: hidden;
  }

  .game-page .site-header,
  .game-page .site-footer {
    display: none;
  }

  .game-page .game-main,
  .game-page .bowls-app,
  .game-page .bowls-scene {
    height: 100svh;
    min-height: 0;
  }

  .game-page .game-main {
    overflow: hidden;
  }

  .game-page .game-overlay {
    padding: .4rem;
  }

  .game-page .setup-form {
    width: min(54rem, 100%);
    max-height: calc(100svh - .8rem);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem .75rem;
    padding: .65rem .8rem;
  }

  .game-page .setup-heading {
    grid-column: 1 / -1;
  }

  .game-page .setup-heading img {
    width: 2.7rem;
    height: 2.7rem;
    flex-basis: 2.7rem;
  }

  .game-page .setup-grid--names,
  .game-page .setup-form > .setup-grid:not(.setup-grid--names),
  .game-page .setup-submit {
    grid-column: 2;
  }

  .game-page .setup-form > .setup-group,
  .game-page .setup-audio {
    grid-column: 1;
  }

  .game-page .setup-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-page .ends-picker {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .game-page .setup-audio {
    grid-template-columns: auto minmax(8rem, 1fr);
  }

  .game-page .bowls-hud__top,
  .game-page .bowls-hud__bottom {
    right: .5rem;
    left: .5rem;
  }

  .game-page .bowls-hud__top {
    top: .5rem;
    grid-template-columns: minmax(7.5rem, 1fr) auto auto;
    gap: .4rem;
  }

  .game-page .match-score {
    width: auto;
    min-width: 13rem;
    grid-column: auto;
    grid-row: auto;
    padding: .42rem .55rem;
  }

  .game-page .game-control {
    width: 2.75rem;
    height: 2.75rem;
    flex-basis: 2.75rem;
  }

  .game-page .bowls-status {
    top: 4.45rem;
    font-size: .88rem;
  }

  .game-page .shot-callout {
    top: 7.35rem;
  }

  .game-page .bowls-hud__bottom {
    bottom: .5rem;
    grid-template-columns: minmax(10rem, 18rem) minmax(13rem, 15rem);
    gap: .4rem;
  }

  .game-page .delivery-readout,
  .game-page .hand-control {
    grid-column: auto;
    grid-row: auto;
  }

  .game-page .delivery-readout strong,
  .game-page .hand-control span {
    font-size: .82rem;
  }

  .game-page .hand-control span {
    min-height: 2.75rem;
  }

  .game-page .delivery-meter {
    bottom: 4.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
  }
}
