/* Optical Ballistics Golf Wedge Loft Gapping & 12-Shot Clock-System Matrix */

.wg-speed-box {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--hairline-strong);
  background: var(--paper);
  margin: 8px 0 12px;
}

.wg-speed-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.wg-num-input {
  width: 3.8ch;
  min-height: 50px;
  padding: 0 2px;
  border: 0;
  border-bottom: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(36px, 4.6vw, 50px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

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

.wg-num-input:focus {
  outline: none;
  border-bottom-color: var(--optic);
}

.wg-range {
  width: 100%;
  height: 22px;
  margin: 6px 0 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.wg-range::-webkit-slider-runnable-track {
  height: 2px;
  background: var(--hairline-strong);
}

.wg-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -8px;
  border-radius: 50%;
  background: var(--pine);
  border: 3px solid var(--optic-bright);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.wg-range::-moz-range-track {
  height: 2px;
  background: var(--hairline-strong);
}

.wg-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--pine);
  border: 3px solid var(--optic-bright);
}

.wg-presets-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 8px 0 12px;
}

.wg-preset-btn {
  appearance: none;
  min-height: 48px;
  padding: 7px 6px;
  border-radius: 8px;
  border: 1px solid var(--hairline-strong);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.wg-preset-btn small {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 2px;
}

.wg-preset-btn:hover:not([aria-pressed="true"]) {
  border-color: var(--turf);
}

.wg-preset-btn[aria-pressed="true"],
.wg-preset-btn[aria-pressed="true"]:hover {
  background: var(--pine);
  border-color: var(--pine);
  color: #f4f7f2;
}

.wg-preset-btn[aria-pressed="true"] small {
  color: rgba(244, 247, 242, 0.82);
}

html[data-theme="radar"] .wg-preset-btn[aria-pressed="true"],
html[data-theme="radar"] .wg-preset-btn[aria-pressed="true"]:hover {
  background: var(--optic-bright);
  border-color: var(--optic-bright);
  color: #081c14;
}

html[data-theme="radar"] .wg-preset-btn[aria-pressed="true"] small {
  color: rgba(8, 28, 20, 0.78);
}

.wg-loft-selectors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 12px;
}

.wg-loft-card {
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid var(--hairline-strong);
  background: var(--paper);
}

.wg-loft-card label {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 5px;
}

.wg-loft-select {
  width: 100%;
  min-height: 44px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--hairline-strong);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}

#wg-reset,
#wg-autofix {
  appearance: none;
  min-height: 44px;
  padding: 0 13px;
  border-radius: 7px;
  border: 1px solid var(--hairline-strong);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

#wg-autofix {
  width: 100%;
  background: var(--pine);
  border-color: var(--pine);
  color: #f4f7f2;
  font-family: var(--sans);
  font-size: 13px;
}

#wg-reset:hover {
  border-color: var(--turf);
}

html[data-theme="radar"] #wg-reset {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(158, 192, 176, 0.38);
  color: #e6f2ec;
}

html[data-theme="radar"] #wg-autofix {
  background: var(--optic-bright);
  border-color: var(--optic-bright);
  color: #081c14;
}

#wg-controls .segmented.compact span {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

/* Doppler 4-Wedge Canyon & Gapping Ladder SVG */
.wg-radar-box {
  margin: 14px 0 16px;
  padding: 14px 16px 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, #0b241b 0%, #071912 100%);
  border: 1px solid #1f4d3b;
  color: #e6f2ec;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 20px rgba(7, 25, 18, 0.14);
}

.wg-radar-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px 12px;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9ec0b0;
}

.wg-ladder-svg {
  display: block;
  width: 100%;
  height: auto;
}

