@import url("/wiki.css");
@import url("/daily.css");

.resource-list { margin-top: 1rem; }
.content-search { margin-block: 12px; }
.resource-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-block: 16px; overflow-wrap: anywhere; }
.resource-item + .resource-item { border-top: 1px solid var(--line); }
.resource-item > div:first-child { flex: 1 1 280px; min-width: 0; }
.resource-heading, .resource-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.resource-heading h2 { margin: 0; font-size: 1.15rem; }
.resource-meta { margin-top: 6px; font-size: .85rem; color: var(--muted); }
.resource-description { white-space: pre-wrap; }
.resource-item .actions { margin: 0; }

/* ==========================================================================
   斗蛐蛐社区 · 全局设计系统、导航框架、表格、贴吧与弹窗
   ========================================================================== */

* { box-sizing: border-box; }
html {
  color-scheme: light;
  accent-color: #262626;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  --ink: #171717;
  --ink-2: #333333;
  --muted: #595959;
  --paper: #f5f5f5;
  --surface: #ffffff;
  --surface-soft: #fafafa;
  --surface-tint: #ededed;
  --line: #dedede;
  --line-strong: #bcbcbc;
  --action: #262626;
  --action-hover: #000000;
  --deep: #171717;
  --radius-sm: 7px;
  --radius-md: 11px;
  --radius-lg: 15px;
  --shadow-xs: 0 1px 2px rgba(32, 32, 32, 0.045);
  --shadow-sm: 0 4px 16px rgba(32, 32, 32, 0.055), 0 1px 3px rgba(32, 32, 32, 0.03);
  --shadow-md: 0 10px 28px rgba(32, 32, 32, 0.09), 0 2px 6px rgba(32, 32, 32, 0.04);
  --shadow-lg: 0 24px 64px rgba(32, 32, 32, 0.22), 0 6px 18px rgba(32, 32, 32, 0.08);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  margin: 0;
  background: radial-gradient(960px 360px at 72% -120px, rgba(80, 80, 80, 0.055), transparent 70%), var(--paper);
  color: var(--ink);
  font: 15px/1.6 "Instrument Sans", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  overflow-x: clip;
}

