/* Divots hole mapper — dark, touch-first */
* { box-sizing: border-box; margin: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; background: #0b1d12; color: #e8f2ea;
  font: 14px/1.4 -apple-system, "Segoe UI", Roboto, sans-serif; }
.hidden { display: none !important; }
.grow { flex: 1; }

#bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  padding-top: max(10px, env(safe-area-inset-top)); background: #10281a;
  border-bottom: 1px solid #1e3a29; }
#course-name { font-weight: 700; letter-spacing: .04em; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
#sel-info { color: #9fd4ae; font-variant-numeric: tabular-nums; }

button { background: #1e3a29; color: #e8f2ea; border: 1px solid #2c5238;
  border-radius: 9px; padding: 8px 12px; font: inherit; font-weight: 600; }
button:active { background: #2c5238; }
button.primary { background: #35a85c; border-color: #35a85c; color: #06130b; }

#modes { display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto;
  background: #0e2316; border-bottom: 1px solid #1e3a29; }
#modes button { flex: 0 0 auto; padding: 6px 11px; font-size: 13px;
  border-radius: 999px; }
#modes button.active { background: #35a85c; border-color: #35a85c; color: #06130b; }
#mark-counts { color: #9fd4ae; font-size: 12px; margin-bottom: 8px; }

#wrap { display: flex; height: calc(100% - 96px - env(safe-area-inset-top)); }
#map { flex: 1 1 0; min-width: 0; touch-action: none; display: block; }

#side { flex: 0 0 260px; max-width: 45vw; overflow-y: auto; background: #0e2316;
  border-left: 1px solid #1e3a29; padding: 10px;
  padding-bottom: max(10px, env(safe-area-inset-bottom)); }
#hole-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
#hole-tools button { flex: 1 1 45%; padding: 7px 4px; font-size: 13px; }

#holes { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
#holes td { padding: 5px 4px; border-bottom: 1px solid #16301f; font-size: 13px; }
#holes tr { cursor: pointer; }
#holes tr.sel td { background: #1c4029; }
#holes td.ok   { color: #7fd695; }
#holes td.warn { color: #ffd166; }
#holes td.bad  { color: #ff6b6b; font-weight: 700; }
#hint { margin-top: 12px; color: #7ca88a; font-size: 12px; }

#toast { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%); background: #10281acc; border: 1px solid #2c5238;
  border-radius: 10px; padding: 10px 16px; backdrop-filter: blur(6px); z-index: 9; }

@media (max-width: 640px) {
  #wrap { flex-direction: column; }
  #side { flex: 0 0 auto; width: 100%; max-width: none; max-height: 38vh;
    border-left: 0; border-top: 1px solid #1e3a29; }
  #hole-tools button { flex: 1 1 30%; }
}
