@font-face {
  font-family: "UnifrakturMaguntia";
  src: url("/fonts/unifrakturmaguntia-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* =========================================================
   TYC // The Yew Cathedral — monochrome gothic terminal
   ========================================================= */

:root {
  --bg: #000000;
  --bg-soft: #050505;
  --bg-raised: #090909;
  --bg-hover: #111111;
  --line: #282828;
  --line-strong: #3c3c3c;
  --control-border: #6a6a6a;
  --text: #ededed;
  --text-soft: #bcbcbc;
  --muted: #8a8a8a;
  --dim: #7d7d7d;
  --faint: #626262;
  --white: #ffffff;
  --black: #000000;
  --font: "Cascadia Mono", "SFMono-Regular", "Consolas", "Liberation Mono", "Courier New", "Microsoft YaHei", "PingFang SC", monospace;
  --font-gothic: "UnifrakturMaguntia", "Old English Text MT", "Blackadder ITC", "Engravers MT", Georgia, serif;
  --shadow-hard: 7px 7px 0 #101010;
  --reading-scale: 1;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  border-radius: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  font-variant-ligatures: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03) 0,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px,
    transparent 4px
  );
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 42%, rgba(0, 0, 0, 0.62) 100%);
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

svg {
  display: block;
}

::selection {
  color: var(--black);
  background: var(--white);
}

:focus-visible {
  outline: 1px solid var(--white);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #030303;
  border-left: 1px solid #171717;
}

::-webkit-scrollbar-thumb {
  background: #303030;
  border: 2px solid #030303;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* ---------- 启动占位 ---------- */

.boot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 100dvh;
  overflow: hidden;
  color: var(--text);
  background: var(--bg);
}

.boot::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.6;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, #000 0, transparent 62%);
}

.boot-logo {
  width: 56px;
  height: 56px;
  animation: boot-pulse 1.4s steps(2, end) infinite;
}

.boot-logo .logo-glyph {
  font-size: 38px;
}

.boot-logo svg {
  width: 31px;
  height: 31px;
}

.boot-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.28em;
  margin-left: 0.28em;
}

.boot-name.brand-gothic {
  font-family: var(--font-gothic);
  font-size: 36px;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-left: 0.04em;
}

.boot-text {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.boot-text::after {
  content: "_";
  animation: blink 1s steps(1, end) infinite;
}

/* ---------- 通用元素 ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  line-height: 1;
}

.logo-mark {
  --logo-dot: #ffffff;
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  flex: none;
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--white);
}

.logo-mark svg {
  width: 21px;
  height: 21px;
}

.brand-name {
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.brand-name.brand-gothic {
  font-family: var(--font-gothic);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1;
}

.brand-name.brand-gothic::after {
  content: none;
}

.logo-glyph {
  color: var(--black);
  font-family: var(--font-gothic);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  transform: translateY(1px);
}

.brand-name::after {
  content: "_";
  color: var(--muted);
  animation: blink 1.5s steps(1, end) infinite;
}

.brand-tag {
  align-self: center;
  margin-left: 2px;
  padding: 3px 6px;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  background: transparent;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-on-dark {
  color: var(--text);
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow-muted {
  color: var(--text-soft);
}

.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  color: var(--text);
  background: #0a0a0a;
  border: 1px solid var(--control-border);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  user-select: none;
}

.avatar-md {
  width: 31px;
  height: 31px;
  font-size: 10px;
}

.avatar-0 { color: #ffffff; background: #0a0a0a; border-color: #7a7a7a; }
.avatar-1 { color: #e4e4e4; background: #141414; border-color: #555555; }
.avatar-2 { color: #ffffff; background: #080808; border-color: #8d8d8d; }
.avatar-3 { color: #d8d8d8; background: #181818; border-color: #666666; }
.avatar-4 { color: #ffffff; background: #0d0d0d; border-color: #707070; }
.avatar-5 { color: #dddddd; background: #101010; border-color: #4e4e4e; }
.avatar-6 { color: #ffffff; background: #060606; border-color: #858585; }
.avatar-7 { color: #e1e1e1; background: #1a1a1a; border-color: #616161; }

/* ---------- 登录 / 注册 ---------- */

.auth {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 28px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 18% 12%, rgba(255, 255, 255, 0.055), transparent 40%),
    #000;
}

.auth::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 55% 45%, #000 0, transparent 76%);
}

.auth::after {
  content: "01";
  position: absolute;
  right: -2vw;
  bottom: -13vh;
  z-index: 0;
  color: transparent;
  font-size: clamp(240px, 32vw, 520px);
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.12em;
  -webkit-text-stroke: 1px #171717;
  pointer-events: none;
  user-select: none;
}

.auth-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  width: min(1220px, 100%);
  height: min(780px, calc(100dvh - 56px));
  min-height: 600px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--bg-soft);
  box-shadow: 0 0 0 1px #000, 0 36px 120px rgba(0, 0, 0, 0.9);
  animation: shell-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-shell::before,
.auth-shell::after {
  content: "";
  position: absolute;
  z-index: 4;
  width: 26px;
  height: 26px;
  pointer-events: none;
}

.auth-shell::before {
  top: -1px;
  left: -1px;
  border-top: 1px solid var(--white);
  border-left: 1px solid var(--white);
}

.auth-shell::after {
  right: -1px;
  bottom: -1px;
  border-right: 1px solid var(--white);
  border-bottom: 1px solid var(--white);
}

.auth-story {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 32px 40px 28px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 28%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.018) 0, rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 28px),
    #030303;
}

.auth-story::after {
  content: "// LOCAL NODE / NO SIGNAL";
  position: absolute;
  top: 42%;
  right: -64px;
  transform: rotate(90deg);
  color: #3b3b3b;
  font-size: 8px;
  letter-spacing: 0.28em;
  white-space: nowrap;
  pointer-events: none;
}

.story-top,
.story-copy,
.story-foot {
  position: relative;
  z-index: 2;
}

.story-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.story-top::after {
  content: "[ LINK: LOCAL ]";
  color: var(--faint);
  font-size: 8px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.story-copy {
  max-width: 500px;
  margin-top: clamp(48px, 9vh, 94px);
}

.story-title {
  margin: 20px 0 0;
  color: var(--text);
  font-family: var(--font-gothic);
  font-size: clamp(64px, 6.6vw, 96px);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: 0.005em;
  text-shadow: 4px 4px 0 #141414;
}

.story-lead {
  max-width: 390px;
  margin: 24px 0 0;
  padding-left: 12px;
  color: var(--text-soft);
  border-left: 1px solid var(--line-strong);
  font-size: 13px;
  line-height: 1.9;
  letter-spacing: 0.02em;
}

.story-points {
  display: grid;
  gap: 0;
  max-width: 440px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.story-points li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid #202020;
}

.story-points li:last-child {
  border-bottom: 1px solid #202020;
}

.point-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  background: #000;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.story-points strong,
.story-points small {
  display: block;
}

.story-points strong {
  margin-bottom: 3px;
  color: #dedede;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.story-points small {
  color: var(--dim);
  font-size: 10.5px;
  letter-spacing: 0.03em;
}

.story-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: auto 0 0;
  padding-top: 14px;
  color: var(--dim);
  border-top: 1px dashed #303030;
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.story-dot {
  width: 5px;
  height: 5px;
  flex: none;
  background: var(--white);
  animation: blink 2.2s steps(1, end) infinite;
}

.story-orbit {
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.story-orbit-a {
  top: -170px;
  right: -220px;
  width: 520px;
  height: 520px;
  transform: rotate(45deg);
  border: 1px solid #171717;
  background:
    linear-gradient(#141414, #141414) center / 1px 100% no-repeat,
    linear-gradient(90deg, #141414, #141414) center / 100% 1px no-repeat;
}

.story-orbit-b {
  bottom: -220px;
  left: -180px;
  width: 380px;
  height: 380px;
  transform: rotate(12deg);
  border: 1px dashed #1e1e1e;
}

.auth-panel {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 34px;
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.015) 0, rgba(255, 255, 255, 0.015) 1px, transparent 1px, transparent 4px),
    #050505;
}

.auth-card {
  position: relative;
  width: min(372px, 100%);
  padding: 22px;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-top-color: var(--white);
  background: #030303;
  box-shadow: var(--shadow-hard);
}

.auth-card::before,
.auth-card::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 17px;
  height: 17px;
  pointer-events: none;
}

.auth-card::before {
  top: -1px;
  left: -1px;
  border-top: 1px solid var(--white);
  border-left: 1px solid var(--white);
}

.auth-card::after {
  right: -1px;
  bottom: -1px;
  border-right: 1px solid var(--white);
  border-bottom: 1px solid var(--white);
}

.panel-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -22px -22px 22px;
  padding: 10px 12px;
  color: var(--faint);
  border-bottom: 1px solid var(--line);
  background: #080808;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.panel-chrome span:last-child {
  color: var(--dim);
}

.mobile-brand {
  display: none;
  margin-bottom: 22px;
}

.auth-heading h2 {
  margin: 11px 0 0;
  color: var(--text);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.06em;
}

.auth-heading > p:last-child {
  margin: 9px 0 0;
  color: #909090;
  font-size: 11.5px;
  line-height: 1.7;
  letter-spacing: 0.02em;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 24px;
  border: 1px solid var(--line-strong);
  background: #000;
}

