* { box-sizing: border-box; }
:root { --brand-color: #8b5e34; --logo-bg: #f4edb8; }
body {
  margin: 0; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", Helvetica, Arial, sans-serif;
  color: #2b2b2b; background: #faf8f3; line-height: 1.65;
}
a { color: var(--brand-color); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* portal */
.portal-desc { font-size: 1.05em; color: #555; margin: 0 0 16px; }

/* header */
.site-header { background: #fff; border-bottom: 1px solid #e6dfd0; }
.nav { display: flex; align-items: center; gap: 20px; padding: 14px 20px; flex-wrap: nowrap; }
.nav-top { display: flex; align-items: center; gap: 1em; flex: 0 0 auto; min-width: 0; }
.nav-bottom { display: flex; align-items: center; flex: 1 1 320px; min-width: 0; }
.brand { display: inline-flex; align-items: center; line-height: 0; }
.brand img { height: 36px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 1em; flex-shrink: 0; flex-wrap: nowrap; }
.nav-links a { color: #444; padding: 4px 2px; border-bottom: 2px solid transparent; }
.nav-links a.active { color: #8b5e34; border-bottom-color: #8b5e34; font-weight: 600; }
.search { display: flex; gap: 6px; flex: 1; min-width: 0; }
.search input { padding: 6px 10px; border: 1px solid #d6cdb8; border-radius: 4px; min-width: 0; flex: 1; box-sizing: border-box; font-family: inherit; }
.search button { min-height: 30px; padding: 4px 12px; background: #8b5e34; color: #fff; border: 0; border-radius: 4px; cursor: pointer; box-sizing: border-box; font-family: inherit; }
.search.big input { font-size: 18px; padding: 10px 14px; min-width: 320px; }
.search.big button { padding: 10px 18px; }
.auth-area { display: flex; gap: 10px; align-items: center; font-size: 14px; flex-shrink: 0; white-space: nowrap; }
.nav-top .nav-links { min-width: 0; }
.nav-top .auth-area { flex-shrink: 0; margin-left: auto; }
.lang-switch { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-height: 30px; padding: 4px 10px; border: 1px solid #d8c96f; border-radius: 4px; background: var(--logo-bg); color: #5b3a1f; font-size: 12px; font-weight: 600; text-decoration: none; box-shadow: 0 1px 3px rgba(0,0,0,.14); }
.lang-switch:hover, .lang-switch:focus-visible { background: #e8dc8b; border-color: #b7a73f; color: #3f2916; text-decoration: none; }
.hi { color: #888; }
.link-btn { background: none; border: 0; color: #8b5e34; cursor: pointer; padding: 0; font: inherit; }

/* user dropdown */
.nav-dropdown { position: relative; display: inline-block; }
.nav-dropdown-toggle { cursor: pointer; }
.nav-dropdown-menu { display: none; position: absolute; left: 0; top: 100%; margin-top: 4px; background: #fff; border: 1px solid #e6dfd0; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,.1); min-width: 120px; z-index: 100; padding: 6px 0; }
.nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown:focus-within .nav-dropdown-menu, .nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a { display: block; padding: 6px 16px; color: #444; white-space: nowrap; }
.nav-dropdown-menu a:hover { background: #faf5e8; color: #8b5e34; text-decoration: none; }
.user-menu { position: relative; }
.user-menu-toggle { background: none; border: 1px solid #d6cdb8; border-radius: 4px; min-height: 26px; padding: 2px 8px; cursor: pointer; font: inherit; font-size: 13px; line-height: 1.2; color: #5b3a1f; }
.user-menu-toggle:hover { background: #faf5e8; }
.user-dropdown { display: none; position: absolute; right: 0; top: 100%; margin-top: 4px; background: #fff; border: 1px solid #e6dfd0; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,.1); min-width: 140px; z-index: 100; padding: 6px 0; }
.user-dropdown a, .user-dropdown .link-btn { display: block; padding: 6px 16px; color: #444; white-space: nowrap; text-align: left; width: 100%; }
.user-dropdown a:hover, .user-dropdown .link-btn:hover { background: #faf5e8; color: #8b5e34; text-decoration: none; }
.user-menu:hover .user-dropdown, .user-menu:focus-within .user-dropdown { display: block; }
.has-submenu { position: relative; }
.submenu-trigger { display: block; padding: 6px 16px; color: #444; cursor: default; white-space: nowrap; }
.has-submenu:hover .submenu-trigger { background: #faf5e8; color: #8b5e34; }
.submenu { display: none; position: absolute; left: 100%; top: 0; background: #fff; border: 1px solid #e6dfd0; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,.1); min-width: 120px; padding: 6px 0; z-index: 101; }
.has-submenu:hover .submenu { display: block; }
.submenu a { display: block; padding: 6px 16px; color: #444; white-space: nowrap; }
.submenu a:hover { background: #faf5e8; color: #8b5e34; text-decoration: none; }
.notif-badge-sm { display: inline-block; background: #e74c3c; color: #fff; font-size: .7em; padding: 1px 5px; border-radius: 8px; vertical-align: middle; }

/* notification badge */
.notif-badge { display: inline-block; background: #e74c3c; color: #fff; font-size: 11px; padding: 1px 5px; border-radius: 8px; margin-left: 4px; vertical-align: top; }
/* notification list */
.notif-list { list-style: none; padding: 0; }
.notif-list li { padding: 10px 12px; border-bottom: 1px solid #eee; }
.notif-list li.unread { background: #fef8e8; }
.notif-list li a { display: block; color: inherit; }
.notif-list li a:hover { text-decoration: none; background: #faf5e8; }
.notif-body { display: block; margin-top: 4px; color: #666; }
.notif-time { display: block; margin-top: 4px; font-size: 0.85em; }

/* messages */
.msg-tabs { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; border-bottom: 1px solid #ece5d3; padding-bottom: 8px; }
.msg-tabs a { padding: 4px 12px; border-radius: 4px; color: #8b5e34; }
.msg-tabs a.active { background: #8b5e34; color: #fff; }
.msg-list { list-style: none; padding: 0; }
.msg-list li { border-bottom: 1px solid #eee; }
.msg-list li.unread { background: #fef8e8; }
.msg-list li a { display: flex; gap: 10px; padding: 10px 12px; color: inherit; align-items: baseline; }
.msg-list li a:hover { background: #faf5e8; text-decoration: none; }
.msg-from { font-weight: 600; white-space: nowrap; min-width: 80px; }
.msg-body { flex: 1; color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-time { white-space: nowrap; font-size: 0.85em; }
.msg-detail { background: #fff; border: 1px solid #ece5d3; border-radius: 6px; padding: 16px; }
.msg-meta { display: flex; justify-content: space-between; margin-bottom: 12px; }
.msg-content { white-space: pre-wrap; line-height: 1.7; margin-bottom: 16px; }

/* thread */
.thread-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.thread-msg { padding: 10px 14px; border-radius: 8px; max-width: 80%; }
.thread-msg.theirs { background: #f5f3ee; align-self: flex-start; }
.thread-msg.mine { background: #e8f0e4; align-self: flex-end; }
.thread-meta { font-size: 13px; margin-bottom: 4px; display: flex; gap: 10px; }
.thread-body { white-space: pre-wrap; line-height: 1.6; }
.thread-reply { display: flex; gap: 8px; align-items: flex-start; }
.thread-reply textarea { flex: 1; }

/* media grid */
.media-upload-form { margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.media-viewer { display: flex; align-items: center; gap: 12px; margin: 16px 0; background: #f5f3ee; border-radius: 8px; padding: 12px; max-height: 280px; overflow: hidden; }
.viewer-img-wrap { flex: 1; text-align: center; min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.viewer-img-wrap img { max-width: 100%; max-height: 240px; object-fit: contain; border-radius: 4px; cursor: zoom-in; }
.viewer-btn { background: none; border: 1px solid #d6cdb8; border-radius: 50%; width: 36px; height: 36px; font-size: 22px; cursor: pointer; color: #555; flex-shrink: 0; }
.viewer-btn:hover { background: #fff; border-color: #8b5e34; color: #8b5e34; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 16px; }
.media-item { border: 1px solid #e6dfd0; border-radius: 6px; overflow: hidden; background: #fff; cursor: pointer; transition: box-shadow .2s; }
.media-item img { width: 100%; height: 90px; object-fit: cover; display: block; }
.media-info { padding: 6px 8px; font-size: 12px; }
.media-actions { padding: 4px 8px 8px; display: flex; gap: 6px; align-items: center; }
.btn-sm { font-size: 12px; padding: 3px 8px; }
.link-sm { font-size: 12px; color: #888; background: none; border: none; cursor: pointer; padding: 0; }
.link-sm:hover { color: #8b5e34; text-decoration: underline; }
.link-sm.danger { color: #b74d4d; background: none; }
.link-sm.danger:hover { color: #8b2020; background: none; }
.link-sm.disabled { color: #ccc; cursor: default; text-decoration: none; }
.tag-in-use { font-size: 11px; background: #e8f5e9; color: #2e7d32; padding: 1px 6px; border-radius: 3px; }
.tag-cat { font-size: 11px; background: #faf5e8; color: #8b5e34; padding: 1px 6px; border-radius: 3px; }
.tag-ref { font-size: 11px; background: #e3f2fd; color: #1565c0; padding: 1px 6px; border-radius: 3px; }
.media-item.in-use { opacity: .75; }
.media-item.selected { box-shadow: 0 0 0 3px #8b5e34; }
.media-item { position: relative; }
.media-item .batch-cb { position: absolute; top: 4px; left: 4px; z-index: 2; width: 16px; height: 16px; cursor: pointer; accent-color: #8b5e34; }
.batch-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin-bottom: 10px; background: #fdf8f0; border: 1px solid #e6dfd0; border-radius: 6px; font-size: 13px; flex-wrap: wrap; }
.batch-bar select { font-size: 13px; padding: 2px 6px; }
.share-panel { background: #fdf8f0; border: 1px solid #e6dfd0; border-radius: 6px; padding: 8px; margin-top: 4px; }
.share-portal-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; }
.share-portal-row + .share-portal-row { border-top: 1px solid #ece5d3; }
.tag-sharer { font-size: 11px; background: #f3e8ff; color: #6b3fa0; padding: 1px 6px; border-radius: 3px; }
.tag-portal { font-size: 11px; }
.media-pick { cursor: pointer; transition: box-shadow .2s; }
.media-pick:hover { box-shadow: 0 0 0 3px #c9a66b; }

/* quote cards */
.quote-list { display: flex; flex-direction: column; gap: 12px; }
.quote-card { background: #fff; border: 1px solid #ece5d3; border-radius: 6px; padding: 12px 16px; }
.quote-content { font-size: 15px; color: #333; margin-bottom: 6px; line-height: 1.6; }
.quote-meta { display: flex; gap: 8px; align-items: center; font-size: 12px; flex-wrap: wrap; }
.quote-actions { margin-top: 8px; display: flex; gap: 8px; align-items: center; }
/* quote table */
.quote-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.quote-table th, .quote-table td { border: 1px solid #ece5d3; padding: 8px 10px; vertical-align: top; text-align: left; }
.quote-table th { background: #faf7f0; font-weight: 600; white-space: nowrap; }
.quote-table textarea { font-family: inherit; font-size: 14px; line-height: 1.5; padding: 6px 8px; border: 1px solid #d6cdb8; border-radius: 4px; box-sizing: border-box; }
.quote-td-content { min-width: 240px; max-width: 400px; white-space: pre-wrap; word-break: break-word; line-height: 1.5; }
.quote-td-actions { white-space: nowrap; }
.quote-row { cursor: pointer; transition: background .15s; }
.quote-row:hover { background: #faf7f0; }
.quote-row.editing { background: #fdf6e3; outline: 2px solid #c9a66b; }
.quote-editor-fieldset { border: 1px solid #d6cdb8; border-radius: 6px; padding: 12px 16px; }
.legend-with-filter { display: flex; align-items: center; gap: 12px; width: 100%; }
.legend-filter { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; }
.legend-filter select { font-size: 13px; padding: 2px 6px; }
.fieldset-topright { position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); display: inline-flex; gap: 6px; align-items: center; background: #fff; padding: 0 8px; }
.quote-edit-form { display: flex; flex-direction: column; gap: 6px; }
.quote-cat-select { width: auto; font-size: 12px; padding: 2px 6px; }
.page-head-select { padding: 5px 10px; font-size: 14px; line-height: 1.2; border: 1px solid #d6cdb8; border-radius: 4px; font-family: inherit; box-sizing: border-box; vertical-align: middle; }
.media-upload-form { display: flex; align-items: center; gap: 8px; margin-top: 12px; }

/* painting gallery */
.painting-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.painting-thumb { display: flex; flex-direction: column; border-radius: 6px; overflow: hidden; background: #f5f3ee; text-decoration: none; color: inherit; transition: box-shadow .2s, transform .15s; }
.painting-thumb:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12); transform: translateY(-2px); }
.painting-thumb img { width: 100%; height: 140px; object-fit: cover; display: block; }
.painting-thumb .painting-summary { flex: 1; padding: 8px 10px 4px; font-size: 12px; color: #555; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.painting-thumb .painting-caption { padding: 4px 10px 8px; font-size: 12px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #888; }
.painting-showcase { text-align: center; margin: 20px 0; }
.painting-showcase .painting-full { max-width: 100%; max-height: 80vh; border-radius: 6px; box-shadow: 0 2px 12px rgba(0,0,0,.08); cursor: zoom-in; }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal-content { background: #fff; border-radius: 8px; width: 90%; max-width: 720px; max-height: 80vh; overflow-y: auto; padding: 20px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modal-header button { background: none; border: none; font-size: 24px; cursor: pointer; }
.modal-footer { display: flex; gap: 12px; margin-top: 16px; padding-top: 12px; border-top: 1px solid #eee; }
.picker-viewer { display: flex; align-items: center; gap: 12px; background: #f5f3ee; border-radius: 8px; padding: 12px; margin-bottom: 12px; }
.picker-viewer .viewer-img-wrap { flex: 1; text-align: center; }
.picker-viewer img { max-width: 100%; max-height: 200px; object-fit: contain; border-radius: 4px; }

/* pagination */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 24px 0 8px; flex-wrap: wrap; }
.pagination a, .pagination .current, .pagination .ellipsis { padding: 4px 10px; border-radius: 4px; font-size: 14px; }
.pagination a { border: 1px solid #d6cdb8; color: #8b5e34; }
.pagination a:hover { background: #faf5e8; text-decoration: none; }
.pagination .current { background: #8b5e34; color: #fff; border: 1px solid #8b5e34; }
.pagination .ellipsis { color: #aaa; }
.page-size-select { margin-left: auto; font-size: 13px; color: #8b5e34; }
.page-size-select select { font-size: 13px; padding: 2px 4px; border: 1px solid #d6cdb8; border-radius: 4px; }

/* main */
.main { padding: 20px 20px 40px; }

.block { margin: 20px 0; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid #e6dfd0; padding-bottom: 6px; margin-bottom: 16px; }
.block-head h2 { margin: 0; color: #5b3a1f; }

.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.admin-nav-group { border: 1px solid #ece5d3; border-radius: 6px; padding: 12px 16px; margin-bottom: 12px; }
.admin-nav-group legend { font-weight: bold; color: #5b3a1f; padding: 0 6px; }
.admin-nav-group p { margin: 8px 0 0; }
.card { display: block; background: #fff; padding: 16px; border-radius: 6px; border: 1px solid #ece5d3; color: inherit; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0,0,0,.06); text-decoration: none; }
.card h3 { margin: 0 0 6px; color: #5b3a1f; }
.card .excerpt {
  color: #555;
  font-size: 14px;
  line-height: 1.65;
  height: 6.6em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}
.card.stat { text-align: center; }
.card.stat h3 { font-size: 36px; margin: 0; }
.card-cover { margin: -16px -16px 12px; height: 140px; overflow: hidden; border-radius: 6px 6px 0 0; background: #f1ead8; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card-video { position: relative; width: 100%; padding-top: 56.25%; background: #000; overflow: hidden; }
.card-video iframe, .card-video video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.card-video .video-fallback { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; }
.video-card .card-body { padding: 12px 16px; }
.detail-cover { margin: 16px 0; max-width: 360px; }
.detail-cover img { width: 100%; height: auto; border-radius: 6px; border: 1px solid #ece5d3; }

.cover-field { border: 1px solid #d6cdb8; border-radius: 4px; padding: 10px 14px; }
.cover-field legend { padding: 0 6px; color: #5b3a1f; }
.cover-preview { margin: 4px 0 8px; max-width: 240px; }
.cover-preview img { width: 100%; height: auto; border-radius: 4px; border: 1px solid #ece5d3; }

.title-row { display: flex; align-items: baseline; gap: 16px; margin: 8px 0 6px; flex-wrap: wrap; }
.page-title { font-size: 15px; color: #5b3a1f; margin: 0; font-weight: bold; display: inline; }
.title-row .views { white-space: nowrap; margin-left: auto; }
.crumb-inline { font-size: 13px; font-weight: normal; color: #999; }
.crumb-inline a { color: #999; text-decoration: none; }
.crumb-inline a:hover { color: #8b5e34; text-decoration: underline; }
.meta-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.meta-row p { margin: 0; white-space: nowrap; }
.btn-group { display: inline-flex; gap: 6px; align-items: center; flex-wrap: nowrap; margin-left: auto; }

/* 翻页：封面/目录 */
.book {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 16px auto;
  perspective: 1600px;
}
.book::before {
  /* 占位维持宽高，避免绝对定位塌陷 */
  content: "";
  display: block;
  padding-top: 130%;
}
.book-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform .9s cubic-bezier(.55,.05,.25,1);
  transform-origin: left center;
}
.book.flipped .book-inner { transform: rotateY(-170deg); }

.book-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 4px 10px 10px 4px;
  background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.18), inset 6px 0 12px -8px rgba(0,0,0,.25);
  overflow: hidden;
}
.book-front {
  cursor: pointer;
  background: #2b1d11;
}
.book-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.book-front:hover img { transform: scale(1.02); }
.book-hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 4px 10px;
  background: rgba(0,0,0,.55);
  color: #faf5e8;
  border-radius: 14px;
  font-size: 13px;
  letter-spacing: 1px;
}
.book-back {
  transform: rotateY(180deg);
  background: #faf5e8 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='6' height='6'><rect width='6' height='6' fill='%23faf5e8'/><path d='M0 0h6v1H0z' fill='%23ece5d3'/></svg>") repeat;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  overflow: auto;
  border-left: 1px solid #d6cdb8;
}
.book-back-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.book-back-head h2 { margin: 0; color: #5b3a1f; font-size: 18px; }
.book-back .toc { margin: 0; border: 0; background: transparent; }
.book-back .toc li { padding: 8px 4px; border-bottom: 1px dashed #d6cdb8; }
.back-cover { font-size: 13px; padding: 4px 10px; }

.muted { color: #999; font-size: 14px; }
.summary { background: #fff; padding: 12px 16px; border-left: 3px solid #c9a66b; color: #555; }

/* Open-source thought page */
.open-source_thought-hero {
  background: #fff;
  border: 1px solid #ece5d3;
  border-radius: 8px;
  padding: 34px 40px;
  margin: 8px 0 20px;
}
.home-open-source_thought { margin-top: 0; }
.open-source_thought-kicker {
  margin: 0 0 8px;
  color: #8b5e34;
  font-size: 14px;
  font-weight: 600;
}
.open-source_thought-hero h1 {
  margin: 0 0 14px;
  color: #5b3a1f;
  font-size: 32px;
  line-height: 1.25;
}
.open-source_thought-lead {
  max-width: 780px;
  margin: 0;
  color: #444;
  font-size: 18px;
  line-height: 1.9;
}
.open-source_thought-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.open-source_thought-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 20px 0;
}
.open-source_thought-panel {
  background: #fff;
  border: 1px solid #ece5d3;
  border-radius: 6px;
  padding: 18px 20px;
}
.open-source_thought-panel h2 {
  margin: 0 0 8px;
  color: #5b3a1f;
  font-size: 18px;
}
.open-source_thought-panel p {
  margin: 0;
  color: #555;
}
.open-source_thought-statement {
  background: #f5efe1;
  border-left: 4px solid #8b5e34;
  padding: 20px 24px;
  margin: 20px 0;
}
.open-source_thought-statement p {
  margin: 0 0 8px;
  color: #3b2b1d;
  font-size: 17px;
}
.open-source_thought-statement p:last-child { margin-bottom: 0; }
.open-source_thought-line {
  margin: 18px 0 0;
  color: #5b3a1f;
  font-weight: 600;
  font-size: 17px;
}
.open-source_thought-note {
  margin: 8px 0 0;
  color: #8b7355;
  font-size: 13px;
  line-height: 1.6;
}

/* tabs */
.page-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0; color: #5b3a1f; }
.page-head select { padding: 5px 10px; font-size: 14px; line-height: 1.2; border: 1px solid #d6cdb8; border-radius: 4px; font-family: inherit; box-sizing: border-box; vertical-align: middle; }
.tabs { display: flex; gap: 4px; }
.tabs a { padding: 6px 12px; border-radius: 4px; color: #666; }
.tabs a.active { background: #8b5e34; color: #fff; }

.btn { display: inline-block; padding: 6px 14px; background: #8b5e34; color: #fff !important; border-radius: 4px; border: 0; cursor: pointer; font-size: 14px; line-height: 1.2; vertical-align: middle; font-family: inherit; box-sizing: border-box; }
.btn:hover { text-decoration: none; opacity: .9; }
.btn.danger, button.danger { background: #b74d4d; color: #fff; }
.btn-accent { background: #e65100; }
.btn-accent:hover { background: #bf360c; opacity: 1; }
.btn.disabled, .btn-sm.disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.link { color: #888; margin-left: 12px; font-size: 14px; }

/* forms */
.form { display: flex; flex-direction: column; gap: 12px; max-width: 720px; background: #fff; padding: 20px; border-radius: 6px; border: 1px solid #ece5d3; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: #555; }
.form input[type=text], .form input[type=password], .form input[type=number], .form input[type=url], .form input:not([type]), .form select, .form textarea {
  padding: 5px 10px; border: 1px solid #d6cdb8; border-radius: 4px; font: inherit; font-family: inherit; line-height: 1.2; box-sizing: border-box;
}
.form select { height: 30px; padding: 0 10px; }
.form textarea { resize: vertical; line-height: 1.65; }
.form .check { flex-direction: row; align-items: center; gap: 6px; cursor: pointer; }
label.check { display: flex; flex-direction: row; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; color: #555; }
.check input[type=checkbox] { accent-color: #8b5e34; }
.check-list { max-height: 240px; overflow-y: auto; border: 1px solid #ddd; border-radius: 6px; padding: 8px; }
.check-list label, .form .check-list label { display: block; flex-direction: unset; gap: unset; padding: 3px 0; cursor: pointer; }
.check-list input[type=checkbox] { accent-color: #8b5e34; }
/* user picker */
.user-picker { display: flex; flex-direction: column; gap: 8px; }
.user-picker-filter { width: 100%; padding: 6px 10px; border: 1px solid #d6cdb8; border-radius: 4px; font: inherit; box-sizing: border-box; }
.user-picker-pool { max-height: 180px; overflow-y: auto; border: 1px solid #ddd; border-radius: 6px; padding: 6px; margin-top: 4px; }
.user-picker-item { padding: 4px 8px; cursor: pointer; border-radius: 3px; font-size: 14px; }
.user-picker-item:hover { background: #faf5e8; }
.user-picker-item.picked { opacity: .35; pointer-events: none; text-decoration: line-through; }
.user-picker-dest-label { font-size: 13px; color: #888; }
.user-picker-chosen { min-height: 36px; border: 1px solid #ece5d3; border-radius: 6px; padding: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.user-picker-tag { display: inline-flex; align-items: center; gap: 4px; background: #faf5e8; border: 1px solid #ece5d3; border-radius: 4px; padding: 3px 8px; font-size: 13px; color: #555; }
.user-picker-tag button { background: none; border: none; cursor: pointer; color: #999; font-size: 16px; line-height: 1; padding: 0 2px; }
.user-picker-tag button:hover { color: #c00; }
.form button { align-self: flex-start; padding: 6px 18px; background: #8b5e34; color: #fff; border: 0; border-radius: 4px; cursor: pointer; font-size: 14px; line-height: 1.2; box-sizing: border-box; font-family: inherit; }
.form button.btn { padding: 6px 14px; }
.form.inline { flex-direction: row; flex-wrap: nowrap; align-items: center; padding: 8px 5px 8px 12px; gap: 8px; width: 100%; box-sizing: border-box; }
.form.inline input, .form.inline select { padding: 5px 8px; flex: 1 1 auto; min-width: 80px; }
.form.inline input[style*="width"] { flex: 0 0 auto; }
.form.inline select { height: 30px; padding: 0 8px; flex: 0 1 auto; min-width: 120px; }
.form-actions { display: flex; gap: 12px; align-items: center; }
.btn.ghost { background: #fff; color: #8b5e34 !important; border: 1px solid #c9a66b; padding: 5px 14px; }
.btn.ghost:hover { background: #faf5e8; }

/* settings page */
.settings-section { max-width: 560px; background: #fff; padding: 24px; border-radius: 6px; border: 1px solid #ece5d3; margin-bottom: 24px; }
.settings-section h2 { margin: 0 0 16px; font-size: 1.1em; border-bottom: 1px solid #eee; padding-bottom: 8px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 14px; color: #555; margin-bottom: 4px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 8px 10px; border: 1px solid #d6cdb8; border-radius: 4px; font: inherit; box-sizing: border-box; }
.form-group textarea { resize: vertical; }
.form-group input:disabled { background: #f5f5f5; color: #999; }

/* Quill 编辑器 */
#editor { min-height: 460px; background: #fff; border: 1px solid #ccc; border-top: 0; }
.ql-toolbar { background: #faf5e8; border-color: #d6cdb8 !important; }
.ql-toolbar button, .ql-toolbar .ql-picker-label { color: #5b3a1f !important; }
.ql-toolbar button svg { display: inline-block; vertical-align: middle; }
.ql-toolbar .ql-divider, .ql-toolbar .ql-docx { width: 28px; }
.ql-toolbar .ql-divider:hover, .ql-toolbar .ql-docx:hover { color: #8b5e34 !important; }
.ql-toolbar .ql-divider.ql-active, .ql-toolbar .ql-docx.ql-active { color: #8b5e34 !important; }
.ql-editor { min-height: 420px; font-size: 16px; }

/* table */
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td { padding: 8px 10px; border-bottom: 1px solid #ece5d3; text-align: left; font-size: 14px; vertical-align: top; }
.table th { background: #f5efe1; vertical-align: middle; }
.ops { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline { display: inline-flex; gap: 4px; align-items: center; }
.inline button:not(.btn) { padding: 3px 10px; background: #8b5e34; color: #fff; border: 0; border-radius: 3px; cursor: pointer; font-size: 12px; line-height: 1.2; font-family: inherit; box-sizing: border-box; }
.ops button, .ops .btn { padding: 3px 10px; background: #8b5e34; color: #fff !important; border: 0; border-radius: 3px; cursor: pointer; font-size: 12px; line-height: 1.2; box-sizing: border-box; }
.ops .btn.danger, .ops button.danger, .inline button.danger:not(.btn) { background: #b74d4d; }
.ops input, .ops select, .inline select, .inline input[type=password] { padding: 3px 6px; font-size: 12px; line-height: 1.2; border: 1px solid #d6cdb8; border-radius: 3px; font-family: inherit; box-sizing: border-box; }
.ops select, .inline select { padding: 0 6px; }

.panel { margin-bottom: 16px; background: #fff; padding: 12px 5px 12px 16px; border: 1px solid #ece5d3; border-radius: 6px; }
.panel summary { cursor: pointer; color: #8b5e34; }
.deployment-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; }
.deployment-action-form { display: inline-flex; align-items: center; gap: 5px; margin: 0; padding: 0; width: auto; }
.deployment-action-form select { height: 28px; padding: 3px 7px; min-width: 96px; }
.deployment-status-form { padding-right: 2px; }

/* batch toolbar */
.batch-toolbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; margin-bottom: 12px; background: #faf5e8; border: 1px solid #e6dfd0; border-radius: 6px; position: sticky; top: 0; z-index: 50; flex-wrap: wrap; }
.batch-toolbar #batch-count { font-weight: bold; color: #8b5e34; }

/* user action panel (expand row) */
.user-action-panel { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding: 8px 10px; background: #faf8f2; }
.user-actions-row td { padding: 4px 10px !important; border-bottom: 1px solid #ece5d3; background: #faf8f2; }
.user-row.expanded td { border-bottom: none; }
.user-actions-toggle.active { background: #5b3a1f; }
.user-row.pending { background: #fff7e6; }

/* status colors */
.status-active { color: #2e7d32; }
.status-pending { color: #b26a00; }
.status-rejected { color: #c62828; }

/* article */
.crumb { color: #888; font-size: 14px; }
.content { background: #fff; padding: 26px 30px; border-radius: 6px; border: 1px solid #ece5d3; }
.content p { text-indent: 2em; margin: 0 0 1em; font-size: 17px; }
.content h1, .content h2, .content h3, .content h4 { color: #5b3a1f; margin: 1.2em 0 .6em; text-indent: 0; }
.content img { max-width: 100%; height: auto; display: block; margin: 12px auto; }
.content .ql-align-justify { text-align: justify; }
.content .ql-align-center { text-align: center; text-indent: 0; }
.content .ql-align-right { text-align: right; text-indent: 0; }
.content .ql-ui { display: none; }
.content [class*="ql-indent"] { text-indent: 0; }
.content ul, .content ol { padding-left: 1.5em; margin: 0 0 1em; }
/* Quill 列表渲染：<ol><li data-list="..."> 区分有序/无序 */
.content ol { list-style-type: none; counter-reset: list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8; }
.content ol li { padding-left: 1.8em; }
.content ol li::before { display: inline-block; width: 1.8em; margin-left: -1.8em; text-align: right; padding-right: .3em; box-sizing: border-box; }
.content ol li[data-list="bullet"]::before { content: '\2022'; text-align: center; padding-right: 0; }
.content ol li[data-list="ordered"] { counter-increment: list-0; counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8; }
.content ol li[data-list="ordered"]::before { content: counter(list-0) '. '; }
.content ol li.ql-indent-1[data-list="ordered"] { counter-increment: list-1; counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8; }
.content ol li.ql-indent-1[data-list="ordered"]::before { content: counter(list-1, lower-alpha) '. '; }
.content ol li.ql-indent-2[data-list="ordered"] { counter-increment: list-2; counter-reset: list-3 list-4 list-5 list-6 list-7 list-8; }
.content ol li.ql-indent-2[data-list="ordered"]::before { content: counter(list-2, lower-roman) '. '; }
.content ol li.ql-indent-3[data-list="ordered"] { counter-increment: list-3; counter-reset: list-4 list-5 list-6 list-7 list-8; }
.content ol li.ql-indent-3[data-list="ordered"]::before { content: counter(list-3) '. '; }
.content ol li.ql-indent-1[data-list="bullet"]::before { content: '\25E6'; }
.content ol li.ql-indent-2[data-list="bullet"]::before { content: '\25A0'; }
/* Quill 缩进类，与编辑器一致 */
.content .ql-indent-1 { padding-left: 3em !important; }
.content .ql-indent-2 { padding-left: 6em !important; }
.content .ql-indent-3 { padding-left: 9em !important; }
.content .ql-indent-4 { padding-left: 12em !important; }
.content .ql-indent-5 { padding-left: 15em !important; }
.content .ql-indent-6 { padding-left: 18em !important; }
.content .ql-indent-7 { padding-left: 21em !important; }
.content .ql-indent-8 { padding-left: 24em !important; }
.content li.ql-indent-1 { padding-left: 4.5em !important; }
.content li.ql-indent-2 { padding-left: 7.5em !important; }
.content li.ql-indent-3 { padding-left: 10.5em !important; }
/* 来自 Word 的段落级 text-indent / margin-left 会出现在 inline style 上，自动生效 */
/* 但若读者主题给 .content p 强制了 text-indent，需让 inline 优先（默认即如此）*/
.content blockquote { border-left: 3px solid #c9a66b; margin: 0 0 1em; padding: .4em 1em; color: #666; background: #faf5e8; }
.content pre { background: #2b2b2b; color: #eee; padding: 12px 16px; border-radius: 4px; overflow: auto; }
.content table { border-collapse: collapse; margin: 0 0 1em; }
.content table td, .content table th { border: 1px solid #d6cdb8; padding: 6px 10px; }
.content a { color: #8b5e34; }
.content hr { border: 0; border-top: 1px dashed #c9a66b; margin: 1.5em 20%; }
.video-wrap { background: #000; margin-bottom: 16px; }
.pager { display: flex; justify-content: center; padding: 12px 0; gap: 8px; align-items: center; }
.pager-info { font-size: .85em; color: #888; }
.analytics-section { margin-bottom: 20px; padding: 12px 16px 25px; position: relative; }
.analytics-section .pager { justify-content: flex-end; padding: 0; position: absolute; bottom: -10px; right: 12px; background: #fff; padding: 0 6px; }
.analytics-section legend { font-weight: 600; font-size: 1.05em; display: flex; align-items: center; gap: 10px; }
.sec-size { font-size: .85em; padding: 2px 6px; border: 1px solid #ccc; border-radius: 4px; }
.actions { margin-top: 12px; display: flex; gap: 8px; align-items: center; }

/* comments */
.comments-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.comments-header h2 { margin: 0; }
.comment-head { display: flex; align-items: center; gap: 8px; }
.comment-info { display: flex; align-items: center; gap: 8px; }
.comment-actions { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.comment-form { margin-bottom: 16px; }
.comment-form textarea { width: 100%; padding: 8px 10px; border: 1px solid #d6cdb8; border-radius: 4px; font: inherit; line-height: 1.65; resize: vertical; min-height: 80px; }
.guest-comment-form .guest-fields { display: flex; gap: 8px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.guest-comment-form .guest-fields input { flex: 1 1 140px; padding: 6px 10px; border: 1px solid #d6cdb8; border-radius: 4px; font: inherit; min-width: 120px; }
.guest-hint { font-size: 12px; margin-top: 4px; }
.comment-pending { background: #fffbe6; border-left: 3px solid #e6c200; }
.comment-rejected { background: #fff0f0; border-left: 3px solid #d44; opacity: .7; }
.tag-pending { font-size: 11px; color: #b8860b; background: #fff3cd; padding: 1px 6px; border-radius: 3px; }
.tag-rejected { font-size: 11px; color: #c33; background: #fde8e8; padding: 1px 6px; border-radius: 3px; }
.guest-contact { font-size: 12px; color: #888; margin-left: 4px; }
.approve-btn { color: #2e7d32 !important; }
.reject-btn { color: #c33 !important; }

.toc { list-style: none; padding: 0; background: #fff; border: 1px solid #ece5d3; border-radius: 6px; }
.toc li { padding: 10px 16px; border-bottom: 1px solid #f0eadb; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.toc li:last-child { border-bottom: 0; }
.toc-main { flex: 1; min-width: 0; }
.toc-pos { display: inline-block; min-width: 2.5em; text-align: right; margin-right: 6px; font-size: .85em; font-variant-numeric: tabular-nums; }
.pos-input { width: 3.5em; padding: 2px 4px; border: 1px solid #d6cdb8; border-radius: 3px; font-size: .85em; text-align: center; }
.toc-aside { display: flex; gap: 6px; align-items: center; }
.ord { color: #c9a66b; margin-right: 10px; font-size: 14px; }
button.mini { padding: 2px 8px; background: #faf5e8; color: #5b3a1f; border: 1px solid #d6cdb8; border-radius: 3px; cursor: pointer; font-size: 14px; line-height: 1; }
button.mini:hover:not(:disabled) { background: #c9a66b; color: #fff; }
button.mini:disabled { opacity: .35; cursor: not-allowed; }

.list { padding-left: 20px; }
.list li { margin: 6px 0; }

/* alerts */
.alert { padding: 10px 14px; border-radius: 4px; margin-bottom: 16px; }
.alert-error { background: #f8e2e2; color: #a13b3b; }
.alert-success { background: #e3f1e1; color: #3b7a2f; }
.alert-info { background: #e2eef8; color: #2b5f8a; }

.site-footer { padding: 24px 0; text-align: center; color: #999; font-size: 13px; border-top: 1px solid #e6dfd0; background: #fff; }
.footer-portals { margin-bottom: 10px; font-size: 13px; }
.footer-portals-label { color: #bbb; margin-right: 6px; }
.footer-portals a { color: #888; text-decoration: none; }
.footer-portals a:hover { color: var(--brand-color, #b38b4d); }
.footer-copy { color: #bbb; }

/* 辩论全屏 */
body.debate-fullscreen {
  margin: 0; padding: 12px 16px; min-height: 100vh;
  display: flex; flex-direction: column;
  background: #1a1a2e; color: #e0e0e0;
}
body.debate-fullscreen h1 { color: #fff; margin: 0 0 6px; font-size: 1.3rem; }
body.debate-fullscreen .muted { color: #aaa; }
body.debate-fullscreen .cards { display: flex; gap: 12px; margin-bottom: 8px; }
body.debate-fullscreen .card { background: #16213e; border: 1px solid #0f3460; border-radius: 6px; padding: 8px 12px; flex: 1; color: #ccc; }
body.debate-fullscreen #debate-stream { flex: 1; overflow-y: auto; background: #0f0f23; border-radius: 6px; padding: 10px; margin-bottom: 0; }
body.debate-fullscreen .msg { background: #16213e; border-radius: 6px; padding: 8px 10px; margin-bottom: 6px; }
body.debate-fullscreen .msg .meta { color: #888; font-size: 12px; }
body.debate-fullscreen #bottom-bar { position: sticky; bottom: 0; background: #1a1a2e; border-top: 1px solid #333; padding: 8px 0; z-index: 50; }
body.debate-fullscreen #bottom-bar textarea { background: #16213e; color: #eee; border: 1px solid #444; border-radius: 4px; }
body.debate-fullscreen .link-btn { color: #7ec8e3; }
body.debate-fullscreen a { color: #7ec8e3; }
body.debate-fullscreen .alert { background: #2a2a3e; color: #ddd; }
body.debate-fullscreen .alert-error { background: #3b1515; color: #f88; }
body.debate-fullscreen .alert-success { background: #153b1a; color: #8f8; }
body.debate-fullscreen #break-banner { background: #3a3000 !important; color: #ffd54f !important; }
body.debate-fullscreen #mute-banner { background: #3b1520 !important; color: #f88 !important; }
body.debate-fullscreen fieldset { border: 1px solid #555; color: #ddd; background: #16213e; border-radius: 6px; padding: 12px; margin-top: 12px; }
body.debate-fullscreen fieldset legend { color: #7ec8e3; font-weight: bold; padding: 0 6px; }
body.debate-fullscreen button { background: #2a4a6e; color: #eee; border: 1px solid #456; border-radius: 4px; cursor: pointer; padding: 6px 12px; }
body.debate-fullscreen button.danger { background: #6e2a2a; border-color: #844; }
#owner-toolbar {
  position: sticky; top: 0; z-index: 100;
  background: #0f3460; padding: 8px 12px; border-radius: 0 0 8px 8px;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
#owner-toolbar button { font-size: 13px; padding: 4px 10px; }
#owner-panel { margin-top: 8px; }
body.debate-fullscreen #danmaku-layer { top: 0; bottom: 60px; }
body.debate-fullscreen #danmaku-form input { background: #16213e; color: #eee; border: 1px solid #444; border-radius: 4px; }
body.debate-fullscreen #bottom-bar select { background: #16213e; color: #eee; border: 1px solid #444; border-radius: 4px; }
body.debate-fullscreen #bottom-bar input[type="text"] { background: #16213e; color: #eee; border: 1px solid #444; border-radius: 4px; }
body.debate-fullscreen .sidebar { background: #16213e; border-radius: 6px; padding: 8px; }
/* ── mobile ── */
@media (max-width: 768px) {
  .nav {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    grid-template-rows: auto auto;
    gap: 6px 8px;
    padding: 10px 14px;
    align-items: center;
  }
  .brand {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
  }
  .brand img { height: 52px; }

  .nav-top { display: contents; }
  .nav-bottom { display: contents; }

  .nav-links {
    grid-column: 2 / 5;
    grid-row: 1;
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 0.75em;
    font-size: 13px;
    line-height: 1.25;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { padding: 2px 0; white-space: nowrap; }

  .auth-area {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
  }
  .search {
    grid-column: 3;
    grid-row: 2;
    width: 100%;
    min-width: 0;
  }
  .search input { min-width: 0; width: 100%; flex: 1; padding: 4px 8px; font-size: 13px; }
  .search button { min-height: 26px; padding: 3px 10px; font-size: 13px; }
  .lang-switch {
    grid-column: 4;
    grid-row: 2;
    min-height: 26px;
    padding: 3px 10px;
  }

  .open-source_thought-hero { padding: 24px 20px; }
  .open-source_thought-hero h1 { font-size: 26px; }
  .open-source_thought-lead { font-size: 16px; }
  .open-source_thought-grid { grid-template-columns: 1fr; }
}

/* Arena */
.ttl-options { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-label { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border: 1px solid #ddd; border-radius: 16px; cursor: pointer; font-size: .9em; }
.radio-label:has(input:checked) { background: #e65100; color: #fff; border-color: #e65100; }
.radio-label input[type="radio"] { display: none; }
#arena-countdown { font-weight: bold; color: #e65100; }

/* Arena List - Compact */
.arena-list { margin: 8px 0; }
.arena-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-bottom: 1px solid #ece5d3; }
.arena-row:last-child { border-bottom: none; }
.arena-row.arena-disabled { opacity: .55; }
.arena-title { display: flex; align-items: center; gap: 6px; font-size: .95em; min-width: 0; }
.arena-title a { color: #5b3a1f; font-weight: 600; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.arena-title a:hover { color: #e65100; }
.arena-link-disabled { color: #999; font-weight: 600; cursor: not-allowed; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.badge-sm { font-size: .7em; padding: 1px 5px; border-radius: 8px; background: #8b5e34; color: #fff; white-space: nowrap; }
.lang-tag { font-size: .55em; font-weight: normal; margin-left: .5em; vertical-align: middle; }
.badge-full { background: #c62828; }
.fork-mark { font-size: .78em; margin-left: 4px; color: #8a7a5f; letter-spacing: .04em; font-family: "Segoe UI Symbol", system-ui, sans-serif; cursor: help; vertical-align: baseline; }
.fork-mark .glyph { display: inline-block; }
.fork-mark sub { font-size: .85em; margin-left: 1px; vertical-align: sub; }
.fork-mark.has-derived { color: #a08862; }
.fork-mark.has-derived .glyph { transform: rotate(180deg); }
.arena-meta { display: flex; align-items: center; gap: 8px; font-size: .8em; color: #888; flex-shrink: 0; }
.arena-stat { white-space: nowrap; }
.arena-join-status.open { color: #2e7d32; font-weight: 500; }
.arena-join-status.closed { color: #c62828; font-weight: 500; }

/* Accessibility: visually hidden but available to screen readers */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* Form loading/submitting state (prevents double-submit) */
form.is-submitting { opacity: 0.7; pointer-events: none; }
form.is-submitting button[aria-busy="true"]::after { content: ' �'; }

