:root {
  --bg-glass: rgba(15, 38, 34, 0.86);
  --bg-glass-strong: rgba(12, 31, 28, 0.94);
  --border-glass: rgba(218, 245, 232, 0.20);
  --accent: #6ee787;
  --accent-warm: #f5c249;
  --accent-hot: #e85d4a;
  --accent-sky: #6cc5f0;
  --text-main: #f6faf7;
  --text-dim: #a9c7bc;
  --font-ui: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* {
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #1b2d24;
  color: var(--text-main);
  font-family: var(--font-ui);
}

#viewport {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

#viewport:active {
  cursor: grabbing;
}

/* COMPACT TOP HUD BAR (wraps cleanly on narrow mobile screens so no button ever clips!) */
.hud-top {
  position: fixed;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px 8px;
  pointer-events: none;
  z-index: 20;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.panel {
  pointer-events: auto;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.30);
}

.top-info-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 11px;
  min-height: 40px;
}

.stroke-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  background: linear-gradient(135deg, #2b7a54, #1c533c);
  border: 1px solid rgba(110, 231, 135, 0.45);
  border-radius: 8px;
  padding: 3px 8px;
  font-family: var(--font-mono);
}

.stroke-chip .sc-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
}

.stroke-chip .sc-num {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.top-dist {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.dist-value {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.dist-sub {
  font-size: 10px;
  color: var(--text-dim);
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.09);
  white-space: nowrap;
}

.pill.lie-fairway,
.pill.lie-tee,
.pill.lie-green,
.pill.lie-fringe {
  color: var(--accent);
  background: rgba(110, 231, 135, 0.14);
}

.pill.lie-rough,
.pill.lie-heavy_rough {
  color: var(--accent-warm);
  background: rgba(245, 194, 73, 0.15);
}

.pill.lie-bunker {
  color: #f3d78e;
  background: rgba(230, 213, 167, 0.18);
}

.wind-mini {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 8px;
  border-left: 1px solid var(--border-glass);
}

.wind-compass {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid rgba(108, 197, 240, 0.45);
  background: rgba(108, 197, 240, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wind-arrow {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 12px solid var(--accent-sky);
  transform-origin: 50% 62%;
}

.wind-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.wind-text .wind-mph {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-sky);
  white-space: nowrap;
}

.wind-text .wind-lbl {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.hole-desktop-meta {
  display: flex;
  flex-direction: column;
  padding-left: 10px;
  border-left: 1px solid var(--border-glass);
  line-height: 1.15;
}

.hole-title {
  font-size: 11px;
  font-weight: 700;
}

.hole-yards {
  font-size: 10px;
  color: var(--text-dim);
}

/* TOP RIGHT ACTION CLUSTER */
.top-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  align-items: center;
  max-width: 100%;
}

.icon-btn {
  pointer-events: auto;
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  border-radius: 9px;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s, border-color 0.15s;
}

.icon-btn:hover {
  background: rgba(34, 54, 44, 0.92);
  border-color: rgba(110, 231, 135, 0.45);
}

.icon-btn.active {
  background: rgba(54, 118, 76, 0.85);
  border-color: var(--accent);
}

/* SANDBOX DRAWER */
.sandbox-drawer {
  position: fixed;
  top: 58px;
  right: 10px;
  width: min(276px, calc(100vw - 20px));
  padding: 12px;
  z-index: 25;
  display: none;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}

.sandbox-drawer.open {
  display: flex;
}

.drawer-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 2px;
}

.field-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-row label {
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
}

.seed-row {
  display: flex;
  gap: 6px;
}

.seed-row input {
  flex: 1;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: var(--text-main);
  padding: 6px 8px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.mini-btn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.mini-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.mini-btn:hover {
  background: rgba(110, 231, 135, 0.2);
  border-color: var(--accent);
}

.mini-btn.selected {
  background: rgba(110, 231, 135, 0.28);
  border-color: var(--accent);
  color: #fff;
}

/* BOTTOM SHOT CONTROL BAR */
.hud-bottom {
  position: fixed;
  bottom: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
  z-index: 20;
}

.shot-console {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
  padding: 12px 14px;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

.console-section {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  padding-right: 12px;
  border-right: 1px solid var(--border-glass);
}

.console-section:last-child {
  border-right: none;
  padding-right: 0;
}

.sec-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.club-carousel-popover {
  width: min(540px, calc(100vw - 18px));
}

.club-carousel-wrap {
  display: grid;
  grid-template-columns: 28px 1fr 28px;
  align-items: center;
  gap: 6px;
}

.carousel-nav {
  height: 72px;
  border-radius: 10px;
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.14s, border-color 0.14s, transform 0.1s;
}

.carousel-nav:hover {
  background: rgba(110, 231, 135, 0.18);
  border-color: var(--accent);
}

.carousel-nav:active {
  transform: scale(0.95);
}

.club-strip {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 6px 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.club-strip::-webkit-scrollbar {
  display: none;
}

.club-btn {
  flex: 0 0 92px;
  scroll-snap-align: center;
  background: rgba(8, 22, 18, 0.78);
  border: 1.5px solid rgba(218, 245, 232, 0.16);
  border-radius: 12px;
  color: var(--text-main);
  padding: 6px 6px 7px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  opacity: 0.80;
  transform: scale(0.95);
  transition: transform 0.16s ease, opacity 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.club-btn .club-art {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background: rgba(18, 44, 34, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
}

.club-btn .c-code {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.1;
}

.club-btn .c-name {
  font-size: 9px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 82px;
  line-height: 1.1;
}

.club-btn .c-yd {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
}

.club-btn:hover {
  opacity: 0.96;
  background: rgba(24, 52, 42, 0.85);
}

.club-btn.selected {
  opacity: 1;
  transform: scale(1.04);
  background: rgba(24, 68, 48, 0.92);
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(110, 231, 135, 0.28);
}

.club-btn.selected .club-art {
  border-color: rgba(110, 231, 135, 0.45);
  background: rgba(26, 66, 46, 0.88);
}

.shot-type-strip {
  display: flex;
  gap: 5px;
}

.type-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: var(--text-main);
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.type-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.type-btn.selected {
  background: rgba(245, 194, 73, 0.22);
  border-color: var(--accent-warm);
  color: #fff6db;
}

.type-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.sliders-col {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 215px;
  flex: 1;
}

.slider-line {
  display: grid;
  grid-template-columns: 58px 1fr 56px;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.slider-line .s-name {
  color: var(--text-dim);
  font-weight: 600;
}

.slider-line .s-val {
  font-family: var(--font-mono);
  font-size: 11px;
  text-align: right;
  font-weight: 700;
}

input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  outline: none;
  cursor: pointer;
}

input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #0d1a13;
  box-shadow: 0 0 8px rgba(110, 231, 135, 0.5);
}

/* COMPLEXITY & EXECUTE BOX */
.exec-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-width: 205px;
}

.complexity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.complexity-badge {
  font-family: var(--font-mono);
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
}

.lever-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.lever-chip {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(110, 231, 135, 0.15);
  border: 1px solid rgba(110, 231, 135, 0.35);
  color: var(--accent);
}

.lever-chip.extra {
  background: rgba(245, 194, 73, 0.16);
  border-color: rgba(245, 194, 73, 0.45);
  color: var(--accent-warm);
}

.swing-btn {
  background: linear-gradient(135deg, #43b862, #2b8a47);
  border: 1px solid #82f39d;
  color: #07190d;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 11px 18px;
  border-radius: 11px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(67, 184, 98, 0.38);
  transition: transform 0.1s, filter 0.15s;
}

.swing-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.swing-btn:active {
  transform: translateY(1px);
}

.swing-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* EXECUTION MINI-GAME OVERLAY (Entire screen is the tap target, Cancel tucked safely at top-right!) */
.minigame-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 18px;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  touch-action: none;
  z-index: 42;
}

.minigame-overlay.active {
  display: flex;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.001);
}

.minigame-overlay *,
.minigame-card,
#minigame-canvas {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.minigame-card {
  pointer-events: auto;
  width: min(460px, calc(100vw - 28px));
  background: var(--bg-glass-strong);
  border: 1.5px solid rgba(110, 231, 135, 0.45);
  border-radius: 18px;
  padding: 14px 18px 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.mg-steps {
  display: flex;
  gap: 8px;
  width: 100%;
  justify-content: center;
}

.mg-step-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
}

.mg-step-pill.current {
  background: rgba(110, 231, 135, 0.22);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.mg-step-pill.done-pure {
  background: rgba(110, 231, 135, 0.3);
  color: #fff;
}

.mg-step-pill.done-ok {
  background: rgba(245, 194, 73, 0.28);
  color: #fff2cc;
}

.mg-step-pill.done-miss {
  background: rgba(242, 109, 91, 0.3);
  color: #ffd7d1;
}

.mg-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.mg-hint {
  font-size: 12px;
  color: var(--text-dim);
}

#minigame-canvas {
  width: 100%;
  height: 120px;
  border-radius: 12px;
  background: rgba(8, 15, 12, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: height 0.16s ease;
}

#minigame-canvas.mg-tall {
  height: 176px;
}

/* FULL-SCREEN PORTRAIT TOURNAMENT MINI-GAME MODE (Piano Tiles & Color Golf Ball Grid!) */
.minigame-overlay.mg-fullscreen {
  padding: 0;
  align-items: center;
  justify-content: center;
  background: rgba(6, 15, 13, 0.90);
}

.minigame-overlay.mg-fullscreen .minigame-card {
  width: min(460px, 100vw);
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 0;
  border-top: none;
  border-bottom: none;
  border-left: 1px solid rgba(218, 245, 232, 0.16);
  border-right: 1px solid rgba(218, 245, 232, 0.16);
  padding: 0;
  gap: 0;
  background: #0b1d17;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.72);
}

.minigame-overlay.mg-fullscreen .mg-steps,
.minigame-overlay.mg-fullscreen .mg-title,
.minigame-overlay.mg-fullscreen .mg-hint,
.minigame-overlay.mg-fullscreen .mg-controls-hint {
  display: none;
}

.minigame-overlay.mg-fullscreen #minigame-canvas {
  width: 100%;
  height: 100%;
  border-radius: 0;
  border: none;
  background: transparent;
}

.mg-controls-hint {
  display: flex;
  justify-content: center;
  width: 100%;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
}

.mg-cancel-btn {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 44;
  background: rgba(12, 26, 22, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #e6f5ec;
  border-radius: 999px;
  padding: 8px 15px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.42);
  transition: background 0.14s, border-color 0.14s;
}

.mg-cancel-btn:hover {
  background: rgba(242, 109, 91, 0.28);
  border-color: rgba(242, 109, 91, 0.72);
  color: #ffffff;
}

/* PIXEL-ART LIE INDICATOR BOX (Top-left corner, matches pixel-art club cards, hidden on Green) */
.lie-card {
  position: fixed;
  top: 60px;
  left: 10px;
  width: 76px;
  padding: 6px 6px 5px;
  z-index: 19;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.lie-card.hidden {
  display: none;
}

.lie-art {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background: rgba(18, 44, 34, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
}

.lie-card-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.05;
  text-align: center;
  white-space: nowrap;
  color: var(--accent);
}

.lie-card.lie-fairway,
.lie-card.lie-tee,
.lie-card.lie-fringe {
  border-color: rgba(110, 231, 135, 0.34);
}

.lie-card.lie-rough {
  border-color: rgba(245, 194, 73, 0.45);
}

.lie-card.lie-rough .lie-card-label {
  color: var(--accent-warm);
}

.lie-card.lie-heavy_rough {
  border-color: rgba(232, 118, 74, 0.56);
}

.lie-card.lie-heavy_rough .lie-card-label {
  color: #ff9a73;
}

.lie-card.lie-bunker {
  border-color: rgba(243, 215, 142, 0.52);
}

.lie-card.lie-bunker .lie-card-label {
  color: #f3d78e;
}

/* TELEMETRY / FEEDBACK TOAST */
.shot-toast {
  position: fixed;
  top: 60px;
  left: 96px;
  width: 344px;
  max-width: calc(100vw - 110px);
  padding: 12px 14px;
  z-index: 22;
  display: none;
  flex-direction: column;
  gap: 6px;
}

.shot-toast.visible {
  display: flex;
}

.toast-trackman {
  width: 100%;
  height: 108px;
  margin-top: 4px;
  border-radius: 10px;
  background: rgba(7, 14, 11, 0.84);
  border: 1px solid rgba(215, 240, 218, 0.14);
  display: none;
}

.toast-trackman.visible {
  display: block;
}

/* TRACKMAN IMPACT LAUNCH MONITOR FLASH HUD */
.impact-hud {
  position: fixed;
  top: 76px;
  left: 14px;
  width: 348px;
  max-width: calc(100vw - 28px);
  padding: 13px 15px;
  z-index: 32;
  display: none;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-glass-strong);
  border: 1.5px solid rgba(110, 231, 135, 0.55);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.58);
  pointer-events: none;
}

.impact-hud.active {
  display: flex;
}

.impact-hud.flash {
  animation: impactMonitorFlash 0.36s cubic-bezier(0.16, 1, 0.3, 1);
}

.impact-hud.tone-pure {
  border-color: rgba(110, 231, 135, 0.72);
}

.impact-hud.tone-ok {
  border-color: rgba(245, 194, 73, 0.72);
}

.impact-hud.tone-miss {
  border-color: rgba(242, 109, 91, 0.72);
}

@keyframes impactMonitorFlash {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.94);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85), 0 0 42px rgba(110, 231, 135, 0.75);
  }

  45% {
    opacity: 1;
    transform: translateY(0) scale(1.015);
    box-shadow: 0 0 0 1px rgba(110, 231, 135, 0.65), 0 22px 54px rgba(0, 0, 0, 0.65);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.impact-hud-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.impact-club-lbl {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.impact-verdict {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.03em;
  color: var(--accent);
  margin-top: 1px;
}

.impact-hud.tone-ok .impact-verdict {
  color: var(--accent-warm);
}

.impact-hud.tone-miss .impact-verdict {
  color: var(--accent-hot);
}

.impact-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(110, 231, 135, 0.15);
  border: 1px solid rgba(110, 231, 135, 0.35);
  color: var(--accent);
  white-space: nowrap;
}

.impact-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.tm-cell {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(215, 240, 218, 0.11);
  border-radius: 9px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tm-lbl {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
}

.tm-val {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
}

.impact-canvas-wrap {
  width: 100%;
  height: 112px;
  border-radius: 10px;
  background: rgba(7, 14, 11, 0.90);
  border: 1px solid rgba(215, 240, 218, 0.15);
  overflow: hidden;
}

#impact-trackman-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.impact-footer-hint {
  font-size: 10px;
  color: var(--text-dim);
  text-align: center;
  letter-spacing: 0.02em;
}

/* COMPACT BOTTOM DOCK & POPOVERS */
.hud-bottom {
  position: fixed;
  bottom: 12px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  pointer-events: none;
  z-index: 22;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.compact-dock {
  pointer-events: auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr) auto;
  align-items: stretch;
  gap: 6px;
  padding: 6px 7px;
  width: min(520px, 100%);
}

.dock-btn {
  position: relative;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  color: var(--text-main);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  min-width: 0;
  min-height: 44px;
  transition: background 0.14s, border-color 0.14s, color 0.14s, transform 0.1s;
}

.dock-btn:hover,
.dock-btn.open {
  background: rgba(110, 231, 135, 0.20);
  border-color: var(--accent);
  color: #ffffff;
}

.dock-btn:active {
  transform: scale(0.95);
}

.dock-btn.modified {
  background: rgba(110, 231, 135, 0.14);
  border-color: rgba(110, 231, 135, 0.56);
  color: #9bf7b0;
}

.dock-btn.modified::after {
  content: '';
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(110, 231, 135, 0.9);
}

.dock-btn:disabled {
  opacity: 0.34;
  cursor: not-allowed;
  pointer-events: none;
}

.dock-svg {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
}

.type-popover {
  width: min(420px, calc(100vw - 18px));
}

.dock-swing {
  padding: 10px 16px !important;
  font-size: 13px !important;
  white-space: nowrap;
}

.shot-popover {
  position: fixed;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%);
  width: min(490px, calc(100vw - 18px));
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  padding: 12px 14px;
  z-index: 26;
  display: none;
  flex-direction: column;
  gap: 10px;
}

