@font-face { font-family: "Paperozi"; font-weight: 300; font-display: swap; src: url("/static/Paperlogy-3Light.woff2") format("woff2"); }
@font-face { font-family: "Paperozi"; font-weight: 400; font-display: swap; src: url("/static/Paperlogy-4Regular.woff2") format("woff2"); }
@font-face { font-family: "Paperozi"; font-weight: 500; font-display: swap; src: url("/static/Paperlogy-5Medium.woff2") format("woff2"); }
@font-face { font-family: "Paperozi"; font-weight: 600; font-display: swap; src: url("/static/Paperlogy-6SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Paperozi"; font-weight: 700; font-display: swap; src: url("/static/Paperlogy-7Bold.woff2") format("woff2"); }
/* 작업공간(관리) 화면. 어두운 사이드바 대시보드 (사용자가 준 인보이스 화면 레퍼런스). */
:root {
  --bg: #0b0b0d; --panel: #111114; --panel-2: #16161a; --hover: #1b1b20; --active: #222228;
  --line: #24242a; --line-2: #2e2e35; --fg: #ececf0; --fg-2: #c4c4cc; --muted: #80808a; --dim: #5c5c66;
  --blue: #8fa3ff; --blue-bg: rgba(143,163,255,.12); --orange: #f0875a; --orange-bg: rgba(240,135,90,.12);
  --amber: #e8b45a; --amber-bg: rgba(232,180,90,.12); --green: #6fcf97; --gray-bg: rgba(255,255,255,.06);
  --radius: 8px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 13px/1.45 "Paperozi", "Pretendard", system-ui, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 15px; height: 15px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

/* 공통 컨트롤 */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--panel-2); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--hover); border-color: #3a3a42; }
.btn.primary { background: #ececf0; color: #111; border-color: #ececf0; font-weight: 500; }
.btn.primary:hover { background: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--fg); background: var(--hover); }
.btn.danger:hover { color: var(--orange); }
.btn.sm { height: 26px; padding: 0 8px; font-size: 12px; }
.btn.arrow { justify-content: center; width: 30px; padding: 0; color: var(--fg); }
.btn.arrow svg { width: 18px; height: 18px; stroke-width: 2.4; }
kbd { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border: 1px solid var(--line-2); border-radius: 4px; font: 11px/1 ui-monospace, monospace; color: var(--muted); background: rgba(255,255,255,.03); }
.btn.primary kbd { border-color: rgba(0,0,0,.2); color: #555; background: transparent; }
.input, select.input, textarea.input { height: 32px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--panel-2); outline: none; }
textarea.input { height: auto; min-height: 72px; padding: 8px 10px; resize: vertical; }
.input:focus { border-color: #4a4a55; box-shadow: 0 0 0 3px rgba(143,163,255,.12); }
input[type="checkbox"] { accent-color: #ececf0; width: 15px; height: 15px; margin: 0; cursor: pointer; }
.error { color: var(--orange); }

/* 로그인 */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px; background: radial-gradient(800px 300px at 50% -10%, rgba(120,140,255,.18), transparent 70%), var(--bg); }
.login-card { width: min(360px, 100%); padding: 28px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.login-card h1 { margin: 16px 0 4px; font-size: 18px; font-weight: 600; }
.login-card p { margin: 0 0 20px; color: var(--muted); }
.login-card form { display: grid; gap: 10px; }
.login-card .btn { justify-content: center; height: 34px; }
.login-card .google { display: block; margin-top: 12px; text-align: center; color: var(--muted); }
.login-card .google:hover { color: var(--fg); }

/* 레이아웃 */
.app { display: grid; grid-template-columns: 232px 1fr; height: 100vh; padding: 10px; gap: 0; }
.side { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px 4px; min-height: 0; overflow-y: auto; }
.ws { display: flex; align-items: center; gap: 9px; padding: 6px 8px; font-weight: 600; font-size: 14px; }
.badge-k { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; background: #ececf0; color: #111; font-size: 12px; font-weight: 700; }
.login-card .badge-k { width: 34px; height: 34px; border-radius: 8px; font-size: 16px; }
.ws .caret { margin-left: auto; color: var(--muted); }
.search { display: flex; align-items: center; gap: 8px; height: 32px; margin: 8px 0 10px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--fg); }
.nav-group { margin: 14px 8px 4px; font-size: 12px; color: var(--dim); }
.nav-item { display: flex; align-items: center; gap: 10px; height: 31px; padding: 0 8px; border-radius: 6px; color: var(--fg-2); cursor: pointer; }
.nav-item:hover { background: var(--hover); color: var(--fg); }
.nav-item.active { background: var(--active); color: var(--fg); }
.nav-item .count { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 4px; display: grid; place-items: center; font-size: 11px; background: var(--orange-bg); color: var(--orange); }
.nav-item .soon { margin-left: auto; font-size: 11px; color: var(--dim); }
.nav-item.disabled { color: var(--dim); cursor: default; }
.nav-item.disabled:hover { background: none; }
.side-foot { margin-top: auto; padding-top: 12px; display: grid; gap: 2px; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; }
.avatar { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #2a2a31; font-size: 11px; font-weight: 600; color: var(--fg-2); }
.me small { display: block; color: var(--muted); font-size: 11px; }

.main { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; box-shadow: 0 -1px 0 rgba(143,163,255,.25), 0 -20px 60px -30px rgba(120,140,255,.35); }
.bar { display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.bar h1 { margin: 0 auto 0 0; font-size: 15px; font-weight: 600; }
.menu-btn { display: none; }
.content { flex: 1; overflow-y: auto; }
.msg { margin: 0; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--orange-bg); }
.msg:empty { display: none; }

/* 요약 카드 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); border-bottom: 1px solid var(--line); }
.stat { padding: 18px 16px 16px; border-right: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,.015), transparent); }
.stat:last-child { border-right: 0; }
.stat .label { color: var(--muted); font-size: 12px; }
.stat .value { margin: 4px 0 2px; font-size: 26px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .value.warn { color: var(--orange); }
.stat .sub { color: var(--muted); font-size: 12px; }

/* 도구 줄 */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; }
.toolbar .grow { flex: 1; }
.seg { display: inline-flex; padding: 2px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); }
.seg button { height: 26px; padding: 0 12px; border: 0; border-radius: 5px; background: none; color: var(--muted); cursor: pointer; }
.seg button:hover { color: var(--fg); }
#task-filter-category { flex-wrap: wrap; }
#task-filter-category button { white-space: nowrap; }
.seg button.on { background: var(--active); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2); }

