/* ============================================================
   雾室 · MIST ROOM
   A dark, quiet archive. Hand-built CSS, no frameworks.
   ============================================================ */

:root {
  --bg: #0a0b0c;
  --bg-deep: #070808;
  --bg-raised: #0e0f11;
  --paper: #ded8cc;
  --paper-soft: #b4aea3;
  --muted: #77736b;
  --faint: #504d47;
  --accent: #b7a58a;
  --accent-dim: #887864;
  --danger: #a97062;
  --line: rgba(222, 216, 204, 0.13);
  --line-strong: rgba(222, 216, 204, 0.24);
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, "Times New Roman", serif;
  --sans: "Helvetica Neue", "Segoe UI", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  --mono: "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --page-pad: clamp(20px, 4.4vw, 76px);
  --max-width: 1560px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 300px;
  background:
    radial-gradient(ellipse at 82% -8%, rgba(105, 112, 111, 0.08), transparent 38%),
    var(--bg);
  color: var(--paper);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

::selection {
  background: var(--accent);
  color: #0a0b0c;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: #33312d;
  border: 2px solid var(--bg-deep);
}

::-webkit-scrollbar-thumb:hover {
  background: #504b42;
}

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

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  text-align: left;
}

img {
  display: block;
  max-width: 100%;
}

p,
h1,
h2,
h3,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 5px;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  color: var(--accent);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2000;
  padding: 10px 16px;
  background: var(--paper);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 11px;
  transform: translateY(-160%);
  transition: transform 0.25s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- Atmosphere ---------- */

.grain {
  position: fixed;
  inset: -50%;
  z-index: 900;
  width: 200%;
  height: 200%;
  pointer-events: none;
  opacity: 0.038;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.ambient {
  position: fixed;
  z-index: 0;
  width: 44vw;
  height: 44vw;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.11;
}

.ambient--one {
  top: 12%;
  right: -22vw;
  background: #7a8581;
}

.ambient--two {
  bottom: 0;
  left: -26vw;
  background: #594f42;
  opacity: 0.08;
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 20px var(--page-pad);
  border-bottom: 1px solid transparent;
  transition:
    background 0.5s var(--ease-soft),
    border-color 0.5s var(--ease-soft),
    padding 0.5s var(--ease-soft),
    backdrop-filter 0.5s var(--ease-soft);
}

.site-header.is-scrolled {
  padding-top: 13px;
  padding-bottom: 13px;
  background: rgba(8, 9, 10, 0.82);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(0.8);
  backdrop-filter: blur(18px) saturate(0.8);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  flex: none;
}

.brand__cn {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.26em;
  line-height: 1;
  color: var(--paper);
}

.brand__en {
  font-family: var(--sans);
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 0.34em;
  color: var(--muted);
  transition: color 0.3s ease;
}

.brand:hover .brand__en {
  color: var(--accent);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3.2vw, 48px);
}

.primary-nav a {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--paper-soft);
  transition: color 0.35s ease;
}

.primary-nav a span {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.05em;
  color: var(--faint);
  transition: color 0.35s ease;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.45s var(--ease);
}

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

.primary-nav a:hover span,
.primary-nav a.is-active span {
  color: var(--accent);
}

.primary-nav a:hover::after,
.primary-nav a.is-active::after {
  width: 100%;
}

.header-aside {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.header-clock {
  font-variant-numeric: tabular-nums;
  color: var(--paper-soft);
}

.header-role {
  max-width: 110px;
  overflow: hidden;
  font-family: var(--sans);
  font-size: 7px;
  letter-spacing: 0.12em;
  color: var(--accent-dim);
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.header-role:hover {
  color: var(--paper);
}

.header-people {
  padding: 4px 8px;
  border: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 7px;
  letter-spacing: 0.13em;
  color: var(--accent-dim);
  transition: color 0.3s ease, border-color 0.3s ease;
}

.header-people:hover {
  color: var(--paper);
  border-color: var(--line-strong);
}

.header-exit {
  padding-left: 10px;
  border-left: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 7.5px;
  letter-spacing: 0.12em;
  color: var(--faint);
  transition: color 0.3s ease;
}

.header-exit:hover {
  color: var(--paper);
}

.header-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent-dim);
}

.header-place {
  letter-spacing: 0.18em;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg-deep);
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 55%;
  opacity: 0.72;
  filter: saturate(0.58) contrast(1.05) brightness(0.78);
  transform: scale(1.035);
  animation: heroDrift 32s ease-in-out infinite alternate;
}

@keyframes heroDrift {
  from { transform: scale(1.035) translate3d(0, 0, 0); }
  to { transform: scale(1.075) translate3d(-0.8%, -0.6%, 0); }
}

.hero__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(7, 8, 9, 0.96) 0%, rgba(7, 8, 9, 0.79) 34%, rgba(7, 8, 9, 0.18) 72%, rgba(7, 8, 9, 0.42) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(10, 11, 12, 0.7) 12%, rgba(10, 11, 12, 0) 44%, rgba(8, 9, 10, 0.32) 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  box-shadow: inset 0 0 18vw rgba(0, 0, 0, 0.6);
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(150px, 22vh, 240px) var(--page-pad) clamp(96px, 13vh, 142px);
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: clamp(28px, 5vh, 54px);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.32em;
  color: var(--paper-soft);
  animation: fadeUp 1.2s 0.35s var(--ease) both;
}

.hero__eyebrow .rule {
  width: clamp(28px, 4vw, 62px);
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}

.hero__vol {
  margin-left: 6px;
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.16em;
  color: var(--accent);
}

.hero__title {
  overflow: hidden;
  font-family: var(--serif);
  font-size: clamp(5rem, 14vw, 13.5rem);
  font-weight: 300;
  line-height: 0.88;
  letter-spacing: 0.015em;
  color: #e6e0d5;
  text-shadow: 0 4px 60px rgba(0, 0, 0, 0.35);
}

.hero__line {
  display: block;
  animation: titleReveal 1.5s var(--ease) both;
}

.hero__line--indent {
  padding-left: clamp(70px, 13vw, 220px);
  animation-delay: 0.1s;
  color: #d5cec1;
}

.hero__dot {
  color: var(--accent);
}

@keyframes titleReveal {
  from { transform: translateY(112%); }
  to { transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  width: min(100%, 780px);
  margin-top: clamp(30px, 5vh, 54px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
  animation: fadeUp 1.1s 0.6s var(--ease) both;
}

.hero__statement {
  font-size: clamp(15px, 1.35vw, 19px);
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: var(--paper-soft);
}

.hero__english {
  padding-bottom: 3px;
  font-family: var(--sans);
  font-size: 8px;
  line-height: 2;
  letter-spacing: 0.2em;
  text-align: right;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: clamp(24px, 3.5vw, 46px);
  margin-top: 32px;
  animation: fadeUp 1.1s 0.78s var(--ease) both;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  position: relative;
  padding: 4px 0;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--paper);
  transition: color 0.35s ease;
}

.text-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  opacity: 0.24;
  transform-origin: left;
  transition: opacity 0.35s ease, transform 0.5s var(--ease);
}

.text-link svg {
  width: 17px;
  height: 17px;
  transition: transform 0.4s var(--ease);
}

.text-link:hover {
  color: var(--accent);
}

.text-link:hover::after {
  opacity: 0.7;
}

