/* Library, card page, creator page and moderation screens. Builds on style.css, gallery.css and cards.css. */
.lib-main { max-width: 1200px; }
.lib-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 14px 0 6px; }
.lib-bar input[type=search] { flex: 1; min-width: 200px; margin: 0 !important; }
.lib-bar select { width: auto !important; margin: 0 !important; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 14px; font-size: 13px; border: 1px solid var(--gold-soft); color: var(--gold); background: color-mix(in srgb, var(--accent) 30%, var(--panel)); }
.chip.ex { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, transparent); }
.chip button { padding: 0 6px !important; background: none; color: inherit; font-size: 15px !important; line-height: 1; }
.tag-box { position: relative; max-width: 420px; }
.tag-box input { margin: 0 !important; }
.suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 8px; margin-top: 2px; max-height: 260px; overflow-y: auto; box-shadow: var(--shadow-pop); }
.sug { display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 14px; }
.sug:hover { background: color-mix(in srgb, var(--accent) 40%, transparent); }
.sug .n { flex: 1; text-align: left; background: none; color: var(--text); padding: 4px 0 !important; font-weight: 400 !important; font-size: 14px !important; letter-spacing: 0 !important; }
.sug .c { color: var(--muted); font-size: 12px; }
.sug .x { background: none; color: var(--danger); font-size: 12px !important; padding: 3px 8px !important; border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent) !important; }
.hint-line { margin: 8px 0; font-size: 13px; color: var(--muted); }
.lib-tile .card-name { display: block; color: var(--text); text-decoration: none; }
.lib-tile .card-name:hover { color: var(--gold); }
.card-by a { color: var(--muted); }
.card-by { margin-top: 1px; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
a.tag { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 30%, var(--panel)); color: var(--text); text-decoration: none; border: 1px solid var(--line); }
a.tag:hover { border-color: var(--gold); color: var(--gold); }
.card-cover { position: relative; }
.card-cover.blurred { cursor: pointer; }
.reveal-hint { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: color-mix(in srgb, var(--scrim) 65%, transparent); color: var(--on-scrim); font-size: 12px; padding: 6px 10px; border-radius: 14px; white-space: nowrap; pointer-events: none; }

/* Card page */
.cp-head { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 18px; }
.cp-pic { width: 260px; flex: none; }
.cp-pic .card-cover { border-radius: var(--radius); border: 1px solid var(--line-strong); }
.cp-side { flex: 1; min-width: 260px; }
.cp-side h1 { font-size: 28px; margin: 0 0 4px; word-break: break-word; }
.cp-tagline { font-size: 16px; margin: 4px 0 10px; color: var(--text); }
.cp-creator { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.cp-creator a.who { color: var(--text); text-decoration: none; display: flex; gap: 8px; align-items: center; }
.cp-creator a.who:hover { color: var(--gold); }
.stats { display: flex; gap: 16px; flex-wrap: wrap; margin: 10px 0; font-size: 14px; color: var(--muted); }
.stats b { color: var(--text); }
.cp-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; align-items: flex-start; }
.cp-actions a.btn.b-ghost { color: var(--text); }
.section { margin: 22px 0; }
.section h2 { font-size: 15px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); margin: 0 0 8px; font-weight: 600; }
.plain { white-space: pre-wrap; word-break: break-word; line-height: 1.5; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--card) 55%, transparent); max-height: 420px; overflow-y: auto; margin: 0; font-size: 14px; }
.notes-frame { height: 380px; }
.state-box { max-width: 560px; margin: 50px auto; text-align: center; }
.state-box h1 { font-size: 22px; }
.state-box .row { justify-content: center; }
.banner.warn { border-color: color-mix(in srgb, var(--danger) 50%, var(--bg)); background: color-mix(in srgb, var(--danger) 12%, var(--panel)); }
.fork-credit { font-size: 13px; color: var(--muted); }

