@font-face {
  font-family: Fraunces;
  src: url("/fonts/fraunces-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans";
  src: url("/fonts/source-sans-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/fonts/plex-mono-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f6f0e4;
  --paper-raised: #fffbf2;
  --paper-deep: #ece3d2;
  --ink: #182b3b;
  --ink-soft: #5d6769;
  --accent: #832e3d;
  --accent-light: #f3e0df;
  --gold: #a58240;
  --line: #cfc7b7;
  --shadow: #182b3b2b;
  --nav: #f6f0e4;
  --focus: #aa7d26;
  --success: #315d50;
  font:
    16px/1.45 "Source Sans",
    sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #101b25;
  --paper-raised: #172631;
  --paper-deep: #1e303b;
  --ink: #f3ead8;
  --ink-soft: #aeb7b6;
  --accent: #e6a1a7;
  --accent-light: #3c2833;
  --gold: #c5a66c;
  --line: #39444b;
  --shadow: #0007;
  --nav: #101b25;
  --focus: #d6b16b;
  --success: #a4ceba;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #101b25;
    --paper-raised: #172631;
    --paper-deep: #1e303b;
    --ink: #f3ead8;
    --ink-soft: #aeb7b6;
    --accent: #e6a1a7;
    --accent-light: #3c2833;
    --gold: #c5a66c;
    --line: #39444b;
    --shadow: #0007;
    --nav: #101b25;
    --focus: #d6b16b;
    --success: #a4ceba;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  min-width: 280px;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.025;
  z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.7' filter='url(%23n)'/%3E%3C/svg%3E");
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  min-height: 44px;
  border: 1px solid var(--ink);
  border-radius: 3px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}
button:hover {
  filter: brightness(0.94);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.danger {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
a {
  color: var(--accent);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
h1,
h2,
h3 {
  font-family: Fraunces, serif;
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}
h1 {
  font-size: 38px;
  margin: 0 0 24px;
}
h2 {
  font-size: 27px;
  margin: 28px 0 12px;
}
h3 {
  font-size: 21px;
  margin: 0 0 7px;
}
p {
  margin: 8px 0 16px;
}
.muted {
  color: var(--ink-soft);
  font-size: 14px;
}
.eyebrow {
  font:
    10px/1.5 "Plex Mono",
    monospace;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 8px;
}
.mono {
  font-family: "Plex Mono", monospace;
}
.masthead {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 79px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px max(24px, calc((100vw - 1080px) / 2)) 10px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.masthead::before {
  content: "";
  height: 7px;
  position: absolute;
  inset: 0 0 auto;
  background-color: #742c3b;
  background-image: repeating-radial-gradient(
    ellipse at 35% -100%,
    transparent 0 9px,
    #c5a775 10px 12px,
    transparent 13px 17px,
    #203d4b 18px 23px,
    #e2d0a8 24px 26px,
    transparent 27px 33px
  );
  background-size: 97px 36px;
  opacity: 0.96;
}
#brand {
  font-family: Fraunces, serif;
  font-weight: 650;
  font-size: 31px;
  letter-spacing: -1.9px;
  text-decoration: none;
  color: var(--ink);
}
.header-actions {
  display: flex;
  gap: 9px;
  align-items: center;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  color: var(--ink);
  border-color: transparent;
  font-size: 28px;
  font-weight: 400;
}
.icon-button svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bookplate {
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 5px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  position: relative;
}
.bookplate::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid var(--line);
}
.bookplate span:first-child {
  font-family: Fraunces, serif;
  font-size: 23px;
  font-weight: 500;
  position: relative;
}
main {
  max-width: 1080px;
  margin: auto;
  padding: 28px 24px 0;
  min-height: calc(100dvh - 200px);
}
nav {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 0 0 16px;
  margin-bottom: 30px;
}
nav button {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-color: transparent;
  color: var(--ink-soft);
  font-weight: 500;
}
nav button.active {
  color: var(--accent);
  background: var(--accent-light);
}
.nav-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.nav-short {
  display: none;
}
.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 25px;
}
.page-heading h1 {
  margin: 0;
}
.page-heading .folio {
  font:
    10px/1.5 "Plex Mono",
    monospace;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-bottom: 4px;
}
.shelves {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  max-width: 650px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.shelves button {
  position: relative;
  min-width: 0;
  min-height: 49px;
  background: transparent;
  color: var(--ink-soft);
  border: 0;
  border-radius: 0;
  padding: 10px 4px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.shelves button.selected {
  color: var(--accent);
  font-weight: 650;
}
.shelves button.selected::after {
  content: "";
  height: 3px;
  background: var(--accent);
  position: absolute;
  inset: auto 8px -1px;
}
.shelf-count {
  font:
    10px "Plex Mono",
    monospace;
  margin-left: 5px;
  opacity: 0.75;
}
.toolbar,
.actions,
.pair {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.toolbar {
  margin: 16px 0;
}
.shelf-toolbar {
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 4px 0 20px;
  max-width: 650px;
}
.shelf-toolbar label {
  margin: 0;
}
.sort-filter {
  min-width: 0;
  max-width: 200px;
  flex: 1;
}
#sort {
  border: 0;
  padding-left: 0;
  background: transparent;
  font-size: 16px;
  width: 100%;
}
.audio-filter {
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
}
.audio-filter > span {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 44px;
}
.filter-short {
  display: none;
}
input,
select,
textarea {
  font-size: 16px;
  line-height: 1.35;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-raised);
  color: var(--ink);
  padding: 10px 11px;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  width: 100%;
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  padding: 0;
  margin: 0;
  vertical-align: middle;
}
label {
  display: grid;
  gap: 6px;
  margin: 14px 0;
  font-size: 14px;
}
label:has(> span > input[type="checkbox"]) > span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}
textarea {
  min-height: 90px;
  resize: vertical;
}
.pair > label {
  flex: 1;
  min-width: 0;
}
fieldset {
  padding: 0;
  border: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 22px 0;
}
legend {
  font-weight: 600;
  font-size: 14px;
  padding: 0 0 9px;
}
fieldset label {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  border: 1px solid var(--line);
  padding: 9px 11px;
  border-radius: 3px;
  cursor: pointer;
}
fieldset label:has(input:checked) {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}
#verdict-options label {
  text-transform: capitalize;
}
#search-form {
  flex-wrap: nowrap;
  margin: 18px 0 24px;
}
#query {
  flex: 1;
  min-width: 0;
  width: 100%;
}
.search-intro {
  max-width: 440px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr));
  gap: 22px;
  margin: 20px 0;
}
.card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  min-width: 0;
  padding: 0 0 23px;
  border-bottom: 1px solid var(--line);
}
.card-body {
  min-width: 0;
  flex: 1;
}
.card h3 {
  font-size: 23px;
}
.card p {
  font-size: 14px;
  margin: 5px 0;
}
.card .actions {
  margin-top: 12px;
  gap: 6px;
}
.card .actions button {
  font-size: 13px;
  padding: 8px 10px;
}
.cover-object {
  position: relative;
  aspect-ratio: 2/3;
  width: 100%;
  isolation: isolate;
  background: #c3ae88;
  box-shadow:
    3px 5px 8px var(--shadow),
    inset -1px 0 2px #0002;
  overflow: hidden;
  border-radius: 1px 3px 3px 1px;
}
.cover-object::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background: linear-gradient(
    90deg,
    #0003,
    transparent 3%,
    #ffffff25 4%,
    transparent 7%,
    transparent 94%,
    #0002
  );
  mix-blend-mode: multiply;
}
.cover-object img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  color: transparent;
}
.cover-object img.cover-failed {
  display: none;
}
.cover-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  padding: 17% 10% 13%;
  background: var(--cover-bg);
  color: var(--cover-ink);
}
.cover-fallback::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid currentColor;
  opacity: 0.4;
}
.cover-fallback-title {
  font-family: Fraunces, serif;
  font-size: clamp(13px, 2.6vw, 22px);
  line-height: 1.13;
  letter-spacing: -0.035em;
  font-weight: 550;
  overflow: hidden;
  max-height: 68%;
  position: relative;
}
.cover-fallback-author {
  font-family: "Plex Mono", monospace;
  font-size: clamp(6px, 1.55vw, 10px);
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.5;
  overflow: hidden;
  max-height: 25%;
  position: relative;
}
.cover-palette-0 {
  --cover-bg: #7d2c3e;
  --cover-ink: #f7e8cc;
}
.cover-palette-1 {
  --cover-bg: #233f4b;
  --cover-ink: #ead7ae;
}
.cover-palette-2 {
  --cover-bg: #cfb27e;
  --cover-ink: #273c42;
}
.cover-palette-3 {
  --cover-bg: #d4b6aa;
  --cover-ink: #532d3e;
}
.cover-palette-4 {
  --cover-bg: #4b5e4c;
  --cover-ink: #e9dfbd;
}
.cover-palette-5 {
  --cover-bg: #ddd1b0;
  --cover-ink: #593c3d;
}
.card-cover {
  width: 90px;
  flex: 0 0 90px;
}
.cover-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 24px 22px;
  margin: 12px 0 25px;
}
.shelf-book {
  min-width: 0;
  position: relative;
}
.book-open {
  padding: 0;
  width: 100%;
  min-height: 0;
  display: block;
  text-align: left;
  background: transparent;
  color: var(--ink);
  border: 0;
  border-radius: 0;
  font-weight: 400;
}
.book-open:hover {
  filter: none;
}
.book-open:hover .cover-object {
  transform: translateY(-3px);
  box-shadow: 4px 8px 12px var(--shadow);
}
.book-open .cover-object {
  transition:
    transform 0.18s,
    box-shadow 0.18s;
}
.shelf-title {
  display: block;
  font-family: Fraunces, serif;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-top: 10px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.shelf-author {
  display: block;
  font-size: 12px;
  line-height: 1.3;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 3px;
}
.stamp {
  display: inline-block;
  font:
    700 12px/1 "Plex Mono",
    monospace;
  text-transform: uppercase;
  border: 2px solid currentColor;
  color: #832e3d;
  padding: 5px 6px 4px;
  transform: rotate(-9deg);
  letter-spacing: 0.9px;
  mix-blend-mode: normal;
  background: #f6eedff2;
  box-shadow: inset 0 0 0 1px #ffffff40;
}
.cover-object > .stamp {
  position: absolute;
  z-index: 4;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%) rotate(-11deg);
  white-space: nowrap;
  font-size: 10px;
  max-width: 98%;
  padding: 5px 4px 4px;
  letter-spacing: 0.4px;
}
.stamp-liked {
  color: #1c3c51;
}
.stamp-meh {
  color: #5d625e;
}
.stamp-hated {
  color: #5c4248;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}
.libby-marks {
  min-height: 27px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-family: "Plex Mono", monospace;
  font-size: 10px;
  margin-top: 2px;
}
.libby-mark {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 24px;
}
.libby-mark svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.libby-unconfirmed {
  opacity: 0.65;
}
.badge {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  font:
    10px/1.45 "Plex Mono",
    monospace;
  letter-spacing: 0.2px;
  color: var(--success);
  margin: 5px 0;
}
.unverified {
  color: var(--gold);
}
.libby-summary {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.libby-summary .badge {
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
}
.note {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.date-stamp {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  font:
    10px/1.25 "Plex Mono",
    monospace;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid currentColor;
  padding: 6px 9px;
  letter-spacing: 1px;
  transform: rotate(-3deg);
  opacity: 0.8;
  margin: 11px 0;
}
.date-stamp strong {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}
.reading-card {
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 0 24px;
  gap: 22px;
  min-height: 170px;
}
.reading-card .card-cover {
  width: 103px;
  flex-basis: 103px;
}
.reading-card .card-body {
  padding-top: 7px;
}
.reading-card h3 {
  font-size: 26px;
}
.reading-card .reading-open {
  padding: 0;
  background: transparent;
  color: var(--ink);
  border: 0;
  min-height: 44px;
  text-align: left;
}
.reading-card .reading-open h3 {
  margin: 0;
}
.reading-card .stamp {
  margin: 9px 0;
  font-size: 10px;
}
.reading-card .libby-marks {
  margin: 5px 0;
}
.reading-card .text-link {
  margin: 3px 0 0;
  padding: 0;
  min-height: 44px;
  background: transparent;
  border: 0;
  color: var(--accent);
  font-size: 14px;
}
.empty {
  grid-column: 1/-1;
  padding: 24px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  max-width: 650px;
  border-bottom: 1px solid var(--line);
}
.empty p {
  font-family: Fraunces, serif;
  font-size: 20px;
  letter-spacing: -0.5px;
  margin: 0;
}
.empty button {
  flex-shrink: 0;
  font-size: 13px;
  padding: 10px 12px;
}
.empty .empty-mark {
  font-family: Fraunces, serif;
  font-size: 24px;
  color: var(--gold);
}
.sheet {
  position: fixed;
  inset: auto 0 0;
  margin: 0 auto;
  width: 640px;
  max-width: 100%;
  max-height: 91dvh;
  overflow: auto;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 14px 14px 0 0;
  padding: 12px 30px calc(30px + env(safe-area-inset-bottom, 0px));
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 -12px 60px #0002;
  overscroll-behavior: contain;
}
.sheet::backdrop {
  background: #06131caa;
  backdrop-filter: blur(3px);
}
.sheet-handle {
  width: 32px;
  height: 3px;
  border-radius: 2px;
  background: var(--line);
  margin: 0 auto 23px;
}
.sheet-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}
.sheet-heading h2 {
  margin: 0;
}
.sheet-heading > .icon-button {
  flex-shrink: 0;
  margin: -8px -12px 0 0;
}
.sheet h2 {
  font-size: 27px;
}
.sheet .eyebrow {
  font-size: 9px;
}
.detail-close {
  position: absolute;
  right: 16px;
  top: 17px;
  z-index: 2;
}
#detail-content > .detail-hero {
  display: flex;
  gap: 23px;
  align-items: center;
  padding: 10px 8px 25px 0;
  border-bottom: 1px solid var(--line);
}
.detail-cover {
  width: 112px;
  flex: 0 0 112px;
}
.detail-heading {
  min-width: 0;
  flex: 1;
}
#detail-title {
  font-size: 29px;
  margin: 0 0 8px;
}
.detail-author {
  font-size: 15px;
  margin: 0 0 8px;
  color: var(--ink-soft);
}
.detail-metadata {
  font:
    10px/1.8 "Plex Mono",
    monospace;
  color: var(--ink-soft);
}
.detail-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 27px 0 12px;
}
.detail-section-title h3 {
  font:
    11px "Plex Mono",
    monospace;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
  color: var(--ink-soft);
}
.entry-note {
  padding: 14px 0 20px;
  border-bottom: 1px solid var(--line);
}
.entry-note .entry-byline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
}
.reader-name {
  font-family: Fraunces, serif;
  font-size: 22px;
  letter-spacing: -0.5px;
}
.entry-note .stamp {
  font-size: 10px;
  transform: rotate(-5deg);
  mix-blend-mode: normal;
  background: transparent;
}
.entry-status {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 4px 0;
}
.entry-note .note {
  font-size: 16px;
  line-height: 1.5;
  margin: 11px 0;
}
.entry-note .edit-entry {
  font-size: 13px;
  padding: 7px 10px;
  margin-top: 7px;
  min-height: 44px;
}
.tags {
  font:
    10px/1.6 "Plex Mono",
    monospace;
  color: var(--ink-soft);
}
.libby-library {
  border-top: 1px solid var(--line);
  padding: 15px 0 5px;
}
.libby-library:first-child {
  border-top: 0;
}
.libby-library h4 {
  font-family: Fraunces, serif;
  font-weight: 500;
  font-size: 21px;
  margin: 0 0 9px;
  letter-spacing: -0.5px;
}
.libby-format {
  padding: 0 0 10px;
}
.libby-format p {
  font-size: 13px;
  margin: 4px 0;
}
.libby-format a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
}
.libby-format .format-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
}
.libby-format .match-label {
  font-size: 11px;
  color: var(--ink-soft);
}
.profile-choice {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  text-align: left;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 14px 0;
  min-height: 66px;
}
.profile-choice .mini-bookplate {
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  width: 38px;
  height: 41px;
  font:
    23px Fraunces,
    serif;
}
.profile-choice .profile-name {
  font-family: Fraunces, serif;
  font-size: 24px;
  font-weight: 500;
  flex: 1;
  letter-spacing: -0.6px;
}
.profile-choice[aria-pressed="true"] .mini-bookplate {
  border-color: var(--accent);
  color: var(--accent);
}
.profile-choice .choice-tick {
  color: var(--accent);
}
#rename-profile {
  display: flex;
  align-items: end;
  gap: 8px;
  margin-top: 22px;
}
#rename-profile label {
  flex: 1;
  margin: 0;
}
.verdict-page {
  max-width: 640px;
  margin: 0 auto;
}
.verdict-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.verdict-heading h1 {
  font-size: 31px;
  margin: 0;
}
#verdict-progress {
  font:
    10px "Plex Mono",
    monospace;
  letter-spacing: 0.4px;
  color: var(--ink-soft);
  white-space: nowrap;
}
.verdict-intro {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 20px;
}
.verdict-stage {
  position: relative;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 28px;
  align-items: center;
  margin: 20px 0 24px;
}
.verdict-cover {
  width: 150px;
}
.verdict-book-info h2 {
  font-size: 33px;
  margin: 0 0 10px;
}
.verdict-book-info p {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0;
}
.verdict-book-info .date-stamp {
  margin-top: 18px;
  font-size: 9px;
}
.verdict-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}
.verdict-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 77px;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 3px;
  color: var(--accent);
  font-family: "Plex Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 3px;
}
.verdict-choice .verdict-icon {
  font:
    25px/1 Fraunces,
    serif;
}
.verdict-choice[data-verdict="liked"] {
  color: var(--ink);
}
.verdict-choice[data-verdict="meh"] {
  color: var(--ink-soft);
}
.verdict-choice[data-verdict="hated"] {
  color: var(--accent);
  border-style: dashed;
}
.verdict-choice[data-verdict="hated"] .verdict-word {
  text-decoration: line-through;
}
.verdict-choice:active {
  background: var(--accent-light);
}
.verdict-why-label {
  font-size: 13px;
  margin-bottom: 0;
}
#verdict-why {
  min-height: 82px;
}
.verdict-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}
.verdict-bottom .muted {
  font-size: 12px;
  max-width: 220px;
  margin: 0;
}
.skip-verdict {
  background: transparent;
  color: var(--ink-soft);
  border: 0;
  padding-right: 0;
  font-size: 14px;
}
.stamp-reveal {
  animation: stamp-in 0.32s ease-out forwards;
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 47%;
  font-size: 25px;
  transform: translate(-50%, -50%) rotate(-12deg);
  padding: 12px 16px;
  background: var(--paper-raised);
  mix-blend-mode: normal;
  white-space: nowrap;
  box-shadow: 0 5px 20px var(--shadow);
}
@keyframes stamp-in {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.7) rotate(-16deg);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(-12deg);
  }
}
.settings-section {
  max-width: 620px;
  margin-bottom: 30px;
}
.settings-section h2 {
  font-size: 25px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.reader-list {
  padding: 0;
  list-style: none;
}
.reader-list li {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  font-family: Fraunces, serif;
  font-size: 22px;
}
.settings-copy {
  font-size: 14px;
  color: var(--ink-soft);
}
.theme-options {
  display: flex;
  gap: 6px;
}
.theme-options button[aria-pressed="true"] {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}
.install-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.install-option p {
  margin: 0;
}
.settings-section code {
  font-size: 12px;
}
#message:empty {
  display: none;
}
#message {
  font-size: 14px;
  padding: 11px 14px;
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
  margin: 0 0 20px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
