@charset "UTF-8";
:root {
  font-family: Inter, "Segoe UI", "Yu Gothic UI", Meiryo, sans-serif;
  color: #33362f;
  background: #f6f5f0;
  font-synthesis: none;
  --ink: #30372e;
  --muted: #85877d;
  --line: #e1e1d8;
  --accent: #927347;
  --green: #455440;
  --paper: #fffefa;
  --sidebar: 235px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
button {
  color: inherit;
}
svg {
  vertical-align: middle;
}
button,
input,
select,
textarea {
  border-radius: 5px;
}
input,
select,
textarea {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 10px 12px;
  min-width: 0;
  color: var(--ink);
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #b5bcaa;
}
select {
  cursor: pointer;
}
textarea {
  resize: vertical;
}
.sidebar {
  width: var(--sidebar);
  position: fixed;
  inset: 0 auto 0 0;
  background: #2c322c;
  color: #dfdfd0;
  padding: 34px 21px 20px;
  display: flex;
  flex-direction: column;
  z-index: 5;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 10px;
  letter-spacing: 1.1px;
  line-height: 1.6;
  margin-bottom: 54px;
}
.brand small {
  display: block;
  font-size: 9px;
  color: #acb09f;
  letter-spacing: 1.7px;
}
.brand-mark {
  font:
    27px Georgia,
    serif;
  border: 1px solid #8e927d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 49px;
  flex-shrink: 0;
  position: relative;
}
.brand-mark span {
  font-size: 40px;
  position: absolute;
  opacity: 0.4;
  transform: rotate(14deg);
}
.sidebar-label {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: #a0a693;
  margin: 0 12px 14px;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sidebar nav a,
.collection-link {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  border-radius: 4px;
  transition: 0.15s;
}
.sidebar nav a:hover,
.collection-link:hover {
  background: #383f35;
}
.sidebar nav a.active {
  background: #454e3e;
  color: #fcfbeb;
}
.sidebar nav a > span:first-child {
  font-size: 21px;
  width: 20px;
  line-height: 1;
}
.nav-count {
  margin-left: auto;
  color: #c8ccbc;
  font-size: 10px;
}
.collection-label {
  margin-top: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.icon-button {
  background: transparent;
  border: 0;
  color: inherit;
  padding: 4px 8px;
  font-size: 19px;
}
.collection-link {
  color: #bfc5b2;
  font-size: 11px;
}
.collection-link:before {
  content: "◦";
  font-size: 22px;
  color: #919b80;
}
.sidebar-note {
  margin-top: auto;
  padding: 40px 12px 22px;
}
.small-caps {
  font-size: 9px;
  letter-spacing: 1.9px;
  color: #9ca38e;
}
.sidebar-note p {
  font-family: Georgia, "Yu Mincho", serif;
  font-size: 15px;
  line-height: 1.8;
  color: #c6cbbb;
}
.sidebar-note small {
  font-size: 10px;
  color: #838e78;
}
.stitch {
  border-bottom: 1px dashed #64705e;
  width: 40px;
  margin: 20px 0;
}
.settings-button {
  border: 0;
  border-top: 1px solid #424b3e;
  background: none;
  color: #aeb6a2;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  padding: 20px 12px 0;
}
.connection-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #bc9a60;
  margin-left: auto;
}
.connection-dot.enabled {
  background: #97b086;
}
.workspace {
  margin-left: var(--sidebar);
  min-height: 100vh;
}
.topbar {
  height: 83px;
  border-bottom: 1px solid var(--line);
  padding: 0 38px;
  display: flex;
  gap: 28px;
  align-items: center;
  background: #fafaf6;
}
.breadcrumb {
  font-size: 9px;
  letter-spacing: 1.5px;
  white-space: nowrap;
}
.breadcrumb span {
  color: #bbbdaf;
  margin: 0 14px;
}
.breadcrumb strong {
  font-weight: 500;
  color: #717969;
  letter-spacing: 0;
  font-size: 11px;
}
.global-search {
  margin-left: auto;
  max-width: 365px;
  display: flex;
  gap: 9px;
  align-items: center;
  color: #777d70;
  width: 35%;
}
.global-search > span {
  font-size: 24px;
}
.global-search input {
  width: 100%;
  border: 0;
  background: transparent;
  font-size: 11px;
  padding: 10px 0;
}
.global-search kbd {
  border: 1px solid var(--line);
  color: #999f91;
  font-size: 12px;
  padding: 2px 5px;
}
.button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 11px 17px;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  transition: 0.15s;
}
.button:hover {
  border-color: #a5ad98;
  background: #f0f1e9;
}
.button.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.button.primary:hover {
  background: #354531;
}
.button.compact {
  font-size: 11px;
  padding: 10px 15px;
}
.button.subtle {
  background: transparent;
  border-color: transparent;
  color: #78816e;
}
.content {
  padding: 40px 40px 60px;
  max-width: 1630px;
  margin: auto;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 2.3px;
  color: #9b8968;
  font-weight: 600;
  text-transform: uppercase;
}
.page-heading {
  display: flex;
  gap: 24px;
  align-items: flex-end;
  justify-content: space-between;
  margin: 10px 0 29px;
}
.page-heading h1 {
  font:
    39px/1.15 Georgia,
    "Yu Mincho",
    serif;
  color: #363c31;
  margin: 10px 0 15px;
  font-weight: 400;
  letter-spacing: -0.6px;
}
.page-heading p {
  font-size: 12px;
  line-height: 1.9;
  color: #85877b;
  margin: 0;
}
.index-number {
  font:
    italic 50px Georgia,
    serif;
  color: #d2d4c6;
  margin-bottom: 4px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  background: #fafbf5;
  margin: 28px 0 33px;
}
.stat {
  padding: 20px 26px;
  border-right: 1px solid var(--line);
}
.stat:last-child {
  border-right: 0;
}
.stat-value {
  font:
    28px Georgia,
    serif;
  color: #49503d;
  line-height: 1.2;
}
.stat-label {
  font-size: 10px;
  color: #8a907d;
  margin-top: 8px;
  letter-spacing: 0.6px;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.toolbar-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
  margin-right: 14px;
}
.filter {
  font-size: 10px;
  padding: 7px 11px;
  background: transparent;
  border: 1px solid transparent;
  color: #8a8c7f;
}
.filter.active {
  border-color: #d8ddcb;
  background: #e9eddf;
  color: #566548;
}
.toolbar select {
  padding: 7px 9px;
  font-size: 11px;
  margin-left: auto;
}
.small-muted {
  font-size: 10px;
  color: #8b9280;
  line-height: 1.8;
}
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 30px 25px;
}
.book-card {
  min-width: 0;
  position: relative;
}
.book-image {
  height: 268px;
  background: #eeeee5;
  border: 1px solid #e3e5d8;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: 0.2s;
}
.book-card:hover .book-image {
  background: #e9ebdf;
}
.book-image img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  box-shadow: 3px 6px 12px #31382628;
}
.book-placeholder {
  height: 100%;
  width: 150px;
  background: #6f7561;
  box-shadow: 3px 6px 12px #31382628;
  color: #efeee0;
  padding: 24px 20px;
  font:
    23px Georgia,
    serif;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  text-align: center;
  border-left: 7px solid #5a604f;
}
.book-placeholder small {
  font: 8px sans-serif;
  letter-spacing: 1px;
  line-height: 1.8;
}
.book-number {
  position: absolute;
  top: 12px;
  left: 13px;
  font-size: 9px;
  color: #9da38f;
  letter-spacing: 1px;
}
.book-card h3 {
  font:
    19px/1.5 Georgia,
    "Yu Mincho",
    serif;
  margin: 15px 0 6px;
  overflow-wrap: anywhere;
  color: #424939;
}
.book-meta {
  font-size: 10px;
  color: #919681;
  margin-bottom: 11px;
}
.tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.tag {
  border: 1px solid #dfe3d3;
  background: #f1f4e9;
  padding: 4px 7px;
  font-size: 9px;
  border-radius: 3px;
  color: #778269;
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.tag.gold {
  color: #9a7b42;
  background: #f5efdf;
  border-color: #e8ddc5;
}
.tag.neutral {
  color: #818579;
  background: #f4f4ef;
  border-color: #e0e0d8;
}
.tag.fact {
  color: #4e7156;
  background: #edf2e9;
}
.tag.inference {
  color: #a17448;
  background: #fbf0df;
}
.status {
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #7c8b68;
  margin-top: 10px;
  line-height: 1.6;
}
.status.warn {
  color: #a2844f;
}
.status.failed {
  color: #a65042;
}
.status:before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.book-card progress {
  width: 100%;
  height: 3px;
  margin-top: 8px;
  accent-color: #7c8b65;
}
.upload-tile {
  border: 1px dashed #cbd1be;
  min-height: 268px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #f2f4eb;
  color: #7e8970;
  text-align: center;
  padding: 20px;
}
.upload-tile:hover {
  background: #e9ede0;
}
.upload-tile strong {
  font-size: 12px;
  font-weight: 500;
}
.upload-tile .plus {
  font: 35px Georgia;
  color: #9ca98c;
}
.empty {
  text-align: center;
  padding: 65px 24px;
  color: #8a9380;
  font-size: 13px;
  line-height: 2;
}
.empty h2 {
  font:
    26px Georgia,
    "Yu Mincho",
    serif;
  color: #57654b;
}
.empty p {
  margin-bottom: 24px;
}
.empty-symbol {
  font-size: 46px;
  color: #a6af98;
}
.library-foot {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding-top: 17px;
  font-size: 9px;
  color: #979d8c;
  letter-spacing: 0.5px;
}
.notice {
  border: 1px solid #e6dfc9;
  background: #f7f3e8;
  padding: 12px 15px;
  font-size: 11px;
  line-height: 1.8;
  color: #8e7a52;
  border-radius: 4px;
  margin: 12px 0;
}
.notice.error {
  background: #fcf0ea;
  border-color: #ebd4c8;
  color: #a15d4a;
}
.search-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 25px 0 15px;
}
.search-controls input {
  flex: 1;
  min-width: 160px;
}
.search-controls select {
  font-size: 11px;
}
.result-count {
  font-size: 11px;
  color: #858f77;
  margin: 20px 0;
}
.results {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.result {
  display: flex;
  gap: 22px;
  padding: 20px;
  background: #fffefa;
  border: 1px solid var(--line);
  text-align: left;
  border-radius: 5px;
}
.result img {
  width: 83px;
  height: 110px;
  object-fit: contain;
  background: #eeefe7;
  flex-shrink: 0;
}
.result-body {
  min-width: 0;
}
.result h3 {
  font:
    19px Georgia,
    "Yu Mincho",
    serif;
  margin: 2px 0 8px;
}
.result p {
  font-size: 12px;
  line-height: 1.9;
  color: #7a8370;
  margin: 10px 0;
  white-space: pre-wrap;
}
.page-link {
  font-size: 10px;
  color: #8d754e;
  border-bottom: 1px solid #cdbb9a;
  cursor: pointer;
  background: none;
  padding: 2px 0;
  border-radius: 0;
  border-top: 0;
  border-left: 0;
  border-right: 0;
}
.reader-shell {
  height: calc(100vh - 83px);
  display: flex;
  flex-direction: column;
}
.reader-header {
  height: 77px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 25px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
  background: #fafaf5;
}
.reader-title {
  min-width: 0;
}
.reader-title h1 {
  font:
    21px Georgia,
    "Yu Mincho",
    serif;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 3px 0 6px;
}
.reader-title small {
  font-size: 10px;
  color: #939982;
}
.reader-actions {
  display: flex;
  gap: 6px;
}
.reader-grid {
  display: grid;
  grid-template-columns: 205px minmax(220px, 1fr) 340px;
  flex: 1;
  min-height: 0;
}
.toc-panel {
  padding: 22px 14px;
  border-right: 1px solid var(--line);
  overflow: auto;
  background: #f5f6ef;
}
.panel-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #79876b;
  display: flex;
  justify-content: space-between;
  margin: 0 4px 20px;
}
.toc-item {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  border: 0;
  border-bottom: 1px solid #e7e9de;
  background: transparent;
  width: 100%;
  text-align: left;
  padding: 12px 8px;
  font-size: 10px;
  color: #828d73;
  line-height: 1.7;
}
.toc-item.active {
  background: #e6ebdc;
  color: #4d633c;
}
.toc-item.level-2 {
  padding-left: 20px;
}
.toc-item.level-3 {
  padding-left: 28px;
}
.toc-item span {
  color: #9aa48d;
  white-space: nowrap;
}
.toc-source {
  font-size: 9px;
  color: #a7ac9d;
  margin: 17px 7px;
  line-height: 1.7;
}
.page-viewer {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #e9eae1;
}
.page-tools {
  height: 49px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-bottom: 1px solid #daddce;
  background: #eff1e6;
  flex-shrink: 0;
}
.page-tools button {
  border: 0;
  background: transparent;
  color: #657755;
  font-size: 15px;
  padding: 4px 10px;
}
.page-tools input {
  width: 52px;
  padding: 4px;
  text-align: center;
  font-size: 11px;
}
.page-tools span {
  font-size: 10px;
  color: #839076;
}
.page-scroll {
  overflow: auto;
  flex: 1;
  padding: 25px 28px;
  text-align: center;
  position: relative;
}
.page-sheet {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 1100px;
  line-height: 0;
  box-shadow: 0 2px 10px #29301c18;
}
.page-sheet img {
  width: 100%;
  height: auto;
  background: white;
}
.page-footer {
  font-size: 10px;
  color: #839174;
  padding: 12px;
  text-align: center;
  border-top: 1px solid #d8ddcd;
  background: #eff1e6;
  display: flex;
  justify-content: center;
  gap: 12px;
}
.ask-panel {
  background: #fbfcf6;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid var(--line);
}
.ask-heading {
  padding: 22px 22px 15px;
  border-bottom: 1px solid var(--line);
}
.ask-heading h2 {
  font:
    20px Georgia,
    serif;
  color: #4d6040;
  margin: 0 0 9px;
}
.ask-heading p {
  font-size: 10px;
  line-height: 1.8;
  color: #8f9a82;
  margin: 0;
}
.ask-scope {
  display: flex;
  gap: 4px;
  margin-top: 16px;
}
.ask-scope select {
  font-size: 10px;
  padding: 7px 8px;
  flex: 1;
  min-width: 0;
}
.ask-feed {
  padding: 20px;
  overflow: auto;
  flex: 1;
}
.ask-welcome {
  padding: 14px 2px;
}
.spark {
  font-size: 28px;
  color: #9aa887;
}
.ask-welcome h3 {
  font:
    19px Georgia,
    "Yu Mincho",
    serif;
  font-weight: 400;
  color: #6e7e5e;
}
.ask-welcome p {
  font-size: 11px;
  line-height: 1.9;
  color: #909b84;
}
.suggestion {
  border: 1px solid #dce3cd;
  background: #f5f8ed;
  font-size: 11px;
  padding: 11px 12px;
  width: 100%;
  text-align: left;
  margin: 7px 0;
  color: #74865f;
  line-height: 1.7;
}
.ask-form {
  padding: 15px;
  border-top: 1px solid var(--line);
}
.ask-input {
  display: flex;
  gap: 8px;
}
.ask-input textarea {
  height: 77px;
  font-size: 11px;
  width: 100%;
  line-height: 1.8;
}
.ask-form small {
  font-size: 9px;
  line-height: 1.8;
  color: #9aa38c;
  display: block;
  margin-top: 9px;
}
.ask-form button {
  align-self: flex-end;
  padding: 9px;
}
.question {
  background: #eaf0df;
  color: #62774f;
  font-size: 11px;
  line-height: 1.9;
  padding: 13px;
  margin-bottom: 15px;
  border-radius: 5px;
  white-space: pre-wrap;
}
.answer-label {
  font-size: 9px;
  letter-spacing: 0.5px;
  color: #99a38c;
  margin: 14px 0;
}
.answer-block {
  margin: 15px 0;
  font-size: 11px;
  line-height: 1.9;
  color: #737f65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.answer-block strong {
  font-size: 10px;
  color: #526b40;
  display: block;
  margin-bottom: 6px;
}
.citations {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.object-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.object-card {
  background: #fffefa;
  border: 1px solid var(--line);
  padding: 22px;
  text-align: left;
  cursor: pointer;
  border-radius: 5px;
}
.object-card:hover {
  border-color: #aeb89e;
}
.object-card h3 {
  font:
    21px/1.5 Georgia,
    "Yu Mincho",
    serif;
  margin: 14px 0 10px;
  color: #4b5b3c;
  overflow-wrap: anywhere;
}
.object-card p {
  font-size: 11px;
  color: #919982;
  line-height: 1.9;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
}
.object-card-footer {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 17px;
  font-size: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #8f987f;
}
.type-label {
  font-size: 9px;
  letter-spacing: 0.5px;
  color: #8b987b;
}
.pagination {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  margin: 30px 0;
  font-size: 11px;
  color: #8c967d;
}
.page-objects {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.page-object {
  border: 1px solid #dfe4d3;
  padding: 10px;
  background: #fafbf6;
  text-align: left;
  color: #849474;
  font-size: 10px;
  line-height: 1.7;
}
.page-object b {
  font-weight: 500;
  color: #5f774c;
  display: block;
}
.tabbar {
  display: flex;
  border-bottom: 1px solid var(--line);
  padding: 0 15px;
  gap: 10px;
}
.tabbar button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  padding: 12px 6px;
  font-size: 10px;
  color: #95a088;
  border-radius: 0;
}
.tabbar button.active {
  border-color: #768d60;
  color: #5a7148;
}
dialog {
  border: 1px solid #d7ddca;
  border-radius: 8px;
  padding: 0;
  max-width: 800px;
  width: calc(100% - 40px);
  max-height: 90vh;
  color: var(--ink);
  box-shadow: 0 25px 100px #16250b35;
  background: #fafbf5;
}
dialog::backdrop {
  background: #29312388;
  backdrop-filter: blur(3px);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 23px 28px;
  border-bottom: 1px solid var(--line);
  gap: 18px;
}
.modal-header h2 {
  font:
    25px/1.4 Georgia,
    "Yu Mincho",
    serif;
  font-weight: 400;
  margin: 0;
  overflow-wrap: anywhere;
}
.modal-body {
  padding: 26px 28px;
  line-height: 1.9;
  font-size: 12px;
}
.modal-body h3 {
  font-size: 12px;
  color: #5e7350;
  margin-top: 26px;
}
.modal-body pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #eff2e7;
  padding: 16px;
  font-size: 11px;
  color: #667958;
  border: 1px solid #dfe5d4;
  border-radius: 4px;
  max-height: 310px;
  overflow: auto;
}
.modal-body code {
  font-size: 11px;
  color: #6e795f;
}
.modal-body details {
  margin: 12px 0;
}
.modal-body summary {
  cursor: pointer;
  color: #7e8e6d;
  font-size: 11px;
}
.modal-body label {
  display: block;
  font-size: 11px;
  color: #869777;
  margin: 15px 0 7px;
}
.modal-body input:not([type="checkbox"]),
.modal-body select {
  width: 100%;
  display: block;
}
.modal-footer {
  padding: 20px 28px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  border: 1px dashed #bdcba9;
  background: #eff5e5;
  cursor: pointer;
  text-align: center;
  padding: 25px;
  line-height: 2;
  color: #728a59;
}
.dropzone.dragging {
  background: #e1eccf;
  border-color: #729348;
}
.dropzone strong {
  display: block;
}
.file-input {
  position: absolute;
  width: 1px !important;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}