.wg-ground { stroke: rgba(158, 192, 176, 0.42); stroke-width: 1.5; }
.wg-grid-line { stroke: rgba(158, 192, 176, 0.14); stroke-width: 1; stroke-dasharray: 3 3; }
.wg-arc-pw { fill: none; stroke: #6ee7b7; stroke-width: 2.5; stroke-dasharray: 100; stroke-dashoffset: 0; }
.wg-arc-gw { fill: none; stroke: #93c5fd; stroke-width: 2.4; stroke-dasharray: 100; stroke-dashoffset: 0; }
.wg-arc-sw { fill: none; stroke: #fcd34d; stroke-width: 2.3; stroke-dasharray: 100; stroke-dashoffset: 0; }
.wg-arc-lw { fill: none; stroke: #f9a8d4; stroke-width: 2.2; stroke-dasharray: 100; stroke-dashoffset: 0; }
.wg-dot-pw { fill: #6ee7b7; }
.wg-dot-gw { fill: #93c5fd; }
.wg-dot-sw { fill: #fcd34d; }
.wg-dot-lw { fill: #f9a8d4; }
.wg-canyon-zone {
  fill: rgba(245, 158, 11, 0.22);
  stroke: #fbbf24;
  stroke-width: 1.2;
  stroke-dasharray: 4 3;
  animation: wgCanyonBreathe 2.4s ease-in-out infinite;
}
.wg-canyon-pill { fill: rgba(120, 53, 15, 0.72); stroke: #fbbf24; stroke-width: 1; }
.wg-canyon-txt { fill: #fde68a; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9.5px; font-weight: 800; }
.wg-pin-lbl { fill: #f8fafc; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-weight: 700; }
.wg-axis-txt { fill: rgba(209, 230, 220, 0.78); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9.5px; }

@keyframes wgTraceArc {
  0% { stroke-dashoffset: 100; opacity: 0.45; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}

@keyframes wgPinDrop {
  0% { opacity: 0; transform: scale(0.35); }
  70% { opacity: 1; transform: scale(1.22); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes wgTurfRipple {
  0% { opacity: 0.85; transform: scale(0.6); }
  100% { opacity: 0; transform: scale(2.5); }
}

@keyframes wgCanyonBreathe {
  0%, 100% { fill: rgba(245, 158, 11, 0.16); }
  50% { fill: rgba(245, 158, 11, 0.30); }
}

@keyframes wgRowCascade {
  0% { opacity: 0; transform: translateY(5px); }
  100% { opacity: 1; transform: translateY(0); }
}

.wg-trace-0 { animation: wgTraceArc 520ms cubic-bezier(0.22, 1, 0.36, 1) 0ms both; }
.wg-trace-1 { animation: wgTraceArc 520ms cubic-bezier(0.22, 1, 0.36, 1) 65ms both; }
.wg-trace-2 { animation: wgTraceArc 520ms cubic-bezier(0.22, 1, 0.36, 1) 130ms both; }
.wg-trace-3 { animation: wgTraceArc 520ms cubic-bezier(0.22, 1, 0.36, 1) 195ms both; }

.wg-drop-0,
.wg-drop-1,
.wg-drop-2,
.wg-drop-3 {
  transform-box: fill-box;
  transform-origin: center;
}
.wg-drop-0 { animation: wgPinDrop 300ms cubic-bezier(0.22, 1, 0.36, 1) 360ms both; }
.wg-drop-1 { animation: wgPinDrop 300ms cubic-bezier(0.22, 1, 0.36, 1) 425ms both; }
.wg-drop-2 { animation: wgPinDrop 300ms cubic-bezier(0.22, 1, 0.36, 1) 490ms both; }
.wg-drop-3 { animation: wgPinDrop 300ms cubic-bezier(0.22, 1, 0.36, 1) 555ms both; }

.wg-ripple-ring {
  fill: none;
  stroke: rgba(110, 231, 183, 0.72);
  stroke-width: 1.2;
  transform-box: fill-box;
  transform-origin: center;
  animation: wgTurfRipple 850ms cubic-bezier(0.22, 1, 0.36, 1) 420ms both;
}

.wg-row-anim-0 { animation: wgRowCascade 240ms cubic-bezier(0.22, 1, 0.36, 1) 0ms both; }
.wg-row-anim-1 { animation: wgRowCascade 240ms cubic-bezier(0.22, 1, 0.36, 1) 45ms both; }
.wg-row-anim-2 { animation: wgRowCascade 240ms cubic-bezier(0.22, 1, 0.36, 1) 90ms both; }
.wg-row-anim-3 { animation: wgRowCascade 240ms cubic-bezier(0.22, 1, 0.36, 1) 135ms both; }

@media (prefers-reduced-motion: reduce) {
  .wg-canyon-zone,
  .wg-trace-0, .wg-trace-1, .wg-trace-2, .wg-trace-3,
  .wg-drop-0, .wg-drop-1, .wg-drop-2, .wg-drop-3,
  .wg-ripple-ring,
  .wg-row-anim-0, .wg-row-anim-1, .wg-row-anim-2, .wg-row-anim-3 {
    animation: none !important;
  }
}

.wg-status-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
}

.wg-status-pill.warn {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #784304;
}

.wg-status-pill.good {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #0b4a2d;
}

html[data-theme="radar"] .wg-status-pill.warn {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.55);
  color: #fde68a;
}

html[data-theme="radar"] .wg-status-pill.good {
  background: rgba(110, 231, 183, 0.18);
  border-color: rgba(110, 231, 183, 0.55);
  color: #a7f3d0;
}

/* 12-Shot Pelz Clock-System Matrix */
.wg-clock-wrap {
  max-width: 100%;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--hairline-strong);
  background: var(--paper);
  margin-bottom: 14px;
}

.wg-clock-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.wg-clock-table th,
.wg-clock-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
}

.wg-clock-table thead th {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: rgba(11, 36, 27, 0.04);
}

html[data-theme="radar"] .wg-clock-table thead th {
  background: rgba(255, 255, 255, 0.05);
}

.wg-clock-table tr:last-child th,
.wg-clock-table tr:last-child td {
  border-bottom: 0;
}

.wg-gap-bad {
  color: #b45309;
  font-weight: 800;
}

html[data-theme="radar"] .wg-gap-bad {
  color: #fcd34d;
}

.wg-gap-ok {
  color: var(--turf);
  font-weight: 700;
}

html[data-theme="radar"] .wg-gap-ok {
  color: var(--optic-bright);
}

.wg-copy-btn {
  appearance: none;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--hairline-strong);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.wg-copy-status {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--turf);
}

@media (max-width: 720px) {
  .wg-presets-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