.text-link:hover svg {
  transform: translateX(4px);
}

.text-link--muted {
  color: var(--muted);
}

.text-link--muted:hover svg {
  transform: rotate(90deg);
}

.hero__rail {
  position: absolute;
  z-index: 3;
  right: var(--page-pad);
  top: 29%;
  bottom: 8%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  color: rgba(222, 216, 204, 0.36);
  animation: fadeUp 1.2s 0.9s var(--ease) both;
}

.hero__coordinates {
  display: flex;
  flex-direction: column;
  gap: 5px;
  writing-mode: vertical-rl;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.22em;
}

.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  font-size: 7px;
  letter-spacing: 0.24em;
  color: var(--muted);
}

.scroll-cue i {
  position: relative;
  display: block;
  width: 1px;
  height: 62px;
  background: var(--line);
  overflow: hidden;
}

.scroll-cue i::after {
  content: "";
  position: absolute;
  top: -20px;
  left: 0;
  width: 1px;
  height: 20px;
  background: var(--accent);
  animation: scrollDrop 2.6s 1.6s ease-in-out infinite;
}

@keyframes scrollDrop {
  0% { transform: translateY(0); opacity: 0; }
  25% { opacity: 1; }
  80% { transform: translateY(84px); opacity: 0; }
  100% { transform: translateY(84px); opacity: 0; }
}

.hero__date {
  writing-mode: vertical-rl;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.24em;
  color: var(--faint);
}

.hero__bottom {
  position: absolute;
  z-index: 3;
  left: var(--page-pad);
  right: var(--page-pad);
  bottom: 26px;
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.26em;
  color: rgba(222, 216, 204, 0.26);
}

.hero__bottom-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

/* ---------- Overture ---------- */

.overture {
  position: relative;
  display: grid;
  grid-template-columns: minmax(70px, 0.45fr) minmax(0, 2fr) minmax(180px, 0.65fr);
  align-items: end;
  gap: clamp(28px, 5vw, 80px);
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(90px, 12vw, 170px) var(--page-pad) clamp(100px, 12vw, 170px);
}

.overture__mark {
  align-self: start;
  font-family: var(--serif);
  font-size: clamp(4.5rem, 9vw, 9rem);
  font-weight: 300;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px rgba(222, 216, 204, 0.2);
  user-select: none;
}

.overture__line {
  font-size: clamp(1.8rem, 3.55vw, 3.8rem);
  font-weight: 300;
  line-height: 1.65;
  letter-spacing: 0.03em;
  color: var(--paper);
}

.overture__line em {
  font-style: normal;
  color: var(--accent);
}

.overture__note {
  padding: 4px 0 4px 22px;
  border-left: 1px solid var(--line-strong);
  font-family: var(--sans);
  font-size: 10px;
  line-height: 2.2;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ---------- Shared section bits ---------- */

.section {
  position: relative;
  padding: clamp(94px, 10.5vw, 164px) var(--page-pad);
}

.section-heading,
.gallery-grid {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.27em;
  color: var(--muted);
}

.kicker span {
  font-family: var(--mono);
  letter-spacing: 0.06em;
  color: var(--accent);
}

.section-heading__cn {
  font-family: var(--serif);
  font-size: 9px;
  letter-spacing: 0.62em;
  color: var(--faint);
  text-indent: 0.62em;
}

.section-heading__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.section-heading__main {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(250px, 0.55fr);
  align-items: end;
  gap: clamp(30px, 6vw, 90px);
  margin-top: clamp(34px, 4vw, 52px);
}

.section-heading h2,
.journal-intro h2 {
  font-family: var(--serif);
  font-size: clamp(3.3rem, 7.5vw, 7.6rem);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: 0.01em;
  color: var(--paper);
}

.section-heading h2 em,
.journal-intro h2 em {
  font-style: normal;
  color: var(--accent);
}

.section-heading__aside {
  max-width: 310px;
  margin-left: auto;
  padding-bottom: 10px;
}

.section-heading__aside p {
  font-family: var(--sans);
  font-size: 10.5px;
  line-height: 2.15;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.section-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: clamp(46px, 6vw, 78px);
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
}

.section-meta span:first-child {
  color: var(--paper-soft);
  font-variant-numeric: tabular-nums;
}

.section-meta__right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.section-meta__people {
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.16em;
  color: var(--accent-dim);
  border-bottom: 1px solid rgba(183, 165, 138, 0.28);
  transition: color 0.3s ease, border-color 0.3s ease;
}

.section-meta__people:hover {
  color: var(--paper);
  border-color: var(--line-strong);
}

.section-meta__hint {
  color: var(--faint);
}

/* Only the owner can open another archive; when they do, the page is read-only. */
body[data-can-edit="false"] [data-open-photo],
body[data-can-edit="false"] [data-open-entry] {
  display: none !important;
}

.line-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  padding: 13px 20px;
  border: 1px solid var(--line-strong);
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.17em;
  color: var(--paper-soft);
  background: rgba(255, 255, 255, 0.006);
  transition:
    background 0.4s var(--ease-soft),
    color 0.4s var(--ease-soft),
    border-color 0.4s var(--ease-soft);
}

.line-button__icon {
  position: relative;
  top: -1px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 300;
  line-height: 1;
  color: var(--accent);
  transition: transform 0.45s var(--ease);
}

.line-button:hover {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--bg);
}

.line-button:hover .line-button__icon {
  color: var(--bg);
  transform: rotate(90deg);
}

/* ---------- Gallery ---------- */

.gallery-section {
  padding-top: clamp(20px, 3vw, 42px);
  overflow: hidden;
}

.gallery-grid {
  margin-top: clamp(36px, 4vw, 55px);
  columns: 3;
  column-gap: clamp(16px, 2vw, 30px);
}

.photo-card {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 clamp(26px, 3vw, 46px);
  break-inside: avoid;
  color: var(--paper);
  opacity: 1;
  animation: archiveIn 0.9s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 55ms);
  transition: transform 0.6s var(--ease);
}

@keyframes archiveIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.photo-card__media {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111214;
  border: 1px solid rgba(222, 216, 204, 0.055);
}

.photo-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 22%, transparent 76%, rgba(0, 0, 0, 0.22));
  opacity: 0.9;
}

.photo-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.025) brightness(0.9);
  transform: scale(1.001);
  transition:
    transform 1.1s var(--ease),
    filter 0.9s var(--ease-soft);
}

.photo-card:hover .photo-card__media img,
.photo-card:focus-visible .photo-card__media img {
  transform: scale(1.035);
  filter: saturate(0.9) contrast(1.03) brightness(0.98);
}

.photo-card__sample {
  position: absolute;
  top: 12px;
  right: 13px;
  z-index: 1;
  font-family: var(--sans);
  font-size: 6.5px;
  letter-spacing: 0.18em;
  color: rgba(238, 232, 220, 0.46);
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.6);
}

.photo-card__info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 1px 0;
}

.photo-card__title {
  display: block;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0.045em;
  color: var(--paper-soft);
  transition: color 0.35s ease;
}

.photo-card:hover .photo-card__title,
.photo-card:focus-visible .photo-card__title {
  color: var(--paper);
}

