:root {
  color-scheme: light;
  --ink: #1d2528;
  --muted: #66747a;
  --line: #d7dfdc;
  --panel: #ffffff;
  --page: #f4f6f3;
  --sidebar: #20282b;
  --sidebar-2: #2d373a;
  --surface-2: #edf3f4;
  --teal: #0f766e;
  --teal-strong: #0a5c55;
  --coral: #c94f4f;
  --amber: #a66500;
  --blue: #3b82a8;
  --green: #28794f;
  --shadow: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background: var(--page);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

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

.standalone-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login {
  width: min(420px, 100%);
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.login h1 {
  margin: 0;
  font-size: 28px;
}

.login p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.login input,
.login button {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 8px 12px;
}

.login button {
  border: 0;
  background: var(--sidebar);
  color: #fff;
  font-weight: 800;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 16px;
  background: var(--sidebar);
  color: #f7fafc;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f4b84a;
  color: var(--sidebar);
  font-weight: 800;
}

.brand h1 {
  margin: 0;
  font-size: 18px;
}

.brand p,
.sync-meta {
  margin: 4px 0 0;
  color: #b7c2d1;
  font-size: 12px;
  line-height: 1.45;
}

.tabs {
  display: grid;
  gap: 6px;
}

.tab,
.icon-button,
.primary,
.secondary,
.chip-button {
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
}

.tab {
  justify-content: flex-start;
  padding: 10px 12px;
  color: #dce5f0;
  background: transparent;
}

.tab:hover,
.tab.is-active {
  background: var(--sidebar-2);
  color: #ffffff;
}

.tab.is-active {
  box-shadow: inset 3px 0 #f4b84a;
}

.tab svg,
.toolbar svg,
.dialog-head svg,
.primary svg,
.text-button svg {
  width: 17px;
  height: 17px;
}

.sync-box {
  margin-top: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.sync-title {
  font-size: 12px;
  color: #f4b84a;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.main {
  min-width: 0;
  padding: 20px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.topbar h2 {
  margin: 0;
  font-size: 26px;
}

.topbar p {
  margin: 6px 0 0;
  color: var(--muted);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search {
  width: min(420px, 42vw);
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.icon-button,
.text-button {
  width: 40px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
}

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

.history-nav:hover {
  color: var(--ink);
}

.text-button {
  width: auto;
  min-width: 148px;
  padding: 0 12px;
  font-weight: 700;
}

.topbar-update {
  min-width: 56px;
  min-height: 36px;
  padding: 0 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  background: transparent;
}

.topbar-update:hover {
  color: var(--ink);
  background: var(--panel);
}

.text-button span {
  display: inline-grid;
  gap: 1px;
  line-height: 1.05;
}

.text-button small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.text-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.compact-action {
  min-width: 92px;
  min-height: 34px;
}

.update-status {
  margin: -8px 0 14px;
  padding: 10px 12px;
  border: 1px solid #b9d5d2;
  border-radius: 8px;
  background: #eef8f7;
  color: var(--teal-strong);
  font-size: 13px;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.home-metrics {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
}

.metric {
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric .label {
  color: var(--muted);
  font-size: 12px;
}

.metric .value {
  margin-top: 8px;
  font-size: clamp(22px, 2vw, 34px);
  font-weight: 750;
  line-height: 1;
  overflow-wrap: anywhere;
}

.metric .sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 16px;
}

.band,
.panel {
  padding: 16px;
  margin-bottom: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.band-head,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.band h3,
.panel h3 {
  margin: 0;
  font-size: 18px;
}

.book-line {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.book-line img {
  width: 34px;
  height: 48px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #eef2f6;
}

.book-line span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.rank-cell {
  width: 72px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.band p {
  margin: 0;
  color: var(--muted);
}

.quiet-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.quiet-panel .panel-head {
  margin-bottom: 0;
}

.store-jump {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.store-jump svg {
  width: 17px;
  height: 17px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.6fr);
  gap: 16px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 940px;
  background: var(--panel);
}

th,
td {
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  color: #465365;
  font-size: 12px;
  z-index: 1;
}

tr:last-child td {
  border-bottom: 0;
}

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

.book-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  min-width: 0;
}

.book-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #e8edf4;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.book-cover span {
  padding: 14px;
  color: var(--muted);
  font-size: 12px;
}

.book-body {
  padding: 12px;
}

.book-title,
.strong {
  font-weight: 700;
}

.book-title {
  min-height: 40px;
  line-height: 1.35;
}

.meta-line {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chip,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: #465365;
  font-size: 12px;
}

.status.teal {
  background: #dff3f4;
  color: var(--teal-strong);
}

.status.coral {
  background: #ffe8e5;
  color: var(--coral);
}

.status.amber {
  background: #fff1d6;
  color: var(--amber);
}

.status.blue {
  background: #e5eefb;
  color: var(--blue);
}

.status.point {
  background: #e8f7e9;
  color: var(--green);
}

.status.purple {
  background: #efe8fb;
  color: #6841a3;
}

.status.green {
  background: #e3f4ea;
  color: var(--green);
}

.promo-inline,
.promo-stack {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  vertical-align: middle;
}

.promo-stack {
  display: flex;
  max-width: 360px;
}

.point-cell,
.progress-cell {
  display: grid;
  gap: 6px;
  min-width: 170px;
}

.point-cell > div:first-child {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.progress-track {
  width: 100%;
  max-width: 220px;
  height: 7px;
  border-radius: 999px;
  background: #edf3f4;
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.discount-badge {
  display: inline-grid;
  min-width: 96px;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #c9d6d2;
  background: #f4f8f6;
  color: var(--teal-strong);
  line-height: 1.1;
}

.discount-badge span {
  font-weight: 800;
  font-size: 17px;
  white-space: nowrap;
}

.discount-badge small {
  color: var(--muted);
  font-size: 11px;
}

.discount-badge.hot {
  border-color: #e5b65e;
  background: #fff6df;
  color: #8b4e00;
}

.discount-badge.strong {
  border-color: #88c7ad;
  background: #e6f6ed;
  color: #17633e;
}

.discount-badge.medium {
  border-color: #9fc6db;
  background: #e8f3f8;
  color: #24617d;
}

.discount-badge.light {
  background: #f7fbfa;
}

.discount-badge.none {
  color: var(--muted);
  background: #f4f4f2;
}

.book-rate {
  margin-top: 8px;
}

.book-rate .discount-badge {
  min-width: 0;
  width: 100%;
}

.discount-list {
  display: grid;
  gap: 8px;
}

.discount-row {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: inherit;
  text-align: left;
}

.discount-row:hover {
  border-color: #b9c8c4;
  background: #f7fbfa;
}

.discount-row.static-row {
  cursor: default;
}

.discount-row.static-row:hover {
  border-color: var(--line);
  background: #fbfcfb;
}

.discount-row strong,
.discount-row small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.discount-row small {
  color: var(--muted);
  font-size: 12px;
}

.discount-money {
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.store-grid-wide {
  grid-template-columns: repeat(3, minmax(210px, 1fr));
}

.store-metrics {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  margin-bottom: 14px;
}

.reading-breakdown {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.reading-breakdown > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.reading-breakdown strong {
  min-width: 44px;
  color: var(--ink);
  font-size: 12px;
}

.store-card {
  min-width: 0;
  min-height: 118px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: inherit;
  display: grid;
  align-content: start;
  gap: 8px;
  text-align: left;
}

.store-card:not(.static):hover {
  border-color: #b9c8c4;
  background: #f7fbfa;
}

.store-card strong {
  font-size: 28px;
  line-height: 1;
}

.store-card small,
.store-card em {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  font-style: normal;
}

.store-name {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: none;
}

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

.external-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.external-cover {
  width: 74px;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #e8edf4;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.external-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ledger-shell {
  display: grid;
  gap: 12px;
}

.ledger-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.ledger-header h3 {
  margin: 0;
  font-size: 18px;
}

.ledger-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.ledger-store-counts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 220px;
}

.inline-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.inline-actions p {
  margin: 0;
}

.ledger-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.filter-panel {
  flex: 1 1 320px;
  min-width: min(320px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.filter-panel summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 10px;
  cursor: pointer;
  list-style: none;
}

.filter-panel summary::-webkit-details-marker {
  display: none;
}

.filter-panel summary::after {
  content: "開く";
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}

.filter-panel[open] summary::after {
  content: "閉じる";
}

.filter-panel summary span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.filter-panel summary small {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-panel-body {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 10px 10px;
  border-top: 1px solid var(--line);
}

.focus-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid #b9d5d2;
  border-radius: 8px;
  background: #f0f8f6;
}

.focus-banner div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.focus-banner strong {
  overflow-wrap: anywhere;
}

.focus-banner span {
  color: var(--muted);
  font-size: 12px;
}

.update-panel {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.update-panel > summary {
  width: fit-content;
  cursor: pointer;
  color: var(--muted);
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
}

.update-panel > summary small {
  color: #89959a;
  font-size: 11px;
  font-weight: 500;
}

.compat-panel {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.compat-panel > summary {
  width: fit-content;
  cursor: pointer;
  color: var(--muted);
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
}

.compat-panel > summary small {
  color: #89959a;
  font-size: 11px;
  font-weight: 500;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.settings-card {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.settings-card h4 {
  margin: 0;
  font-size: 14px;
}

.settings-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.inline-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.inline-form input {
  min-width: min(100%, 220px);
  min-height: 36px;
  flex: 1 1 180px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.update-task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 6px;
  margin: 8px 0 2px;
}

.update-task {
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  text-align: left;
}

.update-task:hover {
  border-color: #b8cac7;
  background: #f8fbfa;
}

.update-task:disabled {
  cursor: wait;
  opacity: 0.58;
}

.update-task svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.update-task span {
  display: grid;
  gap: 2px;
}

.update-task strong {
  font-size: 12px;
}

.update-task small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.update-task small em {
  margin-right: 6px;
  color: #89959a;
  font-style: normal;
  white-space: nowrap;
}

.pagination-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 13px;
}

.page-nav {
  min-width: 74px;
}

.page-icon {
  width: 36px;
  min-height: 36px;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.page-number {
  min-width: 34px;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.page-number.is-active {
  background: var(--sidebar-2);
  color: #fff;
  border-color: var(--sidebar-2);
}

.page-gap {
  min-width: 18px;
  text-align: center;
}

.page-jump {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}

.page-jump span,
.page-jump small {
  color: var(--muted);
  font-size: 12px;
}

.page-jump input {
  width: 72px;
  min-height: 34px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.segmented {
  display: inline-flex;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

.segmented label {
  display: grid;
  place-items: center;
  position: relative;
}

.segmented input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  clip-path: inset(50%);
}

.segmented span {
  display: grid;
  place-items: center;
  min-width: 52px;
  padding: 8px 11px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
}

.segmented input:checked + span {
  background: var(--sidebar-2);
  color: #fff;
}

.control-field {
  display: grid;
  gap: 4px;
  min-width: 150px;
}

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

.control-field select {
  min-height: 36px;
  padding: 6px 28px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
}

.multi-filter {
  min-width: 220px;
  margin: 0;
  padding: 0;
  border: 0;
}

.multi-filter legend {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}

.multi-filter > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.filter-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 11px;
}

.filter-check input {
  width: auto;
  margin: 0;
}

.filter-check span {
  margin: 0;
  color: inherit;
  font-size: inherit;
}

.filter-check.is-active {
  border-color: var(--teal);
  background: #e8f5ef;
  color: var(--teal-strong);
}

.toggle-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-size: 12px;
}

.toggle-field input {
  width: auto;
  margin: 0;
}

.toggle-field span {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
}

.display-options {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.display-options-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.display-options-head small {
  color: #89959a;
  font-size: 11px;
  font-weight: 500;
}

.field-toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.mini-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  font-size: 11px;
}

.mini-toggle input {
  width: auto;
  margin: 0;
}

.mini-toggle.is-active {
  border-color: #9bbab5;
  background: #eef7f4;
  color: var(--teal-strong);
}

.ledger-list {
  display: grid;
  gap: 7px;
}

.ledger-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 9px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  content-visibility: auto;
  contain-intrinsic-size: 92px;
}

.jump-row,
.spine-book[data-row-focus] {
  cursor: pointer;
  touch-action: manipulation;
}

.jump-row:hover {
  border-color: #9bbab5;
  background: #f8fbfa;
}

.ledger-row.is-group {
  border-color: #c6d8da;
  background: #fbfdfc;
}

.ledger-row.is-group .library-cover,
.cover-tile.is-group .library-cover {
  border-color: #b8cfd1;
  background: #f2f7f5;
}

.ledger-compact {
  display: grid;
  gap: 6px;
}

.ledger-compact-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) auto 116px minmax(132px, 0.9fr) minmax(120px, 0.75fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  font-size: 13px;
}

.ledger-compact-row.is-group {
  background: #fbfdfc;
  border-color: #c6d8da;
}

.compact-title {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.compact-title strong,
.compact-title .inline-title-link,
.cover-tile strong,
.cover-title-link {
  overflow-wrap: anywhere;
}

.compact-title small,
.cover-tile small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

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

.cover-tile {
  display: grid;
  grid-template-rows: auto minmax(36px, auto) auto;
  gap: 7px;
  align-content: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  content-visibility: auto;
  contain-intrinsic-size: 244px;
}

.cover-image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.cover-title-link {
  padding: 0;
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  min-height: 36px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.cover-tile .library-cover {
  width: 100%;
}

.cover-meta {
  min-height: 58px;
  display: grid;
  gap: 2px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.cover-meta span,
.cover-meta small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.cover-meta strong {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.cover-actions,
.row-inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.cover-actions {
  justify-content: flex-start;
  min-height: 24px;
}

.spine-shelf {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(#f7f6ef, #ece7da);
}

.spine-book {
  width: 32px;
  height: 304px;
  padding: 8px 4px;
  border: 1px solid #c8c1b3;
  border-radius: 5px;
  background: var(--spine-bg);
  color: var(--spine-fg);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  gap: 5px;
  box-shadow: inset -5px 0 rgba(0, 0, 0, 0.06);
  cursor: pointer;
  position: relative;
}

.spine-placeholder {
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 5px;
  background: var(--spine-bg, #f3f0e7);
  color: var(--spine-fg, #8a8276);
  box-shadow: inset -4px 0 rgba(0, 0, 0, 0.04);
}

.spine-placeholder-mark {
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 4px;
  width: 3px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--spine-fg, #8a8276), transparent 62%);
  opacity: 0.7;
}

.spine-book-image {
  padding: 0;
  border-color: #b8b0a1;
  background: #eee9df;
  overflow: hidden;
  position: relative;
}

.spine-book-image img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}

.spine-book-image.is-cover-spine img {
  width: 210%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.95) contrast(1.03);
}

.spine-count {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 5px;
  padding: 2px 0;
  border-radius: 4px;
  background: rgba(29, 37, 40, 0.78);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  text-align: center;
}

.spine-book-image small {
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 4px;
  padding: 2px 3px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.72);
  color: #293438;
}

.spine-generated {
  position: absolute;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  line-height: 1.08;
  overflow: hidden;
  color: #172225;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.85);
}

.spine-generated-title {
  top: 12px;
  bottom: 68px;
  right: 6px;
  font-size: 11px;
  font-weight: 800;
}

.spine-generated-author {
  top: 14px;
  bottom: 84px;
  left: 6px;
  font-size: 9px;
}

.spine-generated-publisher {
  right: 23px;
  bottom: 58px;
  max-height: 118px;
  font-size: 8px;
  color: #415157;
}

.spine-book strong {
  min-height: 0;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  line-height: 1.2;
  font-size: 11px;
  overflow: hidden;
}

.spine-placeholder strong {
  align-self: stretch;
  justify-self: center;
  max-height: 100%;
  padding-left: 3px;
}

.spine-placeholder small {
  justify-self: center;
  max-height: 82px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  line-height: 1.05;
  white-space: normal;
}

.spine-book small,
.spine-store,
.spine-author,
.spine-publisher {
  color: inherit;
  opacity: 0.75;
  font-size: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spine-author,
.spine-publisher {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  min-height: 0;
  white-space: normal;
  line-height: 1.1;
}

.spine-author {
  font-size: 8px;
}

.spine-publisher {
  font-size: 7px;
}

.library-cover {
  width: 64px;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eef2f3;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}

.library-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.library-cover span {
  padding: 6px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.group-count-badge {
  position: absolute;
  right: 5px;
  bottom: 5px;
  min-width: 42px;
  padding: 3px 6px;
  border-radius: 6px;
  background: rgba(29, 37, 40, 0.88);
  color: #fff;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.ledger-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.ledger-titleline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.title-link,
.inline-title-link,
.filter-chip {
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.title-link {
  padding: 0;
  font-weight: 760;
  line-height: 1.35;
}

.title-link:hover,
.inline-title-link:hover {
  color: var(--teal-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.inline-title-link {
  min-width: 0;
  padding: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.filter-chip {
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7faf8;
  color: var(--muted);
  font-size: 11px;
}

.filter-chip:hover {
  border-color: #aebfba;
  color: var(--ink);
  background: #eef5f2;
}

.filter-chip.is-active {
  border-color: var(--teal);
  background: #e8f5ef;
  color: var(--teal-strong);
}

.group-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.group-expanded-panel {
  padding: 10px;
  border: 1px solid #c6d8da;
  border-radius: 8px;
  background: #f6fbf9;
}

.row-badges {
  display: grid;
  justify-items: end;
  gap: 6px;
  min-width: 72px;
}

.row-discount {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8f5;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.row-discount.hot,
.row-discount.strong {
  border-color: #e2b7a9;
  background: #fff2ed;
  color: #9f3a28;
}

.row-discount.medium {
  border-color: #d9caa4;
  background: #fff8e8;
  color: #866108;
}

.ledger-titleline h3,
.history-row h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ledger-titleline p,
.history-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.ledger-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 4px;
}

.ledger-facts > div {
  min-width: 0;
  padding: 4px 7px;
  border-left: 2px solid var(--line);
  border-radius: 4px;
  background: transparent;
}

.ledger-facts > .fact-primary {
  border-color: #98c5b8;
  background: transparent;
}

.purchase-condition strong {
  display: grid;
  gap: 2px;
}

.purchase-condition .rate-value,
.purchase-condition .money-value {
  display: block;
}

.purchase-condition .rate-value {
  color: var(--teal-strong);
  font-size: 16px;
}

.purchase-condition .money-value {
  color: var(--ink);
  font-size: 13px;
}

.purchase-mini {
  display: grid;
  gap: 2px;
  text-align: right;
}

.purchase-mini small {
  color: var(--muted);
  font-size: 11px;
}

.volume-date-fact small {
  line-height: 1.35;
}

.ledger-facts span,
.ledger-facts small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.ledger-facts strong {
  display: block;
  margin: 1px 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.rate-value,
.money-value,
.compact-number,
.numeric-fact strong,
.purchase-detail-list dd {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.rate-value {
  font-size: 15px;
}

.money-value {
  white-space: nowrap;
}

.ledger-facts strong .status {
  display: inline-flex;
  color: inherit;
  font-size: 12px;
}

.ledger-detail {
  border-top: 1px solid var(--line);
  padding-top: 5px;
}

.collapsed-diagnostic {
  padding: 14px;
}

.collapsed-diagnostic > summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
}

.tiny-detail {
  margin-top: 4px;
}

.ledger-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ledger-detail-grid h4 {
  margin: 0 0 8px;
  font-size: 13px;
}

.mini-timeline,
.mini-notes {
  display: grid;
  gap: 6px;
}

.group-children {
  display: grid;
  gap: 6px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.group-children-wrap {
  display: grid;
  gap: 8px;
}

.group-children-head {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.group-child {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.group-child strong,
.group-child .inline-title-link,
.group-child small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.group-child small {
  grid-column: 2;
  color: var(--muted);
  font-size: 11px;
}

.mini-cover {
  grid-row: span 2;
  width: 30px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #eef2f3;
  overflow: hidden;
}

.mini-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.purchase-detail-list {
  display: grid;
  gap: 5px;
  margin: 0;
  font-size: 12px;
}

.purchase-detail-list div {
  display: grid;
  grid-template-columns: minmax(84px, 0.8fr) minmax(0, 1.2fr);
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid #eef2ef;
}

.purchase-detail-list dt {
  color: var(--muted);
}

.purchase-detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.mini-event,
.mini-note {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  font-size: 12px;
}

.mini-event span,
.mini-event strong,
.mini-event small,
.mini-note strong,
.mini-note span,
.mini-note small {
  display: block;
  overflow-wrap: anywhere;
}

.mini-event span,
.mini-event small,
.mini-note small {
  color: var(--muted);
}

.note-summary-panel {
  border-color: #c8d9d4;
  background: #f7faf8;
}

.note-history-row {
  align-items: start;
}

.note-chip-row {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.note-chip {
  display: grid;
  grid-template-columns: auto minmax(120px, 0.4fr) minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  font-size: 12px;
}

.note-chip strong {
  color: var(--teal-strong);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.note-chip span,
.note-chip small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.note-chip small {
  color: var(--ink);
}

.note-meta {
  grid-column: 1 / -1;
  display: grid;
  gap: 5px;
}

.note-suggestion {
  padding: 10px;
  border: 1px solid #c8d9d4;
  border-radius: 8px;
  background: #f5faf7;
  color: var(--ink);
  font-size: 12px;
}

.note-suggestion strong,
.note-suggestion small,
.note-suggestion p {
  display: block;
  margin: 0;
  overflow-wrap: anywhere;
}

.note-suggestion small {
  margin-top: 3px;
  color: var(--muted);
}

.note-suggestion p {
  margin-top: 6px;
  line-height: 1.5;
}

.rating-history {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.rating-history span {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.more-note {
  display: inline-block;
  color: var(--muted);
}

.inline-detail {
  margin-top: 8px;
}

.muted-event,
.muted-history {
  background: #f6f8f8;
  color: #526167;
}

.compact-empty {
  padding: 10px;
  font-size: 12px;
}

.compact-ledger {
  gap: 8px;
}

.history-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  content-visibility: auto;
  contain-intrinsic-size: 78px;
}

.reading-day-group {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  content-visibility: auto;
  contain-intrinsic-size: 280px;
}

.reading-day-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 0 2px;
  color: var(--muted);
  font-size: 12px;
}

.reading-day-head strong {
  color: var(--ink);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.reading-day-head .inline-title-link {
  font-size: inherit;
  font-weight: 800;
}

.reading-history-row {
  grid-template-columns: 150px minmax(0, 1fr) 86px;
}

.reading-session-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fbfcfb;
}

.reading-session-line {
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  min-height: 28px;
  padding: 5px 8px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.reading-session-line.with-title {
  grid-template-columns: 176px minmax(180px, 0.9fr) minmax(0, 1fr) auto;
}

.reading-session-title {
  font-size: 12px;
  line-height: 1.35;
}

.subtle-store-line {
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.reading-session-line:last-child {
  border-bottom: 0;
}

.reading-session-main {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.reading-row-actions {
  display: inline-flex;
  justify-content: flex-end;
  gap: 5px;
}

.reading-group-actions {
  position: relative;
  justify-self: end;
}

.reading-group-actions > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  list-style: none;
  min-width: 28px;
  min-height: 24px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  text-align: center;
}

.reading-group-actions > summary::-webkit-details-marker {
  display: none;
}

.reading-group-actions > div,
.reading-detail-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.reading-line-detail {
  color: var(--muted);
  font-size: 11px;
}

.tiny-chip {
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.tiny-chip:hover {
  border-color: #aebfba;
  color: var(--ink);
  background: #eef5f2;
}

.small-dialog {
  max-width: min(560px, calc(100vw - 32px));
}

.sale-watch-row .ledger-facts {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.cart-watch-panel {
  margin: 0 0 12px;
}

.cart-watch-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
}

.cart-watch-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.cart-watch-item .library-cover {
  width: 44px;
  height: 60px;
}

.cart-watch-item strong {
  display: block;
  min-width: 0;
  font-size: 13px;
  line-height: 1.35;
}

.cart-watch-item p,
.cart-watch-item small {
  display: block;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.sale-compact-row .library-cover,
.sale-compact-row .fact-primary {
  display: none;
}

.reading-calendar-month {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.calendar-month-head {
  grid-template-columns: minmax(0, 1fr) auto;
}

.reading-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.calendar-weekday {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.calendar-cell {
  min-height: 64px;
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faf8;
  color: var(--ink);
  text-align: left;
}

.calendar-cell:disabled {
  cursor: default;
  color: #aab4b7;
  background: #f1f4f2;
}

.calendar-cell span {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.calendar-cell strong {
  font-size: 12px;
}

.calendar-cell small {
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.calendar-cell.heat-1 { background: #edf7f3; border-color: #c8ded5; }
.calendar-cell.heat-2 { background: #dff1e9; border-color: #a9d0c0; }
.calendar-cell.heat-3 { background: #d2e8f1; border-color: #95bfd0; }
.calendar-cell.heat-4 { background: #f2e7c7; border-color: #dac373; }

.reading-session-line > .inline-detail {
  grid-column: 1 / -1;
}

.compact-breakdown {
  margin: 0 0 8px;
}

.compact-chip-row {
  margin-top: 6px;
}

.history-time {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.score-badge {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid #d7c68b;
  border-radius: 8px;
  background: #fff8df;
  color: #795300;
  font-weight: 800;
}

.score-badge strong,
.score-badge small {
  display: block;
  line-height: 1;
}

.score-badge small {
  margin-top: 3px;
  font-size: 10px;
  font-weight: 700;
  color: #9a6b00;
}

.external-cover span {
  padding: 8px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.external-body {
  min-width: 0;
}

.external-store {
  color: var(--teal-strong);
  font-size: 12px;
  font-weight: 750;
}

.external-card h4 {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.external-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.campaign-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.campaign-tag {
  display: inline-flex;
  max-width: 100%;
  padding: 3px 7px;
  border: 1px solid #cfd8e5;
  border-radius: 6px;
  color: #465365;
  background: #f8fafc;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.chip-button {
  min-height: 30px;
  padding: 0 10px;
  background: #eef2f7;
  color: #465365;
}

.chip-button:hover {
  background: #dfe7f0;
}

.primary,
.secondary {
  padding: 0 14px;
}

.primary {
  background: var(--teal);
  color: white;
}

.secondary {
  background: #eef2f7;
  color: var(--ink);
}

.list-stack {
  display: grid;
  gap: 10px;
}

.list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.quality-list,
.compact-list {
  display: grid;
  gap: 8px;
}

.quality-row,
.compact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.compact-row {
  grid-template-columns: 154px minmax(0, 1fr) auto;
  width: 100%;
  color: inherit;
  text-align: left;
}

.compact-row:hover {
  border-color: #b9c8c4;
  background: #f7fbfa;
}

.compact-row strong,
.compact-row small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.compact-row small,
.compact-date {
  color: var(--muted);
  font-size: 12px;
}

.timeline-table table {
  min-width: 1020px;
}

details summary {
  cursor: pointer;
  color: var(--teal-strong);
  font-weight: 700;
}

details[open] summary {
  margin-bottom: 6px;
}

.detail-block {
  margin-top: 12px;
}

.bars {
  display: grid;
  gap: 8px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) minmax(90px, 1fr) 64px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.bar {
  height: 10px;
  border-radius: 999px;
  background: #e6ebf2;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--blue);
}

.notice {
  padding: 12px;
  border: 1px solid #f2d48c;
  border-radius: 8px;
  background: #fff8e8;
  color: #6b4b0f;
}

dialog {
  border: 0;
  padding: 0;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
  width: min(640px, calc(100vw - 28px));
}

dialog::backdrop {
  background: rgba(21, 28, 38, 0.45);
}

.dialog-panel {
  padding: 18px;
  background: var(--panel);
  display: grid;
  gap: 12px;
}

.dialog-head,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dialog-head h3 {
  margin: 0;
  font-size: 18px;
}

label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.pagination-controls .page-jump span,
.pagination-controls .page-jump small {
  display: inline;
  margin: 0;
}

textarea,
label input,
label select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  outline: 0;
}

label.toggle-field input {
  width: auto;
  padding: 0;
}

.pagination-controls .page-jump input {
  width: 72px;
  min-height: 34px;
  padding: 4px 8px;
}

textarea:focus,
label input:focus,
label select:focus,
.search:focus-within {
  border-color: var(--teal);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.55);
}

html.android-readingjournal body {
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

html.android-readingjournal .ledger-row,
html.android-readingjournal .cover-tile,
html.android-readingjournal .history-row,
html.android-readingjournal .reading-day-group {
  content-visibility: visible;
  contain-intrinsic-size: auto;
}

html.android-readingjournal .app-shell {
  display: flex;
  flex-direction: column;
  align-items: start;
  min-height: 100dvh;
}

html.android-readingjournal .sidebar {
  position: sticky;
  top: 0;
  z-index: 5;
  align-self: start;
  flex: 0 0 auto;
  width: 100%;
  height: auto;
  padding: 10px 16px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: center;
}

html.android-readingjournal .brand {
  min-width: 0;
}

html.android-readingjournal .brand-mark {
  width: 38px;
  height: 38px;
}

html.android-readingjournal .brand h1 {
  font-size: 18px;
  line-height: 1.15;
}

html.android-readingjournal .brand p {
  display: none;
}

html.android-readingjournal .tabs {
  grid-template-columns: repeat(4, minmax(108px, 1fr));
  gap: 6px;
  min-width: 0;
}

html.android-readingjournal .tab {
  min-height: 40px;
  padding: 7px 9px;
  justify-content: center;
  white-space: nowrap;
  min-width: 0;
}

html.android-readingjournal .sync-box {
  grid-column: auto;
  justify-self: end;
  margin: 0;
  min-height: 0;
  padding: 7px 9px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  max-width: min(34vw, 360px);
  overflow: hidden;
}

html.android-readingjournal .sync-title {
  font-size: 11px;
}

html.android-readingjournal .sync-meta {
  margin: 0;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.android-readingjournal .main {
  flex: 1 1 auto;
  padding: 16px clamp(14px, 2.4vw, 28px);
  width: 100%;
  min-width: 0;
}

html.android-readingjournal .metric-grid,
html.android-readingjournal .home-metrics,
html.android-readingjournal .store-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

html.android-readingjournal .topbar {
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: minmax(84px, auto) minmax(0, 1fr);
  align-items: center;
}

html.android-readingjournal .topbar h2 {
  white-space: nowrap;
}

html.android-readingjournal .topbar-update,
html.android-readingjournal .update-panel,
html.android-readingjournal .compat-panel {
  display: none !important;
}

html.android-readingjournal .toolbar {
  width: 100%;
}

html.android-readingjournal .search {
  flex: 1 1 260px;
}

html.android-readingjournal .history-nav {
  display: inline-flex;
}

html.android-readingjournal .ledger-controls {
  gap: 8px;
  padding: 10px;
}

html.android-readingjournal .segmented {
  max-width: 100%;
  overflow-x: auto;
}

html.android-readingjournal .segmented span {
  min-width: 60px;
  min-height: 42px;
}

html.android-readingjournal .control-field {
  min-width: min(230px, 100%);
  flex: 1 1 220px;
}

html.android-readingjournal .multi-filter {
  flex: 1 1 260px;
  min-width: min(260px, 100%);
}

html.android-readingjournal .filter-panel {
  flex: 1 1 100%;
  min-width: 100%;
}

html.android-readingjournal .filter-check {
  min-height: 32px;
  padding: 4px 8px;
}

html.android-readingjournal .toggle-field {
  flex: 1 1 260px;
  min-height: 42px;
}

html.android-readingjournal .pagination-controls {
  gap: 7px;
}

html.android-readingjournal .page-icon {
  display: none;
}

html.android-readingjournal .spine-shelf {
  gap: 5px;
  padding: 10px;
}

html.android-readingjournal .spine-book {
  width: 32px;
  height: 304px;
}

html.android-readingjournal .history-row {
  grid-template-columns: 148px minmax(0, 1fr);
}

html.android-readingjournal .history-row > .status {
  grid-column: 1 / -1;
  justify-self: start;
}

@media (orientation: portrait) and (max-width: 1300px) {
  html.android-readingjournal body {
    overflow-x: hidden;
  }

  html.android-readingjournal .sidebar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  html.android-readingjournal .tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }

  html.android-readingjournal .sync-box {
    max-width: 300px;
  }

  html.android-readingjournal .main {
    overflow-x: hidden;
    padding: 14px;
  }

  html.android-readingjournal .topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  html.android-readingjournal .toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    align-items: center;
  }

  html.android-readingjournal .search {
    width: 100%;
    min-width: 0;
  }

  html.android-readingjournal .ledger-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
  }

  html.android-readingjournal .ledger-controls .segmented,
  html.android-readingjournal .ledger-controls .toggle-field,
  html.android-readingjournal .ledger-controls .filter-panel {
    grid-column: 1 / -1;
  }

  html.android-readingjournal .control-field {
    min-width: 0;
    width: 100%;
  }

  html.android-readingjournal .multi-filter {
    min-width: 0;
    width: 100%;
  }

  html.android-readingjournal .pagination-controls {
    justify-content: flex-start;
  }

  html.android-readingjournal .ledger-row {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
  }

  html.android-readingjournal .library-cover {
    width: 112px;
  }

  html.android-readingjournal .ledger-titleline {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  html.android-readingjournal .row-badges {
    justify-items: start;
  }

  html.android-readingjournal .ledger-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html.android-readingjournal .ledger-compact-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

html.ios-readingjournal,
html.ios-readingjournal body {
  min-height: 100%;
  background: var(--page);
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 700px) {
  html.ios-readingjournal .app-shell {
    display: block;
    min-height: 100dvh;
  }

  html.ios-readingjournal .sidebar {
    position: fixed;
    inset: auto 0 0;
    z-index: 40;
    width: 100%;
    height: auto;
    padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(32, 40, 43, 0.97);
    backdrop-filter: blur(18px);
  }

  html.ios-readingjournal .brand,
  html.ios-readingjournal .sync-box {
    display: none;
  }

  html.ios-readingjournal .tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
  }

  html.ios-readingjournal .tab {
    min-width: 0;
    min-height: 48px;
    padding: 4px 2px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    border-radius: 6px;
    color: #c9d2d4;
    font-size: 10px;
    line-height: 1;
  }

  html.ios-readingjournal .tab svg {
    width: 19px;
    height: 19px;
  }

  html.ios-readingjournal .tab.is-active {
    background: rgba(255, 255, 255, 0.09);
    box-shadow: inset 0 2px #f4b84a;
    color: #fff;
  }

  html.ios-readingjournal .main {
    width: 100%;
    min-width: 0;
    padding: calc(8px + env(safe-area-inset-top)) 9px calc(66px + env(safe-area-inset-bottom));
  }

  html.ios-readingjournal .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    margin: 0 0 8px;
  }

  html.ios-readingjournal .topbar h2 {
    font-size: 21px;
    line-height: 1.15;
  }

  html.ios-readingjournal .topbar p {
    display: none;
  }

  html.ios-readingjournal .toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px 34px 34px;
    gap: 5px;
    width: 100%;
  }

  html.ios-readingjournal .search {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: 0 9px;
  }

  html.ios-readingjournal .search input {
    min-width: 0;
    font-size: 14px;
  }

  html.ios-readingjournal .icon-button {
    width: 34px;
    min-height: 34px;
    color: #425057;
  }

  html.ios-readingjournal .icon-button svg {
    display: block;
    width: 18px;
    height: 18px;
    stroke: #425057 !important;
    stroke-width: 2.5px;
  }

  html.ios-readingjournal #historyBackButton svg,
  html.ios-readingjournal #historyForwardButton svg,
  html.ios-readingjournal #refreshButton svg {
    display: none !important;
  }

  html.ios-readingjournal #historyBackButton::before,
  html.ios-readingjournal #historyForwardButton::before,
  html.ios-readingjournal #refreshButton::before {
    display: block;
    color: #425057;
    font-weight: 700;
    line-height: 1;
  }

  html.ios-readingjournal #historyBackButton::before {
    content: "\2039";
    font-size: 25px;
  }

  html.ios-readingjournal #historyForwardButton::before {
    content: "\203A";
    font-size: 25px;
  }

  html.ios-readingjournal #refreshButton::before {
    content: "\21BB";
    font-size: 20px;
  }

  html.ios-readingjournal .ledger-header {
    gap: 5px;
    margin-bottom: 7px;
  }

  html.ios-readingjournal .ledger-header h3 {
    font-size: 17px;
  }

  html.ios-readingjournal .ledger-header p {
    display: none;
  }

  html.ios-readingjournal .ledger-store-counts {
    gap: 4px;
  }

  html.ios-readingjournal .ledger-controls {
    display: flex;
    flex-wrap: nowrap;
    align-items: end;
    gap: 5px;
    margin: 0 -9px 7px;
    padding: 6px 9px;
    overflow-x: auto;
    scroll-padding-inline: 9px;
    -webkit-overflow-scrolling: touch;
  }

  html.ios-readingjournal .ledger-controls > * {
    flex: 0 0 auto;
  }

  html.ios-readingjournal .control-field,
  html.ios-readingjournal .multi-filter {
    width: 154px;
    min-width: 154px;
  }

  html.ios-readingjournal .control-field select,
  html.ios-readingjournal .control-field input {
    min-height: 34px;
    padding: 5px 27px 5px 8px;
    font-size: 13px;
  }

  html.ios-readingjournal .segmented {
    flex-wrap: nowrap;
  }

  html.ios-readingjournal .segmented span {
    min-width: 52px;
    min-height: 34px;
    padding: 5px 7px;
    white-space: nowrap;
  }

  html.ios-readingjournal .filter-panel {
    margin-bottom: 7px;
  }

  html.ios-readingjournal .ledger-list,
  html.ios-readingjournal .compact-ledger {
    gap: 5px;
  }

  html.ios-readingjournal .ledger-row {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 8px;
    padding: 7px;
  }

  html.ios-readingjournal .library-cover {
    width: 58px;
  }

  html.ios-readingjournal .library-cover span {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    padding: 4px;
    overflow: hidden;
    color: #64747b;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.ios-readingjournal .ledger-titleline h3,
  html.ios-readingjournal .history-row h3 {
    font-size: 14px;
    line-height: 1.28;
  }

  html.ios-readingjournal .ledger-titleline p,
  html.ios-readingjournal .history-row p {
    margin-top: 2px;
    font-size: 10px;
  }

  html.ios-readingjournal .ledger-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  html.ios-readingjournal .ledger-facts > div {
    padding: 6px;
  }

  html.ios-readingjournal .ledger-facts strong {
    font-size: 13px;
  }

  html.ios-readingjournal .status,
  html.ios-readingjournal .chip,
  html.ios-readingjournal .tiny-chip {
    min-height: 24px;
    font-size: 10px;
  }

  html.ios-readingjournal .reading-session-line,
  html.ios-readingjournal .reading-session-line.with-title {
    grid-template-columns: 104px minmax(0, 1fr) auto;
    gap: 5px;
    padding: 5px 4px;
  }

  html.ios-readingjournal .reading-session-line.with-title .reading-session-main {
    grid-column: 2;
  }

  html.ios-readingjournal .reading-session-title {
    grid-column: 2;
  }

  html.ios-readingjournal .reading-row-actions {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
  }

  html.ios-readingjournal .history-time,
  html.ios-readingjournal .reading-session-main {
    font-size: 10px;
  }

  html.ios-readingjournal .pagination-controls {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto 38px;
    gap: 5px;
    width: 100%;
    justify-content: stretch;
  }

  html.ios-readingjournal .pagination-controls .page-nav {
    width: 38px;
    min-width: 38px;
    min-height: 34px;
    padding: 0;
  }

  html.ios-readingjournal .pagination-controls > span {
    align-self: center;
    font-size: 10px;
    white-space: nowrap;
  }

  html.ios-readingjournal .page-numbers {
    min-width: 0;
    gap: 3px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  html.ios-readingjournal .page-number {
    min-width: 32px;
    min-height: 34px;
    padding: 0 7px;
  }

  html.ios-readingjournal dialog {
    width: calc(100vw - 18px);
    max-height: calc(100dvh - 24px);
    margin: auto;
  }

  html.ios-readingjournal .dialog-panel {
    padding: 14px;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .tabs {
    grid-template-columns: repeat(3, 1fr);
  }

  .metric-grid,
  .home-metrics,
  .home-grid,
  .ledger-header,
  .ledger-facts,
  .ledger-detail-grid,
  .store-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .ledger-header {
    display: grid;
  }

  .ledger-store-counts {
    justify-content: flex-start;
    min-width: 0;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search {
    width: 100%;
  }

  .compact-row {
    grid-template-columns: 1fr;
  }

  .ledger-compact-row {
    grid-template-columns: 1fr;
  }

  .note-chip {
    grid-template-columns: 1fr;
  }

  .ledger-controls {
    align-items: stretch;
  }

  .pagination-controls {
    justify-content: flex-start;
  }

  .control-field {
    min-width: min(190px, 100%);
  }

  .quiet-panel {
    grid-template-columns: 1fr;
  }

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

  .spine-book {
    height: 304px;
  }
}

@media (max-width: 560px) {
  .main {
    padding: 16px;
  }

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

  .toolbar {
    align-items: stretch;
  }

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

  .external-card {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .external-cover {
    width: 58px;
  }

  .ledger-row,
  .history-row {
    grid-template-columns: 1fr;
  }

  .library-cover {
    width: 74px;
  }

  .ledger-titleline {
    display: grid;
  }

  .row-badges {
    justify-items: start;
  }

  .spine-book {
    height: 304px;
    width: 30px;
  }

  html.android-readingjournal .sidebar {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  html.android-readingjournal .tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html.android-readingjournal .metric-grid,
  html.android-readingjournal .home-metrics,
  html.android-readingjournal .store-metrics {
    grid-template-columns: 1fr;
  }

  html.android-readingjournal .sync-box {
    display: grid;
    gap: 3px;
  }

  html.android-readingjournal .topbar {
    gap: 10px;
  }

  html.android-readingjournal .spine-book {
    width: 30px;
    height: 304px;
  }

  html.android-readingjournal .history-row {
    grid-template-columns: 1fr;
  }
}

html.android-readingjournal .main {
  padding-top: 10px;
}

html.android-readingjournal .topbar {
  margin-bottom: 8px;
}

html.android-readingjournal .sidebar {
  gap: 10px;
  padding: 12px 14px 10px;
}

html.android-readingjournal .brand-mark {
  width: 36px;
  height: 36px;
}

html.android-readingjournal .brand h1 {
  font-size: 16px;
}

html.android-readingjournal .brand p {
  display: none;
}

html.android-readingjournal .tab {
  min-height: 34px;
  padding: 6px 8px;
  justify-content: center;
}

html.android-readingjournal .sync-box {
  padding: 7px 9px;
}

html.android-readingjournal .topbar h2 {
  font-size: 22px;
  line-height: 1.15;
}

html.android-readingjournal .topbar p {
  display: none;
}

html.android-readingjournal .panel,
html.android-readingjournal .band {
  padding: 11px;
  margin-bottom: 10px;
}

html.android-readingjournal .panel-head {
  margin-bottom: 8px;
}

html.android-readingjournal .metric-grid {
  margin-bottom: 10px;
}

html.android-readingjournal .metric {
  padding: 10px;
}

html.android-readingjournal .metric .value {
  margin-top: 5px;
  font-size: 24px;
}

html.android-readingjournal .metric .sub {
  margin-top: 5px;
}

html.android-readingjournal .ledger-controls {
  gap: 6px;
  padding: 7px;
}

html.android-readingjournal .control-field {
  flex-basis: 188px;
}

html.android-readingjournal .control-field span {
  font-size: 10px;
}

html.android-readingjournal .control-field select,
html.android-readingjournal .control-field input {
  min-height: 34px;
  padding: 6px 28px 6px 9px;
  font-size: 14px;
}

html.android-readingjournal .segmented span {
  min-height: 34px;
  padding: 5px 8px;
}

html.android-readingjournal .compact-action {
  min-height: 34px;
}

html.android-readingjournal .pagination-controls {
  margin: 6px 0;
  gap: 5px;
  font-size: 12px;
}

html.android-readingjournal .page-nav {
  min-width: 58px;
}

html.android-readingjournal .page-number {
  min-width: 30px;
  min-height: 30px;
  padding: 0 7px;
}

html.android-readingjournal .ledger-list,
html.android-readingjournal .compact-ledger {
  gap: 6px;
}

html.android-readingjournal .ledger-row {
  padding: 8px;
  gap: 10px;
}

html.android-readingjournal .ledger-main {
  gap: 7px;
}

html.android-readingjournal .ledger-titleline h3,
html.android-readingjournal .history-row h3 {
  font-size: 14px;
  line-height: 1.28;
}

html.android-readingjournal .ledger-titleline p,
html.android-readingjournal .history-row p {
  margin-top: 2px;
  font-size: 11px;
}

html.android-readingjournal .ledger-facts {
  gap: 5px;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

html.android-readingjournal .fact,
html.android-readingjournal .ledger-facts > div {
  min-width: 0;
}

html.android-readingjournal .status,
html.android-readingjournal .chip {
  min-height: 21px;
  padding: 2px 7px;
  font-size: 11px;
}

html.android-readingjournal .row-discount,
html.android-readingjournal .discount-badge {
  font-variant-numeric: tabular-nums;
}

html.android-readingjournal .history-row {
  gap: 8px;
  padding: 8px;
}

html.android-readingjournal .reading-history-row {
  grid-template-columns: 132px minmax(0, 1fr) 70px;
}

html.android-readingjournal .reading-session-list {
  gap: 0;
}

html.android-readingjournal .reading-session-line {
  grid-template-columns: 148px minmax(0, 1fr) auto;
  gap: 7px;
  min-height: 24px;
  padding: 4px 7px;
}

html.android-readingjournal .reading-session-line.with-title {
  grid-template-columns: 132px minmax(130px, 0.9fr) minmax(0, 1fr) auto;
}

html.android-readingjournal .reading-session-main {
  font-size: 11px;
}

html.android-readingjournal .reading-row-actions {
  align-self: center;
}

html.android-readingjournal .reading-day-group {
  gap: 4px;
  margin-bottom: 9px;
  padding-bottom: 8px;
}

html.android-readingjournal .reading-day-head {
  font-size: 11px;
}

html.android-readingjournal .history-time {
  font-size: 11px;
  line-height: 1.35;
}

html.android-readingjournal .filter-chip-row {
  gap: 4px;
  margin-top: 4px;
}

html.android-readingjournal .filter-chip {
  min-height: 22px;
  padding: 2px 7px;
}

@media (orientation: portrait) and (max-width: 1300px) {
  html.android-readingjournal .main {
    padding: 10px;
  }

  html.android-readingjournal .ledger-row {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  html.android-readingjournal .library-cover {
    width: 72px;
  }

  html.android-readingjournal .ledger-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html.android-readingjournal .reading-session-line {
    grid-template-columns: minmax(118px, 0.85fr) minmax(0, 1.15fr);
    gap: 6px;
  }

  html.android-readingjournal .reading-session-line.with-title {
    grid-template-columns: minmax(112px, 0.75fr) minmax(0, 1.2fr);
  }

  html.android-readingjournal .reading-session-line.with-title .reading-session-main {
    grid-column: 2;
  }

  html.android-readingjournal .reading-day-head {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  html.android-readingjournal .reading-day-head .tiny-chip {
    justify-self: end;
  }

  html.android-readingjournal .reading-session-line .tiny-detail {
    grid-column: 1 / -1;
  }
}
