/* PRESENTATION LAB: "Full scene 2" (layout full + data-hud=2). One distance readout, a thin summit bar, one quiet stats line, a lighter word bar. Lab only. */
html[data-hud="2"] .app>.mtn .alt,html[data-hud="2"] .app>.stats,html[data-hud="2"] #altLine{display:none!important}
html[data-hud="2"] header.top .peak{display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:nowrap}
@keyframes lab-quiet{to{opacity:.5}}
html[data-hud="2"] header.top .peak h1{font-size:1.5rem;letter-spacing:.04em;font-weight:400;color:#fff;min-width:0;flex:0 1 auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html[data-hud="2"] header.top .peak .sub{font-size:1rem;letter-spacing:.06em;display:flex;align-items:center;gap:6px;flex:none;white-space:nowrap;color:rgba(255,255,255,.88);margin:0}
html[data-hud="2"] header.top .peak .sub img.flag{height:1.05em;width:auto;border-radius:2px}
html[data-hud="2"] .hbtns .icon{background:none!important;box-shadow:none!important;border:0!important;color:rgba(255,255,255,.88);width:34px;height:34px;filter:drop-shadow(0 1px 3px rgba(0,0,0,.6))}
/* the new readout */
#hud2{display:none}
html[data-hud="2"] #hud2{display:block;position:absolute;left:14px;right:14px;top:56px;z-index:3;pointer-events:none;color:#fff;text-shadow:0 1px 8px rgba(0,0,0,.65)}
html[data-hud="2"] #hud2 .h-main{display:flex;justify-content:space-between;gap:26px;align-items:flex-start}
html[data-hud="2"] #hud2 .h-main>div{display:flex;flex-direction:column;align-items:center;text-align:center}
html[data-hud="2"] #hud2 b{display:block;font-size:2.7rem;font-weight:500;line-height:.95;letter-spacing:.03em}
html[data-hud="2"] #hud2 small{display:block;margin-top:2px;font-size:.85rem;letter-spacing:.14em;text-transform:uppercase;opacity:.9}
html[data-hud="2"] #hud2 .h-main span{display:block;margin-top:7px;font-size:.78rem;letter-spacing:.06em;opacity:.7}
/* letters running low: orange pulse at 50 or fewer, red flash at 25 or fewer */
html[data-hud="2"] #hud2 #h2l.warn b,html[data-hud="2"] #hud2 #h2l.warn small{color:#ff9f43;opacity:1;animation:labPulse 1.4s ease-in-out infinite}
html[data-hud="2"] #hud2 #h2l.crit b,html[data-hud="2"] #hud2 #h2l.crit small{color:#ff4d4d;opacity:1;animation:labFlash .5s steps(2,jump-none) infinite}
@keyframes labPulse{0%,100%{opacity:1;text-shadow:0 0 0 rgba(255,159,67,0),0 1px 8px rgba(0,0,0,.65)}50%{opacity:.55;text-shadow:0 0 14px rgba(255,159,67,.95),0 1px 8px rgba(0,0,0,.65)}}
@keyframes labFlash{0%{opacity:1;color:#ff3b3b;text-shadow:0 0 14px rgba(255,60,60,.95),0 1px 8px rgba(0,0,0,.65)}100%{opacity:.25;color:#ff3b3b}}
@media (prefers-reduced-motion:reduce){html[data-hud="2"] #hud2 #h2l.warn b,html[data-hud="2"] #hud2 #h2l.warn small,html[data-hud="2"] #hud2 #h2l.crit b,html[data-hud="2"] #hud2 #h2l.crit small{animation:none}}
#hudBar{display:none}
html[data-hud="2"] #hudBar{display:block;position:fixed;left:0;right:0;top:env(safe-area-inset-top,0px);height:3px;z-index:30;background:rgba(255,255,255,.18);pointer-events:none}
html[data-hud="2"] #hudBar i{display:block;height:100%;width:0;background:linear-gradient(90deg,#ff9f43,#ffd28a);box-shadow:0 0 8px rgba(255,170,80,.8);transition:width .4s ease}
/* word bar: a quiet pill, the word you spell is the star */
html[data-hud="2"] .app>.word{background:rgba(8,12,20,.45);border:0!important;box-shadow:none;border-radius:999px;height:56px;padding:0 8px 0 18px}
html[data-hud="2"] .app>.word.idle .hint{font-size:1.2rem;letter-spacing:.03em;opacity:.95;color:#fff;text-shadow:0 1px 6px rgba(0,0,0,.6)}
html[data-hud="2"] .app>.word:not(.idle){background:rgba(8,12,20,.6);font-size:1.5rem}
html[data-hud="2"] .word .wbtn{background:rgba(255,159,67,.22)!important;border:1.5px solid rgba(255,190,110,.85)!important;box-shadow:inset 0 -3px 0 rgba(0,0,0,.28)!important;border-radius:999px;font-size:1.1rem;letter-spacing:.08em;color:#fff;text-decoration:none;padding:0 14px;height:40px;min-width:84px;flex:none}

/* checkpoint progress card (lab-checkpoints.js) */
#cpCard{position:fixed;left:50%;top:calc(164px + env(safe-area-inset-top,0px));width:min(94vw,390px);transform:translate(-50%,-8px);opacity:0;pointer-events:none;z-index:40;box-sizing:border-box;padding:8px 14px 8px;border-radius:6px;background:rgba(8,12,20,.88);color:#fff;text-align:center;font-family:"Bebas Neue",Figtree,system-ui,sans-serif;box-shadow:0 8px 30px rgba(0,0,0,.5),inset 0 0 0 1px rgba(255,159,67,.45);transition:opacity .5s ease,transform .5s ease}
#cpCard.on{opacity:1;transform:translate(-50%,0)}
#cpCard .cp-h{display:flex;align-items:baseline;justify-content:center;gap:10px}
#cpCard .cp-h b{font-size:1.9rem;font-weight:400;line-height:1;color:#ffd28a}
#cpCard .cp-h span{font-size:1.9rem;letter-spacing:.1em;opacity:1}
#cpCard .cp-s{margin-top:0;font-size:1.35rem;letter-spacing:.16em}
#cpCard.ahead .cp-s{color:#5fd68a}
#cpCard.ontrack .cp-s{color:#ffd28a}
#cpCard.ahead .cp-s{color:#5fd68a}
#cpCard.behind .cp-s{color:#ff6b5a}
#cpCard p{margin:4px 0 6px;font-family:Figtree,system-ui,sans-serif;font-size:.85rem;line-height:1.3;letter-spacing:0;opacity:.95}
#cpCard .cp-n{display:flex;justify-content:space-around;gap:12px;margin-top:8px;letter-spacing:.04em}
#cpCard .cp-n span{display:flex;flex-direction:column;align-items:center;gap:0;line-height:1.1}
#cpCard .cp-n i{font-style:normal;font-size:.95rem;letter-spacing:.18em;opacity:.75}
#cpCard .cp-n b{font-weight:400;font-size:1.55rem;color:#fff;white-space:nowrap}
body.ovopen #cpCard{display:none}

/* while tracing a word: show only the score (the tile colours already say whether it is a word) */
html[data-hud="2"] .word .score small{display:none!important}

/* the floating +m from the game is replaced by the value above the slammed word */
html[data-hud="2"] #gainLayer{display:none!important}
/* word + score appear just above the 'Drag letters' staging bar */
html[data-hud="2"] #cinWord{top:auto;bottom:calc(var(--wb,150px) + 12px)}
html[data-hud="2"] #cinWord .l{font-size:min(12vw,56px)}
html[data-hud="2"] #cinWord.big .l{font-size:min(14vw,64px)}
html[data-hud="2"] #cinWord .g{font-size:min(8vw,34px);margin-bottom:2px}

/* ---- layout v3 (owner, 23 Oct): climb name top centre (name, then country and flag), distance top left, letters top right, options button under the letters ---- */
html[data-hud="2"] .app>header.top{position:absolute;left:0;right:0;top:0;height:0;padding:0;margin:0;display:block;z-index:5;pointer-events:none}
html[data-hud="2"] header.top .peak{position:absolute;left:50%;top:10px;transform:translateX(-50%);width:min(38vw,190px);display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:2px;text-align:center;pointer-events:none}
html[data-hud="2"] header.top .peak h1{font-size:1.2rem;max-width:100%;width:100%;text-align:center;line-height:1.15;letter-spacing:.03em;text-shadow:0 1px 8px rgba(0,0,0,.65)}
html[data-hud="2"] header.top .peak .sub{justify-content:center;font-size:.85rem;letter-spacing:.05em;gap:6px;text-shadow:0 1px 6px rgba(0,0,0,.65)}
html[data-hud="2"] #hud2{top:10px;left:12px;right:12px}
html[data-hud="2"] #hud2 .h-main>div{min-width:84px}
html[data-hud="2"] #hud2 b{font-size:2.15rem}
html[data-hud="2"] #hud2 b u{font-size:.45em;text-decoration:none;margin-left:3px;letter-spacing:.06em;opacity:.85;font-weight:400}
html[data-hud="2"] #hud2 small{font-size:.72rem}
html[data-hud="2"] #hud2 .h-main span{font-size:.7rem;margin-top:4px}
html[data-hud="2"] header.top .hbtns{position:absolute;right:12px;top:92px;width:84px;display:flex;justify-content:center;gap:0;pointer-events:auto}
html[data-hud="2"] .hbtns .icon{width:42px;height:42px;font-size:1.5rem}
/* no leaderboard button while climbing (it is back on the start screen and the end panel) */
html[data-hud="2"] body:not(.ended):not(.ovopen) #lbBtn{display:none!important}
html[data-hud="2"] #cpCard{top:calc(140px + env(safe-area-inset-top,0px))}
/* in-climb options panel (lab-menu.js) */
#climbMenu{position:fixed;inset:0;z-index:95;display:none;align-items:center;justify-content:center;background:rgba(4,8,16,.45)}
#climbMenu.on{display:flex}
#climbMenu .cm-card{width:min(86vw,320px);padding:18px 16px 16px;border-radius:14px;background:rgba(14,18,28,.94);box-shadow:0 12px 40px rgba(0,0,0,.55),inset 0 0 0 1px rgba(255,190,110,.4);display:flex;flex-direction:column;gap:10px;text-align:center}
#climbMenu h3{margin:0 0 4px;font:700 .9rem system-ui,sans-serif;letter-spacing:.35em;color:#FFCF6B}
#climbMenu button{display:flex;align-items:center;justify-content:space-between;gap:12px;height:50px;padding:0 16px;border-radius:12px;border:1px solid rgba(255,190,110,.55);background:rgba(255,159,67,.14);color:#fff;font:600 1.05rem system-ui,sans-serif;cursor:pointer}
#climbMenu button i{font-style:normal;font-size:.8rem;letter-spacing:.14em;padding:4px 10px;border-radius:999px;background:rgba(255,255,255,.12);color:rgba(255,255,255,.7)}
#climbMenu button i.on{background:#ff9f43;color:#1b1206}
#climbMenu button.cm-back{justify-content:center;background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.3)}
/* ---- semi-transparent panels behind the climb HUD (owner, 23 Oct) ---- */
html[data-hud="2"] header.top .peak{box-sizing:border-box;padding:6px 10px 7px;border-radius:14px;background:rgba(8,12,20,.45);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);box-shadow:inset 0 0 0 1px rgba(255,255,255,.1)}
html[data-hud="2"] #hud2 .h-main>div{box-sizing:border-box;padding:6px 10px 7px;border-radius:14px;background:rgba(8,12,20,.45);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);box-shadow:inset 0 0 0 1px rgba(255,255,255,.1)}
html[data-hud="2"] header.top .hbtns{background:rgba(8,12,20,.45);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);border-radius:14px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.1);padding:3px 0;box-sizing:border-box}
html[data-hud="2"] .hbtns #menuBtn{background:transparent!important;border-color:transparent!important;box-shadow:none!important}
/* Give up lives inside the options panel */
#climbMenu button.cm-giveup{justify-content:center;background:rgba(255,90,70,.14);border-color:rgba(255,120,100,.7);color:#ffd9d2}
/* panel fit: keep the three panels from touching on narrow phones, and let the hint share the bar with the Options button */
html[data-hud="2"] header.top .peak{width:min(34vw,160px)}
html[data-hud="2"] #hud2 .h-main>div{min-width:76px}
html[data-hud="2"] #hud2 b{font-size:1.95rem}
html[data-hud="2"] .app>.word.idle .hint{font-size:1.02rem}
html[data-hud="2"] .word .wbtn{padding:0 12px;min-width:0}
/* no top-right options button while climbing: Options now lives in the word bar (owner, 23 Oct) */
html[data-hud="2"] body:not(.ended):not(.ovopen) header.top .hbtns{display:none!important}

/* distance panel narrower now the label is "LEFT": more room between it and the climb name */
html[data-hud="2"] #hud2 .h-main>div{min-width:0!important}
html[data-hud="2"] #hud2 #h2r{padding-left:12px;padding-right:12px}
html[data-hud="2"] #hud2 #h2r b{font-size:1.75rem}
html[data-hud="2"] #hud2 #h2r{padding-left:8px;padding-right:8px}
html[data-hud="2"] #hud2 #h2l b{font-size:1.75rem}
html[data-hud="2"] header.top .peak{width:min(32vw,136px)!important}

/* laptop and tablet windows: keep the letter board to under half the window height so the landscape gets the rest */
@media (min-width:520px) and (min-height:560px){
  html[data-hud="2"] .app>.boardarea{flex:0 0 auto!important;height:min(44vh,472px)!important;min-height:0!important}
}
