@charset "UTF-8";

:root {
  --paper: #e8dcc4;
  --sheet: #f0d6a9;
  --ink: #38291e;
  --text: #5e4835;
  --muted: #715b44;
  --line: rgba(104, 74, 41, .2);
  --line-strong: rgba(104, 74, 41, .4);
  --green: #6b412a;
  --green-dark: #4d2e1e;
  --green-soft: #ead1a6;
  --seal: #923e2d;
  --serif: "SimSun", "Songti SC", "Noto Serif CJK SC", serif;
  --hand: "KaiTi", "STKaiti", "FangSong", "SimSun", serif;
  --paper-art: url("assets/kraft-brush.jpg");
  --paper-grain: url("assets/kraft-quill.jpg");
}

body {
  background:
    radial-gradient(ellipse at 10% 0%, #f6efdf 0, transparent 60%),
    repeating-linear-gradient(93deg, transparent 0 116px, rgba(113, 81, 45, .025) 117px 118px),
    var(--paper);
}
body[data-paper-style="quill"] { --paper-art: url("assets/kraft-quill.jpg"); }
body::before { opacity: .04; background-image: radial-gradient(#6c4828 .5px, transparent .6px); }
.wrap { width: min(1060px, calc(100% - 96px)); }
.header { height: 100px; margin-bottom: 38px; }
.brand > span { font-family: var(--hand); font-size: 38px; }
.header nav a { color: var(--text); }
.header nav .nav-active::after { background: var(--seal); }
.primary-button { box-shadow: 0 5px 15px rgba(76, 45, 24, .12); }
.primary-button, .outline-button { border-radius: 1px; }

/* Magnify an unprinted part of the original artwork to make a shared paper surface. */
.kraft-sheet, dialog, .entry-body, .shelf-book {
  background-color: var(--sheet);
  background-image: linear-gradient(rgba(255, 246, 224, .12), rgba(255, 246, 224, .12)), var(--paper-grain);
  background-size: auto, 160% auto;
  background-position: center, left top;
}
.kraft-sheet { position: relative; isolation: isolate; }
.kraft-sheet::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: var(--paper-art) right top / auto 100% no-repeat;
  mask-image: linear-gradient(to right, transparent 63%, #000 86%);
}
.kraft-sheet, .entry-body {
  border: 1px solid rgba(135, 91, 43, .18);
  box-shadow:
    0 2px 2px rgba(88, 58, 31, .08),
    0 16px 32px -23px rgba(68, 42, 23, .5),
    inset 0 0 35px rgba(163, 112, 52, .08);
}
.reading-feature {
  display: block;
  min-height: 495px;
  margin-bottom: 20px;
  padding: 48px 245px 43px 62px;
  animation: settle .5s ease both;
}
.feature-copy { padding: 0; }
.feature-source { gap: 22px; margin: 0 0 36px; letter-spacing: 0; }
.feature-source > div { min-width: 0; }
.feature-source p { margin: 0; }
.feature-book-cover { flex: none; padding: 0; background: none; }
.feature-book-cover img {
  width: 62px;
  height: 89px;
  object-fit: cover;
  box-shadow: 4px 7px 10px rgba(83, 52, 28, .24), 2px 1px 0 #f6e7c9;
  transform: rotate(-3deg);
}
.feature-source .feature-book { font: 400 30px/1.6 var(--hand); overflow-wrap: anywhere; }
.feature-source .feature-author { margin-top: 4px; color: var(--muted); font-size: 14px; }
.sample-label { margin-left: 5px; color: var(--seal); font: 12px/1.5 var(--sans); }
.feature-copy h1 { font: 400 clamp(29px, 3.1vw, 40px)/1.9 var(--hand); word-break: normal; line-break: strict; text-wrap: balance; -webkit-line-clamp: 4; }
.feature-read { margin-top: 28px; color: var(--text); }
.paper-seal {
  display: block;
  width: 33px;
  height: 37px;
  padding: 1px;
  border: 1px solid var(--seal);
  outline: 1px solid var(--seal);
  outline-offset: -4px;
  color: var(--seal);
  font: 27px/33px var(--hand);
  text-align: center;
  transform: rotate(-3deg);
}
.feature-copy > .paper-seal { position: absolute; right: 53px; top: 35px; }
.feature-memory, .row-photo { display: block; padding: 0; background: none; }
.feature-memory { width: min(100%, 460px); margin: 0 0 25px; }
.feature-memory img { width: 100%; max-height: 210px; object-fit: cover; border: 5px solid #f5e6c8; box-shadow: 2px 5px 9px rgba(88, 58, 31, .15); }
.section-top { align-items: center; padding-top: 25px; margin-bottom: 24px; }
.section-top h1, .section-top h2 { font: 400 29px/1.5 var(--hand); }
.entry-grid { gap: 28px; align-items: start; }
.reading-row {
  display: flex;
  flex-direction: column;
  min-height: 328px;
  padding: 29px 65px 23px 30px;
  animation: none;
}
.reading-row::after {
  background-size: auto 315px;
  background-position: right bottom;
  mask-image: linear-gradient(to right, transparent 75%, #000 94%), linear-gradient(to top, #000 240px, transparent 315px);
  mask-composite: intersect;
}
.row-heading { display: flex; align-items: center; gap: 17px; margin-bottom: 23px; min-width: 0; }
.row-cover-button { flex: none; margin: 0; }
.row-cover-button img { width: 48px; height: 70px; box-shadow: 3px 5px 8px rgba(83, 52, 28, .2); }
.row-source { display: block; min-width: 0; margin: 0; }
.row-source h3 { margin: 0; color: var(--ink); font: 400 22px/1.5 var(--hand); overflow-wrap: anywhere; }
.row-source p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.reading-row blockquote { font: 400 23px/1.95 var(--hand); -webkit-line-clamp: 3; }
.row-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; margin-top: auto; padding-top: 24px; color: var(--muted); font-size: 12px; }
.row-foot .text-button { color: var(--text); font-size: 12px; }
.row-photo { width: 100%; margin: 0 0 21px; }
.row-photo img { width: 100%; height: 160px; object-fit: cover; border: 4px solid #f4e4c6; }
.excerpts { padding-bottom: 55px; }
.shelf { gap: 24px; }
.shelf-book { padding: 27px 24px 25px; border: 1px solid var(--line); box-shadow: 0 9px 20px -17px #674525; }
.shelf-book img { margin: 0 auto 21px; }
.shelf-book strong { font-family: var(--hand); font-size: 22px; }
.shelf-book small { color: var(--text); }
.bookshelf .section-top { padding-top: 0; }
.footer { padding-top: 22px; }
.footer .text-button { font-size: 13px; color: var(--text); }

dialog { border-color: rgba(127, 85, 43, .35); box-shadow: 0 30px 110px rgba(54, 35, 21, .33); }
dialog::backdrop { background: rgba(47, 34, 24, .52); backdrop-filter: blur(5px); }
.dialog-heading h2 { font-family: var(--hand); }
.detail-dialog { width: min(850px, calc(100% - 32px)); }
.detail-toolbar { background: #ead0a5; color: var(--text); }
.detail-inner {
  min-height: 650px;
  padding: 42px 140px 38px 50px;
  border: 0;
  box-shadow: none;
}
.detail-inner::after {
  background-size: auto 800px;
  mask-image: linear-gradient(to right, transparent 77%, #000 93%), linear-gradient(to bottom, #000 680px, transparent 800px);
  mask-composite: intersect;
}
.detail-source { gap: 22px; margin-bottom: 35px; }
.detail-source h1 { font-family: var(--hand); font-size: 32px; }
.detail-source p { color: var(--text); font-size: 14px; }
.detail-source img { width: 58px; height: 85px; transform: rotate(-2deg); }
.detail-quote { font: 400 28px/2 var(--hand); letter-spacing: .025em; }
.detail-image { height: auto; max-height: 320px; border: 5px solid #f7e9cd; object-fit: contain; margin-bottom: 30px; }
.detail-note { margin-left: 0; padding-left: 20px; border-left-color: var(--seal); }
.detail-note p { color: var(--text); font-family: var(--serif); font-size: 18px; }
.detail-inner > .paper-seal { margin-top: 34px; }
.detail-foot { flex-wrap: wrap; gap: 14px; margin-top: 25px; }
.detail-actions { gap: 10px 17px; }
.detail-actions .text-button { font-size: 13px; }
.catalog-credit { margin-top: 25px; font-size: 12px; }
.write-dialog { padding-top: 30px; }
.write-dialog::before { background: rgba(146, 62, 45, .35); }
.write-dialog .dialog-heading h2 { font-size: 33px; }
#quote-input {
  padding-top: 5px;
  font-family: var(--hand);
  font-size: 23px;
  line-height: 42px;
  background: repeating-linear-gradient(to bottom, transparent 0 41px, rgba(104, 74, 41, .16) 41px 42px);
}
.form-fields input::placeholder, .form-fields textarea::placeholder { color: #80684f; }
.form-fields input:not([type=file]):focus-visible, .form-fields textarea:focus-visible, .form-fields select:focus-visible { box-shadow: 0 2px 0 var(--green); }
.format-options input:checked + span, .share-themes input:checked + span { border-color: var(--green); }
.entry-body { position: relative; isolation: isolate; }
.entry-note-layout .entry-body { background-color: var(--sheet); }
.entry-quote { font-family: var(--hand); font-size: 23px; }
.entry-photo .entry-body { border: 1px solid var(--line); }
.entry-note { color: var(--text); }
.entry-content { background: none; }
.book-cover-photo { background: rgba(255, 240, 209, .2); }
.share-preview { background: rgba(108, 73, 39, .1); }
.search-hit { border-color: var(--line-strong); }
.search-hit strong { font-family: var(--hand); }
.paper-style-options { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; border: 0; }
.paper-style-options legend { margin-bottom: 14px; font-size: 15px; }
.paper-style-options label { display: flex; align-items: center; gap: 8px; padding: 10px 13px; border: 1px solid var(--line-strong); font-size: 14px; cursor: pointer; }
.paper-style-options label:has(input:checked) { border-color: var(--green); background: rgba(255, 243, 215, .35); }
.paper-style-options input { accent-color: var(--green); }

@media (max-width: 1000px) {
  .wrap { width: calc(100% - 64px); }
  .reading-feature { padding: 40px 205px 37px 43px; min-height: 450px; }
  .feature-copy h1 { font-size: 34px; }
  .reading-row { padding: 27px 53px 23px 25px; }
  .reading-row blockquote { font-size: 22px; }
  .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .wrap { width: calc(100% - 36px); }
  .header { height: 85px; margin-bottom: 23px; }
  .reading-feature { display: block; min-height: 435px; padding: 33px 118px 33px 29px; }
  .reading-feature::after { mask-image: linear-gradient(to right, transparent 64%, #000 90%); }
  .feature-source { gap: 17px; margin-bottom: 30px; }
  .feature-source .feature-book { font-size: 27px; }
  .feature-book-cover img { width: 48px; height: 71px; }
  .feature-copy h1 { font-size: 31px; }
  .feature-copy > .paper-seal { right: 26px; top: 30px; }
  .entry-grid { grid-template-columns: 1fr; gap: 22px; }
  .reading-row { min-height: 270px; padding: 27px 86px 24px 28px; }
  .reading-row::after { mask-image: linear-gradient(to right, transparent 73%, #000 95%), linear-gradient(to top, #000 240px, transparent 315px); }
  .reading-row blockquote { font-size: 24px; }
  .shelf { gap: 19px; }
  .shelf-book { padding: 23px 18px; }
  .detail-inner { padding: 34px 105px 31px 32px; }
  .detail-inner::after { background-size: auto 650px; mask-image: linear-gradient(to right, transparent 78%, #000 96%), linear-gradient(to bottom, #000 530px, transparent 650px); }
  .detail-quote { font-size: 25px; }
  .detail-source h1 { font-size: 29px; }
}

@media (max-width: 480px) {
  .wrap { width: calc(100% - 28px); }
  .header { gap: 13px; height: 77px; margin-bottom: 20px; }
  .brand > span { font-size: 31px; }
  .header nav { gap: 15px; }
  .header nav a { font-size: 13px; }
  .header-actions { gap: 5px; }
  .header .primary-button { padding-inline: 9px; }
  .reading-feature { padding: 28px 67px 31px 24px; min-height: 460px; }
  .reading-feature::after { background-size: auto 470px; background-position: right bottom; mask-image: linear-gradient(to right, transparent 72%, #000 97%); }
  .feature-source { gap: 13px; margin-bottom: 30px; align-items: center; flex-wrap: nowrap; }
  .feature-source .feature-book { font-size: 25px; }
  .feature-source .feature-author { font-size: 13px; }
  .feature-book-cover img { width: 43px; height: 63px; }
  .feature-copy h1 { font-size: 28px; line-height: 1.95; -webkit-line-clamp: 6; }
  .feature-copy > .paper-seal { top: 24px; right: 21px; width: 27px; height: 31px; font-size: 22px; line-height: 27px; }
  .feature-read { margin-top: 26px; }
  .feature-memory img { max-height: 160px; }
  .section-top { gap: 10px; padding-top: 20px; margin-bottom: 20px; }
  .section-top h1, .section-top h2 { font-size: 26px; }
  .filters { gap: 14px; }
  .reading-row { padding: 25px 55px 22px 24px; min-height: 290px; }
  .row-heading { gap: 14px; margin-bottom: 22px; }
  .row-cover-button img { width: 42px; height: 61px; }
  .row-source h3 { font-size: 23px; }
  .row-source p { font-size: 13px; }
  .reading-row blockquote { font-size: 23px; line-height: 1.95; -webkit-line-clamp: 4; }
  .row-foot { padding-top: 23px; }
  .row-photo img { height: 135px; }
  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
  .shelf-book { padding: 24px 15px; }
  .shelf-book strong { font-size: 21px; }
  .shelf-book img { width: 88px; height: 127px; }
  .footer-actions { gap: 14px; }
  .detail-dialog { width: calc(100% - 14px); max-height: 94dvh; }
  .detail-toolbar { padding-inline: 23px; }
  .detail-inner { min-height: 600px; padding: 29px 55px 28px 24px; }
  .detail-inner::after { background-size: auto 560px; mask-image: linear-gradient(to right, transparent 82%, #000), linear-gradient(to bottom, #000 450px, transparent 560px); }
  .detail-source { gap: 15px; margin-bottom: 30px; }
  .detail-source img { width: 43px; height: 64px; }
  .detail-source h1 { font-size: 25px; }
  .detail-source p { font-size: 13px; }
  .detail-quote { font-size: 24px; }
  .detail-note { margin-top: 29px; padding-left: 15px; }
  .detail-note p { font-size: 17px; }
  .detail-foot { margin-right: -29px; }
  .detail-actions-right { margin-left: 0; }
  .detail-image { border-width: 3px; }
  #quote-input { font-size: 22px; line-height: 42px; min-height: 220px; }
  .form-bottom { background: #eed2a1; box-shadow: 0 -10px 22px rgba(238, 210, 161, .9); }
}