.photo-card__date {
  display: block;
  flex: none;
  padding-top: 4px;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.photo-card__note {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 7px;
  font-family: var(--sans);
  font-size: 10.5px;
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: #646057;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.photo-card::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  opacity: 0;
  transition: width 0.55s var(--ease), opacity 0.3s ease;
}

.photo-card:hover::after,
.photo-card:focus-visible::after {
  width: 100%;
  opacity: 0.4;
}

/* ---------- Journal ---------- */

.journal-section {
  margin-top: clamp(50px, 7vw, 100px);
  padding-top: clamp(100px, 11vw, 170px);
  padding-bottom: clamp(100px, 12vw, 180px);
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 14% 12%, rgba(135, 126, 110, 0.055), transparent 34%),
    linear-gradient(180deg, #090a0b 0%, #0b0c0e 48%, #090a0b 100%);
}

.journal-section::before {
  content: "日記";
  position: absolute;
  top: 4%;
  right: 1.3%;
  z-index: 0;
  font-family: var(--serif);
  font-size: clamp(9rem, 22vw, 24rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0.06em;
  writing-mode: vertical-rl;
  color: rgba(222, 216, 204, 0.022);
  pointer-events: none;
  user-select: none;
}

.journal-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(255px, 0.72fr) minmax(0, 1.65fr);
  align-items: start;
  gap: clamp(48px, 8vw, 140px);
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.journal-intro {
  position: sticky;
  top: 120px;
  alignment-baseline: baseline;
}

.journal-intro .section-heading__cn {
  margin-top: 12px;
}

.journal-intro h2 {
  margin-top: clamp(34px, 4vw, 54px);
  font-size: clamp(3.7rem, 7vw, 7.2rem);
}

.journal-intro__copy {
  margin-top: 28px;
  font-size: 13px;
  line-height: 2.05;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.journal-intro .line-button {
  margin-top: 34px;
}

.journal-index {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  width: min(100%, 270px);
  margin-top: clamp(52px, 8vw, 100px);
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 7px;
  letter-spacing: 0.24em;
  color: var(--faint);
}

.journal-index span:last-child {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: 0.03em;
  color: var(--paper-soft);
  font-variant-numeric: tabular-nums;
}

.entries {
  border-top: 1px solid var(--line);
}

.entry {
  position: relative;
  padding: clamp(30px, 3.4vw, 48px) 0 clamp(32px, 3.6vw, 50px);
  border-bottom: 1px solid var(--line);
  animation: archiveIn 0.9s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 50ms);
}

.entry__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.entry__date {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--accent-dim);
  font-variant-numeric: tabular-nums;
}

.entry__weekday {
  font-family: var(--sans);
  font-size: 7px;
  letter-spacing: 0.18em;
  color: var(--faint);
}

.entry__mood {
  flex: none;
  padding: 4px 10px 5px;
  border: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 7.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.entry__title {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.3vw, 2rem);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0.035em;
  color: var(--paper);
}

.entry__body {
  position: relative;
  max-width: 710px;
  margin-top: 19px;
  font-size: 14.5px;
  line-height: 2.12;
  letter-spacing: 0.035em;
  color: #aaa499;
  white-space: pre-wrap;
}

.entry__body p {
  margin-bottom: 0.65em;
}

.entry__body p:last-child {
  margin-bottom: 0;
}

.entry.is-clamped .entry__body {
  max-height: 15.5em;
  overflow: hidden;
}

.entry.is-clamped .entry__body::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5.5em;
  background: linear-gradient(180deg, transparent, #0b0c0d 76%);
  pointer-events: none;
}

.entry__read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.18em;
  color: var(--accent);
}

.entry__read-more::after {
  content: "↓";
  font-size: 11px;
  transition: transform 0.35s var(--ease);
}

.entry.is-expanded .entry__read-more::after {
  transform: rotate(180deg);
}

.entry__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
}

.entry__files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.05em;
  color: var(--muted);
  transition:
    border-color 0.35s ease,
    color 0.35s ease,
    background 0.35s ease;
}

.file-chip svg {
  width: 13px;
  height: 13px;
  flex: none;
  opacity: 0.65;
}

.file-chip span {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-chip em {
  font-family: var(--mono);
  font-style: normal;
  font-size: 7px;
  color: var(--faint);
}

.file-chip:hover {
  border-color: var(--line-strong);
  color: var(--paper);
  background: rgba(255, 255, 255, 0.018);
}

.entry__actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.35s ease;
}

body[data-can-edit="false"] .entry__actions {
  display: none;
}

.entry:hover .entry__actions,
.entry:focus-within .entry__actions {
  opacity: 1;
}

.entry-action {
  font-family: var(--sans);
  font-size: 7.5px;
  letter-spacing: 0.14em;
  color: var(--faint);
  transition: color 0.3s ease;
}

.entry-action:hover {
  color: var(--paper-soft);
}

.entry-action--danger:hover {
  color: var(--danger);
}

.entry__number {
  position: absolute;
  top: 22px;
  right: 0;
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 300;
  line-height: 1;
  color: rgba(222, 216, 204, 0.035);
  pointer-events: none;
  user-select: none;
}

/* ---------- About ---------- */

.about {
  position: relative;
  overflow: hidden;
  padding: clamp(100px, 13vw, 190px) var(--page-pad);
}

.about__inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.about__quote {
  position: relative;
  margin-top: clamp(40px, 5vw, 72px);
  padding-bottom: clamp(50px, 7vw, 90px);
}

.about__quote h2 {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5.5vw, 5.8rem);
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: var(--paper);
}

.about__quote-mark {
  position: absolute;
  right: -1vw;
  bottom: -2vw;
  font-family: var(--sans);
  font-size: clamp(8rem, 20vw, 20rem);
  font-weight: 600;
  line-height: 0.8;
  letter-spacing: -0.08em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(222, 216, 204, 0.07);
  pointer-events: none;
  user-select: none;
}

.about__columns {
  display: grid;
  grid-template-columns: minmax(240px, 1.05fr) minmax(280px, 1.1fr) minmax(200px, 0.65fr);
  gap: clamp(32px, 6vw, 100px);
  padding-top: clamp(34px, 4vw, 52px);
  border-top: 1px solid var(--line);
}

.about__lead {
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 2.05;
  letter-spacing: 0.05em;
  color: var(--paper-soft);
}

.about__copy p {
  margin-bottom: 18px;
  font-family: var(--sans);
  font-size: 11px;
  line-height: 2.15;
  letter-spacing: 0.045em;
  color: var(--muted);
}

.about__copy p:last-child {
  margin-bottom: 0;
}

.about__facts {
  align-self: start;
}

.about__facts div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.about__facts div:first-child {
  padding-top: 0;
}

.about__facts dt {
  font-family: var(--sans);
  font-size: 7.5px;
  letter-spacing: 0.2em;
  color: var(--faint);
}

.about__facts dd {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--paper-soft);
  text-align: right;
}

/* ---------- Footer ---------- */

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  gap: 40px;
  padding: clamp(44px, 5vw, 66px) var(--page-pad) 28px;
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
}

.site-footer__brand {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.site-footer__brand > span:last-child {
  font-family: var(--sans);
  font-size: 7px;
  letter-spacing: 0.3em;
  color: var(--faint);
}

.site-footer__line {
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.06em;
  color: var(--faint);
}

.site-footer__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.1em;
  color: var(--faint);
}

.site-footer__meta a,
.site-footer__session {
  color: var(--muted);
  transition: color 0.3s ease;
}