/* Creator page */
.pf-head { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; padding: 22px 0 10px; }
.pf-head .avatar.big { width: 96px; height: 96px; font-size: 38px; }
.pf-info { flex: 1; min-width: 240px; }
.pf-info h1 { margin: 0; font-size: 26px; }
.pf-bio { white-space: pre-wrap; word-break: break-word; margin: 10px 0; line-height: 1.5; }

/* The report dialog (libui.js reportDialog) and other small dialogs on a .modal-back. Its box is .rep-modal, not
   .modal: gallery.css's .modal is a full-screen layer (with a .modal-box inside) used on the same pages, and the two
   clashed (owner 2026-11-26: report dialog fixed everywhere). */
.modal-back { position: fixed; inset: 0; background: var(--backdrop); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; }
.rep-modal { background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 22px; width: 480px; max-width: 100%; max-height: 92vh; overflow-y: auto; }
.rep-modal h2 { margin: 0 0 8px; }
.rep-modal select, .rep-modal textarea { width: 100%; padding: 10px; margin: 6px 0; background: var(--field); border: 1px solid var(--line-strong); color: var(--text); border-radius: 6px; font: inherit; font-size: 14px; }
.rep-modal button { cursor: pointer; border: none; font-weight: 600; border-radius: 6px; letter-spacing: .6px; font-size: 12px; padding: 10px 16px; font-family: inherit; }
.row.end { justify-content: flex-end; margin-top: 14px; }

/* Moderation */
.mod-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 12px 0; background: color-mix(in srgb, var(--card) 60%, transparent); }
.mod-item h3 { margin: 0 0 6px; font-size: 15px; }
.mod-item .mmeta { font-size: 13px; color: var(--muted); margin: 4px 0; word-break: break-word; }
.mod-item .mmeta a { color: var(--gold); }
.mod-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.mod-acts button { padding: 7px 10px !important; }
.mod-note { margin-top: 10px; }
.mod-note input { margin: 0 !important; }
.log-row { font-size: 13px; padding: 6px 0; border-top: 1px solid var(--line); word-break: break-word; }
.log-row:first-child { border-top: none; }

@media (max-width: 760px) {
  .lib-main { padding: 0 14px 100px; }
  .cp-pic { width: 100%; max-width: 300px; margin: 0 auto; }
  .cp-side h1 { font-size: 23px; }
  .lib-bar select, .lib-bar input[type=search] { width: 100% !important; flex: 1 1 100%; }
  .rep-modal { padding: 16px; }
}

.small-pic { width: 130px; margin: 8px 0; }
.gal-top select { width: auto !important; margin: 0 !important; }

/* The notes page has no colour scheme of its own; matching it keeps it transparent over our dark box instead of white. */
iframe.notes-frame { color-scheme: light; background: var(--notes-bg); }

.card-cover.blurred img.standin { filter: blur(6px); transform: scale(1.2); image-rendering: auto; width: 100%; height: 100%; object-fit: cover; }
.card-cover .age-tile { font-size: 34px; letter-spacing: 2px; }
.small-pic.center { margin: 0 auto 14px; }
.preview-pic { width: 240px; max-width: 70%; margin: 0 auto 16px; }
.card-cover.blurred img.cssblur { filter: blur(14px); transform: scale(1.15); }
.preview-name { margin: 0 0 6px; font-size: 22px; word-break: break-word; }
.preview-tags .tags { justify-content: center; }

/* Follow a tag from the library's tag filter (chips and suggestions) */
body.vf .tag-follow { padding: 1px 8px; font-size: 11px; font-weight: 600; letter-spacing: .2px; border-radius: 10px; background: none; color: var(--muted); border: 1px solid var(--line-strong); }
body.vf .tag-follow:hover { color: var(--gold); border-color: var(--gold); }
body.vf .tag-follow.on { color: var(--gold); border-color: var(--gold-soft); }
body.vf .sug .tag-follow.sm { padding: 2px 7px; }

