.live-page, .live-dialog {
  color: #07374f;
  font-family: Pretendard, "Malgun Gothic", system-ui, sans-serif;
  line-height: 1.55;
  background: #fffdf8;
}
.live-page { margin: 0; }
.live-card { box-sizing: border-box; max-width: 42rem; margin: auto; padding: 1.25rem; }
.live-card h1, .live-dialog h2 { margin: 0 0 .55rem; font-size: 1.45rem; }
.live-card label, .live-dialog label, .live-management label { display: block; margin: .75rem 0; }
.live-card input, .live-dialog input, .live-dialog select, .live-management input {
  display: block; width: 100%; box-sizing: border-box; font: inherit; color: inherit;
  padding: .5rem .6rem; margin-top: .3rem; border: 1px solid #9ab5bd; border-radius: .5rem;
  background: #fff;
}
.live-card button, .live-dialog button, .live-management button {
  padding: .45rem .85rem; min-height: 40px; border-radius: .6rem;
  border: 1px solid #08727b; background: #08727b; color: white; font: inherit; cursor: pointer;
}
.live-card button:disabled, .live-dialog button:disabled, .live-management button:disabled { opacity: .5; cursor: default; }
.live-card a, .live-dialog a, .live-management a { color: #086873; }
.live-dialog {
  width: min(28rem, calc(100% - 2rem)); box-sizing: border-box; max-height: 90dvh;
  border: 1px solid #bdd6d6; border-radius: .9rem; padding: 1.15rem; overflow: auto;
}
.live-dialog::backdrop { background: #07263488; }
.live-dialog header { display: flex; align-items: start; justify-content: space-between; gap: .5rem; }
.live-dialog header button { color: #07374f; background: white; border-color: #bdd6d6; }
.live-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.live-dialog p, .live-card p { margin: .55rem 0; }
.live-links { display: grid; gap: .5rem; margin: .8rem 0; }
.live-links label { margin: 0; }
.live-joining #deck { visibility: hidden; }
.live-joining-status { display: none; }
.live-joining .live-joining-status {
  position: fixed; inset: 45vh 1rem auto; z-index: 8; display: block;
  text-align: center; color: #07374f; font-weight: 700; pointer-events: none;
}
#live-requests { padding: 0; list-style: none; }
#live-requests li { border-top: 1px solid #c8d9d6; padding: .5rem 0; display: flex; gap: .5rem;
  align-items: center; justify-content: space-between; overflow-wrap: anywhere; }
#live-note { margin: 1rem 0 2rem; }
#live-note h2 { font-size: 1.3rem; }
#live-note p, #live-note li { white-space: pre-wrap; overflow-wrap: anywhere; }
#live-note .cue { background: #eaf6f2; padding: .65rem .8rem; border-radius: .6rem; }
#top .live-entry { position: fixed; top: max(8px, env(safe-area-inset-top)); right: max(8px, env(safe-area-inset-right));
  min-height: 36px; opacity: 1; background: #07374f; font-weight: 700; }
#top:has(#bwin) #live-open { display: none; }

.live-management {
  margin: .5rem 0; border: 1px solid #bdd6d6; border-radius: .6rem;
  background: #fffdf8; color: #07374f; font-size: 1rem; line-height: 1.5;
}
.live-presenter-management { margin: .6rem .8rem; }
.live-management summary { padding: .45rem .7rem; font-weight: 700; color: #086873; cursor: pointer; }
.live-management > details { margin: 0 .7rem .5rem; padding: 0 .55rem .35rem; border-top: 1px solid #d6e3e3; }
.live-management > details > summary { padding-left: 0; }
.live-management button { width: fit-content; }
.live-sos-badge { margin-left: .45rem; padding: .15rem .4rem; border-radius: .35rem; color: #fff; background: #a83c30; }

.seat-choice { border: 0; padding: 0; margin: .65rem 0; min-inline-size: 0; }
.seat-choice legend { padding: 0; font-weight: 700; }
.seat-map {
  display: grid; grid-template-columns: 1fr 1fr minmax(1rem, .6fr) 1fr 1fr;
  gap: .45rem; margin: .65rem 0 1rem; padding: .75rem; background: #edf2f5; border-radius: .85rem;
}
.seat-screen {
  grid-column: 2 / 5; text-align: center; background: #344b5b; color: #fff;
  border-radius: .35rem; padding: .25rem; margin: 0 0 .5rem; font-weight: 700;
}
.seat-map button.seat {
  display: grid; place-content: center; min-width: 0; min-height: 2.75rem; padding: .25rem;
  color: #213b4d; background: #d9e1e7; border: 1px solid #aebbc5;
  border-radius: .35rem; font-size: .9rem; font-weight: 750; line-height: 1.2; white-space: normal;
}
.seat-map button.seat[aria-pressed="true"] { outline: 2px solid #08727b; outline-offset: 2px; color: #07374f; }
.seat-map button.seat[data-sos="true"] {
  background: #ffdf7a; border-color: #923a22; color: #642512;
  box-shadow: 0 0 .65rem #ff9f40aa;
}
.seat-count { font-size: .72rem; margin-top: .22rem; }
.seat-queue-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.seat-queue-head h2 { font-size: 1.2rem; margin: 0; }
.assistant-slots { display: grid; gap: .45rem; padding: 0; list-style: none; }
.assistant-slots li { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .4rem; }
.assistant-slots input { grid-column: span 2; margin: 0; }

.notes-navigation {
  position: sticky; top: 0; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center; gap: .65rem;
  background: #fffdf8; border-bottom: 1px solid #c8d9d6; padding: .55rem 0;
}
.notes-navigation button { min-height: 3.5rem; font-size: 1.05rem; font-weight: 700; }
#notes-page { font-weight: 700; }
#notes-room-picker form { padding-bottom: .65rem; }
.live-notes #live-note { margin-top: .75rem; }
.live-notes #live-note h2 { margin-top: 0; }
.live-notes #live-note h3 { margin: .85rem 0 .25rem; font-size: 1rem; }
@media (max-width: 420px) {
  .live-notes { padding: .8rem; }
  .live-notes h1 { font-size: 1.22rem; }
}

.sos-announcement {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
}
#top .live-entry[aria-label="SOS 도움 요청"],
#deck button.sos-in-popup, button.sos-in-popup {
  background: #a83c30; color: #fff; border: 1px solid #812c21; font-weight: 750;
}
#pbox2 > .sos-in-popup, #zov > .sos-in-popup {
  position: absolute; left: 12px; top: 12px; z-index: 2;
}
#pbox2 > .sos-in-popup { left: auto; right: 56px; }

#live-password-hint { font-size: .9rem; color: #365d68; }

/* v49 additions */
.seat-map button.seat[data-sos="true"] {
  background: #c62828 !important;
  border-color: #8e0000 !important;
  color: #fff !important;
  box-shadow: 0 0 .7rem #ff1744aa;
  animation: v49sos 1s ease-in-out infinite;
}
@keyframes v49sos {
  50% { background: #ff5252; box-shadow: 0 0 1rem #ff1744; }
}
#live-notes-qr { width: 168px; height: 168px; margin: .4rem 0 .2rem; background: #fff; border-radius: .5rem; padding: .35rem; }
#live-notes-qr svg { width: 100%; height: 100%; display: block; }
.seat-change { font-size: .85rem; margin: .2rem 0 .5rem; }
.seat-change button { background: transparent; color: #086873; border: 0; padding: 0; min-height: 0; text-decoration: underline; cursor: pointer; }
.claimed { color: #086873; font-weight: 700; }
#live-login-overlay {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
  background: #07263488;
}
#live-login-overlay form { width: min(28rem, calc(100% - 2rem)); }
.live-qr-caption { font-size: .9rem; color: #365d68; margin: 0 0 .6rem; }
#deck .slide[data-key="skilldo"] .flow-page {
  right: auto; left: 18px; bottom: 16px; z-index: 7;
}

#sos-popups {
  position: fixed; right: 12px; bottom: 12px; z-index: 70;
  display: grid; gap: .6rem; width: min(22rem, calc(100% - 24px));
  pointer-events: none;
}
.sos-popup {
  pointer-events: auto;
  background: #fff; border: 2px solid #c62828; border-radius: .7rem;
  box-shadow: 0 .4rem 1.2rem #7f101066; padding: .8rem .9rem;
  animation: v49sos 1s ease-in-out infinite;
}
.sos-popup h3 { margin: 0 0 .25rem; color: #8e0000; }
.sos-popup p { margin: .15rem 0; }
.sos-popup div { display: flex; gap: .4rem; margin-top: .45rem; flex-wrap: wrap; }
.sos-popup button { min-height: 2.4rem; }
#deck .slide[data-key="skilldo"] .flow-page { right: auto; left: 18px; bottom: 16px; }
#deck .slide[data-key="skilldo"] .gol { bottom: 52px; }


.live-auth {
  display: grid;
  gap: .55rem;
  margin: .25rem 0 .85rem;
  padding: .95rem .85rem 1rem;
  background: #fff;
  border: 2px solid #086873;
  border-radius: .75rem;
}
.live-auth[hidden] { display: none !important; }
.live-auth .live-share-title { margin: 0; font-size: 1.05rem; }
.live-auth label, .live-auth button { width: 100%; }
.live-auth input[type="password"] {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 2.9rem;
  margin-top: .3rem;
  padding: .45rem .65rem;
  font-size: 1.1rem;
}
.live-auth button[type="submit"] {
  min-height: 3.2rem;
  font-size: 1.15rem;
  font-weight: 800;
}
#live-auth-msg { margin: 0; min-height: 1.2em; color: #8a2f28; }

button.live-create-main {
  width: 100%;
  min-height: 3.6rem;
  font-size: 1.2rem;
  font-weight: 800;
  margin: .35rem 0 .6rem;
}
button.live-create-secondary {
  width: auto;
  min-height: 2.4rem;
  font-size: .95rem;
  font-weight: 700;
  margin: .2rem 0 .5rem;
  background: transparent;
  color: #086873;
  border: 1px solid #9bb8b8;
}
.live-student-share {
  display: grid;
  justify-items: center;
  gap: .45rem;
  margin: .35rem 0 .85rem;
  padding: .7rem .6rem .8rem;
  background: #fff;
  border: 1px solid #c8d9d6;
  border-radius: .7rem;
}
.live-share-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #07374f;
  text-align: center;
}
#live-student-qr {
  width: min(260px, 72vw);
  height: min(260px, 72vw);
  background: #fff;
  border-radius: .5rem;
  padding: .3rem;
}
#live-student-qr svg { width: 100%; height: 100%; display: block; }
.live-student-share label { width: 100%; }
.live-student-share input { font-size: 1rem; }
.live-student-share button { min-height: 2.8rem; font-weight: 750; width: 100%; }
#live-advanced { margin-top: 1rem; }
#live-advanced > summary {
  font-size: .92rem;
  color: #365d68;
  cursor: pointer;
}

body.live-student #top #live-open,
body.live-student #live-open.aud {
  position: fixed !important;
  left: auto !important;
  right: max(12px, env(safe-area-inset-right)) !important;
  top: max(12px, env(safe-area-inset-top)) !important;
  bottom: auto !important;
  z-index: 200 !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background: #d32f2f !important;
  color: #fff !important;
  border: 2px solid #8e0000 !important;
  border-radius: 16px;
  font-weight: 800 !important;
  font-size: 1.2rem !important;
  line-height: 1.2;
  letter-spacing: -0.02em;
  padding: .75rem 1.05rem !important;
  min-height: 58px;
  min-width: 11.5rem;
  box-shadow: 0 .35rem 1.1rem #c6282888;
}
body.live-student.live-need-seat #live-open,
body.live-student.live-class-ended #live-open,
body.live-student.live-no-room #live-open {
  display: none !important;
}
.live-student-hint {
  position: fixed;
  inset: auto 1rem 5.5rem;
  z-index: 41;
  display: block;
  text-align: center;
  color: #07374f;
  font-weight: 700;
  background: #fffdf8ee;
  border: 1px solid #bdd6d6;
  border-radius: .7rem;
  padding: .7rem .9rem;
}
body.live-student #inkdock,
body.live-student #bpen,
body.live-student #inkbar {
  display: none !important;
  pointer-events: none !important;
}
body.live-student #inkc {
  pointer-events: none !important;
}
.live-seat-screen {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: #fffdf8;
  overflow: auto;
  padding: max(1.2rem, env(safe-area-inset-top)) 1.2rem 1.6rem;
  color: #07374f;
  font-family: Pretendard, "Malgun Gothic", system-ui, sans-serif;
}
.live-seat-screen header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: .5rem;
}
.live-seat-screen h2 { margin: 0 0 .4rem; font-size: 1.7rem; }
.live-seat-screen header button {
  color: #07374f;
  background: white;
  border: 1px solid #bdd6d6;
  border-radius: .6rem;
  min-height: 2.4rem;
  padding: .35rem .7rem;
  cursor: pointer;
}
body.live-need-seat #deck,
body.live-need-seat .nav,
body.live-need-seat .flow-page,
body.live-need-seat #hot,
body.live-need-seat #inkdock {
  visibility: hidden !important;
  pointer-events: none !important;
}
#live-seat-check {
  margin: .8rem 0 1rem;
  padding: .75rem .7rem .9rem;
  background: #fff;
  border: 1px solid #c8d9d6;
  border-radius: .7rem;
}
#live-seat-check h3 { margin: 0 0 .25rem; font-size: 1.1rem; }
#live-seat-count { margin: 0 0 .4rem; font-weight: 800; }
.seat-map button.seat[data-taken="true"] {
  background: #08727b;
  border-color: #055e65;
  color: #fff;
}
.seat-map button.seat:disabled { cursor: not-allowed; opacity: .92; }
.seat-map button.seat[data-taken="true"] .seat-count { color: #fff; }

.live-assistant-share {
  display: grid;
  justify-items: center;
  gap: .4rem;
  margin: .35rem 0 .85rem;
  padding: .7rem .6rem .8rem;
  background: #fff;
  border: 1px solid #c8d9d6;
  border-radius: .7rem;
}
.live-assistant-share label,
.live-assistant-share button { width: 100%; }
.live-assistant-share input { font-size: .95rem; }
#live-assistant-qr {
  width: min(200px, 60vw);
  height: min(200px, 60vw);
  background: #fff;
  border-radius: .5rem;
  padding: .3rem;
}
#live-assistant-qr svg { width: 100%; height: 100%; display: block; }
#live-renew-assistant {
  min-height: 2.4rem;
  background: transparent;
  color: #086873;
  border: 1px solid #9bb8b8;
}

