:root {
  color-scheme: light;
  --green-950: #071d16;
  --green-900: #102d23;
  --green-800: #173e30;
  --green-700: #225941;
  --green-100: #e9f1ed;
  --gold: #c8a35b;
  --gold-soft: #f3e6c5;
  --sky: #dce9e5;
  --ink: #17211d;
  --muted: #6b756f;
  --line: #d9d2c3;
  --paper: #f8f5ed;
  --white: #ffffff;
  --danger: #a63b30;
  --shadow: 0 18px 55px rgba(7, 29, 22, 0.13);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  touch-action: manipulation;
  background:
    radial-gradient(circle at 18% 0%, rgba(200, 163, 91, 0.24), transparent 28%),
    linear-gradient(135deg, #f8f5ed 0%, #edf3ef 42%, #fbfaf6 100%);
  color: var(--ink);
}

body.auth-required {
  background: #ffffff;
}

body.auth-required .topbar,
body.auth-required .bottom-nav {
  display: none;
}

body.auth-required .app-shell {
  width: 100%;
  min-height: 100vh;
  padding: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1460px, 100%);
  margin: 0 auto;
  padding: 24px 24px 108px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 2px 18px;
}

.brand-logo {
  display: block;
  width: 112px;
  height: auto;
  margin-bottom: 4px;
}

.topbar h1 { font-size: 20px; }
.topbar h1:empty { display: none; }

.profile-brand-logo {
  display: block;
  width: 144px;
  height: auto;
  margin: 0 0 12px;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
}

h2 {
  font-size: 18px;
}

.top-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.chat-link {
  display: grid;
  place-items: center;
  height: 48px;
  min-width: 64px;
  padding: 0 14px;
  border: 1px solid rgba(200, 163, 91, 0.55);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  color: var(--white);
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(7, 29, 22, 0.18);
}

.chat-link.secondary {
  background: var(--white);
  color: var(--green-900);
  border-color: var(--line);
}

.floating-chat {
  position: fixed;
  right: 14px;
  bottom: 92px;
  z-index: 20;
  display: none;
  place-items: center;
  min-width: 74px;
  height: 46px;
  padding: 0 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  color: var(--white);
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(22, 51, 38, 0.24);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 30;
  width: min(720px, calc(100% - 28px));
  min-height: 70px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  padding: 6px;
  border: 1px solid rgba(200, 163, 91, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 50px rgba(7, 29, 22, 0.2);
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
}

.bottom-nav-btn {
  min-width: 0;
  display: grid;
  place-items: center;
  gap: 3px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
}

@media (max-width: 420px) {
  .bottom-nav { width: calc(100% - 8px); }
  .bottom-nav-btn { font-size: 9px; }
}

.bottom-nav-btn span {
  font-size: 20px;
  line-height: 1;
}

.bottom-nav-btn.active {
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  color: var(--white);
}

.history-view {
  display: block;
}

.history-full-panel {
  width: min(760px, 100%);
  margin: 0 auto;
}

.icon-button {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--green-900);
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(7, 29, 22, 0.1);
}

.golf-home-view,
.home-view,
.setup-view {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.golf-home-view {
  display: grid;
  gap: 16px;
}

.golf-hero {
  min-height: 310px;
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 26px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(7, 29, 22, 0.08), rgba(7, 29, 22, 0.84)),
    url("assets/course-photos/alpine.jpg"),
    linear-gradient(135deg, var(--green-800), var(--green-950));
  background-size: cover;
  background-position: center;
  color: var(--white);
  box-shadow: 0 18px 55px rgba(7, 29, 22, 0.16);
}

.golf-hero p {
  margin: 0;
  color: var(--white);
  font-size: clamp(48px, 10vw, 104px);
  line-height: .9;
  letter-spacing: 0;
  font-weight: 900;
}

.golf-hero strong {
  max-width: 720px;
  color: rgba(255, 255, 255, .86);
  font-size: clamp(17px, 2.5vw, 25px);
  line-height: 1.25;
  font-weight: 600;
}

.golf-hero span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
  line-height: 1.45;
}

.home-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.home-menu-card {
  min-height: 150px;
  display: grid;
  align-content: end;
  gap: 7px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 14px 34px rgba(7, 29, 22, 0.08);
}

.home-menu-card.primary {
  border-color: rgba(200, 163, 91, 0.6);
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  color: var(--white);
}

.home-menu-card span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.home-menu-card strong {
  font-size: 25px;
  line-height: 1.1;
}

.home-menu-card small {
  color: var(--muted);
  font-size: 14px;
}

.home-menu-card.primary small {
  color: rgba(255, 255, 255, 0.76);
}