.tab {
  min-height: 40px;
  padding: 0 6px;
  color: var(--muted);
  border: 0;
  border-right: 1px solid var(--line-strong);
  background: transparent;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  transition: color 0.12s linear, background 0.12s linear;
}

.tab:last-child {
  border-right: 0;
}

.tab:hover {
  color: var(--white);
  background: var(--bg-hover);
}

.tab.is-active {
  color: var(--black);
  background: var(--white);
}

.auth-form {
  margin-top: 20px;
}

.field {
  margin-bottom: 16px;
}

.field-password {
  margin-bottom: 8px;
}

.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.field-head label {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.field-hint {
  color: #7d7d7d;
  font-size: 9.5px;
  letter-spacing: 0.06em;
}

.field-hint.is-hidden {
  visibility: hidden;
}

.field input {
  width: 100%;
  height: 47px;
  padding: 0 12px;
  color: var(--text);
  border: 1px solid var(--control-border);
  background: #000;
  font-family: var(--font);
  font-size: 13.5px;
  letter-spacing: 0.02em;
  transition: border-color 0.12s linear, background 0.12s linear;
}

.field input, .composer textarea { caret-color: var(--white); }

.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus,
.field input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px #000 inset;
  box-shadow: 0 0 0 1000px #000 inset;
  caret-color: var(--white);
}

.field input::placeholder {
  color: #7b7b7b;
  opacity: 1;
}

.field input:hover {
  border-color: #9a9a9a;
}

.field input:focus {
  border-color: var(--white);
  background: #050505;
  outline: none;
}

.field input:focus-visible {
  outline: 1px dashed var(--white);
  outline-offset: 3px;
}

.field.has-error input {
  border-color: var(--white);
  border-style: dashed;
  background: #0b0b0b;
  box-shadow: inset 3px 0 0 var(--white);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 66px;
}

.peek {
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  width: 55px;
  padding: 0;
  color: var(--dim);
  border: 0;
  border-left: 1px solid var(--line-strong);
  background: #050505;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  transition: color 0.12s linear, background 0.12s linear;
}

.peek:hover {
  color: var(--black);
  background: var(--white);
}

.peek:focus-visible {
  outline-offset: -4px;
}

.form-error {
  min-height: 18px;
  margin: 0 0 8px;
  color: var(--white);
  font-size: 10.5px;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.form-error:not(:empty)::before {
  content: "[ERR] ";
  color: var(--white);
  font-weight: 700;
}

.primary-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  padding: 0 12px;
  color: var(--black);
  border: 1px solid var(--white);
  background: var(--white);
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: color 0.12s linear, background 0.12s linear;
}

.primary-button::after {
  content: ">>";
  font-size: 10px;
  letter-spacing: 0;
}

.primary-button:hover:not(:disabled) {
  color: var(--white);
  background: var(--black);
}

.primary-button:active:not(:disabled) {
  transform: translate(1px, 1px);
}

.primary-button:disabled {
  color: var(--dim);
  border-color: var(--line-strong);
  background: #0a0a0a;
}

.primary-button:disabled::after {
  content: "";
}

.button-spinner {
  width: 12px;
  height: 12px;
  border: 1px solid var(--muted);
  border-top-color: var(--white);
  animation: spin 0.7s linear infinite;
}

.form-note {
  margin: 10px 0 0;
  color: var(--dim);
  font-size: 9.5px;
  line-height: 1.6;
  letter-spacing: 0.03em;
  text-align: center;
}

.switch-line {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-align: center;
}

.text-button {
  margin-left: 4px;
  padding: 3px 5px;
  color: var(--white);
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  transition: color 0.12s linear, background 0.12s linear;
}

.text-button:hover {
  color: var(--black);
  border-color: var(--white);
  background: var(--white);
}

.local-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 22px 0 0;
  padding-top: 13px;
  color: var(--dim);
  border-top: 1px dashed #2c2c2c;
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.local-dot {
  width: 5px;
  height: 5px;
  flex: none;
  background: var(--white);
  animation: blink 2.4s steps(1, end) infinite;
}

/* ---------- 聊天室整体 ---------- */

.chat {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 20px;
  overflow: hidden;
  background: #000;
  transition: opacity 2s ease;
}

.chat.is-passage-hidden {
  opacity: 0;
  pointer-events: none;
}

.chat::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.7;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at center, #000, transparent 78%);
}

.app-shell {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(1240px, 100%);
  height: min(820px, calc(100dvh - 40px));
  min-height: 480px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #000;
  box-shadow: 0 0 0 1px #000, 0 30px 100px rgba(0, 0, 0, 0.92);
  animation: shell-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.app-shell::before,
.app-shell::after {
  content: "";
  position: absolute;
  z-index: 5;
  width: 22px;
  height: 22px;
  pointer-events: none;
}

.app-shell::before {
  top: 0;
  left: 0;
  border-top: 1px solid var(--white);
  border-left: 1px solid var(--white);
}

.app-shell::after {
  right: 0;
  bottom: 0;
  border-right: 1px solid var(--white);
  border-bottom: 1px solid var(--white);
}

/* ---------- 侧边栏 ---------- */

.sidebar {
  display: flex;
  flex: 0 0 248px;
  flex-direction: column;
  width: 248px;
  padding: 20px 15px 15px;
  color: var(--text);
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 34%),
    #040404;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px;
}

.sidebar .brand-name.brand-gothic {
  font-size: 24px;
  letter-spacing: 0.03em;
}

.sidebar .logo-mark {
  width: 29px;
  height: 29px;
}

.sidebar .logo-mark svg {
  width: 19px;
  height: 19px;
}

.sidebar .brand-tag {
  margin-left: 0;
  border-color: #3a3a3a;
  color: #7a7a7a;
}

.room-section {
  margin-top: 32px;
}

.sidebar-label {
  margin: 0 6px 9px;
  color: #848484;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.room {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  color: var(--text-soft);
  border: 1px solid var(--line);
  background: #090909;
  text-align: left;
  transition: border-color 0.12s linear, background 0.12s linear;
}

.room:hover {
  border-color: #5f5f5f;
  background: #0d0d0d;
}

.room.is-active {
  color: var(--text);
  border-color: #777;
  background: #0d0d0d;
  box-shadow: inset 3px 0 0 var(--white);
}

.room-hash {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  color: var(--text-soft);
  border: 1px solid var(--line-strong);
  background: #000;
}

.room-hash svg {
  width: 16px;
  height: 16px;
}

.room-meta {
  min-width: 0;
}

.room-meta strong,
.room-meta small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-meta strong {
  margin-bottom: 3px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.room-meta small {
  color: #7d7d7d;
  font-size: 9.5px;
  letter-spacing: 0.02em;
}

.sidebar-spec {
  display: grid;
  gap: 5px;
  margin-top: 23px;
  padding-top: 11px;
  border-top: 1px dashed #242424;
}

.sidebar-spec p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  color: #7b7b7b;
  font-size: 8.5px;
  letter-spacing: 0.12em;
}

.sidebar-spec p span:last-child {
  color: #8a8a8a;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px dashed #282828;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 2px;
}

.user-card-meta {
  min-width: 0;
  flex: 1;
}

.user-card-meta strong,
.user-card-meta small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-card-meta strong {
  margin-bottom: 3px;
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.user-card-meta small {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #7d7d7d;
  font-size: 8.5px;
  letter-spacing: 0.12em;
}

.mini-dot {
  width: 4px;
  height: 4px;
  flex: none;
  background: var(--white);
  animation: blink 1.6s steps(1, end) infinite;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex: none;
  padding: 0;
  color: #777;
  border: 1px solid transparent;
  background: transparent;
  transition: color 0.12s linear, border-color 0.12s linear;
}

.icon-button:hover {
  color: var(--white);
  border-color: var(--line-strong);
}

.icon-button svg {
  width: 16px;
  height: 16px;
}

.sidebar :focus-visible {
  outline-color: var(--white);
}

/* ---------- 聊天主体 ---------- */

.chat-main {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #000;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex: none;
  min-height: 78px;
  padding: 15px 23px;
  border-bottom: 1px solid var(--line);
  background: #050505;
}

.chat-title-wrap {
  min-width: 0;
}

.chat-kicker {
  margin: 0 0 6px;
  color: #7c7c7c;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.chat-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-title-line h2 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.chat-title-line h2::before {
  content: ">";
  margin-right: 7px;
  color: #666;
  font-weight: 400;
}

.chat-title-wrap p {
  margin: 5px 0 0;
  color: #858585;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.online-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 6px 9px;
  color: #c8c8c8;
  border: 1px solid var(--line-strong);
  background: #000;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.pulse-dot {
  width: 5px;
  height: 5px;
  flex: none;
  background: var(--white);
  animation: blink 1.4s steps(1, end) infinite;
}

.connection-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: none;
  padding: 7px 14px;
  color: var(--black);
  border-bottom: 1px solid var(--white);
  background: var(--white);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.connection-spinner {
  width: 10px;
  height: 10px;
  border: 1px solid var(--black);
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
}

.message-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background-color: #000;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.033) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.033) 1px, transparent 1px);
  background-size: 44px 44px;
  scrollbar-color: #303030 #030303;
  scrollbar-width: thin;
}

.message-list {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 17px;
  width: 100%;
  max-width: 880px;
  min-height: 100%;
  margin: 0 auto;
  padding: 25px 28px 18px;
}

