        html, body { 
      overscroll-behavior: none; 
      overscroll-behavior-y: contain; 
    }
    body { 
      font-family: 'Inter', sans-serif; 
      text-align: center; 
      background: #000000; 
      color: #e2e8f0; 
      padding: 10px; 
      margin: 0;
      min-height: 100vh;
    }

        /* Hide scrollbar but keep functionality */
    html::-webkit-scrollbar,
    body::-webkit-scrollbar {
      display: none;
    }
    html, body {
      -ms-overflow-style: none;  /* IE and Edge */
      scrollbar-width: none;     /* Firefox */
    }
    
    .time { 
      font-family: 'Roboto Mono', monospace;
      font-size: 4.5em; 
      margin: 10px 0; 
      color: #00E5FF;
      letter-spacing: -2px;
    }
    .position { 
      font-family: 'Roboto Mono', monospace;
      font-size: 7.5em; 
      font-weight: 700; 
      color: #FF6D00; 
      margin: 8px 0; 
      line-height: 1;
    }
    
    button {
      font-family: 'Inter', sans-serif;
      font-weight: 600;
      font-size: 1.1em; 
      padding: 14px 20px; 
      margin: 6px; 
      border: none;
      border-radius: 8px; 
      transition: all 0.15s ease;
      touch-action: manipulation;
      box-shadow: 0 4px 15px rgba(0,0,0,0.3);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }
    button:active { transform: scale(0.92); box-shadow: 0 2px 8px rgba(0,0,0,0.4); }
    
    .start { background: #00E5FF; color: #0d0e15; }
    .record { background: #00E5FF; color: #0d0e15; }
    .upload {
      background: rgba(0, 229, 255, 0.08);
      color: #00E5FF;
      border: 1px solid rgba(0, 229, 255, 0.4);
    }
    .upload:active { background: rgba(0, 229, 255, 0.15); }

    .timer-control-width {
      max-width: 420px;
      width: 100%;
      margin-left: auto;
      margin-right: auto;
      box-sizing: border-box;
    }

    #setupPanel {
      background: rgba(255, 255, 255, 0.04);
      padding: 15px;
      border-radius: 10px;
      border: 1px solid rgba(255, 255, 255, 0.18);
      margin-top: 15px;
      margin-bottom: 15px;
    }

    .main-buttons {
      margin-top: 15px;
      margin-bottom: 15px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .main-button-row {
      display: flex;
      justify-content: center;
      gap: 15px;
      flex-wrap: nowrap;
      width: 100%;
    }

    .main-action-btn {
      flex: 1;
      width: 100%;
      margin: 0;
      font-size: 1.3em;
      padding: 35px 15px;
      box-sizing: border-box;
    }

    .main-button-row .main-action-btn {
      width: auto;
      min-width: 0;
    }
    
    ul { 
      list-style: none; 
      padding: 0; 
      font-size: 1.25em; 
      text-align: center; 
      max-width: 420px; 
      margin: 15px auto; 
    }
        li { 
  padding: 7px 5px 7px 8px; 
  margin-bottom: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  display: flex; 
  align-items: center; 
  gap: 7px;
}
li:last-child {
  border-bottom: none;
}

/* === New runner list layout ===
   [ horizontal Edit+Delete + Dist underneath ]   [ #Pos / Time ]   [ Wide Name ]
*/
.runner-actions-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  min-width: 52px;
  margin-right: 4px;
}

.runner-actions {
  display: flex;
  flex-direction: row;
  gap: 4px;
  margin-bottom: 2px;
}

.runner-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 46px;
  flex-shrink: 0;
  gap: 1px;
  margin-right: 6px;
}