.craft-shot-name {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  text-transform: none;
  letter-spacing: 0.01em;
}

.craft-golf-body,
.craft-putt-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Slim 4-tile compact selector (keeps fairway & golfer unobstructed!) */
.craft-tile-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.craft-tile {
  background: rgba(6, 18, 15, 0.78);
  border: 1px solid rgba(218, 245, 232, 0.18);
  border-radius: 10px;
  padding: 7px 5px;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: background 0.14s, border-color 0.14s, transform 0.1s;
}

.craft-tile:hover {
  background: rgba(24, 58, 44, 0.85);
  border-color: rgba(110, 231, 135, 0.5);
}

.craft-tile:active {
  transform: scale(0.97);
}

.craft-tile.modified {
  background: rgba(110, 231, 135, 0.15);
  border-color: rgba(110, 231, 135, 0.52);
}

.craft-tile .ct-lbl {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.craft-tile .ct-val {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.craft-tile.modified .ct-val {
  color: var(--accent);
}

/* Only show the single focused editor card when one tile is selected! */
.craft-visual-grid {
  display: none;
  grid-template-columns: 1fr;
  gap: 8px;
}

.craft-golf-body.editing .craft-tile-row {
  display: none;
}

.craft-golf-body.editing .craft-visual-grid {
  display: grid;
}

.craft-card {
  display: none;
  background: rgba(6, 18, 15, 0.72);
  border: 1px solid rgba(218, 245, 232, 0.14);
  border-radius: 10px;
  padding: 8px;
  flex-direction: column;
  gap: 6px;
}

.craft-golf-body.editing .craft-card.active {
  display: flex;
}

.craft-back-btn {
  background: rgba(110, 231, 135, 0.16) !important;
  border-color: rgba(110, 231, 135, 0.45) !important;
  color: #8ff5a4 !important;
  white-space: nowrap;
}

.craft-set-btn {
  width: 100%;
  background: rgba(110, 231, 135, 0.20);
  border: 1px solid rgba(110, 231, 135, 0.55);
  color: #dfffea;
  border-radius: 9px;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.craft-set-btn:hover {
  background: rgba(110, 231, 135, 0.30);
}

/* EARLY TRAJECTORY IMPACT WARNING PILL (first 30% terrain/lip/tree block) */
.early-block-warn {
  position: fixed;
  top: 62px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  display: none;
  align-items: center;
  gap: 7px;
  max-width: calc(100vw - 24px);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(48, 16, 12, 0.90);
  border: 1.5px solid rgba(255, 114, 76, 0.85);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  color: #ffdcd3;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  pointer-events: none;
  animation: warnPulse 1.5s ease-in-out infinite;
}

.early-block-warn.visible {
  display: flex;
}

.early-block-warn.warn-orange {
  background: rgba(54, 29, 8, 0.90);
  border-color: rgba(255, 162, 46, 0.90);
  color: #ffe8c2;
}

.early-block-warn .ebw-icon {
  color: #ffcf5c;
  font-size: 13px;
  line-height: 1;
}

.early-block-warn .ebw-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* CONTEXTUAL SMALL SQUARE CAMERA SWITCH ICON */
.cam-switch-btn {
  position: fixed;
  top: 0;
  left: 0;
  width: 42px;
  height: 42px;
  margin-left: -21px;
  margin-top: -21px;
  z-index: 23;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(10, 26, 22, 0.84);
  border: 1.5px solid rgba(110, 231, 135, 0.58);
  color: #e8fff0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.42);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.14s, border-color 0.14s, box-shadow 0.14s;
  will-change: transform;
}

.cam-switch-btn.visible {
  display: flex;
}

.cam-switch-btn:hover {
  background: rgba(24, 62, 46, 0.94);
  border-color: #8ff5a4;
  box-shadow: 0 8px 22px rgba(110, 231, 135, 0.30);
}

.cam-switch-btn:active {
  background: rgba(110, 231, 135, 0.28);
}

.cam-switch-btn .csb-icon {
  width: 17px;
  height: 17px;
  color: #8ff5a4;
  flex-shrink: 0;
}

.cam-switch-btn .csb-lbl {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  color: #ffffff;
}

@keyframes warnPulse {

  0%,
  100% {
    border-color: rgba(255, 114, 76, 0.88);
    box-shadow: 0 6px 20px rgba(255, 90, 56, 0.28);
  }

  50% {
    border-color: rgba(255, 207, 92, 0.95);
    box-shadow: 0 6px 24px rgba(255, 140, 72, 0.48);
  }
}

.craft-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
}

.craft-val {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  font-weight: 800;
  text-transform: none;
}

.craft-canvas {
  width: 100%;
  height: 82px;
  border-radius: 8px;
  background: rgba(16, 44, 34, 0.65);
  border: 1px solid rgba(110, 231, 135, 0.22);
  cursor: crosshair;
  touch-action: none;
  display: block;
}

.craft-canvas-tall {
  height: 108px;
}

.craft-pill-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.craft-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  border-radius: 6px;
  color: var(--text-dim);
  padding: 4px 3px;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.craft-pill.selected {
  background: rgba(110, 231, 135, 0.24);
  border-color: var(--accent);
  color: #ffffff;
}

.craft-pill:disabled {
  opacity: 0.34;
  cursor: not-allowed;
  pointer-events: none;
}

.craft-clock-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.craft-clock-canvas {
  background: rgba(12, 36, 28, 0.72);
  border: 1px solid rgba(110, 231, 135, 0.24);
  cursor: grab;
}

.craft-clock-canvas:active {
  cursor: grabbing;
}

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

.clock-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-glass);
  border-radius: 6px;
  color: var(--text-main);
  padding: 4px 2px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  cursor: pointer;
}

