
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap');

:root {
  --ink: #21191d;
  --black-cherry: #651f38;
  --cherry-rose: #a84457;
  --dusty-pink: #ce94a6;
  --moon-milk: #f1e3e4;
  --muted: #bda6ae;
  --border: rgba(206, 148, 166, 0.22);
  --panel: rgba(42, 29, 37, 0.94);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 15% 15%, rgba(101, 31, 56, 0.34), transparent 42%),
    radial-gradient(ellipse at 85% 80%, rgba(168, 68, 87, 0.16), transparent 45%),
    #171318;
  color: var(--moon-milk);
  font-family: 'DM Sans', sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

/* LOGIN */

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(100%, 440px);
  padding: clamp(28px, 6vw, 48px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.login-symbol {
  font-size: 42px;
  color: var(--dusty-pink);
  margin-bottom: 10px;
}

.login-eyebrow,
.dashboard-eyebrow {
  color: var(--dusty-pink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: 'Playfair Display', serif;
}

.login-card h1 {
  font-size: clamp(30px, 6vw, 39px);
  font-weight: 500;
  margin: 14px 0;
}

.login-subtitle {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 32px;
}

#loginForm {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 11px;
}

#loginForm label {
  font-size: 12px;
  font-weight: 600;
  color: var(--moon-milk);
}

#loginForm input {
  width: 100%;
  padding: 13px 15px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  color: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#loginForm input:focus {
  border-color: var(--dusty-pink);
  box-shadow: 0 0 0 3px rgba(206, 148, 166, 0.12);
}

#loginButton {
  margin-top: 8px;
  padding: 15px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(120deg, var(--black-cherry), var(--cherry-rose));
  color: white;
  font-weight: 700;
  transition: transform 0.2s, filter 0.2s;
}

#loginButton:hover {
  transform: translateY(-2px);
  filter: brightness(1.12);
}

#loginButton:disabled {
  opacity: 0.6;
  cursor: wait;
}

#loginMessage {
  min-height: 18px;
  font-size: 12px;
  color: var(--dusty-pink);
  text-align: center;
}

/* DASHBOARD */

.dashboard-screen {
  min-height: 100vh;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 28px clamp(20px, 5vw, 70px);
  border-bottom: 1px solid var(--border);
  background: rgba(33, 25, 29, 0.8);
}

.dashboard-header h1 {
  margin: 8px 0 0;
  font-size: clamp(25px, 4vw, 36px);
}

#logoutButton {
  padding: 11px 18px;
  background: transparent;
  border: 1px solid var(--dusty-pink);
  border-radius: 10px;
  color: var(--moon-milk);
}

#logoutButton:hover {
  background: rgba(206, 148, 166, 0.1);
}

.dashboard-content {
  max-width: 1180px;
  margin: 0 auto;
  padding: 55px 24px;
}

.dashboard-content h2 {
  font-size: 30px;
  margin-bottom: 8px;
}