.site-footer__meta a:hover {
  color: var(--accent);
}

.footer-exit {
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  color: var(--faint);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.3s ease;
}

.footer-exit:hover {
  color: var(--paper);
}

/* ---------- Loading / empty ---------- */

.loading-state,
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 300px;
  padding: 50px 20px;
  border: 1px solid var(--line);
  text-align: center;
}

.loading-state {
  break-inside: avoid;
}

.loading-state__line {
  position: relative;
  width: 92px;
  height: 1px;
  overflow: hidden;
  background: var(--line);
}

.loading-state__line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateX(-100%);
  animation: loadingSweep 1.8s ease-in-out infinite;
}

@keyframes loadingSweep {
  50%, 100% { transform: translateX(100%); }
}

.loading-state p {
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--faint);
}

.empty-state {
  min-height: 380px;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.008);
}

.empty-state__icon {
  width: 42px;
  height: 42px;
  color: rgba(222, 216, 204, 0.22);
  stroke-width: 1;
}

.empty-state h3 {
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--paper-soft);
}

.empty-state p {
  max-width: 320px;
  font-family: var(--sans);
  font-size: 9.5px;
  line-height: 1.9;
  letter-spacing: 0.07em;
  color: var(--faint);
}

.empty-state .line-button {
  margin-top: 5px;
}

.gallery-grid.is-empty {
  columns: auto;
}

.loading-state--entries {
  border: 0;
}

/* ---------- Viewing another archive ---------- */

.view-banner {
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 36px;
  padding: 7px var(--page-pad);
  border-bottom: 1px solid var(--line);
  background: rgba(15, 16, 18, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  font-family: var(--sans);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-align: center;
}

.view-banner strong {
  font-weight: 400;
  color: var(--accent);
}

.view-banner button {
  flex: none;
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--paper-soft);
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.3s ease;
}

.view-banner button:hover {
  color: var(--accent);
}

.view-banner__actions {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.view-banner__actions button:first-child {
  color: var(--accent-dim);
}

/* ---------- Account ---------- */

.modal__panel--account {
  width: min(620px, 100%);
}

.account-username {
  margin-bottom: 24px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.account-username span {
  color: var(--paper-soft);
  font-family: var(--mono);
  font-size: 8px;
}

.account-divider {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 10px 0 23px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  color: var(--accent-dim);
}

.account-divider small {
  font-size: 7px;
  letter-spacing: 0.05em;
  color: var(--faint);
}

/* ---------- Owner: people list ---------- */

.modal__panel--people {
  width: min(680px, 100%);
}

.people-body {
  padding-bottom: 18px;
}

.people-intro {
  font-family: var(--sans);
  font-size: 10px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.people-list {
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.people-list .loading-state {
  min-height: 180px;
  border: 0;
}

.person-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 15px;
  width: 100%;
  padding: 15px 3px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  transition: background 0.3s ease;
}

.person-row:hover,
.person-row:focus-visible {
  background: rgba(255, 255, 255, 0.018);
}

.person-row.is-current {
  background: rgba(183, 165, 138, 0.035);
}

.person-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 300;
  color: var(--accent);
}

.person-info {
  min-width: 0;
}

.person-info strong {
  display: block;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--paper);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-info small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.03em;
  color: var(--faint);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-counts {
  font-family: var(--sans);
  font-size: 8px;
  line-height: 1.8;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.person-action {
  font-family: var(--sans);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  color: var(--accent-dim);
  white-space: nowrap;
}

.person-row:hover .person-action {
  color: var(--paper);
}

.person-role {
  margin-left: 7px;
  padding: 2px 5px;
  border: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 6.5px;
  letter-spacing: 0.08em;
  color: var(--faint);
}

.people-empty {
  padding: 40px 16px;
  font-family: var(--sans);
  font-size: 10px;
  color: var(--faint);
  text-align: center;
}

/* ---------- Modal foundations ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.45s var(--ease-soft), visibility 0.45s;
}

.modal.is-open {
  visibility: visible;
  opacity: 1;
}

.modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 6, 0.8);
  -webkit-backdrop-filter: blur(15px) saturate(0.72);
  backdrop-filter: blur(15px) saturate(0.72);
}

.modal__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(780px, 100%);
  max-height: calc(100svh - 56px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(130, 121, 105, 0.07), transparent 32%),
    #0d0e10;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7);
  transform: translateY(28px) scale(0.985);
  transition: transform 0.55s var(--ease), opacity 0.4s ease;
}

.modal.is-open .modal__panel {
  transform: translateY(0) scale(1);
}

.modal__panel--entry {
  width: min(880px, 100%);
}

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

.modal__kicker {
  font-family: var(--sans);
  font-size: 7.5px;
  letter-spacing: 0.26em;
  color: var(--accent-dim);
}

.modal__head h2 {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2.6vw, 2.1rem);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: var(--paper);
}

.modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  color: var(--muted);
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.modal__close svg {
  width: 17px;
  height: 17px;
}

.modal__close:hover {
  color: var(--paper);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.02);
}

.modal__form {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.modal__body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px 34px 8px;
}

.modal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 34px;
  border-top: 1px solid var(--line);
  background: rgba(8, 9, 10, 0.5);
}

.modal__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.upload-status {
  min-height: 1em;
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 12px 24px;
  border: 1px solid var(--paper);
  background: var(--paper);
  color: #111214;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.16em;
  transition:
    background 0.35s var(--ease-soft),
    color 0.35s var(--ease-soft),
    border-color 0.35s var(--ease-soft),
    opacity 0.3s ease;
}

.btn:hover {
  background: transparent;
  color: var(--paper);
}

.btn:disabled {
  cursor: wait;
  opacity: 0.45;
}

.btn--quiet {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--muted);
}

.btn--quiet:hover {
  border-color: var(--paper-soft);
  color: var(--paper);
}

.btn--danger {
  background: transparent;
  border-color: rgba(169, 112, 98, 0.55);
  color: var(--danger);
}

.btn--danger:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--bg);
}

/* ---------- Form fields ---------- */

.field {
  display: block;
  margin-bottom: 24px;
}

.field__label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 3px;
  font-family: var(--sans);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  color: #8d877c;
}

.field__label small {
  font-size: 7px;
  letter-spacing: 0.08em;
  color: #625e56;
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: 11px 0 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0.03em;
  transition: border-color 0.35s ease;
}

.field textarea {
  min-height: 90px;
  resize: vertical;
  line-height: 1.95;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #5f5b53;
}

.field input:focus,
.field textarea:focus {
  border-bottom-color: var(--accent-dim);
}

.field input[type="date"] {
  color-scheme: dark;
}

.field input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.4;
  filter: invert(0.8);
  cursor: pointer;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.field--body {
  position: relative;
}

.field--body textarea {
  min-height: 190px;
}

.field__count {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-align: right;
  color: var(--faint);
}

.form-error {
  min-height: 17px;
  margin: 2px 0 14px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--danger);
}

/* ---------- Photo uploader ---------- */

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 30px 24px;
  border: 1px dashed var(--line-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.012), transparent),
    rgba(255, 255, 255, 0.004);
  cursor: pointer;
  transition:
    border-color 0.4s ease,
    background 0.4s ease,
    transform 0.4s var(--ease);
}