/* Explore (/library): the filter row, the chips under it, and the panels docked to the left edge under the
   chips (design-refs/explore-page-mockup.html). */
.ex-dock { position: relative; }
.ex-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 6px 0 0; }
.ex-sort { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
body.vf .ex-filters select { width: auto !important; margin: 0 !important; }
body.vf .ex-btn, body.vf .ex-dir { padding: 8px 14px !important; font-size: 14px !important; letter-spacing: 0 !important; font-weight: 500 !important; text-transform: none; white-space: nowrap; }
body.vf .ex-btn.gold { color: var(--gold); border-color: var(--gold) !important; }
body.vf .ex-dir { color: var(--muted); }
.ex-dock .chips { margin: 10px 0; }
.ex-dock .chips.hidden { display: none; }
.ex-pop { position: absolute; left: 0; top: 100%; margin-top: 2px; z-index: 40; width: 480px; max-width: 100%; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 14px; padding: 12px; box-shadow: var(--shadow-pop); }
.ex-pop.hidden { display: none; }
.ex-small { width: 360px; }
.ex-pop-end { display: flex; justify-content: flex-end; margin-top: 10px; }
.ex-pop-title { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 8px; }
.ex-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ex-range { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
body.vf .ex-range input { width: 100px !important; margin: 0 !important; padding: 7px 8px; }
@media (max-width: 560px) { .ex-pop { width: 100%; } }
.ex-sub { font-size: 12px; color: var(--muted); margin: 8px 0 5px; }
body.vf .ex-clear { padding: 3px 12px !important; font-size: 13px !important; letter-spacing: 0 !important; font-weight: 500 !important; color: var(--gold); }
.chips .ex-clear { margin-left: 4px; }

/* Explore → Creators */
.ex-creators { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-top: 8px; }
.ex-creator { display: flex; gap: 12px; align-items: center; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.ex-cpic { width: 56px; height: 56px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 55%, var(--card)); color: var(--gold); font-size: 22px; text-decoration: none; }
.ex-cpic img { width: 100%; height: 100%; object-fit: cover; }
.ex-cbody { flex: 1; min-width: 0; }
.ex-cname { display: block; color: var(--text); font-weight: 700; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-cname:hover { color: var(--gold); }
.ex-cmeta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.ex-cbio { font-size: 13px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
body.vf .ex-creator > button { flex: none; padding: 7px 12px !important; font-size: 12px !important; }
@media (max-width: 420px) { .ex-creators { grid-template-columns: 1fr; } }
/* Explore's chosen-filter chips: the small chip, "# Tag ×", nothing else in them (owner, 2026-11-24). */
.ex-dock .chip { gap: 4px; padding: 2px 4px 2px 9px; font-size: 12px; line-height: 1.5; }
body.vf .ex-dock .chip button { font-size: 14px !important; padding: 0 5px !important; }
body.vf .ex-dock .ex-clear { padding: 2px 10px !important; font-size: 12px !important; }

/* Report dialog: one row per reason (moderation, owner 2026-11-24; mockup design-refs/moderation-mockup.html view 1) */
.rep-opts { border: 0; margin: 8px 0 0; padding: 0; min-width: 0; }
.rep-opts legend { padding: 0; margin-bottom: 4px; font-size: 14px; }
.rep-opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; margin-top: 6px; font-size: 14px; cursor: pointer; }
.rep-opt input { margin: 3px 0 0; accent-color: var(--gold); flex: none; }
/* cards.css makes every input on body.vf pages full width; a reason's radio button keeps its own size */
body .rep-modal .rep-opt input[type=radio] { width: auto; padding: 0; margin: 3px 0 0; }
.rep-opt small { display: block; color: var(--muted); font-size: 12.5px; }
.rep-opt.on { border-color: var(--gold); background: var(--card); }
.rep-copy { margin-top: 10px; }
.rep-fh { display: flex; align-items: baseline; gap: 8px; margin: 10px 0 4px; }
.rep-fh label { font-weight: 600; font-size: 13.5px; }
.rep-copy input[type=text] { width: 100%; padding: 10px; background: var(--field); border: 1px solid var(--line-strong); color: var(--text); border-radius: 6px; font: inherit; font-size: 14px; box-sizing: border-box; }
/* Hints in the dialog share one size and colour on every page (the pages' own .small/.muted rules differ; owner 2026-11-29);
   "body .rep-modal" outranks cards.css's body.vf .small / .muted (which make .muted inherit the full size). */
body .rep-modal .muted { color: var(--muted); }
body .rep-modal .muted.small, body .rep-modal .rep-hint { font-size: 12.5px; line-height: 1.45; }
body .rep-modal .rep-hint { margin: 6px 0 0; }
body .rep-modal .rep-after { margin: 12px 0 0; }
.rep-sub { margin: 0 0 6px; }
/* body .rep-modal label.rep-tick: style.css / cards.css give every label 13px muted text and their own margins */
body .rep-modal label.rep-tick { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; font-size: 13.5px; line-height: 18px; color: var(--text); cursor: pointer; }
/* style.css draws every checkbox 18px with margin 0 !important; an 18px text line puts its first line level with the box */
.rep-tick input { flex: none; }
body .rep-modal label.rep-dl { margin: 14px 0 2px; }

/* My favourites -> Import from Chub links (public/chublinks.js) */
.gal-top .fv-top-btns { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.gal-top:has(.fv-top-btns) { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ln-box p { margin: 0 0 10px; }
.ln-box textarea { width: 100%; box-sizing: border-box; min-height: 110px; resize: vertical; font-family: inherit; font-size: 13px; }
.ln-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.imp-name a { color: inherit; }
.imp-velvet { color: var(--muted); margin-top: 2px; }
.imp-line .imp-status { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .gal-top .fv-top-btns { margin-left: 0; width: 100%; }
  .gal-top .fv-top-btns button { flex: 1 1 auto; }
  .ln-row button { flex: 1 1 100%; }
  .imp-line { flex-wrap: wrap; }
  .imp-line .imp-status { text-align: left; }
}

/* My favourites → Select (public/library.js): a tick box on each tile, the bar at the bottom; Imports: Move to bin */
.fv-check { display: none; position: absolute; top: 40px; left: 8px;   /* on the picture, under the name bar */ z-index: 3; width: 30px; height: 30px; align-items: center; justify-content: center;
  border-radius: 8px; background: color-mix(in srgb, var(--panel) 85%, transparent); border: 1px solid var(--gold); cursor: pointer; }
.fv-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--gold); cursor: pointer; }
body.fv-selecting .fv-check { display: flex; }
body.fv-selecting .vt:has(.fv-check input:checked) { outline: 2px solid var(--gold); outline-offset: 1px; }
.fv-acts { display: flex; justify-content: flex-end; gap: 8px; padding: 8px 12px 10px; border-top: 1px solid var(--line); }
body.vf .fv-acts .fv-bin { padding: 6px 12px; font-size: 11px; }
body.fv-selecting .fv-acts { display: none; }
.fv-bar { position: sticky; bottom: 14px; z-index: 40; margin-top: 20px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 10px 16px; background: var(--panel); border: 1px solid var(--gold); border-radius: var(--radius); box-shadow: var(--shadow-pop); }
.fv-bar b { color: var(--gold); }
.fv-bar-names { color: var(--muted); font-size: 13px; min-width: 0; flex: 1 1 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fv-bar-btns { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
body.vf .fv-bar-btns button { padding: 8px 12px; font-size: 11.5px; }
@media (max-width: 560px) {
  .fv-bar { bottom: 8px; padding: 10px 12px; }
  .fv-bar-btns { margin-left: 0; width: 100%; }
  body.vf .fv-bar-btns button { flex: 1 1 auto; }
}
