:root{
  --ink:#1B2229;
  --ink-soft:#242D36;
  --paper:#F7F2E7;
  --paper-dim:#EFE8D8;
  --amber:#E2A33D;
  --amber-soft:#F0C989;
  --rust:#C1613F;
  --text-dark:#232B33;
  --text-muted-onDark:#9AA5B1;
  --text-muted-onPaper:#6B6255;
  --line:#DED4BE;
}
*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  background:var(--ink);
  color:var(--paper);
  font-family:'Inter',sans-serif;
  min-height:100vh;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
::selection{ background:var(--amber); color:var(--ink); }

.wrap{
  max-width:920px;
  margin:0 auto;
  padding:0 20px 80px;
}

/* ===== 헤더 ===== */
header.top{
  position:sticky;
  top:0;
  z-index:80;
  background:var(--ink);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0 10px;
  margin-bottom:6px;
  flex-wrap:wrap;
  gap:8px;
}
body.has-update-banner header.top{ top:42px; }
.brand-group{
  display:flex;
  align-items:center;
  gap:10px;
}
.header-icon{
  width:28px; height:28px;
  border-radius:8px;
  object-fit:cover;
  flex-shrink:0;
}
.hamburger{
  width:34px; height:34px;
  border-radius:9px;
  border:none;
  background:var(--ink-soft);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  cursor:pointer;
  flex-shrink:0;
}
.hamburger span{
  width:16px; height:2px;
  background:var(--amber-soft);
  border-radius:2px;
}
.brand{
  font-family:'Fraunces',serif;
  font-weight:700;
  font-size:26px;
  letter-spacing:-0.01em;
  color:var(--paper);
}
.brand span{ color:var(--amber); }

.header-meta{
  font-family:'IBM Plex Mono',monospace;
  font-size:11.5px;
  color:var(--text-muted-onDark);
  letter-spacing:0.02em;
  display:flex;
  align-items:center;
  gap:6px;
  white-space:nowrap;
}
.header-meta .dot{ opacity:0.5; }

/* ===== 일별 타임라인 구분선 ===== */
.day-divider{
  grid-column:1 / -1;
  display:flex;
  align-items:center;
  gap:10px;
  margin:14px 0 2px;
  font-family:'IBM Plex Mono',monospace;
  font-size:11.5px;
  color:var(--text-muted-onDark);
}
.day-divider::after{
  content:'';
  flex:1;
  height:1px;
  background:rgba(255,255,255,0.1);
}
.day-divider:first-child{ margin-top:0; }

/* ===== 맨 위로 가기 버튼 ===== */
.to-top-btn{
  position:fixed;
  right:18px;
  bottom:24px;
  width:42px; height:42px;
  border-radius:50%;
  border:none;
  background:var(--amber);
  color:var(--ink);
  font-size:18px;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 6px 18px rgba(0,0,0,0.4);
  opacity:0;
  pointer-events:none;
  transform:translateY(8px);
  transition:opacity .18s ease, transform .18s ease;
  z-index:55;
}
.to-top-btn.show{ opacity:1; pointer-events:auto; transform:translateY(0); }