.dashboard-content > p {
  color: var(--muted);
  margin-bottom: 32px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.dashboard-tile {
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
}

.dashboard-tile span {
  font-size: 28px;
}

.dashboard-tile h3 {
  margin: 16px 0 8px;
  font-size: 22px;
}

.dashboard-tile p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* MOBILE */

@media (max-width: 600px) {
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-content {
    padding: 32px 18px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-tile {
    padding: 22px;
  }

  .login-card {
    padding: 30px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}


/* ARCHIVIST NAVIGATION */

.dashboard-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

.view-site-link {
  color: var(--dusty-pink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.view-site-link:hover {
  color: var(--moon-milk);
}

.view-site-link:focus-visible {
  outline: 2px solid var(--dusty-pink);
  outline-offset: 5px;
  border-radius: 3px;
}

@media (max-width: 600px) {
  .dashboard-actions {
    width: 100%;
    justify-content: space-between;
  }
}


/* BOOK MANAGER */

.dashboard-tile-button {
  display: block;
  width: 100%;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.dashboard-tile-button:hover {
  border-color: var(--dusty-pink);
}

.dashboard-tile-button:focus-visible,
.back-link:focus-visible,
#addBookButton:focus-visible {
  outline: 2px solid var(--dusty-pink);
  outline-offset: 4px;
}

.manager-view {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 24px 70px;
}

.back-link {
  background: none;
  border: none;
  color: var(--dusty-pink);
  padding: 0;
  font-size: 13px;
}

.manager-heading {
  margin: 36px 0;
}

.manager-heading h2 {
  font-size: clamp(32px, 5vw, 44px);
  margin: 10px 0;
}

.manager-heading > p:last-child {
  color: var(--muted);
}

.manager-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

#bookCount {
  color: var(--muted);
  font-size: 13px;
}

#addBookButton {
  padding: 12px 18px;
  background: var(--black-cherry);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: white;
  font-weight: 600;
}

#addBookButton:hover {
  background: var(--cherry-rose);
}

.book-list {
  padding-top: 28px;
  color: var(--muted);
}

@media (max-width: 600px) {
  .manager-view {
    padding: 30px 18px;
  }

  .manager-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* BOOK COLLECTION */

.book-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.book-cover {
  width: 62px;
  height: 92px;
  object-fit: cover;
  border-radius: 5px;
  background: var(--panel);
}

.book-details h3 {
  margin: 0 0 7px;
  color: var(--moon-milk);
  font-size: 19px;
}

.book-details p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.book-genre {
  display: inline-block;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--dusty-pink);
  font-size: 11px;
}


/* ADD BOOK PANEL */

.add-book-panel {
  margin-top: 32px;
  padding: 30px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
}

.add-book-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.add-book-heading h3 {
  margin: 10px 0 0;
  font-size: 27px;
}

#closeAddBook {
  background: none;
  border: none;
  color: var(--dusty-pink);
  font-size: 20px;
}

.book-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.book-form-field {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.book-form-field label {
  font-size: 12px;
  font-weight: 600;
}

.book-form-field input {
  width: 100%;
  padding: 13px 14px;
  color: var(--moon-milk);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: none;
}

.book-form-field input:focus {
  border-color: var(--dusty-pink);
}

.book-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 28px;
}

.book-form-actions button {
  padding: 12px 20px;
  border-radius: 9px;
  font-weight: 600;
}

#cancelAddBook {
  background: transparent;
  color: var(--moon-milk);
  border: 1px solid var(--border);
}

#saveBookButton {
  background: var(--black-cherry);
  color: white;
  border: 1px solid var(--border);
}

#saveBookButton:disabled {
  opacity: 0.6;
  cursor: wait;
}

#addBookMessage {
  color: var(--dusty-pink);
  font-size: 13px;
}

@media (max-width: 600px) {
  .add-book-panel {
    padding: 22px;
  }

  .book-form-grid {
    grid-template-columns: 1fr;
  }
}


/* BOOK EDITOR */

#editBookForm {
  margin-top: 30px;
  padding: 30px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
}

#editBookMessage {
  color: var(--dusty-pink);
  font-size: 13px;
}

#updateBookButton {
  padding: 12px 22px;
  background: var(--black-cherry);
  color: white;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-weight: 600;
}

#updateBookButton:disabled {
  opacity: 0.6;
  cursor: wait;
}

@media (max-width: 600px) {
  #editBookForm {
    padding: 22px;
  }
}


.book-item-clickable {
  cursor: pointer;
}

.book-item-clickable:hover {
  background: rgba(206, 148, 166, 0.06);
}

.book-item-clickable:focus-visible {
  outline: 2px solid var(--dusty-pink);
  outline-offset: 3px;
}


/* LIVE BOOK COVER PREVIEW */

.editor-cover-area {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-bottom: 30px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.editor-cover-frame {
  flex: 0 0 120px;
  width: 120px;
  aspect-ratio: 2 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

#editCoverPreview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#editCoverPlaceholder {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.editor-cover-info h3 {
  margin: 8px 0;
  font-size: 24px;
}

.editor-cover-info > p:not(.dashboard-eyebrow) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

#editCoverStatus {
  min-height: 18px;
}

@media (max-width: 600px) {
  .editor-cover-area {
    align-items: flex-start;
    gap: 18px;
  }

  .editor-cover-frame {
    flex-basis: 95px;
    width: 95px;
  }

  .editor-cover-info h3 {
    font-size: 20px;
  }
}


/* KEEP THE ENTIRE BOOK COVER VISIBLE */

#editCoverPreview,
#addCoverPreview {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}


/* ✦ BOOK MANAGER — COMPACT COLLECTION */

.book-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  padding-top: 28px;
  align-items: start;
}

.book-item {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  min-height: 116px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color 0.2s, background 0.2s;
}

.book-item-clickable:hover {
  background: rgba(101, 31, 56, 0.22);
  border-color: var(--dusty-pink);
}

.book-cover {
  flex-shrink: 0;
  width: 58px;
  height: 86px;
  object-fit: contain;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.2);
}

