/* ==========================================================================
   BookFinder — staff area
   ========================================================================== */

.admin { background: var(--bg); }
:root:not([data-theme="dark"]) .admin {
  --surface: #fffdf8;
  --surface-2: #f0e9dc;
  --shadow-1: 0 1px 2px rgba(28, 24, 19, .05), 0 0 0 1px rgba(28, 24, 19, .07);
}
[data-theme="dark"], [data-theme="dark"] .admin {
  color-scheme: dark;
  --bg: #11100d;
  --surface: #1a1714;
  --surface-2: #25211c;
  --paper-3: #2e2924;
  --text: #f1ebe0;
  --muted: #aa9f91;
  --faint: #7c7366;
  --line: rgba(241, 235, 224, .09);
  --line-strong: rgba(241, 235, 224, .17);
  --saffron-ink: #f2b33d;
  --saffron-wash: rgba(219, 146, 0, .15);
  --leaf: #71c993;
  --leaf-wash: rgba(113, 201, 147, .14);
  --danger: #f08a75;
  --danger-wash: rgba(240, 138, 117, .14);
  --shadow-1: 0 0 0 1px rgba(241, 235, 224, .08);
  --shadow-2: 0 18px 40px -18px rgba(0, 0, 0, .7), 0 0 0 1px rgba(241, 235, 224, .1);
}
[data-theme="dark"] .btn:not(.btn--saffron):not(.btn--ghost) { --btn-bg: var(--text); --btn-fg: var(--bg); }
[data-theme="dark"] .btn:not(.btn--saffron):not(.btn--ghost):hover { --btn-bg: var(--saffron); --btn-fg: var(--ink); }
[data-theme="dark"] .pager__num.is-current { background: var(--text); color: var(--bg); }
[data-theme="dark"] .select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aa9f91' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
[data-theme="dark"] .toast { background: #2a2520; box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .8), 0 0 0 1px rgba(241, 235, 224, .1); }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }

.side {
  position: sticky; top: 0; z-index: 60; height: 100vh; height: 100dvh; overflow-y: auto;
  display: flex; flex-direction: column; padding: 18px 14px 16px;
  background: var(--ink); color: var(--on-dark);
}
[data-theme="dark"] .side { background: #0b0a08; box-shadow: 1px 0 0 var(--line); }
.side__brand { display: flex; align-items: center; gap: 12px; padding: 6px 10px 20px; }
.side__brand .bf-mark { width: 38px; height: 38px; flex: none; }
.side__brand b { display: block; font-family: var(--f-display); font-size: 25px; font-weight: 400; line-height: 1; }
.side__brand small { display: block; margin-top: 4px; font-size: 11.5px; color: var(--on-dark-muted); }
.side__nav { display: grid; gap: 2px; }
.side__label { padding: 18px 12px 8px; font: 500 10.5px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: rgba(245, 240, 230, .4); }
.side__link {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  font-size: 14.5px; color: rgba(245, 240, 230, .74); transition: background-color .2s var(--ease), color .2s var(--ease);
}
.side__link .icon { width: 19px; height: 19px; }
a.side__link:hover { background: rgba(245, 240, 230, .06); color: var(--paper); }
.side__link.is-active { background: rgba(245, 240, 230, .1); color: var(--paper); }
.side__link.is-active .icon { color: var(--saffron-hi); }
.side__link.is-active::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--saffron); }
.side__link.is-soon { opacity: .45; cursor: default; }
.side__link em { margin-left: auto; padding: 3px 7px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(245, 240, 230, .22); font: 500 9.5px/1 var(--f-mono); font-style: normal; letter-spacing: .1em; text-transform: uppercase; }
.side__ext { margin-left: auto; width: 14px !important; height: 14px !important; opacity: .6; }
.side__foot { display: grid; gap: 8px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line-dark); }
.side__user { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(245, 240, 230, .05); }
.side__who { display: grid; min-width: 0; line-height: 1.25; }
.side__who b { overflow: hidden; font-size: 14px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.side__who small { font-size: 12px; color: var(--on-dark-muted); }
.side__out { display: grid; place-items: center; width: 36px; height: 36px; margin-left: auto; border-radius: 9px; color: var(--on-dark-muted); transition: background-color .2s, color .2s; }
.side__out:hover { background: rgba(245, 240, 230, .1); color: var(--paper); }
.side-scrim { display: none; }

.avatar {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px; overflow: hidden; border-radius: 50%;
  background: var(--saffron); color: var(--ink); font-size: 14px; font-weight: 600;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--tone { background: var(--tone); color: var(--paper); }

.main { display: flex; flex-direction: column; min-width: 0; }
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px;
  padding: 16px clamp(16px, 3vw, 36px); border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.top__menu { display: none; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line-strong); }
.top__crumb { margin-bottom: 6px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.top__title { min-width: 0; }
.top__title h1 { font-family: var(--f-display); font-size: clamp(1.75rem, 2.6vw, 2.4rem); font-weight: 400; line-height: 1; letter-spacing: -.01em; }
.top__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.iconbtn { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); transition: background-color .2s; }
.iconbtn:hover { background: var(--surface-2); }
.iconbtn__moon { display: none; }
[data-theme="dark"] .iconbtn__sun { display: none; }
[data-theme="dark"] .iconbtn__moon { display: inline; }
.iconbtn span { display: grid; }

.content { display: grid; align-content: start; gap: 24px; width: 100%; max-width: 1480px; padding: clamp(18px, 3vw, 36px); }

@media (max-width: 1040px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .4s var(--ease); box-shadow: 30px 0 60px -30px rgba(0, 0, 0, .6); }
  .side.is-open { transform: none; }
  .side-scrim { position: fixed; inset: 0; z-index: 55; display: block; background: rgba(12, 10, 8, .5); opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); }
  .side.is-open + .side-scrim { opacity: 1; pointer-events: auto; }
  .top__menu { display: grid; }
}
@media (max-width: 640px) {
  .top { gap: 12px; padding-block: 12px; }
  .top__actions .btn span { display: none; }
  .top__actions .btn { width: 42px; padding: 0; min-height: 42px; }
}

