:root {
  color-scheme: dark;
  --bg: #101114;
  --panel: #18191f;
  --stroke: #2a2c34;
  --ink: #f6f6ef;
  --muted: #b3b4be;
  --lime: #d8ff53;
  --violet: #bfadff;
  --round: 14px;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 1rem; line-height: 1.6; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
.wrap { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: absolute; z-index: 5; padding: 8px 16px; background: var(--lime); color: #131610; }
.top { border-bottom: 1px solid var(--stroke); }
.bar { min-height: 72px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; white-space: nowrap; }
.brand-icon { display: grid; place-items: center; width: 36px; height: 36px; background: var(--lime); color: #1c2012; border-radius: 9px; }
.site-identity, .header-actions { display: flex; align-items: center; gap: 10px; }
.site-identity .brand { min-height: 44px; }
.header-actions { justify-content: flex-end; }
.nav-pages { display: flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid var(--stroke); border-radius: 11px; background: var(--panel); }
.nav-pages a, .section-switch { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding-inline: 12px; border-radius: 7px; color: var(--muted); font-size: .9rem; white-space: nowrap; }
.nav-pages a:hover, .section-switch:hover, .footer a:hover { color: var(--lime); }
.section-switch { border: 1px solid var(--stroke); }
.section-switch:hover { border-color: var(--lime); }
.nav-pages a[aria-current] { background: var(--lime); color: var(--bg); font-weight: 700; }
.nav-pages a[aria-current]:hover { color: var(--bg); }
.header-actions .nav-random:hover { border-color: var(--lime); color: var(--lime); }
.section-switch svg { width: 16px; height: 16px; flex: none; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 42px; padding: 8px 15px; border: 1px solid transparent; border-radius: 9px; font-weight: 700; font-size: .9rem; white-space: nowrap; }
.header-actions .button { min-height: 44px; }
.button svg { width: 18px; height: 18px; }
.header-action { min-height: 44px; background: #242818; border-color: #404922; color: var(--lime); }
.header-action:hover { background: #343b20; }
.primary { background: var(--lime); color: #16190e; }
.primary:hover { background: #e8ff9a; }
.general-site { --lime: #dcc4ff; }
.general-site .header-action { background: #2c223a; border-color: #564268; }
.general-site .header-action:hover { background: #392b4b; }
.general-site .primary:hover { background: #eadcff; }
.quiet { background: #1b1c23; border-color: var(--stroke); color: var(--ink); }
.quiet:hover { border-color: #6d707d; }

.hero { position: relative; isolation: isolate; display: flex; align-items: center; min-height: 420px; padding: 44px; margin-top: 34px; overflow: hidden; border: 1px solid #282a37; border-radius: 22px; background: #10111a; }
.hero::after { position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #151622 3%, #13141fcc 41%, #11121a22 72%, transparent); content: ""; }
.hero-art { position: absolute; z-index: -2; inset: 0 0 0 auto; width: 59%; height: 100%; object-fit: cover; object-position: 58% 48%; }
.hero-copy { width: min(100%, 510px); }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--lime); font-weight: 700; font-size: .875rem; }
.eyebrow svg { width: 17px; height: 17px; }
.hero h1 { font-size: clamp(3rem, 7.15vw, 5.8rem); line-height: 1.08; letter-spacing: -.07em; font-weight: 900; margin: 13px 0 18px; }
.hero h1 span { color: var(--lime); }
.hero p { color: #d2d1db; font-size: clamp(.98rem, 2vw, 1.125rem); }
.mobile-only { display: none; }
.search { display: flex; align-items: center; gap: 12px; margin-top: 29px; padding: 6px 6px 6px 16px; border: 1px solid #4b4e5c; background: #1c1d27; border-radius: 12px; }
.search:focus-within { border-color: var(--lime); }
.search svg { flex: none; color: var(--muted); }
.search input { min-width: 0; width: 100%; padding: 2px 0; border: 0; outline: none; color: var(--ink); background: transparent; }
.search input::placeholder { color: #a6a6b3; opacity: 1; }
kbd { align-self: center; padding: 0 7px; color: #c6c6d0; border: 1px solid #494b59; border-radius: 4px; background: #252733; }
.shortcuts { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 17px; color: var(--muted); font-size: .875rem; }
.shortcuts > span { margin-right: 4px; }
.shortcuts a { padding: 2px 9px; background: #232431; border: 1px solid #353744; border-radius: 6px; }
.shortcuts a:hover { color: var(--lime); }
.other-hero { gap: 25px; justify-content: space-between; background: radial-gradient(ellipse at 85% 16%, #39284b, transparent 53%), #151622; }
.other-hero::after { display: none; }
.other-feature { width: min(100%, 360px); display: grid; gap: 8px; }
.other-feature .card { background: #1f1b2ae6; }
.other-feature .card:hover { background: #292236; }
.other-feature .card-link { padding: 10px 12px; align-items: center; }
.other-feature .mark { width: 42px; height: 42px; font-size: 1.25rem; }
.other-feature .card-body { justify-content: center; }
.other-feature .card h3 { margin-bottom: 0; }
.other-feature .card p, .other-feature .card-meta, .other-hero .shortcuts { display: none; }

.catalog { margin-top: 48px; scroll-margin-top: 18px; }
.section-head, .filter-row { display: flex; align-items: end; justify-content: space-between; gap: 15px; }
.section-head h2 { margin-top: 3px; font-size: clamp(1.65rem, 3vw, 2.2rem); letter-spacing: -.035em; }
.filter-row { flex-wrap: wrap; margin-top: 21px; padding-bottom: 17px; border-bottom: 1px solid var(--stroke); }
.chips, .aliases { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 37px; padding: 4px 12px; border: 1px solid var(--stroke); border-radius: 8px; color: #c5c6ce; background: #191a20; white-space: nowrap; font-size: .875rem; }
.chip:hover { border-color: #737685; color: var(--ink); }
.chip.selected { border-color: #506126; background: #29321a; color: var(--lime); font-weight: 700; }
.chip span { color: var(--violet); }
.chip.selected span { color: inherit; }
.game-filter { display: flex; gap: 6px; }
.catalog-filters { flex-wrap: wrap; max-width: 100%; }
.catalog-filters select { width: min(13rem, 100%); }
.game-filter select { appearance: none; min-height: 37px; padding: 4px 34px 4px 10px; max-width: 220px; border: 1px solid var(--stroke); border-radius: 8px; background: linear-gradient(45deg, transparent 50%, var(--muted) 50%) right 15px center / 5px 5px no-repeat, linear-gradient(135deg, var(--muted) 50%, transparent 50%) right 10px center / 5px 5px no-repeat, #191a20; color: var(--ink); font-size: .875rem; }
.game-filter .button { min-height: 37px; padding: 4px 11px; }
.count { margin: 16px 0 12px; color: var(--muted); font-size: .875rem; }
.count a { margin-left: 12px; color: var(--lime); text-decoration: underline; }
.companion-results { margin-top: 24px; scroll-margin-top: 18px; }
.companion-results .section-head { align-items: baseline; flex-wrap: wrap; margin-bottom: 12px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { min-width: 0; background: var(--panel); border: 1px solid var(--stroke); border-radius: var(--round); transition: border-color .18s, background .18s; }
.card:hover { background: #1e2029; border-color: #737685; }
.card-link { display: flex; align-items: start; height: 100%; gap: 14px; padding: 16px; border-radius: inherit; }
.card-body { display: flex; min-width: 0; flex-direction: column; height: 100%; }
.mark { flex: none; width: 62px; height: 62px; display: grid; place-items: center; border: 1px solid; border-radius: 10px; font: 900 1.75rem/1 ui-monospace, Consolas, monospace; background-image: radial-gradient(currentColor .45px, transparent .75px); background-size: 8px 8px; }
.mark span { padding: 4px; background: var(--mark-bg); }
.green { --mark-bg: #252e1b; background-color: var(--mark-bg); color: #d9ff70; border-color: #455530; }
.purple { --mark-bg: #302742; background-color: var(--mark-bg); color: #d1baff; border-color: #554571; }
.orange { --mark-bg: #392920; background-color: var(--mark-bg); color: #ffc080; border-color: #654735; }
.category { align-self: flex-start; color: var(--violet); font-size: .81rem; font-weight: 700; }
.card h3 { margin: 2px 0 4px; font-size: 1.125rem; line-height: 1.4; }
.card p { margin-bottom: 11px; color: var(--muted); font-size: .9rem; line-height: 1.6; }
.card-meta { display: flex; flex-wrap: wrap; gap: 5px 12px; color: var(--muted); font-size: .825rem; margin-top: auto; }
.empty, .join { padding: 25px; background: var(--panel); border: 1px solid var(--stroke); border-radius: var(--round); }
.empty p, .join p { color: var(--muted); margin: 3px 0 13px; }
.join { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 36px; }
.join h2 { font-size: 1.3rem; }
.join p { margin-bottom: 0; }
.footer { margin-top: 64px; border-top: 1px solid var(--stroke); color: var(--muted); }
.footer .wrap { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 12px 20px; padding-block: 20px; font-size: .875rem; }
.footer .brand { color: var(--ink); }
.footer .brand-icon { width: 27px; height: 27px; border-radius: 6px; }
.footer .brand-icon svg { width: 16px; }
.footer nav { margin-left: auto; display: flex; align-items: flex-start; flex-wrap: wrap; gap: 12px 18px; padding-top: 4px; }
.bookmark { max-width: 230px; }
.bookmark summary { color: var(--ink); cursor: pointer; }
.bookmark p { margin: 5px 0 8px; }

.crumb { display: flex; gap: 10px; flex-wrap: wrap; margin: 32px 0 18px; color: var(--muted); font-size: .9rem; }
.crumb a:hover, .back:hover { color: var(--lime); }
.reading { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; align-items: start; }
.article, .related, .form-page { border: 1px solid var(--stroke); background: var(--panel); border-radius: var(--round); }
.article { min-width: 0; padding: clamp(19px, 4vw, 42px); }
.article-head { display: flex; gap: 18px; align-items: center; }
.article h1, .form-page h1 { font-size: clamp(1.9rem, 5vw, 3.25rem); letter-spacing: -.04em; line-height: 1.18; margin: 4px 0 8px; overflow-wrap: anywhere; }
.detail-mark { width: clamp(56px, 8vw, 90px); height: clamp(56px, 8vw, 90px); font-size: 2.6rem; }
.lead { color: #d8d8e2; font-size: 1.125rem; margin: 24px 0 14px; }
.aliases { color: var(--muted); font-size: .875rem; }
.aliases .chip { min-height: 30px; white-space: normal; }
.article section { margin-top: 29px; border-top: 1px solid var(--stroke); padding-top: 20px; }
.article section h2, .related h2 { margin-bottom: 8px; font-size: 1.25rem; }
.article section p, blockquote { color: #dedee7; line-height: 1.8; }
blockquote { margin: 13px 0 0; border-left: 3px solid var(--violet); border-radius: 0 7px 7px 0; background: #222130; padding: 10px 15px; }
.article ul { margin: 0; padding-left: 1.25em; }
.article li { padding: 5px 0; }
.article li a, .sponsor a { color: var(--lime); text-decoration: underline; text-underline-offset: 3px; }
.article-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.entry-pagination { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; border-top: 1px solid var(--stroke); margin-top: 24px; padding-top: 16px; }
.entry-pagination a { display: grid; align-content: start; gap: 4px; min-height: 56px; padding: 10px 12px; border: 1px solid var(--stroke); border-radius: 9px; overflow-wrap: anywhere; }
.entry-pagination a[rel="next"] { grid-column: 2; text-align: right; }
.entry-pagination a:hover { border-color: var(--lime); }
.entry-pagination span { color: var(--muted); font-size: .8rem; }
.entry-pagination strong { color: var(--ink); font-size: .95rem; }
.text-link:hover { color: var(--lime); text-decoration: underline; }
.moments { padding-top: clamp(26px, 5vw, 54px); }
.moments h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -.04em; }
.moments-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin-top: 16px; }
.moment-sections { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--stroke); border-radius: 12px; background: var(--panel); }
.moment-sections a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; color: var(--muted); font-weight: 700; }
.moment-sections a:hover { color: var(--ink); }
.moment-sections a[aria-current="page"] { background: var(--lime); color: #202717; }
.moment-search { margin: 0; width: min(440px, 100%); }
.moment-filters { margin-top: 22px; }
.moment-card { display: flex; flex-direction: column; overflow: hidden; }
.moment-body { display: flex; flex: 1; flex-direction: column; padding: 17px; min-width: 0; }
.moment-cover { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; background: linear-gradient(140deg, #302740, #1d2425 64%, #39422e); }
.moment-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.moment-play { position: relative; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: #101113db; border: 1px solid #ffffff75; color: #fff; }
.moment-watch-label { position: absolute; right: 9px; bottom: 9px; padding: 2px 8px; border-radius: 5px; color: #fff; background: #101113e8; font-size: .825rem; }
.moment-cover:hover .moment-play { background: var(--lime); border-color: var(--lime); color: #202717; }
.moment-cover:focus-visible { outline-offset: -4px; }
.moment-card .moment-meta { margin-bottom: 5px; color: var(--violet); font-size: .8rem; }
.moment-card h3 { overflow-wrap: anywhere; }
.moment-quote { background: linear-gradient(145deg, #21202a, var(--panel) 62%); }
.moment-card blockquote { overflow-wrap: anywhere; }
.moment-entry { align-self: start; padding-top: 12px; margin-top: auto; color: var(--lime); font-size: .9rem; }
.moment-card-actions { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; margin-top: auto; padding-top: 12px; }
.moment-card-actions .moment-entry { min-width: 0; padding-top: 0; overflow-wrap: anywhere; }
.moment-alternate { color: var(--muted); font-size: .875rem; }
.entry-source-heading { margin-top: 16px; font-size: 1rem; }
.entry-source-links { padding-left: 1.25em; overflow-wrap: anywhere; }
.entry-source-links a { text-decoration: underline; text-underline-offset: 3px; }
.sentence-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.more-examples { margin-top: 12px; }
.more-examples summary { color: var(--muted); cursor: pointer; }
#examples li, #current-example { overflow-wrap: anywhere; }
.related { padding: 17px; }
.related > a:not(.button) { display: flex; gap: 10px; align-items: center; padding: 9px 0; }
.related > a:hover strong { color: var(--lime); }
.related .mark { width: 40px; height: 40px; font-size: 1rem; }
.related strong, .related small { display: block; }
.related small { color: var(--muted); }
.related .button { margin-top: 10px; }
.sponsor { display: grid; gap: 4px; margin-top: 25px; padding: 12px; border: 1px solid var(--stroke); border-radius: 8px; }
.sponsor small { color: var(--muted); }
.form-page { margin: 42px auto; max-width: 680px; padding: clamp(19px, 4vw, 38px); }
.back, .form-page > p { color: var(--muted); }
.form-page h1 { margin-top: 12px; }
.contribution { display: grid; gap: 16px; margin-top: 24px; }
.contribution label { display: block; font-weight: 700; }
.contribution small, .contribution p { color: var(--muted); font-size: .875rem; font-weight: 400; }
.contribution input:not([type=hidden]), .contribution textarea { width: 100%; display: block; margin-top: 6px; border: 1px solid #454756; border-radius: 8px; color: var(--ink); background: var(--bg); padding: 10px 12px; }
.contribution textarea { resize: vertical; }
.contribution-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.contribution-actions .button { min-width: 94px; }
.form-page .error { color: #ffc3bd; background: #432523; padding: 9px 12px; border-radius: 8px; margin-top: 12px; }
.form-page .submission-scope { margin-top: 7px; font-size: .875rem; }
.message .button { margin-top: 20px; }

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reading { grid-template-columns: minmax(0, 1fr) 210px; }
  .hero { padding: 32px; }
  .hero-art { width: 62%; }
  .other-feature { width: min(36%, 330px); }
}

@media (min-width: 901px) and (max-width: 960px) {
  .moments .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .bar { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding-block: 8px; }
  .site-identity { grid-column: 1 / -1; justify-content: space-between; }
  .nav-pages { justify-self: start; gap: 2px; padding: 2px; }
  .nav-pages a, .section-switch, .header-actions .button { gap: 4px; padding-inline: 6px; font-size: .8rem; }
  .header-actions { gap: 5px; }
  .header-actions svg, .section-switch svg { width: 14px; height: 14px; }
}

@media (max-width: 620px) {
  .wrap { width: calc(100% - 32px); }
  .brand { gap: 6px; }
  .brand-icon { width: 30px; height: 30px; }
  .hero { align-items: end; margin-top: 18px; min-height: 430px; padding: 18px; border-radius: 15px; }
  .hero-art { width: 100%; height: 62%; object-position: 50% 38%; }
  .hero::after { background: linear-gradient(180deg, transparent, #13141f22 17%, #13141fe6 47%, #13141f 68%); }
  .other-hero { align-items: center; min-height: 320px; }
  .other-hero .shortcuts { display: flex; }
  .other-feature { display: none; }
  .hero h1 { margin: 8px 0 11px; }
  .mobile-only { display: block; }
  .hero p { line-height: 1.45; }
  .search { margin-top: 17px; gap: 7px; padding-left: 9px; }
  .search kbd { display: none; }
  .search .button { padding-inline: 11px; }
  .moment-search { margin-top: 0; }
  .shortcuts { gap: 5px; margin-top: 12px; }
  .shortcuts a { padding-inline: 6px; }
  .catalog { margin-top: 31px; }
  .grid, .reading { grid-template-columns: minmax(0, 1fr); }
  .filter-row { gap: 10px; margin-top: 14px; }
  .chip { padding-inline: 9px; }
  .join { align-items: start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
.catalog-pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: .75rem; margin-block: 1.5rem; }