.runner-main {
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 0;
}
    .lap-pos {
      font-family: 'Roboto Mono', monospace;
      color: #FF6D00;
      font-weight: 700;
      font-size: 0.98em;
      line-height: 1;
      margin-bottom: 0;
    }
    .lap-time {
      font-family: 'Roboto Mono', monospace;
      color: #e2e8f0;
      font-size: 0.98em;
      font-weight: 600;
      line-height: 1.0;
    }
    .edit-btn, .delete-btn { 
  font-size: 0.9em; 
  cursor: pointer; 
  padding: 4px 6px; 
  border-radius: 6px;
  touch-action: manipulation;
  transition: background 0.2s;
  line-height: 1;
}
    .edit-btn { color: #F6E05E; background: rgba(246, 224, 94, 0.18); }
    .delete-btn { color: #FC8181; background: rgba(252, 129, 129, 0.18); }
    .edit-btn:hover { background: rgba(246, 224, 94, 0.30); }
    .delete-btn:hover { background: rgba(252, 129, 129, 0.30); }
    
    input {
      font-family: 'Roboto Mono', monospace;
      background: rgba(0, 0, 0, 0.4); 
      color: #00E5FF; 
      border: 1px solid rgba(255,255,255,0.15);
      border-radius: 6px;
      outline: none;
      transition: border 0.2s;
    }
    input:focus {
      border-color: #00E5FF;
      box-shadow: 0 0 8px rgba(0, 229, 255, 0.2);
    }

    .name-input:focus {
      border-color: #00E5FF;
      background: rgba(255,255,255,0.09);
    }

    .name-input {
  padding: 6px 10px; 
  font-size: 0.72em;     
  height: 30px;          
  line-height: 1.1;     
  flex: 1;               /* Takes all available space in runner-main */
  min-width: 80px; 
  color: #e2e8f0;
  font-family: 'Inter', sans-serif;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.06);
  box-sizing: border-box;
  text-transform: uppercase;
}

        .modal {
  display: none; 
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%;
  background: rgba(0, 0, 0, 0.95); 
  backdrop-filter: blur(8px);
  z-index: 1000; 
  align-items: center; 
  justify-content: center;
  padding: 20px;           /* Added padding so it doesn't touch edges */
  box-sizing: border-box;
}

.modal-content {
  background: #1f1f1f; 
  padding: 30px 25px; 
  border-radius: 16px; 
  width: 100%;             /* Changed to 100% for better mobile centering */
  max-width: 380px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

    .modal-content h3 { margin-top: 0; color: #fff; }
    .modal-btn {
      padding: 14px 20px; 
      margin: 8px 0; 
      font-size: 1.05em; 
      border: none; 
      border-radius: 8px; 
      width: 100%;
      color: white;
      touch-action: manipulation;
    }

    /* === Add Record Modal - Clean consistent field spacing (mobile fix) === */
    #addRecordModal .add-field {
      margin: 14px 0;
    }

    /* Extra breathing room after the last field before the buttons */
    #addRecordModal .add-dist-field {
      margin-bottom: 18px;
    }

    #addRecordModal .add-label {
      color: #a0aec0;
      display: block;
      margin-bottom: 6px;
      font-size: 0.92em;
    }

    @keyframes heartbeat {
      0% { transform: scale(1); box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
      50% { transform: scale(1.06); box-shadow: 0 0 25px rgba(229, 62, 62, 0.8); }
      100% { transform: scale(1); box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
    }
    .pulsing {
      animation: heartbeat 1s ease-in-out infinite;
    }

    /* Hide number input spinners */
    input[type="number"]::-webkit-outer-spin-button,
    input[type="number"]::-webkit-inner-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }
    input[type="number"] {
      -moz-appearance: textfield;
    }

    /* Details section (post-stop race metadata) */
    .details-section {
      max-width: 420px;
      width: 100%;
      margin: 16px auto 12px;
      padding: 16px 18px;
      background: rgba(255,255,255,0.035);
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 10px;
      text-align: left;
      font-size: 0.95em;
      box-sizing: border-box;
    }

    .details-section .section-title {
      color: #a0aec0;
      font-size: 0.9em;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .details-section label {
      color: #a0aec0;
      font-size: 0.82em;
      display: block;
      margin-bottom: 4px;
      font-weight: 500;
    }

    .details-section .field-row {
      display: flex;
      gap: 12px;
      margin-bottom: 12px;
    }

    .details-section .field-row:last-child {
      margin-bottom: 0;
    }

    .details-section .field-row > div {
      flex: 1;
    }

    /* Make inputs inside the details box larger and more readable */
    .details-section .name-input,
    .details-section select.name-input {
      font-size: 0.9em;
      padding: 8px 10px;
      height: 36px;
      line-height: 1.2;
      text-transform: uppercase;
      color: #e2e8f0;
      width: 100%;
      border-radius: 6px;
    }

    .details-section select.name-input {
      appearance: none;
      -webkit-appearance: none;
      -moz-appearance: none;
      overflow: hidden;
    }

    .details-section select.name-input option {
      background: #1f1f1f;
      color: #e2e8f0;
    }

    /* Visual display for custom Club/Time Trial picker (replaces native select) */
    .details-section .trial-display {
      font-size: 0.9em;
      padding: 8px 10px;
      height: 36px;
      line-height: 1.2;
      text-transform: uppercase;
      color: #e2e8f0;
      width: 100%;
      border-radius: 6px;
      background: rgba(0,0,0,0.4);
      border: 1px solid rgba(255,255,255,0.15);
      box-sizing: border-box;
      display: flex;
      align-items: center;
      cursor: pointer;
      touch-action: manipulation;
      font-family: 'Inter', sans-serif;
    }
    .details-section .trial-display:active {
      background: rgba(255,255,255,0.08);
      border-color: #00E5FF;
    }

    .details-section .trial-display:focus-visible {
      border-color: #00E5FF;
      box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.2);
      outline: none; /* We handle the outline globally with :focus-visible */
    }

    .details-section .trial-display--signed-in {
      cursor: default;
      color: #00E5FF;
      font-weight: 600;
      border-color: rgba(0, 229, 255, 0.25);
      background: rgba(0, 229, 255, 0.08);
      text-transform: none;
    }

    .details-section .trial-display--signed-in:active {
      background: rgba(0, 229, 255, 0.08);
      border-color: rgba(0, 229, 255, 0.25);
    }

    /* Distance dropdown in results list - dark themed (mobile picker friendly) */
    .dist-select {
      font-family: 'Inter', sans-serif;
      font-size: 0.78em;
      padding: 5px 9px;
      min-width: 58px;
      min-height: 28px;
      background-color: #1a1a1a;
      border: 1px solid rgba(0, 229, 255, 0.3);
      color: #00E5FF;
      border-radius: 6px;
      appearance: none;
      -webkit-appearance: none;
      -moz-appearance: none;
      overflow: hidden;
      cursor: pointer;
      text-transform: uppercase;
      color-scheme: dark;
      line-height: 1.1;
      flex-shrink: 0;           /* Prevent it from being crushed in the flex row on narrow phones */
    }
    .dist-select:focus {
      outline: none;
      border-color: #00E5FF;
      box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.15);
    }

    /* This mainly affects the native mobile picker popup (the "modal" that appears on tap) */
    .dist-select option {
      background-color: #1f1f1f;
      color: #e2e8f0;
      padding: 11px 8px;        /* Much better vertical spacing in the iOS/Android picker */
      font-size: 0.95em;
      line-height: 1.3;
    }

    /* Color coding for distance */
    .dist-select.dist-4km {
      color: #00E5FF;
      border-color: rgba(0, 229, 255, 0.35);
    }
    .dist-select.dist-8km {
      color: #C084FC;
      border-color: rgba(192, 132, 252, 0.45);
    }

    /* === New: Clickable distance badge in the runners list (replaces <select>) === */
    .dist-badge {
      font-family: 'Inter', sans-serif;
      font-size: 0.72em;
      font-weight: 600;
      padding: 4px 8px;
      min-width: 48px;
      min-height: 26px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 6px;
      cursor: pointer;
      text-transform: uppercase;
      letter-spacing: 0.3px;
      user-select: none;
      touch-action: manipulation;
      transition: transform 0.1s ease, box-shadow 0.1s ease;
      border: 1px solid;
    }
    .dist-badge:active {
      transform: scale(0.94);
    }

    .dist-badge.dist-2km {
      background: rgba(74, 222, 128, 0.10);
      color: #4ADE80;
      border-color: rgba(74, 222, 128, 0.45);
    }
    .dist-badge.dist-6km {
      background: rgba(255, 109, 0, 0.10);
      color: #FF6D00;
      border-color: rgba(255, 109, 0, 0.45);
    }
    .dist-badge.dist-4km {
      background: rgba(0, 229, 255, 0.08);
      color: #00E5FF;
      border-color: rgba(0, 229, 255, 0.4);
    }
    .dist-badge.dist-8km {
      background: rgba(192, 132, 252, 0.10);
      color: #C084FC;
      border-color: rgba(192, 132, 252, 0.45);
    }

    /* === Distance modal sizing (smaller outer box) === */
    #distanceModal .modal-content {
      max-width: 260px;
      padding: 18px 16px 14px;
    }

    .dist-modal-divider {
      margin: 12px 0 8px;
      text-align: center;
      font-size: 0.78em;
      font-weight: 600;
      letter-spacing: 0.4px;
      text-transform: uppercase;
      color: #888;
    }

    /* === Distance choice buttons inside the custom modal (dark themed to match app) === */
    .dist-choice-btn {
      font-family: 'Inter', sans-serif;
      font-size: 1.0em;
      font-weight: 600;
      padding: 11px 14px;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 8px;
      width: 100%;
      background: rgba(255,255,255,0.035);
      color: #e2e8f0;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      touch-action: manipulation;
      transition: all 0.1s ease;
      letter-spacing: 0.4px;
    }
    .dist-choice-btn:active {
      transform: scale(0.97);
      background: rgba(255,255,255,0.07);
    }

    .dist-4km-choice {
      border-color: rgba(0, 229, 255, 0.45);
      color: #00E5FF;
    }
    .dist-4km-choice:active {
      border-color: #00E5FF;
      background: rgba(0, 229, 255, 0.1);
    }

    .dist-2km-choice {
      border-color: rgba(74, 222, 128, 0.45);
      color: #4ADE80;
    }
    .dist-2km-choice:active {
      border-color: #4ADE80;
      background: rgba(74, 222, 128, 0.12);
    }

    .dist-6km-choice {
      border-color: rgba(255, 109, 0, 0.45);
      color: #FF6D00;
    }
    .dist-6km-choice:active {
      border-color: #FF6D00;
      background: rgba(255, 109, 0, 0.12);
    }

    .dist-8km-choice {
      border-color: rgba(192, 132, 252, 0.45);
      color: #C084FC;
    }
    .dist-8km-choice:active {
      border-color: #C084FC;
      background: rgba(192, 132, 252, 0.12);
    }

    /* Selected state in the distance popup (shows current value) */
    .dist-choice-btn.selected {
      font-weight: 700;
      position: relative;
      justify-content: center;
    }

    .dist-4km-choice.selected {
      background: rgba(0, 229, 255, 0.18);
      border-color: #00E5FF;
      box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.3);
    }

    .dist-2km-choice.selected {
      background: rgba(74, 222, 128, 0.18);
      border-color: #4ADE80;
      box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.35);
    }

    .dist-6km-choice.selected {
      background: rgba(255, 109, 0, 0.18);
      border-color: #FF6D00;
      box-shadow: 0 0 0 1px rgba(255, 109, 0, 0.35);
    }

    .dist-8km-choice.selected {
      background: rgba(192, 132, 252, 0.18);
      border-color: #C084FC;
      box-shadow: 0 0 0 1px rgba(192, 132, 252, 0.35);
    }

    /* Tick icon on the right, text stays centered (same treatment as club picker) */
    .dist-choice-btn.selected::after {
      content: "\f00c";                  /* Font Awesome check */
      font-family: "Font Awesome 6 Free";
      font-weight: 900;
      position: absolute;
      right: 14px;
      top: 50%;
      transform: translateY(-50%);
      font-size: 1.05em;
      opacity: 0.9;
      color: #fff;
    }