.book-details {
  min-width: 0;
  flex: 1;
}

.book-details h3 {
  margin: 0 0 6px;
  color: var(--moon-milk);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.book-details p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.book-genre {
  display: inline-block;
  padding: 4px 7px;
  font-size: 10px;
  border-radius: 5px;
}

@media (max-width: 600px) {
  .book-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .book-item {
    min-height: 100px;
    padding: 12px;
  }
}


/* COLLECTION SEARCH & SORT */

.collection-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}

.collection-search {
  flex: 1;
  min-width: 0;
}

.collection-search input,
.collection-sort select {
  width: 100%;
  min-height: 44px;
  padding: 11px 14px;
  color: var(--moon-milk);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
}

.collection-search input:focus,
.collection-sort select:focus {
  outline: 2px solid var(--dusty-pink);
  outline-offset: 2px;
}

.collection-search input::placeholder {
  color: var(--muted);
}

.collection-sort {
  width: 180px;
}

.collection-sort select option {
  background: #21191d;
  color: #f1e3e4;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 600px) {
  .collection-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .collection-sort {
    width: 100%;
  }
}


/* BOOK DELETION */

.book-danger-zone {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.book-danger-zone h3 {
  margin: 0 0 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
}

.book-danger-zone p {
  max-width: 470px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

#deleteBookButton {
  flex-shrink: 0;
  padding: 11px 16px;
  background: transparent;
  border: 1px solid #a85c6d;
  border-radius: 9px;
  color: #f0a3b1;
  font-weight: 600;
}

#deleteBookButton:hover {
  background: rgba(168, 68, 87, 0.15);
}

#deleteBookButton:disabled {
  opacity: 0.5;
  cursor: wait;
}

@media (max-width: 600px) {
  .book-danger-zone {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* COLLAPSIBLE BOOK METADATA */

.editor-extra-details {
  display: grid;
  gap: 12px;
  margin-top: 32px;
}

.editor-details-group {
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.editor-details-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px 20px;
  cursor: pointer;
  color: var(--moon-milk);
  font-weight: 600;
  font-size: 14px;
}

.editor-details-group summary::marker {
  color: var(--dusty-pink);
}

.editor-details-group summary:focus-visible {
  outline: 2px solid var(--dusty-pink);
  outline-offset: -3px;
}

.details-hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.editor-details-content {
  padding: 20px;
  border-top: 1px solid var(--border);
}

.editor-details-content > .book-form-field {
  margin-bottom: 22px;
}

.book-form-field textarea {
  width: 100%;
  padding: 13px 14px;
  color: var(--moon-milk);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 9px;
  font: inherit;
  line-height: 1.6;
  resize: vertical;
}

.book-form-field textarea:focus {
  outline: 2px solid var(--dusty-pink);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .editor-details-group summary {
    padding: 16px;
  }

  .editor-details-content {
    padding: 16px;
  }
}


/* ✦ TROPES & TAGS */

.editor-tropes {
  margin-top: 30px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.editor-tropes-heading h3 {
  margin: 0 0 6px;
  color: var(--moon-milk);
  font-size: 16px;
}

.editor-tropes-heading p,
.trope-helper,
.trope-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.selected-tropes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.trope-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid var(--dusty-pink);
  border-radius: 30px;
  color: var(--moon-milk);
  background: rgba(206, 148, 166, 0.12);
  font-size: 12px;
}

.trope-chip button {
  padding: 0;
  border: 0;
  color: var(--dusty-pink);
  background: transparent;
  cursor: pointer;
  font-size: 16px;
}

.trope-picker {
  position: relative;
}

.trope-picker label {
  display: block;
  margin-bottom: 9px;
  color: var(--moon-milk);
  font-size: 12px;
}

#tropeSearch {
  width: 100%;
  padding: 12px 14px;
  color: var(--moon-milk);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
}

#tropeSearch:focus {
  outline: 2px solid var(--dusty-pink);
  outline-offset: 2px;
}

.trope-options {
  position: absolute;
  z-index: 10;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 210px;
  overflow-y: auto;
  margin-top: 6px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.trope-option {
  display: block;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 6px;
  color: var(--moon-milk);
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.trope-option:hover,
.trope-option:focus-visible {
  background: rgba(206, 148, 166, 0.15);
}

.trope-helper {
  margin-top: 14px;
}

@media (max-width: 600px) {
  .editor-tropes {
    padding: 16px;
  }
}


/* ✦ GENRE PICKER */

.editor-genres {
  margin-top: 30px;
}

#genreSearch {
  width: 100%;
  padding: 12px 14px;
  color: var(--moon-milk);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
}

#genreSearch:focus {
  outline: 2px solid var(--dusty-pink);
  outline-offset: 2px;
}


