:root {
  --paper: #f3efe4;
  --paper-deep: #e7e0d0;
  --card: #fbf8f2;
  --ink: #1b2822;
  --muted: #5e6a62;
  --line: rgba(27, 40, 34, 0.12);
  --pine: #1e4a38;
  --on-pine: #f6f3ea;
  --pine-soft: #e4efe7;
  --gold: #a67c3d;
  --clay: #8c4632;
  --shadow: 0 16px 40px rgba(30, 42, 34, 0.06);
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", "Songti SC", "Noto Serif SC", serif;
  --sans: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --header: 72px;
  --footer-space: 60px;
}

[data-theme="dark"] {
  --paper: #121815;
  --paper-deep: #1c2420;
  --card: #1a221e;
  --ink: #e8efe9;
  --muted: #a3b0a8;
  --line: rgba(232, 239, 233, 0.12);
  --pine: #9dceae;
  --on-pine: #122018;
  --pine-soft: rgba(157, 206, 174, 0.12);
  --gold: #d4b483;
  --clay: #e0a090;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121815;
    --paper-deep: #1c2420;
    --card: #1a221e;
    --ink: #e8efe9;
    --muted: #a3b0a8;
    --line: rgba(232, 239, 233, 0.12);
    --pine: #9dceae;
    --on-pine: #122018;
    --pine-soft: rgba(157, 206, 174, 0.12);
    --gold: #d4b483;
    --clay: #e0a090;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
#app:has(> .footer) { padding-bottom: var(--footer-space); }
body {
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(30, 74, 56, 0.08), transparent 60%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 8px 22px;
  min-height: var(--header);
  padding: 10px 28px 0;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand, .top-end { align-self: center; }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}
.brand img { width: 36px; height: 36px; }
.brand-name {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  line-height: 1;
}
.brand-domain {
  display: block;
  margin-top: 3px;
  color: var(--pine);
  font-family: var(--serif);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}
.ghost, .text-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.ghost:hover, .text-btn:hover {
  color: var(--ink);
  background: var(--pine-soft);
}
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(27, 40, 34, 0.05);
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover, .icon-btn:focus-visible { color: var(--ink); background: var(--pine-soft); border-color: color-mix(in srgb, var(--ink) 28%, var(--line)); }
.icon-btn .tip {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 30;
  transform: translateX(-50%);
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}
.icon-btn:hover .tip, .icon-btn:focus-visible .tip { opacity: 1; }
a.who:hover .who-name { color: var(--ink); }
.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.profile-head .btn { margin-left: auto; flex: none; }
.profile-actions { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; max-width: 480px; }
.profile-head .profile-actions .btn { margin-left: 0; }
.profile-actions .auth-hint { flex-basis: 100%; text-align: right; margin: 0; overflow-wrap: anywhere; }
.profile-head > .face { width: 72px; height: 72px; }
.profile-head h1 { font-size: 2.4rem; }
.level-line { display: flex; align-items: center; gap: 6px; }
.rank-mark.level-beside { width: 22px; height: 22px; }
.face {
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  display: block;
  background: var(--pine-soft);
}
.person {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 650;
}
.person:hover { color: var(--pine); }
.byline { margin: 0 0 8px; }
.byline .face { width: 32px; height: 32px; }
.byline .person { font-size: 1rem; }
.meta .face { width: 20px; height: 20px; }
.meta .person { gap: 6px; font-size: 0.82rem; font-weight: 600; }
.work-chip-author .face { width: 18px; height: 18px; }
.work-chip-author .person { gap: 6px; font-size: 0.82rem; }
.library-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.message-row .face { width: 40px; height: 40px; }
.bubble-row { display: flex; align-items: flex-end; gap: 8px; }
.bubble-row.mine { flex-direction: row-reverse; }
.bubble-row .face { width: 32px; height: 32px; }
.thread-who .person { font-size: inherit; gap: 12px; }
.profile-edit { max-width: 28rem; margin: -12px 0 28px; display: grid; gap: 16px; }
.profile-edit .row { margin-top: 0; }
.avatar-field { display: grid; gap: 8px; }
.avatar-field > span { color: var(--muted); font-size: 0.86rem; }
.avatar-grid { display: grid; grid-template-columns: repeat(5, 48px); gap: 8px; }
.avatar-choice {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.avatar-choice img { width: 44px; height: 44px; border-radius: 50%; display: block; }
.avatar-choice.on { border-color: var(--pine); }
.avatar-upload-row { display: flex; align-items: center; gap: 12px; }
.avatar-upload { position: relative; }
.avatar-upload .work-file-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.avatar-preview { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.nick-field { display: flex; gap: 8px; align-items: center; }
.nick-field input { flex: 1; min-width: 0; }
.nick-field .btn { flex: none; height: 42px; padding: 0 14px; }
.icon-btn .unread-dot,
.message-row .unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d64545;
  flex: none;
}
.icon-btn .unread-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  box-shadow: 0 0 0 2px var(--card);
}
.message-list { display: flex; flex-direction: column; gap: 8px; }
.message-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: inherit;
}
.message-row .zh { flex: none; }
.message-row .meta { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.bubble {
  max-width: min(32rem, 80%);
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
}
.bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.bubble .meta { margin-top: 6px; opacity: 0.72; }
.bubble.mine { background: var(--pine); color: var(--on-pine); border-color: transparent; }
.bubble.mine p { color: inherit; }
.bubble.mine .meta { opacity: 0.85; }
.thread-form { display: flex; gap: 8px; align-items: flex-end; }
.thread-form textarea { flex: 1; min-height: 44px; resize: vertical; }
.work-photo { width: 100%; height: 180px; object-fit: cover; border-radius: 14px; margin-bottom: 10px; }
.reacts { display: flex; gap: 8px; margin-top: 12px; }
.reacts .btn.on, button.btn.on { background: var(--pine); color: var(--paper); box-shadow: none; }
.check { flex-direction: row !important; align-items: center; gap: 8px; }
.check input { width: 16px; height: 16px; accent-color: var(--pine); }
.switch {
  position: relative;
  display: flex;
  width: 280px;
  margin-left: 8px;
}
.switch button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 14px 8px 12px;
  white-space: nowrap;
  font-family: var(--serif);
  font-size: 1.12rem;
}
.switch button.on { color: var(--ink); }
.switch-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50%;
  height: 2px;
  background: var(--pine);
  transform: translateX(0);
  transition: transform 0.28s ease;
}
.switch.is-plans .switch-bar { transform: translateX(100%); }
.deck { overflow: visible; }
.deck-pane { display: none; }
.deck-pane.active { display: block; }
.pane { padding-top: 22px; }
.guide-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 18px;
  align-items: start;
}
.guide-body:has(.reshuffle-side[hidden]) { grid-template-columns: minmax(0, 1fr); }
.search-row { display: flex; align-items: center; gap: 10px; width: min(420px, 100%); }
.search-row .search { flex: 1; width: auto; min-width: 0; }
.reshuffle {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(27, 40, 34, 0.05);
}
.reshuffle[hidden] { display: none; }
.reshuffle svg { width: 18px; height: 18px; flex: none; }
.reshuffle-side {
  position: sticky;
  top: calc(var(--header) + 16px);
  flex-direction: column;
  gap: 8px;
  width: 46px;
  margin-top: 4px;
  padding: 12px 0 14px;
}
.reshuffle-side span {
  writing-mode: vertical-rl;
  font-size: 0.95rem;
  font-weight: 560;
  letter-spacing: 0.2em;
  line-height: 1;
}
.reshuffle-inline { display: none; }
.reshuffle:hover { border-color: color-mix(in srgb, var(--ink) 28%, var(--line)); }
.reshuffle.is-busy { pointer-events: none; }
.reshuffle.is-busy svg { animation: reshuffle-spin 0.7s linear infinite; }
@keyframes reshuffle-spin { to { transform: rotate(-360deg); } }
.deck.is-plans .reshuffle { display: none; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--pine);
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.back-link svg { width: 18px; height: 18px; }
.rarity {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--pine-soft);
  color: var(--pine);
  font-size: 0.75rem;
}
.rarity.hot { color: var(--clay); background: color-mix(in srgb, var(--clay) 12%, transparent); }
.top-end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.account, .create-menu { position: relative; align-self: center; }
.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 220px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
}
.account-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}
.account:hover .account-menu,
.account:focus-within .account-menu,
.create-menu:hover .account-menu,
.create-menu:focus-within .account-menu {
  opacity: 1;
  pointer-events: auto;
}
.account-menu .ghost { display: block; width: 100%; text-align: left; }
.account-menu a.menu-points { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.menu-rank { display: inline-flex; align-items: center; gap: 4px; color: var(--pine); font-size: 0.78rem; }
.menu-rank .rank-icon { width: 22px; height: 22px; }
.library-list { display: grid; gap: 12px; }
.ledger { display: grid; gap: 10px; }
.ledger-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.ledger-points {
  font-variant-numeric: tabular-nums;
  color: var(--pine);
  font-weight: 600;
  font-size: 18px;
}
.ledger-row a { color: inherit; text-decoration: none; }
.ledger-row a:hover { color: var(--pine); }
.library-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.library-photo,
.library-card .mono {
  width: 92px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
}
.who {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}
.who-name { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.rank { color: var(--pine); font-size: 0.72rem; letter-spacing: 0.04em; }
.rank-mark { width: 40px; height: 40px; display: block; flex: none; }
.rules-pop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 24, 20, 0.48);
}
.rules-card {
  width: min(560px, 100%);
  max-height: min(82vh, 760px);
  overflow: auto;
  scrollbar-width: none;
  padding: 22px 22px 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.rules-card::-webkit-scrollbar { display: none; }
.rules-card h2 { margin: 0; font-family: var(--serif); font-size: 1.6rem; }
.level-list { display: grid; }
.level-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.level-mark { width: 64px; height: 64px; }
.level-row h3 { display: flex; align-items: center; gap: 8px; }
.level-now {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--pine-soft);
  color: var(--pine);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
}
.level-note { margin: 6px 0 0; color: var(--muted); line-height: 1.55; }
.rules-label { margin: 18px 0 0; font-size: 1rem; }
.earn-list { display: grid; }
.earn-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.target-block { display: grid; gap: 8px; }
.checkin-strip { display: grid; gap: 8px; }
.checkin {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: inherit;
}
.checkin-photo,
.checkin .mono {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--paper-deep);
}
.checkin .mono { display: grid; place-items: center; }
.checkin strong { display: block; }
.work-grid .target-block .work-card { height: 100%; }
.level-row.is-current { background: color-mix(in srgb, var(--pine-soft) 65%, transparent); margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-radius: 14px; }
.rank-icon { width: 100%; height: 100%; display: block; }