.clock-btn span {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-dim);
}

.clock-btn.selected {
  background: rgba(245, 194, 73, 0.22);
  border-color: var(--accent-warm);
  color: #fff6db;
}

.shot-popover.open {
  display: flex;
  animation: popUp 0.14s ease-out;
}

@keyframes popUp {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.popover-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent);
}

.popover-close {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  border-radius: 7px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.toast-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.toast-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-dim);
  border-radius: 6px;
  width: 22px;
  height: 22px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

/* CLEAN UNOBSTRUCTED VIEWS DURING SWING, TIMING MINI-GAMES & IN-FLIGHT */
body.in-minigame .hud-top,
body.in-minigame .hud-bottom,
body.in-minigame .shot-popover,
body.in-minigame .minimap-card,
body.in-minigame .lie-card,
body.in-minigame .club-hud-card,
body.in-minigame .sandbox-drawer,
body.in-minigame .shot-toast,
body.in-minigame .aim-hint,
body.in-minigame .early-block-warn,
body.in-minigame .cam-switch-btn,
body.in-replay .hud-top,
body.in-replay .hud-bottom,
body.in-replay .shot-popover,
body.in-replay .minimap-card,
body.in-replay .lie-card,
body.in-replay .club-hud-card,
body.in-replay .sandbox-drawer,
body.in-replay .shot-toast,
body.in-replay .aim-hint,
body.in-replay .early-block-warn,
body.in-replay .cam-switch-btn,
body.in-flight .hud-top,
body.in-flight .hud-bottom,
body.in-flight .shot-popover,
body.in-flight .minimap-card,
body.in-flight .lie-card,
body.in-flight .club-hud-card,
body.in-flight .sandbox-drawer,
body.in-flight .shot-toast,
body.in-flight .aim-hint,
body.in-flight .early-block-warn,
body.in-flight .cam-switch-btn,
body.in-flight .impact-hud {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(-6px);
}

body.in-replay .hud-bottom,
body.in-flight .hud-bottom {
  transform: translateY(14px);
}

.minimap-card.collapsed {
  display: none !important;
}

.toast-headline {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
}

.toast-stats {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-main);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.toast-levers {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.4;
}

/* HOLE COMPLETE & 3-HOLE DAILY LEADERBOARD MODALS */
.session-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(110, 231, 135, 0.14);
  border: 1px solid rgba(110, 231, 135, 0.36);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s, border-color 0.14s;
}

.session-pill:hover {
  background: rgba(110, 231, 135, 0.24);
  border-color: var(--accent);
}

.session-pill.practice {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.session-pill .sp-hole {
  color: var(--accent);
}

.session-pill.practice .sp-hole {
  color: var(--text-dim);
}

.session-pill .sp-score {
  color: #ffffff;
}

.session-pill .sp-score.under {
  color: #7df597;
}

.session-pill .sp-score.over {
  color: #ff9c8a;
}

.session-pill .sp-pts {
  color: var(--accent-warm);
  font-size: 10px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 14, 10, 0.68);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
  z-index: 50;
}

.modal-backdrop.open {
  display: flex;
}

.score-modal {
  width: min(468px, calc(100vw - 24px));
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  padding: 20px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.session-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.score-term {
  font-size: 30px;
  font-weight: 900;
  color: var(--accent-warm);
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.score-detail {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.4;
}

.scorecard-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.scorecard-strip.hidden {
  display: none;
}

.sc-card-cell {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(215, 240, 218, 0.14);
  border-radius: 10px;
  padding: 7px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.sc-card-cell.active {
  border-color: rgba(110, 231, 135, 0.55);
  background: rgba(110, 231, 135, 0.12);
}

.sc-card-cell.total {
  border-color: rgba(245, 194, 73, 0.45);
  background: rgba(245, 194, 73, 0.10);
}

.sc-card-hdr {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.sc-card-strokes {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.15;
}

.sc-card-strokes.under {
  color: #7df597;
}

.sc-card-strokes.over {
  color: #ff9c8a;
}

.sc-card-pts {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-warm);
}

.lb-submit-box {
  background: rgba(110, 231, 135, 0.09);
  border: 1px solid rgba(110, 231, 135, 0.34);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lb-submit-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.lb-submit-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.initials-input {
  width: 96px;
  height: 44px;
  border-radius: 10px;
  border: 2px solid rgba(110, 231, 135, 0.55);
  background: rgba(7, 16, 12, 0.88);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-align: center;
  padding-left: 5px;
  outline: none;
}

.initials-input:focus {
  border-color: #8ff5a4;
  box-shadow: 0 0 0 3px rgba(110, 231, 135, 0.25);
}

.lb-post-btn {
  height: 44px;
  padding: 0 18px !important;
  font-size: 13px !important;
}

.lb-submit-status {
  font-size: 11px;
  color: var(--text-dim);
}

.lb-submit-status.posted {
  color: #8ff5a4;
  font-weight: 700;
}

.modal-lb-section {
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: left;
}

.lb-modal {
  text-align: left;
}

.lb-modal-heading {
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
  margin-top: 2px;
}

.lb-rules-note {
  font-size: 11px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(215, 240, 218, 0.12);
  border-radius: 10px;
  padding: 8px 10px;
  line-height: 1.45;
}

.lb-rules-note strong {
  color: #e8f8ec;
}

.lb-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.lb-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-dim);
}

.lb-mode-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(110, 231, 135, 0.18);
  color: #8ff5a4;
}

.lb-mode-tag.local {
  background: rgba(245, 194, 73, 0.2);
  color: #ffd977;
}

.lb-table-wrap {
  max-height: 200px;
  overflow-y: auto;
  border-radius: 10px;
  border: 1px solid rgba(215, 240, 218, 0.14);
  background: rgba(7, 15, 11, 0.72);
}

.lb-table-tall {
  max-height: 310px;
}

.lb-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 12px;
}

.lb-table th {
  text-align: left;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 7px 8px;
  border-bottom: 1px solid rgba(215, 240, 218, 0.14);
  position: sticky;
  top: 0;
  background: rgba(12, 26, 20, 0.96);
}

.lb-table th.num,
.lb-table td.num {
  text-align: right;
}

