:root {
  color-scheme: light;
  --bg: #f4f7f4;
  --ink: #101414;
  --muted: #64706b;
  --line: rgba(25, 38, 32, 0.12);
  --panel: rgba(255, 255, 255, 0.72);
  --panel-strong: rgba(255, 255, 255, 0.92);
  --accent: #0b7a5a;
  --accent-2: #1f9f88;
  --accent-3: #3fbf9b;
  --warn: #c6612f;
  --bad: #b73535;
  --good: #0b8f63;
  --shadow: 0 24px 70px rgba(17, 31, 25, 0.13);
  --shadow-sm: 0 8px 24px rgba(17, 31, 25, 0.08);
  --shadow-hover: 0 26px 60px rgba(11, 122, 90, 0.18);
  --radius: 14px;
  --radius-lg: 22px;
  --grad-accent: linear-gradient(135deg, #0b7a5a 0%, #1f9f88 55%, #3fbf9b 100%);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at 18% 10%, rgba(31, 159, 136, 0.22), transparent 28rem),
    linear-gradient(135deg, #eef6ee 0%, #f8fbf8 42%, #eef3f1 100%);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, system-ui, sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    linear-gradient(120deg, rgba(244, 247, 244, 0.78), rgba(248, 251, 248, 0.92)),
    url("https://images.unsplash.com/photo-1535131749006-b7f58c99034b?auto=format&fit=crop&w=1280&q=70") center / cover;
}

.auth-screen.is-hidden {
  display: none;
}

.auth-card {
  width: min(460px, 100%);
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.auth-card h1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 3.6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.auth-copy,
.auth-message {
  color: var(--muted);
}

.auth-message {
  min-height: 20px;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 750;
}

.auth-message.is-error {
  color: var(--bad);
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 48px;
}

.app-shell.is-locked {
  display: none;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 28px rgba(17, 31, 25, 0.1);
  backdrop-filter: blur(10px);
}

.top-bar strong,
.course-card strong,
.upload-drop strong {
  display: block;
}

.profile-link {
  display: block;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.profile-link strong {
  text-decoration: underline;
  text-decoration-color: rgba(11, 122, 90, 0.35);
  text-underline-offset: 4px;
}

.top-bar span,
.course-card span,
.upload-drop small {
  color: var(--muted);
}

.hero {
  position: relative;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.54)),
    url("https://images.unsplash.com/photo-1535131749006-b7f58c99034b?auto=format&fit=crop&w=1280&q=70") center 58% / cover;
  background-blend-mode: screen;
  box-shadow: var(--shadow);
}

.user-pill {
  position: absolute;
  top: 22px;
  right: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 44px);
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 28px rgba(17, 31, 25, 0.12);
  backdrop-filter: blur(10px);
}

.user-pill span {
  overflow: hidden;
  max-width: 150px;
  padding-left: 8px;
  font-size: 0.86rem;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-pill button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  background: var(--ink);
  color: white;
  font-weight: 820;
}

.hero h1 {
  max-width: 650px;
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 5.7rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.subtitle {
  max-width: 560px;
  margin: 18px 0 0;
  color: #24302b;
  font-size: 1.08rem;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: 100%;
  max-width: 620px;
  margin: 14px auto 28px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 44px rgba(17, 31, 25, 0.12);
}

.tab {
  min-height: 44px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  font-weight: 760;
  white-space: nowrap;
}

.tab.is-active {
  color: var(--ink);
  background: var(--panel-strong);
  box-shadow: 0 10px 24px rgba(17, 31, 25, 0.13);
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.summary-grid .empty-state {
  grid-column: 1 / -1;
}

.metric-card,
.panel {
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.metric-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 138px;
  padding: 18px 18px 16px;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.66));
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--grad-accent);
  opacity: 0.9;
}

.metric-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.metric-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.metric-value {
  display: block;
  margin-top: auto;
  padding-top: 14px;
  font-size: 2.5rem;
  font-weight: 820;
  line-height: 1;
  letter-spacing: -0.02em;
}