.message-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: auto;
  padding: 60px 0;
  color: var(--dim);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.loading-dots {
  display: flex;
  gap: 3px;
}

.loading-dots i {
  width: 4px;
  height: 4px;
  background: var(--white);
  animation: blink 1.2s steps(1, end) infinite;
}

.loading-dots i:nth-child(2) { animation-delay: 0.15s; }
.loading-dots i:nth-child(3) { animation-delay: 0.3s; }

.date-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 5px 0 3px;
  color: #7b7b7b;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
}

.date-divider::before,
.date-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #202020;
}

.message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 86%;
  animation: message-in 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.message.is-self {
  flex-direction: row-reverse;
  align-self: flex-end;
}

.message .avatar {
  margin-top: 19px;
}

.message-body {
  min-width: 0;
}

.message-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 2px 6px;
}

.message.is-self .message-meta {
  justify-content: flex-end;
}

.message-name {
  color: #d0d0d0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.message-time {
  color: #8a8a8a;
  font-size: 9px;
  letter-spacing: 0.04em;
}

.bubble {
  position: relative;
  padding: 10px 13px;
  color: #dedede;
  border: 1px solid #3a3a3a;
  border-left: 2px solid var(--white);
  background: #080808;
  font-size: calc(14px * var(--reading-scale));
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.message.is-self .bubble {
  color: var(--black);
  border-color: #e7e7e7;
  background: #e7e7e7;
  box-shadow: 4px 4px 0 #161616;
}

.message.is-self .avatar {
  color: var(--black);
  border-color: var(--white);
  background: var(--white);
}

.empty-state {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: auto;
  padding: 56px 24px;
  text-align: center;
}

.empty-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(#1b1b1b, #1b1b1b) center / 1px 100% no-repeat,
    linear-gradient(90deg, #1b1b1b, #1b1b1b) center / 100% 1px no-repeat,
    #040404;
  box-shadow: 5px 5px 0 #111;
}

.empty-mark svg {
  width: 23px;
  height: 23px;
}

.empty-state h3 {
  margin: 22px 0 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.empty-state p {
  max-width: 290px;
  margin: 8px 0 0;
  color: var(--dim);
  font-size: 11px;
  line-height: 1.8;
  letter-spacing: 0.02em;
}

.jump-latest {
  position: absolute;
  z-index: 4;
  bottom: calc(var(--composer-h, 133px) + 10px);
  left: 50%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  transform: translateX(-50%);
  color: var(--white);
  border: 1px solid var(--white);
  background: #000;
  box-shadow: 4px 4px 0 #191919;
  font-family: var(--font);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  animation: jump-in 0.2s linear both;
}

.jump-latest:hover {
  color: var(--black);
  background: var(--white);
}

.jump-latest svg {
  width: 12px;
  height: 12px;
}

/* ---------- 输入区 ---------- */

.composer-wrap {
  position: relative;
  flex: none;
  padding: 11px 23px 15px;
  border-top: 1px solid var(--line);
  background: #000;
}

.composer {
  max-width: 840px;
  margin: 0 auto;
}

.composer-box {
  padding: 9px 11px 8px;
  border: 1px solid var(--control-border);
  background: #050505;
  transition: border-color 0.12s linear, background 0.12s linear;
}

.composer-box:focus-within {
  border-color: var(--white);
  outline: 1px dashed var(--white);
  outline-offset: 2px;
  background: #070707;
}

.composer textarea {
  display: block;
  width: 100%;
  max-height: 132px;
  min-height: 24px;
  padding: 2px 3px 3px;
  color: var(--text);
  border: 0;
  outline: none;
  background: transparent;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  resize: none;
}

.composer textarea::placeholder {
  color: #7b7b7b;
  opacity: 1;
}

.composer textarea:focus-visible {
  outline: none;
}

.composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 5px;
}

.char-count {
  padding-left: 2px;
  color: #808080;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.char-count.is-near-limit {
  color: var(--white);
}

.send-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  color: var(--black);
  border: 1px solid var(--white);
  background: var(--white);
  font-family: var(--font);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.12s linear, background 0.12s linear;
}

.send-button svg {
  width: 13px;
  height: 13px;
}

.send-button:hover:not(:disabled) {
  color: var(--white);
  background: var(--black);
}

.send-button:active:not(:disabled) {
  transform: translate(1px, 1px);
}

.send-button:disabled {
  color: #5b5b5b;
  border-color: #343434;
  background: #0a0a0a;
}

.composer-tip {
  margin: 7px 0 0;
  color: #7a7a7a;
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

/* ---------- Toast / 无脚本 ---------- */

.toast {
  position: fixed;
  z-index: 100;
  top: 18px;
  left: 50%;
  max-width: min(380px, calc(100vw - 32px));
  padding: 9px 14px;
  transform: translateX(-50%);
  color: var(--black);
  border: 1px solid var(--white);
  background: var(--white);
  box-shadow: 5px 5px 0 #1c1c1c;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.03em;
  text-align: center;
  pointer-events: none;
  animation: toast-in 0.2s linear both;
}

.noscript {
  position: fixed;
  z-index: 10010;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  color: var(--white);
  border: 1px solid var(--line-strong);
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 4px),
    #000;
  font-size: 13px;
  line-height: 2;
  letter-spacing: 0.08em;
  text-align: center;
}

/* ---------- 动效 ---------- */

@keyframes shell-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes message-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes jump-in {
  from { opacity: 0; transform: translate(-50%, 4px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, -4px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes boot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.42; }
}

@keyframes blink {
  0%, 44% { opacity: 1; }
  45%, 100% { opacity: 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- 响应式 ---------- */

@media (max-width: 1120px) {
  .auth-story {
    padding: 30px 32px 26px;
  }

  .story-title {
    font-size: clamp(54px, 6.2vw, 78px);
  }

  .auth-panel {
    padding: 28px;
  }

  .sidebar {
    flex-basis: 228px;
    width: 228px;
  }

  .app-shell {
    height: calc(100dvh - 32px);
  }

  .chat {
    padding: 16px;
  }
}

@media (max-width: 900px) {
  .auth {
    padding: 16px;
  }

  .auth::after {
    font-size: 54vw;
    bottom: -6vh;
  }

  .auth-shell {
    display: block;
    width: min(440px, 100%);
    height: auto;
    min-height: 0;
    border-color: var(--line-strong);
  }

  .auth-story {
    display: none;
  }

  .auth-panel {
    padding: 22px 18px;
    background: #040404;
  }

  .auth-card {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .auth-card::before,
  .auth-card::after {
    display: none;
  }

  .panel-chrome {
    margin: 0 0 22px;
    padding: 0 0 10px;
    background: transparent;
  }

  .mobile-brand {
    display: inline-flex;
    margin-bottom: 23px;
  }

  .chat {
    display: block;
    padding: 0;
    background: #000;
  }

  .chat::before {
    display: none;
  }

  .app-shell {
    flex-direction: column;
    width: 100%;
    height: 100dvh;
    min-height: 0;
    border: 0;
    box-shadow: none;
  }

  .app-shell::before,
  .app-shell::after {
    display: none;
  }

  .sidebar {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    width: 100%;
    padding: 10px 13px;
    padding-top: calc(10px + env(safe-area-inset-top));
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: #040404;
  }

  .sidebar-brand {
    flex: 1;
    gap: 8px;
    padding: 0;
  }

  .sidebar .brand-tag {
    display: none;
  }

  .room-section,
  .sidebar-spec {
    display: none;
  }

  .sidebar-footer {
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
  }

  .user-card {
    gap: 8px;
    padding: 0;
  }

  .user-card-meta {
    display: none;
  }

  .logout-button {
    width: 33px;
    height: 33px;
  }

  .chat-main {
    flex: 1;
    min-height: 0;
  }

  .chat-header {
    min-height: 61px;
    padding: 9px 13px;
  }

  .chat-kicker {
    display: none;
  }

  .chat-title-wrap p {
    display: none;
  }

  .chat-title-line h2 {
    font-size: 14px;
  }

  .online-pill {
    padding: 5px 7px;
    font-size: 8.5px;
  }

  .message-scroll {
    background-size: 32px 32px;
  }

  .message-list {
    gap: 14px;
    padding: 16px 13px 11px;
  }

  .message {
    max-width: 94%;
  }

  .message .avatar {
    width: 27px;
    height: 27px;
    margin-top: 17px;
    font-size: 9px;
  }

  .bubble {
    padding: 9px 11px;
    font-size: calc(13.5px * var(--reading-scale));
    line-height: 1.65;
  }

  .empty-state {
    padding: 38px 20px;
  }

  .empty-mark {
    width: 50px;
    height: 50px;
  }

  .composer-wrap {
    padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
  }

  .composer-box {
    padding: 8px 9px 7px;
  }

  .composer textarea {
    font-size: 16px;
    line-height: 1.5;
  }

  .send-button {
    height: 38px;
    font-size: 9px;
  }

  .composer-tip {
    display: none;
  }

  .jump-latest {
    bottom: calc(var(--composer-h, 105px) + 10px);
  }

  .toast {
    top: calc(10px + env(safe-area-inset-top));
  }

  body.chat-active .toast {
    top: calc(68px + env(safe-area-inset-top));
  }
}

@media (max-width: 480px) {
  .auth {
    padding: 0;
    align-items: stretch;
    background: #000;
  }

  .auth::before,
  .auth::after {
    display: none;
  }

  .auth-shell {
    width: 100%;
    min-height: 100dvh;
    border: 0;
    box-shadow: none;
  }

  .auth-shell::before,
  .auth-shell::after {
    display: none;
  }

  .auth-panel {
    min-height: 100dvh;
    padding: 30px 20px;
    align-content: center;
  }

  .mobile-brand {
    margin-bottom: 26px;
  }

  .auth-heading h2 {
    font-size: 25px;
  }

  .tabs {
    margin-top: 22px;
  }

  .local-note {
    margin-top: 24px;
  }
}

@media (max-height: 720px) and (min-width: 901px) {
  .auth-shell {
    height: calc(100dvh - 32px);
    min-height: 540px;
  }

  .auth-story {
    padding: 24px 34px 22px;
  }

  .story-copy {
    margin-top: 34px;
  }

  .story-title {
    margin-top: 13px;
    font-size: clamp(46px, 5.2vw, 64px);
  }

  .story-lead {
    margin-top: 16px;
    font-size: 11.5px;
  }

  .story-points {
    margin-top: 22px;
  }

  .story-points li {
    padding: 9px 0;
  }

  .story-foot {
    padding-top: 11px;
  }

  .auth-panel {
    padding: 22px;
  }

  .auth-card {
    padding: 18px;
  }

  .panel-chrome {
    margin: -18px -18px 18px;
  }

  .chat {
    padding: 10px;
  }

  .app-shell {
    height: calc(100dvh - 20px);
  }
}

@media (max-height: 620px) and (max-width: 900px) {
  .chat-header {
    min-height: 52px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .sidebar {
    padding-top: calc(7px + env(safe-area-inset-top));
    padding-bottom: 7px;
  }

  .empty-state {
    padding: 20px;
  }

  .empty-mark {
    width: 42px;
    height: 42px;
  }

  .empty-state h3 {
    margin-top: 13px;
    font-size: 13px;
  }
}

/* ---------- 低高度窗口：压缩登录控制台 ---------- */

@media (max-height: 680px) {
  .auth {
    padding: 12px;
    overflow-y: auto;
  }

  .auth::after {
    display: none;
  }

  .auth-shell {
    height: calc(100dvh - 24px);
    min-height: 0;
  }

  .auth-story {
    padding: 22px 30px 18px;
  }

  .story-copy {
    margin-top: 20px;
  }

  .story-title {
    margin-top: 12px;
    font-size: clamp(38px, 4.9vw, 56px);
  }

  .story-lead {
    margin-top: 12px;
    font-size: 11px;
    line-height: 1.75;
  }

  .story-points {
    margin-top: 16px;
  }

  .story-points li {
    padding: 7px 0;
  }

  .story-foot {
    padding-top: 8px;
    font-size: 8px;
  }

  .auth-panel {
    padding: 16px;
  }

  .auth-card {
    padding: 16px;
  }

  .panel-chrome {
    margin: -16px -16px 14px;
    padding: 8px 10px;
  }

  .auth-heading h2 {
    margin-top: 6px;
    font-size: 24px;
  }

  .auth-heading > p:last-child {
    margin-top: 5px;
    font-size: 10.5px;
  }

  .tabs {
    margin-top: 14px;
  }

  .tab {
    min-height: 34px;
    font-size: 9.5px;
  }

  .auth-form {
    margin-top: 12px;
  }

  .field {
    margin-bottom: 9px;
  }

  .field-password {
    margin-bottom: 4px;
  }

  .field-head {
    margin-bottom: 4px;
  }

  .field input {
    height: 38px;
    font-size: 12.5px;
  }

  .field-hint {
    font-size: 8.5px;
  }

  .form-error {
    min-height: 14px;
    margin-bottom: 4px;
    font-size: 9px;
  }

  .primary-button {
    height: 40px;
    font-size: 10px;
  }

  .form-note {
    display: none;
  }

  .switch-line {
    margin-top: 10px;
    font-size: 9px;
  }

  .local-note {
    margin-top: 10px;
    padding-top: 8px;
    font-size: 7.5px;
  }

  .mobile-brand {
    margin-bottom: 12px;
  }
}

/* ---------- 手机横屏 / 极低窗口：允许登录控制台纵向滚动 ---------- */

@media (max-height: 680px) and (max-width: 900px) {
  .auth {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 12px 16px calc(24px + env(safe-area-inset-bottom));
  }

  .auth-shell {
    width: min(440px, 100%);
    height: auto;
    min-height: 0;
    border: 1px solid var(--line-strong);
    box-shadow: none;
  }

  .auth-panel {
    min-height: 0;
    padding: 18px;
    align-content: start;
  }
}

@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;
  }
}


/* ---------- 功能扩展：回复、状态、通知、置顶、输入中 ---------- */

.chat-header-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.notify-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 8px;
  color: #888;
  border: 1px solid var(--line-strong);
  background: #000;
  font-family: var(--font);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.12s linear, background 0.12s linear, border-color 0.12s linear;
}

.notify-button:hover {
  color: var(--white);
  border-color: var(--white);
}

.notify-button[aria-pressed="true"] {
  color: var(--black);
  border-color: var(--white);
  background: var(--white);
}

.notify-dot {
  width: 5px;
  height: 5px;
  flex: none;
  background: #777;
}

.notify-button[aria-pressed="true"] .notify-dot {
  background: var(--black);
}

.pinned-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 7px 23px;
  color: #aaa;
  border-bottom: 1px solid var(--line);
  background: #080808;
  font-size: 9px;
}

.pin-mark {
  flex: none;
  padding: 2px 4px;
  color: var(--white);
  border: 1px solid var(--line-strong);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.pin-body {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: baseline;
  gap: 6px;
  overflow: hidden;
  padding: 0;
  border: 0;
  color: #999;
  background: transparent;
  font-family: var(--font);
  font-size: 9.5px;
  text-align: left;
  white-space: nowrap;
}

.pin-body:hover {
  color: var(--white);
}

.pin-author {
  flex: none;
  color: var(--white);
  font-weight: 600;
}

.pin-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pin-clear {
  flex: none;
  padding: 2px 6px;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  background: transparent;
  font-family: var(--font);
  font-size: 7.5px;
  letter-spacing: 0.04em;
}

.pin-clear:hover {
  color: var(--black);
  background: var(--white);
}

/* 消息动作 */
.message-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 3px;
  opacity: 0.55;
  pointer-events: auto;
  transition: opacity 0.12s linear;
}

.message:hover .message-actions,
.message:focus-within .message-actions {
  opacity: 1;
  pointer-events: auto;
}

.msg-action {
  padding: 0;
  color: var(--dim);
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  font-family: var(--font);
  font-size: 7.5px;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.msg-action:hover {
  color: var(--white);
  border-bottom-color: var(--white);
}

.msg-action.is-danger:hover {
  color: var(--white);
  background: var(--white);
  color: var(--black);
}

.message-status {
  color: #777;
  font-size: 7.5px;
  letter-spacing: 0.08em;
}

.message-status.is-sending {
  color: #aaa;
}

.message-status.is-failed {
  color: var(--white);
  border-bottom: 1px dashed var(--white);
}

.retry-button {
  margin-left: 4px;
  padding: 1px 4px;
  color: var(--white);
  border: 1px solid var(--white);
  background: transparent;
  font-family: var(--font);
  font-size: 7.5px;
  letter-spacing: 0.06em;
}

.retry-button:hover {
  color: var(--black);
  background: var(--white);
}

.message.is-pending .bubble {
  opacity: 0.7;
  border-style: dashed;
}

.message.is-failed .bubble {
  border-style: dashed;
  border-color: var(--white);
}

.message.is-deleted .bubble {
  color: #666 !important;
  border-color: #2a2a2a !important;
  border-left-color: #2a2a2a !important;
  background: #050505 !important;
  box-shadow: none !important;
  font-style: italic;
}

.message.is-deleted .message-actions {
  display: none;
}

.deleted-note {
  color: #666;
  font-style: italic;
}

/* 回复引用 */
.reply-quote {
  display: block;
  margin: 0 0 7px;
  padding: 3px 7px;
  overflow: hidden;
  color: inherit;
  border-left: 2px solid currentColor;
  background: rgba(255, 255, 255, 0.06);
  font-size: 10.5px;
  line-height: 1.5;
  opacity: 0.8;
  text-overflow: ellipsis;
}

.message.is-self .reply-quote {
  background: rgba(0, 0, 0, 0.07);
}

.reply-quote-user {
  font-weight: 700;
}

.reply-quote-text {
  margin-left: 5px;
  overflow-wrap: anywhere;
}

/* @提及 */
.mention {
  padding: 0 3px;
  color: var(--black);
  background: var(--white);
  font-weight: 600;
}

.message.is-self .mention {
  color: var(--white);
  background: var(--black);
}

/* 正在输入 / 回复预览 */
.typing-indicator {
  width: 100%;
  max-width: 840px;
  min-height: 0;
  margin: 0 auto 5px;
  color: #7d7d7d;
  font-size: 8.5px;
  letter-spacing: 0.06em;
}

.typing-indicator:not(:empty) {
  min-height: 12px;
}

.typing-indicator:not(:empty)::before {
  content: "> ";
  color: var(--white);
}

.reply-preview {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  max-width: 840px;
  margin: 0 auto 6px;
  padding: 5px 8px;
  color: #999;
  border: 1px solid #333;
  border-left: 2px solid var(--white);
  background: #0a0a0a;
  font-size: 9px;
}

.reply-preview-mark {
  flex: none;
  color: var(--white);
  font-size: 12px;
}

.reply-preview-author {
  flex: none;
  color: var(--white);
  font-weight: 600;
}

.reply-preview-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reply-cancel {
  flex: none;
  padding: 0 2px;
  color: var(--dim);
  border: 0;
  background: transparent;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1;
}

.reply-cancel:hover {
  color: var(--white);
}

@media (hover: none), (max-width: 900px) {
  .message-actions {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 900px) {
  .chat-header-actions {
    gap: 5px;
  }

  .notify-button {
    min-height: 24px;
    padding: 0 6px;
    font-size: 7px;
  }

  .pinned-banner {
    gap: 6px;
    padding: 6px 13px;
    font-size: 8px;
  }

  .pin-mark {
    font-size: 7px;
    padding: 1px 3px;
  }

  .pin-body {
    font-size: 8.5px;
  }

  .pin-clear {
    font-size: 7px;
    padding: 1px 4px;
  }

  .message-actions {
    gap: 5px;
  }

  .msg-action {
    font-size: 8px;
  }

  .typing-indicator,
  .reply-preview {
    max-width: none;
  }

  .typing-indicator {
    font-size: 8px;
  }

  .reply-preview {
    font-size: 8.5px;
  }
}

/* ---------- 扩展状态细节 ---------- */

.mention.is-me {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.message.is-highlight {
  outline: 1px dashed var(--white);
  outline-offset: 4px;
}

.msg-action.is-danger:hover {
  color: var(--black);
  background: var(--white);
  border-bottom-color: var(--white);
}

@media (max-width: 480px) {
  .notify-label {
    display: none;
  }

  .notify-button {
    min-width: 24px;
    padding: 0 6px;
  }

  .pin-mark {
    display: none;
  }

  .message-meta {
    flex-wrap: wrap;
  }
}

@media (max-width: 900px) {
  body.chat-active .toast {
    top: calc(126px + env(safe-area-inset-top));
  }
}

.notify-icon {
  width: 11px;
  height: 11px;
  flex: none;
}

/* ---------- 印记头像 ---------- */

.avatar .sigil {
  display: block;
  width: 20px;
  height: 20px;
  overflow: visible;
}

.avatar-md .sigil {
  width: 19px;
  height: 19px;
}

/* ---------- 终端 / TERMINAL ---------- */

body.console-open {
  overflow: hidden;
}

.ritual-trigger {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  padding: 0;
  color: #8a8a8a;
  border: 1px solid var(--line-strong);
  background: #000;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  transition: color 0.12s linear, background 0.12s linear, border-color 0.12s linear;
}

.ritual-trigger:hover {
  color: var(--black);
  border-color: var(--white);
  background: var(--white);
}

.composer-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ritual-console {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(2px);
}

.ritual-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(860px, 100%);
  min-height: 300px;
  max-height: min(72vh, 600px);
  overflow: hidden;
  border: 1px solid var(--white);
  background: #040404;
  box-shadow: 0 0 0 1px #000, 0 24px 80px rgba(0, 0, 0, 0.9);
  animation: ritual-rise 0.18s ease-out;
}

.ritual-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(255, 255, 255, 0.035) 4px
  );
}

.ritual-head {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  padding: 9px 12px;
  color: #9a9a9a;
  border-bottom: 1px solid var(--line-strong);
  background: #080808;
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ritual-title {
  color: var(--white);
  font-weight: 700;
}

.ritual-path {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ritual-close {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  padding: 0;
  color: #8a8a8a;
  border: 1px solid #333;
  background: transparent;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1;
}

.ritual-close:hover {
  color: var(--black);
  border-color: var(--white);
  background: var(--white);
}

.ritual-log {
  position: relative;
  z-index: 5;
  flex: 1;
  min-height: 160px;
  overflow: auto;
  padding: 12px 14px;
  color: #b8b8b8;
  background: #030303;
  font-size: 11px;
  line-height: 1.7;
  scrollbar-gutter: stable;
}

.ritual-line {
  margin: 0 0 1px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ritual-line.is-command {
  color: var(--white);
  font-weight: 600;
}

.ritual-line.is-command::before {
  content: "> ";
  color: #777;
}

.ritual-line.is-head {
  margin-top: 8px;
  color: var(--white);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ritual-line.is-dim {
  color: #707070;
}

.ritual-line.is-error {
  padding-left: 7px;
  color: var(--white);
  border-left: 2px solid var(--white);
}

.ritual-line.is-error::before {
  content: "[!] ";
}

.ritual-sigil {
  margin: 6px 0 9px;
  overflow-x: auto;
  color: var(--white);
  font-family: var(--font);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0;
  white-space: pre;
}

.ritual-form {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 10px 12px;
  border-top: 1px solid var(--line-strong);
  background: #060606;
}

.ritual-caret {
  flex: none;
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
}

.ritual-form input {
  flex: 1;
  min-width: 0;
  padding: 2px 0;
  color: var(--text);
  border: 0;
  outline: none;
  background: transparent;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.5;
}

.ritual-form input::placeholder {
  color: #5e5e5e;
  opacity: 1;
}

.ritual-hint {
  flex: none;
  max-width: 46%;
  overflow: hidden;
  color: #777;
  font-size: 8px;
  letter-spacing: 0.03em;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ritual-hint:empty {
  display: none;
}

.ritual-foot {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
  padding: 6px 12px 7px;
  color: #5f5f5f;
  border-top: 1px solid #161616;
  background: #030303;
  font-size: 7.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes ritual-rise {
  from {
    opacity: 0.65;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ritual-panel {
    animation: none;
  }
}

@media (max-width: 700px) {
  .ritual-console {
    padding: 0;
  }

  .ritual-panel {
    width: 100%;
    max-height: 82vh;
    min-height: 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
  }

  .ritual-log {
    min-height: 150px;
    padding: 11px 12px;
    font-size: 10.5px;
  }

  .ritual-form {
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  }

  .ritual-form input {
    font-size: 16px;
  }

  .ritual-hint {
    display: none;
  }

  .ritual-foot {
    gap: 9px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
  }

  .ritual-trigger {
    width: 38px;
    height: 38px;
    font-size: 15px;
  }

  .avatar .sigil {
    width: 16px;
    height: 16px;
  }

  .avatar-md .sigil {
    width: 18px;
    height: 18px;
  }
}

/* ---------- 密封信 / 物品栏 / 秘密投递 ---------- */

.inventory-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 26px;
  padding: 0 7px;
  color: #888;
  border: 1px solid var(--line-strong);
  background: #000;
  font-family: var(--font);
  transition: color 0.12s linear, background 0.12s linear, border-color 0.12s linear;
}

.inventory-button:hover {
  color: var(--white);
  border-color: var(--white);
}

.inventory-button[aria-pressed="true"] {
  color: var(--black);
  border-color: var(--white);
  background: var(--white);
}

.inventory-icon {
  width: 12px;
  height: 12px;
}

.inventory-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  place-items: center;
  min-width: 13px;
  height: 13px;
  padding: 0 3px;
  color: var(--black);
  border: 1px solid var(--black);
  background: var(--white);
  font-size: 7px;
  font-weight: 700;
  line-height: 1;
}

.inventory-scrim {
  position: fixed;
  inset: 0;
  z-index: 108;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(1px);
}

.inventory-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 109;
  display: flex;
  flex-direction: column;
  width: min(340px, 88vw);
  border-left: 1px solid var(--white);
  background: #040404;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.85);
}

.inventory-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex: none;
  padding: 16px 14px 13px;
  border-bottom: 1px solid var(--line-strong);
  background: #080808;
}

.inventory-kicker {
  margin: 0 0 4px;
  color: #777;
  font-size: 8px;
  letter-spacing: 0.12em;
}

.inventory-head h3 {
  margin: 0;
  color: var(--white);
  font-size: 18px;
  letter-spacing: 0.05em;
}

.inventory-close {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  padding: 0;
  color: #888;
  border: 1px solid #333;
  background: transparent;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1;
}

.inventory-close:hover {
  color: var(--black);
  border-color: var(--white);
  background: var(--white);
}

.inventory-note {
  margin: 0;
  flex: none;
  padding: 10px 14px;
  color: #777;
  border-bottom: 1px solid #1c1c1c;
  font-size: 9px;
  line-height: 1.6;
}

.inventory-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 10px 12px;
}

.inventory-empty {
  margin: 0;
  padding: 22px 16px;
  color: #666;
  font-size: 9.5px;
  line-height: 1.7;
  text-align: center;
}

.inventory-item {
  display: flex;
  align-items: stretch;
  margin-bottom: 8px;
  border: 1px solid #2b2b2b;
  background: #080808;
}

.inventory-item.is-unlocked {
  border-color: #555;
}

.inventory-jump {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
  padding: 9px 8px;
  color: inherit;
  border: 0;
  background: transparent;
  text-align: left;
}

.inventory-jump:hover {
  background: #101010;
}

.inventory-seal {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  color: #ccc;
  border: 1px solid #444;
  background: #050505;
}

.inventory-seal svg {
  width: 15px;
  height: 15px;
}

.inventory-item.is-unlocked .inventory-seal {
  color: var(--black);
  border-color: var(--white);
  background: var(--white);
}

.inventory-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  font-size: 8.5px;
  line-height: 1.45;
}

.inventory-copy strong {
  overflow: hidden;
  color: var(--white);
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-copy small {
  color: #777;
  font-size: 8px;
}

.inventory-countdown {
  color: #aaa;
  font-size: 8.5px;
  font-variant-numeric: tabular-nums;
}

.inventory-item.is-unlocked .inventory-countdown {
  color: var(--white);
}

.inventory-remove {
  width: 26px;
  flex: none;
  padding: 0;
  color: #555;
  border: 0;
  border-left: 1px solid #222;
  background: transparent;
  font-family: var(--font);
  font-size: 15px;
}

.inventory-remove:hover {
  color: var(--white);
  background: #171717;
}

.inventory-foot {
  display: flex;
  justify-content: space-between;
  flex: none;
  padding: 8px 14px calc(9px + env(safe-area-inset-bottom));
  color: #555;
  border-top: 1px solid #1c1c1c;
  font-size: 8px;
  letter-spacing: 0.08em;
}

/* 密封信卡片 */
.message.is-locked .bubble {
  display: none;
}

.sealed-letter {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(390px, 100%);
  margin: 0;
  padding: 10px;
  border: 1px solid #4f4f4f;
  background: #070707;
}

.message.is-self .sealed-letter {
  border-color: #8a8a8a;
}

.sealed-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  color: var(--white);
  border: 1px solid var(--white);
  background: #000;
}

.sealed-mark svg {
  width: 21px;
  height: 21px;
}

.sealed-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.sealed-kicker {
  color: #8d8d8d;
  font-size: 7.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sealed-title {
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
}

.sealed-note {
  color: #777;
  font-size: 8.5px;
  line-height: 1.45;
}

.seal-clock {
  color: var(--white);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.sealed-unlock-at {
  color: #666;
  font-size: 8px;
}

.sealed-collect {
  flex: none;
  align-self: flex-end;
  padding: 3px 6px;
  color: #aaa;
  border: 1px solid #474747;
  background: #000;
  font-family: var(--font);
  font-size: 7.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.sealed-collect:hover,
.sealed-collect.is-collected {
  color: var(--black);
  border-color: var(--white);
  background: var(--white);
}

.sealed-stamp {
  display: inline-block;
  margin: 0 0 5px;
  padding: 2px 5px;
  color: #999;
  border: 1px solid #333;
  font-size: 7px;
  letter-spacing: 0.1em;
  line-height: 1.3;
}

.message.is-self .sealed-stamp {
  color: #fff;
  border-color: #666;
}

/* 密封信表单 */
.secret-modal {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(3px);
}

.secret-panel {
  width: min(560px, 100%);
  max-height: min(92vh, 760px);
  overflow: auto;
  border: 1px solid var(--white);
  background: #050505;
  box-shadow: 0 0 0 1px #000, 0 30px 100px rgba(0, 0, 0, 0.95);
}

.secret-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 13px;
  color: #888;
  border-bottom: 1px solid var(--line-strong);
  background: #080808;
  font-size: 8px;
  letter-spacing: 0.1em;
}

.secret-head-kicker {
  color: var(--white);
  font-weight: 700;
}

.secret-close {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  padding: 0;
  color: #888;
  border: 1px solid #333;
  background: transparent;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1;
}

.secret-close:hover {
  color: var(--black);
  border-color: var(--white);
  background: var(--white);
}

.secret-form {
  padding: 17px 16px 16px;
}

.secret-intro {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 18px;
}

.secret-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  color: var(--black);
  background: var(--white);
}

.secret-mark svg {
  width: 21px;
  height: 21px;
}

.secret-intro h3 {
  margin: 0 0 4px;
  color: var(--white);
  font-size: 20px;
  letter-spacing: 0.03em;
}

.secret-intro p {
  margin: 0;
  color: #888;
  font-size: 9.5px;
  line-height: 1.65;
}

.secret-label {
  display: block;
  margin-bottom: 6px;
  color: #aaa;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.secret-form textarea {
  display: block;
  width: 100%;
  min-height: 108px;
  padding: 10px;
  color: var(--text);
  border: 1px solid var(--control-border);
  outline: none;
  background: #030303;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.65;
  resize: vertical;
}

.secret-form textarea:focus {
  border-color: var(--white);
  outline: 1px dashed var(--white);
  outline-offset: 2px;
}

.secret-form textarea::placeholder {
  color: #666;
  opacity: 1;
}

.secret-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 5px 0 17px;
  color: #666;
  font-size: 8px;
  letter-spacing: 0.03em;
}

.secret-duration {
  margin: 0;
  padding: 0;
  border: 0;
}

.secret-duration legend {
  margin-bottom: 7px;
  padding: 0;
  color: #aaa;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.secret-durations {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.secret-durations label {
  position: relative;
}

.secret-durations input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.secret-durations span {
  display: block;
  padding: 8px 4px;
  color: #888;
  border: 1px solid #333;
  background: #080808;
  font-size: 9px;
  text-align: center;
  white-space: nowrap;
}

.secret-durations label:hover span {
  color: var(--white);
  border-color: #777;
}

.secret-durations input:checked + span {
  color: var(--black);
  border-color: var(--white);
  background: var(--white);
}

.secret-durations input:focus-visible + span {
  outline: 1px dashed var(--white);
  outline-offset: 2px;
}

.secret-unlock-preview {
  min-height: 14px;
  margin: 9px 0 0;
  color: #777;
  font-size: 8.5px;
}

.secret-error {
  min-height: 14px;
  margin: 4px 0 0;
  color: var(--white);
  font-size: 9px;
}

.secret-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.secret-cancel,
.secret-submit {
  min-width: 78px;
  height: 34px;
  padding: 0 12px;
  font-family: var(--font);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.secret-cancel {
  color: #999;
  border: 1px solid #444;
  background: transparent;
}

.secret-cancel:hover {
  color: var(--white);
  border-color: var(--white);
}

.secret-submit {
  color: var(--black);
  border: 1px solid var(--white);
  background: var(--white);
}

.secret-submit:hover:not(:disabled) {
  color: var(--white);
  background: #000;
}

.secret-submit:disabled {
  color: #555;
  border-color: #333;
  background: #0a0a0a;
}

body.inventory-open,
body.secret-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .inventory-button {
    min-width: 24px;
    height: 24px;
    padding: 0 5px;
  }

  .inventory-icon {
    width: 11px;
    height: 11px;
  }

  .inventory-drawer {
    width: min(320px, 88vw);
  }

  .secret-modal {
    padding: 10px;
  }

  .secret-durations {
    grid-template-columns: repeat(2, 1fr);
  }

  .secret-form textarea {
    font-size: 16px;
  }

  .sealed-letter {
    width: min(360px, 100%);
  }

  .sealed-note {
    font-size: 8px;
  }

  .sealed-collect {
    align-self: center;
  }
}

/* ---------- 静默 / QUIET ---------- */

.vigil-banner {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
  padding: 7px 23px;
  color: #9a9a9a;
  border-bottom: 1px solid #303030;
  background: #020202;
  font-size: 9px;
}

.quiet-mark {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--white);
}

.quiet-mark svg {
  width: 16px;
  height: 16px;
}

.vigil-title {
  flex: none;
  color: var(--white);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.vigil-copy {
  min-width: 0;
  overflow: hidden;
  color: #777;
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vigil-timer {
  color: var(--white);
  font-variant-numeric: tabular-nums;
}

.chat-main.is-vigil .message-scroll {
  background: #010101;
  transition: background 0.6s linear;
}

.chat-main.is-vigil .message-list {
  opacity: 0.82;
  transition: opacity 0.6s linear;
}

.chat-main.is-vigil .composer-wrap {
  background: #020202;
}

.vigil-marker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  color: #666;
  font-size: 8px;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.vigil-marker::before,
.vigil-marker::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #252525;
}

@media (max-width: 900px) {
  .vigil-banner {
    gap: 7px;
    padding: 6px 13px;
    font-size: 8px;
  }

  .quiet-mark {
    width: 15px;
    height: 15px;
  }

  .quiet-mark svg {
    width: 14px;
    height: 14px;
  }

  .vigil-title {
    font-size: 7.5px;
  }

  .vigil-copy {
    font-size: 8px;
  }
}

/* ---------- 每日信号 / DAILY SIGNAL ---------- */

.arcana-section {
  margin-top: 26px;
}

.arcana-card {
  display: block;
  width: 100%;
  padding: 10px;
  color: var(--text);
  border: 1px solid var(--line);
  background: #080808;
  text-align: left;
  transition: border-color 0.12s linear, background 0.12s linear;
}

.arcana-card:hover {
  border-color: #6d6d6d;
  background: #0c0c0c;
}

.arcana-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #777;
  font-size: 8px;
  letter-spacing: 0.12em;
}

.arcana-numeral {
  color: var(--white);
  font-weight: 700;
}

.arcana-date {
  font-variant-numeric: tabular-nums;
}

.arcana-name {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arcana-zh {
  display: block;
  margin-top: 2px;
  color: #929292;
  font-size: 8.5px;
}

.arcana-art {
  min-height: 66px;
  margin: 8px 0 6px;
  overflow: hidden;
  color: #d7d7d7;
  font-family: var(--font);
  font-size: 9px;
  line-height: 1.15;
  text-align: center;
  white-space: pre;
}

.arcana-prompt {
  display: block;
  padding-top: 6px;
  overflow: hidden;
  color: #777;
  border-top: 1px dashed #252525;
  font-size: 8px;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arcana-trigger {
  display: grid;
  place-items: center;
  width: 30px;
  height: 26px;
  flex: none;
  padding: 0;
  color: #8a8a8a;
  border: 1px solid var(--line-strong);
  background: #000;
}

.arcana-trigger:hover {
  color: var(--black);
  border-color: var(--white);
  background: var(--white);
}

.arcana-trigger svg {
  width: 13px;
  height: 13px;
}

.arcana-modal {
  position: fixed;
  inset: 0;
  z-index: 135;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(3px);
}

.arcana-panel {
  width: min(430px, 100%);
  max-height: 92vh;
  overflow: auto;
  border: 1px solid var(--white);
  background: #050505;
  box-shadow: 0 0 0 1px #000, 0 30px 100px rgba(0, 0, 0, 0.95);
  animation: ritual-rise 0.18s ease-out;
}

.arcana-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  color: #888;
  border-bottom: 1px solid var(--line-strong);
  background: #080808;
  font-size: 8px;
  letter-spacing: 0.1em;
}

.arcana-head > span:first-child {
  flex: 1;
  color: var(--white);
  font-weight: 700;
}

.arcana-close {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  padding: 0;
  color: #888;
  border: 1px solid #333;
  background: transparent;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1;
}

.arcana-close:hover {
  color: var(--black);
  border-color: var(--white);
  background: var(--white);
}

.arcana-modal-body {
  padding: 19px 20px 17px;
  text-align: center;
}

.arcana-seal-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #777;
  font-size: 8px;
  letter-spacing: 0.1em;
}

.arcana-modal-numeral {
  color: var(--white);
  font-weight: 700;
}

.arcana-modal-art {
  margin: 17px 0 13px;
  overflow-x: auto;
  color: var(--white);
  font-family: var(--font);
  font-size: 11px;
  line-height: 1.15;
  text-align: center;
  white-space: pre;
}

.arcana-modal-body h2 {
  margin: 0 0 4px;
  color: var(--white);
  font-family: var(--font-gothic);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
}

.arcana-modal-zh {
  min-height: 14px;
  margin: 0 0 15px;
  color: #999;
  font-size: 10px;
}

.arcana-modal-prompt {
  margin: 0;
  padding: 12px 2px 0;
  color: #d0d0d0;
  border-top: 1px dashed #2a2a2a;
  font-size: 11px;
  line-height: 1.8;
  text-align: left;
}

.arcana-modal-note {
  margin: 14px 0 0;
  color: #666;
  font-size: 8px;
  line-height: 1.6;
  text-align: left;
}

body.arcana-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .arcana-panel {
    animation: none;
  }
}

@media (max-width: 900px) {
  .arcana-section {
    display: none;
  }

  .arcana-trigger {
    width: 24px;
    height: 24px;
  }

  .arcana-trigger svg {
    width: 11px;
    height: 11px;
  }

  .arcana-modal {
    padding: 10px;
  }

  .arcana-modal-body {
    padding: 16px 14px 14px;
  }

  .arcana-modal-art {
    font-size: 10px;
  }

  .arcana-modal-body h2 {
    font-size: 28px;
  }
}

/* ---------- 名片 / 状态 / 旁注 ---------- */

.profile-link {
  cursor: pointer;
}

.message-name.profile-link:hover,
.avatar.profile-link:hover {
  color: var(--white);
  border-color: var(--white);
}

.bubble-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  max-width: 100%;
}

