.dbc-shelves-app{
  --dbc-bg:#ffffff;
  --dbc-text:#111827;
  --dbc-sub:#6b7280;
  --dbc-border:#e5e7eb;
  --dbc-soft:#f9fafb;
  --dbc-accent: var(--dbc-site-accent, #222);
  --dbc-danger:#b91c1c;
  --dbc-radius:14px;
  --dbc-row-radius:12px;
  --dbc-shadow:0 10px 22px rgba(17,24,39,.08);
  font-family: inherit; /* keep site default (Poppins) */
  font-size: 14px;
  font-weight: 400;
  color: var(--dbc-text);
}
.dbc-shelves-app *,
.dbc-shelves-app *::before,
.dbc-shelves-app *::after{ box-sizing: border-box; }
.dbc-shelves-app [hidden]{ display:none !important; }

/* Layout */
.dbc-shelves-app .dbc-shelves-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border:1px solid var(--dbc-border);
  border-radius: var(--dbc-radius);
  background: var(--dbc-bg);
  box-shadow: var(--dbc-shadow);
  margin-bottom: 14px;
}
.dbc-shelves-app .dbc-toolbar-left,
.dbc-shelves-app .dbc-toolbar-right{ display:flex; align-items:center; gap:10px; }
.dbc-shelves-app .dbc-bulk-visibility{ display:flex; align-items:center; gap:8px; }
.dbc-shelves-app .dbc-toolbar-note{ font-size:13px; color:var(--dbc-sub); }
.dbc-shelves-app .dbc-toolbar-note[hidden]{ display:none !important; }
.dbc-shelves-app .dbc-toolbar-note strong{ margin-left: 4px; }

.dbc-shelves-app .dbc-shelves-list{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.dbc-shelves-app.dbc-followed-shelves .dbc-followed-toolbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:14px 14px;
  margin-bottom: 0;
  flex-wrap:wrap;
}
.dbc-shelves-app.dbc-followed-shelves .dbc-followed-shell{
  border:1px solid var(--dbc-border);
  border-radius: var(--dbc-radius);
  background: rgba(255,255,255,.92);
  box-shadow: var(--dbc-shadow);
  overflow: hidden;
}
.dbc-shelves-app.dbc-followed-shelves .dbc-followed-toolbar{
  border-bottom: 1px solid rgba(17,24,39,.08);
}
.dbc-shelves-app.dbc-followed-shelves .dbc-followed-body{
  padding: 14px;
}
.dbc-shelves-app.dbc-followed-shelves .dbc-followed-toolbar-left{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width: min(520px, 100%);
}
.dbc-shelves-app.dbc-followed-shelves .dbc-followed-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.dbc-shelves-app.dbc-followed-shelves .dbc-followed-stats{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}
.dbc-shelves-app.dbc-followed-shelves .dbc-followed-sub{
  font-size:13px;
  color: var(--dbc-sub);
}
.dbc-shelves-app.dbc-followed-shelves .dbc-followed-toolbar-right{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
  min-width: min(520px, 100%);
}
.dbc-shelves-app.dbc-followed-shelves .dbc-followed-search input{
  width: min(320px, 72vw);
  border:1px solid var(--dbc-border);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
  font-family: "Poppins", sans-serif;
  background:#fff;
}
.dbc-shelves-app.dbc-followed-shelves .dbc-followed-search input:focus{
  outline: none;
  border-color: rgba(170,72,72,.55);
  box-shadow: 0 0 0 3px rgba(170,72,72,.14);
}
.dbc-shelves-app.dbc-followed-shelves .dbc-followed-select select{
  border:1px solid var(--dbc-border);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
  font-family: "Poppins", sans-serif;
  background:#fff;
}
.dbc-shelves-app.dbc-followed-shelves .dbc-followed-view{
  display:flex;
  gap:8px;
  align-items:center;
}
.dbc-shelves-app.dbc-followed-shelves .dbc-followed-view .dbc-btn{
  font-family: "Poppins", sans-serif;
}

/* Follow/unfollow icon toggle */
.dbc-shelves-app .dbc-follow-toggle .dbc-follow-icon{
  display:block;
}
.dbc-shelves-app .dbc-follow-toggle .dbc-follow-icon .dbc-heart{
  fill: transparent;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: fill .12s ease;
}
.dbc-shelves-app .dbc-follow-toggle.is-on .dbc-follow-icon .dbc-heart{
  fill: currentColor;
}
.dbc-shelves-app .dbc-follow-toggle{
  /* Match theme: clean circular icon button */
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 999px;
  border: 0;
  background: #fff;
  box-shadow: 0 10px 22px rgba(17,24,39,.10);
  justify-content: center;
}
.dbc-shelves-app .dbc-follow-toggle:hover{
  background: #fff;
  box-shadow: 0 14px 30px rgba(17,24,39,.14);
}
.dbc-shelves-app .dbc-follow-toggle.is-on{
  color: var(--dbc-accent);
}
.dbc-shelves-app[data-mode="followed"] .dbc-follow-toggle.is-on .dbc-follow-icon .dbc-heart{
  fill: #dc2626;
  stroke: none;
}
.dbc-shelves-app .dbc-follow-toggle:active{
  transform: translateY(1px);
}

/* Followers count: icon + number (like your reference) */
.dbc-shelves-app .dbc-follow-count{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color: rgba(17,24,39,.70);
  font-weight: 400;
  font-size: 13px;
  line-height: 1;
}
.dbc-shelves-app .dbc-follow-count .dbc-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color: rgba(17,24,39,.35);
}
.dbc-shelves-app .dbc-follow-count .dbc-heart-solid{
  fill: currentColor;
}
.dbc-shelves-app .dbc-follow-count-num{
  font-variant-numeric: tabular-nums;
}

