:root {
  --paper: #f4eee2;
  --paper-deep: #ebe2d2;
  --card: #fffdf8;
  --card-soft: #fbf7ee;
  --ink: #24332b;
  --ink-soft: #4e5e54;
  --muted: #7b857e;
  --green: #1f5a43;
  --green-deep: #173f30;
  --green-soft: #e5efe8;
  --terracotta: #c46b4e;
  --terracotta-soft: #f6e4dc;
  --gold: #b98b51;
  --line: #e2d9c8;
  --line-strong: #d2c6b1;
  --shadow-sm: 0 8px 22px rgba(43, 56, 47, 0.055);
  --shadow-md: 0 22px 55px rgba(43, 56, 47, 0.11);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --font-sans: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
  --font-serif: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  --shell: 1220px;
  --shelf-row-height: 300px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-tap-highlight-color: transparent;
}

a,
button,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

:where(a, button, input, select, textarea):focus:not(:focus-visible) {
  outline: none;
}

html {
  min-height: 100%;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 8% -4%, rgba(255, 253, 248, 0.95), transparent 32rem),
    radial-gradient(circle at 92% 8%, rgba(197, 170, 125, 0.14), transparent 28rem),
    repeating-linear-gradient(0deg, rgba(84, 68, 43, 0.022) 0 1px, transparent 1px 4px);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 50% 110%, rgba(255, 253, 248, 0.7), transparent 40rem),
    linear-gradient(115deg, transparent 0 48%, rgba(255, 255, 255, 0.18) 48% 50%, transparent 50% 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

::selection {
  color: #fff;
  background: var(--green);
}

:focus-visible {
  outline: 3px solid rgba(196, 107, 78, 0.55);
  outline-offset: 3px;
}

.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;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  color: #fff;
  background: var(--green);
  border-radius: 999px;
  transform: translateY(-180%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(var(--shell), calc(100% - 56px));
  margin: 0 auto;
  padding-bottom: 92px;
}

/* Ambient side rays ------------------------------------------------------ */
.ambient-rays {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: 84vh;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  opacity: 0.62;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.78) 48%, transparent 92%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.78) 48%, transparent 92%);
}

.ambient-rays__beam {
  position: absolute;
  top: -28%;
  right: -7%;
  width: 16vw;
  height: 132vh;
  background: linear-gradient(to bottom, var(--ray-color), transparent 78%);
  filter: blur(16px);
  mix-blend-mode: normal;
  opacity: 0.58;
  transform: rotate(var(--angle));
  transform-origin: 100% 0;
  animation: ray-sway 13s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

.beam-1 {
  --angle: 5deg;
  --ray-color: rgba(255, 196, 107, 0.38);
}

.beam-2 {
  --angle: 12deg;
  --ray-color: rgba(150, 200, 255, 0.24);
  width: 11vw;
  animation-delay: -3s;
  animation-duration: 16s;
}

.beam-3 {
  --angle: 19deg;
  --ray-color: rgba(255, 196, 107, 0.32);
  width: 14vw;
  animation-delay: -7s;
}

.beam-4 {
  --angle: 27deg;
  --ray-color: rgba(163, 198, 174, 0.34);
  width: 9vw;
  animation-delay: -1.5s;
  animation-duration: 15s;
}

.beam-5 {
  --angle: 35deg;
  --ray-color: rgba(255, 196, 107, 0.24);
  width: 18vw;
  animation-delay: -9s;
}

.beam-6 {
  --angle: 44deg;
  --ray-color: rgba(150, 200, 255, 0.2);
  width: 12vw;
  animation-delay: -5s;
  animation-duration: 17s;
}

.beam-7 {
  --angle: 52deg;
  --ray-color: rgba(255, 196, 107, 0.18);
  width: 23vw;
  animation-delay: -11s;
}

.cursor-spotlight {
  position: fixed;
  top: -280px;
  left: -280px;
  z-index: 2;
  width: 560px;
  height: 560px;
  pointer-events: none;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(247, 251, 255, 0.045) 42%,
    transparent 70%
  );
  border-radius: 50%;
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity 0.3s ease;
  will-change: transform;
}

.cursor-spotlight.is-active {
  opacity: 1;
}

@media (hover: none), (pointer: coarse), (max-width: 700px) {
  .cursor-spotlight,
  .spotlight-glow {
    display: none;
  }
}

@keyframes ray-sway {
  from {
    opacity: 0.42;
    transform: rotate(calc(var(--angle) - 1.5deg)) translateX(0);
  }
  to {
    opacity: 0.72;
    transform: rotate(calc(var(--angle) + 3deg)) translateX(-2.2vw);
  }
}

@media (max-width: 700px) {
  .ambient-rays {
    display: none;
  }
}

/* Header ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  width: 100%;
  margin-inline: auto;
  padding: 12px 0 10px;
  border-bottom: 1px solid rgba(210, 198, 177, 0.7);
  isolation: isolate;
  transition:
    top 0.26s ease,
    width 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.25s ease;
}

.brand {
  justify-self: start;
}

.rubber-tabs {
  justify-self: center;
}

.header-side {
  justify-self: end;
}

.site-header::before {
  position: absolute;
  inset: -5px -18px;
  z-index: -1;
  pointer-events: none;
  content: "";
  background: rgba(255, 253, 248, 0.62);
  border: 1px solid rgba(210, 198, 177, 0.55);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(43, 56, 47, 0.07);
  opacity: 0;
  backdrop-filter: blur(12px) saturate(1.06);
  -webkit-backdrop-filter: blur(12px) saturate(1.06);
  transition:
    opacity 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.site-header.is-floating {
  top: 18px;
  width: min(100%, 1040px);
  border-bottom-color: transparent;
}

.site-header.is-floating::before {
  opacity: 1;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  flex: 0 0 auto;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  color: #fff8ea;
  background: linear-gradient(145deg, var(--green), var(--green-deep));
  border-radius: 15px 15px 15px 5px;
  place-items: center;
  box-shadow: 0 10px 24px rgba(31, 90, 67, 0.22);
}

.brand-mark svg {
  width: 31px;
  height: 31px;
  overflow: visible;
  fill: rgba(255, 250, 238, 0.09);
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.15;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.brand-eyebrow,
.eyebrow {
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand-copy strong {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  margin-left: auto;
  background: rgba(255, 253, 248, 0.56);
  border: 1px solid rgba(210, 198, 177, 0.7);
  border-radius: 999px;
}

.main-nav a {
  position: relative;
  padding: 9px 16px;
  color: var(--ink-soft);
  font-size: 13px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover {
  color: var(--green);
  background: rgba(229, 239, 232, 0.7);
}

.main-nav a[aria-current="page"] {
  color: #fff;
  background: var(--green);
  box-shadow: 0 5px 14px rgba(31, 90, 67, 0.18);
}

/* Rubber-style page switcher -------------------------------------------- */
.rubber-tabs {
  --rt-thumb: #fff8ea;
  --rt-idle: rgba(255, 248, 234, 0.64);
  --rt-active: var(--green-deep);
  position: relative;
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 250px;
  min-height: 44px;
  padding: 4px;
  margin-left: 0;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(145deg, var(--green) 0%, var(--green-deep) 100%);
  border: 1px solid rgba(255, 248, 234, 0.12);
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 234, 0.14),
    0 8px 20px rgba(31, 90, 67, 0.14);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.rubber-tabs[data-active=""] .rubber-tabs__thumb {
  opacity: 0;
}