.achieve {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 24, 20, 0.48);
  animation: achieve-fade 0.28s ease;
}
.achieve-card {
  position: relative;
  width: min(420px, 100%);
  overflow: hidden;
  text-align: center;
  padding: 42px 28px 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(18, 24, 20, 0.28);
  animation: achieve-pop 0.72s cubic-bezier(0.16, 1.25, 0.3, 1);
}
.achieve-card h2 {
  margin: 4px 0 0;
  font-size: 2.4rem;
  animation: achieve-rise 0.7s 0.12s both;
}
.achieve-mark {
  width: 108px;
  height: 108px;
  margin: 0 auto 8px;
  animation: achieve-mark 0.9s cubic-bezier(0.16, 1.45, 0.3, 1);
}
.achieve-ring {
  position: absolute;
  left: 50%;
  top: 96px;
  width: 108px;
  height: 108px;
  margin: -54px 0 0 -54px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  animation: achieve-ring 1.5s ease-out infinite;
}
.achieve-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.burst {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 8px;
  height: 12px;
  margin: -6px 0 0 -4px;
  background: var(--c, var(--gold));
  border-radius: 2px;
  opacity: 0;
  animation: burst-out 1.2s cubic-bezier(0.12, 0.72, 0.18, 1) forwards;
}
.burst.ribbon { width: 5px; height: 18px; border-radius: 2px; }
.burst.spark {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px var(--c, var(--gold));
}
.achieve-cheer, .achieve-hope { margin: 14px auto 0; max-width: 28rem; }
.achieve-cheer { color: var(--ink); font-size: 1.08rem; animation: achieve-rise 0.7s 0.22s both; }
.achieve-hope { color: var(--muted); animation: achieve-rise 0.7s 0.34s both; }
.achieve-card .btn { margin-top: 22px; animation: achieve-rise 0.7s 0.46s both; }
@keyframes achieve-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes achieve-pop {
  from { opacity: 0; transform: translateY(28px) scale(0.86); }
  to { opacity: 1; transform: none; }
}
@keyframes achieve-mark {
  0% { opacity: 0; transform: scale(0.2) rotate(-18deg); }
  60% { transform: scale(1.12) rotate(6deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes achieve-ring {
  from { opacity: 0.7; transform: scale(0.7); }
  to { opacity: 0; transform: scale(1.85); }
}
@keyframes burst-out {
  0% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(0.3); }
  14% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(1); }
}
@keyframes achieve-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.admin-page .page-head { margin-bottom: 18px; }
.admin-page h1 { font-size: clamp(1.9rem, 3vw, 2.6rem); }
.admin-page .lede { margin-top: 8px; font-size: 0.98rem; }
.admin-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.admin-bar .search {
  flex: 1 1 220px;
  width: auto;
  min-width: 160px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}
.admin-bar select {
  flex: 0 1 190px;
  min-width: 148px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 12px;
  padding: 10px 36px 10px 12px;
  appearance: none;
}
.admin-filter { position: relative; flex: 0 1 190px; min-width: 148px; }
.admin-filter select { width: 100%; }
.admin-filter::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 7px;
  height: 7px;
  border-right: 1.6px solid var(--muted);
  border-bottom: 1.6px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.admin-bar .btn { flex: none; }
.wiki-job {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.wiki-job .meta { margin: 0; }
.admin-wiki-flag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #f1dcaa;
  color: #30200b;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  vertical-align: 2px;
}
[data-theme="dark"] .admin-wiki-flag {
  background: #f1dcaa;
  color: #30200b;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .admin-wiki-flag {
    background: #f1dcaa;
    color: #30200b;
  }
}
.wiki-preview {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.wiki-preview h3 { margin: 16px 0 6px; font-size: 1.05rem; }
.wiki-preview p { margin: 0 0 10px; line-height: 1.7; }
.admin-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.admin-side {
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.admin-list { display: flex; flex-direction: column; gap: 8px; max-height: 64vh; overflow: auto; padding: 2px; }
.admin-bird {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}
.admin-bird .admin-thumb {
  width: 52px;
  height: 52px;
  aspect-ratio: auto;
  flex: none;
  border-radius: 10px;
  object-fit: cover;
}
.admin-bird .mono.admin-thumb { font-size: 1.15rem; }
.admin-bird-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}
.admin-bird.on { border-color: var(--pine); background: var(--pine-soft); }
.admin-bird strong { font-size: 0.98rem; }
.admin-bird-copy span { color: var(--muted); font-size: 0.82rem; }
.admin-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.sheet.admin-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 22px 20px;
}
.admin-detail-action { display: flex; justify-content: flex-end; }
.admin-form .form-grid { gap: 14px 16px; }
.admin-form textarea { width: 100%; min-height: 120px; resize: vertical; }
.admin-form .row { gap: 12px; }
.admin-form .row input { flex: 1; min-width: 0; }
.admin-form .error:empty { display: none; }
.admin-form .form-actions { margin-top: 2px; gap: 12px; }
.admin-placeholder {
  min-height: 280px;
  display: grid;
  place-items: center;
  padding: 32px 24px;
  text-align: center;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.admin-photos { display: flex; flex-wrap: wrap; gap: 12px; }
.admin-photos figure { margin: 0; width: 96px; }
.admin-photos img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; }
.admin-photos button {
  margin-top: 6px;
  border: 0;
  background: transparent;
  color: var(--clay);
  padding: 0;
}
.who .who-avatar {
  width: 36px;
  height: 36px;
  flex: none;
}
.who img, .avatar-fallback {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--pine);
  color: #f4f0e6;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
}

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0 88px;
}
.kicker {
  margin: 0 0 10px;
  color: var(--pine);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 650; letter-spacing: 0.01em; }
