:root{font-family:Pretendard,'Noto Sans KR',sans-serif;color:#0f172a;background:#f5f7fc;font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-height:100svh;display:flex;flex-direction:column}button,input{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible{outline:3px solid #8aacfb;outline-offset:5px}[hidden]{display:none!important}header{background:white;border-bottom:1px solid #e5eaf3}.header-inner{max-width:1160px;margin:auto;padding:0 28px;height:76px;display:flex;align-items:center;justify-content:space-between}.brand{display:flex;gap:10px;align-items:center;font-size:1.25rem;font-weight:800;letter-spacing:-.04em}.brand b{color:#2554d1}.header-label{font-size:.875rem;color:#64748b}main{width:100%;max-width:1100px;margin:auto;padding:42px 28px 44px}.heading{margin:0 0 26px}.eyebrow{font-size:.75rem;letter-spacing:.17em;color:#1d44ac;font-weight:800;margin:0 0 12px}h1{font-size:clamp(1.6rem,3vw,2.2rem);line-height:1.35;letter-spacing:-.045em;margin:0;font-weight:800;word-break:keep-all}.intro{font-size:1rem;color:#64748b;margin:12px 0 0;line-height:1.6}.screen{background:#070c18;border-radius:18px;overflow:hidden;box-shadow:0 16px 50px -24px #0e1e4940;border:1px solid #1d2a44}.stage{width:100%;min-width:0;grid-template-columns:minmax(0,1fr);position:relative;aspect-ratio:16/9;min-height:250px;display:grid;place-items:center;background:radial-gradient(ellipse at 50% 110%,#152f6e 0%,#0e172c 55%,#070c18 100%)}.panel{width:100%;max-width:100%;min-width:0;overflow-wrap:anywhere;text-align:center;padding:36px 24px;color:white}.panel-label{font-size:.875rem;color:#b7cdfe;letter-spacing:.08em;font-weight:600}.panel h2{font-size:clamp(1.5rem,3vw,2rem);letter-spacing:-.035em;margin:16px 0 12px}.panel p{line-height:1.7;color:#c3d2ec;font-size:1rem;margin:0 0 26px}.primary{display:inline-flex;justify-content:center;align-items:center;gap:10px;border:0;border-radius:12px;min-height:52px;background:#f9761a;color:#151d2d;font-weight:800;padding:14px 24px;box-shadow:0 10px 28px -12px #f9761a80;transition:background .15s,transform .15s}.primary:hover{background:#fb923c}.primary:active{transform:scale(.98)}button svg{width:21px;height:21px;flex:none}.primary:disabled{opacity:.6;cursor:wait}#mount{position:absolute;inset:0;width:100%;height:100%;background:#000}#mount iframe{display:block;width:100%;height:100%;border:0}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 20px;min-height:66px;border-top:1px solid #24334e;color:#b7c6e4;font-size:.875rem;background:#0c1425}.tools{display:flex;align-items:center;gap:8px}.toolbar button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:42px;background:transparent;border:1px solid #384966;color:#fff;border-radius:8px;padding:8px 12px;font-size:.875rem}.toolbar button:hover{background:#1b2b49}.below{font-size:.875rem;color:#64748b;text-align:right;margin:16px 0 0;line-height:1.6}footer{max-width:1044px;width:calc(100% - 56px);margin:0 auto;padding:24px 0;display:flex;gap:16px;justify-content:space-between;border-top:1px solid #dfe5ef;color:#64748b;font-size:.8125rem;line-height:1.6}footer span:first-child{font-weight:800;color:#193989}#setup{max-width:550px;margin:0 auto}#setup label{display:block;text-align:left;font-size:.875rem;color:#c3d2ec;margin-bottom:9px}.input-row{display:flex;gap:10px}.input-row input{width:100%;min-width:0;border:1px solid #52637f;background:#101d34;border-radius:10px;color:white;padding:14px;font-size:1rem}.input-row input::placeholder{color:#94a3b8}.input-row button{white-space:nowrap}.panel .error{color:#ffbdbd;margin:12px 0 0;font-size:.875rem;min-height:1.5em}.screen:fullscreen,.screen.expanded{width:100%;height:100%;display:flex;flex-direction:column;border:0;border-radius:0;background:#000}.screen:fullscreen .stage,.screen.expanded .stage{flex:1;min-height:0;aspect-ratio:auto;background:#000}.screen:fullscreen .toolbar,.screen.expanded .toolbar{flex-shrink:0;padding-bottom:max(12px,env(safe-area-inset-bottom))}.screen.expanded{position:fixed;inset:0;z-index:1000;height:100dvh}body.has-expanded{overflow:hidden}@media(max-width:600px){.header-inner{height:64px;padding:0 20px}.header-label{font-size:.8125rem}main{padding:30px 16px 38px}.heading{margin-bottom:22px}.screen{border-radius:12px}.stage{min-height:270px}.panel{padding:28px 18px}.panel p{font-size:.9375rem}.toolbar{padding:10px 12px}.toolbar button{padding:8px 10px}.input-row{flex-direction:column}.panel h2{margin-top:12px}.below{text-align:center}footer{width:calc(100% - 40px);flex-wrap:wrap;gap:6px}.screen:fullscreen .stage,.screen.expanded .stage{min-height:200px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}
.access-info{background:#e8efff;border:1px solid #cbd9fb;border-radius:12px;padding:14px 18px;margin:0 0 18px;color:#193989;font-size:.9375rem;line-height:1.6;display:flex;flex-wrap:wrap;gap:6px 20px;justify-content:space-between}.access-info strong{font-weight:800}.video-list{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:20px}.video-list button{background:#fff;border:1px solid #ccd5e6;border-radius:10px;padding:13px 16px;color:#334155;font-size:1rem;line-height:1.4;text-align:left}.video-list button[aria-current=true]{background:#1d44ac;border-color:#1d44ac;color:white}.video-list button:disabled{opacity:.5;cursor:default}.notice-page{padding-block:90px;max-width:900px}.admin-entry{display:inline-block;margin-top:30px;color:#1d44ac}.admin-main{margin:0 auto;max-width:1100px}.admin-heading,.section-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}.admin-heading a{font-size:.875rem;color:#1d44ac;white-space:nowrap}.admin-card{background:white;border:1px solid #dfe5ef;border-radius:16px;padding:28px;margin:22px 0}.admin-card h2{margin:0 0 10px;font-size:1.35rem;letter-spacing:-.025em}.muted{color:#64748b;font-size:.875rem;line-height:1.6}.admin-card form>label{display:block;font-weight:600;margin:20px 0 8px}.admin-card input:not([type=checkbox]):not([type=radio]):not([type=hidden]){font-size:1rem;border:1px solid #cbd5e1;border-radius:8px;padding:12px;background:white;max-width:100%;min-width:0;color:#0f172a}.admin-card form>input{width:100%}fieldset{border:0;padding:0;margin:24px 0}legend{font-weight:700;margin-bottom:12px}.catalog{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.catalog label{display:flex;gap:12px;align-items:center;border:1px solid #dfe5ef;border-radius:10px;padding:14px;line-height:1.5;cursor:pointer}.catalog label:has(input:checked){background:#eef3ff;border-color:#5c86f4}.catalog input,.period-options input[type=radio]{accent-color:#2554d1;width:20px;height:20px;flex:none}.period-options{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.period-options label{display:flex;align-items:center;gap:6px}#days{width:90px}.admin-card input:disabled{opacity:.45}.secondary{display:inline-flex;align-items:center;justify-content:center;min-height:42px;border:1px solid #cbd5e1;background:#fff;border-radius:8px;padding:9px 14px;font-size:.875rem;color:#193989;text-decoration:none;cursor:pointer}.secondary:hover{background:#eef3ff}.issued{margin-top:24px;padding:20px;background:#eef3ff;border:1px solid #b7cdfe;border-radius:12px}.issued h3{margin-top:0}.copy-row{display:flex;gap:10px;flex-wrap:wrap}.copy-row input{flex:1;min-width:180px!important}.admin-message{margin:12px 0;min-height:24px;color:#1d44ac;line-height:1.6}.admin-message.error{color:#a51d29}.grant-row{border-top:1px solid #e2e8f0;padding:18px 0;display:flex;justify-content:space-between;align-items:center;gap:18px}.grant-row h3{margin:0 0 8px;font-size:1rem}.grant-row p{margin:5px 0;font-size:.875rem;line-height:1.6;color:#64748b}.row-actions{display:flex;flex-wrap:wrap;gap:8px;flex-shrink:0}.badge{font-size:.8125rem;background:#eef3ff;border-radius:5px;padding:4px 8px;color:#193989;margin-left:8px;white-space:nowrap}.badge.closed{background:#f1f5f9;color:#64748b}.danger{color:#a51d29}.video-admin-row{display:flex;justify-content:space-between;gap:15px;align-items:center;border-bottom:1px solid #e2e8f0;padding:14px 0}.video-admin-row span{overflow-wrap:anywhere}.video-admin-row small{display:block;margin-top:5px;color:#64748b;font-size:.875rem}details{margin-top:22px}summary{cursor:pointer;font-weight:700;color:#1d44ac;padding:10px 0}.form-actions{margin-top:18px;display:flex;gap:10px}button:disabled{cursor:default;opacity:.5}@media(max-width:600px){.admin-card{padding:20px 16px}.catalog{grid-template-columns:minmax(0,1fr)}.grant-row{align-items:flex-start;flex-direction:column}.row-actions{width:100%}.admin-heading{align-items:flex-start}.admin-heading h1{font-size:1.5rem}.copy-row{flex-direction:column}.copy-row input{width:100%}.access-info{padding:12px 14px}.video-list button{flex:1 1 140px}.notice-page{padding-block:60px}}@media(max-height:450px) and (orientation:landscape){.screen:fullscreen .panel,.screen.expanded .panel{padding:12px}.screen:fullscreen .panel h2,.screen.expanded .panel h2{margin:6px;font-size:1.3rem}.screen:fullscreen .panel p,.screen.expanded .panel p{margin:8px}.screen:fullscreen .primary,.screen.expanded .primary{min-height:44px;padding:10px 20px}}
.auth-main{max-width:520px;margin:auto;padding:40px 20px}.auth-card{padding:32px}.auth-card h1{font-size:1.65rem}.auth-card .intro{font-size:1rem}.auth-card label{display:block;margin:18px 0 8px;font-weight:600}.auth-card input{width:100%;min-width:0;font-size:1rem;border:1px solid #cbd5e1;border-radius:8px;padding:13px}.password-row{display:flex;gap:8px}.password-row input{flex:1;min-width:0}.auth-card form>.primary{width:100%;margin-top:24px}.auth-links{border-top:1px solid #e2e8f0;padding-top:20px;margin-top:24px;display:flex;flex-direction:column;gap:14px;font-size:.875rem;line-height:1.6}.auth-links a{color:#1d44ac}.auth-card a.primary{text-decoration:none;margin-top:20px}.account-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.auth-card #auth-success{color:#193989;line-height:1.6}@media(max-width:600px){.auth-card{padding:24px 20px}.auth-main{padding:28px 16px}.admin-heading{flex-wrap:wrap}.account-actions{width:100%}}
.security-cover{position:fixed!important;inset:0!important;width:100vw;height:100dvh;z-index:2147483647;background:#000;color:#fff;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:30px;text-align:center;box-sizing:border-box}.security-cover h1{font-size:clamp(22px,4vw,32px);line-height:1.7;max-width:560px;word-break:keep-all}.security-cover p{font-size:16px;line-height:1.8;color:#bbb;max-width:520px;word-break:keep-all}.security-row{border-left:3px solid #bf4343;padding-left:16px}.security-row .secondary{flex-shrink:0}.security-row small{color:#687579}.security-history{margin-top:22px}.security-history summary{cursor:pointer;padding:12px 0;font-weight:600}.security-history-row{padding:14px 0;border-bottom:1px solid #e3e9e8}.security-history-row p{font-size:14px;color:#637475;line-height:1.7;margin:4px 0}@media(max-width:600px){.security-row{align-items:stretch;flex-direction:column}.security-row button{width:100%}}

.install-guide{margin:0 0 20px;width:100%}.install-dialog{width:min(540px,calc(100% - 32px));max-height:calc(100dvh - 32px);padding:28px;border:1px solid #d7dfe2;border-radius:20px;background:#fff;color:#18343b;overflow:auto;box-sizing:border-box;box-shadow:0 24px 100px #102a3940}.install-dialog::backdrop{background:#05141ddb;backdrop-filter:blur(5px)}.install-top{display:flex;align-items:center;justify-content:space-between;gap:12px}.install-top .eyebrow{margin:0}.install-dialog h2{font-size:1.65rem;line-height:1.45;margin:20px 0 12px;word-break:keep-all}.install-dialog p,.install-steps{font-size:1rem;line-height:1.8;word-break:keep-all}.install-steps{padding-left:24px;margin:18px 0 24px}.install-steps li{padding-left:4px;margin-bottom:8px}.store-actions{display:flex;flex-direction:column;gap:10px;margin:16px 0}.store-actions a{text-align:center;text-decoration:none}.install-dialog #open-player{width:100%;justify-content:center;text-decoration:none;box-sizing:border-box}.install-dialog [hidden]{display:none!important}.install-dialog #copy-watch-link{margin-top:8px}.install-dialog .install-note{font-size:.875rem}.install-browser{border:0;background:transparent;text-decoration:underline;color:#385d67;font:inherit;padding:12px 0;cursor:pointer}.install-dialog .secondary{font-size:.9375rem}#distribution-form .primary{margin-top:16px}@media(max-width:420px){.install-dialog{padding:20px}.install-dialog h2{font-size:1.4rem}.install-top .eyebrow{font-size:.75rem}}

/* Category controls extend the established blue/white interface. */
select{font:inherit;color:inherit}.admin-card select{width:100%;font-size:1rem;padding:12px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;margin:8px 0 12px}select:focus-visible{outline:3px solid #8aacfb;outline-offset:3px}.catalog-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:0 0 14px}.catalog-category{display:block;color:#64748b;font-size:.875rem;margin-top:4px}.video-category-group{width:100%;min-width:0}.video-category-group h2{font-size:1rem;margin:4px 0 10px;color:#193989}.category-videos{display:flex;gap:10px;flex-wrap:wrap}#screen,#video-list{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}#repeat-toggle[aria-pressed=true]{background:#244484;border-color:#86a8fa}.toolbar .tools{flex-wrap:wrap;justify-content:flex-end}#category-admin .row-actions{flex-shrink:1}#category-admin .video-admin-row>span{min-width:0}@media(max-width:600px){.toolbar{flex-wrap:wrap}.toolbar .tools{width:100%;justify-content:flex-end}.catalog-actions .muted{width:100%}#category-admin .video-admin-row{flex-wrap:wrap}}

.remember-choice{display:flex!important;align-items:center;gap:8px;font-size:16px;cursor:pointer;margin:12px 0;} .remember-choice input[type="checkbox"]{width:20px;height:20px;margin:0;flex:0 0 20px;accent-color:#2554d1;}

.audio-option{padding:16px 20px;background:#eef3ff}.audio-option:has(#audio-start[hidden]){display:none}.audio-option a{display:inline-flex;text-decoration:none;padding:12px 18px;border-radius:10px;background:white;color:#173d9f;border:1px solid #bac9ef;font-weight:700}.audio-option p{font-size:13px;line-height:1.6;color:#465777;margin:8px 0 0}

/* Fullscreen stage fills the viewport; the audio panel must not reserve space. */
.screen:fullscreen,.screen.expanded{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;overflow:hidden}
.screen:fullscreen .stage,.screen.expanded .stage{position:absolute;inset:0;width:100%;height:100%;min-height:0;flex:none;aspect-ratio:auto}
.screen:fullscreen .audio-option,.screen.expanded .audio-option{display:none}
.screen:fullscreen .toolbar,.screen.expanded .toolbar{position:absolute;z-index:5;top:max(8px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));min-height:0;width:auto;padding:0;border:0;background:transparent}
.screen:fullscreen .toolbar #status,.screen.expanded .toolbar #status,.screen:fullscreen #repeat-toggle,.screen.expanded #repeat-toggle{display:none}
.screen:fullscreen .toolbar .tools,.screen.expanded .toolbar .tools{width:auto;flex-wrap:nowrap}
.screen:fullscreen #fullscreen,.screen.expanded #fullscreen{min-height:40px;background:#0c1425b3;padding:8px}
.screen:fullscreen #fullscreen span,.screen.expanded #fullscreen span{display:none}

/* Separate controls remain available while video touch and keyboard input are disabled. */
#mount iframe{pointer-events:none}
#mount{touch-action:none}
.playback-controls{display:flex;align-items:center;gap:12px;padding:12px 16px;background:#0c1425;color:#fff;border-top:1px solid #24334e;min-width:0}
.playback-controls button{flex:none;min-height:44px;padding:8px 12px;border:1px solid #53627b;border-radius:8px;color:white;background:#18263d;font-size:14px}
.play-time{font-size:14px;font-variant-numeric:tabular-nums;white-space:nowrap}
.playback-controls input{accent-color:#fa8b3b;min-height:44px;min-width:0;cursor:pointer}
#play-seek{flex:1;width:100%}#play-volume{width:80px;flex:none}
.screen:fullscreen .playback-controls,.screen.expanded .playback-controls{position:absolute;z-index:6;bottom:0;left:0;right:0;padding:8px max(16px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));background:#0c1425eb}
#resume{display:none!important}
@media(max-width:600px) and (orientation:portrait){.playback-controls{flex-wrap:wrap;gap:4px 10px;padding:8px 12px}#play-seek{order:5;flex-basis:100%}.playback-controls #fullscreen{margin-left:auto}#play-volume{width:60px}.play-time{font-size:13px}.playback-controls button{padding:8px}}

/* The lower control is the single entry point. Keep the welcome card until playback has started. */
#start{display:none!important}
.stage.video-starting #mount{opacity:0}
.stage.video-starting #welcome{position:relative;z-index:2;pointer-events:none}

.player-entry{background:#fff;border:1px solid #dfe5ef;border-radius:18px;padding:40px 24px;text-align:center;margin:20px 0}
.player-entry h2{font-size:1.5rem;margin:0 0 14px;word-break:keep-all}.player-entry p{color:#64748b;line-height:1.8;margin:0 0 24px;word-break:keep-all}
.playback-cover{position:absolute;inset:0;z-index:4;background:#070c18;color:#fff;display:flex;align-items:center;justify-content:center;padding:24px;text-align:center;font-size:clamp(16px,3vw,24px);line-height:1.7;word-break:keep-all;pointer-events:none}

/* Hide only Doctor Player controls in fullscreen; tapping the stage reveals them. */
.screen:fullscreen.controls-hidden .playback-controls,.screen.expanded.controls-hidden .playback-controls,
.screen:fullscreen.controls-hidden .toolbar,.screen.expanded.controls-hidden .toolbar{opacity:0;visibility:hidden;pointer-events:none}
.screen:fullscreen .playback-controls,.screen.expanded .playback-controls,
.screen:fullscreen .toolbar,.screen.expanded .toolbar{transition:opacity .15s ease}

.playback-controls #fullscreen{display:flex;align-items:center;justify-content:center;gap:8px}

.volume-controls{display:flex;align-items:center;gap:10px;flex:none}.volume-controls #play-volume{min-height:44px;accent-color:#fa8b3b;cursor:pointer}

.security-alert{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;padding:18px 20px;margin:0 0 20px;border:1px solid #b42318;border-radius:12px;background:#fff1f0;color:#8a1c13}.security-alert[hidden]{display:none}.security-alert a{color:inherit;font-weight:700;text-underline-offset:4px}#security-panel{scroll-margin-top:24px}

.admin-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:24px 0 18px;padding:8px;background:#e9eef8;border-radius:14px}.admin-tabs button{font:inherit;font-weight:700;font-size:1rem;padding:12px 18px;min-height:46px;border:1px solid transparent;border-radius:10px;background:transparent;color:#475569}.admin-tabs button[aria-selected=true]{background:#2454cf;color:#fff;box-shadow:0 3px 10px #153d9520}.admin-tabs button:hover{border-color:#9cb2e7}.grant-sort-row{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:20px 0 0}.grant-sort-row label{font-weight:700}.grant-sort-row select{width:auto;min-width:230px;margin:0}.admin-card[role=tabpanel]{scroll-margin-top:20px}@media(max-width:600px){.admin-tabs{gap:6px;padding:6px}.admin-tabs button{flex:1 1 calc(50% - 6px);padding:12px 8px}.grant-sort-row select{width:100%}}
.grant-row:has(.grant-program-editor){flex-wrap:wrap}.grant-program-editor{width:100%;flex-basis:100%;border-top:1px solid #d9e0ee;padding-top:14px}.grant-program-editor summary{cursor:pointer;font-weight:700;color:#2455b3;padding:8px 0}.grant-program-editor fieldset{border:1px solid #d9e0ee;border-radius:10px;margin:12px 0;padding:14px}.grant-program-editor label{display:flex;gap:8px;align-items:center;padding:8px 0;font-size:16px}.grant-program-editor input[type=checkbox]{width:20px;height:20px;flex-shrink:0}.grant-program-editor p{line-height:1.6}

.list-pager{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:16px 0}.list-pager span{flex:1;min-width:150px}.list-pager button:disabled{opacity:.45;cursor:default}

.grant-period-editor{margin-top:16px;padding:16px;border:1px solid #b9ccec;border-radius:12px;background:#f4f7ff}.grant-period-editor summary{cursor:pointer;color:#2855a4;font-weight:700}.grant-period-editor form{margin-top:12px}.grant-period-editor input{max-width:240px}.extension-preview{font-weight:700;color:#2855a4}