/* MULTIPLE GENRE LABELS */

.book-details .book-genre {
  margin: 3px 5px 3px 0;
}


/* ✦ BOOK EDITOR TABS */

.editor-tabs {
  display: flex;
  gap: 8px;
  margin: 28px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.editor-tab {
  padding: 12px 17px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: 0.2s ease;
}

.editor-tab:hover {
  color: var(--moon-milk);
  background: rgba(206, 148, 166, 0.08);
}

.editor-tab.active {
  color: var(--moon-milk);
  border-color: var(--border);
  background: rgba(206, 148, 166, 0.13);
}

.editor-tab:focus-visible {
  outline: 2px solid var(--dusty-pink);
  outline-offset: 2px;
}

.editor-tab-panel {
  padding: 10px 0 30px;
}

.journal-intro h3 {
  margin: 8px 0;
  color: var(--moon-milk);
  font-size: 23px;
}

.journal-intro > p:last-child {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.journal-empty-state {
  margin-top: 28px;
  padding: 50px 25px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
}

.journal-empty-icon {
  display: block;
  margin-bottom: 15px;
  color: var(--dusty-pink);
  font-size: 30px;
}

.journal-empty-state h4 {
  margin: 0 0 10px;
  color: var(--moon-milk);
  font-size: 17px;
}

.journal-empty-state p {
  max-width: 400px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

@media (max-width: 600px) {
  .editor-tabs {
    gap: 4px;
  }

  .editor-tab {
    flex: 1;
    padding: 11px 7px;
    font-size: 11px;
  }
}


/* ✦ READING JOURNAL */

.journal-entry-area {
  margin-top: 28px;
}

.journal-entry-area > h4 {
  margin: 24px 0 16px;
  color: var(--moon-milk);
  font-size: 16px;
}

#readingEntryForm {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

#readingEntryForm label {
  grid-column: 1 / -1;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

#readingEntryForm input,
#readingEntryForm select {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface, #241a21);
  color: var(--moon-milk);
  font: inherit;
  color-scheme: dark;
}

#readingEntryForm button[type="submit"] {
  grid-column: 1 / -1;
  margin-top: 16px;
  padding: 13px 20px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--dusty-pink);
  color: #1c1018;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

#readingEntryMessage {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--dusty-pink);
}

.journal-history-card {
  margin: 12px 0;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.journal-history-card h4 {
  margin: 0 0 8px;
  color: var(--moon-milk);
}

.journal-history-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 600px) {
  #readingEntryForm {
    grid-template-columns: 1fr;
    padding: 18px;
  }
}

/* ✦ CLICKABLE READING HISTORY */

