:root {
  color-scheme: dark;
  --ink: #f5efe3;
  --ink-soft: #ded8cb;
  --muted: #a7b2b5;
  --dim: #758389;
  --bg: #06090d;
  --surface: #0b1117;
  --surface-raised: #101920;
  --surface-warm: #17160f;
  --line: rgba(213, 221, 220, 0.12);
  --line-strong: rgba(213, 221, 220, 0.2);
  --amber: #f2b764;
  --amber-strong: #ffd48a;
  --amber-soft: rgba(242, 183, 100, 0.12);
  --teal: #47d6c9;
  --teal-soft: rgba(71, 214, 201, 0.11);
  --danger: #ff8f87;
  --shadow: rgba(0, 0, 0, 0.48);
  --content-width: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    Arial, sans-serif;
  letter-spacing: 0;
}

body:has(dialog[open]) {
  overflow: hidden;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button,
select {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
p,
blockquote {
  margin-top: 0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.is-hidden {
  display: none !important;
}

.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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
  align-items: center;
  height: 72px;
  padding: 0 36px;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 9, 13, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-self: start;
  min-width: 0;
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 212, 138, 0.58);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 44%, var(--amber-strong) 0 9%, transparent 10%),
    radial-gradient(circle at 50% 51%, rgba(242, 183, 100, 0.28) 0 32%, transparent 33%),
    #102025;
  box-shadow: 0 0 24px rgba(242, 183, 100, 0.16);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.15;
}

.brand strong {
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 17px;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 28px;
}

.main-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.main-nav a span {
  color: var(--dim);
  font-size: 11px;
}

.main-nav a::after {
  position: absolute;
  inset: auto 0 -1px;
  height: 2px;
  background: var(--amber);
  content: "";
  opacity: 0;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--ink);
}

.main-nav a.is-active::after {
  opacity: 1;
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.button,
.account-button,
.icon-button,
.text-button,
.back-button {
  border: 0;
  background: none;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button svg,
.account-button svg,
.icon-button svg,
.text-button svg,
.back-button svg,
.topic-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.button-primary {
  border-color: var(--amber);
  background: var(--amber);
  color: #17120a;
}

.button-primary:hover {
  border-color: var(--amber-strong);
  background: var(--amber-strong);
}

.button-secondary {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink-soft);
}

.button-secondary:hover {
  border-color: rgba(71, 214, 201, 0.42);
  background: var(--teal-soft);
  color: var(--ink);
}

.button-wide {
  width: 100%;
  margin-top: 18px;
}

.button.is-loading span {
  opacity: 0.66;
}

.button.is-loading::after,
.text-button.is-loading::after {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  animation: spin 700ms linear infinite;
}

.account-button {
  display: inline-flex;
  min-width: 132px;
  max-width: 220px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--ink-soft);
  font-size: 13px;
}

.account-button:hover {
  border-color: rgba(255, 212, 138, 0.42);
  background: var(--amber-soft);
}

.account-button > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-masthead {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.68fr);
  min-height: 440px;
  align-items: center;
  gap: 56px;
  padding: 70px max(36px, calc((100vw - var(--content-width)) / 2));
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(6, 9, 13, 0.98) 0%, rgba(6, 9, 13, 0.84) 54%, rgba(6, 9, 13, 0.32) 100%),
    url("./assets/hero-bg.svg") center / cover no-repeat;
}

.community-masthead::after {
  position: absolute;
  inset: auto 0 0;
  height: 84px;
  background: linear-gradient(transparent, rgba(6, 9, 13, 0.62));
  content: "";
  pointer-events: none;
}

.masthead-copy {
  position: relative;
  z-index: 2;
  max-width: 690px;
}

