@font-face{font-family:"Campus Quiz Sans";font-style:normal;font-weight:100 900;font-display:swap;src:url("/fonts/campus-quiz.woff2") format("woff2")}
:root {
  font-family: "Campus Quiz Sans", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color: #152037; background: #83bcf3; line-height: 1.45; font-synthesis: none;
  --ink: #172238; --muted: #546078; --paper: #fff; --line: #d5dce9; --blue: #3479ec;
  --red: #ed4f57; --yellow: #ffda48; --radius: 15px; --border: 2px solid var(--ink);
  --top: max(14px,env(safe-area-inset-top)); --bottom: max(16px,env(safe-area-inset-bottom));
}
*,*::before,*::after{box-sizing:border-box}
html,body,.stage,.screen,.scene{width:100%;height:100%;margin:0}
body{min-width:280px;overflow:hidden}
.stage{position:relative;isolation:isolate;height:100dvh;overflow:hidden;background:#83bcf3}
.screen,.scene{position:absolute;inset:0;overflow:hidden}
.scene{touch-action:none}.scene canvas{display:block;width:100%;height:100%}.scene[data-camera="free"]{cursor:grab}
[hidden]{display:none!important}
h1,h2,h3,p{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}
button:disabled{opacity:.45;cursor:default}
:focus-visible{outline:3px solid #1564d7;outline-offset:3px}
button{color:var(--ink);touch-action:manipulation}
.entry-shade{position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at center,#15213a04 30%,#15213a26 100%)}
.in-room .entry-shade{display:none}
.panel{position:absolute;z-index:8;top:50%;left:50%;transform:translate(-50%,-50%);width:min(428px,calc(100% - 32px));max-height:calc(100% - 34px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;background:var(--paper);border:3px solid var(--ink);border-radius:24px;padding:clamp(18px,2.3vw,27px);box-shadow:0 5px 0 #192238,0 18px 60px #17263d44}
.panel h2,dialog h2{font-size:1.34rem;letter-spacing:-.055em;line-height:1.3}.panel h3{font-size:1rem}
.brand-row{display:flex;align-items:center;gap:12px}.brand-type{display:flex;align-items:center;gap:6px;text-decoration:none}
.brand-row h1{font-size:clamp(1.72rem,4vw,2.04rem);font-weight:900;letter-spacing:-.085em;line-height:1.2}
.brand-symbol{width:41px;height:42px;display:grid;place-items:center;border:2.5px solid var(--ink);border-radius:11px;color:white;box-shadow:0 3px 0 var(--ink)}
.brand-symbol.o{background:var(--blue);transform:rotate(-7deg)}.brand-symbol.x{background:var(--red);transform:rotate(7deg);margin-left:-2px}
.brand-symbol.o::before{content:"";width:20px;height:20px;border:4px solid currentColor;border-radius:50%}
.brand-symbol.x::after,.brand-symbol.x::before{content:"";position:absolute;width:24px;height:4px;border-radius:4px;background:currentColor;transform:rotate(45deg)}
.brand-symbol.x::after{transform:rotate(-45deg)}.brand-symbol.x{position:relative}
.intro{font-size:.91rem;line-height:1.55;color:var(--muted);margin:12px 0 15px;word-break:keep-all}
.intro b{color:#245dbf}.intro b:nth-child(2){color:#c63544}
.tabs{display:grid;grid-template-columns:1fr 1fr;padding:4px;background:#edf1f7;border-radius:13px;gap:4px;margin-bottom:16px}
.tabs .button{color:#58667d;min-height:37px;border:0;border-radius:9px;font-size:.93rem}
.tabs [aria-pressed=true]{color:#172238;background:white;box-shadow:0 1px 4px #1928432b}
.stack,.small-stack{display:grid;gap:12px}.small-stack{gap:7px}.entry-form{gap:12px}
label{font-size:.88rem;font-weight:750;display:grid;gap:5px}
input,textarea,select{width:100%;min-width:0;min-height:42px;padding:9px 12px;border:1.5px solid #c6cfdf;border-radius:10px;background:#fff;color:var(--ink);font-size:1rem}
input::placeholder,textarea::placeholder{color:#7c889c}input:focus,textarea:focus,select:focus{outline:2px solid #4382e8;outline-offset:1px}
input[type=checkbox]{flex:none;min-height:18px;width:18px;margin:0;accent-color:var(--blue)}
textarea{resize:vertical}
.button,.hud-button,.stage-actions button,.round-action,.answer-key,.icon-close{display:inline-flex;align-items:center;justify-content:center;font-weight:800;text-decoration:none;line-height:1.25}
.button{min-height:41px;border:1.5px solid transparent;border-radius:10px;background:transparent;padding:8px 13px;font-size:.92rem}
.button.primary{border:2px solid var(--ink);box-shadow:0 3px 0 var(--ink);color:#172237;background:var(--yellow);font-weight:900}
.entry-form>.primary{font-size:1.05rem;min-height:46px;margin:3px 0}
.button.secondary{background:#eaf1ff;color:#244f99;border-color:#d7e4ff}.button.quiet{border-color:var(--line);background:#fff}
.button:not(:disabled):hover,.hud-button:hover,.stage-actions button:hover,.round-action:hover,.answer-key:hover{filter:brightness(.96)}
.button.primary:active:not(:disabled),.round-action:active,.answer-key:active{transform:translateY(2px);box-shadow:none}
.colors{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:2px}
.color{width:31px;height:31px;border:2.5px solid white;border-radius:50%;box-shadow:0 0 0 1.4px #c8cfda;display:grid;place-items:center}
.color[aria-pressed=true]{box-shadow:0 0 0 2.5px var(--ink)}
.color[aria-pressed=true]::after{content:"";width:8px;height:13px;border:solid #192238;border-width:0 2.5px 2.5px 0;transform:translateY(-1px) rotate(45deg)}
.entry-links{display:flex;justify-content:center;gap:14px;align-items:center;border-top:1px solid #e5e9ef;margin-top:16px;padding-top:10px}
.entry-links button{background:none;border:0;min-height:32px;font-size:.85rem;font-weight:750;padding:2px;color:#415474}
.entry-links i{height:12px;width:1px;background:#c7d0dd}.entry-links button:hover{text-decoration:underline}
.row,.between,dialog header{display:flex;align-items:center;gap:8px}.between,dialog header{justify-content:space-between}
.small,.notes,.panel summary,.kicker{font-size:.88rem}.muted,.panel p:not(.question),.notes{color:var(--muted)}
.kicker{font-weight:850}.notes,.edit-card{border-radius:10px;background:#f0f4fb;padding:10px 12px}
.room-notice{margin-bottom:10px}.qr-wrap{display:flex;align-items:center;gap:14px;border:1px solid var(--line);border-radius:13px;padding:10px}
.qr-wrap canvas{width:100px!important;height:100px!important;image-rendering:pixelated}.code{font:850 1.45rem ui-monospace,Consolas,monospace;letter-spacing:.05em}
details.editor{border:1px solid var(--line);border-radius:11px;min-width:0}details.editor summary{padding:10px 12px;cursor:pointer;font-weight:800}
.edit-body{padding:0 10px 10px;max-height:50vh;overflow:auto}.edit-body .row,.cheers{flex-wrap:wrap}
.edit-card{border:0;margin:0 0 7px;display:grid;gap:8px;min-width:0}.edit-card legend{font-size:.88rem;font-weight:800}
.choices{display:grid;gap:6px}.choice{display:flex;align-items:center;text-align:left;gap:9px;border:1px solid var(--line);border-radius:10px;padding:6px;background:#f7f9fc;overflow-wrap:anywhere;color:var(--ink)}.choice strong{display:grid;place-items:center;min-width:32px;height:30px;border-radius:7px;background:#e2eaf7}.choice small{margin-left:auto}.choice[aria-current=true],.choice.correct{background:#d9ecff;border-color:var(--blue)}
.question{font-size:1.16rem;font-weight:850;word-break:keep-all}.progress{height:5px;border-radius:4px;overflow:hidden;background:#e4ebf5}
.progress>div{height:100%;background:var(--blue);transform-origin:left}.cheers{display:flex;gap:5px}.cheers .button{font-size:1.12rem}
.timer{font-variant-numeric:tabular-nums;font-weight:900}.urgent{color:#c5303a}
.hud{position:absolute;z-index:3;top:var(--top);left:max(14px,env(safe-area-inset-left));display:flex;align-items:center;gap:7px;max-width:calc(100% - 26px);flex-wrap:wrap}
.room-chip,.hud-button,.stage-actions{min-height:39px;border-radius:13px;box-shadow:0 2px 6px #1522392b}
.room-chip,.hud-button{display:inline-flex;gap:8px;align-items:center;background:#18243bf0;color:#fff;padding:8px 13px;border:1px solid #ffffff3d;font-size:.87rem}
.live-light{width:8px;height:8px;border-radius:50%;background:#88e0a8}#phase-label{border-left:1px solid #778194;padding-left:8px;color:#d6e3f6}
.hud-button{background:#fff;border:2px solid var(--ink);color:var(--ink);box-shadow:0 2px 0 var(--ink)}
.hud-button.more{font-weight:900;letter-spacing:1px;width:41px;padding-inline:0}
.stage-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;background:#19243df4;color:#fff;padding:6px 9px}
.stage-actions button{border:1px solid #ffffff35;border-radius:9px;padding:6px 9px;color:white;background:#34435c;font-size:.84rem;min-height:33px}
#player-count{padding:0 4px;font-size:.8rem}.stage-actions [aria-pressed=true]{background:#4169a4}
.hud-notice,.scene-banner,.controls-hint{position:absolute;pointer-events:none;background:#172239df;color:white;border-radius:999px;padding:6px 13px;font-size:.86rem;font-weight:750}
.hud-notice{top:calc(var(--top) + 55px);left:15px;max-width:80%;border-radius:10px;z-index:2}
.controls-hint{left:15px;bottom:var(--bottom);font-size:.76rem;background:#132138ad;font-weight:650}
.scene-banner{bottom:calc(var(--bottom) + 80px);left:50%;transform:translateX(-50%);border:1px solid #ffffff85}
.round-hud{position:absolute;z-index:2;bottom:var(--bottom);left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:9px;max-width:min(730px,calc(100% - 240px));border:var(--border);border-radius:15px;background:#fff;box-shadow:0 4px 0 var(--ink);padding:7px 9px}
.round-tag{background:var(--yellow);border:2px solid var(--ink);border-radius:8px;padding:3px 8px;font-size:.86rem;font-weight:900;white-space:nowrap}
.round-text{min-width:0;font-weight:800;font-size:.96rem;line-height:1.35;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.round-time{flex:none;min-width:39px;padding:3px 6px;background:#13814e;color:white;border-radius:8px;font-variant-numeric:tabular-nums;text-align:center;font-weight:900}.round-time.urgent{background:#c33c49}
.round-action{flex:none;background:#edf2fa;border:1px solid #c5d0df;border-radius:9px;padding:7px 10px;font-size:.82rem;min-height:34px}
.quick-answers{position:absolute;right:max(15px,env(safe-area-inset-right));bottom:var(--bottom);display:grid;grid-template-columns:repeat(2,1fr);gap:6px}
.answer-key{position:relative;width:48px;height:44px;background:var(--key);border:2px solid var(--ink);border-radius:12px;box-shadow:0 3px 0 var(--ink);font-size:1.3rem;color:white}
.answer-key[aria-current=true]{outline:3px solid var(--yellow);outline-offset:1px}
.joystick,.move-pad{display:none}.joystick{position:absolute;z-index:2;bottom:var(--bottom);left:max(14px,env(safe-area-inset-left));width:82px;height:82px;border:3px solid #fffd;border-radius:50%;background:#ffffff46;touch-action:none;user-select:none;box-shadow:0 2px 10px #142f2840}
.joystick-handle{position:absolute;inset:0;margin:auto;width:35px;height:35px;border:2px solid var(--ink);background:#fff;border-radius:50%;box-shadow:0 2px 0 var(--ink);pointer-events:none;transform:translate(var(--joy-x,0px),var(--joy-y,0px))}
.in-room .panel{inset:var(--top) 14px auto auto;transform:none;width:min(390px,calc(100% - 28px));max-height:calc(100% - 30px);border-radius:18px;padding:17px}
.sheet-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;padding-bottom:10px;border-bottom:1px solid var(--line);font-weight:900}
.icon-close{border:0;border-radius:10px;background:#edf1f7;font-size:1.42rem;line-height:1;width:34px;height:34px}
.sheet-backdrop{position:absolute;inset:0;background:#0a192c35;z-index:6}
.scoreboard{position:absolute;z-index:5;left:50%;top:calc(var(--top) + 57px);transform:translateX(-50%);background:#132139f7;color:#fff;border:2px solid #6b96d4;border-radius:17px;box-shadow:0 6px 20px #1321384a;display:flex;align-items:flex-start;gap:14px;justify-content:space-between;width:min(820px,calc(100% - 30px));padding:clamp(12px,2vw,24px);max-height:55%;overflow:auto}
.scoreboard h2{font-size:clamp(1.15rem,2.8vw,2.5rem);line-height:1.3}.scoreboard p{white-space:pre-line;overflow-wrap:anywhere;margin-top:6px}.scoreboard-time{color:var(--yellow);white-space:nowrap}.scoreboard .icon-close{flex:none}
dialog{width:min(420px,calc(100% - 28px));max-height:85dvh;overflow:auto;border:3px solid var(--ink);border-radius:19px;padding:20px;box-shadow:0 6px 0 var(--ink);color:var(--ink)}dialog::backdrop{background:#15203780}
dialog ol{padding-left:23px;color:var(--muted)}dialog li{margin:8px 0}dialog .primary{width:100%}
#toast{position:fixed;z-index:20;bottom:calc(var(--bottom) + 64px);left:50%;transform:translateX(-50%);background:#14203af4;border-radius:11px;padding:9px 14px;color:white;text-align:center;max-width:90%;width:max-content}
@media(max-width:1180px){.controls-hint{display:none}}
@media(pointer:coarse),(max-width:740px){.joystick{display:block}.controls-hint{display:none}.round-hud{bottom:calc(var(--bottom) + 94px);max-width:min(620px,calc(100% - 24px));width:max-content}.scene-banner{bottom:calc(var(--bottom) + 57px)}.quick-answers{bottom:var(--bottom)}.answer-key{width:51px;height:44px}.hud{gap:5px}.stage-actions{position:absolute;top:calc(100% + 7px);left:0;width:min(325px,calc(100vw - 26px))}.stage-actions button{min-height:39px}}
@media(max-width:560px){.panel{width:min(406px,calc(100% - 28px));padding:19px;border-radius:20px}.in-room .panel{left:8px;right:8px;top:auto;bottom:max(6px,env(safe-area-inset-bottom));width:auto;max-height:82dvh}.room-chip,.hud-button{font-size:.81rem;padding:7px 9px}.round-hud{gap:6px;padding:6px}.round-text{font-size:.87rem}.round-tag{font-size:.76rem;padding:3px 5px}.round-action{padding:6px;min-height:36px}.intro{margin-block:11px 13px}.colors{gap:9px}}
@media(max-height:550px) and (orientation:landscape){.panel{max-height:calc(100% - 14px);padding:16px 20px}.in-room .panel{inset:7px 10px auto auto;width:min(345px,55%);max-height:calc(100% - 14px)}.round-hud{bottom:var(--bottom);max-width:calc(100% - 230px)}.joystick{width:66px;height:66px}.quick-answers .answer-key{width:44px;height:40px}.hud{top:7px}.scene-banner{bottom:64px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}

.hud-roster{position:absolute;left:14px;top:calc(var(--top) + 54px);display:grid;gap:7px;width:150px;max-height:57%;overflow:auto;z-index:1;pointer-events:auto}
.roster-group{background:#f4f8fff0;border:1.5px solid #b1cff7;border-radius:12px;padding:7px 9px;box-shadow:0 2px 8px #15305220}
.roster-group.watching{background:#fff6f6ee;border-color:#efc6c8}.roster-group h2{display:flex;justify-content:space-between;align-items:center;font-size:.77rem;color:#2e588f}.roster-group.watching h2{color:#994652}
.roster-group h2 span{padding:0 7px;border-radius:9px;background:#fff}.roster-group ul{list-style:none;padding:0;margin:4px 0 0}.roster-group li{display:flex;align-items:center;gap:6px;min-height:20px;font-size:.77rem;font-weight:700;overflow-wrap:anywhere}.roster-group li i{width:8px;height:8px;border-radius:50%;flex:none}
.emote-dock{position:absolute;bottom:var(--bottom);left:50%;transform:translateX(-50%);display:flex;gap:5px}
.emote-dock button,#emote-toggle{display:grid;place-items:center;border:2px solid var(--ink);background:#fff;border-radius:12px;box-shadow:0 3px 0 var(--ink);font-weight:800}
.emote-dock button{width:47px;min-height:45px;padding:2px;line-height:1.1;gap:2px}.emote-dock button span{font-size:1.18rem}.emote-dock small{font-size:.66rem}
#emote-toggle{display:none;position:absolute;right:max(15px,env(safe-area-inset-right));bottom:var(--bottom);width:48px;height:48px;border-radius:50%;font-size:1.4rem}
body:has(.emote-dock:not([hidden])) .round-hud{bottom:calc(var(--bottom) + 59px)}
body:has(.emote-dock:not([hidden])) .scene-banner{bottom:calc(var(--bottom) + 119px)}
.answer-key{flex-direction:column;line-height:1}.answer-key small{font-size:.64rem;font-weight:800}.answer-key b{font-size:1.26rem}
.brand-row :is(h1,i){user-select:none}.hud .camera-direct{background:#243651ed;color:#fff;border-color:#ffffff70;box-shadow:0 2px 6px #14203632}
@media(pointer:coarse),(max-width:740px){
  .quick-answers{inset:auto 12px calc(var(--bottom) + 142px);display:flex;justify-content:space-between;pointer-events:none;gap:5px}
  .quick-answers.multiple{display:grid;grid-template-columns:58px 58px;justify-content:space-between}
  .answer-key{pointer-events:auto;width:58px;height:54px;border-radius:15px}.answer-key b{font-size:1.5rem}.answer-key small{font-size:.67rem}
  .round-hud,body:has(.emote-dock:not([hidden])) .round-hud{bottom:calc(var(--bottom) + 89px);max-width:calc(100% - 22px)}
  body:has(.emote-dock:not([hidden])) .scene-banner{bottom:calc(var(--bottom) + 42px)}
  .emote-dock{display:none}.emote-dock.opened{z-index:4;left:auto;right:12px;bottom:calc(var(--bottom) + 66px);transform:none;display:grid;grid-template-columns:repeat(4,44px);padding:8px;background:#253450ee;border-radius:15px}.emote-dock.opened button{width:44px}.emote-dock.opened small{display:none}#emote-toggle{display:grid}
  .hud-roster{width:124px;max-height:35%}.hud-notice{z-index:3}
}
@media(max-width:400px){.camera-direct{font-size:.75rem}.hud{left:8px;max-width:calc(100% - 16px)}.hud .room-chip{gap:5px}.hud .room-chip #phase-label{padding-left:5px}}
@media(max-height:550px) and (orientation:landscape){.quick-answers{bottom:calc(var(--bottom) + 64px)}.round-hud,body:has(.emote-dock:not([hidden])) .round-hud{bottom:var(--bottom);max-width:calc(100% - 200px)}.emote-dock.opened{right:73px;bottom:var(--bottom)}}

.tabs .button[aria-pressed=false]{background:transparent;border:0;box-shadow:none}
.colors{display:grid;grid-template-columns:repeat(8,34px);gap:10px}
.color{height:34px;width:34px}
.round-body{display:grid;gap:4px;min-width:0}.round-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px 10px;font-size:.78rem;font-weight:650;line-height:1.35}
.round-options span{min-width:0;overflow-wrap:anywhere}.round-options b{color:#285fb0}
.round-hud.has-options{width:min(680px,calc(100% - 235px));align-items:start}
@media(max-width:560px){.colors{grid-template-columns:repeat(6,32px);gap:8px}.color{height:32px;width:32px}}
@media(pointer:coarse),(max-width:740px){
  .emote-dock.opened{top:calc(var(--top) + 66px);right:12px;bottom:auto}
  .round-hud.has-options{width:calc(100% - 22px);bottom:calc(var(--bottom) + 79px)}
  .round-hud.has-options .round-options{max-height:76px;overflow:auto;overscroll-behavior:contain}
  .round-hud.has-options .round-text{font-size:.84rem}
  .quick-answers.multiple{bottom:calc(var(--bottom) + 91px + var(--round-bar-height,138px))}
}
@media(max-width:400px){#phase-label{display:none}}
@media(max-height:550px) and (orientation:landscape){
  .emote-dock.opened{top:55px;bottom:auto;right:12px}
  .round-hud.has-options{bottom:var(--bottom);width:calc(100% - 200px)}
  .quick-answers.multiple{bottom:calc(var(--bottom) + 66px)}
  .round-hud.has-options .round-options{max-height:55px}
}
.model-credit{margin:12px 0;color:var(--muted);font-size:.85rem}.model-credit summary{cursor:pointer}.model-credit p{margin-top:6px}.model-credit a{color:#2359a6}

.in-room .panel:has(> .teacher-console-shell) {
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(1000px, calc(100% - 40px));
  height: min(620px, calc(100% - 46px));
  max-height: none;
  overflow: hidden;
  padding: 0;
  border: 3px solid #172338;
  border-radius: 21px;
  box-shadow: 0 7px 0 #172338, 0 24px 70px #15294155;
  background: #fff;
}
.teacher-console-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: #172338;
}
.teacher-console-shell > .sheet-head {
  flex: none;
  gap: 12px;
  margin: 0;
  padding: 13px 18px;
  border: 0;
  background: #172338;
  color: white;
}
.teacher-console-shell > .sheet-head > span:first-child { font-size: 1.16rem; }
.teacher-room-state {
  margin-left: auto;
  padding: 6px 12px;
  border-radius: 20px;
  background: #35475d;
  color: #f3f7fd;
  font-size: .81rem;
}
.teacher-console-shell .sheet-head .icon-close {
  width: auto;
  height: 38px;
  padding: 0 13px;
  border: 0;
  border-radius: 9px;
  background: #ffdb58;
  color: #172338;
  font-size: .88rem;
}
.teacher-console-shell > .room-notice { flex: none; margin: 8px 14px 0; }
.teacher-console-body {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}
.teacher-tabs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 10px;
  border-right: 1px solid #d7e0eb;
  background: #edf2f8;
  overflow-y: auto;
}
.teacher-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 12px;
  border: 2px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: #405168;
  text-align: left;
  font: inherit;
  font-size: .97rem;
  font-weight: 850;
  cursor: pointer;
}
.teacher-tab:hover { background: #ffffffa8; }
.teacher-tab[aria-selected=true] {
  border-color: #223249;
  background: #fff;
  box-shadow: 0 2px 0 #223249;
  color: #14223a;
}
.teacher-tab-icon { font-size: 1.24rem; line-height: 1; }
.teacher-pages { min-width: 0; min-height: 0; }
.teacher-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(17px, 2.6vw, 32px);
}
.teacher-page[hidden] { display: none; }
.teacher-page:focus { outline: 0; }
.teacher-page:focus-visible { outline: 2px solid #386fbd; outline-offset: -4px; }
.teacher-page h2 { font-size: 1.42rem; }
.teacher-page-inner { display: grid; align-content: start; gap: 15px; }
.teacher-page-inner > details.editor { border: 0; border-radius: 0; }
.teacher-page-inner > details.editor > summary { display: none; }
.teacher-page .edit-body { padding: 0; max-height: none; overflow: visible; }
.teacher-page .qr-wrap {
  gap: clamp(15px, 3.4vw, 37px);
  padding: clamp(13px, 2.4vw, 25px);
  background: #f3f7fc;
}
.teacher-page .qr-wrap canvas { width: clamp(106px, 15vw, 156px) !important; height: auto !important; }
.teacher-page .code { font-size: clamp(1.7rem, 3.2vw, 2.55rem); letter-spacing: .08em; }
.teacher-page .question { font-size: clamp(1.12rem, 2.3vw, 1.5rem); }
.teacher-start {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid #d9e3f2;
  border-radius: 14px;
  background: #f3f7fd;
}
.teacher-question-list { margin: 0; padding-left: 2.2em; }
.teacher-question-list li { padding: 9px 0 9px 3px; border-bottom: 1px solid #e1e7ef; }
.teacher-page [data-action=close] { color: #a12636; border-color: #e5b9bf; }
@media (max-width: 660px) {
  .in-room .panel:has(> .teacher-console-shell) {
    width: calc(100% - 16px);
    height: min(690px, calc(100% - 32px));
    border-radius: 16px;
  }
  .teacher-console-shell > .sheet-head { gap: 6px; padding: 9px 10px; }
  .teacher-console-shell > .sheet-head > span:first-child { font-size: 1rem; }
  .teacher-console-shell .sheet-head .icon-close { height: 34px; padding: 0 8px; }
  .teacher-room-state { padding: 4px 7px; font-size: .72rem; }
  .teacher-console-body { display: flex; flex-direction: column; }
  .teacher-tabs {
    flex: none;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
    padding: 6px;
    border-right: 0;
    border-bottom: 1px solid #d7e0eb;
  }
  .teacher-tab { flex-direction: column; gap: 3px; min-height: 47px; padding: 5px 0; font-size: clamp(.64rem, 2.6vw, .78rem); }
  .teacher-tab-icon { font-size: 1rem; }
  .teacher-pages { flex: 1; }
  .teacher-page { padding: 15px; gap: 11px; }
}
@media (max-height: 510px) and (min-width: 661px) {
  .in-room .panel:has(> .teacher-console-shell) { height: calc(100% - 18px); }
  .teacher-tabs { padding-block: 6px; gap: 2px; }
  .teacher-tab { min-height: 36px; }
}