button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: #333; color: #fff; }
button, a { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
button { border: 0; background: none; }
button:disabled { cursor: default; opacity: 0.45; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, h4 { margin: 0; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2.5px solid #767676;
  outline-offset: 2px;
}

[hidden] { display: none !important; }

.skip {
  position: fixed;
  top: -60px;
  left: 12px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  z-index: 50;
  box-shadow: var(--shadow-md);
}
.skip:focus { top: 12px; }

svg.ico {
  width: 19px;
  height: 19px;
  flex: none;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------------- 左侧导航栏 ---------------- */
#rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: 224px;
  z-index: 10;
  background: linear-gradient(180deg, #141414 0%, #1b1b1b 60%, #171717 100%);
  color: #d2d2d2;
  display: flex;
  flex-direction: column;
  padding: 24px 14px 18px;
  border-right: 1px solid #303030;
  box-shadow: 2px 0 18px rgba(24, 24, 24, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 8px 24px;
  color: #f5f5f5;
  transition: opacity 0.16s var(--ease);
}
.brand:hover { opacity: 0.94; }
.brand strong, .brand small { display: block; }
.brand strong {
  font-size: 24px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: 0.06em;
}
.brand small {
  font: 700 9px/1.6 "IBM Plex Mono", Consolas, monospace;
  letter-spacing: 0.18em;
  color: #dcdcdc;
}
.brandmark {
  width: 40px;
  height: 40px;
  flex: none;
  display: block;
  object-fit: cover;
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

#nav {
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #484848 transparent;
  padding-right: 2px;
}
.nav-group { margin-bottom: 20px; }
.nav-name {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #b3b3b3;
  font-weight: 700;
  margin: 0 12px 7px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  border-radius: 9px;
  padding: 9px 12px;
  margin: 2px 0;
  color: #dcdcdc;
  font-size: 14px;
  font-weight: 560;
  transition: background 0.16s var(--ease), color 0.16s var(--ease), transform 0.14s var(--ease);
}
.nav-link:hover:not(.active) {
  background: rgba(255, 255, 255, 0.08);
  color: #f5f5f5;
}
.nav-link.active {
  transition: none;
  background: linear-gradient(135deg, #ffffff, #ededed);
  color: #111111;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}
#rail :focus-visible, .hero :focus-visible { outline-color: #fff; }
.nav-link.active:after {
  content: "";
  margin-left: auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #242424;
}

.rail-shortcut {
  align-self: flex-start;
  flex: none;
  margin: 6px 8px;
  padding: 6px 10px;
  color: #ebebeb;
  background: transparent;
  border: 1px solid #6a6a6a;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.rail-shortcut:hover, .rail-shortcut:focus-visible { background: #404040; }
.rail-foot {
  margin-top: auto;
  padding: 14px 10px 2px;
  border-top: 1px solid rgba(220, 220, 220, 0.14);
  font-size: 12px;
  color: #c7c7c7;
  display: flex;
  align-items: center;
  gap: 9px;
  line-height: 1.45;
}
.lamp {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: none;
  background: #d4d4d4;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(188, 188, 188, 0.2);
}

/* ---------------- 主体外壳与吸顶顶栏 ---------------- */
.shell {
  margin-left: 224px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.bar {
  position: sticky;
  top: 0;
  z-index: 6;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 3vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(249, 249, 249, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 12px rgba(32, 32, 32, 0.03);
}

.crumb, .bar-actions, .inline, .actions, .row, .account, .pill, .btn, .link, .eyebrow, .hero-meta, .head-tools, .detail-links {
  display: flex;
  align-items: center;
  gap: 9px;
}

.crumb {
  color: var(--muted);
  font-size: 13.5px;
  min-width: 0;
}
.crumb strong {
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.slash { color: #b0b0b0; }

.account, .icon {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), box-shadow 0.15s var(--ease), color 0.15s var(--ease);
}
.account:hover, .icon:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  box-shadow: 0 2px 8px rgba(32, 32, 32, 0.06);
}
.icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  color: var(--ink-2);
}
.account {
  height: 36px;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
}

.mobile-only, #shade { display: none; }
.bar-actions { gap: 8px; }
.loading, .empty { padding: 40px 24px; text-align: center; color: var(--muted); font-size: 14px; }

#content {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 26px clamp(20px, 3vw, 48px) 64px;
  min-width: 0;
}

/* ---------------- 页面标题与通用排版 ---------------- */
.heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.eyebrow, .panel-tag, .mono, .stat-number, .rank-num, .team-id, .point, .hero-num, .stat-trail, .score, .page-no {
  font-family: "Barlow Condensed", "IBM Plex Mono", Consolas, "Microsoft YaHei", monospace;
  font-variant-numeric: tabular-nums;
}

.eyebrow, .panel-tag {
  color: #585858;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
}
.eyebrow:before {
  content: "";
  width: 18px;
  height: 2.5px;
  border-radius: 2px;
  background: #919191;
}
.heading h1 {
  font-size: clamp(27px, 2.5vw, 38px);
  line-height: 1.18;
  margin-top: 6px;
  letter-spacing: -0.03em;
  font-weight: 850;
  color: var(--ink);
}

.muted, .sub { color: var(--muted); }
.sub { font-size: 12.5px; line-height: 1.5; }

.pill {
  width: max-content;
  background: #ebebeb;
  color: #484848;
  border: 1px solid #d2d2d2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 11px;
}
.pill .lamp { width: 6px; height: 6px; background: #404040; }

/* ---------------- Hero 战报横幅 ---------------- */
.hero {
  background: #282828 url('/day-lawn.jpg') center center / cover no-repeat;
  border-radius: var(--radius-lg);
  color: #f9f9f9;
  min-height: 232px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-sm);
}
.hero:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(95deg, rgba(32, 32, 32, 0.96) 0%, rgba(32, 32, 32, 0.88) 32%, rgba(40, 40, 40, 0.52) 60%, rgba(40, 40, 40, 0.12) 100%);
}
.hero-copy {
  position: relative;
  padding: 28px clamp(22px, 3vw, 44px);
  max-width: 66%;
}
.hero-meta {
  color: #e4e4e4;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.hero-meta:before {
  content: "";
  width: 16px;
  height: 2px;
  background: #c7c7c7;
}
.hero h2 {
  margin: 10px 0 6px;
  font-weight: 850;
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-size: clamp(28px, 3vw, 46px);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
}
.hero p { font-size: 14.5px; color: #ebebeb; line-height: 1.65; }
.hero .btn { margin-top: 18px; }

/* ---------------- 按钮与链接 ---------------- */
.btn {
  display: inline-flex;
  justify-content: center;
  width: max-content;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #242424, #171717);
  color: #ffffff;
  border-radius: 8px;
  padding: 8px 15px;
  min-height: 36px;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.35;
  box-shadow: 0 2px 8px rgba(56, 56, 56, 0.18);
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease), color 0.16s var(--ease), box-shadow 0.16s var(--ease), transform 0.12s var(--ease);
}
.btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #363636, #292929);
  box-shadow: 0 4px 12px rgba(56, 56, 56, 0.25);
}
.btn:active:not(:disabled) { transform: translateY(0.5px); }

.btn.lime {
  background: linear-gradient(135deg, #ffffff, #eeeeee);
  color: #151515;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.16);
}
.btn.lime:hover:not(:disabled) {
  background: linear-gradient(135deg, #ffffff, #f7f7f7);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.22);
}

.btn.ghost {
  background: var(--surface);
  color: var(--ink-2);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-xs);
}
.btn.ghost:hover:not(:disabled) {
  background: var(--surface-soft);
  border-color: #b0b0b0;
  color: var(--action);
}

.btn.warn {
  color: #484848;
  background: #f1f1f1;
  border-color: #c7c7c7;
  box-shadow: none;
}
.btn.warn:hover:not(:disabled) {
  background: #ebebeb;
  border-color: #b0b0b0;
}

.btn .ico, .link .ico { width: 15px; height: 15px; }

.link {
  padding: 4px 6px;
  margin-inline: -6px;
  border-radius: 6px;
  color: var(--action);
  font-size: 13.5px;
  font-weight: 700;
  display: inline-flex;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.link:hover {
  background: rgba(80, 80, 80, 0.08);
  color: var(--action-hover);
}

/* ---------------- 指标卡与核心面板 ---------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 24px;
}
.stat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 16px 18px 14px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease), border-color 0.16s var(--ease);
}
.stat:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: var(--line-strong);
}
.stat label { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.stat-number {
  grid-column: 1;
  font-weight: 750;
  font-size: clamp(24px, 2.3vw, 36px);
  letter-spacing: -0.04em;
  line-height: 1.18;
  margin-top: 6px;
  color: var(--ink);
}
.stat-icon {
  grid-column: 2;
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--tint, #f1f1f1);
  color: var(--accent, #585858);
}
.stat-trail {
  grid-column: 1 / -1;
  height: 4px;
  background: #f1f1f1;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 12px;
}
.stat-trail i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent, #a0a0a0);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(290px, 1fr);
  gap: 18px;
  align-items: start;
}

.panel, .block, .tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  min-width: 0;
  box-shadow: var(--shadow-xs);
}
.panel-head {
  padding: 18px 22px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.panel-head h2, .block h2 {
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.panel-head h2 { margin-top: 2px; }
.panel-tag { font-size: 10.5px; }
.panel-body { padding: 0 22px 18px; }

/* ---------------- 表格与排行徽章 ---------------- */
.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}
th {
  background: #f1f1f1;
  color: #585858;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--line);
}
td, th {
  padding: 11px 12px;
  border-bottom: 1px solid #ebebeb;
}
td:first-child, th:first-child { padding-left: 20px; }
td:last-child, th:last-child { padding-right: 20px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background 0.12s ease; }
tbody tr:hover { background: rgba(80, 80, 80, 0.035); }
td { font-size: 14px; color: var(--ink-2); }
.num { text-align: right; }

.team-id { font-weight: 750; font-size: 15.5px; color: var(--ink); }
.rank-num {
  font-size: 13px;
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 26px;
  padding: 0 6px;
  border-radius: 7px;
  color: #606060;
  font-weight: 700;
}
.rank-num.top {
  color: #404040;
  background: #ebebeb;
  box-shadow: inset 0 0 0 1px rgba(128, 128, 128, 0.25);
  font-weight: 800;
}
.rank-num.first {
  background: linear-gradient(135deg, #2a2a2a, #171717);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(128, 128, 128, 0.35);
}

.point, .score { font-weight: 750; font-size: 16px; color: var(--ink); }

.plants {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
}
.plants img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  background: #f1f1f1;
  border: 1px solid rgba(40, 40, 40, 0.07);
  border-radius: 6px;
  padding: 2px;
}

.teamlink {
  padding: 2px 4px;
  margin-inline: -4px;
  border-radius: 5px;
  color: #484848;
  font-weight: 720;
  white-space: nowrap;
  transition: background 0.14s var(--ease), color 0.14s var(--ease);
}
.teamlink:hover {
  background: rgba(80, 80, 80, 0.09);
  color: #303030;
}

/* ---------------- 最近完赛动态列表 ---------------- */
.feedrow {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 11px 8px;
  margin-inline: -8px;
  border-radius: 8px;
  border-top: 1px solid #ebebeb;
  transition: background 0.14s var(--ease);
}
.feedrow:first-of-type { border-top-color: transparent; }
.feedrow:hover { background: var(--surface-soft); }
.feedrow strong, .feedrow small { display: block; }
.feedrow strong { color: var(--ink); font-size: 14px; }
.feedrow small { font-size: 12px; color: var(--muted); margin-top: 2px; }
.feedrow .end { margin-left: auto; color: #585858; font-size: 13px; font-weight: 600; }

/* ---------------- 区块、表单与工具栏 ---------------- */
.panel + .panel, .block + .block, .section-space { margin-top: 18px; }
.block { padding: 20px 22px; }
.block h2, .block h3 { margin-bottom: 12px; }

.toolbar {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.toolbar input { min-width: 180px; flex: 1; max-width: 360px; }

input, textarea, select {
  max-width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--action);
  box-shadow: 0 0 0 3px rgba(80, 80, 80, 0.12);
  outline: none;
}
textarea { resize: vertical; min-height: 72px; }
input[type=checkbox] { width: auto; accent-color: var(--action); }

label.field {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-2);
  margin: 10px 0;
}
.field small { color: var(--muted); font-weight: 400; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 8px 12px;
}

/* ---------------- 标签页与分页 ---------------- */
.tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.tab {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: #585858;
  font-weight: 650;
  font-size: 13px;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.tab:hover:not(.on) {
  background: var(--surface-tint);
  color: var(--ink);
}
.tab.on {
  background: var(--deep);
  color: #f5f5f5;
  box-shadow: 0 2px 8px rgba(40, 40, 40, 0.18);
}

.pager {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  padding: 13px 18px;
  background: var(--surface-soft);
  border-top: 1px solid var(--line);
}
.pager span:first-child { margin-right: auto; font-size: 13px; color: var(--muted); }
.page-no { font-size: 13px; font-weight: 650; color: var(--ink-2); }

/* ---------------- 卡片网格（影库、阵容档案、其它阵容等） ---------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(255px, 100%), 1fr));
  gap: 14px;
}
.tile {
  padding: 18px;
  text-align: left;
  display: flex;
  flex-direction: column;
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease), border-color 0.16s var(--ease);
}
.tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: #c7c7c7;
}
.tile h3 {
  font-size: 17px;
  font-weight: 750;
  margin: 6px 0 6px;
  line-height: 1.35;
  color: var(--ink);
}
.tile .modal-tools { margin-top: auto; padding-top: 14px; }
.tile:not(.archive-tile) .plants { margin: 10px 0; }
.tile:not(.archive-tile) .plants img { width: 34px; height: 34px; }

.row { justify-content: space-between; }
.row.start, .actions { justify-content: flex-start; }
.actions, .detail-links { flex-wrap: wrap; }

.badge {
  display: inline-block;
  border-radius: 6px;
  background: #ebebeb;
  border: 1px solid #dcdcdc;
  padding: 2px 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: #505050;
}
.badge.warm { background: #ebebeb; border-color: #d2d2d2; color: #585858; }
.badge.gray { background: #f1f1f1; border-color: #dcdcdc; color: #6a6a6a; }

.scores { display: flex; gap: 20px 28px; flex-wrap: wrap; margin: 16px 0; padding: 14px 16px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius-md); }
.scores b, .scores small { display: block; }
.scores b { font: 750 23px/1.3 Consolas, "Microsoft YaHei", sans-serif; color: var(--ink); }
.scores small { font-size: 12px; color: var(--muted); }

.list-line { padding: 11px 0; border-top: 1px solid #ebebeb; overflow-wrap: anywhere; }
.list-line p { margin: 5px 0; white-space: pre-wrap; }
.list-line time, .note { font-size: 12px; color: var(--muted); }
.reply { margin-left: 20px; border-left: 2.5px solid #d2d2d2; padding-left: 14px; }
.form-error { margin-top: 8px; color: #505050; font-size: 13px; font-weight: 600; }
.compact { font-size: 12.5px; }

.roundtag {
  display: grid;
  min-width: 46px;
  place-items: center;
  font: 700 14px Consolas, monospace;
  background: #e4e4e4;
  color: #484848;
  border-radius: 8px;
  padding: 8px;
}

.deck { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.mini-chart {
  display: flex;
  align-items: flex-end;
  height: 70px;
  gap: 3px;
  margin: 12px 0 16px;
  padding: 8px 10px 0;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
}
.mini-chart i { display: block; flex: 1; background: #a0a0a0; border-radius: 3px 3px 0 0; min-height: 3px; }
.mini-chart i:last-child { background: #505050; }

.small-thumb { width: 34px; height: 34px; object-fit: contain; }
.avatar { max-width: 84px; border-radius: 50%; border: 2px solid var(--line); }
.bind { padding: 14px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 9px; margin: 10px 0; }
.form-stack { display: grid; gap: 10px; }
.detail-title { font-size: 28px; }
.modal-tools { margin-top: 14px; }

/* ---------------- 弹窗与 Toast ---------------- */
dialog {
  padding: 0;
  border: 1px solid rgba(40, 40, 40, 0.14);
  background: var(--surface);
  color: var(--ink);
  border-radius: 16px;
  width: min(740px, 94vw);
  max-height: 86dvh;
  box-shadow: var(--shadow-lg);
}
dialog::backdrop {
  background: rgba(24, 24, 24, 0.54);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.dialog-top {
  z-index: 2;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.dialog-top h2 { font-size: 20px; font-weight: 750; line-height: 1.3; }
.dialog-top small {
  display: block;
  font: 700 11px Consolas, monospace;
  letter-spacing: 0.1em;
  color: var(--action);
  margin-bottom: 2px;
}
#dialog-body { padding: 20px 22px 24px; overflow-wrap: anywhere; }
.lineup-deeds { white-space: pre-wrap; }
#dialog-body table td:first-child, #dialog-body table th:first-child { padding-left: 10px; }

#toast {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 25;
  background: #282828;
  color: #ffffff;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  max-width: min(460px, 90vw);
}
#toast.bad { background: #484848; }

.mod-message { min-height: 18px; color: #484848; font-size: 13px; }
.mod-message, #social-state, .login-feedback, .member-ban-details { white-space: pre-wrap; overflow-wrap: anywhere; }
.member-ban-details { flex: 1 0 100%; }
.list-line.row:has(.member-ban-details) { flex-wrap: wrap; }
.stack { display: grid; gap: 14px; }
.tilebutton { width: 100%; }
.vscroll { max-height: 420px; overflow: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.superlist .list-line:first-child { border-top: 0; }
.empty a { color: var(--action); text-decoration: underline; }

.split > .panel, .deck > .block { margin-top: 0; }

/* ---------------- 赛事二级栏目导航 ---------------- */
.event-sections {
  display: flex;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  margin: 0 0 18px;
}
.event-sections a {
  padding: 9px 4px 10px;
  font-weight: 650;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.event-sections a[aria-current=page] {
  border-bottom-color: var(--action);
  color: var(--deep);
}

/* ---------------- 创作者名录与头衔 ---------------- */
.directory-card { min-width: 0; }
.directory-card h3, .directory-summary { overflow-wrap: anywhere; }
.directory-summary { white-space: pre-wrap; color: var(--ink-2); font-size: 14px; line-height: 1.65; }
.creator-title, .member-title {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  vertical-align: middle;
  border: 1px solid #b0b0b0;
  color: #505050;
  background: #f1f1f1;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.5;
  padding: 0 6px;
}
.rail-who .creator-title, .rail-who .member-title {
  align-self: flex-start;
  color: #dcdcdc;
  background: rgba(88, 88, 88, 0.72);
  border-color: rgba(188, 188, 188, 0.55);
  margin-top: 3px;
}

/* ---------------- 麦版贴吧 ---------------- */
.forum-row {
  display: flex;
  gap: 1.15rem;
  align-items: center;
  padding: 1rem 0.75rem;
  margin-inline: -0.75rem;
  border-radius: 10px;
  border-bottom: 1px solid #ebebeb;
  transition: background 0.15s var(--ease);
}
.forum-row:last-of-type { border-bottom: 0; }
.forum-row:hover { background: var(--surface-soft); }
.forum-row > div { flex: 1; min-width: 0; }
.forum-row h3 {
  margin: 0.4rem 0 0.3rem;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.38;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.forum-article { max-width: 920px; }
.forum-article h2 {
  margin: 0.6rem 0 0.75rem;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.forum-title { color: inherit; text-decoration: none; }
.forum-title:hover { color: var(--action); text-decoration: underline; text-underline-offset: 3px; }
.forum-row p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.forum-byline {
  display: flex;
  align-items: center;
  gap: 0.45rem 0.55rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.85rem;
}
.forum-identity {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
  min-width: 0;
  max-width: 100%;
}
.forum-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  overflow: hidden;
  border-radius: 50%;
  background: #e8e8e8;
  color: #383838;
  font-weight: 700;
}
.forum-avatar img { width: 100%; height: 100%; object-fit: cover; }
.forum-identity .forum-nick, .forum-identity .xp-badge { color: var(--level-ink); }
.forum-nick { overflow-wrap: anywhere; font-size: 14px; font-weight: 700; }
.account-titles { margin-block: 16px; }
.op-floor, .floor-number { color: var(--muted); font-size: 12px; }
.post-floors { margin-top: 16px; padding: clamp(16px, 3vw, 32px); }
.post-floors > .row h2 { margin: 0; }
.thread-floor { border-top: 1px solid var(--line); padding: 16px 0; }
.floor-post { scroll-margin-top: 90px; }
.floor-post header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.floor-post time, .floor-target { font-size: 12px; color: var(--muted); }
.floor-post p { margin: 8px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.floor-children:not(:empty) { border-left: 2px solid var(--line); padding-left: 12px; margin: 12px 0 0 12px; }
.floor-children .floor-post + .floor-post { margin-top: 12px; }
.floor-children .forum-avatar { width: 24px; height: 24px; }
.post-floors form { margin-top: 16px; }
.account-titles form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.title-colors {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  flex-basis: 100%; min-width: 0; margin: 4px 0; padding: 8px 12px 12px;
  border: 1px solid var(--line); border-radius: 8px;
}
.title-colors[hidden] { display: none; }
.title-colors legend, .title-colors label { font-size: 13px; }
.title-colors label { display: inline-flex; align-items: center; gap: 6px; }
.title-colors input[type="color"] { width: 42px; height: 32px; padding: 2px; cursor: pointer; }
.managed-titles { margin: 0 0 16px; padding: 0; list-style: none; }
.managed-titles li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0; }
.managed-titles .actions { margin-inline-start: auto; }
.board-page, .thread-detail { max-width: 900px; margin-inline: auto; }
.board-cover {
  display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap;
  min-height: 154px; padding: clamp(18px, 4vw, 38px); border-radius: 16px 16px 0 0;
  background: linear-gradient(0deg, #111e 3%, #14141485 65%, #14141436), url('/day-lawn.jpg') center 51% / cover;
  color: white;
}
.board-cover > img { width: 56px; height: 56px; border-radius: 13px; border: 2px solid #fffc; }
.board-cover h1 { margin: 0; align-self: flex-end; color: white; font-size: clamp(24px, 4vw, 38px); }
.board-cover .head-tools { margin-inline-start: auto; align-self: center; }
.board-cover .head-tools .btn { background: white; color: #171717; border-color: white; }
.board-feed { padding: clamp(12px, 2vw, 24px); border-radius: 14px; background: #f2f2f3; margin-top: -10px; position: relative; }
.board-feed .forum-categories { margin-top: 0; gap: 4px; }
.board-feed .forum-categories .tab { background: transparent; border-radius: 0; }
.board-feed .forum-categories .tab.on { color: #141414; box-shadow: inset 0 -3px #222; }
.board-feed .content-search { margin-block: 12px 16px; }
.board-feed .feed-card {
  display: block; position: relative; margin: 10px 0; padding: clamp(14px, 2.5vw, 24px);
  border: 1px solid #dedee0; border-radius: 12px; background: white;
}
.feed-card:focus-within, .board-feed .feed-card:hover { border-color: #aaa; background: white; }
.feed-card header { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 14px; }
.feed-card header small, .feed-card footer { color: var(--muted); font-size: 12px; }
.board-feed .feed-card h3 { margin: 12px 0 5px; font-size: clamp(18px, 2.5vw, 22px); }
.feed-card .forum-title::after { content: ''; position: absolute; inset: 0; border-radius: 12px; }
.feed-card header button { position: relative; z-index: 1; }
.feed-card .feed-image { display: block; width: min(100%, 380px); max-height: 245px; object-fit: contain; object-position: left center; margin: 12px 0 0; border-radius: 8px; }
.feed-card footer { display: flex; align-items: center; gap: 6px; margin-top: 14px; }
.feed-card footer .ico { width: 16px; height: 16px; }
.thread-back { display: flex; gap: 10px; align-items: center; margin: 0 0 10px; }
.thread-detail > .forum-article, .thread-detail > .news-article { max-width: none; padding: clamp(16px, 3vw, 32px); }
.thread-detail .op-floor { display: inline-block; margin: 8px 0 0; }
.thread-detail h1 { font-size: clamp(23px, 3vw, 34px); line-height: 1.32; margin: 12px 0 16px; overflow-wrap: anywhere; }
.floor-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.floor-switch { display: inline-flex; align-items: center; gap: 3px; }
.floor-switch button { color: #686868; background: transparent; border: 0; padding: 5px 9px; cursor: pointer; font: inherit; font-size: 14px; }
.floor-switch button[aria-pressed=true] { color: #171717; font-weight: 750; background: #f1f1f2; border-radius: 6px; }
.floor-children:not(:empty) { padding: 12px; background: #f5f5f6; border: 0; border-radius: 8px; }
.floor-mobile-bar { display: none; }
@media (max-width: 700px) {
  .board-feed .content-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
  .board-feed .content-search label { min-width: 0; }
  .board-cover { min-height: 128px; gap: 10px; }
  .board-cover > img { width: 44px; height: 44px; }
  .board-cover .head-tools { flex-wrap: wrap; }
  .thread-detail { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
  .thread-detail .post-floors { scroll-margin-top: 68px; }
  .floor-mobile-bar { position: fixed; display: flex; align-items: center; gap: 16px; z-index: 8; bottom: 0; left: 0; width: 100%; box-sizing: border-box; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); background: white; border-top: 1px solid var(--line); }
  .floor-write { text-align: left; flex: 1; border: 0; border-radius: 20px; padding: 8px 14px; background: #f1f1f3; color: #505050; cursor: pointer; font: inherit; }
  .post-floors:has(textarea:focus) .floor-mobile-bar { display: none; }
  body:has(.post-floors) .scroll-tools { bottom: calc(68px + env(safe-area-inset-bottom)); }
}
.forum-byline time { font-size: 0.8rem; }
.forum-cover { flex: none; }
.forum-cover img {
  width: 104px;
  height: 80px;
  object-fit: cover;
  border-radius: 9px;
  border: 1px solid var(--line);
  display: block;
}
.forum-prose {
  margin: 1.4rem 0 1.6rem;
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.forum-prose p { white-space: pre-wrap; margin: 1rem 0; }
.forum-prose img, .forum-editor img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  margin: 0.8rem 0;
}
.forum-tools, .forum-emoji {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.forum-emoji {
  padding: 8px;
  margin: 8px 0;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
}
.file-button { position: relative; overflow: hidden; }
.file-button input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.file-button:focus-within { outline: 2px solid #585858; }
.emoji-pick {
  background: transparent;
  border: 0;
  border-radius: 6px;
  font: 1.35rem/1.3 system-ui;
  padding: 0.3rem 0.4rem;
  cursor: pointer;
  transition: background 0.12s ease;
}
.emoji-pick:hover { background: var(--surface-tint); }
.forum-editor textarea {
  display: block;
  width: 100%;
  margin: 0.6rem 0;
  padding: 0.75rem 0.9rem;
  font: inherit;
  line-height: 1.65;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  resize: vertical;
}
.forum-editor figure {
  margin: 0.6rem 0;
  padding: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
}
.forum-editor figure img { max-height: 180px; margin: 0 0 6px; }
.forum-editor figure button { font-size: 0.82rem; padding: 0.25rem 0.65rem; min-height: 30px; }

/* ---------------- 返回顶部悬浮控件 ---------------- */
.scroll-pref {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  padding: 8px 12px;
  cursor: pointer;
  color: #d2d2d2;
  border-radius: 7px;
  transition: background 0.15s ease;
}
.scroll-pref:hover { background: rgba(255, 255, 255, 0.06); }
.scroll-pref input { width: 15px; height: 15px; accent-color: #dcdcdc; }

.scroll-tools {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  display: flex;
  z-index: 8;
  border: 1px solid rgba(210, 210, 210, 0.25);
  border-radius: 999px;
  background: rgba(48, 48, 48, 0.92);
  backdrop-filter: blur(8px);
  color: #ffffff;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.scroll-tools button {
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  min-height: 40px;
  padding: 0 15px;
  transition: background 0.15s ease;
}
.scroll-tools button + button {
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0 13px;
}
.scroll-tools button:focus-visible { outline: 2px solid #dcdcdc; outline-offset: -4px; }
.scroll-tools button:hover { background: rgba(255, 255, 255, 0.14); }

.dialog-scroll-top { margin-left: auto; margin-right: 8px; white-space: nowrap; }
.drawer .scroll-tools { display: none; }

/* ---------------- 响应式断点 ---------------- */
@media (min-width: 1500px) {
  .hero { min-height: 272px; }
  .stat { padding: 18px 20px; }
  .plants img { width: 30px; height: 30px; }
}

@media (min-width: 761px) {
  .hero {
    min-height: clamp(238px, 18vw, 286px);
    background-color: #282828;
    background-size: auto 103%;
    background-position: right center;
  }
}

@media (max-width: 1160px) {
  #rail { width: 192px; padding-inline: 11px; }
  .shell { margin-left: 192px; }
  #content { padding-inline: 22px; }
  .split { grid-template-columns: minmax(0, 1.25fr) minmax(240px, 0.9fr); }
  .panel-head { padding: 15px 16px 12px; }
  .panel-body { padding: 0 16px 14px; }
  .plants { gap: 2px; }
  .plants img { width: 24px; height: 24px; }
  .stat { padding: 13px 14px; }
  .stats { gap: 10px; }
}

@media (max-width: 930px) {
  .split { grid-template-columns: 1fr; }
  .hero-copy { max-width: 78%; }
  .desklabel, .slash { display: none; }
}

@media (max-width: 760px) {
  #rail {
    width: 242px;
    transform: translateX(-106%);
    transition: transform 0.22s var(--ease);
    border-radius: 0 16px 16px 0;
  }
  body.drawer #rail {
    transform: none;
    box-shadow: 12px 0 40px rgba(16, 16, 16, 0.35);
  }
  body.drawer #shade {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(32, 32, 32, 0.48);
    backdrop-filter: blur(2px);
    z-index: 9;
  }
  .shell { margin-left: 0; }
  .mobile-only { display: inline-grid; }
  .bar { height: 56px; padding: 0 14px; }
  .bar-actions { gap: 6px; }
  #content { padding: 18px 14px 52px; }
  .heading { margin-bottom: 14px; gap: 10px; }
  .heading h1 { font-size: 26px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0 18px; }
  .hero { min-height: 205px; background-position: 60% center; border-radius: 13px; }
  .hero-copy { max-width: 88%; padding: 20px; }
  .hero h2 { font-size: 28px; }
  .hero:before { background: linear-gradient(95deg, rgba(32, 32, 32, 0.94), rgba(40, 40, 40, 0.78) 52%, rgba(40, 40, 40, 0.22)); }
  .deck { grid-template-columns: 1fr; }
  .head-tools { gap: 5px; }
  .hero p { font-size: 13.5px; }
  .heading .pill { font-size: 11px; }
  .toolbar input { max-width: none; }
  input, textarea, select { font-size: 16px; }
  .panel-head { padding: 15px 15px 12px; }
  .panel-body { padding: 0 15px 14px; }
  .block { padding: 15px; }
  .stat-number { font-size: 26px; }
  td, th { padding: 10px 8px; }
  td:first-child, th:first-child { padding-left: 12px; }
  td:last-child, th:last-child { padding-right: 12px; }
  .wrap-action { flex-wrap: wrap; }
  .brand { margin-bottom: 18px; }
}

@media (max-width: 620px) {
  dialog {
    width: 100%;
    max-width: none;
    max-height: 88dvh;
    margin: auto 0 0;
    border-radius: 18px 18px 0 0;
    border-bottom: 0;
  }
  .dialog-top { padding: 14px 16px; }
  #dialog-body { padding: 16px 16px max(20px, env(safe-area-inset-bottom)); }
  .scroll-tools { right: 12px; bottom: max(14px, env(safe-area-inset-bottom)); }
  .forum-cover img { width: 72px; height: 64px; }
  .forum-row { gap: 0.75rem; padding: 0.9rem 0.4rem; margin-inline: -0.4rem; }
  .scores { gap: 14px 20px; padding: 12px 14px; }
  .pager { padding: 11px 14px; flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .hero-copy { max-width: 100%; padding: 18px; }
  .hero h2 { font-size: clamp(23px, 6.8vw, 29px); }
  .hero { background-position: 58% center; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