.eyebrow,
.section-kicker {
  margin-bottom: 15px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.community-masthead h1 {
  margin-bottom: 7px;
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 60px;
  line-height: 1.05;
}

.masthead-en {
  margin-bottom: 24px;
  color: var(--amber-strong);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
}

.masthead-lead {
  max-width: 640px;
  margin-bottom: 30px;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.75;
}

.masthead-lead span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.masthead-signal {
  position: relative;
  z-index: 1;
  justify-self: end;
  width: min(100%, 520px);
}

.masthead-signal img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(255, 212, 138, 0.16);
  border-radius: 4px;
  object-fit: cover;
  opacity: 0.78;
  box-shadow: 0 30px 70px var(--shadow);
}

.forum-shell {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 270px;
  gap: 42px;
  width: min(var(--content-width), calc(100vw - 72px));
  min-height: 720px;
  margin: 0 auto;
  padding: 54px 0 96px;
}

.topic-rail,
.context-rail {
  align-self: start;
  position: sticky;
  top: 112px;
}

.rail-label {
  margin-bottom: 18px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}

.rail-label span {
  display: block;
  margin-top: 4px;
  color: var(--dim);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.topic-list {
  display: grid;
  gap: 4px;
}

.topic-button {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 11px;
  width: 100%;
  min-height: 54px;
  align-items: center;
  padding: 8px 10px;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.topic-button:hover {
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
}

.topic-button.is-active {
  border-left-color: var(--amber);
  background: var(--amber-soft);
  color: var(--amber-strong);
}

.topic-button span {
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
}

.topic-button small {
  display: block;
  margin-top: 3px;
  color: var(--dim);
  font-size: 10px;
  font-weight: 500;
}

.feed-column {
  min-width: 0;
}

.feed-heading {
  display: flex;
  min-height: 60px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-strong);
}

.feed-heading .section-kicker {
  margin-bottom: 6px;
}

.feed-heading h2 {
  margin-bottom: 0;
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 30px;
}

.mobile-compose {
  display: none;
}

.connection-state {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.connection-state small {
  color: var(--dim);
}

.signal-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 14px rgba(71, 214, 201, 0.72);
  animation: breathe 1.6s ease-in-out infinite;
}

.post-feed {
  min-height: 360px;
}

.post-item {
  border-bottom: 1px solid var(--line);
}

.post-open {
  display: block;
  width: 100%;
  padding: 25px 2px 23px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.post-open:hover .post-title-row h3 {
  color: var(--amber-strong);
}

.post-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.post-author > span:last-child {
  display: grid;
  gap: 2px;
}

.post-author strong {
  color: var(--ink-soft);
  font-size: 12px;
}

.post-author small {
  color: var(--dim);
  font-size: 10px;
}

.avatar {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(255, 212, 138, 0.28);
  border-radius: 50%;
  background: #173036;
  color: var(--amber-strong);
  font-family: "Songti SC", serif;
  font-weight: 800;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-tiny {
  width: 22px;
  height: 22px;
  font-size: 10px;
}

.avatar-small {
  width: 32px;
  height: 32px;
  font-size: 13px;
}

.avatar-medium {
  width: 44px;
  height: 44px;
  font-size: 17px;
}

.avatar-large {
  width: 82px;
  height: 82px;
  font-size: 28px;
}

.category-tag {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  margin-bottom: 10px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.category-life {
  border-color: rgba(71, 214, 201, 0.25);
  background: var(--teal-soft);
  color: #8ceae1;
}

.category-economy {
  border-color: rgba(255, 212, 138, 0.26);
  background: var(--amber-soft);
  color: var(--amber-strong);
}

.category-collaboration {
  border-color: rgba(179, 152, 234, 0.24);
  background: rgba(179, 152, 234, 0.09);
  color: #c8b2ee;
}

.post-title-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.post-title-row h3 {
  margin-bottom: 10px;
  color: var(--ink);
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 22px;
  line-height: 1.42;
  transition: color 160ms ease;
}

.pinned-mark {
  display: inline-flex;
  margin-top: 4px;
  color: var(--amber);
}

.pinned-mark svg {
  width: 14px;
  height: 14px;
}

.post-excerpt {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-line;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--dim);
  font-size: 11px;
}

.post-footer > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.post-footer svg {
  width: 14px;
  height: 14px;
}

.post-skeleton {
  display: grid;
  gap: 14px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.post-skeleton span,
.thread-loading span {
  display: block;
  height: 12px;
  border-radius: 3px;
  background: linear-gradient(90deg, #111a20, #17252b, #111a20);
  background-size: 220% 100%;
  animation: shimmer 1.4s linear infinite;
}

.post-skeleton span:first-child {
  width: 30%;
}

.post-skeleton span:nth-child(2) {
  width: 72%;
  height: 22px;
}

.post-skeleton span:last-child {
  width: 94%;
}

.feed-empty {
  display: flex;
  min-height: 330px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: var(--muted);
  text-align: center;
}

.feed-empty > svg {
  width: 38px;
  height: 38px;
  margin-bottom: 18px;
  color: var(--teal);
}

.feed-empty h3 {
  margin-bottom: 8px;
  color: var(--ink);
  font-family: "Songti SC", serif;
  font-size: 21px;
}

.feed-empty p {
  margin-bottom: 20px;
  color: var(--dim);
  font-size: 13px;
}

.load-more {
  width: 100%;
  margin-top: 22px;
}

.context-rail {
  display: grid;
  gap: 32px;
}

.context-block {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.context-block blockquote {
  margin-bottom: 16px;
  color: var(--amber-strong);
  font-family: "Songti SC", serif;
  font-size: 23px;
  line-height: 1.5;
}

.context-block > p:not(.rail-label) {
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

.context-block .context-en {
  color: var(--dim) !important;
  font-size: 11px !important;
}

.candle-line {
  display: block;
  width: 34px;
  height: 2px;
  margin-bottom: 19px;
  background: var(--amber);
  box-shadow: 0 0 18px rgba(242, 183, 100, 0.55);
}

.context-block h3 {
  margin-bottom: 9px;
  color: var(--ink);
  font-family: "Songti SC", serif;
  font-size: 19px;
}

.text-button,
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
}

.text-button:hover,
.back-button:hover {
  color: #8ceae1;
}

.summary-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.summary-heading h3 {
  margin-bottom: 2px;
  font-size: 16px;
}

.summary-heading p {
  max-width: 180px;
  margin: 0;
  overflow: hidden;
  color: var(--dim);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-bio {
  margin-bottom: 16px !important;
  color: var(--muted) !important;
  font-size: 12px !important;
}

.site-footer {
  display: flex;
  width: min(var(--content-width), calc(100vw - 72px));
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 11px;
}

.icon-button {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
}

.icon-button:hover {
  border-color: rgba(71, 214, 201, 0.38);
  background: var(--teal-soft);
  color: var(--ink);
}

dialog {
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.72);
}

dialog::backdrop {
  background: rgba(2, 4, 7, 0.78);
  backdrop-filter: blur(7px);
}

.modal {
  width: min(590px, calc(100vw - 32px));
  max-height: min(820px, calc(100svh - 32px));
  overflow-y: auto;
  padding: 28px;
}

.compose-modal {
  width: min(720px, calc(100vw - 32px));
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.modal-header .section-kicker {
  margin-bottom: 7px;
}

.modal-header h2 {
  margin-bottom: 7px;
  font-family: "Songti SC", serif;
  font-size: 28px;
}

.modal-header p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

form label {
  display: block;
  margin: 19px 0 8px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

form label span {
  margin-left: 4px;
  color: var(--dim);
  font-size: 10px;
  font-weight: 500;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  outline: none;
  background: #090e13;
  color: var(--ink);
  transition:
    border-color 150ms ease,
    background-color 150ms ease;
}

input,
select {
  min-height: 44px;
  padding: 10px 12px;
}

textarea {
  min-height: 112px;
  padding: 12px;
  resize: vertical;
  line-height: 1.7;
}

input:hover,
textarea:hover,
select:hover,
input:focus,
textarea:focus,
select:focus {
  border-color: rgba(71, 214, 201, 0.46);
  background: #0c1419;
}

.field-note {
  margin: 8px 0 0;
  color: var(--dim);
  font-size: 10px;
}

.code-recipient {
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.code-input {
  height: 58px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 8px;
  text-align: center;
}

.back-button {
  margin-bottom: 3px;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.form-footer > span {
  color: var(--dim);
  font-size: 10px;
  line-height: 1.5;
}

.profile-editor {
  display: grid;
  gap: 8px;
}

.avatar-editor {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.avatar-editor > div:last-of-type {
  display: grid;
  justify-items: start;
  gap: 8px;
}

.avatar-editor small {
  color: var(--dim);
  font-size: 10px;
}

.danger-text {
  color: var(--danger);
}

.danger-text:hover {
  color: #ffb0aa;
}

.thread-modal {
  width: min(850px, calc(100vw - 28px));
  height: min(880px, calc(100svh - 28px));
  overflow: hidden;
}

.thread-toolbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  min-height: 62px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 17, 23, 0.94);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  backdrop-filter: blur(14px);
}

.thread-content {
  height: calc(100% - 62px);
  overflow-y: auto;
}

.thread-post {
  padding: 44px 54px 48px;
  border-bottom: 1px solid var(--line-strong);
}

.thread-post h1 {
  margin: 8px 0 22px;
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 35px;
  line-height: 1.34;
}

.thread-author {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 30px;
}

.thread-author > div {
  display: grid;
  gap: 3px;
}

.thread-author strong {
  color: var(--ink-soft);
  font-size: 13px;
}

.thread-author span {
  color: var(--dim);
  font-size: 10px;
}

.thread-body {
  color: var(--ink-soft);
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 17px;
  line-height: 2;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.reply-section {
  padding: 36px 54px 54px;
}

.reply-heading {
  margin-bottom: 6px;
}

.reply-heading h2 {
  font-family: "Songti SC", serif;
  font-size: 22px;
}

.reply-list {
  margin-bottom: 34px;
}

.reply-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 15px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.reply-floor {
  color: var(--dim);
  font-family: Georgia, serif;
  font-size: 11px;
}

.reply-author {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}

.reply-author strong {
  color: var(--ink-soft);
  font-size: 12px;
}

.reply-author > span:last-child {
  margin-left: auto;
  color: var(--dim);
  font-size: 10px;
}

.reply-item p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.reply-empty {
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font-size: 12px;
}

.reply-composer {
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.025);
}

.reply-composer > p {
  color: var(--muted);
  font-size: 12px;
}

.thread-loading {
  display: grid;
  gap: 22px;
  padding: 70px 54px;
}

.thread-loading span:first-child {
  width: 26%;
}

.thread-loading span:nth-child(2) {
  width: 78%;
  height: 32px;
}

.thread-loading span:last-child {
  width: 100%;
  height: 160px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  max-width: min(420px, calc(100vw - 36px));
  padding: 13px 16px;
  border: 1px solid rgba(255, 212, 138, 0.3);
  border-radius: 4px;
  background: #17160f;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  color: var(--ink);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes breathe {
  50% {
    opacity: 0.45;
    transform: scale(0.72);
  }
}

@keyframes shimmer {
  to {
    background-position: -120% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1120px) {
  .forum-shell {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .context-rail {
    display: none;
  }

  .community-masthead {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.56fr);
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
    padding: 0 24px;
  }

  .main-nav {
    display: none;
  }

  .community-masthead {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    padding-inline: 28px;
  }

  .masthead-signal {
    opacity: 0.64;
  }

  .forum-shell,
  .site-footer {
    width: calc(100vw - 48px);
  }
}

@media (max-width: 760px) {
  .header-compose {
    display: none !important;
  }

  .community-masthead {
    display: block;
    min-height: 410px;
    padding: 62px 24px 54px;
  }

  .masthead-copy {
    max-width: 620px;
  }

  .masthead-signal {
    position: absolute;
    inset: 0 -150px 0 auto;
    width: 620px;
    opacity: 0.22;
  }

  .community-masthead h1 {
    font-size: 50px;
  }

  .masthead-lead {
    max-width: 540px;
    font-size: 16px;
  }

  .forum-shell {
    display: block;
    width: 100%;
    padding-top: 0;
  }

  .topic-rail {
    position: sticky;
    top: 72px;
    z-index: 20;
    overflow-x: auto;
    padding: 10px 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(6, 9, 13, 0.94);
    scrollbar-width: none;
    backdrop-filter: blur(15px);
  }

  .topic-rail::-webkit-scrollbar {
    display: none;
  }

  .topic-rail .rail-label {
    display: none;
  }

  .topic-list {
    display: flex;
    width: max-content;
    gap: 6px;
  }

  .topic-button {
    display: inline-flex;
    width: auto;
    min-height: 38px;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
  }

  .topic-button.is-active {
    border-color: rgba(255, 212, 138, 0.42);
  }

  .topic-button small {
    display: none;
  }

  .topic-button svg {
    width: 15px;
    height: 15px;
  }

  .feed-column {
    padding: 34px 20px 70px;
  }

  .mobile-compose {
    display: inline-flex;
  }

  .site-footer {
    width: calc(100vw - 40px);
  }

  .thread-post {
    padding: 34px 28px 40px;
  }

  .thread-post h1 {
    font-size: 29px;
  }

  .reply-section {
    padding: 30px 28px 40px;
  }
}

@media (max-width: 560px) {
  .site-header {
    height: 64px;
    padding: 0 16px;
  }

  .brand-mark {
    width: 29px;
    height: 29px;
  }

  .brand strong {
    font-size: 15px;
  }

  .brand small {
    display: none;
  }

  .account-button {
    min-width: 40px;
    max-width: 138px;
    min-height: 38px;
    padding: 7px 10px;
  }

  .account-button > svg + span {
    display: none;
  }

  .community-masthead {
    min-height: 420px;
    padding: 54px 18px 48px;
  }

  .eyebrow {
    max-width: 260px;
    line-height: 1.5;
  }

  .community-masthead h1 {
    font-size: 43px;
  }

  .masthead-en {
    font-size: 16px;
  }

  .masthead-lead {
    max-width: 330px;
    font-size: 15px;
  }

  .masthead-lead span {
    font-size: 12px;
  }

  .masthead-action {
    max-width: 100%;
  }

  .topic-rail {
    top: 64px;
    padding-inline: 12px;
  }

  .feed-column {
    padding-inline: 16px;
  }

  .feed-heading h2 {
    font-size: 27px;
  }

  .post-title-row h3 {
    font-size: 20px;
  }

  .post-excerpt {
    font-size: 13px;
  }

  .site-footer {
    flex-direction: column;
    width: calc(100vw - 32px);
  }

  .modal {
    width: calc(100vw - 16px);
    max-height: calc(100svh - 16px);
    padding: 22px 18px;
  }

  .modal-header h2 {
    font-size: 24px;
  }

  .form-footer {
    align-items: flex-end;
  }

  .form-footer > span {
    max-width: 150px;
  }

  .avatar-editor {
    align-items: flex-start;
  }

  .thread-modal {
    width: 100vw;
    height: 100svh;
    max-width: none;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .thread-toolbar {
    min-height: 58px;
    padding-inline: 12px;
  }

  .thread-content {
    height: calc(100% - 58px);
  }

  .thread-post {
    padding: 30px 18px 36px;
  }

  .thread-post h1 {
    font-size: 25px;
  }

  .thread-body {
    font-size: 16px;
  }

  .reply-section {
    padding: 26px 18px 34px;
  }

  .reply-item {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 10px;
  }

  .reply-composer {
    padding: 16px;
  }

  .toast {
    right: 18px;
    bottom: 18px;
  }
}
