/* Slides (shared by editor, live control and student viewer) */
.pslide { position: relative; aspect-ratio: 16 / 9; width: 100%; container-type: inline-size; overflow: hidden;
  background-size: cover; background-position: center; background-repeat: no-repeat; user-select: none; }
.pel { position: absolute; box-sizing: border-box; }
.pel-text { display: flex; flex-direction: column; padding: .5cqw .7cqw; }
.pel-text-inner { white-space: pre-wrap; overflow-wrap: anywhere; outline: none; overflow: hidden; min-height: 0; }
.pel-image img { width: 100%; height: 100%; display: block; }
.pel-empty { display: grid; place-items: center; background: rgba(0, 0, 0, .06); border: .2cqw dashed rgba(0, 0, 0, .25); font-size: 4cqw; }
.pquiz-cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 1.6cqw; padding: 5cqw; }
.pquiz-icon { width: 11cqw; height: 11cqw; border-radius: 3cqw; background: var(--accent); color: #fff; display: grid; place-items: center;
  font: 400 6cqw/1 system-ui, sans-serif; transform: rotate(-6deg); box-shadow: 0 1cqw 3cqw rgba(0, 0, 0, .15); }
.pquiz-title { font-size: 5.6cqw; line-height: 1.15; }
.pquiz-intro { font-size: 2.4cqw; opacity: .85; max-width: 75cqw; white-space: pre-wrap; }
.pquiz-count { font-size: 1.8cqw; text-transform: uppercase; letter-spacing: .15em; color: var(--accent); font-weight: 600; }

/* Copy box: scrollable text + "Kopēt" button (used on slides and on poll slides) */
.pel-copy { display: flex; }
.pcopy { position: relative; flex: 1; display: flex; min-width: 0; min-height: 0; border: .15cqw solid rgba(15, 23, 42, .12);
  border-radius: .8cqw; overflow: hidden; }
.pcopy-text { flex: 1; overflow: auto; padding: 1.4cqw 1.6cqw; padding-right: 9cqw; white-space: pre-wrap; overflow-wrap: anywhere;
  line-height: 1.5; user-select: text; -webkit-user-select: text; overscroll-behavior: contain; }