/* === Record Tip (shown while clock running, before first record) === */
#recordTip {
  display: none;
  margin: 4px auto 14px;
  padding: 14px 20px;
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 8px;
  font-size: 0.9em;
}

/* === Distance badge under edit/delete buttons === */
.runner-actions-col .dist-badge {
  font-size: 0.68em !important;
  font-weight: 700;
  padding: 3px 7px !important;
  min-width: 36px !important;
  min-height: 18px !important;
  height: auto !important;
  line-height: 1 !important;
  border-radius: 5px;
  margin-top: 1px;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Horizontal edit + delete buttons (side by side) */
.runner-actions .edit-btn,
.runner-actions .delete-btn {
  padding: 3px 5px;
  line-height: 1;
  font-size: 0.88em;
}

/* Ensure name input fills the remaining space nicely */
.runner-main .name-input {
  width: 100%;
}

/* === Custom Club / Time Trial picker buttons === */
.trial-choice-btn {
  font-family: 'Inter', sans-serif;
  font-size: 1.0em;
  font-weight: 600;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  width: 100%;
  background: rgba(255,255,255,0.035);
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.1s ease;
  letter-spacing: 0.3px;
}
.trial-choice-btn:active {
  transform: scale(0.97);
  background: rgba(255,255,255,0.07);
}

/* Optional accent for selected state if we want to highlight later */
.trial-choice-btn.selected {
  background: rgba(0, 229, 255, 0.15);
  border-color: #00E5FF;
  color: #fff;
  font-weight: 700;
  position: relative;
  justify-content: center;
  padding-left: 16px;
  padding-right: 16px;
}

/* Tick / checkmark icon for the currently selected club - absolutely positioned on the right */
.trial-choice-btn.selected::after {
  content: "\f00c";                  /* Font Awesome check */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.05em;
  opacity: 0.9;
}

/* === Themed Club Buttons === */

/* Kearsney Striders - Maroon theme */
.trial-choice-btn.kearsney-striders {
  background: rgba(139, 21, 56, 0.18);
  border-color: rgba(139, 21, 56, 0.55);
  color: #f8d7da;
}
.trial-choice-btn.kearsney-striders:hover {
  background: rgba(139, 21, 56, 0.32);
  border-color: #8B1538;
}
.trial-choice-btn.kearsney-striders:active {
  background: rgba(139, 21, 56, 0.45);
}
.trial-choice-btn.kearsney-striders.selected {
  background: rgba(139, 21, 56, 0.42);
  border-color: #8B1538;
  color: #fff;
  font-weight: 700;
  position: relative;
}

/* Hillcrest Villagers - Brown theme */
.trial-choice-btn.hillcrest-villagers {
  background: rgba(139, 90, 43, 0.20);
  border-color: rgba(139, 90, 43, 0.55);
  color: #f5e8d3;
}
.trial-choice-btn.hillcrest-villagers:hover {
  background: rgba(139, 90, 43, 0.35);
  border-color: #8B5A2B;
}
.trial-choice-btn.hillcrest-villagers:active {
  background: rgba(139, 90, 43, 0.48);
}
.trial-choice-btn.hillcrest-villagers.selected {
  background: rgba(139, 90, 43, 0.45);
  border-color: #8B5A2B;
  color: #fff;
  font-weight: 700;
  position: relative;
}

/* Forest Hills - Green theme */
.trial-choice-btn.forest-hills {
  background: rgba(46, 125, 50, 0.18);
  border-color: rgba(46, 125, 50, 0.55);
  color: #d4edda;
}
.trial-choice-btn.forest-hills:hover {
  background: rgba(46, 125, 50, 0.32);
  border-color: #2E7D32;
}
.trial-choice-btn.forest-hills:active {
  background: rgba(46, 125, 50, 0.45);
}
.trial-choice-btn.forest-hills.selected {
  background: rgba(46, 125, 50, 0.40);
  border-color: #2E7D32;
  color: #fff;
  font-weight: 700;
  position: relative;
}

/* === Focus & Tap Highlight Styles (fixes lingering blue outline) === */
button:focus-visible,
.modal-btn:focus-visible,
.trial-choice-btn:focus-visible,
.dist-choice-btn:focus-visible,
.dist-badge:focus-visible,
.details-section .trial-display:focus-visible {
  outline: 2px solid #00E5FF;
  outline-offset: 2px;
}

/* Remove the default mobile tap flash / highlight */
button,
.modal-btn,
.trial-choice-btn,
.dist-choice-btn,
.dist-badge,
.details-section .trial-display {
  -webkit-tap-highlight-color: transparent;
}

/* === Manual Upload Results View === */
.manual-distance-section {
  max-width: 420px;
  margin: 14px auto;
  padding: 14px 12px 12px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
}

.manual-4km-section {
  border-color: rgba(0, 229, 255, 0.25);
}

.manual-8km-section {
  border-color: rgba(192, 132, 252, 0.3);
}

.manual-other-distances {
  max-width: 420px;
  margin: 14px auto;
}

.manual-other-distances-title {
  justify-content: center;
  margin-bottom: 4px;
}

.manual-2km-section {
  border-color: rgba(74, 222, 128, 0.3);
}

.manual-6km-section {
  border-color: rgba(255, 109, 0, 0.3);
}

.manual-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding: 0 4px;
}

