:root {
  --bg: #f6f2ef;
  --surface: #ffffff;
  --surface-alt: #f1ebe5;
  --text: #111217;
  --muted: #636771;
  --border: rgba(17, 18, 23, 0.1);
  --shadow: 0 20px 50px rgba(17, 18, 23, 0.08);
  --accent: #f56e1d;
  --accent-dark: #d34d0d;
  --accent-soft: rgba(245, 110, 29, 0.12);
  --blue: #2f86dd;
  --yellow: #f2ca19;
  --black: #111217;
  --max: 1240px;
  --radius: 26px;
  --header-h: 82px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  font-family: "Outfit", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.container {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(11, 13, 17, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-wrap {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: #fff;
}

.brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2rem;
}

.brand span {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand strong {
  font-size: 1.12rem;
  letter-spacing: 0.03em;
}

.brand small {
  font-size: 0.92rem;
  opacity: 0.86;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.main-nav a {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--yellow);
}

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  border-radius: 99px;
  background: #fff;
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  overflow: hidden;
  color: #fff;
  isolation: isolate;
}

.hero-slides,
.hero-slide,
.hero-overlay,
.hero-watermark {
  position: absolute;
  inset: 0;
}

.hero-slide {
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 1s ease, transform 5s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-overlay {
  background:
    linear-gradient(100deg, rgba(11, 13, 17, 0.88) 0%, rgba(11, 13, 17, 0.72) 36%, rgba(11, 13, 17, 0.48) 100%),
    radial-gradient(circle at 75% 22%, rgba(47, 134, 221, 0.2), transparent 24%),
    radial-gradient(circle at 18% 30%, rgba(245, 110, 29, 0.14), transparent 24%);
}

.hero-watermark {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0.09;
  z-index: -1;
}

.hero-watermark img {
  width: min(68vw, 900px);
  filter: grayscale(1) contrast(1.2);
}

.hero-grid {
  position: relative;
  z-index: 2;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.2rem;
  align-items: center;
  padding: 4rem 0 5rem;
}

.hero-copy h1,
.section-heading h2 {
  margin: 0;
  line-height: 1.02;
}

.hero-copy h1 {
  font-size: clamp(2.8rem, 6vw, 5.45rem);
  max-width: 11ch;
}

.hero-copy p {
  max-width: 62ch;
  margin: 1.25rem 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.46rem 0.9rem;
  border-radius: 999px;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
  border: 1px solid transparent;
}

.hero .eyebrow {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.14);
}

.eyebrow-light {
  background: rgba(245, 110, 29, 0.08);
  color: var(--accent-dark);
}

.eyebrow-dark {
  background: rgba(17, 18, 23, 0.06);
  color: var(--black);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.95rem 1.35rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 16px 32px rgba(211, 77, 13, 0.24);
}

.btn-secondary {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.btn-small {
  min-height: 42px;
  padding: 0.72rem 1rem;
  font-size: 0.94rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.4rem;
}

.stat-card,
.surface-card,
.info-card,
.hole-card,
.gallery-card,
.score-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.stat-card {
  border-radius: 22px;
  padding: 1rem 1.1rem;
  color: var(--text);
}

.stat-card strong {
  display: block;
  font-size: 1.7rem;
  line-height: 1;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.94rem;
}

.hero-panel {
  border-radius: var(--radius);
  padding: 1.6rem;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: none;
  backdrop-filter: blur(18px);
}

.panel-label,
.form-note,
.meta-text,
.score-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.hero .panel-label,
.hero .panel-note {
  color: rgba(255, 255, 255, 0.76);
}

.hero-panel h2 {
  margin: 0 0 1rem;
  font-size: 1.8rem;
}

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

.quick-links a {
  display: block;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 600;
  transition: background 0.2s ease;
}

.quick-links a:hover,
.quick-links a:focus-visible {
  background: rgba(255, 255, 255, 0.14);
}

.section {
  padding: 5.25rem 0;
}

.section-alt {
  background: var(--surface-alt);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.section-heading > p {
  max-width: 48ch;
  color: var(--muted);
}

.two-col {
  align-items: stretch;
  gap: 2rem;
}

.two-col > :first-child {
  flex: 1 1 0;
}

.two-col > form {
  flex: 0 0 min(100%, 480px);
}

#top10 .section-heading.two-col {
  display: block;
}

#top10 .section-heading.two-col > :first-child {
  width: 100%;
  max-width: none;
  margin-bottom: 1.5rem;
}

#top10 .section-heading.two-col > form.score-form {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0 auto;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  padding: 0.18rem 0.42rem;
  border-radius: 9px;
  background: rgba(17, 18, 23, 0.06);
  color: var(--accent-dark);
}

.flash-holder {
  padding-top: 1.25rem;
}

.flash {
  padding: 1rem 1.15rem;
  border-radius: 18px;
  margin-top: 1rem;
  font-weight: 600;
}

.flash-success {
  background: rgba(41, 148, 79, 0.1);
  color: #1f703d;
  border: 1px solid rgba(41, 148, 79, 0.18);
}

.flash-error {
  background: rgba(195, 55, 55, 0.1);
  color: #8b2323;
  border: 1px solid rgba(195, 55, 55, 0.18);
}

.card-grid {
  display: grid;
  gap: 1.3rem;
}

.news-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-card {
  border-radius: 26px;
  padding: 1.45rem;
}

.info-card h3,
.hole-card h3,
.gallery-card h3,
.score-card h3 {
  margin: 0;
}

.card-date {
  display: inline-flex;
  margin-bottom: 0.75rem;
  padding: 0.34rem 0.72rem;
  border-radius: 999px;
  background: rgba(17, 18, 23, 0.06);
  color: var(--muted);
  font-size: 0.92rem;
}

.anchor-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 24px;
  padding: 1rem 1.15rem;
  margin-bottom: 1.3rem;
}

