:root { --ink:#1f2937; --muted:#6b7280; --line:#e5e7eb; --soft:#f8fafc; --accent:#2563eb; --accent-soft:#eff6ff; }
* { box-sizing:border-box; }
html, body { min-height:100%; }
body { margin:0; color:var(--ink); font-family:Inter, Pretendard, system-ui, -apple-system, sans-serif; }
.app-shell { min-height:100vh; display:grid; grid-template-columns:274px minmax(0,1fr); background:var(--soft); }
.sidebar { background:#fff; border-right:1px solid var(--line); padding:14px 12px; overflow-y:auto; }
.student-group { margin:4px 0 12px; }
.student-toggle { display:flex; align-items:center; width:100%; gap:8px; border:0; padding:9px 10px; color:var(--ink); background:transparent; text-align:left; cursor:pointer; font-weight:700; border-radius:7px; }
.student-toggle:hover { background:var(--soft); }
.student-toggle::before { content:'›'; color:var(--accent); font-size:18px; line-height:1; }
.student-pages { display:grid; gap:2px; padding-left:10px; }
.page-link { display:block; border:0; border-radius:6px; padding:8px 10px; color:#4b5563; background:transparent; font:14px/1.35 inherit; text-align:left; cursor:pointer; text-decoration:none; }
.page-link:hover, .page-link.active { background:var(--accent-soft); color:#1d4ed8; }
.page-kind { display:inline-block; margin-right:6px; color:#9ca3af; font-size:11px; }
.nav-loading { padding:12px 10px; color:var(--muted); font-size:13px; }
.content { min-width:0; padding:24px clamp(20px, 3vw, 48px); }
.empty-state { display:grid; min-height:calc(100vh - 48px); place-items:center; color:var(--muted); font-size:14px; }
.empty-state p { margin:0; }
.hidden { display:none; }
.viewer-head { display:flex; align-items:start; justify-content:space-between; gap:24px; padding:4px 0 22px; }
.eyebrow { margin:0 0 9px; color:var(--accent); font-weight:800; font-size:12px; letter-spacing:.12em; }
h1 { margin:0; letter-spacing:-.05em; font-size:28px; line-height:1.15; }
.viewer-head p:last-child { margin:8px 0 0; color:var(--muted); }
.open-link { flex:0 0 auto; margin-top:8px; color:var(--accent); font-weight:700; font-size:14px; text-decoration:none; }
#page-frame { width:100%; height:calc(100vh - 150px); min-height:580px; border:1px solid var(--line); border-radius:10px; background:#fff; box-shadow:0 8px 24px rgb(15 23 42 / .05); }
.login-page { max-width:470px; margin:12vh auto; padding:32px; }
.login-page > p:not(.eyebrow) { color:var(--muted); }
.login-page .login-form { display:grid; gap:10px; margin:28px 0 20px; }
.login-page button { border:0; border-radius:8px; padding:12px; color:#fff; background:var(--accent); font:inherit; font-weight:800; cursor:pointer; }
.login-page #message { min-height:1.5em; color:var(--muted); font-size:14px; }
.login-page a { color:var(--accent); font-size:14px; text-decoration:none; }
.guide-fab { position:fixed; right:24px; bottom:24px; z-index:10; border:0; border-radius:999px; padding:13px 18px; color:#fff; background:#1d4ed8; box-shadow:0 10px 25px rgb(29 78 216 / .28); font:700 14px/1 Inter, Pretendard, sans-serif; cursor:pointer; }
.guide-fab:hover { background:#1e40af; transform:translateY(-1px); }
.portal-guide { width:min(760px, calc(100vw - 32px)); max-height:min(780px, calc(100vh - 32px)); padding:0; border:0; border-radius:16px; color:var(--ink); box-shadow:0 24px 80px rgb(15 23 42 / .28); }
.portal-guide::backdrop { background:rgb(15 23 42 / .48); }
.guide-head { position:sticky; top:0; z-index:1; display:flex; align-items:start; justify-content:space-between; gap:24px; padding:26px 28px 20px; border-bottom:1px solid var(--line); background:#fff; }
.guide-head h2 { margin:0; letter-spacing:-.04em; font-size:24px; }
.guide-close { display:grid; width:34px; height:34px; place-items:center; border:0; border-radius:8px; color:var(--muted); background:var(--soft); font-size:25px; line-height:1; cursor:pointer; }
.guide-body { padding:8px 28px 28px; }
.guide-body section { padding:20px 0; border-bottom:1px solid var(--line); }
.guide-body h3 { margin:0 0 10px; font-size:17px; letter-spacing:-.02em; }
.guide-body p, .guide-body li, .guide-body dd { color:#4b5563; font-size:14px; line-height:1.75; }
.guide-body ol, .guide-body ul { margin:0; padding-left:22px; }
.guide-body li + li { margin-top:7px; }
.guide-body code { display:block; width:fit-content; max-width:100%; margin:7px 0; padding:8px 10px; overflow-x:auto; border-radius:7px; color:#1e3a8a; background:#eff6ff; font:12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; white-space:pre-wrap; }
.guide-body dl { display:grid; grid-template-columns:110px 1fr; gap:8px 14px; margin:0; }
.guide-body dt { font-weight:800; font-size:14px; }
.guide-body dd { margin:0; }
.guide-more { margin:22px 0 0; }
.guide-more a { color:var(--accent); font-weight:700; }
@media (max-width:800px) { .app-shell { grid-template-columns:1fr; } .sidebar { border-right:0; border-bottom:1px solid var(--line); max-height:42vh; } .content { padding:20px 16px; } .viewer-head { display:block; } .open-link { display:inline-block; margin-top:16px; } .guide-fab { right:16px; bottom:16px; } .guide-head, .guide-body { padding-left:20px; padding-right:20px; } .guide-body dl { grid-template-columns:1fr; gap:2px; } }
