/* ===== Original look (QEW 90K calculator) ===== */
:root{--p:#2563eb;--s:#10b981;--g:#6b7280;--d:#ef4444;--cot-ok:#10b981;--cot-fail:#ef4444;--warn:#d97706}
body{font-family:Segoe UI,sans-serif;background:#f3f4f6;margin:0;padding:20px;color:#1f2937}
.c{max-width:900px;margin:auto;background:#fff;border-radius:12px;box-shadow:0 4px 20px rgba(0,0,0,.1);overflow:hidden;position:relative}
header{background:var(--p);color:#fff;padding:1.5rem;text-align:center;position:relative}
h1{margin:0;font-size:1.8rem}
.i{font-size:.9rem;opacity:.9;margin-top:.5rem}
.n{padding:2rem}
.g{margin-bottom:1.2rem}
label{display:block;margin-bottom:.4rem;font-weight:600;color:var(--g);font-size:0.95rem}
input,select{border:1px solid #d1d5db;border-radius:8px;font-size:1rem;box-sizing:border-box;font-family:inherit;background:#fff;color:inherit}
input.e{border-color:var(--d)}
button{background:var(--p);color:#fff;border:none;padding:.75rem 1.5rem;border-radius:8px;font-size:1rem;cursor:pointer;margin-top:1rem;width:100%;font-family:inherit}
button:hover{background:#1d4ed8}
button:disabled{opacity:.6;cursor:wait}
.share-btn{background:#10b981;color:#fff;margin-top:.5rem}
.share-btn:hover{background:#059669}
table{width:100%;border-collapse:collapse;margin-top:1.5rem;font-size:1rem;min-width:700px}
th{background:#f8fafc;padding:.8rem;text-align:left;border-bottom:2px solid #e5e7eb;color:var(--g);font-weight:600}
td{padding:.8rem;border-bottom:1px solid #e5e7eb;font-size:0.95rem}
tr:hover{background:#f9fafb}
.h{font-weight:bold}
.cot-ok{color:var(--cot-ok)}
.cot-fail{color:var(--cot-fail);font-weight:bold}
.cot-tight{color:var(--warn);font-weight:bold}
.t{background:#ecfdf5;font-weight:bold}
.total-left{text-align:left}
.total-center{text-align:center}
.total-right{text-align:right}
.o{font-size:.85rem;color:var(--g);margin-top:1rem}
.lang-switch{position:absolute;top:10px;right:10px;font-size:0.9rem;z-index:10;color:#fff}
.lang-link{color:#fff;text-decoration:underline;cursor:pointer;margin:0 5px;font-weight:600}
.lang-link.active{color:#fbbf24}

.input-row{display:flex;gap:1.5rem;align-items:flex-end;margin-bottom:1.8rem;flex-wrap:wrap}
.input-group{flex:1;min-width:220px;display:flex;flex-direction:column}
.input-group label{margin-bottom:0.35rem}

.pace-row{display:flex;gap:0.5rem;align-items:center}
.pace-input{flex:1;min-width:0;padding:0.65rem 0.8rem;font-size:0.95rem}
.pace-row .pace-input{flex:1 1 auto;width:auto;font-variant-numeric:tabular-nums}
.pace-row .name-input{flex:1.4 1 auto}
.unit-box{box-sizing:border-box;flex:none;white-space:nowrap;padding:0.65rem 0.8rem;font-size:0.85rem;background:#f3f4f6;border:1px solid #d1d5db;border-radius:8px;text-align:center;color:#6b7280}

.result-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem;padding:0 8px;font-weight:600}
.team-name{color:var(--p);font-size:1.25rem;font-weight:700}
.by-arj{font-size:0.9rem;color:#4b5563;text-align:right;line-height:1.3}

#capture-area{padding:15px;background:#fff;border:1px solid #e5e7eb;border-radius:10px;box-shadow:0 2px 8px rgba(0,0,0,.05);overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}

.pace-head{display:flex;justify-content:space-between;align-items:center;gap:.5rem;margin-bottom:.4rem}
.pace-head label{margin:0}
.unit-switch{display:inline-flex;gap:2px;padding:3px;background:#e5e7eb;border-radius:8px;flex:none}
.unit-switch button{width:auto;margin:0;padding:.3rem .85rem;background:transparent;color:var(--g);font-size:.85rem;font-weight:600;border-radius:6px}
.unit-switch button:hover{background:rgba(0,0,0,.06)}
.unit-switch button[aria-pressed=true]{background:#fff;color:var(--p);box-shadow:0 1px 2px rgba(0,0,0,.12)}
.theme-toggle{position:absolute;top:2px;left:8px;z-index:10;width:36px;height:36px;margin:0;padding:0;border-radius:50%;background:transparent;color:#fff;display:grid;place-items:center}
.theme-toggle:hover{background:rgba(255,255,255,.18)}
.theme-toggle svg{width:22px;height:22px}
.qa-link{position:absolute;top:10px;left:46px;z-index:10;font-size:0.9rem;margin:0;text-decoration-skip-ink:none}

/* ===== Additions for the paid version ===== */
.plan-pill{width:auto;margin:.8rem 0 0;padding:.25rem .9rem;border-radius:999px;font-size:.8rem;font-weight:700;letter-spacing:.04em;background:rgba(255,255,255,.18);color:#fff}
.plan-pill:hover{background:rgba(255,255,255,.3)}
.plan-pill.pro{background:#fbbf24;color:#1f2937}
.tag{font-size:.65rem;background:#fbbf24;color:#1f2937;padding:1px 6px;border-radius:5px;vertical-align:middle;font-weight:700}
body.is-pro .tag{display:none}
select.pace-input,.pace-input.full{width:100%}
.ghost{background:transparent;color:var(--p);border:1px solid #c7d2fe}
.ghost:hover{background:#eef2ff}
.slim{width:auto}
.btn-row{display:flex;gap:.5rem;flex-wrap:wrap}
.btn-row>button,.btn-row>label{flex:1;margin-top:.5rem}
.file-btn{display:flex;align-items:center;justify-content:center;border-radius:8px;padding:.75rem 1rem;cursor:pointer;font-size:1rem;font-weight:400;margin-bottom:0}
.pro{border:1px dashed #c7d2fe;border-radius:10px;padding:.8rem 1rem;margin-bottom:.5rem}
.pro summary{cursor:pointer;font-weight:600;color:var(--g)}
.pro[open] summary{margin-bottom:1rem}
.input-row.tight{margin-bottom:1rem;gap:1rem}
.input-row.tight .input-group{min-width:140px}
.check{display:flex;align-items:center;gap:.5rem;font-weight:500;margin-bottom:.8rem}
.check input{width:auto;margin:0}
.check.live{margin-top:1rem}
.cot-note{color:#dc2626;font-weight:600}
.msg{color:var(--p);min-height:1.1em}
.msg.err{color:var(--d)}
.cot-box{display:flex;flex-direction:column;gap:.35rem;padding:0 8px;font-size:.92rem}
.cot-box .tip{font-size:.82rem;color:var(--g);font-weight:400}
.temp{display:block;font-size:.75rem;color:var(--g)}
tr.actual td{background:#eff6ff}
td input[type=time]{padding:.3rem .4rem;font-size:.85rem}
.gps{border:1px solid #bbf7d0;background:#f0fdf4;border-radius:10px;padding:.2rem 1rem 1rem;margin-bottom:.5rem}
.gps .check{margin-top:.8rem}
.gps-status{background:#fff;border-radius:8px;padding:.8rem;font-size:.95rem;line-height:1.5;border:1px solid #d1fae5}
.gps-status b{color:var(--p)}
.gps-status .warn{color:var(--warn);font-weight:600}
.bar{height:8px;background:#e5e7eb;border-radius:99px;overflow:hidden;margin:.4rem 0}
.bar>i{display:block;height:100%;background:var(--s)}
tr.live-now td{background:#ecfdf5}
.saved{margin-top:2rem;border-top:1px solid #e5e7eb;padding-top:1.2rem}
.saved h2{margin:0;font-size:1.1rem}
.teams{list-style:none;padding:0;margin:.8rem 0 0}
.teams li{display:flex;justify-content:space-between;align-items:center;gap:.5rem;padding:.4rem 0;border-bottom:1px solid #e5e7eb}
.teams li button{width:auto;margin:0;padding:.4rem .8rem;font-size:.85rem}
.teams .empty{color:var(--g);font-size:.9rem}
dialog{border:none;border-radius:12px;padding:1.5rem;width:min(440px,calc(100% - 32px));box-shadow:0 10px 40px rgba(0,0,0,.3)}
dialog::backdrop{background:rgba(15,23,42,.55)}
dialog h2{margin-top:0;color:var(--p)}
.perks{padding-left:1.2rem;color:var(--g);font-size:.92rem}
.buy{color:var(--p);font-size:.9rem}

/* ===== Dark mode ===== */
html[data-theme=dark]{color-scheme:dark}
html[data-theme=dark] body{background:#0b1220;color:#e5e7eb}
html[data-theme=dark] .c{background:#1e293b;box-shadow:0 4px 20px rgba(0,0,0,.5)}
html[data-theme=dark] header{background:#1e40af}
html[data-theme=dark] label{color:#94a3b8}
html[data-theme=dark] input,html[data-theme=dark] select{background:#0f172a;color:#e5e7eb;border-color:#334155}
html[data-theme=dark] input::placeholder{color:#64748b}
html[data-theme=dark] input.e{border-color:var(--d)}
html[data-theme=dark] .unit-box{background:#334155;border-color:#334155;color:#cbd5e1}
html[data-theme=dark] .o{color:#94a3b8}
html[data-theme=dark] .cot-note{color:#f87171}
html[data-theme=dark] .msg{color:#93c5fd}
html[data-theme=dark] #capture-area{background:#1e293b;border-color:#334155}
html[data-theme=dark] th{background:#0f172a;color:#94a3b8;border-bottom-color:#334155}
html[data-theme=dark] td{border-bottom-color:#334155}
html[data-theme=dark] tr:hover{background:#273449}
html[data-theme=dark] tr.actual td{background:#172554}
html[data-theme=dark] .t{background:#064e3b}
html[data-theme=dark] .team-name{color:#60a5fa}
html[data-theme=dark] .by-arj{color:#94a3b8}
html[data-theme=dark] .unit-switch{background:#0f172a}
html[data-theme=dark] .unit-switch button{color:#94a3b8}
html[data-theme=dark] .unit-switch button:hover{background:rgba(255,255,255,.06)}
html[data-theme=dark] .unit-switch button[aria-pressed=true]{background:#334155;color:#93c5fd}
html[data-theme=dark] .cot-ok{color:#34d399}
html[data-theme=dark] .cot-fail{color:#f87171}
html[data-theme=dark] .cot-tight{color:#fbbf24}
html[data-theme=dark] .ghost{color:#93c5fd;border-color:#334155}
html[data-theme=dark] .ghost:hover{background:#273449}
html[data-theme=dark] .pro{border-color:#334155}
html[data-theme=dark] .gps{background:#052e16;border-color:#14532d}
html[data-theme=dark] .gps-status{background:#0f172a;border-color:#14532d}
html[data-theme=dark] .gps-status b{color:#93c5fd}
html[data-theme=dark] .bar{background:#334155}
html[data-theme=dark] tr.live-now td{background:#064e3b}
html[data-theme=dark] .saved,html[data-theme=dark] .teams li{border-color:#334155}
html[data-theme=dark] dialog{background:#1e293b;color:#e5e7eb}
html[data-theme=dark] dialog h2,html[data-theme=dark] .buy{color:#93c5fd}

@media(max-width:600px){
  .n{padding:1.2rem}
  td,th{padding:.5rem;font-size:0.85rem}
  .input-row{flex-direction:column;gap:1rem}
  .input-group{min-width:100%}
  .input-row.tight{flex-direction:row}
  .input-row.tight .input-group{min-width:0}
  body{padding:12px}
  header{padding-top:2.2rem}
  .pace-row{gap:0.4rem}
  .pace-input{padding:0.6rem 0.7rem;font-size:0.9rem}
  .unit-box{padding:0.6rem 0.7rem;font-size:0.8rem}
  .result-header{flex-direction:column;text-align:center;gap:.4rem}
  .team-name{font-size:1.15rem}
  .by-arj{font-size:0.85rem}
  .t{font-size:0.85rem}
  .total-center,.total-right{font-size:0.85rem}
  table{min-width:650px}
}

/* ===== Weather (Pro) ===== */
.wx{margin:.2rem 0 1rem}
.wx .ghost{width:100%;margin-top:0}
.wx-chip{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-top:.5rem;padding:.5rem .7rem;border-radius:8px;background:#eff6ff;color:#1e40af;font-size:.88rem}
.icon-x{width:auto;margin:0;padding:.1rem .5rem;background:transparent;color:inherit;font-size:.9rem}
.icon-x:hover{background:rgba(0,0,0,.06)}
input:disabled{opacity:.5}
.wx-table{overflow-x:auto;margin-top:.5rem}
.wx-table table{min-width:0;margin-top:0;font-size:.82rem}
.wx-table th,.wx-table td{padding:.35rem .4rem;text-align:center;white-space:nowrap}
.wx-table td:first-child,.wx-table th:first-child{text-align:left}
.wx-table .feels{display:block;font-size:.72rem;color:var(--g)}
.wx-table .hot{color:#dc2626;font-weight:600}
.wx-note{font-size:.8rem;color:var(--g);padding:0 8px}
html[data-theme=dark] .wx-chip{background:#172554;color:#bfdbfe}
html[data-theme=dark] .wx-table .hot{color:#f87171}

/* ===== Custom event (Pro) ===== */
.custom-box{margin-top:.8rem;padding:1rem;border:1px dashed #c7d2fe;border-radius:10px}
.custom-box>.ghost{margin-top:.4rem}
.leg-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(90px,1fr));gap:.5rem;margin-bottom:1rem}
.leg-grid label{font-size:.78rem;margin:0 0 .2rem;font-weight:500}
.leg-grid input{width:100%}
.cot-list{display:flex;flex-direction:column;gap:.4rem}
.cot-row{display:flex;gap:.4rem;align-items:center}
.cot-row select,.cot-row input{flex:1;padding:.55rem .6rem}
.cot-row .icon-x{flex:none}
html[data-theme=dark] .custom-box{border-color:#334155}
.cot-ctl{margin-top:.5rem}
.cot-ctl select{margin-bottom:.4rem}
.cot-ctl .ghost{margin-top:.4rem}
.mode-row{display:flex;align-items:center;justify-content:space-between;gap:.5rem}
.mode-row label{margin:0}
.mode-switch button{padding:.35rem 1rem}
.name-input:disabled{opacity:.6}

/* ===== Live tracking ===== */
.live-box{margin-top:2rem;border:1px solid #bbf7d0;border-radius:12px;padding:.9rem 1rem}
.live-box summary{cursor:pointer;font-weight:700;color:var(--s);font-size:1.05rem}
.live-box h3{font-size:1rem;margin:1.2rem 0 .6rem}
.live-box .share-btn{display:block}
#ltOwner{border-top:1px solid #e5e7eb;margin-top:1.2rem}
.lt-code{font:700 1.1rem/1.2 ui-monospace,Consolas,monospace;letter-spacing:.06em}
.teams li .lt-actions{display:flex;gap:.3rem;flex-wrap:wrap;justify-content:flex-end}
a.ghost{text-decoration:none;text-align:center}
html[data-theme=dark] .live-box{border-color:#14532d}
html[data-theme=dark] #ltOwner{border-color:#334155}

/* ===== Live dashboard ===== */
.lb-tools{display:flex;gap:.5rem;margin-bottom:.6rem}
.lb-tools input{flex:2}.lb-tools select{flex:1}
.lb-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:.8rem;margin-top:.8rem}
.lb-card{border:1px solid #e5e7eb;border-radius:12px;padding:.8rem .9rem;background:#fff}
.lb-card.stale{opacity:.6}
.lb-card.wait{border-style:dashed}
.lb-who{margin-bottom:.3rem}
.lb-leg{font-size:.92rem}
.lb-badge{display:inline-block;background:var(--p);color:#fff;border-radius:6px;padding:0 .45rem;font-size:.8rem;font-weight:700;margin-right:.25rem}
.lb-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:.4rem;margin-top:.4rem}
.lb-grid small{display:block;font-size:.72rem}
.lb-seen{margin-top:.4rem;font-size:.78rem}
html[data-theme=dark] .lb-card{background:#0f172a;border-color:#334155}
.lb-map{height:340px;border-radius:12px;border:1px solid #e5e7eb;margin:.4rem 0 .3rem;z-index:0}
.lb-card{cursor:pointer}
.lb-card .gmaps{font-size:.8rem;color:var(--p)}
.leaflet-tooltip.lb-tip{font-weight:600;font-size:11px;padding:1px 5px}
html[data-theme=dark] .lb-map{border-color:#334155}
@media(max-width:600px){.lb-map{height:280px}}

/* ---------- Q&A page ---------- */
.foot-links{margin-top:2rem;text-align:center;font-size:.9rem}
.foot-links a{color:var(--p);text-decoration:none;font-weight:600}
.fq-chips{display:flex;flex-wrap:wrap;gap:.4rem;margin:.9rem 0 .4rem}
.fq-chip{width:auto;margin:0;padding:.35rem .75rem;font-size:.82rem;border-radius:999px;background:#eef2ff;color:var(--p);border:1px solid #c7d2fe;font-weight:600}
.fq-chip.on{background:var(--p);color:#fff;border-color:var(--p)}
.fq-sec{font-size:1rem;margin:1.4rem 0 .5rem;color:var(--p)}
.fq-item{border:1px solid #e5e7eb;border-radius:10px;margin:.45rem 0;background:rgba(255,255,255,.6)}
.fq-item summary{cursor:pointer;padding:.75rem .9rem;font-weight:600;font-size:.95rem;list-style:none;position:relative;padding-right:2rem}
.fq-item summary::-webkit-details-marker{display:none}
.fq-item summary::after{content:"+";position:absolute;right:.9rem;top:.65rem;font-size:1.1rem;color:var(--g)}
.fq-item[open] summary::after{content:"–"}
.fq-a{padding:0 .9rem .85rem;font-size:.92rem;line-height:1.55}
.fq-a ol,.fq-a ul{margin:.4rem 0;padding-left:1.2rem}
.fq-a code{background:#f1f5f9;padding:0 .3rem;border-radius:4px;font-size:.85em}
.fq-tw{overflow-x:auto}
.fq-table{width:100%;min-width:0;margin-top:.3rem;border-collapse:collapse;font-size:.85rem}
.fq-table th,.fq-table td{border-bottom:1px solid #e5e7eb;padding:.45rem .4rem;text-align:left;vertical-align:top}
.fq-table th:not(:first-child),.fq-table td:not(:first-child){text-align:center;width:26%;font-size:.8rem}
.fq-table thead th{background:#eef2ff;color:var(--p)}
html[data-theme=dark] .fq-item{background:rgba(15,23,42,.5);border-color:#334155}
html[data-theme=dark] .fq-table th,html[data-theme=dark] .fq-table td{border-color:#334155}
html[data-theme=dark] .fq-table thead th,html[data-theme=dark] .fq-chip:not(.on){background:#1e293b;color:#93c5fd;border-color:#334155}
html[data-theme=dark] .fq-a code{background:#1e293b}
html[data-theme=dark] .fq-sec,html[data-theme=dark] .foot-links a{color:#93c5fd}

/* Licence details in the PRO dialog */
.lic-key{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap;margin-bottom:.6rem}
.lic-key code{font-size:1.05rem;letter-spacing:.05em;padding:.4rem .65rem;border-radius:6px;background:#f3f4f6;font-variant-numeric:tabular-nums}
.lic-key .ghost{width:auto;margin:0;padding:.4rem .8rem;font-size:.85rem}
.lic-until{margin:.2rem 0 .6rem}
.lic-mail{margin-top:0}
html[data-theme=dark] .lic-key code{background:#0f172a}

/* ===== Pro landing page ===== */
.pr-hero{padding:2.2rem 1.5rem 1.8rem}
.pr-hero .i{max-width:620px;margin:.7rem auto 0;font-size:1rem;line-height:1.45}
.pr-cta{display:flex;gap:.6rem;justify-content:center;flex-wrap:wrap;margin-top:1.2rem}
.pr-btn{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;padding:.7rem 1.2rem;border-radius:10px;font-weight:700;text-decoration:none;font-size:.98rem}
.pr-btn.light{background:#fff;color:var(--p)}
.pr-btn.wa{background:#16a34a;color:#fff}
.pr-btn.wa:hover{background:#15803d}
.pr-btn.ghostish{border:1px solid #c7d2fe;color:var(--p)}
.pr-h{margin:2rem 0 .9rem;font-size:1.3rem}
.pr-h:first-child{margin-top:0}
.pr-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:.8rem}
.pr-card{border:1px solid #e5e7eb;border-radius:12px;padding:.9rem 1rem;background:#fafafa;display:flex;gap:.75rem;align-items:flex-start}
.pr-card p{margin:.4rem 0 0;color:var(--g);font-size:.92rem;line-height:1.4}
.pr-ico{font-size:1.5rem;line-height:1.2;flex:none}
.pr-tier{font-size:.68rem;font-weight:800;letter-spacing:.06em;padding:.1rem .4rem;border-radius:5px;vertical-align:middle}
.pr-tier.free{background:#e0e7ff;color:#3730a3}
.pr-tier.pro{background:#fbbf24;color:#422006}
.pr-steps{margin:0;padding-left:1.3rem;line-height:1.6}
.pr-steps li{margin-bottom:.35rem}
.pr-email{max-width:420px}
.pr-prices{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.8rem;margin-bottom:.8rem}
.pr-price{border:1px solid #e5e7eb;border-radius:14px;padding:1.1rem;display:flex;flex-direction:column}
.pr-price.best{border:2px solid var(--p);box-shadow:0 6px 20px rgba(37,99,235,.15)}
.pr-pname{font-weight:700;color:var(--g)}
.pr-amount{font-size:1.7rem;font-weight:800;margin:.2rem 0 .5rem}
.pr-amount small{font-size:.85rem;font-weight:600;color:var(--g)}
.pr-price ul{margin:0 0 1rem;padding-left:1.1rem;font-size:.9rem;line-height:1.5;flex:1}
.pr-price .pr-btn{width:100%;box-sizing:border-box}
.pr-foot{margin-top:2rem;text-align:center}
html[data-theme=dark] .pr-card{background:#0f172a;border-color:#334155}
html[data-theme=dark] .pr-price{border-color:#334155}
html[data-theme=dark] .pr-price.best{border-color:#60a5fa;box-shadow:none}
html[data-theme=dark] .pr-btn.light{background:#e5e7eb;color:#1e40af}
html[data-theme=dark] .pr-btn.ghostish{border-color:#334155;color:#93c5fd}
html[data-theme=dark] .pr-tier.free{background:#1e3a8a;color:#c7d2fe}
.lb-remove{width:auto;margin:0 0 0 .4rem;padding:.15rem .55rem;font-size:.78rem;background:transparent;color:var(--d);border:1px solid #fecaca;border-radius:6px;vertical-align:middle}
.lb-remove:hover{background:#fef2f2}
html[data-theme=dark] .lb-remove{border-color:#7f1d1d;color:#f87171}
html[data-theme=dark] .lb-remove:hover{background:#2a1215}

/* Landing page: live-tracking illustration */
.pr-lead{margin-top:-.4rem;line-height:1.5}
.pr-demo{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:1.2rem;margin:.6rem 0 .4rem}
.pr-panel{margin:0;position:relative;padding-top:.9rem}
.pr-panel figcaption{font-size:.9rem;color:var(--g);line-height:1.45;margin-top:.7rem}
.pr-badge{position:absolute;top:0;left:14px;z-index:2;font-size:.72rem;font-weight:800;letter-spacing:.05em;padding:.25rem .6rem;border-radius:99px}
.pr-badge.pro{background:#fbbf24;color:#422006}
.pr-badge.extra{background:#16a34a;color:#fff}
.pr-phone{border:1px solid #e5e7eb;border-radius:18px;overflow:hidden;background:#fff;box-shadow:0 10px 30px rgba(15,23,42,.12)}
.pr-ptop{background:var(--p);color:#fff;font-weight:800;padding:.9rem 1rem .7rem;font-size:1.05rem}
.pr-ptop small{display:block;font-weight:500;opacity:.85;font-size:.78rem;margin-top:.1rem}
.pr-ptop.sub{background:#f1f5f9;color:#1f2937;font-size:.88rem;padding:.55rem 1rem}
.pr-map{display:block;width:100%;height:auto}
.pr-mnote{font-size:.78rem;color:var(--g);padding:.45rem .9rem 0}
.pr-mcard{margin:.55rem .7rem;border:1px solid #e5e7eb;border-radius:12px;padding:.6rem .7rem;font-size:.86rem}
.pr-mcard:last-child{margin-bottom:.8rem}
.pr-mleg{margin-top:.2rem}
.pr-mstats{display:flex;flex-wrap:wrap;gap:.25rem .8rem;font-size:.8rem;color:var(--g)}
.pr-mstats b{color:#1f2937}
.pr-mlink{color:var(--p);text-decoration:underline}
.pr-glist{list-style:none;margin:0;padding:.3rem .7rem .5rem}
.pr-glist li{display:flex;align-items:center;gap:.6rem;padding:.5rem 0;border-bottom:1px solid #f1f5f9}
.pr-glist li:last-child{border-bottom:0}
.pr-glist li>span:nth-child(2){flex:1;min-width:0}
.pr-glist .lt-code{font-size:.92rem}
.pr-dot{width:12px;height:12px;border-radius:50%;flex:none;box-shadow:0 0 0 2px #fff,0 0 0 3px #e5e7eb}
.pr-mbtn{font-size:.75rem;font-weight:700;color:var(--p);border:1px solid #c7d2fe;border-radius:7px;padding:.25rem .5rem;flex:none}
html[data-theme=dark] .pr-phone{background:#0f172a;border-color:#334155;box-shadow:none}
html[data-theme=dark] .pr-ptop{background:#1e40af}
html[data-theme=dark] .pr-ptop.sub{background:#1e293b;color:#e5e7eb}
html[data-theme=dark] .pr-mcard{border-color:#334155}
html[data-theme=dark] .pr-mstats b{color:#e5e7eb}
html[data-theme=dark] .pr-glist li{border-bottom-color:#1e293b}
html[data-theme=dark] .pr-mbtn{border-color:#334155;color:#93c5fd}
html[data-theme=dark] .pr-dot{box-shadow:0 0 0 2px #0f172a,0 0 0 3px #334155}
.pr-lmap.live{height:210px;background:#cfe3f2}
.pr-lmap.live .leaflet-control-attribution{font-size:9px}

/* Header: PRO + Live/Calculator switch */
.head-pills{display:flex;gap:.5rem;justify-content:center;flex-wrap:wrap;margin-top:.8rem}
.head-pills .plan-pill{margin:0}
.view-pill{display:inline-flex;align-items:center;gap:.35rem}
.view-pill.on{background:#fff;color:var(--p)}
.live-dot{width:9px;height:9px;border-radius:50%;background:#ef4444;box-shadow:0 0 0 0 rgba(239,68,68,.7);animation:livePulse 1.6s infinite}
@keyframes livePulse{0%{box-shadow:0 0 0 0 rgba(239,68,68,.7)}70%{box-shadow:0 0 0 7px rgba(239,68,68,0)}100%{box-shadow:0 0 0 0 rgba(239,68,68,0)}}
@media (prefers-reduced-motion:reduce){.live-dot{animation:none}}
html[data-theme=dark] .view-pill.on{background:#e5e7eb;color:#1e40af}

/* Live view */
.lv-title{margin:0 0 1rem;font-size:1.3rem;color:var(--s)}
.lv-card{border:1px solid #e5e7eb;border-radius:14px;padding:1rem 1.1rem;margin-bottom:1rem}
.lv-card h3{font-size:1.05rem;margin:0 0 .8rem}
.lv-card .share-btn{display:block;font-size:1.1rem;padding:.95rem 1.5rem}
#ltShare{border:2px solid #bbf7d0;background:#f0fdf4}
.lv-boards{display:flex;flex-wrap:wrap;gap:.5rem;padding:.7rem}
.lv-boards .file-btn{flex:1;text-align:center}
html[data-theme=dark] .lv-card{border-color:#334155}
html[data-theme=dark] #ltShare{border-color:#14532d;background:#052e1a}

/* Dashboard: moving / waiting state */
.lb-states{margin:.15rem 0 .1rem}
.lb-state{display:inline-block;font-size:.78rem;font-weight:700;padding:.08rem .5rem;border-radius:99px}
.lb-state.run{background:#dcfce7;color:#166534}
.lb-state.drive{background:#dbeafe;color:#1e40af}
.lb-state.idle{background:#fef3c7;color:#92400e}
.lb-card.idle{opacity:.85}
html[data-theme=dark] .lb-state.run{background:#14532d;color:#bbf7d0}
html[data-theme=dark] .lb-state.drive{background:#1e3a8a;color:#bfdbfe}
html[data-theme=dark] .lb-state.idle{background:#422006;color:#fde68a}

/* Dashboard: battery, sound toggle, start/stop toast */
.lb-bat{font-weight:700;color:#166534}
.lb-bat.low{color:var(--d)}
.lb-sound{width:auto;margin:0;padding:0 .7rem;font-size:1.1rem;background:transparent;border:1px solid #d1d5db;border-radius:8px;color:inherit;flex:none}
.lb-sound:hover{background:#f3f4f6}
/* Floating pop-up: slides in at the top, fades out on its own (or on tap) */
.lb-toast{position:fixed;top:12px;left:50%;transform:translateX(-50%);z-index:2000;width:min(92vw,440px);display:grid;gap:.35rem;cursor:pointer;animation:toastIn .25s ease-out}
.lb-toast[hidden]{display:none}
.lb-toast.out{animation:toastOut .35s ease-in forwards}
@keyframes toastIn{from{opacity:0;transform:translate(-50%,-14px)}to{opacity:1;transform:translate(-50%,0)}}
@keyframes toastOut{to{opacity:0;transform:translate(-50%,-14px)}}
@media (prefers-reduced-motion:reduce){.lb-toast,.lb-toast.out{animation:none}}
.lb-toast-item{padding:.55rem .8rem;border-radius:10px;color:#fff;font-weight:600;font-size:.9rem;box-shadow:0 6px 18px rgba(0,0,0,.2)}
.lb-toast-item.start{background:#16a34a}
.lb-toast-item.stop{background:#dc2626}
html[data-theme=dark] .lb-bat{color:#86efac}
html[data-theme=dark] .lb-sound{border-color:#334155}
html[data-theme=dark] .lb-sound:hover{background:#1e293b}
html[data-theme=dark] .lb-toast-item.start{background:#15803d}
html[data-theme=dark] .lb-toast-item.stop{background:#b91c1c}

/* ⓘ info toggle + club name */
.label-row{display:flex;align-items:center;gap:.4rem;margin-bottom:.4rem}
.label-row label{margin:0}
.info-btn{width:30px;height:28px;margin:0;padding:0;border-radius:8px;background:#fef3c7;border:1px solid #fcd34d;font-size:1rem;line-height:1;flex:none}
.info-btn:hover,.info-btn[aria-expanded=true]{background:#fde68a}
.info-box{margin:0 0 .6rem;padding:.6rem .8rem .6rem 1.8rem;border-radius:10px;background:#fffbeb;border:1px solid #fcd34d;color:#78350f;font-size:.88rem;line-height:1.45}
.info-box li{margin-bottom:.25rem}
.club-box{display:grid;gap:.45rem;margin:.4rem 0 .8rem;padding:.7rem .8rem;border:1px dashed #c7d2fe;border-radius:10px}
.club-box[hidden]{display:none}
.club-box label{margin:0}
.club-row{display:flex;gap:.4rem}
.club-row .pace-input{flex:1;min-width:0}
.club-row .ghost{width:auto;margin:0;flex:none}
html[data-theme=dark] .info-btn{background:#422006;border-color:#a16207}
html[data-theme=dark] .info-btn:hover,html[data-theme=dark] .info-btn[aria-expanded=true]{background:#713f12}
html[data-theme=dark] .info-box{background:#422006;border-color:#a16207;color:#fde68a}
html[data-theme=dark] .club-box{border-color:#334155}

.lt-club-link{display:block;margin-top:.5rem;text-align:center}
.lt-club-link[hidden]{display:none}

/* My groups: one card per group — code + info on top, actions in an even 2-column grid */
#ltGroups li{display:block;padding:.8rem 0}
#ltGroups li>span:first-child{display:block;overflow-wrap:anywhere}
#ltGroups li .lt-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.4rem;margin-top:.6rem}
#ltGroups li .lt-actions>*{width:100%;margin:0;padding:.55rem .4rem;font-size:.85rem;line-height:1.2;text-align:center;box-sizing:border-box;border-radius:8px}
#ltGroups li .lt-actions [data-a="end"]{color:var(--d);border-color:#fecaca}
html[data-theme=dark] #ltGroups li .lt-actions [data-a="end"]{border-color:#7f1d1d}
/* Club box: keep the name field + Save on one line and the checkbox text wrapping inside */
.club-box{grid-template-columns:minmax(0,1fr)}
.club-box>*{min-width:0;box-sizing:border-box}
.club-box .check{align-items:flex-start;margin:0;font-size:.9rem;line-height:1.35}
.club-box .check input{margin-top:.15rem;flex:none}
.club-box .file-btn{width:100%;margin:0;box-sizing:border-box}
.club-row .ghost{padding:.6rem .9rem}

/* Map name callouts in the team's colour (same as its GPS dot) */
.leaflet-tooltip.lb-tip{background:transparent;border:0;box-shadow:none;padding:0}
.leaflet-tooltip.lb-tip::before{display:none}
.lb-tipc{display:inline-block;color:#fff;font-weight:700;font-size:11px;line-height:1.3;padding:1px 6px;border-radius:6px;border:1.5px solid #fff;box-shadow:0 1px 3px rgba(0,0,0,.35);white-space:nowrap}
.lb-tipc.idle{opacity:.65}
.lb-dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:.4rem;vertical-align:middle;box-shadow:0 0 0 2px #fff,0 0 0 3px rgba(0,0,0,.15)}

/* Medic link box (owner) */
.medic-box{display:grid;gap:.4rem;margin-top:.4rem;padding:.7rem .8rem;border-radius:10px;background:#fef2f2;border:1px solid #fecaca}
.medic-box p{margin:0}
.medic-box .ghost,.medic-box .file-btn{width:100%;margin:0;box-sizing:border-box;padding:.55rem .4rem;font-size:.85rem;text-align:center}
.medic-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.4rem;margin-top:.4rem}
#ltMedicOn[hidden],#ltMedicCreate[hidden]{display:none}
#ltMedicUrl{font-size:.8rem}
.danger-ghost{color:var(--d);border-color:#fecaca}
html[data-theme=dark] .medic-box{background:#2a1215;border-color:#7f1d1d}
/* Safety alerts on the dashboard */
.lb-alerts{margin:.6rem 0;padding:.7rem .8rem;border-radius:12px;background:#fef2f2;border:2px solid #fca5a5;display:grid;gap:.5rem}
.lb-alerts[hidden]{display:none}
.lb-alerts.ok{background:#f0fdf4;border-color:#86efac}
.lb-alert{padding:.5rem .6rem;border-radius:8px;background:#fff;border:1px solid #fecaca;font-size:.9rem}
.lb-alert.hi{border-color:#ef4444;box-shadow:0 0 0 1px #ef4444 inset}
.lb-alert-why{margin:.2rem 0;font-weight:600;color:#991b1b}
html[data-theme=dark] .lb-alerts{background:#2a1215;border-color:#7f1d1d}
html[data-theme=dark] .lb-alerts.ok{background:#052e1a;border-color:#14532d}
html[data-theme=dark] .lb-alert{background:#1e293b;border-color:#7f1d1d}
html[data-theme=dark] .lb-alert-why{color:#fca5a5}

/* Landing page: premium club features marked with a blue diamond instead of a bullet */
.pr-price li.gem{list-style:none;margin-left:-1.15rem;padding-left:1.45rem;text-indent:-1.45rem}
.pr-price li.gem::before{content:"💎";display:inline-block;width:1.45rem;text-indent:0}

/* Medic access requests (owner) and gate (medic page) */
.medic-reqs{display:grid;gap:.4rem;margin-top:.5rem;padding-top:.5rem;border-top:1px dashed #fecaca;font-size:.88rem}
.medic-reqs[hidden]{display:none}
.medic-reqs p{margin:0}
.medic-req{display:flex;align-items:center;justify-content:space-between;gap:.4rem;flex-wrap:wrap;padding:.35rem .5rem;border-radius:8px;background:#fff}
.medic-req.pending{background:#fffbeb;border:1px solid #fcd34d}
.medic-req-btns{display:flex;gap:.3rem}
.medic-req-btns .ghost{width:auto;margin:0;padding:.35rem .7rem;font-size:.8rem}
.ok-ghost{color:#15803d;border-color:#86efac}
.medic-gate h3{margin-top:0}
.medic-gate[hidden]{display:none}
html[data-theme=dark] .medic-reqs{border-color:#7f1d1d}
html[data-theme=dark] .medic-req{background:#1e293b}
html[data-theme=dark] .medic-req.pending{background:#422006;border-color:#a16207}
html[data-theme=dark] .ok-ghost{color:#86efac;border-color:#14532d}


/* Start/stop pop-up centred on the map */
.lb-map-wrap{position:relative}
.lb-map-wrap .lb-toast{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:1100;width:max-content;max-width:85%;animation:toastMapIn .25s ease-out}
.lb-map-wrap .lb-toast.out{animation:toastMapOut .35s ease-in forwards}
.lb-map-wrap .lb-toast-item{text-align:center}
@keyframes toastMapIn{from{opacity:0;transform:translate(-50%,-50%) scale(.85)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}
@keyframes toastMapOut{to{opacity:0;transform:translate(-50%,-50%) scale(.9)}}
.lt-bat-note{margin-top:.3rem;color:var(--warn)}

/* Landing illustrations: pop-up in the middle of the map, like the real dashboard */
.pr-mapwrap{position:relative}
.pr-mtoast{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:1100;width:max-content;max-width:85%;display:grid;gap:.3rem;pointer-events:none}
.pr-mtoast .lb-toast-item{font-size:.82rem;padding:.4rem .7rem;text-align:center}

/* iPhone checklist, "still sharing?" prompt, auto-stop note */
.ios-tips{margin:.2rem 0 .8rem;padding:.6rem .8rem;border-radius:10px;background:#fffbeb;border:1px solid #fcd34d;font-size:.86rem;line-height:1.45}
.ios-tips[hidden]{display:none}
.ios-tips summary{cursor:pointer;font-weight:700}
.ios-tips ol{margin:.4rem 0 0;padding-left:1.2rem}
.lt-tip{margin-top:.4rem;font-size:.86rem}
.lt-prompt{margin-top:.6rem;padding:.7rem .8rem;border-radius:10px;background:#fef3c7;border:2px solid #f59e0b}
.lt-prompt[hidden]{display:none}
.lt-prompt .btn-row>*{flex:1}
.lt-auto{margin:0 0 .6rem;padding:.55rem .7rem;border-radius:10px;background:#eff6ff;border:1px solid #bfdbfe;font-size:.88rem}
.lt-auto[hidden]{display:none}
html[data-theme=dark] .ios-tips{background:#422006;border-color:#a16207}
html[data-theme=dark] .lt-prompt{background:#422006;border-color:#d97706}
html[data-theme=dark] .lt-auto{background:#1e293b;border-color:#334155}

.lt-prompt .btn-row>button{margin-top:.5rem;padding:.6rem .5rem;font-size:.92rem;line-height:1.2}

/* Traccar Client box */
.tc-box{margin-top:.8rem}
.tc-box p{margin:.4rem 0}
.tc-label{display:block;font-weight:600;margin:.5rem 0 .2rem}
.tc-row{display:flex;gap:.4rem;align-items:center}
.tc-row input{flex:1 1 0;width:auto;min-width:0;font-family:ui-monospace,monospace;font-size:.8rem}
.tc-row button{flex:0 0 auto;width:auto;margin:0}

.lb-nav{margin:.2rem 0 .6rem;text-align:center}

.lt-tg-btn{display:flex;align-items:center;justify-content:center;gap:.5rem;text-align:center;margin-top:.6rem}
.lt-tg-btn .tg-logo{flex:0 0 auto}

/* weather on the live map */
.wx-pin{background:none;border:0}
.wxm-chip{display:inline-flex;align-items:center;gap:3px;transform:translate(-50%,-50%);padding:2px 6px 2px 3px;border-radius:999px;background:rgba(255,255,255,.92);border:1px solid #93c5fd;color:#1e3a8a;font:600 11px/1.2 system-ui,sans-serif;white-space:nowrap;box-shadow:0 1px 3px rgba(0,0,0,.25)}
.wxm-chip svg{color:#0284c7;flex:none}
.wxm-chip span{color:#475569;font-weight:500}
.wxm-chip.mini{padding:2px}
.lb-wx{display:flex;flex-wrap:wrap;align-items:center;gap:.3rem .9rem;margin:.4rem 0 .1rem;font-size:.9rem}
.lb-wx[hidden]{display:none}
.lb-wx small{flex-basis:100%}
.wx-arrow{display:inline-flex;vertical-align:middle;color:#0284c7}
.lb-sound.off{opacity:.45}
html[data-theme=dark] .wxm-chip{background:rgba(15,23,42,.9);border-color:#1d4ed8;color:#bfdbfe}
html[data-theme=dark] .wxm-chip span{color:#94a3b8}
.lb-temp{position:absolute;top:10px;left:54px;z-index:500;padding:4px 9px;border-radius:6px;background:rgba(255,255,255,.95);border:2px solid rgba(0,0,0,.2);background-clip:padding-box;color:#b45309;font:600 14px/1.3 system-ui,sans-serif;pointer-events:none}
.lb-temp[hidden]{display:none}
html[data-theme=dark] .lb-temp{background:rgba(15,23,42,.92);color:#fbbf24}
/* super user: weather source picker on the map, top-right */
.lb-wxsrc{position:absolute;top:10px;right:10px;z-index:500;margin:0}
.lb-wxsrc[hidden]{display:none}
.lb-wxsrc select{width:auto;margin:0;padding:4px 6px;border-radius:6px;background:rgba(255,255,255,.95);border:2px solid rgba(0,0,0,.2);background-clip:padding-box;color:#1e3a8a;font:600 13px/1.3 system-ui,sans-serif;cursor:pointer}
html[data-theme=dark] .lb-wxsrc select{background:rgba(15,23,42,.92);color:#bfdbfe}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* team plan -> group dashboard */
.plan-send{display:flex;gap:.5rem;align-items:center;margin-top:.5rem;flex-wrap:wrap}
.plan-send[hidden]{display:none}
.plan-send select{flex:1 1 10rem;min-width:0;width:auto}
.plan-send button{flex:0 0 auto;width:auto;margin:0}
.lb-forecast{margin:.6rem 0;padding:.45rem .8rem;border-radius:10px;background:#f0fdf4;border:1px solid #86efac;font-size:.92rem;line-height:1.45}
.lb-forecast[hidden]{display:none}
.lb-forecast .fc-head{font-size:1.02rem}
.lb-forecast .fc-cots{margin:.35rem 0 0;padding-left:0;list-style:none}
.lb-forecast .fc-miss{color:#b91c1c}
.lb-forecast .fc-tight{color:#b45309}
.fc-delta.late{color:#b91c1c}
.fc-delta.early{color:#15803d}
html[data-theme=dark] .lb-forecast{background:#052e16;border-color:#166534}
html[data-theme=dark] .lb-forecast .fc-miss{color:#fca5a5}
html[data-theme=dark] .lb-forecast .fc-tight{color:#fcd34d}
.fc-row{display:flex;align-items:center;justify-content:space-between;gap:.6rem}
.fc-row .fc-head{flex:1;min-width:0;font-size:.95rem}
.fc-body{margin-top:.4rem;padding-top:.4rem;border-top:1px dashed #86efac}
.fc-body[hidden]{display:none}
/* toggle switch */
.fc-switch{position:relative;flex:none;width:42px;height:24px;margin:0;cursor:pointer}
.fc-switch input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:pointer}
.fc-switch span{position:absolute;inset:0;border-radius:999px;background:#cbd5e1;transition:background .2s}
.fc-switch span::after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.3);transition:transform .2s}
.fc-switch input:checked + span{background:#16a34a}
.fc-switch input:checked + span::after{transform:translateX(18px)}
.fc-switch input:focus-visible + span{outline:2px solid #2563eb;outline-offset:2px}
html[data-theme=dark] .fc-switch span{background:#475569}
html[data-theme=dark] .fc-body{border-top-color:#166534}

/* activate dialog: plans + Q&A pills */
.lic-pills{display:flex;gap:.5rem;flex-wrap:wrap;margin:.7rem 0 0}
.lic-pill{display:inline-flex;align-items:center;padding:.35rem .95rem;border-radius:999px;background:var(--p);color:#fff;font-size:.85rem;font-weight:700;text-decoration:none}
.lic-pill:hover{filter:brightness(1.1);text-decoration:none}

/* individual runners: finish / COT forecast */
.lb-fc{margin:.25rem 0;font-size:.88rem}
.fc-solo{padding:.35rem 0;border-top:1px dashed rgba(0,0,0,.12)}
.fc-solo:first-child{border-top:0}
.fc-note{margin-top:.35rem;font-size:.8rem}
html[data-theme=dark] .fc-solo{border-top-color:rgba(255,255,255,.15)}

/* calculator: route map / water stations / volunteers pill */
.map-pill-row{margin:.6rem 0;display:flex;gap:.5rem;flex-wrap:wrap}
.map-pill-row button.lic-pill{width:auto;margin:0;border:0;cursor:pointer;font-family:inherit}
.map-pill-row button.lic-pill[hidden]{display:none}
.mosque-list{margin:.2rem 0 .8rem;padding:.6rem .9rem;border-radius:10px;border:1px solid #bfdbfe;background:#eff6ff;font-size:.9rem}
.mosque-list[hidden]{display:none}
.mosque-list ol{margin:.35rem 0 0;padding-left:1.2rem}
.mosque-list li{margin:.2rem 0}
html[data-theme=dark] .mosque-list{background:#172554;border-color:#1e3a8a}
.map-pill-row .lic-pill[hidden]{display:none}

.team-size-row{margin:.2rem 0 .6rem}
.team-size-row[hidden]{display:none}
.team-size-row button{width:auto}

/* club board: one tab per race */
.lb-events{display:flex;gap:.5rem;flex-wrap:wrap;justify-content:center;margin:.4rem 0}
.lb-events[hidden]{display:none}
.lb-events .lic-pill{background:rgba(255,255,255,.18);color:#fff}
.lb-events .lic-pill:hover{background:rgba(255,255,255,.3)}
.lb-events .lic-pill.on{background:#fff;color:var(--p)}
html[data-theme=dark] .lb-events .lic-pill.on{background:#e5e7eb;color:#1e40af}

/* super user: CMD cheat sheet */
button.lic-pill{width:auto;margin:0;border:0;cursor:pointer;font-family:inherit}
.cmd-body h3{margin:1rem 0 .2rem;font-size:1rem;color:var(--p)}
.cmd-body .lic-key code{flex:1 1 14rem;font-size:.82rem;letter-spacing:0;word-break:break-all}
.cmd-body .lic-key .ghost{width:auto;margin:0;padding:.4rem .8rem;font-size:.85rem}
.cmd-row{margin:.35rem 0}
.cmd-label{display:block;font-size:.85rem;font-weight:600;margin-bottom:.15rem}
.cmd-row code{font-size:.82rem;letter-spacing:0;word-break:break-all;flex:1 1 14rem}

/* training session (loop): leaderboard, live status, owner link */
.ss-tw{overflow-x:auto;border:1px solid #e5e7eb;border-radius:12px;margin:.6rem 0;grid-column:1/-1;width:100%}
.ss-table{border-collapse:collapse;width:100%;font-size:.82rem;min-width:640px;margin-top:0}
.ss-table th{background:#f8fafc;text-align:left;padding:.5rem;font-size:.7rem;color:var(--g);text-transform:uppercase;letter-spacing:.02em;white-space:nowrap}
.ss-table td{padding:.5rem;border-top:1px solid #e5e7eb;white-space:nowrap;vertical-align:middle}
.ss-table tr[data-id]{cursor:pointer}
.ss-table tr.ss-done td{background:#f0fdf4}
.ss-table tr.ss-shortrow td{background:#fffbeb}
.ss-rk{font-weight:700;color:var(--g);width:1.4rem}
.ss-who{display:flex;align-items:center;gap:.1rem}
.ss-st{display:block;font-size:.7rem;font-weight:600;color:var(--g)}
.ss-st.run{color:var(--s)}
.ss-st.wr{color:var(--d)}
.ss-km{font-weight:700;font-size:.95rem}
.ss-ok{color:var(--s);font-weight:700}
.ss-short{color:var(--warn);font-weight:600;font-size:.78rem}
.ss-bar{width:6rem;height:6px;margin:.2rem 0 0}
.ss-bar>i{background:var(--p)}
.loop-arrow{color:#1d4ed8;font-size:15px;line-height:16px;text-align:center;text-shadow:0 0 3px #fff}
.lt-loop{margin-top:.4rem}
.lt-loop-km{font-size:1.6rem}
.lt-session-note{background:#eff6ff;border-radius:10px;padding:.55rem .7rem;color:#1e3a8a}
.lt-board-link{display:flex;flex-wrap:wrap;gap:.4rem;align-items:center;margin-top:.5rem;width:100%}
.lt-board-link input{flex:1 1 14rem;font-size:.8rem}
.lt-board-link .ghost{width:auto;margin:0}
.lt-board-link small{flex-basis:100%}
html[data-theme=dark] .ss-tw{border-color:#334155}
html[data-theme=dark] .ss-table th{background:#0f172a}
html[data-theme=dark] .ss-table td{border-color:#334155}
html[data-theme=dark] .ss-table tr.ss-done td{background:#052e1a}
html[data-theme=dark] .ss-table tr.ss-shortrow td{background:#3a2a05}
html[data-theme=dark] .lt-session-note{background:#172554;color:#bfdbfe}
#ltPublicRow[hidden],#ltInfoBtn[hidden]{display:none}
/* first place in a training session: trophy + a soft gold row */
.ss-table tr.ss-lead td{background:linear-gradient(90deg,#fef3c7,#fffbeb 60%)}
.ss-table tr.ss-lead td:first-child{box-shadow:inset 4px 0 0 #f59e0b;color:#b45309}
.ss-trophy{display:inline-block;animation:ss-trophy 2.4s ease-in-out infinite;transform-origin:50% 90%}
@keyframes ss-trophy{0%,100%{transform:rotate(0) scale(1)}10%{transform:rotate(-12deg) scale(1.15)}20%{transform:rotate(10deg) scale(1.15)}30%{transform:rotate(0) scale(1)}}
@media (prefers-reduced-motion:reduce){.ss-trophy{animation:none}}
html[data-theme=dark] .ss-table tr.ss-lead td{background:linear-gradient(90deg,#3f2d06,#1e293b 60%)}

/* practice: monthly champion legend */
.ss-month{border:1px solid #fcd34d;background:linear-gradient(135deg,#fffbeb,#fef3c7);border-radius:12px;padding:.7rem .9rem;margin:.6rem 0}
.ss-month-head{font-weight:700;color:#92400e;margin-bottom:.3rem}
.ss-champ{font-size:1.15rem;display:flex;align-items:baseline;gap:.35rem;flex-wrap:wrap}
.ss-crown{font-size:1.4rem}
.ss-champ-km{font-weight:800;color:#b45309}
.ss-month-rest{margin:.35rem 0 0 1.2rem;padding:0;font-size:.85rem}
.ss-month-note{font-size:.75rem;margin-top:.35rem}
html[data-theme=dark] .ss-month{background:linear-gradient(135deg,#3f2d06,#1e293b);border-color:#92400e}
html[data-theme=dark] .ss-month-head{color:#fcd34d}
html[data-theme=dark] .ss-champ-km{color:#fbbf24}

/* dashboard: Manual / Auto refresh switch */
.lb-auto{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;margin:.2rem 0 .6rem;font-size:.85rem;font-weight:600}
.lb-switch{position:relative;display:inline-block;width:40px;height:22px;margin:0;flex:none}
.lb-switch input{opacity:0;width:0;height:0;position:absolute}
.lb-switch span{position:absolute;inset:0;border-radius:22px;background:#cbd5e1;transition:background .2s;cursor:pointer}
.lb-switch span::after{content:"";position:absolute;left:3px;top:3px;width:16px;height:16px;border-radius:50%;background:#fff;transition:transform .2s;box-shadow:0 1px 3px rgba(0,0,0,.3)}
.lb-switch input:checked+span{background:var(--p)}
.lb-switch input:checked+span::after{transform:translateX(18px)}
.lb-every{width:auto;margin:0;padding:.25rem .4rem;font-size:.82rem;border-radius:8px;color:#ea580c;font-weight:700}
.lb-every:disabled{opacity:.45}
.lb-refresh{width:auto;margin:0;padding:.3rem .8rem;font-size:.82rem}
.lb-secs{display:inline-flex;align-items:center;gap:.3rem}
.lb-secs[hidden]{display:none}
.lb-secs input{width:4.2rem;margin:0;padding:.25rem .4rem;font-size:.82rem;border-radius:8px;color:#ea580c;font-weight:700}
.lb-secs input:disabled{opacity:.45}

header .lb-auto{justify-content:center;margin:.7rem 0 0;color:#fff}
header .lb-switch span{background:rgba(255,255,255,.35)}
header .lb-switch input:checked+span{background:#22c55e}
header .lb-every,header .lb-secs input{background:#fff;border:0}
header .lb-refresh{background:#fff;color:var(--p);border:0}
