@charset "UTF-8";

.reading-heading { margin: 0; font: 400 28px/1.5 var(--reading); letter-spacing: .02em; }
.reading-list { padding-top: 4px; }
.reading-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; padding: 29px 0 31px; border-bottom: 1px solid var(--line); }
.reading-card-link { display: block; min-width: 0; }
.reading-card-link:hover .reading-card-title { color: var(--green); }
.reading-card-title { margin: 8px 0 10px; color: var(--ink); font: 400 24px/1.65 var(--reading); overflow-wrap: anywhere; }
.reading-card-meta, .reader-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 13px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.reading-card-meta time { font: 11px/1.7 var(--mono); }
.reading-card-note { margin: 0; color: var(--secondary); font-size: 14px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.reading-card-action { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--green); font-size: 12px; }
.reading-card-action .icon { width: 14px; height: 14px; }
.reading-actions { align-self: start; }
.reading-actions > summary { width: 30px; height: 30px; }
.reading-back { padding: 11px 0 24px; }
.reading-back .text-link { font-size: 12px; }
.reading-detail { position: relative; max-width: 760px; margin: 0 auto; }
.reading-toc-side { display: none; }
.reading-toc-heading { margin: 0 0 12px; color: var(--ink); font-size: 12px; font-weight: 500; line-height: 1.8; }
.reading-toc-scroll { max-height: min(52dvh, 420px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.reading-toc-list { list-style: none; margin: 0; padding: 0; }
.reading-toc-list li { margin: 0; padding: 0; }
.reading-toc-link { position: relative; display: block; min-width: 0; min-height: 32px; padding: 6px 8px 6px calc(14px + var(--toc-depth, 0) * 14px); border-left: 1px solid var(--line); color: var(--muted); font: 12px/1.7 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .15s, border-color .15s; }
.reading-toc-link:hover { color: var(--ink); }
.reading-toc-link.is-active { border-left: 2px solid var(--green); padding-left: calc(13px + var(--toc-depth, 0) * 14px); color: var(--green); }
.reading-toc-mobile { position: sticky; top: 12px; z-index: 6; margin-bottom: 23px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.reading-toc-mobile > summary { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 40px; padding: 9px 14px; list-style: none; cursor: pointer; color: var(--secondary); font-size: 12px; }
.reading-toc-mobile > summary::-webkit-details-marker { display: none; }
.reading-toc-mobile[open] > summary { border-bottom: 1px solid var(--line); }
.reading-toc-caret { transition: transform .15s; }
.reading-toc-mobile[open] .reading-toc-caret { transform: rotate(180deg); }
.reading-toc-mobile .reading-toc-nav { padding: 10px 12px 12px; }
.reader-body [id^="reading-section-"], #reading-article-start { scroll-margin-top: 84px; }
.reader-body [id^="reading-section-"]:focus-visible, #reading-article-start:focus-visible { outline: 2px solid var(--line); outline-offset: 7px; border-radius: 3px; }
@media (min-width: 1320px) {
  .reading-toc-side { display: block; position: absolute; top: 0; bottom: 0; left: calc(100% + 32px); width: 220px; }
  .reading-toc-sticky { position: sticky; top: 32px; }
  .reading-toc-heading { padding-left: 14px; }
  .reading-toc-scroll { max-height: calc(100dvh - 110px); }
  .reading-toc-mobile { display: none; }
}
.reader-header { margin-bottom: 30px; padding-bottom: 27px; border-bottom: 1px solid var(--line); }
.reader-header-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.reader-title { margin: 19px 0; font: 400 clamp(27px, 3vw, 35px)/1.6 var(--reading); overflow-wrap: anywhere; }
.reader-source { display: inline-flex; align-items: center; gap: 6px; margin-top: 19px; padding: 5px 0; color: var(--green); font-size: 13px; }
.reader-source:hover { text-decoration: underline; text-underline-offset: 4px; }
.reader-note { margin: 0 0 34px; padding: 3px 0 3px 19px; border-left: 2px solid var(--line); }
.reader-note-label { margin: 0 0 9px; color: var(--muted); font-size: 11px; font-weight: 400; }
.reader-note p { margin: 0; color: var(--secondary); font-size: 14px; line-height: 1.95; white-space: pre-wrap; overflow-wrap: anywhere; }
.reader-body { padding-bottom: 20px; color: var(--ink); font: 400 18px/2 var(--reading); font-synthesis: none; letter-spacing: .015em; overflow-wrap: anywhere; }
.reader-body p { margin: 0 0 1.3em; }
.reader-body h1, .reader-body h2, .reader-body h3, .reader-body h4, .reader-body h5, .reader-body h6 { margin: 1.7em 0 .75em; color: var(--ink); font-weight: 500; line-height: 1.55; }
.reader-body h1 { font-size: 1.65em; }
.reader-body h2 { font-size: 1.4em; }
.reader-body h3 { font-size: 1.18em; }
.reader-body h4, .reader-body h5, .reader-body h6 { font-size: 1em; }
.reader-body > :first-child { margin-top: 0; }
.reader-body a { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.reader-body ul, .reader-body ol { margin: 0 0 1.3em; padding-left: 1.7em; }
.reader-body li { margin: .3em 0; }
.reader-body li > p { margin: .4em 0; }
.reader-body li > ul, .reader-body li > ol { margin-bottom: .5em; }
.reader-body blockquote { margin: 1.3em 0; padding: .15em 0 .15em 1.2em; border-left: 3px solid var(--line); color: var(--secondary); }
.reader-body blockquote > :last-child { margin-bottom: 0; }
.reader-body code { padding: .1em .35em; border-radius: 4px; background: var(--soft); color: var(--ink); font: .8em/1.8 var(--mono); letter-spacing: 0; }
.reader-body pre { max-width: 100%; overflow-x: auto; margin: 1.3em 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.reader-body pre code { padding: 0; border-radius: 0; white-space: pre; font-size: 13px; }
.reader-body img { display: block; max-width: 100%; height: auto; margin: 1.2em auto; border-radius: 10px; background: var(--soft); }
.reader-body hr { height: 0; margin: 2em 0; border: 0; border-top: 1px solid var(--line); }
.reader-body table { display: block; width: max-content; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1.3em 0; font: 14px/1.8 var(--sans); }
.reader-body th, .reader-body td { min-width: 80px; padding: 10px 14px; border: 1px solid var(--line); text-align: left; }
.reader-body th { background: var(--soft); font-weight: 500; }
.reader-body .markdown-align-left { text-align: left; }
.reader-body .markdown-align-center { text-align: center; }
.reader-body .markdown-align-right { text-align: right; }
.reading-math { color: var(--ink); letter-spacing: normal; }
.reading-math.is-display { display: block; max-width: 100%; margin: 1.35em 0; padding: .45em 2px .65em; overflow-x: auto; overflow-y: hidden; text-align: center; overscroll-behavior-x: contain; }
.reading-math.is-display > .katex-display { margin: .35em 0; }
.reading-math .katex { font-size: 1.12em; font-synthesis: none; }
.reading-math.is-math-pending, .reading-math.is-math-error { color: var(--secondary); font: 13px/1.8 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.reading-math.is-display.is-math-pending { min-height: 4em; }
.reading-math.is-math-error { text-decoration: underline dotted var(--muted); text-underline-offset: 4px; }
.math-load-note { padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font: 12px/1.8 var(--sans); }
.math-load-note .text-link { margin-left: 10px; font-size: inherit; }
.markdown-image-missing { display: block; margin: 18px 0; padding: 14px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font: 12px/1.8 var(--sans); }
.reader-no-body { padding: 16px 0 30px; color: var(--muted); font-size: 13px; }
.reading-empty { padding: 60px 12px; text-align: center; }
.reading-empty h2 { font: 400 22px/1.7 var(--reading); margin: 0; }
.reading-empty p { margin: 12px 0 24px; color: var(--muted); font-size: 13px; }
.reading-notice { padding: 17px 0; color: var(--danger); font-size: 13px; }
.reading-notice p { margin: 0 0 10px; }
.reading-notice .text-link { color: var(--secondary); }
.reading-editor { width: min(700px, calc(100% - 40px)); }
.reading-editor .dialog-header h2 { margin-top: 0; font-family: var(--reading); font-weight: 400; }
.optional-label { margin-left: 5px; color: var(--muted); font-size: 11px; }
.article-body-editor summary { width: fit-content; cursor: pointer; color: var(--secondary); font-size: 12px; padding: 2px 0 9px; }
.article-body-editor textarea { font: 400 16px/1.9 var(--reading); }
.article-body-editor .field-note { margin-top: 10px; }
.article-editor-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 4px 0 6px; }
.article-editor-toolbar > .text-link { min-height: 36px; font-size: 12px; }
.article-editor-views { display: flex; gap: 4px; }
.article-editor-views button { min-height: 34px; padding: 6px 11px; background: transparent; color: var(--muted); border-radius: 6px; font-size: 12px; }
.article-editor-views button[aria-pressed="true"] { background: var(--soft); color: var(--ink); }
.article-markdown-preview { min-height: 250px; max-height: 55dvh; overflow: auto; margin-top: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: 16px; }
.article-upload-status { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 12px; color: var(--secondary); font-size: 12px; }
.article-upload-status .text-link { white-space: nowrap; font-size: 12px; }
.article-visibility { margin-top: 22px; }
.reading-editor button:disabled { opacity: .6; cursor: wait; }

@media (max-width: 640px) {
  .reading-heading { font-size: 24px; }
  .reading-card { gap: 9px; padding: 22px 0 25px; }
  .reading-card-title { font-size: 22px; }
  .reading-card-note { font-size: 13px; }
  .reading-card-meta { gap: 5px 10px; font-size: 11px; }
  .reader-title { margin: 15px 0; font-size: 26px; }
  .reader-header { padding-bottom: 23px; }
  .reader-meta { font-size: 11px; gap: 5px 10px; }
  .reader-body { font-size: 17px; line-height: 1.95; }
  .reader-note { padding-left: 14px; margin-bottom: 28px; }
  .reading-editor { width: calc(100% - 24px); }
  .reading-editor .form-fields { padding: 0 22px 24px; }
  .reading-editor .form-fields input, .reading-editor .form-fields textarea { font-size: 16px; }
}
