:root {
  color-scheme: light;
  --page: #f6f5f1;
  --paper: #fff;
  --ink: #1e2738;
  --muted: #525b6b;
  --line: #dfe2e7;
  --navy: #1b2438;
  --accent: #334f78;
  --accent-hover: #263f66;
  --wash: #eef2f8;
  --focus: #416aa7;
  --danger: #9d303e;
  --font: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; scroll-padding-top: 24px; }
@media (pointer: fine) { html { overscroll-behavior: none; } }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--page);
  font: 16px/1.6 var(--font);
  -webkit-tap-highlight-color: #d6e2f4;
}
main { flex: 1; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; scroll-margin-top: 16px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: var(--accent-hover); text-underline-offset: 4px; }
button, a, input, select, textarea { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
img { display: block; max-width: 100%; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: fixed; z-index: 10; top: 10px; left: 10px; transform: translateY(-150%);
  background: var(--paper); color: var(--ink); padding: 10px 16px; border-radius: 8px; opacity: 0;
}
.skip-link:focus { transform: none; opacity: 1; }
.shell { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.site-header { background: var(--navy); color: #fff; border-bottom: 1px solid #10182a; }
.site-header :focus-visible { outline-color: #e2eaff; }
.header-inner { min-height: 65px; display: flex; align-items: center; gap: 42px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: #fff; }
.brand:hover { color: #e2eaff; }
.brand-mark {
  display: grid; place-items: center; width: 35px; height: 35px; flex: 0 0 35px;
  border: 1px solid #53627f; border-radius: 8px; background: #25324c; color: #fff;
}
.brand-mark svg { width: 27px; height: 27px; }
.brand strong { font-size: 20px; white-space: nowrap; letter-spacing: .02em; }
.site-nav, .header-actions { display: flex; align-items: center; gap: 10px; }
.site-nav { align-self: stretch; gap: 22px; }
.site-nav a {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px;
  padding: 0 3px; color: #d9e1ec; text-decoration: none; font-size: 14px; font-weight: 650; white-space: nowrap;
}
.site-nav a:hover, .site-nav a[aria-current] { box-shadow: inset 0 -2px #b9cbee; color: #fff; }
.site-nav a:focus-visible { outline-offset: -3px; }
.header-actions { margin-inline-start: auto; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 8px 16px; border: 1px solid transparent; border-radius: 7px;
  font-size: 14px; font-weight: 720; line-height: 1.4; text-decoration: none;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.button-primary { color: #fff; background: var(--accent); }
.button-primary:hover { background: var(--accent-hover); }
.button-outline { color: var(--ink); background: var(--paper); border-color: #b5becd; }
.button-outline:hover { background: var(--wash); border-color: #8c9bb2; }
.site-header .button-outline { color: #fff; background: transparent; border-color: #8190a6; }
.site-header .button-outline:hover { background: #2a3953; }
.site-header .button-primary { color: #1b2438; background: #e4ebfa; }
.site-header .button-primary:hover { background: #f2f5fc; }
.icon, .icon-slot { width: 18px; height: 18px; flex: 0 0 auto; }
.icon-slot { display: inline-grid; place-items: center; }
#home { width: min(100%, 1000px); margin-inline: auto; }
.page-intro {
  display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 18px 28px;
  margin-top: 42px; margin-bottom: 23px;
}
.page-intro h1 { font-size: clamp(29px, 4vw, 42px); line-height: 1.23; font-weight: 800; letter-spacing: -.031em; }
.page-intro p { margin-top: 9px; color: var(--muted); font-size: 15px; }
.search {
  width: min(100%, 354px); display: flex; align-items: center; gap: 8px;
  margin-bottom: 1px; padding-inline-start: 12px; border: 1px solid #b5becd; border-radius: 8px; background: var(--paper);
}
.search:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.search-icon { color: var(--accent); }
.search input {
  flex: 1 1 auto; width: 0; min-width: 0; height: 44px; border: 0; border-radius: 4px; background: #fff;
  color: var(--ink); font-size: 16px;
}
.search input:focus-visible { outline: none; }
.search input::placeholder { color: var(--muted); opacity: 1; }
.search-button { flex: 0 0 auto; padding-inline: 16px; white-space: nowrap; border-radius: 0 7px 7px 0; }
.forum {
  --row-padding: 18px;
  --count-width: 64px;
  --date-width: 70px;
  --heading-height: 39px;
  min-width: 0; margin-bottom: 46px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper);
  box-shadow: 0 1px 2px #1722390a;
}
.forum-controls, .post-card {
  display: grid; grid-template-columns: minmax(0, 1fr) var(--count-width) var(--date-width);
  align-items: center; padding-inline: var(--row-padding);
}
.forum-controls { position: relative; isolation: isolate; grid-template-rows: auto var(--heading-height); }
.forum-controls::before {
  position: absolute; z-index: -1; inset: auto 0 0; height: var(--heading-height);
  content: ""; border-block: 1px solid var(--line); background: #f5f6f8;
}
.forum-controls h2 { grid-row: 2; grid-column: 1; font-size: 14px; font-weight: 760; }
.column-label { grid-row: 2; color: var(--muted); font-size: 13px; font-weight: 650; text-align: center; }
.replies-label { grid-column: 2; }
.date-label { grid-column: 3; }
.sort { display: inline-flex; gap: 2px; grid-row: 1; grid-column: 2 / -1; justify-self: end; padding: 2px; border-radius: 7px; }
.sort a {
  display: inline-grid; place-items: center; min-height: 44px; min-width: 44px; padding: 2px 8px;
  border-radius: 6px; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 650; white-space: nowrap;
}
.sort a[aria-current], .sort a:hover { color: var(--accent-hover); background: var(--wash); }
.sort a[aria-current] { font-weight: 760; }
.topics { display: flex; flex-wrap: wrap; gap: 3px; grid-row: 1; grid-column: 1; }
.topics a {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 57px;
  padding: 6px 10px; font-size: 14px; font-weight: 660; color: var(--muted); text-decoration: none; white-space: nowrap;
}
.topics a:hover { color: var(--accent-hover); background: var(--wash); }
.topics a[aria-current] { color: var(--accent-hover); box-shadow: inset 0 -3px var(--accent); font-weight: 780; }
.topics a:focus-visible, .sort a:focus-visible { outline-offset: -2px; }
.search-summary {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding: 5px 10px; color: var(--muted); overflow-wrap: anywhere; font-size: 14px;
}
.paper { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.post-card {
  padding-block: 17px;
}
.post-card + .post-card { border-top: 1px solid var(--line); }
.post-card:last-child { border-radius: 0 0 10px 10px; }
.post-card:hover { background: #fafbfd; }
.post-main { min-width: 0; display: flex; align-items: start; gap: 13px; padding-inline-end: 10px; }
.post-main > .avatar { width: 37px; height: 37px; border-radius: 9px; font-size: 15px; }
.post-summary { min-width: 0; flex: 1; }
.post-card h3 { font-size: 19px; line-height: 1.4; font-weight: 760; margin-bottom: 3px; overflow-wrap: anywhere; text-wrap: pretty; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--accent-hover); text-decoration: underline; }
.post-votes { position: relative; isolation: isolate; display: inline-flex; align-items: center; }
.post-votes::before {
  content: ""; position: absolute; z-index: -1; inset: 50% 2px auto;
  height: 26px; transform: translateY(-50%); border-radius: 7px; background: var(--wash);
}
.vote-button {
  position: relative; isolation: isolate; display: grid; place-items: center; flex: none;
  width: 32px; height: 34px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--accent-hover);
}
.vote-button::before {
  content: ""; position: absolute; z-index: -1; inset: 50% auto auto 50%;
  width: 24px; height: 22px; transform: translate(-50%, -50%); border-radius: 5px;
}
.vote-button:hover::before { background: #dee7f3; }
.vote-up[aria-pressed="true"] { color: #863e31; }
.vote-up[aria-pressed="true"]::before { background: #f5ded8; }
.vote-down[aria-pressed="true"] { color: #284877; }
.vote-down[aria-pressed="true"]::before { background: #d6e3f7; }
.vote-button .icon { width: 14px; height: 14px; }
.vote-button[aria-pressed="true"] .icon { stroke-width: 2.9; }
.vote-button[aria-disabled="true"] { cursor: wait; }
.vote-total { min-width: 15px; text-align: center; color: var(--ink); font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; }
.post-excerpt {
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere; color: var(--muted); font-size: 14px;
}
.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-top: 9px; color: var(--muted); font-size: 13px; }
.meta-item { display: inline-flex; align-items: center; gap: 5px; }
.meta-item .icon { width: 15px; height: 15px; }
.post-count, .post-date { text-align: center; font-variant-numeric: tabular-nums; }
.post-count { color: var(--ink); font-size: 15px; font-weight: 740; }
.post-count .icon { display: none; }
.post-date { color: var(--muted); font-size: 13px; }
.badge { display: inline-flex; align-items: center; border-radius: 4px; padding: 2px 6px; font-size: 12px; font-weight: 710; }
.badge-money { color: #7a4616; background: #faecd9; }
.badge-deception { color: #6b3d52; background: #f5e9ef; }
.badge-no-show { color: #335477; background: #eaf0f8; }
.badge-verbal-disrespect { color: #4a5359; background: #edf0f1; }
.avatar {
  display: inline-grid; place-items: center; flex: 0 0 auto; width: 23px; height: 23px;
  border-radius: 50%; color: #405574; background: #e7edf5; font-size: 11px; font-weight: 800;
}
.avatar-amber { color: #74491c; background: #f5ead9; }
.avatar-plum { color: #604966; background: #efe7f0; }
.avatar-large { width: 41px; height: 41px; font-size: 17px; }
.thumbnail {
  display: grid; place-items: center; width: 90px; height: 64px; overflow: hidden;
  border: 1px solid #dce3ef; border-radius: 4px; background: #eef2f8; color: #50627e;
}
.thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.post-main > .thumbnail { flex: 0 0 74px; width: 74px; height: 50px; align-self: center; border-radius: 6px; }
.mini-chat { display: grid; width: 84%; gap: 4px; }
.mini-chat span { height: 12px; width: 80%; padding: 2px 6px; border-radius: 4px; background: #fff; }
.mini-chat span:nth-child(2) { justify-self: end; width: 65%; background: #cad9ee; }
.mini-chat span:nth-child(3) { width: 68%; }
.mini-chat span::after { content: ""; display: block; background: #859ab9; height: 2px; margin-top: 3px; width: 68%; border-radius: 2px; opacity: .65; }
.empty { padding: 32px 22px; color: var(--muted); }
.empty h3 { color: var(--ink); font-size: 19px; }
.empty p { margin-top: 4px; }
.empty a { display: inline-flex; align-items: center; min-height: 44px; margin-top: 6px; font-weight: 700; }
.aside-mark {
  display: inline-grid; place-items: center; width: 41px; height: 41px;
  background: var(--wash); border-radius: 5px; color: var(--accent-hover);
}
.aside-mark .icon, .aside-mark .icon-slot { width: 22px; height: 22px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; font-size: 14px; font-weight: 760; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.site-footer { border-top: 1px solid var(--line); background: var(--page); color: var(--muted); font-size: 13px; }
.footer-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-block: 15px; }
.footer-inner strong { color: var(--ink); }
.footer-inner strong span { color: var(--muted); font-weight: 550; margin-inline-start: 6px; }
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 0 16px; }
.footer-links .inline-action { min-height: 44px; }

.inner-page { max-width: 814px; margin: 24px auto 60px; }
.back-link { margin-bottom: 9px; }
.paper { padding: clamp(18px, 4vw, 36px); }
.article h1, .rules h1 { margin-top: 9px; font-size: clamp(27px, 4vw, 41px); line-height: 1.26; letter-spacing: -.045em; overflow-wrap: anywhere; }
.article-copy { display: grid; gap: 14px; margin: 24px 0 0; max-width: 65ch; font-size: 16px; line-height: 1.85; }
.article-copy p { white-space: pre-wrap; overflow-wrap: anywhere; }
.article-images { padding-top: 22px; margin-top: 23px; border-top: 1px solid var(--line); }
.article-images h2 { font-size: 16px; margin-bottom: 10px; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 10px; }
.attachment-button {
  display: grid; justify-items: start; gap: 6px; text-align: start; background: var(--page); border: 1px solid var(--line);
  color: var(--accent-hover); border-radius: 5px; padding: 8px; font-size: 13px; font-weight: 700;
}
.attachment-button .thumbnail { width: 128px; }
.attachment-button:hover { background: var(--wash); border-color: #a1b1c7; }
.thread-page { padding: 0; }
.thread-page > :is(.article, .discussion) { padding: clamp(15px, 3.7vw, 30px); }
.article .post-meta .avatar { width: 32px; height: 32px; font-size: 13px; }
.article-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin-top: 16px; }
.thread-action {
  display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 7px;
  border: 0; border-radius: 5px; background: transparent; color: var(--muted);
  font-size: 13px; font-weight: 690; text-decoration: none;
}
.thread-action .icon { width: 15px; height: 15px; }
.thread-action:hover, .thread-action[aria-expanded="true"] { background: var(--wash); color: var(--accent-hover); }
.article-report { margin-inline-start: auto; }
.discussion {
  --comment-avatar-size: 30px;
  --thread-step: 34px;
  --thread-line: #d1dceb;
  border-top: 1px solid var(--line);
}
.discussion h2 { font-size: 19px; }
.discussion h2 span { margin-inline-start: 4px; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.comments, .comment-children { list-style: none; padding: 0; }
.comments { margin: 13px 0 0; }
.comment { min-width: 0; scroll-margin-top: 12px; }
.comments > .comment { padding: 10px 0; }
.comments > .comment + .comment { border-top: 1px solid var(--line); }
.comment-content { min-width: 0; position: relative; padding-inline-start: calc(var(--comment-avatar-size) + 8px); }
.comment:target > .comment-content { background: var(--wash); border-radius: 5px; }
.comment-header, .comment-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 9px; }
.comment-header { min-height: var(--comment-avatar-size); }
.comment-header .avatar {
  position: absolute; inset-block-start: 0; inset-inline-start: 0;
  width: var(--comment-avatar-size); height: var(--comment-avatar-size); font-size: 12px;
}
.comment-header strong { font-size: 14px; overflow-wrap: anywhere; }
.comment-header time { color: var(--muted); font-size: 12px; }
.comment-context {
  display: inline-flex; align-items: center; gap: 4px; min-height: 28px;
  color: var(--muted); font-size: 12px; overflow-wrap: anywhere;
}
.comment-context .icon { width: 13px; height: 13px; }
.comment-body { margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.72; }
.comment-actions { margin-inline-start: -7px; }
.comment-branch { position: relative; }
.comment-branch[open]:not(.comment-branch-flat) { padding-inline-start: var(--thread-step); }
.comment-branch[open]:not(.comment-branch-flat)::before {
  content: ""; position: absolute; inset-block: 0 9px; inset-inline-start: calc((var(--comment-avatar-size) - 1px) / 2);
  inline-size: 1px; background: var(--thread-line);
}
.branch-toggle {
  width: fit-content; min-height: 30px; display: flex; align-items: center; gap: 8px;
  padding: 0 7px 0 calc((var(--comment-avatar-size) - 15px) / 2); border-radius: 4px; cursor: pointer; list-style: none;
  color: var(--accent-hover); font-size: 13px; font-weight: 650;
}
.branch-toggle::-webkit-details-marker { display: none; }
.comment-branch[open]:not(.comment-branch-flat) > .branch-toggle {
  position: absolute; inset-block-start: 0; inset-inline-start: 0; z-index: 1;
  width: var(--comment-avatar-size); justify-content: center; padding: 0;
}
.branch-icon {
  position: relative; width: 15px; height: 15px; border: 1px solid #a4b5cc; border-radius: 4px;
  background: var(--paper);
}
.branch-icon::before, .branch-icon::after {
  content: ""; position: absolute; inset: 50% auto auto 50%; width: 7px; height: 1px;
  transform: translate(-50%, -50%); background: currentColor;
}
.branch-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.branch-toggle:hover .branch-icon { background: var(--wash); border-color: var(--accent); }
.comment-branch[open] > .branch-toggle .branch-icon::after,
.comment-branch[open] > .branch-toggle .branch-closed,
.comment-branch:not([open]) > .branch-toggle .branch-open { display: none; }
.comment-children > .comment { padding-block: 2px 4px; }
.inline-reply .reply-form { margin-block: 3px 10px; }
.inline-action {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px;
  padding: 0 4px; border: 0; background: transparent; color: var(--accent-hover);
  font-size: 13px; font-weight: 730; text-decoration: none;
}
.inline-action:hover { text-decoration: underline; }
.comment-empty, .reply-suspension { color: var(--muted); font-size: 14px; }
.comment-empty { margin-top: 13px; }
.reply-suspension a { margin-inline-start: 5px; }
.reply-area { margin-top: 10px; }
.reply-trigger, .reply-form { width: 100%; border: 1px solid #c6cfdd; border-radius: 7px; background: var(--paper); }
.reply-trigger {
  display: flex; align-items: center; gap: 8px; text-align: start; min-height: 44px;
  padding: 7px 11px; color: var(--muted); font-size: 14px;
}
.reply-trigger .icon { width: 16px; height: 16px; color: var(--accent); }
.reply-trigger:hover { background: #f7f9fc; border-color: #a4b5cc; }
.reply-form { display: grid; gap: 4px; padding: 8px 10px; min-width: 0; }
.reply-form:focus-within { border-color: var(--focus); }
.reply-form:has(textarea:focus-visible) { box-shadow: 0 0 0 1px var(--focus); }
.reply-form:has(textarea[aria-invalid="true"]) { border-color: var(--danger); }
.reply-label { display: block; font-size: 13px; color: var(--accent-hover); font-weight: 710; overflow-wrap: anywhere; }
.reply-form textarea {
  display: block; width: 100%; min-height: 65px; padding: 3px 2px; resize: vertical;
  border: 0; border-radius: 3px; background: transparent; color: var(--ink); font-size: 16px;
}
.reply-form textarea:focus-visible { outline: none; }
.reply-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.reply-actions .button { min-height: 38px; padding: 5px 11px; }
.rules h2 { margin-top: 20px; font-size: 19px; }
.rules p { margin-top: 4px; color: var(--muted); }
.policy-page p { max-width: 68ch; line-height: 1.85; }
.policy-page .policy-date { margin-block: 9px 22px; font-size: 14px; }
.policy-page strong { color: var(--ink); }
.service-form, .service-tabs, .service-list { margin-top: 20px; }
.service-actions, .service-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.service-tabs { border-bottom: 1px solid var(--line); }
.service-tabs a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; text-decoration: none; }
.service-tabs a:hover { text-decoration: underline; }
.service-tabs a[aria-current] { box-shadow: inset 0 -2px var(--accent); }
.service-list { list-style: none; padding: 0; }
.service-list > li { padding: 12px 0; border-top: 1px solid var(--line); }
.member-row > div { overflow-wrap: anywhere; }
.service-details summary { color: var(--accent-hover); cursor: pointer; padding-block: 10px; min-height: 44px; }
.service-details summary, .report-subject { overflow-wrap: anywhere; }
.service-details summary span { margin-inline-start: 6px; color: var(--muted); font-size: 13px; }
.service-details form { margin-top: 12px; justify-items: start; }
.service-details .field { width: min(100%, 34rem); }
.service-message { white-space: pre-wrap; overflow-wrap: anywhere; }
.service-details p { overflow-wrap: anywhere; }
.rules .form-status { margin-block: 14px; padding: 10px 12px; border-radius: 6px; background: var(--wash); color: var(--ink); }
.rules .form-status.field-error { color: var(--danger); }

.dialog {
  position: fixed; width: min(100% - 28px, 416px); max-width: none; max-height: calc(100dvh - 30px);
  padding: 0; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--paper);
  box-shadow: 0 16px 50px #17223933; overscroll-behavior: contain;
}
.dialog::backdrop { background: #121a2ac9; }
.dialog-body { padding: 23px; }
.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.dialog h2 { font-size: 25px; line-height: 1.3; }
.dialog h2 + p { color: var(--muted); margin-top: 6px; font-size: 15px; }
.icon-button {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0; flex: 0 0 44px;
  border: 0; border-radius: 8px; color: var(--muted); background: transparent;
}
.icon-button:hover { color: var(--accent-hover); background: var(--wash); }
.full-button { width: 100%; margin: 19px 0 0; }
.dialog-note { color: var(--muted); font-size: 13px; margin-top: 11px; }
.compose-dialog { width: min(100% - 28px, 640px); }
.compose-dialog .dialog-body { padding: 19px 24px 22px; }
.compose-top { margin-bottom: 4px; }
.compose-author { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin-bottom: 15px; }
.fields, .field { display: grid; gap: 5px; }
.fields { gap: 12px; }
.field label { font-size: 14px; font-weight: 760; }
.field :is(input:not([type=file]), select, textarea) {
  width: 100%; min-height: 44px; border: 1px solid #b5becd; border-radius: 5px;
  padding: 8px 10px; background: #fff; color: var(--ink); font-size: 16px;
}
.field textarea { resize: vertical; min-height: 78px; }
.field :is(input, textarea)::placeholder { color: var(--muted); opacity: 1; }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 13px; overflow-wrap: anywhere; }
.field-help, .optional { color: var(--muted); font-size: 13px; font-weight: 500; }
.registration-email-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.registration-email-row input { min-width: 0; }
#body-help a { display: inline-block; margin-inline-start: .35rem; font-weight: 650; }
.optional { padding-inline-start: 4px; }
.attachment-field { border: 1px solid #d6deeb; border-radius: 5px; padding: 11px; background: #f6f8fc; }
.file-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; color: var(--muted); font-size: 13px; }
.file-actions .button { padding-inline: 10px; color: var(--accent-hover); }
.draft-images { display: grid; gap: 7px; padding: 0; margin: 6px 0 0; list-style: none; }
.draft-image { display: flex; align-items: start; gap: 8px; min-width: 0; }
.draft-image img { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; }
.draft-image > div { flex: 1; min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.draft-image label { display: block; margin-bottom: 3px; font-size: 13px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 16px; }
.image-dialog { width: min(100% - 28px, 600px); }
.image-dialog img { width: 100%; height: auto; max-height: 65dvh; object-fit: contain; border-radius: 8px; }
.demo-chat { border-radius: 6px; background: var(--wash); padding: 15px; }
.chat-line { display: flex; flex-direction: column; align-items: start; gap: 3px; margin-top: 10px; font-size: 14px; color: var(--muted); }
.chat-line:nth-of-type(even) { align-items: end; }
.chat-line span { display: block; border-radius: 8px; padding: 6px 10px; background: var(--paper); color: var(--ink); }
.chat-line:nth-of-type(even) span { background: #d9e5f8; }
.toast {
  position: fixed; z-index: 5; bottom: max(18px, env(safe-area-inset-bottom)); left: 50%;
  transform: translateX(-50%); max-width: calc(100% - 24px); border-radius: 9px;
  background: var(--navy); color: #fff; box-shadow: 0 4px 15px #18213730; font-size: 14px;
}
.toast:not(:empty) { padding: 9px 15px; }
body:has(dialog[open]) .toast { clip-path: inset(50%); }

@media (max-width: 1024px) {
  .shell { width: calc(100% - 48px); }
  .header-inner { gap: 25px; }
  .forum { --row-padding: 14px; --count-width: 54px; --date-width: 61px; }
  .search { width: min(100%, 300px); }
}
@media (max-width: 800px) {
  .page-intro { margin-top: 25px; }
  .site-nav { gap: 14px; }
}
@media (max-width: 590px) {
  .shell { width: auto; margin-inline: max(14px, env(safe-area-inset-left)) max(14px, env(safe-area-inset-right)); }
  .header-inner { padding-top: 8px; min-height: auto; flex-wrap: wrap; gap: 5px; justify-content: space-between; }
  .brand { gap: 8px; }
  .brand-mark { width: 30px; height: 30px; flex-basis: 30px; }
  .brand-mark svg { width: 24px; height: 24px; }
  .brand strong { font-size: 16px; }
  .header-actions { margin-inline-start: 0; gap: 6px; }
  .header-actions .button { padding-inline: 9px; font-size: 13px; }
  .header-actions .icon, .header-actions .icon-slot { width: 15px; height: 15px; }
  .site-nav { order: 1; width: 100%; gap: 10px; }
  .site-nav a { font-size: 13px; min-height: 44px; padding-inline: 5px; }
  .page-intro { margin-top: 22px; gap: 13px; margin-bottom: 17px; }
  .page-intro p { margin-top: 6px; font-size: 14px; }
  .search { width: 100%; }
  .search-button { padding-inline: 12px; }
  .forum { --row-padding: 10px; --heading-height: 52px; margin-bottom: 33px; }
  .forum-controls { grid-template-columns: minmax(0, 1fr) auto; }
  .forum-controls h2 { font-size: 14px; }
  .column-label { display: none; }
  .forum-controls .sort { grid-row: 2; grid-column: 2; }
  .topics { gap: 1px; }
  .forum-controls .topics { grid-column: 1 / -1; }
  .topics a { min-height: 46px; padding-inline: 6px; font-size: 13px; }
  .post-card {
    grid-template-columns: minmax(0, 1fr) 40px; grid-template-areas: "main count" "main date";
    grid-template-rows: 1fr 1fr; column-gap: 5px; padding-block: 13px;
  }
  .post-main { grid-area: main; gap: 8px; padding-inline-end: 0; }
  .post-main > .avatar { width: 27px; height: 27px; border-radius: 6px; font-size: 12px; }
  .post-card h3 { font-size: 17px; text-wrap: balance; }
  .post-excerpt { font-size: 13px; -webkit-line-clamp: 2; }
  .post-card .thumbnail { display: none; }
  .post-count { grid-area: count; align-self: end; display: flex; justify-content: center; align-items: center; gap: 3px; font-size: 13px; }
  .post-count .icon { display: block; width: 13px; height: 13px; color: var(--muted); }
  .post-date { grid-area: date; align-self: start; margin-top: 3px; font-size: 11px; }
  .post-meta { gap: 3px 8px; margin-top: 8px; }
  .discussion { --comment-avatar-size: 28px; --thread-step: 28px; }
  .inner-page { margin-block: 15px 32px; }
  .compose-dialog .dialog-body { padding-inline: 14px; }
  .dialog-body { padding: 16px; }
}
@media (max-width: 360px) {
  .header-actions .button { gap: 4px; padding-inline: 7px; }
  .topics { gap: 0; }
  .topics a { padding-inline: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.auth-modes { display: flex; gap: 7px; margin-top: 16px; }
.auth-modes .button { flex: 1; }
.auth-modes [aria-pressed="true"] { background: var(--wash); border-color: var(--accent); color: var(--accent-hover); }
#auth-form { margin-top: 12px; }
#auth-form .full-button { margin-top: 11px; }
#auth-error, #post-error { margin-top: 8px; }
.button:disabled { cursor: wait; opacity: .7; }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px var(--row-padding, 14px); border-top: 1px solid var(--line); }
.discussion .pagination { margin-bottom: 11px; }
.empty button { margin-top: 12px; }
.attachment-button .thumbnail { flex: 0 0 auto; }
.rules p + p { margin-top: 10px; }
.article-top, .moderation-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.article-top { justify-content: space-between; }
.moderation-actions .button { min-height: 44px; }
.button-danger { background: var(--danger); color: #fff; }
.button-danger:hover { background: #7e2833; }
.button-danger-outline { color: var(--danger); }
#admin-image-list { display: grid; gap: 10px; }
#admin-images { min-width: 0; margin: 0; }
#admin-images input[type=checkbox] { width: 18px; min-height: 0; height: 18px; flex: none; padding: 0; accent-color: var(--accent); }
.admin-image-row + .admin-image-row { border-top: 1px solid var(--line); padding-top: 10px; }
.admin-remove { min-height: 44px; display: flex; align-items: center; gap: 9px; }
#admin-delete-description { margin-top: 8px; }
#google-login { margin-top: 9px; }
.avatar { overflow: hidden; }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
#account-button { max-width: 160px; overflow: hidden; display: block; white-space: nowrap; text-overflow: ellipsis; }
#account-title { overflow-wrap: anywhere; }
.account-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.profile-picture-row { display: flex; align-items: center; gap: 12px; }
.profile-preview { width: 70px; height: 70px; font-size: 25px; }
.profile-picture-controls { min-width: 0; }
.profile-picture-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.profile-picture-controls .field-help { margin-top: 6px; }
#profile-form { margin-top: 12px; }

@media (max-width: 590px) {
  #account-button { max-width: 92px; }
}
