:root {
  color-scheme: light;
  --ink: #192d42;
  --muted: #566a7c;
  --navy: #174c78;
  --blue: #17699b;
  --line: #d7e2eb;
  --paper: #fff;
  --tint: #edf5fa;
  font: 16px/1.6 "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: #f1f5f8; color: var(--ink); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .58; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid #2496c9; outline-offset: 2px;
}
[hidden] { display: none !important; }
.masthead { color: white; background: var(--navy); border-bottom: 4px solid #3c9abb; }
.mast-inner, .page, .site-foot, .bottom-nav { max-width: 1040px; margin: 0 auto; }
.mast-inner { display: flex; align-items: center; gap: 13px; min-height: 76px; padding: 12px 22px; }
.brand { display: inline-flex; align-items: center; min-width: 0; gap: 12px; white-space: nowrap; font-size: 1.55rem; font-weight: 800; letter-spacing: .04em; }
.brand [data-site-name] { overflow: hidden; text-overflow: ellipsis; }
.brand [data-brand-image] { width: 36px; height: 36px; object-fit: contain; flex: none; }
.notice-popup { max-height: 85vh; overflow: auto; }
.notice-popup h2 { font-size: 1.2rem; }
.notice-popup [data-notice-text] { white-space: pre-wrap; overflow-wrap: anywhere; margin: 1rem 0; }
.notice-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .7rem; }
.brand-mark, .environment, .draw-link, .mast-inner .account-trigger, .site-foot a { flex-shrink: 0; }
.site-foot [data-site-name], #forum-announcement, #recharge-instructions { overflow-wrap: anywhere; }
#forum-announcement, #recharge-instructions { white-space: pre-wrap; }
.brand-mark { position: relative; display: inline-block; width: 32px; height: 30px; border: 2px solid #d7f0fb; border-radius: 3px 5px 5px 3px; transform: rotate(-4deg); }
.brand-mark::before, .brand-mark::after { position: absolute; display: block; content: ""; background: #d7f0fb; }
.brand-mark::before { inset: 0 auto 0 5px; width: 2px; }
.brand-mark::after { top: 8px; left: 12px; width: 12px; height: 2px; box-shadow: 0 6px #d7f0fb; }
.environment { padding-left: 13px; border-left: 1px solid #94b6ca; font-size: .78rem; color: #d0e4ef; }
.account-trigger { border: 1px solid #9ac0d8; border-radius: 4px; background: transparent; color: inherit; }
.mast-inner .account-trigger { margin-left: auto; padding: 5px 12px; max-width: 45%; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.page { padding: 24px 22px 0; min-height: 60vh; }
.narrow { max-width: 790px; }
.page-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; margin: 6px 0 18px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.6rem,4vw,2.1rem); line-height: 1.3; letter-spacing: -.025em; }
h2 { font-size: 1.02rem; line-height: 1.4; }
.search { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .82rem; }
.catalog-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
input, select { min-width: 0; padding: 8px 10px; border: 1px solid #a9bccb; border-radius: 4px; background: var(--paper); color: var(--ink); }
.columns { display: grid; grid-template-columns: minmax(0,1fr) minmax(230px,29%); align-items: start; gap: 20px; }
.columns > .current { grid-area: 1 / 1; margin-bottom: 0; }
.columns > .archive { grid-area: 2 / 1; }
.columns > aside { grid-area: 1 / 2 / 3; }
.panel { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin-bottom: 18px; }
.section-heading { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 17px; background: var(--tint); border-top: 3px solid var(--blue); border-bottom: 1px solid var(--line); color: var(--navy); }
.count { font-size: .82rem; color: var(--muted); }
.archive .section-heading { background: #f6f8f9; border-top-color: #869aa8; color: #3b5264; }
.article-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 17px; gap: 15px; }
.article-row + .article-row, .aside-link + .aside-link { border-top: 1px solid var(--line); }
.article-row:hover, .aside-link:hover { background: #f4f9fc; }
.row-copy { min-width: 0; overflow-wrap: anywhere; }
.row-copy strong { font-size: 1rem; font-weight: 650; }
.row-copy p { font-size: .86rem; color: var(--muted); margin-top: 4px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.archive .article-row { padding-block: 10px; }
.archive .row-copy strong { font-size: .9rem; font-weight: 500; }
.article-label { display: inline-block; flex: none; padding: 1px 6px; border-radius: 4px; color: #fff; font-size: .78rem; font-weight: 650; line-height: 1.5; vertical-align: .06em; white-space: nowrap; }
.article-label[data-label="精选"] { background: #805919; }
.article-label[data-label="推荐"] { background: #a11986; }
.article-label[data-label="出售"] { background: #bd3425; }
.article-label[data-label="精品"] { background: #324eb7; }
.article-label[data-label="公告"] { background: #6b4091; }
.row-copy .article-label, .article-meta .article-label { margin-right: .45rem; }
.price { padding: 2px 8px; border-radius: 3px; background: #fff0d1; color: #79500a; white-space: nowrap; font-weight: 650; font-size: .8rem; }
.price.free { color: #286a53; background: #e8f5ec; }
.aside-link { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; font-size: .91rem; }
.aside-link span { color: #6d8394; }
.snapshot summary { cursor: pointer; padding: 11px 16px; font-weight: 650; }
.snapshot forum-draw-strip, .snapshot forum-draw-board { display: block; }
.empty { padding: 14px 17px; color: var(--muted); }
.primary, .secondary { display: inline-flex; justify-content: center; align-items: center; border: 1px solid transparent; border-radius: 4px; padding: 8px 15px; font-size: .95rem; font-weight: 650; }
.primary { background: var(--blue); color: white; }
.primary:hover:enabled { background: var(--navy); }
.secondary { color: var(--navy); background: white; border-color: #b7cbd9; }
.wide { width: 100%; }
.back, .link-action, .text-button { display: inline-block; color: var(--blue); font-size: .92rem; font-weight: 600; }
.back { margin-bottom: 13px; }
.link-action, .text-button { padding: 6px 0; }
.text-button { border: 0; background: transparent; }
.article-panel { padding: clamp(15px,3.6vw,32px); }
.article-heading { margin-bottom: 17px; }
.section-kicker, .article-meta { color: var(--muted); font-size: .83rem; }
.section-kicker { margin-bottom: 7px; }
.article-heading h1, .article-meta { overflow-wrap: anywhere; }
.article-meta { margin-top: 8px; }
.article-summary { padding: 12px 15px; background: #f1f6fa; border-left: 3px solid #8cb5d0; }
.article-summary, .article-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.article-body { margin-top: 20px; line-height: 1.8; }
.lock-box { margin-top: 20px; padding: 16px; background: #fff7e8; border: 1px solid #e8d6ac; border-radius: 5px; }
.lock-box p { margin-block: .5rem; }
.lock-box .link-action { margin-left: .7rem; }
.low-balance, .status { color: #8b401c; }
.status:not(:empty) { margin: .75rem 0; }
.article-message { margin-top: 14px; color: var(--muted); }
.support-body { padding: 17px; }
.support-body > p { margin-bottom: .65rem; }
.wallet-name { color: var(--muted); overflow-wrap: anywhere; }
.wallet-amount { font-size: 1.35rem; margin-right: 16px; }
.empty-qr, .qr { margin: 12px 0 0; }
.empty-qr { padding: 14px; background: #f4f7f9; color: var(--muted); }
.qr { display: block; width: min(260px,100%); height: auto; }
.site-foot { display: flex; justify-content: space-between; gap: 12px; padding: 12px 22px 76px; color: var(--muted); font-size: .83rem; }
.site-foot a { text-decoration: underline; }
.bottom-nav { position: fixed; z-index: 2; left: 0; right: 0; bottom: 0; display: flex; padding-bottom: env(safe-area-inset-bottom); background: white; border: 1px solid var(--line); box-shadow: 0 -3px 15px #25465a0d; color: var(--navy); }
.bottom-nav a, .bottom-nav button { display: block; min-width: 0; flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 12px 4px; border: 0; border-radius: 0; text-align: center; font-size: .87rem; font-weight: 600; }
.bottom-nav [aria-current=page] { box-shadow: inset 0 3px var(--blue); background: var(--tint); }
dialog { width: min(92vw,390px); padding: 24px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); box-shadow: 0 16px 42px #172c4b33; }
dialog::backdrop { background: #10263888; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; }
.dialog-head h2 { font-size: 1.25rem; }
.dialog-head button { border: 0; background: transparent; font-size: 1.6rem; color: var(--muted); }
.form-intro { font-size: .87rem; color: var(--muted); margin: 8px 0 15px; }
form label { display: grid; gap: 4px; margin: 10px 0; font-weight: 600; }
#member-form input { width: 100%; }
#auth-submit { margin-top: 5px; }
#auth-switch { margin-top: 7px; }
.identity-name { font-size: 1.25rem; font-weight: bold; margin-top: 12px; overflow-wrap: anywhere; }
.identity-coins { color: var(--muted); margin: 4px 0; }
.member-links { display:flex; flex-wrap:wrap; gap:0 .9rem; }
#member-pane .wide { margin-top: 12px; }
@media(max-width: 660px) {
  .mast-inner { min-height: 62px; padding-inline: 14px; gap: 8px; }
  .brand { gap: 8px; font-size: 1.15rem; }
  .brand-mark { width: 26px; height: 25px; }
  .environment { padding-left: 8px; font-size: .72rem; }
  .mast-inner .account-trigger { max-width: 35%; font-size: .82rem; padding: 4px 7px; }
  .page { padding: 15px 12px 0; }
  .columns { display: flex; flex-direction: column; gap: 0; }
  .columns > * { width: 100%; }
  .columns > .current { order: 0; margin-bottom: 14px; }
  .columns > aside { order: 1; }
  .columns > .archive { order: 2; }
  .page-heading { gap: 10px; }
  .catalog-filters { width: 100%; }
  .search { width: 100%; }
  .search input, .search select { flex: 1; }
  .section-heading, .article-row { padding-inline: 12px; }
  .site-foot { padding-inline: 12px; }
}