.manual-section-title {
  font-size: 1.05em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dist-4km-title {
  color: #00E5FF;
}

.dist-2km-title {
  color: #4ADE80;
}

.dist-6km-title {
  color: #FF6D00;
}

.dist-8km-title {
  color: #C084FC;
}

.manual-section-count {
  color: #888;
  font-size: 0.78em;
  letter-spacing: 0.3px;
}

.manual-runner-list {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  max-width: 100%;
}

.manual-runner-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.manual-runner-list li:last-child {
  border-bottom: none;
}

.manual-pos {
  font-family: 'Roboto Mono', monospace;
  color: #FF6D00;
  font-weight: 700;
  font-size: 0.95em;
  min-width: 32px;
  text-align: center;
  flex-shrink: 0;
}

.manual-time-input {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.95em;
  width: 76px;
  padding: 7px 4px;
  text-align: center;
  flex-shrink: 0;
  color: #e2e8f0;
  letter-spacing: 0.5px;
  caret-color: #00E5FF;
}

.manual-name-input {
  flex: 1;
  min-width: 0;
  font-size: 0.82em;
  padding: 7px 10px;
  height: 34px;
  text-transform: uppercase;
  color: #e2e8f0;
  font-family: 'Inter', sans-serif;
}

.manual-delete-btn {
  color: #FC8181;
  background: rgba(252, 129, 129, 0.18);
  font-size: 0.88em;
  cursor: pointer;
  padding: 5px 7px;
  border-radius: 6px;
  touch-action: manipulation;
  flex-shrink: 0;
  line-height: 1;
}

.manual-delete-btn:active {
  background: rgba(252, 129, 129, 0.30);
}

.manual-add-btn {
  width: 100%;
  font-size: 0.92em;
  padding: 12px 14px;
  background: rgba(0, 229, 255, 0.06);
  color: #00E5FF;
  border: 1px dashed rgba(0, 229, 255, 0.45);
  border-radius: 8px;
  margin: 0;
  box-shadow: none;
}

.manual-add-btn:active {
  background: rgba(0, 229, 255, 0.12);
}

.manual-add-btn-8km {
  background: rgba(192, 132, 252, 0.08);
  color: #C084FC;
  border-color: rgba(192, 132, 252, 0.45);
}

.manual-add-btn-8km:active {
  background: rgba(192, 132, 252, 0.15);
}

.manual-add-btn-2km {
  background: rgba(74, 222, 128, 0.08);
  color: #4ADE80;
  border-color: rgba(74, 222, 128, 0.45);
}

.manual-add-btn-2km:active {
  background: rgba(74, 222, 128, 0.15);
}

.manual-add-btn-6km {
  background: rgba(255, 109, 0, 0.08);
  color: #FF6D00;
  border-color: rgba(255, 109, 0, 0.45);
}

.manual-add-btn-6km:active {
  background: rgba(255, 109, 0, 0.15);
}

.results-action-layout {
  display: flex;
  align-items: stretch;
  gap: 10px;
  max-width: 420px;
  width: 100%;
  margin: 14px auto 14px;
  padding: 0;
  box-sizing: border-box;
}

.results-action-layout--upload-only,
.results-action-layout--uploaded {
  flex-direction: column;
}

.results-upload-success {
  margin: 0;
  color: #68d391;
  font-size: 0.92rem;
  line-height: 1.45;
  text-align: center;
}

.results-upload-success i {
  margin-right: 0.35rem;
}

.results-upload-col--full,
.results-share-col--full {
  flex: 1;
  width: 100%;
  min-width: 0;
}

.results-share-col--full {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.results-share-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.results-action-layout--upload-only .results-upload-btn,
.results-action-layout--uploaded .results-view-btn {
  width: 100%;
}

.results-action-layout--uploaded .results-share-row .results-share-btn {
  flex: 1;
  width: auto;
  min-width: 0;
}

.results-share-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 38%;
  min-width: 0;
}

.results-upload-col {
  display: flex;
  flex: 1;
  min-width: 0;
}

.results-action-layout .modal-btn {
  margin: 0;
  border-radius: 8px;
}

.results-share-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  min-height: 42px;
  font-weight: 600;
  font-size: 0.8em;
  padding: 8px 6px;
  letter-spacing: 0.1px;
  white-space: nowrap;
}