.metric-detail {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 620;
}

.metric-trend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 900;
  color: var(--muted);
  background: rgba(25, 38, 32, 0.08);
}

.metric-up::before { background: linear-gradient(135deg, var(--good), var(--accent-3)); }
.metric-up .metric-trend { color: #fff; background: linear-gradient(135deg, var(--good), var(--accent-2)); }
.metric-down::before { background: linear-gradient(135deg, var(--bad), #d98a5c); }
.metric-down .metric-trend { color: #fff; background: linear-gradient(135deg, var(--bad), #d0623a); }
.metric-flat::before { background: linear-gradient(135deg, rgba(100, 112, 107, 0.6), rgba(100, 112, 107, 0.3)); }

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr);
  gap: 16px;
  margin-bottom: 16px;
}

.analysis-layout {
  grid-template-columns: 1fr;
}

.analysis-content {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1.35fr);
  gap: 14px;
  align-items: start;
}

.analysis-panel {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.86), rgba(236, 246, 241, 0.62));
}

.analysis-panel .section-head {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.analysis-clusters {
  display: grid;
  gap: 12px;
}

.cluster {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 12px;
  align-items: stretch;
}

.cluster-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 12px;
}

.analysis-panel .metric-card {
  min-height: 132px;
}

.cluster .insight {
  min-height: 0;
}

.panel {
  padding: 20px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

h2 {
  margin: 0;
  font-size: 1.32rem;
  letter-spacing: 0;
}

.badge,
.mini-total {
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 11px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 760;
}

canvas {
  display: block;
  width: 100%;
  height: 200px;
  min-height: 0;
}

.chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.mini-chart {
  min-width: 0;
}

.mini-chart canvas {
  height: 210px;
  min-height: 0;
  max-width: 860px;
}

.chart-empty {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.chart-empty strong {
  color: var(--ink);
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 780;
}

.legend-chip::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
}

.legend-putt::before,
.legend-score-brutto::before {
  background: var(--accent);
}

.legend-score-netto::before,
.legend-quality-fairways::before {
  background: #3157a4;
}

.legend-balls-lost::before,
.legend-par::before {
  background: var(--warn);
}

.legend-balls-found::before,
.legend-quality-gir::before {
  background: var(--accent-2);
}

.legend-par-line::before {
  background: var(--accent);
}

.legend-par-median::before,
.legend-putt-ideal::before {
  background: #3157a4;
}

.chart-readout {
  margin-top: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(11, 122, 90, 0.06), rgba(255, 255, 255, 0.7));
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.is-hidden-chart {
  display: none;
}

.chart-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.toggle-pill {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-weight: 800;
}

.toggle-pill {
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, color 150ms ease;
}

.toggle-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(11, 122, 90, 0.4);
}

.toggle-pill.is-active {
  border-color: transparent;
  background: var(--grad-accent);
  color: #fff;
  box-shadow: 0 10px 22px rgba(11, 122, 90, 0.26);
}

