/* Reuse the shared Rounding Line-Up classroom shell; own only this game's board. */
#bestEstimateHost { height:100%; min-height:0; }
.best-estimate-game { height:100%; min-height:0; display:grid; grid-template-rows:auto minmax(0,1fr); gap:8px; }
.be-toolbar { display:flex; align-items:end; flex-wrap:wrap; justify-content:center; gap:8px; padding:8px; background:white; border:1px solid var(--rlu-line); border-radius:8px; z-index:3; }
.be-toolbar > label { display:grid; gap:3px; font-size:13px; font-weight:700; }
.best-estimate-game select,.best-estimate-game button,.be-toolbar summary { border:2px solid var(--rlu-line); border-radius:8px; background:#f8fbfd; color:var(--rlu-ink); min-height:48px; padding:8px 14px; font-size:16px; font-weight:700; cursor:pointer; }
.be-toolbar summary { display:flex; align-items:center; }
.be-toolbar details { position:relative; }
.be-options { position:absolute; top:calc(100% + 6px); right:0; width:330px; padding:12px; background:white; border:2px solid var(--rlu-line); box-shadow:var(--rlu-shadow); border-radius:8px; z-index:4; }
.be-options fieldset { border:0; padding:0; margin:0 0 12px; display:flex; gap:6px; flex-wrap:wrap; }
.be-options legend { margin-bottom:5px; font-weight:700; }
.be-options label { display:flex; align-items:center; gap:6px; min-height:48px; padding:5px; background:#eef4f8; border-radius:6px; }
.be-options input { width:20px; height:20px; accent-color:var(--rlu-blue); }
.be-board { background:white; border:1px solid var(--rlu-line); border-radius:8px; box-shadow:var(--rlu-shadow); padding:10px 18px; min-height:0; display:grid; grid-template-rows:auto auto minmax(0,.8fr) auto minmax(0,1.4fr) auto; gap:8px; }
.be-status { display:flex; flex-wrap:wrap; gap:12px; justify-content:space-between; color:var(--rlu-muted); font-size:16px; font-weight:700; }
.be-task { text-align:center; }
.be-task h2 { font-size:clamp(22px,2.2vw,34px); margin:0 0 5px; }
.be-task p { font-size:clamp(17px,1.5vw,24px); margin:0; }
.be-equation,.be-working { position:relative; min-height:0; width:100%; display:grid; place-items:center; }
.be-equation .spire-diagram,.be-working .spire-diagram { width:100%; height:100%; margin:0; }
.be-equation figure,.be-working figure { position:absolute; inset:0; min-height:0; width:100%; height:100%; margin:0; display:flex; align-items:center; justify-content:center; }
.be-equation svg,.be-working svg { display:block; width:100%; height:100%; max-width:none; max-height:100%; min-height:0; }
.be-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.be-choices button { position:relative; display:flex; align-items:center; justify-content:center; gap:12px; min-height:82px; background:white; padding:10px 16px; }
.be-choices button span { font-size:20px; color:var(--rlu-muted); }
.be-choices strong { font-size:clamp(24px,3vw,43px); overflow-wrap:anywhere; }
.be-choices button[aria-pressed="true"] { background:#fff3d6; border-color:#b47800; }
.be-choices button.is-correct { border-color:var(--rlu-green); background:#e6f6ee; }
.be-choices button.is-wrong { border-color:#b33232; background:#fff0ef; }
.be-discussion { min-height:0; display:grid; grid-template-rows:auto minmax(0,1fr) auto; gap:4px; text-align:center; }
.be-discussion > p { margin:0; font-size:clamp(16px,1.4vw,21px); min-height:25px; }
.be-discussion [data-explanation] { min-height:25px; }
.be-actions { display:flex; justify-content:center; gap:8px; flex-wrap:wrap; }
.best-estimate-game button.be-primary { background:var(--rlu-violet); border-color:var(--rlu-violet); color:white; }
.best-estimate-game button:disabled { cursor:default; }
.be-actions button:disabled { opacity:.45; }
.best-estimate-game button:focus-visible,.be-toolbar summary:focus-visible { outline:4px solid #149bd799; outline-offset:2px; }
@media screen {
  html,body { height:100%; min-height:0; overflow:hidden; }
  .rounding-line-up-app { height:100dvh; min-height:0; }
}
@media screen and (max-width:999px),screen and (max-height:700px) {
  .rounding-line-up-page { width:calc(100% - 16px); }
  .best-estimate-game { gap:6px; }
  .be-board { padding:8px 10px; gap:6px; }
  .be-task h2 { font-size:22px; margin-bottom:3px; }
  .be-task p { font-size:17px; }
  .be-equation svg { min-height:0; }
  .be-choices { gap:6px; }
  .be-choices button { min-height:64px; gap:8px; padding:6px; }
  .be-choices strong { font-size:clamp(19px,3.6vw,30px); }
  .be-discussion > p { font-size:16px; min-height:20px; }
  .be-discussion [data-explanation] { min-height:20px; }
}
@media screen and (max-width:760px) {
  .rounding-line-up-brand { gap:8px; }
  .rounding-line-up-brand h1 { font-size:1rem; }
  .top-actions { gap:6px; }
  .home-button { display:inline-flex; padding:0 8px; }
  .be-toolbar { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; padding:5px; }
  .be-toolbar select,.be-toolbar button,.be-toolbar summary { width:100%; padding:5px; font-size:14px; }
  .be-toolbar summary { justify-content:center; }
  .be-options { position:fixed; top:118px; left:12px; right:12px; width:auto; }
}
@media screen and (max-width:500px) {
  .rounding-line-up-topbar { grid-template-columns:1fr; gap:6px; }
  .rounding-line-up-brand img { width:105px; }
  .rounding-line-up-brand { justify-content:center; }
  .top-actions { justify-content:center; }
  .home-button { display:inline-flex; }
  .be-status { font-size:14px; gap:4px; }
  .be-task h2 { font-size:19px; }
  .be-task p { font-size:15px; }
  .be-choices button { flex-direction:column; min-height:64px; gap:2px; padding:3px; }
  .be-choices button span { font-size:14px; }
  .be-choices strong { font-size:clamp(16px,4.5vw,22px); white-space:nowrap; }
  .be-board { grid-template-rows:auto auto minmax(0,.6fr) auto minmax(0,1.6fr) auto; }
  .be-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; }
  .be-actions:not(:has([data-action="timer"]:not([hidden]))) { grid-template-columns:minmax(48px,.6fr) minmax(64px,.9fr) minmax(0,1.5fr); }
  .be-actions button { padding:5px; font-size:14px; }
  .be-options { top:106px; padding:8px; }
  .be-options fieldset { margin-bottom:6px; }
  .be-options label { padding:3px; font-size:14px; }
}
@media screen and (min-width:600px) and (max-height:600px) {
  .be-toolbar { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); }
  .be-toolbar > label { min-width:0; }
  .be-toolbar select,.be-toolbar button,.be-toolbar summary { font-size:14px; padding:5px; }
  .be-board { grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:auto auto minmax(0,1fr) auto auto; }
  .be-status { grid-column:1 / -1; grid-row:1; }
  .be-task { grid-column:1 / -1; grid-row:2; }
  .be-equation { grid-column:1; grid-row:3; }
  .be-choices { grid-column:1; grid-row:4; }
  .be-choices button { flex-direction:column; gap:2px; }
  .be-choices button span { font-size:14px; }
  .be-choices strong { font-size:18px; white-space:nowrap; }
  .be-discussion { grid-column:2; grid-row:3 / 5; }
  .be-actions { grid-column:1 / -1; grid-row:5; }
  .be-options { position:fixed; top:70px; left:12px; right:12px; width:auto; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .be-options fieldset { margin:0; }
}
@media print {
  @page { size:A4 landscape; margin:8mm; }
  html[data-spire-print-page="a4-landscape"],html[data-spire-print-page="a4-landscape"] body { height:auto!important; max-height:none!important; background:white!important; }
  html,body,.rounding-line-up-app,.rounding-line-up-page,#bestEstimateHost,.best-estimate-game { width:100%; height:auto; min-height:0; overflow:visible; }
  .be-toolbar,.be-actions,.be-status,.rounding-line-up-topbar { display:none!important; }
  .be-board { box-shadow:none; height:150mm; grid-template-rows:auto 34mm auto minmax(30mm,1fr); break-inside:avoid; padding:3mm; }
  .be-task { grid-row:1; }
  .be-equation { grid-row:2; }
  .be-choices { grid-row:3; }
  .be-discussion { grid-row:4; }
  .be-choices strong { font-size:24pt; }
  .be-task h2 { font-size:20pt; }
  .be-task p,.be-discussion > p { font-size:12pt; }
}