.dropzone:hover,
.dropzone.is-over,
.dropzone:focus-visible {
  border-color: var(--accent-dim);
  background: rgba(183, 165, 138, 0.035);
}

.dropzone.is-over {
  transform: scale(0.995);
}

.dropzone__icon {
  width: 38px;
  height: 38px;
  margin-bottom: 16px;
  color: rgba(222, 216, 204, 0.28);
  stroke-width: 1;
}

.dropzone__title {
  font-size: 17px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--paper-soft);
}

.dropzone__hint {
  margin-top: 9px;
  font-family: var(--sans);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  color: #6b665d;
}

.dropzone__hint span {
  color: var(--accent-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.photo-queue {
  display: flex;
  flex-direction: column;
}

.queue-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.queue-item__thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  filter: saturate(0.84) brightness(0.9);
  background: #141518;
}

.queue-item__fields {
  min-width: 0;
}

.queue-item__name {
  overflow: hidden;
  margin-bottom: 3px;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--faint);
}

.queue-item input {
  display: block;
  width: 100%;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  outline: 0;
  background: transparent;
  color: var(--paper-soft);
  font-family: var(--serif);
  font-size: 13px;
  transition: border-color 0.3s ease;
}

.queue-item input:focus {
  border-bottom-color: var(--line-strong);
}

.queue-item__remove,
.file-queue__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: var(--faint);
  transition: color 0.3s ease;
}

.queue-item__remove svg,
.file-queue__remove svg {
  width: 13px;
  height: 13px;
}

.queue-item__remove:hover,
.file-queue__remove:hover {
  color: var(--danger);
}

/* ---------- Entry attachments ---------- */

.attachments-field {
  margin-top: 4px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.attachments-field__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.attachments-field__hint {
  font-family: var(--mono);
  font-size: 7px;
  color: var(--faint);
}

.existing-files,
.file-queue {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}

.existing-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 9.5px;
  color: var(--muted);
}

.existing-file svg {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--faint);
}

.existing-file span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.existing-file em {
  font-family: var(--mono);
  font-style: normal;
  font-size: 7px;
  color: var(--faint);
}

.file-drop {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 12px;
  padding: 13px 15px;
  border: 1px dashed var(--line);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--faint);
  transition: border-color 0.35s ease, color 0.35s ease, background 0.35s ease;
}

.file-drop svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.file-drop:hover,
.file-drop.is-over,
.file-drop:focus-visible {
  border-color: var(--accent-dim);
  color: var(--muted);
  background: rgba(183, 165, 138, 0.025);
}

.file-queue__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 9px;
  color: var(--muted);
}

.file-queue__item span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-queue__item em {
  font-family: var(--mono);
  font-style: normal;
  font-size: 7px;
  color: var(--faint);
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 320;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.5s var(--ease-soft), visibility 0.5s;
}

.lightbox.is-open {
  visibility: visible;
  opacity: 1;
}

.lightbox__scrim {
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 5, 0.93);
  -webkit-backdrop-filter: blur(20px) saturate(0.6);
  backdrop-filter: blur(20px) saturate(0.6);
}

.lightbox__frame {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: clamp(28px, 5vw, 70px);
}

.lightbox__figure {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 305px);
  align-items: center;
  gap: clamp(30px, 4vw, 64px);
  width: min(1460px, 100%);
  max-height: 100%;
}

.lightbox__image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: min(82svh, 880px);
  min-height: 0;
}

.lightbox__image-wrap img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  filter: saturate(0.9) contrast(1.015);
}

.lightbox.is-open .lightbox__image-wrap img {
  animation: imageIn 0.8s var(--ease) both;
}

@keyframes imageIn {
  from { opacity: 0; transform: scale(0.985); }
  to { opacity: 1; transform: scale(1); }
}

.lightbox__caption {
  max-height: 78svh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 0;
}

.lightbox__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.12em;
  color: var(--faint);
}

.lightbox__meta span:first-child {
  color: var(--accent-dim);
}

.lightbox__caption h2 {
  margin-top: 22px;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 2.8vw, 2.5rem);
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: 0.04em;
  color: var(--paper);
}

.lightbox__note {
  margin-top: 16px;
  font-size: 12.5px;
  line-height: 2.05;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: pre-wrap;
}

.lightbox__date {
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--faint);
}

.lightbox__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.text-link--small {
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.text-link--small svg {
  width: 14px;
  height: 14px;
}

.text-link--small:hover {
  color: var(--paper);
}

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

.lightbox__close,
.lightbox__nav {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(10, 11, 12, 0.45);
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.lightbox__close:hover,
.lightbox__nav:hover {
  color: var(--paper);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
}

.lightbox__close svg,
.lightbox__nav svg {
  width: 18px;
  height: 18px;
}

.lightbox__close {
  top: clamp(18px, 3vw, 34px);
  right: clamp(18px, 3vw, 34px);
}

.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__nav--prev {
  left: clamp(12px, 3vw, 34px);
}

.lightbox__nav--next {
  right: clamp(12px, 3vw, 34px);
}

.lightbox__nav[disabled] {
  opacity: 0.2;
  cursor: default;
}

/* ---------- Confirm ---------- */

.modal--confirm {
  z-index: 340;
}

.confirm {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  padding: 32px;
  border: 1px solid var(--line-strong);
  background: #0e0f11;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7);
  transform: translateY(20px);
  transition: transform 0.45s var(--ease);
}

.modal--confirm.is-open .confirm {
  transform: translateY(0);
}

.confirm h2 {
  margin-top: 10px;
  font-size: 25px;
  font-weight: 300;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: var(--paper);
}

.confirm p {
  margin-top: 14px;
  font-family: var(--sans);
  font-size: 10.5px;
  line-height: 1.95;
  color: var(--muted);
}

.confirm__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 30px;
}

/* ---------- Toasts ---------- */

.toast-region {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(360px, calc(100vw - 44px));
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  background: rgba(16, 17, 19, 0.96);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  font-family: var(--sans);
  font-size: 10px;
  line-height: 1.55;
  letter-spacing: 0.04em;
  color: var(--paper-soft);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: toastIn 0.5s var(--ease) both;
}

.toast::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.toast.is-error::before {
  background: var(--danger);
}

.toast.is-leaving {
  animation: toastOut 0.35s ease both;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(8px); }
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: var(--bg);
  color: var(--paper);
  text-align: center;
}

/* ---------- Scroll reveal (only when JS is ready) ---------- */

html.motion-ready .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 1s var(--ease),
    transform 1s var(--ease);
}

html.motion-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1180px) {
  .hero__rail {
    display: none;
  }

  .gallery-grid {
    columns: 2;
  }

  .journal-shell {
    grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1.6fr);
    gap: clamp(40px, 6vw, 80px);
  }

  .about__columns {
    grid-template-columns: 1fr 1fr;
  }

  .about__facts {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0 30px;
  }
}