.insight-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.insight {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 122px;
  overflow: hidden;
  padding: 16px 16px 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.55));
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.insight:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.insight::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.insight-up::before { background: linear-gradient(180deg, var(--good), var(--accent-3)); }
.insight-down::before { background: linear-gradient(180deg, var(--bad), #d98a5c); }
.insight-flat::before { background: linear-gradient(180deg, rgba(100, 112, 107, 0.65), rgba(100, 112, 107, 0.3)); }

.insight-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.insight-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(11, 122, 90, 0.1);
  font-size: 0.95rem;
}

.insight strong {
  font-size: 0.98rem;
}

.insight-body {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.hole-heatmap {
  display: grid;
  grid-template-columns: repeat(18, minmax(42px, 1fr));
  gap: 8px;
}

.hole-heatmap .empty-state {
  grid-column: 1 / -1;
}

.hole-cell {
  min-height: 86px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: var(--shadow-sm);
  transition: transform 150ms ease;
}

.hole-cell:hover {
  transform: translateY(-2px) scale(1.03);
}

.hole-cell small {
  color: var(--muted);
  font-weight: 760;
}

.hole-cell strong {
  font-size: 1.18rem;
}

.round-form {
  display: grid;
  gap: 16px;
}

.profile-form {
  display: grid;
  gap: 14px;
}

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

label {
  display: grid;
  gap: 8px;
  color: #33413a;
  font-size: 0.9rem;
  font-weight: 760;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  outline: 0;
  transition: border 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

input {
  min-height: 46px;
  padding: 0 13px;
}

select {
  min-height: 46px;
  padding: 0 38px 0 13px;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 19px) 50% / 7px 7px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 14px) 50% / 7px 7px no-repeat,
    rgba(255, 255, 255, 0.74);
}

textarea {
  resize: vertical;
  padding: 13px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(11, 122, 90, 0.62);
  box-shadow: 0 0 0 4px rgba(31, 159, 136, 0.14);
}

input[readonly] {
  color: var(--accent);
  font-weight: 820;
  background: rgba(31, 159, 136, 0.08);
}

.field-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.field-info {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(11, 122, 90, 0.14);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 900;
  font-style: normal;
  cursor: help;
}

.field-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  width: 250px;
  max-width: 70vw;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.42;
  letter-spacing: 0;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 150ms ease, transform 150ms ease;
  z-index: 6;
  pointer-events: none;
}

.field-info:hover .field-tip,
.field-info:focus .field-tip,
.field-info:focus-within .field-tip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.putt-grid,
.score-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(54px, 1fr));
  gap: 10px;
}

.putt-box {
  position: relative;
}

.putt-box span {
  position: absolute;
  top: 8px;
  left: 10px;
  right: 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-grid .putt-box span {
  font-size: 0.66rem;
}

.putt-box input {
  height: 64px;
  padding: 18px 8px 4px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 820;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0 16px;
  font-weight: 800;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: 0 14px 28px rgba(11, 122, 90, 0.24);
}

.secondary-button,
.ghost-button {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.64);
  color: #25322c;
}

.danger-button {
  border-color: rgba(183, 53, 53, 0.18);
  background: rgba(183, 53, 53, 0.08);
  color: var(--bad);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
}

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

.round-list .empty-state {
  width: 100%;
}

.round-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(7, minmax(78px, auto));
  gap: 12px;
  align-items: center;
  padding: 42px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.round-item strong {
  display: block;
}

.round-item span,
.round-item small {
  color: var(--muted);
}

.icon-button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(183, 53, 53, 0.18);
  border-radius: 999px;
  background: rgba(183, 53, 53, 0.08);
  color: var(--bad);
  font-size: 1.1rem;
}

.upload-drop {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px dashed rgba(11, 122, 90, 0.36);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
  cursor: pointer;
}

.upload-drop input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.upload-drop strong {
  color: var(--ink);
}

.analysis-grid span,
.analysis-note {
  color: var(--muted);
}

.upload-result {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.scorecard-preview {
  width: min(100%, 520px);
  max-height: 360px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.analysis-grid div,
.empty-state {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
}

.analysis-grid strong,
.analysis-grid span {
  display: block;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.comparison-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
}

.comparison-card strong,
.comparison-card span {
  display: block;
}

.comparison-card span {
  color: var(--muted);
  margin-top: 6px;
}

.comparison-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.8rem;
}

.detail-subhead {
  margin-top: 20px;
}

.detail-holes {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 8px;
}

.detail-hole {
  display: grid;
  gap: 3px;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.66);
  text-align: center;
}