.rubber-tabs__thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  z-index: 0;
  width: 0;
  pointer-events: none;
  background: var(--rt-thumb);
  border-radius: 10px;
  box-shadow:
    0 4px 10px rgba(15, 40, 30, 0.18),
    inset 0 1px 0 #fff;
  will-change: left, width;
}

.rubber-tabs__item {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 36px;
  padding: 0 8px;
  color: var(--rt-idle);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 10px;
  transition: color 180ms ease;
}

.rubber-tabs__item:hover {
  color: #fff8ea;
}

.rubber-tabs__item[aria-current="page"] {
  color: var(--rt-active);
  transition-delay: 120ms;
}

.rubber-tabs__item:focus-visible {
  outline: 2px solid #fff8ea;
  outline-offset: -2px;
}

.header-side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.header-date {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  text-align: right;
  white-space: nowrap;
}

.header-date-main {
  display: inline;
}

.header-date-short {
  display: none;
}

.header-time-line {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 5px;
}

.header-time {
  display: inline;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

.header-weekday {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--ink-soft);
  background: rgba(255, 253, 248, 0.6);
  border: 1px solid var(--line);
  border-radius: 50%;
  place-items: center;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.icon-button:hover {
  color: var(--green);
  background: var(--green-soft);
  transform: rotate(18deg);
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

/* Layout ---------------------------------------------------------------- */
.main-content {
  padding-top: 38px;
}

.page-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}

.page-intro-compact {
  align-items: flex-start;
}

.intro-copy {
  max-width: 680px;
}

.intro-copy h1 {
  margin: 8px 0 8px;
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.08;
}

.page-intro-compact .intro-copy h1 {
  font-size: clamp(32px, 4vw, 46px);
}

.intro-copy p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.page-motto {
  position: relative;
  padding-left: 14px;
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 0.02em;
}

.page-motto::before {
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 5px;
  height: 5px;
  content: "";
  background: rgba(185, 139, 81, 0.72);
  border-radius: 50%;
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 4px;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  margin-bottom: 12px;
  color: var(--green);
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.2s ease;
}

.back-link:hover {
  transform: translateX(-3px);
}

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  color: #fff;
  background: var(--green);
  box-shadow: 0 8px 20px rgba(31, 90, 67, 0.18);
}

.btn-primary:hover {
  background: var(--green-deep);
  box-shadow: 0 12px 26px rgba(31, 90, 67, 0.24);
}

.btn-secondary {
  color: var(--green);
  background: var(--card);
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  background: var(--green-soft);
  border-color: rgba(31, 90, 67, 0.28);
}

.btn-ghost {
  color: var(--ink-soft);
  background: transparent;
  border-color: var(--line);
}

.btn-ghost:hover {
  color: var(--green);
  background: rgba(255, 253, 248, 0.68);
}

.btn-danger {
  color: #fff;
  background: var(--terracotta);
  box-shadow: 0 8px 20px rgba(196, 107, 78, 0.18);
}

.btn-danger:hover {
  background: #a9553b;
}

.btn-small {
  min-height: 34px;
  padding: 0 13px;
  font-size: 12px;
}

