:root{color-scheme:light}body.totem-body{margin:0;background:#eef3f7;color:#182c43;font-family:system-ui,sans-serif}*[hidden]{display:none!important}[data-public-totem]{max-width:1920px;margin:auto;padding:clamp(12px,2vw,32px)}.totem-header{display:flex;align-items:center;gap:20px;flex-wrap:wrap;margin-bottom:18px}.totem-header h1{font-size:clamp(22px,2.5vw,40px);margin:0;font-weight:750}.totem-eyebrow{font-size:12px;letter-spacing:.13em;text-transform:uppercase;color:#62778c}.totem-counters{display:flex;flex-wrap:wrap;gap:10px;margin-left:auto}.totem-counters span{background:white;border:1px solid #dce5ed;padding:8px 12px;border-radius:10px;font-size:13px}.totem-counters strong{display:block;font-size:22px;color:#182c43}.totem-message{color:#62778c;margin:8px 0}.totem-message:empty{display:none}.totem-race{min-width:0;background:white;border-radius:16px;border:1px solid #dce5ed;overflow:hidden;margin-bottom:20px;box-shadow:0 3px 16px #182c4308}.totem-race-header{padding:16px 20px;display:flex;align-items:center;gap:14px;flex-wrap:wrap;border-left:6px solid var(--race-color,#1769e0);border-bottom:1px solid #e6edf3}.totem-race-header h2{font-size:clamp(19px,2vw,29px);margin:0}.totem-clock{font-variant-numeric:tabular-nums;color:#62778c;font-weight:600}.totem-race-counters{margin-left:auto;font-size:14px;color:#62778c}.totem-plot{margin:10px 12px;padding:0}.totem-rankings{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,350px),1fr));gap:16px;padding:16px 20px}.totem-table-wrap{min-width:0;overflow:auto}.totem-rankings h3{font-size:16px;font-weight:700}.totem-body .table{font-size:clamp(13px,1.1vw,18px);margin-bottom:0}.totem-body th{color:#61748a;font-size:.8em;white-space:nowrap}.totem-body td{vertical-align:middle;padding:.65rem .45rem}.totem-name{font-weight:650}.totem-body td small{display:block;font-size:.72em;color:#62778c;font-weight:400}.totem-finished{background:#ecf8f2!important}.totem-gap{font-size:.75em;color:#62778c}.totem-footer{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:13px;color:#62778c}.totem-tabs{display:flex;gap:10px;overflow:auto;padding:0 0 12px}.totem-tabs button{flex-shrink:0;min-height:50px;border:1px solid #dce5ed;background:white;border-radius:10px;padding:10px 20px;color:#182c43;font-weight:650}.totem-tabs button[aria-selected=true]{background:#1769e0;color:white;border-color:#1769e0}.totem-search{position:sticky;bottom:0;background:#eef3f7f5;padding:12px 0 0;border-top:1px solid #dce5ed;z-index:3}.totem-search label{font-weight:700;margin-bottom:6px}.totem-search input,.totem-search button{min-height:48px;font-size:18px}.totem-keyboard{display:flex;flex-direction:column;gap:6px;margin:10px auto 0;max-width:1100px}.totem-key-row{display:flex;justify-content:center;gap:6px}.totem-keyboard button{flex:1;max-width:90px;background:white;border:1px solid #cbd8e5;border-radius:8px;min-height:46px;font-size:18px;font-weight:600;touch-action:manipulation}.totem-keyboard button[data-key=" "]{max-width:420px}.totem-keyboard button[data-key="Enter"]{background:#1769e0;color:white;max-width:160px}.totem-keyboard button[data-key="Backspace"]{max-width:140px}dialog[data-dialog]{width:min(920px,94vw);max-height:88vh;border:0;border-radius:20px;padding:24px;color:#182c43;box-shadow:0 20px 80px #0004}dialog::backdrop{background:#15243ca8}dialog header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:20px}dialog h2{font-size:25px;margin:0}dialog .list-group-item{min-height:58px;font-size:18px}dialog .table-responsive{max-height:52vh}.totem-rotation{background:white;padding:24px;border-radius:16px;overflow:hidden}.totem-rotation iframe{width:100%;height:72vh;border:0}.totem-rotation .totem-table-wrap{max-height:70vh;overflow:auto}.totem-touch .totem-table-wrap{max-height:32vh}.totem-touch .totem-plot{max-height:270px}.totem-touch .race-profile-scroll{width:100%}@media(max-width:600px){.totem-counters{margin-left:0}.totem-rankings{padding:12px}.totem-keyboard button{font-size:14px;min-width:0;padding:3px}.totem-key-row{gap:3px}.totem-header>button{min-height:44px}.totem-race-counters{margin-left:0}.totem-touch .totem-rankings{grid-template-columns:1fr}.totem-search label{font-size:14px}}
.totem-touch [data-public-totem]{height:100dvh;display:flex;flex-direction:column}.totem-touch .totem-header,.totem-touch .totem-tabs,.totem-touch .totem-search,.totem-touch .totem-footer{flex-shrink:0}.totem-touch .totem-overview{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}.totem-touch .totem-race{margin-bottom:0}.totem-touch .totem-search{position:relative;bottom:auto}.totem-touch .totem-footer{margin-top:8px}@media(max-height:800px){.totem-touch [data-public-totem]{padding:12px}.totem-touch .totem-header{margin-bottom:8px}.totem-touch .totem-header h1{font-size:24px}.totem-touch .totem-keyboard button{min-height:36px}.totem-touch .totem-key-row{gap:4px}.totem-touch .totem-keyboard{gap:4px}.totem-touch .totem-counters span{padding:4px 10px}.totem-touch .totem-counters strong{font-size:18px}.totem-touch .totem-search input,.totem-touch .totem-search button{min-height:40px}}
@media(max-height:800px) and (min-width:900px){.totem-touch .totem-race{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,3fr);grid-template-rows:auto minmax(0,1fr);height:100%}.totem-touch .totem-race-header{grid-column:1/-1;padding:8px 14px}.totem-touch .totem-plot{margin:0 8px;padding:0;align-self:center}.totem-touch .totem-rankings{padding:8px 12px;gap:12px;overflow:auto;min-height:0}.totem-touch .totem-rankings h3{font-size:13px;margin:0 0 4px}.totem-touch .totem-table-wrap{max-height:120px}.totem-touch .table{font-size:12px}.totem-touch td{padding:.25rem}.totem-touch .totem-rankings .btn-outline-primary{font-size:11px;padding:3px 6px}.totem-touch .totem-rankings{grid-template-columns:repeat(2,minmax(0,1fr))}}
.totem-touch [data-map]{display:none}@media(max-height:800px) and (min-width:900px){.totem-touch .totem-race:has(.totem-plot[hidden]) .totem-rankings{grid-column:1/-1}}