/* ===== 캡처 바 ===== */
.capture{
  background:var(--paper);
  border-radius:14px;
  padding:16px 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  position:relative;
  margin-bottom:22px;
}
.capture-row{
  display:flex;
  gap:10px;
  align-items:flex-end;
}
.capture-input-wrap{
  position:relative;
  flex:1;
  min-width:0;
}
textarea#captureInput{
  width:100%;
  resize:none;
  border:none;
  background:transparent;
  font-family:'Inter',sans-serif;
  font-size:15px;
  color:var(--text-dark);
  line-height:1.5;
  padding:6px 2px;
  min-height:34px;
  max-height:160px;
  outline:none;
  position:relative;
  z-index:1;
}
.capture-placeholder{
  position:absolute;
  top:6px; left:2px; right:2px;
  pointer-events:none;
  color:var(--text-muted-onPaper);
  font-family:'Inter',sans-serif;
  line-height:1.5;
  z-index:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.capture-placeholder.hide{ display:none; }
.cp-line1{ display:inline; font-size:15px; }
.cp-line2{ display:inline; font-size:15px; margin-left:6px; }
.cp-line2::before{ content:'· '; }
.tag-input-wrap{
  margin-top:8px;
  display:flex;
  align-items:center;
  gap:8px;
}
input#tagInput{
  flex:1;
  border:none;
  border-top:1px solid var(--line);
  background:transparent;
  font-family:'IBM Plex Mono',monospace;
  font-size:12px;
  color:var(--text-muted-onPaper);
  padding:8px 2px 0;
  outline:none;
}
input#tagInput::placeholder{ color:#B8AE9A; }
.photo-btn{
  flex-shrink:0;
  background:var(--paper-dim);
  color:var(--text-dark);
  border:none;
  border-radius:10px;
  padding:10px 14px;
  font-size:16px;
  cursor:pointer;
  transition:background .12s ease;
}
.photo-btn:hover{ background:var(--line); }
.save-btn{
  flex-shrink:0;
  background:var(--ink);
  color:var(--amber-soft);
  border:none;
  border-radius:10px;
  padding:10px 18px;
  font-family:'Inter',sans-serif;
  font-weight:600;
  font-size:14px;
  cursor:pointer;
  transition:transform .12s ease, background .12s ease;
}
.save-btn:hover{ background:#0f151b; transform:translateY(-1px); }
.save-btn:active{ transform:translateY(0); }
.save-btn:focus-visible, textarea:focus-visible, input:focus-visible, .chip:focus-visible, .card:focus-visible{
  outline:2px solid var(--amber);
  outline-offset:2px;
}


/* ===== 검색 ===== */
.controls{
  display:flex;
  gap:10px;
  align-items:center;
  margin-bottom:14px;
  flex-wrap:wrap;
}
.search-box{
  flex:1;
  min-width:180px;
  background:var(--ink-soft);
  border-radius:10px;
  padding:9px 14px;
  display:flex;
  align-items:center;
  gap:8px;
}
.search-box svg{ flex-shrink:0; opacity:0.6; }
input#searchInput{
  flex:1;
  border:none;
  background:transparent;
  color:var(--paper);
  font-family:'Inter',sans-serif;
  font-size:14px;
  outline:none;
  min-width:0;
}
input#searchInput::placeholder{ color:var(--text-muted-onDark); }

.select-toggle-btn{
  flex-shrink:0;
  font-family:'IBM Plex Mono',monospace;
  font-size:12px;
  padding:9px 14px;
  border-radius:10px;
  border:1px solid var(--ink-soft);
  background:var(--ink-soft);
  color:var(--paper);
  cursor:pointer;
  transition:border-color .12s ease;
}
.select-toggle-btn:hover{ border-color:var(--amber); }
.select-toggle-btn.active{ background:var(--amber); color:var(--ink); border-color:var(--amber); font-weight:600; }

.selection-toolbar{
  display:none;
  align-items:center;
  gap:14px;
  background:var(--ink-soft);
  border-radius:10px;
  padding:10px 14px;
  margin-bottom:16px;
  flex-wrap:wrap;
}
.selection-toolbar.show{ display:flex; }
.select-all-row{
  display:flex;
  align-items:center;
  gap:6px;
  font-family:'Inter',sans-serif;
  font-size:13px;
  color:var(--paper);
  cursor:pointer;
}
.select-all-row input{ accent-color:var(--amber); width:auto; }
.selection-count{
  font-family:'IBM Plex Mono',monospace;
  font-size:12px;
  color:var(--text-muted-onDark);
  flex:1;
}
.selection-actions{ display:flex; gap:8px; }

.selection-toolbar-bottom{
  position:fixed;
  left:0; right:0; bottom:0;
  z-index:70;
  border-radius:14px 14px 0 0;
  margin-bottom:0;
  box-shadow:0 -8px 24px rgba(0,0,0,0.4);
  padding-bottom:calc(10px + env(safe-area-inset-bottom, 0px));
}
.selection-toolbar-bottom.show{ display:flex; }

@media (max-width:600px){
  .selection-toolbar .modal-btn{
    padding:7px 10px;
    font-size:11.5px;
  }
  .selection-toolbar{ gap:8px; padding:9px 10px; }
  .selection-actions{ gap:5px; }
  .select-all-row{ font-size:12px; }
  .selection-count{ font-size:10.5px; }
}

