@import url("https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=IBM+Plex+Sans:wght@400;500;600&display=swap");

:root {
  --bg-0: #f5f6f8;
  --bg-1: #ffffff;
  --bg-2: #eef0f3;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --text: #1f2328;
  --muted: #646a73;
  --faint: #8b919a;
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --violet: #6d28d9;
  --pink: #db2777;
  --gold: #d97706;
  --like: #e11d48;
  --ok: #059669;
  --danger: #dc2626;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  --glass: #ffffff;
  --fill: #f3f4f6;
  --fill-hover: #f8fafc;
  --on-accent: #ffffff;
  --font-display: "Sora", "PingFang SC", "Noto Sans SC", sans-serif;
  --font-body: "IBM Plex Sans", "PingFang SC", "Noto Sans SC", sans-serif;
}

[data-theme="dark"] {
  --bg-0: #050816;
  --bg-1: #0b1224;
  --bg-2: #121a32;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f8fafc;
  --muted: #94a3b8;
  --faint: #64748b;
  --accent: #67e8f9;
  --accent-2: #38bdf8;
  --violet: #a78bfa;
  --gold: #f5c16c;
  --ok: #34d399;
  --danger: #fb7185;
  --glass: rgba(15, 23, 42, 0.92);
  --fill: rgba(255, 255, 255, 0.06);
  --fill-hover: rgba(255, 255, 255, 0.1);
  --on-accent: #081018;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.55);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg-0);
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

.aurora { display: none;
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.aurora::before, .aurora::after {
  content: ""; position: absolute; width: 52vw; height: 52vw; border-radius: 50%;
  filter: blur(80px); opacity: .45; animation: drift 18s ease-in-out infinite;
}
.aurora::before {
  left: -12vw; top: -18vw;
  background: radial-gradient(circle, #67e8f9 0%, transparent 68%);
}
.aurora::after {
  right: -10vw; top: 8vh;
  background: radial-gradient(circle, #a78bfa 0%, transparent 70%);
  animation-delay: -7s;
}
.orb {
  position: absolute; width: 28vw; height: 28vw; right: 18vw; bottom: -8vw;
  background: radial-gradient(circle, rgba(240, 171, 252, .35), transparent 70%);
  filter: blur(40px); animation: drift 22s ease-in-out infinite reverse;
}
.noise { display: none;
  position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(4vw, 3vh, 0) scale(1.12); }
}

.chip {
  display: inline-flex; align-items: center; width: fit-content;
}
.chip.on { color: var(--accent); border-color: var(--accent); background: #eff6ff; }
[data-theme="dark"] .chip.on { background: rgba(103,232,249,.12); }

.util {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 6px 28px; font-size: 12px; color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
}
.util span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.util a { color: var(--accent); font-weight: 600; flex: 0 0 auto; }

.shell { position: relative; z-index: 2; min-height: 100vh; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 24px;
  min-height: 56px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; letter-spacing: .02em; flex: 0 0 auto; }
.mark {
  width: 32px; height: 32px; border-radius: 8px;
  overflow: hidden; background: transparent;
  display: grid; place-items: center;
}
.mark span, .mark img {
  width: 32px; height: 32px; border-radius: 8px;
  display: block; object-fit: contain;
  background: url("/static/forum/logo.png") center / contain no-repeat;
  font-size: 0; color: transparent; text-indent: -999px;
}
[data-theme="dark"] .mark span, [data-theme="dark"] .mark img { background-color: transparent; }
.search {
  flex: 1; max-width: 560px; position: relative;
}
.search input {
  width: 100%; height: 36px; border-radius: 18px; border: 0;
  background: var(--fill); padding: 0 14px 0 38px; outline: none;
}
.search input:focus { background: #fff; box-shadow: 0 0 0 1px var(--line-strong); }
[data-theme="dark"] .search input:focus { background: var(--bg-1); }
.search svg { position: absolute; left: 12px; top: 9px; width: 16px; height: 16px; opacity: .5; pointer-events: none; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.btn {
  border: 0; border-radius: 999px; padding: 9px 16px; font-weight: 600;
  background: var(--fill); border: 1px solid var(--line);
  transition: background .15s ease, color .15s ease;
}
.btn:hover { background: var(--fill-hover); }
.btn-primary {
  background: var(--accent);
  color: var(--on-accent); border: 0;
}
.btn-primary:hover { background: var(--accent-2); }
.top-actions .btn {
  height: 36px; padding: 0 16px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; border: 0;
}
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: transparent; border: 0; position: relative;
  color: var(--muted); padding: 0;
}
.icon-btn:hover { background: var(--fill); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; display: block; }
.badge {
  position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 99px; background: #fb7185; color: #fff; font-size: 10px; font-weight: 700;
  display: grid; place-items: center;
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); display: grid; place-items: center;
  font-weight: 700; color: var(--on-accent); border: 0; padding: 0; cursor: pointer; font-size: 14px;
  overflow: hidden; position: relative;
}
.avatar-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%; display: block;
}
.top-actions .avatar:hover { filter: brightness(1.06); }

.nav {
  display: flex; gap: 6px; padding: 10px 28px 0; overflow-x: auto;
}
.nav a {
  padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14px;
}
.nav a.active, .nav a:hover {
  color: var(--text);
  background: var(--fill);
}

.layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px; padding: 22px 28px 80px; max-width: 1240px; margin: 0 auto;
}
.layout.wide { grid-template-columns: 1fr; max-width: 1080px; width: 100%; }
.layout.layout-tieba {
  grid-template-columns: 184px minmax(0, 640px) 280px;
  gap: 16px; max-width: 1180px; padding: 16px 20px 80px; justify-content: center;
}
.shell:has(.layout-tieba) .nav { display: none; }
.rail {
  position: sticky; top: 72px; align-self: start;
  display: grid; gap: 2px; padding: 4px 0 24px;
}
.rail-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
  color: var(--text); font-size: 14px; font-weight: 600;
}
.rail-item.on, .rail-item:hover { background: var(--fill); }
.rail-item.on { color: var(--accent); }
.rail-ico {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: #dbeafe; color: #1d4ed8; font-size: 12px; font-weight: 800; flex: 0 0 auto;
}
.rail-label {
  margin: 14px 10px 6px; font-size: 12px; color: var(--muted); font-weight: 700;
}

.hero {
  position: relative; overflow: hidden;
  border-radius: 28px; padding: 36px 40px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.hero h1 {
  font-family: var(--font-display); font-size: 32px; line-height: 1.25; margin: 0 0 10px;
  color: var(--text);
}
.hero p { margin: 0; color: var(--muted); max-width: 560px; font-size: 16px; }
.hero-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.chip {
  padding: 6px 12px; border-radius: 999px; background: var(--fill);
  border: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 600;
}

.section-head {
  display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 12px;
}
.section-head h2 { margin: 0; font-family: var(--font-display); font-size: 18px; }
.section-head a { color: var(--accent); font-size: 13px; font-weight: 600; }

.card {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.thread {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: start;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
  transition: background .2s ease, transform .2s ease;
}
.thread:last-child { border-bottom: 0; }
.thread:hover { background: var(--fill); }
.vote {
  display: grid; justify-items: center; gap: 4px; color: var(--muted); font-weight: 700; font-size: 13px;
}
.vote b { font-size: 16px; color: var(--text); }
.thread h3 { margin: 0 0 6px; font-size: 16px; font-weight: 650; }

.feed { display: grid; gap: 10px; }
.notice-card { padding: 8px 12px 6px; border-radius: 8px; box-shadow: none; margin-bottom: 10px; }
.notice-head {
  font-size: 12px; font-weight: 700; color: var(--gold); margin: 2px 0 4px;
}
.notice-row {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 7px 2px; border-top: 1px solid var(--line);
  font-size: 14px; font-weight: 650; color: var(--text);
}
.notice-row:hover { color: var(--accent); }
.notice-pin {
  flex: 0 0 auto; font-size: 11px; font-weight: 700; color: var(--gold);
  background: #fef3c7; border-radius: 4px; padding: 1px 5px;
}
[data-theme="dark"] .notice-pin { background: rgba(217,119,6,.22); }
.notice-board {
  flex: 0 0 auto; font-size: 12px; color: var(--muted); font-weight: 600;
}
.notice-title {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.feed-card { position: relative; padding: 14px 16px 8px; border-radius: 8px; box-shadow: none; cursor: pointer; }
.feed-card-hit { position: absolute; inset: 0; z-index: 1; color: inherit; text-decoration: none; }
.feed-head .avatar,
.feed-head .who a,
.feed-head .meta a,
.feed-ops,
.feed-play,
.feed-more,
.owner-menu,
.feed-title,
.feed-excerpt,
.feed-cover,
.feed-grid,
.media-grid {
  position: relative;
  z-index: 2;
}
.feed-head { display: flex; gap: 10px; align-items: center; }
.feed-head .who { font-weight: 700; font-size: 14px; }
.feed-head-main { min-width: 0; flex: 1; }
.bar-avatar, .avatar.bar-avatar {
  width: 42px; height: 42px; border-radius: 50%; font-size: 15px; flex: 0 0 auto;
  background: #dbeafe; color: #1d4ed8; font-weight: 800;
}
.feed-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin: 10px 0 6px; font-size: 16px; font-weight: 700; line-height: 1.4;
}
.feed-title:hover { color: var(--accent); }
.feed-excerpt {
  margin: 0 0 10px; font-size: 14px; line-height: 1.55; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  text-decoration: none;
}
.feed-cover {
  display: block; margin: 0 0 8px; border-radius: 12px; overflow: hidden;
  max-height: 280px; background: transparent; width: fit-content; max-width: 100%;
  line-height: 0;
}
.feed-cover img {
  width: auto; max-width: 100%; height: auto; max-height: 280px;
  object-fit: contain; object-position: left top; display: block; background: transparent;
}
.media-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.feed .media-grid, .feed-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px; max-width: 300px; margin: 0 0 8px;
}
.feed .media-thumb, .feed-grid .media-thumb {
  min-height: 0; max-height: 96px; aspect-ratio: 1; border-radius: 8px;
}
.feed-ops a.op { text-decoration: none; color: inherit; }
.feed-body { font-size: 15px; line-height: 1.65; }
.feed-body p { margin: 0 0 8px; }
.feed-body a { color: var(--accent); font-weight: 600; }
.feed-ops { margin-top: 2px; justify-content: flex-start; gap: 2px; }
.ops.feed-ops { margin-top: 2px; }
.feed-ops .op {
  background: transparent; border: 0; padding: 0 16px 0 0; height: 32px; min-width: 0;
  border-radius: 0; color: var(--muted); font-weight: 650; font-size: 13px;
}
.feed-ops .op b { font-weight: 650; font-size: 13px; }
.feed-ops .op svg { width: 22px; height: 22px; flex: 0 0 auto; }
.feed-ops .op:hover { background: transparent; color: var(--text); }
.feed-ops .op.active { color: var(--like); background: transparent; }
.feed-ops .op.like.active svg,
.feed-ops .op[data-feed-like].active svg { fill: currentColor; stroke: currentColor; }
.op.like.active { color: var(--like); background: #fff1f2; border-color: #fecdd3; }
.op.like.active svg { fill: currentColor; stroke: currentColor; }
.feed-ops .op.like.active { background: transparent; border: 0; color: var(--like); }
.feed-ops .op.star.active { color: var(--gold); background: transparent; border: 0; }
.op.star.active { color: var(--gold); background: #fffbeb; border-color: #fde68a; }
.btn.followed {
  background: var(--fill); color: var(--muted); border: 1px solid var(--line);
}
.btn.followed:hover { background: var(--fill-hover); color: var(--text); }
.btn.followed:disabled { opacity: .85; cursor: default; }
.feed-more { position: relative; flex: 0 0 auto; margin-left: auto; align-self: flex-start; }
.more-btn {
  width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent;
  color: var(--muted); display: grid; place-items: center; cursor: pointer;
}
.more-btn:hover, .more-btn.open { background: var(--fill); color: var(--text); }
.more-btn svg { width: 18px; height: 18px; }
.owner-menu {
  position: absolute; right: 0; top: 36px; min-width: 132px; z-index: 8;
  background: var(--bg-1); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15,23,42,.10); padding: 6px;
}
.owner-menu button {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 10px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer;
}
.owner-menu button:hover { background: var(--fill); }
.owner-menu button.danger, .op.danger { color: var(--danger); }
.btn-danger {
  background: var(--danger); color: #fff; border: 0;
}
.btn.btn-danger:hover,
.btn.btn-danger:focus,
.btn.btn-danger:active {
  background: #b91c1c; color: #fff; border-color: transparent; filter: none;
}
.btn.btn-danger:active { background: #991b1b; }
[data-theme="dark"] .btn.btn-danger:hover,
[data-theme="dark"] .btn.btn-danger:focus { background: #e11d48; }
[data-theme="dark"] .btn.btn-danger:active { background: #be123c; }
.op.danger:hover { background: #fef2f2; color: var(--danger); border-color: #fecaca; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn { flex: 1; justify-content: center; }
.feed-composer {
  margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line);
  display: grid; gap: 8px;
}
.feed-composer textarea {
  width: 100%; min-height: 72px; resize: vertical; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--fill); padding: 10px 12px; outline: none;
}
.feed-body.folded { max-height: 12.4em; overflow: hidden; position: relative; }
.feed-body.folded::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40px;
  background: linear-gradient(transparent, var(--bg-1));
}

.meta { color: var(--muted); font-size: 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tag {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  background: #eff6ff; color: var(--accent);
}
[data-theme="dark"] .tag { background: rgba(103,232,249,.12); }
.tag.gold { background: rgba(245,193,108,.16); color: var(--gold); }
.tag.violet { background: rgba(167,139,250,.16); color: var(--violet); }
.tag.ok { background: rgba(52,211,153,.14); color: var(--ok); }
.read { opacity: .62; }

.stats { text-align: right; color: var(--muted); font-size: 12px; min-width: 88px; }
.stats b { display: block; color: var(--text); font-size: 14px; }

.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.board {
  padding: 18px; border-radius: 20px; border: 1px solid var(--line);
  background: var(--bg-1);
  transition: transform .2s ease, border-color .2s ease;
}
.board:hover { transform: translateY(-2px); border-color: var(--accent); }
.board .ico {
  width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center;
  background: #dbeafe; color: #1d4ed8; margin-bottom: 12px; font-size: 16px; font-weight: 800;
}
.board h3 { margin: 0 0 6px; font-family: var(--font-display); }
.board p { margin: 0; color: var(--muted); font-size: 13px; min-height: 38px; }
.board .foot { display: flex; justify-content: space-between; margin-top: 14px; color: var(--faint); font-size: 12px; }

.side { display: grid; gap: 14px; align-content: start; }
.panel { padding: 16px; }
.panel h3 { margin: 0 0 12px; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.checkin {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.rank-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rank-row:last-child { border-bottom: 0; }
.n { width: 22px; color: var(--gold); font-weight: 800; font-family: var(--font-display); }

.crumb { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.thread-hero { padding: 16px; }
.thread-hero h1 { margin: 0 0 8px; font-family: var(--font-display); font-size: 24px; line-height: 1.3; }
.thread-hero .chips { margin: 0 0 10px; }
.thread-hero .body { margin-top: 12px; }
.author { display: flex; gap: 10px; align-items: center; }
.author > .btn { margin-left: auto; flex: 0 0 auto; padding: 6px 14px; }
.body { font-size: 16px; color: var(--text); }
.body p { margin: 0 0 14px; }
.link-card {
  display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 12px;
  border-radius: 16px; border: 1px solid var(--line); background: var(--fill);
  margin: 16px 0;
}
.link-card img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; background: #111827; }
.ops { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.op {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px;
  background: var(--fill); border: 1px solid var(--line); font-size: 13px; font-weight: 600;
}
.op.active { background: #eff6ff; color: var(--accent); border-color: #bfdbfe; }
.ops.thread-ops {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: center; gap: 0; margin-top: 14px; padding-top: 6px;
  border-top: 1px solid var(--line); overflow: visible;
}
.ops.thread-ops .op {
  background: transparent; border: 0; border-radius: 10px;
  height: 44px; min-width: 0; padding: 0 4px; justify-content: center;
  color: var(--muted); font-size: 13px; font-weight: 650;
}
.ops.thread-ops .op svg { width: 20px; height: 20px; flex: 0 0 auto; overflow: visible; }
.ops.thread-ops .op:hover { background: var(--fill); }
.ops.thread-ops .op.like.active {
  color: var(--like); background: transparent; border: 0;
}
.ops.thread-ops .op.star.active {
  color: var(--gold); background: transparent; border: 0;
}
.thread-more { margin-left: 0; align-self: center; }
.thread-more .more-btn { width: 36px; height: 36px; }
.thread-more .owner-menu { top: auto; bottom: calc(100% + 4px); z-index: 12; }
.ops.thread-ops { position: relative; z-index: 5; }
.ops .op svg, .reply .op svg { width: 16px; height: 16px; flex: 0 0 auto; }

.reply { display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.thread-replies > .reply:first-child { border-top: 0; padding-top: 0; }
.reply-kids {
  margin: 10px 0 0;
  padding: 4px 12px 8px;
  background: var(--fill);
  border-radius: 12px;
}
.reply-kids .reply {
  grid-template-columns: 32px 1fr; gap: 8px;
  padding: 10px 0; border-top: 1px solid var(--line);
}
.reply-kids .reply:first-child { border-top: 0; padding-top: 8px; }
.reply-kids .avatar { width: 32px; height: 32px; font-size: 12px; }
.reply-kids .fold-btn { margin: 4px 0 6px; }
.reply .who { font-weight: 700; }
.reply-at { color: var(--accent); font-weight: 650; margin-right: 4px; }

.composer { padding: 16px; display: grid; gap: 12px; }
.composer h2 { margin: 0; font-family: var(--font-display); font-size: 20px; }
.composer-title { font-size: 18px !important; font-weight: 700; padding: 10px 0 !important; border: 0 !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; background: transparent !important; }
.composer-body { min-height: 180px !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; padding: 8px 0 !important; }
.composer textarea {
  width: 100%; min-width: 0; min-height: 96px; resize: vertical;
  border-radius: 14px; border: 1px solid var(--line-strong);
  background: var(--bg-1); padding: 12px 14px; outline: none;
}
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); font-weight: 600; }
.field input, .field textarea, .field select {
  width: 100%; min-width: 0; border-radius: 14px; border: 1px solid var(--line-strong);
  background: var(--bg-1); padding: 12px 14px; outline: none;
}
.field textarea { min-height: 220px; resize: vertical; }
.toolbar { display: flex; gap: 6px; flex-wrap: wrap; }
.toolbar button { padding: 6px 10px; border-radius: 10px; background: var(--fill); border: 1px solid var(--line); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.timeline { display: grid; gap: 0; }
.tl {
  display: grid; grid-template-columns: 18px 1fr; gap: 12px; padding-bottom: 18px; position: relative;
}
.tl::before { content: ""; position: absolute; left: 7px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.tl:last-child::before { display: none; }
.dot { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: #111827; border: 1px solid #111827; color: #fff;
  padding: 12px 18px; border-radius: 999px; opacity: 0; pointer-events: none;
  transition: .3s ease; z-index: 50; font-weight: 600;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.modal-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 200;
  display: grid; place-items: center; padding: 20px;
}
.modal {
  width: min(400px, calc(100vw - 32px)); border-radius: 20px; padding: 26px 24px 20px;
  background: var(--bg-1); border: 1px solid var(--line); box-shadow: 0 16px 48px rgba(15,23,42,.18);
}
.modal h2 { margin: 0 0 8px; font-family: var(--font-display); font-size: 22px; }
.modal-lead { margin: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.55; display: block; }
.code-row { display: flex; gap: 10px; align-items: stretch; }
.code-row input { flex: 1 1 auto; width: auto !important; min-width: 0; height: 44px; }
.code-btn {
  flex: 0 0 auto; white-space: nowrap; border-radius: 12px !important;
  padding: 0 14px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  transform: none !important;
}
.modal-submit { width: 100%; margin-top: 18px; }
.modal-cancel {
  width: 100%; margin-top: 8px; background: transparent; border: 0;
  color: var(--muted); transform: none !important;
}
.modal-cancel:hover { background: var(--fill); }

.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.hidden { display: none !important; }

.body img, .forum-video, .forum-gif, .forum-img {
  max-width: 100%; height: auto; border-radius: 14px; display: block;
}
.forum-img {
  max-height: min(720px, 80vh); width: auto; object-fit: contain;
}
.feed-cover { overflow: hidden; border-radius: 12px; }
.media-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.forum-video {
  width: auto; max-width: 100%; height: auto; max-height: min(720px, 80vh);
  background: #000; object-fit: contain; aspect-ratio: auto;
}
.media-frame, .media-thumb {
  position: relative; border-radius: 16px; overflow: hidden;
  background: var(--fill);
  min-height: 160px; display: grid; place-items: center; color: var(--muted);
}
.media-frame { aspect-ratio: auto; width: fit-content; max-width: 100%; min-height: 0; margin: 12px 0; background: #0f172a; }
.media-play {
  width: 56px; height: 56px; border-radius: 50%; padding: 0;
  background: rgba(255,255,255,.16); color: #fff;
  display: grid; place-items: center; line-height: 0;
  font-size: 0;
}
.media-play::after {
  content: ""; display: block; width: 0; height: 0;
  transform: translateX(2px);
  border-style: solid; border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #fff;
}
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.media-thumb { min-height: 96px; aspect-ratio: 1; }
.media-badge {
  position: absolute; left: 8px; top: 8px; z-index: 1;
  padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 800;
  background: rgba(8,16,24,.72); color: #fff; letter-spacing: .04em;
}
.media-gif-wrap { position: relative; display: inline-block; max-width: 100%; cursor: zoom-in; }
.body .forum-img, .body .forum-gif, .reply .forum-img, .reply .forum-gif,
.media-frame, .media-thumb { cursor: zoom-in; }
.media-frame .forum-video { pointer-events: none; }
.reply-ops {
  display: flex; align-items: center; gap: 2px 14px; flex-wrap: wrap;
  margin-top: 8px; color: var(--muted); font-size: 12px;
}
.reply-ops .ro-time { color: var(--muted); }
.reply-ops .ro-btn {
  display: inline-flex; align-items: center; gap: 4px;
  border: 0; background: transparent; padding: 2px 0;
  color: var(--muted); font-size: 12px; font-weight: 600;
  cursor: pointer; min-width: 0; height: auto; line-height: 1.2;
  border-radius: 0; box-shadow: none;
}
.reply-ops .ro-btn:hover { color: var(--text); background: transparent; }
.reply-ops .ro-btn.like.active { color: var(--like); background: transparent; border: 0; }
.reply-ops .ro-btn.like.active svg { fill: currentColor; stroke: currentColor; }
.reply-ops .ro-btn.star.active { color: var(--gold); }
.reply-ops .ro-btn.star.active svg { fill: currentColor; stroke: currentColor; }
.reply-ops .ro-btn.danger { color: var(--danger); background: transparent; }
.reply-ops .ro-btn.danger:hover { color: #b91c1c; background: transparent; }
.reply-ops svg { width: 15px; height: 15px; flex: 0 0 auto; }
.media-viewer {
  position: fixed; inset: 0; z-index: 200;
  background: #000;
  display: grid; place-items: center;
}
.media-viewer .mv-stage {
  width: 100%; height: 100%; display: grid; place-items: center;
  padding: 52px 8px 72px;
  box-sizing: border-box;
}
body.media-open .tabbar,
body.media-open .topbar { visibility: hidden; pointer-events: none; }
.media-viewer img, .media-viewer video {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto; object-fit: contain; border-radius: 0;
  background: #000;
}
.mv-close, .mv-prev, .mv-next {
  position: absolute; z-index: 2; border: 0; background: rgba(255,255,255,.14);
  color: #fff; cursor: pointer; display: grid; place-items: center;
}
.mv-close {
  top: max(12px, env(safe-area-inset-top)); right: 16px;
  width: 40px; height: 40px; border-radius: 50%; font-size: 22px; line-height: 1;
}
.mv-prev, .mv-next {
  top: 50%; width: 40px; height: 40px; border-radius: 50%; font-size: 28px; line-height: 1;
  transform: translateY(-50%);
}
.mv-prev { left: 12px; }
.mv-next { right: 12px; }
.mv-count {
  position: absolute; left: 0; right: 0; bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 2; text-align: center; color: rgba(255,255,255,.78);
  font-size: 13px; font-weight: 600; pointer-events: none;
}
.media-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.ops-scroll { flex-wrap: wrap; overflow: visible; padding-bottom: 0; }
.fold-btn {
  margin: 8px 0 0; padding: 6px 0; border: 0; background: none;
  color: var(--accent); font-weight: 700; font-size: 13px;
}
.reply-body.folded { max-height: 9.3em; overflow: hidden; position: relative; }
.reply-body.folded::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 36px;
  background: linear-gradient(transparent, var(--bg-1));
}
.profile-tabs {
  display: flex; gap: 4px; overflow-x: auto; padding: 14px 0 8px;
}
.profile-tabs button {
  border: 0; background: var(--fill); color: var(--muted);
  padding: 8px 14px; border-radius: 999px; font-weight: 700; white-space: nowrap;
}
.profile-tabs button.active { color: var(--on-accent); background: var(--accent); }
.me-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.me-head .author { flex: 1; min-width: 0; }
.me-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px;
}
.me-stats button {
  border: 0; background: var(--fill); border-radius: 12px; padding: 10px 8px;
  display: grid; gap: 2px; justify-items: center; cursor: pointer; font-family: inherit;
}
.me-stats b { font-size: 18px; color: var(--text); font-weight: 800; line-height: 1.2; }
.me-stats span { font-size: 12px; color: var(--muted); font-weight: 600; }
.me-stats button.active { background: #eff6ff; }
.me-stats button.active span { color: var(--accent); }
[data-theme="dark"] .me-stats button.active { background: rgba(37,99,235,.18); }
.me-check {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; margin: 12px 0;
}
.me-check .btn { flex: 0 0 auto; font-family: inherit; }
.me-check b { display: block; font-size: 15px; }
.me-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 4px 8px; margin: 0 0 8px;
}
.me-cell {
  border: 0; background: transparent; padding: 10px 4px 8px;
  display: grid; gap: 6px; justify-items: center; text-align: center;
  font-size: 12px; font-weight: 650; color: var(--text); cursor: pointer;
  text-decoration: none; font-family: inherit;
}
.me-cell-ico {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--fill); font-size: 15px; font-weight: 800; color: var(--accent);
}
.me-cell.active .me-cell-ico { background: #dbeafe; }
[data-theme="dark"] .me-cell.active .me-cell-ico { background: rgba(37,99,235,.28); }
.me-list { padding: 4px 0 0; }
.me-list-row {
  display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
  padding: 14px 0; border-bottom: 1px solid var(--line);
  font-size: 14px; font-weight: 650;
}
.me-list-row:last-child { border-bottom: 0; font-weight: 500; color: var(--muted); }
.blockquote, .body blockquote {
  margin: 12px 0; padding: 10px 14px; border-left: 3px solid var(--accent);
  background: var(--fill); border-radius: 0 12px 12px 0; color: var(--muted);
}
.sheet-mask {
  position: fixed; inset: 0; background: rgba(2,6,23,.55); z-index: 70;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: min(520px, 100%); border-radius: 24px 24px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  background: var(--bg-1); border: 1px solid var(--line-strong);
}
.sheet h3 { margin: 4px 0 14px; font-family: var(--font-display); font-size: 18px; text-align: center; }
.sheet-handle {
  width: 36px; height: 4px; border-radius: 99px; background: var(--line);
  margin: 0 auto 12px;
}
.sheet-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.sheet-item {
  display: grid; justify-items: center; gap: 8px; padding: 4px 0 0;
  border: 0; background: transparent; color: var(--text);
  font-size: 12px; font-weight: 650; cursor: pointer;
}
.sheet-ico {
  width: 52px; height: 52px; border-radius: 16px;
  display: grid; place-items: center; color: #fff;
}
.sheet-ico svg { width: 24px; height: 24px; }
.sheet-ico-copy { background: linear-gradient(180deg, #60a5fa, #2563eb); }
.sheet-ico-sys { background: linear-gradient(180deg, #4ade80, #16a34a); }
.sheet-ico-repost { background: linear-gradient(180deg, #fbbf24, #d97706); }
.sheet-ico-feedback { background: linear-gradient(180deg, #a78bfa, #7c3aed); }
.sheet-ico-report { background: linear-gradient(180deg, #fb7185, #e11d48); }
.sheet-ico-image { background: linear-gradient(180deg, #60a5fa, #2563eb); }
.sheet-ico-video { background: linear-gradient(180deg, #a78bfa, #7c3aed); }
.sheet-ico-audio { background: linear-gradient(180deg, #4ade80, #16a34a); }
.sheet-grid-3 { grid-template-columns: repeat(3, 1fr); max-width: 280px; margin: 0 auto; }
.sheet-cancel {
  display: block; width: 100%; margin-top: 14px; height: 44px;
  border: 0; border-radius: 12px; background: var(--fill); color: var(--text);
  font-size: 15px; font-weight: 700; cursor: pointer;
}
.phone-frame { max-width: 390px; margin: 0 auto; min-height: 100vh; border-inline: 1px solid var(--line); }
.phone-frame .nav { display: none; }
.phone-frame .layout { padding-bottom: 88px; }
.tabbar {
  display: none;
  grid-template-columns: repeat(5, 1fr); align-items: end;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: var(--bg-1); border-top: 1px solid var(--line);
}
.tabbar a {
  text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); padding: 6px 0;
}
.tabbar a.active { color: var(--accent); }
.tab-plus {
  width: 44px; height: 44px; margin: 0 auto; border-radius: 16px;
  background: var(--accent); color: var(--on-accent) !important;
  display: grid !important; place-items: center; font-size: 16px;
}
.phone-frame .tabbar { display: grid; position: sticky; }
.phone-frame .search { display: none; }
.phone-frame .search-toggle { display: grid; }
.phone-frame .side, .phone-frame .rail, .phone-frame .util { display: none; }
.phone-frame .brand-rest { display: none; }
.search-toggle { display: none; }

.section-head { flex-wrap: wrap; gap: 10px; }
.section-head .chips { margin-top: 0; }
.feed-title, .feed-excerpt, .body, .thread h3, .thread-hero h1 { overflow-wrap: anywhere; word-break: break-word; }
.link-card { min-width: 0; }
.link-card > div { min-width: 0; }

.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; min-height: 44px;
}
.tabbar a svg { width: 22px; height: 22px; display: block; }
.tabbar .tab-plus svg { width: 20px; height: 20px; color: var(--on-accent); }


html, body { overflow-x: hidden; }
.shell, #app, .layout, main, .feed, .feed-card, .composer, .thread, .hero { min-width: 0; }
#avatarBtn.btn {
  height: 36px; padding: 0 14px; display: inline-flex; align-items: center;
  line-height: 1; white-space: nowrap;
}
.hero .author { flex-wrap: wrap; align-items: center; }
.hero .author > div { min-width: 0; }
.hero .author h1 { font-size: clamp(20px, 5vw, 28px) !important; word-break: break-word; }
.body img, .forum-video, .forum-gif, .forum-img { height: auto; }
.thread > div { min-width: 0; }
.composer-foot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.me-tools { margin: 12px 0; display: grid; gap: 12px; }
.search-toggle { place-items: center; }

@media (max-width: 960px) {
  .rail { display: none; }
  .util { display: none; }
  .side { display: none; }
  .layout,
  .layout.layout-tieba,
  .layout.wide {
    grid-template-columns: minmax(0, 1fr);
    max-width: none;
    padding: 12px 12px 28px;
    gap: 12px;
  }
  .hero { padding: 20px 16px; border-radius: 18px; }
  .hero h1 { font-size: 22px; }
  .board-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar {
    padding: 8px 12px;
    padding-top: max(8px, env(safe-area-inset-top));
    gap: 8px;
  }
  .nav { padding: 8px 12px 0; }
  .thread { grid-template-columns: 44px 1fr; }
  .stats { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .thread-hero { padding: 16px; }
  .thread-hero h1 { font-size: 20px; }
  .feed-cover:not(.feed-video),
  .feed-cover:not(.feed-video) img,
  .feed-cover.feed-video,
  .feed-cover.feed-video video,
  .feed-cover.feed-video img { max-height: 240px; }
  .checkin { flex-wrap: wrap; }
}

@media (max-width: 720px) {
  .nav { display: none; }
  .side { display: none; }
  .search { display: none; }
  .search.open {
    display: block !important;
    position: absolute; left: 12px; right: 12px;
    top: calc(100% + 8px); z-index: 22; max-width: none;
  }
  .search.open input { box-shadow: 0 10px 28px rgba(15,23,42,.12); background: #fff; }
  .search-toggle { display: grid; }
  .top-actions .btn-primary { display: none; }
  .top-actions a[href="#/messages"],
  #themeBtn { display: none; }
  .brand-rest { display: none; }
  .layout,
  .layout.layout-tieba,
  .layout.wide {
    padding: 10px 10px calc(92px + env(safe-area-inset-bottom));
  }
  .section-head { margin: 4px 0 10px; align-items: flex-start; }
  .chips { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .chip { flex: 0 0 auto; }
  .feed-card { padding: 12px 12px 8px; }
  .bar-avatar, .avatar.bar-avatar { width: 36px; height: 36px; font-size: 13px; }
  .composer { padding: 14px; }
  .field textarea { min-height: 160px; }
  .link-card { grid-template-columns: 1fr; }
  .link-card img { width: 100%; height: 140px; }
  .sheet-grid { grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .sheet-ico { width: 48px; height: 48px; border-radius: 14px; }
  .modal { width: calc(100vw - 28px); padding: 22px 16px 16px; }
  .code-row { gap: 8px; }
  .code-btn { padding: 0 10px; font-size: 13px; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .feed-ops { justify-content: flex-start; width: auto; }
  .feed-ops .op { flex: 0 0 auto; justify-content: flex-start; min-width: 0; padding-right: 18px; height: 32px; }
  .tabbar { display: grid; }
  #avatarBtn.btn { padding: 0 12px; font-size: 13px; }
  .hero { padding: 16px 14px; border-radius: 16px; }
  .hero h1 { font-size: 22px; }
  .thread-hero { padding: 14px; }
  .thread-hero h1 { font-size: 20px; }
  .media-grid { grid-template-columns: repeat(2, 1fr); }
  .feed .media-grid, .feed-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 240px; gap: 4px;
  }
  .feed .media-thumb, .feed-grid .media-thumb { max-height: 76px; }
  .profile-tabs { margin: 4px -10px 0; padding: 10px 10px 8px; }
  .toolbar { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .composer-foot { justify-content: stretch; }
  .composer-foot .btn { flex: 1; justify-content: center; }
  .crumb { font-size: 12px; }
  .empty { padding: 36px 16px 96px; }
}

@media (max-width: 560px) {
  .board-grid { grid-template-columns: 1fr; }
}

.thread-replies { padding: 16px; margin-top: 12px; }
.reply-box {
  margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line);
  display: grid; gap: 8px;
}
.reply-box textarea {
  width: 100%; min-width: 0; min-height: 72px; max-height: 200px; resize: vertical;
  border-radius: 12px; border: 1px solid var(--line); background: var(--fill);
  padding: 10px 12px; outline: none; font-size: 15px; line-height: 1.5;
}
.reply-box textarea:focus { border-color: var(--accent); background: var(--bg-1); }
.reply-box-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.rb-tools { display: flex; align-items: center; gap: 2px 12px; flex: 1; min-width: 0; flex-wrap: wrap; }
.rb-add-wrap { position: relative; }
.rb-add {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px 0 8px; border-radius: 8px; border: 0;
  background: var(--fill); color: var(--text);
  font-size: 14px; font-weight: 650; cursor: pointer;
}
.rb-add:hover, .rb-add[aria-expanded="true"] { background: var(--fill-hover); }
.rb-add svg { width: 18px; height: 18px; flex: 0 0 auto; }
.rb-menu {
  position: absolute; left: 0; bottom: calc(100% + 8px); min-width: 228px; z-index: 12;
  background: var(--bg-1); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15,23,42,.10); padding: 6px;
}
.rb-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  min-height: 44px; border: 0; background: transparent; padding: 8px 12px; border-radius: 8px;
  font-size: 14px; font-weight: 650; color: var(--text); cursor: pointer;
}
.rb-menu button:hover { background: var(--fill); }
.rb-menu button svg { width: 20px; height: 20px; flex: 0 0 auto; color: var(--accent); }
.rb-menu button .meta { display: block; font-weight: 500; margin-top: 2px; }
@media (max-width: 720px) {
  .reply-box .reply-box-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 12px;
    row-gap: 8px;
  }
  .reply-box .rb-tools,
  .reply-box .rb-add-wrap { display: contents; }
  .reply-box .rb-add { justify-self: start; }
  .reply-box .rb-send { grid-column: 2; grid-row: 1; }
  .reply-box .rb-menu {
    grid-column: 1 / -1;
    position: static;
    left: auto;
    bottom: auto;
    width: 100%;
    min-width: 0;
    margin: 0;
    box-shadow: none;
    background: var(--fill);
  }
}
.rb-media {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; padding: 6px 2px;
  color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer;
}
.rb-media:hover { color: var(--text); background: transparent; }
.rb-media svg { width: 18px; height: 18px; flex: 0 0 auto; }
.attach-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.attach-item {
  width: 72px; height: 72px; border-radius: 10px; overflow: hidden;
  position: relative; background: var(--fill); border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--muted); font-size: 11px; font-weight: 700;
}
.attach-item img, .attach-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.attach-item .attach-x {
  position: absolute; top: 4px; right: 4px; width: 18px; height: 18px; border-radius: 50%;
  border: 0; background: rgba(15,23,42,.72); color: #fff; font-size: 12px; line-height: 18px;
  padding: 0; cursor: pointer;
}
.media-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.media-picker .btn { padding: 8px 12px; height: 36px; display: inline-flex; align-items: center; gap: 6px; }
.media-picker .btn svg { width: 16px; height: 16px; }
.rb-send {
  height: 32px; min-width: 64px; padding: 0 16px; border-radius: 8px;
  font-size: 14px; display: inline-flex; align-items: center; justify-content: center;
}
.rb-hint { margin: 0; font-size: 12px; }

.boards-title {
  font-size: 22px; font-weight: 800; letter-spacing: -.02em;
  margin: 4px 4px 12px; font-family: var(--font-display);
}
.board-list { padding: 2px 0; overflow: hidden; }
.board-row {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 14px;
  gap: 10px; align-items: center;
  padding: 12px 14px; color: inherit; text-decoration: none;
  background: transparent; border: 0; border-radius: 0; transform: none;
}
.board-row + .board-row { box-shadow: inset 0 1px 0 var(--line); }
.board-row:hover, .board-row:focus-visible {
  background: var(--fill); border-color: transparent; transform: none;
}
.board-ico {
  width: 44px; height: 44px; border-radius: 12px; margin: 0;
  display: grid; place-items: center;
  background: #eff6ff; font-size: 20px; line-height: 1;
}
[data-theme="dark"] .board-ico { background: rgba(96, 165, 250, .16); }
.board-main { min-width: 0; }
.board-name { display: block; font-size: 16px; font-weight: 700; line-height: 1.3; }
.board-desc {
  display: block; margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.board-meta { color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.board-go { color: var(--faint, #8b919a); font-size: 18px; line-height: 1; font-weight: 400; }
@media (max-width: 719px) {
  .board-row { grid-template-columns: 40px minmax(0, 1fr) auto 12px; padding: 11px 12px; }
  .board-ico { width: 40px; height: 40px; border-radius: 11px; font-size: 18px; }
  .boards-title { font-size: 20px; margin: 2px 2px 10px; }
}
@media (min-width: 720px) {
  .board-list {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    background: transparent; border: 0; box-shadow: none; padding: 0;
  }
  .board-row {
    background: var(--bg-1); border: 1px solid var(--line); border-radius: 14px;
  }
  .board-row + .board-row { box-shadow: none; }
  .board-row:hover { border-color: var(--line); background: var(--fill); transform: none; }
}

.msg-page { max-width: 720px; }
.msg-list { padding: 2px 0; overflow: hidden; }
.msg-row {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 10px; align-items: flex-start;
  padding: 12px 14px; color: inherit; text-decoration: none;
  background: transparent; border: 0; border-radius: 0; transform: none;
}
.msg-row + .msg-row { box-shadow: inset 0 1px 0 var(--line); }
.msg-row:hover, .msg-row:focus-visible { background: var(--fill); transform: none; }
.msg-ico {
  position: relative;
  width: 40px; height: 40px; border-radius: 12px; flex: 0 0 auto;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 800; line-height: 1;
  background: #eff6ff; color: #1d4ed8;
}
.msg-ico.like { background: #fff1f2; color: var(--like); }
.msg-ico.follow, .msg-ico.ok { background: #ecfdf5; color: #047857; }
.msg-ico.ticket, .msg-ico.warn { background: #fff7ed; color: #c2410c; }
.msg-ico.system { background: #f5f3ff; color: #6d28d9; }
.msg-ico.dm { background: #eef2ff; color: #4338ca; }
.msg-row.unread .msg-ico::after {
  content: ""; position: absolute; top: -2px; right: -2px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg-1);
}
.msg-main { min-width: 0; padding-top: 2px; }
.msg-title { display: block; font-size: 15px; font-weight: 600; line-height: 1.35; }
.msg-row.unread .msg-title { font-weight: 800; }
.msg-body {
  display: block; margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.msg-time { color: var(--faint); font-size: 12px; white-space: nowrap; padding-top: 4px; }
.msg-hint { margin: 12px 4px 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.msg-list .empty { padding: 36px 16px; }
@media (max-width: 719px) {
  .msg-row { grid-template-columns: 36px minmax(0, 1fr) auto; padding: 11px 12px; }
  .msg-ico { width: 36px; height: 36px; border-radius: 11px; font-size: 12px; }
}
[data-theme="dark"] .msg-ico { background: rgba(96, 165, 250, .16); color: #93c5fd; }
[data-theme="dark"] .msg-ico.like { background: rgba(244, 63, 94, .16); color: #fb7185; }
[data-theme="dark"] .msg-ico.follow, [data-theme="dark"] .msg-ico.ok { background: rgba(16, 185, 129, .16); color: #34d399; }
[data-theme="dark"] .msg-ico.ticket, [data-theme="dark"] .msg-ico.warn { background: rgba(245, 158, 11, .16); color: #fbbf24; }
[data-theme="dark"] .msg-ico.system { background: rgba(139, 92, 246, .18); color: #c4b5fd; }
[data-theme="dark"] .msg-ico.dm { background: rgba(99, 102, 241, .18); color: #a5b4fc; }

.upload-dialog .upload-name {
  margin: 0 0 14px; color: var(--text); font-size: 13px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.upload-bar {
  height: 8px; border-radius: 999px; background: var(--fill); overflow: hidden;
}
.upload-bar i {
  display: block; height: 100%; width: 0; border-radius: inherit;
  background: var(--accent); transition: width .15s ease;
}
.upload-pct {
  margin: 8px 0 0; font-size: 20px; font-weight: 800; letter-spacing: -.02em;
  font-family: var(--font-display);
}
.upload-status { margin: 6px 0 0; }

.board-pick {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; min-height: 48px; text-align: left; cursor: pointer;
  border-radius: 14px; border: 1px solid var(--line-strong);
  background: var(--bg-1); padding: 12px 14px; font: inherit; color: inherit;
}
.board-pick-go { color: var(--faint); font-size: 18px; line-height: 1; }
.board-pick-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 20px 0 8px; max-height: min(80vh, 640px);
  display: flex; flex-direction: column;
}
.board-pick-dialog h2 { margin: 0 0 8px; padding: 0 20px; }
.board-pick-dialog .board-list {
  display: block !important; overflow-y: auto; -webkit-overflow-scrolling: touch;
  border: 0; box-shadow: none; background: transparent; padding: 0;
}
.board-pick-dialog .board-row {
  width: 100%; cursor: pointer; font: inherit; color: inherit;
  background: transparent; border: 0; border-radius: 0; box-shadow: inset 0 1px 0 var(--line);
}
.board-pick-dialog .board-row:first-child { box-shadow: none; }
.board-pick-dialog .board-row.is-on { background: var(--fill); }
.board-pick-dialog .board-row.is-on .board-go { color: var(--accent); font-weight: 700; }

.feed-cover.feed-video {
  position: relative; background: #0f172a; width: fit-content; max-width: 100%;
  max-height: 280px; aspect-ratio: auto;
}
.feed-cover.feed-video.is-portrait { max-width: min(210px, 56%); }
.feed-cover.feed-video video,
.feed-cover.feed-video img {
  width: auto; max-width: 100%; height: auto; max-height: 280px;
  object-fit: contain; object-position: left top; display: block; aspect-ratio: auto;
}
.feed-cover.feed-video.playing video { object-fit: contain; background: #000; }
.feed-cover.feed-video.has-poster:not(.playing) video {
  position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none;
}
.feed-cover.feed-video.playing .feed-poster { display: none; }
.feed-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  box-sizing: border-box; width: 56px; height: 56px; padding: 0; margin: 0;
  border: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(15,23,42,.55); box-shadow: 0 8px 24px rgba(15,23,42,.28);
  cursor: pointer; line-height: 0; z-index: 3;
  appearance: none; -webkit-appearance: none;
}
.feed-play::after {
  content: ""; display: block; width: 0; height: 0; margin: 0;
  transform: translateX(2px);
  border-style: solid; border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #fff;
}
.feed-cover.feed-video.playing .feed-play { display: none; }
.feed-cover.feed-video:not(.playing) { cursor: pointer; }
.feed-video-hit {
  display: block; width: fit-content; max-width: 100%;
  color: inherit; text-decoration: none;
}
.feed-cover.feed-video .media-badge { left: 10px; top: 10px; right: auto; }

.forum-audio { width: 100%; margin: 8px 0; }