.pcopy.is-mono .pcopy-text { font-family: ui-monospace, "Cascadia Code", Consolas, "Liberation Mono", monospace; }
.pcopy-btn { position: absolute; top: .8cqw; right: 1.2cqw; z-index: 1; font: 600 max(11px, 1.15cqw)/1 system-ui, sans-serif;
  padding: .55em .9em; border: 1px solid rgba(15, 23, 42, .18); border-radius: .5em; background: #fff; color: #1f2937; cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.pcopy-btn:hover { background: #f3f4f6; }
.pcopy-btn.is-done { background: #e8f6ed; border-color: #86c79c; color: #166534; }

/* Poll slide (static look: thumbnails, editor, projector when offline) */
.ppoll-cover { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 2.4cqw; padding: 5cqw 7cqw; }
.ppoll-q { font-size: 4.4cqw; line-height: 1.2; text-align: center; }
.ppoll-text { max-height: 18cqw; font-size: 1.7cqw; background: #f4f5f7; color: #1f2937; }
.ppoll-opts { display: flex; justify-content: center; gap: 1.6cqw; flex-wrap: wrap; }
.ppoll-field { align-self: center; width: min(60cqw, 100%); padding: 1.4cqw 2cqw; border: .25cqw solid var(--accent); border-radius: 1cqw;
  color: rgba(0, 0, 0, .4); font: 400 2.2cqw/1.2 system-ui, sans-serif; background: #fff; }
.ppoll-opt { min-width: 14cqw; text-align: center; padding: 1.2cqw 2.4cqw; border-radius: 1cqw; border: .25cqw solid var(--accent); color: var(--accent);
  font: 600 2.2cqw/1.2 system-ui, sans-serif; }

/* Answer colours — muted tones from the site's own palette; answers are told apart by letter A–F */
.ans-0 { --c: #8c4c66; } .ans-1 { --c: #1d4e89; } .ans-2 { --c: #2f7a6b; }
.ans-3 { --c: #b5762c; } .ans-4 { --c: #5e4b8b; } .ans-5 { --c: #46677f; }

/* ================= Student viewer ================= */
.pv [hidden] { display: none !important; }   /* hidden must win over the layout rules below */
body.pv { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: #13213a; color: #fff;
  font-family: "Outfit", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.pv-bar { display: flex; align-items: center; gap: 14px; padding: 10px 16px; background: rgba(0, 0, 0, .25); }
.pv-back { color: #c9d4e4; text-decoration: none; font-size: 15px; white-space: nowrap; }
.pv-back:hover { color: #fff; }
.pv-title { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-count { font-variant-numeric: tabular-nums; color: #c9d4e4; font-size: 14px; }
.pv-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pv-badge--live { background: #e21b3c; text-transform: uppercase; letter-spacing: .05em; }
.pv-badge--preview { background: #d89e00; color: #13213a; }
.pv-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pvpulse 1.4s infinite; }
@keyframes pvpulse { 50% { opacity: .3; } }
.pv-icon-btn { background: rgba(255, 255, 255, .1); border: 0; color: #fff; width: 36px; height: 36px; border-radius: 8px; cursor: pointer; font-size: 18px; }
.pv-icon-btn:hover { background: rgba(255, 255, 255, .2); }
.pv-main { flex: 1; display: flex; min-height: 0; }
.pv-stage { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 16px; min-height: 0; overflow: auto; }
.pv-stage > * { margin: auto; }   /* centred when it fits; scrolls from the top when it doesn't */
.pv-slide-wrap { width: min(100%, calc((100dvh - 150px) * 16 / 9)); box-shadow: 0 10px 40px rgba(0, 0, 0, .4); border-radius: 6px; overflow: hidden; }
.pv-nav { display: flex; align-items: center; gap: 14px; padding: 10px 16px 14px; }
.pv-progress { flex: 1; height: 4px; background: rgba(255, 255, 255, .15); border-radius: 2px; overflow: hidden; }
.pv-progress span { display: block; height: 100%; background: #e3b7c8; transition: width .3s; }
.pv-livenote { text-align: center; color: #9fb0c8; font-size: 14px; padding: 8px 16px 14px; }
.pv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 16px/1 "Outfit", system-ui, sans-serif;
  padding: 12px 20px; border-radius: 10px; border: 0; background: #8c4c66; color: #fff; cursor: pointer; text-decoration: none; }
.pv-btn:hover { background: #a85f7f; }
.pv-btn:disabled { opacity: .35; cursor: default; }
.pv-btn--ghost { background: rgba(255, 255, 255, .1); }
.pv-btn--ghost:hover { background: rgba(255, 255, 255, .2); }
.pv-btn--big { width: 100%; padding: 16px; font-size: 18px; }
.pv-btn:focus-visible, .pvq-ans:focus-visible, .pv-icon-btn:focus-visible { outline: 3px solid #e3b7c8; outline-offset: 2px; }
.pv-empty { text-align: center; max-width: 520px; }
.pv-empty-mark { font-size: 40px; color: #e3b7c8; }
.pv-empty h1 { font-family: "Libre Baskerville", Georgia, serif; font-weight: 400; font-size: 28px; margin: 10px 0; }
.pv-empty p { color: #c9d4e4; margin-bottom: 24px; }

/* ---- quiz (student) ---- */
.pv-quiz { width: min(100%, 760px); display: flex; flex-direction: column; gap: 14px; }
.pvq-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pvq-icon { width: 60px; height: 60px; border-radius: 18px; background: var(--accent, #8c4c66); display: grid; place-items: center; font: 400 32px/1 system-ui;
  transform: rotate(-6deg); color: #fff; }
.pvq-title { font-family: "Libre Baskerville", Georgia, serif; font-weight: 400; font-size: clamp(24px, 5vw, 36px); margin: 0; }
.pvq-sub { color: #c9d4e4; margin: 0; white-space: pre-wrap; }
.pvq-card { background: #fff; color: #13213a; border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 12px; text-align: center; }
.pvq-card h3 { margin: 0; font-size: 24px; }
.pvq-card p { margin: 0; }
.pvq-join { text-align: left; }
.pvq-label { font-weight: 600; }
.pvq-join input { font: 500 20px "Outfit", system-ui; padding: 14px; border: 2px solid #c3cfdd; border-radius: 10px; width: 100%; box-sizing: border-box; }
.pvq-join input:focus { outline: none; border-color: #8c4c66; }
.pvq-error { color: #c0182f; font-weight: 600; min-height: 1em; margin: 0; }
.pvq-note { background: #fff4d6; color: #6b4707; border-radius: 8px; padding: 8px 12px; }
.pvq-small { color: #52637a; font-size: 14px; text-align: center; }
.pvq-wait { align-items: center; }
.pvq-spinner { width: 40px; height: 40px; border-radius: 50%; border: 4px solid #e5ebf2; border-top-color: #8c4c66; animation: pvspin 1s linear infinite; }
@keyframes pvspin { to { transform: rotate(360deg); } }
.pvq-you { display: flex; justify-content: space-between; align-items: center; background: rgba(255, 255, 255, .1); border-radius: 10px; padding: 8px 14px; font-size: 15px; }
.pvq-timer { position: relative; height: 10px; background: rgba(255, 255, 255, .12); border-radius: 999px; margin: 18px 0 4px; }
.pvq-timer span { position: absolute; inset: 0 auto 0 0; background: #e3b7c8; border-radius: 999px; transition: width .2s linear; }
.pvq-timer.is-low span { background: #f08a7e; }
.pvq-timer b { position: absolute; right: 0; top: -24px; font-size: 15px; font-variant-numeric: tabular-nums; color: #e3b7c8; }
.pvq-timer.is-low b { color: #f08a7e; }
.pvq-question { background: #fff; color: #13213a; border-radius: 14px; padding: 18px 20px; text-align: center; }
.pvq-qnum { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: #8c4c66; font-weight: 700; }
.pvq-qtext { font-size: clamp(20px, 4vw, 28px); margin: 6px 0 0; line-height: 1.3; }
.pvq-qimg { max-width: 100%; max-height: 32vh; margin: 12px auto 0; display: block; border-radius: 8px; }
.pvq-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pvq-ans { position: relative; display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 12px 16px 12px 12px;
  border: 2px solid transparent; border-left: 6px solid var(--c); border-radius: 12px; background: #fff; color: #13213a;
  font: 600 clamp(16px, 3vw, 19px) "Outfit", system-ui; text-align: left; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15); transition: transform .1s, background .15s, opacity .2s; }
.pvq-ans:hover:not(:disabled) { background: color-mix(in srgb, var(--c) 10%, #fff); transform: translateY(-1px); }
.pvq-ans:active:not(:disabled) { transform: translateY(1px); }
.pvq-ans:disabled { cursor: default; }
.pvq-letter { width: 38px; height: 38px; border-radius: 10px; background: var(--c); color: #fff; display: grid; place-items: center;
  font: 700 18px/1 "Outfit", system-ui; flex: none; }
.pvq-ans-text { flex: 1; overflow-wrap: anywhere; }
.pvq-ans-count { background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--c); border-radius: 999px; padding: 3px 10px; font-size: 14px; font-weight: 700; }
.pvq-ans.is-picked { background: var(--c); color: #fff; }
.pvq-ans.is-picked .pvq-letter { background: #fff; color: var(--c); }
.pvq-ans.is-picked .pvq-ans-count { background: rgba(255, 255, 255, .25); color: #fff; }
.pvq-ans.is-dim { opacity: .4; }
.pvq-ans.is-correct { opacity: 1; border-color: #3f9b6b; box-shadow: 0 0 0 3px rgba(63, 155, 107, .45); }
.pvq-ans.is-correct::after { content: "✓ Pareizi"; position: absolute; top: -10px; right: 10px; background: #3f9b6b; color: #fff;
  font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.pvq-result.is-right { background: #2f7a5a; color: #fff; }
.pvq-result.is-wrong { background: #9e3d4b; color: #fff; }
.pvq-result.is-none { background: #52637a; color: #fff; }
.pvq-result .pv-btn { background: #13213a; align-self: center; }
.pvq-plus { font-size: 34px; font-weight: 700; }
.pvq-h { text-align: center; margin: 4px 0 0; font-size: 22px; }
.pvq-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pvq-board li { display: flex; gap: 12px; align-items: center; background: #fff; color: #13213a; border-radius: 10px; padding: 10px 14px; font-size: 17px; }
.pvq-board li.is-you { background: #f5e8ee; outline: 2px solid #8c4c66; }
.pvq-rank { width: 28px; height: 28px; border-radius: 50%; background: #13213a; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.pvq-name { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pvq-score { font-weight: 700; font-variant-numeric: tabular-nums; }
.pvq-mine { text-align: center; font-size: 18px; font-weight: 600; margin: 0; }
.pvq-podium { display: flex; justify-content: center; align-items: flex-end; gap: 10px; margin-top: 10px; }
.pvq-step { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 30%; max-width: 180px; }
.pvq-step-name { font-weight: 700; text-align: center; overflow-wrap: anywhere; }
.pvq-step-block { width: 100%; display: grid; place-items: center; font: 700 34px/1 "Outfit"; color: #13213a; border-radius: 10px 10px 0 0; }
.step-1 .pvq-step-block { height: 150px; background: #f2c94c; }
.step-2 .pvq-step-block { height: 110px; background: #d6dde6; }
.step-3 .pvq-step-block { height: 80px; background: #e0a96d; }
@media (max-width: 560px) {
  .pv-bar { gap: 8px; padding: 8px 10px; }
  .pv-badge--preview { display: none; }
  .pv-stage { padding: 10px; }
  .pv-answers, .pvq-answers { grid-template-columns: 1fr; }
  .pvq-ans { min-height: 60px; }
  .pv-nav .pv-btn { padding: 12px 14px; font-size: 15px; }
}

/* ---- QR codes for joining by phone ---- */
.pv-qr-btn { display: grid; place-items: center; }
.pvq-lobby { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pvq-qr { background: #fff; color: #13213a; border-radius: 16px; padding: 14px 14px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .3); }
.pvq-qr img { width: 200px; height: 200px; display: block; image-rendering: pixelated; }
.pvq-qr-text { font-weight: 700; color: #8c4c66; text-align: center; max-width: 220px; }
.pvq-names { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 640px; }
.pvq-chip { background: rgba(255, 255, 255, .14); border-radius: 999px; padding: 5px 14px; font-weight: 600; font-size: 15px; animation: pvpop .3s ease-out; }
@keyframes pvpop { from { transform: scale(.6); opacity: 0; } }
.pv-qr-dialog { border: 0; border-radius: 18px; padding: 24px; max-width: min(92vw, 380px); text-align: center; color: #13213a; }
.pv-qr-dialog::backdrop { background: rgba(10, 18, 32, .75); }
.pv-qr-dialog h2 { margin: 0 0 12px; font-family: "Libre Baskerville", Georgia, serif; font-weight: 400; font-size: 22px; }
.pv-qr-dialog img { width: min(280px, 70vw); height: auto; aspect-ratio: 1; display: block; margin: 0 auto; image-rendering: pixelated; }
.pv-qr-dialog p { color: #52637a; margin: 12px 0 16px; }

/* ---- poll ("question") slide, student view ---- */
.pvp { background: #fff; color: #13213a; border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.pvp-q { margin: 0; font-family: "Libre Baskerville", Georgia, serif; font-weight: 400; font-size: clamp(22px, 4vw, 30px); line-height: 1.25; text-align: center; }
.pvp-text { max-height: 40vh; font-size: 15px; background: #f4f5f7; color: #1f2937; border-radius: 10px; }
.pvp-text .pcopy-text { padding: 14px 16px; padding-right: 84px; }
.pvp-text .pcopy-btn { top: 8px; right: 10px; font-size: 13px; }
.pvp-opts { display: grid; gap: 10px; }
.pvp-opt { position: relative; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 0 16px; border: 2px solid var(--accent, #8c4c66);
  border-radius: 12px; background: #fff; color: #13213a; font: 600 18px "Outfit", system-ui, sans-serif; text-align: left; cursor: pointer; overflow: hidden; }
.pvp-opt:hover:not(:disabled) { background: color-mix(in srgb, var(--accent, #8c4c66) 8%, #fff); }
.pvp-opt:disabled { cursor: default; }
.pvp-opts:not(.has-results) .pvp-opt { justify-content: center; font-size: 20px; }
.pvp-bar { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--accent, #8c4c66) 16%, transparent); transition: width .4s ease; }
.pvp-label, .pvp-pct, .pvp-n { position: relative; }
.pvp-label { flex: 1; overflow-wrap: anywhere; }
.pvp-pct { font-size: 20px; font-variant-numeric: tabular-nums; }
.pvp-n { min-width: 2.2em; text-align: right; font-size: 14px; color: #52637a; font-variant-numeric: tabular-nums; }
.pvp-opt.is-mine { border-width: 3px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #8c4c66) 25%, transparent); }
.pvp-opt.is-mine .pvp-label::after { content: "  · tava atbilde"; font-weight: 400; font-size: 14px; color: #52637a; }
.pvp-foot { margin: 0; text-align: center; color: #52637a; font-size: 14px; }

/* ---- word cloud (free-answer questions) ---- */
.pcloud { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .3em .7em; padding: .4em; line-height: 1.15; }
.pcloud-word { color: var(--c); font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; text-align: center; animation: pvpop .35s ease-out; }
.pcloud-word sup { font-size: .42em; font-weight: 600; margin-left: .15em; opacity: .7; vertical-align: super; }
.pcloud-word.is-mine { text-decoration: underline; text-decoration-thickness: .08em; text-underline-offset: .15em; }
.pvp-cloud { font-size: 18px; min-height: 120px; border-radius: 12px; background: #f6f7f9; }
.pvp-form { display: flex; flex-direction: column; gap: 10px; }
.pvp-form input { font: 500 20px "Outfit", system-ui, sans-serif; padding: 14px 16px; border: 2px solid #c3cfdd; border-radius: 12px; width: 100%; box-sizing: border-box; }
.pvp-form input:focus { outline: none; border-color: var(--accent, #8c4c66); }
.pvp-form .pv-btn { background: var(--accent, #8c4c66); }
.pvp-count { text-align: right; font-size: 13px; color: #52637a; margin: -4px 0 0; }
.pvp-empty { text-align: center; color: #52637a; margin: 24px 0; }

/* ---- interactive website element ---- */
.pel-web { display: flex; }
.pweb { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; border-radius: .9cqw; overflow: hidden; background: #fff;
  border: .15cqw solid rgba(15, 23, 42, .18); box-shadow: 0 .6cqw 2cqw rgba(15, 23, 42, .14); }
.pweb-bar { flex: none; display: flex; align-items: center; gap: 1cqw; height: 2.6cqw; padding: 0 1.2cqw; background: #e9ecf1;
  border-bottom: .1cqw solid rgba(15, 23, 42, .12); }
.pweb-dots { display: flex; gap: .45cqw; }
.pweb-dots i { width: .8cqw; height: .8cqw; border-radius: 50%; background: #c3c9d4; display: block; }
.pweb-dots i:first-child { background: #f28b82; } .pweb-dots i:nth-child(2) { background: #f6c86b; } .pweb-dots i:last-child { background: #7fd08f; }
.pweb-title { flex: 1; text-align: center; font: 500 1.15cqw/1 system-ui, sans-serif; color: #4b5565; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; margin-right: 3cqw; background: #fff; border-radius: .5cqw; padding: .45cqw .8cqw; }
.pweb-open { flex: none; display: grid; place-items: center; width: 2cqw; height: 2cqw; min-width: 22px; min-height: 22px; border-radius: .5cqw;
  color: #4b5565; text-decoration: none; font: 600 max(13px, 1.3cqw)/1 system-ui, sans-serif; margin-left: -2.4cqw; }
.pweb-open:hover { background: #fff; color: #13213a; }
.pweb-view { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #fff; }
.pweb-frame { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; background: #fff; }
.pweb-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1cqw;
  color: #5b6577; font: 600 1.6cqw/1.2 system-ui, sans-serif; background: repeating-linear-gradient(45deg, #f6f7f9 0 1.2cqw, #eef0f4 1.2cqw 2.4cqw); }
.pweb-play { display: grid; place-items: center; width: 5cqw; height: 5cqw; border-radius: 50%; background: #8c4c66; color: #fff; font-size: 2cqw; padding-left: .3cqw; }