/* ---------- cards ---------- */
.card { min-width: 0; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1); }
.card__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; padding: 22px 24px 0; }
.card__title { font-family: var(--f-display); font-size: 25px; font-weight: 400; line-height: 1.1; }
.card__sub { margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.card__body { padding: 18px 24px 24px; }
.card__foot { padding: 18px 24px 22px; border-top: 1px solid var(--line); }
.card .link { font-size: 14px; }

/* greeting */
.hello { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.hello h2 { font-family: var(--f-display); font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 400; line-height: 1; letter-spacing: -.015em; }
.hello h2 em { color: var(--saffron-ink); }
.hello p { margin-top: 10px; color: var(--muted); }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { position: relative; display: grid; gap: 14px; overflow: hidden; padding: 20px 22px 22px; }
.kpi__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kpi__label { font: 500 11px/1.3 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.kpi__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); color: var(--muted); }
.kpi__icon .icon { width: 18px; height: 18px; }
.kpi__value { font-family: var(--f-display); font-size: clamp(2.4rem, 3.4vw, 3.3rem); line-height: 1; letter-spacing: -.02em; }
.kpi__value small { font-family: var(--f-sans); font-size: 15px; letter-spacing: 0; color: var(--muted); }
.kpi__foot { font-size: 13px; color: var(--muted); }
.kpi__foot b { font-weight: 600; color: var(--leaf); }
.kpi--ink { background: var(--ink); color: var(--paper); box-shadow: none; }
[data-theme="dark"] .kpi--ink { background: #2b2116; }
.kpi--ink .kpi__label, .kpi--ink .kpi__foot { color: var(--on-dark-muted); }
.kpi--ink .kpi__icon { background: rgba(245, 240, 230, .1); color: var(--saffron-hi); }
.kpi--ink .kpi__foot b { color: var(--saffron-hi); }
.kpi .status { justify-self: start; }
@media (max-width: 1180px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .kpis { grid-template-columns: minmax(0, 1fr); } }

/* quick actions */
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.qa {
  display: flex; align-items: center; gap: 14px; min-width: 0; padding: 16px 18px; border-radius: var(--r);
  background: var(--surface); box-shadow: var(--shadow-1); transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.qa:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.qa__icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--saffron-wash); color: var(--saffron-ink); }
.qa__text { display: grid; min-width: 0; line-height: 1.3; }
.qa__text b { font-weight: 500; }
.qa__text small { overflow: hidden; font-size: 12.5px; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.qa > .icon:last-child { margin-left: auto; color: var(--faint); transition: transform .3s var(--ease), color .3s; }
.qa:hover > .icon:last-child { transform: translateX(3px); color: var(--text); }
@media (max-width: 1180px) { .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .quick { grid-template-columns: minmax(0, 1fr); } }

.dash { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.dash__col { display: grid; gap: 24px; min-width: 0; }
@media (max-width: 1180px) { .dash { grid-template-columns: minmax(0, 1fr); } }

/* list rows */
.rows li { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 12px 0; border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; }
.rows__main { display: grid; flex: 1; min-width: 0; line-height: 1.35; }
.rows__main b { overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.rows__main small { overflow: hidden; font-size: 13px; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.rows__aside { flex: none; font-size: 12.5px; color: var(--muted); text-align: right; }
.spine-dot { flex: none; width: 8px; height: 38px; border-radius: 2px; background: var(--cloth); }

/* single-series bar list */
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 12px; padding: 9px 0; }
.bars__name { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.bars__name a:hover { color: var(--saffron-ink); }
.bars__n { font: 500 13px/1.4 var(--f-mono); color: var(--muted); }
.bars__track { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--surface-2); }
.bars__fill { display: block; height: 100%; width: var(--w); min-width: 4px; border-radius: 4px; background: var(--saffron); transform-origin: left; animation: grow 1.1s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }

.soon { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.soon li { display: grid; gap: 8px; padding: 16px; border-radius: var(--r); border: 1px dashed var(--line-strong); color: var(--muted); font-size: 13.5px; }
.soon b { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--text); }
@media (max-width: 640px) { .soon { grid-template-columns: minmax(0, 1fr); } }

/* ---------- toolbar + tables ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.toolbar .input-icon { flex: 1 1 260px; }
.toolbar .select { width: auto; min-width: 170px; flex: 0 1 auto; }
.toolbar__count { margin-left: auto; font-size: 13px; color: var(--muted); }
.toolbar .btn { min-height: 46px; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  padding: 12px 16px; border-bottom: 1px solid var(--line-strong); text-align: left; white-space: nowrap;
  font: 500 10.5px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background-color .15s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-family: var(--f-mono); font-size: 13px; white-space: nowrap; }
.table .nowrap { white-space: nowrap; }
.table .muted { color: var(--muted); }
.cell-main { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.cell-main > span { display: grid; min-width: 0; line-height: 1.35; }
.cell-main b { font-weight: 500; }
.cell-main small { font-size: 12.5px; color: var(--muted); }
.cell-link:hover b, .cell-link:focus-visible b { color: var(--saffron-ink); text-decoration: underline; text-underline-offset: 3px; }
[data-theme="dark"] .cell-link:hover b, [data-theme="dark"] .cell-link:focus-visible b { color: var(--saffron); }
.cell-clip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code { display: inline-block; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); font: 500 12.5px/1.4 var(--f-mono); white-space: nowrap; }
.rowbtn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; transition: background-color .2s, color .2s; }
.rowbtn:hover { background: var(--saffron-wash); color: var(--saffron-ink); }
.rowbtn .icon { width: 15px; height: 15px; }
.table-empty { display: grid; justify-items: center; gap: 8px; padding: 56px 24px; text-align: center; color: var(--muted); }
.table-empty b { font-family: var(--f-display); font-size: 26px; font-weight: 400; color: var(--text); }

/* ---------- forms ---------- */
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.span-2 { grid-column: 1 / -1; }
@media (max-width: 520px) { .fgrid { grid-template-columns: minmax(0, 1fr); } }
.fsection { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px 32px; padding: 28px 0; border-top: 1px solid var(--line); }
.fsection:first-of-type { border-top: 0; padding-top: 8px; }
.fsection__intro h2 { font-family: var(--f-display); font-size: 24px; font-weight: 400; line-height: 1.1; }
.fsection__intro p { margin-top: 6px; font-size: 13.5px; color: var(--muted); }
@media (max-width: 900px) { .fsection { grid-template-columns: minmax(0, 1fr); } }

.affix { position: relative; }
.affix > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--muted); pointer-events: none; }
.affix > .input { padding-left: 46px; }

.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { padding: 9px 20px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; transition: background-color .2s, color .2s, box-shadow .2s; }
.seg input:checked + label { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.seg input:focus-visible + label { outline: 2px solid var(--saffron); outline-offset: 2px; }

.drop {
  position: relative; display: flex; align-items: center; gap: 18px; padding: 16px 18px; border-radius: var(--r);
  border: 1.5px dashed var(--line-strong); background: var(--surface-2); cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.drop:hover, .drop.is-over { border-color: var(--saffron); background: var(--saffron-wash); }
.drop input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.drop:focus-within { border-color: var(--saffron); box-shadow: 0 0 0 4px rgba(219, 146, 0, .18); }
.drop__preview { display: grid; place-items: center; flex: none; width: 72px; height: 72px; overflow: hidden; border-radius: 50%; background: var(--surface); color: var(--faint); box-shadow: var(--shadow-1); }
.drop__preview img { width: 100%; height: 100%; object-fit: cover; }
.drop__preview .icon { width: 26px; height: 26px; }
.drop__text { display: grid; gap: 2px; font-size: 14px; }
.drop__text b { font-weight: 500; }
.drop__text small { color: var(--muted); }

.factions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding-top: 22px; border-top: 1px solid var(--line); }
.suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 12.5px; color: var(--muted); }
.suggest button { padding: 2px 8px; border-radius: 6px; background: var(--saffron-wash); color: var(--saffron-ink); font: 500 12px/1.5 var(--f-mono); }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.check--ok { color: var(--leaf); }
.check--bad { color: var(--danger); }

/* books page */
.books { display: grid; grid-template-columns: 410px minmax(0, 1fr); gap: 24px; align-items: start; }
.books__form { position: sticky; top: 104px; }
.books__form .fgrid { gap: 14px; }
@media (max-width: 1320px) { .books { grid-template-columns: minmax(0, 1fr); } .books__form { position: relative; top: 0; } }

/* ---------- login ---------- */
.login { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; background: var(--bg); }
.login__art { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: clamp(28px, 4vw, 48px); background: var(--ink); color: var(--on-dark); isolation: isolate; }
.login__art > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.login__art::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(21, 18, 14, .55), rgba(21, 18, 14, .2) 40%, rgba(21, 18, 14, .92)); }
.login__home { display: inline-flex; align-items: center; gap: 12px; align-self: flex-start; }
.login__home img { width: 44px; height: 44px; }
.login__home span { font-family: var(--f-display); font-size: 21px; line-height: 1.1; }
.login__quote p:first-child { font-family: var(--f-si); font-weight: 700; font-size: clamp(2.6rem, 5.6vw, 4.8rem); line-height: 1.2; color: var(--saffron-hi); }
.login__quote p:last-child { margin-top: 8px; font-family: var(--f-display); font-size: clamp(1.3rem, 2vw, 1.7rem); color: var(--on-dark-muted); }
.login__panel { display: grid; place-items: center; padding: clamp(28px, 5vw, 64px) var(--gutter); }
.login__form { display: grid; gap: 18px; width: 100%; max-width: 400px; }
.login__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.login__brand .bf-mark { width: 44px; height: 44px; }
.login__brand b { display: block; font-family: var(--f-display); font-size: 28px; font-weight: 400; line-height: 1; }
.login__brand small { color: var(--muted); font-size: 13px; }
.login__form h1 { font-family: var(--f-display); font-size: clamp(2.4rem, 4vw, 3.2rem); font-weight: 400; line-height: 1; letter-spacing: -.015em; }
.login__form > p { color: var(--muted); }
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-sm); font-size: 14px; }
.alert .icon { margin-top: 1px; }
.alert--error { background: var(--danger-wash); color: var(--danger); }
.alert--info { background: var(--leaf-wash); color: var(--leaf); }
.pw { position: relative; }
.pw .input { padding-right: 52px; }
.pw__toggle { position: absolute; right: 6px; top: 50%; display: grid; place-items: center; width: 38px; height: 38px; transform: translateY(-50%); border-radius: 8px; color: var(--muted); }
.pw__toggle:hover { background: var(--surface-2); color: var(--text); }
.pw__toggle .eye-off { display: none; }
.pw.is-visible .eye-on { display: none; }
.pw.is-visible .eye-off { display: block; }
.login__back { display: inline-flex; align-items: center; gap: 8px; justify-self: center; margin-top: 8px; font-size: 14px; color: var(--muted); }
.login__back:hover { color: var(--text); }
@media (max-width: 860px) {
  .login { grid-template-columns: minmax(0, 1fr); }
  .login__art { min-height: 220px; }
  .login__quote p:first-child { font-size: 2.4rem; }
}
@media (min-width: 1321px) and (max-width: 1600px) { .books .rowbtn span { display: none; } }
.books__form { scroll-margin-top: 96px; }
.side:focus, .side:focus-visible { outline: none; }