h1 { margin: 0; font-size: clamp(2.4rem, 5vw, 4.4rem); line-height: 1.08; }
.detail-page main h1 { font-size: clamp(1.5rem, 2.5vw, 2rem); line-height: 1.3; overflow-wrap: anywhere; }
.lede { margin: 16px 0 0; max-width: 38rem; color: var(--muted); font-size: 1.08rem; }

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: end;
  padding-bottom: 18px;
}
.hero-actions { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }

.btn, .wx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 18px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn.primary, .wx-btn {
  background: var(--pine);
  color: #f6f3ea;
  box-shadow: none;
}
[data-theme="dark"] .btn.primary, [data-theme="dark"] .wx-btn { color: #122018; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn.primary,
  :root:not([data-theme="light"]) .wx-btn { color: #122018; }
}
.btn.danger { color: var(--clay); }
.btn:disabled, .wx-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.wx-btn { background: #16734a; color: #f6f3ea; min-width: 220px; }

.feature-grid, .split, .stat-row, .species-grid, .plan-list {
  display: grid;
  gap: 16px;
}
.feature-grid { grid-template-columns: 1fr 1fr; margin-top: 34px; }
.feature {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.feature:hover { border-color: color-mix(in srgb, var(--pine) 45%, var(--line)); }
.feature-index {
  color: var(--gold);
  font-family: var(--serif);
  letter-spacing: 0.12em;
}
.feature h2 { margin: 10px 0 8px; font-size: 2rem; }
.feature p { margin: 0; color: var(--muted); }
.feature-go { margin-top: auto; padding-top: 22px; color: var(--pine); font-weight: 650; }

.section { margin-top: 54px; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 16px;
}
.section-head h2 { margin: 0; font-size: 1.7rem; }
.wiki-profile { max-width: 42rem; }
.wiki-block { margin-top: 28px; }
.wiki-block:first-child { margin-top: 0; }
.wiki-block h3 { width: fit-content; margin: 0 0 12px; font-size: 1.25rem; }
.wiki-block h3::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 8px;
  background: var(--ink);
}
.wiki-block p { margin: 0 0 12px; line-height: 1.75; }
.wiki-source { margin-top: 8px; }
.wiki-source a { color: inherit; }
.section-head a { color: var(--pine); }

.species-grid, .rec-grid { grid-template-columns: repeat(4, 1fr); }
.rec-grid { display: grid; gap: 16px; }
.rec-grid .empty { grid-column: 1 / -1; }
.rec {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  color: inherit;
}
.rec.is-species,
.rec.is-work { color: #f7f3ea; }
.rec.is-plan {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  background: var(--paper-deep);
  border-top: 4px solid var(--gold);
  color: var(--ink);
}
.rec.is-work { outline: 1px solid color-mix(in srgb, var(--clay) 70%, transparent); }
.rec-kind {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(16, 22, 18, 0.55);
  color: #f7f3ea;
  font-size: 0.75rem;
}
.rec.is-species .rec-kind { background: #236443; color: #fff; }
.rec.is-plan .rec-kind { top: 9px; background: #6841a5; color: #fff; }
.rec.is-work .rec-kind { background: #a34224; color: #fff; }
.rec .species-photo,
.rec .mono {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rec .mono { display: grid; place-items: center; font-size: 3rem; }
.rec.is-species .zh,
.rec.is-work .zh,
.rec.is-species .latin,
.rec.is-work .latin,
.rec.is-species .meta,
.rec.is-work .meta { color: #f7f3ea; }
.rec.is-plan h3 { margin-top: 10px; font-size: 1.35rem; }
.rec.is-plan .lede { margin-top: 8px; color: var(--muted); }
.rec-wall {
  position: absolute;
  inset: 0;
  display: grid;
  gap: 0;
}
.rec-wall-photo {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  display: block;
}
.rec-wall.count-2 { grid-template-columns: 1fr 1fr; }
.rec-wall.count-3,
.rec-wall.count-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.rec-wall.count-3 .rec-wall-photo:first-child { grid-row: 1 / span 2; }
.rec-wall.count-6 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr 1fr; }
.rec.is-plan.has-wall {
  padding: 0;
  border-top-color: transparent;
  color: #f7f3ea;
}
.rec.is-work:has(.pick-badge)::before,
.work-card:has(.pick-badge)::before,
.rec.is-plan:has(.pick-badge)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 88px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(16, 22, 18, 0.58), rgba(16, 22, 18, 0));
}
.rec.is-plan.has-wall .rec-kind { top: 12px; }
.rec.is-plan.has-wall .zh,
.rec.is-plan.has-wall .lede,
.rec.is-plan.has-wall .meta { color: #f7f3ea; }
.rec.is-plan.has-wall .lede,
.rec.is-plan.has-wall .meta { color: rgba(247, 243, 234, 0.82); }
.species-grid .empty, .plan-list .empty { grid-column: 1 / -1; }
.species, .plan {
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  padding: 0;
  box-shadow: var(--shadow);
}
.species {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  color: #f7f3ea;
}
.species-photo, .mono {
  aspect-ratio: 4 / 3;
  background: var(--paper-deep);
  object-fit: cover;
  width: 100%;
}
.species .species-photo,
.species .mono {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}
.mono {
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 2.4rem;
  color: var(--pine);
}
.species .mono { font-size: 3rem; }
.species-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 52px 14px 14px;
  background: linear-gradient(180deg, transparent, rgba(16, 22, 18, 0.86));
}
.species .zh,
.species .latin,
.species .meta { color: #f7f3ea; }
.species .latin,
.species .meta { color: rgba(247, 243, 234, 0.82); }
.species .rarity { background: rgba(247, 243, 234, 0.16); color: #f7f3ea; }
.species .rarity.hot { color: #f3c7ba; background: rgba(140, 70, 50, 0.45); }
.bird-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, 92px);
  gap: 0;
  justify-content: start;
}
.bird-tile {
  position: relative;
  display: block;
  width: 92px;
  height: 92px;
  color: inherit;
}
.bird-tile-photo,
.bird-tile .mono {
  width: 92px;
  height: 92px;
  aspect-ratio: auto;
  object-fit: cover;
  border-radius: 0;
  background: var(--paper-deep);
}
.bird-tile .mono { display: grid; place-items: center; color: var(--pine); font-family: var(--serif); }
.bird-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 4;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  padding: 5px 9px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.78rem;
  line-height: 1.3;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}
.bird-tip span { color: rgba(246, 243, 234, 0.72); font-family: var(--serif); font-style: italic; font-size: 0.72rem; }
.bird-tile:hover,
.bird-tile:focus-visible { z-index: 3; outline: none; }
.bird-tile:hover .bird-tip,
.bird-tile:focus-visible .bird-tip { opacity: 1; }
button.bird-tile {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.bird-x {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(16, 22, 18, 0.72);
  color: #f6f3ea;
  font-size: 13px;
  line-height: 18px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
}
.bird-tile:hover .bird-x,
.bird-tile:focus-visible .bird-x { opacity: 1; }
.bird-pick {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
}
.bird-pick-field { position: relative; }
.bird-pick .plan-suggest {
  position: absolute;
  z-index: 8;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  margin-top: 0;
  max-height: 280px;
  overflow: auto;
  box-shadow: 0 16px 36px rgba(20, 28, 22, 0.12);
}
.bird-pick .suggest-empty { margin: 0; padding: 12px; }
.draft-wall { margin-top: 4px; }
.guest-checkin { margin-top: 14px; }
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.work-grid .empty { grid-column: 1 / -1; }
.trip-copy {
  margin: 14px 0 0;
  max-width: 46rem;
  white-space: pre-wrap;
  line-height: 1.75;
  color: var(--ink);
}
.guest-tasks { display: grid; gap: 12px; }
.guest-task {
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.guest-task .kicker { margin-bottom: 6px; }
.guest-task h3 { margin: 0; font-family: var(--serif); font-size: 1.2rem; }
.guest-task p { margin: 8px 0 0; color: var(--muted); line-height: 1.6; }
.work-card {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  color: #f7f3ea;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.work-card .species-photo,
.work-card .mono {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}
.work-card .mono { font-size: 3rem; }
.work-card .species-body .meta { color: #f7f3ea; }
.work-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.species-visual-column { min-width: 0; }
.species-detail-photo { min-height: 0; border-radius: 18px; }
.species-work-carousel { margin-top: 30px; }
.species-work-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.06em;
}
.species-work-carousel .work-strip {
  gap: 12px;
  padding: 2px 2px 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--muted) 32%, transparent) transparent;
}
.work-chip { flex: none; width: 148px; color: inherit; }
.species-work-carousel .work-chip {
  position: relative;
  width: 152px;
  aspect-ratio: 4 / 3;
  scroll-snap-align: start;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-deep);
  transition: transform 180ms ease, border-color 180ms ease;
}
.species-work-carousel .work-chip:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--pine) 55%, var(--line)); }
.species-work-carousel .work-chip:focus-visible { outline: 3px solid var(--pine); outline-offset: 3px; }
.work-chip-author,
.work-chip-title {
  display: block;
  font-size: 0.86rem;
  color: var(--ink);
}
.work-chip-author { margin-top: 7px; }
.work-chip-title { margin-top: 8px; }
.work-chip-photo,
.work-chip .mono {
  width: 148px;
  height: 110px;
  object-fit: cover;
  border-radius: 14px;
  background: var(--paper-deep);
}
.species-work-carousel .work-chip-photo,
.species-work-carousel .work-chip .mono { width: 100%; height: 100%; border-radius: 0; }
.species-work-carousel .work-chip-author {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  margin: 0;
  padding: 28px 9px 8px;
  background: linear-gradient(transparent, rgba(12, 18, 14, 0.82));
  color: #fff;
}
.species-work-carousel .work-chip-author .person { width: 100%; min-width: 0; gap: 7px; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7); }
.species-work-carousel .work-chip-author .person > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.species-work-carousel .work-chip-author .face { width: 22px; height: 22px; border: 1px solid rgba(255, 255, 255, 0.85); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); }
.work-stage {
  position: relative;
  margin-top: 18px;
  border-radius: 22px;
  overflow: hidden;
  background: #000;
  touch-action: pan-y;
}
.work-stage-photo,
.work-stage .mono {
  width: 100%;
  height: min(68vh, 640px);
  object-fit: contain;
  object-position: center;
  display: block;
}
.work-stage .mono { display: grid; place-items: center; font-size: 4rem; }
.work-stage-photo.is-landscape { object-fit: cover; }
.work-stage > a { display: block; }
.work-counter { position: absolute; right: 16px; bottom: 14px; color: #fff; background: rgba(0, 0, 0, .6); border-radius: 14px; padding: 4px 10px; font-size: 12px; pointer-events: none; }
.work-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(18, 22, 18, 0.55);
  color: #f7f3ea;
  font-size: 1.6rem;
  line-height: 1;
}
.work-nav.prev { left: 14px; }
.work-nav.next { right: 14px; }
.work-dots { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.work-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--line);
}
.work-dots button.on { background: var(--pine); }
.narrow { width: min(760px, calc(100% - 40px)); }
.suggest { position: relative; }
.suggest[hidden] { display: none; }
.suggest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.suggest-item:last-child { border-bottom: 0; }
.suggest {
  margin-top: -8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper);
}
.picked-bird {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}
.picked-bird:empty { display: none; }
.picked-bird .btn { margin-left: auto; }
.picked-photo,
.picked-bird .mono {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
  flex: none;
}
.publish-page .page-head { margin-bottom: 28px; }
.publish-form:not(.work-edit-form) {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 28px 28px 26px;
}
.publish-form:not(.work-edit-form) label { gap: 8px; }
.publish-form:not(.work-edit-form) input,
.publish-form:not(.work-edit-form) textarea { padding: 12px 14px; }
.publish-form .bird-field,
.publish-form .publish-images { display: flex; flex-direction: column; gap: 12px; }
.publish-form .publish-images { gap: 8px; }
.publish-form .bird-field .suggest,
.publish-form .publish-images .meta,
.publish-form:not(.work-edit-form) .error { margin: 0; }
.publish-form [data-picked]:empty { display: none; }
.publish-form .error:empty { display: none; }
.publish-form:not(.work-edit-form) .form-actions { margin-top: 2px; }
.publish-note { margin: 2px 0 0; font-size: 0.8rem; line-height: 1.6; }
.work-edit-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 18px; }
.work-edit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.work-edit-image { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.work-edit-image img, .work-edit-image .mono { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 9px; }
.work-edit-image .mono { display: grid; place-items: center; font-size: 2rem; }
.work-edit-image .meta { margin: 0; }
.work-edit-image label.btn, .work-edit-form label.work-add-images { color: var(--ink); cursor: pointer; }
.work-edit-form .work-add-images { align-self: flex-start; }
.work-edit-form .work-file-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.work-edit-form label.btn:focus-within { outline: 2px solid var(--pine); outline-offset: 3px; }
.work-edit-form .work-add-images[hidden] { display: none; }
.work-edit-form fieldset:disabled { opacity: 0.7; pointer-events: none; }
.work-edit-form .btn:disabled { cursor: not-allowed; opacity: 0.6; }
.plan { padding: 18px; }
.latin { margin: 2px 0 0; color: var(--muted); font-family: var(--serif); font-style: italic; font-size: 0.92rem; }
.meta { margin-top: 8px; color: var(--muted); font-size: 0.84rem; }
.zh { margin: 0; font-family: var(--serif); font-size: 1.2rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.step b { display: block; margin-bottom: 6px; font-family: var(--serif); font-size: 1.15rem; font-weight: 650; }
.step span { color: var(--muted); }

.title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.pick-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: none;
  color: #d4a017;
  line-height: 1;
}
.pick-badge img { width: 36px; height: 36px; display: block; }
.pick-badge > span {
  font-size: 10px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.rec .pick-badge,
.work-card .pick-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  padding: 0;
  background: none;
  color: #e8c15a;
  filter: none;
}
.rec .pick-badge img,
.work-card .pick-badge img { width: 32px; height: 32px; }
.page-head, .detail-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  margin-bottom: 22px;
}
.detail-head .reacts,
.page-head .reacts {
  margin-top: 0;
  align-items: center;
}
.page-head .row,
.detail-head .row { flex-wrap: nowrap; align-items: center; }
.page-head .row .btn,
.page-head .reacts .btn,
.detail-head .row .btn,
.detail-head .reacts .btn {
  box-sizing: border-box;
  height: 40px;
  padding: 0 16px;
  font-size: 0.92rem;
  white-space: nowrap;
  line-height: 1;
  flex: none;
}
.page-head .row .btn:not(.primary) {
  border-color: var(--pine);
  box-shadow: none;
}
.search {
  width: min(420px, 100%);
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 10px 2px;
  outline: none;
}
.search:focus { border-bottom-color: var(--pine); }