.results-share-btn i {
  font-size: 1.05em;
}

.results-share-btn--whatsapp {
  background: #25D366;
  color: #ffffff;
}

.results-share-btn--facebook {
  background: #1877F2;
  color: #ffffff;
}

.results-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  background: #00E5FF;
  color: #0d0e15;
  border: none;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92em;
  padding: 10px 14px;
  letter-spacing: 0.1px;
  white-space: nowrap;
  box-sizing: border-box;
  box-shadow: 0 2px 10px rgba(0, 229, 255, 0.22);
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.results-view-btn:hover {
  background: #33ebff;
  color: #0d0e15;
  box-shadow: 0 8px 22px rgba(0, 229, 255, 0.34);
}

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

.results-view-btn i {
  font-size: 1.1em;
  flex-shrink: 0;
}

.results-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  background: #00E5FF;
  color: #0d0e15;
  border: none;
  font-size: 0.92em;
  font-weight: 700;
  padding: 12px 16px;
  line-height: 1.3;
  box-shadow: 0 2px 10px rgba(0, 229, 255, 0.22);
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.results-upload-btn:hover {
  background: #33ebff;
  box-shadow: 0 8px 22px rgba(0, 229, 255, 0.34);
}

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

.results-upload-btn i {
  font-size: 1.1em;
  flex-shrink: 0;
}

