/* notebook.css — the notebook hub. Sheets share character-sheet.css. */

.nb-book { max-width: 48rem; }

.nb-subtitle {
  font-family: ScalySansSmallCaps, ScalySans, sans-serif;
  opacity: .85;
  margin-bottom: 1rem;
}

.nb-chapters { flex-wrap: wrap; }

.nb-section-title {
  font-family: MrJeeves, serif;
  color: #58180D;
  font-size: 1.3rem;
  border-bottom: 2px solid #c9ad6a;
  margin: 1rem 0 .4rem;
}

.nb-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .45rem .3rem;
  border-bottom: 1px dotted rgba(88, 24, 13, .25);
  cursor: pointer;
}

.nb-row:hover { background: rgba(201, 173, 106, .15); }

.nb-row .nb-icon { color: #58180D; width: 1.3rem; text-align: center; }

.nb-row .nb-title {
  flex: 1;
  font-weight: bold;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nb-row .nb-when {
  font-family: ScalySans, sans-serif;
  font-size: .8rem;
  opacity: .7;
  white-space: nowrap;
}

.nb-detail {
  padding: .5rem .8rem .8rem 2.2rem;
  border-bottom: 1px dotted rgba(88, 24, 13, .25);
  background: rgba(238, 229, 206, .5);
}

.nb-detail .nb-links { margin: .3rem 0 .6rem; }

.nb-detail .nb-links a {
  color: #58180D;
  text-decoration: underline;
  cursor: pointer;
}

.nb-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.nb-actions a, .nb-actions button {
  font-family: ScalySansSmallCaps, ScalySans, sans-serif;
  font-size: .9rem;
  background: #EEE5CE;
  color: #58180D;
  border: 1px solid #c9ad6a;
  border-radius: .2rem;
  padding: .3rem .7rem;
  cursor: pointer;
  text-decoration: none;
}

.nb-actions a:hover, .nb-actions button:hover { background: #faf7ea; }

.nb-actions .nb-delete { color: #7a2a16; }

.nb-empty { opacity: .85; }

@media (max-width: 600px) {
  .nb-book { margin: .6rem .4rem 1.6rem; padding: 1.1rem 1rem; }
  .nb-row .nb-when { display: none; }
  .nb-detail { padding-left: 1rem; }
}

/* ── the cover ────────────────────────────────────────────────────────── */

.nb-cover {
  max-width: 26rem;
  margin: 2.5rem auto;
  aspect-ratio: 3 / 4;
  background: #3d1c12;
  border: 3px solid #c9ad6a;
  border-left-width: 10px;
  border-radius: .4rem 1rem 1rem .4rem;
  box-shadow: 6px 8px 20px rgba(0,0,0,.35), inset 0 0 60px rgba(0,0,0,.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: left center;
  transition: transform .8s ease-in-out, opacity .35s ease-in .45s;
  perspective: 1200px;
}

.nb-cover.opening {
  transform: rotateY(-84deg);
  opacity: 0;
}

.nb-cover-face { text-align: center; color: #e8d9b0; padding: 2rem; }
.nb-cover-face h1 {
  font-family: MrJeeves, serif;
  color: #e8d9b0;
  font-size: 2.4rem;
  margin: 1rem 0;
}
.nb-cover-rule {
  height: 2px; background: #c9ad6a; opacity: .7;
  width: 70%; margin: 0 auto;
}
.nb-cover-sub {
  font-family: ScalySansSmallCaps, ScalySans, sans-serif;
  letter-spacing: .12em;
  color: #c9ad6a;          /* explicit — must stay readable on the dark cover */
}

#nbBookWrap.revealed { animation: nbReveal .5s ease-out; }
@keyframes nbReveal {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* ── ledger rows, small actions, pending removals ─────────────────────── */

.nb-struck .nb-title { text-decoration: line-through; opacity: .55; }
.nb-struck .nb-icon  { opacity: .4; }

.nb-actions a, .nb-actions button {
  font-family: ScalySansSmallCaps, ScalySans, sans-serif;
  font-size: .78rem;
  padding: .15rem .55rem;
  background: #EEE5CE;
  color: #58180D;
  border: 1px solid #c9ad6a;
  border-radius: .2rem;
  cursor: pointer;
  text-decoration: none;
}

.nb-actions a:hover, .nb-actions button:hover { background: #faf7ea; }

.nb-openall {
  font-family: ScalySansSmallCaps, ScalySans, sans-serif;
  font-size: .75rem;
  margin-left: .6rem;
  padding: .1rem .5rem;
  background: #EEE5CE;
  color: #58180D;
  border: 1px solid #c9ad6a;
  border-radius: .2rem;
  cursor: pointer;
  vertical-align: middle;
}

.nb-openall:hover { background: #faf7ea; }

/* flat rows: title · descriptor · time · arrow · X */

.nb-row { display: flex; align-items: center; gap: .6rem; }
.nb-sub {
  font-family: ScalySansSmallCaps, ScalySans, sans-serif;
  font-size: .82rem;
  opacity: .75;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nb-title { flex: 0 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-go, .nb-x {
  flex: 0 0 auto;
  font-size: 12px;
  line-height: 1;
  padding: .3rem .45rem;
  background: #EEE5CE;
  color: #58180D;
  border: 1px solid #c9ad6a;
  border-radius: .2rem;
  cursor: pointer;
  text-decoration: none;
}
.nb-go:hover, .nb-x:hover { background: #faf7ea; }
.nb-x { border-color: #a05a4a; }

/* signed-out invitation inside the open book */

.nb-invite {
  max-width: 26rem;
  margin: 1.2rem auto 1.6rem;
  text-align: center;
  font-family: BookSanity, "Bookinsanity", Georgia, serif;
  color: #1f1508;
}

.nb-invite p { line-height: 1.5; }

.nb-invite-btn {
  display: inline-block;
  margin: .8rem 0 .3rem;
  font-family: MrJeeves, serif;
  font-size: 1.1rem;
  background: #58180D;
  color: #EEE5CE !important;
  border: 1px solid #c9ad6a;
  border-radius: .25rem;
  padding: .5rem 1.2rem;
  text-decoration: none;
}

.nb-invite-btn:hover { background: #7a2a16; }

.nb-invite-signin {
  font-family: ScalySansSmallCaps, ScalySans, sans-serif;
  font-size: .85rem;
}

.nb-invite-signin a { color: #58180D; text-decoration: underline; }
