:root {
  color-scheme: dark;
  --floor: #101d1b; --card: #192b27; --raised: #21372f;
  --ink: #f4eedc; --soft: #bdc8b8; --muted: #a5b4a5;
  --line: #3e5147; --gold: #e9c481; --mint: #bad1a7;
  --serif: "Iowan Old Style", "Songti SC", "Noto Serif CJK SC", "STSong", Georgia, serif;
  font: 100%/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--floor); color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
button:disabled { opacity: .55; cursor: wait; }
.wrap { width: min(100% - 3rem, 72rem); margin-inline: auto; }
.skip { position: absolute; top: .7rem; left: .7rem; z-index: 5; padding: .4rem 1rem; background: var(--gold); color: var(--floor); transform: translateY(-160%); }
.skip:focus { transform: none; }
.topbar { border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: clamp(1rem, 4vw, 3rem); min-height: 5.15rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; flex-shrink: 0; }
.brand > span { font-size: 1.08rem; letter-spacing: .1em; line-height: 1.12; font-weight: 650; }
.brand small { display: block; margin-top: .2rem; font: italic .81rem/1 var(--serif); color: var(--gold); letter-spacing: .02em; }
.menu { display: flex; align-self: stretch; gap: clamp(1.1rem, 3vw, 2.3rem); }
.menu a { display: flex; align-items: center; position: relative; padding-inline: .1rem; font-size: .94rem; color: var(--soft); }
.menu a:hover, .menu a[aria-current] { color: var(--gold); }
.menu a[aria-current]::after { position: absolute; content: ""; bottom: -.05rem; inset-inline: 0; height: .14rem; background: var(--gold); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .62rem 1.12rem; min-height: 2.65rem; border: 1px solid transparent; border-radius: .55rem; background: var(--gold); color: #252920; font-weight: 650; font-size: .95rem; line-height: 1.35; cursor: pointer; }
.button:hover { background: #f3d79f; }
.button.secondary { background: transparent; border-color: #68786b; color: var(--ink); }
.button.secondary:hover { background: var(--raised); }
.write-link { margin-left: auto; white-space: nowrap; }
.write-link > span { font-size: 1.22rem; line-height: 1; }
#content { flex: 1; padding-block: clamp(1.15rem, 3.2vw, 2.7rem) 3.5rem; }
#content:focus { outline: 0; }
.hero { position: relative; isolation: isolate; display: grid; align-items: center; min-height: clamp(18rem, 24vw, 21.5rem); border: 1px solid #536452; border-radius: 1rem; background: #20372e; overflow: hidden; }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #192f28f5, #182b24ce 29%, #192c2659 49%, transparent 72%); }
.hero-copy { padding: clamp(1.6rem, 4vw, 3.75rem); max-width: 60%; z-index: 1; }
.hero-wordmark { display: block; font: italic clamp(1.7rem, 3.2vw, 2.8rem)/1.1 var(--serif); color: var(--gold); letter-spacing: -.04em; }
.hero h1 { margin: .38rem 0 .8rem; font: 650 clamp(2.35rem, 5vw, 4.65rem)/1.2 var(--serif); letter-spacing: .015em; }
.hero p { margin: 0; color: #d8e1d0; max-width: 29rem; }
.hero-art { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 32%; }
.hero-art.fallback { object-fit: contain; object-position: 90% center; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 16.5rem; align-items: start; gap: clamp(1.25rem, 3vw, 2.6rem); margin-top: 2.2rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem 1rem; margin-bottom: .9rem; }
h2, .section-head h1 { margin: 0; font: 600 1.6rem/1.4 var(--serif); }
.section-head small, .meta, .field-help, .sub { color: var(--muted); font-size: .9rem; }
.directory { padding: 1.15rem 1.2rem .55rem; background: #182a25; border: 1px solid var(--line); border-radius: .85rem; }
.directory h2 { margin-bottom: .45rem; font-size: 1.22rem; }
.channel { display: flex; align-items: center; gap: .7rem; padding: .7rem 0; border-top: 1px solid #32473b; }
.channel:first-of-type { border-top: 0; }
.channel:hover strong, .back:hover, .meta-link:hover { color: var(--gold); text-decoration: underline; }
.channel img { width: 1.3rem; }
.channel strong, .channel small { display: block; }
.channel small { color: var(--muted); font-size: .8rem; }
.glyph { display: inline-grid; place-items: center; width: 2rem; height: 2rem; color: var(--gold); background: #344237; border-radius: .55rem; flex: none; }
.glyph svg { width: 1.12rem; height: 1.12rem; }
.loading { padding: 2.2rem 1rem; text-align: center; color: var(--soft); }
.empty { padding: 2.4rem 1.2rem; text-align: center; border: 1px dashed #526558; background: #15251f; border-radius: .8rem; }
.empty img { width: 2.45rem; height: 2.45rem; margin: 0 auto .6rem; }
.empty h3 { margin: .25rem 0; font-size: 1.1rem; }
.empty p { margin: .35rem 0 1rem; color: var(--soft); }
.feed { display: grid; gap: .8rem; }
.post-card { position: relative; border: 1px solid var(--line); border-radius: .8rem; background: var(--card); padding: 1rem 1.2rem; }
.post-card:hover { border-color: #758574; }
.post-card h3 { font-size: 1.16rem; margin: .45rem 0 .22rem; line-height: 1.45; overflow-wrap: anywhere; }
.post-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: .8rem; }
.post-card .excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; color: var(--soft); overflow-wrap: anywhere; }
.meta { display: flex; align-items: center; gap: .35rem .65rem; flex-wrap: wrap; line-height: 1.45; }
.avatar { width: 1.63rem; height: 1.63rem; border-radius: .5rem; background: #2e4235; object-fit: cover; flex: none; }
.tag { display: inline-flex; color: var(--mint); background: #2e4034; font-size: .8rem; border-radius: .3rem; padding: .1rem .45rem; }
.thumbs { display: flex; gap: .4rem; overflow: hidden; margin-top: .7rem; }
.thumbs img { width: clamp(3.4rem, 12%, 5rem); aspect-ratio: 1; object-fit: cover; border-radius: .35rem; }
.more { justify-self: start; margin-top: .3rem; }
.section-intro { border-bottom: 1px solid var(--line); padding-bottom: 1.2rem; }
.section-intro h1, .editor h1, .article h1 { margin: .45rem 0; font: 650 clamp(2rem, 4vw, 3.25rem)/1.28 var(--serif); overflow-wrap: anywhere; }
.section-intro p { margin: .3rem 0 0; color: var(--soft); }
.back { display: inline-block; font-size: .9rem; color: var(--muted); }
.narrow { max-width: 49rem; margin-inline: auto; }
.article, .editor { margin-top: 1rem; padding: clamp(1.3rem, 4vw, 2.6rem); border: 1px solid var(--line); border-radius: 1rem; background: var(--card); }
.article .meta { margin-top: .9rem; }
.article-body { margin: 1.65rem 0; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.article-images { display: grid; gap: 1rem; }
.article-images img { max-height: 78vh; width: auto; height: auto; margin: auto; border-radius: .4rem; }
.article-images a { display: block; }
.editor h1 { margin-top: 0; }
.editor fieldset { margin: 1.4rem 0 0; padding: 0; border: 0; min-width: 0; }
.field { margin: 0 0 1.1rem; }
.field-label { display: block; margin-bottom: .32rem; font-weight: 600; }
.field-label small { color: var(--muted); font-weight: 400; margin-left: .4rem; }
input[type=text], select, textarea { display: block; width: 100%; padding: .65rem .8rem; color: var(--ink); background: #10211c; border: 1px solid #627667; border-radius: .45rem; }
select { width: min(100%, 15rem); }
textarea { resize: vertical; }
textarea::placeholder, input::placeholder { color: #a0ad9e; }
.field-help { margin: .4rem 0; }
.upload { position: relative; display: inline-flex; cursor: pointer; }
.upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload:focus-within { outline: 2px solid var(--gold); outline-offset: 3px; }
.previews { display: flex; flex-wrap: wrap; gap: .65rem; margin: .6rem 0; }
.preview { position: relative; width: 5rem; height: 5rem; }
.preview img { width: 100%; height: 100%; object-fit: cover; border-radius: .4rem; }
.remove { position: absolute; right: -.25rem; top: -.25rem; width: 1.65rem; height: 1.65rem; line-height: 1; border-radius: 50%; border: 1px solid #879080; color: white; background: #203128; }
.publish-line { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .7rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.message { color: #f4c0a5; white-space: pre-line; }
.message:empty { display: none; }
dialog { color: var(--ink); background: var(--card); border: 1px solid #7b8977; border-radius: .9rem; padding: 1.5rem; max-width: min(calc(100% - 2rem), 31rem); }
dialog::backdrop { background: #07100ddc; }
dialog h2 { font-size: 1.4rem; }
dialog p { color: var(--soft); }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: flex-end; }
.foot { border-top: 1px solid var(--line); display: flex; gap: .8rem; align-items: center; justify-content: space-between; padding-block: 1.3rem; color: var(--muted); font-size: .85rem; }
.foot [lang=en] { font: italic 1.2rem var(--serif); color: var(--gold); }
@media (max-width: 48rem) {
  .wrap { width: calc(100% - 2rem); }
  .head-row { gap: .8rem; min-height: 4.5rem; flex-wrap: wrap; }
  .layout { grid-template-columns: 1fr; gap: 1.3rem; margin-top: 1.5rem; }
  .directory { order: 1; }
  .menu { gap: 1.1rem; margin-left: auto; }
  .write-link { margin-left: .3rem; }
  .hero { min-height: 13rem; }
  .hero-copy { padding: 1.35rem; }
}
@media (max-width: 34rem) {
  .head-row { display: grid; grid-template-columns: 1fr auto; gap: 0; padding-top: .6rem; }
  .brand img { width: 2rem; height: 2rem; }
  .write-link { grid-column: 2; grid-row: 1; min-height: 2.5rem; padding: .4rem .8rem; }
  .menu { grid-column: 1 / -1; justify-content: space-between; margin: .22rem 0 0; }
  .menu a { padding: .56rem .3rem; }
  .hero { min-height: 16.5rem; align-items: start; }
  .hero::after { background: linear-gradient(180deg, #1d332b 0%, #1d332bf5 26%, #1d332b8a 45%, transparent 68%); }
  .hero-copy { max-width: none; padding: 1.2rem 1.1rem; }
  .hero-wordmark { font-size: 1.45rem; }
  .hero h1 { font-size: 2.15rem; }
  .hero p { max-width: 100%; font-size: .91rem; }
  .hero-art { inset: auto 0 0; width: 100%; height: 66%; object-position: 65% 55%; mask-image: linear-gradient(180deg, transparent, black 21%); }
  .post-card { padding: .85rem; }
}
