/* ─── Player-specific styles ─────────────────────────────────────── */
:root {
  --trail-colour: #1a9e6e; /* overridden by inline style in shell.html */
}

.player-body {
  background: #f5f5f5;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ─── Offline banner ────────────────────────────────────────────── */
.offline-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: #1f2937;
  color: #f9fafb;
  font-size: .85rem;
  font-weight: 600;
  text-align: center;
  padding: calc(.5rem + env(safe-area-inset-top, 0px)) 1rem .5rem;
  letter-spacing: .01em;
}
.offline-banner.hidden { display: none; }

/* ─── Screen system ─────────────────────────────────────────────── */
.screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-y: auto;
}
.screen.active { display: flex; }

/* ─── Player header ─────────────────────────────────────────────── */
.player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .8rem 1rem;
  padding-top: calc(.8rem + env(safe-area-inset-top, 0px));
  padding-left: calc(1rem + env(safe-area-inset-left, 0px));
  padding-right: calc(1rem + env(safe-area-inset-right, 0px));
  background: var(--trail-colour);
  color: white;
  position: sticky; top: 0; z-index: 50;
}
.player-header .trail-name {
  font-weight: 700;
  font-size: 1rem;
  flex: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 .5rem;
}
.back-link, .icon-btn {
  color: white;
  background: none; border: none; cursor: pointer;
  padding: .45rem;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  min-width: 42px; min-height: 42px;
  gap: .3rem;
  transition: background .15s;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.back-link {
  padding: .45rem .6rem;
  font-weight: 600; font-size: .85rem;
}
.back-link:hover, .icon-btn:hover { background: rgba(255,255,255,.18); text-decoration: none; }
.back-link svg, .icon-btn svg { width: 22px; height: 22px; flex-shrink: 0; }

/* Tool buttons (Map / Decoder) shown in header */
.player-tools { display: flex; gap: .5rem; align-items: center; }
.tool-btn {
  display: flex; flex-direction: column; align-items: center; gap: .15rem;
  color: white;
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.25);
  cursor: pointer; padding: .45rem .65rem;
  border-radius: 10px;
  min-width: 56px; min-height: 48px;
  white-space: nowrap; transition: background .15s, border-color .15s;
}
.tool-btn:hover { background: rgba(255,255,255,.28); border-color: rgba(255,255,255,.45); }
.tool-btn.hidden { display: none; }
.tool-btn svg { width: 24px; height: 24px; flex-shrink: 0; }
.tool-btn__label { font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; opacity: .9; margin-top: .05rem; }