.friends-card { border-color: rgba(200, 163, 91, 0.6); }
.account-box { display: grid; gap: 12px; margin-top: 18px; padding: 16px; border: 1px solid rgba(200, 163, 91, 0.38); background: rgba(200, 163, 91, 0.07); }
.account-box h3 { margin: 0 0 4px; font-size: 15px; }
.account-box small { color: var(--muted); }
.account-fields, .account-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.account-fields input { min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-strong); color: var(--ink); font: inherit; }
.account-actions button { min-height: 42px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--ink); font-weight: 800; }
.account-actions .primary-action { border-color: rgba(200, 163, 91, 0.6); }
.room-view { display: grid; gap: 18px; max-width: 960px; margin: 0 auto; }
.room-panel, .room-lobby { padding: 24px; }
.room-entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.room-entry-grid > div { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.035); }
.online-tournament-panel { display: grid; grid-column: 1 / -1; grid-template-columns: 1fr; gap: 18px; }
.online-tournament-panel > div { display: grid; gap: 12px; padding: 0; border: 0; background: transparent; }
.online-tournament-panel > div + div { grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); padding-top: 18px; }
.online-tournament-panel > div + div h3, .online-tournament-panel > div + div button { grid-column: 1 / -1; }
.offline-tournament-panel { grid-column: 1 / -1; }
.room-create-result { display: grid; gap: 8px; padding: 12px; border: 1px solid rgba(200, 163, 91, .45); background: rgba(200, 163, 91, .08); }
.room-create-result span, .room-create-result p { color: var(--muted); font-size: 12px; }
.room-create-result p { margin: 0; }
.room-create-result strong { color: var(--gold); font-size: 25px; letter-spacing: 3px; }
.danger-action { border-color: rgba(164, 67, 48, .42); background: #fff4ef; color: #8f3826; }
.challenge-history-panel { display: grid; gap: 12px; padding: 14px; }
.challenge-history-menu-wrap { position: relative; display: inline-flex; justify-content: flex-end; }
.challenge-history-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; min-width: 44px; min-height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--green-900); font-weight: 900; }
.challenge-history-toggle span { font-size: 20px; line-height: 1; }
.challenge-history-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; min-width: 148px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); box-shadow: 0 14px 30px rgba(21, 41, 28, .16); }
.challenge-history-menu button { min-height: 38px; border: 0; background: transparent; color: var(--green-900); font-size: 13px; font-weight: 900; text-align: left; }
.challenge-history-page-heading { align-items: center; }
.challenge-history-page-heading small { color: var(--muted); font-size: 12px; font-weight: 800; }
.challenge-history-back { width: auto; min-height: 38px; padding: 0 14px; font-size: 12px; }
.challenge-history-list { display: grid; gap: 14px; }
.challenge-history-card { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #f1f3ec; }
.challenge-history-card-heading span { color: var(--muted); font-size: 12px; font-weight: 800; }
.challenge-history-card-heading strong { display: block; margin-top: 3px; color: var(--green-900); font-size: 15px; }
.challenge-history-card-heading small { color: var(--muted); font-weight: 800; }
.challenge-history-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.challenge-history-delete { min-height: 34px; padding: 0 12px; border: 1px solid rgba(164, 67, 48, .42); border-radius: 8px; background: #fff4ef; color: #8f3826; font-size: 12px; font-weight: 900; }
.room-entry-grid h3 { margin: 0; font-size: 16px; }
.room-entry-grid label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.room-entry-grid input, .room-entry-grid select { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-strong); color: var(--ink); font: inherit; }
.room-entry-grid .challenge-course-select-label { gap: 8px; color: var(--green-900); font-size: 14px; font-weight: 900; }
.room-entry-grid .challenge-course-select-label select { min-height: 58px; padding: 0 16px; border-radius: 10px; font-size: 17px; font-weight: 900; line-height: 1.2; }
.room-nine-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.offline-tournament-panel { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.035); }
.offline-tournament-panel .panel-heading { margin: 0; padding: 0 0 4px; border: 0; }
.offline-tournament-panel > label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.offline-tournament-panel select { min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-strong); color: var(--ink); font: inherit; }
.offline-player-names { display: grid; grid-template-columns: repeat(5, minmax(42px, 1fr)); gap: 6px; }
.offline-player-names label { display: grid; gap: 4px; color: var(--muted); font-size: 9px; line-height: 1.1; }
.offline-player-names input { min-width: 0; min-height: 34px; padding: 0 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-strong); color: var(--ink); font: inherit; font-size: 12px; text-align: center; }
.offline-tournament-view { width: 100%; max-width: 960px; margin: 0 auto; padding: 10px; overflow: hidden; }
.offline-scorecard-scroll { width: 100%; overflow: hidden; -webkit-overflow-scrolling: touch; }
.offline-scorecard-table { width: 100%; min-width: 0; border-collapse: collapse; table-layout: fixed; font-size: 10px; }
.offline-scorecard-table th, .offline-scorecard-table td { min-width: 0; padding: 3px 1px; border: 1px solid rgba(191, 100, 25, .34); text-align: center; overflow: hidden; }
.offline-scorecard-table thead th { background: #d96513; color: #fffaf4; font-weight: 900; }
.offline-scorecard-table tbody th { min-width: 30px; background: #fff0dd; color: #6f3009; text-align: center; }
.offline-scorecard-table tbody th small { display: block; margin-top: 2px; color: #9a5b24; font-size: 8px; }
.offline-scorecard-table input { width: 100%; min-width: 0; border: 0; background: transparent; color: #6f3009; font: inherit; font-weight: 800; text-align: center; }
.offline-scorecard-table .offline-player-name { min-width: 0; max-width: none; padding: 0; text-align: center; font-size: clamp(10px, 2.8vw, 14px); font-weight: 900; }
.offline-scorecard-table .offline-hole-column { width: var(--offline-hole-col, 6%); min-width: 0; font-size: 8px; }
.offline-scorecard-table .offline-meta-column { width: var(--offline-meta-col, 5%); min-width: 0; font-size: 7px; }
.offline-scorecard-table th:nth-child(n+5),
.offline-scorecard-table td:nth-child(n+5) { width: var(--offline-player-col, auto); }
.offline-scorecard-table tbody tr:nth-child(odd) { background: #fff8ef; }
.offline-scorecard-table tbody tr:nth-child(even) { background: #ffedd6; }
.offline-score-control { display: grid; grid-template-columns: minmax(0, 1fr) 22px; justify-items: stretch; align-items: center; gap: 2px; }
.offline-score-control input { width: 100%; min-width: 0; height: 36px; padding: 0; border: 1px solid rgba(191, 100, 25, .38); border-radius: 4px; background: #fffaf4; font-size: clamp(11px, 3.2vw, 13px); }
.offline-score-arrows { display: grid; gap: 2px; }
.offline-score-arrows button { display: grid; place-items: center; width: 22px; height: 17px; padding: 0; border: 1px solid rgba(191, 100, 25, .38); border-radius: 4px; background: #ffd29d; color: #6f3009; font-size: 11px; line-height: 1; font-weight: 900; }
.offline-score-control small, .offline-readonly-score small { display: block; color: #6f3009; font-size: 8px; font-weight: 900; line-height: 1.1; white-space: nowrap; }
.offline-readonly-score { display: grid; justify-items: center; gap: 2px; }
.offline-readonly-score strong { color: #6f3009; font-size: 13px; }
.offline-save-button { margin-top: 14px; }
.offline-action { width: 100%; margin-top: 10px; }
.offline-readonly-table td { color: #14271f; font-weight: 800; }
.offline-calculate-box { display: grid; gap: 10px; margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .9); color: var(--green-900); }
.offline-calculate-box p { margin: 0; color: var(--muted); font-weight: 800; }
.offline-calculate-pair { display: grid; gap: 7px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fbf8ef; font-size: 12px; }
.offline-calculate-pair strong { color: var(--ink); font-size: 13px; }
.offline-calculate-pair span { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.offline-calculate-pair b { color: var(--gold); font-size: 15px; }
.room-message { min-height: 20px; margin: 16px 0 0; color: var(--gold); }
.room-message.error { color: #a44330; }
.room-code-line, .room-scoreboard-heading, .room-player { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.room-code-line { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.room-code-line strong { margin-left: auto; color: var(--gold); font-size: 25px; letter-spacing: 3px; }
.room-code-line button { min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--ink); }
.room-lobby > p { color: var(--muted); }
.room-players { display: grid; gap: 8px; margin: 16px 0; }
.room-player { padding: 11px 13px; border-bottom: 1px solid var(--line); }
.room-player span { color: var(--green-700); font-weight: 700; }
.room-player small { margin-left: 5px; color: var(--muted); font-weight: 500; }
.shared-room-bar, .room-scoreboard { grid-column: 1 / -1; }
#roundView:not(.challenge-round) .shared-room-bar { display: none !important; }
.shared-room-bar { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid rgba(200, 163, 91, 0.38); background: rgba(200, 163, 91, 0.08); color: var(--muted); }
.shared-room-bar strong { color: var(--gold); letter-spacing: 2px; }
.shared-room-bar span:last-child { margin-left: auto; color: #4f8f60; }
.room-scoreboard { padding: 14px 10px; border: 1px solid var(--line); background: #f1f3ec; color: #14271f; }
.room-scoreboard-heading { padding-bottom: 8px; color: var(--muted); font-size: 12px; }
.room-scoreboard-heading strong { color: var(--ink); font-size: 14px; }
.room-scoreboard-heading small { display: block; margin-top: 3px; color: var(--muted); font-weight: 800; }
.challenge-course-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; margin-top: 4px; color: var(--green-900); line-height: 1.15; }
.challenge-course-meta strong { color: var(--green-900); font-size: 13px; font-weight: 900; }
.challenge-course-meta span { color: var(--gold); font-size: 12px; font-weight: 900; }
.challenge-course-meta em { color: #5f6f8f; font-size: 12px; font-style: normal; font-weight: 900; }
.shared-scorecard-scroll { width: 100%; overflow: hidden; }
.shared-scorecard-table { width: 100%; min-width: 0; border-collapse: collapse; table-layout: fixed; font-size: 10px; }
.shared-scorecard-table th, .shared-scorecard-table td { padding: 6px 2px; border: 1px solid rgba(24, 54, 44, .36); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shared-scorecard-table thead th { background: #e8c93d; color: #14271f; font-weight: 900; }
.shared-scorecard-table thead th:first-child { width: 9%; }
.shared-scorecard-table thead th:nth-child(2) { width: 10%; }
.shared-scorecard-table thead th:nth-child(3) { width: 9%; }
.shared-scorecard-table thead th:nth-child(4) { width: 14%; }
.shared-scorecard-table thead th { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.1; }
.shared-scorecard-table tbody tr:nth-child(odd) { background: #f7f8f3; }
.shared-scorecard-table tbody tr:nth-child(even) { background: #e2e6de; }
.shared-scorecard-table .shared-hcp, .shared-scorecard-table .shared-par { background: #e8c93d; color: #14271f; font-weight: 900; }
.shared-scorecard-table .shared-yards { color: #4c5c55; }
.shared-scorecard-table .shared-score-cell { color: #14271f; font-size: 13px; font-weight: 800; }
.score-mark { display: inline-grid; place-items: center; min-width: 24px; min-height: 24px; border: 2px solid transparent; color: inherit; font-weight: 900; line-height: 1; }
.score-mark.birdie { border-color: currentColor; border-radius: 50%; }
.score-mark.eagle { border: 3px double currentColor; border-radius: 50%; }
.score-mark.bogey { border-color: currentColor; border-radius: 5px; }
.score-mark.double-bogey { border: 3px double currentColor; border-radius: 5px; }
.shared-summary-row th, .shared-summary-row td { background: #b1e6ad; color: #14271f; font-weight: 900; }
.shared-to-par-row th, .shared-to-par-row td { background: #35d64a; color: #14271f; font-weight: 900; }
.shared-total-row th, .shared-total-row td, .shared-total-to-par-row th, .shared-total-to-par-row td { background: #111613; color: #fff; font-size: 12px; font-weight: 900; }
.save-tournament-button { width: 100%; margin-top: 14px; }
.group-scorecard-back { min-height: 42px; margin-top: 10px; font-size: 12px; }
.challenge-room-back { min-height: 42px; margin-top: 10px; font-size: 12px; }
.challenge-input-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; padding: 12px 14px; border: 1px solid rgba(70, 130, 190, .38); border-radius: 8px; background: linear-gradient(135deg, #eaf4ff, #f7fbff); color: #12395f; }
.challenge-input-heading > div { display: grid; gap: 8px; }
.challenge-input-heading span { font-size: 14px; font-weight: 900; }
.challenge-input-heading strong { color: #4f79a5; font-size: 11px; }
.challenge-input-heading .challenge-course-meta { margin-top: 0; }
.challenge-input-heading .challenge-course-meta strong { color: #12395f; font-size: 13px; }
.challenge-input-heading .challenge-course-meta span { color: #2d74b8; font-size: 12px; }
.challenge-top-back { width: auto; min-height: 34px; padding: 0 12px; font-size: 11px; }
.challenge-input-scroll { width: 100%; overflow: hidden; border: 1px solid rgba(70, 130, 190, .38); border-radius: 8px; background: #f7fbff; }
.challenge-input-scorecard { width: 100%; min-width: 0; table-layout: fixed; font-size: 10px; }
.challenge-input-scorecard th, .challenge-input-scorecard td { padding: 4px 1px; text-align: center; }
.challenge-input-scorecard th:nth-child(1), .challenge-input-scorecard td:nth-child(1) { width: 8%; }
.challenge-input-scorecard th:nth-child(2), .challenge-input-scorecard td:nth-child(2) { width: 3%; }
.challenge-input-scorecard th:nth-child(3), .challenge-input-scorecard td:nth-child(3) { width: 3%; }
.challenge-input-scorecard th:nth-child(4), .challenge-input-scorecard td:nth-child(4) { width: 6%; }
.challenge-input-scorecard th:nth-child(2), .challenge-input-scorecard th:nth-child(3), .challenge-input-scorecard th:nth-child(4) { font-size: 8px; letter-spacing: 0; }
.challenge-input-scorecard th:nth-child(5), .challenge-input-scorecard td:nth-child(5) { width: 25%; }
.challenge-input-scorecard th:nth-child(6), .challenge-input-scorecard td:nth-child(6) { width: 55%; }
.scorecard.challenge-input-scorecard td:nth-child(5), .scorecard.challenge-input-scorecard td:nth-child(6) { text-align: center; padding-left: 1px; padding-right: 1px; }
.scorecard.challenge-input-scorecard td:nth-child(5) .number-control, .scorecard.challenge-input-scorecard td:nth-child(6) .number-control { justify-self: center; margin: 0; transform: none; }
.scorecard.challenge-input-scorecard .number-control { width: 64px; grid-template-columns: 20px 24px 20px; height: 30px; }
.challenge-input-scorecard .subtotal-row td:nth-child(5), .challenge-input-scorecard .subtotal-row td:nth-child(6) { text-align: center; padding-left: 1px; padding-right: 1px; }
.challenge-input-scorecard thead th { background: #143c63; color: #ffffff; }
.challenge-input-scorecard tbody tr:nth-child(odd) { background: #f7fbff; }
.challenge-input-scorecard tbody tr:nth-child(even) { background: #eaf4ff; }
.challenge-input-scorecard .section-row th { padding: 11px 6px; background: #143c63; color: var(--white); text-align: left; }
.challenge-input-scorecard .subtotal-row th, .challenge-input-scorecard .subtotal-row td { background: #cfe5fb; color: #12395f; }
.challenge-input-scorecard .subtotal-row td { font-size: 13px; font-weight: 900; line-height: 1; }
.challenge-hole-actions { margin-top: 12px; }
.challenge-finish-button { min-height: 46px; margin-top: 10px; }
.challenge-leave-button { min-height: 46px; margin-top: 10px; }
.challenge-force-zone { margin-top: 96px; padding-top: 16px; border-top: 1px dashed rgba(164, 67, 48, .32); }
.challenge-force-button { min-height: 46px; border-color: rgba(164, 67, 48, .42); background: #fff4ef; color: #8f3826; }
.challenge-finish-note { margin: 6px 0 0; color: var(--muted); font-size: 12px; font-weight: 800; text-align: center; }

.profile-view { max-width: 860px; margin: 0 auto; }
.profile-hero { min-height: 300px; display: flex; align-items: end; padding: 26px; border: 1px solid rgba(200, 163, 91, .45); border-radius: 8px; background-position: center; background-size: cover; color: var(--white); box-shadow: 0 18px 40px rgba(7, 29, 22, .18); }
.profile-hero-copy { max-width: 700px; }
.profile-hero-copy span { color: var(--gold-soft); font-size: 12px; font-weight: 900; letter-spacing: 1.6px; text-transform: uppercase; }
.profile-hero-copy h2 { margin: 8px 0; font-size: clamp(28px, 5vw, 46px); line-height: 1; }
.profile-hero-copy p { max-width: 520px; margin: 0; color: rgba(255, 255, 255, .82); font-size: 15px; line-height: 1.45; }
.profile-tabs { display: flex; gap: 8px; overflow-x: auto; margin: 12px 0; padding: 2px 0 5px; }
.profile-tabs span { flex: 0 0 auto; padding: 9px 15px; border-radius: 999px; background: rgba(16, 45, 35, .08); color: var(--green-900); font-size: 13px; font-weight: 800; }
.profile-tabs span.active { border: 1px solid var(--green-900); background: var(--white); }
.profile-quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.profile-quick-actions a, .profile-quick-actions button { min-height: 44px; display: grid; place-items: center; border: 1px solid rgba(86, 111, 242, .55); border-radius: 999px; background: rgba(255, 255, 255, .78); color: #4d6de7; font: inherit; font-weight: 800; text-decoration: none; }
.profile-content { display: grid; gap: 18px; margin-top: 18px; }
.profile-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.profile-facts > div { display: grid; gap: 6px; padding: 17px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .82); }
.profile-facts span, .profile-label { color: var(--gold); font-size: 11px; font-weight: 900; letter-spacing: 1.2px; }
.profile-facts strong { color: var(--green-900); font-size: 20px; }
.profile-main-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; }
.profile-description, .profile-layout { padding: 24px; }
.profile-description h3, .profile-layout h3 { margin: 8px 0 10px; color: var(--green-900); font-size: 22px; }
.profile-description p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.7; }
.profile-highlights { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.profile-highlights span { padding: 8px 11px; border-radius: 999px; background: rgba(200, 163, 91, .14); color: var(--green-900); font-size: 12px; font-weight: 800; }
.profile-nine-list { display: grid; gap: 9px; }
.profile-nine-list > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.profile-nine-list span { color: var(--muted); font-size: 13px; text-align: right; }
.profile-actions { display: grid; grid-template-columns: 190px 1fr; gap: 10px; }

.section-intro { max-width: 760px; margin: 0 auto 18px; }
.home-profile-banner { position: relative; isolation: isolate; display: flex; align-items: center; gap: 18px; width: min(860px, 100%); min-height: 240px; margin: 0 auto 18px; padding: 24px 28px; overflow: hidden; border: 1px solid rgba(200, 163, 91, .55); border-radius: 10px; background: url("assets/course-photos/alpine.jpg") center / cover; color: var(--white); box-shadow: 0 20px 48px rgba(7, 29, 22, .22); }
.home-profile-banner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(7, 29, 22, .94) 0%, rgba(7, 29, 22, .7) 48%, rgba(7, 29, 22, .12) 100%); }
.home-profile-banner::after { content: ""; position: absolute; right: -30px; bottom: -80px; z-index: -1; width: 260px; height: 260px; border: 1px solid rgba(243, 230, 197, .35); border-radius: 50%; box-shadow: 0 0 0 22px rgba(243, 230, 197, .06), 0 0 0 44px rgba(243, 230, 197, .04); }
.home-profile-banner img { width: 172px; height: auto; padding: 9px; border-radius: 8px; background: rgba(255, 255, 255, .95); box-shadow: 0 12px 24px rgba(0, 0, 0, .16); }
.home-profile-copy { position: relative; z-index: 1; }
.home-profile-banner h2 { margin: 4px 0; font-size: 28px; }
.home-profile-banner p { margin: 0; color: rgba(255, 255, 255, .78); }
.home-profile-points { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.home-profile-points span { padding: 6px 9px; border: 1px solid rgba(243, 230, 197, .42); border-radius: 999px; color: var(--gold-soft); font-size: 10px; font-weight: 900; letter-spacing: 1.2px; }
.section-kicker { color: var(--gold); font-size: 11px; font-weight: 900; letter-spacing: 1.4px; }
.section-intro h2 { margin: 5px 0; color: var(--green-900); font-size: 32px; }
.section-intro p { margin: 0; color: var(--muted); }
.feed-view { width: min(860px, 100%); margin: 0 auto; }
.performance-view, .me-view { width: min(860px, 100%); margin: 0 auto; }
.me-view { position: relative; }
.feed-panel, .performance-panel, .account-profile-panel { padding: 22px; }
.feed-panel { padding: 0; border: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.performance-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.performance-stats { grid-template-columns: minmax(0, 1fr); }
.performance-stat { display: grid; gap: 7px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .84); }
.performance-stat span { color: var(--gold); font-size: 11px; font-weight: 900; letter-spacing: 1px; }
.performance-stat strong { color: var(--green-900); font-size: 25px; }
.performance-stat small { color: var(--muted); }
.text-action { min-width: 40px; min-height: 36px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--green-900); font-size: 24px; font-weight: 900; }
.performance-rounds { display: grid; gap: 2px; }
.performance-round { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.performance-round div { display: grid; gap: 4px; }
.performance-round strong { color: var(--green-900); }
.performance-round small { color: var(--muted); font-size: 12px; }
.performance-round > span { color: var(--green-700); font-size: 22px; font-weight: 900; text-align: right; }
.performance-round > span small { display: block; }
.account-profile-panel { position: relative; text-align: left; }
.profile-settings-btn { position: absolute; top: 0; right: 0; z-index: 2; display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid rgba(200, 163, 91, .38); border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--green-900); font-size: 20px; font-weight: 900; box-shadow: 0 12px 24px rgba(7, 29, 22, .12); }
.me-profile-identity { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 20px; padding-right: 44px; }
.me-profile-photo-wrap { position: relative; width: 112px; height: 112px; }
.account-avatar { display: grid; place-items: center; width: 112px; height: 112px; margin: 0; border-radius: 22px; background: linear-gradient(135deg, var(--green-900), var(--green-700)); color: var(--gold-soft); font-size: 42px; font-weight: 900; }
.profile-photo { width: 112px; height: 112px; margin: 0; overflow: hidden; border: 4px solid var(--white); border-radius: 22px; background: var(--green-100); box-shadow: 0 16px 34px rgba(7, 29, 22, .16); }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.me-profile-copy { display: grid; gap: 8px; min-width: 0; }
.account-profile-panel h3 { margin: 0; color: #4b5365; font-size: clamp(22px, 5vw, 32px); line-height: 1.08; overflow-wrap: anywhere; }
.me-profile-copy strong { color: #8a919d; font-size: clamp(16px, 3.8vw, 22px); font-weight: 900; }
.account-profile-panel small { color: #a0a6af; font-size: clamp(12px, 3.1vw, 16px); font-weight: 900; }
.me-profile-role { margin-top: 20px; color: #596273; font-size: 18px; font-weight: 900; }
.me-profile-network { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 20px; color: #a8adb5; font-size: clamp(10px, 2.8vw, 14px); font-weight: 900; letter-spacing: .4px; text-align: center; }
.me-profile-network span:first-child { text-align: left; }
.me-profile-network span:last-child { text-align: right; }
.me-profile-network strong { color: #4b5365; }
.me-profile-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 24px; text-align: center; }
.me-profile-stats div { display: grid; gap: 3px; min-width: 0; }
.me-profile-stats strong { color: #6474ff; font-size: clamp(28px, 7.2vw, 42px); line-height: 1; font-weight: 900; }
.me-profile-stats span { color: #596273; font-size: clamp(9px, 2.4vw, 13px); font-weight: 900; letter-spacing: .5px; }
.profile-settings-panel, .profile-settings-page { display: grid; gap: 12px; max-width: 560px; margin: 18px auto 0; padding: 18px; border: 1px solid rgba(200, 163, 91, .42); border-radius: 8px; background: #fffaf0; text-align: left; }
.profile-settings-panel label, .profile-settings-page label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 800; }
.profile-settings-panel input, .profile-settings-page input, .profile-settings-page select { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-strong); color: var(--ink); font: inherit; }
.profile-settings-panel button, .profile-settings-page button { min-height: 42px; border-radius: 6px; font-weight: 900; }
.profile-settings-page .panel-heading { margin: 0 0 4px; padding: 0 0 10px; border-bottom: 1px solid var(--line); }
.profile-settings-page small { color: var(--muted); font-weight: 800; }
.profile-settings-page { border: 0; background: #f1f2f4; box-shadow: none; }
.settings-page-title { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; margin-bottom: 8px; color: #4b5365; text-align: center; }
.settings-page-title h2 { margin: 0; font-size: 18px; }
.settings-page-title button { display: grid; place-items: center; min-height: 38px; border: 0; background: transparent; color: #596273; font-size: 28px; font-weight: 700; }
.settings-menu { display: grid; gap: 14px; }
.settings-list { overflow: hidden; border-radius: 16px; background: var(--white); }
.settings-list button { display: grid; grid-template-columns: minmax(0, 1fr) 20px; align-items: center; width: 100%; min-height: 50px; padding: 0 15px; border: 0; border-bottom: 1px solid #e6e7ea; background: transparent; color: #4b5365; font-size: 16px; font-weight: 900; text-align: left; }
.settings-list button:last-child { border-bottom: 0; }
.settings-list b { color: #8d939c; font-size: 24px; font-weight: 700; text-align: right; }
.settings-section-label { margin: 4px 0 -7px 14px; color: #9ba1aa; font-size: 11px; font-weight: 900; letter-spacing: .7px; }
.settings-signout { min-height: 48px; border: 0; border-radius: 15px; background: var(--white); color: #d76554; font-size: 16px; font-weight: 900; }
.profile-settings-form { display: grid; gap: 12px; }
.profile-settings-form .settings-section-label { margin: 12px 0 0 12px; font-size: 12px; }
.profile-photo-row { display: grid; grid-template-columns: 50px minmax(0, 1fr) 20px; align-items: center; min-height: 72px; padding: 10px 14px; border-radius: 16px; background: var(--white); color: #4b5365; }
.profile-photo-row strong { font-size: clamp(16px, 4vw, 20px); }
.profile-photo-row b { color: #8d939c; font-size: 26px; font-weight: 700; text-align: right; }
.profile-photo-row input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.settings-photo-preview { display: grid; place-items: center; width: 42px; height: 42px; overflow: hidden; border-radius: 12px; background: linear-gradient(135deg, var(--green-900), var(--green-700)); color: var(--gold-soft); font-size: 17px; font-weight: 900; }
.settings-photo-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-field-card { overflow: hidden; border-radius: 20px; background: var(--white); }
.profile-field-card input, .profile-field-card select { width: 100%; min-height: 50px; border: 0; border-radius: 0; background: transparent; color: #4b5365; font-size: clamp(15px, 3.8vw, 19px); font-weight: 900; }
.profile-field-card input::placeholder { color: #939aa5; opacity: 1; }
.profile-name-card input + input { border-top: 1px solid #e1e3e7; }
.verified-line { display: flex; align-items: center; gap: 8px; margin: 2px 0 6px 14px; color: #20c868; font-size: clamp(12px, 3.2vw, 16px); font-weight: 900; }
.verified-line span { display: grid; place-items: center; width: 18px; height: 18px; border: 2px solid currentColor; border-radius: 50%; font-size: 11px; line-height: 1; }
.profile-info-list label { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); align-items: center; min-height: 56px; padding: 0 14px; border-bottom: 1px solid #e1e3e7; color: #4b5365; }
.profile-info-list label:last-child { border-bottom: 0; }
.profile-info-list span { color: #4b5365; font-size: clamp(14px, 3.6vw, 18px); font-weight: 900; }
.profile-info-list input, .profile-info-list select { min-height: 48px; padding: 0; color: #8d939c; text-align: right; }
.profile-info-list input[readonly] { color: #8d939c; background: transparent; }
.profile-info-list select { appearance: none; }
.privacy-card label { display: grid; grid-template-columns: minmax(0, 1fr) 58px; align-items: center; min-height: 58px; padding: 0 14px; }
.privacy-card span { color: #4b5365; font-size: clamp(15px, 3.8vw, 19px); font-weight: 900; }
.privacy-card input { justify-self: end; width: 48px; min-height: 28px; height: 28px; padding: 0; border: 0; border-radius: 999px; background: #e5e6ea; appearance: none; transition: background .18s ease; }
.privacy-card input::before { content: ""; display: block; width: 24px; height: 24px; margin: 2px; border-radius: 50%; background: var(--white); box-shadow: 0 2px 8px rgba(0, 0, 0, .16); transition: transform .18s ease; }
.privacy-card input:checked { background: #20c868; }
.privacy-card input:checked::before { transform: translateX(20px); }
.privacy-note, .delete-account-note { margin: 2px 14px 16px; color: #8f97a3; font-size: clamp(12px, 3.1vw, 15px); line-height: 1.3; font-weight: 800; }
.delete-account-note { margin-top: 18px; }
.delete-account-note button { min-height: 0; padding: 0; border: 0; background: transparent; color: #4b5365; font: inherit; font-weight: 900; }
.account-profile-panel .account-box { max-width: 560px; margin: 20px auto 0; text-align: left; }

.auth-view {
  min-height: 100vh;
}

.auth-panel {
  min-height: 100vh;
  padding: 0 20px 32px;
  background:
    radial-gradient(circle at 50% -16%, rgba(255, 255, 255, .26), transparent 34%),
    linear-gradient(180deg, var(--green-900) 0%, var(--green-700) 28%, #4b8365 42%, var(--gold) 50%, var(--gold-soft) 58%, #ffffff 70%, var(--paper) 100%);
  text-align: center;
}

.auth-hero-brand {
  display: grid;
  place-items: center;
  height: 188px;
}

.auth-hero-brand img {
  width: 210px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 12px 26px rgba(7, 29, 22, .08);
}

.auth-panel h1 {
  margin: -8px auto 0;
  max-width: 420px;
  color: var(--green-900);
  font-size: 34px;
  line-height: 1.05;
}

.auth-panel p {
  margin: 8px auto 0;
  max-width: 420px;
  color: var(--muted);
  font-size: 16px;
}

.auth-form {
  display: grid;
  gap: 12px;
  max-width: 390px;
  margin: 22px auto 0;
  padding: 18px 16px 16px;
  border: 1px solid rgba(200, 163, 91, .24);
  border-radius: 22px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 22px 48px rgba(7, 29, 22, .16);
  text-align: center;
}

.auth-form small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
}

.auth-form input {
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid #e3e6eb;
  border-radius: 13px;
  background: #fbfaf6;
  color: var(--green-900);
  font-size: 16px;
}

.auth-form input::placeholder {
  color: #a89c82;
  font-weight: 800;
}

.auth-form button {
  min-height: 54px;
  margin-top: 2px;
  border: 0;
  border-radius: 15px;
  background: #edf0f4;
  color: #9ca2ad;
  font-size: 17px;
  font-weight: 900;
}

.auth-form input + button {
  margin-top: 10px;
}

.auth-form .primary-action {
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  color: #ffffff;
}

.auth-form .primary-action:disabled {
  cursor: default;
  background: linear-gradient(135deg, rgba(16, 45, 35, .28), rgba(34, 89, 65, .28));
  color: rgba(255, 255, 255, .72);
  box-shadow: none;
}

.auth-form .auth-text-action {
  justify-self: end;
  min-height: 28px;
  margin: -4px 2px 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--green-700);
  font-size: 14px;
  font-weight: 900;
}

.auth-form .create-account-action {
  border: 2px solid var(--green-900);
  background: #ffffff;
  color: var(--green-900);
}

.auth-form button + button {
  margin-top: 10px;
}

#authRegisterBtn {
  margin-top: 14px;
}

.auth-form {
  grid-template-columns: 1fr;
}

.setup-card {
  width: min(520px, 100%);
  margin: 0 auto;
}

.setup-summary {
  display: grid;
  gap: 7px;
  padding: 15px;
  border: 1px solid rgba(200, 163, 91, 0.45);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  color: var(--white);
  margin-bottom: 14px;
}

.setup-summary strong {
  font-size: 20px;
  line-height: 1.15;
}

.setup-summary span {
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
}

.setup-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.setup-metrics small {
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--gold-soft);
  font-weight: 800;
}

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

.primary-action {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(200, 163, 91, 0.6);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  color: var(--white);
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(7, 29, 22, 0.2);
}

.primary-action:disabled {
  border-color: #c7c7c7;
  background: #d8d8d8;
  color: #777;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}

.secondary-action {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--green-900);
  font-weight: 900;
}

.secondary-action:disabled {
  border-color: #c7c7c7;
  background: #d8d8d8;
  color: #777;
  cursor: not-allowed;
  opacity: 1;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.course-search {
  margin: 0 0 14px;
}

.course-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  min-height: 250px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(7, 29, 22, 0.12), rgba(7, 29, 22, 0.82)),
    var(--course-image),
    linear-gradient(135deg, var(--green-800), var(--green-950));
  background-size: cover;
  background-position: center;
  color: var(--white);
  overflow: hidden;
  box-shadow: 0 18px 46px rgba(7, 29, 22, 0.18);
}

.course-card-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.05);
}

.course-card > :not(.course-card-bg) {
  position: relative;
  z-index: 1;
}

.course-card-top,
.course-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.course-card-top small,
.course-card-top b {
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(6px);
}

.course-card-top b {
  background: rgba(200, 163, 91, 0.92);
  color: var(--green-950);
}

.course-card-copy {
  align-self: end;
  display: grid;
  gap: 5px;
}

.course-card strong {
  color: var(--white);
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.15;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.course-card span,
.course-card small {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.35;
  font-weight: 800;
}

.course-card button {
  flex: 1;
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
  font-weight: 900;
  text-transform: uppercase;
}

.course-card .play-btn {
  flex: 1.6;
  border-color: rgba(200, 163, 91, 0.72);
  background: linear-gradient(135deg, #d4b06a, var(--gold));
  color: var(--green-950);
}

.course-card.selected {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 2px rgba(200, 163, 91, 0.45), 0 22px 56px rgba(7, 29, 22, 0.24);
}

.workspace {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.score-workspace {
  position: relative;
  isolation: isolate;
  grid-template-columns: minmax(0, 1fr);
  width: min(460px, 100%);
  min-height: 0;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background-position: center;
  background-size: cover;
  box-shadow: none;
}

.score-workspace::before { display: none; }

.score-workspace.challenge-round {
  width: min(760px, 100%);
  min-height: 0;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background-image: none !important;
  box-shadow: none;
}

.score-workspace.challenge-round::before { display: none; }
.score-workspace.challenge-round .main-panel { padding: 8px; }
.score-workspace.challenge-round .hole-entry { margin: 0; padding: 8px; }

#roundView .stats-grid { display: none; }
#roundView .history-panel { display: none !important; }
#saveRoundBtnAlt { display: none !important; }
#feedSaveBtn { display: none !important; }

.score-hero { grid-column: 1 / -1; display: flex; align-items: end; justify-content: space-between; gap: 20px; min-height: 220px; padding: 28px 30px; border: 1px solid rgba(255, 255, 255, .34); border-radius: 10px; background-position: center; background-size: cover; color: var(--white); box-shadow: 0 16px 36px rgba(7, 29, 22, .18); }
.score-hero span { color: var(--gold-soft); font-size: 11px; font-weight: 900; letter-spacing: 1.4px; }
.score-hero h2 { max-width: 720px; margin: 7px 0 5px; font-size: clamp(24px, 4vw, 44px); line-height: 1.05; }
.score-hero p { margin: 0; color: rgba(255, 255, 255, .88); font-size: 16px; font-weight: 800; letter-spacing: .8px; }
.score-hero small { display: block; margin-top: 8px; color: rgba(255, 255, 255, .72); }
.score-hero > strong { color: var(--white); font-size: clamp(62px, 10vw, 112px); line-height: .8; text-shadow: 0 4px 24px rgba(0, 0, 0, .3); }

.panel,
.main-panel {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.panel {
  padding: 16px;
}

.main-panel {
  padding: 16px;
  min-width: 0;
}

.course-art {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(200, 163, 91, 0.5);
  background: var(--sky);
  margin-bottom: 16px;
  box-shadow: 0 10px 28px rgba(7, 29, 22, 0.12);
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  border: 1px solid #d8d0be;
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
}

input:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 163, 91, 0.18);
  outline: none;
}

.course-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mode-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.mode,
.panel-heading button {
  min-height: 42px;
  border: 1px solid #d8d0be;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--green-900);
  font-weight: 800;
}

.mode.active,
.panel-heading button {
  border-color: rgba(200, 163, 91, 0.7);
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  color: var(--white);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.hole-entry {
  display: grid;
  gap: 18px;
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid rgba(200, 163, 91, .5);
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
}

.hole-entry-top,
.hole-entry-facts,
.hole-entry-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hole-entry-top > div { display: grid; gap: 4px; text-align: center; }
.hole-entry-top span { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.hole-entry-top strong { color: var(--green-900); font-size: 25px; }
.hole-nav { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: var(--white); color: var(--green-900); font-size: 32px; line-height: 1; }
.hole-nav:disabled { opacity: .3; }
.hole-entry-facts { padding: 12px; border-radius: 10px; background: #f3eddd; color: var(--muted); font-size: 11px; font-weight: 900; }
.hole-entry-facts strong { display: block; margin-top: 3px; color: var(--green-900); font-size: 18px; text-align: center; }
.hole-score-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hole-score-controls > div { display: grid; justify-items: center; gap: 8px; padding: 14px 8px; border: 1px solid var(--line); border-radius: 10px; background: #fbf8ef; }
.hole-score-controls label { margin: 0; color: var(--green-900); font-size: 13px; text-transform: uppercase; }
.hole-score-controls .number-control { grid-template-columns: 34px 48px 34px; height: 42px; }
.score-result { min-height: 20px; color: var(--green-900); font-size: 13px; font-weight: 900; letter-spacing: .5px; text-align: center; }
.hole-putt-row { display: flex; align-items: center; justify-content: space-between; min-height: 54px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--green-900); font-size: 15px; font-weight: 900; }
.hole-putt-row .number-control { grid-template-columns: 30px 38px 30px; height: 36px; }
.hole-detail-list { display: grid; gap: 8px; padding-top: 4px; border-top: 1px solid var(--line); }
.hole-detail-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; color: var(--green-900); font-weight: 900; }
.hole-detail-row .number-control { grid-template-columns: 30px 38px 30px; height: 36px; }
.detail-choices { display: flex; gap: 6px; }
.detail-choice, .detail-toggle { min-width: 42px; height: 38px; border: 1px solid #c9cdd5; border-radius: 19px; background: var(--white); color: #7d8490; font-weight: 900; }
.detail-choice.active, .detail-toggle.active { border-color: #5e72f4; background: #5e72f4; color: var(--white); }
.detail-toggle { min-width: 64px; border-radius: 8px; }
.hole-entry-footer { padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-weight: 800; }
.hole-entry-footer strong { color: var(--green-900); font-size: 30px; }
.hole-picker-toggle { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; border: 0; border-radius: 10px; background: #f3eddd; color: var(--green-900); font-weight: 900; }
.hole-picker-toggle span { font-size: 20px; }
.hole-picker { display: none; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 14px; border-radius: 18px 18px 10px 10px; background: var(--white); box-shadow: 0 -8px 24px rgba(7, 29, 22, .12); }
.hole-picker.open { display: grid; animation: slide-up .18s ease-out; }
.hole-picker-button { aspect-ratio: 1; border: 1px solid #ccd0d9; border-radius: 16px; background: var(--white); color: var(--green-900); font-size: 18px; font-weight: 900; }
.hole-picker-button.active { border-color: #5e72f4; background: #5e72f4; color: var(--white); }
@keyframes slide-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.hole-actions { display: grid; gap: 10px; padding-top: 14px; }
.hole-actions button { min-height: 54px; border: 0; border-radius: 12px; font-weight: 900; }
.finish-round-button { background: #5e72f4; color: var(--white); }
.view-scorecard-button { background: #68717e; color: var(--white); }
.group-scorecard-action {
  min-height: 58px;
  border: 2px solid rgba(200, 163, 91, .7) !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, #111613, #405247) !important;
  color: var(--white) !important;
  box-shadow: 0 12px 26px rgba(7, 29, 22, .18);
}
.calculate-action {
  min-height: 56px;
  border: 2px solid rgba(217, 101, 19, .55) !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, #fff4e6, #ffd29d) !important;
  color: #7a3508 !important;
  box-shadow: 0 10px 22px rgba(217, 101, 19, .18);
}
.save-round-button { background: var(--green-900); color: var(--white); }
.scorecard-wrap #scorecardBack { margin: 0 0 12px; }
.scorecard-summary { display: grid; gap: 12px; min-height: 620px; margin: -16px; padding: 26px 18px 18px; border-radius: 8px; background-position: center; background-size: cover; color: var(--white); }
.personal-scorecard-table { display: grid; gap: 2px; overflow: hidden; border: 1px solid rgba(255,255,255,.38); background: rgba(7, 29, 22, .48); }
.personal-scorecard-row { display: grid; grid-template-columns: 1.15fr .85fr .85fr 1.15fr 1fr 1.15fr; align-items: center; min-height: 34px; border-bottom: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.09); text-align: center; font-size: 11px; }
.personal-scorecard-row > * { padding: 7px 3px; }
.personal-scorecard-row:nth-child(odd) { background: rgba(255,255,255,.16); }
.personal-scorecard-labels { min-height: 38px; background: #e8c93d; color: #14271f; font-weight: 900; }
.personal-scorecard-labels > * { padding: 10px 3px; }
.personal-scorecard-row b { display: grid; place-items: center; justify-self: center; width: 26px; height: 26px; border: 2px solid transparent; color: var(--white); font-size: 15px; line-height: 1; }
.personal-scorecard-row b.birdie { border-color: currentColor; border-radius: 50%; }
.personal-scorecard-row b.eagle { border: 3px double currentColor; border-radius: 50%; }
.personal-scorecard-row b.bogey { border-color: currentColor; border-radius: 6px; }
.personal-scorecard-row b.double-bogey { border: 3px double currentColor; border-radius: 6px; }
.personal-scorecard-row .empty { color: rgba(255,255,255,.58); }
.personal-scorecard-total { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 10px; background: #111613; color: var(--white); font-size: 11px; font-weight: 900; }
.personal-scorecard-total strong { font-size: 22px; }
.summary-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; padding: 8px 4px 16px; border-bottom: 1px solid rgba(255,255,255,.7); }
.summary-heading span, .summary-heading p { margin: 0; color: rgba(255,255,255,.82); font-size: 12px; font-weight: 900; letter-spacing: 1px; }
.summary-heading h2 { margin: 6px 0; color: var(--white); font-size: 23px; line-height: 1.1; }
.summary-heading > strong { color: var(--white); font-size: 58px; line-height: .8; }
.summary-nine { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); align-items: end; gap: 4px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.6); }
.summary-nine-label { display: grid; gap: 5px; align-self: stretch; align-content: center; color: var(--white); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.summary-nine-label strong { font-size: 26px; }
.summary-hole { display: grid; justify-items: center; gap: 8px; color: var(--white); font-size: 12px; }
.summary-hole strong { display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid transparent; border-radius: 50%; color: var(--white); font-size: 16px; }
.summary-hole strong.birdie { border-color: var(--white); border-radius: 50%; }
.summary-hole strong.eagle { border: 3px double var(--white); border-radius: 50%; }
.summary-hole strong.bogey { border-radius: 8px; border-color: var(--white); }
.summary-hole strong.double-bogey { border: 3px double var(--white); border-radius: 8px; }
.summary-hole strong.empty { color: rgba(255,255,255,.55); }
.summary-back { min-height: 44px; border: 1px solid rgba(255,255,255,.5); border-radius: 10px; background: rgba(255,255,255,.14); color: var(--white); font-weight: 900; }

.stat {
  min-height: 88px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, var(--paper));
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  margin-top: 5px;
  color: var(--green-900);
  font-size: 32px;
  line-height: 1;
}

.scorecard-wrap {
  display: none !important;
  overflow-x: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, .82);
}

.scorecard {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.96);
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 9px;
  text-align: center;
  white-space: nowrap;
}

.scorecard th:nth-child(1), .scorecard td:nth-child(1) { width: 12%; }
.scorecard th:nth-child(2), .scorecard td:nth-child(2) { width: 11%; }
.scorecard th:nth-child(3), .scorecard td:nth-child(3) { width: 11%; }
.scorecard th:nth-child(4), .scorecard td:nth-child(4) { width: 19%; }
.scorecard th:nth-child(5), .scorecard td:nth-child(5) { width: 29%; }
.scorecard th:nth-child(6), .scorecard td:nth-child(6) { width: 18%; }

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

thead th {
  background: #fbf8ef;
  color: var(--green-900);
}

tbody tr:nth-child(6n + 1),
tbody tr:nth-child(6n + 2),
tbody tr:nth-child(6n + 3) {
  background: #fcfbf6;
}

.section-row th {
  padding: 13px 14px;
  background: linear-gradient(135deg, var(--green-950), var(--green-700));
  color: var(--white);
  text-align: left;
}

.section-row span {
  font-size: 14px;
  font-weight: 900;
}

.section-row em {
  margin-left: 8px;
  color: var(--gold-soft);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.subtotal-row th {
  background: #efe5cc;
  color: var(--green-900);
}

tfoot th {
  border-bottom: 0;
  background: #e8dcc0;
  color: var(--green-900);
}

.number-control {
  display: inline-grid;
  grid-template-columns: 36px 46px 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
}

.scorecard .number-control {
  grid-template-columns: 24px 30px 24px;
  width: 78px;
  height: 32px;
}

.number-control button {
  border: 0;
  background: #f2eee2;
  color: var(--green-900);
  font-weight: 900;
}

.number-control span {
  display: grid;
  place-items: center;
  font-weight: 900;
}

.toggle {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--muted);
  font-weight: 900;
}

.toggle.active {
  border-color: rgba(200, 163, 91, 0.7);
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  color: var(--white);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.round-history {
  display: grid;
  gap: 10px;
}

.round-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: linear-gradient(180deg, #ffffff, var(--paper));
}

.round-card strong {
  display: block;
  margin-bottom: 3px;
}

.round-card span {
  color: var(--muted);
  font-size: 13px;
}

.round-card .round-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.round-card button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--green-900);
  font-weight: 800;
  flex: 1;
}

.round-card button.delete {
  color: var(--danger);
}
.saved-round-heading, .saved-round-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.saved-round-heading > div { display: grid; gap: 4px; }
.saved-round-heading > div > span { color: var(--muted); font-size: 12px; }
.saved-round-heading > b { color: var(--green-900); font-size: 34px; }
.saved-round-scorecard { display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; margin: 14px 0; padding: 10px; border-radius: 8px; background: #f4efdf; }
.saved-hole { display: grid; justify-items: center; gap: 3px; color: var(--muted); font-size: 10px; font-weight: 900; }
.saved-hole strong { color: var(--green-900); font-size: 16px; }
.saved-round-total { padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 900; }
.saved-round-total strong { color: var(--green-900); font-size: 22px; }
.feed-panel .panel-heading { margin-bottom: 10px; }
.feed-panel .panel-heading h2 { font-size: 24px; }
.saved-scorecard-card { display: grid; align-content: start; width: min(860px, 100%); height: auto; aspect-ratio: 2.35 / 1; margin: 0 auto; gap: 6px; min-height: 0; padding: 16px 18px 12px; border: 1px solid rgba(200, 163, 91, .55); border-radius: 10px; background-position: center; background-size: cover; color: var(--white); overflow: hidden; box-shadow: 0 20px 48px rgba(7, 29, 22, .22); }
.saved-scorecard-heading { display: flex; align-items: end; justify-content: space-between; gap: 7px; padding-bottom: 5px; border-bottom: 1px solid rgba(255,255,255,.7); }
.saved-scorecard-heading div { display: grid; gap: 2px; }
.saved-scorecard-heading span, .saved-scorecard-heading small { color: rgba(255,255,255,.86); font-size: 9px; font-weight: 900; }
.saved-scorecard-heading strong { color: var(--white); font-size: 16px; line-height: 1.02; }
.saved-scorecard-heading b { color: var(--white); font-size: 28px; line-height: .8; flex: 0 0 auto; }
.saved-nine-row { display: flex; align-items: end; gap: 1px; margin-left: -14px; padding: 4px 0; width: 100%; border-bottom: 1px solid rgba(255,255,255,.55); }
.saved-nine-row.no-nine-label { margin-left: 0; }
.saved-nine-name { display: grid; gap: 4px; align-content: center; color: var(--white); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.saved-nine-name { width: 14px; flex: 0 0 14px; }
.saved-nine-total { display: grid; flex: 0 0 20px; width: 20px; justify-items: center; gap: 1px; color: var(--white); font-size: 5px; font-weight: 900; text-transform: uppercase; }
.saved-nine-total strong { font-size: 13px; line-height: 1; }
.saved-score-hole { display: grid; flex: 1 1 0; min-width: 0; justify-items: center; gap: 4px; color: var(--white); font-size: 9px; }
.saved-score-hole strong { display: grid; place-items: center; width: clamp(16px, 5vw, 21px); height: clamp(16px, 5vw, 21px); border: 2px solid transparent; border-radius: 50%; color: var(--white); font-size: clamp(9px, 2.8vw, 12px); }
.saved-score-hole strong.birdie { border-color: var(--white); border-radius: 50%; }
.saved-score-hole strong.eagle { border: 3px double var(--white); border-radius: 50%; }
.saved-score-hole strong.bogey { border-radius: 7px; border-color: var(--white); }
.saved-score-hole strong.double-bogey { border: 3px double var(--white); border-radius: 7px; }
.saved-score-hole strong.empty { color: rgba(255,255,255,.55); }
.saved-scorecard-card .round-actions { margin-top: 0; }
.saved-scorecard-card .round-actions button { border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.16); color: var(--white); }
.saved-scorecard-card .round-actions button.delete { color: #ffd0c9; }
.saved-scorecard-card .round-actions button { min-height: 24px; padding: 2px 8px; font-size: 12px; }

.empty-state {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .history-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .room-entry-grid { grid-template-columns: 1fr; }
  .online-tournament-panel { grid-template-columns: 1fr; gap: 12px; }
  .online-tournament-panel > div { gap: 8px; }
  .online-tournament-panel > div + div { grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); padding-top: 12px; padding-left: 0; }
  .offline-player-names { grid-template-columns: repeat(5, minmax(42px, 1fr)); }
  .account-fields, .account-actions { grid-template-columns: 1fr; }
  .profile-hero { min-height: 250px; padding: 20px; }
  .profile-facts, .profile-main-grid { grid-template-columns: 1fr; }
  .profile-description, .profile-layout { padding: 18px; }
  .profile-actions { grid-template-columns: 1fr; }
  .profile-quick-actions { grid-template-columns: 1fr; }
  .home-profile-banner { align-items: center; gap: 10px; min-height: 190px; padding: 14px; margin-bottom: 14px; }
  .home-profile-banner img { width: 104px; padding: 7px; }
  .home-profile-banner h2 { font-size: 22px; }
  .home-profile-banner p { font-size: 13px; line-height: 1.4; }
  .score-hero { min-height: 190px; padding: 22px 20px; }
  .score-hero h2 { font-size: 26px; }
  .score-hero p { font-size: 13px; }
  .score-hero > strong { font-size: 58px; }
  .performance-stats { grid-template-columns: 1fr; }
  .feed-view { width: 100%; }
  .feed-panel, .performance-panel, .account-profile-panel { padding: 16px; }
  .feed-panel { padding: 0; border: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
  .feed-panel .panel-heading { margin-bottom: 8px; }
  .feed-panel .panel-heading h2 { font-size: 20px; }
  .saved-scorecard-card { width: 100%; max-width: none; height: auto; aspect-ratio: 1.85 / 1; gap: 3px; padding: 8px 7px 6px; border-width: 1px; border-radius: 10px; }
  .saved-scorecard-heading { gap: 6px; padding-bottom: 4px; }
  .saved-scorecard-heading span, .saved-scorecard-heading small { font-size: 8px; }
  .saved-scorecard-heading strong { font-size: 13px; }
  .saved-scorecard-heading b { font-size: 22px; }
  .saved-nine-row { gap: 1px; margin-left: -18px; padding: 2px 0; width: 100%; }
  .saved-nine-row.no-nine-label { margin-left: 0; }
  .saved-nine-name { width: 10px; flex-basis: 10px; font-size: 7px; }
  .saved-nine-total { width: 17px; flex-basis: 17px; font-size: 0; }
  .saved-nine-total span { display: none; }
  .saved-nine-total strong { font-size: 12px; }
  .saved-score-hole { gap: 3px; font-size: 8px; }
  .saved-score-hole strong { width: clamp(14px, 4.4vw, 18px); height: clamp(14px, 4.4vw, 18px); border-width: 1px; font-size: clamp(8px, 2.5vw, 10px); }
  .saved-scorecard-card .round-actions button { min-height: 22px; font-size: 11px; }
  .room-panel, .room-lobby { padding: 16px; }
  .offline-tournament-view { padding: 8px 4px; }
  .offline-scorecard-table { font-size: 9px; }
  .offline-scorecard-table th, .offline-scorecard-table td { padding: 2px 1px; }
  .offline-scorecard-table .offline-hole-column { width: var(--offline-hole-col, 6%); font-size: 7px; }
  .offline-scorecard-table .offline-meta-column { width: var(--offline-meta-col, 5%); font-size: 6px; }
  .offline-score-control input { height: 36px; }
  .room-code-line strong { font-size: 20px; }
  .shared-room-bar { font-size: 12px; }

  .app-shell {
    padding: 14px;
    padding-bottom: 104px;
  }

  .topbar {
    align-items: flex-start;
  }

  .top-actions {
    width: 100%;
  }

  .chat-link {
    display: none;
  }

  .chat-link.secondary {
    display: grid;
  }

  .floating-chat {
    display: grid;
  }

  .bottom-nav {
    bottom: 8px;
    width: calc(100% - 16px);
  }

  .workspace,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .golf-home-view,
  .home-view,
  .setup-view,
  .main-panel,
  .panel {
    padding: 12px;
  }

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

  .golf-hero {
    min-height: 270px;
    padding: 20px;
  }

  .home-menu {
    grid-template-columns: 1fr;
  }

  .setup-actions,
  .course-choice {
    grid-template-columns: 1fr;
  }

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

  .course-art {
    max-height: 180px;
  }
}