.export-all-link {
  color: var(--muted);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.export-all-link:hover {
  color: var(--green);
}

/* Stats ----------------------------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  position: relative;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 112px;
  padding: 20px 22px;
  overflow: hidden;
  background: rgba(255, 253, 248, 0.74);
  border: 1px solid rgba(210, 198, 177, 0.72);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.stat-card::after {
  position: absolute;
  right: -18px;
  bottom: -36px;
  width: 92px;
  height: 92px;
  content: "";
  background: radial-gradient(circle, rgba(185, 139, 81, 0.17), transparent 68%);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(43, 56, 47, 0.08);
}

.stat-card > :not(.spotlight-glow) {
  position: relative;
  z-index: 1;
}

.spotlight-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 260px;
  height: 260px;
  margin: -130px 0 0 -130px;
  pointer-events: none;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.4) 0%,
    rgba(255, 255, 255, 0.12) 42%,
    transparent 72%
  );
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
  will-change: transform;
}

.stat-card.is-lit {
  border-color: rgba(255, 255, 255, 0.7);
}

.stat-card.is-lit .spotlight-glow {
  opacity: 0.68;
}

@media (hover: none), (pointer: coarse) {
  .spotlight-glow {
    display: none;
  }
}

.stat-label {
  width: 100%;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.05em;
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
}

.stat-unit {
  color: var(--muted);
  font-size: 12px;
}

/* Filter ---------------------------------------------------------------- */
.filter-card {
  padding: 18px;
  background: rgba(255, 253, 248, 0.76);
  border: 1px solid rgba(210, 198, 177, 0.76);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.filter-card-slim {
  padding: 12px;
}

.filter-card-shelf {
  padding: 12px;
}

.filter-card-shelf .search-field {
  flex: 1 1 auto;
}

.filter-search {
  display: flex;
  min-width: 0;
  flex: 1 1 300px;
  flex-direction: column;
  gap: 5px;
}

.filter-search .search-field {
  width: 100%;
  flex: 1 1 auto;
}

.filter-caption {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  line-height: 1.3;
}

.filter-caption strong {
  font-family: var(--font-serif);
  font-size: 13px;
}

.filter-caption span {
  color: var(--muted);
  font-size: 11px;
}

.filter-form {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.search-field {
  display: flex;
  align-items: center;
  flex: 1 1 300px;
  gap: 10px;
  height: 48px;
  padding: 0 15px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-field:focus-within {
  border-color: rgba(31, 90, 67, 0.48);
  box-shadow: 0 0 0 4px rgba(31, 90, 67, 0.08);
}

.search-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-width: 1.7;
}

.search-field input {
  width: 100%;
  min-width: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.search-field input::placeholder {
  color: #a3aaa4;
}

.search-field input::-webkit-search-cancel-button {
  cursor: pointer;
}

.filter-selects {
  display: flex;
  flex: 2 1 420px;
  flex-wrap: wrap;
  gap: 10px;
}

.select-field {
  display: flex;
  flex: 1 1 120px;
  flex-direction: column;
  gap: 5px;
  min-width: 118px;
}

.select-field > span {
  padding-left: 3px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.05em;
}

.select-field select {
  height: 48px;
  padding: 0 34px 0 12px;
  color: var(--ink-soft);
  background-color: var(--card);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 21px,
    calc(100% - 11px) 21px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  appearance: none;
  transition: border-color 0.2s ease;
}

.select-field select:focus {
  border-color: rgba(31, 90, 67, 0.48);
}

/* Custom glide select ---------------------------------------------------- */
.glide-field {
  display: flex;
  flex: 1 1 120px;
  flex-direction: column;
  gap: 5px;
  min-width: 118px;
}

.glide-field__label {
  padding-left: 3px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.05em;
}

.glide-select {
  position: relative;
  width: 100%;
}

.glide-select__native {
  width: 100%;
  height: 48px;
  padding: 0 12px;
  color: var(--ink-soft);
  font-size: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
}

.glide-select__trigger {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  height: 48px;
  padding: 0 13px;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.glide-select__trigger:hover {
  border-color: var(--line-strong);
  background: #fffefb;
}

.glide-select__trigger[aria-expanded="true"] {
  border-color: rgba(31, 90, 67, 0.46);
  box-shadow: 0 0 0 4px rgba(31, 90, 67, 0.08);
}

.glide-select__trigger:focus-visible {
  outline: 3px solid rgba(196, 107, 78, 0.46);
  outline-offset: 2px;
}

.glide-select__value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.glide-select__chevron {
  display: grid;
  flex: 0 0 auto;
  color: var(--muted);
  place-items: center;
  transition: transform 200ms ease;
}

.glide-select__chevron svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.glide-select__trigger[aria-expanded="true"] .glide-select__chevron {
  transform: rotate(180deg);
}

.glide-select[data-enhanced] .glide-select__native {
  display: none;
}

.glide-select[data-enhanced] .glide-select__trigger {
  display: inline-flex;
}

.js .glide-select__native {
  display: none;
}

.js .glide-select__trigger {
  display: inline-flex;
}

.glide-select__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 80;
  width: max-content;
  min-width: 100%;
  max-width: min(280px, calc(100vw - 32px));
  padding: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(40, 51, 43, 0.18);
  visibility: hidden;
  opacity: 0;
  transform: scale(0.96) translateY(-4px);
  transform-origin: top left;
  transition:
    opacity 160ms ease,
    transform 160ms cubic-bezier(0.23, 1, 0.32, 1),
    visibility 0s linear 160ms;
}

.glide-select__menu[data-state="open"] {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition:
    opacity 160ms ease,
    transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.glide-select__menu[data-side="top"] {
  top: auto;
  bottom: calc(100% + 6px);
  transform-origin: bottom left;
}

.glide-select__menu[data-align="right"] {
  right: 0;
  left: auto;
  transform-origin: top right;
}

.glide-select__menu[data-side="top"][data-align="right"] {
  transform-origin: bottom right;
}

.glide-select__list {
  position: relative;
  display: grid;
  gap: 1px;
  max-height: 286px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.glide-select__pill {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 38px;
  pointer-events: none;
  background: var(--green-soft);
  border-radius: 9px;
  opacity: 0;
  transition: opacity 150ms ease;
}

.glide-select__pill.is-visible {
  opacity: 1;
}

.glide-select__option {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 9px 0 10px;
  color: var(--ink-soft);
  font-size: 14px;
  border-radius: 9px;
  cursor: pointer;
  user-select: none;
}

.glide-select__option.is-active {
  color: var(--green-deep);
}

.glide-select__name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.glide-select__tag {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
}

.glide-select__check {
  flex: 0 0 auto;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  visibility: hidden;
}

.glide-select__option[aria-selected="true"] .glide-select__check {
  visibility: visible;
}

.glide-select__option[aria-selected="true"] .glide-select__name {
  font-weight: 700;
}

.glide-select.is-swapping .glide-select__value {
  animation: glide-value-swap 160ms ease;
}

@keyframes glide-value-swap {
  from {
    opacity: 0.55;
    filter: blur(2px);
  }
}

.filter-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 10px;
  padding-bottom: 1px;
}

.filter-submit {
  min-width: 74px;
}

/* Results --------------------------------------------------------------- */
.results-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin: 32px 0 14px;
}

.results-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 700;
}

.results-title {
  position: relative;
  padding-bottom: 6px;
}

.results-title::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 42px;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, rgba(185, 139, 81, 0.8), transparent);
  border-radius: 999px;
}

.results-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: rgba(185, 139, 81, 0.8);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.results-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

/* Shelf ----------------------------------------------------------------- */
.shelf-view {
  min-height: 200px;
}

.shelf {
  --shelf-row-height: 300px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(146px, 1fr));
  gap: 0 18px;
  align-items: end;
  padding: 0 20px;
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--shelf-row-height) - 20px),
      rgba(120, 83, 47, 0.10) calc(var(--shelf-row-height) - 20px),
      #b8875a calc(var(--shelf-row-height) - 20px),
      #b8875a calc(var(--shelf-row-height) - 14px),
      #8e603c calc(var(--shelf-row-height) - 14px),
      #8e603c calc(var(--shelf-row-height) - 8px),
      rgba(75, 46, 25, 0.09) calc(var(--shelf-row-height) - 8px),
      transparent var(--shelf-row-height)
    );
  background-size: 100% var(--shelf-row-height);
}

.book-card {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: var(--shelf-row-height);
  padding: 0 4px 18px;
  border-radius: 4px 8px 3px 3px;
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
  animation: card-in 0.78s cubic-bezier(0.22, 0.8, 0.3, 1) backwards;
}

.book-card:nth-child(2) { animation-delay: 0.05s; }
.book-card:nth-child(3) { animation-delay: 0.1s; }
.book-card:nth-child(4) { animation-delay: 0.15s; }
.book-card:nth-child(5) { animation-delay: 0.2s; }
.book-card:nth-child(6) { animation-delay: 0.25s; }
.book-card:nth-child(7) { animation-delay: 0.3s; }
.book-card:nth-child(8) { animation-delay: 0.35s; }
.book-card:nth-child(9) { animation-delay: 0.4s; }
.book-card:nth-child(10) { animation-delay: 0.45s; }
.book-card:nth-child(11) { animation-delay: 0.5s; }
.book-card:nth-child(12) { animation-delay: 0.55s; }

.book-card:hover {
  transform: translateY(-9px) rotate(-0.35deg);
}

.book-card:focus-visible {
  outline: none;
}

.book-card:focus-visible .book-cover {
  outline: 3px solid rgba(196, 107, 78, 0.78);
  outline-offset: 4px;
}

.book-cover {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 226px;
  padding: 18px 14px 14px 20px;
  overflow: hidden;
  color: #fff8eb;
  border-radius: 3px 7px 7px 3px;
  box-shadow:
    -3px 4px 0 rgba(255, 253, 248, 0.66),
    -6px 8px 0 rgba(91, 69, 43, 0.14),
    0 14px 22px rgba(51, 41, 27, 0.2);
  transform-origin: bottom center;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.book-cover::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 9px;
  content: "";
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.28), rgba(255, 255, 255, 0.08));
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.book-cover::after {
  position: absolute;
  top: -72px;
  right: -72px;
  width: 168px;
  height: 168px;
  content: "";
  background: radial-gradient(circle, rgba(255, 248, 232, 0.17), transparent 65%);
  pointer-events: none;
}