.message.is-self .bubble-row {
  flex-direction: row-reverse;
}

.bubble-row > .bubble {
  max-width: 100%;
}

.marginalia-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: min(180px, 18vw);
  flex: none;
  padding-top: 2px;
}

.message.is-self .marginalia-list {
  align-items: flex-end;
}

.marginalia-item {
  max-width: 100%;
  padding: 2px 0 2px 7px;
  color: #aaa;
  border-left: 1px solid #565656;
  font-size: 8.5px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.message.is-self .marginalia-item {
  padding: 2px 7px 2px 0;
  border-right: 1px solid #777;
  border-left: 0;
  text-align: right;
}

.marginalia-user {
  color: var(--white);
  font-weight: 600;
}

.marginalia-text {
  color: #aaa;
}

.avatar-profile {
  width: 64px;
  height: 64px;
  border-color: var(--white);
}

.avatar-profile .sigil {
  width: 44px;
  height: 44px;
}

.profile-modal,
.marginalia-modal {
  position: fixed;
  inset: 0;
  z-index: 137;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(3px);
}

.marginalia-modal {
  z-index: 138;
}

.profile-panel,
.marginalia-panel {
  width: min(480px, 100%);
  max-height: 92vh;
  overflow: auto;
  border: 1px solid var(--white);
  background: #050505;
  box-shadow: 0 0 0 1px #000, 0 30px 100px rgba(0, 0, 0, 0.95);
  animation: ritual-rise 0.18s ease-out;
}

.profile-head,
.marginalia-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  color: #888;
  border-bottom: 1px solid var(--line-strong);
  background: #080808;
  font-size: 8px;
  letter-spacing: 0.1em;
}