/* tables become stacked rows on phones */
@media (max-width: 640px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { position: relative; padding: 14px 18px; border-bottom: 1px solid var(--line); }
  .table tbody tr:last-child { border-bottom: 0; }
  .table td { padding: 3px 0; border: 0; text-align: left !important; white-space: normal; }
  .table td[data-label]:not([data-label=""]):not([data-label="Member"]):not([data-label="Title"]):not([data-label="No."]):not([data-label="Book no."])::before {
    content: attr(data-label); display: inline-block; min-width: 92px; margin-right: 8px;
    font: 500 10px/1.6 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
  }
  .table td[data-label="No."], .table td[data-label="Book no."] { margin-bottom: 6px; }
  .table td[data-label="Member"], .table td[data-label="Title"] { margin-bottom: 6px; }
  .table td[data-label=""] { margin-top: 6px; }
  .table .cell-main { min-width: 0; }
  .table .cell-clip { max-width: none; white-space: normal; }
  .table td[data-label="Phone"] a { display: inline !important; margin-right: 10px; }
  .table td small[style*="block"] { display: inline !important; margin-left: 8px; }
}
.table .phone { display: block; }
@media (max-width: 640px) {
  .table .phone { display: inline; margin-right: 10px; }
  .table td > span[style*="block"], .table .cell-clip { display: inline !important; }
  .table td > span + small { margin-left: 8px; }
  .factions .btn { flex: 1 1 0; }
}
