:root {
  color-scheme: light;
  --page: #f5f4f9;
  --paper: #fff;
  --ink: #211b33;
  --muted: #625b73;
  --subtle: #746d83;
  --line: #eae7f1;
  --accent: #6946dc;
  --accent-strong: #5634c5;
  --accent-pale: #f1ecff;
  --radius: 18px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; opacity: .55; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  flex: none;
  width: 1.15em;
  height: 1.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -.15em;
}

.skip-link {
  position: fixed;
  top: .5rem;
  left: .5rem;
  z-index: 20;
  padding: .75rem 1rem;
  background: var(--paper);
  color: var(--accent-strong);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.shell { width: min(calc(100% - 4rem), 77.5rem); margin-inline: auto; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3.4vw, 2.9rem);
  min-height: 4.375rem;
}

.brand { display: inline-flex; align-items: center; gap: .625rem; flex: none; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.4375rem;
  height: 2.4375rem;
  border-radius: .65rem;
  background: #6f50dd;
  background: linear-gradient(145deg, #8b6af8 0%, #5935cc 100%);
  color: #fff;
  box-shadow: inset 0 1px 0 #ffffff45;
  font-size: 1.25rem;
}

.brand-text { display: grid; gap: .08rem; font-size: 1.1875rem; font-weight: 770; line-height: 1.16; letter-spacing: .02em; }
.brand-text small { color: var(--subtle); font-size: .75rem; font-weight: 600; letter-spacing: .07em; }

.top-nav { display: flex; align-self: stretch; gap: clamp(1rem, 2.1vw, 1.85rem); }
.top-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: .35rem;
  flex: none;
  color: var(--muted);
  font-size: .9375rem;
  font-weight: 610;
}
.top-link .icon { font-size: .95rem; }

.top-link:hover,
.top-link[aria-current="page"] { color: var(--accent-strong); }
.top-link[aria-current="page"]::after {
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: var(--accent);
  content: "";
}

.notification-count {
  display: grid;
  place-items: center;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 .22rem;
  border-radius: 999px;
  background: #b82c60;
  color: #fff;
  font-size: .625rem;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
}

