:root {
  --bg: #e8f3e2;
  --panel: rgba(248, 253, 244, 0.78);
  --panel-strong: rgba(248, 253, 244, 0.88);
  --panel-2: rgba(255, 255, 255, 0.6);
  --ink: #14301c;
  --muted: #4f6c54;
  --accent: #4ea632;
  --accent-ink: #ffffff;
  --line: rgba(20, 48, 28, 0.14);
  --danger: #c2452f;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  min-height: 100%;
}

body {
  background:
    url("/bg.jpg") center/cover no-repeat fixed,
    var(--bg);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}

.pitch {
  max-width: 1100px;
  margin: 18px auto 0;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: rgba(248, 253, 244, 0.78);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 6px 22px rgba(20, 48, 28, 0.18);
}
.pitch-text {
  margin: 0;
  font-size: 1.02rem;
  color: var(--ink);
}
.pitch-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  border-radius: 999px;
  white-space: nowrap;
}
.pitch-cta:hover { text-decoration: none; filter: brightness(1.05); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 253, 244, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  flex-wrap: wrap;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.1rem;
}
.brand:hover { text-decoration: none; }

#tabs {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
}
#tabs .tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 7px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}
#tabs .tab.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(20, 48, 28, 0.18);
}
#tabs .tab:hover:not(.active) { color: var(--ink); }

.icon {
  width: 18px;
  height: 18px;
  filter: invert(28%) sepia(40%) saturate(620%) hue-rotate(80deg) brightness(85%);
  vertical-align: middle;
}
.icon.big { width: 36px; height: 36px; }
.brand .icon {
  filter: invert(38%) sepia(60%) saturate(820%) hue-rotate(78deg) brightness(95%);
}

.tab-panel.hidden,
.empty.hidden,
.hidden { display: none !important; }

.card {
  background: var(--panel-strong);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: 0 6px 24px rgba(20, 48, 28, 0.18);
}
.card h2 { margin: 0 0 4px; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.right { text-align: right; }
.center { text-align: center; }

.row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.row .grow { flex: 1 1 200px; }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.field label {
  color: var(--muted);
  font-size: 0.88rem;
}
.field input, .field select {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  font: inherit;
  min-width: 0;
}
.field input:focus, .field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  white-space: nowrap;
}
.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn.primary:hover { filter: brightness(1.05); }
.btn.primary .icon { filter: none; }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn.ghost:hover { background: var(--panel-2); }
.btn.danger-ghost {
  background: transparent;
  color: var(--danger);
  border-color: rgba(224, 108, 91, 0.4);
}
.btn.danger-ghost:hover { background: rgba(224, 108, 91, 0.1); }
.btn.danger-ghost .icon { filter: invert(58%) sepia(40%) saturate(2000%) hue-rotate(330deg); }

.icon-btn {
  background: transparent;
  border: 0;
  padding: 6px;
  cursor: pointer;
  color: var(--muted);
  border-radius: 6px;
}
.icon-btn:hover { background: var(--panel-2); color: var(--ink); }

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}
th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
th { color: var(--muted); font-weight: 500; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; }
td input { width: 100%; }

.summary {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

#strategy-holes {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.hole-card {
  background: var(--panel);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 4px 18px rgba(20, 48, 28, 0.16);
}
.hole-card header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.hole-num {
  font-weight: 700;
  margin-right: 8px;
}
.hole-meta {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-size: 0.92rem;
}
.target { color: var(--accent); }

.shots {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.shot {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 8px 12px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.shot-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
}
.shot-club { font-weight: 600; }
.shot-dist { color: var(--muted); font-variant-numeric: tabular-nums; }
.shot-rest { grid-column: 2 / -1; }

.hole-card footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty h3 { color: var(--ink); margin: 14px 0 6px; }

.course-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
}
.course-list li {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.course-list li:last-child { border-bottom: 0; }
.course-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.course-actions { display: flex; gap: 6px; align-items: center; }

button { font: inherit; }
