/* Rozšíření kvízu nad theme.css (futureshapers.cz).
   Používá jen prvky webu: tmavé karty rgba(255,255,255,.07) se zaoblením 2rem,
   bílá obrysová tlačítka, oranžová #fe8900 pro výběr a typografii obviously. */

:root {
  --fs-orange: #fe8900;
  --fs-card: rgba(255, 255, 255, .07);
  --fs-card-hover: rgba(255, 255, 255, .15);
  --fs-muted: rgba(255, 255, 255, .5);
  --fs-line: rgba(255, 255, 255, .15);
}

/* ---------- layout ---------- */
.stem-quiz { min-height: 100vh; }
.questions-container .quiz-section {
  height: auto;
  min-height: 100vh;
  padding: 14rem 0 8rem;
  box-sizing: border-box;
}
.quiz-body { width: 100%; }
.quiz-section .quiz-navigation { margin-top: 4rem; }

.progress-indicator { display: flex; width: 100%; justify-content: flex-start; gap: .6rem; margin-bottom: 3.6rem; }
.progress-dot { flex: 1; height: 3px; width: auto; border-radius: 3px; background: var(--fs-line); }
.progress-dot.completed { background: #fff; }
.progress-dot.active { background: var(--fs-orange); transform: none; }

.button:disabled { opacity: .35; cursor: not-allowed; }
.button:disabled:hover { background-color: transparent; border-color: #fff; }
.button.button--accent { background-color: var(--fs-orange); border-color: var(--fs-orange); }
.button.button--accent:hover { background-color: #fff; border-color: #fff; color: #000; }

.linkish { background: none; border: 0; color: var(--fs-muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-family: obviously, sans-serif; font-size: 1.4rem; padding: 1rem 0; }
.linkish:hover { color: #fff; }

/* ---------- intro ---------- */
.intro-screen p.perex { max-width: 520px; margin-bottom: 2.4rem; }
.intro-facts { display: flex; justify-content: center; flex-wrap: wrap; gap: .6rem 2.4rem; font-size: 1.4rem; color: var(--fs-muted); }
.intro-screen p.intro-facts { max-width: none; }
.stand-note { display: flex; gap: 1.6rem; align-items: center; text-align: left; max-width: 520px; margin: 0 auto 3rem; background: var(--fs-card); border-radius: 2rem; padding: 1.6rem 2.4rem; font-size: 1.4rem; line-height: 1.5; }
.stand-note .stem-img { width: 5rem; height: 5rem; }
.stand-note p { margin: 0 !important; max-width: none !important; }

.stem-img { width: 2.6rem; height: 2.6rem; object-fit: contain; flex-shrink: 0; }

/* ---------- options (single choice, school, enjoy) ---------- */
.answer-item--option, .door, .tile, .tower {
  width: 100%;
  border: 0;
  color: #fff;
  font-family: obviously, sans-serif;
  font-size: 1.5rem;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px transparent;
}
.answer-item--option { padding: 2.4rem 3.6rem; }
.answer-item.selected { background: rgba(254, 137, 0, .15); box-shadow: inset 0 0 0 1px var(--fs-orange); }
.answer-item:disabled { cursor: default; }
.answer-item:disabled:not(.selected) { opacity: .5; }
.answer-check { width: 2.4rem; height: 2.4rem; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--fs-line); flex-shrink: 0; transition: all .3s ease; }
.answer-item.selected .answer-check { background: var(--fs-orange) url(../img/icons/check.svg) center / 60% no-repeat; box-shadow: none; }
.answers-container.enjoy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.answers-container.enjoy .answer-item { margin: 0; justify-content: center; text-align: center; }
.answers-container.enjoy .answer-content { padding: 0; flex: none; }
.answers-container.enjoy .answer-check { display: none; }

/* ---------- swipe ---------- */
.swipe-deck { position: relative; height: 34rem; touch-action: pan-y; }
.swipe-card {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 3.6rem;
  border-radius: 2rem;
  background: #1b1b1b;
  box-shadow: inset 0 0 0 1px var(--fs-line);
  cursor: grab; user-select: none; -webkit-user-select: none; will-change: transform;
  touch-action: pan-y;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), background-color .35s ease;
}
.swipe-card > * { transition: opacity .35s ease; }
.swipe-card > .stamp { transition: none; }
.swipe-card--drag { cursor: grabbing; }
.swipe-card--out { pointer-events: none; }
.swipe-card:focus-visible { outline: 2px solid var(--fs-orange); outline-offset: 4px; }
.swipe-card--next { transform: scale(.94) translateY(2rem); background-color: #101010; pointer-events: none; animation: swipeBehind .35s ease; }
.swipe-card--next .swipe-card__text { opacity: .3; }
.swipe-card--next .swipe-card__count, .swipe-card--next .swipe-card__hint { opacity: 0; }
@keyframes swipeBehind { from { opacity: 0; } to { opacity: 1; } }

/* re-render of the same screen (pick, multi, swipe undo) without the page fade-in */
.quiz-section.no-anim:not(#intro) { animation: none; }
.swipe-card__count { color: var(--fs-muted); }
.swipe-card__text { font-family: obviously-condensed, sans-serif; font-weight: 700; text-transform: uppercase; font-size: min(max(3.6rem, 6vw), 6rem); line-height: 1.06; margin: 0; text-wrap: balance; }
.swipe-card__hint { display: flex; justify-content: space-between; font-size: 1.4rem; color: var(--fs-muted); }
.stamp { position: absolute; top: 3rem; padding: .6rem 2rem .8rem; border-radius: 4rem; border: 1px solid #fff; font-weight: 500; font-size: 1.6rem; opacity: 0; pointer-events: none; }
.stamp--yes { right: 3rem; background: var(--fs-orange); border-color: var(--fs-orange); transform: rotate(8deg); }
.stamp--no { left: 3rem; transform: rotate(-8deg); }
.swipe-actions { display: flex; gap: 1.5rem; }

/* ---------- sliders ---------- */
.slider-item { display: block; cursor: default; padding: 2.4rem 3.6rem 2rem; }
.slider-item:hover { background: var(--fs-card); }
.slider-item__labels { display: flex; justify-content: space-between; gap: 3rem; margin-bottom: 1.6rem; }
.slider-item__labels span:last-child { text-align: right; }
.slider-item__range { -webkit-appearance: none; appearance: none; width: 100%; height: 2.8rem; background: transparent; margin: 0; cursor: pointer; }
.slider-item__range::-webkit-slider-runnable-track { height: 3px; background: var(--fs-line); border-radius: 3px; }
.slider-item__range::-moz-range-track { height: 3px; background: var(--fs-line); border-radius: 3px; }
.slider-item__range::-webkit-slider-thumb { -webkit-appearance: none; width: 2.8rem; height: 2.8rem; margin-top: -1.25rem; border-radius: 50%; background: #fff; transition: background .3s ease; }
.slider-item__range::-moz-range-thumb { width: 2.8rem; height: 2.8rem; border: 0; border-radius: 50%; background: #fff; }
.slider-item__range:hover::-webkit-slider-thumb, .slider-item__range:focus-visible::-webkit-slider-thumb { background: var(--fs-orange); }
.slider-item__range:hover::-moz-range-thumb { background: var(--fs-orange); }
.slider-item__ticks { display: flex; justify-content: space-between; padding: 0 1.3rem; margin-top: .4rem; }
.slider-item__ticks i { width: 1px; height: .8rem; background: var(--fs-line); }

/* ---------- challenge ---------- */
.door-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.door { margin: 0; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 1.2rem; padding: 3rem 3.6rem; min-height: 22rem; }
.door .stem-img { width: 6.4rem; height: 6.4rem; margin-bottom: 1rem; }
.door__teaser { color: var(--fs-muted); font-size: 1.4rem; }

.game-card { background: var(--fs-card); border-radius: 2rem; padding: 3.6rem; }
.game-card__head { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 2.4rem; }
.game-card__head .stem-img { width: 3.6rem; height: 3.6rem; }
.game { display: grid; gap: 2.4rem; }
.game p { margin: 0; }
.game-options { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.game-options .answer-item { margin: 0; padding: 1.8rem 2.4rem; }
.game-explain { display: grid; gap: 1rem; padding: 2.4rem; border-radius: 2rem; background: rgba(254, 137, 0, .1); box-shadow: inset 0 0 0 1px rgba(254, 137, 0, .4); animation: fadeIn .3s ease; }
.game-explain b { color: var(--fs-orange); }
.game-msg { min-height: 1.7em; font-size: 1.4rem; color: var(--fs-muted); text-align: center; margin: 0; }

/* light */
.stage { position: relative; height: 22rem; background: #000; border-radius: 2rem; overflow: hidden; box-shadow: inset 0 0 0 1px var(--fs-line); }
.light { position: absolute; width: 13rem; height: 13rem; border-radius: 50%; mix-blend-mode: screen; top: 50%; left: 50%; transition: transform .9s ease, opacity .5s; }
.light.r { background: #f00; transform: translate(-125%, -50%); }
.light.g { background: #0f0; transform: translate(25%, -50%); }
.light.b { background: #00f; transform: translate(-50%, 70%); opacity: 0; }
.stage.mix .light.r { transform: translate(-72%, -62%); }
.stage.mix .light.g { transform: translate(-28%, -62%); }
.stage.mix.blue .light.b { transform: translate(-50%, -30%); opacity: 1; }

/* robot */
.robot { display: grid; grid-template-columns: minmax(0, 30rem) 1fr; gap: 3.6rem; align-items: center; }
.robot__side { display: grid; gap: 2rem; justify-items: start; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; width: 100%; }
.cell { aspect-ratio: 1; border-radius: 1.2rem; background: var(--fs-card); display: grid; place-items: center; color: #fff; }
.cell.wall { background: repeating-linear-gradient(45deg, rgba(255,255,255,.18) 0 6px, rgba(255,255,255,.06) 6px 12px); }
.cell.path { background: rgba(254, 137, 0, .18); }
.cell.crash { animation: shake .4s; }
.robot__bot { width: 70%; height: 70%; }
.prog { display: grid; grid-template-columns: repeat(6, 4.8rem); gap: .8rem; }
.cmd { appearance: none; border: 0; background: var(--fs-card); color: #fff; border-radius: 1.2rem; height: 4.8rem; cursor: pointer; display: grid; place-items: center; transition: background .3s ease; }
.cmd:hover { background: var(--fs-card-hover); }
.cmd.cur { box-shadow: inset 0 0 0 1px #fff; }
.cmd.bad { animation: shake .35s; }
.cmd.fixed { background: var(--fs-orange); }
.robot__side .game-msg { text-align: left; }
@keyframes shake { 0%, 100% { transform: translateX(0) } 25% { transform: translateX(-5px) } 75% { transform: translateX(5px) } }

/* tower */
.towers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.tower { margin: 0; flex-direction: column; justify-content: flex-start; gap: 1.2rem; padding: 2.4rem 1.6rem; text-align: center; }
.tower svg { width: 100%; max-width: 8rem; height: auto; overflow: visible; }
.tower svg g { transform-origin: 50% 100%; transform-box: fill-box; transition: transform 1.2s cubic-bezier(.3, 1.6, .5, 1); }
.towers.wind .t-a g { transform: skewX(-18deg); }
.towers.wind .t-c g.low { transform: skewX(-14deg); }
.towers.wind .t-c g.up { transform: translateX(11px); }
.tower span { font-size: 1.3rem; color: var(--fs-muted); line-height: 1.4; }
.tower.selected span { color: #fff; }

/* lock */
.lock { display: grid; grid-template-columns: 1fr auto; gap: 3.6rem; align-items: center; }
.clues { display: grid; gap: 1rem; }
.clue { display: grid; grid-template-columns: auto 1fr; gap: 1.6rem; align-items: center; font-size: 1.4rem; line-height: 1.4; }
.clue code { font-family: obviously-condensed, sans-serif; font-weight: 700; font-size: 2.6rem; letter-spacing: .12em; background: var(--fs-card); padding: .2rem 1.2rem; border-radius: 1.2rem; min-width: 7rem; text-align: center; }
.lock__side { display: grid; gap: 1.6rem; justify-items: center; }
.wheels { display: flex; align-items: center; gap: 1.2rem; }
.wheel { display: grid; justify-items: center; }
.wheel button { appearance: none; background: none; border: 0; color: #fff; width: 4.4rem; height: 3.6rem; cursor: pointer; display: grid; place-items: center; border-radius: 50%; transition: background .3s ease; }
.wheel button:hover { background: var(--fs-orange); }
.wheel output { font-family: obviously-condensed, sans-serif; font-weight: 700; font-size: 5rem; line-height: 1; width: 6rem; text-align: center; background: var(--fs-card); border-radius: 1.2rem; padding: .8rem 0 1rem; }
.wheels.open output { background: var(--fs-orange); }
.lockicon { display: grid; place-items: center; margin-left: .8rem; color: #fff; }
.wheels.open .lockicon { color: var(--fs-orange); }
.lock__actions { display: flex; gap: 2rem; align-items: center; }

/* ---------- pick + multi ---------- */
.tile-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.tile { margin: 0; justify-content: center; text-align: center; min-height: 9rem; padding: 1.6rem; }
.chip-list { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.chip.selected { background-color: var(--fs-orange); border-color: var(--fs-orange); }
.chip-list--static { margin-top: 3rem; }
.chip-list--static .chip { cursor: default; }
.chip-list--static .chip:hover { background-color: transparent; border-color: #fff; }

.quiz-body > .linkish { display: block; margin: 2rem auto 0; }

/* ---------- results ---------- */
#results.quiz-section { height: auto; min-height: 0; padding: 14rem 0 10rem; justify-content: flex-start; }
#results .results-content { min-height: 60rem; }
.result-description .h1 { margin-bottom: 2rem; }
.result-sub { color: var(--fs-orange); margin-bottom: 2.4rem; }
.result-description p.result-sub { margin-bottom: 2.4rem; }
.result-ctas { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 4rem; }

.results-more { margin-top: 10rem; display: grid; gap: 8rem; }
.result-section .h2 { margin: 0 0 3.6rem; }
.result-section--center { text-align: center; }
.result-section--center .chip-list { justify-content: center; }

.receipts { list-style: none; margin: 0; padding: 0; }
.receipts .answer-item { cursor: default; padding: 2.4rem 3.6rem; }
.receipts .answer-item:hover { background: var(--fs-card); }
.receipts p { margin: 0; }
.stem-tags { display: flex; gap: .8rem; flex-shrink: 0; padding-left: 2rem; }

.axes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.axis { background: var(--fs-card); border-radius: 2rem; padding: 2.4rem 3rem 3rem; }
.axis__labels { display: flex; justify-content: space-between; gap: 2rem; font-size: 1.4rem; margin-bottom: 1.6rem; }
.axis__labels span:last-child { text-align: right; }
.axis__track { position: relative; height: 3px; border-radius: 3px; background: var(--fs-line); }
.axis__track i { position: absolute; top: 50%; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--fs-orange); transform: translate(-50%, -50%); }

.profs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.prof { background: var(--fs-card); border-radius: 2rem; padding: 3rem; display: flex; flex-direction: column; gap: 2rem; }
.prof p { margin: 0; }
.prof__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.6rem; }
.prof__top .h3 { margin: 0; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
.prof__top .stem-tags { padding-left: 0; }
.prof__block { display: grid; gap: .8rem; }
.prof__label { font-size: 1.3rem; color: var(--fs-muted); }
.prof__why { display: flex; flex-wrap: wrap; gap: .8rem; }
.prof__why span { border: 1px solid var(--fs-line); border-radius: 4rem; padding: .2rem 1.2rem .4rem; font-size: 1.3rem; }
.prof__study { font-size: 1.4rem; line-height: 1.5; }
.prof__study b { font-weight: 700; color: var(--fs-orange); margin-right: .4rem; }

.story { background: var(--fs-card); border-radius: 2rem; padding: 3.6rem; display: grid; gap: 1.6rem; max-width: 760px; }
.story .label { color: var(--fs-muted); }
.story .h3, .story p { margin: 0; }
.story > div { margin-top: 1rem; }
.result-again { margin-top: 6rem; }

/* ---------- wide desktop: use the width instead of the web's 1164px column ---------- */
@media (min-width: 1280px) {
  .stem-quiz .container { max-width: min(1680px, 100%); padding: 0 6vw; box-sizing: border-box; }
  .questions-container .quiz-section { max-width: 1240px; }
  #results .results-content { grid-template-columns: 5fr 6fr; gap: 8rem; min-height: 64rem; }
  .result-description p:not(.result-sub) { max-width: 640px; }
  .tile-grid { grid-template-columns: repeat(6, 1fr); }
  .story { max-width: 960px; }
}

/* ---------- responsive ---------- */
.result-label__short { display: none; }
@media (max-width: 960px) {
  .questions-container .quiz-section { min-height: 0; }
  .profs, .axes { grid-template-columns: 1fr; }
  .robot, .lock { grid-template-columns: 1fr; }
  .robot .grid4 { max-width: 30rem; margin: 0 auto; }
  .lock__side { justify-items: start; }
  #results .results-content { min-height: 0; }
}
@media (max-width: 640px) {
  .door-grid, .game-options { grid-template-columns: 1fr; }
  .door { min-height: 0; padding: 2.4rem; }
  .tile-grid { grid-template-columns: 1fr 1fr; }
  .answers-container.enjoy { grid-template-columns: 1fr; }
  .swipe-deck { height: 30rem; }
  .swipe-card { padding: 2.4rem; }
  .game-card { padding: 2.4rem; }
  .answer-item--option, .slider-item, .receipts .answer-item { padding: 1.8rem 2rem; }
  .towers { gap: .8rem; }
  .prog { grid-template-columns: repeat(6, 1fr); width: 100%; }
  .robot__side { justify-items: stretch; }
  .stem-tags { padding-left: 1.2rem; }
  /* v originále graf na mobilu přetéká (Engineering je moc široké) */
  .results-chart { gap: 1rem; }
  .result-bar { min-width: 0; gap: 1.2rem; }
  .result-label { font-size: 1.2rem; white-space: nowrap; }
}
@media (max-width: 440px) {
  .swipe-actions { width: 100%; }
  .swipe-actions .button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .light, .tower svg g, .result-progress .fill .result-fill { transition: none; }
}

@media (max-width: 420px) {
  .result-label__full { display: none; }
  .result-label__short { display: inline; }
  .prof__top .h3 { font-size: 1.5rem; }
  .prof { padding: 2.4rem; }
}