.detail-hole small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.detail-par {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.detail-hole strong {
  font-size: 1.2rem;
  line-height: 1;
}

.detail-putts {
  color: var(--muted);
  font-size: 0.66rem;
}

.detail-under {
  background: rgba(11, 122, 90, 0.16);
  border-color: rgba(11, 122, 90, 0.32);
}

.detail-over {
  background: rgba(198, 97, 47, 0.14);
  border-color: rgba(198, 97, 47, 0.3);
}

.detail-bad {
  background: rgba(183, 53, 53, 0.14);
  border-color: rgba(183, 53, 53, 0.32);
}

.detail-notes {
  margin-top: 16px;
}

.detail-notes:empty {
  display: none;
}

.detail-notes strong {
  display: block;
  margin-bottom: 6px;
}

.detail-notes p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.round-item.is-clickable {
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.round-item.is-clickable:hover,
.round-item.is-clickable:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(11, 122, 90, 0.35);
  box-shadow: var(--shadow-hover);
  outline: none;
}

.hole-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hole-compare-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.hole-compare-head {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.hole-compare-head strong {
  font-size: 0.92rem;
}

.hole-compare-head span {
  justify-self: start;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 840;
}

.hole-compare-head em {
  justify-self: end;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 780;
  font-style: normal;
  text-align: right;
}

.compare-block-label {
  margin-top: 12px;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.compare-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.compare-row strong {
  color: var(--ink);
  font-size: 0.86rem;
  text-align: right;
}

.compare-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(25, 38, 32, 0.08);
}

.compact-track {
  height: 8px;
}

.compare-fill {
  height: 100%;
  border-radius: inherit;
}

.compare-best {
  background: linear-gradient(135deg, rgba(11, 122, 90, 0.92), rgba(31, 159, 136, 0.92));
}

.compare-last {
  background: linear-gradient(135deg, rgba(49, 87, 164, 0.9), rgba(198, 97, 47, 0.82));
}

.compare-current {
  background: linear-gradient(135deg, rgba(16, 20, 20, 0.92), rgba(49, 87, 164, 0.82));
}

.upload-drop {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px dashed rgba(11, 122, 90, 0.36);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
  cursor: pointer;
}

.upload-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-drop strong {
  color: var(--ink);
}

.course-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.course-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
}

.course-card strong {
  margin-bottom: 6px;
}

@media (max-width: 900px) {
  .hero {
    align-items: flex-start;
  }

  .summary-grid,
  .dashboard-layout,
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .top-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .tabs {
    max-width: none;
  }

  .dashboard-layout {
    display: grid;
  }

  .insight-list {
    grid-template-columns: 1fr 1fr;
  }

  .analysis-content {
    grid-template-columns: 1fr;
  }

  .mini-chart canvas,
  canvas {
    height: 188px;
  }

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

  .putt-grid,
  .score-grid,
  .hole-heatmap,
  .detail-holes {
    grid-template-columns: repeat(6, minmax(48px, 1fr));
  }

  .round-item {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .hole-compare-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .hero {
    min-height: 230px;
    padding: 24px;
    border-radius: 22px;
  }

  .subtitle {
    font-size: 0.98rem;
  }

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

  .summary-grid,
  .dashboard-layout,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .insight-list {
    grid-template-columns: 1fr;
  }

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

  .mini-chart canvas,
  canvas {
    height: 165px;
  }

  .metric-value {
    font-size: 2rem;
  }

  .panel {
    padding: 16px;
  }

  .putt-grid,
  .score-grid,
  .hole-heatmap,
  .detail-holes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .section-head,
  .actions,
  .upload-zone {
    flex-direction: column;
    align-items: stretch;
  }

  .upload-zone {
    display: grid;
    grid-template-columns: 1fr;
  }

  .round-item {
    grid-template-columns: 1fr;
  }

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

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

  .hole-compare-grid {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 22px;
  }
}

@media (min-width: 901px) and (max-width: 1180px) {
  .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .round-item {
    grid-template-columns: 1fr 1fr 1fr;
  }

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

  .analysis-content {
    grid-template-columns: 1fr;
  }
}
