/* A reading surface in LinkMa's established cream, yellow and jade palette. */
.lots-reference-body {
  --lots-ink: #302b21;
  --lots-muted: #62563e;
  --lots-line: #d9bd79;
  --lots-jade: #15675f;
  color: var(--lots-ink);
  background: var(--ui-paper, #fffaf0) url('/assets/home-wave-pattern.svg') repeat;
  font-family: SceneSans, sans-serif;
  font-size: 16px;
  caret-color: var(--lots-jade);
}
.lots-reference-body ::selection { color: #302b21; background: #f5cf5d; }
.lots-reference { width: min(1060px, calc(100% - 96px)); margin-inline: auto; padding-block: 148px 88px; }
.lots-reference svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.lots-reference a:focus-visible,
.lots-reference button:focus-visible,
.lots-reference input:focus-visible,
.lots-reference summary:focus-visible,
.lots-footer a:focus-visible { outline: 3px solid var(--lots-jade); outline-offset: 5px; border-radius: 3px; }
.lots-back { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--lots-muted); font-size: 15px; }
.lots-back svg { width: 20px; height: 20px; stroke-width: 2; }
.lots-back:hover { color: var(--lots-jade); }
.lots-intro { margin-block: 24px 52px; }
.lots-intro h1 { margin: 0 0 22px; font: 800 clamp(32px, 4.5vw, 54px)/1.35 LinkMaHome, SceneSans, sans-serif; text-wrap: balance; }
.lots-lead { max-width: 44em; margin: 0 0 26px; font-size: 20px; line-height: 1.9; }
.lots-book-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px; margin: 0 0 18px; line-height: 1.8; }
.lots-book-line > span { color: var(--lots-muted); font-size: 14px; }
.lots-book-line strong { font-size: 18px; font-weight: 650; }
.lots-scope { max-width: 52em; padding-block: 18px; border-block: 1px solid var(--lots-line); }
.lots-scope p { margin: 0; color: var(--lots-muted); line-height: 1.9; }
.lots-scope p + p { margin-top: 9px; }
.lots-scope strong { color: var(--lots-ink); font-weight: 650; margin-inline-end: 12px; }
.lots-book-source { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; margin-top: 10px; color: var(--lots-jade); font-size: 15px; text-decoration: underline; text-underline-offset: 5px; }
.lots-book-source svg { width: 18px; height: 18px; stroke-width: 1.8; }
.lots-list-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.lots-list-heading h2 { margin: 0; font-size: 26px; font-weight: 750; line-height: 1.5; }
.lots-count { margin: 0; color: var(--lots-muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.lots-search { margin-block: 24px 30px; }
.lots-search > label { display: block; margin-bottom: 10px; font-size: 15px; font-weight: 650; }
.lots-search-controls { display: flex; align-items: center; gap: 12px; }
.lots-input-wrap { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding-inline: 17px; border: 1px solid #b39b60; border-radius: 12px; background: #fffaf0; }
.lots-input-wrap:focus-within { border-color: var(--lots-jade); }
.lots-input-wrap svg { flex: none; width: 21px; height: 21px; stroke: var(--lots-muted); stroke-width: 1.8; }
.lots-input-wrap input { width: 100%; min-width: 0; min-height: 54px; padding: 12px 0; border: 0; background: transparent; color: var(--lots-ink); font: inherit; }
.lots-input-wrap input::placeholder { color: #756446; opacity: 1; }
.lots-reference .lots-input-wrap input:focus-visible { outline-offset: 0; outline: none; }
.lots-input-wrap:has(input:focus-visible) { outline: 3px solid var(--lots-jade); outline-offset: 3px; }
.lots-clear,.lots-retry { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: 10px 20px; border: 1px solid #b39b60; border-radius: 12px; background: #f8df8d; color: var(--lots-ink); font: 650 15px/1.5 SceneSans, sans-serif; cursor: pointer; }
.lots-clear:hover:not(:disabled),.lots-retry:hover { background: #f5cf5d; }
.lots-clear:disabled,.lots-input-wrap input:disabled { cursor: default; opacity: .65; }
.lots-search-help { margin: 11px 0 0; color: var(--lots-muted); font-size: 14px; line-height: 1.7; }
.lots-list { margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--lots-line); }
.lots-list > li { border-bottom: 1px solid var(--lots-line); scroll-margin-top: 122px; }
.lots-detail > summary { display: flex; align-items: center; gap: 24px; min-height: 100px; padding: 23px 4px; cursor: pointer; list-style: none; }
.lots-detail > summary::-webkit-details-marker { display: none; }
.lots-detail > summary:hover { background: #f9e8b44d; }
.lots-number { display: flex; flex: none; align-items: baseline; gap: 5px; min-width: 105px; color: var(--lots-muted); white-space: nowrap; font-size: 14px; }
.lots-number strong { color: var(--lots-ink); font-size: 30px; font-weight: 750; line-height: 1.2; font-variant-numeric: tabular-nums; }
.lots-summary-main { display: flex; align-items: baseline; gap: 25px; min-width: 0; flex: 1; }
.lots-ganzhi { flex: none; color: var(--lots-muted); font-size: 18px; }
.lots-first-line { margin: 0; font: 650 24px/1.6 SceneSerif, serif; }
.lots-expand { display: inline-flex; align-items: center; gap: 8px; flex: none; color: var(--lots-jade); font-size: 14px; }
.lots-expand svg { width: 18px; height: 18px; stroke-width: 1.8; }
.lots-detail[open] .lots-expand svg { transform: rotate(180deg); }
.lots-detail-body { padding: 2px 4px 30px 133px; }
.lots-reading-note { max-width: 49em; margin: 0 0 20px; color: var(--lots-muted); font-size: 14px; line-height: 1.9; }
.lots-line-readings { list-style: none; margin: 0; padding: 0; }
.lots-line-readings > li { display: grid; grid-template-columns: minmax(200px, .85fr) minmax(0, 1.2fr); gap: 20px 32px; padding-block: 18px; border-top: 1px solid #e8d7a9; }
.lots-poem-line { margin: 0; color: var(--lots-ink); font: 550 21px/1.9 SceneSerif, serif; }
.lots-line-reading { margin: 0; color: var(--lots-muted); font-size: 16px; line-height: 1.9; }
.lots-overall { margin-top: 22px; max-width: 49em; }
.lots-overall h3 { margin: 0 0 10px; font-size: 17px; font-weight: 650; }
.lots-overall p { margin: 0; color: var(--lots-muted); line-height: 1.9; }
.lots-grade { margin: 20px 0 7px; color: var(--lots-muted); font-size: 14px; line-height: 1.9; }
.lots-source-link { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; color: var(--lots-jade); font-size: 15px; text-decoration: underline; text-underline-offset: 5px; }
.lots-source-link:hover,.lots-book-source:hover { color: #8f352d; }
.lots-source-link svg { width: 18px; height: 18px; stroke-width: 1.8; }
.lots-source-unavailable { color: var(--lots-muted); font-size: 14px; line-height: 1.8; }
.lots-empty,.lots-error { margin-top: 24px; padding: 26px; border-radius: 12px; background: #fff0bc; color: var(--lots-ink); }
.lots-empty h3,.lots-error h3 { margin: 0 0 10px; font-size: 22px; }
.lots-empty p,.lots-error p { max-width: 45em; margin: 0; color: var(--lots-muted); line-height: 1.9; }
.lots-error .lots-retry { margin-top: 18px; }
.lots-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 28px; min-height: 88px; padding: 22px max(48px, calc((100% - 1060px) / 2)); color: var(--lots-muted); border-top: 1px solid var(--lots-line); background: #f5cf5d; font-size: 14px; }
.lots-footer > span { margin-right: auto; }
.lots-footer a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 5px; }
.lots-reference-body [hidden] { display: none !important; }
@media (max-width: 900px) {
  .lots-reference { width: calc(100% - 48px); padding-top: 140px; }
  .lots-summary-main { gap: 16px; }
  .lots-first-line { font-size: 22px; }
  .lots-expand > span { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
  .lots-detail-body { padding-left: 4px; }
  .lots-line-readings > li { grid-template-columns: minmax(200px, .75fr) minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .lots-reference { width: calc(100% - 40px); padding-bottom: 56px; }
  .lots-intro { margin-block: 20px 38px; }
  .lots-intro h1 { font-size: 32px; }
  .lots-lead { font-size: 18px; }
  .lots-book-line { gap: 5px 12px; }
  .lots-book-line strong { width: 100%; order: -1; }
  .lots-scope { font-size: 15px; }
  .lots-list-heading { flex-wrap: wrap; gap: 7px; }
  .lots-list-heading h2 { font-size: 24px; }
  .lots-count { width: 100%; }
  .lots-search-controls { gap: 9px; }
  .lots-input-wrap { gap: 9px; padding-inline: 12px; }
  .lots-input-wrap input { min-height: 52px; font-size: 16px; }
  .lots-clear { padding-inline: 12px; font-size: 14px; }
  .lots-detail > summary { gap: 14px; min-height: 108px; padding-block: 20px; }
  .lots-number { flex-direction: column; gap: 5px; min-width: 45px; font-size: 12px; }
  .lots-number strong { font-size: 28px; }
  .lots-summary-main { flex-direction: column; align-items: flex-start; gap: 4px; }
  .lots-ganzhi { font-size: 15px; }
  .lots-first-line { font-size: 21px; overflow-wrap: anywhere; }
  .lots-line-readings > li { grid-template-columns: minmax(0, 1fr); gap: 7px; padding-block: 17px; }
  .lots-poem-line { font-size: 22px; }
  .lots-reading-note { margin-bottom: 15px; }
  .lots-detail-body { padding-bottom: 24px; }
  .lots-empty,.lots-error { padding: 22px 18px; }
  .lots-footer { padding-inline: 20px; gap: 4px 22px; }
  .lots-footer > span { width: 100%; }
}