.lb-table td {
  padding: 7px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.lb-table tr:last-child td {
  border-bottom: none;
}

.lb-table tr.me {
  background: rgba(110, 231, 135, 0.18);
}

.lb-table tr.me td {
  color: #ffffff;
  font-weight: 800;
}

.lb-rank {
  color: var(--text-dim);
  font-weight: 800;
  width: 28px;
}

.lb-rank.gold {
  color: #ffd65c;
}

.lb-rank.silver {
  color: #d6e4ec;
}

.lb-rank.bronze {
  color: #e5a373;
}

.lb-initials {
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #ffffff;
}

.lb-score-under {
  color: #7df597;
  font-weight: 800;
}

.lb-score-even {
  color: #ffffff;
  font-weight: 800;
}

.lb-score-over {
  color: #ff9c8a;
  font-weight: 800;
}

.lb-pts {
  color: var(--accent-warm);
  font-weight: 800;
}

.lb-splits {
  color: var(--text-dim);
  font-size: 11px;
}

.lb-empty {
  padding: 20px 14px;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
}

.modal-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* UNPLAYABLE LIE / RELIEF DROP BUTTON & MODAL */
.drop-action-btn {
  border-color: rgba(245, 194, 73, 0.36);
  color: #ffe39b;
}

.drop-action-btn:hover {
  background: rgba(245, 194, 73, 0.22);
  border-color: var(--accent-warm);
  color: #ffffff;
}

.drop-modal {
  text-align: left;
  width: min(410px, calc(100vw - 24px));
}

.drop-options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drop-option-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(215, 240, 218, 0.18);
  border-radius: 12px;
  padding: 11px 13px;
  color: var(--text-main);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, transform 0.12s;
}

.drop-option-btn:hover:not(:disabled) {
  background: rgba(245, 194, 73, 0.16);
  border-color: rgba(245, 194, 73, 0.62);
  transform: translateY(-1px);
}

.drop-option-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.drop-opt-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.drop-opt-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
}

.drop-pen-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(245, 194, 73, 0.22);
  color: #ffd977;
}

.drop-opt-desc {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* 3-HOLE RULES BRIEF MODAL */
.rules-modal {
  text-align: left;
  width: min(456px, calc(100vw - 24px));
}

.rules-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rule-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(215, 240, 218, 0.12);
  border-radius: 10px;
  padding: 9px 11px;
}

.rule-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 3px;
}

.rule-item p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-dim);
}

.rule-item strong {
  color: #eefaf1;
}

.rule-item code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 4px;
  border-radius: 4px;
  color: #ffffff;
}

/* SEED SHARE BAR & LEADERBOARD TABS */
.seed-share-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(108, 197, 240, 0.12);
  border: 1px solid rgba(108, 197, 240, 0.36);
}

.seed-share-lbl {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-dim);
}

.seed-share-code {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: #9ce0ff;
}

.lb-tab-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.lb-tab-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-glass);
  color: var(--text-dim);
  border-radius: 8px;
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.lb-tab-btn.active {
  background: rgba(110, 231, 135, 0.22);
  border-color: var(--accent);
  color: #ffffff;
}

.lb-seed-lookup-wrap {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
}

.lb-seed-lookup {
  width: 64px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--border-glass);
  background: rgba(7, 16, 12, 0.85);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  outline: none;
}

.lb-seed-lookup:focus {
  border-color: var(--accent);
}

/* OPENING MODE SELECT MENU */
.start-menu-backdrop {
  background: rgba(7, 16, 12, 0.54);
  z-index: 48;
}

.start-menu-card {
  width: min(440px, calc(100vw - 24px));
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  padding: 24px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
  border: 1.5px solid rgba(110, 231, 135, 0.36);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.sm-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sm-title {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #ffffff;
  text-shadow: 0 3px 18px rgba(110, 231, 135, 0.35);
}

.sm-sub {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}

.sm-modes {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sm-mode-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(215, 240, 218, 0.18);
  border-radius: 13px;
  padding: 13px 15px;
  color: var(--text-main);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.13s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.sm-mode-btn:hover {
  background: rgba(110, 231, 135, 0.14);
  border-color: rgba(110, 231, 135, 0.55);
  transform: translateY(-1px);
}

.sm-mode-btn.primary {
  background: linear-gradient(135deg, rgba(66, 176, 86, 0.42), rgba(44, 140, 82, 0.36));
  border: 1.5px solid rgba(110, 231, 135, 0.72);
  box-shadow: 0 10px 26px rgba(34, 128, 66, 0.28);
}

.sm-mode-btn.primary:hover {
  background: linear-gradient(135deg, rgba(80, 198, 100, 0.55), rgba(50, 158, 92, 0.46));
  border-color: #8ff5a4;
}

.sm-mode-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.sm-mode-name {
  font-size: 15px;
  font-weight: 900;
  color: #ffffff;
}

.sm-mode-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #a8ffbe;
  letter-spacing: 0.08em;
}

.sm-mode-desc {
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.35;
}

.sm-seed-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sm-seed-entry {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(7, 16, 12, 0.65);
  border: 1px solid rgba(110, 231, 135, 0.35);
}

.sm-seed-box.expanded .sm-seed-entry {
  display: flex;
}

.sm-seed-input {
  flex: 1;
  height: 42px;
  border-radius: 9px;
  border: 1.5px solid rgba(110, 231, 135, 0.5);
  background: rgba(10, 22, 16, 0.9);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-align: center;
  padding-left: 6px;
  outline: none;
}

.sm-seed-input:focus {
  border-color: #8ff5a4;
  box-shadow: 0 0 0 3px rgba(110, 231, 135, 0.22);
}

.sm-seed-go {
  height: 42px;
  padding: 0 16px !important;
  font-size: 13px !important;
  white-space: nowrap;
}

.sm-seed-hint {
  display: none;
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
}

.sm-seed-box.expanded .sm-seed-hint {
  display: block;
}

.sm-seed-hint.error {
  color: #ff9c8a;
  font-weight: 700;
}

.sm-footer {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.sm-mode-btn.weekly {
  background: linear-gradient(135deg, rgba(168, 126, 36, 0.34), rgba(26, 78, 56, 0.58));
  border-color: rgba(245, 194, 73, 0.52);
}

.sm-mode-btn.weekly:hover {
  background: linear-gradient(135deg, rgba(196, 148, 44, 0.44), rgba(34, 98, 70, 0.68));
  border-color: rgba(255, 217, 119, 0.78);
}

.sm-mode-btn.weekly .sm-mode-badge {
  background: rgba(245, 194, 73, 0.22);
  border-color: rgba(245, 194, 73, 0.5);
  color: #ffe08a;
}

/* 18-HOLE COMPACT SCORECARD GRID (Front 9 + Back 9) */
.scorecard-strip.grid-18 {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sc18-row {
  display: grid;
  grid-template-columns: 28px repeat(9, minmax(0, 1fr)) 34px;
  gap: 3px;
  align-items: center;
}

.sc18-cell {
  background: rgba(8, 22, 18, 0.72);
  border: 1px solid rgba(218, 245, 232, 0.14);
  border-radius: 6px;
  padding: 3px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.05;
}

.sc18-cell.active {
  border-color: var(--accent);
  background: rgba(110, 231, 135, 0.16);
}

.sc18-cell.hdr-side {
  background: transparent;
  border: none;
  font-size: 9px;
  font-weight: 800;
  color: var(--text-dim);
  text-transform: uppercase;
}

.sc18-cell.subtot {
  background: rgba(245, 194, 73, 0.12);
  border-color: rgba(245, 194, 73, 0.34);
}

.sc18-h {
  font-size: 8px;
  color: var(--text-dim);
  font-weight: 700;
}

.sc18-s {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
}

.sc18-s.under {
  color: var(--accent);
}

.sc18-s.over {
  color: #ff9c8a;
}

.sc18-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(245, 194, 73, 0.12);
  border: 1px solid rgba(245, 194, 73, 0.35);
  font-size: 11px;
  font-weight: 700;
  color: #ffe39b;
}

/* WEEKLY TOURNAMENT LEADERBOARD PLAY-STYLE TAGS & HUMAN BADGES */
.lb-player-cell {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.lb-player-name {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 122px;
}

.lb-style-tag {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
}

.lb-style-tag.human {
  background: rgba(110, 231, 135, 0.24);
  border-color: rgba(110, 231, 135, 0.65);
  color: #a9ffbb;
}

.lb-style-tag.live {
  background: rgba(245, 194, 73, 0.26);
  border-color: rgba(245, 194, 73, 0.72);
  color: #ffe494;
}

.lb-style-tag.agg {
  color: #ff9c8a;
  border-color: rgba(242, 109, 91, 0.35);
}

.lb-style-tag.bmb {
  color: #ffd07a;
  border-color: rgba(245, 194, 73, 0.35);
}

.lb-style-tag.tec {
  color: #8fd7ff;
  border-color: rgba(108, 197, 240, 0.35);
}

.lb-style-tag.con {
  color: #9bf5b1;
  border-color: rgba(110, 231, 135, 0.35);
}

.lb-table tr.human-row td {
  background: rgba(110, 231, 135, 0.10);
}

.lb-table tr.live-row td {
  background: rgba(245, 194, 73, 0.16);
}

/* CLICKABLE FRIEND REPLAY ROWS + TOP REPLAY CONTROL BAR */
.lb-table tr.clickable-replay {
  cursor: pointer;
}

.lb-table tr.clickable-replay:hover td {
  background: rgba(110, 231, 135, 0.22);
}

.lb-replay-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(108, 197, 240, 0.22);
  border: 1px solid rgba(108, 197, 240, 0.6);
  color: #bcebff;
  margin-left: 4px;
  flex-shrink: 0;
}

.lb-weekly-filter-btn {
  background: rgba(245, 194, 73, 0.18) !important;
  border-color: rgba(245, 194, 73, 0.5) !important;
  color: #ffe39b !important;
}

.replay-bar {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: min(640px, calc(100vw - 20px));
  padding: 8px 12px;
  z-index: 42;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  border-color: rgba(108, 197, 240, 0.55);
}

body.in-watch-replay .replay-bar {
  display: flex;
}

body.in-watch-replay .hud-top,
body.in-watch-replay .hud-bottom,
body.in-watch-replay .shot-popover,
body.in-watch-replay .lie-card,
body.in-watch-replay .club-hud-card,
body.in-watch-replay .shot-toast,
body.in-watch-replay .aim-hint,
body.in-watch-replay .early-block-warn,
body.in-watch-replay .cam-switch-btn,
body.in-watch-replay .sandbox-drawer {
  opacity: 0 !important;
  pointer-events: none !important;
}

.rb-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.rb-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(108, 197, 240, 0.22);
  border: 1px solid rgba(108, 197, 240, 0.55);
  color: #bdeaff;
}

.rb-title {
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
}

.rb-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
}