.stat-row { grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; }
.stat {
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.stat b { display: block; font-family: var(--serif); font-size: 1.6rem; }
.stat span { color: var(--muted); font-size: 0.86rem; }

.tabs { display: flex; gap: 8px; margin: 8px 0 16px; }
.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 0;
  margin-right: 14px;
  border-bottom: 2px solid transparent;
}
.tab.on { color: var(--ink); border-bottom-color: var(--pine); }

.target, .task {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  background: transparent;
  width: 100%;
  text-align: left;
}
.target a { color: inherit; }
.target-photo { display: block; }
.target img, .target .mini {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--paper-deep);
}
.mini { display: grid; place-items: center; color: var(--pine); font-family: var(--serif); }
.status-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.status-row button, .chip {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--muted);
  font-size: 0.8rem;
}
.status-row button.on { background: var(--pine); color: #f6f3ea; border-color: transparent; }
.task { grid-template-columns: 22px 1fr; }
.task input { width: 16px; height: 16px; accent-color: var(--pine); }
.done { color: var(--muted); text-decoration: line-through; }

.sheet, .login-card, .note {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
}
.empty {
  color: var(--muted);
  padding: 8px 0 4px;
}
.feed-more {
  grid-column: 1;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.85rem;
}
.feed-more[hidden] { display: none; }
.feed-loader {
  position: relative;
  width: 48px;
  height: 48px;
  flex: none;
}
.feed-loader::before {
  content: '';
  position: absolute;
  inset: 2px;
  border: 1px solid var(--pine);
  border-radius: 50%;
  opacity: 0.2;
  animation: feed-loader-pulse 1.8s ease-in-out infinite;
}
.feed-loader::after {
  content: '';
  position: absolute;
  left: 17px;
  bottom: 1px;
  width: 14px;
  height: 4px;
  border-radius: 50%;
  background: var(--pine);
  filter: blur(2px);
  opacity: 0.2;
  animation: feed-loader-shadow 1.8s ease-in-out infinite;
}
.feed-loader img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  animation: feed-loader-float 1.8s ease-in-out infinite;
}
@keyframes feed-loader-float {
  0%, 100% { transform: translate(-50%, -50%) rotate(-5deg); }
  50% { transform: translate(-50%, -67%) rotate(5deg); }
}
@keyframes feed-loader-pulse {
  0%, 100% { transform: scale(0.8); opacity: 0.15; }
  50% { transform: scale(1); opacity: 0.4; }
}
@keyframes feed-loader-shadow {
  0%, 100% { transform: scale(1); opacity: 0.2; }
  50% { transform: scale(0.7); opacity: 0.1; }
}
@media (prefers-reduced-motion: reduce) {
  .feed-loader::before, .feed-loader::after, .feed-loader img { animation: none; }
  .feed-loader img { transform: translate(-50%, -50%); }
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form-grid label, .stack label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 0.86rem; }
.auth-form label { gap: 8px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid input, .form-grid textarea, .stack input, .stack textarea, .stack select {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 12px;
  padding: 10px 12px;
}
.form-actions, .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.add-plan .btn {
  box-sizing: border-box;
  height: 44px;
  padding: 0 18px;
  line-height: 1;
}
.add-plan .icon-btn { width: 44px; height: 44px; flex: none; }
.add-plan .icon-btn.on {
  background: var(--pine);
  color: #f6f3ea;
  border-color: transparent;
  box-shadow: none;
}
[data-theme="dark"] .add-plan .icon-btn.on { color: #122018; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .add-plan .icon-btn.on { color: #122018; }
}
.pill-select { position: relative; display: inline-flex; max-width: 100%; }
.pill-select select {
  appearance: none;
  box-sizing: border-box;
  height: 44px;
  max-width: 100%;
  padding: 0 40px 0 18px;
  border: 1px solid var(--pine);
  border-radius: 999px;
  background: var(--card);
  color: inherit;
  line-height: 1;
  cursor: pointer;
}
.pill-select select:focus { outline: 2px solid var(--pine); outline-offset: 2px; }
.pill-select::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 7px;
  height: 7px;
  border-right: 1.6px solid var(--pine);
  border-bottom: 1.6px solid var(--pine);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.login-wrap {
  min-height: calc(100vh - var(--header));
  display: grid;
  place-items: center;
  padding: 24px 0 60px;
}
.login-card {
  width: min(440px, 100%);
  text-align: center;
  padding: 32px 28px 28px;
}
.login-card img { width: 72px; height: 72px; margin: 0 auto 10px; }
.login-card .avatar-choice img { width: 44px; height: 44px; margin: 0; }
.login-card .avatar-preview { width: 48px; height: 48px; margin: 0; }
.login-card .kicker { margin-bottom: 8px; }
.login-card h1 { font-size: 2rem; }
.login-card .lede {
  margin: 10px auto 0;
  font-size: 0.98rem;
  line-height: 1.55;
  text-wrap: balance;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 22px;
  text-align: left;
}
.email-code-row { display: flex; gap: 10px; align-items: stretch; }
.email-code-row input { flex: 1; min-width: 0; width: 0; }
.email-code-row .btn { flex: none; min-width: 120px; padding: 10px 12px; }
.auth-hint { color: var(--muted); font-size: 0.86rem; line-height: 1.6; }
.auth-hint:empty { display: none; }
.auth-actions .auth-forgot { grid-column: 1 / -1; }
.auth-form[aria-busy="true"] { opacity: 0.75; }
.auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}
.auth-actions .btn {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  white-space: nowrap;
}
.login-card .error { margin: 12px 0 0; min-height: 0; }
.login-card .error:empty { display: none; }
.note { margin-top: 16px; color: var(--muted); text-align: left; }
.error { color: var(--clay); min-height: 1.2em; }

.footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 18;
  width: auto;
  margin: 0;
  padding: 10px max(20px, calc((100% - 1120px) / 2)) calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(16px);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.9rem;
}
.footer-quote {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.footer .icp {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  text-align: right;
}
.footer .icp a {
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.footer .icp a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.footer .icp .beian-icon {
  width: 12px;
  height: auto;
  margin-right: 3px;
}
.footer .icp .icp-sep { opacity: 0.5; }
@media (min-width: 861px) {
  #app:has(.guide-body .reshuffle-side:not([hidden])) .footer {
    padding-right: calc(max(20px, calc((100% - 1120px) / 2)) + 64px);
  }
}
@media (max-width: 860px) {
  .footer { padding-right: 14px; padding-left: 14px; }
}
@media (max-width: 700px) {
  :root { --footer-space: 78px; }
  .footer { gap: 8px; }
  .footer-quote { min-width: 64px; font-size: 0.8rem; }
  .footer .icp { max-width: calc(100% - 72px); }
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  max-width: min(460px, calc(100% - 32px));
  background: var(--ink);
  color: var(--paper);
  padding: 12px 16px;
  border-radius: 16px;
  line-height: 1.45;
  text-align: center;
  z-index: 30;
}
body:has(#app > .footer) .toast:not(.points-toast) { bottom: calc(var(--footer-space) + 12px); }
.points-toast { top: 84px; bottom: auto; display: flex; align-items: center; gap: 12px; background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 8px 30px #0002; text-align: left; z-index: 150; }
.points-toast > strong { color: var(--pine); font-size: 25px; }
.points-toast > span { display: flex; flex-direction: column; gap: 3px; }
.points-toast b { font-size: 14px; }
.points-toast small { color: var(--muted); font-size: 12px; }
.featured-sheet {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}
.featured-sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.featured-sheet-head .zh { font-size: 1.35rem; }
.featured-sheet-head .meta { margin-top: 4px; }
.featured-sheet-head .btn {
  box-sizing: border-box;
  height: 44px;
  padding: 0 18px;
  white-space: nowrap;
  line-height: 1;
  flex: none;
  border-color: var(--pine);
  box-shadow: none;
}
.featured-picks { display: grid; gap: 10px; }
button.featured-pick {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 16px 16px 16px 18px;
  text-align: left;
  color: inherit;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
  box-shadow: none;
}
button.featured-pick:hover,
button.featured-pick:focus-visible { border-color: var(--pine); }
.featured-pick-body { display: grid; gap: 4px; min-width: 0; flex: 1; }
.featured-pick-kicker { color: var(--pine); font-size: 0.78rem; letter-spacing: 0.04em; }
.featured-pick-body .zh { font-size: 1.28rem; }
.featured-pick-blurb { color: var(--muted); font-size: 0.92rem; line-height: 1.55; }
.featured-pick-go {
  flex: none;
  border-radius: 999px;
  background: var(--pine);
  color: #f6f3ea;
  padding: 8px 14px;
  font-size: 0.88rem;
  line-height: 1;
}
[data-theme="dark"] .featured-pick-go { color: #122018; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .featured-pick-go { color: #122018; }
}
.featured-admin { display: grid; gap: 8px; }
button.featured-admin {
  width: 100%;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
button.featured-admin:hover,
button.featured-admin:focus-visible { border-color: var(--pine); }
.featured-editor h2 { font-size: 1.2rem; margin: 6px 0 0; }
.featured-block {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}
.featured-block summary { cursor: pointer; font-weight: 650; }
.featured-fields { display: grid; gap: 12px; margin-top: 12px; }
.featured-editor .featured-fields textarea { min-height: 72px; }
.featured-search { position: relative; }
.featured-search .suggest {
  position: absolute;
  z-index: 8;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  margin-top: 0;
  max-height: 280px;
  overflow: auto;
}
.work-edit-image.is-removed { opacity: 0.55; }
.work-edit-image.is-removed img { filter: grayscale(1); }

@media (max-width: 860px) {
  .hero, .feature-grid, .species-grid, .steps, .form-grid { grid-template-columns: 1fr; }
  .species-grid, .rec-grid, .work-grid { grid-template-columns: 1fr 1fr; }
  .narrow { width: min(760px, calc(100% - 28px)); }
  .publish-form:not(.work-edit-form) { padding: 22px 18px 20px; gap: 18px; }
  .top { padding: 12px 16px 0; gap: 0 8px; align-items: center; overflow-x: clip; }
  .brand { flex: none; }
  .brand-name { font-size: 1.15rem; letter-spacing: 0.04em; }
  .top-end { flex: none; margin-left: auto; flex-wrap: nowrap; gap: 6px; }
  .who-name { max-width: 6em; }
  .who-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .who .who-avatar { width: 32px; height: 32px; }
  .icon-btn { width: 34px; height: 34px; flex: none; }
  .switch { order: 3; width: 100%; margin: 8px 0 0; }
  .deck { overflow: hidden; }
  .deck-track {
    display: flex;
    width: 200%;
    align-items: flex-start;
    transition: transform 0.32s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .deck.is-plans .deck-track { transform: translateX(-50%); }
  .deck.dragging .deck-track { transition: none; }
  .deck-pane,
  .deck-pane.active {
    display: block;
    width: 50%;
    flex: none;
  }
  .page-head, .detail-head, .section-head { flex-direction: column; align-items: flex-start; }
  .featured-sheet-head { align-items: flex-start; }
  button.featured-pick { align-items: flex-start; gap: 12px; padding: 14px; }
  .featured-pick-go { margin-top: 4px; }
  .page-head { align-items: stretch; }
  .search-row { width: 100%; }
  .guide-body { grid-template-columns: minmax(0, 1fr); }
  .reshuffle-side { display: none; }
  .reshuffle-inline {
    display: inline-flex;
    flex-direction: row;
    gap: 6px;
    height: 40px;
    padding: 0 12px;
    flex: none;
    white-space: nowrap;
  }
  .reshuffle-inline span {
    writing-mode: horizontal-tb;
    letter-spacing: 0.06em;
    font-size: 0.92rem;
  }
  .reshuffle-inline[hidden] { display: none; }
  .stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
  .stat { min-width: 0; padding: 8px 4px; border-radius: 12px; text-align: center; }
  .stat b { font-size: 1.15rem; }
  .stat span { display: block; font-size: 0.72rem; line-height: 1.25; overflow-wrap: anywhere; }
  .target { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
  .target > div { min-width: 0; }
  .target > .btn { grid-column: 3; grid-row: 1; white-space: nowrap; padding: 7px 12px; }
  .status-row { grid-column: 1 / -1; justify-content: flex-start; }
  .wrap { width: min(1120px, calc(100% - 28px)); }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-list { max-height: 420px; }
  .admin-bar { padding: 12px; gap: 10px; }
  .admin-bar .search, .admin-filter { flex: 1 1 calc(50% - 10px); min-width: 0; }
  .admin-form { padding: 16px; }
  .login-card { padding: 28px 18px 22px; }
  .auth-actions { gap: 8px; }
  .auth-actions .btn { font-size: 0.92rem; padding: 10px 8px; }
  .profile-head { flex-wrap: wrap; }
  .profile-actions { width: 100%; max-width: none; justify-content: flex-start; margin-left: 0; }
  .profile-actions .auth-hint { text-align: left; }
  .email-code-row { gap: 8px; }
  .email-code-row .btn { min-width: 108px; font-size: 0.86rem; }
}

@media (max-width: 600px) {
  .top-end .who-name { display: none; }
}

.rec.is-news{color:#f7f3ea;background:var(--pine)}
.rec.is-news .rec-kind{background:#756653;color:#fff}
.rec.is-news .zh,.rec.is-news .meta,.rec-news-place,.rec-news-heat{color:#f7f3ea}
.rec.is-news .zh{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.rec-news-place{font-size:12px;margin:6px 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rec-news-heat{font-size:10px;margin:4px 0 0;opacity:.85}
.rec-news-locate{font-size:12px;white-space:nowrap}

.rec.is-news.is-text{background:#dce5d6;color:#172a21}
.rec-news-text{position:absolute;inset:0;display:flex;align-items:center;padding:54px 20px 108px;background:radial-gradient(circle at 95% 5%,#fff5 0,transparent 55%)}
.rec-news-text>span{font-family:var(--sans);font-weight:900;line-height:1.18;letter-spacing:-.04em;overflow-wrap:anywhere;white-space:pre-wrap;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:5;overflow:hidden;max-height:100%}
.rec-news-text.text-short{font-size:clamp(32px,4.5vw,52px)}.rec-news-text.text-medium{font-size:clamp(26px,3.5vw,38px)}.rec-news-text.text-long{font-size:clamp(21px,2.7vw,29px)}
.rec.is-news.is-text .species-body{background:transparent;padding-top:0}.rec.is-news.is-text .zh{display:none}.rec.is-news.is-text .meta,.rec.is-news.is-text .rec-news-place,.rec.is-news.is-text .rec-news-heat{color:#243c2d}
.rec-news-count{position:absolute;right:12px;bottom:126px;background:#0008;border-radius:20px;padding:4px 9px;color:#fff;font-size:11px}
@media(max-width:480px){.rec-news-text{padding:48px 13px 100px}.rec-news-text.text-short{font-size:36px}.rec-news-text.text-medium{font-size:28px}.rec-news-text.text-long{font-size:22px}}

/* Shared admin rhythm and navigation, scoped to the management pages. */
.admin-page { padding-bottom: 32px; }
#app:has(.admin-page) { padding-bottom: 0; }
#app:has(.admin-page) .footer { position: static; margin-top: 12px; }
.admin-page .page-head { margin-bottom: 24px; }
.admin-page .admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}
.admin-tabs .tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  transition: background 150ms, color 150ms, border-color 150ms;
}
.admin-tabs .tab:hover { color: var(--ink); background: var(--pine-soft); }
.admin-tabs .tab.on { color: var(--on-pine); background: var(--pine); border-color: var(--pine); }
.admin-page button:focus-visible, .admin-page a:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 3px;
}
.admin-page > .row { gap: 12px; margin: 0 0 24px; }
.admin-page > .meta { margin: 0 0 16px; }
.admin-page > .stack { display: flex; flex-direction: column; gap: 20px; margin-bottom: 24px; }
.admin-page .sheet.stack { display: flex; flex-direction: column; gap: 18px; padding: 24px; }
.admin-page .sheet > p, .admin-page .sheet > h2, .admin-page .sheet > h3 { margin: 0; }
.admin-page .sheet > h2 { font-size: 1.25rem; line-height: 1.5; }
.admin-page .sheet > .meta { font-size: 0.82rem; line-height: 1.7; }
.admin-page .admin-layout { gap: 24px; margin-bottom: 28px; }
.admin-page .admin-layout > * { min-width: 0; }
.admin-page .admin-side { padding: 14px; border-radius: 18px; }
.admin-page .admin-side.stack { display: flex; flex-direction: column; gap: 10px; }
.admin-page .admin-bird { padding: 14px; border-radius: 12px; transition: background 150ms, border-color 150ms; }
.admin-page .admin-bird:hover { border-color: var(--pine); }
.admin-page .admin-bird.on { background: color-mix(in srgb, var(--pine) 12%, var(--card)); border-color: var(--pine); color: var(--ink); }
.admin-page .admin-bird-copy { gap: 5px; overflow-wrap: anywhere; }
.admin-page .admin-bird-copy strong { line-height: 1.5; }
.admin-page .admin-side .empty { margin: 0; padding: 24px 12px; text-align: center; }
.admin-page .sheet label { gap: 8px; color: var(--ink); font-weight: 500; }
.admin-page .sheet input:not([type="checkbox"]):not([type="radio"]),
.admin-page .sheet textarea, .admin-page .sheet select { width: 100%; min-width: 0; color: var(--ink); font-weight: 400; }
.admin-page .sheet input:not([type="checkbox"]):not([type="radio"]), .admin-page .sheet select { min-height: 44px; }
.admin-page .sheet input:focus-visible, .admin-page .sheet textarea:focus-visible, .admin-page .sheet select:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 2px;
  border-color: var(--pine);
}
.admin-page .sheet input[readonly], .admin-page .sheet select:disabled { background: var(--paper-deep); color: var(--muted); }
.admin-page .sheet .admin-check {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  font-weight: 400;
  line-height: 1.6;
}
.admin-page .admin-check input[type="checkbox"] {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  padding: 0;
  accent-color: var(--pine);
}
.admin-page .admin-form fieldset {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  margin: 4px 0 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.admin-page .admin-form legend { padding: 0 8px; color: var(--pine); font-size: 0.9rem; font-weight: 600; }
.admin-page .admin-form fieldset > .meta { margin: 0; line-height: 1.7; }
.admin-page .admin-form > .row { margin-top: 6px; padding-top: 20px; border-top: 1px solid var(--line); }
.admin-page [data-action="config-preview"] { margin-top: 4px; }
.admin-page [data-action="config-preview"] > .btn { align-self: flex-start; }
.admin-page pre { margin: 0; padding: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; font-size: 0.84rem; line-height: 1.7; }
@media (max-width: 760px) {
  .admin-page .admin-tabs { gap: 6px; padding: 8px; margin-bottom: 22px; border-radius: 14px; }
  .admin-tabs .tab { flex: 1 1 calc(50% - 6px); padding: 10px 8px; font-size: 0.84rem; }
  .admin-page .admin-layout { gap: 18px; margin-bottom: 22px; }
  .admin-page .sheet.stack { gap: 16px; padding: 18px; border-radius: 16px; }
  .admin-page .admin-form fieldset { padding: 16px; gap: 16px; }
  .admin-page .admin-side.stack { max-height: 340px; overflow-y: auto; }
  .admin-page > .row { margin-bottom: 20px; }
}
.admin-review-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 16px; margin-bottom: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.admin-review-filter > span { margin-right: 8px; font-size: 0.9rem; color: var(--muted); }
.admin-review-filter .btn { padding: 7px 14px; }

.image-viewer { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; padding: 0; margin: 0; border: 0; background: rgba(10,15,12,.96); color: white; overflow: hidden; }
.image-viewer::backdrop { background: rgba(0,0,0,.8); }
.image-viewer-stage { position: absolute; inset: 70px 16px 16px; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; cursor: grab; }
.image-viewer-stage:active { cursor: grabbing; }
.image-viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; transform-origin: center; }
.image-viewer-tools { position: fixed; z-index: 10; top: max(16px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); }
.image-viewer-tools button, .image-viewer-nav { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid #ffffff26; border-radius: 50%; background: #ffffff14; color: white; cursor: pointer; transition: background .18s, transform .18s; }
.image-viewer-nav { position: fixed; z-index: 10; top: calc(50% - 24px); }
.image-viewer-nav.prev { left: max(16px, env(safe-area-inset-left)); }
.image-viewer-nav.next { right: max(16px, env(safe-area-inset-right)); }
.image-viewer-tools button:hover, .image-viewer-nav:hover { background: #ffffff26; }
.image-viewer-tools button:active, .image-viewer-nav:active { transform: scale(.94); }
.image-viewer-nav:disabled, .image-viewer-nav:disabled:hover, .image-viewer-nav:disabled:active { opacity: .32; cursor: default; background: #ffffff14; transform: none; }
.image-viewer-tools button:focus-visible, .image-viewer-nav:focus-visible { outline: 2px solid white; outline-offset: 4px; }
.image-viewer-tools svg, .image-viewer-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.feedback-message-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; }
.feedback-message > .btn { align-self: flex-start; }
