.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
[data-records-hud]{min-width:0;max-width:calc(100% - 48px)}
.records-chip{position:relative;isolation:isolate;display:flex;align-items:center;gap:9px;max-width:100%;min-height:46px;padding:5px 10px 5px 5px;border:1px solid #efd8a4;border-radius:16px;background:linear-gradient(115deg,#fff4cf,#fffdf7 42%,#fff1cd);color:#53402f;box-shadow:0 3px 0 #e8c77966,0 3px 13px #ecc65b18;text-align:left;transition:transform .16s,box-shadow .16s}
.records-chip:hover{transform:translateY(-1px);box-shadow:0 4px 0 #e8c77966,0 5px 18px #ecc65b40}
.records-chip:active{transform:translateY(2px);box-shadow:0 1px 0 #e8c77966}
.records-chip::after{content:'';position:absolute;z-index:-1;inset:0;border-radius:inherit;overflow:hidden;background:linear-gradient(110deg,transparent 25%,#ffffffb3 45%,transparent 65%);background-size:300% 100%;animation:record-shine 8s ease-in-out infinite;pointer-events:none}
.record-medal{position:relative;display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:12px;background:radial-gradient(circle at 32% 20%,#fffef3,#ffe998 60%,#f2bd49);box-shadow:inset 0 1px 1px #fff,0 2px 4px #c8942d25}
.record-medal svg{width:32px;height:32px;stroke:none;fill:none;overflow:visible;filter:drop-shadow(0 1px 1px #b7752426)}
.record-medal .cup-handle{stroke:#d68d1a;stroke-width:3;fill:none}
.record-medal .cup-bowl{fill:#ffcb38;stroke:#d48a18;stroke-width:1}
.record-medal .cup-light{fill:none;stroke:#fff4b6;stroke-width:2.5}
.record-medal .cup-stem,.record-medal .cup-base{fill:#da951f}
.record-medal .cup-star{fill:#fff8d2}.record-medal .cup-spark{fill:#fff;stroke:#edb631;stroke-width:.7}
.record-metric{display:flex;flex-direction:column;min-width:0;gap:1px}
.record-metric small{font-size:9px;font-weight:750;line-height:12px;white-space:nowrap;color:#94733d}
.record-metric strong{font-size:14px;line-height:18px;font-weight:850;font-variant-numeric:tabular-nums;letter-spacing:-.35px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100px}
.record-points{padding-left:9px;border-left:1px solid #e9d8b2}
.record-arrow{font-size:23px;color:#a7833d;line-height:1;margin-left:auto}
.records-chip.is-pending{border-style:dashed}
.records-chip[data-state=error]{box-shadow:0 2px 0 #e8c77944}
.records-chip[data-state=loading] [data-record-score]{opacity:.6}
.puzzle-meta:has([data-records-hud]){min-height:46px}
.records-personal .records-chip{width:100%;justify-content:center;gap:16px;padding:10px 16px;margin:0 0 18px;border-radius:19px}
.records-personal .record-medal{width:44px;height:44px}.records-personal .record-medal svg{width:39px;height:39px}
.records-personal .record-metric strong{font-size:21px;line-height:27px;max-width:180px}
.records-personal .record-metric small{font-size:10px}
.overall-records .modal-title{font-size:23px;margin-bottom:18px}
.records-personal .records-chip{margin-bottom:0}.records-solved{font-size:12px;color:var(--muted);text-align:center;margin:8px 0 17px}
.records-tabs{display:flex;background:var(--soft);border-radius:13px;padding:4px;gap:4px}
.records-tabs button{flex:1;padding:9px;font-size:12px;font-weight:800;border-radius:10px;background:transparent;color:var(--muted)}
.records-tabs button[aria-pressed=true]{background:white;color:var(--purple-dark);box-shadow:0 2px 6px #6740cf14}
.records-bar{display:flex;align-items:center;justify-content:space-between;margin:8px 0}
.records-limit{font-size:10px;color:var(--muted)}
.records-status{font-size:12px;color:var(--muted);text-align:center;line-height:1.6;margin:8px 0}
.records-status:empty{display:none}.records-status a{display:block;margin-top:12px}
.records-list{list-style:none;padding:0;margin:0;max-height:min(38dvh,360px);overflow:auto;overscroll-behavior:contain;touch-action:pan-y;scrollbar-width:thin}
.records-row{display:flex;align-items:center;gap:9px;min-height:58px;padding:9px 5px;border-bottom:1px solid var(--line);font-size:13px}
.records-row.is-me{border-radius:12px;background:#f1eaff;border-bottom-color:transparent}
.records-position{width:27px;flex-shrink:0;font-size:11px;color:var(--muted);text-align:center;font-variant-numeric:tabular-nums}
.records-avatar{position:relative;display:grid;place-items:center;width:31px;height:31px;flex:none;overflow:hidden;background:#ece6f6;color:var(--purple-dark);border-radius:50%;font-weight:800}
.records-avatar img{position:absolute;width:100%;height:100%;object-fit:cover}
.records-name{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.records-name strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.records-name small{font-size:10px;color:var(--muted)}.records-name strong small{color:var(--purple);margin-left:5px}
.records-row-score{font-size:13px;font-variant-numeric:tabular-nums;white-space:nowrap}
.records-play{margin-top:18px!important}
@keyframes record-shine{0%,70%{background-position:180% 0}85%,100%{background-position:-100% 0}}
@media(max-width:370px){.records-chip{gap:6px;padding-right:7px}.record-points{padding-left:6px}.record-metric strong{max-width:83px;font-size:13px}.record-metric small{font-size:8px}}
@media(max-height:650px){.puzzle-meta:has([data-records-hud]){min-height:40px}.records-chip{min-height:38px;border-radius:13px;padding-block:3px}.record-medal{width:29px;height:29px}.record-medal svg{width:28px;height:28px}.record-metric strong{line-height:16px}.records-list{max-height:30dvh}}
@media(orientation:landscape) and (max-height:500px){.records-chip{min-height:30px;padding-block:2px;gap:7px}.record-medal{width:26px;height:26px}.record-medal svg{width:25px;height:25px}.record-metric{flex-direction:row;align-items:center;gap:5px}.record-metric strong{font-size:12px}.record-metric small{font-size:8px}.puzzle-meta:has([data-records-hud]){min-height:31px}.records-list{max-height:35dvh}}
@media(prefers-reduced-motion:reduce){.records-chip::after{animation:none}.records-chip{transition:none}}

/* In a friends' room the trophy stays in the header (src/play-tools.css). Short screens drop the
   race title while playing; the round clock stays on its line. */
@media(max-height:650px){html[data-race-phase=playing] .race-title{display:none}html[data-race-phase=playing] .race-status{justify-content:flex-end}}

/* Leave room for the named practice action without hiding the global rank. */
@media(max-width:760px),(orientation:landscape) and (max-height:500px){
  .puzzle-meta:has(#new-game:not([hidden])) .record-metric small,.puzzle-meta:has(#new-game:not([hidden])) .record-arrow{display:none}
}

.puzzle-meta:has(#new-game:not([hidden])) .record-metric:not(.record-points){flex:none}
.puzzle-meta:has(#new-game:not([hidden])) .record-metric:not(.record-points) strong{max-width:none}

/* Confirmed global promotions move the real keyed row inside its own scroller. */
.records-list.is-reordering{overflow-anchor:none;scroll-behavior:auto}
.records-row{position:relative}
.records-row.is-record-promoting{z-index:2;background:linear-gradient(105deg,#ede2ff,#fff1bf);box-shadow:inset 0 0 0 1px #c9a7ff;isolation:isolate}
.records-row-change{position:absolute;right:6px;bottom:1px;font-size:9px;line-height:11px;font-weight:800;color:#7542bd;white-space:nowrap;pointer-events:none}
.records-row .odometer{vertical-align:middle}
.records-position.odometer{justify-content:center}
@media(prefers-reduced-motion:reduce){.records-row.is-record-promoting{box-shadow:none}}