@media (max-width: 900px) {
  .header-place,
  .header-dot {
    display: none;
  }

  .hero__inner {
    padding-top: 140px;
  }

  .hero__foot {
    width: min(100%, 610px);
  }

  .hero__english {
    display: none;
  }

  .overture {
    grid-template-columns: 62px minmax(0, 1fr);
    align-items: start;
    row-gap: 30px;
  }

  .overture__note {
    grid-column: 2;
    max-width: 280px;
  }

  .section-heading__main {
    grid-template-columns: 1fr;
  }

  .section-heading__aside {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    max-width: none;
    margin-left: 0;
  }

  .section-heading__aside .line-button {
    flex: none;
    margin-top: 0;
  }

  .journal-shell {
    grid-template-columns: 1fr;
    gap: 55px;
  }

  .journal-section::before {
    top: 2%;
    right: -2%;
    font-size: 34vw;
  }

  .journal-intro {
    position: static;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    column-gap: 30px;
  }

  .journal-intro > .reveal:first-child,
  .journal-intro h2,
  .journal-intro__copy,
  .journal-intro > .line-button {
    grid-column: 1;
  }

  .journal-intro h2 {
    margin-top: 26px;
  }

  .journal-intro__copy {
    margin-top: 18px;
  }

  .journal-intro > .line-button {
    justify-self: start;
  }

  .journal-index {
    grid-column: 2;
    grid-row: 1 / 4;
    align-self: end;
    width: 110px;
    margin-top: 0;
  }

  .site-footer {
    grid-template-columns: 1fr auto;
  }

  .site-footer__line {
    grid-column: 1;
    grid-row: 2;
  }

  .site-footer__meta {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: end;
  }
}

@media (max-width: 720px) {
  :root {
    --page-pad: clamp(18px, 5vw, 30px);
  }

  .site-header {
    gap: 14px;
    padding: 16px var(--page-pad);
  }

  .site-header.is-scrolled {
    padding-top: 11px;
    padding-bottom: 11px;
  }

  .brand {
    gap: 10px;
  }

  .brand__cn {
    font-size: 18px;
  }

  .brand__en {
    display: none;
  }

  .primary-nav {
    gap: 15px;
  }

  .primary-nav a {
    gap: 5px;
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .primary-nav a span {
    display: none;
  }

  .header-aside {
    display: flex;
    gap: 8px;
  }

  .header-clock,
  .header-dot,
  .header-place,
  .header-role {
    display: none;
  }

  .header-people {
    display: inline-block;
    padding: 3px 6px;
    font-size: 7.5px;
  }

  .view-banner {
    top: 52px;
    flex-wrap: wrap;
    gap: 5px 14px;
    min-height: 46px;
    padding-top: 7px;
    padding-bottom: 7px;
    font-size: 8px;
  }

  .view-banner button {
    font-size: 7.5px;
  }

  .header-exit {
    padding-left: 0;
    border-left: 0;
    font-size: 8.5px;
    letter-spacing: 0.08em;
    color: var(--muted);
  }

  .hero {
    min-height: 100svh;
  }

  .hero__inner {
    padding-top: 126px;
    padding-bottom: 92px;
  }

  .hero__media img {
    object-position: 66% 58%;
  }

  .hero__eyebrow {
    flex-wrap: wrap;
    gap: 10px;
    font-size: 8px;
    letter-spacing: 0.18em;
  }

  .hero__eyebrow .rule {
    width: 22px;
  }

  .hero__vol {
    display: none;
  }

  .hero__title {
    font-size: clamp(4.4rem, 23vw, 8rem);
    line-height: 0.95;
  }

  .hero__line--indent {
    padding-left: 16vw;
  }

  .hero__foot {
    margin-top: 34px;
    padding-top: 18px;
  }

  .hero__statement {
    font-size: 14px;
    line-height: 1.9;
  }

  .hero__actions {
    flex-wrap: wrap;
    gap: 18px 28px;
    margin-top: 26px;
  }

  .hero__bottom {
    bottom: 18px;
    font-size: 6.5px;
  }

  .overture {
    grid-template-columns: 36px minmax(0, 1fr);
    padding-top: 80px;
    padding-bottom: 86px;
    gap: 18px;
  }

  .overture__mark {
    font-size: 3rem;
  }

  .overture__line {
    font-size: clamp(1.45rem, 6.4vw, 2rem);
    line-height: 1.8;
  }

  .overture__note {
    grid-column: 2;
    font-size: 9px;
  }

  .section {
    padding-top: 78px;
    padding-bottom: 84px;
  }

  .section-heading__main {
    margin-top: 28px;
  }

  .section-heading h2 {
    font-size: clamp(3rem, 15vw, 5rem);
  }

  .section-heading__aside {
    display: block;
    padding-bottom: 0;
  }

  .section-heading__aside .line-button {
    margin-top: 20px;
  }

  .section-meta {
    margin-top: 34px;
  }

  .section-meta__hint {
    display: none;
  }

  .gallery-grid {
    columns: 1;
    margin-top: 28px;
  }

  .photo-card {
    margin-bottom: 30px;
  }

  .photo-card__title {
    font-size: 16px;
  }

  .journal-section {
    margin-top: 28px;
    padding-top: 80px;
    padding-bottom: 86px;
  }

  .journal-intro {
    display: block;
  }

  .journal-intro h2 {
    font-size: clamp(3.4rem, 17vw, 5.4rem);
  }

  .journal-intro .line-button {
    margin-top: 26px;
  }

  .journal-index {
    display: none;
  }

  .entries {
    margin-top: 40px;
  }

  .entry__title {
    font-size: 1.35rem;
  }

  .entry__body {
    font-size: 13.5px;
    line-height: 2.05;
  }

  .entry__actions {
    opacity: 1;
  }

  .entry__foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .entry__number {
    font-size: 34px;
  }

  .file-chip span {
    max-width: 190px;
  }

  .about {
    padding-top: 84px;
    padding-bottom: 90px;
  }

  .about__quote h2 {
    font-size: clamp(2rem, 9.5vw, 3.1rem);
    line-height: 1.55;
  }

  .about__quote-mark {
    font-size: 43vw;
    right: -6vw;
    bottom: 2vw;
  }

  .about__columns {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .about__facts {
    display: block;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-bottom: 24px;
  }

  .site-footer__line,
  .site-footer__meta {
    grid-column: 1;
    grid-row: auto;
  }

  .site-footer__meta {
    align-items: flex-start;
    margin-top: 10px;
  }

  .modal {
    padding: 0;
  }

  .modal__panel {
    width: 100%;
    height: 100svh;
    max-height: none;
    border: 0;
    transform: translateY(3%);
  }

  .modal.is-open .modal__panel {
    transform: translateY(0);
  }

  .person-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 12px;
  }

  .person-avatar {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .person-counts {
    display: none;
  }

  .person-action {
    font-size: 7px;
  }

  .modal__head {
    padding: 22px 20px 17px;
  }

  .modal__head h2 {
    font-size: 22px;
  }

  .modal__body {
    padding: 22px 20px 8px;
  }

  .modal__foot {
    padding: 14px 20px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }

  .upload-status {
    max-width: 120px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .dropzone {
    min-height: 175px;
    padding: 22px 16px;
  }

  .dropzone__title {
    font-size: 15px;
  }

  .dropzone__hint {
    line-height: 1.8;
  }

  .queue-item {
    grid-template-columns: 50px minmax(0, 1fr) 26px;
    gap: 12px;
  }

  .queue-item__thumb {
    width: 50px;
    height: 50px;
  }

  .btn {
    padding: 12px 18px;
  }

  .confirm {
    width: calc(100% - 36px);
    padding: 26px;
  }

  .lightbox__frame {
    padding: 62px 16px 20px;
    overflow-y: auto;
    align-items: flex-start;
  }

  .lightbox__figure {
    grid-template-columns: 1fr;
    gap: 22px;
    max-height: none;
  }

  .lightbox__image-wrap {
    height: auto;
    max-height: 54svh;
    min-height: 200px;
  }

  .lightbox__image-wrap img {
    max-height: 54svh;
  }

  .lightbox__caption {
    max-height: none;
    overflow: visible;
    padding-bottom: 50px;
  }

  .lightbox__caption h2 {
    margin-top: 16px;
  }

  .lightbox__close {
    position: fixed;
    top: 14px;
    right: 14px;
    background: rgba(10, 11, 12, 0.82);
  }

  .lightbox__nav {
    position: fixed;
    top: auto;
    bottom: 16px;
    transform: none;
    background: rgba(10, 11, 12, 0.82);
  }

  .lightbox__nav--prev {
    left: 16px;
  }

  .lightbox__nav--next {
    right: 16px;
  }

  .toast-region {
    right: 14px;
    bottom: 14px;
    left: 14px;
    align-items: stretch;
  }

  .toast {
    max-width: none;
  }
}

@media (max-width: 390px) {
  .primary-nav {
    gap: 10px;
  }

  .primary-nav a {
    font-size: 8.5px;
  }

  .hero__title {
    font-size: 22vw;
  }

  .hero__actions {
    gap: 16px;
  }

  .text-link {
    font-size: 9px;
  }

  .hero__bottom span:last-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero__media img {
    transform: none;
  }

  html.motion-ready .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   公共留言墙 + 密保提示（追加样式）
   ============================================================ */

.modal__panel--chat {
  max-width: 620px;
}

.chat-log {
  max-height: 46vh;
  min-height: 180px;
  overflow-y: auto;
  padding: 4px 2px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
}

.chat-empty {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  padding: 40px 0;
}

.chat-item {
  border-left: 2px solid var(--line-strong);
  padding-left: 12px;
}

.chat-item.is-mine {
  border-left-color: var(--accent);
}

.chat-item__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}

.chat-item__name {
  font-size: 13px;
  color: var(--paper);
  letter-spacing: 0.04em;
}

.chat-item__tag {
  margin-left: 6px;
  font-size: 10px;
  color: var(--accent-dim);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 4px;
}

.chat-item__time {
  font-size: 11px;
  color: var(--faint);
  font-family: var(--mono);
}

.chat-item__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--paper-soft);
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-form {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.chat-form input {
  flex: 1;
  min-width: 0;
  background: rgba(10, 11, 12, 0.6);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--paper);
  font-size: 14px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.2s var(--ease-soft);
}

.chat-form input:focus {
  border-color: var(--line-strong);
}

.chat-error {
  margin-top: 8px;
}

.chat-hint {
  margin: 12px 0 0;
  font-size: 11px;
  color: var(--faint);
  line-height: 1.6;
}

.account-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.account-divider {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 18px 0 4px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent-dim);
}

.account-divider small {
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0;
}
/* ============================================================
   羁绊：留言可见性、关联面板、结线仪式
   ============================================================ */

.chat-visibility {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(183, 165, 138, 0.08);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--paper-soft);
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 0 10px;
  min-width: 86px;
  cursor: pointer;
  transition: border-color 0.2s var(--ease-soft), color 0.2s var(--ease-soft);
}