.book-card:hover .book-cover {
  box-shadow:
    -3px 4px 0 rgba(255, 253, 248, 0.75),
    -8px 10px 0 rgba(91, 69, 43, 0.16),
    0 22px 32px rgba(51, 41, 27, 0.26);
}

.cover-size-1 { height: 196px; }
.cover-size-2 { height: 210px; }
.cover-size-3 { height: 226px; }
.cover-size-4 { height: 242px; }

.cover-0 { background: linear-gradient(145deg, #325f4b 0%, #1b3c30 100%); }
.cover-1 { background: linear-gradient(145deg, #b7694e 0%, #7d3d2b 100%); }
.cover-2 { background: linear-gradient(145deg, #bd9556 0%, #8a6530 100%); }
.cover-3 { background: linear-gradient(145deg, #52657a 0%, #2f3e4f 100%); }
.cover-4 { background: linear-gradient(145deg, #806d90 0%, #4d405e 100%); }
.cover-5 { background: linear-gradient(145deg, #547f86 0%, #2e5359 100%); }
.cover-6 { background: linear-gradient(145deg, #9c5d64 0%, #6a343b 100%); }
.cover-7 { background: linear-gradient(145deg, #70784d 0%, #44492b 100%); }

.cover-category {
  position: relative;
  z-index: 1;
  max-width: 100%;
  overflow: hidden;
  color: rgba(255, 248, 235, 0.72);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.cover-title {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  margin: auto 0 7px;
  overflow: hidden;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.42;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.cover-author {
  position: relative;
  z-index: 1;
  overflow: hidden;
  color: rgba(255, 248, 235, 0.76);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cover-contributor {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  max-width: 100%;
  padding: 3px 8px;
  margin-top: 10px;
  overflow: hidden;
  color: rgba(255, 248, 235, 0.94);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(255, 248, 235, 0.14);
  border: 1px solid rgba(255, 248, 235, 0.2);
  border-radius: 999px;
}

.mini-book {
  background: var(--green);
}

.mini-book.cover-1 { background: #7d3d2b; }
.mini-book.cover-2 { background: #8a6530; }
.mini-book.cover-3 { background: #2f3e4f; }
.mini-book.cover-4 { background: #4d405e; }
.mini-book.cover-5 { background: #2e5359; }
.mini-book.cover-6 { background: #6a343b; }
.mini-book.cover-7 { background: #44492b; }

/* Empty states ----------------------------------------------------------- */
.empty-state {
  padding: 58px 24px 46px;
  text-align: center;
  background: rgba(255, 253, 248, 0.56);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
}

.empty-state-table {
  margin: 12px;
}

.empty-books {
  position: relative;
  width: 132px;
  height: 78px;
  margin: 0 auto 22px;
}

.empty-books span {
  position: absolute;
  bottom: 0;
  display: block;
  width: 22px;
  border-radius: 2px 5px 5px 2px;
  box-shadow: 0 6px 12px rgba(52, 42, 28, 0.14);
}

.empty-books span:nth-child(1) {
  left: 22px;
  height: 62px;
  background: var(--green);
  transform: rotate(-4deg);
}

.empty-books span:nth-child(2) {
  left: 46px;
  height: 74px;
  background: var(--terracotta);
  transform: rotate(2deg);
}

.empty-books span:nth-child(3) {
  left: 72px;
  height: 54px;
  background: var(--gold);
  transform: rotate(-2deg);
}

.empty-books span:nth-child(4) {
  left: 94px;
  height: 68px;
  background: #52657a;
  transform: rotate(5deg);
}

.empty-books::after {
  position: absolute;
  right: 8px;
  bottom: -8px;
  left: 8px;
  height: 8px;
  content: "";
  background: linear-gradient(180deg, #b8875a, #8e603c);
  border-radius: 2px;
  box-shadow: 0 5px 10px rgba(75, 46, 25, 0.12);
}

.empty-state h2 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 24px;
}

.empty-state p {
  margin: 0 auto 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

/* Table ----------------------------------------------------------------- */
.table-card {
  overflow: hidden;
  background: rgba(255, 253, 248, 0.8);
  border: 1px solid rgba(210, 198, 177, 0.8);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.table-scroll {
  overflow-x: auto;
  overflow-y: hidden;
}

.book-table {
  width: 100%;
  min-width: 1000px;
  border-collapse: collapse;
  table-layout: fixed;
}

.book-table th {
  padding: 14px 16px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  background: rgba(246, 241, 231, 0.85);
  border-bottom: 1px solid var(--line);
}

.book-table th:nth-child(1) { width: 46px; padding-right: 0; }
.book-table th:nth-child(2) { width: 24%; }
.book-table th:nth-child(3) { width: 11%; }
.book-table th:nth-child(4) { width: 9%; }
.book-table th:nth-child(5) { width: 10%; }
.book-table th:nth-child(6) { width: 12%; }
.book-table th:nth-child(7) { width: 23%; }
.book-table th:nth-child(8) { width: 11%; }

.book-table td {
  padding: 13px 16px;
  color: var(--ink-soft);
  font-size: 12px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(226, 217, 200, 0.72);
}

.book-table tbody tr {
  animation: row-in 0.55s ease backwards;
  transition: background 0.18s ease;
}

.book-table tbody tr:nth-child(2) { animation-delay: 0.05s; }
.book-table tbody tr:nth-child(3) { animation-delay: 0.1s; }
.book-table tbody tr:nth-child(4) { animation-delay: 0.15s; }
.book-table tbody tr:nth-child(5) { animation-delay: 0.2s; }
.book-table tbody tr:nth-child(6) { animation-delay: 0.25s; }
.book-table tbody tr:nth-child(7) { animation-delay: 0.3s; }
.book-table tbody tr:nth-child(8) { animation-delay: 0.35s; }
.book-table tbody tr:nth-child(9) { animation-delay: 0.4s; }
.book-table tbody tr:nth-child(10) { animation-delay: 0.45s; }
.book-table tbody tr:nth-child(11) { animation-delay: 0.5s; }
.book-table tbody tr:nth-child(12) { animation-delay: 0.55s; }

.book-table tbody tr:hover {
  background: rgba(229, 239, 232, 0.4);
}

.book-table tbody tr:last-child td {
  border-bottom: 0;
}

.select-cell {
  width: 46px;
  padding-right: 0 !important;
  text-align: left;
}

.select-cell input {
  width: 17px;
  height: 17px;
  accent-color: var(--green);
  cursor: pointer;
}

.book-table tbody tr.is-selected {
  background: rgba(229, 239, 232, 0.66);
}

.bulk-bar {
  position: fixed;
  bottom: 28px;
  left: 50%;
  z-index: 46;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 16px;
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  transform: translateX(-50%);
  animation: bulk-in 0.24s ease both;
}

.bulk-bar__count {
  color: var(--ink-soft);
  font-size: 13px;
  white-space: nowrap;
}

.bulk-bar__count strong {
  color: var(--green);
  font-size: 17px;
}

body.has-bulk-selection .fab {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

.bulk-dialog {
  width: min(560px, calc(100% - 32px));
}

.bulk-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.bulk-fields {
  display: grid;
  gap: 14px;
  padding: 18px 26px 0;
}

.bulk-fields .field input {
  height: 44px;
}

@keyframes bulk-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.cell-book {
  min-width: 0;
}

.table-book {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mini-book {
  display: grid;
  flex: 0 0 auto;
  width: 30px;
  height: 42px;
  color: rgba(255, 248, 235, 0.9);
  font-family: var(--font-serif);
  font-size: 14px;
  border-radius: 2px 5px 5px 2px;
  box-shadow: -2px 2px 0 rgba(255, 253, 248, 0.7), 0 5px 10px rgba(50, 40, 27, 0.12);
  place-items: center;
}

.table-book-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.table-book-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-book-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-chip {
  display: inline-block;
  max-width: 100%;
  padding: 4px 9px;
  overflow: hidden;
  color: var(--green);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--green-soft);
  border-radius: 999px;
}

.tag {
  display: inline-block;
  max-width: 100%;
  padding: 4px 9px;
  overflow: hidden;
  color: #8a5e2e;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #f5ead9;
  border-radius: 999px;
}

.tag-link:hover {
  background: #eedcc2;
}

.nowrap {
  white-space: nowrap;
}

.price-cell {
  color: var(--green-deep);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}

.note-cell {
  min-width: 0;
}

.note-clamp {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.cell-actions {
  white-space: nowrap;
}

.cell-actions .text-action + .text-action {
  margin-left: 12px;
}

.text-action {
  padding: 0;
  color: var(--green);
  font-size: 11px;
  background: none;
  border: 0;
}

.text-action:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-action.danger {
  color: var(--terracotta);
}

.ui-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.icon-action {
  display: inline-grid;
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--green);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  place-items: center;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease;
}

.icon-action:hover {
  color: var(--green-deep);
  background: var(--green-soft);
  border-color: rgba(31, 90, 67, 0.24);
}

.icon-action.danger {
  color: var(--terracotta);
}

.icon-action.danger:hover {
  color: #8f3f2a;
  background: var(--terracotta-soft);
  border-color: rgba(196, 107, 78, 0.28);
}

.icon-action + .icon-action {
  margin-left: 6px;
}

.icon-action .ui-icon {
  width: 15px;
  height: 15px;
}

.btn-icon {
  width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  border-radius: 50%;
}

.btn-icon .ui-icon {
  width: 18px;
  height: 18px;
}

.muted {
  color: var(--muted);
}

/* Pagination ------------------------------------------------------------ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 28px;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  color: var(--ink-soft);
  font-size: 12px;
  background: rgba(255, 253, 248, 0.68);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.page-link:hover {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(31, 90, 67, 0.28);
}

.page-link.is-current {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.page-link.is-disabled {
  color: #b8b5ac;
  cursor: default;
  opacity: 0.6;
}

.page-arrow {
  padding: 0 14px;
}

.page-gap {
  padding: 0 2px;
  color: var(--muted);
}

/* Contributors ---------------------------------------------------------- */
.contributor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(278px, 1fr));
  gap: 13px;
}

.contributor-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  overflow: hidden;
  background: rgba(255, 253, 248, 0.76);
  border: 1px solid rgba(210, 198, 177, 0.76);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  animation: card-in 0.58s ease backwards;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.contributor-rank {
  position: absolute;
  top: 12px;
  right: 14px;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.contributor-rank.rank-1 {
  color: #9a6929;
}

.contributor-rank.rank-2 {
  color: #727a80;
}

.contributor-rank.rank-3 {
  color: #9b6148;
}

.contributor-card[data-rank="1"] {
  border-color: rgba(185, 139, 81, 0.42);
}

.contributor-card[data-rank="2"] {
  border-color: rgba(114, 122, 128, 0.3);
}

.contributor-card[data-rank="3"] {
  border-color: rgba(155, 97, 72, 0.28);
}

.contributor-card:nth-child(2) { animation-delay: 0.05s; }
.contributor-card:nth-child(3) { animation-delay: 0.1s; }
.contributor-card:nth-child(4) { animation-delay: 0.15s; }
.contributor-card:nth-child(5) { animation-delay: 0.2s; }
.contributor-card:nth-child(6) { animation-delay: 0.25s; }
.contributor-card:nth-child(7) { animation-delay: 0.3s; }
.contributor-card:nth-child(8) { animation-delay: 0.35s; }

.contributor-card:hover {
  border-color: rgba(31, 90, 67, 0.26);
  box-shadow: 0 15px 32px rgba(43, 56, 47, 0.09);
  transform: translateY(-2px);
}

.avatar {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  color: #fff8eb;
  font-family: var(--font-serif);
  font-size: 22px;
  border-radius: 50% 50% 50% 12px;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.avatar-0 { background: #315c4a; }
.avatar-1 { background: #9d5a43; }
.avatar-2 { background: #9b793e; }
.avatar-3 { background: #52657a; }
.avatar-4 { background: #77658a; }
.avatar-5 { background: #4d747b; }
.avatar-6 { background: #8d545b; }
.avatar-7 { background: #656c42; }

.contributor-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

.contributor-copy strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contributor-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contributor-arrow {
  color: var(--line-strong);
  font-size: 20px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.contributor-card:hover .contributor-arrow {
  color: var(--green);
  transform: translateX(3px);
}

.contributor-summary-line {
  display: flex;
  align-items: center;
  gap: 7px;
}

.meta-sep {
  color: var(--line-strong);
}

/* Detail ---------------------------------------------------------------- */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 12px;
}

.breadcrumb a {
  color: var(--green);
}

.detail-grid {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

.detail-cover-panel {
  position: sticky;
  top: 28px;
}

.detail-cover-stage {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 420px;
  padding: 50px 40px 30px;
  perspective: 900px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.5), rgba(239, 229, 212, 0.8)),
    repeating-linear-gradient(0deg, transparent 0 10px, rgba(90, 68, 42, 0.035) 10px 11px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.detail-reflective {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  overflow: hidden;
  background: linear-gradient(145deg, #405463 0%, #15232b 58%, #0b1419 100%);
  border-radius: 24px;
  box-shadow:
    -6px 7px 0 rgba(255, 253, 248, 0.42),
    -12px 15px 0 rgba(91, 69, 43, 0.1),
    0 28px 44px rgba(51, 41, 27, 0.24);
  transform-style: preserve-3d;
  will-change: transform;
}

.detail-reflective__canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  pointer-events: none;
}

.detail-reflective .book-cover {
  z-index: 1;
  width: 230px;
  height: 334px;
  overflow: hidden;
  background: transparent;
  border-radius: 12px;
}

.detail-reflective .book-cover::before,
.detail-reflective .book-cover::after {
  display: none;
}

.detail-reflective .book-cover > * {
  position: relative;
  z-index: 2;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.detail-reflective__rim {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border-radius: 24px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4);
}

@media (hover: none), (pointer: coarse) {
  .detail-reflective {
    background:
      linear-gradient(115deg, transparent 28%, rgba(255, 255, 255, 0.12) 45%, transparent 62%),
      linear-gradient(145deg, #405463 0%, #15232b 58%, #0b1419 100%);
  }
}

.detail-cover-stage .book-cover {
  width: 230px;
  height: 334px;
  padding: 26px 20px 20px 27px;
  box-shadow:
    -6px 7px 0 rgba(255, 253, 248, 0.76),
    -12px 15px 0 rgba(91, 69, 43, 0.10),
    0 28px 44px rgba(51, 41, 27, 0.22);
}

.detail-cover-stage .cover-title {
  font-size: 28px;
  -webkit-line-clamp: 5;
}

.detail-cover-stage .cover-author {
  font-size: 12px;
}

.detail-cover-stage .cover-category {
  font-size: 10px;
}

.detail-cover-stage .cover-contributor {
  padding: 4px 10px;
  font-size: 11px;
}

.cover-caption {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.detail-copy h1 {
  margin: 10px 0 8px;
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.detail-author {
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 15px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 30px;
  padding: 22px 0;
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.detail-meta div {
  min-width: 0;
}

.detail-meta dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.detail-meta dd {
  margin: 0;
  font-size: 14px;
}

.price-value {
  color: var(--green-deep);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.person-link {
  color: var(--green);
  font-weight: 700;
}

.person-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.detail-note {
  padding-top: 26px;
}

.detail-note h2 {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: 22px;
}

.note-body {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.detail-bottom-space {
  height: 90px;
}

.related-section {
  padding-top: 30px;
  margin-top: 52px;
  border-top: 1px solid var(--line);
}

.related-section .results-head {
  margin-top: 0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.related-card {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
  padding: 14px;
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid rgba(210, 198, 177, 0.72);
  border-radius: 14px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.related-card:hover {
  border-color: rgba(31, 90, 67, 0.26);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.related-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.related-copy strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Form ------------------------------------------------------------------ */
.form-card {
  max-width: 920px;
  padding: 30px;
  margin: 0 auto;
  background: rgba(255, 253, 248, 0.8);
  border: 1px solid rgba(210, 198, 177, 0.8);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 24px;
}

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.field-full {
  grid-column: 1 / -1;
}

.field-label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.field-label em {
  margin-left: 5px;
  color: var(--terracotta);
  font-size: 9px;
  font-style: normal;
  font-weight: 400;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0 14px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input {
  height: 48px;
}

.field textarea {
  min-height: 136px;
  padding-top: 13px;
  padding-bottom: 13px;
  line-height: 1.7;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(31, 90, 67, 0.5);
  box-shadow: 0 0 0 4px rgba(31, 90, 67, 0.08);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: rgba(196, 107, 78, 0.72);
  box-shadow: 0 0 0 4px rgba(196, 107, 78, 0.09);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #a3aaa4;
}

.field input[type="date"] {
  padding-right: 10px;
}

.field-hint {
  color: var(--muted);
  font-size: 10px;
}

.field-error {
  color: var(--terracotta);
  font-size: 11px;
}

.price-note-field {
  justify-content: center;
  padding: 12px 14px;
  background: var(--green-soft);
  border: 1px solid rgba(31, 90, 67, 0.12);
  border-radius: 12px;
}

.price-note-field p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

.form-error {
  padding: 12px 15px;
  margin: 20px 0 0;
  color: #8a3e2a;
  font-size: 12px;
  background: var(--terracotta-soft);
  border: 1px solid rgba(196, 107, 78, 0.24);
  border-radius: 10px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 24px;
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

.form-actions .btn-ghost {
  margin-right: auto;
}

/* Modal ----------------------------------------------------------------- */
.modal {
  width: min(520px, calc(100% - 32px));
  padding: 0;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow:var(--shadow-md);
}

.modal-small {
  width: min(420px, calc(100% - 32px));
}

.modal[open] {
  animation: modal-in 0.22s ease both;
}

.modal::backdrop {
  background: rgba(28, 39, 33, 0.38);
  backdrop-filter: blur(4px);
}

.modal-head {
  padding: 24px 26px 0;
}

.modal-head h2 {
  margin: 7px 0 0;
  font-family: var(--font-serif);
  font-size: 25px;
}

.confirm-message {
  padding: 14px 26px 8px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.8;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 26px 24px;
}

/* Notices, toasts, banners, errors -------------------------------------- */
.notice {
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.notice-warning {
  color: #8a4b26;
  background: #f8ead9;
  border: 1px solid #ead2b2;
}

.toast-region {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 80;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 9px;
  pointer-events: none;
}

.toast {
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 16px;
  color: #fffdf8;
  font-size: 12px;
  line-height: 1.5;
  background: var(--ink);
  border-left: 3px solid var(--green-2);
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(30, 42, 35, 0.24);
  animation: toast-in 0.24s ease both;
}

.toast.is-error {
  border-left-color: var(--terracotta);
}

.toast.is-warning {
  border-left-color: var(--gold);
}

.toast.is-leaving {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.is-loading {
  opacity: 0.52;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.update-banner {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 10px 9px 16px;
  color: #fffdf8;
  font-size: 12px;
  background: var(--green);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(31, 90, 67, 0.26);
  transform: translateX(-50%);
  animation: banner-in 0.24s ease both;
}

.error-state {
  max-width: 620px;
  padding: 70px 0 90px;
  margin: 0 auto;
  text-align: center;
}

.error-code {
  margin: 12px 0 0;
  color: var(--green);
  font-family: var(--font-serif);
  font-size: clamp(84px, 18vw, 150px);
  font-weight: 700;
  line-height: 0.9;
  opacity: 0.18;
}

.error-state h1 {
  margin: -14px 0 10px;
  font-family: var(--font-serif);
  font-size: 32px;
}

.error-copy {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 13px;
}

.error-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* FAB and action dock --------------------------------------------------- */
.fab {
  position: fixed;
  right: 28px;
  bottom: 40px;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 0 20px 0 15px;
  color: #fffdf8;
  font-size: 13px;
  font-weight: 700;
  background: var(--green);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  box-shadow: 0 16px 34px rgba(31, 90, 67, 0.26);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.fab:hover {
  background: var(--green-deep);
  box-shadow: 0 20px 42px rgba(31, 90, 67, 0.31);
  transform: translateY(-3px);
}

.fab-icon {
  display: grid;
  width: 26px;
  height: 26px;
  color: var(--green);
  font-size: 21px;
  font-weight: 400;
  line-height: 1;
  background: #fff8eb;
  border-radius: 50%;
  place-items: center;
}

body[data-page="books"] .fab {
  width: 56px;
  min-height: 56px;
  padding: 0;
  border-radius: 50%;
  justify-content: center;
}

body[data-page="books"] .fab-label {
  display: none;
}

.action-dock {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px;
  background: rgba(255, 253, 248, 0.84);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}

#main-tabs[data-active=""] .rubber-tabs__thumb {
  opacity: 0;
}

/* Footer ---------------------------------------------------------------- */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  flex-direction: column;
  gap: 6px;
  padding: 46px 0 20px;
  color: var(--muted);
  font-size: 10px;
}

.footer-shelf-line {
  font-size: 11px;
}

.footer-copy {
  color: rgba(112, 122, 113, 0.72);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.shelf-invite {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 26px 0 16px;
  padding: 24px 28px;
  background:
    radial-gradient(circle at 100% 0, rgba(185, 139, 81, 0.12), transparent 18rem),
    linear-gradient(135deg, rgba(255, 253, 248, 0.92), rgba(229, 239, 232, 0.58));
  border: 1px solid rgba(210, 198, 177, 0.78);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.shelf-invite__copy {
  max-width: 650px;
}

.shelf-invite .eyebrow {
  display: block;
  margin-bottom: 8px;
}

.shelf-invite h2 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.3;
}

.shelf-invite p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.shelf-invite .btn {
  flex: 0 0 auto;
}

.site-footer code {
  padding: 2px 5px;
  color: var(--ink-soft);
  background: rgba(255, 253, 248, 0.6);
  border-radius: 4px;
}

.footer-dot {
  color: var(--line-strong);
}

/* Motion ---------------------------------------------------------------- */
@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes row-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes banner-in {
  from {
    opacity: 0;
    transform: translate(-50%, -8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes content-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.main-content {
  animation: content-in 0.35s ease backwards;
}

body.is-navigating {
  cursor: progress;
}

body.is-navigating .main-content {
  view-transition-name: page-content;
}

::view-transition-old(page-content) {
  animation: 0.16s ease both fade-out;
}

::view-transition-new(page-content) {
  animation: 0.26s ease both fade-in;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
}

body.is-navigating .site-header,
body.is-navigating .site-header::before {
  transition: none;
}

@keyframes fade-out {
  to { opacity: 0; }
}

@keyframes fade-in {
  from { opacity: 0; }
}

/* Responsive ------------------------------------------------------------ */
@media (max-width: 1080px) {
  .site-header {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
  }

  .main-nav {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-left: 0;
    background: transparent;
    border: 0;
  }

  .rubber-tabs {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .rubber-tabs__item {
    height: 38px;
  }

  .main-nav a {
    flex: 1;
    text-align: center;
  }

  .header-side {
    margin-left: auto;
  }

  .detail-grid {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 40px;
  }

  .detail-cover-stage .book-cover {
    width: 200px;
    height: 292px;
  }
}

@media (max-width: 820px) {
  .page-shell {
    width: min(var(--shell), calc(100% - 32px));
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-card {
    min-height: 96px;
    padding: 16px 18px;
  }

  .stat-number {
    font-size: 32px;
  }

  .page-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .intro-actions {
    padding-bottom: 0;
  }

  .filter-form {
    align-items: stretch;
  }

  .search-field,
  .filter-selects,
  .filter-actions {
    flex-basis: 100%;
  }

  .filter-actions {
    justify-content: flex-start;
  }

  .filter-selects .select-field {
    flex-basis: calc(33.333% - 7px);
  }

  .filter-selects .glide-field {
    flex-basis: calc(33.333% - 7px);
  }

  .shelf {
    grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
    gap: 0 14px;
    padding: 0 14px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .detail-cover-panel {
    position: static;
    max-width: 340px;
    margin: 0 auto;
  }

  .detail-cover-stage {
    min-height: 370px;
    padding: 36px 30px 24px;
  }

  .detail-copy h1 {
    font-size: 38px;
  }

  .form-card {
    padding: 24px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field-full {
    grid-column: auto;
  }

  .form-actions .btn-ghost {
    margin-right: 0;
  }

  .action-dock {
    right: 16px;
    bottom: 16px;
    left: 16px;
    justify-content: flex-end;
    border-radius: 18px;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: calc(100% - 28px);
    padding-bottom: 96px;
  }

  .site-header {
    padding-top: 18px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .brand-copy strong {
    font-size: 21px;
  }

  .header-date {
    display: flex;
    font-size: 12px;
  }

  .header-date-main {
    display: none;
  }

  .header-date-short {
    display: inline;
  }

  .header-time {
    display: inline;
    font-size: 14px;
  }

  .header-weekday {
    font-size: 10px;
  }

  .header-side {
    gap: 8px;
  }

  .rubber-tabs {
    width: 100%;
    margin-top: 2px;
  }

  .rubber-tabs__item {
    height: 38px;
    padding: 0 4px;
    font-size: 13px;
  }

  .main-content {
    padding-top: 26px;
  }

  .intro-copy h1 {
    font-size: 38px;
  }

  .page-intro-compact .intro-copy h1 {
    font-size: 34px;
  }

  .stats-grid {
    gap: 10px;
  }

  .stat-card {
    min-height: 88px;
    padding: 14px 15px;
  }

  .stat-number {
    font-size: 28px;
  }

  .filter-card {
    padding: 12px;
  }

  .filter-selects {
    gap: 8px;
  }

  .filter-selects .select-field {
    flex-basis: calc(50% - 4px);
  }

  .filter-selects .glide-field {
    flex-basis: calc(50% - 4px);
  }

  .filter-selects .select-field:last-child {
    flex-basis: 100%;
  }

  .filter-selects .glide-field:last-child {
    flex-basis: 100%;
  }

  .bulk-bar {
    right: 12px;
    bottom: 12px;
    left: 12px;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    border-radius: 18px;
    transform: none;
    animation: none;
  }

  .bulk-bar__count {
    flex: 1 1 100%;
    font-size: 12px;
  }

  .bulk-bar .btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 8px;
  }

  .bulk-dialog {
    width: calc(100% - 24px);
  }

  .bulk-fields {
    padding: 16px 20px 0;
  }

  .filter-actions {
    flex-wrap: wrap;
  }

  .filter-actions .btn {
    flex: 1;
  }

  .export-all-link {
    width: 100%;
    padding: 3px 4px;
    text-align: center;
  }

  .results-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    margin-top: 26px;
  }

  .results-head h2 {
    font-size: 22px;
  }

  .shelf {
    --shelf-row-height: 246px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
    padding: 0 6px;
  }

  .book-card {
    padding-bottom: 14px;
  }

  .book-cover {
    height: 186px;
    padding: 14px 11px 11px 17px;
  }

  .cover-size-1 { height: 162px; }
  .cover-size-2 { height: 172px; }
  .cover-size-3 { height: 184px; }
  .cover-size-4 { height: 198px; }

  .cover-title {
    font-size: 16px;
    -webkit-line-clamp: 4;
  }

  .cover-author {
    font-size: 9px;
  }

  .cover-contributor {
    padding: 2px 7px;
    font-size: 8px;
  }

  .empty-state {
    padding: 44px 18px 36px;
  }

  .book-table {
    min-width: 760px;
  }

  .contributor-grid {
    grid-template-columns: 1fr;
  }

  .detail-cover-stage {
    min-height: 330px;
    padding: 28px 24px 20px;
  }

  .detail-cover-stage .book-cover {
    width: 168px;
    height: 248px;
    padding: 20px 15px 16px 21px;
  }

  .detail-cover-stage .cover-title {
    font-size: 21px;
  }

  .detail-copy h1 {
    font-size: 33px;
  }

  .detail-meta {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .form-card {
    padding: 18px;
    border-radius: var(--radius);
  }

  .form-actions {
    position: static;
    z-index: auto;
    flex-direction: column;
    padding: 14px 0 0;
    margin-top: 24px;
    background: none;
  }

  .form-actions .btn {
    width: 100%;
  }

  .fab {
    right: 16px;
    bottom: 20px;
    width: 56px;
    height: 56px;
    min-height: 56px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
  }

  .fab-label {
    display: none;
  }

  .fab-icon {
    width: 30px;
    height: 30px;
    font-size: 24px;
  }

  .action-dock {
    right: 12px;
    bottom: 12px;
    left: 12px;
    flex-wrap: wrap;
    padding: 8px;
    border-radius: 16px;
  }

  .action-dock .btn {
    flex: 1 1 auto;
    min-height: 40px;
    padding: 0 12px;
    font-size: 12px;
  }

  .toast-region {
    right: 14px;
    bottom: 82px;
    left: 14px;
    align-items: stretch;
  }

  .toast {
    max-width: none;
  }

  .modal {
    width: calc(100% - 24px);
  }

  .modal-head {
    padding: 20px 20px 0;
  }

  .confirm-message {
    padding: 12px 20px 6px;
  }

  .modal-actions {
    padding: 16px 20px 20px;
  }

  .modal-actions .btn {
    flex: 1;
  }

  .site-footer {
    padding-top: 34px;
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .ambient-rays,
  .cursor-spotlight,
  .fab,
  .action-dock,
  .pagination,
  .filter-card,
  .toast-region,
  .update-banner {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .page-shell {
    width: 100%;
  }
}

/* Readability pass ------------------------------------------------------- */
:root {
  --shell: 1280px;
}

.main-nav a {
  font-size: 14px;
}

.header-date {
  font-size: 13px;
}

.intro-copy p {
  font-size: 15px;
}

.btn {
  font-size: 14px;
}

.btn-small {
  font-size: 13px;
}

.stat-label {
  font-size: 14px;
}

.stat-unit {
  font-size: 15px;
}

.stat-number {
  font-size: 42px;
}

.search-field input {
  font-size: 15px;
}

.select-field > span {
  font-size: 11px;
}

.select-field select {
  font-size: 14px;
}

.results-head p {
  font-size: 13px;
}

.cover-category {
  font-size: 11px;
}

.cover-title {
  font-size: 19px;
}

.cover-author {
  font-size: 11px;
}

.cover-contributor {
  font-size: 11px;
}

.glide-field__label {
  font-size: 12px;
}

.glide-select__tag {
  font-size: 12px;
}

.related-copy small {
  font-size: 12px;
}

.book-table {
  min-width: 1000px;
}

.book-table th {
  font-size: 13px;
}

.book-table td {
  font-size: 14px;
}

.table-book-copy strong {
  font-size: 15px;
}

.table-book-copy small {
  font-size: 12px;
}

.person-chip {
  font-size: 13px;
}

.tag {
  font-size: 13px;
}

.text-action {
  font-size: 13px;
}

.page-link {
  min-width: 40px;
  height: 40px;
  font-size: 13px;
}

.contributor-copy strong {
  font-size: 16px;
}

.contributor-meta {
  font-size: 12px;
}

.breadcrumb {
  font-size: 14px;
}

.detail-author {
  font-size: 16px;
}

.detail-meta dt {
  font-size: 11px;
}

.detail-meta dd {
  font-size: 15px;
}

.note-body {
  font-size: 15px;
}

.cover-caption {
  font-size: 12px;
}

.field-label {
  font-size: 13px;
}

.field input,
.field textarea {
  font-size: 15px;
}

.field-hint {
  font-size: 11px;
}

.field-error {
  font-size: 12px;
}

.form-error {
  font-size: 13px;
}

.confirm-message {
  font-size: 14px;
}

.toast {
  font-size: 13px;
}

.site-footer {
  font-size: 11px;
}

.update-banner {
  font-size: 13px;
}

.error-copy {
  font-size: 14px;
}

@media (max-width: 560px) {
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand side"
      "nav nav";
    align-items: center;
    gap: 8px 12px;
    top: 0;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .stat-card:nth-child(n + 3) {
    display: none;
  }

  .shelf-invite {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    margin: 22px 0 4px;
    padding: 22px;
  }

  .site-header.is-floating {
    top: 10px;
    width: 100%;
  }

  .site-header::before {
    inset: -4px -8px;
    border-radius: 14px;
    background: rgba(255, 253, 248, 0.8);
    box-shadow: 0 8px 22px rgba(43, 56, 47, 0.06);
    backdrop-filter: blur(10px) saturate(1.04);
    -webkit-backdrop-filter: blur(10px) saturate(1.04);
  }

  .brand {
    grid-area: brand;
    min-width: 0;
  }

  .brand-copy {
    min-width: 0;
  }

  .brand-copy strong {
    overflow: hidden;
    font-size: 21px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-side {
    grid-area: side;
    align-self: center;
    justify-self: end;
    gap: 0;
    margin-left: 0;
  }

  .header-side .icon-button {
    display: none;
  }

  .header-date {
    align-items: flex-end;
    font-size: 12px;
  }

  .header-time {
    font-size: 14px;
  }

  .rubber-tabs {
    grid-area: nav;
    width: 100%;
    margin: 0;
  }

  .search-field input,
  .select-field select,
  .field input,
  .field textarea {
    font-size: 16px;
  }

  .book-cover .cover-title {
    font-size: 17px;
  }

  .book-cover .cover-author {
    font-size: 10px;
  }

  .book-cover .cover-contributor {
    font-size: 9px;
  }

  .stat-number {
    font-size: 30px;
  }
}

