:root {
  color-scheme: light;
  --paper: #faf8f3;
  --white: #fffefa;
  --ink: #30262a;
  --muted: #6c6262;
  --wine: #792f46;
  --wine-deep: #572137;
  --rose: #efe2e1;
  --rule: #ded8cf;
  --serif: "Noto Serif CJK SC", "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Source Sans 3", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  --latin: "Baskervville", Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 1rem; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.7 var(--sans); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button, summary, select { cursor: pointer; }
button { background: none; border: 0; padding: 0; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.35; overflow-wrap: anywhere; }
::selection { background: #e7bec3; color: #301924; }
:focus-visible { outline: 3px solid #b25b6e; outline-offset: 4px; }
.wrap { width: min(calc(100% - 6rem), 76rem); margin-inline: auto; }
.icon { display: inline-block; vertical-align: -.18em; width: 1.14em; height: 1.14em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: absolute; z-index: 10; top: 0; left: 1rem; transform: translateY(-130%); padding: .5rem 1rem; background: var(--white); }
.skip-link:focus { transform: none; }
.masthead { background: #fcfaf6; border-bottom: 1px solid var(--rule); }
.masthead-inner { min-height: 4.9rem; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 2rem; }
.brand { display: flex; align-items: center; width: fit-content; gap: .75rem; }
.brand span { display: grid; gap: .14rem; }
.brand strong { font: 700 1.45rem/1.13 var(--serif); letter-spacing: .13em; color: #442b36; }
.brand small, .site-footer > span { color: var(--muted); font: .68rem/1.2 Georgia, serif; text-transform: uppercase; letter-spacing: .13em; }
.primary-nav { display: flex; align-self: stretch; align-items: stretch; gap: 2.3rem; }
.primary-nav a { position: relative; display: inline-flex; align-items: center; color: #62575a; font-size: .95rem; white-space: nowrap; }
.primary-nav a[aria-current], .primary-nav a:hover, .text-link:hover, .search-link:hover { color: var(--wine); }
.primary-nav a[aria-current] { font-weight: 650; }
.primary-nav a[aria-current]::after { content: ""; position: absolute; bottom: .87rem; left: 50%; width: 1.2rem; height: 2px; background: var(--wine); transform: translateX(-50%); }
.header-tools { justify-self: end; display: flex; align-items: center; gap: 1.15rem; }
.search-link { display: grid; place-items: center; width: 2rem; height: 2.5rem; font-size: 1.16rem; }
.desk-link, .button, .hero-button { display: inline-flex; align-items: center; justify-content: center; gap: .48rem; font-weight: 600; white-space: nowrap; min-height: 2.65rem; padding: .55rem 1.05rem; border-radius: .38rem; border: 1px solid #cbbeb9; font-size: .92rem; line-height: 1.35; }
.desk-link { color: var(--wine-deep); border-color: #d4c0bc; background: #f9f0ed; min-height: 2.35rem; padding: .45rem .87rem; }
.desk-link:hover, .button:hover { border-color: var(--wine); }
.button { color: var(--wine-deep); background: var(--white); }
.button.primary { background: var(--wine); color: var(--white); border-color: var(--wine); }
.button.primary:hover { background: var(--wine-deep); }
.button.small { min-height: 2.1rem; padding: .4rem .8rem; }
main { min-height: 55vh; }
.hero { position: relative; isolation: isolate; display: flex; align-items: center; overflow: hidden; margin-top: 1.65rem; min-height: clamp(21.5rem, 29vw, 25.5rem); border-radius: .65rem; background: #251420; color: #fff5e6; }
.hero-picture, .hero-picture img, .hero-frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-picture { z-index: -2; }
.hero-picture img { object-fit: cover; object-position: 61% 52%; }
.hero-frame { inset: .7rem; width: auto; height: auto; border: 1px solid #e8c3a640; border-radius: .24rem; z-index: 1; pointer-events: none; }
.hero-copy { position: relative; z-index: 2; width: 49%; padding: 2.7rem clamp(2.25rem, 4.4vw, 4.7rem); }
.hero-kicker { display: flex; align-items: center; gap: .7rem; color: #e7c4aa; font-size: .83rem; font-weight: 550; letter-spacing: .16em; }
.hero-kicker span { width: 1.8rem; height: 1px; background: #dfb48b; }
.hero h1 { color: #fff3e1; font-size: clamp(3rem, 4.55vw, 4.6rem); letter-spacing: .045em; line-height: 1.15; font-weight: 700; margin: .92rem 0 .8rem; }
.hero-copy p { color: #e8d8cd; font-size: 1rem; letter-spacing: .065em; }
.hero-button { margin-top: 1.35rem; padding: .62rem 1.24rem; background: #f3dfc7; color: #422331; border-color: #f3dfc7; box-shadow: 0 2px 8px #180d1533; }
.hero-button:hover { background: #fff0da; }
.front-columns { display: grid; grid-template-columns: minmax(0, 1.94fr) minmax(15rem, 1fr); gap: clamp(2rem, 4.2vw, 4.25rem); margin-top: 2.5rem; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .65rem; border-bottom: 1px solid #bdb0a8; padding-bottom: .9rem; margin-bottom: .2rem; }
.section-heading h2 { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: .7rem; font-size: clamp(1.55rem, 2.2vw, 1.95rem); font-weight: 700; letter-spacing: .045em; }
.section-heading h2 small { font: italic 1.05rem/1 var(--latin); letter-spacing: 0; color: #87716b; }
.text-link { display: inline; flex-shrink: 0; color: var(--wine); font-weight: 550; font-size: .875rem; text-decoration: underline; text-decoration-color: #c8a4a8; text-underline-offset: .28rem; }
.entry { border-bottom: 1px solid var(--rule); }
.entry-link { display: grid; grid-template-columns: minmax(7.5rem, 27%) minmax(0, 1fr); align-items: center; gap: clamp(1rem, 1.8vw, 1.55rem); padding: 1.15rem 0; }
.entry-picture, .pick-picture, .gallery-picture { display: grid; place-items: center; overflow: hidden; color: #916d70; background: #e9dfd7; position: relative; }
.entry-picture { border-radius: .32rem; aspect-ratio: 1.64; }
.entry-picture > .icon { width: 2.2rem; height: 2.2rem; }
.entry-picture img, .pick-picture img, .gallery-picture img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; transition: transform .32s ease; }
.entry-link:hover img, .gallery-card:hover img, .shelf-card:hover img { transform: scale(1.035); }
.entry-link:hover h3, .gallery-card:hover h2, .small-pick:hover h3 { color: var(--wine); }
.meta { display: flex; align-items: center; flex-wrap: wrap; gap: .58rem; color: var(--muted); font: .79rem/1.5 var(--sans); font-variant-numeric: tabular-nums; }
.category { display: inline-flex; align-items: center; width: fit-content; max-width: 100%; overflow-wrap: anywhere; padding: .09rem .5rem; border-radius: .22rem; background: var(--rose); color: #742e44; font: 550 .78rem/1.65 var(--sans); letter-spacing: .025em; }
.meta-rule { display: inline-block; width: 1.1rem; height: 1px; background: #c6b9af; }
.entry-copy h3, .gallery-card h2 { margin: .44rem 0 .32rem; font-size: clamp(1.2rem, 1.8vw, 1.5rem); }
.entry-copy p, .gallery-card p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: var(--muted); font-size: .93rem; line-height: 1.75; overflow-wrap: anywhere; }
.shelf-card { display: block; }
.feature-pick { position: relative; isolation: isolate; overflow: hidden; margin-top: 1.15rem; aspect-ratio: 1.65; border-radius: .42rem; background: #29212a; color: white; }
.feature-pick .pick-picture { position: absolute; inset: 0; z-index: -2; }
.feature-pick::after { content: ""; pointer-events: none; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, #17131dee 0%, #17131d9c 24%, transparent 70%); }
.feature-pick .pick-copy { position: absolute; left: 1.05rem; right: 1.05rem; bottom: .85rem; }
.pick-copy > span { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; }
.pick-copy h3 { font-size: 1.23rem; margin-top: .16rem; }
.play-emblem { display: grid; place-items: center; position: absolute; right: .8rem; top: .8rem; width: 2.05rem; height: 2.05rem; border: 1px solid #fff8; border-radius: 100%; background: #2019269e; color: white; }
.play-emblem .icon { width: .94rem; height: .94rem; fill: currentColor; }
.small-pick { display: grid; grid-template-columns: 5rem 1fr; gap: .9rem; align-items: center; margin-top: 1rem; }
.small-pick .pick-picture { aspect-ratio: 1.4; border-radius: .25rem; }
.small-pick .pick-copy > span { color: var(--muted); }
.small-pick h3 { font-size: 1.06rem; }
.site-footer { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; margin-top: 3.6rem; padding: 1.5rem 0 2rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: .83rem; }
.site-footer > a:first-child { font: 700 1rem var(--serif); color: var(--wine); }
.site-footer > a:last-child { margin-left: auto; }
.page-title { margin: 3.2rem 0 2rem; }
.page-title > span, .page-title > div > span { color: var(--wine); font: italic 1.12rem var(--latin); }
.page-title h1, .compact-title h1, .reading-head h1, .media-detail h1 { font-size: clamp(2rem, 4.6vw, 3.45rem); margin-top: .4rem; line-height: 1.25; letter-spacing: .035em; }
.with-action, .archive-toolbar, .media-detail-copy { display: flex; gap: 1.2rem; align-items: center; justify-content: space-between; }
.archive-toolbar { flex-wrap: wrap; padding-bottom: 1rem; border-bottom: 1px solid #c6bab3; }
.filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.filters a { display: inline-flex; gap: .35rem; align-items: center; font-size: .9rem; padding: .36rem .75rem; color: var(--muted); border-radius: .3rem; }
.filters a:hover, .filters a[aria-current] { background: var(--rose); color: var(--wine-deep); }
.filters a[aria-current] { font-weight: 650; }
.search-form { display: flex; align-items: center; background: var(--white); border: 1px solid #cfc3bc; border-radius: .35rem; }
.search-form input { width: 12rem; min-width: 0; background: transparent; border: 0; padding: .44rem .72rem; font-size: .95rem; }
.search-form button { padding: .45rem .7rem; color: var(--wine); }
.result-summary, .quiet, .field-note { color: var(--muted); font-size: .9rem; }
.result-summary { margin: 1rem 0; }
.result-summary a { margin-left: .6rem; }
.archive-entries { max-width: 61rem; }
.archive-entries .entry-link { grid-template-columns: minmax(7.5rem, 22%) 1fr; }
.empty { padding: 2rem .3rem; color: var(--muted); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.2rem 1.5rem; margin-top: 1.5rem; }
.gallery-card { display: block; }
.gallery-picture { aspect-ratio: 1.55; margin-bottom: .9rem; border-radius: .4rem; }
.media-placeholder { display: grid; place-items: center; width: 100%; height: 100%; background: #392936; color: #dfc6b2; }
.media-placeholder .icon { width: 2.8rem; height: 2.8rem; }
.pager { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 1rem; margin-top: 1.8rem; }
.pager span { color: var(--muted); font-size: .9rem; }
.reading, .work-form, .media-detail { margin: 2.6rem auto 0; }
.reading { max-width: 47rem; }
.work-form { max-width: 48rem; }
.media-detail { max-width: 62rem; }
.crumb { display: flex; align-items: center; gap: .65rem; color: var(--muted); font-size: .88rem; margin-bottom: 1.6rem; }
.crumb a, .row-actions a, .row-actions button { color: var(--wine); }
.crumb a:hover, .row-actions a:hover, .row-actions button:hover { text-decoration: underline; }
.reading-head .meta { margin-bottom: .9rem; }
.comment-count { margin-left: .35rem; color: var(--wine); }
.standfirst { border-left: 2px solid #a35865; padding-left: .95rem; margin: 1.15rem 0 1.55rem; color: var(--muted); font-size: 1.04rem; }
.article-art { width: 100%; max-height: 24rem; object-fit: cover; border-radius: .35rem; margin: 1.45rem 0; }
.prose { font-size: 1.065rem; line-height: 1.95; overflow-wrap: anywhere; }
.prose p, .prose ul, .prose ol, .prose pre, .prose blockquote { margin: 1rem 0; }
.prose h2, .prose h3 { margin-top: 1.8rem; }
.prose img { max-width: 100%; height: auto; margin: 1rem 0; }
.prose a { color: var(--wine); text-decoration: underline; text-underline-offset: .2em; }
.prose pre { overflow: auto; max-width: 100%; padding: 1rem; background: #eee8df; border-radius: .3rem; }
.prose blockquote { border-left: 3px solid #b38c91; padding-left: 1rem; color: var(--muted); }
.comments { margin-top: 3.3rem; }
.comment-form { margin: 1.35rem 0; }
.comment-form input[name=nickname] { max-width: 20rem; }
.guest-note { border-top: 1px solid var(--rule); padding: 1rem 0; }
.guest-note p, .moderation-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.guest-note .meta { margin-bottom: .5rem; }
.guest-note .meta strong { color: var(--wine); font-size: .94rem; }
.viewer { background: #231f26; border-radius: .45rem; overflow: hidden; }
.viewer img, .viewer video { display: block; width: 100%; max-height: 72vh; object-fit: contain; }
.viewer video { min-height: 12rem; aspect-ratio: 16/9; }
.media-detail-copy { align-items: flex-start; margin-top: 1.55rem; }
.media-detail-copy h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin: .55rem 0; }
.media-detail-copy p { color: var(--muted); overflow-wrap: anywhere; }
.panel { background: var(--white); border: 1px solid var(--rule); border-radius: .55rem; padding: clamp(1.2rem, 3vw, 2.2rem); }
.login-panel { max-width: 26rem; margin: clamp(3rem, 8vw, 6rem) auto; }
.login-panel h1 { margin-top: 1.15rem; font-size: 1.75rem; }
.login-panel > p { color: var(--muted); margin: .6rem 0 1.2rem; }
.compact-title { margin: 0 0 1.4rem; }
.compact-title h1 { font-size: 2.2rem; }
.form-stack { display: grid; gap: 1.1rem; }
.form-stack label { display: block; font-weight: 600; font-size: .94rem; min-width: 0; }
.hint, .form-actions small { color: var(--muted); font-size: .83rem; font-weight: 400; }
.hint { margin-left: .35rem; }
.form-stack input:not([type=hidden]), .form-stack textarea, .form-stack select { width: 100%; display: block; margin-top: .36rem; border: 1px solid #cbbfb8; border-radius: .33rem; background-color: #fffefa; color: var(--ink); padding: .58rem .72rem; font-size: 1rem; line-height: 1.5; font-weight: 400; }
.form-stack textarea { resize: vertical; min-height: 4.2rem; }
.form-stack select { appearance: none; padding-right: 2rem; background: #fffefa url("chevron.svg") right .7rem center / .85rem no-repeat; }
.form-stack .writing-area { line-height: 1.8; }
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .85rem; }
.format-help { border-bottom: 1px solid var(--rule); padding-bottom: .85rem; font-size: .9rem; color: var(--muted); }
.format-help summary { color: var(--wine); }
.format-help p { margin-top: .55rem; }
.field-note { margin-top: -.6rem; }
.notice { border-left: 3px solid #8b4456; background: #f2e6e4; color: #53293c; padding: .72rem 1rem; margin: 1rem 0; border-radius: .2rem; }
.notice.error { background: #f6e0dc; color: #742e35; }
.count { background: var(--wine); color: white; border-radius: .8rem; padding: 0 .45rem; font-size: .78rem; }
.manage-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.15rem 0; border-bottom: 1px solid var(--rule); }
.manage-row > div:first-child { min-width: 0; }
.manage-row h2 { margin: .4rem 0 .2rem; font-size: 1.23rem; }
.manage-row p { color: var(--muted); font-size: .9rem; }
.manage-row .moderation-text { color: var(--ink); font-size: 1rem; margin: .45rem 0; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .9rem; flex-shrink: 0; font-size: .9rem; }
.row-actions .danger { color: #8c3f41; }
.error-code { color: var(--wine); font: italic 2rem var(--latin); }
@media (max-width: 960px) {
  .wrap { width: calc(100% - 3.3rem); }
  .masthead-inner { gap: 1rem; }
  .primary-nav { gap: 1.45rem; }
  .front-columns { gap: 1.7rem; grid-template-columns: minmax(0, 1.75fr) minmax(13rem, 1fr); }
  .shelf .section-heading small { display: none; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-copy { padding-inline: 2.35rem; width: 52%; }
}
@media (max-width: 735px) {
  .wrap { width: calc(100% - 2rem); }
  .masthead-inner { min-height: 4rem; grid-template-columns: auto 1fr auto; gap: .6rem; }
  .brand img { width: 2.15rem; height: 2.15rem; }
  .brand { gap: .45rem; }
  .brand strong { font-size: 1.18rem; }
  .brand small { font-size: .58rem; }
  .primary-nav { justify-content: center; gap: 1rem; }
  .primary-nav a { font-size: .88rem; }
  .primary-nav a[aria-current]::after { bottom: .48rem; }
  .header-tools { gap: .2rem; }
  .front-columns { grid-template-columns: 1fr; margin-top: 1.8rem; gap: 2.1rem; }
  .shelf .section-heading small { display: inline; }
  .feature-pick { max-height: 18rem; aspect-ratio: 2; }
  .entry-link { grid-template-columns: minmax(6.5rem, 23%) 1fr; }
}
@media (max-width: 620px) {
  .masthead-inner { grid-template-columns: 1fr auto; gap: 0; padding-top: .6rem; }
  .primary-nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; gap: 1.7rem; margin-top: .3rem; }
  .primary-nav a { padding: .5rem 0 .68rem; }
  .primary-nav a[aria-current]::after { bottom: 0; width: 100%; }
  .header-tools { grid-column: 2; grid-row: 1; gap: .55rem; }
  .desk-link { font-size: .86rem; min-height: 2rem; padding: .35rem .65rem; }
  .hero { margin-top: .95rem; min-height: auto; align-items: flex-end; }
  .hero-picture { height: 65%; }
  .hero-picture img { object-position: 52% 34%; }
  .hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(0deg,#251420 0%,#251420 36%,#251420df 46%,#25142035 64%,transparent 78%); }
  .hero-copy { padding: clamp(10.1rem, 41vw, 15.5rem) 1.5rem 1.55rem; width: 100%; }
  .hero-kicker { font-size: .77rem; }
  .hero h1 { font-size: clamp(1.65rem, 6.3vw, 2.4rem); margin: .5rem 0 .38rem; }
  .hero h1 br { display: none; }
  .hero-copy p { font-size: .88rem; }
  .hero-button { margin-top: .85rem; padding: .48rem .85rem; min-height: 2.25rem; font-size: .85rem; }
  .hero-frame { inset: .43rem; }
  .section-heading h2 { font-size: 1.45rem; gap: .5rem; }
  .section-heading h2 small { font-size: .96rem; }
  .section-heading { padding-bottom: .65rem; }
  .entry-link, .archive-entries .entry-link { grid-template-columns: minmax(5.7rem, 29%) 1fr; gap: .85rem; padding: .95rem 0; }
  .entry-picture { aspect-ratio: 1.18; }
  .entry-copy h3 { font-size: 1.15rem; margin: .32rem 0 .2rem; }
  .entry-copy p { font-size: .875rem; line-height: 1.55; }
  .meta { gap: .4rem; }
  .page-title { margin: 2rem 0 1.4rem; }
  .archive-toolbar { align-items: flex-start; gap: .9rem; }
  .filters a { padding: .32rem .55rem; }
  .search-form { width: 100%; }
  .search-form input { width: auto; flex: 1; }
  .gallery-grid { gap: 1.3rem .8rem; }
  .gallery-card h2 { font-size: 1.12rem; }
  .gallery-card p { font-size: .87rem; }
  .reading, .work-form, .media-detail { margin-top: 1.6rem; }
  .media-detail-copy, .manage-row { align-items: flex-start; flex-direction: column; }
  .manage-row, .archive-toolbar { gap: .75rem; }
  .form-pair { grid-template-columns: 1fr; }
  .site-footer { margin-top: 2.5rem; }
}
@media (max-width: 370px) {
  .wrap { width: calc(100% - 1.4rem); }
  .gallery-grid { grid-template-columns: 1fr; }
  .entry-copy .meta-rule { display: none; }
  .hero-copy { padding-inline: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