.profile-head > span:first-child,
.marginalia-head > span:first-child {
  flex: 1;
  color: var(--white);
  font-weight: 700;
}

.profile-online {
  color: #888;
  font-size: 7.5px;
  letter-spacing: 0.08em;
}

.profile-online.is-online {
  color: var(--white);
}

.profile-close,
.marginalia-close {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  padding: 0;
  color: #888;
  border: 1px solid #333;
  background: transparent;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1;
}

.profile-close:hover,
.marginalia-close:hover {
  color: var(--black);
  border-color: var(--white);
  background: var(--white);
}

.profile-body {
  padding: 19px 18px 17px;
}

.profile-identity {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.profile-avatar-wrap {
  position: relative;
  flex: none;
}

.profile-status-glyph {
  position: absolute;
  right: -5px;
  bottom: -5px;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  color: var(--black);
  border: 1px solid var(--white);
  background: var(--white);
  font-size: 10px;
  line-height: 1;
}

.profile-copy {
  min-width: 0;
}

.profile-copy h2 {
  margin: 1px 0 3px;
  overflow-wrap: anywhere;
  color: var(--white);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.profile-copy > p {
  margin: 0;
  color: #888;
  font-size: 9px;
  line-height: 1.6;
}

.profile-status-line {
  min-height: 14px;
  margin-top: 7px !important;
  color: var(--white) !important;
  font-size: 10px !important;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 20px 0 0;
  border: 1px solid #292929;
  background: #292929;
}

.profile-stats > div {
  min-width: 0;
  padding: 9px 8px;
  background: #070707;
}

.profile-stats dt {
  margin: 0 0 5px;
  color: #777;
  font-size: 7.5px;
  letter-spacing: 0.1em;
}

.profile-stats dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #ccc;
  font-size: 9px;
  line-height: 1.45;
}

.profile-status-form {
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px dashed #2a2a2a;
}

.profile-status-form > label {
  display: block;
  margin-bottom: 6px;
  color: #999;
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.profile-status-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-status-field input {
  min-width: 0;
  flex: 1;
  height: 34px;
  padding: 0 9px;
  color: var(--text);
  border: 1px solid var(--control-border);
  outline: none;
  background: #030303;
  font-family: var(--font);
  font-size: 12px;
}

.profile-status-field input:focus {
  border-color: var(--white);
  outline: 1px dashed var(--white);
  outline-offset: 2px;
}

.profile-status-field span {
  flex: none;
  color: #777;
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

.profile-status-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 8px;
}

.profile-clear,
.profile-save {
  min-width: 62px;
  height: 29px;
  padding: 0 9px;
  font-family: var(--font);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.profile-clear {
  color: #888;
  border: 1px solid #3a3a3a;
  background: transparent;
}

.profile-clear:hover {
  color: var(--white);
  border-color: var(--white);
}

.profile-save {
  color: var(--black);
  border: 1px solid var(--white);
  background: var(--white);
}

.profile-save:hover:not(:disabled) {
  color: var(--white);
  background: #000;
}

.profile-note {
  margin: 13px 0 0;
  color: #666;
  font-size: 8px;
  line-height: 1.6;
}

.marginalia-form {
  padding: 17px 16px 15px;
}

.marginalia-context {
  min-height: 34px;
  margin: 0 0 14px;
  padding: 8px 9px;
  overflow-wrap: anywhere;
  color: #aaa;
  border-left: 2px solid #555;
  background: #080808;
  font-size: 9.5px;
  line-height: 1.6;
}

.marginalia-label {
  display: block;
  margin-bottom: 6px;
  color: #999;
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.marginalia-form textarea {
  display: block;
  width: 100%;
  min-height: 92px;
  padding: 9px;
  color: var(--text);
  border: 1px solid var(--control-border);
  outline: none;
  background: #030303;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.65;
  resize: vertical;
}

.marginalia-form textarea:focus {
  border-color: var(--white);
  outline: 1px dashed var(--white);
  outline-offset: 2px;
}

.marginalia-form textarea::placeholder {
  color: #666;
  opacity: 1;
}

.marginalia-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 5px 0 0;
  color: #666;
  font-size: 8px;
}

.marginalia-error {
  min-height: 14px;
  margin: 4px 0 0;
  color: var(--white);
  font-size: 9px;
}

.marginalia-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 12px;
}

.marginalia-delete,
.marginalia-cancel,
.marginalia-save {
  min-width: 70px;
  height: 32px;
  padding: 0 9px;
  font-family: var(--font);
  font-size: 8px;
  letter-spacing: 0.05em;
}

.marginalia-delete {
  margin-right: auto;
  color: #aaa;
  border: 1px solid #3a3a3a;
  background: transparent;
}

.marginalia-delete:hover {
  color: var(--white);
  border-color: var(--white);
}

.marginalia-cancel {
  color: #888;
  border: 1px solid #3a3a3a;
  background: transparent;
}

.marginalia-cancel:hover {
  color: var(--white);
  border-color: var(--white);
}

.marginalia-save {
  color: var(--black);
  border: 1px solid var(--white);
  background: var(--white);
}

.marginalia-save:hover:not(:disabled) {
  color: var(--white);
  background: #000;
}

.profile-save:disabled,
.marginalia-save:disabled {
  color: #555;
  border-color: #333;
  background: #0a0a0a;
}

body.profile-open,
body.marginalia-open {
  overflow: hidden;
}

.user-card.has-status .mini-dot {
  background: var(--white);
}

#sidebar-status {
  display: inline-block;
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .profile-panel,
  .marginalia-panel {
    animation: none;
  }
}

@media (max-width: 900px) {
  .bubble-row,
  .message.is-self .bubble-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .message.is-self .bubble-row {
    align-items: flex-end;
  }

  .marginalia-list {
    width: min(255px, 100%);
    padding-top: 1px;
  }

  .message.is-self .marginalia-list {
    align-items: flex-end;
  }

  .marginalia-item {
    border-left-color: #555;
  }

  .message.is-self .marginalia-item {
    padding: 2px 0 2px 7px;
    border-right: 0;
    border-left: 1px solid #777;
    text-align: left;
  }

  .profile-modal,
  .marginalia-modal {
    padding: 10px;
  }

  .profile-body {
    padding: 16px 14px 14px;
  }

  .profile-copy h2 {
    font-size: 19px;
  }

  .profile-stats {
    grid-template-columns: 1fr;
  }

  .profile-stats > div {
    padding: 7px 8px;
  }

  .marginalia-form {
    padding: 15px 13px 13px;
  }

  .marginalia-form textarea {
    font-size: 16px;
  }

  .marginalia-actions {
    flex-wrap: wrap;
  }

  .marginalia-delete {
    width: 100%;
    margin-right: 0;
  }
}

.user-card #sidebar-avatar,
.user-card #sidebar-username {
  cursor: pointer;
}

