.boss-test-overlay {
  position: fixed;
  inset: 0;
  z-index: 46;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(21, 12, 6, .68);
  backdrop-filter: blur(5px);
}

.boss-test-overlay[hidden], .boss-test-overlay [hidden] { display: none; }
.boss-test-panel {
  width: min(580px, 100%);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #c59b66;
  border-radius: 16px;
  color: #4c2b12;
  background: linear-gradient(180deg, #fffaf0, #f7ead5);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .42);
  color-scheme: light;
}

.boss-test-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid #dec8a9;
  background: #fff8eb;
}
.boss-test-header h2, .boss-test-header p { margin: 0; }
.boss-test-header h2 { font-family: Georgia, serif; font-size: 2rem; }
.boss-test-kicker { color: #964b22; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.boss-test-body { padding: 20px 24px 24px; }
.boss-test-guide { margin: 0 0 20px; line-height: 1.5; color: #71543a; }
.boss-test-label { display: grid; gap: 8px; font-size: .9rem; font-weight: 800; }
.boss-test-select {
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid #b9a081;
  border-radius: 7px;
  font: inherit;
  color: #4c2b12;
  background: #fffdf8;
  text-overflow: ellipsis;
}
.boss-test-selection { min-height: 1.5em; margin: 14px 0 20px; font-size: .9rem; line-height: 1.5; color: #71543a; overflow-wrap: anywhere; }
.boss-test-panel button {
  min-width: 80px;
  padding: 10px 16px;
  border: 1px solid #b79a77;
  border-radius: 7px;
  font: inherit;
  font-weight: 800;
  color: #4c2b12;
  background: linear-gradient(180deg, #fffdf7, #efddbd);
  box-shadow: 0 3px 8px rgba(66, 35, 14, .1);
  cursor: pointer;
}
.boss-test-panel button:hover { border-color: #965629; }
.boss-test-panel button:disabled { opacity: .5; cursor: default; }
.boss-test-panel :focus-visible { outline: 3px solid #a14321; outline-offset: 3px; }
.boss-test-panel .boss-test-start { color: #fff6df; border-color: #873f20; background: linear-gradient(180deg, #b76735, #87431f); }
.boss-test-help { margin: 20px 0 0; font-size: .8rem; line-height: 1.5; color: #816044; }

@media (max-width: 560px) {
  .boss-test-overlay { padding: 8px; }
  .boss-test-panel { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); border-radius: 11px; }
  .boss-test-header { padding: 16px; gap: 10px; }
  .boss-test-header h2 { font-size: 1.65rem; }
  .boss-test-kicker { font-size: .58rem; }
  .boss-test-body { padding: 16px 16px 20px; }
}
