:root {
  /* PCSPickup: diplomatic navy, warm white, and restrained red. */
  --paper: #f6f5f1;
  --white: #fffdfa;
  --ink: #1f2d42;
  --muted: #5e6877;
  --line: #dce0e5;
  --line-strong: #aab7c6;
  --brand: #193455;
  --brand-hover: #284c72;
  --brand-soft: #edf1f6;
  --surface-subtle: #f2f4f7;
  --accent: #9f3f46;
  --focus: #356da6;
  --gold: #ae8143;
  --wood: #c2a67e;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
a {
  color: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  text-decoration: none;
  font-weight: 550;
  font-size: 13px;
}
button:hover,
.link-button:hover {
  background: var(--brand-soft);
  border-color: var(--line-strong);
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button svg,
nav svg,
.search-field > svg,
.empty > svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.primary:hover {
  background: var(--brand-hover);
  color: #fff;
}
.danger {
  color: #963d2d;
}
.quiet,
.reset-link {
  background: transparent;
  border: 0;
  text-decoration: underline;
}
header {
  height: 68px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #fffdfaf5;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(12px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  text-decoration: none;
  line-height: 1;
}
.brand-mark {
  width: 45px;
  height: 45px;
  object-fit: contain;
  display: block;
}
.brand-wordmark {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.brand-name {
  font:
    700 23px/1 Georgia,
    serif;
  letter-spacing: 0.025em;
}
.brand-accent {
  color: var(--accent);
}
.brand-subtitle {
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}
nav {
  display: flex;
  align-items: center;
  gap: 5px;
}
nav button {
  border-color: transparent;
  background: transparent;
  min-height: 42px;
  padding: 8px 11px;
  font-size: 12px;
  color: var(--muted);
}
nav button.active {
  background: var(--brand-soft);
  color: var(--brand);
}
nav button svg {
  width: 17px;
  height: 17px;
}
nav .nav-label {
  white-space: nowrap;
}
nav .nav-count {
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
main {
  max-width: 1512px;
  margin: auto;
  padding: 20px 28px 36px;
  min-height: calc(100dvh - 114px);
}
h1,
h2,
h3 {
  color: var(--ink);
}
h1 {
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: -0.6px;
  margin: 0 0 18px;
  font-weight: 650;
}
h2 {
  font-size: 19px;
  line-height: 1.3;
  margin: 0 0 14px;
  font-weight: 650;
}
h3 {
  font-size: 16px;
  line-height: 1.35;
  margin: 0 0 8px;
  font-weight: 650;
}
p {
  line-height: 1.5;
}
.muted {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}
input,
select,
textarea {
  font-weight: 400;
  width: 100%;
  padding: 9px 11px;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--white);
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
}
textarea {
  min-height: 76px;
  resize: vertical;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}
label > input,
label > select,
label > textarea {
  margin-top: 5px;
}
input[type="file"] {
  font-size: 12px;
}
.catalog-controls {
  margin: 0;
}
.search-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.search-field {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.search-field > svg {
  position: absolute;
  left: 12px;
  color: var(--muted);
  pointer-events: none;
}
.search-field input {
  padding-left: 39px;
  padding-right: 43px;
  height: 42px;
}
.search-submit {
  position: absolute;
  right: 1px;
  top: 1px;
  width: 40px;
  height: 40px;
  min-height: 40px;
  border: 0;
  background: transparent;
  padding: 8px;
  color: var(--muted);
}
.search-submit svg {
  width: 16px;
}
.search-row > select {
  width: 166px;
  height: 42px;
}
.search-row > button {
  height: 42px;
}
.layout-toggle {
  width: 42px;
  padding: 10px;
}
.genre-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 9px 0 3px;
}
.genre-row::-webkit-scrollbar {
  display: none;
}
.genre-chip {
  white-space: nowrap;
  min-height: 32px;
  padding: 5px 12px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  font-size: 12px;
  color: var(--muted);
}
.genre-chip.active {
  background: var(--brand);
  color: white;
}
.genre-chip:hover {
  background: var(--brand-soft);
}
.genre-chip.active:hover {
  background: var(--brand-hover);
}
.filter-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.filter-actions {
  grid-column: 1/-1;
  display: flex;
  gap: 8px;
}
.catalog-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 31px;
  font-size: 11px;
  color: var(--muted);
}
.catalog-meta .reset-link {
  min-height: 30px;
  padding: 2px 0;
  font-size: 11px;
}
.count {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 12px;
}
/* Continuous wooden ledges run behind the covers, including partly filled rows. */
.shelves {
  --cover-height: 199px;
  --info-height: 102px;
  --row-height: calc(var(--cover-height) + var(--info-height));
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-auto-rows: var(--row-height);
  gap: 0;
  border: 6px solid #c4ac8a;
  border-top-width: 8px;
  border-bottom-width: 8px;
  border-radius: 5px;
  background: repeating-linear-gradient(
    to bottom,
    #eee8dc 0,
    #f5f0e5 16px,
    #e8dfd0 calc(var(--cover-height) - 15px),
    #d2bc9a calc(var(--cover-height) - 15px),
    #e2ceb0 calc(var(--cover-height) - 12px),
    #b79a71 calc(var(--cover-height) - 11px),
    #b79a71 calc(var(--cover-height) - 5px),
    #8f7552 calc(var(--cover-height) - 4px),
    #ded5c6 var(--cover-height),
    var(--paper) calc(var(--cover-height) + 5px),
    var(--paper) var(--row-height)
  );
  box-shadow: 0 2px 5px #483c2310;
  overflow: hidden;
}
.book-card {
  min-width: 0;
  position: relative;
}
.book-card[hidden] {
  display: none !important;
}
/* Owned chrome fills card layouts, never the wooden bookshelf behind covers. */
.list-view .book-card.is-owned {
  background: var(--brand-soft);
  border-radius: 8px;
}
.listing-owner-mark {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  font-weight: 600;
  color: var(--brand);
}
.book-detail.is-owned {
  background: var(--brand-soft);
  border-radius: 12px;
  padding: 16px;
  box-shadow: inset 3px 0 0 var(--brand);
}
.cover-space {
  height: var(--cover-height, 190px);
  position: relative;
  padding: 13px 16px 15px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.book-face {
  position: relative;
  height: 100%;
  width: max-content;
  max-width: 100%;
}
.book-cover {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.cover-space .book-cover {
  width: auto;
  max-width: 100%;
}
.cover-space .book-cover img {
  width: auto;
  max-width: 100%;
}
.book-face .save-book,
.book-face .cover-add {
  z-index: 2;
}
.book-cover:hover {
  background: transparent;
  border: 0;
}
.book-cover img {
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(3px 2px 2px #352d2940);
  transition: transform 0.16s ease;
}
.book-cover:hover img {
  transform: translateY(-4px);
}
.cover-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 115px;
  max-width: 100%;
  height: 95%;
  padding: 14px;
  background: linear-gradient(90deg, #1b352a 0 5px, #44604e 6px, #365340 13px);
  border-radius: 2px 4px 4px 2px;
  border: 1px solid #223c2d;
  color: #f9efd8;
  text-align: center;
  font:
    17px/1.3 Georgia,
    serif;
  box-shadow: 3px 2px 3px #352d2930;
  overflow: hidden;
}
.book-card:nth-child(3n) .cover-fallback {
  background: linear-gradient(90deg, #603e38 0 5px, #886358 6px, #765047 13px);
}
.book-card:nth-child(5n) .cover-fallback {
  background: linear-gradient(90deg, #354954 0 5px, #577082 6px, #415e6e 13px);
}
.save-book,
.cover-add {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 8px;
  border: 0;
  border-radius: 50%;
  background: #fffdfaeb;
  box-shadow: 0 1px 4px #0001;
  color: var(--muted);
}
.save-book {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}
.save-book::before {
  content: "";
  position: absolute;
  inset: 3px;
  background: color-mix(in srgb, var(--white) 55%, transparent);
  pointer-events: none;
  -webkit-mask: url("/static/brand/favorite-backing.svg") center / contain no-repeat;
  mask: url("/static/brand/favorite-backing.svg") center / contain no-repeat;
  filter: drop-shadow(0 1px 1px #00000018);
}
.save-book svg {
  position: relative;
  z-index: 1;
}
[data-save].is-saved {
  color: var(--brand);
}
[data-save].is-saved svg {
  background-image: url("/static/brand/favorite-heart.svg");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-origin: content-box;
}
@media (forced-colors: active) {
  [data-save].is-saved svg {
    background-image: none;
    fill: Highlight;
  }
}
.favorite-effects {
  position: fixed;
  width: 0;
  height: 0;
  z-index: 100;
  pointer-events: none;
}
.favorite-confetti {
  position: absolute;
  left: -2px;
  top: -3px;
  width: 4px;
  height: 6px;
  border-radius: 1px;
  box-shadow: 0 0 1px #19345580;
}
.favorite-shard {
  position: absolute;
  width: var(--heart-size);
  height: var(--heart-size);
  left: calc(var(--heart-size) / -2);
  top: calc(var(--heart-size) / -2);
  background: url("/static/brand/favorite-heart.svg") center / contain no-repeat;
}
.favorite-shard-left {
  clip-path: polygon(0 0, 52% 0, 44% 38%, 60% 54%, 44% 70%, 52% 100%, 0 100%);
}
.favorite-shard-right {
  clip-path: polygon(52% 0, 100% 0, 100% 100%, 52% 100%, 44% 70%, 60% 54%, 44% 38%);
}
.cover-badges {
  position: absolute;
  left: 7px;
  bottom: 20px;
  pointer-events: none;
  max-width: calc(100% - 14px);
}
.badge {
  display: inline-block;
  padding: 3px 6px;
  font-size: 10px;
  font-weight: 650;
  background: #e5ebdf;
  border-radius: 4px;
  line-height: 1.4;
  margin: 0 3px 3px 0;
}
.badge.warn {
  background: #f4e3c5;
  color: #805921;
}
.badge.held {
  background: #e7e0ed;
  color: #675374;
}
.book-info {
  height: var(--info-height, 104px);
  padding: 9px 13px 7px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.book-info h3 {
  font-family: inherit;
  font-size: 13px;
  line-height: 1.25;
  margin: 0;
  min-width: 0;
}
.book-title {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-align: left;
  line-height: 1.25;
  font: inherit;
  min-width: 0;
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.book-title:hover {
  background: transparent;
  text-decoration: underline;
}
.book-info > p {
  flex-shrink: 0;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
  margin: 3px 0 0;
  line-height: 1.3;
}
.book-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin-top: auto;
}
.price {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: -0.2px;
}
.add-book,
.edit-book {
  font-size: 11px;
  min-height: 34px;
  padding: 5px 9px;
  background: transparent;
  border-color: transparent;
  color: var(--brand);
}
.add-book svg {
  width: 15px;
  height: 15px;
}
.add-book:hover,
.edit-book:hover {
  background: var(--brand-soft);
}
.is-added {
  color: #326a41;
}
.list-view {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
}
.list-view .book-card {
  display: flex;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.list-view .cover-space {
  width: 100px;
  height: 126px;
  padding: 0 10px;
  flex-shrink: 0;
}
.list-view .book-info {
  height: 126px;
  flex: 1;
  padding: 5px 8px;
}
.list-view .book-info h3 {
  font-size: 15px;
}
.list-view .cover-badges {
  bottom: 2px;
  left: 0;
}
.list-view .save-book,
.list-view .cover-add {
  top: -5px;
  right: -2px;
}
.list-view .cover-fallback {
  font-size: 12px;
  padding: 9px;
}
.list-view .book-actions {
  justify-content: flex-start;
  gap: 20px;
}
.list-view .add-book {
  border: 1px solid var(--line);
}
.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 17px;
  min-height: 140px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
}
.empty > svg {
  width: 36px;
  height: 36px;
  color: #9aa18e;
}
.empty h2 {
  font-size: 17px;
  margin: 0 0 5px;
}
.empty p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  max-width: 440px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
  font-size: 12px;
}
.pagination:empty {
  display: none;
}
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 16px;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.between {
  justify-content: space-between;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}
.full {
  grid-column: 1/-1;
}
.notice {
  border-left: 3px solid var(--gold);
  background: #f6efdf;
  padding: 10px 13px;
  font-size: 12px;
  line-height: 1.5;
  margin: 12px 0;
}
.notice p {
  margin: 8px 0;
}
.success {
  background: #eaf1e4;
  border-color: #629055;
}
.private {
  white-space: pre-wrap;
}
form .actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.admin-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.admin-heading h1 {
  margin: 0;
  font-size: 23px;
}
.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  scrollbar-width: none;
}
.tabs button {
  white-space: nowrap;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 12px;
  font-size: 12px;
}
.tabs .active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  background: transparent;
}
.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.toolbar input {
  flex: 1;
  min-width: 0;
}
.toolbar button {
  flex-shrink: 0;
}
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.inventory-grid .book-card {
  display: flex;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
}
.inventory-grid .cover-space {
  height: 112px;
  width: 80px;
  padding: 0;
  flex-shrink: 0;
}
.inventory-grid .book-info {
  height: 112px;
  flex: 1;
  padding: 0 0 0 12px;
}
.inventory-grid .cover-fallback {
  font-size: 12px;
  padding: 8px;
}
.inventory-grid .cover-badges {
  bottom: 0;
  left: 0;
}
.inbox-caption {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 12px;
}
.job {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.job:first-child {
  padding-top: 0;
}
.job:last-child {
  border: 0;
  padding-bottom: 0;
}
.job p {
  margin: 3px 0;
  font-size: 12px;
}
.job .row {
  justify-content: flex-end;
}
.job strong {
  font-size: 13px;
}
.capture {
  padding: 15px;
  border: 1px dashed #b3bea8;
  border-radius: 8px;
  background: var(--brand-soft);
  margin-bottom: 16px;
}
.capture .muted {
  margin: 8px 0;
}
.photos {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 10px 0;
}
.photos:empty,
.progress:empty {
  display: none;
}
.photo {
  position: relative;
  flex-shrink: 0;
}
.photo img {
  width: 68px;
  height: 86px;
  object-fit: cover;
  border-radius: 5px;
}
.photo button {
  position: absolute;
  right: 0;
  top: 0;
  min-height: 30px;
  width: 30px;
  padding: 2px;
  background: #fff;
}
.progress {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0;
}
.vol-row {
  display: grid;
  grid-template-columns: 50px 1fr 82px 36px;
  gap: 6px;
  align-items: center;
  margin: 7px 0;
}
.vol-row label {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}
.vol-row button {
  padding: 4px;
  min-height: 36px;
}
.vol-row input {
  min-width: 0;
}
.vol-row label input {
  margin: 0;
}
.order-items {
  list-style: none;
  padding: 0;
}
.order-items li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  font-size: 13px;
}
.removed {
  text-decoration: line-through;
  color: #899083;
}
.order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.order-head h3 {
  margin: 0;
}
dialog {
  width: min(860px, calc(100vw - 40px));
  max-height: calc(100dvh - 40px);
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 90px #12251b38;
}
dialog::backdrop {
  background: #162a2366;
  backdrop-filter: blur(3px);
}
dialog .close {
  position: sticky;
  float: right;
  top: 0;
  z-index: 2;
  min-height: 36px;
  width: 36px;
  padding: 3px;
  font-size: 24px;
  border: 0;
  background: var(--surface-subtle);
}
dialog h2 {
  padding-right: 32px;
}
dialog #edit-form > .actions {
  position: sticky;
  bottom: -23px;
  background: var(--paper);
  padding: 12px 0;
  border-top: 1px solid var(--line);
  z-index: 1;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
}
.detail-cover {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: #ede9df;
  border-radius: 6px;
}
.detail-thumbs {
  display: flex;
  gap: 6px;
  overflow: auto;
  margin-top: 8px;
}
.detail-thumbs button {
  padding: 3px;
}
.detail-thumbs img {
  height: 54px;
  max-width: 54px;
  object-fit: cover;
}
.detail-grid h2 {
  font-size: 25px;
  margin: 8px 0 10px;
}
.detail-grid p {
  font-size: 13px;
}
.detail-grid .row {
  margin-top: 15px;
}
details {
  margin: 12px 0;
}
summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}
details[open] > summary {
  margin-bottom: 12px;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
}
.recovery {
  font: 14px monospace;
  word-break: break-all;
  background: var(--surface-subtle);
  padding: 12px;
  border-radius: 6px;
}
.signin {
  max-width: 390px;
  margin: 28px auto;
  padding: 25px;
}
.signin h1 {
  font-size: 27px;
  margin: 0 0 22px;
}
.google-signin,
.guest-signin {
  display: flex;
  width: 100%;
  min-height: 46px;
}
.google-signin {
  font-weight: 600;
}
.signin-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 17px 0;
  color: var(--muted);
  font-size: 12px;
}
.signin-divider:before,
.signin-divider:after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}
.guest-return {
  margin: 20px 0 0;
}
.guest-return summary {
  font-weight: 500;
}
.guest-return form {
  margin-top: 14px;
}
.guest-return button {
  width: 100%;
  margin-top: 10px;
}
#toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90vw;
  padding: 11px 17px;
  background: var(--brand);
  color: white;
  border-radius: 7px;
  z-index: 20;
  box-shadow: 0 4px 20px #0002;
  font-size: 13px;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}
.loading {
  font-size: 13px;
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
@media (min-width: 1600px) {
  .shelves {
    --cover-height: 225px;
  }
}
@media (max-width: 1150px) {
  .shelves {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    --cover-height: 186px;
  }
  header {
    padding: 0 20px;
  }
  main {
    padding: 16px 20px 30px;
  }
  .inventory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .shelves {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    --cover-height: 177px;
  }
  nav button {
    padding: 8px;
    font-size: 11px;
    gap: 5px;
  }
  .brand-mark {
    width: 38px;
    height: 38px;
  }
  .brand-name {
    font-size: 20px;
  }
  .brand-subtitle {
    font-size: 8px;
  }
}
@media (max-width: 720px) {
  header {
    height: 58px;
    padding: 0 13px;
  }
  .brand-mark {
    width: 40px;
    height: 40px;
  }
  .brand-name {
    font-size: 21px;
  }
  .brand-subtitle {
    font-size: 8px;
  }
  .brand-wordmark {
    gap: 3px;
  }
  nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    height: calc(60px + env(safe-area-inset-bottom));
    padding: 3px 6px calc(3px + env(safe-area-inset-bottom));
    justify-content: space-around;
    gap: 2px;
    background: var(--white);
    border-top: 1px solid var(--line);
    box-shadow: 0 -3px 16px #23372e08;
    z-index: 10;
  }
  header {
    backdrop-filter: none;
  }
  nav button {
    position: relative;
    flex: 1;
    min-width: 0;
    min-height: 48px;
    flex-direction: column;
    gap: 3px;
    font-size: 10px;
    padding: 5px 2px;
    border-radius: 7px;
  }
  nav button svg {
    width: 19px;
    height: 19px;
  }
  nav .nav-count {
    position: absolute;
    top: 0;
    left: calc(50% + 7px);
    font-size: 9px;
    min-width: 15px;
    height: 15px;
    border: 1px solid var(--white);
  }
  nav button.active {
    background: var(--brand-soft);
  }
  main {
    padding: 10px 12px 20px;
    min-height: calc(100dvh - 160px);
  }
  body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }
  h1 {
    font-size: 23px;
    margin-bottom: 14px;
  }
  .search-row {
    gap: 6px;
    flex-wrap: wrap;
  }
  .search-field {
    flex-basis: calc(100% - 94px);
    order: 0;
  }
  .search-row > select {
    position: absolute;
    width: 114px;
    height: 32px;
    min-height: 32px;
    right: 0;
    top: 50px;
    font-size: 11px;
    padding: 4px 6px;
    background: transparent;
    border: 0;
  }
  .catalog-controls {
    position: relative;
  }
  .search-row > #filter-toggle {
    order: 1;
    width: 42px;
    padding: 9px;
  }
  .search-row > #filter-toggle span {
    display: none;
  }
  .search-row > .layout-toggle {
    order: 2;
    width: 40px;
    padding: 9px;
  }
  .genre-row {
    margin-right: 120px;
    padding-top: 8px;
  }
  .genre-chip {
    font-size: 11px;
    min-height: 32px;
    padding: 5px 9px;
  }
  .catalog-meta {
    font-size: 10px;
    min-height: 27px;
  }
  .catalog-meta > span:last-child {
    font-size: 9px;
  }
  .filter-panel {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    padding: 12px;
  }
  .filter-panel input,
  .filter-panel select {
    font-size: 12px;
  }
  .shelves {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    --cover-height: 148px;
    --info-height: 102px;
    border-width: 4px;
    border-top-width: 6px;
    border-bottom-width: 6px;
  }
  .cover-space {
    padding: 12px 10px 15px;
  }
  .book-info {
    padding: 8px 7px 5px;
  }
  .book-info h3 {
    font-size: 12px;
    line-height: 1.3;
  }
  .book-info > p {
    font-size: 10px;
  }
  .price {
    font-size: 13px;
  }
  .book-actions {
    gap: 1px;
  }
  .add-book {
    min-height: 40px;
    min-width: 40px;
    padding: 5px;
  }
  .add-book span {
    display: none;
  }
  .add-book svg {
    width: 18px;
    height: 18px;
  }
  .save-book,
  .cover-add {
    width: 40px;
    height: 40px;
    min-height: 40px;
    right: 0;
    top: 0;
    background: transparent;
    box-shadow: none;
  }
  .save-book svg,
  .cover-add svg {
    background: #fffdfaef;
    box-shadow: 0 1px 3px #0002;
    border-radius: 50%;
    width: 27px;
    height: 27px;
    padding: 5px;
    overflow: visible;
  }
  .save-book svg {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }
  .save-book::before {
    inset: 4px;
  }
  .cover-badges {
    left: 5px;
    bottom: 19px;
  }
  .badge {
    font-size: 9px;
    padding: 2px 4px;
  }
  .cover-fallback {
    font-size: 13px;
    padding: 10px;
  }
  .book-cover img {
    filter: drop-shadow(2px 2px 2px #352d2940);
  }
  .list-view {
    grid-template-columns: 1fr;
    padding: 0 10px;
  }
  .list-view .cover-space {
    width: 83px;
    height: 105px;
  }
  .list-view .book-info {
    height: 105px;
  }
  .list-view .book-info h3 {
    font-size: 14px;
  }
  .list-view .add-book span {
    display: inline;
  }
  .list-view .add-book {
    padding: 5px 10px;
  }
  .list-view .book-actions {
    gap: 16px;
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 14px;
    margin-bottom: 12px;
  }
  .empty {
    min-height: 112px;
    padding: 18px;
    gap: 13px;
  }
  .empty h2 {
    font-size: 15px;
  }
  .empty p {
    font-size: 12px;
  }
  .empty > svg {
    width: 28px;
    height: 28px;
  }
  .admin-heading {
    margin-bottom: 10px;
  }
  .admin-heading h1 {
    font-size: 21px;
  }
  .admin-heading button {
    font-size: 12px;
    min-height: 42px;
  }
  .tabs {
    margin-bottom: 12px;
  }
  .tabs button {
    font-size: 11px;
    min-height: 44px;
    padding: 9px;
  }
  .inventory-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .inventory-grid .cover-space,
  .inventory-grid .book-info {
    height: 100px;
  }
  .inventory-grid .book-card {
    padding: 9px;
  }
  .inventory-grid .book-info h3 {
    font-size: 14px;
  }
  .inventory-grid .book-info > p {
    font-size: 12px;
  }
  .edit-book {
    min-height: 40px;
  }
  .job {
    flex-wrap: wrap;
    gap: 8px;
  }
  .job .row {
    justify-content: flex-start;
  }
  .job .row button {
    min-height: 40px;
    font-size: 11px;
  }
  dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 20px);
    padding: 16px;
    border-radius: 10px;
  }
  dialog h2 {
    font-size: 20px;
  }
  dialog #edit-form > .actions {
    bottom: -16px;
    padding: 10px 0;
  }
  .detail-grid {
    grid-template-columns: 100px 1fr;
    gap: 13px;
  }
  .detail-cover {
    max-height: 155px;
  }
  .detail-grid h2 {
    font-size: 20px;
  }
  .detail-thumbs {
    flex-wrap: wrap;
  }
  .detail-thumbs img {
    height: 34px;
    max-width: 34px;
  }
  .detail-thumbs button {
    min-height: 40px;
  }
  .detail-grid .row {
    gap: 6px;
  }
  .detail-grid .row button {
    font-size: 11px;
    padding: 8px;
  }
  .detail-grid p {
    font-size: 12px;
  }
  .capture {
    padding: 12px;
  }
  .capture button {
    font-size: 12px;
    min-height: 44px;
  }
  .capture .row {
    gap: 7px;
  }
  .form-grid {
    gap: 10px;
  }
  .form-grid input,
  .form-grid select,
  .form-grid textarea {
    font-size: 16px;
  }
  .vol-row {
    grid-template-columns: 42px minmax(0, 1fr) 74px 32px;
    gap: 4px;
  }
  .vol-row input {
    padding: 7px;
    font-size: 13px;
  }
  .vol-row label {
    font-size: 10px;
  }
  .vol-row button {
    min-width: 32px;
  }
  .order-head {
    align-items: flex-start;
  }
  .signin {
    margin: 12px auto;
    padding: 22px;
  }
  #toast {
    bottom: calc(74px + env(safe-area-inset-bottom));
    width: max-content;
    max-width: calc(100vw - 24px);
  }
  footer {
    padding: 12px;
    font-size: 9px;
    gap: 8px;
  }
  .toolbar input {
    font-size: 13px;
  }
  .toolbar button {
    font-size: 12px;
  }
}
@media (max-width: 350px) {
  .shelves {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    --cover-height: 155px;
  }
  .brand-name {
    font-size: 19px;
  }
  .catalog-meta > span:last-child {
    display: none;
  }
  .detail-grid {
    grid-template-columns: 80px 1fr;
  }
  .tabs button {
    padding: 9px 7px;
  }
  .search-field input {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.sample-badge {
  background: #f7f1e4;
  color: #776246;
}
.capture > label {
  max-width: 300px;
  margin: 0 0 12px;
}
.listing-actions {
  margin: 14px 0;
}
.listing-actions > summary {
  color: var(--muted);
}

/* Cover action: restrained, inset, and independent of the surrounding card width. */
.cover-space {
  overflow: hidden;
}
.cover-space .cover-add,
.object-media .cover-add {
  position: absolute;
  left: 50%;
  right: auto;
  top: auto;
  bottom: 23px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(78px, calc(var(--book-face-width, 100%) - 18px));
  height: 28px;
  min-width: 0;
  min-height: 28px;
  padding: 5px 10px;
  gap: 4px;
  border: 1px solid #ffffff20;
  border-radius: 16px;
  background: #193455f2;
  color: #fff;
  box-shadow: 0 2px 6px #142e2520;
  opacity: 0;
  transform: translate(-50%, 7px);
  pointer-events: none;
  transition:
    transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 0.22s ease;
  z-index: 2;
}
.object-media .cover-add {
  bottom: 10px;
  width: min(96px, calc(100% - 18px));
}
.cover-space .cover-add svg,
.object-media .cover-add svg {
  width: 12px;
  height: 12px;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  color: inherit;
  stroke-width: 2;
}
.cover-space .cover-add span,
.object-media .cover-add span {
  display: inline;
  font-size: 11px;
  line-height: 1;
  font-weight: 550;
}
.book-card:hover .cover-add,
.book-card:focus-within .cover-add,
.book-card.is-owned .cover-manage {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.cover-space .cover-add:hover,
.object-media .cover-add:hover {
  background: var(--brand-hover);
}
.cover-space .cover-add.is-added {
  background: #38694b;
  color: white;
}
.list-view .cover-add {
  bottom: 7px;
}
@media (hover: none), (pointer: coarse) {
  .cover-space .cover-add,
  .object-media .cover-add {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
  }
  .cover-space .cover-add::before {
    content: "";
    position: absolute;
    inset: -7px -3px;
  }
  .cover-badges {
    bottom: 58px;
  }
  .list-view .cover-badges {
    bottom: 42px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .cover-badges {
    transition: opacity 0.16s ease;
  }
  .book-card:hover .cover-badges,
  .book-card:focus-within .cover-badges {
    opacity: 0;
  }
}

/* Inventory editing starts with the actions and the few fields used every day. */
dialog:has(.listing-editor) {
  width: min(620px, calc(100vw - 32px));
  padding: 18px;
}
.listing-editor > h2 {
  font-size: 19px;
  line-height: 1.3;
  margin-bottom: 8px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.editor-actions {
  position: sticky;
  top: -18px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 36px 11px 0;
  margin-bottom: 12px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.editor-actions button {
  min-height: 38px;
  white-space: nowrap;
  font-size: 12px;
}
.editor-status {
  font-size: 10px;
  text-transform: capitalize;
  color: var(--muted);
  margin-left: auto;
}
dialog:has(.listing-editor) > .close {
  z-index: 4;
}
.editor-core {
  gap: 8px;
}
.editor-core label {
  margin: 0;
}
.editor-core input,
.editor-core select {
  margin-top: 3px;
  min-height: 36px;
  padding: 7px 9px;
}
.listing-editor details {
  border-top: 1px solid var(--line);
  margin: 0;
  padding: 0;
}
.listing-editor details > summary {
  min-height: 38px;
  padding: 10px 0;
  font-weight: 550;
}
.listing-editor details[open] > summary {
  margin: 0 0 5px;
}
.listing-editor details[open] {
  padding-bottom: 10px;
}
.listing-editor #edit-form > .editor-core {
  margin-bottom: 13px;
}
.listing-editor .capture {
  margin: 0;
  padding: 10px;
  border: 0;
}
.listing-editor .editor-photos > summary .muted {
  font-size: 10px;
  margin-left: 5px;
}
.listing-editor .photos {
  margin: 8px 0;
}
.listing-editor .photo img {
  width: 50px;
  height: 65px;
}
.listing-editor .capture .row button {
  font-size: 11px;
  min-height: 36px;
}
.listing-editor .notice {
  margin: 0;
}
.listing-editor .listing-actions {
  margin: 0;
}
@media (max-width: 720px) {
  dialog:has(.listing-editor) {
    padding: 14px;
    width: calc(100vw - 16px);
  }
  .editor-actions {
    top: -14px;
    padding-top: 8px;
    padding-bottom: 9px;
    padding-right: 32px;
    gap: 6px;
  }
  .editor-actions button {
    min-height: 40px;
    font-size: 12px;
    padding: 7px 10px;
  }
  .editor-status {
    display: none;
  }
  .editor-core input,
  .editor-core select {
    font-size: 16px;
    min-height: 40px;
  }
  .listing-editor > h2 {
    font-size: 18px;
  }
  .listing-editor details > summary {
    min-height: 40px;
  }
  .listing-editor .editor-core {
    gap: 7px;
  }
}

.editor-core textarea {
  min-height: 60px;
  font-weight: 400;
}
.editor-core > .full:empty {
  display: none;
}
.isbn-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  font-size: 12px;
}
.isbn-option .muted {
  margin: 3px 0;
}
.isbn-option button {
  flex-shrink: 0;
  font-size: 11px;
}
.isbn-option a {
  font-size: 11px;
}

.inventory-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}
.remove-book {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 8px;
  border: 0;
  background: transparent;
}
.remove-book:hover {
  background: #f5e5de;
}
.remove-book svg {
  width: 17px;
  height: 17px;
}
@media (max-width: 720px) {
  .remove-book {
    width: 40px;
    height: 40px;
    min-height: 40px;
  }
}

/* Drafts are inventory items, with one compact row per book. */
.drafts-heading {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 12px;
}
.drafts-heading h2 {
  font-size: 17px;
  margin: 0;
}
.drafts-heading h2 span {
  font-size: 12px;
  color: var(--muted);
  margin-left: 5px;
}
.drafts-heading p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.draft-list {
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: var(--white);
}
.draft-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.draft-row:last-child {
  border-bottom: 0;
}
.draft-cover {
  height: 66px;
  width: 48px;
  padding: 0;
  background: var(--paper);
  border: 0;
  overflow: hidden;
  border-radius: 3px;
}
.draft-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.draft-copy {
  min-width: 0;
}
.draft-copy h3 {
  font-size: 14px;
  line-height: 1.3;
  margin: 0 0 3px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.draft-copy p {
  font-size: 12px;
  color: var(--muted);
  margin: 2px 0;
}
.draft-status {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  margin-top: 6px;
  color: var(--muted);
}
.draft-status .ready {
  color: var(--brand);
}
.draft-status strong {
  font-size: 13px;
  color: var(--ink);
}
.draft-actions {
  display: flex;
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
}
.draft-actions button,
.delete-draft {
  font-size: 12px;
  min-height: 36px;
  padding: 7px 10px;
}
.delete-draft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.delete-draft svg {
  width: 14px;
  height: 14px;
}
.draft-copy details {
  font-size: 11px;
  margin-top: 5px;
}
.draft-copy details p {
  max-width: 520px;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .drafts-heading {
    display: block;
  }
  .drafts-heading p {
    margin-top: 5px;
  }
  .draft-row {
    grid-template-columns: 42px minmax(0, 1fr) 100px;
    gap: 8px 12px;
    padding: 12px;
  }
  .draft-cover {
    width: 42px;
    height: 58px;
  }
  .draft-actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }
  .draft-actions > .primary {
    width: 100px;
    white-space: normal;
  }
  .draft-status {
    flex-wrap: wrap;
    gap: 4px 8px;
  }
  .draft-actions button {
    min-height: 40px;
    padding: 7px 9px;
    font-size: 11px;
  }
  .listing-editor .editor-actions .delete-draft {
    min-height: 40px;
  }
  .draft-copy h3 {
    font-size: 14px;
  }
}

.bulk-offer-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--brand-soft);
  color: var(--brand);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
}
.bulk-offer-strip span {
  font-weight: 400;
  font-size: 11px;
}
.bulk-prompt {
  background: var(--brand-soft);
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--brand);
}
.bulk-prompt a {
  white-space: nowrap;
  text-decoration: underline;
}
.price-summary {
  margin: 12px 0;
}
.price-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  font-size: 13px;
}
.price-summary .discount-line {
  color: var(--brand);
}
.price-summary .total-line {
  font-size: 17px;
  border-top: 1px solid var(--line);
  margin-top: 5px;
  padding-top: 9px;
}

