:root {
  --espresso:#452715; --espresso-2:#5a3620; --sage:#b9c58b; --sage-soft:#eef1e0;
  --bg:#f6f1e7; --card:#fffdf8; --ink:#2b1a0f; --sub:#7d6b5c; --line:#ebe2d3;
  --accent:#452715; --warn:#b4452f; --ok:#5f7a2e; --soft:#f1e9dc;
  --serif: "Nanum Myeongjo", "AppleMyungjo", "Noto Serif KR", Georgia, serif;
}
* { box-sizing:border-box; }
body { margin:0; font-family:-apple-system, "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; background:var(--bg); color:var(--ink); font-size:14px; display:flex; min-height:100vh; }
aside { width:224px; flex:none; background:var(--espresso); color:#f3e9d6; display:flex; flex-direction:column; padding:22px 14px; position:sticky; top:0; height:100vh; }
aside[hidden] { display:none; }
.brand { display:flex; flex-direction:column; align-items:center; gap:8px; text-decoration:none; color:#f3e9d6; padding:4px 0 22px; border-bottom:1px solid rgba(255,255,255,.08); margin-bottom:14px; }
.brand img { width:92px; filter:drop-shadow(0 4px 10px rgba(0,0,0,.25)); }
.brand span { font-family:var(--serif); font-size:15px; letter-spacing:.2em; color:var(--sage); }
nav { display:flex; flex-direction:column; gap:2px; flex:1; }
nav a { padding:10px 14px; border-radius:10px; color:#d9cbb5; text-decoration:none; font-size:14px; }
nav a:hover { background:rgba(255,255,255,.05); color:#fff; }
nav a.on { background:var(--sage); color:var(--espresso); font-weight:700; }
#who { font-size:12px; color:#bfae96; line-height:1.8; border-top:1px solid rgba(255,255,255,.08); padding-top:12px; }
#who a { color:var(--sage); }
#who .pill { background:rgba(255,255,255,.1); color:#f3e9d6; }
#who .pill.warn { background:#7a3a24; color:#ffe3d6; }
main { flex:1; max-width:1180px; margin:0 auto; padding:32px 36px; min-width:0; }
h1 { font-family:var(--serif); font-size:26px; font-weight:800; margin:0 0 20px; color:var(--espresso); letter-spacing:-.01em; }
h2 { font-size:15px; margin:22px 0 10px; color:var(--espresso); }
h3 { font-size:14px; color:var(--espresso); }
.card { background:var(--card); border:1px solid var(--line); border-radius:16px; padding:18px 20px; margin-bottom:16px; box-shadow:0 1px 2px rgba(69,39,21,.04), 0 6px 20px rgba(69,39,21,.04); }
.grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:14px; margin-bottom:16px; }
.stat { position:relative; overflow:hidden; }
.stat::before { content:""; position:absolute; left:0; top:0; bottom:0; width:4px; background:var(--sage); }
.stat .label { color:var(--sub); font-size:12px; letter-spacing:.02em; }
.stat .value { font-size:24px; font-weight:800; margin-top:6px; font-variant-numeric:tabular-nums; color:var(--espresso); }
.stat .note { color:var(--sub); font-size:12px; margin-top:4px; }
table { width:100%; border-collapse:collapse; font-variant-numeric:tabular-nums; }
th, td { text-align:left; padding:10px 10px; border-bottom:1px solid var(--line); vertical-align:middle; }
th { color:var(--sub); font-weight:600; font-size:12px; background:transparent; border-bottom:1.5px solid var(--line); }
tr:hover td { background:#fbf6ec; }
td.n, th.n { text-align:right; }
.scroll { overflow-x:auto; }
button, .btn { font:inherit; padding:7px 14px; border-radius:999px; border:1px solid var(--line); background:var(--card); cursor:pointer; color:var(--ink); text-decoration:none; display:inline-block; }
button:hover, .btn:hover { border-color:var(--espresso); }
button.primary { background:var(--espresso); color:#fbf3e4; border-color:var(--espresso); }
button.primary:hover { background:var(--espresso-2); }
button.danger { color:var(--warn); }
button.sm, .btn.sm { padding:4px 10px; font-size:12px; }
button:disabled { opacity:.45; cursor:default; }
input, select, textarea { font:inherit; padding:8px 10px; border:1px solid var(--line); border-radius:10px; background:#fff; color:var(--ink); }
input:focus, select:focus, textarea:focus { outline:none; border-color:var(--sage); box-shadow:0 0 0 3px var(--sage-soft); }
textarea { width:100%; min-height:240px; font-family:ui-monospace, Menlo, monospace; font-size:13px; }
label { display:block; margin:10px 0 4px; color:var(--sub); font-size:12px; }
.row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.tabs { display:inline-flex; gap:4px; background:var(--soft); padding:4px; border-radius:999px; margin-bottom:20px; flex-wrap:wrap; }
.tabs a { padding:7px 16px; color:var(--sub); text-decoration:none; border-radius:999px; font-size:13px; }
.tabs a.on { background:var(--card); color:var(--espresso); font-weight:700; box-shadow:0 1px 3px rgba(69,39,21,.12); }
.pill { display:inline-block; padding:2px 9px; border-radius:99px; font-size:11.5px; background:var(--soft); color:var(--sub); font-weight:600; }
.pill.warn { background:#f8e4dc; color:var(--warn); }
.pill.ok { background:var(--sage-soft); color:var(--ok); }
.muted { color:var(--sub); }
.low td { background:#fdf1ec; }
.auth-wrap { display:flex; align-items:center; justify-content:center; min-height:calc(100vh - 64px); }
.auth { width:400px; text-align:left; padding:34px 32px; }
.auth .logo-big { display:block; width:120px; margin:0 auto 10px; }
.auth h1 { text-align:center; font-size:20px; margin-bottom:18px; }
.auth .tabs { display:flex; justify-content:center; }
.auth input { width:100%; }
.auth .actions button { width:100%; padding:10px; }
dialog { border:none; border-radius:18px; padding:24px 26px; min-width:360px; max-width:720px; width:90vw; background:var(--card); color:var(--ink); }
dialog::backdrop { background:rgba(43,26,15,.35); }
dialog input, dialog select { width:100%; }
dialog h2 { font-family:var(--serif); font-size:20px; }
.actions { display:flex; gap:8px; justify-content:flex-end; margin-top:18px; }
#toast { position:fixed; bottom:24px; left:50%; transform:translateX(-50%); background:var(--espresso); color:#fbf3e4; padding:11px 18px; border-radius:999px; opacity:0; transition:opacity .2s; pointer-events:none; max-width:80vw; }
#toast.show { opacity:1; }
.md { line-height:1.7; }
.md table { margin:8px 0; }
.md h1, .md h2, .md h3 { margin:18px 0 8px; }
.md code { background:var(--soft); padding:1px 5px; border-radius:4px; }
.split { display:grid; grid-template-columns:300px 1fr; gap:16px; }
.list a { display:block; padding:10px 12px; border-radius:10px; color:inherit; text-decoration:none; margin-bottom:2px; }
.list a.on { background:var(--sage-soft); }
.list a:hover { background:var(--soft); }
.help { background:var(--sage-soft); border:none; padding:12px 14px; border-radius:12px; color:#4d5a2a; font-size:13px; line-height:1.65; margin-bottom:14px; }
hr { border:none; border-top:1px solid var(--line); }
@media (max-width:900px){ body { flex-direction:column; } aside { width:100%; height:auto; position:static; flex-direction:row; align-items:center; flex-wrap:wrap; padding:10px 14px; gap:10px; } .brand { flex-direction:row; border:none; margin:0; padding:0; } .brand img { width:40px; } nav { flex-direction:row; flex-wrap:wrap; } #who { border:none; padding:0; } .split { grid-template-columns:1fr; } main { padding:18px; } }
a { color:var(--espresso); } .muted a, .card a { text-underline-offset:3px; }