.rb-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}

.rb-exit-btn {
  background: rgba(242, 109, 91, 0.24) !important;
  border-color: rgba(242, 109, 91, 0.6) !important;
  color: #ffd3cc !important;
}

/* SUBTLE AIM HINT */
.aim-hint {
  position: fixed;
  top: 74px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--text-dim);
  background: rgba(14, 24, 19, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: none;
  z-index: 15;
}

/* BOTTOM-RIGHT PIXEL-ART CARRY / ROLL / TOTAL TRACKER (matches Craft Score arcade bitmap style!) */
.ball-tracker {
  position: fixed;
  bottom: 16px;
  right: 14px;
  z-index: 32;
  pointer-events: none;
  display: none;
  align-items: center;
  justify-content: center;
}

.ball-tracker.visible {
  display: flex;
}

#ball-tracker-canvas {
  width: 234px;
  height: 96px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
}

/* RETRO-MODERN PIXEL-ART SHOT CALLOUTS ("PURE!", "BOMB!", "TIGHT!", Ron Chopper "RAZZ!") */
.shot-callout {
  position: fixed;
  top: 24%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 38;
  pointer-events: none;
  display: none;
  align-items: center;
  justify-content: center;
}

.shot-callout.visible {
  display: flex;
}

#shot-callout-canvas {
  width: 320px;
  height: 168px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
}

/* TOP-RIGHT CURRENT CLUB & SHOT TYPE ICON CARD (mirrors top-left Lie Box!) */
.club-hud-card {
  position: fixed;
  top: 60px;
  right: 10px;
  width: 78px;
  padding: 6px 6px 5px;
  z-index: 19;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--text-main);
  transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
}

.club-hud-card:hover {
  border-color: var(--accent);
}

.club-hud-card:active {
  transform: scale(0.96);
}

.club-hud-art {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background: rgba(18, 44, 34, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
}

.club-hud-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  line-height: 1.05;
}

.club-hud-code {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  color: #ffffff;
}

.club-hud-shot {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(110, 231, 135, 0.18);
  color: var(--accent);
  text-transform: uppercase;
}

/* MAIN MENU 14-CLUB BAG EDITOR MODAL */
.bag-modal {
  width: min(540px, calc(100vw - 24px));
  max-height: calc(100dvh - 36px);
}

.bag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 7px;
  max-height: 52dvh;
  overflow-y: auto;
  padding: 2px 2px 6px;
}

.bag-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px 5px;
  border-radius: 10px;
  background: rgba(8, 22, 18, 0.72);
  border: 1.5px solid rgba(218, 245, 232, 0.14);
  color: var(--text-dim);
  cursor: pointer;
  opacity: 0.62;
  transition: opacity 0.14s, border-color 0.14s, background 0.14s, transform 0.1s;
}

.bag-item:hover {
  opacity: 0.92;
  border-color: rgba(110, 231, 135, 0.45);
}

.bag-item.equipped {
  opacity: 1;
  background: rgba(24, 68, 48, 0.84);
  border-color: var(--accent);
  color: #ffffff;
}

.bag-item.locked {
  border-color: rgba(156, 123, 217, 0.65);
  cursor: default;
}

.bag-item canvas {
  width: 48px;
  height: 48px;
  border-radius: 7px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.bag-item .bi-code {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
}

.bag-item .bi-yd {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--accent);
}

.bag-item .bi-check {
  position: absolute;
  top: 4px;
  right: 5px;
  font-size: 10px;
  font-weight: 900;
  color: var(--accent);
}

/* 1-SECOND RETRO-MODERN PIXEL-ART CRAFT POINTS EXPLOSION BESIDE GOLFER */
.craft-burst {
  position: fixed;
  top: 0;
  left: 0;
  width: 288px;
  height: 288px;
  margin-left: -144px;
  margin-top: -144px;
  z-index: 34;
  pointer-events: none;
  display: none;
  align-items: center;
  justify-content: center;
  transform: translate3d(-9999px, -9999px, 0);
  will-change: transform, opacity;
}

.craft-burst.visible {
  display: flex;
}

#craft-burst-canvas {
  width: 288px;
  height: 288px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  pointer-events: none;
}

/* OVERHEAD HOLE MINIMAP (sits cleanly beneath top-right Club + Shot card; expands big on click!) */
.minimap-card {
  position: fixed;
  top: 158px;
  right: 10px;
  width: 184px;
  padding: 7px;
  z-index: 18;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: opacity 0.2s ease, width 0.18s ease, box-shadow 0.18s ease;
}

.minimap-card.expanded {
  top: 64px;
  right: 50%;
  transform: translateX(50%);
  width: min(440px, calc(100vw - 24px));
  padding: 10px;
  z-index: 36;
  border-color: var(--accent);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.72);
}

.minimap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 700;
  padding: 0 2px;
  cursor: pointer;
}

.minimap-hint {
  color: var(--text-dim);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  margin-left: auto;
}

.minimap-expand-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e8fff0;
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1.3;
}

.minimap-expand-btn:hover {
  border-color: var(--accent);
  background: rgba(110, 231, 135, 0.2);
}

#minimap-canvas {
  width: 180px;
  height: 276px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: zoom-in;
  display: block;
}

.minimap-card.expanded #minimap-canvas {
  width: 100%;
  height: min(68dvh, 600px);
  cursor: crosshair;
}

/* LEADERBOARD PREVIOUS/NEXT DAY & WEEK HISTORY BAR */
.lb-date-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(8, 22, 18, 0.65);
  border: 1px solid rgba(218, 245, 232, 0.16);
}

.lb-nav-label {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  color: #e8fff0;
  letter-spacing: 0.04em;
}

.lb-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.lb-today-btn {
  border-color: rgba(110, 231, 135, 0.55) !important;
  color: var(--accent) !important;
}

@media (max-width: 860px) {

  /* Disable costly backdrop-filter blur over WebGL canvas on mobile GPUs for a major FPS boost! */
  .panel,
  .icon-btn,
  .impact-hud,
  .modal-backdrop {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background-color: rgba(14, 34, 30, 0.94);
  }

  .hole-desktop-meta {
    display: none;
  }

  .hud-top {
    top: 8px;
    left: 8px;
    right: 8px;
    gap: 6px;
    flex-direction: column;
    align-items: stretch;
  }

  .top-info-bar {
    gap: 7px;
    padding: 4px 8px;
    min-height: 34px;
    width: fit-content;
    max-width: 100%;
    flex-wrap: wrap;
  }

  .top-actions {
    justify-content: flex-start;
    gap: 5px;
  }

  .dist-value {
    font-size: 14px;
  }

  .dist-sub {
    display: none;
  }

  .icon-btn {
    padding: 5px 8px;
    font-size: 11px;
  }

  .club-hud-card {
    top: 86px;
    right: 8px;
    width: 68px;
    padding: 5px 5px 4px;
    gap: 3px;
  }

  .club-hud-art {
    width: 52px;
    height: 52px;
  }

  .minimap-card:not(.expanded) {
    top: 170px;
    right: 8px;
    width: 132px;
    padding: 5px;
  }

  #ball-tracker-canvas {
    width: 184px;
    height: 76px;
  }

  #shot-callout-canvas {
    width: 264px;
    height: 138px;
  }

  .minimap-card:not(.expanded) #minimap-canvas {
    width: 120px;
    height: 178px;
  }

  .lie-card {
    top: 86px;
    left: 8px;
    width: 66px;
    padding: 5px 5px 4px;
    gap: 3px;
  }

  .lie-art {
    width: 52px;
    height: 52px;
  }

  .lie-card-label {
    font-size: 8px;
  }

  .shot-toast {
    top: 86px;
    left: 82px;
    width: min(270px, calc(100vw - 90px));
    padding: 9px 11px;
  }

  .early-block-warn {
    top: 90px;
    font-size: 10px;
    padding: 5px 10px;
  }

  .sandbox-drawer {
    top: 86px;
  }

  .compact-dock {
    gap: 4px;
    padding: 5px;
  }

  .dock-btn {
    padding: 4px;
    min-height: 40px;
  }

  .dock-svg {
    width: 20px;
    height: 20px;
  }

  .dock-swing {
    padding: 8px 12px !important;
    font-size: 12px !important;
  }

  .aim-hint {
    display: none;
  }
}


/* ============================================================================
   OPTION C: MODERN PIXEL BROADCAST SLATE — FULL PIXEL-ART UI OVERHAUL (?v=129)
   Fixed-height compact top bar · Zero rounded pillboxes · Larger pixel dock icons
   ============================================================================ */

.sr-hidden,
#lie-pill {
  display: none !important;
}