.user-card #sidebar-username:hover {
  color: var(--white);
}


/* ---------- @ 提及自动补全 / 管理员清空 ---------- */

.mention-menu {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 4px);
  z-index: 30;
  width: min(840px, calc(100% - 46px));
  max-height: 260px;
  overflow: auto;
  transform: translateX(-50%);
  border: 1px solid #3a3a3a;
  background: #050505;
  box-shadow: 0 -14px 40px rgba(0, 0, 0, 0.8);
}

.mention-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 8px 11px;
  color: #bbb;
  border: 0;
  border-bottom: 1px solid #1e1e1e;
  background: transparent;
  font-family: var(--font);
  font-size: 10px;
  text-align: left;
}

.mention-option:last-child {
  border-bottom: 0;
}

.mention-option:hover,
.mention-option.is-active {
  color: #050505;
  background: #eee;
}

.mention-option small {
  color: #777;
  font-size: 7px;
  letter-spacing: 0.06em;
}

.mention-option:hover small,
.mention-option.is-active small {
  color: #333;
}

.clear-chat-button {
  width: 100%;
  margin-top: 9px;
  padding: 7px 2px;
  color: #777;
  border: 1px solid #2f2f2f;
  background: transparent;
  font-family: var(--font);
  font-size: 8px;
  letter-spacing: 0.04em;
  text-align: left;
}