.action-count,
nav .action-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 10px;
  background: #c52c35;
  color: #fff;
  font-size: 10px;
  font-weight: 750;
  line-height: 1;
  vertical-align: middle;
}
.action-count[hidden],
nav .nav-count[hidden] {
  display: none;
}
.tabs .action-count {
  margin-left: 4px;
}
nav .action-count {
  margin-left: 3px;
}
@media (max-width: 600px) {
  nav .action-count {
    position: absolute;
    top: 0;
    left: calc(50% + 7px);
    margin: 0;
    border: 1px solid var(--white);
  }
}

.basket-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.basket-heading h1 {
  margin-bottom: 8px;
}
.basket-heading a {
  font-size: 12px;
  text-decoration: underline;
  color: var(--brand);
}
.basket-note {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
}
.basket-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}
.basket-shelf {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  --cover-height: 180px;
}
.basket-summary {
  position: sticky;
  top: 80px;
}
.basket-remove {
  min-height: 36px;
  padding: 4px;
  font-size: 11px;
  border: 0;
  background: transparent;
  color: #984132;
}
.basket-remove:hover {
  background: #f6e6e2;
}
.basket-shelf .book-info {
  padding-left: 7px;
  padding-right: 7px;
}
@media (max-width: 1150px) and (min-width: 801px) {
  .basket-shelf {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    --cover-height: 160px;
  }
}
@media (max-width: 800px) {
  .basket-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .basket-shelf {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    --cover-height: 160px;
  }
  .basket-summary {
    position: static;
  }
  .basket-remove {
    min-height: 40px;
    font-size: 10px;
  }
}
@media (max-width: 350px) {
  .basket-shelf {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.pickup-section {
  margin: 0 0 22px;
}
.pickup-section > h2 {
  font-size: 14px;
  margin: 0 0 10px;
}
.pickup-section > h2 span {
  color: var(--muted);
  font-size: 12px;
  margin-left: 5px;
}
.pickup-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
  padding: 16px;
  margin-bottom: 10px;
}
.pickup-card .pickup-card-head {
  position: static;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  margin: 0 0 13px;
  border: 0;
  background: transparent;
  box-shadow: none;
  min-height: 0;
  backdrop-filter: none;
}
.pickup-card h3 {
  font-size: 16px;
  margin: 5px 0 3px;
}
.pickup-card-head p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
  overflow-wrap: anywhere;
}
.pickup-total {
  font-size: 21px;
  white-space: nowrap;
  padding-top: 14px;
}
.pickup-state {
  font-size: 10px;
  font-weight: 650;
  color: var(--brand);
}
.pickup-state.requested {
  color: #936022;
}
.pickup-books {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.pickup-book {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.pickup-book img,
.pickup-book-placeholder {
  width: 38px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
  background: var(--paper);
  border-radius: 2px;
}
.pickup-book-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}
.pickup-book-placeholder svg {
  width: 20px;
}
.pickup-book strong {
  font-size: 12px;
  display: block;
  line-height: 1.3;
}
.pickup-book span {
  font-size: 11px;
  color: var(--muted);
}
.pickup-note,
.pickup-savings {
  font-size: 12px;
  margin: 10px 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.pickup-note strong {
  margin-right: 6px;
}
.pickup-savings {
  color: var(--brand);
}
.pickup-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.pickup-actions button {
  font-size: 12px;
  min-height: 36px;
}
.pickup-more {
  margin: 0 0 0 auto;
  position: relative;
}
.pickup-more summary {
  font-size: 11px;
  padding: 9px 0;
  color: var(--muted);
}
.pickup-more[open] > summary {
  margin-bottom: 4px;
}
.pickup-more > div {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pickup-instructions {
  margin: 10px 0 0;
}
.pickup-instructions p {
  font-size: 12px;
  margin: 8px 0;
}
.pickup-next,
.pickup-empty {
  font-size: 12px;
  color: var(--muted);
}
.pickup-history {
  margin: 16px 0;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.pickup-history > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  font-size: 13px;
}
.pickup-history > summary:before {
  content: "▸";
  color: var(--muted);
}
.pickup-history[open] > summary:before {
  content: "▾";
}
.pickup-history > summary small {
  font-weight: 400;
  color: var(--muted);
  margin-left: auto;
  font-size: 11px;
}
.pickup-history-row {
  margin: 0;
  border-top: 1px solid var(--line);
}
.pickup-history-row > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  font-size: 12px;
  color: var(--muted);
}
.pickup-history-row > summary > span:first-child {
  flex: 1;
  min-width: 0;
}
.pickup-history-row small {
  display: block;
  font-weight: 400;
  font-size: 10px;
  margin-top: 3px;
}
.pickup-history-row .history-status {
  font-size: 10px;
  font-weight: 400;
}
.history-body {
  padding: 0 0 12px;
}
.account-updates {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
#page-update {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9;
  box-shadow: 0 3px 14px #18312624;
  font-size: 12px;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .pickup-card {
    padding: 12px;
  }
  .pickup-books {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .pickup-card h3 {
    font-size: 15px;
  }
  .pickup-total {
    font-size: 19px;
  }
  .pickup-actions button {
    min-height: 42px;
    font-size: 11px;
    padding: 8px 10px;
  }
  .pickup-more summary {
    min-height: 40px;
    padding: 12px 0;
  }
  .pickup-history > summary small {
    font-size: 10px;
  }
  #page-update {
    bottom: 78px;
  }
  .pickup-book strong {
    font-size: 11px;
  }
}

.catalog-meta {
  height: 30px;
  min-height: 30px;
  max-height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  overflow: hidden;
}
.catalog-meta > span {
  white-space: nowrap;
  flex-shrink: 0;
}
#bulk-progress {
  margin-left: auto;
  color: var(--brand);
  font-weight: 600;
  font-size: 11px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.catalog-meta .reset-link {
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 10px;
}
@media (max-width: 350px) {
  .catalog-meta > #bulk-progress:last-child {
    display: block;
  }
  .catalog-meta {
    font-size: 10px;
  }
}
@media (min-width: 721px) and (max-width: 900px) {
  header nav button { padding: 8px 6px; font-size: 11px; gap: 4px; }
  header nav button svg { display: none; }
}
/* Keep the brand bar close to its contents. */
body > header {
  height: 52px;
  padding: 0 20px;
  border-bottom: 1px solid #dce0e580;
  gap: 14px;
}
body > header .brand-mark {
  width: 36px;
  height: 36px;
}
body > header .brand-name {
  font-size: 21px;
}
body > header .brand-subtitle {
  font-size: 8px;
}
body > header .brand-wordmark {
  gap: 3px;
}
main {
  padding-top: 12px;
}
.basket-summary {
  top: 64px;
}
@media (max-width: 720px) {
  body > header {
    height: 44px;
    padding: 0 12px;
  }
  body > header .brand-mark {
    width: 32px;
    height: 32px;
  }
  body > header .brand-name {
    font-size: 19px;
  }
  body > header .brand-subtitle {
    font-size: 7px;
  }
  main {
    padding-top: 8px;
  }
}

.account-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  margin: 0 0 12px;
}
.account-heading h1 {
  font-size: 19px;
  margin: 0;
  white-space: nowrap;
}
.account-menu {
  position: relative;
  margin: 0;
  min-width: 0;
}
.account-menu > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 0 8px 8px;
  font-size: 12px;
  color: var(--muted);
  list-style: none;
  max-width: 170px;
  overflow: hidden;
  white-space: nowrap;
}
.account-menu > summary::-webkit-details-marker {
  display: none;
}
.account-menu[open] > summary {
  margin: 0;
}
.account-menu-panel {
  position: absolute;
  right: 0;
  top: 100%;
  width: 240px;
  max-width: calc(100vw - 24px);
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 6px 20px #1f2d421a;
  z-index: 6;
}
.account-menu-panel p {
  font-size: 12px;
  margin: 0 0 4px;
  overflow-wrap: anywhere;
}
.account-menu-panel small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 10px;
}
.account-menu-panel button {
  width: 100%;
  min-height: 40px;
}

