:root {
  color-scheme: light;
  --white: #ffffff;
  --ink: #121212;
  --line: #dedede;
  --muted: #545454;
  --display: "Instrument Serif", "Songti SC", "Noto Serif CJK SC", "SimSun", Georgia, serif;
  --sans: "Inter", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 120px; }
body { margin: 0; background: var(--white); color: var(--ink); font: 15px/1.7 var(--sans); }
::selection { background: var(--ink); color: var(--white); }
a { color: inherit; text-underline-offset: .25em; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.2; }
.wrap { width: min(1520px, calc(100% - clamp(32px, 8vw, 144px))); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: -5rem; z-index: 3; background: var(--white); padding: 8px 14px; }
.skip:focus { top: 1rem; }
.header { position: sticky; top: 0; z-index: 2; background: var(--white); border-bottom: 1px solid var(--line); }
.nav-shell { display: flex; align-items: stretch; min-height: 100px; column-gap: clamp(24px, 5.4vw, 88px); }
.brand { display: grid; align-content: center; justify-items: start; white-space: nowrap; text-decoration: none; font: 700 clamp(25px, 3.1vw, 44px)/1 var(--display); }
.brand small { margin-top: 8px; font: 650 10px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.nav-shell nav, .account { display: flex; align-items: stretch; white-space: nowrap; }
.nav-shell nav { gap: clamp(12px, 2.5vw, 42px); }
.nav-shell nav a, .account a, .link-button { display: inline-flex; align-items: center; font-weight: 650; text-decoration: none; }
.nav-shell nav a { position: relative; }
.nav-shell nav a:hover, .account a:hover, .link-button:hover { text-decoration: underline; }
.nav-trigger { display: flex; align-items: stretch; height: 100%; }
.nav-trigger > a[aria-current]::after, .nav-shell nav > a[aria-current]::after,
.nav-trigger:has(.nav-toggle[aria-expanded="true"]) > a::after {
  position: absolute; inset: auto 0 0; height: 2px; background: var(--ink); content: "";
}
.nav-toggle { display: grid; place-items: center; min-width: 28px; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
.nav-toggle span { width: 6px; height: 6px; border: solid currentColor; border-width: 0 1px 1px 0; transform: translateY(-2px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span { transform: translateY(2px) rotate(225deg); }
.nav-panel { position: absolute; inset: 100% 0 auto; max-height: 70vh; overflow: auto; background: var(--white); border-block: 1px solid var(--line); }
.nav-panel-inner { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 2.45fr); white-space: normal; }
.nav-categories { display: grid; align-content: start; gap: 4px; padding: clamp(18px, 4vw, 46px) 18px clamp(18px, 4vw, 46px) 0; }
.nav-shell .nav-categories a { width: fit-content; min-height: 38px; font-weight: 500; }
.nav-shell .nav-categories .nav-all { margin-bottom: 8px; font-weight: 700; }
.nav-categories a[aria-current] { text-decoration: underline; }
.nav-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); padding: clamp(18px, 3vw, 34px); border-left: 1px solid var(--line); }
.image-placeholder { display: grid; place-items: center; aspect-ratio: 16 / 10; border: 1px solid var(--line); color: var(--muted); font-size: 13px; letter-spacing: .1em; }
.account { margin-left: auto; border-left: 1px solid var(--line); }
.account > a, .link-button { padding-inline: clamp(12px, 1.9vw, 30px); }
.account > a + a, .account form { border-left: 1px solid var(--line); }
.account form { display: flex; margin: 0; }
.link-button { background: transparent; border: 0; color: inherit; cursor: pointer; }
main { min-height: 65vh; padding-block: clamp(24px, 3.8vw, 56px) 64px; }
.button { display: inline-flex; width: fit-content; min-height: 44px; align-items: center; justify-content: center; gap: 12px; padding: 9px 18px; border: 1px solid var(--ink); cursor: pointer; text-decoration: none; font-weight: 650; line-height: 1.35; text-align: center; }
.button:hover { text-decoration: underline; }
.button.small { min-height: 35px; padding: 6px 13px; font-size: 13px; }
.button.primary { color: var(--white); background: var(--ink); }
.button.outline { background: var(--white); color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); align-items: center; gap: clamp(18px, 4vw, 64px); padding-block: 0 clamp(24px, 4vw, 56px); border-bottom: 1px solid var(--line); }
.hero-copy { padding: 12px 0 24px; }
.hero h1 { font: 700 clamp(50px, 7vw, 112px)/1.05 var(--display); letter-spacing: -.045em; white-space: nowrap; }
.hero-description { max-width: 23em; margin-top: clamp(15px, 2vw, 26px); font-size: clamp(15px, 1.32vw, 19px); line-height: 1.8; }
.hero .actions { margin-top: clamp(18px, 2.3vw, 32px); }
.account > .register-link { font-weight: 750; }
.home-section { margin-top: clamp(30px, 4vw, 58px); }
.section-heading, .prompt-strip, .page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.section-heading { margin-bottom: 18px; }
.section-heading h2, .prompt-strip h2 { font: 700 clamp(24px, 3vw, 42px)/1.25 var(--display); }
.section-heading a { font-weight: 650; }
.board-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.board { display: block; min-width: 0; padding: 23px clamp(16px, 2.4vw, 36px) 27px; text-decoration: none; }
.board + .board { border-left: 1px solid var(--line); }
.board:hover .board-top span { background: var(--ink); color: var(--white); }
.board-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.board-top span { display: grid; place-items: center; width: 30px; height: 30px; font-size: 19px; flex: none; }
.board h3 { font-size: clamp(17px, 1.7vw, 24px); font-weight: 650; }
.board p, .prompt-strip p { margin-top: 8px; font-size: 14px; }
.prompt-strip { margin-top: 30px; padding: 18px 0; }
.prompt-strip h2 { font-size: 24px; }
footer { border-top: 1px solid var(--line); font-size: 13px; }
.foot { padding-block: 25px; display: flex; align-items: center; gap: 20px; justify-content: space-between; }
.foot span { font: 700 17px var(--display); }
.foot small { font: 650 11px var(--sans); }
.page-heading { margin: 14px 0 25px; }
.page-heading h1 { font: bold clamp(32px, 5vw, 50px)/1.22 var(--display); overflow-wrap: anywhere; }
.page-heading p { margin-top: 8px; color: var(--ink); max-width: 60ch; }
.page-heading > .button { flex: none; }
.empty, .form-panel, .admin-item, .feed-item, .reply { background: var(--white); border: 1px solid var(--line); }
.empty { padding: clamp(24px, 5vw, 55px); text-align: center; }
.empty h2 { font-size: 21px; }
.empty p { margin-top: 8px; color: var(--ink); }
.empty .button { margin-top: 17px; }
.feed, .gallery-grid { display: grid; gap: 12px; }
.gallery-grid { grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); }
.feed-item { overflow: hidden; }
.feed-item > a { display: block; color: var(--ink); text-decoration: none; }
.feed-item:hover { border-color: var(--ink); }
.feed-item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--white); }
.feed-copy, .admin-item, .reply { padding: 17px 20px; }
.feed-item h2, .admin-item h2 { font-size: 20px; margin: 5px 0; overflow-wrap: anywhere; }
.feed-item p, .muted, .post-meta { color: var(--ink); overflow-wrap: anywhere; }
.post-meta, .muted { font-size: 13px; }
.form-panel { padding: clamp(20px, 4vw, 36px); max-width: 740px; margin-inline: auto; }
.form-panel.narrow { max-width: 480px; }
.form-panel .page-heading { margin-top: 0; }
.form-panel h1 { font-size: 36px; }
form:not(.account form) { display: grid; align-items: start; gap: 15px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 650; }
input, select, textarea { min-width: 0; width: 100%; min-height: 42px; background: var(--white); color: var(--ink); border: 1px solid var(--ink); padding: 8px 10px; }
input::placeholder, textarea::placeholder { color: var(--ink); }
input::file-selector-button { color: var(--ink); background: var(--white); border: 1px solid var(--ink); font: inherit; cursor: pointer; }
textarea { resize: vertical; }
label.check { display: flex; align-items: start; gap: 9px; font-weight: 400; }
.check input { flex: none; width: 17px; height: 17px; min-height: 0; accent-color: var(--ink); margin: 4px 0 0; }
.auth-switch { margin-top: 18px; font-size: 14px; }
.prose { max-width: 790px; margin-inline: auto; overflow-wrap: anywhere; }
.prose h2 { font-size: 22px; margin: 26px 0 10px; }
.prose .page-heading { margin-bottom: 10px; }
.crumb { font-size: 14px; }
.user-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.post > .user-text { margin: 23px 0; }
.post-images { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 12px; }
.post-images a, .post-images img { display: block; width: 100%; }
.post-images img { max-height: 680px; object-fit: contain; background: var(--white); }
.replies { margin-top: 30px; border-top: 1px solid var(--line); }
.replies > form, .replies details, .reply { margin-top: 13px; }
.replies summary { color: var(--ink); cursor: pointer; margin-bottom: 10px; }
.notice { margin-block: 10px 15px; padding: 9px 12px; background: var(--white); color: var(--ink); border-left: 3px solid var(--ink); }
.notice.error { border: 1px solid var(--ink); }
.tabs, .paging { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.tabs a { padding: 7px 13px; text-decoration: none; border: 1px solid var(--line); }
.tabs a[aria-current] { background: var(--ink); color: white; border-color: var(--ink); }
form.moderation-form { margin-top: 14px; }
form.search { grid-template-columns: minmax(0, 270px) auto; align-items: end; justify-content: start; margin-bottom: 15px; }
.admin-item > .button { margin-top: 10px; }

@media (max-width: 880px) {
  .nav-shell { column-gap: 20px; min-height: 84px; }
  .nav-shell nav { gap: 13px; }
  .nav-shell nav a, .account a, .link-button { font-size: 13px; }
  .hero { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .hero h1 { font-size: clamp(39px, 7.7vw, 66px); }
}
@media (max-width: 700px) {
  .nav-shell { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 6px; min-height: 0; }
  .brand { min-height: 69px; }
  .brand small { font-size: 9px; margin-top: 6px; letter-spacing: .1em; }
  .nav-shell nav { grid-row: 2; grid-column: 1 / -1; justify-content: space-between; gap: 3px; min-height: 43px; border-top: 1px solid var(--line); }
  .nav-toggle { min-width: 22px; }
  .account { flex-wrap: wrap; align-content: center; justify-content: end; border-left: 0; }
  .account > a, .link-button { min-height: 36px; padding-inline: 9px; }
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding: 7px 0 5px; }
  .hero h1 { font-size: clamp(44px, 11vw, 72px); }
  .nav-panel-inner { grid-template-columns: minmax(0, 1fr); }
  .nav-categories { padding: 14px 0 12px; }
  .nav-images { border-left: 0; border-top: 1px solid var(--line); padding: 14px 0 18px; }
  .board-grid { grid-template-columns: 1fr; }
  .board { padding: 14px 0 16px; }
  .board + .board { border-left: 0; border-top: 1px solid var(--line); }
  .prompt-strip { align-items: start; flex-direction: column; gap: 13px; }
  .page-heading { gap: 10px; }
  .page-heading > .button { flex-shrink: 1; }
}