.manual-empty-hint {
  color: #666;
  font-size: 0.82em;
  padding: 10px 4px 4px;
  text-align: center;
  font-style: italic;
}

/* === Upload sign-in modal === */
.upload-signin-content {
  text-align: left;
}

.upload-signin-content h3 {
  text-align: center;
}

.upload-signin-content > p:first-of-type {
  text-align: center;
}

.upload-signin-field {
  margin-bottom: 14px;
}

.upload-signin-field label {
  display: block;
  color: #a0aec0;
  font-size: 0.82em;
  font-weight: 500;
  margin-bottom: 5px;
}

.upload-signin-input {
  width: 100%;
  font-size: 0.95em;
  padding: 10px 12px;
  height: 40px;
  box-sizing: border-box;
  text-transform: none;
  font-family: 'Inter', sans-serif;
  color: #e2e8f0;
}

.upload-signin-content .math-captcha {
  margin-bottom: 14px;
}

.upload-signin-content .math-captcha-label,
.upload-signin-content .math-captcha-hint {
  color: #a0aec0;
}

.upload-signin-content .math-captcha-hint {
  font-size: 0.82em;
  margin-bottom: 0.5rem;
}

.upload-signin-content .math-captcha-answer {
  flex: 1 1 auto;
  width: auto;
  font-size: 0.9em;
  padding: 0 12px;
  height: 48px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #e2e8f0;
  font-family: 'Inter', sans-serif;
}

