/* 🏃 Τρεχάλας (js/trexalas.js): όλη η οθόνη για τη σκηνή — να φαίνεται και από τα τελευταία θρανία */
html.trx-on #coach { display: none; }
.trx { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; background: #8fd0f5; color: #263238; user-select: none; }
.trx-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.trx-hud { position: absolute; top: 12px; left: 14px; right: 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; pointer-events: none; }
.trx-hud > * { pointer-events: auto; }
.trx-left { display: flex; flex-direction: column; gap: 8px; flex: 0 0 200px; min-width: 0; align-items: flex-start; }
.trx-cls { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.92); border-radius: 16px; padding: 6px 8px 6px 14px; font-weight: 700; box-shadow: 0 3px 10px rgba(0,0,0,.18); }
.trx-cls select { font: inherit; font-size: 26px; font-weight: 800; border: 2px solid #b0bec5; border-radius: 12px; padding: 2px 6px; background: #fff; color: #00695c; cursor: pointer; min-width: 84px; }
.trx-btn { font: inherit; font-weight: 700; border: 0; border-radius: 13px; padding: 8px 14px; background: rgba(255,255,255,.92); color: #263238; cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.18); }
.trx-btn:hover { background: #fff; }
.trx-btn.go { background: #00897b; color: #fff; }
.trx-btn.go:hover { background: #00796b; }
.trx-btn.warn { background: #fff3e0; color: #bf360c; }

.trx-score { text-align: center; background: rgba(255,255,255,.92); border-radius: 22px; padding: 6px 26px 8px; box-shadow: 0 4px 14px rgba(0,0,0,.2); min-width: 210px; }
.trx-score small { display: block; font-size: 14px; font-weight: 700; color: #546e7a; }
.trx-score b { display: block; font-size: 56px; line-height: 1.05; font-weight: 900; color: #00695c; font-variant-numeric: tabular-nums; }

.trx-rank { flex: 0 0 200px; min-width: 0; background: rgba(255,255,255,.9); border-radius: 16px; padding: 8px 12px; box-shadow: 0 3px 10px rgba(0,0,0,.18); }
.trx-rank h4 { margin: 0 0 4px; font-size: 14px; color: #37474f; }
.trx-row { display: flex; align-items: center; gap: 6px; font-size: 14px; padding: 1px 4px; border-radius: 7px; }
.trx-row.me { background: #b2dfdb; font-weight: 800; }
.trx-pos { width: 24px; text-align: center; flex: none; }
.trx-nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trx-row b { font-variant-numeric: tabular-nums; }

/* Ένδειξη φασαρίας + όριο */
.trx-meterbox { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(620px, 74%); display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.9); border-radius: 18px; padding: 8px 12px; box-shadow: 0 3px 10px rgba(0,0,0,.2); }
.trx-m-ico { font-size: 24px; line-height: 1; }
.trx-meter { position: relative; flex: 1; height: 20px; border-radius: 10px; background: #dfe6e9; overflow: visible; }
.trx-meter i { position: absolute; inset: 0; border-radius: 10px; background: #43a047; transform: scaleX(0); transform-origin: left center; }
.trx-meter b { position: absolute; top: -6px; bottom: -6px; width: 5px; margin-left: -2.5px; border-radius: 3px; background: #b71c1c; box-shadow: 0 0 0 1.5px #fff; left: 60%; }
.warn > .trx-meter i, .trx-meter.warn i { background: #fb8c00; }
.over > .trx-meter i, .trx-meter.over i { background: #e53935; }
.trx-meter.big { flex: none; height: 26px; margin: 8px 0 10px; }
.trx-meter.big i { border-radius: 13px; }

/* Μηνύματα πάνω στη σκηνή */
.trx-banner { position: absolute; left: 50%; top: 32%; transform: translateX(-50%); width: max-content; max-width: 80%; text-align: center; font-size: 28px; font-weight: 800; padding: 12px 26px; border-radius: 20px; background: rgba(255,255,255,.95); box-shadow: 0 6px 22px rgba(0,0,0,.28); pointer-events: none; }
.trx-banner.bad { color: #b71c1c; }
.trx-banner.good { color: #00695c; }
.trx-msg { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: min(560px, 86%); text-align: center; font-size: 19px; line-height: 1.45; padding: 18px 22px; border-radius: 20px; background: rgba(255,255,255,.97); box-shadow: 0 8px 26px rgba(0,0,0,.3); }
.trx-msg small { color: #546e7a; font-size: 14px; }
.trx-msg .trx-btn { margin-top: 12px; }

/* Ρυθμίσεις */
.trx-panel { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(620px, 94%); max-height: 94%; overflow: auto; background: #fff; border-radius: 22px; padding: 16px 22px; box-shadow: 0 12px 40px rgba(0,0,0,.4); }
.trx-panel h3 { margin: 0 0 8px; font-size: 21px; padding-right: 30px; }
.trx-panel h4 { margin: 0 0 6px; font-size: 16px; }
.trx-panel section { padding: 10px 0; border-top: 1px solid #eceff1; }
.trx-hint { margin: 0; font-size: 13.5px; color: #546e7a; }
.trx-x { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #eceff1; font-size: 16px; cursor: pointer; }
.trx-x:hover { background: #cfd8dc; }
#trx-thr { display: block; width: 100%; margin: 0; accent-color: #b71c1c; cursor: pointer; }
.trx-now { display: flex; justify-content: space-between; font-size: 14px; margin-top: 4px; }
.trx-dead { margin: 6px 0 0; font-size: 13.5px; font-weight: 700; color: #bf360c; }
#trx-mic { width: 100%; font: inherit; font-size: 14px; padding: 6px 8px; border: 2px solid #b0bec5; border-radius: 10px; background: #fff; }
.trx-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.trx-chip { display: inline-flex; align-items: center; gap: 4px; background: #e0f2f1; border-radius: 12px; padding: 3px 4px 3px 11px; font-weight: 700; }
.trx-chip.on { background: #80cbc4; }
.trx-chip button { width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(0,0,0,.09); font-size: 11px; cursor: pointer; }
.trx-chip button:hover { background: #ef9a9a; }
.trx-add { display: flex; gap: 8px; }
.trx-add input { flex: 1; min-width: 0; font: inherit; padding: 6px 10px; border: 2px solid #b0bec5; border-radius: 10px; }
.trx-add .trx-btn { box-shadow: none; background: #e0f2f1; }
.trx-reset { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-bottom: 2px !important; }
.trx-reset .trx-btn { box-shadow: none; }

@media (max-height: 620px) {
  .trx-score b { font-size: 38px; }
  .trx-score { min-width: 150px; padding: 3px 16px 5px; }
  .trx-row { font-size: 12px; }
  .trx-banner { font-size: 22px; top: 26%; }
  .trx-panel { padding: 10px 18px; max-height: 96%; }
  .trx-panel h3 { font-size: 18px; margin-bottom: 4px; }
  .trx-panel section { padding: 6px 0; }
  .trx-panel .trx-hint { display: none; }
  .trx-meter.big { margin: 6px 0; height: 20px; }
}
@media (max-width: 760px) {
  .trx-rank { display: none; }
  .trx-left { flex: 0 0 auto; }
  .trx-score { min-width: 130px; }
  .trx-score b { font-size: 34px; }
}
