/* =========================================================
   AI Lecture Web Builder — "Organic Shape" soft UI
   ========================================================= */
:root {
  --bg: #eceff4;
  --surface: #f2f4f8;
  --surface-2: #e6eaf0;
  --ink: #26385a;
  --ink-2: #4a5a78;
  --muted: #8a95a8;
  --line: #dde2ea;
  --pink: #ec5b85;
  --pink-2: #f7b9cb;
  --orange: #f6a53a;
  --orange-2: #fbd9a9;
  --teal: #22b39a;
  --teal-2: #a9e4d9;
  --blue: #3f9be0;
  --blue-2: #b6d8f3;
  --danger: #e2504c;
  --shadow-out: 9px 9px 22px #cfd5df, -9px -9px 22px #ffffff;
  --shadow-sm: 5px 5px 12px #d2d8e1, -5px -5px 12px #ffffff;
  --shadow-in: inset 4px 4px 10px #d3d9e2, inset -4px -4px 10px #ffffff;
  --radius: 26px;
  --radius-sm: 16px;
  --font: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --ease: cubic-bezier(.22, .9, .3, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 15px; line-height: 1.6; letter-spacing: -0.01em; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--pink-2); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

[hidden] { display: none !important; }

/* default size for inline icons (component rules below override it) */
svg[aria-hidden="true"]:not([width]) { width: 18px; height: 18px; flex: none; }

/* ---------- primitives ---------- */
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 8px; height: 8px; border-radius: 3px; display: block; }
.dots i:nth-child(1) { background: var(--pink); }
.dots i:nth-child(2) { background: var(--orange); }
.dots i:nth-child(3) { background: var(--teal); }
.dots.sm i { width: 5px; height: 5px; border-radius: 50%; }

.h-org { font-weight: 400; letter-spacing: -0.03em; line-height: 1.15; margin: 0; }
.h-org b { font-weight: 800; }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }

.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-out);
  padding: 26px; position: relative;
}
.card.flat { box-shadow: var(--shadow-sm); }
.inset { background: var(--surface-2); border-radius: var(--radius-sm); box-shadow: var(--shadow-in); padding: 16px; }