.clear-chat-button:hover {
  color: #fff;
  border-color: #777;
}

@media (max-width: 640px) {
  .mention-menu {
    width: calc(100% - 32px);
    bottom: calc(100% - 2px);
  }

  .mention-option {
    padding: 9px 10px;
  }
}

/* ---------- 登录过场：黑白像素水路 ---------- */

.passage {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #000;
  opacity: 0;
  pointer-events: all;
}

.passage.is-playing {
  opacity: 1;
  animation: passage-in 0.45s linear both;
}

.passage.is-out {
  opacity: 0;
  transition: opacity 0.8s ease;
}

.passage canvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.passage-caption {
  position: absolute;
  left: 50%;
  bottom: max(22px, 6vh);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: calc(100% - 40px);
  transform: translateX(-50%);
  color: #eee;
  text-align: center;
  text-shadow: 0 0 12px #000;
}

.passage-caption span {
  color: #777;
  font-size: 7px;
  letter-spacing: 0.24em;
}

.passage-caption b {
  font-family: var(--font);
  font-size: clamp(13px, 2.2vw, 18px);
  font-weight: 400;
  letter-spacing: 0.28em;
}

.passage-caption small {
  color: #888;
  font-size: 8px;
  letter-spacing: 0.12em;
}

body.passage-open {
  overflow: hidden;
}

