/* Use the existing cabinet around a quiet, high-contrast reading area. */
.tube:has(.play[data-state="iq"]:not([hidden])) {
  background: #0b1421;
  padding: 0;
}
.tube:has(.play[data-state="iq"]:not([hidden])) :is(.tube__glass, .scene) {
  inset: 0;
  border-radius: 0;
  box-shadow: none;
}
.tube:has(.play[data-state="iq"]:not([hidden]))::after { display: none; }
.tube:has(.play[data-state="iq"]:not([hidden])) .scene__art[data-game="iq"] { opacity: .72; }
.tube:has(.play[data-state="iq"]:not([hidden])) .scene::after {
  background: linear-gradient(to right, transparent, #0b1421 18% 82%, transparent),
    linear-gradient(to bottom, #0b1421 0%, transparent 37% 78%, #0b1421 100%);
}
.js .play[data-state="iq"] {
  grid-template-columns: minmax(0, 1000px);
  padding-block: clamp(12px, 2.2dvh, 25px) 26px;
  align-content: start;
}
.play[data-state="iq"] .stageplay {
  width: 100%;
  padding: 0;
  gap: 12px;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.play[data-state="iq"] .stageplay__back {
  box-shadow: none;
  background: transparent;
}
.play[data-state="iq"] .stageplay__back .btn__cap {
  min-height: 44px;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid #6f93ad;
  color: #f7f4ef;
  background: #152434;
  box-shadow: none;
}
.play[data-state="iq"] .stageplay__back .btn__cap::before {
  content: "";
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 0 0 2px 2px;
  transform: rotate(45deg);
}
.panel[data-panel="iq"] {
  width: 100%;
  min-width: 0;
  gap: clamp(12px, 2dvh, 22px);
  color: #f7f4ef;
}
.panel[data-panel="iq"] [hidden] { display: none; }
.iq-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-bottom: clamp(10px, 1.9dvh, 20px);
  border-bottom: 1px solid #6f93ad;
}
.panel[data-panel="iq"] h2 {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 20px);
  color: inherit;
  font: 750 clamp(1.45rem, 2.25vw, 2.12rem)/1.12 var(--font-body);
}
.panel[data-panel="iq"] h2 img {
  box-sizing: content-box;
  width: clamp(34px, 4vw, 48px);
  height: auto;
  padding-inline-end: clamp(12px, 1.5vw, 20px);
  border-inline-end: 1px solid #6f93ad;
}
.iq-sound { display: flex; gap: 8px; }
.iq-sound__toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid #6f93ad;
  border-radius: 9px;
  background: #152434;
  color: #f7f4ef;
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
}
.iq-sound__toggle svg { color: #ffd260; }
.iq-sound__toggle:hover { border-color: #ffd260; }
.iq-sound__toggle[aria-pressed="false"] { color: #b2c0cc; background: #0b1421; }
.iq-sound__toggle[aria-pressed="false"] svg { color: inherit; }
.iq-sound__toggle[aria-pressed="false"]::after {
  content: "";
  position: absolute;
  inset-inline-start: 9px;
  width: 22px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 0 0 1px #0b1421;
  transform: rotate(-45deg);
  pointer-events: none;
}
.iq-intro { display: grid; justify-items: start; gap: 18px; max-width: 750px; }
.iq-rules { display: grid; gap: 10px; padding-inline-start: 1.35rem; list-style: disc; line-height: 1.5; color: #d8e3ee; }
.panel[data-panel="iq"] .note { color: #bdc8d6; }
.panel[data-panel="iq"] .note:empty { display: none; }
.panel[data-panel="iq"] button:disabled { opacity: .65; cursor: default; }
.iq-quiz { display: grid; gap: clamp(13px, 2.1dvh, 25px); min-width: 0; }
.iq-quiz__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: clamp(12px, 3vw, 44px);
}
.iq-quiz__ordinal { font-size: clamp(1.02rem, 1.92vw, 1.75rem); font-weight: 700; line-height: 1.2; }
.iq-quiz progress {
  display: block;
  width: 100%;
  height: clamp(8px, 1.5dvh, 15px);
  margin-top: clamp(7px, 1.45dvh, 15px);
  appearance: none;
  border: 0;
  border-radius: 99px;
  background: #2b4054;
  color: #81ef8e;
  overflow: hidden;
}
.iq-quiz progress::-webkit-progress-bar { background: #2b4054; }
.iq-quiz progress::-webkit-progress-value { background: #81ef8e; border-radius: 99px; }
.iq-quiz progress::-moz-progress-bar { background: #81ef8e; border-radius: 99px; }
.iq-quiz__timer {
  display: grid;
  justify-items: center;
  min-width: clamp(80px, 11vw, 172px);
  padding-inline-start: clamp(10px, 2vw, 26px);
  border-inline-start: 1px solid #6f93ad;
  color: #c2cbd6;
  font-size: clamp(.82rem, 1.7vw, 1.45rem);
  line-height: 1.1;
}
.iq-quiz__timer [role="timer"] {
  color: #ffbe34;
  font-size: clamp(1.72rem, 3.15vw, 3.05rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.iq-quiz__timer [role="timer"].iq-quiz__timer--low { color: #ff8680; }
.iq-quiz h3, .iq-result h3 {
  margin: 0;
  color: #f7f4ef;
  font: 750 clamp(1.38rem, 3.04vw, 2.78rem)/1.16 var(--font-body);
  overflow-wrap: anywhere;
  scroll-margin-block-start: 12px;
}
.iq-quiz__prompt { display: grid; justify-items: center; gap: 8px; color: #d1dce7; }
.iq-quiz__prompt img { display: block; max-width: 100%; max-height: clamp(130px, 26dvh, 300px); object-fit: contain; border-radius: 8px; }
.iq-quiz__answers { display: grid; gap: clamp(8px, 1.4dvh, 14px); }
.iq-quiz__answer {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: clamp(52px, 7.9dvh, 80px);
  gap: clamp(12px, 2.05vw, 30px);
  padding: 8px clamp(12px, 1.9vw, 28px);
  border: 1.5px solid #7195b1;
  border-radius: 13px;
  color: #f7f4ef;
  background: #152434;
  text-align: start;
  font: 720 clamp(1.11rem, 2.55vw, 2.32rem)/1.2 var(--font-body);
  overflow-wrap: anywhere;
  cursor: pointer;
}
.iq-quiz__answer:hover:not(:disabled) { background: #21384d; border-color: #ffd260; }
.iq-quiz__answer:focus-visible { outline: 3px solid #ffd260; outline-offset: 2px; }
.iq-quiz__letter {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: clamp(34px, 3.6vw, 54px);
  height: clamp(34px, 5.1dvh, 52px);
  border: 2px solid #ffbe34;
  border-radius: 11px;
  color: inherit;
  font-size: .83em;
}
.iq-quiz__answers--images { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.iq-quiz__answer img { min-width: 0; max-width: 100%; max-height: clamp(70px, 14dvh, 132px); object-fit: contain; border-radius: 6px; }
.iq-result { display: grid; gap: 16px; max-width: 760px; }
.iq-result__score { color: #81ef8e; font-size: clamp(1.45rem, 3vw, 2.45rem); font-weight: 800; }
.iq-result summary { cursor: pointer; padding: .5em 0; color: #ffcf64; }
.iq-result ol { padding-inline-start: 1.5rem; }
.iq-result li { padding: .75rem 0; border-bottom: 1px solid #36526b; }
.iq-result li p { margin-block: .25rem; }
.iq-result li img { max-width: 96px; border-radius: 6px; }

@media (max-width: 60rem) {
  body:has(.play[data-state="iq"]:not([hidden])) { --led-height: 34px; }
  body:has(.play[data-state="iq"]:not([hidden])) > .led { display: flex; }
}
@media (min-width: 60rem) and (max-height: 850px) {
  .js .play[data-state="iq"] { padding-block: 10px 14px; }
  .play[data-state="iq"] .stageplay { gap: 6px; }
  .iq-titlebar { padding-bottom: 8px; }
  .panel[data-panel="iq"] { gap: 10px; }
  .iq-quiz { gap: 13px; }
  .iq-quiz__answers { gap: 8px; }
  .iq-quiz__answer { min-height: clamp(44px, 7.1dvh, 60px); }
  .iq-quiz__letter { height: clamp(29px, 4.7dvh, 42px); }
}
@media (max-width: 34rem) {
  .tube:has(.play[data-state="iq"]:not([hidden])) .scene::after { background: #0b1421e8; }
  .js .play[data-state="iq"] { padding-inline: 15px; }
  .iq-titlebar { gap: 8px; }
  .panel[data-panel="iq"] h2 { gap: 8px; font-size: 1.2rem; }
  .panel[data-panel="iq"] h2 img { width: 30px; padding-inline-end: 8px; }
  .iq-quiz__answer { min-height: 54px; border-radius: 10px; }
  .iq-quiz__letter { height: 34px; }
  .iq-quiz__answer img { max-width: calc(100% - 43px); }
  .iq-sound__toggle { min-width: 44px; padding-inline: 11px; justify-content: center; }
  .iq-sound__toggle span { display: none; }
  .iq-sound__toggle[aria-pressed="false"]::after { inset-inline-start: 10px; }
}
