:root { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: #172033; background: #eef2f7; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
header { background: #123a6d; color: white; padding: 16px 20px; }
header .inner, main { width: min(980px, calc(100% - 28px)); margin: auto; }
header h1 { margin: 0; font-size: 1.25rem; }
header nav { margin-top: 8px; display: flex; gap: 16px; }
header a { color: #d9ebff; }
main { padding: 24px 0 48px; }
.card { background: white; border-radius: 14px; padding: 20px; margin-bottom: 18px; box-shadow: 0 4px 18px #19324d12; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1 1 220px; }
label { display: block; font-size: .87rem; font-weight: 700; margin-bottom: 6px; }
.toggle-option { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 0; cursor: pointer; }
.toggle-option input { width: 18px; height: 18px; }
input, textarea, select, button { font: inherit; }
input[type=text], input[type=password], textarea, select { width: 100%; border: 1px solid #b9c4d2; border-radius: 8px; padding: 10px 12px; background: white; }
input[type=file] { width: 100%; border: 1px dashed #9aabba; border-radius: 8px; padding: 9px; background: #f8fafc; }
textarea { resize: vertical; }
button, .button { border: 0; border-radius: 8px; padding: 10px 15px; font-weight: 700; cursor: pointer; background: #e3e9f0; color: #172033; }
button.primary { background: #1769aa; color: white; }
button.success { background: #168454; color: white; }
button.danger { background: #bb3344; color: white; }
button:disabled { opacity: .5; cursor: not-allowed; }
.status { display: inline-block; border-radius: 999px; padding: 5px 10px; font-weight: 700; font-size: .8rem; }
.status.open { background: #d9f7e9; color: #087343; }
.status.closed { background: #fde1e4; color: #a51d2d; }
.participant-count { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 7px 13px; background: #e8f4ff; color: #124f82; font-weight: 800; }
.participant-count::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #18ae68; box-shadow: 0 0 0 4px #18ae6826; }
.muted { color: #68778b; }
.notice { padding: 12px 14px; border-radius: 8px; margin-bottom: 14px; background: #e9f3ff; color: #154d7c; }
.notice.error { background: #fde6e9; color: #9c2030; }
.question { border: 1px solid #dce3eb; border-radius: 12px; padding: 16px; margin-top: 14px; }
.question h3 { margin: 0 0 12px; line-height: 1.5; }
.choices { display: grid; gap: 9px; }
.choice { display: flex; align-items: center; gap: 9px; border: 1px solid #d5dde7; border-radius: 9px; padding: 11px; cursor: pointer; }
.choice:hover { background: #f2f7fc; border-color: #6f9dcc; }
.scale { display: flex; gap: 8px; flex-wrap: wrap; }
.scale label { margin: 0; }
.scale input { position: absolute; opacity: 0; }
.scale span { display: grid; place-items: center; width: 44px; height: 44px; border: 2px solid #ccd6e2; border-radius: 9px; cursor: pointer; font-weight: 800; }
.scale input:checked + span { color: white; background: #1769aa; border-color: #1769aa; }
.question-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.result { margin-top: 14px; border-top: 1px solid #e4e9ef; padding-top: 12px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 180px) 1fr 56px; gap: 9px; align-items: center; margin: 8px 0; }
.bar-track { height: 22px; border-radius: 6px; background: #e6ebf1; overflow: hidden; }
.bar-fill { height: 100%; background: #3d8dc7; transition: width .3s; }
.bar-row.correct .bar-fill { background: #168454; }
.bar-row.correct .bar-label { color: #087343; font-weight: 800; }
.admin-question { border: 1px solid #dce3eb; border-radius: 10px; padding: 14px; margin-top: 12px; }
.admin-question h3 { margin: 0 0 8px; }
.admin-question.active { border: 3px solid #1769aa; background: #f1f8ff; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar > * { flex: 0 0 auto; }
.big-number { font-size: 2.5rem; color: #1769aa; font-weight: 800; }
.link-panel { margin-top: 15px; padding: 14px; border-radius: 10px; background: #f1f7fd; line-height: 2; overflow-wrap: anywhere; }
.link-panel code { background: white; border: 1px solid #d6e1eb; border-radius: 6px; padding: 5px 8px; }
.personal-result { display: flex; align-items: center; gap: 16px; margin: 0 0 18px; padding: 16px; border-radius: 14px; animation: correctPulse .7s ease-out; }
.personal-result.is-correct { background: #d9f8e8; color: #087343; border: 2px solid #23b66e; }
.personal-result.is-wrong { background: #ffe4e7; color: #9d2130; border: 2px solid #df5261; }
.personal-mark { display: grid; place-items: center; width: 62px; height: 62px; flex: 0 0 62px; border: 6px solid currentColor; border-radius: 50%; font-size: 2.5rem; font-weight: 900; line-height: 1; }
.personal-result.is-wrong .personal-mark { border: 0; font-size: 4rem; }
.personal-result strong { font-size: 1.35rem; }
.presentation { min-height: 100vh; background: radial-gradient(circle at top, #173e70, #07182e 70%); color: white; }
.presentation header { background: transparent; }
.stage { width: min(1200px, calc(100% - 48px)); margin: auto; padding: 8px 0 40px; display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 28px; align-items: start; }
.stage-panel { min-height: 68vh; background: #ffffff12; border: 1px solid #ffffff2b; border-radius: 22px; padding: 38px; backdrop-filter: blur(8px); }
.stage-panel h2 { margin: 0 0 28px; font-size: clamp(1.8rem, 3.2vw, 3.4rem); line-height: 1.35; }
.stage-choice { position: relative; border: 2px solid #ffffff40; border-radius: 14px; padding: 17px 22px; margin: 13px 0; font-size: clamp(1.1rem, 2vw, 1.65rem); background: #ffffff0c; }
.stage-choice.correct { border-color: #4ee29b; background: #0b8f55; padding-right: 76px; animation: correctPulse .7s ease-out; box-shadow: 0 0 34px #42e99d80; }
.correct-mark { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 46px; height: 46px; border: 5px solid white; border-radius: 50%; font-size: 0; }
.qr-panel { background: white; color: #172033; border-radius: 18px; padding: 17px; text-align: center; box-shadow: 0 8px 30px #0005; }
.qr-panel h2 { font-size: 1.15rem; margin: 4px 0 10px; }
.qr-count { margin: 12px 0 3px; border-radius: 12px; padding: 10px; background: #e9f7f0; color: #087343; font-size: 1.05rem; font-weight: 800; }
.qr-panel svg { width: 100%; height: auto; display: block; }
.join-url { font-size: .7rem; overflow-wrap: anywhere; color: #52657b; margin-top: 9px; }
.stage .bar-row { position: relative; grid-template-columns: minmax(120px, 240px) 1fr 72px; font-size: 1.2rem; padding-right: 58px; }
.stage .bar-track { height: 34px; }
.stage .bar-row.correct .bar-label { color: #65f4b2; }
.stage .bar-row.correct .bar-fill { background: #23d584; }
.stage-kicker { color: #8ecbff; font-weight: 800; letter-spacing: .08em; }
.text-response-header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.text-response-header strong { font-size: 1.25rem; }
.text-response-header span { color: #b9d7f2; font-size: .85rem; }
.text-response-list { display: grid; gap: 10px; max-height: 43vh; overflow-y: auto; padding-right: 8px; scrollbar-color: #8ecbff #ffffff20; }
.text-response { border: 1px solid #ffffff38; border-radius: 13px; padding: 13px 18px; background: #ffffff0d; }
.text-response p { margin: 1px 0; font-size: clamp(1rem, 1.55vw, 1.35rem); line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.text-response-list.standard { max-height: 55vh; }
.text-response-list.standard .text-response { border-color: #d8e2ec; background: #f7f9fc; }
.text-response-list.standard .text-response p { color: #172033; font-size: 1rem; }
.batch-submit { text-align: center; margin-top: 22px; }
.batch-submit button { min-width: 240px; font-size: 1.05rem; }
.batch-result-list { display: grid; gap: 18px; max-height: 58vh; overflow-y: auto; padding-right: 10px; }
.batch-result-list section { border-top: 1px solid #ffffff35; padding-top: 14px; }
.batch-result-list h3 { font-size: clamp(1.15rem, 1.8vw, 1.55rem); margin: 0 0 10px; }
.batch-result-list .text-response-list { max-height: 28vh; }
@keyframes correctPulse { 0% { transform: scale(.94); opacity: .4; } 60% { transform: scale(1.025); } 100% { transform: scale(1); opacity: 1; } }
@media (max-width: 620px) { .bar-row { grid-template-columns: 100px 1fr 42px; font-size: .85rem; } .card { padding: 16px; } }
@media (max-width: 820px) { .stage { grid-template-columns: 1fr; width: min(100% - 24px, 700px); } .qr-panel { width: min(260px, 100%); margin: auto; } .stage-panel { padding: 24px; } }
