/* Doing 노트 — 왼쪽 메뉴는 프로젝트 관리 위젯과 같은 모양 · 제목 목록 · 상세(노션 서식 그대로) */
body { overflow: hidden; }
.rec { display: grid; grid-template-columns: 250px minmax(260px, 340px) minmax(0, 1fr); height: 100vh; }
.rec.auto { grid-template-columns: 64px minmax(260px, 340px) minmax(0, 1fr); }
.rec.auto .rec-side { position: fixed; left: 0; top: 0; bottom: 0; width: 64px; z-index: 45; transition: width .16s ease, box-shadow .16s; padding-left: 10px; padding-right: 10px; }
.rec.auto.peek .rec-side { width: 250px; box-shadow: 8px 0 30px rgba(15,15,15,.12); }
.rec.auto .rec-list { grid-column: 2; } .rec.auto .rec-detail { grid-column: 3; }
.rec-side .nav-item .n { margin-left: auto; font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--side-muted); }
.rec-side .nav-item.add { color: var(--side-muted); font-size: 12.5px; border: 1px dashed var(--side-2); margin-top: 4px; }
.rec-side .side-tools a { flex: 1; color: var(--side-muted); padding: 8px; border-radius: 8px; display: grid; place-items: center; }
.rec-side .side-tools a:hover { background: var(--side-2); color: var(--side-text); }
.rec.collapsed .brand-name, .rec.collapsed .nav-group, .rec.collapsed .nav-item span, .rec.collapsed .nav-item .n { display: none; }
.rec.collapsed .nav-item { justify-content: center; padding: 9px 0; }
.rec.collapsed .brand { flex-direction: column; padding: 6px 0 10px; } .rec.collapsed .brand img.brand-logo { display: none !important; }
.rec.collapsed .side-tools { flex-direction: column; }
.rec.collapsed .nav-group + .nav-item { margin-top: 10px; }
.rec-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--bg); }
.rl-head { padding: 12px 12px 8px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--line); }
.rl-head .row1 { display: flex; align-items: center; gap: 6px; }
.rl-head h2 { margin: 0; font-size: 17px; font-weight: 800; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-head .search { min-width: 0; height: 34px; }
.rl-body { flex: 1; overflow-y: auto; padding: 6px 8px 20px; }
.rgrp { margin-bottom: 4px; }
.rgrp-h { display: flex; align-items: center; gap: 6px; width: 100%; padding: 7px 6px; font-size: 12.5px; font-weight: 800; color: var(--muted); border-radius: 7px; }
.rgrp-h:hover { background: var(--panel); }
.rgrp-hw { display: flex; align-items: center; } .rgrp-hw .rgrp-h { flex: 1; }
.rgrp-delete { color: #e8705a; font-size:20px;line-height:1;font-weight:700;flex:none;padding: 5px; border-radius: 6px; opacity: 0; } .rgrp-hw:hover .rgrp-delete,.rgrp-hw:focus-within .rgrp-delete { opacity: 1; } .rgrp-delete:hover { background: var(--panel); color: #e8705a; }
.rgrp-h .car { transition: transform .15s; display: inline-block; width: 12px; }
.rgrp.closed .car { transform: rotate(-90deg); }
.rgrp.closed .rgrp-b { display: none; }
.rgrp-h .n { margin-left: auto; font-family: var(--mono); font-weight: 500; font-size: 11px; }
.ritem { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 9px; margin: 1px 0; }
.ritem:hover { background: var(--panel); }
.ritem.on { background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-2); }
.ritem .t { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.ritem .m { font-size: 11.5px; color: var(--muted); margin-top: 2px; display: flex; gap: 6px; flex-wrap: wrap; }
.ritem .m b { font-weight: 600; color: var(--text); }
.ritem .pin { color: var(--accent); }

.rec-detail { overflow-y: auto; min-width: 0; background: var(--bg); }
.rd-wrap { max-width: 860px; margin: 0 auto; padding: 28px 44px 80px; }
.rd-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.rd-icon { font-size: 40px; line-height: 1; margin-bottom: 8px; }
.rd-title { font-size: 34px; font-weight: 700; line-height: 1.2; margin: 0 0 10px; letter-spacing: -.01em; overflow-wrap: anywhere; }
.rd-meta { font-size: 13px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.rd-meta b { color: var(--text); font-weight: 600; }
.rd-props { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 0; margin-bottom: 18px; display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; font-size: 14px; }
.rd-props .k { color: var(--muted); font-size: 13px; padding-top: 2px; }
.rd-props .v { white-space: pre-wrap; overflow-wrap: anywhere; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rd-props .v .cred { flex: 1; min-width: 200px; }
.rd-empty { color: var(--faint); text-align: center; padding: 80px 20px; font-size: 14px; line-height: 1.8; }

/* 임베드: 오른쪽 위 노션 아이콘 자리 비우기 */
html.embedded .rd-wrap { padding-top: 52px; }
html.embedded .rd-actions { margin-right: 96px; }
.rd-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; margin-bottom: 12px; }

.rec-guide { margin: 40px auto; max-width: 560px; padding: 0 20px; }
.back-btn { display: none; }
@media (max-width: 900px) {
  body { overflow: auto; }
  .rec, .rec.auto { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; height: auto; min-height: 100vh; }
  .rec .rec-side { position: static !important; width: auto !important; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .rec-side .brand, .rec-side .nav-group { display: none; } .rec-side .nav { display: flex; flex-wrap: wrap; gap: 2px; flex: 1; overflow: visible; margin: 0; }
  .rec-side .nav-item { width: auto; } .rec-side .side-bottom { border: 0; padding: 0; }
  .rec.auto .rec-list, .rec.auto .rec-detail { grid-column: 1; }
  .rec-list { border-right: 0; } .rl-body { max-height: none; }
  .rec.show-detail .rec-list { display: none; } .rec:not(.show-detail) .rec-detail { display: none; }
  .back-btn { display: inline-flex; }
  .rd-wrap { padding: 16px 16px 60px; } .rd-title { font-size: 26px; }
}

.rl-head .quick input { height: 34px; } .rl-head .quick .go { width: 34px; height: 34px; }

/* 끌어서 그룹 옮기기 */
.ritem[draggable="true"] { cursor: grab; } .ritem.dragging { opacity: .45; }
.rgrp.drop-on { background: color-mix(in srgb, #2383e2 9%, transparent); border-radius: 10px; outline: 1.5px dashed #2383e2; outline-offset: -1px; }
.rgrp.drop-on.closed .rgrp-b { display: block; }
.de-code-h select { color: var(--text); }
/* 그룹(상위) ↔ 노트(하위) 구분: 그룹은 굵은 머리글 카드, 노트는 들여쓰기 + 왼쪽 선 */
.rgrp { margin: 0 0 10px; border-radius: 10px; }
.rgrp-hw { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.rgrp.closed .rgrp-hw { background: transparent; }
.rgrp-h { padding: 9px 8px; font-size: 13.5px; font-weight: 800; color: var(--text); border-radius: 10px; gap: 7px; }
.rgrp-h:hover { background: var(--line); }
.rgrp-h .gi { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line-2); color: var(--muted); flex: none; }
.rgrp-h .gi svg { width: 13px; height: 13px; }
.rgrp-h .gl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rgrp-h .n { background: var(--bg); border: 1px solid var(--line-2); border-radius: 999px; padding: 0 7px; line-height: 18px; color: var(--muted); }
.rgrp-h .car { color: var(--muted); }
.rgrp-b { margin: 4px 0 0 14px; padding-left: 8px; border-left: 2px solid var(--line-2); }
.rgrp-b .ritem { padding: 7px 10px; }
.rgrp-b .ritem .t { font-weight: 500; font-size: 13px; }
.rgrp-delete { margin-right: 4px; }
/* 개인 노트 */
.pm-lock { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; } .pm-lock svg { width: 12px; height: 12px; }
.pm-view { font-size: 15px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.pm-view .pm-h, .pm-h { display: inline-block; font-size: 1.1em; font-weight: 700; margin-top: .4em; }
.pm-body { width: 100%; min-height: 50vh; font-size: 15px; line-height: 1.7; resize: vertical; }
/* 즐겨찾기: 분류 목록 + 카드 */
.bm-gl { display: flex; flex-direction: column; gap: 2px; }
.bm-g { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border-radius: 9px; font-weight: 600; font-size: 13.5px; text-align: left; }
.bm-g:hover { background: var(--panel); } .bm-g.on { background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-2); font-weight: 800; }
.bm-g .gi { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line-2); color: var(--muted); } .bm-g .gi svg { width: 13px; height: 13px; }
.bm-g .gl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .bm-g .n { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.bm-g.drop-on { outline: 1.5px dashed #2383e2; background: color-mix(in srgb, #2383e2 9%, transparent); }
.bm-wrap { max-width: none; padding: 22px 26px 60px; }
.bm-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; } .bm-head h2 { margin: 0; font-size: 20px; }
.bm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.bm-card { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); min-width: 0; cursor: grab; transition: border-color .12s, box-shadow .12s; }
.bm-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.bm-card.dragging { opacity: .45; }
.bm-ic { position: relative; width: 36px; height: 36px; border-radius: 10px; background: var(--panel); display: grid; place-items: center; flex: none; overflow: hidden; font-weight: 800; color: var(--muted); }
.bm-ic img { position: absolute; inset: 6px; width: 24px; height: 24px; object-fit: contain; background: var(--panel); }
.bm-tx { min-width: 0; flex: 1; } .bm-tx b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .bm-tx small { display: block; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-n { position: absolute; top: 6px; right: 8px; font-family: var(--mono); font-size: 10px; color: var(--faint); }
.bm-acts { position: absolute; left: 8px; right: 8px; bottom: -14px; display: flex; justify-content: center; gap: 2px; padding: 3px; border-radius: 9px; background: var(--bg); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transition: opacity .12s; z-index: 3; }
.bm-card:hover .bm-acts, .bm-card:focus-within .bm-acts { opacity: 1; visibility: visible; }
.bm-acts a, .bm-acts button { display: grid; place-items: center; min-width: 28px; height: 26px; padding: 0 6px; border-radius: 6px; color: var(--muted); font-size: 11px; font-weight: 800; text-decoration: none; }
.bm-acts a:hover, .bm-acts button:hover { background: var(--panel); color: var(--text); }
.bm-acts svg { width: 14px; height: 14px; }
.bm-grid { padding-bottom: 16px; row-gap: 22px; }
@media (max-width: 900px) { .bm-wrap { padding: 14px 14px 60px; } .bm-acts { position: static; opacity: 1; visibility: visible; box-shadow: none; border: 0; padding: 0; justify-content: flex-start; } .bm-card { flex-wrap: wrap; } }
/* 모바일: 왼쪽 메뉴는 ☰ 로 여는 서랍 (프로젝트 관리 위젯과 같은 방식) */
.rl-menu, .rl-menu-x { display: none; }
@media (max-width: 900px) {
  .rec { grid-template-rows: auto 1fr !important; }
  .rec .rec-side { position: fixed !important; top: 0; bottom: 0; left: 0; width: 260px !important; z-index: 50; flex-direction: column !important; flex-wrap: nowrap !important; align-items: stretch !important; padding: 16px 12px !important; border-right: 1px solid var(--line) !important; border-bottom: 0 !important; overflow-y: auto !important; transform: translateX(-105%); transition: transform .2s; }
  .rec.menu-open .rec-side { transform: none; box-shadow: 8px 0 30px rgba(15,15,15,.18); }
  .rec .rec-side .brand { display: flex !important; } .rec .rec-side .nav-group { display: block !important; }
  .rec .rec-side .nav { display: block !important; flex: 1; }
  .rec .rec-side .nav-item { width: 100% !important; }
  .rec .rec-side .side-toggle { display: none; }
  .rl-menu-x { display: grid; place-items: center; margin-left: auto; color: var(--side-muted); padding: 6px; border-radius: 8px; }
  .rec-back { display: none; } .rec.menu-open .rec-back { display: block; position: fixed; inset: 0; background: rgba(15,15,15,.38); z-index: 45; }
  .rl-menu { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line-2); color: var(--text); flex: none; }
  .rec-list, .rec-detail { grid-column: 1 !important; }
}
/* 즐겨찾기 카드 위 아이콘: 업무 카드와 같은 위치(카드 위쪽) · 색으로 구분 */
.bm-card .bm-acts { position: absolute; top: -25px; right: 6px; left: auto; bottom: auto; display: flex; justify-content: flex-end; gap: 1px; padding: 2px; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(15,15,15,.14); opacity: 0; visibility: hidden; transition: opacity .12s, visibility 0s linear .25s; z-index: 6; }
.bm-card .bm-acts::after { content: ""; position: absolute; left: -6px; right: -6px; top: 100%; height: 10px; }
.bm-card:hover .bm-acts, .bm-card:focus-within .bm-acts, .bm-card .bm-acts:hover { opacity: 1; visibility: visible; transition-delay: 0s; }
.bm-acts a, .bm-acts button { width: 28px; min-width: 28px; height: 26px; padding: 0; border-radius: 7px; position: relative; }
.bm-acts .tx { font-size: 10.5px; font-weight: 800; letter-spacing: -.02em; }
.acts a.c-follow { color: #2f57b0; } .acts a.c-follow:hover { background: #dbe6fb; color: #2f57b0; }
:root[data-theme="dark"] .acts a.c-follow { color: #a9c4ff; } :root[data-theme="dark"] .acts a.c-follow:hover { background: #24375e; }
.acts .c-view { color: var(--muted); } .acts .c-view:hover { background: var(--surface-2); color: var(--text); }
.acts a[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--ink-tx); font-size: 11px; padding: 3px 7px; border-radius: 6px; white-space: nowrap; pointer-events: none; }
.bm-grid { padding-top: 26px; row-gap: 30px; }
@media (max-width: 900px) { .bm-card .bm-acts { position: static; opacity: 1; visibility: visible; box-shadow: none; border: 0; background: none; padding: 0; width: 100%; justify-content: flex-start; } .bm-grid { padding-top: 0; row-gap: 10px; } }
/* 모바일: 화면 너비에 꼭 맞게 · 메뉴 열리면 메뉴만 스크롤 */
html.no-scroll, html.no-scroll body { overflow: hidden !important; overscroll-behavior: none; }
@media (max-width: 900px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  .rec, .rec-list, .rec-detail, .rl-head, .rl-body, .rd-wrap { min-width: 0; max-width: 100vw; }
  .rec .rec-side { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
  html.embedded .rd-actions { margin-right: 0; } html.embedded .rd-wrap { padding-top: 16px; }
  .rd-wrap { padding: 14px 14px 60px; } .rd-title { font-size: 24px; } .rd-props { grid-template-columns: 82px minmax(0, 1fr); }
  .rd-actions { gap: 4px; } .rd-actions .btn { padding: 0 8px; }
  .nb img, .nb video, .nb iframe { max-width: 100%; height: auto; }
  .nb table { display: block; overflow-x: auto; max-width: 100%; }
  .nb pre { max-width: 100%; }
  .nb .cols { flex-direction: column; gap: 4px; }
  .de-tools .faint { display: none; }
  .title-input { font-size: 20px !important; }
  .field-row { grid-template-columns: 1fr !important; }
  .rl-head .row1 { flex-wrap: wrap; } .rl-head h2 { font-size: 16px; }
}
.rl-fs { display: none; }
@media (max-width: 900px) { html.embedded .rl-fs { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line-2); color: var(--muted); order: 99; } }

@media (max-width: 900px) { .rec { position: relative; } .rec.menu-open .rec-side { position: absolute !important; bottom: auto !important; min-height: 100vh; height: auto; overflow: visible !important; } }

.modal.record-create { width:min(1160px,calc(100vw - 32px));height:calc(100dvh - 48px); }
.record-create .modal-b { flex:1;min-height:0; }
.record-create #cDoc { border:1px solid var(--line);border-radius:10px;padding:12px 20px;background:var(--surface); }
.record-create .de-body { min-height:44vh;padding-bottom:70px; }
.record-create .field-row { display:grid;grid-template-columns:1fr 1fr;gap:16px; }
@media(max-width:640px){ .modal.record-create { width:100vw;height:100dvh;max-height:100dvh; }.record-create #cDoc { padding:10px; }.record-create .field-row { grid-template-columns:1fr; } }

#rNoteView,#rNoteSort{max-width:140px;min-width:0;font-size:12px;padding:5px}.rl-head .row1{flex-wrap:wrap}.field>.keyword-picker{display:flex}.field>.keyword-picker>input{width:0;min-width:0}.keyword-picker .keyword-add input{width:0;min-width:0}

@media(hover:none){.rgrp-delete { opacity:1; }}

/* Use the shared cat-say geometry and keep long operational messages readable. */
#toasts.cat-say .toast { max-width:min(380px,100%);box-sizing:border-box; }
#toasts.cat-say .toast>.grow { min-width:0;white-space:pre-wrap;overflow-wrap:anywhere; }
#toasts.cat-say .toast>button { flex:none; }
/* 즐겨찾기 ID/PW 복사 결과 (노션 앱 안에서 알림이 안 보일 때 대비) */
[data-copy].copied { color: var(--ok, #2f9e44) !important; }
.copy-manual { position: fixed; z-index: 2000; width: 260px; padding: 8px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 6px 20px rgba(0,0,0,.18); display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.copy-manual input { width: 100%; font-size: 13px; }

/* 문서 댓글 · 의견 (record-comments.js) — 업무 댓글과 같은 모양(.cm), 페이지와 함께 스크롤 */
.rc-wrap { margin: 28px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.rc-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 14px; }
.rc-head .faint { font-weight: 700; color: var(--accent); }
.rc-list { max-height: none; min-height: 0; overflow: visible; }
.rc-empty { padding: 10px 2px; font-size: 13px; }
.rc-wrap .cm-new { margin-top: 8px; }
.rc-wrap .cm-acts button { background: none; border: 0; cursor: pointer; }

/* 점심은 노트 셸 안에서 전체 본문 너비로 표시한다. */
.rec.lunch-open .rec-list{display:none!important}.rec.lunch-open .rec-detail{display:flex!important;flex-direction:column;grid-column:2 / -1!important;min-height:0;overflow:hidden}.rec.lunch-open .rec-detail>.rl-head{flex:none}#lunchFrame{width:100%;flex:1;min-height:400px;border:0;background:var(--bg)}
@media(max-width:900px){.rec.lunch-open .rec-detail{grid-column:1 / -1!important;overflow:visible}#lunchFrame{height:var(--lunch-height,100vh);flex:none;min-height:500px}}