/* Global Option C Pixel-Art Surface & Button System (Zero Rounded Pillboxes!) */
.panel,
.icon-btn,
.swing-btn,
.dock-btn,
.club-btn,
.type-btn,
.sm-mode-btn,
.lb-tab-btn,
.mini-btn,
.bag-item,
.popover-close,
.session-pill,
.stroke-chip,
.top-dist,
.wind-mini,
.lie-card,
.club-hud-card,
.minimap-card,
.shot-toast,
.early-block-warn,
.score-modal,
.start-menu-card,
.sandbox-drawer,
.club-popover,
.shape-popover,
.craft-pill,
.putt-preset-btn,
.drop-option-btn,
.replay-bar,
.sc-card-cell,
.sc18-cell,
.sc18-summary,
.lb-date-nav,
.lb-rules-note,
.lb-submit-box,
.seed-share-bar,
.initials-input,
.sm-seed-input,
.lb-seed-lookup,
.rule-item,
.minimap-expand-btn,
.lever-chip,
.club-hud-shot,
.sm-mode-badge,
.lb-mode-tag,
.aim-hint,
.cam-switch-btn,
.craft-card,
.club-nav-btn,
.club-art,
.club-hud-art,
.lie-art,
.bag-item canvas,
#minimap-canvas {
  border-radius: 0 !important;
}

.panel,
.score-modal,
.start-menu-card,
.sandbox-drawer,
.club-popover,
.shape-popover,
.replay-bar {
  background: #0d1821 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 2px solid #3c7480 !important;
  box-shadow:
    inset 2px 2px 0 rgba(132, 224, 232, 0.16),
    inset -2px -2px 0 rgba(4, 10, 14, 0.78),
    4px 4px 0 rgba(4, 10, 14, 0.85) !important;
}

/* Tactile Pixel-Art Buttons across Top Bar, Menus, Modals & Popovers */
.icon-btn,
.popover-close,
.mini-btn,
.lb-tab-btn,
.type-btn,
.craft-pill,
.putt-preset-btn,
.minimap-expand-btn,
.club-nav-btn {
  background: #142733 !important;
  border: 2px solid #3c7480 !important;
  box-shadow:
    inset 2px 2px 0 rgba(132, 224, 232, 0.18),
    inset -2px -2px 0 rgba(5, 12, 16, 0.75),
    2px 2px 0 #050c10 !important;
  color: #e4f6f4 !important;
  font-family: var(--font-mono) !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.1s, border-color 0.1s, transform 0.06s;
}

.icon-btn:hover,
.popover-close:hover,
.mini-btn:hover,
.lb-tab-btn:hover,
.type-btn:hover,
.craft-pill:hover,
.putt-preset-btn:hover,
.minimap-expand-btn:hover,
.club-nav-btn:hover {
  background: #1c3847 !important;
  border-color: #6ee787 !important;
  color: #ffffff !important;
}

.icon-btn:active,
.popover-close:active,
.mini-btn:active,
.dock-btn:active,
.swing-btn:active,
.sm-mode-btn:active {
  transform: translate(1px, 1px) !important;
  box-shadow:
    inset 2px 2px 0 rgba(5, 12, 16, 0.7),
    1px 1px 0 #050c10 !important;
}

.icon-btn.active,
.lb-tab-btn.active,
.type-btn.selected,
.craft-pill.selected,
.mini-btn.selected {
  background: #164035 !important;
  border-color: #6ee787 !important;
  color: #8ff5a4 !important;
}

/* Chunky Pixel-Art Arcade SWING / Primary Action Button */
.swing-btn {
  background: #229e5c !important;
  border: 2px solid #091812 !important;
  outline: 2px solid #6ee787;
  outline-offset: -4px;
  box-shadow:
    inset 2px 2px 0 rgba(188, 255, 206, 0.45),
    inset -2px -2px 0 rgba(12, 62, 34, 0.85),
    3px 3px 0 #050c10 !important;
  color: #f4fff8 !important;
  font-family: var(--font-mono) !important;
  font-weight: 900 !important;
  letter-spacing: 0.07em !important;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #0b331c;
}

.swing-btn:hover:not(:disabled) {
  background: #2ab86c !important;
  filter: none;
}

/* ============================================================================
   FIXED-HEIGHT COMPACT PIXEL BROADCAST TOP BAR
   ============================================================================ */
.hud-top {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 46px !important;
  padding: 0 8px !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  background: #0d1821 !important;
  border-bottom: 2px solid #3c7480 !important;
  box-shadow:
    inset 0 2px 0 rgba(132, 224, 232, 0.16),
    0 3px 0 #050c10 !important;
  z-index: 28;
  pointer-events: auto;
}

.top-info-bar {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
  height: 34px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  flex-wrap: nowrap !important;
  flex-shrink: 0;
}

.session-pill {
  height: 32px !important;
  padding: 0 8px !important;
  background: #13242e !important;
  border: 2px solid #34626c !important;
  box-shadow: inset 1px 1px 0 rgba(132, 224, 232, 0.18), 2px 2px 0 #050c10 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
}

.session-pill:hover {
  border-color: #6ee787 !important;
  background: #1a3340 !important;
}

.sp-hole {
  color: #6ee787 !important;
  font-weight: 900 !important;
}

.sp-score {
  color: #ffffff !important;
  font-weight: 900 !important;
}

.sp-pts {
  color: #ffd83d !important;
  font-weight: 800 !important;
}

.stroke-chip {
  height: 32px !important;
  padding: 0 7px !important;
  background: #13242e !important;
  border: 2px solid #34626c !important;
  box-shadow: inset 1px 1px 0 rgba(132, 224, 232, 0.15), 2px 2px 0 #050c10 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px !important;
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
}

.top-dist {
  height: 32px !important;
  padding: 0 9px !important;
  background: #13242e !important;
  border: 2px solid #34626c !important;
  box-shadow: inset 1px 1px 0 rgba(132, 224, 232, 0.15), 2px 2px 0 #050c10 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-family: var(--font-mono) !important;
}

.top-dist.is-stimp {
  border-color: #6ee787 !important;
  background: #122e26 !important;
}

.top-dist .dist-value {
  font-size: 13px !important;
  font-weight: 900 !important;
  color: #ffd83d !important;
  line-height: 1 !important;
  letter-spacing: 0.03em;
}

.top-dist.is-stimp .dist-value {
  color: #6ee787 !important;
}

.top-dist .dist-sub {
  font-size: 9.5px !important;
  font-weight: 800 !important;
  color: #9ec5cc !important;
  line-height: 1 !important;
  text-transform: uppercase;
}

/* Aim-Relative Pixel Wind Compass Cell */
.wind-mini {
  height: 32px !important;
  padding: 0 8px 0 4px !important;
  background: #13242e !important;
  border: 2px solid #34626c !important;
  box-shadow: inset 1px 1px 0 rgba(132, 224, 232, 0.15), 2px 2px 0 #050c10 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
}

.wind-compass-canvas {
  width: 26px;
  height: 26px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
  flex-shrink: 0;
}

.wind-mini .wind-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  font-family: var(--font-mono);
}

.wind-mini .wind-mph {
  font-size: 11px !important;
  font-weight: 900 !important;
  color: #5ce1ff !important;
}

.wind-mini .wind-lbl {
  font-size: 8px !important;
  font-weight: 800 !important;
  color: #88b2ba !important;
  letter-spacing: 0.06em;
}

.top-actions {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0;
}

.top-actions::-webkit-scrollbar {
  display: none;
}