.header-actions { display: flex; align-items: center; gap: .875rem; margin-left: auto; min-width: 0; }
.auth-area { display: flex; align-items: center; gap: .425rem; flex: none; }
.auth-area button { white-space: nowrap; }
.header-account { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.header-account .post-avatar { width: 1.875rem; height: 1.875rem; border-radius: .52rem; }
.header-account .welcome-account { display: block; max-width: 8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.search-form {
  display: flex;
  align-items: center;
  flex: 1;
  width: clamp(12rem, 20vw, 17rem);
  min-width: 0;
  height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: #f8f7fb;
}
.search-form:focus-within { border-color: var(--accent); }

.search-button {
  display: grid;
  place-items: center;
  flex: none;
  padding: .55rem .55rem .55rem .7rem;
  border: 0;
  background: transparent;
  color: var(--subtle);
}

.search-form input {
  width: 100%;
  padding: .3rem .65rem .3rem 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: .875rem;
}
.search-form input:focus { outline: none; }
.search-form input::placeholder { color: var(--subtle); opacity: 1; }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .4375rem;
  min-height: 2.5rem;
  padding: .5rem .9rem;
  border: 1px solid transparent;
  border-radius: .6rem;
  background: transparent;
  font-size: .875rem;
  font-weight: 670;
  line-height: 1.35;
  text-align: center;
  transition: background-color .18s, color .18s, border-color .18s;
}

.button-primary { background: var(--accent); color: #fff; }
.button-primary:hover:not(:disabled) { background: var(--accent-strong); }
.button-outline { border-color: #ded5f5; background: var(--paper); color: var(--accent-strong); }
.button-outline:hover:not(:disabled) { border-color: #bdacf0; background: var(--accent-pale); }
.button-quiet { color: var(--accent-strong); }
.button-quiet:hover:not(:disabled) { background: var(--accent-pale); }
.button-full { width: 100%; }

.page-shell { padding-top: 1.875rem; }

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 19.375rem;
  overflow: hidden;
  padding: 2.5rem 3rem;
  border: 1px solid #35274e;
  border-radius: 1.4rem;
  background: #201638;
  color: #fff;
  box-shadow: 0 6px 26px #301d581a;
}

.hero::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  background: #201638 url("./assets/hero.webp") center 48% / cover no-repeat;
  content: "";
}

.hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, #161027d9 0%, #161027ab 25%, #16102755 43%, transparent 65%),
    linear-gradient(0deg, #1d122a4a 0%, transparent 38%);
  content: "";
}

.hero-content { max-width: 32rem; }
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .625rem;
  color: #d2bcff;
  font-size: .875rem;
  font-weight: 640;
  letter-spacing: .12em;
}

.hero-label::before {
  width: .46rem;
  height: .46rem;
  transform: rotate(45deg);
  border-radius: .09rem;
  background: currentColor;
  content: "";
}

.hero h1 {
  max-width: 29rem;
  font-size: clamp(2.5rem, 4.05vw, 3.5rem);
  font-weight: 840;
  letter-spacing: -.065em;
  line-height: 1.1;
}
.hero h1 span { display: block; color: #d3beff; padding-top: .06em; }
.hero-description { margin-top: .8rem; color: #e2d9f4; font-size: .975rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.25rem; }
.hero-actions > .button { min-height: 2.625rem; padding-inline: .9375rem; }
.hero-actions > .button-primary { background: #9c79ff; color: #1b0b3a; }
.hero-actions > .button-primary:hover { background: #b798ff; }
.button-hero-outline { border-color: #b4a0d668; background: #30234880; color: #f8f1ff; }
.button-hero-outline:hover { border-color: #b4a0d6aa; background: #4b3676; }
.hero .button:focus-visible { outline-color: #f0e9ff; }

.hero-controls {
  position: absolute;
  right: 1.5rem;
  bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .25rem;
  border: 1px solid #dfccff55;
  border-radius: 999px;
  background: #1c133abf;
  color: #f5efff;
}

.carousel-button,
.carousel-dot {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.carousel-button { width: 2rem; height: 2rem; font-size: 1rem; }
.carousel-button:hover { background: #d1baff38; }
.carousel-pagination { display: flex; align-items: center; gap: .1rem; }
.carousel-dot { width: 1.25rem; height: 1.65rem; color: #e0ccff; }
.carousel-dot::before { width: .4rem; height: .4rem; border-radius: 999px; background: currentColor; opacity: .55; content: ""; }
.carousel-dot.is-active::before,
.carousel-dot[aria-pressed="true"]::before { width: .8rem; color: #fff; opacity: 1; }
.hero-controls button:focus-visible { outline-color: #f0e9ff; outline-offset: 1px; }

.home-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .85rem;
  margin-top: 1rem;
}

.shortcut-card {
  --shortcut-bg: #ece5ff;
  --shortcut-ink: #6944cb;
  display: flex;
  align-items: center;
  gap: .72rem;
  min-height: 4.6rem;
  padding: .7rem .9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  transition: background-color .18s, border-color .18s;
}
.shortcut-card:hover,
.shortcut-card[aria-current="page"] { border-color: #d8c9f2; background: #faf7ff; }
.shortcut-card[data-shortcut="guides"] { --shortcut-bg: #e9edff; --shortcut-ink: #4963c7; }
.shortcut-card[data-shortcut="teaming"] { --shortcut-bg: #fff0de; --shortcut-ink: #925119; }
.shortcut-card[data-shortcut="events"] { --shortcut-bg: #ffe8f0; --shortcut-ink: #9b365c; }
.shortcut-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: .8rem;
  background: var(--shortcut-bg);
  color: var(--shortcut-ink);
  font-size: 1.125rem;
}
.shortcut-text { display: grid; gap: .075rem; min-width: 0; }
.shortcut-text strong { font-size: .9375rem; font-weight: 750; }
.shortcut-text small { color: var(--subtle); font-size: .8125rem; }

.forum-grid {
  display: grid;
  grid-template-columns: 12.5rem minmax(0, 1fr) 16.25rem;
  align-items: start;
  gap: 1.125rem;
  margin-top: 1.375rem;
}

.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }

.side-left { display: grid; gap: 1rem; }
.board-nav { padding: 1.125rem .625rem .625rem; scroll-margin-top: 1rem; }
.board-nav h2 { margin: 0 .625rem .75rem; font-size: .9375rem; font-weight: 760; }

.board-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-height: 2.625rem;
  margin-bottom: .115rem;
  padding: .35rem .5rem;
  border: 1px solid transparent;
  border-radius: .56rem;
  color: #4c425e;
  font-size: .875rem;
  font-weight: 620;
}
.board-link:hover { background: #f8f6fc; color: var(--accent-strong); }
.board-link.is-active,
.board-link[aria-current="page"] { border-color: #e8dfff; background: var(--accent-pale); color: var(--accent-strong); font-weight: 740; }

.board-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.625rem;
  height: 1.625rem;
  border-radius: .42rem;
  background: #eee8ff;
  color: #6748bb;
  font-size: .875rem;
}

.board-icon-all { background: #e6dbff; color: #5833c5; }
.board-icon-discussion { background: #eae8ff; color: #6146bb; }
.board-icon-guides { background: #e3f3ee; color: #27715d; }
.board-icon-recommendations { background: #fff0da; color: #90551b; }
.board-icon-teaming { background: #e6efff; color: #3863a8; }
.board-icon-news { background: #fde8f1; color: #99375e; }
.board-icon-activities { background: #fce8ee; color: #a33c5b; }
.board-icon-honor { background: #f8e6d6; color: #8d4927; font-weight: 800; }
.board-icon-peace { background: #e5efde; color: #45633b; font-weight: 800; }
.board-icon-genshin { background: #e4eefb; color: #42618d; font-weight: 800; }
.board-icon-steam { background: #e4e8f5; color: #2f4168; font-weight: 800; }
.board-count { margin-left: auto; color: var(--subtle); font-size: .75rem; font-weight: 550; font-variant-numeric: tabular-nums; }

.feed-view { overflow: hidden; }
.feed-heading { padding: 1.125rem 1.25rem .8rem; }
.feed-heading h2 { font-size: 1.3125rem; font-weight: 790; line-height: 1.35; letter-spacing: -.03em; }
.feed-heading p { margin-top: .2rem; color: var(--subtle); font-size: .875rem; }
.feed-heading p:empty { display: none; }
.workspace-view { min-height: 16rem; overflow: hidden; }
.workspace-heading { padding-bottom: 1.125rem; border-bottom: 1px solid var(--line); }
#search-view .workspace-heading { border-bottom: 0; }
.workspace-content { min-width: 0; }
.feed-tabs { display: flex; align-items: center; gap: 1.3rem; margin-inline: 1.25rem; border-bottom: 1px solid var(--line); }

.tab-button {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-bottom: -1px;
  padding: .65rem .1rem .7rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 650;
}

.tab-button.is-active,
.tab-button[aria-pressed="true"] { border-bottom-color: var(--accent); color: var(--accent-strong); }
.tab-button:hover { color: var(--accent-strong); }

.post-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  min-height: 7rem;
  padding: .9rem 1.25rem;
  border-bottom: 1px solid var(--line);
  transition: background-color .16s;
}
.post-row:last-child { border-bottom: none; }
.post-row:hover { background: #fbf9ff; }

.post-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  overflow: hidden;
  border: 1px solid #5744830c;
  border-radius: .65rem;
  background: #e9defd;
  color: #67439d;
  font-size: .875rem;
  font-weight: 780;
}
.avatar-violet { background: #e9defd; color: #67439d; }
.avatar-blue { background: #dfebff; color: #365ea0; }
.avatar-green { background: #ddf2e8; color: #277158; }
.avatar-orange { background: #fff0dc; color: #8d521b; }
.avatar-pink { background: #fbe4ec; color: #99375e; }

.post-main { flex: 1; min-width: 0; }

.post-meta,
.comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem .5rem;
  color: var(--subtle);
  font-size: .8125rem;
}

.category-tag {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .14rem .4rem;
  border-radius: .3rem;
  background: #eee8ff;
  color: #623eb3;
  font-size: .75rem;
  font-weight: 690;
  line-height: 1.3;
}
.category-tag[data-board="guides"] { background: #e5f4ed; color: #247153; }
.category-tag[data-board="recommendations"] { background: #fff1dc; color: #87501d; }
.category-tag[data-board="teaming"] { background: #e8f0ff; color: #385e9b; }
.category-tag[data-board="news"] { background: #fce9f1; color: #9a3d63; }
.category-tag[data-board="activities"] { background: #fce8ee; color: #9b365c; }
.category-tag[data-board="honor"] { background: #f8e6d6; color: #8d4927; }
.category-tag[data-board="peace"] { background: #e5efde; color: #45633b; }
.category-tag[data-board="genshin"] { background: #e4eefb; color: #42618d; }
.category-tag[data-board="steam"] { background: #e4e8f5; color: #2f4168; }

.post-author { color: var(--muted); }
.post-time::before { margin-right: .5rem; content: "·"; }
.post-title { margin-block: .28rem; font-size: 1rem; font-weight: 780; line-height: 1.4; overflow-wrap: anywhere; }
.post-title .icon, .post-pin, .pinned-label { color: var(--accent-strong); }
.post-pin {
  display: inline-block;
  margin-right: .45rem;
  padding: .13rem .28rem;
  border: 1px solid #e2d7fb;
  border-radius: .3rem;
  background: var(--accent-pale);
  font-size: .6875rem;
  font-weight: 740;
  line-height: 1.2;
  vertical-align: .1em;
}
.post-link { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
.post-link::after { position: absolute; inset: 0; content: ""; }
.post-link:hover { color: var(--accent-strong); }
.post-excerpt { overflow: hidden; color: var(--muted); font-size: .875rem; text-overflow: ellipsis; white-space: nowrap; }
.post-counts { align-self: center; display: flex; align-items: center; flex: none; gap: .575rem; color: var(--subtle); }
.post-stat { display: inline-flex; align-items: center; gap: .22rem; font-size: .75rem; font-variant-numeric: tabular-nums; }
.post-stat .icon { font-size: .875rem; }

.empty-state { padding: 2.25rem 1.25rem; color: var(--subtle); font-size: .9375rem; text-align: center; }
.empty-state > * + * { margin-top: .625rem; }

.feed-pagination { display: flex; align-items: center; justify-content: center; gap: .75rem; padding: .9rem 1.25rem; border-top: 1px solid var(--line); }
.feed-pagination:empty { display: none; }

.side-right { display: grid; gap: 1rem; }

.welcome-panel {
  padding: 1.125rem;
  border-color: #e9e1fa;
  background: linear-gradient(145deg, #f2ecff, #faf8ff 90%);
}
.welcome-icon,
.dialog-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: .65rem;
  border: 1px solid #decdfc;
  border-radius: .7rem;
  background: #e9ddff;
  color: #6440bb;
  font-size: 1.25rem;
}

.welcome-panel h2,
.hot-panel h2 { font-size: 1rem; font-weight: 790; line-height: 1.35; }
.welcome-panel p { margin: .4rem 0 .875rem; color: var(--muted); font-size: .875rem; }
#welcome-actions { display: grid; gap: .35rem; }
.welcome-account { display: flex; align-items: center; gap: .5rem; color: var(--accent-strong); font-size: .875rem; font-weight: 680; overflow-wrap: anywhere; }
.welcome-account .button { flex: none; }

.hot-panel { padding: 1rem 1.125rem .65rem; }
.hot-panel h2 { display: flex; align-items: center; gap: .45rem; margin-bottom: .475rem; }
.hot-panel h2 > .icon { color: #8c53c4; }
.hot-list { display: grid; margin: 0; padding: 0; list-style: none; }
.hot-item {
  display: grid;
  grid-template-columns: 1.375rem minmax(0, 1fr);
  align-items: start;
  gap: .55rem;
  min-width: 0;
  padding: .6rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.hot-item:last-child { border-bottom: none; }
.hot-item:hover .hot-title { color: var(--accent-strong); }

.hot-rank {
  display: grid;
  place-items: center;
  min-height: 1.375rem;
  border-radius: .3rem;
  background: #f1eafb;
  color: #7049a4;
  font-size: .75rem;
  font-weight: 760;
}

.hot-item:first-child .hot-rank { background: #eedcff; color: #723ca2; }
.hot-item:nth-child(n+4) .hot-rank { background: #f4f1f8; color: var(--subtle); }
.hot-item-text { display: grid; gap: .1rem; min-width: 0; }
.hot-title { overflow: hidden; font-size: .875rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.hot-meta, .hot-empty { color: var(--subtle); font-size: .75rem; }
.hot-empty { padding: .45rem 0; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.6rem 0 0;
  padding: 1rem 0 1.35rem;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font-size: .8125rem;
}

.post-view { min-width: 0; }
.back-button { margin-bottom: .75rem; }
.detail-card, .detail-comments { padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.detail-card > * + *, .detail-comments > * + * { margin-top: .8rem; }
.detail-title { font-size: clamp(1.25rem, 2vw, 1.75rem); line-height: 1.4; overflow-wrap: anywhere; }
.detail-content, .comment-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-content { min-height: 5rem; color: #392e4d; line-height: 1.8; }
.detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.post-like[aria-pressed="true"] { border-color: #dfcafd; background: var(--accent-pale); color: var(--accent-strong); }
.post-like[aria-pressed="true"] .icon { fill: currentColor; }
.detail-comments { margin-top: .8rem; }
.detail-card .detail-comments { padding: .9rem 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.detail-comments h2, .detail-comments h3 { font-size: 1.0625rem; font-weight: 770; }
.comment-form { display: grid; gap: .5rem; }
.comment-form .button { justify-self: start; }
.comment-signin { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .65rem; padding: .85rem; border-radius: .55rem; background: #f7f3fd; color: var(--muted); font-size: .875rem; }
.comment-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .625rem; padding: .55rem 0 .85rem; border-bottom: 1px solid var(--line); }
.comment-item:last-child { border-bottom: 0; }
.comment-item .post-avatar { width: 2rem; height: 2rem; }
.comment-main { display: grid; gap: .2rem; min-width: 0; }
.empty-comments { color: var(--subtle); font-size: .875rem; }
.comment-body { color: #392e4d; line-height: 1.7; }

dialog {
  width: min(100% - 2rem, 28rem);
  max-height: calc(100% - 2rem);
  padding: 1.5rem;
  border: 1px solid #e6dcf5;
  border-radius: 1rem;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 18px 60px #190f3d35;
}

#auth-dialog { width: min(100% - 2rem, 31rem); }
#compose-dialog { width: min(100% - 2rem, 37.5rem); }
dialog::backdrop { background: #1a112c80; backdrop-filter: blur(3px); }

.dialog-heading { position: relative; margin-bottom: 1.1rem; }
.dialog-heading h2 { font-size: 1.375rem; font-weight: 780; }
.dialog-heading p { margin-top: .3rem; color: var(--muted); font-size: .875rem; }

.icon-button {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: .4rem;
  background: transparent;
  color: var(--muted);
}
.icon-button:hover { background: var(--accent-pale); color: var(--accent-strong); }

.dialog-form,
.dialog-fields,
.field { display: grid; gap: .375rem; }
.dialog-form, .dialog-fields { gap: .85rem; }
.field label { font-size: .875rem; font-weight: 680; }
.auth-switch { display: flex; align-items: center; justify-content: center; gap: .15rem; margin-top: .7rem; color: var(--muted); font-size: .875rem; }
.auth-switch .button { min-height: 2rem; padding-inline: .45rem; }

.auth-methods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .4rem;
  margin-bottom: 1rem;
  padding: .3rem;
  border: 1px solid var(--line);
  border-radius: .7rem;
  background: #f7f5fc;
}
.auth-method {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .28rem;
  min-height: 2.4rem;
  padding: .35rem .2rem;
  border: 1px solid transparent;
  border-radius: .48rem;
  background: transparent;
  color: var(--muted);
  font-weight: 650;
  font-size: .875rem;
}
.auth-method:hover { color: var(--accent-strong); }
.auth-method[aria-pressed="true"],
.auth-method.is-active { border-color: #e0d7f4; background: #fff; color: var(--accent-strong); box-shadow: 0 1px 3px #2a134b0c; }
.auth-method[data-auth-method="wechat"] .icon { color: #297f46; }
.auth-agreement {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.65;
}
.auth-agreement input {
  flex: none;
  width: 1rem;
  height: 1rem;
  margin: .16rem 0 0;
  accent-color: var(--accent);
}
.auth-agreement a { color: var(--accent-strong); text-decoration: underline; text-underline-offset: .17em; }
.legal-content { color: var(--muted); font-size: .9375rem; line-height: 1.75; }
.legal-content p + p { margin-top: .65rem; }

.field input,
.field select,
.field textarea,
.comment-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 2.625rem;
  padding: .55rem .7rem;
  border: 1px solid #ddd5e9;
  border-radius: .5rem;
  background: #fbfaff;
  color: var(--ink);
}

.field select {
  appearance: none;
  padding-right: 2.25rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 1rem) 50%, calc(100% - .72rem) 50%;
  background-repeat: no-repeat;
  background-size: .28rem .28rem;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.comment-form textarea:focus { border-color: var(--accent); outline-offset: 1px; }

.field textarea,
.comment-form textarea { resize: vertical; }

.compose-text { position: relative; display: grid; }
.compose-text textarea { min-height: 8.5rem; padding-bottom: 1.65rem; }
.compose-count {
  position: absolute;
  right: .82rem;
  bottom: .42rem;
  padding: 0 .25rem;
  border-radius: .2rem;
  background: #fbfaff;
  color: var(--subtle);
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.compose-gallery { display: flex; flex-wrap: wrap; gap: .55rem; align-items: flex-start; }
.upload-tile {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: .1rem;
  width: 6.1rem;
  min-height: 5.9rem;
  border: 1px dashed #c9b9eb;
  border-radius: .65rem;
  background: #fbf9ff;
  color: var(--accent-strong);
}
.upload-tile:hover { background: var(--accent-pale); }
.upload-tile:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.upload-tile input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.upload-tile .icon { font-size: 1.3rem; }
.upload-tile strong { font-size: .8125rem; }
.upload-tile small { color: var(--muted); font-size: .75rem; }
.compose-image-list:empty { display: none; }
.form-error { color: #9a2857; font-size: .875rem; }
.toast {
  position: fixed;
  z-index: 9;
  right: 1.5rem;
  bottom: 1.5rem;
  max-width: min(24rem, calc(100% - 3rem));
  padding: .8rem 1rem;
  border-radius: .65rem;
  background: #2a1d40;
  color: #fff;
  box-shadow: 0 8px 22px #20143d2e;
  font-size: .875rem;
}

@media (max-width: 68rem) {
  .shell { width: min(calc(100% - 2.5rem), 77.5rem); }
  .forum-grid { grid-template-columns: 10.75rem minmax(0, 1fr) 13.75rem; gap: .8rem; }
  .post-row { gap: .55rem; padding-inline: .9rem; }
  .feed-tabs { margin-inline: .9rem; }
  .feed-heading { padding-inline: .9rem; }
  .post-counts { gap: .35rem; }
  .welcome-panel, .hot-panel { padding-inline: .875rem; }
}

@media (max-width: 56rem) {
  .shell { width: calc(100% - 2rem); }
  .header-inner { gap: 1.325rem; }
  .top-nav { gap: 1rem; }
  .top-link .icon { display: none; }
  .forum-grid { grid-template-columns: 10.5rem minmax(0, 1fr); }
  .side-right { grid-column: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding-left: 2rem; }
}

@media (max-width: 42rem) {
  .header-inner { flex-wrap: wrap; gap: .75rem 1rem; padding-block: .75rem; }
  .header-actions { flex: 1 1 100%; }
  .top-nav { margin-left: auto; }
  .top-link { min-height: 2.25rem; font-size: .875rem; }
  .page-shell { padding-top: 1rem; }
  .hero { align-items: flex-end; min-height: 18rem; padding: 1.25rem 1.25rem 3rem; }
  .hero::before { background-position: 68% 50%; }
  .hero::after { background: linear-gradient(90deg, #201638f0 0%, #201638c7 39%, #20163854 100%); }
  .hero-label { letter-spacing: .05em; }
  .hero-description { max-width: 17rem; font-size: .875rem; }
  .hero-controls { right: .72rem; bottom: .62rem; gap: .2rem; padding: .12rem; }
  .carousel-button { width: 1.55rem; height: 1.55rem; }
  .carousel-dot { width: .95rem; height: 1.35rem; }
  .home-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; margin-top: .75rem; }
  .shortcut-card { min-height: 3.9rem; gap: .5rem; padding: .55rem; }
  .shortcut-icon { width: 2.1rem; height: 2.1rem; border-radius: .58rem; font-size: .95rem; }
  .shortcut-text strong { font-size: .875rem; }
  .shortcut-text small { font-size: .75rem; }
  .forum-grid { grid-template-columns: minmax(0, 1fr); gap: .75rem; margin-top: .75rem; }
  .side-left { gap: .55rem; }
  .board-nav { display: flex; flex-wrap: wrap; gap: .2rem; padding: .6rem; }
  .board-nav h2 { width: 100%; padding-bottom: .15rem; margin: 0 .3rem; }
  .board-link { min-height: 2.15rem; gap: .3rem; padding: .25rem .35rem; }
  .board-count { display: none; }
  .board-icon { width: 1.25rem; height: 1.25rem; font-size: .75rem; }
  .side-right { grid-column: 1; }
  .post-row { flex-wrap: wrap; gap: .25rem .55rem; }
  .post-main { flex-basis: calc(100% - 2.8rem); }
  .post-counts { margin-left: 2.8rem; }
}

@media (max-width: 29rem) {
  .side-right { grid-template-columns: minmax(0, 1fr); }
  .hero-actions { gap: .4rem; }
  .hero-actions > .button { padding-inline: .65rem; }
  .header-account .welcome-account { max-width: 4rem; }
  .auth-method { display: grid; justify-items: center; gap: .22rem; font-size: .8125rem; }
  .feed-tabs { gap: .95rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