/* Review fixes: readable controls, compact details, and dependable form feedback. */
.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;
}
.form-error {
  padding: 12px 14px;
  margin: 0 0 14px;
  border: 1px solid #ba6555;
  border-left-width: 4px;
  border-radius: 6px;
  background: #fff0eb;
  color: #743226;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.form-error ul {
  margin: 6px 0 0;
  padding-left: 20px;
}
.form-error:focus {
  outline: 2px solid #963d2d;
  outline-offset: 2px;
}
[aria-invalid="true"] {
  border-color: #963d2d;
}
.dialog-message {
  padding: 10px 12px;
  background: var(--brand-soft);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
}
.editor-actions {
  flex-wrap: wrap;
  padding-right: 0;
}
.editor-actions button {
  min-height: 40px;
}
.editor-actions .delete-draft {
  margin-left: auto;
}
.editor-core input,
.editor-core select {
  min-width: 0;
}
.book-info h2 {
  font-family: inherit;
  font-size: 13px;
  line-height: 1.3;
  margin: 0;
  letter-spacing: normal;
  min-width: 0;
  width: 100%;
  overflow: hidden;
}
.list-view .book-info h2 {
  font-size: 15px;
}
.inventory-grid .book-info h2 {
  font-size: 14px;
}
.book-detail .detail-grid {
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 20px;
  clear: both;
}
.book-detail .detail-cover {
  max-height: 200px;
}
.detail-price {
  font-size: 22px;
  font-weight: 700;
  margin: 12px 0;
}
.book-detail .detail-description {
  font-size: 14px;
  line-height: 1.6;
  margin-top: 18px;
}
.detail-description > p {
  white-space: pre-line;
}
.detail-actions {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.detail-actions button {
  min-height: 44px;
}
.book-detail h2 {
  overflow-wrap: anywhere;
}
.pickup-area {
  font-size: 13px;
  color: var(--brand);
  margin: 0 0 10px;
  line-height: 1.5;
}
.book-detail > .pickup-area {
  margin: 14px 0 0;
}
.search-field input {
  padding-left: 12px;
}
.search-submit {
  border-left: 1px solid var(--line);
  border-radius: 0 6px 6px 0;
}
.small-catalog {
  max-width: 680px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  --cover-height: 220px;
}
.small-catalog .book-info > p {
  font-size: 12px;
}
.settings-integrations {
  margin: 12px 0;
}
.settings-integrations > summary {
  font-size: 14px;
  min-height: 44px;
  padding: 12px 0;
}
.settings-integrations[open] > summary {
  margin-bottom: 8px;
}
.pickup-instructions[open] {
  padding: 10px 12px;
  background: var(--brand-soft);
  border-radius: 6px;
}
.pickup-instructions[open] > summary {
  margin-bottom: 6px;
}
.pickup-instructions p {
  font-size: 13px;
}
.pickup-instructions p:last-child {
  font-weight: 600;
}
.empty + .pagination:empty {
  display: none;
}
#main:focus {
  outline: none;
}
footer {
  font-size: 12px;
}
.book-info > p {
  font-size: 12px;
}
.badge {
  font-size: 11px;
}
.catalog-meta {
  font-size: 12px;
}
@media (max-width: 720px) {
  .book-info h2 {
    font-size: 13px;
    line-height: 1.3;
  }
  .list-view .book-info h2,
  .inventory-grid .book-info h2 {
    font-size: 14px;
  }
  .book-info > p {
    font-size: 12px;
  }
  .badge {
    font-size: 11px;
  }
  .catalog-meta {
    font-size: 12px;
  }
  .catalog-meta > span:last-child {
    font-size: 11px;
  }
  .small-catalog {
    --cover-height: 175px;
    --info-height: 110px;
  }
  .small-catalog .cover-space {
    padding-left: 7px;
    padding-right: 7px;
  }
  .small-catalog .book-info {
    padding-left: 7px;
    padding-right: 7px;
  }
  .search-field input {
    font-size: 16px;
  }
  .book-detail .detail-grid {
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 14px;
  }
  .book-detail .detail-cover {
    max-height: 140px;
  }
  .book-detail .detail-grid h2 {
    font-size: 21px;
    padding-right: 0;
  }
  .book-detail .detail-price {
    font-size: 20px;
  }
  .book-detail .detail-grid p {
    font-size: 13px;
  }
  .book-detail .detail-grid .detail-price {
    font-size: 20px;
  }
  .book-detail .detail-description {
    margin-top: 14px;
    font-size: 14px;
  }
  .book-detail > .muted {
    font-size: 13px;
  }
  .detail-actions button {
    flex: 1;
  }
  .editor-actions {
    padding-right: 0;
    gap: 6px;
  }
  .editor-actions .delete-draft {
    margin-left: 0;
  }
  .editor-actions button {
    white-space: normal;
  }
  .listing-editor > h2 {
    padding-right: 38px;
    min-height: 32px;
  }
  footer {
    font-size: 11px;
  }
  .pickup-area {
    font-size: 13px;
  }
  .empty p {
    font-size: 13px;
  }
}
@media (max-width: 350px) {
  .small-catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    --cover-height: 175px;
  }
  .book-detail .detail-grid {
    grid-template-columns: 75px minmax(0, 1fr);
  }
  .editor-actions button {
    font-size: 12px;
  }
  .book-detail .detail-grid h2 {
    font-size: 19px;
  }
}
.small-catalog:has(> .book-card:only-child) {
  max-width: 250px;
  grid-template-columns: minmax(0, 1fr);
}
.small-catalog:has(> .book-card:nth-child(2):last-child) {
  max-width: 460px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
dialog .form-error {
  padding-right: 44px;
}

/* Photo-first capture and draft review. */
dialog.flow-dialog {
  width: min(620px, calc(100vw - 40px));
  padding: 28px;
  background: var(--white);
}
.flow-dialog .close {
  background: transparent;
  top: 0;
  margin: -10px -10px 0 0;
  z-index: 3;
}
.book-flow {
  clear: none;
}
.book-flow h2 {
  font-size: 26px;
  letter-spacing: -0.6px;
  line-height: 1.2;
  margin: 18px 0 10px;
  padding-right: 28px;
}
.book-flow h2:focus {
  outline: none;
}
.flow-steps {
  display: flex;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: 12px;
  color: var(--muted);
  align-items: center;
  min-height: 24px;
}
.flow-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.flow-steps li + li:before {
  content: "›";
  color: #9a9e92;
}
.flow-steps [aria-current] {
  color: var(--brand);
  font-weight: 700;
}
.flow-intro {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 24px;
}
.flow-help {
  display: block;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  font-weight: 400;
}
.flow-kicker {
  font-size: 11px;
  color: var(--brand);
  font-weight: 600;
}
.capture-group {
  padding: 0;
  border: 0;
  margin: 0;
}
.capture-group legend {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}
.capture-group > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  background: var(--paper);
  padding: 4px;
  border-radius: 9px;
}
.capture-group label {
  margin: 0;
  position: relative;
  text-align: center;
  cursor: pointer;
  font-size: 13px;
}
.capture-group input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  min-height: 0;
}
.capture-group span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  white-space: nowrap;
}
.capture-group input:checked + span {
  background: var(--white);
  border-color: var(--line);
  color: var(--brand);
  box-shadow: 0 1px 3px #1f2d4210;
}
.capture-group input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.capture-group input:disabled + span {
  opacity: 0.6;
}
#capture-hint {
  margin: 10px 0 20px;
  min-height: 18px;
}
.capture-drop {
  background: var(--surface-subtle);
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  padding: 24px 18px;
  text-align: center;
}
.capture-drop.dragover {
  outline: 3px solid var(--brand);
  background: var(--brand-soft);
}
#capture-empty > svg {
  width: 34px;
  height: 34px;
  color: var(--brand);
  display: block;
  margin: 0 auto 15px;
}
#capture-empty strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
}
#capture-empty p {
  font-size: 12px;
  color: var(--muted);
  margin: 7px 0 21px;
}
.capture-buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.capture-buttons button {
  min-height: 44px;
}
.drop-hint {
  font-size: 11px;
  color: var(--muted);
  margin: 14px 0 0;
}
.capture-photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  text-align: left;
  margin-bottom: 20px;
}
.capture-photos:empty {
  display: none;
}
.capture-photo {
  min-width: 0;
}
.capture-photo-image {
  position: relative;
  background: var(--brand-soft);
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 3/4;
}
.capture-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.capture-photo-image button {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 32px;
  min-height: 32px;
  font-size: 20px;
  padding: 0;
  background: var(--white);
  box-shadow: 0 1px 4px #0002;
}
.capture-photo > span {
  display: block;
  font-size: 11px;
  margin-top: 7px;
  color: var(--brand);
}
.capture-photo.failed > span,
.capture-photo.failed p {
  color: #963d2d;
}
.capture-photo p {
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.capture-photo > button {
  font-size: 11px;
  padding: 5px 8px;
}
.capture-save-state:empty {
  display: none;
}
.capture-save-state {
  margin: 14px 0 0;
}
.flow-footer {
  position: sticky;
  bottom: -28px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: var(--white);
  border-top: 1px solid var(--line);
  padding: 16px 0 max(16px, env(safe-area-inset-bottom));
  margin-top: 24px;
  box-shadow: 0 -8px 12px var(--white);
}
.flow-footer button {
  min-height: 44px;
}
.flow-footer .primary {
  min-width: 155px;
}
.flow-footer > button:first-child:not(.primary) {
  margin-right: auto;
  border-color: transparent;
  background: transparent;
}
.flow-saved-photos {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 0 12px;
}
.flow-saved-photos img {
  display: block;
  width: 78px;
  height: 105px;
  object-fit: contain;
  background: var(--paper);
  border-radius: 5px;
}
.processing-status {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
  padding: 18px;
  margin: 12px 0;
}
.processing-status strong {
  font-size: 14px;
}
.processing-dot {
  height: 10px;
  width: 10px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
  animation: processing-pulse 1.8s ease-in-out infinite;
}
@keyframes processing-pulse {
  50% {
    opacity: 0.35;
  }
}
@media (prefers-reduced-motion: reduce) {
  .processing-dot {
    animation: none;
  }
}
.review-preview {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 4px 0 18px;
}
.review-preview > a {
  flex-shrink: 0;
}
.review-preview img {
  width: 94px;
  height: 128px;
  object-fit: contain;
  background: var(--paper);
  border-radius: 5px;
}
.review-preview > div {
  min-width: 0;
}
.review-preview h3 {
  font:
    600 21px/1.25 Georgia,
    serif;
  margin: 7px 0;
  overflow-wrap: anywhere;
}
.review-preview p {
  margin: 5px 0;
  font-size: 13px;
}
.review-preview .flow-help {
  font-size: 12px;
}
.review-description {
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-line;
}
.review-details {
  border-top: 1px solid var(--line);
  padding: 13px 0;
  margin: 0;
}
.review-details summary {
  font-size: 13px;
  min-height: 24px;
  line-height: 24px;
}
.review-details .form-grid {
  margin: 8px 0;
}
.review-decisions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.review-decisions label {
  font-size: 13px;
  margin: 0;
}
.review-decisions input,
.review-decisions select {
  margin-top: 9px;
  font-size: 16px;
  min-height: 46px;
}
.review-decisions .flow-help {
  margin-top: 9px;
}
.review-details .row {
  margin-top: 14px;
}
.published-mark {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  margin-top: 8px;
}
.published-mark svg {
  width: 24px;
  height: 24px;
}
.draft-actions .draft-trash {
  width: 44px;
  min-height: 44px;
  padding: 10px;
  flex-shrink: 0;
}
.draft-trash svg {
  width: 18px;
  height: 18px;
}
@media (max-width: 600px) {
  dialog.flow-dialog {
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - 16px);
    margin: auto 0 0;
    padding: 24px 20px 0;
    border-radius: 16px 16px 0 0;
  }
  .book-flow h2 {
    font-size: 25px;
  }
  .flow-intro {
    margin-bottom: 21px;
    font-size: 14px;
  }
  .capture-drop {
    padding: 22px 12px;
  }
  .flow-footer {
    bottom: 0;
    padding-bottom: max(18px, env(safe-area-inset-bottom));
    margin-top: 20px;
  }
  .flow-footer .primary {
    min-width: 0;
    flex: 1;
  }
  .flow-footer button {
    font-size: 13px;
  }
  .capture-group span {
    font-size: 12px;
    padding: 5px 2px;
  }
  .capture-photos {
    gap: 8px;
  }
  .drop-hint {
    display: none;
  }
  .review-preview {
    gap: 15px;
  }
  .review-preview img {
    width: 78px;
    height: 108px;
  }
  .review-preview h3 {
    font-size: 21px;
  }
  .review-decisions {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .review-details input,
  .review-details textarea {
    font-size: 16px;
  }
  .flow-saved-photos img {
    width: 68px;
    height: 94px;
  }
  .flow-dialog .notice {
    font-size: 13px;
  }
  .book-flow {
    padding-bottom: 0;
  }
  .book-flow > .flow-help:last-child {
    padding-bottom: 20px;
  }
}
@media (max-width: 600px) {
  .book-flow:has(#capture-footer[hidden]) {
    padding-bottom: max(22px, env(safe-area-inset-bottom));
  }
}

.reservation-confirmation {
  background: var(--surface, var(--brand-soft));
  border-left: 3px solid var(--brand);
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 6px;
  overflow-wrap: anywhere;
}
.reservation-confirmation p {
  margin: 0.5rem 0 0;
}
.inventory-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.inventory-filters .count {
  margin: 0;
}
.inventory-filters label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0;
  font-size: 13px;
  cursor: pointer;
}
.inventory-filters input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  accent-color: var(--brand);
}
.inventory-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.inventory-tools button {
  min-height: 44px;
  font-size: 13px;
}

