/* V200 — bounded ordinary controls; never the floating Pill, medals or lesson cards. */
.ss-room-control{
  min-height:44px!important;min-width:44px!important;max-width:100%;
  border-radius:12px!important;font-family:inherit!important;font-size:14px!important;
  font-weight:700!important;line-height:1.2!important;white-space:normal;
  padding:8px 12px!important;border-bottom-width:3px!important;
  border-bottom-style:solid!important;border-bottom-color:var(--gold,var(--slava-gold,#f2c744))!important;
}
.ss-room-control:focus-visible{outline:3px solid var(--slava-paint-blue, #6fc0ff)!important;outline-offset:3px!important}
.ss-room-control[disabled]{opacity:.55;cursor:not-allowed}
/* Keep inline colors: several old rooms use them to communicate the active setting. */
.ss-room-control[data-ss-control="navigation"]{
  background:var(--slava-paint-bg-deep, #27241e)!important;color:var(--slava-gold,#f2c744)!important;border:1px solid var(--slava-paint-line-strong, #6c6250)!important;
  border-bottom:3px solid var(--slava-paint-blue, #6fc0ff)!important;
}
body[data-ss-room="rehearsal.html"] #bar{bottom:var(--ss-back-height,58px)}
body[data-ss-room="rehearsal.html"]{padding-bottom:var(--ss-controls-reserve,260px)}
body[data-ss-room="rehearsal.html"] #deviceVoiceHelp{display:inline-block;min-height:44px;padding:12px 4px}
body[data-ss-room="rehearsal.html"] #deviceVoiceHelp[hidden]{display:none}
body[data-ss-room="rehearsal.html"] #pasteScriptButton{
 display:block;width:100%;min-height:52px;margin:14px 0 10px;
 background:linear-gradient(180deg,var(--slava-paint-gold, #f6d35e),var(--slava-paint-gold, #dfa916));color:var(--slava-paint-ink-dark, #241c02);
 border:1px solid var(--slava-paint-line-strong, #e4bd4a);border-radius:13px;font:800 17px/1.3 -apple-system,Segoe UI,sans-serif;
 box-shadow:0 4px 14px var(--slava-paint-focus, rgba(217,169,22,.35));
}
body[data-ss-room="rehearsal.html"] #pasteScriptButton:focus-visible{outline:3px solid var(--slava-paint-blue, #6fc0ff);outline-offset:3px}
body[data-ss-room="rehearsal.html"] #ladderWorkshop{
 background:var(--slava-card,#141d33);border:1px solid var(--slava-paint-line-strong, #324362);border-radius:16px;margin:18px 0;padding:14px;
 scroll-margin-bottom:calc(var(--ss-controls-reserve,260px) + 12px);
}
body[data-ss-room="rehearsal.html"] #ladderTitle{font-size:18px;margin:0 0 10px;color:var(--slava-gold,#f2c744)}
body[data-ss-room="rehearsal.html"] .ladderDirections{display:flex;gap:8px}
body[data-ss-room="rehearsal.html"] .ladderDirections button{
 flex:1;min-height:44px;border-radius:12px;border:1px solid var(--slava-paint-line-strong, #62728c);background:var(--slava-paint-bg-deep, #1e293b);
 color:var(--slava-paint-ink-bright, #e5e7eb);font:700 14px/1.25 -apple-system,Segoe UI,sans-serif;padding:9px;
}
body[data-ss-room="rehearsal.html"] .ladderDirections button[aria-pressed="true"]{border-color:var(--slava-gold,#f2c744);color:var(--slava-gold,#f2c744)}
body[data-ss-room="rehearsal.html"] #ladderStatus{font-size:13px;color:var(--slava-ink-sub,#b9c4d8);line-height:1.4}
body[data-ss-room="rehearsal.html"] #ladderTree{max-height:280px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:4px}
body[data-ss-room="rehearsal.html"] .ladderRung{width:fit-content;max-width:100%;margin:8px auto;padding:8px 10px;border:1px solid transparent;border-radius:10px;overflow-wrap:anywhere;text-align:center;font-size:18px;line-height:1.4}
body[data-ss-room="rehearsal.html"] .ladderRung.current{border-color:var(--slava-gold,#f2c744);background:var(--slava-paint-bg-deep, #273249);color:var(--slava-gold,#f2c744)}
/* V206 — keep the existing functions; normalize their targets and free the editor. */
body[data-ss-room="rehearsal.html"] #bar .row:first-child{display:grid;grid-template-columns:repeat(5,minmax(0,1fr))}
body[data-ss-room="rehearsal.html"] #bar button{
 min-width:44px;min-height:48px;padding:6px 4px;line-height:1.25;border-radius:12px;
}
body[data-ss-room="rehearsal.html"] #bar #hear{font-size:14px}
body[data-ss-room="rehearsal.html"] :is(button,a,textarea):focus-visible{
 outline:3px solid var(--slava-paint-blue, #6fc0ff)!important;outline-offset:3px!important;
}
body[data-ss-room="rehearsal.html"] #pilotPin a{min-height:44px;display:inline-flex;align-items:center;justify-content:center}
@media(max-width:600px),(max-width:950px) and (max-height:500px){
 body[data-ss-room="rehearsal.html"][data-ss-editing="true"] #bar{position:static;margin-top:14px}
 body[data-ss-room="rehearsal.html"][data-ss-editing="true"]{padding-bottom:calc(var(--ss-back-height,58px) + 24px)}
 body[data-ss-room="rehearsal.html"] #bar{padding:8px 12px 8px}
 body[data-ss-room="rehearsal.html"] #bar #status{line-height:1.3}
 body[data-ss-room="rehearsal.html"] #deviceVoiceHelp{padding:8px 4px}
}
/* Daily's tiles remain usable above the fixed Pill. This changes room space, not Pill geometry. */
body[data-ss-room="daily-classic.html"]{padding-bottom:140px}
body[data-ss-room="daily-classic.html"] .tile{scroll-margin-bottom:140px}
body[data-ss-room="daily-classic.html"] #cal{padding-right:156px}
@media(max-width:520px){
 body[data-ss-room="daily-classic.html"] #cal{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* V280: the existing level chooser occupies one compact row until opened. */
#ssRoomLevels{width:min(100%,720px);margin:8px auto;box-sizing:border-box;border:1px solid var(--slava-paint-line-strong, #61758e);border-radius:12px;background:var(--slava-paint-panel-glass, #17263dec);color:var(--slava-paint-blue, #edf3ff)}
#ssRoomLevels>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;padding:8px 12px;box-sizing:border-box;cursor:pointer;font-size:14px;font-weight:700}
#ssRoomLevels>summary::before{content:'›';font-size:20px}#ssRoomLevels[open]>summary::before{transform:rotate(90deg)}#ssRoomLevels>summary::-webkit-details-marker{display:none}
#ssRoomLevels>summary:focus-visible{outline:3px solid var(--slava-paint-blue, #94d0ff);outline-offset:2px}#ssRoomLevels .ssCurrentLevel{margin-left:auto;color:var(--slava-paint-gold, #f4da91);font-size:13px}
#ssRoomLevels #levels{margin:8px 0!important}#ssRoomLevels[open]{padding-bottom:8px}

/* V283: smaller controls use the original medal SVG, labels and progress. */
:is(#ssRoomLevels,#ssVerbLevels) #levels.ssm-row .medal{min-height:56px;height:56px;padding:4px 0;gap:2px;justify-content:center}
:is(#ssRoomLevels,#ssVerbLevels) #levels.ssm-row .ssm-ic svg{width:28px;height:28px}
:is(#ssRoomLevels,#ssVerbLevels) #levels.ssm-row .ssm-nm{font-size:11.5px;line-height:1.2;font-weight:700}

/* V289: room card labels wrap inside their own tile; original labels and art retained. */
body:is([data-ss-room="grammar.html"],[data-ss-room="vocab.html"]) #keys{grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px}
body:is([data-ss-room="grammar.html"],[data-ss-room="vocab.html"]) #keys .kc{min-height:94px;padding:9px 8px;gap:4px}
body:is([data-ss-room="grammar.html"],[data-ss-room="vocab.html"]) #keys .kc .ki{width:28px;height:28px;font-size:20px;flex-shrink:0}
body:is([data-ss-room="grammar.html"],[data-ss-room="vocab.html"]) #keys .kc :is(.ku,.ke){white-space:normal;font-size:14px;line-height:1.3;text-align:center;overflow-wrap:anywhere}
@media(max-width:480px){body:is([data-ss-room="grammar.html"],[data-ss-room="vocab.html"]) #keys{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* V292: preserve original medal art, reduce the remaining 72px seats. */
body:is([data-ss-room="speaking.html"],[data-ss-room="conversation.html"]) #levels .medal{height:56px;min-height:56px;padding:4px 0;gap:2px;justify-content:center}
body:is([data-ss-room="speaking.html"],[data-ss-room="conversation.html"]) #levels .ssm-ic svg{width:28px;height:28px}
body:is([data-ss-room="speaking.html"],[data-ss-room="conversation.html"]) #levels .ssm-nm{font-size:11.5px;line-height:1.2;font-weight:700}
body:is([data-ss-room="speaking.html"],[data-ss-room="conversation.html"]) #keys{grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px}
body:is([data-ss-room="speaking.html"],[data-ss-room="conversation.html"]) #keys .kc{min-height:94px;padding:9px 8px;gap:4px}
body:is([data-ss-room="speaking.html"],[data-ss-room="conversation.html"]) #keys .kc .ki{width:28px;height:28px;font-size:20px;flex-shrink:0}
body:is([data-ss-room="speaking.html"],[data-ss-room="conversation.html"]) #keys .kc :is(.ku,.ke){white-space:normal;font-size:14px;line-height:1.3;text-align:center;overflow-wrap:anywhere}
@media(max-width:480px){body:is([data-ss-room="speaking.html"],[data-ss-room="conversation.html"]) #keys{grid-template-columns:repeat(2,minmax(0,1fr))}}


html body :is(#slavaBackPill,#backTop,#gear,a.backBig,a.back,a.houseReturn,#ssLetterNav a),html body[data-ss-room] :is(#slavaBackPill,#backTop,#gear).ss-room-control.ss-room-control{min-height:52px!important;min-width:52px!important;height:auto!important;max-height:none!important}


html body[data-ss-room="verbs.html"] #levels.ssm-row .medal:not(.on){background:var(--slava-paint-blue-tint, rgba(20,29,51,.72))!important}
html body[data-ss-room="verbs.html"] #levels.ssm-row .medal.on{background:var(--slava-paint-blue, rgba(20,29,51,.86))!important}
