body.esp-open #sitting-overlay{
  display:flex !important;
  flex-direction:column;
  z-index:120;
  top:var(--bliss-nav-h, 72px);
  padding:0.7rem 0.85rem 5.8rem;
  background:#1a1014;
  overflow:hidden;
}
.esp-toolbar{
  flex:0 0 auto;
  position:sticky;
  top:0;
  z-index:2;
}
.esp-timer-wrap{
  display:flex;
  align-items:center;
  gap:0.55rem;
}
.esp-timer-select{
  min-height:40px;
  border-radius:8px;
  border:1px solid rgba(240,217,196,.4);
  background:#1c1014;
  color:#fff8f2;
  padding:0 .55rem;
  font-size:12px;
}
#sitting-clock.is-alert{ color:#ef4444; }
.esp-thumb{
  display:flex;
  flex-wrap:wrap;
  gap:.35rem;
}
.esp-thumb .btn-ghost{ min-height:44px; }
.esp-split{
  flex:1 1 auto;
  min-height:0;
  overflow:hidden;
}
#sitting-qp-root,
.esp-right{
  min-height:0;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}
.esp-ans-book h2{ font-size:1.05rem; margin:.2rem 0 .6rem; }
body.esp-open #bliss-job-crystal-fab,
body.esp-open #bliss-fleet-coach-fab,
body.esp-open #bliss-fleet-coach-panel{ display:none !important; }
#exam-sit-now{
  min-height:44px;
  width:100%;
  max-width:22rem;
  font-size:12px;
  letter-spacing:.1em;
}
.esp-book{
  max-width:780px;
  margin:0 auto 1.4rem;
  background:#fffef8;
  color:#1c1917;
  padding:1.15rem 1.25rem 1.6rem;
  box-shadow:0 16px 40px rgba(0,0,0,.45);
  font-family:"Times New Roman",Georgia,"Noto Serif TC",serif;
}
.esp-book *{ color:#1c1917; }
.esp-banner{
  text-align:center;
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#7c2d12 !important;
  margin:0 0 .8rem;
}
.esp-head h1{ font-size:1.25rem; margin:.15rem 0 .35rem; line-height:1.35; }
.esp-kicker,.esp-sub{ font-size:.78rem; color:#44403c !important; margin:0; }
.esp-brief{
  background:#f5f0e6;
  border-left:3px solid #1c1917;
  padding:.7rem .85rem;
  margin:.75rem 0 1rem;
  line-height:1.55;
  font-size:.92rem;
}
.esp-q{ margin:1.15rem 0 1.35rem; }
.esp-q-meta{ font-size:12px; letter-spacing:.08em; text-transform:uppercase; font-weight:800; margin:0 0 .35rem; }
.esp-q-stem{ line-height:1.55; margin-bottom:.5rem; }
.esp-lab{ display:block; font-size:12px; margin:.4rem 0 .25rem; }
.esp-ans{
  display:block; width:100%; min-height:7rem;
  border:1px solid #44403c; background:#fff; color:#1c1917 !important;
  padding:.7rem .8rem; font:inherit; line-height:1.55; resize:vertical;
}
.esp-mc{ display:flex; flex-direction:column; gap:.3rem; margin:.4rem 0; }
.esp-mc-btn{
  text-align:left; border:1px solid #d1d5db; background:#fff; color:#1c1917;
  padding:.45rem .65rem; min-height:40px; cursor:pointer; font:inherit;
}
.esp-mc-btn.is-on{ outline:2px solid #111; background:#f3f4f6; }
.esp-mark{ background:#faf6f1; }
@media (max-width: 900px){
  body.esp-open #sitting-overlay{
    overflow:auto;
    padding-bottom:calc(5.2rem + env(safe-area-inset-bottom, 0px));
  }
  .esp-toolbar{
    position:sticky;
    bottom:auto;
  }
  .esp-thumb{
    width:100%;
    justify-content:stretch;
  }
  .esp-thumb .btn-ghost{ flex:1 1 44%; }
  #sitting-qp-root,
  .esp-right{ max-height:none; overflow:visible; }
}
@media print{
  body.esp-open #sitting-overlay{ position:static; background:#fff; padding:0; overflow:visible; }
  body.esp-open #sitting-overlay .esp-toolbar{ display:none !important; }
}

.exam-lib-kicker{
  margin-top:.35rem;
  font-size:11px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#e8c9a8;
  opacity:.88;
}
.eg-lib-hint{ opacity:.78; font-size:.92em; }

/* Exam OS · Tour + Map chrome · phone → tablet → laptop → desktop */
:root{
  --exam-shell-h: 52px;
  --exam-fab-clear: calc(5.6rem + env(safe-area-inset-bottom, 0px));
}
html, body{ max-width:100%; overflow-x:hidden; }
body.exam-student{ min-height:100dvh; }
body.exam-tour-on{ overflow:hidden; }

#exam-shell-bar{
  display:none !important;
}

body.exam-tour-on main.grid,
body.exam-tour-on #exam-web-map,
body.exam-tour-on #ewm-fab,
body.exam-tour-on #ewm-scrim,
body.exam-tour-on #bsr-exam-mount,
body.exam-tour-on #exam-teacher-door,
body.exam-tour-on #bliss-job-crystal-fab,
body.exam-tour-on #bliss-fleet-coach-fab,
body.exam-tour-on #bliss-fleet-coach-panel,
body.exam-tour-on .bliss-os-focus-tip{ display:none !important; }

body.exam-map-on #exam-guide-root{ display:none !important; }

#exam-guide-root{ display:none; }
body.exam-tour-on #exam-guide-root{
  display:flex;
  flex-direction:column;
  position:fixed;
  top:calc(var(--bliss-nav-h, 72px) + var(--exam-shell-h, 52px));
  left:0; right:0; bottom:0;
  z-index:80;
  width:100%;
  max-width:44rem;
  margin:0 auto;
  color:#fff8f2;
  padding:0 clamp(.85rem, 3vw, 1.4rem) 0;
  box-sizing:border-box;
}
.eg-stage{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  padding:.85rem 0 .4rem;
}
.eg-tag{ display:inline-block; font-size:10px; letter-spacing:.16em; text-transform:uppercase; color:#f0d9c4; margin:0 0 .5rem; }
.eg-h{ font-size:clamp(1.22rem, 4.2vw, 1.9rem); line-height:1.35; font-weight:800; margin:0 0 .7rem; word-break:break-word; }
.eg-p{ font-size:clamp(.98rem, 2.4vw, 1.12rem); line-height:1.7; margin:0 0 .8rem; color:#f5e6d8; }
.eg-choices{ display:flex; flex-direction:column; gap:.45rem; }
.eg-choice{
  text-align:left; width:100%;
  min-height:48px;
  padding:.75rem .9rem;
  border-radius:12px;
  border:1px solid rgba(240,217,196,.4);
  background:rgba(255,248,240,.08);
  color:#fff8f2; cursor:pointer; font:inherit;
}
.eg-choice b{ display:block; font-size:1rem; }
.eg-choice small{ display:block; color:#f0ddd0; font-size:.78rem; margin-top:.15rem; }
.eg-choice.is-on, .eg-choice:hover{ border-color:#f0d9c4; background:rgba(212,165,116,.2); }
.eg-nav{
  flex:0 0 auto;
  display:flex; gap:.5rem;
  padding:.55rem 0 calc(.75rem + env(safe-area-inset-bottom, 0px));
  background:linear-gradient(180deg, transparent, rgba(36,20,26,.92) 28%);
}
.eg-nav button{
  flex:1; min-height:48px; border-radius:10px;
  border:1px solid rgba(240,217,196,.45);
  background:transparent; color:#fff8f2; cursor:pointer;
  font:inherit; letter-spacing:.08em; text-transform:uppercase; font-size:12px;
}
.eg-nav .eg-next{ background:#f0d9c4; color:#1c1014; border:0; font-weight:800; flex:1.35; }
.eg-nav button:disabled{ opacity:.35; cursor:default; }
.eg-meter{ height:3px; background:rgba(255,255,255,.12); flex:0 0 auto; }
.eg-meter>i{ display:block; height:100%; background:#f0d9c4; width:0; }

body.exam-map-on main.grid{
  padding-top:calc(var(--bliss-nav-h, 72px) + var(--exam-shell-h, 52px) + 1rem) !important;
  padding-bottom:calc(2rem + env(safe-area-inset-bottom, 0px)) !important;
  max-width:100% !important;
}
#exam-web-map{
  top:calc(var(--bliss-nav-h, 72px) + var(--exam-shell-h, 52px)) !important;
}
#ewm-scrim{ top:calc(var(--bliss-nav-h, 72px) + var(--exam-shell-h, 52px)) !important; }
#ewm-fab{ bottom:var(--exam-fab-clear) !important; }
#exam-teacher-door{ bottom:var(--exam-fab-clear) !important; }

/* Phone */
@media (max-width: 640px){
  #exam-shell-bar{ padding-top:.4rem; }
  #exam-shell-bar button{ font-size:11px; letter-spacing:.05em; }
  .eg-h{ font-size:1.22rem; }
  .eg-choice{ padding:.7rem .8rem; }
  body.exam-map-on main.grid{ padding-left:max(.75rem, env(safe-area-inset-left)) !important; padding-right:max(.75rem, env(safe-area-inset-right)) !important; }
  #exam-kp-next .kpc-acts button, #exam-kp-convert .kpc-acts button{ flex:1 1 100%; }
  #exam-now-card h2{ font-size:1.15rem; }
  h1{ font-size:clamp(1.3rem, 7vw, 1.75rem) !important; }
}
/* Phablet / small tablet */
@media (min-width: 641px) and (max-width: 899px){
  body.exam-tour-on #exam-guide-root{ max-width:36rem; }
}
/* Tablet */
@media (min-width: 900px) and (max-width: 1099px){
  body.exam-tour-on #exam-guide-root{ max-width:40rem; }
  .mode-tab{ min-height:44px; }
}
/* Laptop — map rail, don't crush content */
@media (min-width: 1100px) and (max-width: 1439px){
  body.exam-tour-on #exam-guide-root{ max-width:42rem; }
}
/* Desktop / ultrawide */
@media (min-width: 1440px){
  body.exam-tour-on #exam-guide-root{ max-width:46rem; }
}
@media (max-width: 1099px){
  body.exam-map-on.ewm-desk main.grid{ padding-left:max(.85rem, env(safe-area-inset-left)) !important; }
}
@media (prefers-reduced-motion: reduce){
  #exam-web-map, #exam-guide-root{ transition:none !important; }
}