.num-badge {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); box-shadow: var(--shadow-out); font-weight: 800; font-size: 20px; flex: none;
}
.num-badge::after { content: ''; position: absolute; }
.icon-chip {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none;
  box-shadow: 0 8px 18px -6px currentColor;
}
.icon-chip svg { width: 18px; height: 18px; }
.c-pink { background: var(--pink); color: var(--pink); }
.c-orange { background: var(--orange); color: var(--orange); }
.c-teal { background: var(--teal); color: var(--teal); }
.c-blue { background: var(--blue); color: var(--blue); }
.icon-chip.c-pink, .icon-chip.c-orange, .icon-chip.c-teal, .icon-chip.c-blue { color: #fff; }
.icon-chip.c-pink { box-shadow: 0 8px 18px -6px var(--pink); }
.icon-chip.c-orange { box-shadow: 0 8px 18px -6px var(--orange); }
.icon-chip.c-teal { box-shadow: 0 8px 18px -6px var(--teal); }
.icon-chip.c-blue { box-shadow: 0 8px 18px -6px var(--blue); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  padding: 11px 20px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm);
  font-weight: 650; font-size: 14px; color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { box-shadow: var(--shadow-in); transform: none; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--ink); color: #fff; box-shadow: 0 10px 22px -10px var(--ink); }
.btn.pink { background: var(--pink); color: #fff; box-shadow: 0 10px 22px -10px var(--pink); }
.btn.teal { background: var(--teal); color: #fff; box-shadow: 0 10px 22px -10px var(--teal); }
.btn.orange { background: var(--orange); color: #fff; box-shadow: 0 10px 22px -10px var(--orange); }
.btn.ghost { background: transparent; box-shadow: none; padding: 8px 12px; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 11px; }
.btn.danger { color: var(--danger); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.loading { pointer-events: none; opacity: .75; }
.btn.loading::before {
  content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.field > small { color: var(--muted); font-size: 12px; }
.input, .select, .textarea {
  width: 100%; border: 0; border-radius: 13px; background: var(--surface-2); box-shadow: var(--shadow-in);
  padding: 11px 14px; outline: none; transition: box-shadow .2s;
}
.input:focus, .select:focus, .textarea:focus { box-shadow: var(--shadow-in), 0 0 0 2px var(--blue-2); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a95a8' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.spacer { flex: 1; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 650; background: var(--surface-2); color: var(--ink-2);
}
.chip.pink { background: #fde3eb; color: #c73663; }
.chip.teal { background: #d9f3ee; color: #13806e; }
.chip.orange { background: #fdecd3; color: #b26a0b; }
.chip.blue { background: #dcecfa; color: #1f6fae; }
.chip.gray { background: var(--surface-2); color: var(--muted); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch input { appearance: none; width: 44px; height: 24px; border-radius: 99px; background: var(--surface-2); box-shadow: var(--shadow-in); position: relative; cursor: pointer; margin: 0; transition: background .2s; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.15); transition: left .2s var(--ease); }
.switch input:checked { background: var(--teal); }
.switch input:checked::after { left: 23px; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty svg { width: 42px; height: 42px; opacity: .45; margin: 0 auto 8px; }

/* ---------- organic blobs ---------- */
.blob {
  border-radius: 62% 38% 46% 54% / 55% 44% 56% 45%;
  animation: morph 14s ease-in-out infinite;
}
@keyframes morph {
  0%, 100% { border-radius: 62% 38% 46% 54% / 55% 44% 56% 45%; }
  33% { border-radius: 40% 60% 58% 42% / 42% 58% 42% 58%; }
  66% { border-radius: 54% 46% 36% 64% / 62% 36% 64% 38%; }
}
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-14px) rotate(4deg); } }

/* ---------- top nav ---------- */
.topbar { position: sticky; top: 0; z-index: 40; backdrop-filter: blur(14px); background: rgba(236, 239, 244, .82); }
.topbar .wrap { display: flex; align-items: center; gap: 18px; height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { flex: none; width: 38px; height: 38px; background: linear-gradient(135deg, var(--pink), var(--orange)); box-shadow: 0 8px 18px -8px var(--pink); position: relative; }
.brand-mark::after { content: ''; position: absolute; inset: 11px; border-radius: 50%; background: #fff; }
.brand-name { font-size: 18px; letter-spacing: -0.03em; }
.brand-name b { font-weight: 800; }
.brand-name .ver { margin-left: 7px; padding: 2px 7px; border-radius: 99px; background: var(--surface-2); box-shadow: var(--shadow-in); color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0; vertical-align: 2px; white-space: nowrap; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 13px; border-radius: 12px; text-decoration: none; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.nav a:hover { background: var(--surface); box-shadow: var(--shadow-sm); }
.menu-btn { display: none; }

/* ---------- hero slider ---------- */
.hero { padding: 26px 0 10px; }
.hero-stage {
  position: relative; min-height: 470px; border-radius: 34px; background: var(--surface); box-shadow: var(--shadow-out);
  overflow: hidden; isolation: isolate;
}
.slide {
  position: absolute; inset: 0; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center;
  padding: 48px 56px; opacity: 0; pointer-events: none; transition: opacity .7s var(--ease);
}
.slide.active { opacity: 1; pointer-events: auto; }
.slide .copy > * { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .8s var(--ease); }
.slide.active .copy > * { opacity: 1; transform: none; }
.slide.active .copy > *:nth-child(2) { transition-delay: .12s; }
.slide.active .copy > *:nth-child(3) { transition-delay: .22s; }
.slide.active .copy > *:nth-child(4) { transition-delay: .32s; }
.slide.active .copy > *:nth-child(5) { transition-delay: .42s; }
.slide h1 { font-size: clamp(34px, 5vw, 60px); margin: 10px 0 14px; }
.slide p.lead { font-size: 17px; color: var(--ink-2); max-width: 470px; margin: 16px 0 26px; }
.slide .visual { position: relative; height: 100%; min-height: 360px; }
.slide .visual .shape {
  position: absolute; inset: 6% 2% 6% 8%; background: var(--surface); overflow: hidden;
  box-shadow: 18px 18px 40px #cbd2dd, -14px -14px 34px #ffffff, inset 0 0 0 10px var(--surface);
  transform: scale(.86) rotate(-6deg); transition: transform 1.1s var(--ease);
}
.slide.active .visual .shape { transform: none; }
.slide .visual .shape img { width: 100%; height: 100%; object-fit: cover; }
.slide .visual .fill { position: absolute; inset: 0; }
.fill.pink { background: radial-gradient(circle at 30% 30%, #fff 0, var(--pink-2) 45%, var(--pink) 100%); }
.fill.orange { background: radial-gradient(circle at 30% 30%, #fff 0, var(--orange-2) 45%, var(--orange) 100%); }
.fill.teal { background: radial-gradient(circle at 30% 30%, #fff 0, var(--teal-2) 45%, var(--teal) 100%); }
.fill.blue { background: radial-gradient(circle at 30% 30%, #fff 0, var(--blue-2) 45%, var(--blue) 100%); }
.ripple-lines { position: absolute; inset: 0; opacity: .55; }
.slide .float-chip {
  position: absolute; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 18px;
  background: var(--surface); box-shadow: var(--shadow-out); font-size: 13px; font-weight: 650; animation: floaty 6s ease-in-out infinite;
}
.slide .float-chip.a { left: 0; bottom: 12%; }
.slide .float-chip.b { right: 2%; top: 8%; animation-delay: -3s; }
.slide .float-chip .big { font-size: 26px; font-weight: 800; line-height: 1; }
.hero-ctrl { position: absolute; left: 56px; bottom: 30px; display: flex; gap: 10px; align-items: center; z-index: 3; }
.hero-ctrl button { width: 10px; height: 10px; border-radius: 99px; border: 0; padding: 0; background: var(--line); cursor: pointer; transition: width .4s var(--ease), background .3s; }
.hero-ctrl button.on { width: 34px; background: var(--ink); }
.hero-num { position: absolute; right: 30px; top: 26px; z-index: 3; }
.hero-num .num-badge { width: 58px; height: 58px; font-size: 18px; }
.hero-bg-blob { position: absolute; width: 520px; height: 520px; right: -140px; bottom: -220px; background: var(--surface-2); z-index: -1; }

/* ---------- sections ---------- */
section.block { padding: 56px 0 10px; scroll-margin-top: 70px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.sec-head h2 { font-size: clamp(26px, 3.4vw, 36px); }
.sec-head .dots { margin-top: 12px; }

/* profile / course cards */
.course-hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; }
.prof { display: flex; gap: 20px; align-items: center; }
.avatar { width: 96px; height: 96px; flex: none; background: linear-gradient(135deg, var(--teal-2), var(--blue-2)); overflow: hidden; display: grid; place-items: center; font-size: 34px; font-weight: 800; color: #fff; box-shadow: var(--shadow-out); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.meta-list { display: grid; gap: 10px; margin-top: 14px; }
.meta-list div { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--ink-2); }
.meta-list svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.map-frame { width: 100%; height: 100%; min-height: 260px; border: 0; border-radius: 20px; overflow: hidden; background: var(--surface-2); }

/* tabs */
.tabs { display: inline-flex; gap: 6px; padding: 6px; border-radius: 18px; background: var(--surface-2); box-shadow: var(--shadow-in); flex-wrap: wrap; }
.tabs button { border: 0; background: transparent; padding: 8px 16px; border-radius: 13px; cursor: pointer; font-weight: 650; font-size: 14px; color: var(--ink-2); }
.tabs button.on { background: var(--surface); box-shadow: var(--shadow-sm); color: var(--ink); }

/* week cards */
.weeks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.week-card {
  text-align: left; border: 0; cursor: pointer; background: var(--surface); box-shadow: var(--shadow-out); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 10px; transition: transform .25s var(--ease); position: relative; overflow: hidden;
}
.week-card:hover { transform: translateY(-4px); }
.week-card .wk { display: flex; align-items: center; justify-content: space-between; }
.week-card .wk-num { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--surface); box-shadow: var(--shadow-sm); }
.week-card h4 { margin: 4px 0 0; font-size: 17px; line-height: 1.35; letter-spacing: -0.02em; }
.week-card .deco { position: absolute; width: 120px; height: 120px; right: -40px; bottom: -50px; opacity: .14; }
.week-card.current { box-shadow: var(--shadow-out), inset 0 0 0 2px var(--pink-2); }

/* infographic flow (apps) */
.apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.app-card { display: flex; flex-direction: column; gap: 14px; }
.app-card .app-shape { width: 74px; height: 74px; display: grid; place-items: center; color: #fff; }
.app-card .app-shape svg { width: 30px; height: 30px; }
.app-card h4 { margin: 0; font-size: 18px; }
.app-card p { margin: 0; color: var(--ink-2); font-size: 14px; flex: 1; }
.flow-line { position: absolute; }

/* live quiz */
.live-wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: 22px; align-items: stretch; }
.live-ring { width: 220px; height: 220px; margin: 0 auto; border-radius: 50%; padding: 16px; background: conic-gradient(var(--teal), var(--blue), var(--pink), var(--orange), var(--teal)); }
.live-ring > div { width: 100%; height: 100%; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; }
.pin-input { font-size: 26px; text-align: center; letter-spacing: .25em; font-weight: 800; }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ans-btn {
  border: 0; cursor: pointer; color: #fff; font-weight: 750; font-size: 17px; border-radius: 22px; padding: 22px 18px; min-height: 96px;
  display: flex; align-items: center; gap: 14px; text-align: left; transition: transform .12s, opacity .2s, filter .2s;
}
.ans-btn:hover { transform: translateY(-2px); }
.ans-btn:active { transform: scale(.97); }
.ans-btn svg { width: 30px; height: 30px; flex: none; }
.ans-0 { background: var(--pink); box-shadow: 0 12px 24px -12px var(--pink); }
.ans-1 { background: var(--blue); box-shadow: 0 12px 24px -12px var(--blue); }
.ans-2 { background: var(--orange); box-shadow: 0 12px 24px -12px var(--orange); }
.ans-3 { background: var(--teal); box-shadow: 0 12px 24px -12px var(--teal); }
.ans-btn.dim { opacity: .3; filter: grayscale(.4); }
.ans-btn.picked { outline: 4px solid var(--ink); outline-offset: 3px; }
.timer-bar { height: 10px; border-radius: 99px; background: var(--surface-2); box-shadow: var(--shadow-in); overflow: hidden; }
.timer-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--orange), var(--pink)); border-radius: 99px; transition: width .25s linear; }
.result-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: end; height: 220px; }
.result-bars .bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; height: 100%; }
.result-bars .bar > i { width: 100%; border-radius: 16px 16px 8px 8px; min-height: 8px; transition: height .8s var(--ease); display: block; }
.result-bars .bar b { font-size: 20px; }
.leader { display: grid; gap: 10px; }
.leader div { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); font-weight: 650; }
.leader div .rk { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; color: #fff; background: var(--ink-2); }
.leader div:nth-child(1) .rk { background: var(--orange); }
.leader div:nth-child(2) .rk { background: var(--blue); }
.leader div:nth-child(3) .rk { background: var(--pink); }
.leader div .sc { margin-left: auto; font-variant-numeric: tabular-nums; }
.players-cloud { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.players-cloud span { padding: 6px 13px; border-radius: 99px; background: var(--surface); box-shadow: var(--shadow-sm); font-weight: 650; font-size: 14px; animation: pop .4s var(--ease); }
@keyframes pop { from { transform: scale(.5); opacity: 0; } }
.feedback { text-align: center; padding: 30px; border-radius: 26px; color: #fff; }
.feedback.good { background: var(--teal); }
.feedback.bad { background: var(--pink); }
.feedback.neutral { background: var(--blue); }
.feedback h3 { font-size: 30px; margin: 0 0 4px; }

/* student zone */
.student-zone { display: grid; grid-template-columns: 1fr 1.4fr; gap: 22px; }

/* FAQ */
.faq { display: grid; gap: 14px; }
.faq details { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-sm); padding: 0 22px; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 0; font-weight: 700; display: flex; align-items: center; gap: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .q { width: 30px; height: 30px; border-radius: 10px; background: var(--pink); color: #fff; display: grid; place-items: center; font-size: 13px; flex: none; }
.faq summary::after { content: '+'; margin-left: auto; font-size: 22px; color: var(--muted); transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px 44px; color: var(--ink-2); white-space: pre-line; }

/* footer */
footer.site { margin-top: 80px; padding: 34px 0 40px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 13.5px; }
footer.site .wrap { display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; }
footer.site a { color: var(--ink); font-weight: 650; text-decoration: none; }
footer.site a:hover { color: var(--pink); }
footer.site .links { display: flex; gap: 6px 14px; flex-wrap: wrap; justify-content: center; }

/* ---------- modal / toast ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 100; background: rgba(38, 56, 90, .28); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(820px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--bg); border-radius: 30px; box-shadow: 0 30px 80px -20px rgba(38,56,90,.45); padding: 30px; animation: rise .35s var(--ease); }
.modal.wide { width: min(1100px, 100%); }
@keyframes rise { from { transform: translateY(24px) scale(.98); opacity: 0; } }
.modal-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.modal-head h3 { margin: 0; font-size: 24px; letter-spacing: -0.03em; }
.modal-close { margin-left: auto; }
#toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
#toast div { background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 14px; font-weight: 600; font-size: 14px; box-shadow: 0 14px 30px -10px rgba(0,0,0,.4); animation: rise .3s var(--ease); max-width: min(560px, 92vw); }
#toast div.err { background: var(--danger); }

/* rendered content */
.prose { line-height: 1.75; color: var(--ink); overflow-wrap: anywhere; }
.prose h1, .prose h2, .prose h3 { letter-spacing: -0.03em; line-height: 1.3; }
.prose h2 { font-size: 22px; margin: 26px 0 10px; }
.prose h3 { font-size: 18px; margin: 20px 0 8px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; }
.prose code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: .92em; }
.prose pre { background: var(--ink); color: #fff; padding: 14px; border-radius: 14px; overflow: auto; }
.prose pre code { background: none; color: inherit; }
.prose blockquote { margin: 0; padding: 8px 16px; border-left: 4px solid var(--pink); background: var(--surface); border-radius: 0 12px 12px 0; }
.content-item { display: flex; flex-direction: column; gap: 10px; }
.content-item iframe.embed { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 18px; background: #000; }
.content-item iframe.html { width: 100%; min-height: 420px; border: 0; border-radius: 18px; background: #fff; }
.content-item img { border-radius: 18px; max-height: 460px; object-fit: cover; width: 100%; }
.content-item audio { width: 100%; }

/* =========================================================
   Admin
   ========================================================= */
.admin { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 22px 16px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.side .brand { padding: 4px 8px 20px; }
.side a.item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; text-decoration: none; color: var(--ink-2); font-weight: 650; font-size: 14.5px; }
.side a.item svg { width: 18px; height: 18px; }
.side a.item:hover { background: var(--surface); }
.side a.item.on { background: var(--surface); box-shadow: var(--shadow-sm); color: var(--ink); }
.side a.item.on svg { color: var(--pink); }
.side .sep { height: 1px; background: var(--line); margin: 10px 8px; }
.side-nav { display: flex; flex-direction: column; gap: 6px; }
.side .brand-name { white-space: nowrap; font-size: 16.5px; }
.side .brand-name .ver { margin-left: 5px; padding: 1px 6px; font-size: 10.5px; }
.nav-head { display: flex; align-items: center; gap: 4px; }
.nav-head .item { flex: 1; }
.caret { width: 30px; height: 30px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; color: var(--muted); display: grid; place-items: center; transition: transform .25s var(--ease), background .2s; }
.caret:hover { background: var(--surface); }
.nav-group.open .caret { transform: rotate(90deg); }
.nav-group .sub { display: none; flex-direction: column; gap: 2px; margin: 4px 0 6px 22px; padding-left: 12px; border-left: 2px solid var(--line); }
.nav-group.open .sub { display: flex; }
.sub-item { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 11px; text-decoration: none; color: var(--ink-2); font-size: 13.5px; font-weight: 600; }
.sub-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-item:hover { background: var(--surface); }
.sub-item.on { background: var(--surface); box-shadow: var(--shadow-sm); color: var(--ink); }
.sub-item .dot { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.sub-item.add { color: var(--pink); }
.sub-item.add svg { width: 14px; height: 14px; }

/* settings: per-service connection check */
.key-row { display: flex; gap: 8px; align-items: center; }
.key-row .input { flex: 1; min-width: 0; }
.test-res:empty { display: none; }
.test-res { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.5; }
.test-res b { font-weight: 700; }
.test-res small { flex-basis: 100%; color: inherit; opacity: .85; }
.test-res .tiny { margin-left: auto; }
.test-res.ok { background: #d9f3ee; color: #13806e; }
.test-res.bad { background: #fde3eb; color: #b42c56; }

/* 교과목 page: course detail panel */
.course-info { margin-top: 18px; padding: 18px; border-radius: 18px; background: var(--surface-2); box-shadow: var(--shadow-in); }
.ci-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 22px; }
.ci-cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ci-cell.wide { grid-column: 1 / -1; }
.ci-cell span { font-size: 12px; font-weight: 700; color: var(--muted); }
.ci-cell b { font-weight: 600; font-size: 14.5px; color: var(--ink); overflow-wrap: anywhere; line-height: 1.55; }
.ci-cell b i.muted { font-style: normal; font-weight: 500; }
.ci-bar { width: 120px; height: 8px; border-radius: 99px; background: var(--surface); box-shadow: var(--shadow-in); overflow: hidden; }
.ci-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--orange)); border-radius: 99px; }
@media (max-width: 880px) { .ci-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .ci-grid { grid-template-columns: 1fr; } }

/* YouTube 쇼츠 cards (week view): vertical 9:16, a quarter of the width */
.short-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: start; }
.short-card { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-sm); min-width: 0; }
.short-media { display: block; width: 100%; aspect-ratio: 9 / 16; border: 0; border-radius: 16px; background: #000; object-fit: cover; }
.short-card b { font-size: 14px; line-height: 1.4; letter-spacing: -0.02em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.short-card small { font-size: 12px; color: var(--muted); }
@media (max-width: 720px) { .short-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* admin 삭제 button on deployed items (week view) */
.ct-wrap { position: relative; min-width: 0; }
.ct-tools { position: absolute; top: 10px; right: 10px; z-index: 3; display: flex; gap: 4px; }
.ct-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 30px; height: 30px; padding: 0 9px; border: 0; border-radius: 10px; cursor: pointer;
  background: rgba(38, 56, 90, .82); color: #fff; font-size: 13px; font-weight: 800; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .45); }
.ct-btn:hover { background: rgba(38, 56, 90, .95); }
.ct-btn[disabled] { opacity: .35; cursor: default; }
.ct-btn.ct-del { background: rgba(226, 80, 76, .92); font-size: 12px; }
.ct-btn.ct-del:hover { background: #c93c38; }
.ct-btn svg { width: 13px; height: 13px; }

/* podcast episode cards (week view) */
.pod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.pod-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 26px; background: var(--surface); box-shadow: var(--shadow-out); min-width: 0; }
.pod-cover { position: relative; aspect-ratio: 1 / 1; border-radius: 22px; overflow: hidden; padding: 18px; display: flex; flex-direction: column; justify-content: flex-end; color: #fff;
  background: radial-gradient(120% 90% at 75% 15%, rgba(255,255,255,.18), transparent 55%), linear-gradient(150deg, #6c5ce7 0%, #7a4fd6 38%, #3c3f8f 72%, #2a3352 100%); }
.pod-cover::after { content: ''; position: absolute; inset: auto -30% -40% auto; width: 80%; height: 80%; border-radius: 50%; background: rgba(255,255,255,.06); }
.pod-ep { position: absolute; top: 16px; left: 16px; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.22); font-size: 12px; font-weight: 800; letter-spacing: .04em; backdrop-filter: blur(4px); }
.pod-mic { position: absolute; top: 14px; right: 16px; opacity: .55; }
.pod-mic svg { width: 26px; height: 26px; }
.pod-title { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 6px; }
.pod-title b { font-size: 17px; line-height: 1.4; font-weight: 800; letter-spacing: -0.02em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pod-title small { font-size: 12.5px; font-weight: 700; opacity: .85; }
.pod-card audio { width: 100%; height: 40px; }
.pod-meta { font-size: 13px; color: var(--muted); }
.pod-label { font-size: 13px; font-weight: 700; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod-intro summary { cursor: pointer; font-size: 13px; font-weight: 800; color: var(--teal); list-style: none; }
.pod-intro summary::before { content: '▶ '; font-size: 10px; }
.pod-intro[open] summary::before { content: '▼ '; }
.pod-intro .prose { margin-top: 8px; color: var(--ink-2); }

/* live quiz: last-3-seconds countdown */
#cd.cd-warn { color: var(--pink); animation: cdpulse 1s ease-in-out infinite; }
@keyframes cdpulse { 0% { transform: scale(1.25); } 40%, 100% { transform: scale(1); } }

/* live quiz: QR lobby */
.host-lobby { display: grid; grid-template-columns: minmax(280px, 1fr) 1.2fr; gap: 22px; }
.qr-card { display: grid; gap: 14px; justify-items: center; text-align: center; }
.qr-box { width: min(320px, 70vw); aspect-ratio: 1; padding: 14px; border-radius: 22px; background: #fff; box-shadow: var(--shadow-out); display: grid; place-items: center; }
.qr-box svg { width: 100%; height: 100%; }
.qr-url { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 6px 12px; border-radius: 10px; background: var(--surface-2); word-break: break-all; }
.result-item { padding: 12px 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.result-item summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.result-item .table-wrap { margin-top: 10px; }
@media (max-width: 880px) { .host-lobby { grid-template-columns: 1fr; } }

/* ElevenLabs voice picker */
.voice-picker { display: flex; flex-direction: column; gap: 8px; }
.voice-picker .key-row .select { flex: 1; min-width: 0; }
.vp-meta:empty { display: none; }
.vp-meta { font-size: 12.5px; color: var(--ink-2); padding: 8px 12px; border-radius: 12px; background: var(--surface-2); display: flex; flex-wrap: wrap; gap: 4px 8px; }
.vp-meta span { margin-left: auto; color: var(--muted); }
@media (max-width: 520px) { .voice-picker .key-row { flex-wrap: wrap; } }

/* admin: 대문 페이지 preview right of the left menu */
.main.main-home { padding: 0; }
.home-frame { display: block; width: 100%; height: 100vh; border: 0; background: var(--bg); }
.home-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 10px 18px; background: rgba(236, 239, 244, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); font-size: 13px; }
.home-bar + .home-frame { height: calc(100vh - 53px); }

/* public nav dropdown (교과목) */
.dd { position: relative; }
.dd-btn { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; cursor: pointer; padding: 8px 13px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.dd-btn:hover, .dd.open .dd-btn { background: var(--surface); box-shadow: var(--shadow-sm); }
.dd-btn svg { width: 14px; height: 14px; transition: transform .2s; transform: rotate(90deg); }
.dd.open .dd-btn svg { transform: rotate(-90deg); }
.dd-menu { display: none; position: absolute; top: calc(100% + 8px); left: 0; min-width: 240px; padding: 8px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-out); z-index: 50; flex-direction: column; gap: 2px; }
.dd.open .dd-menu { display: flex; }
.dd-menu button, .dd-menu a { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; cursor: pointer; padding: 9px 12px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.dd-menu button:hover, .dd-menu a:hover { background: var(--surface-2); color: var(--ink); }
.dd-menu button.on { color: var(--ink); background: var(--surface-2); }
.dd-menu .dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.dd-menu small { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 12px; }
.dd-menu hr { border: 0; height: 1px; background: var(--line); margin: 6px 4px; }
.dd-menu .admin-link { color: var(--pink); }
.main { padding: 28px 34px 60px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { font-size: 32px; }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.stat { display: flex; align-items: center; gap: 16px; }
.stat .v { font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.panel-title { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font-size: 18px; letter-spacing: -0.02em; }
.table-wrap { overflow-x: auto; border-radius: 18px; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
table.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--surface); }
table.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl input.input, table.tbl select.select { padding: 7px 10px; border-radius: 10px; font-size: 13px; }
.att-cell { width: 34px; height: 30px; border-radius: 9px; border: 0; cursor: pointer; font-weight: 800; font-size: 12px; }
.att-present { background: #d9f3ee; color: #13806e; }
.att-late { background: #fdecd3; color: #b26a0b; }
.att-absent { background: #fde3eb; color: #c73663; }
.att-none { background: var(--surface-2); color: var(--muted); }
.week-editor { display: grid; gap: 14px; }
.week-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: start; }
.week-row .wk-num { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--surface); box-shadow: var(--shadow-sm); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(420px, 100%); }
.banner { padding: 14px 18px; border-radius: 16px; background: #fdecd3; color: #8a5208; font-size: 14px; font-weight: 600; display: flex; gap: 10px; align-items: center; margin-bottom: 20px; }
.studio { display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: start; }
.studio-apps { display: grid; gap: 10px; }
.studio-app { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; border: 0; background: transparent; cursor: pointer; text-align: left; width: 100%; }
.studio-app:hover { background: var(--surface); }
.studio-app.on { background: var(--surface); box-shadow: var(--shadow-sm); }
.studio-app b { display: block; font-size: 14px; }
.studio-app small { color: var(--muted); font-size: 12px; }
.ctx-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px 18px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm); margin-bottom: 18px; }
.ctx-bar .select { width: auto; min-width: 160px; }
/* web app frame in the content studio: fills the screen height (was 640px) */
.app-frame { width: 100%; height: max(820px, calc(100vh - 120px)); border: 0; border-radius: 20px; background: #fff; box-shadow: var(--shadow-out); }
.pex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pex-grid button { border: 0; padding: 0; border-radius: 14px; overflow: hidden; cursor: pointer; aspect-ratio: 4/3; position: relative; background: var(--surface-2); }
.pex-grid button img { width: 100%; height: 100%; object-fit: cover; }
.pex-grid button.on { outline: 3px solid var(--pink); outline-offset: 2px; }
.host-screen { min-height: 100vh; padding: 30px; display: flex; flex-direction: column; gap: 22px; }
.host-q { font-size: clamp(26px, 3.6vw, 44px); font-weight: 800; letter-spacing: -0.03em; text-align: center; margin: 0; }
.big-pin { font-size: clamp(48px, 8vw, 96px); font-weight: 900; letter-spacing: .08em; line-height: 1; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .grow b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-editor { display: grid; gap: 10px; padding: 16px; border-radius: 18px; background: var(--surface-2); box-shadow: var(--shadow-in); }
.opt-row { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: center; }
.opt-dot { width: 22px; height: 22px; border-radius: 7px; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .nav { display: none; position: absolute; top: 70px; left: 16px; right: 16px; flex-direction: column; background: var(--surface); padding: 10px; border-radius: 20px; box-shadow: var(--shadow-out); }
  .nav.open { display: flex; }
  .menu-btn { display: inline-flex; margin-left: auto; }
  .slide { grid-template-columns: 1fr; padding: 30px 24px 70px; align-content: start; }
  .slide .visual { position: absolute; inset: auto -40px -60px auto; width: 260px; height: 260px; min-height: 0; opacity: .5; z-index: -1; }
  .slide .float-chip { display: none; }
  .hero-stage { min-height: 520px; }
  .hero-ctrl { left: 24px; }
  .course-hero, .live-wrap, .student-zone, .g2, .g3 { grid-template-columns: 1fr; }
  /* admin left menu stays a full vertical menu at every width */
  .admin { grid-template-columns: 216px minmax(0, 1fr); }
  .side { padding: 18px 10px; }
  .side a.item { padding: 10px 12px; font-size: 14px; }
  .side .brand { gap: 8px; padding: 4px 4px 16px; }
  .side .brand-mark { width: 30px; height: 30px; flex: none; }
  .side .brand-name { font-size: 15px; white-space: nowrap; }
  .side .brand-name .ver { margin-left: 4px; padding: 1px 5px; font-size: 10px; }
  .dd-menu { position: static; box-shadow: none; background: var(--surface-2); margin-top: 6px; }
  .main { padding: 18px 16px 50px; }
  .week-row { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .modal { padding: 22px; border-radius: 24px; }
}
@media (max-width: 560px) {
  /* phones: left menu moves on top of the page but keeps every item visible (vertical list) */
  .admin { grid-template-columns: 1fr; }
  .side { position: static; height: auto; overflow: visible; border-bottom: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .g4 { grid-template-columns: 1fr; }
  .answers { grid-template-columns: 1fr; }
  .ans-btn { min-height: 70px; padding: 16px; }
  .result-bars { height: 160px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* deployed AI 슬라이드 (HTML) in a week: 16:9 frame */
.slide-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #0f172a; box-shadow: var(--shadow-in, inset 0 0 0 1px rgba(0,0,0,.06)); }
.slide-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* week view: podcasts | shorts in two columns */
.media-2col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.media-2col .pod-grid { grid-template-columns: minmax(0, 1fr); }
.media-2col .short-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) { .media-2col { grid-template-columns: minmax(0, 1fr); } }
/* shorts column takes the podcast card's height (its own size doesn't count; width follows 9:16) */
.media-2col { align-items: stretch; }
.media-2col > div:last-child { display: grid; contain: size; }
.media-2col .short-grid { display: flex; flex-wrap: nowrap; gap: 18px; align-items: stretch; min-height: 0; }
.media-2col .short-grid > .ct-wrap { display: flex; }
.media-2col .short-card { display: grid; grid-template-rows: minmax(0, 1fr) auto auto; gap: 8px; }
.media-2col .short-media { height: 100%; width: auto; aspect-ratio: 9 / 16; }
.media-2col .short-grid { justify-content: center; }

/* ===== live quiz — redesigned (projector host + phone player) ===== */
.host-screen { background: radial-gradient(900px 500px at 8% -10%, rgba(236, 91, 133, .14), transparent 60%), radial-gradient(800px 520px at 105% 10%, rgba(63, 155, 224, .14), transparent 60%), radial-gradient(700px 500px at 50% 120%, rgba(34, 179, 154, .12), transparent 60%), var(--bg); }
.hq-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 99px; background: var(--surface); box-shadow: var(--shadow-sm); font-weight: 800; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hq-chip.big { font-size: 16px; padding: 9px 18px; }
.hq-chip.blue { color: #fff; background: var(--blue); box-shadow: 0 10px 20px -12px var(--blue); }
.hq-chip.teal { color: #fff; background: var(--teal); box-shadow: 0 10px 20px -12px var(--teal); }
.hq-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hq-card { background: var(--surface); border-radius: 30px; box-shadow: var(--shadow-out); padding: clamp(22px, 3vw, 40px); }
.host-screen .host-q { font-size: clamp(28px, 3.4vw, 52px); line-height: 1.25; }
.hq-mid { display: flex; justify-content: center; align-items: center; gap: clamp(30px, 6vw, 90px); }
.cd-ring { --p: 1; width: clamp(130px, 13vw, 180px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; align-content: center; position: relative;
  background: conic-gradient(var(--pink) calc(var(--p) * 360deg), var(--surface-2) 0); box-shadow: var(--shadow-out); }
.cd-ring::before { content: ''; position: absolute; inset: 12px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-in); }
.cd-ring b, .cd-ring small { position: relative; }
.cd-ring b { font-size: clamp(44px, 5vw, 68px); font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.cd-ring small { font-size: 13px; font-weight: 700; color: var(--muted); }
.hq-ans-count { display: grid; justify-items: center; }
.hq-ans-count b { font-size: clamp(44px, 5vw, 68px); font-weight: 900; line-height: 1; color: var(--teal); }
.hq-ans-count small { font-size: 14px; font-weight: 700; color: var(--muted); }
.hq-reveal { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; align-items: stretch; }
.hq-reveal .result-bars { height: 200px; }
/* answer tiles */
.ans-btn { position: relative; overflow: hidden; }
.ans-btn::after { content: ''; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .12); pointer-events: none; }
.ans-shape { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .22); }
.ans-shape svg { width: 24px !important; height: 24px !important; }
.ans-txt { flex: 1; min-width: 0; line-height: 1.3; }
.ans-ok { margin-left: auto; flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--teal); font-style: normal; font-weight: 900; font-size: 22px; }
.ans-btn.correct { outline: 5px solid #fff; outline-offset: -5px; transform: scale(1.02); }
.ans-btn.dim { opacity: .28; filter: grayscale(.5); }
.host-answers { flex: 1; grid-auto-rows: minmax(110px, 1fr); gap: 18px; }
.host-answers .ans-btn { font-size: clamp(20px, 2vw, 30px); padding: 22px 26px; border-radius: 26px; gap: 20px; }
.host-answers .ans-shape { width: 60px; height: 60px; border-radius: 18px; }
.host-answers .ans-shape svg { width: 30px !important; height: 30px !important; }
/* lobby */
.big-pin { display: flex; justify-content: center; gap: clamp(6px, 1vw, 14px); letter-spacing: 0; }
.big-pin span { display: grid; place-items: center; width: clamp(48px, 6vw, 86px); aspect-ratio: .78; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-out); font-size: clamp(36px, 5vw, 70px); }
.host-cloud span { color: #fff; box-shadow: none; padding: 8px 16px; font-size: 16px; }
.host-cloud .pc-0 { background: var(--pink); } .host-cloud .pc-1 { background: var(--blue); } .host-cloud .pc-2 { background: var(--orange); } .host-cloud .pc-3 { background: var(--teal); }
.host-cloud .waiting { color: var(--muted); background: none; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }
/* podium */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: end; max-width: 620px; margin: 0 auto; }
.pd { display: grid; justify-items: center; gap: 6px; }
.pd-name { font-weight: 800; font-size: 17px; text-align: center; overflow-wrap: anywhere; }
.pd-score { font-size: 13px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pd-block { width: 100%; border-radius: 18px 18px 8px 8px; display: grid; place-items: start center; padding-top: 12px; color: #fff; transform-origin: bottom; animation: rise .8s var(--ease) both; }
.pd-block b { font-size: 34px; font-weight: 900; }
.pd-1 .pd-block { height: 170px; background: linear-gradient(180deg, #f8c04a, var(--orange)); box-shadow: 0 16px 30px -16px var(--orange); }
.pd-2 .pd-block { height: 125px; background: linear-gradient(180deg, #7cbcf0, var(--blue)); animation-delay: .15s; }
.pd-3 .pd-block { height: 95px; background: linear-gradient(180deg, #f48aa8, var(--pink)); animation-delay: .3s; }
.pd-1 .pd-name::before { content: '👑'; display: block; text-align: center; font-size: 28px; }
@keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.host-final { max-width: 820px; width: 100%; margin: 0 auto; text-align: center; padding: 36px; }
/* player (phone) */
.pl-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; padding: 12px 14px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-sm); }
.pl-me { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pl-me b { display: block; font-size: 16px; } .pl-me small { display: block; font-size: 12px; color: var(--muted); font-weight: 700; }
.pl-av { flex: none; width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-weight: 800; background: linear-gradient(135deg, var(--pink), var(--orange)); }
.pl-score { text-align: right; } .pl-score small { display: block; font-size: 11px; color: var(--muted); font-weight: 700; }
.pl-score b { font-size: 22px; font-weight: 900; color: var(--pink); font-variant-numeric: tabular-nums; }
.pl-q { gap: 14px; }
.pl-qt { margin: 4px 0 0; font-size: clamp(20px, 5vw, 26px); letter-spacing: -0.03em; line-height: 1.35; text-align: center; }
.pl-cd { font-size: 30px; font-weight: 900; font-variant-numeric: tabular-nums; min-width: 44px; text-align: center; }
.pl-cd.cd-warn { color: var(--pink); animation: cdpulse 1s ease-in-out infinite; }
.pl-answers { grid-auto-rows: minmax(110px, 1fr); }
.pl-answers .ans-btn { flex-direction: column; justify-content: center; text-align: center; gap: 10px; font-size: 17px; }
.pl-answers .ans-shape { width: 52px; height: 52px; }
.pl-answers .ans-btn.picked { outline: 5px solid #fff; outline-offset: -5px; transform: scale(1.03); }
.pl-done { text-align: center; margin: 0; padding: 12px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); font-weight: 700; color: var(--teal); }
.pl-wait .pl-pulse { display: flex; justify-content: center; gap: 10px; margin-bottom: 14px; }
.pl-wait .pl-pulse i { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; animation: hop 1.4s var(--ease) infinite; }
.pl-wait .pl-pulse i svg { width: 22px; height: 22px; }
.pl-wait .pl-pulse i:nth-child(2) { animation-delay: .15s; } .pl-wait .pl-pulse i:nth-child(3) { animation-delay: .3s; } .pl-wait .pl-pulse i:nth-child(4) { animation-delay: .45s; }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-10px); } }
.pl-wait .pl-pulse .ans-0 { background: var(--pink); } .pl-wait .pl-pulse .ans-1 { background: var(--blue); } .pl-wait .pl-pulse .ans-2 { background: var(--orange); } .pl-wait .pl-pulse .ans-3 { background: var(--teal); }
.feedback { padding: 34px 24px; box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .4); animation: pop .45s var(--ease); }
.feedback .fb-ic { display: block; font-size: 52px; line-height: 1; margin-bottom: 8px; }
.feedback .fb-pts { font-size: 26px; font-weight: 900; margin: 2px 0 6px; }
.feedback.good { background: linear-gradient(140deg, #2cc6aa, var(--teal)); }
.feedback.bad { background: linear-gradient(140deg, #f27a9c, var(--pink)); }
.feedback.neutral { background: linear-gradient(140deg, #6ab3ea, var(--blue)); }
.pl-final { font-size: 40px; font-weight: 900; color: var(--pink); font-variant-numeric: tabular-nums; } .pl-final small { font-size: 18px; margin-left: 3px; }
@media (max-width: 880px) { .hq-reveal { grid-template-columns: 1fr; } .host-answers { grid-auto-rows: minmax(80px, auto); } }
@media (max-width: 600px) { .pl-answers { grid-template-columns: 1fr 1fr !important; } .pl-answers .ans-btn { min-height: 120px; padding: 14px 10px; font-size: 15px; } }

/* builder history: saved-version count */
.snap-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 2px; border-radius: 99px; background: rgba(255,255,255,.3); font-size: 11.5px; font-weight: 800; }

/* 대문 › 교과목 단위 자료 (AI 강의노트): under 「교과목명 Courses.」 */
.course-notes { display: grid; gap: 10px; margin-top: 14px; max-width: 720px; }
.cn-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm); }
.cn-ic { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--teal), var(--blue)); }
.cn-ic svg { width: 22px; height: 22px; }
.cn-txt { flex: 1; min-width: 0; display: grid; }
.cn-txt small { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--teal); }
.cn-txt b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cn-txt span { font-size: 12.5px; color: var(--muted); }

/* 교과목 단위 PDF (AI 강의노트) 미리보기 */
.course-notes { max-width: 980px; }
.cn-pdf { display: grid; gap: 8px; justify-items: start; margin: -2px 0 6px; }
.cn-pdf iframe { width: 100%; height: min(78vh, 760px); border: 0; border-radius: 18px; background: #525659; box-shadow: var(--shadow-sm); }

/* 대문 › 교과목 PDF 뷰어 (AI 강의노트): 주차 카드 폭 · 두 쪽 펼침 · 확대/축소 · 왼쪽 책갈피 */
.pdfv { margin: 22px 0 26px; border-radius: 24px; overflow: hidden; background: #2b3346; box-shadow: var(--shadow-out); outline: none; }
.pdfv-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 14px; background: #1f2636; color: #e8ecf5; }
.pv-title { font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
.pv-sp { flex: 1; }
.pv-sep { width: 1px; height: 20px; background: rgba(255,255,255,.18); margin: 0 4px; }
.pv-btn { border: 0; min-width: 34px; height: 32px; padding: 0 10px; border-radius: 10px; background: rgba(255,255,255,.1); color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.pv-btn:hover { background: rgba(255,255,255,.2); }
.pv-pg, .pv-zm { min-width: 64px; text-align: center; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: #cfd6e6; }
.pdfv-body { display: grid; grid-template-columns: 260px minmax(0, 1fr); height: min(82vh, 900px); }
.pdfv.toc-off .pdfv-body { grid-template-columns: 0 minmax(0, 1fr); }
.pdfv-toc { overflow: auto; padding: 14px 10px; background: #252c3d; color: #dfe4ef; border-right: 1px solid rgba(255,255,255,.08); }
.pdfv.toc-off .pdfv-toc { padding: 0; border: 0; overflow: hidden; }
.pv-th { display: block; padding: 0 8px 8px; font-size: 12px; letter-spacing: .12em; color: #8f9ab3; }
.pdfv-toc a { display: flex; gap: 8px; align-items: baseline; padding: 7px 10px; border-radius: 10px; color: inherit; text-decoration: none; font-size: 13.5px; line-height: 1.4; }
.pdfv-toc a span { flex: 1; min-width: 0; }
.pdfv-toc a small { flex: none; font-size: 11.5px; color: #8f9ab3; font-variant-numeric: tabular-nums; }
.pdfv-toc a.lv1 { padding-left: 24px; font-size: 13px; color: #c3cad9; }
.pdfv-toc a:hover { background: rgba(255,255,255,.08); }
.pdfv-toc a.on { background: var(--pink); color: #fff; }
.pdfv-toc a.on small { color: #fff; }
.pdfv-stage { overflow: auto; padding: 16px; }
.pdfv-pages { display: grid; gap: 12px; justify-content: center; align-items: start; min-width: min-content; }
.pdfv-pages canvas { display: block; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.35); user-select: none; -webkit-user-drag: none; }
@media (max-width: 860px) { .pdfv-body, .pdfv.toc-off .pdfv-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: 80vh; } .pdfv-toc { max-height: 28vh; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.08); } .pdfv.toc-off .pdfv-toc { display: none; } .pv-title { max-width: 100%; flex-basis: 100%; order: -1; } }

/* PDF 뷰어: 화이트 모드 · 본문을 세로 가운데에 */
.pdfv { background: var(--surface); }
.pdfv-bar { background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); }
.pv-btn { background: var(--surface-2); color: var(--ink); }
.pv-btn:hover { background: #dfe4ec; }
.pv-pg, .pv-zm { color: var(--ink-2); }
.pv-sep { background: var(--line); }
.pdfv-toc { background: #fff; color: var(--ink); border-right: 1px solid var(--line); }
.pv-th, .pdfv-toc a small { color: var(--muted); }
.pdfv-toc a.lv1 { color: var(--ink-2); }
.pdfv-toc a:hover { background: var(--surface-2); }
.pdfv-stage { display: flex; background: #eef1f6; }
.pdfv-pages { margin: auto; }
.pdfv-pages canvas { box-shadow: 0 8px 26px rgba(30, 45, 80, .18); }

/* PDF 뷰어 높이 +10% */
.pdfv-body { height: min(90vh, 990px); }
@media (max-width: 860px) { .pdfv-body, .pdfv.toc-off .pdfv-body { height: 88vh; } }

.pdfv-toc a.wait { opacity: .55; }

/* 버전: 제목 아래 줄 */
.brand-name .ver, .side .brand-name .ver { display: block; width: max-content; margin: 3px 0 0; padding: 1px 7px; font-size: 10.5px; line-height: 1.5; vertical-align: baseline; }
.brand-name { line-height: 1.2; }