/* ─── Entry screen ──────────────────────────────────────────────── */
.entry-content { padding: 2rem 1rem; max-width: 480px; margin: 0 auto; text-align: center; }
.entry-hero { width: 100%; max-height: 260px; object-fit: cover; border-radius: 12px; margin-bottom: 1.5rem; }
.entry-title { font-size: 1.6rem; font-weight: 800; margin-bottom: .3rem; }
.entry-subtitle { color: #666; margin-bottom: 1.5rem; }
.code-entry { text-align: left; background: white; border-radius: 12px; padding: 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.code-entry label { font-weight: 600; display: block; margin-bottom: .5rem; }
.code-entry input {
  width: 100%; padding: .8rem 1rem; border: 2px solid #e5e7eb;
  border-radius: 8px; font-size: 1.4rem; text-align: center;
  letter-spacing: .15em; margin-bottom: 1rem;
}
.code-entry input:focus { outline: none; border-color: var(--trail-colour); }
.code-entry .btn { width: 100%; margin-bottom: .8rem; }
.code-hint { font-size: .85rem; color: #666; text-align: center; }
.player-header + .entry-content { padding-top: 1.5rem; }

/* ─── Loading screen ────────────────────────────────────────────── */
.loading-content { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 2rem; }
.spinner { width: 48px; height: 48px; border: 4px solid #e5e7eb; border-top-color: var(--trail-colour); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Intro screen ──────────────────────────────────────────────── */
.intro-content { flex: 1; padding: 1.5rem 1rem; max-width: 600px; margin: 0 auto; width: 100%; }
.intro-content h2 { font-size: 1.4rem; margin-bottom: .5rem; }
.trail-meta { color: #666; font-size: .9rem; margin-bottom: 1rem; }
.intro-text { margin-bottom: 1rem; }
.intro-footer { padding: 1rem; padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid #e5e7eb; background: white; }

/* ─── Progress ──────────────────────────────────────────────────── */
.progress-bar-wrapper { background: #e5e7eb; height: 6px; }
.progress-bar { height: 6px; background: var(--trail-colour); transition: width .4s; width: 0; }
.progress-summary { padding: .8rem 1rem; font-size: .95rem; background: white; border-bottom: 1px solid #e5e7eb; }

/* ─── Stamp board ───────────────────────────────────────────────── */
.stamp-board {
  display: flex; flex-wrap: wrap; gap: .5rem; padding: 1rem;
  background: white; border-bottom: 1px solid #e5e7eb;
}
.stamp-slot {
  width: 48px; height: 48px; border-radius: 50%;
  border: 2px dashed #d1d5db; background: #f9fafb;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: #9ca3af; overflow: hidden;
  transition: all .2s;
}
.stamp-slot--filled { border-color: var(--trail-colour); background: var(--trail-colour); color: white; border-style: solid; }
.stamp-slot img { width: 100%; height: 100%; object-fit: cover; }

/* ─── Clue list ─────────────────────────────────────────────────── */
.clue-list { padding: .5rem; overflow-y: auto; }
.clue-card {
  display: flex; align-items: center; gap: 1rem; padding: 1rem;
  background: white; border-radius: 10px; margin-bottom: .5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.06); cursor: pointer;
  transition: box-shadow .15s, transform .1s;
  border: 1px solid #e5e7eb;
}
.clue-card:hover:not(.clue-card--locked) { box-shadow: 0 4px 12px rgba(0,0,0,.1); transform: translateX(2px); }
.clue-card--solved { border-color: var(--trail-colour); background: #f0fdf4; }
.clue-card--locked { opacity: .6; cursor: default; }
.clue-card__number {
  width: 36px; height: 36px; border-radius: 50%; background: var(--trail-colour);
  color: white; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; flex-shrink: 0;
}
.clue-card__body { flex: 1; min-width: 0; }
.clue-card__body h3 { font-size: 1rem; margin-bottom: .2rem; }
.clue-location { font-size: .8rem; color: #6b7280; }
.clue-card__status { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; flex-shrink: 0; }
.clue-card__status svg { width: 22px; height: 22px; }

/* ─── Clue detail ───────────────────────────────────────────────── */
.clue-content { padding: 1.2rem 1rem; flex: 1; max-width: 600px; margin: 0 auto; width: 100%; }
.clue-image { width: 100%; max-height: 280px; object-fit: cover; border-radius: 10px; margin-bottom: 1rem; }
.clue-content h2 { font-size: 1.3rem; margin-bottom: .3rem; }
.clue-prompt { margin: 1rem 0; font-size: 1.05rem; line-height: 1.7; }
.clue-audio { width: 100%; margin: .8rem 0; }
.solved-banner { background: #dcfce7; color: #166534; padding: .6rem 1rem; border-radius: 8px; font-weight: 600; margin: .8rem 0; }
.hints-panel { margin-top: 1rem; background: #fffbeb; border: 1px solid #fcd34d; border-radius: 8px; padding: .8rem 1rem; }
.hints-panel summary { font-weight: 600; cursor: pointer; color: #92400e; }
.hint-text { margin-top: .5rem; color: #78350f; }

/* ─── Answer input ──────────────────────────────────────────────── */
.clue-answer-section { padding: 1rem; padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid #e5e7eb; background: white; position: sticky; bottom: 0; }
.answer-input-group { display: flex; gap: .5rem; margin-bottom: .5rem; }
.answer-input-group input { flex: 1; padding: .7rem 1rem; border: 2px solid #e5e7eb; border-radius: 8px; font-size: 1rem; }
.answer-input-group input:focus { outline: none; border-color: var(--trail-colour); }
.answer-feedback { font-size: .9rem; margin-top: .3rem; padding: .4rem .6rem; border-radius: 6px; }
.answer-feedback--wrong { background: #fef2f2; color: #dc2626; }
.mc-options { display: flex; flex-direction: column; gap: .5rem; }
.mc-option { background: white; border: 2px solid #e5e7eb; border-radius: 8px; padding: .8rem 1rem; cursor: pointer; font-size: 1rem; text-align: left; transition: border-color .15s; }
.mc-option:hover { border-color: var(--trail-colour); }

/* ─── Success / reward flash ────────────────────────────────────── */
.success-content { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.reward-flash { text-align: center; max-width: 360px; }
.reward-icon { width: 120px; height: 120px; margin: 0 auto 1rem; border-radius: 50%; object-fit: cover; border: 4px solid var(--trail-colour); }
.reward-icon--placeholder { width: 120px; height: 120px; background: var(--trail-colour); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 3rem; margin: 0 auto 1rem; border: none; }
.reward-flash h2 { font-size: 1.6rem; margin-bottom: .5rem; }
.reward-name { color: #6b7280; }
.success-footer { padding: 1rem; padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid #e5e7eb; }
.success-footer .btn { width: 100%; }

/* ─── Unlock content ────────────────────────────────────────────── */
.unlock-content { padding: 1.5rem 1rem; max-width: 600px; margin: 0 auto; flex: 1; }
.unlock-image { width: 100%; border-radius: 10px; margin-bottom: 1rem; }
.unlock-text { line-height: 1.7; }

/* ─── Final challenge ───────────────────────────────────────────── */
.final-content { padding: 1.5rem 1rem; max-width: 600px; margin: 0 auto; flex: 1; }
.final-prompt { font-size: 1.1rem; line-height: 1.7; margin-top: .8rem; }
.final-answer-section { padding: 1rem; padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid #e5e7eb; background: white; position: sticky; bottom: 0; }
.final-answer-section .answer-input-group { flex-direction: column; }
.final-answer-section input { width: 100%; font-size: 1.2rem; text-align: center; letter-spacing: .1em; }

/* ─── Certificate ───────────────────────────────────────────────── */
.certificate-content { flex: 1; padding: 2rem 1rem; display: flex; align-items: flex-start; justify-content: center; }
.certificate { max-width: 600px; width: 100%; background: white; border: 3px solid var(--trail-colour); border-radius: 16px; padding: 2rem; text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.certificate-image { width: 100%; border-radius: 10px; margin-bottom: 1.5rem; }
.certificate-title { font-size: 1.8rem; color: var(--trail-colour); margin-bottom: 1rem; }
.certificate-text { margin: 1rem 0; line-height: 1.7; }
.voucher-code { background: #f0fdf4; border: 2px dashed var(--trail-colour); border-radius: 8px; padding: 1rem; margin: 1rem 0; font-size: 1.3rem; letter-spacing: .1em; }
.prize-instructions { margin: 1rem 0; color: #4b5563; }

/* ─── Overlays (map + decoder) ──────────────────────────────────── */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 200; display: flex; align-items: flex-end; }
.overlay.hidden { display: none; }
.overlay-panel {
  background: #fafafa; border-radius: 24px 24px 0 0;
  padding: 1.2rem 1.4rem calc(1.8rem + env(safe-area-inset-bottom, 0px));
  width: 100%; max-height: 90vh; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.overlay-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.overlay-header h3 { font-size: 1.15rem; font-weight: 700; display: flex; align-items: center; gap: .45rem; }
.overlay-close-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #f3f4f6; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s; color: #374151; flex-shrink: 0;
}
.overlay-close-btn:hover { background: #e5e7eb; }
.overlay-close-btn svg { width: 18px; height: 18px; }

/* Map overlay */
.overlay-panel--map { max-height: 92vh; }
.map-actions { margin-bottom: .4rem; }

/* Map location list */
.map-location-item {
  display: flex; align-items: center; gap: .8rem;
  padding: .8rem 0; border-bottom: 1px solid #f3f4f6;
}
.map-location-item:last-child { border-bottom: none; }
.map-location-num {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--trail-colour); color: white;
  font-weight: 700; font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
}
.map-location-num--solved { background: #16a34a; }
.map-location-info { flex: 1; min-width: 0; }
.map-location-title { font-weight: 600; font-size: .95rem; }
.map-location-label { font-size: .82rem; color: #6b7280; margin-top: .1rem; }
.map-navigate-btn {
  display: inline-block; padding: .4rem .8rem;
  background: var(--trail-colour); color: white; border-radius: 20px;
  font-size: .8rem; font-weight: 700; text-decoration: none; white-space: nowrap;
  flex-shrink: 0;
}
.map-navigate-btn:hover { opacity: .85; text-decoration: none; }

/* Navigate button on clue list cards */
.clue-card__map-link {
  display: inline-block; margin-top: .3rem;
  font-size: .78rem; font-weight: 700; color: var(--trail-colour);
  text-decoration: none;
}
.clue-card__map-link:hover { text-decoration: underline; }

/* Navigate button on clue detail */
.clue-navigate-btn {
  display: block; width: 100%; text-align: center;
  padding: .7rem 1rem; margin: .6rem 0 1rem;
  background: var(--trail-colour); color: white;
  border-radius: var(--radius, 8px); font-weight: 700;
  text-decoration: none; font-size: .95rem;
}
.clue-navigate-btn:hover { opacity: .85; text-decoration: none; }

/* Decoder overlay */
.decoder-hint {
  font-size: .9rem; color: #4b5563; margin-bottom: 1rem;
  background: #f0fdf4; padding: .6rem .9rem; border-radius: 8px;
  border-left: 3px solid var(--trail-colour);
}

/* Caesar cipher table */
.decoder-table { width: 100%; border-collapse: collapse; font-size: .85rem; overflow-x: auto; display: block; border-radius: 8px; overflow: hidden; -webkit-overflow-scrolling: touch; }
.decoder-table th, .decoder-table td { padding: .4rem .3rem; text-align: center; border: 1px solid #e5e7eb; min-width: 30px; }
.decoder-table th { background: var(--trail-colour); color: white; font-weight: 700; }
.decoder-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 1rem; gap: .5rem; }

/* Symbol / rune decoder grid — modern card style */
.symbol-decoder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: .6rem; margin-top: .5rem;
}
.symbol-decoder-cell {
  display: flex; flex-direction: column; align-items: center;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  border-radius: 12px; padding: .7rem .3rem .5rem; gap: .3rem;
  transition: transform .1s;
}
.symbol-decoder-cell:active { transform: scale(.95); }
.symbol-decoder-symbol {
  font-size: 2rem; line-height: 1; min-height: 2.2rem;
  display: flex; align-items: center; justify-content: center;
}
.symbol-decoder-letter {
  font-size: .7rem; font-weight: 800; color: var(--trail-colour);
  text-transform: uppercase; letter-spacing: .05em;
  background: #f0fdf4; padding: .15rem .4rem; border-radius: 4px;
}

/* ─── GPS indicator ─────────────────────────────────────────────── */
.gps-indicator {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #f0fdf4;
  border: 2px solid #86efac;
  border-radius: 14px;
  padding: 1rem 1.2rem;
  margin: 1rem 0;
  overflow: hidden;
  transition: background .4s, border-color .4s;
}
.gps-indicator--in-range {
  background: #dcfce7;
  border-color: var(--trail-colour, #1a9e6e);
}
.gps-indicator--error {
  background: #fef2f2;
  border-color: #fca5a5;
}
.gps-body {
  display: flex;
  align-items: center;
  gap: .8rem;
  position: relative;
  z-index: 1;
}
.gps-icon { width: 2.2rem; height: 2.2rem; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--trail-colour, #1a9e6e); }
.gps-icon svg { width: 100%; height: 100%; }
.gps-info { display: flex; flex-direction: column; gap: .2rem; }
.gps-label { font-size: .85rem; color: #374151; font-weight: 600; }
.gps-distance {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--trail-colour, #1a9e6e);
  letter-spacing: -.02em;
  transition: color .3s;
}
.gps-indicator--error .gps-distance { color: #ef4444; font-size: .9rem; font-weight: 600; }
.gps-accuracy { font-size: .75rem; color: #9ca3af; }

/* Pulsing ring behind the indicator */
@keyframes gps-pulse {
  0%   { transform: scale(1); opacity: .6; }
  70%  { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}
.gps-pulse-ring {
  position: absolute;
  top: 50%; left: 1.6rem;
  width: 2rem; height: 2rem;
  margin-top: -1rem; margin-left: -1rem;
  border-radius: 50%;
  background: var(--trail-colour, #1a9e6e);
  opacity: 0;
  animation: gps-pulse 2s ease-out infinite;
  pointer-events: none;
}
.gps-indicator--in-range .gps-pulse-ring { animation: none; }

/* Locked answer inputs */
.gps-locked-overlay button:disabled,
.answer-input-group input:disabled,
.answer-input-group button:disabled {
  opacity: .45;
  cursor: not-allowed;
  filter: grayscale(.5);
}

/* ─── Geocaching ─────────────────────────────────────────────────── */
.geocache-nav-prompt {
  background: #f0fdf4;
  border-left: 4px solid var(--trail-colour, #1a9e6e);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin: 1rem 0;
  font-size: .95rem;
  color: #374151;
}

/* Approach description — slides up on GPS arrival */
.approach-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
  background: #fffbeb;
  border: 2px solid #fcd34d;
  border-radius: 14px;
  padding: 1.2rem 1.4rem;
  margin: 1rem 0;
}
.approach-reveal--visible {
  opacity: 1;
  transform: translateY(0);
}
.approach-header {
  font-weight: 800;
  font-size: 1.1rem;
  color: #92400e;
  margin-bottom: .5rem;
}
.approach-text {
  font-size: 1rem;
  color: #374151;
  line-height: 1.6;
  margin: 0;
}

/* Navigate to next clue button on success screen */
.geocache-nav-btn {
  display: block;
  margin: 1.2rem auto 0;
  max-width: 320px;
  text-align: center;
  text-decoration: none;
}

/* Geocaching status label on clue cards */
.clue-card__geocache-status {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  color: var(--trail-colour, #1a9e6e);
  margin-top: .2rem;
}

/* ─── Celebrations ──────────────────────────────────────────────── */

/* Badge pop-in on the success screen */
@keyframes reward-pop {
  0%   { transform: scale(0) rotate(-15deg); opacity: 0; }
  60%  { transform: scale(1.35) rotate(8deg); opacity: 1; }
  80%  { transform: scale(0.9) rotate(-3deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.reward-icon--pop {
  animation: reward-pop 0.65s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

/* Stamp bounce when newly collected badge appears in the stamp board */
@keyframes stamp-drop-in {
  0%   { transform: scale(0) rotate(-12deg); opacity: 0; }
  65%  { transform: scale(1.25) rotate(6deg); opacity: 1; }
  85%  { transform: scale(0.92); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.stamp-slot--new {
  animation: stamp-drop-in 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

/* Ripple celebration */
@keyframes celeb-ripple {
  0%   { transform: translate(-50%, -50%) scale(0); opacity: 0.65; }
  100% { transform: translate(-50%, -50%) scale(9); opacity: 0; }
}
.celeb-ripple {
  position: fixed;
  top: 50%; left: 50%;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--trail-colour, #1a9e6e) 0%, transparent 70%);
  animation: celeb-ripple 1s ease-out forwards;
  pointer-events: none;
  z-index: 9999;
}

/* Star shower */
@keyframes celeb-star {
  0%   { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-130px) scale(0); opacity: 0; }
}
.celeb-star {
  position: absolute;
  font-size: 1.6rem;
  line-height: 1;
  animation: celeb-star 1s ease-out forwards;
  pointer-events: none;
  z-index: 100;
}

/* ─── Print (certificate) ───────────────────────────────────────── */
@media print {
  .player-header, .success-footer, .btn { display: none !important; }
  .certificate { border: 3px solid #1a9e6e; box-shadow: none; }
}

/* ─── Timer ─────────────────────────────────────────────────────── */
.trail-timer {
  font-family: monospace;
  font-size: 1rem;
  font-weight: 800;
  color: white;
  background: rgba(0,0,0,.2);
  padding: .2rem .6rem;
  border-radius: 6px;
  letter-spacing: .05em;
  min-width: 3.5rem;
  text-align: center;
  margin-left: .5rem;
}
.trail-timer.hidden { display: none; }

/* ─── Team name entry screen ─────────────────────────────────────── */
.team-entry-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  flex: 1;
  text-align: center;
}
.team-entry-icon { font-size: 4rem; margin-bottom: 1rem; }
.team-entry-heading { font-size: 1.8rem; font-weight: 800; margin-bottom: .5rem; }
.team-entry-sub { color: #6b7280; margin-bottom: 2rem; max-width: 340px; line-height: 1.5; }
.team-entry-form { width: 100%; max-width: 340px; }
/* ─── Team name availability feedback ───────────────────────────── */
.team-name-feedback {
  min-height: 1.3rem;
  font-size: .85rem;
  margin-bottom: .3rem;
  transition: color .15s;
}
.team-name-feedback--checking { color: #9ca3af; }
.team-name-feedback--ok       { color: #16a34a; font-weight: 600; }
.team-name-feedback--taken    { color: #dc2626; font-weight: 600; }

.timing-toggle-label {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .95rem;
  color: #374151;
  cursor: pointer;
  padding: .6rem 0;
  user-select: none;
}
.timing-toggle-label input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  accent-color: var(--trail-colour, #1a9e6e);
  cursor: pointer;
  flex-shrink: 0;
}

/* ─── Inline SVG icon helpers ───────────────────────────────────── */
.icon-sm { width: 15px; height: 15px; vertical-align: -2px; flex-shrink: 0; display: inline-block; }
.icon-md { width: 20px; height: 20px; vertical-align: -4px; flex-shrink: 0; display: inline-block; }

/* ─── Completion time banner ─────────────────────────────────────── */
.completion-time-banner {
  background: linear-gradient(135deg, #1a9e6e 0%, #059669 100%);
  color: white;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
.completion-time-value { font-size: 3rem; font-weight: 900; font-family: monospace; letter-spacing: -.02em; }
.completion-time-label { font-size: 1rem; opacity: .9; margin-top: .3rem; }
.completion-time-rank { font-size: .9rem; opacity: .8; margin-top: .2rem; }

/* ─── Mobile optimisations ──────────────────────────────────────── */
@media (max-width: 600px) {
  /* Let long trail titles wrap fully — never clip */
  .player-header .trail-name {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    font-size: .9rem;
    line-height: 1.3;
  }
}

@media (max-width: 420px) {
  /* Hide tool button labels to save header space */
  .tool-btn__label { display: none; }
  .tool-btn { min-width: 44px; min-height: 44px; padding: .5rem; }

  /* Slightly smaller back link text */
  .back-link { font-size: .8rem; }

  /* Stamp board: larger slots on touch */
  .stamp-slot { width: 44px; height: 44px; }

  /* Full-width buttons on tiny screens */
  .btn-large { width: 100%; }
}

@media (max-width: 380px) {
  /* Extra-tight: shrink timer font */
  .trail-timer { font-size: .85rem; min-width: 3rem; padding: .15rem .45rem; }
}
