.visual-quiz { --vq-panel: #171e29; --vq-line: #354457; --vq-ink: #f1f5fa; --vq-muted: #b3c3d4; --vq-accent: #6bf0cb; }
.visual-quiz[data-visual-quiz="anime"] { --vq-accent: #ccbdff; }
.visual-quiz .vq-heading { margin: 14px 0 20px; }
.vq-heading h1 { margin: 0; max-width: 28ch; font-size: clamp(1.75rem, 3.7vw, 2.9rem); line-height: 1.07; text-wrap: balance; }
.vq-heading p { max-width: 62ch; margin: 10px 0 0; color: var(--vq-muted); line-height: 1.55; }
.vq-modes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.vq-modes button, .vq-secondary, .vq-primary { min-height: 44px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--vq-line); font: inherit; font-weight: 700; cursor: pointer; }
.vq-modes button, .vq-secondary { background: #202a38; color: var(--vq-ink); }
.vq-modes button[aria-pressed="true"] { background: color-mix(in srgb, var(--vq-accent) 15%, #161d26); border-color: var(--vq-accent); color: var(--vq-accent); }
.vq-modes time { margin-inline-start: auto; color: var(--vq-muted); font-variant-numeric: tabular-nums; }
.vq-primary { background: var(--vq-accent); color: #121d23; border-color: transparent; }
.vq-secondary:hover:enabled, .vq-modes button:hover { border-color: var(--vq-accent); }
.vq-primary:hover:enabled { background: color-mix(in srgb, var(--vq-accent) 78%, white); }
.visual-quiz button:disabled { opacity: .55; cursor: default; }
.visual-quiz button:focus-visible, .visual-quiz input:focus-visible { outline: 2px solid var(--vq-accent); outline-offset: 3px; }
.vq-card { display: grid; grid-template-columns: minmax(0,1.32fr) minmax(270px,1fr); align-items: stretch; border-radius: 14px; border: 1px solid var(--vq-line); background: var(--vq-panel); color: var(--vq-ink); }
.vq-card[hidden], .visual-quiz [hidden] { display: none !important; }
.vq-clue { min-width: 0; display: flex; flex-direction: column; padding: 14px; background: #101622; border-radius: 13px 0 0 13px; }
.vq-clue figure { margin: 0; aspect-ratio: 64 / 38; background: #131e30; border-radius: 10px; overflow: hidden; }
.vq-clue canvas, .vq-clue svg { display: block; width: 100%; height: 100%; }
.vq-clue figure.vq-weapon { background: radial-gradient(ellipse at 50% 50%, color-mix(in srgb, var(--weapon-glow, #6f86ff) 22%, #101b32), #0d1220 78%); }
.vq-weapon svg { background: linear-gradient(120deg, #6181af14, transparent 45%); }
.vq-clue-utility { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; }
.vq-clue details { flex: 1 1 150px; color: var(--vq-muted); line-height: 1.5; padding: 9px 0; }
.vq-clue summary { cursor: pointer; }
.vq-clue details p { margin: 5px 0 0; }
.vq-play { min-width: 0; align-self: start; padding: clamp(14px, 2.1vw, 25px); }
.vq-progress { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 9px; color: var(--vq-muted); font-size: .88rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.vq-play h2 { margin: 18px 0 5px; font-size: clamp(1.3rem, 2.7vw, 1.8rem); line-height: 1.15; }
.vq-tries { margin: 0; color: var(--vq-muted); }
.vq-play form { margin-top: 15px; }
.vq-play form label { display: block; margin-bottom: 6px; font-weight: 700; }
.vq-play input { display: block; width: 100%; min-height: 47px; border: 1px solid var(--vq-line); border-radius: 8px; background: #0e1621; padding: 9px 11px; color: var(--vq-ink); font: inherit; }
.vq-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.vq-actions .vq-primary { flex: 1; }
.vq-status { margin: 8px 0; color: var(--vq-muted); min-height: 1.35em; }
.vq-status[data-tone="right"] { color: #85edc7; }
.vq-status[data-tone="wrong"] { color: #ffc181; }
.vq-hints { display: grid; gap: 6px; }
.vq-hints p { margin: 0; padding: 8px 10px; border-radius: 6px; background: #202b3b; color: var(--vq-ink); }
.vq-outcome { border-top: 1px solid var(--vq-line); padding-top: 12px; margin-top: 12px; }
.vq-outcome p { margin: 4px 0; }
.vq-outcome h3 { margin: 6px 0; }
.vq-outcome #result-label { color: var(--vq-accent); font-weight: 700; }
.vq-final { background: var(--vq-panel); border: 1px solid var(--vq-line); border-radius: 14px; padding: clamp(16px, 3vw, 34px); }
.vq-final h2 { margin-top: 0; }
.vq-final #final-grid { letter-spacing: .07em; overflow-wrap: anywhere; }
.vq-copy { display: block; margin-top: 12px; }
.vq-copy textarea { display: block; margin-top: 6px; width: min(100%, 520px); }
.vq-play .gn-answer-options { z-index: 8; }
.visual-quiz .game-guide { margin-top: 24px; }
@media (max-width: 880px) {
  .vq-card { grid-template-columns: minmax(0, 1fr); }
  .vq-clue { border-radius: 13px 13px 0 0; }
  .vq-clue figure { max-height: 380px; }
  .vq-clue canvas, .vq-clue svg { object-fit: contain; }
}

.vq-clue #clue-status:not(:empty) { flex: 1 1 100%; color: var(--vq-muted); }
.vq-outcome a { color: var(--vq-accent); }

.visual-quiz[data-visual-quiz="cartoon-house"] { --vq-accent: #ffd08a; }

.vq-clue .vq-house-picture {
  aspect-ratio: auto;
  max-height: none;
  scroll-margin-top: 12px;
}

.vq-house-visual {
  position: relative;
  aspect-ratio: 64 / 38;
}

.vq-house-visual img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: clamp(8px, 2%, 16px);
  background: radial-gradient(ellipse at 50% 45%, #354050, #131e30 73%);
}

.vq-house-caption {
  padding: 12px 16px 15px;
  text-align: center;
  border-top: 1px solid var(--vq-line);
  background: #1b2532;
}

.vq-house-caption h3 {
  margin: 0;
  font-size: clamp(1.25rem, 3.2vw, 2rem);
  line-height: 1.15;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