td,
th {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}
.scroll {
  overflow: auto;
  max-width: 100%;
  margin: 20px 0;
}
code {
  font-family: "Plex Mono", monospace;
  overflow-wrap: anywhere;
  word-break: break-word;
}
details {
  margin: 26px 0;
  max-width: 620px;
}
summary {
  min-height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--accent);
}
#login {
  max-width: 700px;
  margin: 44px auto 64px;
}
#login h1 {
  font-size: 66px;
  line-height: 1.04;
  margin: 18px 0 24px;
  font-weight: 500;
  letter-spacing: -3px;
}
#login h1 em {
  color: var(--accent);
  font-weight: 450;
}
.login-intro {
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.6;
}
#login form {
  max-width: 360px;
  margin-top: 27px;
}
#login form button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
}
footer {
  font-family: Fraunces, serif;
  font-size: 14px;
  font-style: italic;
  text-align: center;
  color: var(--ink-soft);
  padding: 35px 24px 28px;
}
.footer-mark {
  color: var(--gold);
  padding-right: 6px;
  font-size: 21px;
}
@media (min-width: 800px) {
  .cover-grid {
    gap: 32px 27px;
  }
  .shelf-title {
    font-size: 17px;
  }
  .shelf-author {
    font-size: 13px;
  }
  .cover-grid .cover-fallback-title {
    font-size: 21px;
  }
  .cover-grid .cover-fallback-author {
    font-size: 9px;
  }
  .shelves {
    max-width: none;
  }
  .shelf-toolbar {
    max-width: none;
  }
  .page-heading {
    margin-top: 3px;
  }
}
@media (max-width: 700px) {
  .masthead {
    min-height: 72px;
    padding: 16px 20px 8px;
  }
  .masthead::before {
    height: 6px;
  }
  #brand {
    font-size: 29px;
    letter-spacing: -1.6px;
  }
  .header-actions {
    gap: 5px;
  }
  main {
    padding: 24px 20px 0;
    min-height: calc(100dvh - 190px);
  }
  h1 {
    font-size: 33px;
    margin-bottom: 21px;
  }
  h2 {
    font-size: 25px;
  }
  .page-heading {
    margin-bottom: 21px;
  }
  .page-heading .eyebrow {
    font-size: 9px;
  }
  .page-heading .folio {
    font-size: 9px;
  }
  nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    min-height: 65px;
    margin: 0;
    padding: 5px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    border: 0;
    border-top: 1px solid var(--line);
    background: var(--nav);
    box-shadow: 0 -3px 16px #00000005;
  }
  nav button {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 49px;
    min-width: 0;
    padding: 4px 1px;
    font-size: 10px;
    font-weight: 500;
    border-radius: 0;
    background: transparent !important;
  }
  nav button.active::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 32%;
    right: 32%;
    height: 2px;
    background: var(--accent);
  }
  .nav-icon {
    width: 21px;
    height: 21px;
  }
  .nav-long {
    display: none;
  }
  .nav-short {
    display: inline;
  }
  .shelves button {
    font-size: 13px;
    min-height: 47px;
    padding: 9px 1px;
  }
  .shelf-count {
    font-size: 9px;
    margin-left: 4px;
  }
  .shelves button.selected::after {
    inset: auto 4px -1px;
  }
  .shelf-toolbar {
    margin: 4px 0 17px;
    gap: 6px;
  }
  .sort-filter {
    max-width: 184px;
  }
  #sort {
    font-size: 16px;
    min-height: 44px;
  }
  .audio-filter {
    font-size: 12px;
  }
  .audio-filter > span {
    gap: 5px;
  }
  .filter-full {
    display: none;
  }
  .filter-short {
    display: inline;
  }
  .cover-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 21px 16px;
    margin: 8px 0 20px;
  }
  .cover-grid .cover-fallback-title {
    font-size: 16px;
  }
  .cover-grid .cover-fallback-author {
    font-size: 7px;
    letter-spacing: 0.5px;
  }
  .cover-object > .stamp {
    font-size: 9px;
    padding: 5px 4px 4px;
    bottom: 34px;
  }
  .shelf-title {
    font-size: 14px;
    margin-top: 9px;
    line-height: 1.22;
  }
  .shelf-author {
    font-size: 11px;
  }
  .libby-marks {
    font-size: 9px;
    gap: 7px;
    margin-top: 1px;
  }
  .libby-mark svg {
    width: 12px;
    height: 12px;
  }
  .cards {
    grid-template-columns: 1fr;
    gap: 23px;
    margin: 16px 0;
  }
  .reading-card {
    gap: 21px;
    padding-bottom: 23px;
    min-height: 174px;
  }
  .reading-card .card-cover {
    width: 106px;
    flex-basis: 106px;
  }
  .reading-card .card-body {
    padding-top: 5px;
  }
  .reading-card h3 {
    font-size: 25px;
  }
  .reading-card p {
    font-size: 13px;
  }
  .reading-card .date-stamp {
    font-size: 9px;
  }
  .card-cover {
    width: 83px;
    flex-basis: 83px;
  }
  .card h3 {
    font-size: 23px;
  }
  .card .cover-fallback-title {
    font-size: 14px;
  }
  .card .cover-fallback-author {
    font-size: 6px;
  }
  .empty {
    padding: 18px 0 23px;
    gap: 12px;
  }
  .empty p {
    font-size: 18px;
  }
  .empty button {
    font-size: 12px;
    padding: 10px 11px;
  }
  .sheet {
    padding: 12px 21px calc(26px + env(safe-area-inset-bottom, 0px));
    max-height: 91dvh;
    max-width: 100%;
    width: 100%;
  }
  .sheet-handle {
    margin-bottom: 24px;
  }
  .sheet h2 {
    font-size: 26px;
  }
  #detail-content > .detail-hero {
    gap: 20px;
    padding-bottom: 23px;
    padding-top: 8px;
  }
  .detail-cover {
    width: 105px;
    flex-basis: 105px;
  }
  #detail-title {
    font-size: 28px;
  }
  .detail-author {
    font-size: 14px;
  }
  .detail-metadata {
    font-size: 9px;
  }
  .detail-cover .cover-fallback-title {
    font-size: 17px;
  }
  .detail-cover .cover-fallback-author {
    font-size: 7px;
  }
  .detail-section-title {
    margin-top: 24px;
  }
  .entry-note .note {
    font-size: 15px;
  }
  .entry-note .reader-name {
    font-size: 22px;
  }
  .entry-note .stamp {
    font-size: 9px;
  }
  .entry-note {
    padding-bottom: 16px;
  }
  .sheet-heading {
    margin-bottom: 18px;
  }
  .sheet .pair {
    gap: 9px;
  }
  .sheet fieldset {
    gap: 6px;
  }
  .sheet fieldset label {
    padding: 9px 9px;
    font-size: 13px;
  }
  .sheet .actions {
    margin-top: 12px;
  }
  .verdict-heading {
    margin-bottom: 12px;
  }
  .verdict-heading h1 {
    font-size: 31px;
  }
  .verdict-intro {
    font-size: 13px;
    margin-bottom: 17px;
  }
  .verdict-stage {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: center;
    margin: 22px 0 20px;
  }
  .verdict-cover {
    width: 141px;
  }
  .verdict-cover .cover-fallback-title {
    font-size: 23px;
  }
  .verdict-cover .cover-fallback-author {
    font-size: 9px;
  }
  .verdict-book-info h2 {
    font-size: 27px;
    margin: 0 0 7px;
  }
  .verdict-book-info p {
    font-size: 13px;
  }
  .verdict-book-info .date-stamp {
    display: none;
  }
  .verdict-buttons {
    gap: 7px;
    margin: 17px 0 19px;
  }
  .verdict-choice {
    min-height: 72px;
    font-size: 10px;
    gap: 6px;
  }
  .verdict-choice .verdict-icon {
    font-size: 24px;
  }
  .verdict-why-label {
    margin-top: 15px;
    font-size: 13px;
  }
  #verdict-why {
    min-height: 75px;
  }
  .verdict-bottom .muted {
    max-width: 230px;
    font-size: 11px;
  }
  .skip-verdict {
    font-size: 13px;
  }
  .stamp-reveal {
    font-size: 24px;
    top: 35%;
  }
  #login {
    margin: 40px 0 38px;
  }
  #login h1 {
    font-size: 47px;
    line-height: 1.08;
    letter-spacing: -2px;
    margin: 17px 0 22px;
  }
  .login-intro {
    font-size: 15px;
  }
  #login .eyebrow {
    font-size: 9px;
  }
  #login form {
    margin-top: 25px;
  }
  footer {
    padding: 29px 20px calc(95px + env(safe-area-inset-bottom, 0px));
    font-size: 13px;
  }
  body:has(#app[hidden]) footer {
    padding-bottom: 30px;
  }
  .settings-section {
    margin-bottom: 26px;
  }
  .settings-section h2 {
    font-size: 25px;
  }
  .settings-copy {
    font-size: 13px;
  }
  .profile-sheet {
    max-height: 80dvh;
  }
  #rename-profile {
    gap: 7px;
  }
  #rename-profile button {
    font-size: 13px;
    padding: 10px 12px;
  }
  .profile-choice .profile-name {
    font-size: 24px;
  }
  #import-form {
    margin: 22px 0;
  }
  .import-intro {
    font-size: 14px;
    max-width: 440px;
  }
}
@media (max-width: 350px) {
  main {
    padding-inline: 16px;
  }
  .masthead {
    padding-inline: 16px;
  }
  .cover-grid {
    gap: 20px 12px;
  }
  .cover-grid .cover-fallback-title {
    font-size: 14px;
  }
  .cover-object > .stamp {
    font-size: 8px;
    padding-inline: 3px;
  }
  .shelves button {
    font-size: 12px;
  }
  .shelf-count {
    font-size: 8px;
    margin-left: 3px;
  }
  .sort-filter {
    max-width: 158px;
  }
  .filter-short {
    font-size: 11px;
  }
  .shelf-title {
    font-size: 13px;
  }
  .shelf-author {
    font-size: 10px;
  }
  .verdict-heading h1 {
    font-size: 28px;
  }
  .verdict-cover {
    width: 124px;
  }
  .verdict-stage {
    margin-top: 17px;
    gap: 14px;
  }
  .verdict-book-info h2 {
    font-size: 25px;
  }
  .sheet {
    padding-inline: 17px;
  }
  .detail-cover {
    width: 91px;
    flex-basis: 91px;
  }
  #detail-title {
    font-size: 25px;
  }
  .detail-hero {
    gap: 17px !important;
  }
  .verdict-choice {
    font-size: 9px;
  }
  #login h1 {
    font-size: 41px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.format-heading svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.entry-note .stamp {
  color: var(--accent);
}
.entry-note .stamp-liked {
  color: var(--ink);
}
.entry-note .stamp-meh {
  color: var(--ink-soft);
}