/* 표 */
.table { width: 100%; border-collapse: collapse; }
.table th { height: 34px; padding: 0 12px; text-align: left; font-weight: 400; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { height: 44px; padding: 6px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:hover td { background: rgba(255,255,255,.018); }
.table th:first-child, .table td:first-child { padding-left: 16px; }
.table th:last-child, .table td:last-child { padding-right: 16px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .muted, .muted { color: var(--muted); }
.table .title { font-weight: 500; color: var(--fg); }
.table .title.done { color: var(--muted); text-decoration: line-through; }
.table .sub { display: block; color: var(--muted); font-size: 12px; font-weight: 400; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table .actions { text-align: right; white-space: nowrap; opacity: .35; transition: opacity .15s; }
.table tr:hover .actions { opacity: 1; }
.table .w1 { width: 1%; }
.table img.thumb { width: 44px; height: 32px; object-fit: cover; border-radius: 4px; display: block; background: var(--panel-2); }
.table .thumb-empty { width: 44px; height: 32px; border-radius: 4px; background: var(--panel-2); }
.group-row td { height: 34px; padding-top: 14px; font-size: 12px; color: var(--muted); background: transparent !important; }
.empty-row td { height: 120px; text-align: center; color: var(--muted); }
.date-note { margin-left: 6px; font-size: 12px; white-space: nowrap; }
.date-note.warn { color: var(--orange); }
.date-note.soon { color: var(--amber); }
.date-note.ok { color: var(--muted); }
.date-main { color: var(--blue); }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 5px; font-size: 12px; background: var(--gray-bg); color: var(--fg-2); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.pill.blue { background: var(--blue-bg); color: var(--blue); }
.pill.orange { background: var(--orange-bg); color: var(--orange); }
.pill.amber { background: var(--amber-bg); color: var(--amber); }
.pill.gray { color: var(--muted); }
.pill.white { color: #fff; }
.tag { display: inline-block; margin: 0 4px 2px 0; padding: 1px 6px; border-radius: 4px; background: var(--gray-bg); color: var(--fg-2); font-size: 12px; }

.notice { margin: 16px; padding: 14px 16px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); }
.foot-note { padding: 10px 16px; color: var(--dim); font-size: 12px; }

/* 대화상자 */
dialog { width: min(560px, calc(100% - 32px)); padding: 0; border: 1px solid var(--line-2); border-radius: 14px; background: var(--panel); color: var(--fg); box-shadow: 0 30px 80px rgba(0,0,0,.6); font-size: 15px; }
dialog::backdrop { background: rgba(0,0,0,.55); backdrop-filter: blur(2px); }
dialog form { display: grid; gap: 16px; padding: 24px; }
dialog h2 { margin: 0 0 4px; font-size: 20px; font-weight: 700; }
dialog label { display: grid; gap: 7px; color: var(--fg-2); font-size: 14px; font-weight: 500; }
dialog .row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
dialog .foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 6px; }
/* 팝업은 크게: 입력 칸·버튼·첨부 줄 */
dialog .input { width: 100%; min-width: 0; height: 42px; padding: 0 12px; font-size: 15px; font-weight: 400; color: var(--fg); color-scheme: dark; }
dialog textarea.input { height: auto; min-height: 100px; padding: 10px 12px; line-height: 1.5; }
dialog .foot .btn { height: 40px; padding: 0 18px; font-size: 15px; }
dialog .attach-head { flex-wrap: wrap; justify-content: flex-end; row-gap: 2px; font-size: 14px; }
dialog .attach-head svg { width: 17px; height: 17px; }
dialog .btn.sm { height: 32px; padding: 0 10px; font-size: 14px; }
.dropzone { display: grid; justify-items: center; gap: 6px; padding: 22px 12px; border: 1.5px dashed var(--line-2); border-radius: 10px; text-align: center; cursor: pointer; }
.dropzone strong { color: var(--fg); font-weight: 500; font-size: 13px; }
.dropzone svg { width: 22px; height: 22px; color: var(--muted); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dropzone:hover, .dropzone:focus-within, body.dragging .dropzone { border-color: var(--blue); background: var(--blue-bg); }
.progress { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.progress li { display: grid; gap: 4px; font-size: 12px; color: var(--fg-2); }
.progress .bar-track { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.progress .bar-fill { height: 100%; width: 0; background: var(--blue); transition: width .2s; }
.progress li.error { color: var(--orange); }

/* 캘린더 */
.cal-month { min-width: 92px; text-align: center; font-size: 14px; font-weight: 600; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.cal-head { padding: 6px 8px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.cal-head:first-child { color: var(--orange); }
.cal-day { min-height: 108px; max-height: 160px; overflow-y: auto; padding: 4px 4px 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day:hover { background: rgba(255,255,255,.018); }
.cal-day.other { background: rgba(0,0,0,.25); }
.cal-day.other .cal-num { color: var(--dim); }
.cal-num { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin: 0 0 2px 2px; border-radius: 11px; font-size: 12px; color: var(--fg-2); }
.cal-day.today .cal-num { background: var(--blue); color: #111; font-weight: 600; }
.cal-item { display: flex; align-items: center; gap: 5px; width: 100%; min-height: 20px; padding: 1px 5px; border: 0; border-radius: 4px; background: none; font-size: 12px; text-align: left; cursor: pointer; overflow: hidden; white-space: nowrap; }
.cal-item:hover { background: var(--hover); }
.cal-item span { overflow: hidden; text-overflow: ellipsis; }
.cal-item .t { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.cal-item .dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.cal-item.task .dot { border-radius: 2px; background: none; box-shadow: inset 0 0 0 1.5px var(--fg-2); }
.cal-item.task.hw .dot { box-shadow: inset 0 0 0 1.5px var(--blue); }
.cal-item.task.done { color: var(--muted); text-decoration: line-through; }
.cal-item.task.done .dot { background: var(--muted); box-shadow: none; }
.cal-item.task.late { color: var(--orange); }

/* 노트 */
.notes { display: grid; grid-template-columns: 220px 1fr; min-height: 100%; }
.note-list { display: flex; flex-direction: column; gap: 1px; padding: 10px 8px; border-right: 1px solid var(--line); }
.note-list a { display: block; padding: 7px 9px; border-radius: 6px; color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-list a small { display: block; color: var(--dim); font-size: 11px; }
.note-list a:hover { background: var(--hover); color: var(--fg); }
.note-list a.active { background: var(--active); color: var(--fg); }
.note-list .muted { padding: 7px 9px; }
.note-row { display: flex; align-items: flex-start; min-width: 0; }
.note-row a { flex: 1; min-width: 0; }
.note-fold { flex: none; display: grid; place-items: center; width: 20px; height: 33px; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; transition: transform .12s; }
.note-fold svg, .blk-fold svg { width: 15px; height: 15px; stroke-width: 2.4; }
span.note-fold { cursor: default; }
.note-fold[aria-expanded="true"] { transform: rotate(90deg); }
.note-fold:hover { color: var(--fg); }
.note-kids { display: flex; flex-direction: column; gap: 1px; padding-left: 12px; }
.note-kids[hidden] { display: none; }
.note-page { width: min(760px, 100%); margin: 0 auto; padding: 36px 40px 120px; }
.note-empty { padding: 40px; }
.note-title { width: 100%; border: 0; background: none; outline: none; font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.note-title::placeholder { color: var(--dim); }
.note-meta { margin: 4px 0 18px; font-size: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.editor { min-height: 240px; padding-bottom: 80px; cursor: text; }
.blk { position: relative; display: flex; align-items: flex-start; gap: 6px; padding: 1px 0 1px calc(var(--d, 0) * 26px); border-radius: 4px; }
.blk-handle { position: absolute; left: calc(var(--d, 0) * 26px - 28px); top: 3px; width: 22px; height: 24px; padding: 0; border: 0; border-radius: 4px; background: none; color: var(--dim); font-size: 12px; letter-spacing: -2px; cursor: grab; opacity: 0; }
.blk:hover .blk-handle, .blk-handle:focus { opacity: 1; }
.blk-handle:hover { background: var(--hover); color: var(--fg); }
/* 글 칸: 꾸민 글을 그린 층(.blk-rich) 위에 글자가 투명한 textarea를 겹친다. 둘의 글꼴·여백·줄바꿈이 같아야 한다. */
.blk-field { position: relative; flex: 1; min-width: 0; font-size: 15px; line-height: 1.6; }
.blk-text, .blk-rich { display: block; width: 100%; margin: 0; padding: 3px 2px; border: 0; font: inherit; letter-spacing: inherit; white-space: pre-wrap; overflow-wrap: break-word; word-break: normal; tab-size: 4; }
.blk-text { background: none; outline: none; resize: none; overflow: hidden; color: inherit; }
.blk-rich { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.blk-text.rich { color: transparent; caret-color: var(--fg); }
.blk-text.rich::selection { color: transparent; background: rgba(143,163,255,.35); }
.blk-text::placeholder { color: var(--dim); }
.blk-p .blk-text:not(:focus)::placeholder { color: transparent; }
.r-b { -webkit-text-stroke: .035em currentColor; } /* 글자 폭이 그대로인 굵게 (textarea와 줄이 어긋나지 않게) */
.r-i { font-style: italic; }
.r-u { text-decoration: underline; }
.r-s { text-decoration: line-through; }
.r-u.r-s { text-decoration: underline line-through; }
.r-c { border-radius: 3px; background: rgba(135,131,120,.2); color: #eb5757; }
.r-a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.r-m { color: var(--fg-2); background: rgba(255,255,255,.06); border-radius: 3px; }
.r-eq { color: #e0b0ff; }
.c-gray { color: #9b9b9b; } .c-brown { color: #ba856f; } .c-orange { color: #c77d48; } .c-yellow { color: #ca9849; } .c-green { color: #529e72; }
.c-blue { color: #5e87c9; } .c-purple { color: #9d68d3; } .c-pink { color: #d15796; } .c-red { color: #df5452; }
.c-gray_background { background: #2f2f2f; } .c-brown_background { background: #4a3228; } .c-orange_background { background: #5c3b23; } .c-yellow_background { background: #56452f; }
.c-green_background { background: #243d30; } .c-blue_background { background: #143a4e; } .c-purple_background { background: #3c2d49; } .c-pink_background { background: #4e2c3c; } .c-red_background { background: #522e2a; }
.blk[class*="bc-"] .blk-field { color: inherit; }
.bc-gray { color: #9b9b9b; } .bc-brown { color: #ba856f; } .bc-orange { color: #c77d48; } .bc-yellow { color: #ca9849; } .bc-green { color: #529e72; }
.bc-blue { color: #5e87c9; } .bc-purple { color: #9d68d3; } .bc-pink { color: #d15796; } .bc-red { color: #df5452; }
.bc-gray_background > .blk-field { background: #2f2f2f; } .bc-brown_background > .blk-field { background: #4a3228; } .bc-orange_background > .blk-field { background: #5c3b23; }
.bc-yellow_background > .blk-field { background: #56452f; } .bc-green_background > .blk-field { background: #243d30; } .bc-blue_background > .blk-field { background: #143a4e; }
.bc-purple_background > .blk-field { background: #3c2d49; } .bc-pink_background > .blk-field { background: #4e2c3c; } .bc-red_background > .blk-field { background: #522e2a; }
[class*="bc-"] > .blk-field { border-radius: 4px; }
.blk-callout > .blk-field { background: none !important; }
.blk-callout.bc-gray_background { background: #2f2f2f; } .blk-callout.bc-brown_background { background: #4a3228; } .blk-callout.bc-orange_background { background: #5c3b23; }
.blk-callout.bc-yellow_background { background: #56452f; } .blk-callout.bc-green_background { background: #243d30; } .blk-callout.bc-blue_background { background: #143a4e; }
.blk-callout.bc-purple_background { background: #3c2d49; } .blk-callout.bc-pink_background { background: #4e2c3c; } .blk-callout.bc-red_background { background: #522e2a; }
.blk-h1 { margin-top: 18px; } .blk-h1 .blk-field { font-size: 26px; font-weight: 700; line-height: 1.3; }
.blk-h2 { margin-top: 14px; } .blk-h2 .blk-field { font-size: 21px; font-weight: 650; line-height: 1.35; }
.blk-h3 { margin-top: 10px; } .blk-h3 .blk-field { font-size: 17px; font-weight: 600; }
.blk-marker { flex: none; min-width: 18px; padding-top: 3px; font-size: 15px; line-height: 1.6; color: var(--fg-2); text-align: right; font-variant-numeric: tabular-nums; }
.blk-fold { flex: none; display: grid; place-items: center; width: 20px; height: 28px; padding: 0; border: 0; background: none; color: var(--fg-2); cursor: pointer; transition: transform .12s; }
.blk-h1 .blk-fold { height: 40px; } .blk-h2 .blk-fold { height: 34px; }
.blk-fold[aria-expanded="true"] { transform: rotate(90deg); }
.blk-fold:hover { color: var(--fg); }
.blk .blk-check { margin-top: 7px; width: 16px; height: 16px; flex: none; }
.blk-todo.checked .blk-field { color: var(--muted); text-decoration: line-through; }
.blk-when { display: flex; gap: 4px; padding-top: 3px; opacity: 0; }
.blk-todo:hover .blk-when, .blk-todo:focus-within .blk-when, .blk-todo.dated .blk-when { opacity: 1; }
.blk-when input { height: 24px; padding: 0 4px; border: 1px solid transparent; border-radius: 4px; background: none; color: var(--muted); font-size: 12px; color-scheme: dark; }
.blk-when input:hover, .blk-when input:focus { border-color: var(--line-2); outline: none; }
.blk-todo.dated .blk-date { color: var(--blue); background: var(--blue-bg); }
.blk-quote .blk-field { padding-left: 14px; border-left: 3px solid var(--fg-2); }
.blk-callout { margin: 4px 0; padding: 10px 12px 10px calc(var(--d, 0) * 26px + 12px); border-radius: 6px; background: rgba(255,255,255,.04); }
.blk-callout .blk-handle { left: calc(var(--d, 0) * 26px - 28px); top: 12px; }
.blk-icon { flex: none; width: 24px; height: 28px; padding: 0; border: 0; background: none; font-size: 17px; cursor: pointer; }
.blk-code .blk-field { border-radius: 6px; background: var(--panel-2); font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.blk-code .blk-text { padding: 12px 14px; white-space: pre; overflow-x: auto; }
.blk-lang { position: absolute; top: 4px; right: 8px; color: var(--dim); font-size: 11px; }
.blk-equation .blk-field { font: 14px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; color: #e0b0ff; }
.blk-solid { flex: 1; min-width: 0; border-radius: 4px; outline: none; }
.blk-solid:focus { box-shadow: 0 0 0 2px var(--blue); }
.blk-hr hr { height: 1px; margin: 12px 2px; border: 0; background: var(--line-2); }
.blk-media { flex: 1; min-width: 0; margin: 4px 0; }
.blk-media img, .blk-media video { display: block; max-width: 100%; max-height: 520px; border-radius: 6px; }
.blk-media audio { width: 100%; }
.blk-caption { font-size: 13px; color: var(--muted); }
.blk-caption .blk-text:not(:focus)::placeholder { color: transparent; }
.blk-filelink, .blk-bookmark a, .blk-pagelink { display: block; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 6px; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blk-pagelink { border: 0; padding: 4px 2px; font-size: 15px; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.blk-filelink:hover, .blk-bookmark a:hover, .blk-pagelink:hover { background: var(--hover); }
.blk-missing, .blk-opaque { margin: 0; padding: 8px 10px; border: 1px dashed var(--line-2); border-radius: 6px; color: var(--muted); font-size: 13px; }
.blk-label { padding: 3px 2px; color: var(--dim); font-size: 12px; }
.blk-synced { padding: 6px 10px; border: 1px solid rgba(240,135,90,.4); border-radius: 6px; }
.blk-synced p { margin: 4px 0 0; white-space: pre-wrap; color: var(--fg-2); }
.blk-tablebox { flex: 1; min-width: 0; overflow-x: auto; padding: 4px 0; }
.blk-table { border-collapse: collapse; margin-bottom: 4px; }
.blk-table td { min-width: 120px; padding: 0 4px; border: 1px solid var(--line-2); vertical-align: top; }
.blk-table .blk-field { font-size: 14px; }
.blk-table.col-head tr:first-child td:not(.row-del), .blk-table.row-head td:first-child { background: var(--panel-2); font-weight: 600; }
.blk-table td.row-del { min-width: 0; border: 0; background: none; }
.row-del button { border: 0; background: none; color: var(--dim); cursor: pointer; opacity: 0; }
.blk-table tr:hover .row-del button { opacity: 1; }
.blk.drop-before { box-shadow: 0 -2px 0 var(--blue); }
.blk.drop-after { box-shadow: 0 2px 0 var(--blue); }
.fmt-bar { position: fixed; z-index: 31; display: flex; flex-wrap: wrap; gap: 2px; max-width: 320px; padding: 3px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel-2); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.fmt-btn { min-width: 28px; height: 28px; padding: 0 7px; border: 0; border-radius: 5px; background: none; color: var(--fg); cursor: pointer; }
.fmt-btn:hover { background: var(--active); }
.fmt-menu::after { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 1px 3px 6px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.fmt-colors { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; width: 100%; }
.fmt-colors[hidden] { display: none; }
.note-notion { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -8px 0 14px; font-size: 12px; }
.note-props { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; width: 100%; margin: 4px 0 0; padding: 8px 10px; border-radius: 6px; background: var(--panel-2); }
.note-props dt { color: var(--muted); }
.note-props dd { margin: 0; }
.blk-menu { position: fixed; z-index: 30; width: 210px; max-height: 252px; overflow-y: auto; padding: 4px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel-2); box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.blk-menu-item { display: block; width: 100%; height: 30px; padding: 0 10px; border: 0; border-radius: 5px; background: none; text-align: left; cursor: pointer; }
.blk-menu-item.on, .blk-menu-item:hover { background: var(--active); }
.blk-menu-item.sep { margin-top: 4px; box-shadow: 0 -1px 0 var(--line); }
.blk-menu-item.danger { color: var(--orange); }
.table .sub a { color: var(--blue); }

/* 클라우드 첨부 */
.attach { display: grid; gap: 6px; }
.note-page .attach { margin: -6px 0 16px; }
.attach-head { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.attach-head > span { margin: 0 auto 0 2px; }
.attach-list, .pick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.attach-list li, .pick-list li { display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 3px 4px 3px 10px; border-radius: 6px; background: var(--panel-2); }
.attach-list a, .pick-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); }
.attach-list a:hover { color: var(--blue); }
.attach-list .muted, .pick-list .muted { flex: none; font-size: 12px; }
.pick-list { max-height: min(50vh, 420px); overflow-y: auto; }
.pick-list li.muted, .pick-list li.error { background: none; padding: 12px 4px; }
.clip { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; color: var(--muted); font-size: 12px; vertical-align: middle; }
.clip svg { width: 12px; height: 12px; }

/* 클라우드 폴더 */
.crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 500; }
.crumbs a { color: var(--fg-2); }
.crumbs a:hover { color: var(--blue); }
.crumbs a:last-of-type { color: var(--fg); }
.folder-icon { display: grid; place-items: center; color: var(--amber); }
.btn.invisible { visibility: hidden; }

/* 포트폴리오 편집 */
.pf { padding-bottom: 40px; }
.pf-card { display: grid; gap: 12px; margin: 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); }
.pf-card h2, .pf-head h2 { margin: 0; font-size: 14px; font-weight: 600; }
.pf-card label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.pf-card .row { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.pf-card .foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.pf-section { margin: 24px 0 0; border-top: 1px solid var(--line); }
.pf-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; }
.pf-head .grow { flex: 1; }
.pf-section .table { table-layout: fixed; }
.pf-section .table td:nth-child(1) { width: 76px; }
.pf-section .table td:nth-child(3) { width: 150px; }
.pf-section .table td:nth-child(4) { width: 110px; }
.pf-section .table td:nth-child(5) { width: 160px; }
.pf-section .table .title, .pf-section .table .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.pf-section .empty-row td { height: 56px; padding: 0 16px; }
.input.sm { height: 26px; padding: 0 6px; font-size: 12px; }

@media (max-width: 860px) {
  .pf-card .row, dialog .row { grid-template-columns: 1fr; }
  dialog form { padding: 18px; }
  .pf-section .table td:nth-child(3) { display: none; }
  .pf-section .table td:nth-child(5) { width: 120px; }
  .notes { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  /* 좁은 화면에서도 하위 노트의 들여쓰기가 보이게 세로 트리 그대로, 높이만 줄여 스크롤 */
  .note-list { max-height: 36vh; overflow-y: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .note-page { padding: 20px 16px 100px 30px; }
  .blk-handle { opacity: .5; }
  .app { grid-template-columns: 1fr; padding: 0; }
  .side { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 20; background: var(--bg); border-right: 1px solid var(--line); padding: 12px; transform: translateX(-100%); transition: transform .25s; }
  .app.nav-open .side { transform: none; }
  .main { border-radius: 0; border: 0; }
  .menu-btn { display: inline-flex; }
  .table .hide-sm { display: none; }
  .table .actions { opacity: 1; }
  .bar kbd { display: none; }
  .cal-day { min-height: 72px; padding: 2px; }
  .cal-item { padding: 1px 2px; font-size: 11px; }
  .cal-item .t { display: none; }
}

/* 시험 */
.exam { margin: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); display: grid; gap: 10px; }
.exam.past { opacity: .75; }
.exam-head { display: flex; align-items: flex-start; gap: 10px; }
.exam-head .grow { flex: 1; min-width: 0; }
.exam-head h2 { margin: 0 0 2px; font-size: 15px; font-weight: 600; }
.exam-head .pill { margin-top: 1px; }
.exam-text { display: grid; grid-template-columns: 34px 1fr; gap: 8px; font-size: 13px; }
.exam-text p { margin: 0; white-space: pre-wrap; color: var(--fg-2); }
.exam-progress { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.exam-progress .bar-track { flex: 1; max-width: 280px; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.exam-progress .bar-fill { height: 100%; background: var(--green); }
.plan { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.plan li { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 2px 0; border-bottom: 1px solid var(--line); }
.plan .plan-date { flex: none; width: 92px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.plan .plan-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.plan li.done .plan-title { color: var(--muted); text-decoration: line-through; }
.plan li.today .plan-date { color: var(--blue); }
.plan li.late .plan-date { color: var(--orange); }
.plan li .btn { opacity: .35; }
.plan li:hover .btn { opacity: 1; }
.plan-add { display: flex; gap: 8px; }
.plan-add input[type="date"] { width: 150px; flex: none; }
.plan-add input:not([type]) { flex: 1; min-width: 0; }
.exam-past { margin: 8px 0 24px; }
.exam-past summary { display: flex; align-items: center; gap: 6px; padding: 8px 16px; color: var(--muted); cursor: pointer; list-style: none; }
.exam-past summary::-webkit-details-marker { display: none; }
.exam-past summary svg { stroke-width: 2.4; transition: transform .12s; }
.exam-past[open] summary svg { transform: rotate(90deg); }
.exam-mark { display: inline-grid; place-items: center; width: 15px; color: var(--orange); }
.cal-item.exam { color: var(--orange); font-weight: 500; }
.cal-item.exam .dot { background: var(--orange); }
@media (max-width: 860px) {
  .exam { margin: 12px; padding: 12px; }
  .plan .plan-date { width: 78px; }
  .plan li .btn { opacity: 1; }
  .plan-add { flex-wrap: wrap; }
  .plan-add input[type="date"] { width: 100%; }
}