/* Personal libraries and community administration share the existing visual language. */
.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}
.community-context {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.secondary-price {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
}
.seller-name {
  font-size: 0.8rem;
  color: var(--muted, #665d53);
}
.check-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.7rem 0;
}
.check-label input {
  width: auto;
}
.share-form,
.member-row {
  padding: 1rem 0;
  border-top: 1px solid #d8cbb8;
}
.member-row > span {
  display: block;
  font-size: 0.9rem;
}
.seller-basket {
  margin: 1rem 0;
}
.seller-basket form {
  max-width: 36rem;
}
#find-community {
  display: flex;
  align-items: end;
  gap: 0.5rem;
  margin: 1rem 0;
}
#find-community label {
  flex: 1;
}
#invite-output input {
  width: 100%;
}
@media (max-width: 600px) {
  header nav {
    gap: 0;
  }
  header nav button {
    min-width: 0;
    padding-left: 4px;
    padding-right: 4px;
  }
  header nav .nav-label {
    font-size: 10px;
  }
  .community-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .cover-space .cover-add {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
  }
}

/* Basket rows keep reservation details close to the books they belong to. */
.seller-basket-books .book-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.seller-basket-books .cover-space {
  height: 96px;
  padding: 0;
}
.seller-basket-books .book-info {
  height: auto;
  padding: 0;
}
.seller-basket-books .book-info h2 {
  font-size: 15px;
}
.basket-book-badges:empty {
  display: none;
}
.seller-basket-books .cover-fallback {
  font-size: 11px;
  padding: 6px;
}
.seller-basket-books .basket-remove {
  min-height: 44px;
  padding: 8px;
}
.seller-basket .price-summary {
  max-width: 36rem;
}
.checkout-recovery {
  border-left: 4px solid var(--brand);
}