.journal-history-clickable {
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.journal-history-clickable:hover {
  background: rgba(206, 148, 166, 0.09);
  border-color: var(--dusty-pink);
}

.journal-history-clickable:focus-visible {
  outline: 2px solid var(--dusty-pink);
  outline-offset: 3px;
}
/* THE ARCHIVIST'S DESK — dashboard expansion */
:root{--archive-rose:#c87985}
.dashboard-content{max-width:1320px}.desk-welcome{display:flex;align-items:center;justify-content:space-between;gap:25px;margin-bottom:28px}.desk-welcome h2{font-family:'Playfair Display',serif;font-weight:400;font-size:clamp(27px,3.5vw,40px);margin:8px 0 12px}.desk-welcome p{color:var(--muted);line-height:1.7;margin:0}.desk-welcome .dashboard-eyebrow{color:var(--dusty-pink);font-size:10px;letter-spacing:2px}.desk-site-link{color:var(--moon-milk);white-space:nowrap;text-decoration:none;border-bottom:1px solid var(--dusty-pink);padding:8px 0}.desk-notice{border:1px solid var(--border);border-left:3px solid var(--archive-rose);padding:18px 22px;border-radius:12px;background:#ce94a609;margin:30px 0}.desk-notice strong{font-size:13px;color:var(--dusty-pink)}.desk-notice p{font-size:13px;line-height:1.7;color:var(--muted);margin:7px 0 0}.desk-section-heading{display:flex;align-items:baseline;justify-content:space-between;gap:15px;margin:32px 0 18px}.desk-section-heading h3{margin:0;font-size:20px}.desk-section-heading>span{font-size:12px;color:var(--muted)}.dashboard-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.dashboard-tile-button{position:relative;display:flex;flex-direction:column;align-items:flex-start;text-align:left;color:var(--moon-milk);transition:border-color .2s,transform .2s;background:linear-gradient(135deg,#321f2b,#251a23)}.dashboard-tile-button:hover{border-color:var(--dusty-pink);transform:translateY(-3px)}.dashboard-tile h3{font-family:'Playfair Display',serif;font-size:23px;font-weight:400;margin:18px 0 10px}.dashboard-tile p{font-size:13px;line-height:1.7;color:var(--muted);margin:0 0 24px}.dashboard-tile b{font-size:11px;letter-spacing:.4px;font-weight:500;color:var(--dusty-pink);margin-top:auto}.dashboard-tile .desk-badge{display:block;font:500 8px/1.5 'DM Sans',sans-serif;letter-spacing:.8px;color:var(--muted);margin:10px 0 0}.desk-bottom{display:flex;align-items:center;justify-content:space-between;gap:22px;border-top:1px solid var(--border);padding-top:24px;margin-top:32px}.desk-bottom p{font-size:12px;line-height:1.6;color:var(--muted);max-width:600px}.desk-bottom button,.desk-tabs button,.desk-records button,.desk-form-actions button{border:1px solid var(--border);background:#ce94a60b;color:var(--moon-milk);padding:12px 16px;border-radius:10px;font:inherit;font-size:12px}.desk-workspace{max-width:1240px;margin:auto;padding:35px 24px 70px}.desk-workspace-heading{margin:30px 0}.desk-workspace h2{font:400 clamp(30px,4vw,44px) 'Playfair Display',serif;margin:12px 0}.desk-workspace-heading>p:last-child{color:var(--muted);line-height:1.7}.desk-tabs{display:flex;flex-wrap:wrap;gap:10px}.desk-tabs [aria-pressed=true],.desk-records [aria-pressed=true]{background:#651f38;border-color:var(--dusty-pink)}.desk-draft-notice{font-size:10px;letter-spacing:1px;color:var(--dusty-pink);margin:25px 0}.desk-editor-layout{display:grid;grid-template-columns:220px 1fr;gap:24px;align-items:start}.desk-editor-layout:has(>.desk-form:only-child){grid-template-columns:1fr}.desk-records{display:grid;gap:10px}.desk-records button{text-align:left;overflow-wrap:anywhere}.desk-records p{font-size:12px;color:var(--muted);padding:10px}.desk-form,.desk-empty{border:1px solid var(--border);background:var(--panel);border-radius:18px;padding:28px}.desk-form h3{margin:0 0 24px;font:400 25px 'Playfair Display',serif}.desk-fields{display:grid;grid-template-columns:1fr 1fr;gap:20px}.desk-fields label{display:grid;gap:9px;font-size:12px;color:var(--muted);margin:0}.desk-wide{grid-column:1/-1}.desk-fields :is(input,select,textarea){width:100%;min-width:0;background:#1c141c;border:1px solid var(--border);border-radius:8px;padding:12px;color:var(--moon-milk);font:400 14px/1.5 'DM Sans',sans-serif;color-scheme:dark}.desk-fields textarea{resize:vertical}.desk-form-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:26px}.desk-form-actions button[type=submit]{background:var(--black-cherry);border-color:var(--dusty-pink)}.desk-form-actions .desk-delete{margin-left:auto;color:var(--dusty-pink)}.desk-editor-note,.desk-empty{font-size:14px;color:var(--muted);line-height:1.8}.desk-editor-note{border-left:2px solid var(--dusty-pink);padding-left:16px;margin:0 0 24px}#deskStatus{color:var(--dusty-pink);font-size:13px;line-height:1.7}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--dusty-pink);outline-offset:4px}
@media(max-width:1000px){.dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.dashboard-grid,.desk-editor-layout,.desk-fields{grid-template-columns:1fr}.desk-welcome,.desk-bottom{align-items:flex-start;flex-direction:column}.desk-section-heading>span{display:none}.desk-records{grid-template-columns:repeat(2,minmax(0,1fr))}.desk-form{padding:20px}.desk-wide{grid-column:auto}.dashboard-tile{padding:24px}.desk-form-actions .desk-delete{margin-left:0}.desk-section-heading{margin-top:25px}}
@media(prefers-reduced-motion:reduce){.dashboard-tile-button{transition:none}.dashboard-tile-button:hover{transform:none}}