.live-password-wrap {
  position: relative;
  display: block;
}
.live-password-wrap input[type="password"],
.live-password-wrap input[type="text"] {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding-right: 4.6rem;
}
.live-password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: auto !important;
  min-height: 2rem;
  margin: 0;
  padding: .2rem .65rem;
  font-size: .85rem;
  font-weight: 800;
  line-height: 1.2;
  background: #e8f3ef;
  border: 1px solid #9cc7b6;
  color: #086873;
  border-radius: 8px;
  cursor: pointer;
}
.live-password-toggle:hover { background: #d5efe8; }

body.live-student .live-seat-change-fab {
  position: fixed;
  top: calc(max(12px, env(safe-area-inset-top)) + 68px);
  right: max(12px, env(safe-area-inset-right));
  z-index: 200;
  background: transparent;
  color: #07374f;
  border: 1px solid #9bb8b8;
  border-radius: 12px;
  min-height: 2.3rem;
  padding: .3rem .7rem;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  pointer-events: auto;
}
body.live-student.live-need-seat .live-seat-change-fab,
body.live-student.live-class-ended .live-seat-change-fab,
body.live-student.live-no-room .live-seat-change-fab {
  display: none !important;
}

.live-class-tools {
  display: flex;
  gap: .45rem;
  align-items: center;
  margin: 0 .8rem .35rem;
}
.live-class-tools button {
  min-height: 2.2rem;
  padding: .3rem .75rem;
  font-size: .92rem;
  font-weight: 750;
  background: #fff;
  color: #086873;
  border: 1px solid #9bb8b8;
  border-radius: .55rem;
  cursor: pointer;
}
.live-seat-dialog {
  z-index: 80;
  width: min(32rem, calc(100% - 2rem));
}
.live-seat-dialog header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: .5rem;
}
.live-seat-dialog header button {
  background: #fff;
  color: #07374f;
  border: 1px solid #bdd6d6;
}
#live-open-seats {
  background: transparent;
  color: #086873;
  border: 1px solid #9bb8b8;
}

.live-share-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: .15rem 0 .45rem;
}
.live-share-toolbar #live-close-share {
  min-height: 2.2rem;
  padding: .3rem .9rem;
  font-size: .95rem;
  font-weight: 750;
  background: #fff;
  color: #07374f;
  border: 1px solid #9bb8b8;
  border-radius: .55rem;
  cursor: pointer;
}
