:root {
  color-scheme: light;
  --ink: #18241e;
  --muted: #67736c;
  --paper: #f4f3ed;
  --card: #fffefa;
  --line: #d9ddd7;
  --green: #154e39;
  --green-2: #236b50;
  --green-soft: #e8f0eb;
  --gold: #b98b3d;
  font-family: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: linear-gradient(140deg, #edf2ed 0%, var(--paper) 48%, #eee8dd 100%); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1440px, calc(100% - 32px)); margin: 0 auto; padding: 42px 0 64px; }
.masthead { display: flex; align-items: flex-end; justify-content: space-between; gap: 42px; padding: 0 6px 26px; border-bottom: 1px solid rgba(21, 78, 57, .18); }
.eyebrow, .section-label { margin: 0 0 8px; color: var(--green-2); font-size: 11px; font-weight: 850; letter-spacing: .16em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-family: Georgia, "Noto Serif KR", serif; font-size: clamp(34px, 5vw, 58px); line-height: 1; }
h2 { margin-bottom: 6px; font-size: 21px; }
.intro { max-width: 580px; margin-bottom: 0; color: var(--muted); line-height: 1.7; }
.login-panel { max-width: 760px; margin: 64px auto 0; padding: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 254, 250, .95); box-shadow: 0 22px 55px rgba(33, 52, 42, .1); }
.login-copy p:last-child { margin-bottom: 0; color: var(--muted); line-height: 1.65; }
.login-form { display: grid; gap: 8px; }
label { color: #34463c; font-size: 13px; font-weight: 800; }
input, select { width: 100%; min-height: 44px; border: 1px solid #bac5be; border-radius: 9px; background: #fff; color: var(--ink); padding: 10px 12px; outline: none; }
input:focus, select:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(35, 107, 80, .13); }
.primary, .secondary { min-height: 42px; border-radius: 9px; padding: 9px 16px; font-weight: 850; }
.primary { border: 1px solid var(--green); background: var(--green); color: #fff; }
.primary:hover { background: #0f3c2b; }
.secondary { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.message { grid-column: 1 / -1; min-height: 1.3em; margin: 0; color: #9d3f27; font-size: 13px; }
.session-bar { padding: 16px 4px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; }
.search-panel { padding: 24px; border: 1px solid var(--line); border-radius: 15px; background: var(--card); }
.search-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 18px; }
.search-heading h2 { margin-bottom: 0; }
.search-note { margin: 0; color: var(--muted); font-size: 13px; }
.search-form { display: grid; grid-template-columns: minmax(240px, 1fr) 230px auto; align-items: end; gap: 10px; }
.field { display: grid; gap: 7px; }
.library-layout { margin-top: 16px; display: grid; grid-template-columns: 390px minmax(0, 1fr); gap: 16px; }
.results-panel, .viewer-panel { border: 1px solid var(--line); border-radius: 15px; background: var(--card); overflow: hidden; }
.results-heading, .viewer-heading { min-height: 78px; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.results-heading h2, .viewer-heading h2 { margin: 0; }
.results-heading span { color: var(--muted); font-size: 13px; }
.results { max-height: 690px; overflow: auto; padding: 10px; display: grid; gap: 8px; }
.result-button { width: 100%; border: 1px solid transparent; border-radius: 11px; background: #f8f8f4; color: var(--ink); padding: 14px; text-align: left; }
.result-button:hover, .result-button:focus, .result-button.active { border-color: #93aa9d; background: var(--green-soft); }
.result-type { display: inline-block; margin-bottom: 7px; color: var(--green-2); font-size: 11px; font-weight: 850; letter-spacing: .05em; }
.result-title { display: block; font-weight: 850; line-height: 1.45; }
.result-meta, .result-preview { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.result-preview { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.empty { margin: 0; padding: 20px 10px; color: var(--muted); }
.viewer-panel { min-height: 770px; }
.viewer-heading p:last-child { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.viewer-placeholder { min-height: 680px; display: grid; place-content: center; gap: 7px; color: var(--muted); text-align: center; }
.viewer-placeholder strong { color: var(--green); }
#documentFrame { width: 100%; height: 690px; border: 0; background: #fff; }
@media (max-width: 980px) { .library-layout { grid-template-columns: 1fr; } .results { max-height: 360px; } .viewer-panel { min-height: 650px; } #documentFrame { height: 580px; } }
@media (max-width: 720px) { .shell { width: min(100% - 18px, 1440px); padding-top: 24px; } .masthead, .search-heading { align-items: flex-start; flex-direction: column; gap: 16px; } .login-panel, .search-form { grid-template-columns: 1fr; } .login-panel { margin-top: 34px; padding: 22px; } .search-button { width: 100%; } }