.tag-toggle-btn{
  display:inline-flex;
  align-items:center;
  gap:4px;
  background:transparent;
  border:none;
  color:var(--text-muted-onDark);
  font-family:'IBM Plex Mono',monospace;
  font-size:11.5px;
  padding:4px 2px;
  margin-bottom:8px;
  cursor:pointer;
}
.tag-toggle-btn:hover{ color:var(--amber); }

.tag-row{
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding-bottom:6px;
  margin-bottom:22px;
  scrollbar-width:thin;
}
.chip{
  font-family:'IBM Plex Mono',monospace;
  font-size:12px;
  padding:6px 12px;
  border-radius:999px;
  border:1px solid var(--ink-soft);
  background:transparent;
  color:var(--text-muted-onDark);
  cursor:pointer;
  white-space:nowrap;
  transition:all .12s ease;
}
.chip:hover{ border-color:var(--amber); color:var(--paper); }
.chip.active{ background:var(--amber); color:var(--ink); border-color:var(--amber); font-weight:500; }

/* ===== 카드 그리드 (정사각형 타일, 여백 없이 구분선) ===== */
.grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:1px;
  background:var(--ink);
}
.card{
  position:relative;
  aspect-ratio:1/1;
  overflow:hidden;
  background:var(--paper);
  color:var(--text-dark);
  text-decoration:none;
  cursor:pointer;
}
.card .thumb{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  background:var(--paper-dim);
  display:block;
}
.card .no-thumb{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  background:linear-gradient(135deg, var(--paper-dim), var(--paper));
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:'Fraunces',serif;
  font-size:34px;
  color:var(--line);
}
.card .body{
  position:absolute;
  left:0; right:0; bottom:0;
  padding:10px 10px 8px;
  background:linear-gradient(to top, rgba(10,13,16,0.92) 15%, rgba(10,13,16,0.55) 55%, rgba(10,13,16,0) 100%);
}
.card .no-label, .card .source{ display:none; }
.card .title{
  font-family:'Fraunces',serif;
  font-weight:600;
  font-size:14.5px;
  line-height:1.3;
  color:#fff;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.card .desc{
  margin-top:3px;
  font-size:11.5px;
  line-height:1.4;
  color:rgba(255,255,255,0.82);
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.card .meta-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
  padding-top:6px;
}
.card .tags{
  display:flex;
  gap:4px;
  flex-wrap:wrap;
  overflow:hidden;
  max-height:20px;
}
.card .tag-pill{
  font-family:'IBM Plex Mono',monospace;
  font-size:9.5px;
  background:rgba(255,255,255,0.18);
  color:#fff;
  padding:2px 7px;
  border-radius:999px;
  white-space:nowrap;
}
.card .date{
  font-family:'IBM Plex Mono',monospace;
  font-size:10px;
  color:rgba(255,255,255,0.75);
  white-space:nowrap;
  flex-shrink:0;
}
.card .del-btn{
  position:absolute;
  top:8px; right:8px;
  width:24px; height:24px;
  border-radius:50%;
  border:none;
  background:rgba(247,242,231,0.92);
  color:var(--text-dark);
  font-size:12px;
  line-height:1;
  cursor:pointer;
  opacity:1;
  box-shadow:0 2px 6px rgba(0,0,0,0.3);
  transition:background .12s ease, color .12s ease;
  display:flex;align-items:center;justify-content:center;
  z-index:2;
}
.card .edit-btn{
  position:absolute;
  top:8px; left:8px;
  width:24px; height:24px;
  border-radius:50%;
  border:none;
  background:rgba(247,242,231,0.92);
  color:var(--text-dark);
  font-size:11px;
  line-height:1;
  cursor:pointer;
  opacity:1;
  box-shadow:0 2px 6px rgba(0,0,0,0.3);
  transition:background .12s ease, color .12s ease;
  display:flex;align-items:center;justify-content:center;
  z-index:2;
}
.card .del-btn:hover{ background:var(--rust); color:#fff; }
.card .edit-btn:hover{ background:var(--amber); color:var(--ink); }

.card .share-btn{
  position:absolute;
  bottom:10px; right:10px;
  width:26px; height:26px;
  border-radius:50%;
  border:none;
  background:rgba(247,242,231,0.92);
  color:var(--text-dark);
  font-size:14px;
  line-height:1;
  cursor:pointer;
  opacity:0;
  box-shadow:0 2px 6px rgba(0,0,0,0.25);
  transition:opacity .12s ease, background .12s ease, color .12s ease;
  display:flex;align-items:center;justify-content:center;
}
.card:hover .share-btn{ opacity:1; }
.card .share-btn:hover{ background:var(--ink); color:var(--amber-soft); }

.card .card-checkbox{
  position:absolute;
  top:12px; left:10px;
  width:24px; height:24px;
  z-index:5;
  accent-color:var(--amber);
  cursor:pointer;
}
.card.selectable{ cursor:pointer; }

/* ===== 리스트 보기 모드 ===== */
.grid.list-view{
  display:flex;
  flex-direction:column;
  gap:1px;
  background:var(--ink);
}
.list-view .day-divider{ padding:0 2px; }
.list-view .card{
  aspect-ratio:auto;
  display:flex;
  flex-direction:row;
  align-items:stretch;
  min-height:80px;
}
.list-view .card .thumb,
.list-view .card .no-thumb{
  position:static;
  width:80px;
  height:auto;
  flex-shrink:0;
  font-size:24px;
}
.list-view .card .body{
  position:static;
  flex:1;
  min-width:0;
  background:none;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:3px;
  padding:8px 12px;
}
.list-view .card .title{
  color:var(--text-dark);
  -webkit-line-clamp:1;
  font-size:14px;
}
.list-view .card .desc{
  display:-webkit-box;
  color:var(--text-muted-onPaper);
  -webkit-line-clamp:1;
}
.list-view .card .tags{ max-height:none; }
.list-view .card .tag-pill{
  background:var(--ink);
  color:var(--amber-soft);
}
.list-view .card .date{ color:var(--text-muted-onPaper); }
.list-view .card .meta-row{ padding-top:2px; }

.card.selected{
  outline:2px solid var(--amber);
  outline-offset:-2px;
}

.empty{
  text-align:center;
  padding:60px 20px;
  color:var(--text-muted-onDark);
  font-family:'IBM Plex Mono',monospace;
  font-size:13px;
}
.empty .big{
  font-family:'Fraunces',serif;
  font-size:20px;
  color:var(--paper);
  display:block;
  margin-bottom:8px;
}

/* ===== 토스트 ===== */
.toast{
  position:fixed;
  bottom:24px;
  left:50%;
  transform:translateX(-50%) translateY(16px);
  background:var(--ink);
  color:var(--amber-soft);
  border:1px solid var(--amber);
  padding:12px 22px;
  border-radius:999px;
  font-family:'Inter',sans-serif;
  font-size:14px;
  font-weight:500;
  opacity:0;
  pointer-events:none;
  transition:opacity .25s ease, transform .25s ease;
  box-shadow:0 10px 28px rgba(0,0,0,0.45);
  z-index:60;
  white-space:nowrap;
  max-width:90vw;
  overflow:hidden;
  text-overflow:ellipsis;
}
.toast.show{
  opacity:1;
  transform:translateX(-50%) translateY(0);
}

/* ===== 모달 공통 (편집/인트로) ===== */
.modal-backdrop{
  position:fixed; inset:0;
  background:rgba(10,13,16,0.6);
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  z-index:100;
}
.modal-backdrop.show{ display:flex; }
.modal{
  background:var(--paper);
  border-radius:14px;
  padding:22px;
  width:100%;
  max-width:440px;
  max-height:85vh;
  overflow-y:auto;
  color:var(--text-dark);
}
.modal h3{
  font-family:'Fraunces',serif;
  font-size:19px;
  margin:0 0 16px;
}
.modal label{
  display:block;
  font-family:'IBM Plex Mono',monospace;
  font-size:11px;
  color:var(--text-muted-onPaper);
  margin:14px 0 5px;
}
.modal input, .modal textarea{
  width:100%;
  border:1px solid var(--line);
  border-radius:8px;
  padding:9px 11px;
  font-family:'Inter',sans-serif;
  font-size:14px;
  color:var(--text-dark);
  background:#fff;
  outline:none;
  resize:vertical;
}
.modal input:focus, .modal textarea:focus{ border-color:var(--amber); }
.modal-actions{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:20px;
  gap:8px;
}
.modal-actions .left{ display:flex; gap:8px; }
.modal-btn{
  font-family:'Inter',sans-serif;
  font-size:13px;
  font-weight:600;
  padding:9px 16px;
  border-radius:9px;
  border:none;
  cursor:pointer;
}
#refreshPreviewBtn{
  line-height:1.15;
  text-align:center;
}
@media (max-width:480px){
  .modal-actions{ gap:6px; }
  .modal-actions .left{ gap:6px; }
  .modal-btn{ padding:8px 10px; font-size:11.5px; }
  #refreshPreviewBtn{ padding:6px 9px; font-size:10.5px; }
}
.modal-btn.primary{ background:var(--ink); color:var(--amber-soft); }
.modal-btn.ghost{ background:transparent; color:var(--text-muted-onPaper); }
.modal-btn.refresh{ background:var(--paper-dim); color:var(--text-dark); font-weight:500; }
.modal-btn.danger{ background:var(--rust); color:#fff; }
.modal-actions.wrap-actions{ justify-content:flex-end; flex-wrap:wrap; }

.confirm-desc{
  font-size:13px;
  line-height:1.6;
  color:var(--text-muted-onPaper);
  margin:0 0 8px;
}
.confirm-desc.muted{
  font-size:12px;
  background:var(--paper-dim);
  padding:9px 11px;
  border-radius:8px;
}

/* ===== 크게 보기 모달 (메모/긴 텍스트) ===== */
.view-modal{
  max-width:600px;
  max-height:88vh;
}
.view-meta{
  font-family:'IBM Plex Mono',monospace;
  font-size:11px;
  color:var(--text-muted-onPaper);
  margin-bottom:12px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}
.view-content{
  font-family:'Inter',sans-serif;
  font-size:14.5px;
  line-height:1.7;
  color:var(--text-dark);
  white-space:pre-wrap;
  word-break:break-word;
  max-height:55vh;
  overflow-y:auto;
  padding:14px 16px;
  background:var(--paper-dim);
  border-radius:10px;
}

/* ===== 인트로 모달 ===== */
.intro-top-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding-bottom:12px;
  margin-bottom:14px;
  border-bottom:1px dashed var(--line);
}
.intro-banner{
  display:block;
  width:100%;
  max-height:180px;
  object-fit:cover;
  border-radius:10px;
  margin-bottom:14px;
}
.auto-backup-notice{
  font-size:11.5px;
  line-height:1.6;
  color:var(--text-muted-onPaper);
  background:var(--paper-dim);
  padding:10px 12px;
  border-radius:8px;
  margin:16px 0 0;
}
.checkbox-row.inline{
  margin-top:0 !important;
  font-size:12.5px !important;
}
.intro-modal section{ margin-bottom:14px; }
.intro-modal h4{
  font-family:'Inter',sans-serif;
  font-size:13.5px;
  margin:0 0 6px;
  color:var(--text-dark);
}
.intro-modal p{
  font-size:13px;
  line-height:1.6;
  color:var(--text-muted-onPaper);
  margin:0 0 4px;
}
.checkbox-row{
  display:flex !important;
  align-items:center;
  gap:8px;
  font-family:'Inter',sans-serif !important;
  font-size:13px !important;
  color:var(--text-muted-onPaper) !important;
  margin-top:16px !important;
  cursor:pointer;
}
.checkbox-row input{ width:auto !important; accent-color:var(--amber); }

