/* Mockup IQ test – skladačka (krabica s puzzle): krémová lepenka, jantárové zvýraznenie, dieliky odkrývajú mozog */
.cform[data-tool="iq-test"], #res {
  --iqz-tray: #efe3cc; --iqz-tray2: #e4d3b2; --iqz-ink: #4a3a22; --iqz-slot: #b89c6c; --iqz-amber: #d98a12; --iqz-amberbg: #fff4dc;
}
@media (prefers-color-scheme: dark) {
  .cform[data-tool="iq-test"], #res {
    --iqz-tray: #3a3226; --iqz-tray2: #2f281e; --iqz-ink: #f3e6cc; --iqz-slot: #8f7a55; --iqz-amber: #f2b13e; --iqz-amberbg: #45361c;
  }
}
/* pôvodný pruh postupu nahrádza skladačka; text "Otázka i z n" ostáva */
.cform[data-tool="iq-test"] .quiz-bar { display: none; }
.cform[data-tool="iq-test"] .quiz-head { justify-content: center; margin-bottom: .4rem; }
.cform[data-tool="iq-test"] .quiz-count { font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--iqz-ink); font-weight: 600; }
.cform[data-tool="iq-test"] .quiz-threshold { text-align: center; }

.iqz { position: relative; margin: 0 auto 1rem; max-width: 560px; }
.iqz-svg { display: block; width: 100%; height: auto; overflow: visible; }
.iqz-tray { fill: var(--iqz-tray); stroke: var(--iqz-tray2); stroke-width: 6; }
.iqz-ghost { opacity: .13; filter: grayscale(.6); }
.iqz-slot { fill: none; stroke: var(--iqz-slot); stroke-width: 1.6; stroke-dasharray: 5 4; }
.iqz-slot.is-cur { stroke: var(--iqz-amber); stroke-width: 3.2; stroke-dasharray: none; fill: var(--iqz-amberbg); fill-opacity: .55; animation: iqz-pulse 1.4s ease-in-out infinite; }
.iqz-slotnum { fill: var(--iqz-slot); font: 700 20px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; opacity: .8; }
.iqz-brain { fill: rgba(255, 255, 255, .14); stroke: #f6ecff; stroke-width: 5; stroke-linejoin: round; }
.iqz-stem, .iqz-cereb { fill: none; stroke: #f6ecff; stroke-width: 5; stroke-linecap: round; }
.iqz-gyri { fill: none; stroke: #ffe7a8; stroke-width: 3.2; stroke-linecap: round; opacity: .9; }
.iqz-edge { fill: none; stroke: rgba(20, 10, 40, .55); stroke-width: 1.6; }
.iqz-num { fill: #fff; font: 800 15px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; opacity: .55; paint-order: stroke; stroke: rgba(20, 10, 40, .5); stroke-width: 3px; }
.iqz-piece { opacity: 0; transform: translate(var(--ox), var(--oy)) rotate(var(--rot)); transform-box: fill-box; transform-origin: center;
  transition: transform .5s cubic-bezier(.2, 1.3, .4, 1), opacity .25s ease; filter: drop-shadow(0 3px 2px rgba(40, 20, 0, .28)); }
.iqz-piece.is-on { opacity: 1; transform: none; }
.iqz-piece.is-miss { filter: grayscale(1) brightness(.75); }
.iqz-piece.is-miss .iqz-num { opacity: .9; fill: #ffd5d5; }
.iqz.is-done .iqz-piece:not(.is-miss) { filter: drop-shadow(0 0 4px rgba(255, 210, 120, .6)); }
.iqz-count { position: absolute; top: -.2rem; right: .2rem; z-index: 1; display: flex; align-items: baseline; gap: .25rem;
  padding: .25rem .7rem; border-radius: 999px; background: var(--iqz-ink); color: var(--iqz-tray); font: 700 .95rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; transform: rotate(3deg); box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.iqz-count b { font-size: 1.3rem; color: var(--iqz-amber); }
.iqz.is-full .iqz-count { background: var(--iqz-amber); color: #2a1c05; }
.iqz.is-full .iqz-count b { color: #2a1c05; }
#res > .iqz { margin-top: .6rem; }
@keyframes iqz-pulse { 50% { fill-opacity: .15; } }

/* otázka a odpovede – kartičky z krabice s puzzle */
.cform[data-tool="iq-test"] .quiz-on .field > label { color: var(--iqz-ink); font-weight: 700; }
.cform[data-tool="iq-test"] .quiz-answers { grid-template-columns: 1fr 1fr; gap: .7rem; }
.cform[data-tool="iq-test"] .quiz-answers button { border: 2px solid var(--iqz-tray2); background: var(--iqz-tray); color: var(--iqz-ink); border-radius: 12px 12px 12px 4px;
  font-weight: 600; text-align: center; box-shadow: 0 3px 0 var(--iqz-tray2); transition: transform .12s, box-shadow .12s, border-color .12s; }
.cform[data-tool="iq-test"] .quiz-answers button:hover { border-color: var(--iqz-amber); background: var(--iqz-tray); transform: translateY(-1px); }
.cform[data-tool="iq-test"] .quiz-answers button[aria-pressed=true] { border-color: var(--iqz-amber); background: var(--iqz-amberbg); box-shadow: 0 1px 0 var(--iqz-amber); transform: translateY(2px); }
.cform[data-tool="iq-test"] .quiz-next { background: var(--iqz-amber); border-color: var(--iqz-amber); color: #2a1c05; }
@media (max-width: 420px) { .cform[data-tool="iq-test"] .quiz-answers { grid-template-columns: 1fr; } }

/* výsledok: semicirkulárny ukazovateľ nahrádza dokončená skladačka; dlaždice ako štítky na krabici */
.lay-quiz #res .gauge { display: none; }
#res #out .tile { background: var(--iqz-tray); border: 1px dashed var(--iqz-slot); border-radius: 12px; }
#res #out .tile dt { color: var(--iqz-ink); opacity: .8; }
#res #out .tile dd { color: var(--iqz-ink); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
#res { border-top-color: var(--iqz-amber); }
@media (prefers-reduced-motion: reduce) { .iqz-piece { transition: none; } .iqz-slot.is-cur { animation: none; } }
