/* ===== 포스트잇 (xNote 스타일 이식) ===== */
.sv-wrap { display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden; background: var(--bg); }
.sv-head { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; border-bottom: 1px solid var(--border); flex-shrink: 0; background: var(--surface); }
.sv-head h2 { font-size: 1rem; font-weight: 700; flex: 1; margin: 0; }
.sv-body { flex: 1; min-height: 0; overflow-y: auto; }
.sv-empty { text-align: center; padding: 3rem; color: var(--text-3); font-size: .9rem; }

/* 그리드 (masonry) */
.sv-grid { padding: .9rem; column-count: 5; column-gap: .8rem; }
.sv-card {
  break-inside: avoid; border-radius: 10px; padding: .85rem .95rem; margin-bottom: .8rem; cursor: pointer;
  transition: transform .15s, box-shadow .15s; box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.sv-card:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,.28); }
.sv-card-title { font-size: .9rem; font-weight: 700; margin-bottom: .35rem; line-height: 1.35; word-break: break-word; }
.sv-card-body { font-size: .83rem; line-height: 1.65; word-break: break-word; }
.sv-card-body ul, .sv-card-body ol { padding-left: 1.3rem; margin: .2rem 0; }
.sv-card-body img { max-width: 100%; }
.sv-card-date { font-size: .72rem; opacity: .45; margin-top: .55rem; text-align: right; }
@media (max-width: 1100px) { .sv-grid { column-count: 3; } }
@media (max-width: 767px) { .sv-grid { column-count: 2; column-gap: .5rem; padding: .55rem; } .sv-card { margin-bottom: .5rem; padding: .7rem .8rem; } }

/* 편집 모달 */
.sv-modal-backdrop { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.sv-modal {
  width: 100%; max-width: 640px; border-radius: 14px; box-shadow: 0 24px 64px rgba(0,0,0,.5);
  display: flex; flex-direction: column; max-height: 92vh; overflow: hidden; background: var(--surface); border: 1px solid var(--border);
}
.sv-modal-head { padding: .85rem 1.1rem .6rem; border-bottom: 1px solid var(--border); }
.sv-title-input {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px; outline: none;
  font-size: 1rem; font-weight: 600; font-family: inherit; padding: .42rem .7rem; margin-bottom: .65rem; color: var(--text); box-sizing: border-box;
}
.sv-title-input:focus { border-color: var(--accent); }
.sv-title-input::placeholder { color: var(--text-3); font-weight: 400; }
.sv-colors { display: flex; gap: .4rem; flex-wrap: wrap; }
.sv-color-btn { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; transition: transform .13s, box-shadow .13s; flex-shrink: 0; box-shadow: 0 1px 4px rgba(0,0,0,.25); padding: 0; }
.sv-color-btn:hover { transform: scale(1.15); }
.sv-color-btn.active { transform: scale(1.2); box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }

.sv-toolbar { display: flex; align-items: center; gap: .15rem; padding: .38rem .9rem; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.sv-toolbar button { padding: .24rem .44rem; border: none; background: none; cursor: pointer; border-radius: 5px; display: flex; align-items: center; justify-content: center; font-family: inherit; font-size: .88rem; font-weight: 500; color: var(--text-2); line-height: 1; }
.sv-toolbar button:hover { background: var(--surface-3); color: var(--text); }
.sv-tsep { width: 1px; height: 17px; background: var(--border); margin: 0 .25rem; flex-shrink: 0; }

.sv-editor-wrap { flex: 1; min-height: 0; overflow: hidden; transition: background .2s; }
.sv-editor { height: 100%; min-height: 240px; max-height: 420px; overflow-y: auto; padding: .9rem 1.1rem; outline: none; font-size: .9375rem; line-height: 1.8; font-family: inherit; word-break: break-word; }
.sv-editor:empty::before { content: attr(placeholder); opacity: .45; pointer-events: none; }
.sv-editor ul { padding-left: 1.4rem; }
.sv-modal-foot { display: flex; align-items: center; gap: .5rem; justify-content: flex-end; padding: .65rem 1.1rem; border-top: 1px solid var(--border); }

/* 페이징 */
.sv-pagination { display: flex; justify-content: center; align-items: center; gap: .35rem; padding: .75rem .9rem; border-top: 1px solid var(--border); flex-shrink: 0; background: var(--surface); }
.sv-page-btn { min-width: 30px; height: 30px; padding: 0 .5rem; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-2); color: var(--text-2); font-size: .82rem; font-weight: 500; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.sv-page-btn:hover:not(:disabled):not(.active) { background: var(--surface-3); color: var(--text); }
.sv-page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }
.sv-page-btn:disabled { opacity: .3; cursor: default; }