.chat-visibility:focus {
  outline: none;
  border-color: var(--line-strong);
  color: var(--paper);
}

.chat-item__vis {
  margin-left: 8px;
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 1px 6px;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--accent-dim);
  cursor: pointer;
  transition: color 0.2s var(--ease-soft), border-color 0.2s var(--ease-soft);
  vertical-align: middle;
}

.chat-item__vis--secret {
  color: var(--muted);
  border-color: rgba(119, 115, 107, 0.4);
}

.chat-item__vis--bond {
  color: var(--accent);
  border-color: rgba(183, 165, 138, 0.4);
}

.chat-item__vis:hover:not(:disabled) {
  color: var(--paper);
  border-color: var(--line-strong);
}

.chat-item__vis:disabled {
  cursor: default;
  opacity: 0.7;
}

/* ---------- 关联面板 ---------- */

.modal__panel--bond {
  max-width: 660px;
}

.bond-body {
  padding: 22px 26px 26px;
  max-height: 68vh;
  overflow-y: auto;
}

.bond-lead {
  margin: 0 0 22px;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 2;
  color: var(--paper-soft);
  letter-spacing: 0.02em;
}

.bond-label {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--faint);
}

.bond-code-block {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.bond-code-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.bond-code {
  font-family: var(--mono);
  font-size: 22px;
  letter-spacing: 0.28em;
  color: var(--paper);
  padding: 6px 0 6px 2px;
  text-shadow: 0 0 18px rgba(183, 165, 138, 0.28);
}

.bond-code.is-empty {
  color: var(--faint);
  letter-spacing: 0.1em;
}

.bond-tip {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--faint);
  line-height: 1.7;
}

.bond-join {
  margin-top: 22px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.bond-join .field {
  flex: 1;
  min-width: 0;
}

.bond-join input {
  font-family: var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bond-error {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--danger);
  min-height: 1em;
}

.bond-empty {
  margin: 0;
  font-size: 12px;
  color: var(--faint);
  line-height: 1.8;
}

/* 已关联 */

.bond-partner {
  position: relative;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background:
    radial-gradient(circle at 50% 0%, rgba(183, 165, 138, 0.09), transparent 62%),
    rgba(8, 9, 10, 0.6);
  text-align: center;
}

.bond-partner__kicker {
  margin: 0 0 8px;
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--faint);
}

.bond-partner__name {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: 0.06em;
  color: var(--paper);
  text-shadow: 0 0 26px rgba(183, 165, 138, 0.22);
}

.bond-partner__meta {
  margin: 0;
  font-size: 11px;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  color: var(--muted);
}

.bond-section {
  margin-top: 24px;
}

.bond-section__title {
  margin: 0 0 12px;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--accent-dim);
}

.bond-anniversaries {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.bond-anniversary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(222, 216, 204, 0.03);
  border-left: 2px solid rgba(183, 165, 138, 0.32);
}

.bond-anniversary__title {
  margin: 0 0 3px;
  font-size: 14px;
  color: var(--paper);
}

.bond-anniversary__date {
  margin: 0;
  font-size: 11px;
  font-family: var(--mono);
  color: var(--muted);
}

.bond-anniversary__del {
  background: none;
  border: none;
  color: var(--faint);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  transition: color 0.2s var(--ease-soft);
}

.bond-anniversary__del:hover {
  color: var(--danger);
}

.bond-anniversary-form {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.bond-anniversary-form input[type="text"] {
  flex: 1;
  min-width: 180px;
  background: rgba(10, 11, 12, 0.6);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--paper);
  font-size: 13px;
  padding: 9px 11px;
  outline: none;
}

.bond-anniversary-form input[type="date"] {
  background: rgba(10, 11, 12, 0.6);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--paper-soft);
  font-size: 12px;
  padding: 8px 10px;
  color-scheme: dark;
  outline: none;
}

.bond-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.bond-feed__item {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(8, 9, 10, 0.45);
}

.bond-feed__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.bond-feed__time {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  letter-spacing: 0.08em;
}

