/* Defter kitaplığı */
.nb-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px 14px; margin-top: 18px; }
.nb-card { min-width: 0; }
.nb-cover {
  position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; border-radius: 6px 14px 14px 6px;
  color: #fff; text-align: left; overflow: hidden; box-shadow: 0 2px 4px rgb(40 25 15 / .22), 0 10px 20px rgb(40 25 15 / .18);
  transition: transform .15s;
}
.nb-cover:active { transform: scale(.97); }
.nb-spine { position: absolute; inset: 0 auto 0 0; width: 13px; background: rgb(0 0 0 / .17); border-right: 1px solid rgb(255 255 255 / .2); }
.nb-emoji { position: absolute; top: 22%; left: 13px; right: 0; text-align: center; font-size: 2.4rem; }
.nb-label {
  position: absolute; left: 24px; right: 10px; bottom: 14px; font-family: ui-serif, "New York", Georgia, serif;
  font-size: 1.02rem; font-weight: 650; line-height: 1.2; overflow-wrap: anywhere; text-shadow: 0 1px 3px rgb(0 0 0 / .35);
}
.nb-fav { position: absolute; top: 7px; right: 9px; color: #ffe27a; }
.nb-card-foot { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 0; }
.nb-more { min-width: 44px; height: 36px; font-size: 1.2rem; color: var(--muted); text-align: right; }
.nb-cover-picks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.nb-cover-pick { aspect-ratio: 3 / 4; border-radius: 4px 9px 9px 4px; }
.nb-cover-pick.on { outline: 3px solid var(--text); outline-offset: 2px; }

/* Tam ekran defter */
body.nb-open { overflow: hidden; position: fixed; inset: 0; width: 100%; }
body.nb-open .tabs, body.nb-open main { visibility: hidden; }
#nb-editor {
  position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; background: #3a3734; color: #fff;
  padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.nb-top { display: flex; align-items: center; gap: 2px; padding: 3px 6px; background: #2b2926; flex: none; }
.nb-title { flex: 1; min-width: 0; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .95rem; }
.nb-ic { width: 44px; height: 44px; flex: none; border-radius: 10px; color: #fff; font-size: 1.3rem; }
.nb-ic:disabled { opacity: .3; }
.nb-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; }
.nb-page { position: relative; flex: none; transform-origin: 0 0; box-shadow: 0 4px 18px rgb(0 0 0 / .45); border-radius: 3px; overflow: hidden; }
.nb-page canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#nb-live { cursor: crosshair; }
.nb-zoom { position: absolute; top: 8px; right: 8px; min-width: 44px; height: 36px; border-radius: 10px; background: rgb(0 0 0 / .6); color: #fff; font-weight: 700; }
/* Seçim çubuğu sayfanın üstünde durur, böylece açılınca sayfa yerinden oynamaz */
.nb-selbar { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 2; display: flex; gap: 6px; padding: 5px; border-radius: 12px; background: rgb(35 33 31 / .94); box-shadow: 0 3px 12px rgb(0 0 0 / .4); }
.nb-selbar button { min-width: 44px; height: 36px; padding: 0 12px; border-radius: 9px; background: #4a4642; color: #fff; font-size: .85rem; font-weight: 650; }
/* Araç değişince sayfa kaymasın diye panel yüksekliği sabittir */
.nb-panel { background: #2b2926; padding: 5px 10px 2px; flex: none; height: 88px; overflow: hidden; }
.nb-row.compact { gap: 4px; }
.nb-row.compact .nb-size { width: 35px; }
.nb-row { display: flex; align-items: center; gap: 6px; min-height: 38px; overflow-x: auto; scrollbar-width: none; }
.nb-row::-webkit-scrollbar { display: none; }
.nb-color { flex: none; width: 30px; height: 30px; margin: 3px 2px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .28); }
.nb-color.big { width: 42px; height: 42px; border-color: var(--line); }
.nb-color.on { outline: 2px solid #fff; outline-offset: 2px; }
#sheet .nb-color.on { outline-color: var(--accent); }
.nb-size { flex: none; display: grid; place-items: center; width: 40px; height: 34px; border-radius: 8px; background: #47433f; color: #fff; }
.nb-size i { display: block; background: #fff; border-radius: 50%; }
.nb-size.on { background: var(--accent); color: var(--on-accent); }
.nb-penonly { display: flex; align-items: center; gap: 5px; margin-left: auto; flex: none; font-size: .78rem; white-space: nowrap; min-height: 34px; }
.nb-penonly input { width: 18px; height: 18px; accent-color: var(--accent); }
.nb-hint { color: #cfc8c0; margin: 6px 2px 8px; font-size: .8rem; }
.nb-stickers { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nb-stickers::-webkit-scrollbar { display: none; }
.nb-stickers button { flex: none; width: 42px; height: 42px; border-radius: 9px; font-size: 1.5rem; }
.nb-stickers button.on { background: var(--accent); }
.nb-tools { display: flex; overflow-x: auto; background: #2b2926; flex: none; padding: 0 4px; scrollbar-width: none; }
.nb-tools::-webkit-scrollbar { display: none; }
.nb-tools button { flex: 1 0 44px; min-height: 50px; border-radius: 9px; color: #e8e2db; }
.nb-tools span { display: block; font-size: 1.15rem; line-height: 1.3; }
.nb-tools small { display: block; font-size: .56rem; white-space: nowrap; }
.nb-tools button.on { background: #55504b; color: #fff; }
.nb-pager { display: flex; align-items: center; justify-content: center; gap: 8px; background: #2b2926; flex: none; padding-bottom: 2px; font-size: .82rem; }
.nb-pager button { min-width: 44px; height: 34px; border-radius: 8px; color: #fff; font-size: 1.05rem; }
.nb-pager button:last-child { font-size: .8rem; font-weight: 700; padding: 0 10px; background: #47433f; }
.nb-pager button:disabled { opacity: .3; }

/* Sayfa seçimi */
.nb-papers, .nb-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.nb-papers button, .nb-thumbs button { padding: 5px; border-radius: 9px; background: var(--soft); font-size: .76rem; min-width: 0; }
.nb-papers canvas, .nb-thumbs canvas { display: block; width: 100%; height: auto; border-radius: 3px; margin-bottom: 4px; }
.nb-thumbs button.on { outline: 2px solid var(--accent); }