@keyframes passage-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .passage.is-playing {
    animation: none;
  }
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 10px 0 2px;
  color: #8a8a8a;
  font-size: 9px;
  letter-spacing: 0.04em;
  cursor: pointer;
  user-select: none;
}

.remember-row input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: #eee;
  cursor: pointer;
}

.remember-row:hover {
  color: #ddd;
}


/* ---------- 阅读字号 ---------- */

html[data-reading-size="sm"] {
  --reading-scale: 0.88;
}

html[data-reading-size="md"] {
  --reading-scale: 1;
}

html[data-reading-size="lg"] {
  --reading-scale: 1.16;
}

.appearance-control {
  position: relative;
  flex: none;
}

.appearance-toggle {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 28px;
  padding: 0 6px;
  color: #888;
  border: 1px solid var(--line-strong);
  background: #000;
  font-family: var(--font);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.appearance-toggle:hover,
.appearance-toggle[aria-expanded="true"] {
  color: #000;
  border-color: #fff;
  background: #fff;
}

.appearance-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  width: 172px;
  padding: 9px;
  border: 1px solid #3a3a3a;
  background: #050505;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.75);
}

.appearance-popover p {
  margin: 0 0 7px;
  color: #777;
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.appearance-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.appearance-options button {
  min-height: 28px;
  padding: 0 4px;
  color: #999;
  border: 1px solid #333;
  background: transparent;
  font-family: var(--font);
  font-size: 9px;
}

.appearance-options button:hover {
  color: #fff;
  border-color: #888;
}

.appearance-options button.is-active {
  color: #000;
  border-color: #fff;
  background: #fff;
}

@media (max-width: 900px) {
  .appearance-toggle {
    min-width: 28px;
    height: 25px;
    font-size: 9px;
  }

  .appearance-popover {
    right: 0;
    width: 160px;
  }
}

/* ---------- UI 大小：滑动条 + 置顶/牌局可读性 ---------- */

.appearance-popover {
  width: 214px;
}

.appearance-scale-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}

.appearance-scale-head p {
  margin: 0;
}

.appearance-scale-head b {
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.appearance-scale-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.appearance-scale-row > span {
  flex: none;
  color: #666;
  font-size: 8px;
}

.appearance-scale-row input[type="range"] {
  width: 100%;
  min-width: 0;
  height: 18px;
  margin: 0;
  accent-color: #fff;
  cursor: pointer;
}

.appearance-reset {
  width: 100%;
  margin-top: 8px;
  padding: 6px;
  color: #777;
  border: 1px solid #333;
  background: transparent;
  font-family: var(--font);
  font-size: 8px;
}

.appearance-reset:hover {
  color: #fff;
  border-color: #777;
}

.pinned-banner {
  padding-top: 9px;
  padding-bottom: 9px;
  font-size: calc(11px * var(--reading-scale));
}

.pin-mark {
  font-size: calc(8.5px * var(--reading-scale));
}

.pin-body {
  font-size: calc(11.5px * var(--reading-scale));
}

.pin-clear {
  font-size: calc(9px * var(--reading-scale));
}

@media (max-width: 900px) {
  .appearance-popover {
    width: 200px;
  }

  .pinned-banner {
    padding-top: 8px;
    padding-bottom: 8px;
    font-size: calc(10px * var(--reading-scale));
  }

  .pin-body {
    font-size: calc(10.5px * var(--reading-scale));
  }

  .pin-clear {
    font-size: calc(8.5px * var(--reading-scale));
  }
}

/* ---------- 时间分割 ---------- */

.time-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 7px 0 2px;
  color: #5f5f5f;
  font-size: calc(8px * var(--reading-scale));
  letter-spacing: 0.12em;
  text-align: center;
}

.time-divider::before,
.time-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #181818;
}

.date-divider {
  font-size: calc(8.5px * var(--reading-scale));
}