.bond-feed__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.75;
  color: var(--paper-soft);
  white-space: pre-wrap;
  word-break: break-word;
}

.bond-footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: center;
}

/* ---------- 结线仪式 ---------- */

.bond-ceremony {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050607;
  overflow: hidden;
}

.bond-ceremony__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 46%, rgba(183, 165, 138, 0.13), transparent 46%),
    radial-gradient(circle at 18% 78%, rgba(88, 96, 104, 0.16), transparent 58%),
    radial-gradient(circle at 84% 22%, rgba(120, 96, 78, 0.12), transparent 54%),
    #050607;
  opacity: 0;
}

.bond-ceremony.is-playing .bond-ceremony__veil {
  animation: ceremonyVeil 2.6s var(--ease-soft) forwards;
}

@keyframes ceremonyVeil {
  from { opacity: 0; transform: scale(1.06); }
  to { opacity: 1; transform: scale(1); }
}

.bond-ceremony__dust {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bond-ceremony__dust span {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(222, 216, 204, 0.55);
  box-shadow: 0 0 6px rgba(222, 216, 204, 0.35);
  opacity: 0;
}

.bond-ceremony__dust span:nth-child(1) { left: 12%; top: 72%; }
.bond-ceremony__dust span:nth-child(2) { left: 26%; top: 84%; }
.bond-ceremony__dust span:nth-child(3) { left: 38%; top: 66%; }
.bond-ceremony__dust span:nth-child(4) { left: 52%; top: 88%; }
.bond-ceremony__dust span:nth-child(5) { left: 64%; top: 74%; }
.bond-ceremony__dust span:nth-child(6) { left: 76%; top: 62%; }
.bond-ceremony__dust span:nth-child(7) { left: 84%; top: 82%; }
.bond-ceremony__dust span:nth-child(8) { left: 18%; top: 46%; }
.bond-ceremony__dust span:nth-child(9) { left: 70%; top: 42%; }
.bond-ceremony__dust span:nth-child(10) { left: 46%; top: 52%; }

.bond-ceremony.is-playing .bond-ceremony__dust span {
  animation: ceremonyDust 7s linear infinite;
  animation-delay: calc(var(--i, 0) * 0.6s);
}

@keyframes ceremonyDust {
  0% { opacity: 0; transform: translateY(0) scale(0.7); }
  18% { opacity: 0.55; }
  62% { opacity: 0.4; }
  100% { opacity: 0; transform: translateY(-26vh) scale(1.1); }
}

.bond-ceremony__stage {
  position: relative;
  width: min(620px, 86vw);
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bond-ceremony__orbs {
  position: absolute;
  inset: 0;
}

.bond-ceremony__orb {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: rgba(222, 216, 204, 0.9);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.14em;
  opacity: 0;
  filter: blur(6px);
  background: radial-gradient(circle at 50% 42%, rgba(222, 216, 204, 0.3), rgba(183, 165, 138, 0.16) 42%, transparent 68%);
  box-shadow:
    0 0 40px rgba(183, 165, 138, 0.22),
    inset 0 0 30px rgba(222, 216, 204, 0.12);
  transform: translate(-50%, -50%);
}

.bond-ceremony__orb em {
  font-style: normal;
  max-width: 84px;
  text-align: center;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-shadow: 0 0 14px rgba(222, 216, 204, 0.4);
}

.bond-ceremony.is-playing .bond-ceremony__orb:nth-child(1) {
  animation: ceremonyOrbLeft 2.6s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}

.bond-ceremony.is-playing .bond-ceremony__orb:nth-child(2) {
  animation: ceremonyOrbRight 2.6s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}

@keyframes ceremonyOrbLeft {
  0% { opacity: 0; filter: blur(10px); transform: translate(calc(-50% - 42vw), -50%) scale(0.5); }
  35% { opacity: 0.7; filter: blur(4px); }
  72% { opacity: 1; filter: blur(0); transform: translate(calc(-50% - 48px), -50%) scale(1); }
  100% { opacity: 0.94; transform: translate(calc(-50% - 62px), -50%) scale(1); }
}

@keyframes ceremonyOrbRight {
  0% { opacity: 0; filter: blur(10px); transform: translate(calc(-50% + 42vw), -50%) scale(0.5); }
  35% { opacity: 0.7; filter: blur(4px); }
  72% { opacity: 1; filter: blur(0); transform: translate(calc(-50% + 48px), -50%) scale(1); }
  100% { opacity: 0.94; transform: translate(calc(-50% + 62px), -50%) scale(1); }
}

.bond-ceremony__thread {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(560px, 80vw);
  height: 80px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.bond-ceremony__path {
  fill: none;
  stroke: rgba(222, 216, 204, 0.7);
  stroke-width: 1.1;
  stroke-dasharray: 460;
  stroke-dashoffset: 460;
  filter: drop-shadow(0 0 8px rgba(183, 165, 138, 0.5));
}

.bond-ceremony.is-playing .bond-ceremony__path {
  animation: ceremonyThread 2.4s cubic-bezier(0.4, 0, 0.2, 1) 2.5s forwards;
}

@keyframes ceremonyThread {
  to { stroke-dashoffset: 0; }
}

.bond-ceremony__ring {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  border: 1px solid rgba(222, 216, 204, 0.35);
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
}

.bond-ceremony.is-playing .bond-ceremony__ring {
  animation: ceremonyRing 3.4s ease-out 2.3s 2;
}

@keyframes ceremonyRing {
  0% { opacity: 0.55; transform: translate(-50%, -50%) scale(0.6); }
  60% { opacity: 0.14; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(3.4); }
}

.bond-ceremony__line {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(46% + 116px);
  margin: 0;
  text-align: center;
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.02em;
  color: rgba(222, 216, 204, 0.92);
  opacity: 0;
  text-shadow: 0 0 24px rgba(183, 165, 138, 0.32);
}

.bond-ceremony.is-playing .bond-ceremony__line {
  animation: ceremonyText 3.2s var(--ease) 4.2s forwards;
}

.bond-ceremony__date {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(46% + 156px);
  margin: 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: rgba(119, 115, 107, 0.9);
  opacity: 0;
}

.bond-ceremony.is-playing .bond-ceremony__date {
  animation: ceremonyText 2.6s var(--ease) 5s forwards;
}

@keyframes ceremonyText {
  0% { opacity: 0; letter-spacing: 0.02em; transform: translateY(8px); }
  100% { opacity: 1; letter-spacing: 0.22em; transform: translateY(0); }
}

.bond-ceremony__skip {
  position: absolute;
  right: 26px;
  bottom: 22px;
  background: none;
  border: none;
  color: rgba(119, 115, 107, 0.8);
  font-size: 11px;
  letter-spacing: 0.2em;
  cursor: pointer;
  padding: 6px;
  opacity: 0;
  transition: color 0.3s var(--ease-soft), opacity 0.3s var(--ease-soft);
}

.bond-ceremony.is-playing .bond-ceremony__skip {
  animation: ceremonyText 1.6s ease 1.2s forwards;
}

.bond-ceremony__skip:hover {
  color: var(--paper-soft);
}

.bond-ceremony.is-playing {
  animation: ceremonyOut 1.2s var(--ease-soft) 6.8s forwards;
}

@keyframes ceremonyOut {
  to { opacity: 0; }
}