.signin-code {
  font-size: 24px;
  letter-spacing: 0.3em;
  font-variant-numeric: tabular-nums;
}
#email-signin h2 {
  font-size: 20px;
}
#code-delivery {
  min-height: 2.5em;
}

/* Community discovery: browsing first, administration in focused dialogs. */
.place-results {
  margin: 12px 0;
  font-size: 13px;
  color: var(--muted);
}
.place-results button {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  text-align: left;
  width: 100%;
  margin-bottom: 4px;
  background: none;
  border-color: var(--line);
}
.place-results button span {
  color: var(--muted);
  font-size: 12px;
}
.manual-place {
  margin: 18px 0;
}
.manual-place form {
  margin: 16px 0;
}
.request-review {
  border-top: 1px solid var(--line);
  padding: 20px 0;
}
.request-review h3 {
  margin: 0 0 8px;
}
@media (max-width: 600px) {
  .place-results button {
    grid-template-columns: 1fr auto;
  }
  .place-results button span:last-child {
    display: none;
  }
}

/* Cover corrections stay beside the photo, with a full-frame undo. */
.flow-photo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}
.crop-toggle {
  position: static !important;
  width: auto !important;
  height: auto !important;
  font-size: 0.75rem;
  line-height: 1.3;
  padding: 0.4rem 0.5rem;
  white-space: normal;
}
.photo:has(.crop-toggle) {
  height: auto;
  padding-bottom: 0.25rem;
}