/* ===== 서랍 메뉴 ===== */
.drawer-overlay{
  position:fixed; inset:0;
  background:rgba(10,13,16,0.55);
  opacity:0;
  pointer-events:none;
  transition:opacity .2s ease;
  z-index:90;
}
.drawer-overlay.show{ opacity:1; pointer-events:auto; }
.drawer{
  position:fixed;
  top:0; left:0; bottom:0;
  width:270px;
  max-width:82vw;
  background:var(--ink-soft);
  z-index:95;
  transform:translateX(-100%);
  transition:transform .22s ease;
  display:flex;
  flex-direction:column;
  padding:18px 16px;
  box-shadow:8px 0 30px rgba(0,0,0,0.4);
  overflow-y:auto;
}
.drawer.show{ transform:translateX(0); }
.drawer-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:18px;
}
.drawer-title{
  font-family:'Fraunces',serif;
  font-weight:700;
  font-size:18px;
  color:var(--paper);
  display:flex;
  align-items:center;
  gap:0;
}
.drawer-icon{
  width:26px; height:26px;
  border-radius:7px;
  object-fit:cover;
  flex-shrink:0;
}
.drawer-close{
  background:transparent;
  border:none;
  color:var(--text-muted-onDark);
  font-size:16px;
  cursor:pointer;
  width:28px; height:28px;
}
.drawer-nav{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.drawer-item{
  text-align:left;
  background:transparent;
  border:none;
  color:var(--paper);
  font-family:'Inter',sans-serif;
  font-size:14px;
  padding:11px 10px;
  border-radius:9px;
  cursor:pointer;
  transition:background .12s ease;
}
.drawer-item:hover{ background:rgba(255,255,255,0.06); }

.drawer-section-title{
  font-family:'IBM Plex Mono',monospace;
  font-size:10.5px;
  letter-spacing:0.05em;
  color:var(--text-muted-onDark);
  margin:14px 4px 6px;
}
.drawer-folder-list{
  display:flex;
  flex-direction:column;
  gap:2px;
  margin-bottom:4px;
}
.folder-row{
  display:flex;
  align-items:center;
  gap:4px;
}
.folder-toggle-btn{
  flex-shrink:0;
  width:16px; height:16px;
  border:none;
  background:transparent;
  color:var(--text-muted-onDark);
  font-size:10px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}
.folder-toggle-btn:hover{ color:var(--amber); }
.folder-toggle-spacer{ width:16px; flex-shrink:0; }
.folder-open-btn{
  flex:1;
  min-width:0;
  text-align:left;
  background:transparent;
  border:none;
  color:var(--paper);
  font-family:'Inter',sans-serif;
  font-size:12.5px;
  padding:8px 8px;
  border-radius:9px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
  transition:background .12s ease;
  overflow:hidden;
}
.folder-open-btn span:first-child{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.folder-open-btn:hover{ background:rgba(255,255,255,0.06); }
.folder-row.active .folder-open-btn{ background:rgba(226,163,61,0.16); color:var(--amber-soft); font-weight:600; }
.folder-count{
  font-family:'IBM Plex Mono',monospace;
  font-size:10.5px;
  color:var(--text-muted-onDark);
  flex-shrink:0;
}
.folder-del-btn, .folder-rename-btn, .folder-sub-btn{
  flex-shrink:0;
  width:23px; height:23px;
  border-radius:50%;
  border:none;
  background:transparent;
  color:var(--text-muted-onDark);
  font-size:12px;
  cursor:pointer;
}
.folder-del-btn:hover{ background:var(--rust); color:#fff; }
.folder-rename-btn:hover{ background:var(--amber); color:var(--ink); }
.folder-sub-btn:hover{ background:rgba(255,255,255,0.15); color:var(--paper); }
.folder-empty-hint{
  font-family:'Inter',sans-serif;
  font-size:12px;
  color:var(--text-muted-onDark);
  padding:6px 10px 10px;
}

/* ===== 자동 백업 관리 모달 ===== */
#autoBackupSearch{
  margin-top:12px;
}
.auto-backup-list{
  margin-top:12px;
  max-height:280px;
  overflow-y:auto;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.auto-backup-row{
  display:flex;
  align-items:center;
  gap:8px;
  background:var(--paper-dim);
  border-radius:8px;
  padding:8px 10px;
}
.auto-backup-info{
  flex:1;
  min-width:0;
}
.auto-backup-date{
  font-family:'IBM Plex Mono',monospace;
  font-size:12.5px;
  font-weight:600;
  color:var(--text-dark);
}
.auto-backup-meta{
  font-family:'IBM Plex Mono',monospace;
  font-size:10.5px;
  color:var(--text-muted-onPaper);
  margin-top:2px;
}
.auto-backup-actions{ display:flex; gap:6px; flex-shrink:0; }
.auto-backup-actions button{
  font-family:'Inter',sans-serif;
  font-size:11.5px;
  font-weight:600;
  padding:6px 10px;
  border-radius:7px;
  border:none;
  cursor:pointer;
}
.auto-backup-restore-btn{ background:var(--ink); color:var(--amber-soft); }
.auto-backup-delete-btn{ background:transparent; color:var(--rust); border:1px solid var(--rust) !important; }

.folder-context-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:var(--ink-soft);
  border-radius:10px;
  padding:9px 14px;
  margin-bottom:14px;
  font-family:'Inter',sans-serif;
  font-size:13px;
  color:var(--amber-soft);
  font-weight:600;
  gap:10px;
  flex-wrap:wrap;
}
.folder-context-actions{ display:flex; gap:8px; flex-shrink:0; }
.folder-context-bar button{
  background:transparent;
  border:1px solid rgba(255,255,255,0.15);
  color:var(--text-muted-onDark);
  font-family:'IBM Plex Mono',monospace;
  font-size:11px;
  padding:5px 10px;
  border-radius:999px;
  cursor:pointer;
}
.folder-context-bar button:hover{ border-color:var(--amber); color:var(--paper); }
#folderQuickAddBtn{ border-color:var(--amber); color:var(--amber-soft); }

.drawer-footer{
  margin-top:auto;
  padding-top:14px;
  border-top:1px solid rgba(255,255,255,0.08);
  display:flex;
  flex-direction:column;
  gap:4px;
}
.privacy-line{
  font-family:'IBM Plex Mono',monospace;
  font-size:10.5px;
  color:var(--text-muted-onDark);
  line-height:1.5;
}
.version-tag{
  font-family:'IBM Plex Mono',monospace;
  font-size:10px;
  color:#5B6672;
}
.copyright-tag{
  font-family:'IBM Plex Mono',monospace;
  font-size:9px;
  color:#454E58;
  margin-top:2px;
}
.contact-tag{
  font-family:'IBM Plex Mono',monospace;
  font-size:10px;
  color:var(--text-muted-onDark);
}

.update-banner{
  position:fixed;
  top:0; left:0; right:0;
  height:42px;
  background:var(--amber);
  color:var(--ink);
  font-family:'Inter',sans-serif;
  font-size:13px;
  font-weight:600;
  display:none;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:0 14px;
  z-index:120;
  text-align:center;
}
.update-banner.show{ display:flex; }
.update-banner button{
  background:var(--ink);
  color:var(--amber-soft);
  border:none;
  border-radius:8px;
  padding:6px 12px;
  font-size:12px;
  font-weight:600;
  cursor:pointer;
}
body.has-update-banner{ padding-top:42px; }

/* ===== 반응형 ===== */
@media (max-width:600px){
  .brand{font-size:22px;}
  .header-meta{ font-size:10px; gap:4px; }
  .grid{grid-template-columns:repeat(2, 1fr); gap:1px;}
  .select-toggle-btn{ padding:7px 10px; font-size:11px; }
  .card .body{padding:9px 9px 7px;}
  .card .title{font-size:12.5px; -webkit-line-clamp:2;}
  .card .desc{font-size:10px; -webkit-line-clamp:2;}
  .card .tag-pill{font-size:8.5px; padding:1px 6px;}
  .card .date{font-size:8.5px;}
  .card .del-btn{width:22px;height:22px;font-size:11px;top:8px;right:6px;}
  .card .edit-btn{width:22px;height:22px;font-size:10px;top:8px;left:6px;}
  .card .share-btn{display:none;}
  .card .edit-btn, .card .del-btn{ opacity:1; background:rgba(247,242,231,0.92); box-shadow:0 2px 5px rgba(0,0,0,0.3); }

  textarea#captureInput{ min-height:44px; font-size:13.5px; }
  .capture-placeholder{ white-space:normal; overflow:visible; text-overflow:clip; }
  .cp-line1{ display:block; font-size:13px; white-space:normal; }
  .cp-line2{ display:block; font-size:10.5px; margin-top:2px; margin-left:0; line-height:1.35; }
  .cp-line2::before{ content:''; }
  .capture{ padding:14px; }
}

@media (prefers-reduced-motion: reduce){
  *{ transition:none !important; }
}
