/* Personal library. Existing bookmark URLs and actions are retained. */
.cabinet-page.bookmarks-page { --library-line: rgba(163, 131, 216, .23); }
.cabinet-page .bookmarks-main { min-height: auto; background: none; }
.cabinet-page .bookmarks-container { width: 100%; max-width: none; margin: 0; }
.cabinet-page .bookmarks-hero { margin: 0 0 28px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.cabinet-page .bookmarks-hero .eyebrow { margin: 0 0 10px; color: #a797bc; font-size: .69rem; letter-spacing: .14em; }
.cabinet-page .bookmarks-hero h1 { margin: 0 0 12px; color: #f5edf9; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 3.5vw, 3.35rem); font-weight: 500; line-height: 1.1; letter-spacing: -.025em; text-transform: none; }
.cabinet-page .bookmarks-hero > p:last-child { max-width: 58ch; color: #b7a9c9; font-size: .95rem; }
.cabinet-page .bookmarks-toolbar { display: grid; grid-template-columns: auto minmax(180px, 1fr); align-items: center; gap: 18px; margin-bottom: 22px; }
.cabinet-page .bookmarks-view-switch { display: flex; gap: 6px; padding: 4px; border: 1px solid var(--library-line); border-radius: 12px; background: rgba(24, 18, 37, .8); }
.cabinet-page .bookmarks-view-switch button { min-height: 42px; padding: 10px 18px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #c2b4d4; font: inherit; font-size: .87rem; cursor: pointer; }
.cabinet-page .bookmarks-view-switch button[aria-pressed="true"] { background: linear-gradient(125deg, #7740d8, #512598); border-color: #9762e4; color: #fff; box-shadow: 0 3px 15px #502a6c33; }
.cabinet-page .bookmarks-search { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 52px; padding: 0 16px; border: 1px solid var(--library-line); border-radius: 12px; background: rgba(26, 21, 38, .86); }
.cabinet-page .bookmarks-search svg { flex: 0 0 20px; width: 20px; height: 20px; color: #ad9dc5; stroke: currentColor; stroke-width: 1.6; }
.cabinet-page .bookmarks-search input { display: block; width: 100%; min-width: 0; min-height: 50px; margin: 0; padding: 8px 0; border: 0; border-radius: 0; background: transparent; color: #f2eaf8; font: inherit; font-size: 1rem; box-shadow: none; outline-offset: -2px; }
.cabinet-page .bookmarks-search input::placeholder { color: #9d8eaf; opacity: 1; }
.cabinet-page .bookmarks-search:focus-within { outline: 2px solid #ac7ce9; outline-offset: 2px; }
.cabinet-page .bookmarks-search input:focus-visible { outline: none; }
.cabinet-page .bookmarks-count { grid-column: 1 / -1; margin: -4px 0 0; color: #a899bc; font-size: .8rem; line-height: 1.5; }
.cabinet-page .bookmarks-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; }
.cabinet-page .bookmark-card { display: grid; grid-template-columns: minmax(150px, 30%) minmax(0, 1fr); min-width: 0; overflow: hidden; border: 1px solid var(--library-line); border-radius: 15px; background: linear-gradient(115deg, #191323, #110e1b); box-shadow: 0 8px 24px #08040c26; }
.cabinet-page .bookmark-preview { position: relative; min-width: 0; min-height: 210px; max-height: none; overflow: hidden; background: radial-gradient(circle at 50% 35%, #382752, #171021 75%); border-right: 1px solid #b99add12; }
.cabinet-page .bookmark-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.cabinet-page .bookmark-preview-note { display: grid; min-height: 210px; height: 100%; place-items: center; padding: 20px; color: #c6afd9; text-align: center; font-size: .85rem; }
.cabinet-page .bookmark-card-content { align-items: stretch; min-width: 0; padding: 22px; }
.cabinet-page .bookmark-card .bookmark-project { margin: 0 0 10px; color: #f0e7f7; font-family: Georgia, "Times New Roman", serif; font-weight: 500; font-size: clamp(1.3rem, 2vw, 1.75rem); line-height: 1.22; letter-spacing: -.02em; text-transform: none; overflow-wrap: anywhere; }
.cabinet-page .bookmark-chapter { margin: 0 0 5px; color: #d5c4e6; font-size: .92rem; line-height: 1.45; overflow-wrap: anywhere; }
.cabinet-page .bookmark-details { margin: 0 0 10px; color: #b2a1c7; font-size: .85rem; font-weight: 400; line-height: 1.5; overflow-wrap: anywhere; }
.cabinet-page .bookmark-card time { color: #9484a9; font-size: .75rem; line-height: 1.5; }
.cabinet-page .bookmark-actions { display: flex; flex-direction: row; align-items: center; gap: 10px; padding-top: 18px; }
.cabinet-page .bookmark-open,
.cabinet-page .bookmarks-empty .button { display: inline-flex; align-items: center; justify-content: center; min-width: 0; min-height: 44px; padding: 11px 15px; border: 1px solid #9164d4; border-radius: 9px; background: linear-gradient(115deg, #7640d2, #53299d); color: #fff; font: inherit; font-size: .84rem; font-weight: 500; text-align: center; text-decoration: none; text-transform: none; letter-spacing: 0; clip-path: none; box-shadow: none; white-space: normal; line-height: 1.4; }
.cabinet-page .bookmark-open::before,
.cabinet-page .bookmark-open::after,
.cabinet-page .bookmarks-empty .button::before,
.cabinet-page .bookmarks-empty .button::after { display: none; }
.cabinet-page .bookmark-open:hover,
.cabinet-page .bookmarks-empty .button:hover { background: linear-gradient(115deg, #8853e0, #6635b5); transform: none; }
.cabinet-page .bookmark-remove { flex: 0 0 auto; width: auto; min-height: 44px; padding: 8px 12px; border: 1px solid transparent; border-radius: 8px; background: none; color: #bba6cc; font: inherit; font-size: .78rem; letter-spacing: 0; cursor: pointer; }
.cabinet-page .bookmark-remove:hover { border-color: #bb698c55; background: #58244222; color: #f4b4ca; }
.cabinet-page .bookmark-remove:disabled { opacity: .55; cursor: wait; }
.cabinet-page .bookmarks-project-group { min-width: 0; border: 1px solid var(--library-line); border-radius: 15px; background: #15101f99; }
.cabinet-page .bookmarks-project-group > summary { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 16px 20px; color: #e8d8f3; cursor: pointer; list-style: none; }
.cabinet-page .bookmarks-project-group > summary::-webkit-details-marker { display: none; }
.cabinet-page .bookmarks-project-group > summary::after { content: "⌄"; margin-left: auto; color: #aa8bc6; font-size: 1.2rem; transform: rotate(-90deg); }
.cabinet-page .bookmarks-project-group[open] > summary::after { transform: none; }
.cabinet-page .bookmarks-group-title { min-width: 0; overflow-wrap: anywhere; font-family: Georgia, "Times New Roman", serif; font-size: 1.25rem; }
.cabinet-page .bookmarks-group-count { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; min-width: 28px; min-height: 28px; padding: 3px 8px; border: 1px solid #a777dd33; border-radius: 18px; background: #542a7b2b; color: #c4a1e6; font-size: .78rem; }
.cabinet-page .bookmarks-project-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 0 16px 16px; }
.cabinet-page .bookmarks-status { margin: 0 0 20px; border-color: var(--library-line); background: #1d142acc; color: #cab9da; overflow-wrap: anywhere; }
.cabinet-page .bookmarks-status[data-type="error"] { color: #f5b3c9; border-color: #bd69834d; }
.cabinet-page .bookmarks-status a { color: #cba5fc; }
.cabinet-page .bookmarks-retry { min-height: 44px; margin: 8px 0 0 16px; padding: 8px 16px; border: 1px solid #b18bd966; border-radius: 8px; background: #261932; color: #efdef9; font: inherit; cursor: pointer; }
.cabinet-page .bookmarks-empty { grid-column: 1 / -1; padding: 52px 24px; border-color: #aa80cd44; background: radial-gradient(ellipse at 50% 0, #39254f44, #17101f88); }
.cabinet-page .bookmarks-empty .bookmarks-empty-mark { color: #d2b681; font-family: Georgia, "Times New Roman", serif; }
.cabinet-page .bookmarks-empty h2 { color: #eddef5; font-family: Georgia, "Times New Roman", serif; font-weight: 500; font-size: 1.8rem; text-transform: none; }
.cabinet-page .bookmarks-empty p { color: #b7a7c7; font-size: .94rem; }
.cabinet-page .bookmarks-browse { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; margin-top: 24px; padding: 16px 20px; border: 1px solid var(--library-line); border-radius: 12px; background: #1a1323a8; color: #c4b0d8; text-decoration: none; font-size: .9rem; }
.cabinet-page .bookmarks-browse:hover { border-color: #9867cf88; color: #eee1f6; }
.cabinet-page .bookmarks-main :is(button, a, summary):focus-visible { outline: 2px solid #c29aee; outline-offset: 3px; }
.cabinet-page .bookmarks-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.cabinet-page .bookmarks-main [hidden] { display: none !important; }
@media (min-width: 1500px) {
  .cabinet-page .bookmarks-list[data-view="all"],
  .cabinet-page .bookmarks-project-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .cabinet-page .bookmarks-hero { margin-bottom: 22px; }
  .cabinet-page .bookmarks-hero h1 { font-size: 2.1rem; }
  .cabinet-page .bookmarks-toolbar { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 16px; }
  .cabinet-page .bookmarks-view-switch button { flex: 1; min-width: 0; padding: 10px; }
  .cabinet-page .bookmarks-count { margin: 0; font-size: .77rem; }
  .cabinet-page .bookmarks-list { gap: 12px; }
  .cabinet-page .bookmark-card { grid-template-columns: minmax(90px, 32%) minmax(0, 1fr); border-radius: 12px; }
  .cabinet-page .bookmark-preview { min-height: 216px; }
  .cabinet-page .bookmark-card-content { padding: 16px 13px; }
  .cabinet-page .bookmark-card .bookmark-project { font-size: 1.28rem; margin-bottom: 8px; }
  .cabinet-page .bookmark-chapter { font-size: .8rem; }
  .cabinet-page .bookmark-details { font-size: .78rem; }
  .cabinet-page .bookmark-card time { font-size: .69rem; }
  .cabinet-page .bookmark-actions { flex-direction: column; align-items: stretch; gap: 0; padding-top: 12px; }
  .cabinet-page .bookmark-open { font-size: .79rem; padding: 9px 8px; }
  .cabinet-page .bookmark-remove { min-height: 44px; padding: 8px; }
  .cabinet-page .bookmarks-project-group > summary { padding: 12px; }
  .cabinet-page .bookmarks-project-list { padding: 0 8px 8px; gap: 10px; }
  .cabinet-page .bookmarks-group-title { font-size: 1.1rem; }
  .cabinet-page .bookmarks-empty { padding: 38px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .cabinet-page .bookmark-preview img { transition: none; }
  .cabinet-page .bookmark-preview:hover img { transform: none; }
}