.anchor-nav-label {
  font-weight: 700;
}

.anchor-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.anchor-links a,
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  background: rgba(245, 110, 29, 0.08);
  color: var(--accent-dark);
}

.chip-dark {
  background: rgba(17, 18, 23, 0.06);
  color: var(--text);
}

.course-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hole-card {
  position: relative;
  border-radius: 28px;
  padding: 1.4rem;
}

.hole-card:target {
  outline: 3px solid rgba(47, 134, 221, 0.28);
  outline-offset: 5px;
}

.hole-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.hole-number {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(245, 110, 29, 0.16), rgba(242, 202, 25, 0.18));
  color: var(--accent-dark);
  font-size: 1.2rem;
  font-weight: 800;
  flex-shrink: 0;
}

.hole-card h3 {
  margin-top: 0;
  margin-bottom: 0.45rem;
}

.hole-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0 1.1rem;
}

.hole-meta span {
  padding: 0.44rem 0.7rem;
  border-radius: 999px;
  background: rgba(17, 18, 23, 0.06);
  color: var(--muted);
  font-size: 0.92rem;
}

.hole-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hole-links a {
  font-weight: 700;
}

.surface-card,
.upload-form,
.score-form,
.table-wrap {
  border-radius: 30px;
}

.upload-form,
.score-form,
.table-wrap {
  padding: 1.45rem;
}

.upload-form h3,
.score-form h3,
.table-head h3 {
  margin-top: 0;
  margin-bottom: 0.3rem;
}

.upload-form label,
.score-form > label {
  display: block;
  font-weight: 600;
  margin-top: 1rem;
}

.upload-form input[type="text"],
.upload-form input[type="file"],
.score-form input[type="text"] {
  width: 100%;
  margin-top: 0.45rem;
  padding: 0.96rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(17, 18, 23, 0.12);
  background: #fff;
}

#galleryWrap {
  margin-top: 2rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.gallery-card {
  border-radius: 24px;
  overflow: hidden;
}

.gallery-thumb {
  width: 100%;
  aspect-ratio: 1.25 / 1;
  object-fit: cover;
  background: #ddd;
}

.gallery-content {
  padding: 1rem 1.1rem 1.1rem;
}

.gallery-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.gallery-trigger {
  border: none;
  background: transparent;
  color: var(--accent-dark);
  font-weight: 800;
  cursor: pointer;
  padding: 0;
}

.empty-state {
  padding: 2rem;
  border-radius: 26px;
  background: #fff;
  border: 1px dashed rgba(17, 18, 23, 0.16);
  text-align: center;
}

.form-top {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: start;
}

.score-summary {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: end;
}

.score-total-box {
  min-width: 112px;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(17, 18, 23, 0.05);
  text-align: center;
}

.score-total-highlight {
  background: linear-gradient(135deg, rgba(245, 110, 29, 0.14), rgba(242, 202, 25, 0.18));
}

.score-total-box span {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
}

.score-total-box strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 1.6rem;
}

.score-table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0 1.5rem;
  padding-bottom: 0.25rem;
}

.score-entry-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0.4rem;
  table-layout: fixed;
}

.result-score-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0.4rem;
  min-width: 1020px;
}

.score-entry-table td,
.result-score-table th,
.result-score-table td {
  text-align: center;
  vertical-align: top;
  border-radius: 18px;
  background: rgba(17, 18, 23, 0.05);
  padding: 0.75rem 0.45rem;
}

.result-score-table th {
  min-width: 96px;
  background: rgba(17, 18, 23, 0.08);
}

.score-entry-table .hole-number-cell,
.result-score-table .hole-number-cell {
  font-weight: 800;
  background: linear-gradient(135deg, rgba(245, 110, 29, 0.14), rgba(242, 202, 25, 0.18));
}

.score-entry-table .score-input-cell {
  min-width: 0;
}

.score-entry-table .score-input-cell.score-under-1,
.result-score-table td.score-under-1 {
  background: rgba(114, 200, 117, 0.28);
}

.score-entry-table .score-input-cell.score-over-1,
.result-score-table td.score-over-1 {
  background: rgba(233, 111, 137, 0.18);
}

.score-entry-table .score-input-cell.score-over-2,
.result-score-table td.score-over-2 {
  background: rgba(220, 64, 49, 0.72);
  color: #fff;
}