.catalog-browse-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.catalog-browse-row .genre-row {
  flex: 1;
  min-width: 0;
}
.catalog-community {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.catalog-community select {
  width: auto;
  max-width: 260px;
  min-width: 165px;
  min-height: 38px;
  margin: 0;
}
.seller-link {
  color: var(--brand);
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.book-info > .reservation-reason,
.reservation-reason {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
  white-space: normal;
  overflow: visible;
  display: block;
  -webkit-line-clamp: unset;
}
.reservation-reason[hidden] {
  display: none;
}
.cover-space .cover-add:disabled span {
  white-space: normal;
}
@media (max-width: 600px) {
  .catalog-browse-row {
    gap: 0.45rem;
  }
  .catalog-browse-row .genre-row {
    flex-basis: 100%;
  }
  .catalog-community {
    width: 100%;
  }
  .catalog-community select {
    flex: 1;
    max-width: none;
    min-width: 0;
  }
}

.shelves:has(.seller-name) {
  --info-height: 125px;
}
.shelves:has(.reservation-reason:not([hidden])) {
  --info-height: 180px;
}
.cover-space .cover-add:disabled {
  width: min(124px, calc(var(--book-face-width, 100%) - 8px));
  height: auto;
  min-height: 28px;
  padding: 6px 8px;
}

.book-info > .seller-name {
  white-space: normal;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.password-offer {
  max-width: 600px;
  margin-top: 1.5rem;
}
.password-offer h2 {
  font-size: 1.15rem;
}
.password-settings {
  max-width: 480px;
}
.password-settings input {
  width: 100%;
}
/* Community administration lives in the main workspace, with a bounded directory. */
.community-management {
  max-width: 1140px;
  margin: 0 auto;
}
.management-back {
  display: inline-block;
  margin: 0 0 12px;
  color: var(--muted);
  text-decoration: none;
}
.management-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.management-heading h1 {
  margin: 0 0 6px;
  font-size: clamp(22px, 3vw, 30px);
  overflow-wrap: anywhere;
}
.management-heading p {
  color: var(--muted);
}
.management-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 12px 0;
  margin: 8px 0 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.management-summary strong {
  color: var(--brand);
  font-size: 20px;
  margin-right: 5px;
}
.community-attention {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid #e0bd72;
  border-radius: 8px;
  background: #fff5dd;
  margin-bottom: 16px;
}
.community-attention h2 {
  margin: 5px 0 8px;
}
.community-attention p {
  margin: 0;
}
.attention-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}
.attention-links a {
  display: flex;
  align-items: center;
  gap: 10px;
}
.request-pill {
  display: inline-block;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  background: #f6d98c;
  color: #573e0b;
  margin-left: 6px;
  white-space: nowrap;
}
.request-pill[hidden],
.management-request-notice[hidden] {
  display: none;
}
.management-request-notice {
  background: #fff5dd;
  border: 1px solid #e0bd72;
  border-radius: 10px;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.management-request-notice p {
  margin: 0;
}
.management-directory {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 14px;
}
.directory-heading {
  padding: 12px 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.directory-heading h2 {
  margin: 0;
  font-size: 18px;
}
.member-search {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(190px, 260px) auto;
  align-items: end;
  gap: 12px;
  padding: 12px 16px;
}
.member-search label {
  margin: 0;
}
.member-search input,
.member-search select {
  margin: 0;
  width: 100%;
}
.management-member {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px minmax(150px, auto);
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
}
.member-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.member-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
  font-size: 14px;
}
.member-identity h3 {
  font-size: 16px;
  margin: 0 0 5px;
  overflow-wrap: anywhere;
}
.member-identity h3 small {
  font-weight: 400;
  color: var(--muted);
}
.member-identity p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.member-status {
  font-size: 13px;
  color: var(--muted);
}
.member-status.pending {
  color: #765414;
  font-weight: 650;
}
.member-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.member-more {
  position: relative;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
}
.member-more > summary {
  list-style: none;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.member-more > summary::-webkit-details-marker {
  display: none;
}
.member-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 5;
  min-width: 210px;
  padding: 8px;
  display: grid;
  gap: 5px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 24px #25392f20;
}
.member-menu button {
  text-align: left;
  width: 100%;
}
.member-empty {
  text-align: center;
  padding: 42px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.member-empty h3 {
  color: var(--brand);
}
.member-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.member-pagination .button-row {
  align-items: center;
}
.management-tools {
  padding: 24px 0;
}
.management-tools h2 {
  font-size: 17px;
  margin: 0 0 14px;
}
.community-danger {
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  border-radius: 0;
  margin-top: 20px;
  padding: 20px 0;
}
.community-danger > summary {
  font-size: 14px;
  color: #77514b;
}
.member-review {
  background: var(--brand-soft);
  border: 1px solid var(--line-strong);
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 24px;
}
.member-review h2 {
  margin: 6px 0 12px;
}
.member-review.resolved {
  background: var(--surface-subtle);
  border-color: var(--line);
}
.management-signin {
  max-width: 620px;
  margin: 40px auto;
}
@media (max-width: 700px) {
  .management-heading,
  .community-attention {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
  .management-heading .button-row {
    width: 100%;
  }
  .management-summary {
    gap: 8px 16px;
    font-size: 13px;
    padding: 12px 0;
    margin: 8px 0 12px;
  }
  .management-summary strong {
    font-size: 17px;
  }
  .community-attention {
    padding: 12px 16px;
    gap: 12px;
    margin-bottom: 16px;
    border-radius: 8px;
  }
  .attention-links {
    width: 100%;
  }
  .attention-links a {
    justify-content: space-between;
    white-space: normal;
  }
  .management-request-notice {
    flex-direction: column;
    align-items: flex-start;
  }
  .directory-heading {
    padding: 12px 16px 0;
  }
  .directory-heading h2 {
    font-size: 18px;
  }
  .member-search {
    grid-template-columns: 1fr auto;
    padding: 12px 16px;
    gap: 10px;
  }
  .member-search label:first-child {
    grid-column: 1 / -1;
  }
  .management-member {
    grid-template-columns: minmax(0, 1fr) auto auto;
    padding: 10px 12px;
    gap: 6px 12px;
  }
  .member-status {
    font-size: 12px;
  }
  .member-controls {
    grid-column: auto;
    justify-content: flex-end;
  }
  .management-member:has([data-action="approve"]) .member-controls { grid-column: 1 / -1; }
  .member-controls:empty {
    display: none;
  }
  .member-pagination {
    flex-direction: column;
    gap: 6px;
    padding: 12px 16px;
  }
  .member-pagination p {
    margin: 0;
  }
}