.upload-signin-content .math-captcha-image-row {
  margin-bottom: 0;
}

.upload-signin-content .math-captcha-refresh {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  border-radius: 6px;
}

.upload-signin-form .modal-btn {
  width: 100%;
  margin-top: 4px;
}

.upload-register-prompt {
  text-align: center;
  color: #a0aec0;
  font-size: 0.88em;
  margin: 16px 0 0;
  line-height: 1.4;
}

.upload-register-prompt a {
  color: #00E5FF;
  text-decoration: none;
  font-weight: 600;
}

.upload-register-prompt a:active {
  text-decoration: underline;
}

.upload-cancel-note {
  text-align: center;
  color: #888;
  font-size: 0.78em;
  margin: 14px 0 0;
  line-height: 1.4;
}

.paywall-whatsapp-section {
  margin-top: 14px;
}

.paywall-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 12px;
  color: #666;
  font-size: 0.78em;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.paywall-divider::before,
.paywall-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.12);
}

.paywall-share-note {
  margin: 0 0 12px;
  color: #a0aec0;
  font-size: 0.82em;
  line-height: 1.45;
  text-align: center;
}

.paywall-skip-btn {
  width: 100%;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.paywall-share-actions {
  display: flex;
  gap: 8px;
}

.paywall-share-actions .modal-btn {
  flex: 1;
}

#paywall-title {
  text-align: center;
  margin-top: 0;
}