:root {
  color-scheme: dark;
  --bg: #14160f;
  --bg-raise: #1c2016;
  --card: #24281c;
  --card-2: #2c3222;
  --line: #3c4330;
  --line-strong: #535b42;
  --text: #f3f0e2;
  --muted: #b7bba4;
  --faint: #8d927c;
  --grass: #6fbf45;
  --grass-deep: #3e7a24;
  --gold: #e6b84d;
  --gold-deep: #8a6a28;
  --diamond: #3ecfc4;
  --danger: #e15b52;
  --ink: #14200c;
  --shadow: #0b0c09;
  --online: #8adf55;
  --offline: #9a8f88;
  --unknown: #d7c27a;
  --radius: 2px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(900px 420px at 50% -120px, rgba(111, 191, 69, .22), transparent 60%),
    radial-gradient(700px 320px at 100% 0, rgba(230, 184, 77, .12), transparent 50%),
    var(--bg);
  min-height: 100vh;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: #f3d48a; }
img { max-width: 100%; display: block; }
code { font-family: var(--mono); font-size: .92em; }

.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(20, 22, 15, .9);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--line);
}
.header-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: .04em;
}
.brand:hover { color: var(--text); }
.block-logo {
  width: 28px;
  height: 28px;
  background:
    linear-gradient(#7dce55, #7dce55) 0 0 / 100% 42% no-repeat,
    linear-gradient(#6d4b2b, #6d4b2b) 0 42% / 100% 58% no-repeat;
  box-shadow: inset -3px -3px 0 rgba(0, 0, 0, .28), inset 3px 3px 0 rgba(255, 255, 255, .2), 3px 3px 0 var(--shadow);
}
.nav { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.nav a, .btn, .chip, .text-btn {
  border: 2px solid var(--line);
  background: var(--bg-raise);
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 var(--shadow);
}
.nav a, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 6px 12px;
  font-weight: 700;
}
.nav a:hover, .btn:hover, .chip:hover, .text-btn:hover {
  transform: translate(-1px, -1px);
  border-color: var(--line-strong);
}
.nav a[aria-current="page"] {
  background: var(--gold);
  color: #2a2108;
  border-color: var(--gold-deep);
}
.nav a[aria-current="page"]:hover { color: #2a2108; }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn-primary { background: var(--grass); color: var(--ink); border-color: var(--grass-deep); }
.btn-ghost { background: transparent; }
.btn-danger { background: transparent; color: #ffb1ab; border-color: #7a3a36; }
.btn-small { min-height: 32px; padding: 4px 8px; font-size: 13px; box-shadow: 2px 2px 0 var(--shadow); }

.hero { padding: 54px 0 18px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .16em;
}
.hero h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: .02em;
}
.hero-sub { max-width: 640px; margin: 12px 0 0; color: var(--muted); font-size: 18px; }
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  padding: 8px 8px 8px 14px;
  background: var(--bg-raise);
  border: 2px solid var(--line);
  box-shadow: 5px 5px 0 var(--shadow);
}
.search svg { width: 18px; height: 18px; color: var(--faint); flex: none; }
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  padding: 10px 4px;
}
.search input::placeholder { color: var(--faint); }

.notice {
  margin: 8px 0 0;
  padding: 12px 14px;
  background: rgba(230, 184, 77, .12);
  border: 2px solid var(--gold-deep);
  color: #f6e2ae;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 22px 0;
}
.stat, .card, .login-card, .modal, .admin-row {
  background: var(--card);
  border: 2px solid #1a1c14;
  box-shadow: 4px 4px 0 var(--shadow);
}
.stat { padding: 16px 18px; }
.stat b {
  display: block;
  font-size: 32px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat span { color: var(--muted); }

.toolbar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 5px 10px;
  color: var(--muted);
  box-shadow: 2px 2px 0 var(--shadow);
}
.chip.active { background: var(--gold); color: #2a2108; border-color: var(--gold-deep); }
.toolbar-row, .panel-actions, .card-foot, .admin-row, .side-link {
  display: flex;
  align-items: center;
  gap: 10px;
}
.toolbar-row { flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.select, .field input, .field textarea, .field select, .login-card input {
  background: #15180f;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  outline: none;
  width: 100%;
}
.select { width: auto; }
.field input:focus, .field textarea:focus, .field select:focus, .search:focus-within, .login-card input:focus {
  border-color: var(--gold);
}
.result-count { color: var(--faint); font-size: 14px; margin-bottom: 12px; }

.stack { display: flex; flex-direction: column; gap: 28px; }
.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 20px;
}
.section-head::after { content: ""; flex: 1; height: 2px; background: var(--line); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }

.card {
  --accent: var(--grass);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 16px 14px 18px;
  min-height: 230px;
}
.card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--accent);
}
.card.featured { border-color: var(--gold-deep); }
.card:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.ribbon {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--gold);
  color: #2a2108;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
}
.card-top { display: flex; gap: 12px; padding-right: 52px; }
.avatar {
  width: 52px;
  height: 52px;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  color: #f4f1e4;
  background:
    linear-gradient(var(--accent), var(--accent)) 0 0 / 100% 46% no-repeat,
    linear-gradient(#2a241c, #2a241c) 0 46% / 100% 54% no-repeat;
  box-shadow: inset -3px -3px 0 rgba(0, 0, 0, .25), 3px 3px 0 var(--shadow);
}
.avatar img { width: 52px; height: 52px; object-fit: cover; }
.card h3 { margin: 0; font-size: 20px; line-height: 1.3; }
.text-btn {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font-weight: 800;
  text-align: left;
}
.text-btn:hover { color: var(--gold); transform: none; }
.meta { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.desc { margin: 0; color: var(--muted); flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  border: 0;
  background: var(--card-2);
  color: var(--muted);
  padding: 2px 8px;
  font-size: 12px;
}
.tag:hover { color: var(--text); }
.meter { height: 8px; background: #15180f; border: 2px solid #1a1c14; }
.meter span { display: block; height: 100%; background: var(--accent); }
.card-foot { margin-top: auto; }
.players { font-variant-numeric: tabular-nums; font-weight: 800; min-width: 72px; }
.addr {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--gold);
  background: transparent;
  border: 0;
  box-shadow: none;
  text-align: left;
  padding: 0;
}
.status { font-size: 12px; font-weight: 800; }
.status.online { color: var(--online); }
.status.offline { color: var(--offline); }
.status.unknown { color: var(--unknown); }
.status::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  background: currentColor;
  box-shadow: 1px 1px 0 var(--shadow);
}

.empty {
  padding: 48px 16px;
  text-align: center;
  color: var(--muted);
  border: 2px dashed var(--line);
}

.modal-back {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
  background: rgba(8, 9, 6, .72);
  overflow: auto;
}
.modal { width: min(680px, 100%); padding: 22px; margin: auto; }
.modal-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.modal h2 { margin: 0 0 6px; font-size: 28px; }
.modal-body { display: flex; flex-direction: column; gap: 12px; }
.modal-body p { margin: 0; }
.kv { display: grid; grid-template-columns: 88px 1fr; gap: 6px 10px; margin: 0; }
.kv dt { color: var(--faint); }
.kv dd { margin: 0; }
.motd {
  margin: 0;
  padding: 10px 12px;
  background: #10140c;
  border-left: 4px solid var(--grass);
  color: #d5ecc4;
  font-family: var(--mono);
  font-size: 14px;
}
.sample { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; }
.sample li { background: var(--card-2); padding: 2px 8px; font-size: 13px; }
.link-row { display: flex; flex-wrap: wrap; gap: 8px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 60;
  background: var(--gold);
  color: #2a2108;
  font-weight: 800;
  padding: 10px 14px;
  box-shadow: 4px 4px 0 var(--shadow);
}

.site-footer {
  margin-top: 48px;
  border-top: 2px solid var(--line);
  color: var(--faint);
  font-size: 14px;
}
.footer-inner { min-height: 72px; }

.admin-body { background: var(--bg); }
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card { width: min(440px, 100%); padding: 28px; }
.login-card h1 { margin: 12px 0 8px; font-size: 32px; }
.login-card p { margin: 0 0 16px; color: var(--muted); }
.hint {
  margin-bottom: 14px;
  padding: 10px 12px;
  background: rgba(230, 184, 77, .12);
  border: 2px solid var(--gold-deep);
  color: #f6e2ae;
  font-size: 14px;
}
.login-card .btn { width: 100%; margin-top: 12px; }
.error-text { min-height: 1.4em; margin: 8px 0 0; color: #ffb1ab; font-size: 14px; }
.back-site { display: inline-block; margin-top: 14px; }

.admin-shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 16px;
  background: #181b12;
  border-right: 2px solid var(--line);
}
.side nav { display: flex; flex-direction: column; gap: 6px; }
.side-link {
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--muted);
  border: 2px solid transparent;
  box-shadow: none;
  padding: 10px 12px;
  font-weight: 700;
}
.side-link.active { background: var(--card); color: var(--text); border-color: var(--line); box-shadow: 3px 3px 0 var(--shadow); }
.side .spacer { flex: 1; }
.side-note { color: var(--faint); font-size: 12px; line-height: 1.5; }
.main { padding: 28px 28px 72px; width: min(1080px, 100%); }
.admin-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 18px; }
.admin-top h1 { margin: 0; font-size: 30px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-row { align-items: stretch; padding: 12px; gap: 12px; }
.admin-row.dim { opacity: .62; }
.admin-row.dragging { opacity: .45; }
.drag {
  width: 28px;
  flex: none;
  border: 0;
  background: transparent;
  color: var(--faint);
  box-shadow: none;
  cursor: grab;
}
.row-main { flex: 1; min-width: 0; }
.row-main strong { display: block; font-size: 17px; }
.row-main p { margin: 2px 0 0; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.badge { font-size: 12px; font-weight: 800; padding: 1px 7px; background: #343b2a; color: var(--text); }
.badge.good { color: var(--online); }
.badge.warn { color: var(--unknown); }
.badge.gold { color: #2a2108; background: var(--gold); }
.row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 430px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.wide { grid-column: 1 / -1; }
.field span, .check-line { color: var(--muted); font-size: 14px; }
.field textarea { min-height: 88px; resize: vertical; }
.check-line { display: flex; align-items: center; gap: 8px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch {
  width: 28px;
  height: 28px;
  border: 2px solid #111;
  box-shadow: 2px 2px 0 var(--shadow);
  padding: 0;
}
.swatch.active { outline: 2px solid var(--text); outline-offset: 2px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel-card { background: var(--card); border: 2px solid #1a1c14; box-shadow: 4px 4px 0 var(--shadow); padding: 18px; }
.panel-card h2 { margin: 0 0 12px; font-size: 20px; }
.help { color: var(--faint); font-size: 13px; margin: 8px 0 0; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.photo-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  overflow: hidden;
  text-align: left;
  color: inherit;
  background: var(--card);
  border: 2px solid #1a1c14;
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--shadow);
}
.photo-card:hover {
  transform: translate(-1px, -1px);
  border-color: var(--line-strong);
}
.photo-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.photo-frame {
  display: grid;
  aspect-ratio: 4 / 3;
  background: #15180f;
  overflow: hidden;
}
.photo-frame > * { grid-area: 1 / 1; width: 100%; height: 100%; min-height: 0; }
.photo-frame img { object-fit: cover; }
.photo-fallback {
  display: grid;
  place-items: center;
  padding: 12px;
  text-align: center;
  color: var(--faint);
  font-weight: 700;
  background: #15180f;
}
.photo-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px 14px;
}
.photo-body strong { font-size: 17px; line-height: 1.35; }
.photo-body .meta { margin: 0; }

.save-list { display: flex; flex-direction: column; gap: 12px; }
.save-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: var(--card);
  border: 2px solid #1a1c14;
  box-shadow: 4px 4px 0 var(--shadow);
}
.save-main { flex: 1; min-width: 0; }
.save-main h2 { margin: 0; font-size: 20px; line-height: 1.35; overflow-wrap: anywhere; }
.save-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.save-meta .tag { cursor: default; }
.save-meta .tag:hover { color: var(--muted); }
.save-note { margin: 8px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.save-row .btn { margin-left: auto; flex: none; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 28px 20px;
  background: rgba(8, 9, 6, .84);
  overflow: auto;
}
.lightbox-dialog { width: min(1040px, 100%); }
.lightbox-stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "close close close"
    "prev frame next"
    "caption caption caption";
  gap: 12px;
  align-items: center;
}
.lightbox-close { grid-area: close; justify-self: end; }
.lightbox-prev { grid-area: prev; }
.lightbox-next { grid-area: next; }
.lightbox-frame {
  grid-area: frame;
  min-height: 220px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #10140c;
  border: 2px solid var(--line);
  box-shadow: 6px 6px 0 var(--shadow);
}
.lightbox-frame img {
  width: 100%;
  max-height: min(70vh, 680px);
  object-fit: contain;
}
.lightbox-frame .photo-fallback { width: 100%; min-height: 220px; }
.lightbox-caption {
  grid-area: caption;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
}
.lightbox-caption strong { font-size: 20px; }
.lightbox-caption .meta { margin: 0; }
.lightbox-count {
  margin-left: auto;
  color: var(--faint);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  .stats, .stat-grid, .split, .form-grid { grid-template-columns: 1fr 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .side { position: relative; height: auto; border-right: 0; border-bottom: 2px solid var(--line); }
  .side nav { flex-direction: row; overflow-x: auto; }
  .side-link { width: auto; white-space: nowrap; }
  .row-actions { max-width: none; justify-content: flex-start; }
  .admin-row { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .stats, .stat-grid, .split, .form-grid, .kv { grid-template-columns: 1fr; }
  .header-inner, .footer-inner { flex-wrap: wrap; padding: 12px 0; }
  .hero { padding-top: 32px; }
  .main { padding: 18px 14px 48px; }
  .search { flex-wrap: wrap; }
  .card-top { padding-right: 0; }
  .ribbon { position: static; align-self: flex-start; }
  .save-row { align-items: stretch; flex-direction: column; }
  .save-row .btn { margin-left: 0; width: 100%; }
  .lightbox { padding: 12px; }
  .lightbox-stage {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "close close"
      "frame frame"
      "prev next"
      "caption caption";
  }
  .lightbox-prev, .lightbox-next { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
  .btn:hover, .chip:hover, .nav a:hover, .photo-card:hover { transform: none; }
}

/* 单页分区：锚点跳转时避开顶部导航 */
.anchor-section { scroll-margin-top: 84px; }
#photos, #saves { padding-top: 40px; }

/* 照片墙：Bento Grid —— 一个大面板，每个服务器一块，大小不一的圆角瓷砖 */
.photo-panel { display: grid; gap: 14px; padding: 14px; border: 2px solid var(--line); border-radius: 18px; background: var(--bg-raise); }
.photo-block { padding: 0; }
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 140px; grid-auto-flow: dense; gap: 10px; }
.bento-tile { position: relative; overflow: hidden; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--text); margin: 0; padding: 0; font: inherit; text-align: left; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.bento-tile:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0,0,0,.35); border-color: var(--line-strong); }
.bento-tile:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.t-one { grid-column: span 1; grid-row: span 1; }
.t-wide { grid-column: span 2; grid-row: span 1; }
.t-tall { grid-column: span 1; grid-row: span 2; }
.t-hero { grid-column: span 2; grid-row: span 2; }
.bento-photo { cursor: zoom-in; background: var(--card-2); }
.bento-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.bento-caption { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 2px; padding: 28px 12px 10px; background: linear-gradient(to top, rgba(8,10,6,.88), rgba(8,10,6,.45) 60%, transparent); font-size: 12px; color: #e9e6d6; }
.bento-caption strong { font-size: 14px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bento-caption strong:empty { display: none; }
.bento-caption span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .85; }
.bento-photo.broken img { display: none; }
.bento-photo.broken::before { content: "图片加载失败"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.bento-info { display: flex; flex-direction: column; gap: 5px; padding: 12px 14px; background: linear-gradient(140deg, var(--card-2), var(--card) 70%); }
.bento-info:hover { transform: none; box-shadow: none; }
.bento-info-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bento-info-head .avatar { flex: none; }
.bento-info-head > div:last-child { min-width: 0; display: grid; gap: 4px; }
.bento-info h3 { margin: 0; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bento-badge { justify-self: start; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.06); color: var(--unknown); }
.bento-badge.on { color: var(--online); background: rgba(138,223,85,.12); }
.bento-badge.off { color: var(--offline); }
.bento-desc { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bento-count { margin-top: auto; font-size: 12px; color: var(--faint); }
.bento-upload { display: grid; place-content: center; justify-items: center; gap: 4px; cursor: pointer; border: 2px dashed var(--line-strong); background: rgba(111,191,69,.06); color: var(--muted); text-align: center; }
.bento-upload:hover { color: var(--text); border-color: var(--grass); background: rgba(111,191,69,.12); }
.bento-plus { font-size: 30px; line-height: 1; color: var(--grass); }
@media (max-width: 900px) { .bento { grid-auto-rows: 120px; } }
@media (max-width: 640px) {
  .photo-panel { padding: 8px; gap: 10px; border-radius: 14px; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 110px; gap: 8px; }
  .bento-info { padding: 12px; }
  .bento-info h3 { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .bento-tile, .bento-tile:hover { transition: none; transform: none; }
}

/* 添加服务器：草稿 */
.draft-box:empty { display: none; }
.draft-box { margin-bottom: 12px; }
.draft-offer { margin: 0 0 8px; }
.drafts summary { cursor: pointer; color: var(--muted); }
.draft-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.draft-row { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.draft-row.active { border-color: var(--gold); }
.draft-info { flex: 1; min-width: 0; display: grid; }
.draft-info strong, .draft-info .meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0; }
@media (max-width: 640px) { .draft-row { flex-wrap: wrap; } }

/* 照片墙标题行：说明 + 添加照片按钮 */
.photo-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.photo-head-row .hero-sub { margin: 0; }

/* 粘贴 / 拖拽图片区 */
.paste-zone { display: grid; gap: 8px; padding: 14px; margin: 4px 0 12px; border: 2px dashed var(--line-strong); border-radius: 12px; background: rgba(111,191,69,.05); color: var(--muted); cursor: pointer; caret-color: transparent; outline: none; text-align: center; }
.paste-zone:focus-visible, .paste-zone.drag { border-color: var(--grass); background: rgba(111,191,69,.12); color: var(--text); }
.paste-zone.has-image .paste-hint { font-size: 12px; }
.paste-preview { display: flex; align-items: center; gap: 10px; text-align: left; cursor: default; }
.paste-preview img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.paste-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
[data-paste-note]:empty { display: none; }

/* ===== 纪念馆 / 结档 ===== */
.memorial-card {
  position: relative;
  cursor: pointer;
  filter: grayscale(.85);
  opacity: .82;
  border-style: dashed;
  transition: filter .2s, opacity .2s, transform .2s;
}
.memorial-card:hover, .memorial-card:focus-visible { filter: grayscale(.35); opacity: 1; transform: translateY(-2px); }
.memorial-card .avatar { --accent: #6f6f6f; }
.archive-stamp {
  position: absolute; top: 14px; right: 14px;
  padding: 2px 10px; border: 2px solid #c0573f; border-radius: 6px;
  color: #c0573f; font-weight: 700; font-size: 13px; letter-spacing: 2px;
  transform: rotate(8deg); opacity: .9;
}
.archive-stamp.inline { position: static; display: inline-block; margin-left: 8px; vertical-align: middle; font-size: 12px; }
.archive-span { font-variant-numeric: tabular-nums; }
.archive-modal { position: relative; padding: 24px; max-height: 90vh; overflow: auto; }
.archive-modal h3 { margin: 22px 0 8px; font-size: 16px; }
.modal-close { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: inherit; font-size: 26px; cursor: pointer; line-height: 1; }
.archive-head { display: flex; gap: 14px; align-items: center; padding-right: 30px; }
.archive-head h2 { margin: 0; }
.archive-info { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 16px 0; }
.archive-info div { padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.05); }
.archive-info dt { color: var(--muted); font-size: 12px; }
.archive-info dd { margin: 2px 0 0; }
.archive-save { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; padding: 14px; border-radius: 12px; background: rgba(255,255,255,.06); }
.archive-save p { margin: 2px 0; }
.archive-save .wide { flex-basis: 100%; }
.btn-big { padding: 14px 26px; font-size: 18px; }
.pre { white-space: pre-wrap; margin: 6px 0; }
.archive-note { padding: 12px 14px; border-left: 3px solid var(--muted); background: rgba(255,255,255,.04); border-radius: 0 10px 10px 0; }
.sparkline { display: block; width: 100%; height: 64px; color: #7fbf6a; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid rgba(255,255,255,.15); }
.timeline li { position: relative; margin: 0 0 10px; }
.timeline li::before { content: ""; position: absolute; left: -20px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.timeline time { display: inline-block; min-width: 96px; color: var(--muted); font-size: 13px; }
.roster { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.roster li { padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.08); font-family: ui-monospace, monospace; font-size: 13px; }
.archive-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.archive-photos button { padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in; aspect-ratio: 4 / 3; background: #222; }
.archive-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.archive-fields { margin-top: 14px; padding: 10px 12px; border: 1px dashed rgba(255,255,255,.2); border-radius: 10px; }
.archive-fields summary { cursor: pointer; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .memorial-card { transition: none; } .memorial-card:hover { transform: none; } }

.qq-group { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:8px 12px; background:var(--card); border:2px solid var(--grass-deep); box-shadow:3px 3px 0 var(--shadow); }
.qq-label { color:var(--grass); font-weight:700; }
.qq-name { color:var(--text); }
@media (max-width:640px){ .qq-group{ width:100%; } }
