@font-face {
    font-family: "Pretendard Variable";
    src: url("fonts/pretendard/PretendardVariable.woff2") format("woff2");
    font-style: normal;
    font-weight: 45 920;
    font-display: swap;
}

:root {
    color-scheme: light;
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Malgun Gothic", sans-serif;
    color: #292b36;
    background: #fff;
    --muted: #626579;
    --border: #e0e2ec;
    --blue: #2a45ee;
    --blue-hover: #1834cf;
    --blue-soft: #e5edff;
    --white: #fff;
    --sidebar-width: 224px;
}

* { box-sizing: border-box; }
body { margin: 0; line-height: 1.55; }
a { color: var(--blue); text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #6f84ff; outline-offset: 3px; }
h1, h2, h3, h4, p { margin: 0; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.8rem, 4vw, 2.55rem); line-height: 1.2; letter-spacing: -.045em; }
h2 { font-size: 1.13rem; line-height: 1.35; letter-spacing: -.02em; }
h3, h4 { font-size: .96rem; }
[hidden] { display: none !important; }

.skip-link { position: fixed; z-index: 10; inset: -100px auto auto 12px; padding: 10px 16px; border-radius: 8px; color: white; background: var(--blue); }
.skip-link:focus { top: 12px; }
.shell { width: min(1200px, calc(100% - 72px)); margin-inline: auto; }
.app-page { padding-inline-start: var(--sidebar-width); }
.app-sidebar { position: fixed; z-index: 2; inset: 0 auto 0 0; width: var(--sidebar-width); padding: 34px 22px; background: #fafbfd; border-right: 1px solid #f0f1f7; }
.brand { display: inline-flex; align-items: center; gap: 9px; padding: 7px 12px; border: 1px solid var(--blue); background: white; color: var(--blue); font-weight: 750; white-space: nowrap; }
.sidebar-nav { display: grid; gap: 8px; margin-top: 70px; }
.sidebar-nav a { display: flex; align-items: center; gap: 11px; padding: 12px 13px; border-radius: 8px; color: var(--muted); font-weight: 650; white-space: nowrap; }
.sidebar-nav a:hover, .sidebar-nav a.active, .sidebar-nav a[aria-current="page"] { color: var(--blue); background: var(--blue-soft); }
.sidebar-nav a > span { font-size: 1.12rem; line-height: 1; }
.topbar { position: relative; z-index: 3; background: var(--white); }
.topbar-inner { min-height: 78px; display: flex; align-items: center; justify-content: flex-end; }
.account-menu { position: relative; font-size: .9rem; }
.account-menu summary { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 8px; cursor: pointer; list-style: none; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary:hover, .account-menu[open] summary { background: #f4f7ff; }
.account-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-chevron { color: var(--muted); }
.account-actions { position: absolute; inset: calc(100% + 5px) 0 auto auto; min-width: 140px; padding: 6px; border: 1px solid var(--border); border-radius: 10px; background: white; box-shadow: 0 10px 28px #212f601f; }
.account-actions a, .account-actions button { display: block; width: 100%; padding: 9px 11px; border: 0; border-radius: 6px; background: white; color: var(--muted); text-align: left; white-space: nowrap; }
.account-actions a:hover, .account-actions button:hover { background: #f4f7ff; color: var(--blue); }
.inline, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.main { padding-block: 30px 72px; }
.back { display: inline-block; margin-bottom: 20px; font-size: .9rem; font-weight: 650; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head > div { min-width: 0; }
.page-head h1 { margin-bottom: 8px; }
.eyebrow { color: var(--blue); font-weight: 750; font-size: .76rem; letter-spacing: .055em; margin-bottom: 8px; }
.muted { color: var(--muted); }
.small, .helptext { font-size: .85rem; }
.panel { min-width: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--white); }
.button { display: inline-flex; min-height: 46px; max-width: 100%; align-items: center; justify-content: center; padding: 8px 21px; border: 1px solid transparent; border-radius: 999px; font-weight: 700; font-size: .9rem; text-align: center; }
.button.primary { color: var(--white); background: var(--blue); box-shadow: 0 5px 14px #2a45ee21; }
.button.primary:hover { background: var(--blue-hover); }
.button.secondary { color: #20385f; background: var(--white); border-color: #cbd5e3; }
.button.secondary:hover { background: #f2f6ff; }
.button:disabled { cursor: default; opacity: .55; }
.page-head > .button { flex-shrink: 0; }
.badge { display: inline-flex; align-items: center; border-radius: 99px; background: #ecf0f6; color: #41516b; font-size: .75rem; font-weight: 750; padding: 3px 9px; white-space: nowrap; }
.badge.success { color: #186347; background: #e8f6ed; }
.badge.active { color: #253bbe; background: var(--blue-soft); }
.dashboard-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: 12px; }
.dashboard-steps > div { display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: center; gap: 5px 12px; min-height: 114px; padding: 20px; }
.dashboard-steps > div + div { border-left: 1px solid var(--border); }
.dashboard-steps span { grid-row: span 2; color: var(--blue); font-weight: 750; font-size: .85rem; }
.dashboard-steps p { color: var(--muted); font-size: .86rem; }
.history { margin-top: 38px; }
.history-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.history-heading h2 { font-size: 1.32rem; }
.history-list { border-top: 1px solid #292b36; }
.history-row { display: grid; grid-template-columns: minmax(0, 1fr) max-content minmax(120px, max-content); align-items: center; gap: 18px; padding: 16px 8px; border-bottom: 1px solid var(--border); }
.history-title { min-width: 0; display: flex; align-items: center; gap: 13px; }
.history-title h3 { margin-bottom: 3px; font-size: 1.04rem; }
.history-cover { width: 77px; height: 49px; object-fit: contain; border-radius: 5px; background: #f2f4fb; border: 1px solid var(--border); }
.history-link { justify-self: end; font-size: .89rem; font-weight: 700; }
.history-link:hover, .auth-switch a:hover { text-decoration: underline; }
.empty { padding: 48px 20px; text-align: center; }
.empty > * + * { margin-top: 12px; }
.history-empty { border: 1px dashed #c8cce0; border-radius: 12px; background: #fcfcff; }
.history-empty h3 { font-size: 1.22rem; }

.workspace { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr); align-items: start; gap: 18px; }
.panel-head { min-height: 56px; padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--border); }
.counter { font-size: .86rem; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.slide-canvas { background: #e9eef6; min-height: 140px; display: grid; place-items: center; padding: 14px; }
.slide-canvas img { display: block; width: 100%; max-height: 68vh; object-fit: contain; }
.slide-strip { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px; border-top: 1px solid var(--border); }
.slide-link { min-width: 38px; min-height: 38px; padding: 4px; display: inline-flex; justify-content: center; align-items: center; gap: 3px; border: 1px solid var(--border); color: #41516b; border-radius: 7px; font-weight: 700; font-size: .84rem; }
.slide-link:hover, .slide-link[aria-current="page"] { background: #e8efff; color: #1746ad; border-color: #b1c7fa; }
.slide-link.ready span { color: #186347; }
.slide-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding: 0 16px 14px; }
.slide-actions:empty { display: none; }
.section-body, .followup { padding: 18px; }
.section-body > * + *, .followup > * + * { margin-top: 14px; }
.preserve { white-space: pre-wrap; }
.script-read { line-height: 1.8; }
.audio-panel { padding: 11px; border: 1px solid var(--border); background: #f7f9fd; border-radius: 9px; }
.audio-panel > * + * { margin-top: 8px; }
.audio-panel audio { display: block; width: 100%; height: 42px; }
.followup { margin-top: 18px; }
.review-entry { border-top: 1px solid var(--border); padding-top: 14px; }
.review-entry > * + * { margin-top: 7px; }
.question-list { display: grid; gap: 12px; }
.question-entry { padding: 13px; border: 1px solid var(--border); border-radius: 9px; }
.question-entry > * + *, .ai-answer > * + * { margin-top: 6px; }
.ai-answer { padding: 11px; background: #edf3ff; border-radius: 7px; }

.auth-header { padding: 22px clamp(20px, 4vw, 60px); }
.auth-page { background: #f7f8fd; }
.auth-page .auth-header { position: absolute; z-index: 1; inset: 0 0 auto; padding-block: 30px; }
.auth-shell { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(390px, .88fr); min-height: 100vh; }
.auth-intro { display: flex; flex-direction: column; justify-content: center; padding: 116px clamp(32px, 7vw, 114px) 70px; color: white; background: var(--blue); }
.auth-intro .eyebrow { color: #e1e7ff; }
.auth-display { margin-block: 8px 20px; font-size: clamp(2.5rem, 4.5vw, 4.25rem); line-height: 1.12; font-weight: 800; letter-spacing: -.055em; }
.auth-display span, .auth-description, .auth-steps span { color: #e1e7ff; }
.auth-description { max-width: 520px; font-size: clamp(.98rem, 1.35vw, 1.17rem); line-height: 1.7; }
.auth-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 44px; }
.auth-steps > div { display: flex; gap: 10px; padding-top: 12px; border-top: 1px solid #ffffff59; }
.auth-steps b { font-size: 1.1rem; }
.auth-steps span { font-size: .82rem; }
.auth-card { width: min(465px, calc(100% - 52px)); margin: 36px auto; align-self: center; padding: clamp(24px, 3vw, 44px); box-shadow: 0 14px 40px #212f6014; }
.auth-card h1 { margin-bottom: 8px; font-size: 2rem; }
.auth-card .button { width: 100%; margin-top: 4px; }
.auth-card .form-stack { margin-top: 20px; }
.auth-switch { margin-top: 18px; color: var(--muted); text-align: center; font-size: .92rem; }
.auth-switch a { font-weight: 750; }
.form-panel { max-width: 650px; padding: clamp(18px, 4vw, 30px); }
.form-panel h2 { margin-bottom: 8px; }
.form-panel .form-stack { margin-top: 20px; }
.form-stack { display: grid; justify-items: start; gap: 13px; }
.form-stack > div, .form-stack > fieldset { width: 100%; min-width: 0; }
label, legend { font-weight: 700; font-size: .88rem; }
.form-stack > div > label { display: block; margin-bottom: 5px; }
input:not([type="checkbox"], [type="radio"], [type="hidden"]), textarea { width: 100%; min-height: 44px; padding: 10px 12px; background: var(--white); border: 1px solid #c7cad8; border-radius: 8px; color: inherit; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #aa3434; }
input[type="file"] { min-height: 45px; }
textarea { resize: vertical; display: block; }
fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px 12px; margin: 0; }
fieldset input { accent-color: var(--blue); }
fieldset label { display: inline-flex; gap: 6px; align-items: center; min-height: 30px; }
.helptext { margin-top: 5px; color: var(--muted); }
.helptext ul { margin: 0; padding-inline-start: 17px; }
#id_role { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
#id_role label { width: 100%; min-height: 44px; padding: 7px 8px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
#id_role label:has(input:checked) { border-color: var(--blue); background: #f4f7ff; color: var(--blue); }
.auth-card fieldset { border: 0; padding: 0; }
.auth-card legend { padding: 0; margin-bottom: 5px; }
.notice { padding: 11px 14px; border: 1px solid #cbdaf9; border-radius: 8px; background: #edf3ff; color: #20478c; }
.main > .notice { margin-bottom: 14px; }
.notice.success { border-color: #c0e3cd; background: #ecf8f0; color: #1b6143; }
.notice.error, .errorlist { color: #9e2828; }
.notice.error { background: #fff2f2; border-color: #f2c6c6; }
.errorlist { margin-block: 5px; padding-inline-start: 20px; font-size: .88rem; }

@media (max-width: 1060px) {
    .workspace { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
    .app-page { padding-inline-start: 0; }
    .app-sidebar { position: relative; inset: auto; width: auto; padding: 15px 24px; border-right: 0; border-bottom: 1px solid var(--border); }
    .sidebar-nav { display: flex; flex-wrap: wrap; margin-top: 13px; }
    .sidebar-nav a { padding-block: 8px; font-size: .9rem; }
    .topbar { position: absolute; inset: 15px 21px auto auto; background: transparent; }
    .topbar .shell { width: auto; }
    .topbar-inner { min-height: 42px; }
    .auth-shell { grid-template-columns: minmax(0, 1fr); align-content: start; }
    .auth-intro { padding: 100px 28px 34px; }
    .auth-display { font-size: clamp(2.12rem, 6.4vw, 3.1rem); margin-block: 3px 12px; }
    .auth-steps { display: none; }
    .auth-card { margin-block: 22px 40px; }
}
@media (max-width: 520px) {
    .shell { width: calc(100% - 28px); }
    .main { padding-block: 25px 40px; }
    .app-sidebar { padding-inline: 14px; }
    .topbar { right: 10px; }
    .account-name { display: none; }
    .page-head { flex-direction: column; align-items: start; gap: 12px; }
    .dashboard-steps { grid-template-columns: minmax(0, 1fr); }
    .dashboard-steps > div { min-height: 0; padding: 11px 14px; }
    .dashboard-steps > div + div { border-left: 0; border-top: 1px solid var(--border); }
    .history-row { grid-template-columns: minmax(0, 1fr) max-content; gap: 8px; }
    .history-link { grid-column: 1 / -1; }
    .history-cover { width: 56px; height: 40px; }
    .auth-intro { padding-inline: 20px; }
    .auth-card { width: calc(100% - 28px); padding: 21px 18px; }
    .panel-head, .section-body, .followup { padding-inline: 13px; }
    .slide-canvas { padding: 8px; }
    .slide-strip, .slide-actions { padding-inline: 10px; }
    .slide-link { min-height: 42px; min-width: 42px; }
}

.script-batch { display: grid; gap: 12px; }
.batch-toolbar { position: sticky; z-index: 1; top: 8px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; padding: 14px 17px; box-shadow: 0 4px 18px #212f6010; }
.batch-toolbar h2 { margin-bottom: 3px; }
.batch-progress { flex-basis: 100%; display: grid; gap: 4px; }
.batch-progress progress { width: 100%; height: 9px; accent-color: var(--blue); }
.batch-error { color: #9e2828; }
.batch-nav { border: 0; padding-inline: 0; }
.batch-slide { scroll-margin-top: 154px; }
.batch-slide-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.batch-slide .slide-canvas { border-radius: 0 0 0 11px; }
.batch-slide .slide-canvas img { max-height: 400px; }
.batch-script > label { display: block; margin-bottom: 5px; }
.batch-script > textarea { margin: 0; }

@media (max-width: 700px) {
    .batch-slide-body { grid-template-columns: minmax(0, 1fr); }
    .batch-slide .slide-canvas { border-radius: 0; }
    .batch-slide .slide-canvas img { max-height: 265px; }
}
@media (max-width: 520px) {
    .batch-toolbar { padding: 11px; }
    .batch-toolbar .button { min-height: 38px; padding-inline: 11px; }
    .batch-slide { scroll-margin-top: 185px; }
}

.brand-poc { padding: 2px 5px; border-radius: 4px; background: var(--blue-soft); color: #253bbe; font-size: .63rem; line-height: 1.2; }
.history-button { padding: 0; border: 0; background: transparent; color: var(--blue); font: inherit; }
.history-button:hover { text-decoration: underline; }

.discussion-qna { grid-template-columns: minmax(0, 820px); }

.review-player {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: #10131e;
    color: #f2f4ff;
}
.review-player::backdrop { background: #10131e; }
.player-screen {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    background: #10131e;
    color: #f2f4ff;
}
.player-header, .player-footer { padding: 12px clamp(14px, 3vw, 36px); background: #181e2d; }
.player-header { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.player-title { display: block; font-weight: 750; overflow-wrap: anywhere; }
.player-counter { color: #c5cce5; font-size: .83rem; font-variant-numeric: tabular-nums; }
.player-canvas { display: grid; place-items: center; min-width: 0; min-height: 0; overflow: hidden; }
.player-canvas img { display: block; width: 100%; height: 100%; object-fit: contain; }
.player-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.player-footer .actions:has(> [hidden] + [hidden]) { display: none; }
.player-button { min-height: 36px; padding: 6px 12px; border-color: #697490; background: transparent; color: #f2f4ff; flex-shrink: 0; }
.player-button:hover { background: #303a52; }
.player-script { max-width: 100%; margin-inline-start: auto; color: #e3e8fb; font-size: .9rem; }
.player-script summary { cursor: pointer; }
.player-script[open] { flex-basis: 100%; }
.player-script p { max-height: min(24vh, 180px); overflow: auto; margin-top: 8px; }