/* Followed shelves: "Show books" and filter buttons – fix hover cutoff, reduce padding and text size */
.dbc-shelves-app[data-mode="followed"] .dbc-followed-card-actions{
  overflow: visible;
  flex-shrink: 0;
}
.dbc-shelves-app[data-mode="followed"] button[data-action="toggle-shelf"]{
  font-weight: 400;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  box-sizing: border-box;
}
.dbc-shelves-app.dbc-followed-shelves .dbc-followed-view .dbc-btn{
  width: 32px;
  height: 32px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 0;
  border-radius: 8px;
  font-size: 12px;
}
.dbc-shelves-app.dbc-followed-shelves .dbc-followed-view .dbc-btn .dbc-icon{
  display:block;
}
.dbc-shelves-app.dbc-followed-shelves .dbc-followed-view .dbc-btn[aria-pressed="true"]{
  border-color: rgba(170,72,72,.38);
  background: rgba(170,72,72,.10);
  color: var(--dbc-text);
}

/* Followed shelves: grid/list views – each card grows only with its own content */
.dbc-shelves-app[data-mode="followed"].is-grid .dbc-shelves-list{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:12px;
  align-items: start;
}
@media (max-width: 1100px){
  .dbc-shelves-app[data-mode="followed"].is-grid .dbc-shelves-list{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px){
  .dbc-shelves-app[data-mode="followed"].is-grid .dbc-shelves-list{
    grid-template-columns: 1fr;
  }
}
.dbc-shelves-app[data-mode="followed"].is-list .dbc-shelves-list{
  display:flex;
  flex-direction:column;
  gap:12px;
  align-items: stretch;
}

.dbc-shelves-app[data-mode="followed"] .dbc-shelf{
  min-height: 240px;
  box-shadow: 0 14px 30px rgba(17,24,39,.10);
  /* Clip header/background to rounded corners (prevents “square” corner bleed) */
  overflow: hidden;
  background-clip: padding-box;
}

/* Followed shelves: keep cards elevated, follow button with 1px black border when not active */
.dbc-shelves-app[data-mode="followed"] .dbc-follow-toggle{
  box-shadow: none;
  border: 1px solid #000;
}
.dbc-shelves-app[data-mode="followed"] .dbc-follow-toggle.is-on{
  border: none;
}
.dbc-shelves-app[data-mode="followed"] .dbc-follow-toggle:hover{
  box-shadow: none;
}

/* Public shelves should be one container list (not cards) */
.dbc-shelves-app[data-mode="public"] .dbc-shelves-list{
  border:1px solid var(--dbc-border);
  border-radius: var(--dbc-radius);
  background: rgba(255,255,255,.92);
  box-shadow: var(--dbc-shadow);
  overflow: hidden;
}
.dbc-shelves-app[data-mode="public"] .dbc-shelf{
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.dbc-shelves-app[data-mode="public"] .dbc-shelf + .dbc-shelf{
  border-top: 1px solid rgba(17,24,39,.08);
}
.dbc-shelves-app[data-mode="public"] .dbc-shelf-head{
  border-bottom: 0;
}
.dbc-shelves-app[data-mode="followed"] .dbc-shelf-head{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:8px;
  padding:10px 12px;
  border-bottom: none;
}
/* Row 1: Title (left) + Follow button (top right) */
.dbc-shelves-app[data-mode="followed"] .dbc-followed-card-top{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.dbc-shelves-app[data-mode="followed"] .dbc-followed-card-top .dbc-followed-card-title{
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
}
.dbc-shelves-app[data-mode="followed"] .dbc-followed-card-top .dbc-follow-toggle{
  flex-shrink: 0;
  padding: 4px;
  width: 28px;
  height: 28px;
}
.dbc-shelves-app[data-mode="followed"] .dbc-followed-card-title{
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  min-width: 0;
}
.dbc-shelves-app[data-mode="followed"] .dbc-followed-card-title .dbc-shelf-title-text{
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dbc-shelves-app[data-mode="followed"] .dbc-followed-card-followers-row{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: -12px;
}
.dbc-shelves-app[data-mode="followed"] .dbc-followed-card-followers{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  line-height: 1;
  color: var(--dbc-sub);
}
.dbc-shelves-app[data-mode="followed"] .dbc-followed-card-followers .dbc-icon{
  display: flex;
  align-items: center;
}
.dbc-shelves-app[data-mode="followed"] .dbc-followed-card-followers .dbc-heart-solid{
  fill: currentColor;
}
.dbc-shelves-app[data-mode="followed"] .dbc-followed-card-followers .dbc-follow-count-num{
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.dbc-shelves-app[data-mode="followed"] .dbc-followed-card-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
  margin-top: 12px;
}
/* Between amount of books and book preview: Show books (left) | shelf owner (right) — no border above this row */
.dbc-shelves-app[data-mode="followed"] .dbc-followed-card-between{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  margin-top: 14px;
}
.dbc-shelves-app[data-mode="followed"] .dbc-followed-card-between .dbc-followed-card-actions{
  margin: 0;
  padding: 0;
  border: 0;
  justify-content: flex-start;
}
.dbc-shelves-app[data-mode="followed"] .dbc-followed-card-between .dbc-followed-card-owner{
  font-size: 12px;
  color: var(--dbc-sub);
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50%;
}
.dbc-shelves-app[data-mode="followed"] .dbc-followed-card-owner .dbc-followed-by{
  margin-right: 2px;
}
.dbc-shelves-app[data-mode="followed"] .dbc-followed-card-owner a{
  color: inherit;
  text-decoration: none;
}
.dbc-shelves-app[data-mode="followed"] .dbc-followed-card-owner a:hover{
  text-decoration: underline;
}
.dbc-shelves-app[data-mode="followed"] .dbc-followed-card-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
}
.dbc-shelves-app[data-mode="followed"] .dbc-shelf-title-text{
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Border at red position: below Show books row, above "No preview yet" / book covers (always, including when 0 books) */
/* Full-width border below Show books row (no side gaps); content stays padded */
.dbc-shelves-app[data-mode="followed"] .dbc-followed-preview{
  margin-left: -12px;
  margin-right: -12px;
  padding: 8px 12px 0;
  border-top: 1px solid rgba(17,24,39,.08);
}
.dbc-shelves-app[data-mode="followed"] .dbc-followed-covers{
  display:flex;
  gap:8px;
  align-items:flex-end;
  flex-wrap:wrap;
}
.dbc-shelves-app[data-mode="followed"] .dbc-followed-cover{
  width: 40px;
  height: 58px;
  flex: 0 0 40px;
  object-fit: cover;
  object-position: center;
  border-radius: 0 6px 6px 0;
  box-shadow: 0 3px 8px rgba(17,24,39,.12);
  background: rgba(17,24,39,.04);
  display:block;
}
.dbc-shelves-app[data-mode="followed"] .dbc-followed-cover--placeholder{
  display:inline-block;
  background: linear-gradient(180deg, rgba(17,24,39,.07), rgba(17,24,39,.02));
}
.dbc-shelves-app[data-mode="followed"] .dbc-followed-preview-empty{
  font-size: 13px;
  color: var(--dbc-sub);
}

@media (max-width: 560px){
  .dbc-shelves-app.dbc-followed-shelves .dbc-followed-toolbar-right{
    justify-content:flex-start;
  }
  .dbc-shelves-app.dbc-followed-shelves .dbc-followed-search input{
    width: min(520px, 92vw);
  }
}

.dbc-shelves-manager{
  background: rgba(255,255,255,.92);
  border-radius: calc(var(--dbc-radius) + 2px);
  box-shadow: 0 18px 40px rgba(17,24,39,.10);
  border:1px solid rgba(17,24,39,.10);
  overflow: hidden;
  overflow-x: hidden;
}
.dbc-shelves-manager .dbc-manager-topbar{
  display:grid;
  grid-template-columns: 1fr auto auto;
  align-items:center;
  justify-content:stretch;
  gap:12px;
  padding:14px 16px;
  background: #fff;
  border-bottom:1px solid rgba(17,24,39,.10);
  overflow-x: hidden;
}
.dbc-shelves-manager .dbc-manager-tabs{
  display:flex;
  gap:4px;
  padding:10px 16px 0;
  background:#fff;
  border-bottom:1px solid rgba(17,24,39,.10);
}
.dbc-shelves-manager .dbc-manager-tab{
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--dbc-sub);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 10px 16px 12px;
  margin-bottom: -1px;
  cursor: pointer;
  border-radius: 0;
  transition: color .15s ease, border-color .15s ease;
}
.dbc-shelves-manager .dbc-manager-tab:hover{
  color: var(--dbc-text);
}
.dbc-shelves-manager .dbc-manager-tab.is-active{
  color: var(--dbc-accent);
  border-bottom-color: var(--dbc-accent);
}
.dbc-shelves-manager .dbc-manager-tab-pane{
  display: block;
  min-height: 320px;
}
.dbc-shelves-manager .dbc-manager-tab-pane[hidden]{
  display: none !important;
}
.dbc-shelves-manager .dbc-manager-overview{
  background: linear-gradient(180deg, rgba(17,24,39,.02), rgba(17,24,39,.04));
  border-bottom: 1px solid rgba(17,24,39,.08);
}
.dbc-shelves-manager .dbc-manager-overview-inner{
  padding: 20px 16px 24px;
  max-width: 900px;
}
.dbc-shelves-manager .dbc-manager-overview-inner .dbc-shelf-followers-wrap{
  margin-top: 0;
}
.dbc-shelf-followers-summary{
  font-size: 14px;
  color: var(--dbc-sub);
  margin: 0 0 12px 0;
  font-variant-numeric: tabular-nums;
}
.dbc-shelf-followers-chart-block .dbc-chart-empty{
  margin: 0;
  padding: 20px 0;
  color: var(--dbc-sub);
  font-size: 14px;
}
.dbc-shelf-followers-chart-block .dbc-chart-empty strong{
  color: var(--dbc-text);
}
.dbc-shelves-manager .dbc-topbar-center{
  justify-self: center;
  min-width: 220px; /* reserve space so the layout doesn’t jump */
  text-align: center;
}
.dbc-shelves-manager .dbc-selected-shelves-note{
  visibility: hidden; /* reserved space (no layout shift) */
}
.dbc-shelves-manager .dbc-selected-shelves-note.is-visible{
  visibility: visible;
}
.dbc-shelves-manager .dbc-toolbar-left{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
}
.dbc-ui-title,
.dbc-shelves-manager .dbc-manager-title{
  font-family: "Noto Serif Vithkuqi", "Noto Serif", serif;
  font-style: normal;
  font-weight: 500;
  font-size: 23px;
  line-height: 23px;
  color: rgb(0, 0, 0);
  margin: 0;
}
.dbc-shelves-manager .dbc-manager-stat{
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--dbc-sub);
  font-weight: 400;
}
.dbc-shelves-manager .dbc-manager-stat [data-role="active-shelf-book-count"]{
  font-weight: 600;
  color: var(--dbc-text);
}
.dbc-shelves-manager .dbc-manager-grid{
  display:grid;
  grid-template-columns: 320px 1fr;
  min-height: 520px;
  /* Constrain the manager so inner panes can scroll (prevents page-only scroll) */
  height: min(820px, calc(100vh - 220px));
  overflow-x: hidden;
}
.dbc-shelves-manager .dbc-manager-nav{
  background: linear-gradient(180deg, rgba(17,24,39,.02), rgba(17,24,39,.05));
  border-right:1px solid rgba(17,24,39,.10);
  padding:14px;
  overflow-y:auto;
  overflow-x:hidden;
  scrollbar-gutter: stable;
}
.dbc-shelves-manager .dbc-nav-section-title{
  font-size:11px;
  font-weight:700;
  color: rgba(17,24,39,.55);
  text-transform:uppercase;
  letter-spacing:.10em;
  margin: 14px 6px 8px;
}
.dbc-shelves-manager .dbc-nav-section-title:first-child{
  margin-top: 6px;
}
.dbc-shelves-manager .dbc-nav-list{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.dbc-shelves-manager .dbc-nav-item{
  display:grid;
  grid-template-columns: auto 1fr auto;
  gap:6px 10px;
  align-items:center;
  padding:7px 10px; /* thinner tiles */
  border-radius: 6px;
  border:1px solid rgba(17,24,39,.10);
  background: rgba(255,255,255,.75);
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
  cursor: pointer;
}
.dbc-shelves-manager .dbc-nav-item .dbc-nav-open{
  min-width: 0;
}
.dbc-shelves-manager .dbc-nav-item .dbc-nav-label{
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dbc-shelves-manager .dbc-nav-item .dbc-nav-label-input{
  width: 100%;
  min-width: 0;
  font-size: 13px;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(17,24,39,.2);
}
.dbc-shelves-manager .dbc-nav-visibility{
  flex-shrink: 0;
  padding: 4px;
  width: 28px;
  height: 28px;
}
.dbc-shelves-manager .dbc-nav-item[data-is-public="1"] .dbc-nav-visibility .dbc-shelf-visibility-icon{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2314171c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}
.dbc-shelves-manager .dbc-nav-item[data-is-public="0"] .dbc-nav-visibility .dbc-shelf-visibility-icon{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2314171c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.7 5.1A9.6 9.6 0 0 1 12 5c6.5 0 10 7 10 7a18.8 18.8 0 0 1-2.3 3.3'/%3E%3Cpath d='M6.6 6.6A18.8 18.8 0 0 0 2 12s3.5 7 10 7a9.6 9.6 0 0 0 5.4-1.7'/%3E%3Cpath d='M14.1 14.1A3 3 0 0 1 9.9 9.9'/%3E%3Cpath d='M1 1l22 22'/%3E%3C/svg%3E");
}
.dbc-shelves-manager .dbc-nav-item .dbc-nav-visibility .dbc-shelf-visibility-icon{
  width: 14px;
  height: 14px;
  display: inline-block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
  opacity: .9;
}
.dbc-shelves-manager .dbc-nav-item.is-active .dbc-nav-visibility .dbc-shelf-visibility-icon{
  filter: brightness(0) invert(1);
  opacity: .92;
}
.dbc-shelves-manager .dbc-nav-item label{
  display:flex;
  align-items:center;
  justify-content:center;
}
.dbc-shelves-manager .dbc-nav-pad{
  width: 18px;
  height: 18px;
  display:block;
}
.dbc-shelves-manager .dbc-nav-item .dbc-shelf-select{
  margin:0;
}
.dbc-shelves-manager .dbc-nav-item:hover{
  background:#fff;
  border-color: rgba(170,72,72,.22);
}
.dbc-shelves-manager .dbc-nav-item.is-active{
  background: #14171c;
  border-color: rgba(20,23,28,.92);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.10),
    0 14px 30px rgba(20,23,28,.22);
}
.dbc-shelves-manager .dbc-nav-item.is-active .dbc-nav-open{
  color: #fff;
  font-weight: 400;
}
.dbc-shelves-manager .dbc-nav-item.is-active .dbc-select{
  filter: brightness(1.2);
}
.dbc-shelves-manager .dbc-nav-open{
  appearance:none;
  border:none;
  background:transparent;
  padding:0;
  text-align:left;
  font-size:13px;
  font-weight:400;
  color: var(--dbc-text);
  cursor:pointer;
  width: 100%;
  height: 100%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.dbc-shelves-manager .dbc-nav-open:focus,
.dbc-shelves-manager .dbc-nav-open:focus-visible{
  outline: none !important;
  box-shadow: none !important;
}
.dbc-shelves-manager .dbc-manager-detail{
  background:#fff;
  padding:20px 22px;
  overflow: hidden; /* inner wrapper scrolls so scrollbar is inset */
  min-height: 0;    /* allow child to size/scroll in CSS grid */
  display:flex;
  flex-direction:column;
}
.dbc-shelves-manager .dbc-manager-detail-scroll{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  padding-right: 10px; /* keep scrollbar off content on overlay-scrollbar browsers */
}

/* No container around shelf content – just the book list */
.dbc-shelves-manager .dbc-manager-detail .dbc-shelf{
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}
.dbc-shelves-manager .dbc-manager-detail .dbc-shelf-panel{
  padding: 0;
}
.dbc-shelves-manager .dbc-detail-head{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 12px 14px;
  margin: 0 0 14px;
  border-bottom:1px solid rgba(17,24,39,.10);
  overflow-x:hidden;
}
.dbc-shelves-manager .dbc-detail-head--toolbar-only{
  padding: 8px 14px;
  margin: 0;
  border-bottom: none;
}
.dbc-shelves-manager .dbc-detail-head--toolbar-only .dbc-detail-actions{
  width: 100%;
}
.dbc-shelves-manager .dbc-detail-head--toolbar-only .dbc-detail-actions .dbc-btn:first-of-type{
  margin-left: auto;
}
.dbc-shelves-manager .dbc-detail-title{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.dbc-shelves-manager .dbc-detail-title .dbc-shelf-title-text{
  font-family: "Noto Serif Vithkuqi", "Noto Serif", serif;
  font-size:16px;
  font-weight:500;
  line-height:1.2;
}
.dbc-shelves-manager .dbc-detail-meta{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}
.dbc-shelves-manager .dbc-detail-actions{
  display:flex;
  align-items:center;
  gap:8px;
}

.dbc-shelves-manager .dbc-shelf-visibility-icon{
  width: 16px;
  height: 16px;
  display:inline-block;
  border-radius: 4px;
  background: transparent;
  position: relative;
  flex: 0 0 auto;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  opacity: .95;
}
.dbc-shelves-manager .dbc-shelf[data-is-public="1"] .dbc-shelf-visibility-icon::before{
  content:"";
}
.dbc-shelves-manager .dbc-shelf[data-is-public="0"] .dbc-shelf-visibility-icon::before{
  content:"";
}

.dbc-shelves-manager .dbc-shelf[data-is-public="1"] .dbc-shelf-visibility-icon{
  /* eye icon */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2314171c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}
.dbc-shelves-manager .dbc-shelf[data-is-public="0"] .dbc-shelf-visibility-icon{
  /* eye-off icon */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2314171c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.7 5.1A9.6 9.6 0 0 1 12 5c6.5 0 10 7 10 7a18.8 18.8 0 0 1-2.3 3.3'/%3E%3Cpath d='M6.6 6.6A18.8 18.8 0 0 0 2 12s3.5 7 10 7a9.6 9.6 0 0 0 5.4-1.7'/%3E%3Cpath d='M14.1 14.1A3 3 0 0 1 9.9 9.9'/%3E%3Cpath d='M1 1l22 22'/%3E%3C/svg%3E");
}

/* Make public/private button icon (reuses eye/eye-off) */
.dbc-shelves-manager .dbc-vis-btn-icon{
  width: 16px;
  height: 16px;
  display:inline-block;
  background-repeat:no-repeat;
  background-position:center;
  background-size: 16px 16px;
  margin-right: 8px;
  vertical-align: middle;
  opacity: .9;
}
.dbc-shelves-manager .dbc-shelf[data-is-public="1"] .dbc-vis-btn-icon{
  /* Action is "Make private" -> show eye-off */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2314171c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.7 5.1A9.6 9.6 0 0 1 12 5c6.5 0 10 7 10 7a18.8 18.8 0 0 1-2.3 3.3'/%3E%3Cpath d='M6.6 6.6A18.8 18.8 0 0 0 2 12s3.5 7 10 7a9.6 9.6 0 0 0 5.4-1.7'/%3E%3Cpath d='M14.1 14.1A3 3 0 0 1 9.9 9.9'/%3E%3Cpath d='M1 1l22 22'/%3E%3C/svg%3E");
}
.dbc-shelves-manager .dbc-shelf[data-is-public="0"] .dbc-vis-btn-icon{
  /* Action is "Make public" -> show eye */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2314171c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}

@media (max-width: 900px){
  .dbc-shelves-manager .dbc-manager-grid{ grid-template-columns: 1fr; }
  .dbc-shelves-manager .dbc-manager-nav{ border-right:none; border-bottom:1px solid var(--dbc-border); }
}

.dbc-shelves-app .dbc-shelf{
  border:1px solid var(--dbc-border);
  border-radius: var(--dbc-radius);
  background: var(--dbc-bg);
  box-shadow: var(--dbc-shadow);
  overflow: visible; /* tooltips need to escape */
  position: relative;
}

/* Shelf header */
.dbc-shelves-app .dbc-shelf-head{
  display:grid;
  grid-template-columns: auto 1fr auto;
  gap:10px;
  align-items:center;
  padding:12px 14px;
  background: #fff;
  border-bottom:1px solid var(--dbc-border);
}
.dbc-shelves-app .dbc-shelf-head .dbc-shelf-meta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.dbc-shelves-app .dbc-shelf-head .dbc-shelf-title{
  display:flex;
  gap:10px;
  align-items:center;
  min-width:0;
}
.dbc-shelves-app .dbc-shelf-title-text{
  font-size:16px;
  font-weight:650;
  line-height:1.2;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.dbc-shelves-app .dbc-shelf-title-input{
  font-size:16px;
  font-weight:650;
  line-height:1.2;
  padding:6px 8px;
  border-radius:10px;
  border:1px solid var(--dbc-border);
  width:min(440px, 100%);
}
.dbc-shelves-manager .dbc-shelf-title-input{
  /* Match the shelf title typography while editing */
  font-family: "Noto Serif Vithkuqi", "Noto Serif", serif;
  font-weight:500;
}
.dbc-shelves-app .dbc-shelf-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
}

/* Chips */
.dbc-shelves-app .dbc-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:2px 10px;
  border-radius:999px;
  font-size:12px;
  border:1px solid var(--dbc-border);
  background: var(--dbc-soft);
  color: var(--dbc-sub);
}
.dbc-shelves-app .dbc-chip strong{ color: var(--dbc-text); font-weight:500; }
.dbc-shelves-app.dbc-followed-shelves .dbc-followed-stats .dbc-chip strong{
  font-weight: 500;
}
.dbc-shelves-app .dbc-chip.is-public{ background:#ecfdf3; border-color:#bbf7d0; color:#166534; }
.dbc-shelves-app .dbc-chip.is-private{ background:#fef2f2; border-color:#fecaca; color:#b91c1c; }
.dbc-shelves-app .dbc-chip.is-system{ background:#eef2ff; border-color:#e0e7ff; color:#4f46e5; }

/* Buttons */
.dbc-shelves-app .dbc-btn{
  appearance:none;
  border:1px solid rgba(17,24,39,.12);
  background: rgba(17,24,39,.03);
  color: var(--dbc-text);
  border-radius: 10px; /* less rounded */
  padding:6px 10px;    /* more compact */
  font-size:13px;
  line-height:1.2;
  cursor:pointer;
  transition: transform .08s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
  display:inline-flex;
  align-items:center;
  gap:6px;
  white-space:nowrap;
  font-weight: 600;
}

/* Match sidebar title weight for per-shelf visibility button */
.dbc-shelves-manager .dbc-detail-actions form .dbc-btn{
  font-weight: 400;
}
.dbc-shelves-app .dbc-btn:focus,
.dbc-shelves-app .dbc-btn:focus-visible{
  /* Remove thick default focus border */
  outline: none !important;
  box-shadow: none !important;
}
.dbc-shelves-app .dbc-sr-only{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}
.dbc-shelves-app .dbc-btn.is-icon{
  padding: 8px;
  width: 36px;
  height: 36px;
  justify-content: center;
}
.dbc-shelves-app .dbc-btn.is-icon .dbc-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.dbc-shelves-app .dbc-btn[data-action="rename-shelf"] .dbc-icon.is-save{ display:none; }
.dbc-shelves-app .dbc-btn[data-action="rename-shelf"][data-state="editing"] .dbc-icon.is-pencil{ display:none; }
.dbc-shelves-app .dbc-btn[data-action="rename-shelf"][data-state="editing"] .dbc-icon.is-save{ display:inline-flex; }
.dbc-shelves-app .dbc-btn.is-icon svg{
  display:block;
}
.dbc-shelves-app .dbc-btn.is-icon.is-quiet{
  padding: 6px;
  width: 34px;
  height: 34px;
}
.dbc-shelves-app .dbc-btn:hover{
  background: rgba(17,24,39,.05);
  border-color: rgba(17,24,39,.18);
}
.dbc-shelves-app .dbc-btn:active{ transform: translateY(1px); }
.dbc-shelves-app .dbc-btn[disabled]{ opacity:.6; cursor:not-allowed; }
.dbc-shelves-manager .dbc-btn[data-action="rename-shelf"][disabled]{
  /* System shelves can't be renamed — make this very obvious */
  opacity: 1;
  cursor: not-allowed;
  color: rgba(17,24,39,.28);
  background: rgba(17,24,39,.04);
  border-color: transparent;
}
.dbc-shelves-manager .dbc-btn[data-action="rename-shelf"][disabled] .dbc-icon{
  opacity: .9;
}
.dbc-shelves-app .dbc-btn.is-primary{
  background: linear-gradient(180deg, rgba(170,72,72,1), rgba(170,72,72,.85));
  border-color: rgba(170,72,72,.70);
  color:#fff;
  box-shadow: 0 10px 22px rgba(170,72,72,.18);
}
.dbc-shelves-app .dbc-btn.is-danger{
  background: rgba(185,28,28,.10);
  border-color: rgba(185,28,28,.22);
  color: rgba(145,20,20,1);
}
.dbc-shelves-app .dbc-btn.is-quiet{
  background: transparent;
  border-color: transparent;
  padding:5px 8px; /* slightly tighter */
  font-weight: 600;
}
.dbc-shelves-app .dbc-btn.is-quiet:hover{
  background: rgba(0,0,0,.04);
  border-color: transparent; /* prevent “puffy” hover look */
}

/* Panel */
.dbc-shelves-app .dbc-shelf-panel{
  padding: 12px 14px 14px;
  overflow-x: hidden;
}

/* Public/followed: slide open/close animation; each shelf expands only itself */
.dbc-shelves-app[data-mode="followed"] .dbc-shelf-panel,
.dbc-shelves-app[data-mode="public"] .dbc-shelf-panel{
  max-height: 0;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.dbc-shelves-app[data-mode="followed"] .dbc-shelf.is-open .dbc-shelf-panel,
.dbc-shelves-app[data-mode="public"] .dbc-shelf.is-open .dbc-shelf-panel{
  max-height: 1200px;
  overflow-x: hidden;
  /* overflow-y set by JS: hidden when short, auto only when content > 320px */
  padding-top: 12px;
  padding-bottom: 14px;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Owner view: keep panel height bounded + scroll list */
.dbc-shelves-manager .dbc-shelf-panel{
  /* Avoid a nested/inset scrollbar inside the padded detail pane.
     Let `.dbc-manager-detail` be the scroller so the scrollbar aligns correctly. */
  max-height: none;
  overflow: visible;
  scrollbar-gutter: auto;
}
.dbc-shelves-app .dbc-panel-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.dbc-shelves-app .dbc-panel-toolbar .dbc-panel-left,
.dbc-shelves-app .dbc-panel-toolbar .dbc-panel-right{ display:flex; align-items:center; gap:10px; }
.dbc-shelves-app .dbc-panel-toolbar .dbc-small{ font-size:13px; color:var(--dbc-sub); }
.dbc-shelves-app .dbc-panel-toolbar .dbc-small[hidden]{ display:none !important; }
.dbc-shelves-app .dbc-small{ font-size:13px; color:var(--dbc-sub); }
.dbc-shelves-app .dbc-small[hidden]{ display:none !important; }

/* Book rows list */
.dbc-shelves-app .dbc-books{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:8px;
  overflow-x: hidden;
}
.dbc-shelves-app .dbc-book-row{
  display:grid;
  grid-template-columns: 22px auto auto auto 1fr auto;
  gap:10px;
  column-gap:14px; /* more breathing room between rail/checkbox/index/title */
  align-items:center;
  padding:10px 10px;
  border:1px solid var(--dbc-border);
  border-radius: var(--dbc-row-radius);
  background:#fff;
  transition: background .15s ease, border-color .15s ease;
}
.dbc-shelves-app .dbc-book-row > label{
  display:flex;
  align-items:center;
  justify-content:center;
}
.dbc-shelves-app .dbc-book-row > label .dbc-select{
  margin:0;
}
.dbc-shelves-app .dbc-book-index{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  background: rgba(17,24,39,.04);
  border: 1px solid rgba(17,24,39,.08);
  color: rgba(17,24,39,.62);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

/* Readonly rows (public/followed lists): no checkbox/drag */
.dbc-shelves-app .dbc-book-row.is-readonly{
  grid-template-columns: auto 1fr auto;
  padding:10px 12px;
}
.dbc-shelves-app .dbc-book-row.is-readonly .dbc-book-actions{
  display:flex;
  justify-content:flex-end;
}

/* Simple book list (public/followed expanded lists): title + author only */
.dbc-shelves-app .dbc-simple-books{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:0;
}
.dbc-shelves-app .dbc-simple-book{
  padding: 7px 0; /* more compact */
  border-bottom: 1px solid rgba(17,24,39,.08);
}
.dbc-shelves-app .dbc-simple-book:last-child{
  border-bottom:none;
}
.dbc-shelves-app .dbc-simple-book-title{
  display:inline-block;
  max-width: 100%;
  font-size: 13px;
  font-weight: 600;
  color: var(--dbc-text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}
.dbc-shelves-app .dbc-simple-book-title:hover{
  text-decoration: underline;
}
.dbc-shelves-app .dbc-simple-book-authors{
  margin-top: 1px;
  font-size: 11.5px;
  color: var(--dbc-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.dbc-shelves-app .dbc-simple-book-rating,
.dbc-shelves-app .dbc-book-rating{
  margin-top: 3px;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--dbc-sub);
}
.dbc-shelves-app .dbc-simple-book-rating .dbc-user-rating-wrap,
.dbc-shelves-app .dbc-book-rating .dbc-user-rating-wrap{
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}
.dbc-shelves-app .dbc-simple-book-rating .dbc-user-rating-label,
.dbc-shelves-app .dbc-book-rating .dbc-user-rating-label{
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  margin-right: 2px;
}
.dbc-shelves-app .dbc-simple-book-rating .compact-rating,
.dbc-shelves-app .dbc-book-rating .compact-rating{
  display: inline-flex;
  align-items: center;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}
.dbc-shelves-app .dbc-simple-book-rating .star-icon,
.dbc-shelves-app .dbc-book-rating .star-icon{
  color: #ffd56c;
  width: 12px;
  height: 12px;
  margin-right: 3px;
  margin-top: -3px;
  flex-shrink: 0;
  vertical-align: middle;
}
.dbc-shelves-app .dbc-simple-book-rating .compact-rating--empty,
.dbc-shelves-app .dbc-book-rating .compact-rating--empty{
  font-style: italic;
  font-size: inherit;
  font-weight: inherit;
}
.dbc-shelves-app .dbc-book-row:hover{
  background: var(--dbc-soft);
  border-color: #d1d5db;
}
.dbc-shelves-app .dbc-book-row.is-dragging{
  opacity:.85;
}
.dbc-shelves-app .dbc-drag-handle{
  width:22px;
  align-self:stretch;
  margin:-10px 0 -10px -10px; /* fill full row height incl. padding */
  border:none;
  border-right: 1px solid rgba(17,24,39,.10);
  border-radius: var(--dbc-row-radius) 0 0 var(--dbc-row-radius);
  background: rgba(17,24,39,.03);
  cursor:grab;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color: rgba(17,24,39,.55);
  user-select:none;
  -webkit-tap-highlight-color: transparent;
  padding:0;
}
.dbc-shelves-app .dbc-drag-handle svg{
  width:18px;
  height:18px;
  display:block;
}
.dbc-shelves-app .dbc-drag-handle:hover{
  background: rgba(17,24,39,.06);
}
.dbc-shelves-app .dbc-drag-handle:active{ cursor:grabbing; }

.dbc-shelves-app .dbc-book-main{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.dbc-shelves-app .dbc-book-title{
  font-size:14px;
  font-weight:600;
  color: var(--dbc-text);
  text-decoration:none;
  display:inline-block;
  max-width:100%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.dbc-shelves-app .dbc-book-title:hover{ text-decoration:underline; }
.dbc-shelves-app .dbc-book-authors{
  font-size:12px;
  color: var(--dbc-sub);
}

/* Tooltip trigger and wrapper: reuse existing global tooltip CSS */
.dbc-shelves-app .dbc-book-tooltip-wrap{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.dbc-shelves-app .dbc-book-cover{
  width: 50px;
  height: 72px;
  flex: 0 0 50px;
  /* Professional look: fill the frame cleanly */
  object-fit: cover;
  object-position: center;
  image-rendering: auto;
  /* Book-like: square left edge, rounded right edge */
  border-radius: 0 6px 6px 0;
  border: none;
  box-shadow: 0 3px 8px rgba(17,24,39,.10);
  background: rgba(17,24,39,.04);
  display:block;
}
.dbc-shelves-app .dbc-book-cover.dbc-book-cover--placeholder{
  background:
    linear-gradient(180deg, rgba(17,24,39,.06), rgba(17,24,39,.02));
}
.dbc-shelves-app .book-tooltip-card{
  display:block; /* override global tooltip style for list rows */
}

/* Ensure tooltips appear above everything */
.dbc-shelves-app .book-tooltip-info{
  z-index: 20000;
}

/* ===== Confirm modal (used for delete/remove/bulk) ===== */
.dbc-shelves-app .dbc-mini-confirm-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.40);
  display: none;
  z-index: 19990;
}
.dbc-shelves-app .dbc-mini-confirm{
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border: 1px solid var(--dbc-border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.22);
  padding: 16px;
  min-width: min(420px, calc(100vw - 40px));
  display: none;
  z-index: 20000;
}
.dbc-shelves-app .dbc-mini-confirm h4{
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--dbc-text);
}
.dbc-shelves-app .dbc-mini-confirm p{
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--dbc-sub);
}
.dbc-shelves-app .dbc-mini-confirm .actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
}
.dbc-shelves-app .dbc-mini-confirm .btn{
  border:1px solid var(--dbc-border);
  background:#fff;
  color: var(--dbc-text);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  cursor:pointer;
}
.dbc-shelves-app .dbc-mini-confirm .btn.primary{
  background: var(--dbc-danger);
  border-color: var(--dbc-danger);
  color:#fff;
}
.dbc-shelves-app .dbc-mini-confirm .btn:disabled{ opacity:.6; cursor:not-allowed; }

/* ===== Move modal (bulk move books) ===== */
.dbc-move-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.40);
  display: none;
  z-index: 29990;
}
.dbc-move-modal{
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  /* ensure variables exist even outside .dbc-shelves-app */
  --dbc-text:#111827;
  --dbc-sub:#6b7280;
  --dbc-border:#e5e7eb;
  --dbc-accent: var(--dbc-site-accent, #222);
  border: 1px solid var(--dbc-border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.22);
  padding: 16px;
  min-width: min(420px, calc(100vw - 40px));
  display: none;
  z-index: 30000;
}
.dbc-move-modal .dbc-move-title{
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--dbc-text);
}
.dbc-move-modal .dbc-move-message{
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--dbc-sub);
}
.dbc-move-modal .dbc-move-select{
  width: 100%;
  border: 1px solid rgba(17,24,39,.12);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.dbc-move-modal .actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
}
.dbc-move-modal .btn{
  border:1px solid var(--dbc-border);
  background:#fff;
  color: var(--dbc-text);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  cursor:pointer;
}
.dbc-move-modal .btn.primary{
  background: var(--dbc-accent);
  border-color: var(--dbc-accent);
  color:#fff;
}

/* ===== Create shelf modal ===== */
.dbc-create-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.40);
  display: none;
  z-index: 29990;
}
.dbc-create-modal{
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  /* ensure variables exist even outside .dbc-shelves-app */
  --dbc-text:#111827;
  --dbc-sub:#6b7280;
  --dbc-border:#e5e7eb;
  --dbc-accent: var(--dbc-site-accent, #222);
  border: 1px solid var(--dbc-border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.22);
  padding: 16px;
  min-width: min(420px, calc(100vw - 40px));
  display: none;
  z-index: 30000;
}
.dbc-create-modal .dbc-create-title{
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--dbc-text);
}
.dbc-create-modal .dbc-create-message{
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--dbc-sub);
}
.dbc-create-modal .dbc-create-input{
  width: 100%;
  border: 1px solid rgba(17,24,39,.12);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.dbc-create-modal .dbc-create-row{
  display:flex;
  align-items:center;
  gap:10px;
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--dbc-text);
}
.dbc-create-modal .actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
}
.dbc-create-modal .btn{
  border:1px solid var(--dbc-border);
  background:#fff;
  color: var(--dbc-text);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  cursor:pointer;
}
.dbc-create-modal .btn.primary{
  background: var(--dbc-accent);
  border-color: var(--dbc-accent);
  color:#fff;
}
.dbc-create-modal .btn:disabled{ opacity:.6; cursor:not-allowed; }
.dbc-move-modal .btn:disabled{ opacity:.6; cursor:not-allowed; }
.dbc-shelves-app .dbc-tooltip-btn{
  width:22px;
  height:22px;
  min-width:22px;
  min-height:22px;
  padding:0;
  aspect-ratio: 1 / 1;
  border-radius:50%;
  border:1px solid rgba(17,24,39,.12);
  background: rgba(17,24,39,.03);
  color: rgba(17,24,39,.70);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 22px;
  box-sizing:border-box;
}
.dbc-shelves-app .dbc-tooltip-btn::before{
  content:"ℹ";
  font-family: "Noto Serif Vithkuqi", "Noto Serif", serif;
  font-size:14px;
  line-height:1;
  display:block;
}
.dbc-shelves-app .dbc-tooltip-btn:hover{
  background: rgba(17,24,39,.06);
  border-color: rgba(170,72,72,.25);
}

.dbc-global-tooltip{
  position: fixed;
  left: -9999px;
  top: -9999px;
  z-index: 30000;
  display: none;
  pointer-events: auto;
}
.dbc-global-tooltip .dbc-global-tooltip-inner{
  /* Let the returned tooltip HTML control its own look */
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  max-width: 380px;
}

/* Prevent legacy in-card tooltip from showing/clipping/duplicating in shelves UI */
.dbc-shelves-app .book-tooltip-info{
  display:none !important;
}

/* Shelves UI: tooltips removed (All-Books page keeps its own tooltips) */
.dbc-shelves-app .dbc-tooltip-btn{
  display:none !important;
}

/* Small helpers */
.dbc-shelves-app .dbc-select{
  width:16px;
  height:16px;
}

/* Mobile */
@media (max-width: 640px){
  .dbc-shelves-app .dbc-shelf-head{
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }
  .dbc-shelves-app .dbc-shelf-actions{
    grid-column: 1 / -1;
    justify-content:flex-start;
    flex-wrap:wrap;
  }
  .dbc-shelves-app .dbc-book-row{
    grid-template-columns: auto auto auto 1fr;
    grid-template-rows: auto auto;
  }
  .dbc-shelves-app .dbc-book-row .dbc-book-actions{
    grid-column: 1 / -1;
    display:flex;
    justify-content:flex-end;
  }
}