.score-entry-table .score-input-cell.score-under-2,
.result-score-table td.score-under-2 {
  background: rgba(24, 122, 66, 0.86);
  color: #fff;
}

.score-entry-table .score-input-cell.score-over-2 .cell-meta,
.score-entry-table .score-input-cell.score-under-2 .cell-meta,
.result-score-table td.score-over-2,
.result-score-table td.score-under-2 {
  color: rgba(255, 255, 255, 0.95);
}

.score-entry-table .score-input-cell.score-under-2 .hole-input,
.score-entry-table .score-input-cell.score-over-2 .hole-input {
  border-color: rgba(255, 255, 255, 0.18);
}

.score-entry-table .score-input-cell.score-under-2 .stepper input,
.score-entry-table .score-input-cell.score-over-2 .stepper input {
  background: rgba(255, 255, 255, 0.96);
  color: #111217;
}


.cell-meta {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.stepper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
}

.stepper button {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 12px;
  background: #111217;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.stepper input {
  width: 52px;
  text-align: center;
  padding: 0.6rem 0.4rem;
  border-radius: 12px;
  border: 1px solid rgba(17, 18, 23, 0.14);
  background: #fff;
  font-weight: 700;
  appearance: textfield;
  -moz-appearance: textfield;
  margin: 0 auto;
  display: block;
}

.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.score-input-cell {
  text-align: center;
}

.table-wrap {
  margin-top: 2rem;
}

.table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.score-list {
  display: grid;
  gap: 1rem;
}

.score-card {
  border-radius: 24px;
  padding: 1.25rem;
}

.score-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.score-rank {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(245, 110, 29, 0.14), rgba(242, 202, 25, 0.16));
  color: var(--accent-dark);
}

.score-headline {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.score-card p {
  margin: 0;
}

.result-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.35rem;
}

.result-summary span {
  display: inline-flex;
  padding: 0.42rem 0.68rem;
  border-radius: 999px;
  background: rgba(17, 18, 23, 0.06);
  color: var(--muted);
  font-size: 0.9rem;
}

.score-mainline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  line-height: 1.45;
}

.score-mainline .score-name {
  font-weight: 800;
  color: var(--text);
}

.score-mainline .score-separator {
  color: var(--muted);
}

.score-mainline .score-date,
.score-mainline .score-throws {
  color: var(--muted);
}

.result-score-table .hole-number-cell {
  min-width: 54px;
}

.result-score-table td {
  font-weight: 700;
}

@media (max-width: 680px) {
  .score-card-header {
    align-items: flex-start;
  }

  .score-value {
    font-size: 1.3rem;
  }

  .score-mainline {
    font-size: 0.98rem;
  }
}


.score-value {
  font-size: 1.55rem;
  font-weight: 800;
}

.relative-under {
  color: #1f8b55;
}

.relative-over {
  color: #bf3d23;
}

.relative-even {
  color: var(--blue);
}

.site-footer {
  color: rgba(255, 255, 255, 0.86);
  background: #101217;
  padding: 2.6rem 0 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1.2rem;
}

.site-footer p {
  color: rgba(255, 255, 255, 0.72);
}

.lightbox {
  width: min(92vw, 1000px);
  border: none;
  border-radius: 28px;
  padding: 1rem;
  background: #0d0f14;
  color: #fff;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.7);
}

.lightbox img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 18px;
}

.lightbox p {
  margin: 0.9rem 0 0;
  font-weight: 600;
}

.lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.8rem;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
}

@media (max-width: 1100px) {
  .hero-grid,
  .section-heading.two-col,
  .footer-grid,
  .news-grid,
  .course-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .hero-grid {
    min-height: auto;
    padding: 3.25rem 0 4rem;
  }

  .hero-panel {
    max-width: 620px;
  }

  .quick-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-block;
  }

  .main-nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 1rem;
    left: 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    border-radius: 22px;
    background: rgba(11, 13, 17, 0.98);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.26);
  }

  .main-nav.is-open {
    display: flex;
  }

  .hero-copy h1 {
    max-width: 100%;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-top,
  .anchor-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .score-summary {
    justify-content: start;
  }

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

  .site-footer {
    padding-bottom: 2.4rem;
  }
}

@media (max-width: 580px) {
  .container {
    width: min(calc(100% - 1.2rem), var(--max));
  }

  .section {
    padding: 4rem 0;
  }

  .hero-grid {
    padding: 2.8rem 0 3.5rem;
  }

  .hero-stats,
  .quick-links,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .anchor-links {
    gap: 0.45rem;
  }

  .anchor-links a,
  .chip {
    font-size: 0.88rem;
  }

  .score-total-box {
    min-width: 96px;
  }

  .score-card-header {
    flex-direction: column;
    align-items: start;
  }
}

/* Top10 list uses full container width with neat margins */
#top10 > .container > .table-wrap {
  width: 100%;
  max-width: none;
  margin: 2rem 0 0;
}

#top10 > .container > .table-wrap .table-head,
#top10 > .container > .table-wrap .score-list {
  width: 100%;
  max-width: none;
}