/* Personal touch result: a full-screen keepsake with the whole route and split times. */
dialog.totem-personal-dialog[data-dialog]{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:clamp(18px,3vh,36px) clamp(20px,4vw,80px);border-radius:0;background:#fff;overflow:auto;overscroll-behavior:contain}
.totem-personal-dialog>header{position:absolute;top:18px;right:24px;margin:0;z-index:2}.totem-personal-dialog>header h2{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.totem-personal-dialog>header button{border-radius:30px;background:white;min-height:44px;padding:8px 24px}.totem-dialog-hint{margin-bottom:0;text-align:center}.totem-personal-dialog .totem-dialog-hint{font-size:12px;color:#73838d!important;margin-top:10px!important}
.totem-personal-card{max-width:1600px;margin:auto;color:#193c43}.totem-personal-brand{display:flex;align-items:center;gap:22px;padding-right:110px;border-bottom:1px solid #e0ecec;padding-bottom:16px;font-size:clamp(14px,1.4vw,22px)}.totem-personal-brand strong{color:var(--personal-color);font-size:1.4em;letter-spacing:-.04em}.totem-personal-brand span{font-weight:600}
.totem-personal-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:24px 0 18px}.totem-personal-race{font-size:clamp(14px,1.5vw,22px);color:var(--personal-color);font-weight:650}.totem-personal-hero h1{font-size:clamp(28px,3.8vw,62px);font-weight:800;letter-spacing:-.04em;line-height:1.1;margin:8px 0;overflow-wrap:anywhere}.totem-personal-hero p{font-size:clamp(13px,1.4vw,20px);margin:0;color:#617b80}.totem-personal-status{padding:10px 24px;background:#e8f5ee;color:#217853;border:1px solid #cce5d7;border-radius:30px;font-weight:750;text-transform:uppercase;letter-spacing:.12em;font-size:clamp(12px,1.4vw,20px)}
.totem-personal-summary{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.7fr);gap:30px;padding:20px 28px;background:#edf6f6;border-radius:18px}.totem-personal-time>span,.totem-personal-stat>span{display:block;color:#56777a;font-size:clamp(12px,1.3vw,18px)}.totem-personal-time>strong{display:block;font-size:clamp(38px,5vw,78px);letter-spacing:-.05em;font-variant-numeric:tabular-nums;line-height:1.15}.totem-personal-time small{color:#56777a}.totem-personal-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;align-items:center}.totem-personal-stat strong{display:block;font-size:clamp(26px,3.1vw,48px);font-variant-numeric:tabular-nums;line-height:1.3}
.totem-personal-card h2{font-size:clamp(17px,1.6vw,24px);font-weight:750;margin:18px 0 10px}.totem-personal-elevation p{font-size:12px;color:#73838d;margin:0}.totem-personal-elevation [data-personal-profile]{pointer-events:none}.totem-personal-checkpoints{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.totem-personal-checkpoint{border:1px solid #e0e9ea;border-radius:12px;padding:12px 14px;min-width:0;border-top:3px solid #cbd9db}.totem-personal-checkpoint.is-passed{border-top-color:#16866b}.totem-personal-checkpoint-name{display:flex;justify-content:space-between;gap:8px;align-items:baseline;margin-bottom:8px}.totem-personal-checkpoint-name strong{font-size:clamp(13px,1.1vw,17px);overflow-wrap:anywhere}.totem-personal-checkpoint-name>span{font-size:12px;color:#73838d;white-space:nowrap}.totem-personal-split{display:flex;gap:12px;justify-content:space-between}.totem-personal-split span{font-size:10px;color:#617b80}.totem-personal-split strong{display:block;color:#193c43;font-size:clamp(13px,1.2vw,18px);font-variant-numeric:tabular-nums;white-space:nowrap}.totem-personal-footer{text-align:right;border-top:1px solid #e0ecec;margin-top:20px;padding-top:12px;font-size:13px;color:#617b80}.totem-personal-loading{display:grid;place-items:center;min-height:75vh;font-size:24px}
@media(max-height:850px) and (min-width:900px){dialog.totem-personal-dialog[data-dialog]{padding:14px 4vw}.totem-personal-brand{padding-bottom:8px}.totem-personal-hero{padding:12px 0}.totem-personal-hero h1{font-size:36px;margin:4px 0}.totem-personal-summary{padding:10px 20px}.totem-personal-time>strong{font-size:48px}.totem-personal-stat strong{font-size:30px}.totem-personal-card h2{margin:12px 0 6px;font-size:18px}.totem-personal-checkpoint{padding:7px 10px}.totem-personal-checkpoint-name{margin-bottom:4px}.totem-personal-checkpoints{gap:7px}.totem-personal-footer{margin-top:12px;padding-top:8px}}
@media(max-width:900px){.totem-personal-checkpoints{grid-template-columns:repeat(2,minmax(0,1fr))}.totem-personal-summary{gap:15px;padding:16px}.totem-personal-stats{gap:10px}.totem-personal-hero{gap:12px}.totem-personal-status{padding:8px 12px}}
@media(max-width:540px){dialog.totem-personal-dialog[data-dialog]{padding:16px}.totem-personal-brand{font-size:12px;gap:12px;padding-right:80px}.totem-personal-dialog>header{top:12px;right:12px}.totem-personal-dialog>header button{padding:6px 14px}.totem-personal-hero{align-items:flex-start;flex-direction:column}.totem-personal-hero h1{font-size:32px}.totem-personal-summary{grid-template-columns:1fr}.totem-personal-stats{border-top:1px solid #d2e5e5;padding-top:12px}.totem-personal-stat>span{font-size:11px}.totem-personal-checkpoints{grid-template-columns:1fr}.totem-personal-footer{font-size:11px}}

/* Race-coloured result identity and a chronological checkpoint timeline. */
.totem-personal-hero{position:relative;isolation:isolate;overflow:hidden;background:var(--personal-color);color:var(--personal-ink);border-radius:22px;display:grid;grid-template-columns:150px minmax(0,1fr) auto;gap:28px;padding:22px 28px;margin:18px 0}.totem-personal-hero:after{content:"";position:absolute;z-index:-1;right:-90px;top:-160px;width:460px;height:460px;border:45px solid currentColor;border-radius:50%;opacity:.07;box-shadow:0 0 0 45px currentColor,0 0 0 90px currentColor}.totem-personal-hero .totem-personal-race,.totem-personal-hero p{color:inherit;opacity:.88}.totem-personal-hero h1{font-size:clamp(28px,3.5vw,54px);margin:8px 0}.totem-personal-hero .totem-personal-status{color:inherit;background:transparent;border-color:currentColor;align-self:start;margin-top:2px}.totem-personal-bib{container-type:inline-size;position:relative;background:#fff;color:#193c43;transform:rotate(-3deg);border-radius:10px;padding:18px 12px 9px;box-shadow:0 8px 15px #0002;text-align:center;border-bottom:4px solid #e9ecee;min-width:0}.bib-pin{position:absolute;top:7px;width:7px;height:7px;border:2px solid #a1b1b9;background:#dfe6e9;border-radius:50%}.bib-pin-left{left:9px}.bib-pin-right{right:9px}.bib-caption{display:block;font-size:9px;font-weight:750;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-bottom:2px solid var(--personal-color);padding-bottom:5px}.totem-personal-bib>strong{display:block;letter-spacing:-.06em;font-size:min(62px,calc(140cqw / var(--bib-digits,3)));line-height:1.15;padding:5px 0;white-space:nowrap}.bib-bottom{display:block;font-size:8px;color:#667983;letter-spacing:.12em;border-top:1px dashed #cbd7dd;padding-top:5px}.totem-personal-summary{background:color-mix(in srgb,var(--personal-color) 8%,white)}
.totem-personal-checkpoints{list-style:none;padding:0;margin:0;column-gap:18px;row-gap:16px}.totem-personal-checkpoint{position:relative;border:0!important;padding:0;border-radius:0;background:transparent}.totem-personal-checkpoint:before{content:"";position:absolute;top:15px;left:15px;right:-18px;height:2px;background:#dce6e9}.totem-personal-checkpoint.is-passed:before{background:color-mix(in srgb,var(--personal-color) 40%,white)}.totem-personal-checkpoint:nth-child(4n):before,.totem-personal-checkpoint:last-child:before{display:none}.totem-timeline-marker{position:relative;display:flex;align-items:center;gap:8px;margin-bottom:8px}.totem-timeline-marker>span{display:grid;place-items:center;width:30px;height:30px;border:2px solid #dce6e9;background:#fff;color:#86989f;border-radius:50%;font-size:12px;font-weight:750;flex-shrink:0}.is-passed .totem-timeline-marker>span{background:var(--personal-color);border-color:var(--personal-color);color:var(--personal-ink)}.totem-timeline-marker small{color:#6b8089;font-size:11px;background:#fff;padding:0 6px}.totem-timeline-content{border-radius:12px;background:#f5f8f9;padding:10px 12px;border:1px solid #e6edf0}.totem-personal-checkpoint-name>span{font-size:10px;color:#71878f}.totem-personal-checkpoint-name{margin-bottom:6px;align-items:center}.totem-personal-checkpoint-name strong{font-size:clamp(12px,1vw,16px)}.totem-personal-split{gap:8px}.totem-personal-split strong{font-size:clamp(12px,1.1vw,17px)}
@media(max-height:850px) and (min-width:900px){.totem-personal-hero{grid-template-columns:110px minmax(0,1fr) auto;padding:14px 20px;gap:20px;margin:12px 0}.totem-personal-hero h1{font-size:34px}.totem-personal-bib{padding:15px 8px 7px}.totem-personal-bib>strong{font-size:min(40px,calc(140cqw / var(--bib-digits,3)))}.totem-personal-checkpoints{row-gap:10px}.totem-timeline-content{padding:7px 10px}.totem-timeline-marker{margin-bottom:5px}.totem-timeline-marker>span{width:24px;height:24px}.totem-personal-checkpoint:before{top:12px}.totem-personal-checkpoint-name{margin-bottom:4px}}
@media(max-width:900px){.totem-personal-hero{grid-template-columns:100px minmax(0,1fr);gap:18px;padding:20px}.totem-personal-hero .totem-personal-status{grid-column:2;width:fit-content;margin-top:-8px;font-size:11px}.totem-personal-bib{grid-row:1/3}.totem-personal-checkpoint:nth-child(4n):before{display:block}.totem-personal-checkpoint:nth-child(2n):before,.totem-personal-checkpoint:last-child:before{display:none}}
@media(max-width:540px){.totem-personal-hero{grid-template-columns:80px minmax(0,1fr);padding:16px 12px;gap:14px;border-radius:16px}.totem-personal-hero h1{font-size:26px}.totem-personal-hero p{font-size:12px}.totem-personal-bib>strong{font-size:min(34px,calc(140cqw / var(--bib-digits,3)))}.bib-caption{font-size:8px}.bib-bottom{font-size:6px}.totem-personal-checkpoint{padding-left:40px}.totem-personal-checkpoint:before,.totem-personal-checkpoint:nth-child(2n):before,.totem-personal-checkpoint:nth-child(4n):before{display:block;left:14px;top:26px;bottom:-16px;width:2px;height:auto;right:auto}.totem-personal-checkpoint:last-child:before{display:none}.totem-timeline-marker{position:absolute;top:0;left:0;flex-direction:column;gap:5px}.totem-timeline-marker small{font-size:9px;padding:0;max-width:35px;text-align:center}.totem-timeline-marker>span{width:28px;height:28px}.totem-timeline-content{padding:12px}.totem-personal-checkpoints{row-gap:16px}}

/* Portrait situation dashboard alternates with full-screen rotation content. */
.totem-display [data-public-totem]{height:100dvh;max-width:1200px;display:flex;flex-direction:column;gap:12px}
.totem-display .totem-header{flex-shrink:0;margin-bottom:0;display:grid;grid-template-columns:auto minmax(0,1fr) auto}
.totem-display .totem-header-brand{grid-column:1}.totem-display .totem-header h1{font-size:clamp(22px,3vw,36px)}
.totem-display .totem-counters{grid-column:1/-1;grid-row:2;width:100%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:0}
.totem-display .totem-counters span{font-size:clamp(13px,1.7vw,18px)}.totem-display .totem-counters strong{font-size:clamp(24px,3vw,38px)}
.totem-display .totem-overview,.totem-display .totem-rotation{flex:1;min-height:0;overflow:hidden;overscroll-behavior:contain}
.totem-display .totem-overview{display:grid;grid-template-rows:repeat(var(--totem-races,1),minmax(0,1fr));gap:12px}
.totem-display .totem-race{margin:0;min-height:0;display:flex;flex-direction:column;overflow:hidden}.totem-display .totem-rankings{flex:1;min-height:0;display:flex;flex-direction:column;gap:24px;overflow-y:auto;scrollbar-width:none;overflow-anchor:none}.totem-display .totem-rankings>div{flex-shrink:0}
.totem-display .totem-rankings h3{font-size:clamp(20px,2.4vw,28px);padding-bottom:10px;border-bottom:2px solid var(--race-color)}
.totem-display .totem-rankings .totem-table-wrap{overflow:visible}.totem-display .totem-plot{flex-shrink:0;margin:8px 20px;padding:0}
.totem-display .result-card{pointer-events:none}

.totem-display .totem-rotation{display:flex;flex-direction:column;border-top:5px solid #1769e0}
.totem-display .totem-rotation h2{font-size:clamp(22px,3vw,36px);margin:0 0 18px}
.totem-display [data-rotation-content]{flex:1;min-height:0;display:flex;flex-direction:column}
.totem-display .totem-rotation .totem-table-wrap{max-height:none;flex:1;min-height:0;overflow:auto;overflow-anchor:none;scrollbar-width:none}
.totem-display .totem-rotation iframe{height:100%;min-height:0;flex:1}.totem-display .totem-rotation .table{font-size:clamp(16px,2vw,24px)}
.totem-display .totem-rotation thead{position:sticky;top:0;background:#fff;z-index:1}
.totem-display .totem-footer{flex-shrink:0;padding:4px 0}.totem-footer{align-items:center}
.totem-ranking-qr{display:flex;align-items:center;gap:12px}.totem-ranking-qr canvas{width:100px;height:100px;flex-shrink:0}
@media(max-width:600px){.totem-display .totem-header{grid-template-columns:1fr auto}.totem-display .totem-header-brand{grid-column:1/-1}.totem-display .totem-counters{grid-row:auto}}

.totem-display .totem-race-header{flex-shrink:0;padding:10px 16px;background:#fff;border-radius:16px 16px 0 0}


@media(max-width:600px){.totem-touch [data-public-totem]{height:auto;min-height:100dvh}.totem-touch .totem-overview{flex:none;min-height:220px;max-height:45dvh}.totem-touch .totem-race{min-height:220px}}

.totem-sponsors{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);gap:32px;flex:1;min-height:0;align-items:center;justify-items:center;padding:24px}
.totem-sponsors .sponsor-logo--small{--sponsor-width:220px;--sponsor-height:120px}
.totem-sponsors .sponsor-logo--medium{--sponsor-width:320px;--sponsor-height:170px}
.totem-sponsors .sponsor-logo--large{--sponsor-width:440px;--sponsor-height:220px}
.totem-display .totem-race:has(.totem-plot[hidden]) .totem-rankings{padding-top:12px}

/* Fixed kiosk canvas. fit=screen uses the full viewport. */
body.totem-display {
    height: 100dvh;
    overflow: hidden;
}

.totem-display [data-public-totem] {
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--totem-width, 1080px);
    height: var(--totem-height, 1920px);
    max-width: none;
    padding: 24px;
    margin: 0;
    box-sizing: border-box;
    transform: translate(-50%, -50%) scale(var(--totem-scale, 1));
    transform-origin: center;
    container-type: size;
    gap: 16px;
}

.totem-display .totem-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
}

.totem-display .totem-header-brand {
    grid-column: 1;
}

.totem-display .totem-header h1 {
    font-size: clamp(22px, 3.2cqw, 36px);
}

.totem-display .totem-counters {
    grid-row: 2;
    gap: 12px;
}

.totem-display .totem-counters span {
    font-size: 18px;
}

.totem-display .totem-counters strong {
    font-size: 30px;
}

.totem-overview-viewport {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.totem-display .totem-overview {
    display: grid;
    grid-template-columns: repeat(var(--overview-columns, 1), minmax(0, 1fr));
    grid-template-rows: none;
    align-items: start;
    gap: 16px;
    width: 100%;
    height: auto;
    overflow: visible;
}

.totem-display .totem-race {
    flex: none;
    min-height: auto;
    margin: 0;
}

.totem-display .totem-race-header {
    padding: 12px 16px;
    gap: 8px 16px;
}

.totem-display .totem-race-header h2 {
    font-size: 32px;
}

.totem-display .totem-race-counters,
.totem-display .totem-clock {
    font-size: 22px;
}

.totem-display .totem-plot {
    margin: 4px 16px;
    pointer-events: none;
}

.totem-display .totem-rankings {
    flex: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
    grid-auto-rows: auto;
    gap: 12px 24px;
    padding: 12px 16px;
    overflow: visible;
}

.totem-display .totem-overview .result-card-name,
.totem-display .totem-overview .result-card-position,
.totem-display .totem-overview .result-card-duration {
    font-size: 24px;
}

.totem-display .totem-overview .result-card-bib,
.totem-display .totem-overview .result-card-subtitle,
.totem-display .totem-overview .result-card-positions {
    font-size: 17px;
}

.totem-display .totem-rankings > div {
    min-width: 0;
}

.totem-display .totem-rankings h3 {
    font-size: 20px;
    margin: 0;
    padding-bottom: 6px;
}

.totem-display .totem-rankings .totem-table-wrap {
    overflow: visible;
}

.totem-result-list {
    display: flex;
    flex-direction: column;
}

.totem-result-row {
    flex: none;
    min-width: 0;
}

.totem-display .totem-result-row .result-card {
    padding-block: 5px !important;
}

.totem-display .totem-result-row .result-card-layout {
    row-gap: .35rem;
}

.totem-display .totem-result-row .result-card-meta,
.totem-display .totem-result-row .result-card-subtitle {
    margin-top: .125rem;
}

@container (min-width: 620px) {
    .totem-display .totem-result-row .result-card-layout {
        grid-template-columns: max-content minmax(0, 1fr) minmax(0, 1.25fr);
    }

    .totem-display .totem-result-row .result-card-identity {
        display: flex;
        align-items: center;
        gap: .5rem;
        min-width: 6.5rem;
    }

    .totem-display .totem-result-row .result-card-identity > .rounded-circle {
        flex: none;
        margin: 0 !important;
    }

    .totem-display .totem-result-row .result-card-standing {
        margin: 0;
    }
}

.totem-result-row + .totem-result-row .result-card {
    border-top: 0;
}

.totem-race-index {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}

.totem-distance-label {
    padding: 8px 12px;
    border-radius: 8px;
    border-left: 5px solid var(--race-color);
    background: #fff;
    font-size: 17px;
    color: #62778c;
}

.totem-distance-label.is-active {
    font-weight: 750;
    color: #182c43;
    box-shadow: inset 0 -3px var(--race-color);
}

.totem-display .totem-rotation h2 {
    font-size: clamp(24px, 3.2cqw, 38px);
    margin-bottom: 10px;
}

.totem-rotation-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    font-size: 18px;
    margin-bottom: 16px;
    color: #62778c;
}

.totem-ranking-page {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.totem-page-progress {
    flex-shrink: 0;
    text-align: right;
    font-size: 22px;
    color: #62778c;
    margin: 12px 0 0;
}

.totem-event-video {
    flex: 1;
    width: 100%;
    min-height: 0;
    border: 0;
    object-fit: contain;
    pointer-events: none;
    background: #102331;
}

.totem-display .totem-ranking-qr {
    max-width: 460px;
    font-size: 18px;
}

.totem-display .totem-ranking-qr canvas {
    width: 112px;
    height: 112px;
}

@container (max-height: 1200px) {
    .totem-display .totem-counters span {
        padding: 4px 10px;
    }

    .totem-display .totem-counters strong {
        font-size: 24px;
    }

    .totem-display .totem-ranking-qr canvas {
        width: 88px;
        height: 88px;
    }
}


/* One CSS pixel per canvas pixel; scroll the desktop viewport to inspect the kiosk. */
body.totem-display:has([data-public-totem][data-fit="actual"]) {
    height: auto;
    min-height: 100dvh;
    overflow: auto;
}

.totem-display [data-public-totem][data-fit="actual"] {
    position: relative;
    left: auto;
    top: auto;
    margin: 0 auto;
    transform: none;
}

/* Touch lists reuse the public result card and retain a three/five-card viewport. */
.totem-touch .totem-rankings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
    align-items: start;
    overflow: visible;
}

.totem-touch .totem-ranking-group {
    min-width: 0;
}

.totem-touch .totem-table-wrap {
    height: var(--touch-list-height, 480px);
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    overflow-anchor: none;
    scrollbar-gutter: stable;
    touch-action: pan-y;
}

.totem-entry-action {
    cursor: pointer;
    border-radius: 6px;
}

.totem-entry-action:hover .result-card {
    background: #f3f7fa;
}

.totem-entry-action:focus-visible {
    outline: 3px solid #1769e0;
    outline-offset: -3px;
}

.totem-scroll-status {
    min-height: 40px;
    padding: 10px 12px;
    margin: 0;
    font-size: 14px;
    color: #62778c;
    text-align: center;
}

/* Personal result uses Trailive's light panels; the race colour identifies the bib. */
.totem-personal-card {
    color: #223b46;
}

.totem-personal-hero {
    background: #fff;
    color: #223b46;
    border: 1px solid #e4e9ee;
    border-radius: 16px;
    gap: 24px;
}

.totem-personal-hero::after {
    display: none;
}

.totem-personal-bib {
    background: var(--personal-color);
    color: var(--personal-ink);
    transform: none;
    border-bottom-color: color-mix(in srgb, var(--personal-color) 75%, #000);
    box-shadow: 0 3px 12px #182c4314;
}

.totem-personal-bib .bib-caption {
    border-bottom-color: currentColor;
}

.totem-personal-bib .bib-bottom {
    color: inherit;
    border-top-color: currentColor;
    opacity: .85;
}

.totem-personal-identity {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.totem-personal-hero .totem-personal-race {
    color: #62778c;
    opacity: 1;
}

.totem-personal-hero p {
    color: #62778c;
    opacity: 1;
}

.totem-personal-hero h1 {
    font-size: clamp(26px, 3vw, 44px);
    letter-spacing: -.02em;
}

.totem-personal-hero .totem-personal-status {
    background: #f3f7fa;
    color: #223b46;
    border: 1px solid #e4e9ee;
    border-radius: 6px;
    text-transform: none;
    letter-spacing: normal;
    font-size: 16px;
    padding: 8px 12px;
}

.totem-personal-summary {
    background: #f6f8fa;
    border: 1px solid #e4e9ee;
    border-radius: 16px;
}

.totem-personal-time > span,
.totem-personal-stat > span,
.totem-personal-time small {
    color: #62778c;
}

.totem-timeline-content {
    background: #fff;
    border-color: #e4e9ee;
}

@media (max-width: 600px) {
    .totem-personal-identity {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .totem-personal-photo {
        justify-self: start;
    }
}

/* Landscape touch: give the result area the space between tabs and keyboard. */
body.totem-touch {
    min-height: 100dvh;
    overflow: auto;
}

.totem-touch [data-public-totem] {
    box-sizing: border-box;
    position: relative;
    width: 100%;
    max-width: none;
    height: max(100dvh, 650px);
    padding: 8px clamp(10px, 1vw, 20px);
    margin: 0;
}

.totem-touch .totem-tabs {
    padding-bottom: 4px;
}

.totem-touch .totem-tabs button {
    min-height: 40px;
    padding: 5px 14px;
}

.totem-touch .totem-overview {
    flex: 1 1 0;
    container-type: size;
    min-height: 0;
    max-height: none;
    overflow: hidden;
}

.totem-touch .totem-search {
    position: static;
    display: block;
    margin-top: 6px;
    padding-top: 4px;
}

.totem-touch .totem-keyboard {
    max-width: none;
    margin-top: 4px;
    gap: 3px;
}

.totem-touch .totem-keyboard button {
    min-height: clamp(32px, 4.4dvh, 52px);
    max-width: none;
}

.totem-touch .totem-keyboard button[data-key=" "] {
    max-width: 42%;
}

.totem-personal-hero,
.totem-personal-summary,
.totem-timeline-content {
    border-color: var(--event-panel-border, #e4e9ee);
}

.totem-personal-elevation,
.totem-personal-passages {
    border: 1px solid var(--event-panel-border, #e4e9ee);
    border-radius: var(--event-panel-radius, 1rem);
    padding: 12px 16px 16px;
    margin-top: 20px;
}

.totem-personal-elevation h2,
.totem-personal-passages h2 {
    margin-top: 0;
}

.totem-personal-card h2 > i,
.totem-personal-stat > span > i,
.totem-personal-time > span > i {
    color: #223b46;
}

.totem-bib-icon {
    display: block;
    font-size: 20px;
    margin-bottom: 4px;
}

/* Keep the race box fixed as the profile and the number of visible rows change. */
.totem-touch .totem-race {
    --race-heading: 36px;
    --touch-content-height: calc(100cqh - var(--race-heading) - 49px);
    --touch-row-height: calc(var(--touch-content-height) / 5);
    --touch-list-height: calc(5 * var(--touch-row-height));
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: var(--race-heading) 0 minmax(0, 1fr);
    height: 100%;
    border-radius: var(--event-panel-radius, 1rem);
    border-top: 6px solid var(--race-color);
}

.totem-touch .totem-race[data-touch-profile="true"] {
    --profile-height: clamp(0px, calc(var(--touch-content-height) * .54), calc(var(--touch-content-height) - 132px));
    --touch-row-height: calc((var(--touch-content-height) - var(--profile-height)) / 3);
    --touch-list-height: calc(3 * var(--touch-row-height));
    grid-template-rows: var(--race-heading) var(--profile-height) minmax(0, 1fr);
}

.totem-touch .totem-race-header {
    grid-row: 1;
    min-height: 0;
    padding: 4px 12px;
    border-left: 0;
    overflow: auto;
}

.totem-touch .totem-plot {
    grid-row: 2;
    grid-column: 1;
    height: 100%;
    max-height: none;
    min-height: 0;
    margin: 0 12px;
    overflow: hidden;
}

.totem-touch .totem-rankings {
    grid-row: 3;
    grid-column: 1 / -1;
    grid-auto-rows: calc(var(--touch-list-height) + 30px);
    min-height: 0;
    padding: 6px 10px;
    gap: 8px;
    overflow: auto;
    align-content: start;
}

.totem-touch .totem-ranking-group {
    border: 1px solid var(--event-panel-border, #e4e9ee);
    border-radius: var(--event-panel-radius, 1rem);
    overflow: hidden;
}

.totem-touch .totem-ranking-group h3 {
    height: 28px;
    margin: 0;
    padding: 4px 12px;
    font-size: 16px;
    line-height: 20px;
    background: #f6f8fa;
}

.totem-personal-hero,
.totem-personal-summary,
.totem-personal-elevation,
.totem-personal-passages {
    border-radius: var(--event-panel-radius, 1rem);
    box-shadow: var(--event-panel-shadow, 0 3px 16px rgb(23 43 68 / 6%));
}

.totem-personal-hero {
    border-top: 6px solid var(--personal-color);
}

.totem-touch [data-rank-scroll] .totem-result-row {
    box-sizing: border-box;
    height: var(--touch-row-height);
    display: grid;
    align-items: center;
    overflow: hidden;
}

.totem-touch .totem-plot {
    align-self: center;
}

.totem-touch .totem-result-row .result-card-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.totem-personal-hero .totem-personal-bib {
    padding: 0;
    overflow: hidden;
    background: #fff;
    color: #223b46;
    border: 1px solid #e4e9ee;
}

.totem-bib-band {
    height: 14px;
    padding: 0;
    background: var(--personal-color);
}

.totem-personal-bib > strong {
    padding: 14px 8px;
    background: #fff;
    color: #223b46;
}

.totem-bib-band-bottom {
    height: 14px;
    padding: 0;
}

/* One personal-result panel, with simple separators between its sections. */
.totem-personal-card {
    padding: 24px;
    background: #fff;
    border: 1px solid var(--event-panel-border, #e4e9ee);
    border-top: 6px solid var(--personal-color);
    border-radius: var(--event-panel-radius, 1rem);
    box-shadow: var(--event-panel-shadow, 0 3px 16px rgb(23 43 68 / 6%));
}

.totem-personal-card .totem-personal-hero,
.totem-personal-card .totem-personal-summary,
.totem-personal-card .totem-personal-elevation,
.totem-personal-card .totem-personal-passages {
    padding: 20px 0;
    margin: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.totem-personal-card .totem-personal-summary,
.totem-personal-card .totem-personal-elevation,
.totem-personal-card .totem-personal-passages {
    border-top: 1px solid var(--event-panel-border, #e4e9ee);
}

.totem-personal-card .totem-personal-checkpoint,
.totem-personal-card .totem-timeline-content {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.totem-personal-card .totem-personal-checkpoints .totem-personal-checkpoint::before {
    display: none;
}

.totem-personal-card .totem-personal-checkpoint-name {
    flex-wrap: wrap;
    justify-content: flex-start;
}

.totem-personal-card .totem-personal-footer {
    margin-top: 0;
}

@media (max-width: 540px) {
    .totem-personal-card {
        padding: 16px;
    }
}

/* Aligned split rows keep times easy to compare within the single result panel. */
.totem-personal-card .totem-personal-checkpoints {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 14px;
}

.totem-personal-card .totem-personal-checkpoint {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(0, 1.7fr);
    align-items: center;
    gap: 24px;
    padding: 12px 16px;
}

.totem-personal-card .totem-personal-checkpoint:nth-child(odd) {
    background: #f6f8fa;
}

.totem-personal-checkpoint-heading {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.totem-personal-checkpoint-heading > strong {
    font-size: 17px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.totem-personal-checkpoint-heading > span {
    font-size: 12px;
    color: #62778c;
}

.totem-personal-split-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.totem-personal-split-metrics dt {
    font-size: 12px;
    font-weight: 400;
    color: #62778c;
}

.totem-personal-split-metrics dd {
    margin: 2px 0 0;
    font-size: 20px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.totem-split-total dd {
    color: #223b46;
    font-weight: 750;
}

@media (max-width: 600px) {
    .totem-personal-card .totem-personal-checkpoint {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        padding: 12px;
    }

    .totem-personal-split-metrics dd {
        font-size: 17px;
    }
}

.totem-split-position {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.totem-split-position .result-card-change {
    font-size: 13px;
    font-weight: 600;
}

.totem-dialog-countdown {
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(400px, 100%);
    margin: 8px auto 0;
    color: #48616e;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.totem-dialog-countdown progress {
    appearance: none;
    flex: 1;
    min-width: 0;
    height: 6px;
    overflow: hidden;
    border: 0;
    border-radius: 3px;
    background: #e4e9ee;
    accent-color: #48616e;
}

.totem-dialog-countdown progress::-webkit-progress-bar {
    background: #e4e9ee;
}

.totem-dialog-countdown progress::-webkit-progress-value {
    background: #48616e;
}

.totem-dialog-countdown progress::-moz-progress-bar {
    background: #48616e;
}

.totem-dialog-countdown > span {
    min-width: 34px;
    text-align: right;
}

.totem-display .totem-header {
    grid-template-areas:
        "brand title qr"
        "counts counts qr";
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 4px 12px;
}

.totem-display .totem-brand-toggle {
    grid-area: brand;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 0;
    padding: 2px;
    background: transparent;
}

.totem-display .totem-brand-toggle:focus-visible {
    outline: 3px solid #1769e0;
}

.totem-display .totem-event-logo {
    width: min(8cqw, 80px);
    height: min(6cqw, 60px);
    object-fit: contain;
}

.totem-display .totem-title {
    grid-area: title;
    min-width: 0;
    overflow-wrap: anywhere;
}

.totem-display .totem-header .totem-ranking-qr {
    grid-area: qr;
    display: flex;
    flex-direction: column;
    max-width: 105px;
    gap: 2px;
    text-align: center;
    line-height: 1.15;
}

.totem-display .totem-header .totem-ranking-qr canvas {
    width: clamp(72px, 9cqw, 100px);
    height: auto;
}

.totem-display .totem-counters {
    grid-area: counts;
    gap: 6px;
}

.totem-display .totem-counters span {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px;
    padding: 3px 8px;
}

.totem-display .totem-footer {
    margin-top: auto;
    gap: 2px;
}

/* Arrival strip stays in the footer throughout the rotation. */
.totem-finishers {
    width: 100%;
    background: #fff;
    border: 1px solid #dce5ed;
    border-radius: 12px;
    overflow: hidden;
    color: #182c43;
    font-variant-numeric: tabular-nums;
}

.totem-finishers h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 5px 12px;
    background: #20394c;
    color: #fff;
    font-size: clamp(16px, 1.9cqw, 22px);
}

.totem-finishers h2::before {
    content: "";
    width: 16px;
    height: 12px;
    background: repeating-conic-gradient(#fff 0 25%, transparent 0 50%) 0 0 / 8px 8px;
}

.totem-finisher {
    display: grid;
    grid-template-columns: 5ch minmax(0, 1.5fr) minmax(0, 1fr) 8ch 9ch;
    align-items: center;
    gap: 10px;
    padding: 3px 12px;
    font-size: clamp(14px, 1.75cqw, 23px);
    border-bottom: 1px solid #e3e9ee;
}

.totem-finisher:nth-child(even) {
    background: #f4f7f9;
}

.totem-finisher-person {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.totem-finisher-person .rounded-circle {
    flex: none;
    margin: 0 !important;
}

.totem-finisher-bib {
    background: white;
    border: 1px solid #dce5ed;
    border-top: 3px solid var(--race-color);
    border-radius: 4px;
    text-align: center;
    font-weight: 700;
}

.totem-finisher-person strong,
.totem-finisher-race {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.totem-finisher-change {
    text-align: center;
}

.totem-finisher b {
    text-align: right;
}

.totem-finishers [data-finishers-remaining] {
    margin-inline-start: auto;
    font-variant-numeric: tabular-nums;
    font-size: .85em;
}

.totem-display [data-slide="stats"] [data-rotation-content] {
    container-type: size;
    overflow: auto;
}

.totem-participant-charts {
    flex: 1;
    display: grid;
    gap: clamp(8px, 1.4cqmin, 22px);
    align-content: stretch;
}

.totem-participant-charts {
    grid-auto-rows: minmax(min-content, 1fr);
}

.totem-participant-charts .stats-distribution {
    display: grid;
    grid-template-rows: auto minmax(min-content, 1fr);
    margin: 0 !important;
    border: 1px solid #dce5ed !important;
    box-shadow: none !important;
}

.totem-participant-charts h3 {
    font-size: clamp(19px, 4cqmin, 48px);
}

.totem-participant-charts .stats-distribution > .row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    align-items: stretch !important;
    gap: 2%;
    margin: 0;
}

.totem-participant-charts .stats-distribution > .row > div {
    width: auto;
    min-width: 0;
    margin: 0;
}

.totem-participant-charts .stats-distribution .text-center {
    align-self: center;
}

.totem-participant-charts .stats-legend {
    display: grid;
    grid-auto-rows: 1fr;
}

.totem-participant-charts .stats-legend-row {
    padding-block: clamp(3px, 1.1cqmin, 14px);
    font-size: clamp(15px, 3.4cqmin, 42px);
    line-height: 1.18;
    font-variant-numeric: tabular-nums;
}

.totem-participant-charts .stats-donut {
    max-width: 100%;
}

.totem-participant-charts .stats-swatch {
    width: .65em;
    height: .65em;
}

.totem-participant-charts .stats-percent {
    min-width: 4.2ch;
}

@container (min-aspect-ratio: 6 / 5) {
    .totem-participant-charts {
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
    }

}

.totem-body .totem-overview .result-card-gap {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.totem-display .totem-overview .totem-result-row .result-card-name,
.totem-display .totem-overview .totem-result-row .result-card-duration {
    font-size: clamp(17px, 2cqw, 23px);
}

@container (max-width: 640px) {
    .totem-display .totem-header {
        grid-template-areas:
            "brand qr"
            "title qr"
            "counts counts";
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .totem-display .totem-counters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .totem-finisher {
        grid-template-columns: 5ch minmax(0, 1fr) 4ch 8ch;
        gap: 4px;
    }

    .totem-finisher-race {
        display: none;
    }
}

/* Same result component as the ranking, with fixed columns for the kiosk tops. */
.totem-display .totem-overview .totem-result-row {
    height: var(--touch-row-height, 88px);
    border-bottom: 1px solid #dce5ed;
    overflow: hidden;
}

.totem-display .totem-overview .totem-result-row:nth-child(even),
.totem-display .totem-overview .totem-result-row:nth-child(even) .result-card {
    background-color: #f3f6f8;
}

.totem-display .totem-overview .result-card {
    border: 0;
    background: transparent;
    padding: 0 6px !important;
}

.totem-display .totem-overview .totem-result-row,
.totem-display .totem-overview .totem-entry-action,
.totem-display .totem-overview .result-card {
    display: grid;
    align-content: center;
}

.totem-display .totem-overview .result-card-layout {
    grid-template-columns: 3.8rem minmax(0, 1fr) 6.8rem;
    grid-template-rows: auto;
    align-items: center;
    gap: 6px;
}

.totem-display .totem-overview .result-card-identity {
    display: flex;
    gap: 3px;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
}

.totem-display .totem-overview .result-card-identity .rounded-circle {
    width: 28px !important;
    height: 28px !important;
    margin: 0 !important;
    flex: none;
}

.totem-display .totem-overview .result-card-position {
    font-size: 1rem;
}

.totem-display .totem-overview .result-card-standing {
    margin: 0;
}

.totem-display .totem-overview .result-card-name,
.totem-display .totem-overview .result-card-subtitle {
    flex-wrap: nowrap;
    overflow: hidden;
    gap: .25rem;
}

.totem-display .totem-overview .result-card-name {
    font-size: 1.12rem;
    font-weight: 700;
}

.totem-display .totem-overview .result-card-name > .fw-semibold,
.totem-display .totem-overview .result-card-subtitle > span,
.totem-display .totem-overview .result-card-facts .result-card-category,
.totem-display .totem-overview .result-card-facts .result-card-checkpoint {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.totem-display .totem-overview .result-card-bib {
    flex: none;
    font-size: .85rem;
    text-align: center;
    min-width: 4ch;
}

.totem-display .totem-overview .result-card-subtitle {
    font-size: .82rem;
}

.totem-display .totem-overview .result-card-facts {
    display: flex;
    flex-direction: column;
    grid-column: 3;
    grid-row: 1;
    align-items: flex-end;
    gap: 0;
    border: 0;
    padding: 0;
    min-width: 0;
    line-height: 1.15;
}

.totem-display .totem-overview .result-card-facts::before {
    display: none;
}

.totem-display .totem-overview .result-card-time {
    order: -1;
    gap: 0;
}

.totem-display .totem-overview .result-card-positions {
    max-width: 100%;
    align-items: flex-end;
    gap: 0;
    font-size: .72rem;
}

.totem-display .totem-overview .result-card-duration {
    font-size: 1.1rem;
}


.totem-touch .totem-race-header > div:first-child {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.totem-touch .totem-race-header h2 {
    font-size: clamp(18px, 1.4vw, 25px);
}

@media (max-height: 800px) and (orientation: landscape) {
    .totem-touch .totem-search form label {
        position: absolute;
        clip-path: inset(50%);
    }
}

/* The QR spans the heading and distance selector, leaving their height independent of the code. */
.totem-touch .totem-header,
.totem-touch .totem-tabs {
    margin-right: 84px;
}

.totem-touch .totem-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 4px 12px;
    margin-bottom: 3px;
}

.totem-touch .totem-brand-toggle {
    background: none;
    border: 0;
    padding: 0;
    min-height: 40px;
}

.totem-touch .totem-header-brand .wedosport-logo {
    width: clamp(95px, 9vw, 150px);
}

.totem-touch .totem-title h1 {
    font-size: clamp(17px, 1.45vw, 24px);
    line-height: 1.12;
}

.totem-touch .totem-counters {
    gap: 4px;
    justify-content: flex-end;
}

.totem-touch .totem-counters span {
    display: flex;
    gap: 5px;
    align-items: baseline;
    padding: 3px 6px;
}

.totem-touch .totem-counters strong {
    font-size: 1.05rem;
}

.totem-touch .totem-header .totem-ranking-qr {
    position: absolute;
    right: clamp(10px, 1vw, 20px);
    top: 4px;
    width: 76px;
    margin: 0;
}

.totem-touch .totem-header .totem-ranking-qr canvas {
    width: 76px;
    height: 76px;
}

.totem-touch .totem-header .totem-ranking-qr span {
    position: absolute;
    clip-path: inset(50%);
}

.totem-touch .totem-ranking-group {
    background: var(--bs-body-bg, #fff);
    border-radius: var(--event-panel-radius, 1rem);
}

.totem-touch .totem-ranking-group h3 {
    color: #124f57;
    border-bottom: 1px solid #9eafb9;
    background: white;
}

.totem-touch .totem-entry-action .result-card {
    border: 0;
    border-radius: 0;
    padding: 2px .6rem !important;
}

.totem-touch .totem-result-row + .totem-result-row {
    border-top: 1px solid var(--event-panel-border, #e4e9ee);
}

.totem-touch .totem-entry-action .result-card-layout {
    grid-template-columns: 68px minmax(0, 1fr) minmax(5.6rem, auto);
    grid-template-rows: auto;
    gap: 6px;
}

.totem-touch .totem-overview .result-card-identity {
    display: flex;
    gap: 4px;
    align-items: center;
}

.totem-touch .totem-overview .result-card-identity .rounded-circle {
    width: 32px !important;
    height: 32px !important;
    margin: 0 !important;
    flex-shrink: 0;
}

.totem-touch .totem-overview .result-card-name,
.totem-touch .totem-overview .result-card-subtitle {
    flex-wrap: nowrap;
}

.totem-touch .totem-overview .result-card-name .fw-semibold,
.totem-touch .totem-overview .result-card-subtitle > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.totem-touch .totem-overview .result-card-facts {
    grid-column: 3;
    grid-row: 1;
    padding: 0;
    border: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
}

.totem-touch .totem-overview .result-card-facts::before {
    display: none;
}

.totem-touch .totem-overview .result-card-time {
    order: -1;
    gap: 0;
}

.totem-touch .totem-overview .result-card-positions {
    display: none;
}

@media (max-height: 920px) {
    .totem-touch .totem-overview .result-card-meta {
        display: none;
    }
}

.totem-display .totem-course-map {
    flex: 1;
    min-height: 0;
    background: #eef3f7;
    border-radius: 12px;
    overflow: hidden;
}
