:root{font-family:-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Noto Sans KR",sans-serif;color:#233b37;background:#f7f9fa;font-size:16px;--green:#126a58;--muted:#697b77;--line:#e0e8e5}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.5;cursor:wait}button:focus-visible,a:focus-visible{outline:3px solid #49a690;outline-offset:3px}input:focus,textarea:focus,select:focus{outline:2px solid #71b5a5;outline-offset:1px}button{border:0;background:none;color:inherit}a{color:var(--green)}[hidden]{display:none!important}.primary,.secondary{border-radius:9px;padding:12px 19px;font-weight:600;white-space:nowrap}.primary{background:var(--green);color:white}.primary:hover{background:#0a5647}.secondary{background:white;border:1px solid #cddbd6}.secondary:hover{background:#f3f8f6}.text-btn{padding:0;color:var(--green);font-size:.875rem;text-align:left}.icon-btn{padding:7px;font-size:1.25rem;border-radius:6px}.icon-btn:hover{background:#e9f1ee}.logo{background:var(--green);color:white;font-size:1.55rem;font-weight:750;letter-spacing:-2px;border-radius:11px;width:39px;height:39px;display:inline-flex;align-items:center;justify-content:center;padding-right:4px}.sidebar{position:fixed;inset:0 auto 0 0;width:240px;background:white;border-right:1px solid var(--line);padding:33px 22px;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:10px;color:#173c32;text-decoration:none;font-size:1.35rem;font-weight:750;position:relative;margin-bottom:44px}.brand-sub{position:absolute;left:49px;top:32px;font-size:.6rem;letter-spacing:1.5px;color:#82938e}.nav-label{font-size:.8rem;color:#7b8985;margin:20px 12px 12px}nav button{display:flex;gap:12px;width:100%;text-align:left;align-items:center;padding:12px;border-radius:8px;margin-bottom:4px;color:#667b74;font-size:.94rem}nav button span{flex:1}nav button b{font-size:.8rem;font-weight:500}nav button.active{background:#e9f4ef;color:var(--green);font-weight:650}nav button:hover{background:#f1f6f3}.subject-heading{display:flex;align-items:center;justify-content:space-between;margin-top:14px}.subject-heading .nav-label{margin-top:12px}#subjects{overflow:auto}.subject-mark{height:8px;width:8px;background:#a1bcb3;border-radius:2px}.server-note{margin-top:auto;background:#f4f8f6;padding:15px;border-radius:10px;font-size:.8rem}.server-note strong{font-size:.85rem}.server-note p{color:var(--muted);line-height:1.7}.server-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#319b72;margin-right:7px}.logout{margin:20px 12px 0;color:#77867f}main{margin-left:240px;max-width:1600px;padding:0 48px}header{height:83px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);font-size:.8rem}.breadcrumb{color:#7c8c87}.breadcrumb span{margin-left:14px}.private-label{border:1px solid var(--line);padding:6px 10px;border-radius:20px;color:#687e73;background:white}.page-title{display:flex;justify-content:space-between;align-items:center;padding:38px 0 27px}.eyebrow{font-size:.72rem;letter-spacing:1.7px;font-weight:650;color:#438573;margin:0 0 12px}h1{font-size:2rem;letter-spacing:-1.1px;margin:0 0 12px;font-weight:730}.page-title p:last-child{color:var(--muted);margin:0;font-size:.95rem}.dropzone{text-align:center;border:1.5px dashed #b3cdc3;background:#f0f7f3;border-radius:14px;padding:30px 16px 24px;transition:.15s}.dropzone.dragging{background:#d9ede2;border-color:var(--green)}.upload-symbol{display:flex;align-items:center;justify-content:center;font-size:1.7rem;width:46px;height:46px;color:var(--green);background:white;border:1px solid #d9e8df;border-radius:13px;margin:0 auto 14px}.dropzone h2{font-size:1.15rem;margin:0 0 8px}.dropzone p{font-size:.9rem;color:var(--muted);margin:0 0 20px}.upload-actions{display:flex;justify-content:center;gap:9px;margin-bottom:17px}.dropzone small{font-size:.75rem;color:#789086}.upload-status{background:#fff;border:1px solid var(--line);border-radius:9px;padding:15px;margin-top:12px;font-size:.85rem;white-space:pre-line;line-height:1.8}.library{padding-top:32px}.library-tools{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:20px}h2{font-size:1.1rem}#list-title{margin:0 0 8px}#visible-count{font-size:.9rem;color:var(--green);margin-left:7px}#list-description{font-size:.8rem;color:var(--muted);margin:0}.filters{display:flex;gap:8px}.search{display:flex;align-items:center;background:white;border:1px solid var(--line);border-radius:8px;padding-left:12px}.search span{font-size:1.3rem;color:#70857b}.search input{border:0;background:none;width:210px;padding:10px;font-size:.8rem}.filters select{max-width:130px;font-size:.8rem}select{appearance:none;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4 3 3 3-3' fill='none' stroke='%23697b77' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center;padding-right:32px!important}.items{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.item{position:relative;background:white;border:1px solid var(--line);border-radius:12px;padding:20px;text-align:left;min-height:185px;transition:.15s}.item:hover{border-color:#91b8a8;box-shadow:0 5px 20px #143e2b08;transform:translateY(-2px)}.item-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:19px}.file-icon{font-size:.8rem;font-weight:700;padding:9px 8px;background:#eff3fa;color:#58749a;border-radius:8px}.file-icon.image{color:#94764b;background:#faf4e8}.file-icon.memo{color:#80709f;background:#f3effa}.badge{font-size:.72rem;border-radius:5px;padding:4px 7px;background:#fff5df;color:#977333}.badge.ready{background:#eaf5ee;color:#408160}.item h3{font-size:.96rem;margin:0 0 10px;overflow-wrap:anywhere;line-height:1.5}.item-description{color:var(--muted);font-size:.8rem;margin:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.item-bottom{display:flex;justify-content:space-between;gap:8px;margin-top:22px;color:#8a9792;font-size:.73rem}.subject-chip{color:#5f8070}.empty{text-align:center;background:white;border:1px solid var(--line);border-radius:12px;padding:43px 20px}.empty-icon{font-size:2rem;color:#a7bcb0}.empty h3{font-size:1rem;font-weight:600}.empty p{color:#82928a;font-size:.85rem;line-height:1.9}footer{text-align:center;color:#98a59d;font-size:.75rem;padding:36px 0}dialog{border:1px solid var(--line);border-radius:16px;padding:26px;width:min(1000px,94vw);max-height:92dvh;color:inherit;box-shadow:0 20px 100px #152f3033}dialog::backdrop{background:#16362d66;backdrop-filter:blur(3px)}.dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:24px}.dialog-head h2{margin:0;font-size:1.3rem;letter-spacing:-.5px}.dialog-head .eyebrow{margin-bottom:8px}.editor-grid{display:grid;grid-template-columns:1fr 1fr;gap:26px}.preview{background:#f1f5f3;border:1px solid var(--line);border-radius:10px;min-height:300px;max-height:60dvh;overflow:auto;display:flex;align-items:center;justify-content:center;padding:15px}.preview img{max-width:100%;max-height:55dvh;object-fit:contain}.preview iframe{width:100%;height:55dvh;border:0}.preview pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:.85rem;align-self:flex-start;line-height:1.8}.preview p{font-size:.9rem;color:var(--muted);text-align:center;line-height:1.9}.edit-fields{display:flex;flex-direction:column;gap:15px}label{display:block;font-size:.85rem;font-weight:600}input:not([type=checkbox]),textarea,select{width:100%;border:1px solid #d6e2db;border-radius:7px;background-color:white;padding:11px 12px;color:inherit}label input,label select,label textarea{margin-top:7px;font-weight:400}textarea{resize:vertical;line-height:1.6}.field-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.help{font-size:.78rem;line-height:1.8;color:#819087;margin:0}.check{display:flex;align-items:center;gap:8px;font-weight:500;color:var(--green)}.check input{accent-color:var(--green);width:17px;height:17px}.dialog-foot{display:flex;justify-content:space-between;align-items:center;margin-top:26px;padding-top:18px;border-top:1px solid var(--line)}.dialog-foot>div{display:flex;gap:8px}.danger{font-size:.85rem;color:#b05b55}.toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);padding:15px 24px;border-radius:10px;background:#21493e;color:white;box-shadow:0 4px 30px #0002;z-index:20;max-width:90vw;font-size:.9rem}#connection-dialog{max-width:480px;line-height:1.9}#login{min-height:100dvh;display:grid;place-items:center;background:radial-gradient(ellipse at 30% 10%,#dcefe5,transparent 60%),#f6f9f7;padding:25px}.login-card{width:min(420px,100%);background:#fff;border:1px solid var(--line);border-radius:20px;padding:38px;box-shadow:0 12px 70px #244c3910}.login-card .logo{margin-bottom:28px}.login-card h1{font-size:1.8rem}.login-card>p:not(.eyebrow){color:var(--muted);line-height:1.8;font-size:.9rem}.login-card form{margin:25px 0}.login-card form button{width:100%;margin-top:14px}.login-card small{display:block;color:#899a90;font-size:.75rem;line-height:1.8}#login-error{font-size:.85rem;color:#b35b51}
@media(min-width:1450px){main{padding-left:70px;padding-right:70px}}@media(max-width:1150px){main{padding:0 28px}.sidebar{width:210px}main{margin-left:210px}.items{grid-template-columns:repeat(2,minmax(0,1fr))}.library-tools{align-items:flex-start;flex-direction:column}.filters{width:100%}.search{flex:1}.search input{width:100%}}
@media(max-width:700px){.sidebar{position:static;width:auto;padding:18px 20px 10px;display:block;border-right:0;border-bottom:1px solid var(--line)}.brand{margin-bottom:20px;width:160px}.brand-sub{font-size:.55rem}.sidebar>.nav-label,.subject-heading,.server-note,.logout{display:none}#views{display:flex;gap:4px}nav button{font-size:.8rem;gap:7px;padding:10px 8px;white-space:nowrap;margin:0}#subjects{display:flex;margin-top:10px;gap:6px;overflow:auto}#subjects button{width:auto;min-width:max-content;padding:8px 12px;border:1px solid var(--line);border-radius:20px}.subject-mark{display:none}main{margin:0;padding:0 20px}header{height:48px}.breadcrumb{font-size:.72rem}.private-label{font-size:.7rem}.page-title{padding:27px 0 22px;align-items:flex-start;gap:10px}.page-title h1{font-size:1.45rem}.page-title .eyebrow{font-size:.58rem;letter-spacing:1.2px}.page-title p:last-child{font-size:.8rem}.page-title>.secondary{font-size:.75rem;padding:10px;margin-top:24px}.dropzone{padding:24px 12px 20px}.dropzone h2{font-size:1.03rem}.dropzone p{font-size:.78rem}.dropzone small{font-size:.68rem}.library{padding-top:26px}.items{gap:12px}.item{padding:14px;min-height:180px}.item h3{font-size:.85rem}.item-top{margin-bottom:14px}.item-bottom{font-size:.65rem;flex-wrap:wrap}.badge{font-size:.65rem}.file-icon{font-size:.7rem}.filters{gap:6px}.filters select{width:112px}.library-tools{gap:15px}dialog{padding:20px}.editor-grid{grid-template-columns:1fr}.preview{min-height:130px;max-height:28dvh}.preview iframe{height:25dvh}.preview img{max-height:25dvh}.dialog-head h2{font-size:1.1rem}.dialog-foot{gap:8px}.dialog-foot button{font-size:.8rem;padding:10px 12px}.login-card{padding:28px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}
.preview{flex-direction:column;gap:14px}.preview a{font-size:.8rem;color:#126a58}.search input{border:0;background:none;padding:10px}.icon-btn{border:0;background:transparent;color:#647e70;cursor:pointer;font-size:1.1rem}.text-btn{border:0;background:none;color:#438573;cursor:pointer;padding:0}.primary,.secondary{border-radius:8px;padding:11px 18px;cursor:pointer;font:inherit;font-size:.85rem;font-weight:600}.primary{background:#126a58;color:white;border:1px solid #126a58}.primary:hover{background:#0c5545}.secondary{background:#fff;color:#3c5e4d;border:1px solid #d4e2d9}button{font-family:inherit;cursor:pointer}button:disabled{opacity:.55;cursor:wait}button:focus-visible,a:focus-visible{outline:3px solid #71bca3;outline-offset:3px}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Noto Sans KR",sans-serif;background:#f8faf9;color:#233f33}*{box-sizing:border-box}[hidden]{display:none!important}a{color:inherit;text-decoration:none}
.logo{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;flex-shrink:0;border-radius:11px;background:#126a58;color:#fff;font-size:1.65rem;font-weight:750;letter-spacing:-2px;padding-right:2px}.brand{font-size:1.4rem;font-weight:750;gap:10px;letter-spacing:-.6px}nav button{border:0;background:transparent}nav button.active{background:#e9f4ef}nav button:hover{background:#f1f6f3}.item{font-family:inherit}#login .logo{width:48px;height:48px;font-size:2rem}.items button.item{color:inherit}
.harness-banner{margin-top:14px;padding:14px 18px;border:1px solid #d6e4dc;background:#fff;border-radius:10px;font-size:.82rem;color:#537265;line-height:1.7}.analysis-state{font-size:.75rem;color:#537c69;margin:0 0 10px}.analysis-panel{margin-top:24px;padding:20px;background:#f4f8f5;border:1px solid #dce8df;border-radius:10px;font-size:.9rem;line-height:1.8}.analysis-heading{display:flex;justify-content:space-between;gap:12px;align-items:center}.analysis-heading h3{font-size:1rem;margin:0}.analysis-panel h4{margin-bottom:10px}.analysis-panel article{padding:12px 0;border-bottom:1px solid #d9e5dc}.analysis-panel blockquote{margin:8px 0;padding:8px 14px;border-left:3px solid #8dbca5;color:#61786b;white-space:pre-wrap}.analysis-panel a{color:#126a58;text-decoration:underline;font-size:.8rem}.analysis-panel details{margin-top:18px}.analysis-panel summary{cursor:pointer}.analysis-panel li{margin-bottom:8px}.toast button{margin-left:16px;background:white;color:#126a58;border:0;border-radius:5px;padding:5px 10px}.preview{position:relative}#subjects{max-height:40dvh;overflow:auto}

.study-hub{margin:24px 0;padding:24px;border:1px solid #cdded6;border-radius:18px;background:#f5faf7}.study-heading,.study-card{display:flex;justify-content:space-between;align-items:center;gap:16px}.study-heading h2{margin:4px 0}.study-card{padding:16px 0;border-top:1px solid #dae5df}.study-card h3{margin:10px 0}.study-card p{margin:8px 0}.study-card button{flex-shrink:0}.study-text{white-space:pre-wrap}.study-ratings{display:flex;gap:8px;flex-wrap:wrap}#study-dialog{max-width:720px;width:92vw}#study-dialog h3{white-space:pre-wrap}#study-dialog textarea,#study-profile-dialog textarea,#study-profile-dialog input{display:block;width:100%;margin:8px 0 18px}#study-profile-dialog{max-width:560px;width:92vw}@media(max-width:640px){.study-heading,.study-card{align-items:stretch;flex-direction:column}.study-hub{padding:18px}}

.exam-plan-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px;margin:16px 0}.exam-plan-grid article,.exam-day{padding:12px;border:1px solid #d5e2db;border-radius:10px}.exam-day{margin:12px 0}#exam-plan-dialog{max-width:850px;width:94vw}#exam-plan-subjects fieldset{border:1px solid #cdded6;border-radius:10px;padding:14px;margin:16px 0}#exam-plan-dialog input,#exam-plan-dialog select,#exam-plan-dialog textarea{display:block;width:100%;margin:8px 0 12px}

#access-dialog{max-width:480px;width:92vw}#access-dialog input{display:block;width:100%;margin:8px 0 18px}#access-error{color:#a83232}

#tutor-dialog{width:94vw;max-width:820px}#tutor-dialog textarea{width:100%;display:block;margin:10px 0}#tutor-messages{max-height:48vh;overflow:auto;padding:8px}.tutor-message{padding:14px;margin:10px 0;border-radius:12px;background:#f1f5f2}.tutor-message.user{background:#e0efe9;margin-left:25px}.tutor-message p{white-space:pre-wrap;overflow-wrap:anywhere}#tutor-status{font-size:14px;color:#42675a}

.study-card-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;flex-shrink:0}
.study-print-bar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.choice-list{display:flex;flex-direction:column;gap:8px;margin:14px 0 18px}
.choice-option{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border:1px solid #cddbd6;border-radius:10px;background:#fff;cursor:pointer;line-height:1.55}
.choice-option:hover{background:#f3f8f6;border-color:#71b5a5}
.choice-option input{margin-top:3px;flex-shrink:0;accent-color:#126a58}
.choice-option.correct{background:#e8f6ef;border-color:#126a58;color:#0c4d3f;font-weight:600}
.choice-option.wrong{background:#fdeeee;border-color:#c94a4a;color:#8e2525}
.grade-badge{display:inline-block;padding:5px 11px;border-radius:999px;font-size:.85rem;font-weight:650;margin:6px 0 10px}
.grade-badge.ok{background:#e6f5ed;color:#0e5b49}
.grade-badge.bad{background:#fdecec;color:#a83232}
.print-sheet{display:none}
@media print{
 @page{size:A4;margin:14mm}
 body{background:#fff!important;color:#111!important}
 body>*:not(#print-sheet){display:none!important}
 #print-sheet{display:block!important;font-size:10.5pt;line-height:1.6}
 .print-head{border-bottom:2px solid #222;padding-bottom:10px;margin-bottom:16px}
 .print-head h1{font-size:16pt;margin:0 0 4px;letter-spacing:-.4px}
 .print-meta{font-size:9.5pt;color:#444;margin:0}
 .print-box{display:flex;justify-content:space-between;font-size:9.5pt;color:#333;margin-top:8px;padding-top:8px;border-top:1px dashed #bbb}
 .print-q{break-inside:avoid;margin-bottom:16px;padding-bottom:12px;border-bottom:1px solid #e0e0e0}
 .print-q-title{font-weight:700;margin:0 0 6px;white-space:pre-wrap}
 .print-choices{list-style:none;padding:0;margin:6px 0 0}
 .print-choices li{margin:4px 0;padding-left:6px}
 .print-blank{height:44px;border:1px dashed #bbb;border-radius:6px;margin-top:8px}
 .print-ans{margin:6px 0 4px;font-weight:700;color:#0d5444;white-space:pre-wrap}
 .print-exp{margin:4px 0;white-space:pre-wrap;color:#222}
 .print-quote{margin:6px 0 0;padding:6px 10px;border-left:3px solid #999;color:#555;font-size:9pt;white-space:pre-wrap}
}