.top-actions .icon-btn {
  height: 30px !important;
  padding: 0 8px !important;
  font-size: 10.5px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Anchor floating HUD elements cleanly below the 46px fixed pixel top bar */
.aim-hint {
  top: 54px !important;
  background: #0d1821 !important;
  border: 2px solid #34626c !important;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 10px;
}

.lie-card {
  top: 56px !important;
  left: 10px !important;
}

.club-hud-card {
  top: 56px !important;
  right: 10px !important;
  width: 88px !important;
  padding: 5px !important;
}

.club-hud-art {
  width: 72px !important;
  height: 72px !important;
  background: #0a141c !important;
  border: 2px solid #2b545e !important;
}

.minimap-card:not(.expanded) {
  top: 164px !important;
  right: 10px !important;
}

.minimap-card.expanded {
  top: 56px !important;
}

.shot-toast {
  top: 56px !important;
  left: 98px !important;
}

.early-block-warn {
  top: 56px !important;
  font-family: var(--font-mono) !important;
  border-width: 2px !important;
  box-shadow: 3px 3px 0 #050c10 !important;
}

.sandbox-drawer {
  top: 56px !important;
}

/* ============================================================================
   LARGER HIGH-DETAIL PIXEL-FILTERED BOTTOM ACTION DOCK
   ============================================================================ */
.compact-dock {
  grid-template-columns: repeat(5, 54px) auto !important;
  gap: 6px !important;
  padding: 6px !important;
  align-items: stretch !important;
}

.dock-btn {
  min-width: 54px !important;
  min-height: 52px !important;
  padding: 3px !important;
  background: #142733 !important;
  border: 2px solid #3c7480 !important;
  box-shadow:
    inset 2px 2px 0 rgba(132, 224, 232, 0.18),
    inset -2px -2px 0 rgba(5, 12, 16, 0.78),
    2px 2px 0 #050c10 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.dock-btn:hover:not(:disabled) {
  background: #1c3847 !important;
  border-color: #6ee787 !important;
}

.dock-btn.open {
  background: #173d34 !important;
  border-color: #6ee787 !important;
}

.dock-btn.modified {
  background: #2c2a14 !important;
  border-color: #ffd83d !important;
}

.dock-px-icon {
  width: 44px;
  height: 44px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
  pointer-events: none;
}

.dock-swing {
  min-height: 52px !important;
  padding: 0 18px !important;
  font-size: 13px !important;
}

/* ============================================================================
   PIXEL-ART CLUB CAROUSEL, BAG EDITOR & MENU CARDS
   ============================================================================ */
.club-btn {
  background: #13242e !important;
  border: 2px solid #34626c !important;
  box-shadow: inset 1px 1px 0 rgba(132, 224, 232, 0.16), 2px 2px 0 #050c10 !important;
  min-width: 82px !important;
  padding: 6px 5px !important;
}

.club-btn.selected {
  background: #153c32 !important;
  border-color: #6ee787 !important;
}

.club-btn .club-art {
  width: 68px !important;
  height: 68px !important;
  border: 2px solid #2b545e !important;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.bag-item {
  background: #13242e !important;
  border: 2px solid #2e5560 !important;
  box-shadow: 2px 2px 0 #050c10 !important;
}

.bag-item.equipped {
  background: #153c32 !important;
  border-color: #6ee787 !important;
}

.bag-item canvas {
  width: 64px !important;
  height: 64px !important;
  border: 2px solid #2b545e !important;
}

/* Opening Start Menu Mode Buttons & Modals in Option C Pixel Slate */
.sm-mode-btn {
  background: #13242e !important;
  border: 2px solid #3c7480 !important;
  box-shadow:
    inset 2px 2px 0 rgba(132, 224, 232, 0.14),
    inset -2px -2px 0 rgba(4, 10, 14, 0.72),
    3px 3px 0 #050c10 !important;
}

.sm-mode-btn:hover {
  background: #1b3644 !important;
  border-color: #6ee787 !important;
  transform: translate(-1px, -1px) !important;
}

.sm-mode-btn.primary {
  background: #13382c !important;
  border-color: #6ee787 !important;
}

.sm-mode-btn.weekly {
  background: #2c2514 !important;
  border-color: #ffd83d !important;
}

.sm-mode-badge,
.lb-mode-tag,
.club-hud-shot {
  border: 1px solid currentColor;
  font-family: var(--font-mono) !important;
}

.craft-card {
  background: #13242e !important;
  border: 2px solid #34626c !important;
}

.club-popover,
.shape-popover {
  bottom: 78px !important;
}

/* ============================================================================
   MOBILE RESPONSIVE OVERRIDES FOR FIXED TOP BAR & LARGER PIXEL DOCK
   ============================================================================ */
@media (max-width: 860px) {
  .hud-top {
    height: 76px !important;
    padding: 4px 6px !important;
    gap: 4px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: center !important;
  }

  .top-info-bar {
    gap: 4px !important;
    height: 32px !important;
    width: 100% !important;
    justify-content: flex-start !important;
  }

  .session-pill {
    height: 30px !important;
    padding: 0 6px !important;
    font-size: 10px !important;
  }

  .sp-pts {
    display: none;
  }

  .stroke-chip {
    height: 30px !important;
    padding: 0 5px !important;
    font-size: 10px !important;
  }

  .top-dist {
    height: 30px !important;
    padding: 0 6px !important;
  }

  .top-dist .dist-value {
    font-size: 11.5px !important;
  }

  .top-dist .dist-sub {
    display: none !important;
  }

  .wind-mini {
    height: 30px !important;
    padding: 0 6px 0 3px !important;
  }

  .wind-compass-canvas {
    width: 22px;
    height: 22px;
  }

  .wind-mini .wind-lbl {
    display: none;
  }

  .top-actions .icon-btn {
    height: 28px !important;
    padding: 0 6px !important;
    font-size: 9.5px !important;
  }

  .lie-card {
    top: 84px !important;
    left: 6px !important;
  }

  .club-hud-card {
    top: 84px !important;
    right: 6px !important;
    width: 72px !important;
  }

  .club-hud-art {
    width: 58px !important;
    height: 58px !important;
  }

  .minimap-card:not(.expanded) {
    top: 180px !important;
    right: 6px !important;
  }

  .minimap-card.expanded,
  .early-block-warn,
  .shot-toast,
  .sandbox-drawer {
    top: 84px !important;
  }

  .compact-dock {
    grid-template-columns: repeat(5, 46px) auto !important;
    gap: 4px !important;
    padding: 5px !important;
  }

  .dock-btn {
    min-width: 46px !important;
    min-height: 46px !important;
    padding: 2px !important;
  }

  .dock-px-icon {
    width: 38px;
    height: 38px;
  }

  .dock-swing {
    min-height: 46px !important;
    padding: 0 12px !important;
    font-size: 11.5px !important;
  }

  .club-popover,
  .shape-popover {
    bottom: 68px !important;
  }
}


/* ============================================================================
   v0.16 POLISH: FULL-WIDTH BOTTOM BAR, MOBILE TOP BAR FIX, ULTRA-COMPACT CRAFT,
   PIXEL CAMERA ICONS, PRACTICE CONTROLS & TOP SHOTS HALL OF FAME
   ============================================================================ */

/* Fix mobile top-actions disappearing (justify-content: flex-end in overflow-x: auto hid buttons off-left!) */
.top-actions {
  justify-content: flex-start !important;
  flex-shrink: 0;
}

@media (max-width: 860px) {
  .hud-top {
    height: 76px !important;
    padding: 4px 6px !important;
    gap: 4px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: space-between !important;
  }

  .top-actions {
    display: flex !important;
    width: 100% !important;
    min-height: 30px !important;
    height: 30px !important;
    justify-content: flex-start !important;
    align-items: center !important;
    overflow-x: auto !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
  }
}

/* Snap bottom dock flush to bottom of screen & span full width! */
.hud-bottom {
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  padding: 0 !important;
  transform: none !important;
}

.compact-dock {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  grid-template-columns: repeat(5, minmax(46px, 68px)) 1fr !important;
  gap: 6px !important;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)) !important;
  border-left: none !important;
  border-right: none !important;
  border-bottom: none !important;
  box-shadow:
    inset 0 2px 0 rgba(132, 224, 232, 0.16),
    0 -3px 0 #050c10 !important;
}

@media (max-width: 860px) {
  .compact-dock {
    grid-template-columns: repeat(5, minmax(42px, 1fr)) 1.5fr !important;
    gap: 4px !important;
    padding: 5px 6px calc(5px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* Ultra-Compact Shot-Craft Popover (Side-rail Done/Reset, shorter height so golfer & flag stay visible!) */
.club-popover,
.shape-popover {
  bottom: 66px !important;
}

@media (max-width: 860px) {
  .club-popover,
  .shape-popover {
    bottom: 58px !important;
  }
}

.shot-craft-popover.compact-craft {
  padding: 6px 7px !important;
  width: min(410px, calc(100vw - 12px)) !important;
  gap: 0 !important;
}

.craft-compact-layout {
  display: flex;
  align-items: stretch;
  gap: 6px;
  width: 100%;
}

.craft-compact-main {
  flex: 1;
  min-width: 0;
}

.craft-compact-main .craft-card {
  padding: 5px 6px !important;
  gap: 4px !important;
}

.craft-compact-main .craft-card-head {
  font-size: 10px !important;
}

.craft-compact-main .craft-canvas {
  height: 76px !important;
}

.craft-compact-main .craft-canvas-tall,
.craft-compact-main .craft-clock-canvas {
  height: 82px !important;
}

.craft-compact-main .shot-type-strip {
  gap: 4px !important;
  margin-bottom: 2px;
}

.craft-compact-main .type-btn {
  padding: 4px 6px !important;
  font-size: 10px !important;
}

.craft-side-rail {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 52px;
  flex-shrink: 0;
}

.craft-rail-btn {
  flex: 1;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px;
  padding: 4px 2px !important;
  font-size: 13px !important;
  line-height: 1 !important;
}

.craft-rail-btn span {
  font-size: 8.5px;
  letter-spacing: 0.04em;
}

.craft-done-btn {
  background: #174435 !important;
  border-color: #6ee787 !important;
  color: #8ff5a4 !important;
}

/* Pixel-Art Contextual Camera Icons */
.cam-switch-btn {
  width: 48px !important;
  height: 48px !important;
  margin-left: -24px !important;
  margin-top: -24px !important;
  padding: 3px 2px 2px !important;
  gap: 1px !important;
  background: rgba(13, 24, 33, 0.92) !important;
  border: 2px solid #488894 !important;
  box-shadow:
    inset 1px 1px 0 rgba(132, 224, 232, 0.22),
    2px 2px 0 #050c10 !important;
}

.cam-switch-btn:hover {
  border-color: #6ee787 !important;
  background: #173340 !important;
}

.csb-px-icon {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
}

.cam-switch-btn .csb-lbl {
  font-family: var(--font-mono) !important;
  font-size: 8.5px !important;
  font-weight: 900 !important;
  letter-spacing: 0.05em;
  color: #8ff5a4;
}

/* Practice Facility Controls Bar */
.practice-bar {
  position: fixed;
  top: 54px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 24;
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px 8px !important;
  width: min(520px, calc(100vw - 180px));
}

.practice-bar.visible {
  display: flex;
}

body.in-flight .practice-bar,
body.in-replay .practice-bar,
body.in-minigame .practice-bar,
body.in-watch-replay .practice-bar {
  display: none !important;
}

.pb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.pb-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 900;
  color: #6ee787;
  letter-spacing: 0.08em;
}

.pb-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pb-btn {
  padding: 3px 7px !important;
  font-size: 9.5px !important;
}

.pb-next-btn {
  border-color: #6ee787 !important;
  color: #8ff5a4 !important;
}

.pb-controls {
  justify-content: flex-start;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
}

.pb-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #13242e;
  border: 1px solid #34626c;
  padding: 2px 5px;
}

.pb-group label {
  font-size: 9px;
  font-weight: 800;
  color: #96bcc4;
  text-transform: uppercase;
}

.pb-group select,
.pb-group input[type="number"] {
  background: #0a141c;
  color: #f0faf8;
  border: 1px solid #3c7480;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  padding: 1px 4px;
}

.pb-group input[type="number"] {
  width: 44px;
  text-align: center;
}

@media (max-width: 860px) {
  .practice-bar {
    top: 82px;
    left: 6px;
    right: 6px;
    transform: none;
    width: auto;
  }
}

/* Top Shots Hall of Fame Modal */
.topshots-modal {
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
}

.topshots-sections {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 58dvh;
  overflow-y: auto;
  padding-right: 2px;
}

.ts-card {
  background: #13242e;
  border: 2px solid #34626c;
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ts-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  color: #ffd83d;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid #2b545e;
  padding-bottom: 4px;
}

.ts-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 6px;
  background: #0d1a22;
  border: 1px solid #244752;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  transition: border-color 0.1s, background 0.1s;
}