.role-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.role-picker label {
  display: flex;
  gap: 6px;
  align-items: center;
  border: 1px solid #dce4cf;
  padding: 7px 10px;
  margin: 0;
  font-size: 10px;
  border-radius: 4px;
}
.role-picker input {
  accent-color: #6d8a50;
}
.evidence-metadata {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 8px;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.evidence-metadata dt {
  color: #99a68b;
}
.evidence-metadata dd {
  margin: 0;
  color: #687f53;
}
.evidence-image {
  max-width: 100%;
  max-height: 280px;
  display: block;
  margin: 15px auto;
  object-fit: contain;
  border: 1px solid var(--line);
}
.fit-chain {
  display: grid;
  gap: 8px;
  margin: 15px 0;
}
.fit-step {
  padding: 12px 16px;
  border-left: 3px solid #a8b890;
  background: #eff4e5;
  color: #748c5e;
  font-size: 11px;
  white-space: pre-wrap;
}
.fit-step b {
  display: block;
  font-size: 10px;
  color: #94a67f;
  margin-bottom: 5px;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #35462a;
  color: #f5f9ee;
  font-size: 12px;
  padding: 13px 22px;
  border-radius: 5px;
  box-shadow: 0 4px 25px #26371a25;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  max-width: 90vw;
}
.toast.show {
  opacity: 1;
}
.form-error {
  color: #a2694a;
  font-size: 11px;
  margin: 12px 0;
}
.hidden {
  display: none !important;
}
.busy {
  opacity: 0.6;
  pointer-events: none;
}
.section-divider {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 22px;
}
@media (min-width: 1600px) {
  .book-image {
    height: 300px;
  }
  .reader-grid {
    grid-template-columns: 225px minmax(300px, 1fr) 380px;
  }
}
@media (max-width: 1200px) {
  :root {
    --sidebar: 195px;
  }
  .sidebar {
    padding: 28px 13px 18px;
  }
  .brand {
    gap: 8px;
    font-size: 8px;
  }
  .brand small {
    font-size: 7px;
  }
  .brand-mark {
    width: 38px;
    height: 42px;
    font-size: 23px;
  }
  .topbar {
    padding: 0 25px;
    gap: 18px;
  }
  .content {
    padding: 32px 28px;
  }
  .reader-grid {
    grid-template-columns: 160px minmax(180px, 1fr) 290px;
  }
  .ask-heading {
    padding: 17px;
  }
  .page-scroll {
    padding: 15px;
  }
  .book-grid {
    gap: 24px 18px;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  }
  .stat {
    padding: 19px;
  }
  .global-search {
    width: 35%;
  }
}
@media (max-width: 960px) {
  :root {
    --sidebar: 72px;
  }
  .sidebar {
    padding: 20px 10px;
  }
  .brand {
    margin-bottom: 30px;
    justify-content: center;
  }
  .brand > span:last-child,
  .sidebar-label,
  .collection-label,
  #collection-nav,
  .sidebar-note,
  .settings-button span {
    display: none;
  }
  .sidebar nav a {
    font-size: 0;
    justify-content: center;
    padding: 15px 10px;
  }
  .sidebar nav .nav-count {
    display: none;
  }
  .sidebar nav a > span:first-child {
    font-size: 24px;
    width: auto;
  }
  .settings-button {
    margin-top: auto;
    justify-content: center;
    font-size: 20px;
  }
  .reader-grid {
    grid-template-columns: minmax(200px, 1fr) 300px;
  }
  .toc-panel {
    display: none;
  }
  .reader-header {
    padding: 12px 20px;
  }
  .breadcrumb {
    display: none;
  }
  .global-search {
    margin-left: 0;
    width: auto;
    max-width: none;
    flex: 1;
  }
  .stats .stat {
    padding: 17px;
  }
  .page-heading h1 {
    font-size: 33px;
  }
}
@media (max-width: 650px) {
  :root {
    --sidebar: 0px;
  }
  .sidebar {
    inset: auto 0 0;
    width: 100%;
    height: 57px;
    padding: 0;
    flex-direction: row;
    justify-content: center;
    align-items: center;
  }
  .brand,
  .settings-button {
    display: none;
  }
  .sidebar nav {
    flex-direction: row;
    width: 100%;
    justify-content: space-around;
  }
  .sidebar nav a {
    font-size: 9px;
    padding: 12px;
    gap: 8px;
  }
  .sidebar nav a > span:first-child {
    font-size: 20px;
  }
  .workspace {
    padding-bottom: 57px;
  }
  .topbar {
    height: 65px;
    padding: 0 16px;
    gap: 12px;
  }
  .global-search input {
    font-size: 10px;
  }
  .global-search kbd {
    display: none;
  }
  .topbar .button {
    font-size: 10px;
    padding: 9px;
  }
  .content {
    padding: 27px 20px;
  }
  .page-heading {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 22px;
  }
  .page-heading h1 {
    font-size: 30px;
  }
  .index-number {
    font-size: 33px;
  }
  .page-heading p {
    font-size: 10px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 25px;
  }
  .stat:nth-child(2) {
    border-right: 0;
  }
  .stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .stat-value {
    font-size: 26px;
  }
  .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 23px 13px;
  }
  .book-image {
    height: 210px;
    padding: 18px;
  }
  .book-card h3 {
    font-size: 16px;
  }
  .book-placeholder {
    font-size: 17px;
    padding: 14px;
  }
  .upload-tile {
    min-height: 210px;
    padding: 15px;
  }
  .upload-tile strong {
    font-size: 10px;
  }
  .toolbar {
    gap: 4px;
  }
  .toolbar-title {
    width: 100%;
    margin-bottom: 10px;
  }
  .toolbar select {
    margin-left: 0;
    max-width: 100%;
  }
  .filter {
    font-size: 9px;
    padding: 6px;
  }
  .library-foot {
    gap: 20px;
    line-height: 1.8;
  }
  .result {
    padding: 15px;
    gap: 13px;
  }
  .result img {
    width: 60px;
    height: 80px;
  }
  .result h3 {
    font-size: 16px;
  }
  .result p {
    font-size: 10px;
  }
  .reader-shell {
    height: auto;
  }
  .reader-header {
    height: auto;
    flex-wrap: wrap;
  }
  .reader-title {
    width: 100%;
  }
  .reader-grid {
    display: flex;
    flex-direction: column;
  }
  .page-viewer {
    height: 65vh;
    min-height: 350px;
  }
  .ask-panel {
    min-height: 420px;
    border-left: 0;
  }
  .ask-feed {
    max-height: 500px;
  }
  .ask-welcome {
    padding: 10px;
  }
  .ask-heading {
    padding: 20px;
  }
  .reader-actions {
    margin-left: auto;
  }
  .reader-title h1 {
    font-size: 20px;
  }
  .page-scroll {
    padding: 16px;
  }
  .modal-body {
    padding: 20px;
  }
  .modal-header {
    padding: 20px;
  }
  .modal-header h2 {
    font-size: 21px;
  }
  .modal-footer {
    padding: 16px 20px;
  }
  .evidence-metadata {
    grid-template-columns: 100px 1fr;
  }
  .search-controls select {
    width: calc(50% - 5px);
  }
  .object-grid {
    grid-template-columns: 1fr;
  }
}