.ts-row:hover {
  border-color: #6ee787;
  background: #153330;
}

.ts-rank {
  font-weight: 900;
  color: #ffd83d;
  width: 22px;
}

.ts-init {
  font-weight: 900;
  color: #ffffff;
  width: 34px;
}

.ts-val {
  font-weight: 900;
  color: #6ee787;
  min-width: 68px;
}

.ts-detail {
  flex: 1;
  font-size: 9.5px;
  color: #98bec6;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ts-play {
  padding: 2px 6px;
  background: #174435;
  border: 1px solid #6ee787;
  color: #8ff5a4;
  font-size: 9.5px;
  font-weight: 900;
}

/* ============================================================================
   v0.17 OPTION B DUAL-WING COCKPIT & 3-BUTTON COMBINED DOCK
   Left/Right taller wings · Open middle third for unobstructed golfer & tracer
   ============================================================================ */

/* 3 Combined Control Buttons (BAG · POS·PWR · FACE·PATH) + SWING */
.compact-dock {
  grid-template-columns: repeat(3, minmax(76px, 118px)) 1fr !important;
  gap: 6px !important;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)) !important;
}

.dock-icon-btn {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  padding: 3px 4px !important;
  min-height: 54px !important;
}

.dock-icon-btn .dock-px-icon {
  width: 34px !important;
  height: 34px !important;
}

.dock-lbl {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1;
  color: #b4d8de;
  text-transform: uppercase;
  white-space: nowrap;
}

.dock-icon-btn.active .dock-lbl,
.dock-icon-btn.modified .dock-lbl {
  color: #ffd83d;
}

@media (max-width: 860px) {
  .compact-dock {
    grid-template-columns: repeat(3, minmax(66px, 1fr)) 1.45fr !important;
    gap: 5px !important;
    padding: 5px 6px calc(5px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .dock-icon-btn {
    min-width: 64px !important;
    min-height: 52px !important;
    padding: 2px 3px !important;
  }

  .dock-icon-btn .dock-px-icon {
    width: 32px !important;
    height: 32px !important;
  }

  .dock-swing {
    min-height: 52px !important;
    font-size: 12.5px !important;
  }
}

/* Transparent Full-Width Dual-Wing Popover Wrapper (Middle Third 100% Clear & Click-Through!) */
.shot-craft-popover.dual-cockpit {
  position: fixed !important;
  bottom: 68px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: min(760px, calc(100vw - 8px)) !important;
  max-width: calc(100vw - 8px) !important;
  max-height: none !important;
  overflow: visible !important;
  z-index: 28 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  pointer-events: none !important;
  gap: 0 !important;
}

.shot-craft-popover.dual-cockpit.open {
  display: flex !important;
  animation: none !important;
  opacity: 1;
}

@media (max-width: 860px) {
  .shot-craft-popover.dual-cockpit {
    bottom: 64px !important;
    width: calc(100vw - 8px) !important;
    max-width: calc(100vw - 8px) !important;
  }

  .club-popover {
    bottom: 64px !important;
  }
}

.cockpit-grid {
  display: grid;
  grid-template-columns: minmax(120px, 236px) 1fr minmax(120px, 236px);
  align-items: end;
  width: 100%;
  pointer-events: none;
}

@media (max-width: 680px) {
  .cockpit-grid {
    grid-template-columns: 35% 30% 35%;
  }
}

/* Left & Right Pixel Broadcast Wings */
.cockpit-wing {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  background: rgba(11, 25, 31, 0.94);
  border: 2px solid #3c7480;
  box-shadow:
    inset 1px 1px 0 rgba(132, 224, 232, 0.22),
    3px 3px 0 #050c10;
  padding: 6px;
  min-height: 206px;
}

.cockpit-wing .craft-card {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  gap: 5px !important;
  min-height: 192px;
  width: 100%;
}

/* Mode Switching: Show Exact Paired Left + Right Wings */
.dual-cockpit.mode-pos-power .cockpit-card-ball,
.dual-cockpit.mode-pos-power .cockpit-card-power {
  display: flex !important;
}

.dual-cockpit.mode-face-path .cockpit-card-path,
.dual-cockpit.mode-face-path .cockpit-card-face {
  display: flex !important;
}

.dual-cockpit.mode-putt .cockpit-putt-left,
.dual-cockpit.mode-putt .cockpit-putt-right {
  display: flex !important;
}

.cockpit-wing .craft-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #98bec6;
  text-transform: uppercase;
  white-space: nowrap;
}

.cockpit-wing .craft-val {
  color: #ffd83d;
  font-size: 9.5px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cockpit-subhead {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #88b0b8;
  text-transform: uppercase;
  line-height: 1;
}

/* Compact 2x2 Shot Type Grid inside Left Wing of POS·PWR */
.cockpit-shot-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 3px !important;
  width: 100%;
  margin: 0 !important;
}

.cockpit-shot-grid .type-btn {
  padding: 4px 2px !important;
  font-size: 9px !important;
  font-weight: 900 !important;
  letter-spacing: 0.03em;
  text-align: center;
  min-height: 24px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cockpit-ball-head {
  margin-top: 2px;
  padding-top: 4px;
  border-top: 1px solid rgba(72, 136, 148, 0.35);
}

/* Generous Taller Canvas Pads inside Both Wings */
.cockpit-stance-canvas {
  width: 100% !important;
  height: 78px !important;
}

.cockpit-clock-canvas {
  width: 100% !important;
  height: 146px !important;
}

.cockpit-shape-canvas {
  width: 100% !important;
  height: 142px !important;
}

.cockpit-wing .craft-pill-row {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 3px !important;
  width: 100%;
}

.cockpit-wing .craft-pill {
  padding: 5px 2px !important;
  font-size: 9px !important;
  font-weight: 900 !important;
  text-align: center;
  min-width: 0;
}

/* Live Estimated Carry & Spin Strip at Bottom of Right Power Wing */
.cockpit-est-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 3px 5px;
  background: #08131a;
  border: 1px solid #2b545e;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  color: #ffd83d;
  white-space: nowrap;
}

.cockpit-est-bar.razz-ready {
  border-color: #ff3e8a;
  color: #ff7ab2;
  background: rgba(46, 14, 30, 0.92);
}

/* Open Center Third: Golfer Stands Clearly Here + Tiny Reset/Done Rim Pill at Very Bottom! */
.cockpit-center-gap {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 206px;
  pointer-events: none;
  padding: 0 4px 2px;
}

.cockpit-rim-actions {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(9, 20, 26, 0.92);
  border: 2px solid #3c7480;
  padding: 3px;
  box-shadow: 2px 2px 0 #050c10;
}

.cockpit-rim-btn {
  min-width: 34px !important;
  height: 26px !important;
  padding: 0 8px !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.cockpit-done-btn {
  background: #1d6b43 !important;
  border-color: #6ee787 !important;
  color: #ffffff !important;
}

/* Putting Dual-Wing Controls */
.cockpit-putt-presets {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  flex: 1;
}

.cockpit-putt-presets .clock-btn {
  flex: 1;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 4px 8px !important;
  font-size: 10px !important;
}

.cockpit-putt-slider-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 8px 4px;
}

.cockpit-putt-slider-wrap input[type="range"] {
  width: 100%;
  accent-color: #6ee787;
}

.cockpit-putt-hints {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  color: #90b8c0;
  text-transform: uppercase;
}

/* End-of-Replay Round Scoreboard Modal */
.replay-summary-modal {
  width: min(460px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
}

.rs-totals-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.rs-tot-chip {
  background: #12242e;
  border: 2px solid #366a76;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rs-tot-lbl {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #8eb6be;
}

.rs-tot-val {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 900;
  color: #f0faf8;
}

.rs-tot-craft {
  color: #ffd83d;
}

.rs-table-wrap {
  max-height: 46dvh;
  overflow-y: auto;
  border: 2px solid #2e5964;
  background: #0a151d;
}

.rs-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 11px;
}

.rs-table th {
  position: sticky;
  top: 0;
  background: #132833;
  color: #8eb6be;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 8px;
  text-align: center;
  border-bottom: 2px solid #2e5964;
}

.rs-table td {
  padding: 6px 8px;
  text-align: center;
  border-bottom: 1px solid #1a3440;
  font-weight: 800;
  color: #e4f4f0;
}

.rs-table tr:last-child td {
  border-bottom: none;
}

.rs-score-eagle {
  color: #ffd83d !important;
}

.rs-score-birdie {
  color: #6ee787 !important;
}

.rs-score-par {
  color: #e8f6f2 !important;
}

.rs-score-bogey {
  color: #ff9472 !important;
}

.rs-craft-cell {
  color: #ffd83d !important;
}
