:root {
  --color-bg: #f6f1e8;
  --color-surface: #fffcf6;
  --color-text-main: #171614;
  --color-text-secondary: #6a625a;
  --color-brand: #8f2628;
  --color-accent: #b08a5b;
  --color-border: #d8cfc0;
  --color-dark: #1b1713;
  --paper: #f6f1e8;
  --paper-soft: #f1e8dc;
  --paper-card: #fffcf6;
  --ink: #171614;
  --ink-2: #2a241e;
  --muted: #6a625a;
  --muted-2: #a3998d;
  --line: #ded5c8;
  --line-2: #c8bdae;
  --wall: #f1e8dc;
  --red: #8f2628;
  --red-dark: #6f1d20;
  --red-soft: #e8d2cc;
  --bronze: #b08a5b;
  --black: #1b1713;
  --white: #fffcf6;
  --teal: #8f2628;
  --coral: #8f2628;
  --gold: #b08a5b;
  --plum: #1b1713;
  --shadow: 0 18px 42px rgba(42, 32, 18, 0.055);
  --shadow-deep: 0 30px 80px rgba(27, 23, 19, 0.16);
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --admin-font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --theme-font-scale: 1;
  --theme-space-scale: 1;
  --radius-control: 8px;
  --radius-card: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: calc(16px * var(--theme-font-scale));
  line-height: 1.62;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
  transition:
    transform 140ms ease,
    background-color 140ms ease,
    border-color 140ms ease,
    opacity 140ms ease;
}

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

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

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.side-rail {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
  height: 100vh;
  padding: 28px 22px;
  border-right: 1px solid var(--line);
  background: #f2f0e9;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #fff;
  background: var(--teal);
  border-radius: 8px;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  line-height: 1.2;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.admin-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fffdf8;
  text-decoration: none;
}

.room-nav {
  display: grid;
  gap: 8px;
}

.mobile-nav-toggle,
.filter-toggle {
  display: none;
}

.room-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  text-align: left;
}

.room-button:hover,
.room-button.is-active {
  border-color: var(--line);
  background: #fffdf8;
}

.room-button:disabled,
.map-node:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.room-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--teal);
}

.room-button:nth-child(2) .room-dot {
  background: var(--coral);
}

.room-button:nth-child(3) .room-dot {
  background: var(--plum);
}

.room-button:nth-child(4) .room-dot {
  background: var(--gold);
}

.room-button:nth-child(5) .room-dot {
  background: var(--coral);
}

.visit-card {
  margin-top: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.visit-card span,
.eyebrow {
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.visit-card strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.visit-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.visit-card .admin-link {
  margin-top: 14px;
}

.gallery-stage {
  padding: 28px clamp(18px, 4vw, 56px) 52px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.topbar h1 {
  max-width: 780px;
  margin: 6px 0 0;
  font-size: clamp(30px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: 0;
}

.topbar .eyebrow {
  margin: 0;
}

.association-panel,
.wechat-panel,
.contact-panel {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  background: #fffdf8;
  animation: panel-in 260ms ease both;
}

.association-panel {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.7fr);
  padding: clamp(18px, 3vw, 30px);
}

.association-panel h2,
.wechat-panel h2 {
  margin: 8px 0 10px;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.12;
}

.association-panel p,
.wechat-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.association-stats {
  display: grid;
  gap: 10px;
}

.association-stats .stat-link {
  display: block;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  background: var(--paper);
  text-align: left;
}

.association-stats .stat-link:hover,
.association-stats .stat-link:focus-visible {
  border-color: rgba(31, 121, 114, 0.42);
  background: #fffdf8;
  box-shadow: 0 12px 28px rgba(31, 36, 38, 0.08);
}

.association-stats strong,
.association-stats span {
  display: block;
}

.association-stats span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.wechat-panel {
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: center;
  padding: clamp(18px, 3vw, 30px);
}

.wechat-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 0;
}

.wechat-meta div {
  min-width: 160px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.wechat-meta dt {
  color: var(--muted);
  font-size: 13px;
}

.wechat-meta dd {
  margin: 4px 0 0;
  font-weight: 700;
}

.wechat-qr {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--wall);
  text-align: center;
}

.wechat-qr img {
  width: 100%;
  height: 100%;
  padding: 10px;
  object-fit: contain;
}

.contact-panel {
  padding: clamp(18px, 3vw, 30px);
}

.contact-panel h2 {
  margin: 8px 0 0;
  font-size: clamp(24px, 3vw, 36px);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.contact-grid article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.contact-grid strong {
  display: block;
  margin-bottom: 8px;
}

.contact-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.quick-link {
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  background: #fffdf8;
  text-align: left;
}

.quick-link span {
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
}

.quick-link strong {
  line-height: 1.45;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(100%, 410px);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.icon-button,
.dialog-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fffdf8;
}

.icon-button[aria-pressed="true"] {
  color: #fff;
  background: var(--coral);
  border-color: var(--coral);
}

.exhibit-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: stretch;
}

.wall-panel {
  display: grid;
  grid-template-columns: minmax(260px, 48%) minmax(240px, 1fr);
  gap: clamp(18px, 4vw, 44px);
  align-items: center;
  min-height: 430px;
  padding: clamp(18px, 4vw, 40px);
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(31, 121, 114, 0.08) 0, transparent 24%),
    var(--wall);
  animation: panel-in 280ms ease both;
}

.artwork-frame {
  position: relative;
  padding: 14px;
  border: 10px solid #2f312f;
  background: #fffdf8;
  box-shadow: var(--shadow);
}

.feature-frame {
  width: min(100%, 540px);
  aspect-ratio: 4 / 3;
  margin-inline: auto;
}

.artwork-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #ddd8ce;
}

#featureImage,
#dialogImage,
.zoomable-image {
  cursor: zoom-in;
}

.feature-copy h2 {
  margin: 8px 0 12px;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.05;
  letter-spacing: 0;
}

.feature-copy p {
  color: var(--muted);
  line-height: 1.7;
}

.feature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.primary-button,
.quiet-button {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid var(--ink);
}

.primary-button {
  color: #fff;
  background: var(--ink);
}

.quiet-button {
  color: var(--ink);
  background: transparent;
}

.floor-map {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    #fffdf8;
  background-size: 48px 48px;
}

.floor-map::before,
.floor-map::after {
  position: absolute;
  content: "";
  border: 2px solid #c6bda8;
}

.floor-map::before {
  inset: 28px 34px 116px 34px;
}

.floor-map::after {
  inset: 138px 76px 34px 72px;
  border-color: rgba(185, 86, 66, 0.42);
}

.map-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 2;
  width: 46px;
  height: 46px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: #fffdf8;
}

.map-node.is-active {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.map-line {
  position: absolute;
  height: 2px;
  transform-origin: left center;
  background: rgba(31, 36, 38, 0.34);
}

.line-a {
  left: 22%;
  top: 39%;
  width: 40%;
  transform: rotate(-12deg);
}

.line-b {
  left: 38%;
  top: 68%;
  width: 36%;
  transform: rotate(-25deg);
}

.category-page {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 24px 0 18px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  background: #fffdf8;
  animation: panel-in 220ms ease both;
}

.category-page h2 {
  margin: 8px 0 10px;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.08;
}

.category-page p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.category-stat {
  min-width: 170px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.category-stat span,
.category-stat strong {
  display: block;
}

.category-stat span {
  color: var(--muted);
  font-size: 13px;
}

.category-stat strong {
  margin-top: 4px;
}

.collection-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 26px 0 18px;
}

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

.tab {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #fffdf8;
}

.tab.is-active {
  color: #fff;
  border-color: var(--teal);
  background: var(--teal);
}

.result-count {
  margin: 0;
  color: var(--muted);
}

.art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}

.article-section,
.member-section,
.exhibition-section {
  margin-bottom: 24px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin: 6px 0 0;
  font-size: clamp(22px, 3vw, 32px);
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.article-card {
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fffdf8;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.article-card:hover {
  transform: translateY(-3px);
  border-color: rgba(31, 121, 114, 0.42);
  box-shadow: 0 16px 40px rgba(31, 36, 38, 0.1);
}

.article-card button {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.article-cover {
  display: grid;
  place-items: center;
  min-height: 148px;
  color: #fff;
  background: var(--teal);
  font-weight: 700;
}

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

.article-card-copy {
  padding: 16px;
}

.article-card-copy h3 {
  margin: 6px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.article-card-copy p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.exhibition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.exhibition-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.exhibition-card button,
.member-card button {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.exhibition-card:hover {
  transform: translateY(-3px);
  border-color: rgba(31, 121, 114, 0.42);
  box-shadow: 0 16px 40px rgba(31, 36, 38, 0.1);
}

.exhibition-card img {
  width: 100%;
  min-height: 190px;
  border-radius: 8px;
  object-fit: cover;
}

.exhibition-card h3 {
  margin: 6px 0 8px;
  font-size: 22px;
  line-height: 1.25;
}

.exhibition-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.exhibition-card dl {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
}

.exhibition-card dl div {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
}

.exhibition-card dt {
  color: var(--muted);
  font-size: 13px;
}

.exhibition-card dd {
  margin: 0;
  line-height: 1.5;
}

.member-card {
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.member-card button {
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: start;
}

.program-grid,
.mini-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.program-card,
.public-form,
.exhibition-detail,
.related-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.program-card {
  padding: 18px;
}

.program-card h3 {
  margin: 8px 0;
  font-size: 22px;
}

.program-card p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.form-section,
.youth-section,
.exhibition-detail-section {
  margin-bottom: 24px;
}

.public-form {
  display: grid;
  gap: 14px;
  padding: clamp(18px, 3vw, 28px);
}

.public-form label {
  display: grid;
  gap: 7px;
}

.public-form label span {
  color: var(--muted);
  font-size: 13px;
}

.public-form input,
.public-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--paper);
}

.public-form textarea {
  min-height: 110px;
  padding-block: 10px;
  line-height: 1.6;
  resize: vertical;
}

.form-status.is-success {
  color: var(--teal);
}

.form-status.is-error {
  color: var(--coral);
}

.exhibition-detail {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(18px, 4vw, 34px);
  padding: clamp(18px, 3vw, 28px);
}

.detail-back {
  margin-bottom: 14px;
}

.exhibition-detail-cover {
  width: 100%;
  height: 100%;
  min-height: 360px;
  border-radius: 8px;
  object-fit: cover;
}

.exhibition-detail-copy h2 {
  margin: 8px 0 12px;
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1.08;
}

.exhibition-detail-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.related-section {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 18px;
}

.related-section h3 {
  margin: 0;
}

.mini-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 70px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  background: var(--paper);
  text-align: left;
}

.mini-card img,
.mini-avatar {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
}

.mini-avatar {
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--plum);
  font-weight: 800;
}

.member-avatar,
.member-avatar-thumb {
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: var(--plum);
  font-weight: 800;
}

.member-avatar {
  width: 86px;
  aspect-ratio: 1;
  border-radius: 8px;
  font-size: 30px;
}

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

.member-card h3 {
  margin: 6px 0 8px;
  font-size: 22px;
}

.member-card p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.art-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.art-card:hover {
  transform: translateY(-3px);
  border-color: rgba(31, 121, 114, 0.42);
  box-shadow: 0 16px 40px rgba(31, 36, 38, 0.1);
}

.art-card button {
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.thumb-frame {
  aspect-ratio: 4 / 5;
  border-width: 7px;
  box-shadow: none;
}

.art-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}

.art-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.card-meta {
  color: var(--teal) !important;
  font-size: 12px !important;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.room-chip {
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  background: var(--plum);
  font-size: 12px;
}

.save-mini {
  min-width: 48px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  text-align: center;
}

.save-mini.is-saved {
  color: #fff;
  border-color: var(--coral);
  background: var(--coral);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 48px 20px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.detail-empty {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.detail-empty strong {
  color: var(--ink);
  font-size: 20px;
}

.detail-empty p {
  max-width: 520px;
  margin: 0;
  line-height: 1.7;
}

.image-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100%;
  padding: 16px;
  border-radius: inherit;
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(31, 121, 114, 0.1), transparent),
    var(--wall);
  text-align: center;
}

.admin-body {
  background: #f2f0e9;
}

.admin-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.admin-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.login-panel {
  display: grid;
  place-items: center;
  min-height: 54vh;
}

.login-form {
  width: min(100%, 440px);
}

.login-form h2,
.edit-form h2 {
  margin: 0;
  font-size: 28px;
}

.admin-header h1 {
  margin: 6px 0 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
}

.admin-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  text-decoration: none;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.admin-workspace {
  display: grid;
  gap: 18px;
}

.admin-tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 247, 242, 0.92);
  backdrop-filter: blur(10px);
}

.admin-tab {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
}

.admin-tab.is-active {
  color: #fff;
  border-color: var(--teal);
  background: var(--teal);
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.is-active {
  display: block;
  animation: panel-in 220ms ease both;
}

.admin-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.admin-section-head h2 {
  margin: 6px 0 0;
  font-size: 28px;
}

.admin-section-head p {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.site-settings {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.site-form {
  border: 0;
  padding: 0;
}

.account-grid {
  display: grid;
  gap: 16px;
}

.account-list-panel h3 {
  margin: 0;
  font-size: 20px;
}

.account-list {
  display: grid;
  gap: 10px;
}

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.account-row strong,
.account-row span {
  display: block;
}

.account-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.account-row em {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: var(--teal);
  font-size: 12px;
  font-style: normal;
}

.article-admin-row {
  grid-template-columns: 96px minmax(0, 1fr) auto;
}

.article-cover-thumb {
  display: grid;
  place-items: center;
  width: 96px;
  height: 76px;
  border-radius: 6px;
  overflow: hidden;
  color: #fff;
  background: var(--teal);
  font-size: 13px;
  font-weight: 700;
}

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

.member-admin-row {
  grid-template-columns: 96px minmax(0, 1fr) auto;
}

.member-avatar-thumb {
  width: 96px;
  height: 76px;
  border-radius: 6px;
  font-size: 26px;
}

.status-pill {
  align-self: center;
  padding: 8px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--teal);
  font-size: 12px;
}

.status-pill.is-draft {
  color: var(--ink);
  background: var(--wall);
  border: 1px solid var(--line);
}

.settings-subtitle {
  margin: 8px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 18px;
}

.edit-dialog {
  width: min(760px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  background: transparent;
}

.edit-dialog::backdrop {
  background: rgba(31, 36, 38, 0.54);
}

.edit-form {
  position: relative;
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
}

.toast {
  padding: 14px 16px;
  border: 1px solid rgba(31, 121, 114, 0.28);
  border-radius: 8px;
  color: var(--ink);
  background: #fffdf8;
  box-shadow: var(--shadow);
  animation: toast-in 180ms ease both;
}

.toast.error {
  border-color: rgba(185, 86, 66, 0.42);
}

.toast.is-leaving {
  opacity: 0;
  transform: translateX(16px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.wechat-preview {
  min-height: 220px;
}

.member-preview {
  min-height: 180px;
}

.format-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.format-toolbar button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fffdf8;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.upload-panel,
.admin-list-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  animation: panel-in 220ms ease both;
}

.upload-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.upload-panel label {
  display: grid;
  gap: 7px;
}

.upload-panel label span {
  color: var(--muted);
  font-size: 13px;
}

.upload-panel input,
.upload-panel textarea,
.upload-panel select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #f8f7f2;
}

.upload-panel textarea {
  min-height: 104px;
  padding-block: 10px;
  line-height: 1.55;
  resize: vertical;
}

.upload-panel input[type="file"] {
  padding: 9px 12px;
}

.image-preview {
  display: grid;
  place-items: center;
  min-height: 260px;
  overflow: hidden;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--wall);
}

.image-preview img {
  width: 100%;
  height: 100%;
  max-height: 360px;
  object-fit: contain;
}

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

.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f7f2;
}

.upload-panel .check-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
}

.upload-panel .check-row input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  padding: 0;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--teal);
}

.admin-list-panel {
  padding: 18px;
}

.admin-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-list-head h2 {
  margin: 0;
  font-size: 22px;
}

.admin-list-head span {
  color: var(--muted);
}

.admin-list {
  display: grid;
  gap: 12px;
}

.admin-art-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    border-color 140ms ease;
}

.admin-art-row:hover {
  transform: translateY(-2px);
  border-color: rgba(31, 121, 114, 0.36);
  box-shadow: 0 12px 28px rgba(31, 36, 38, 0.08);
}

.admin-art-row img {
  width: 96px;
  height: 76px;
  border-radius: 6px;
  object-fit: cover;
}

.admin-art-row h3 {
  margin: 0 0 5px;
  font-size: 17px;
}

.admin-art-row p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-message-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 16px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.admin-message-row h3 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 8px;
  font-size: 18px;
}

.admin-message-row h3 span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  background: var(--teal);
  font-size: 12px;
  font-weight: 600;
}

.admin-message-row p {
  margin: 0 0 7px;
  color: var(--muted);
  line-height: 1.55;
}

.admin-message-controls {
  display: grid;
  gap: 8px;
}

.admin-message-controls select,
.admin-message-controls textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f7f2;
}

.admin-message-controls select {
  min-height: 40px;
  padding: 0 10px;
}

.admin-message-controls textarea {
  min-height: 86px;
  padding: 10px;
  resize: vertical;
}

.image-manager {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.artwork-image-list {
  display: grid;
  gap: 10px;
}

.artwork-image-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 88px auto auto;
  gap: 8px;
  align-items: center;
}

.artwork-image-row img {
  width: 72px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
}

.art-dialog {
  width: min(1080px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  color: var(--ink);
  background: #fffdf8;
  box-shadow: var(--shadow);
}

.article-dialog {
  width: min(880px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  color: var(--ink);
  background: #fffdf8;
  box-shadow: var(--shadow);
}

.article-dialog::backdrop {
  background: rgba(31, 36, 38, 0.54);
}

.article-dialog-copy {
  padding: clamp(24px, 5vw, 56px);
  overflow: auto;
}

.article-dialog-copy h2 {
  margin: 8px 0 8px;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.08;
}

.article-dialog-copy > p {
  color: var(--muted);
}

.article-dialog-copy img {
  width: 100%;
  max-height: 420px;
  margin: 20px 0;
  border-radius: 8px;
  object-fit: cover;
}

.article-content {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.article-content p {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.9;
}

.article-content h3 {
  margin: 8px 0 0;
  font-size: 24px;
}

.article-content blockquote {
  margin: 0;
  padding: 14px 16px;
  border-left: 4px solid var(--teal);
  color: var(--muted);
  background: var(--paper);
  line-height: 1.8;
}

.article-content ul {
  margin: 0;
  padding-left: 22px;
  line-height: 1.8;
}

.art-dialog::backdrop {
  background: rgba(31, 36, 38, 0.54);
}

.art-dialog[open] {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.dialog-media {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  min-height: 560px;
  background: #242623;
}

.dialog-media-stage {
  position: relative;
  display: grid;
  min-height: 0;
}

.dialog-media img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: contain;
}

.dialog-media-stage img {
  min-height: 0;
}

.dialog-image-caption {
  margin: 0;
  padding: 10px 14px;
  color: #fffdf8;
  background: rgba(0, 0, 0, 0.26);
  text-align: center;
}

.image-step {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 253, 248, 0.62);
  border-radius: 999px;
  color: #fffdf8;
  background: rgba(31, 36, 38, 0.58);
}

.image-step.prev {
  left: 14px;
}

.image-step.next {
  right: 14px;
}

.artwork-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px;
  background: #1f2426;
}

.artwork-thumb {
  flex: 0 0 72px;
  height: 58px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 8px;
  background: transparent;
}

.artwork-thumb.is-active {
  border-color: var(--gold);
}

.artwork-thumb img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.member-detail {
  display: grid;
  gap: 18px;
}

.member-detail-head {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.member-detail-head img,
.member-detail-head > span {
  display: grid;
  place-items: center;
  width: 120px;
  height: 120px;
  border-radius: 8px;
  color: #fff;
  background: var(--plum);
  object-fit: cover;
  font-size: 40px;
  font-weight: 800;
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 20;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  place-items: center;
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  padding: 28px;
  border: 0;
  background: rgba(31, 36, 38, 0.86);
}

.image-viewer:not([open]) {
  display: none;
}

.image-viewer[open] {
  display: grid;
  animation: panel-in 180ms ease both;
}

.image-viewer::backdrop {
  background: rgba(31, 36, 38, 0.78);
}

.image-viewer-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding-top: 2px;
}

.image-viewer-toolbar .icon-button,
.image-viewer-toolbar .quiet-button {
  min-width: 44px;
  color: var(--ink);
  background: #fffdf8;
}

.image-viewer-canvas {
  display: grid;
  place-items: center;
  width: min(100%, 1240px);
  height: 100%;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.image-viewer-canvas img {
  max-width: min(100%, 1200px);
  max-height: calc(100vh - 160px);
  object-fit: contain;
  box-shadow: var(--shadow);
  transform-origin: center center;
  transition: transform 120ms ease;
}

.image-viewer p {
  max-width: min(100%, 900px);
  margin: 0;
  color: #fffdf8;
  text-align: center;
}

.image-viewer .dialog-close {
  position: fixed;
  top: 18px;
  right: 18px;
}

.dialog-copy {
  padding: clamp(24px, 4vw, 46px);
  overflow: auto;
}

.dialog-copy h2 {
  margin: 8px 0 8px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
}

.dialog-copy p {
  color: var(--muted);
  line-height: 1.7;
}

.dialog-section {
  margin-top: 22px;
}

.dialog-section h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.dialog-section p {
  margin: 0;
}

.detail-list {
  display: grid;
  gap: 14px;
  margin: 26px 0;
}

.detail-list div {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.detail-list dt {
  color: var(--muted);
  font-size: 13px;
}

.detail-list dd {
  margin: 5px 0 0;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .side-rail {
    position: static;
    height: auto;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .room-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .quick-links,
  .exhibition-detail,
  .member-detail-head {
    grid-template-columns: 1fr 1fr;
  }

  .visit-card {
    display: none;
  }

  .topbar,
  .exhibit-view,
  .wall-panel,
  .association-panel,
  .wechat-panel,
  .category-page,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .category-page {
    display: grid;
  }

  .topbar {
    display: grid;
  }

  .floor-map {
    min-height: 220px;
  }

  .art-dialog[open] {
    grid-template-columns: 1fr;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-section-head {
    display: grid;
  }

  .wechat-qr {
    max-width: 260px;
  }

  .dialog-media {
    min-height: 360px;
  }
}

@media (max-width: 620px) {
  .gallery-stage {
    padding-inline: 14px;
  }

  .mobile-nav-toggle,
  .filter-toggle {
    display: grid;
    place-items: center;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #fffdf8;
  }

  .room-nav {
    grid-template-columns: 1fr 1fr;
  }

  .side-rail .room-nav {
    display: none;
  }

  .side-rail .room-nav.is-open {
    display: grid;
  }

  .room-button {
    min-height: 40px;
    font-size: 14px;
  }

  .top-actions,
  .collection-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .collection-tools .tabs {
    display: none;
  }

  .collection-tools.is-filter-open .tabs {
    display: flex;
  }

  .search-box {
    flex: auto;
  }

  .icon-button {
    width: 100%;
  }

  .wall-panel {
    min-height: 0;
    padding: 14px;
  }

  .feature-copy h2 {
    font-size: 30px;
  }

  .feature-actions {
    display: grid;
  }

  .primary-button,
  .quiet-button {
    width: 100%;
  }

  .admin-header,
  .admin-art-row,
  .admin-message-row,
  .artwork-image-row,
  .member-admin-row,
  .article-admin-row {
    grid-template-columns: 1fr;
  }

  .admin-header {
    display: grid;
  }

  .admin-tabs {
    grid-template-columns: 1fr;
  }

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

  .admin-art-row img {
    width: 100%;
    height: 180px;
  }

  .article-card button {
    grid-template-columns: 1fr;
  }

  .member-card {
    grid-template-columns: 1fr;
  }

  .exhibition-card button,
  .member-card button,
  .quick-links,
  .exhibition-detail,
  .member-detail-head {
    grid-template-columns: 1fr;
  }

  .exhibition-detail-cover {
    min-height: 220px;
  }

  .article-cover,
  .article-cover-thumb,
  .member-avatar-thumb {
    width: 100%;
    height: 180px;
    min-height: 170px;
  }
}

/* UI V3 Stage 2: detail pages, forms, admin and states */
:root {
  --admin-bg: #f3eee5;
  --admin-surface: #fffdfa;
  --danger: #9b2f32;
  --success: #51624f;
}

.tag,
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.tag-feature {
  color: #765735;
  background: #ede0cf;
}

.tag-pin {
  color: var(--white);
  background: var(--black);
}

.tag-line {
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.48);
}

.status-available {
  color: #665034;
  border: 1px solid #d8c4a5;
  background: #f2eadc;
}

.status-reserve {
  color: #7e2426;
  border: 1px solid #d9b2aa;
  background: #ead5cf;
}

.status-enhance {
  color: #4c5c54;
  border: 1px solid #cbd2c8;
  background: #e7ebe5;
}

.art-dialog,
.article-dialog,
.edit-dialog {
  border: 1px solid rgba(222, 213, 200, 0.82);
  background: var(--paper-card);
  box-shadow: var(--shadow-deep);
}

.art-dialog[open] {
  width: min(1180px, calc(100% - 32px));
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 0;
}

.art-dialog::backdrop,
.article-dialog::backdrop,
.edit-dialog::backdrop,
.confirm-dialog::backdrop {
  background: rgba(27, 23, 19, 0.68);
  backdrop-filter: blur(6px);
}

.dialog-media {
  min-height: 640px;
  padding: 22px;
  background: var(--black);
}

.dialog-media-stage {
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: #0f0d0b;
}

.dialog-media img {
  filter: saturate(0.9) contrast(0.98);
}

.image-step {
  width: 44px;
  height: 44px;
  border-color: rgba(255, 252, 246, 0.42);
  background: rgba(27, 23, 19, 0.72);
}

.dialog-image-caption {
  padding: 12px 14px 4px;
  color: #cfc4b5;
  background: transparent;
  font-size: 13px;
}

.artwork-thumbs {
  gap: 12px;
  padding: 14px 0 0;
  background: transparent;
}

.artwork-thumb {
  flex-basis: 72px;
  height: 72px;
  padding: 4px;
  border: 1px solid rgba(255, 252, 246, 0.18);
  opacity: 0.66;
  background: rgba(255, 252, 246, 0.08);
}

.artwork-thumb.is-active {
  border-color: var(--bronze);
  opacity: 1;
}

.dialog-copy {
  padding: clamp(28px, 4vw, 52px);
  overflow: auto;
}

.dialog-copy h2,
.article-dialog-copy h2 {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.14;
  letter-spacing: 0;
}

.dialog-copy > p,
.dialog-section p,
.member-detail > p {
  color: var(--muted);
  line-height: 1.9;
}

.dialog-section {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.dialog-section h3,
.related-section h3,
.settings-subtitle {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
}

.detail-list {
  margin: 28px 0;
  border-top: 1px solid var(--line);
}

.detail-list div {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 18px;
  padding: 14px 0;
  border-top: 0;
  border-bottom: 1px solid var(--line);
}

.detail-list dt {
  color: var(--muted-2);
}

.detail-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.article-dialog {
  width: min(960px, calc(100% - 32px));
}

.article-dialog-copy {
  padding: clamp(30px, 6vw, 70px);
}

.article-dialog-copy > .eyebrow,
.dialog-copy > .eyebrow {
  margin-bottom: 12px;
}

.article-dialog-copy > p {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.article-dialog-copy img {
  max-height: 460px;
  margin: 28px 0 38px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper-card);
  box-shadow: var(--shadow);
  filter: saturate(0.86);
}

.article-content {
  gap: 18px;
  margin-top: 26px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.42);
}

.article-content p {
  color: #3a342d;
  font-size: 17px;
  line-height: 2.05;
}

.article-content h3 {
  font-family: var(--serif);
  font-size: 30px;
}

.article-content blockquote {
  border-left-color: var(--red);
  color: var(--red);
  background: transparent;
  font-family: var(--serif);
  font-size: 22px;
}

.member-detail-head {
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 24px;
}

.member-detail-head img,
.member-detail-head > span {
  width: 150px;
  height: 150px;
  border-radius: 0;
  background: var(--black);
}

.member-detail-head dl,
.exhibition-detail-copy dl {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.member-detail-head dl div,
.exhibition-detail-copy dl div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.member-detail-head dt,
.exhibition-detail-copy dt {
  color: var(--muted-2);
  font-size: 13px;
}

.member-detail-head dd,
.exhibition-detail-copy dd {
  margin: 0;
  font-weight: 700;
}

.related-section {
  margin-top: 24px;
  padding: 22px;
  border-radius: 0;
  background: rgba(255, 252, 246, 0.62);
}

.mini-card {
  border-radius: 0;
  background: var(--paper-card);
}

.exhibition-detail {
  grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.08fr);
  padding: clamp(22px, 4vw, 42px);
  border-radius: 0;
  box-shadow: var(--shadow);
}

.exhibition-detail-cover {
  border-radius: 0;
  filter: saturate(0.86);
}

.exhibition-detail-copy h2 {
  font-size: clamp(38px, 5vw, 62px);
}

.detail-back {
  border-color: var(--red);
  color: var(--red);
}

.form-section:not([hidden]) {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 54px;
  align-items: start;
  margin: 20px 0 64px;
}

.form-section > .section-heading {
  position: sticky;
  top: 108px;
  display: block;
  margin: 0;
  padding: 26px 0 0;
}

.form-section > .section-heading h2 {
  margin-top: 12px;
  font-family: var(--serif);
  font-size: clamp(38px, 5vw, 52px);
}

.form-section > .section-heading p {
  max-width: 420px;
  margin-top: 14px;
  line-height: 1.9;
}

.public-form {
  gap: 18px;
  padding: clamp(24px, 4vw, 36px);
  border-radius: 0;
  background: var(--paper-card);
  box-shadow: var(--shadow);
}

.public-form label {
  gap: 8px;
}

.public-form label span {
  color: var(--ink);
  font-weight: 800;
}

.public-form input,
.public-form textarea,
.public-form select {
  min-height: 46px;
  border-radius: 0;
  background: #fffdfa;
  outline: none;
}

.public-form input:focus,
.public-form textarea:focus,
.upload-panel input:focus,
.upload-panel textarea:focus,
.upload-panel select:focus,
.admin-message-controls textarea:focus,
.admin-message-controls select:focus {
  border-color: var(--bronze);
  box-shadow: 0 0 0 3px rgba(176, 138, 91, 0.12);
}

.form-status {
  display: flex;
  align-items: center;
  min-height: 34px;
  color: var(--muted);
  font-weight: 700;
}

.form-status.is-success::before,
.form-status.is-error::before {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: 10px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 900;
}

.form-status.is-success::before {
  content: "✓";
  color: var(--success);
  background: #e7ebe5;
}

.form-status.is-error::before {
  content: "!";
  color: var(--red);
  background: #ead5cf;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 156px;
  padding: 24px;
  border: 1px dashed var(--line-2);
  border-radius: 0;
  color: var(--muted);
  background: rgba(255, 252, 246, 0.62);
  text-align: center;
}

.empty-state::before {
  content: "∅";
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  border-radius: 50%;
  color: var(--bronze);
  background: #efe5d8;
  font-weight: 900;
}

.admin-body {
  min-height: 100vh;
  background: var(--admin-bg);
  color: #251f19;
  font-size: 14px;
}

.admin-body::before {
  opacity: 0.52;
}

.admin-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0 0 44px;
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 15;
  min-height: 72px;
  margin: 0;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.88);
  backdrop-filter: blur(14px);
}

.admin-header h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.admin-header .eyebrow {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 11px;
}

.admin-header .eyebrow::before {
  display: none;
}

.admin-dashboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 28px 28px 0;
}

.admin-dashboard[hidden] {
  display: none !important;
}

.stat-card {
  border: 1px solid var(--line);
  background: var(--admin-surface);
  padding: 20px;
}

.stat-card span {
  color: var(--muted);
  font-size: 12px;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.1;
}

.login-panel {
  min-height: calc(100vh - 72px);
}

.login-form {
  width: min(100%, 460px);
  padding: 30px;
  box-shadow: var(--shadow);
}

.admin-workspace {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 20px 28px 0;
}

.admin-tabs {
  position: sticky;
  top: 92px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  min-height: calc(100vh - 120px);
  padding: 18px;
  border: 0;
  border-radius: 0;
  color: #e8dfd2;
  background: var(--black);
  box-shadow: var(--shadow-deep);
}

.admin-tabs::before {
  content: "榆林青美协后台\A Content Management";
  white-space: pre-line;
  display: block;
  padding-bottom: 18px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-weight: 800;
  line-height: 1.5;
}

.admin-tab {
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  color: #c9c0b4;
  background: transparent;
  text-align: left;
}

.admin-tab:hover,
.admin-tab.is-active {
  color: var(--white);
  border-color: transparent;
  background: rgba(255, 255, 255, 0.08);
}

.admin-tab::after {
  content: "›";
  float: right;
}

.admin-tab-panel.is-active {
  min-width: 0;
}

.admin-section-head,
.admin-list-head,
.site-settings,
.upload-panel,
.admin-list-panel,
.account-row,
.admin-art-row,
.admin-message-row,
.image-manager {
  border-radius: 0;
  background: var(--admin-surface);
}

.admin-section-head,
.admin-list-head {
  padding: 20px;
}

.admin-section-head h2,
.admin-list-head h2,
.admin-list-head h3 {
  font-size: 20px;
  letter-spacing: 0;
}

.admin-layout {
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 18px;
}

.upload-panel,
.admin-list-panel,
.site-settings,
.account-list-panel {
  padding: 20px;
  box-shadow: none;
}

.upload-panel input,
.upload-panel textarea,
.upload-panel select,
.admin-message-controls select,
.admin-message-controls textarea {
  min-height: 42px;
  border-radius: 0;
  background: #fffdfa;
}

.image-preview {
  min-height: 240px;
  border-radius: 0;
  background: rgba(255, 252, 246, 0.62);
}

.check-row {
  border-radius: 0;
  background: #fffdfa;
}

.admin-art-row {
  grid-template-columns: 96px minmax(0, 1fr) auto;
  padding: 12px;
  background: var(--admin-surface);
}

.admin-art-row:hover {
  border-color: rgba(176, 138, 91, 0.52);
}

.admin-art-row img,
.article-cover-thumb,
.member-avatar-thumb,
.artwork-image-row img {
  border-radius: 0;
}

.admin-row-actions .quiet-button,
.admin-message-controls .quiet-button,
.format-toolbar button {
  min-height: 36px;
  border-radius: 8px;
  font-size: 12px;
}

.admin-row-actions [data-delete],
.admin-row-actions [data-delete-article],
.admin-row-actions [data-delete-member],
.admin-row-actions [data-delete-exhibition],
.admin-message-controls [data-delete-feedback],
[data-delete-artwork-image] {
  color: var(--red);
  border-color: rgba(143, 38, 40, 0.32);
}

.status-pill {
  background: var(--red);
}

.status-pill.is-draft {
  color: var(--muted);
  background: #f2eadc;
}

.admin-message-row {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  padding: 18px;
}

.admin-message-row h3 span {
  background: var(--red);
}

.toast-stack {
  z-index: 80;
}

.toast {
  display: flex;
  gap: 10px;
  align-items: center;
  border-radius: 0;
  border-color: var(--line);
  background: var(--admin-surface);
}

.toast.error {
  border-color: #d9b2aa;
}

.toast .ico {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: var(--success);
  background: #e7ebe5;
  font-weight: 900;
}

.toast.error .ico {
  color: var(--red);
  background: #ead5cf;
}

.confirm-dialog {
  width: min(440px, calc(100% - 32px));
  padding: 0;
  border: 0;
  background: transparent;
}

.confirm-card {
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--paper-card);
  box-shadow: var(--shadow-deep);
}

.confirm-card h2 {
  margin: 8px 0 10px;
  font-family: var(--serif);
  font-size: 30px;
}

.confirm-card p {
  color: var(--muted);
  line-height: 1.8;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.danger-button {
  border-color: var(--danger);
  background: var(--danger);
}

.loading-box {
  display: grid;
  place-items: center;
  min-height: 156px;
  border: 1px dashed var(--line-2);
  background: rgba(255, 252, 246, 0.62);
  color: var(--muted);
  text-align: center;
}

.loading-spinner,
.button-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #e7ddd1;
  border-top-color: var(--bronze);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

@media (max-width: 1100px) {
  .art-dialog[open],
  .exhibition-detail,
  .form-section:not([hidden]),
  .admin-workspace,
  .admin-layout,
  .admin-message-row {
    grid-template-columns: 1fr;
  }

  .form-section > .section-heading,
  .admin-tabs {
    position: static;
  }

  .admin-tabs {
    min-height: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-tabs::before {
    grid-column: 1 / -1;
  }

  .admin-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .dialog-media {
    min-height: 360px;
    padding: 12px;
  }

  .dialog-copy,
  .article-dialog-copy {
    padding: 24px 20px;
  }

  .detail-list div,
  .member-detail-head dl div,
  .exhibition-detail-copy dl div {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .member-detail-head,
  .form-grid,
  .admin-dashboard,
  .admin-tabs,
  .admin-art-row,
  .article-admin-row,
  .member-admin-row,
  .artwork-image-row {
    grid-template-columns: 1fr;
  }

  .member-detail-head img,
  .member-detail-head > span {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }

  .form-section:not([hidden]) {
    gap: 24px;
  }

  .admin-header {
    display: grid;
    height: auto;
    min-height: 88px;
    padding: 14px 18px;
  }

  .admin-dashboard,
  .admin-workspace {
    padding-inline: 18px;
  }

  .admin-row-actions,
  .confirm-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* UI V3: 墨砂典藏 visual layer */
body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    radial-gradient(840px 420px at 88% 4%, rgba(143, 38, 40, 0.045), transparent 68%),
    radial-gradient(720px 360px at 6% 42%, rgba(176, 138, 91, 0.075), transparent 68%),
    radial-gradient(1px 1px at 18px 24px, rgba(68, 55, 38, 0.075), transparent 1px),
    radial-gradient(1px 1px at 68px 84px, rgba(68, 55, 38, 0.045), transparent 1px);
  background-size: auto, auto, 112px 112px, 148px 148px;
}

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

.app-shell {
  display: block;
  min-height: auto;
}

.side-rail {
  position: sticky;
  top: 0;
  z-index: 20;
  flex-direction: row;
  align-items: center;
  gap: 28px;
  height: 84px;
  padding: 0 clamp(18px, 4vw, 40px);
  border-right: 0;
  border-bottom: 1px solid rgba(222, 213, 200, 0.86);
  background: rgba(255, 252, 246, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  flex: 0 0 auto;
  min-width: 258px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 0;
  color: var(--white);
  background: var(--red);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  font-family: var(--serif);
  font-size: 25px;
}

.brand strong {
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: 0.03em;
}

.brand small {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.side-rail .room-nav {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2vw, 28px);
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.side-rail .room-nav::-webkit-scrollbar {
  display: none;
}

.room-button {
  position: relative;
  flex: 0 0 auto;
  width: auto;
  min-height: 84px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #27231e;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.room-button:hover,
.room-button.is-active {
  color: var(--red);
  border-color: transparent;
  background: transparent;
}

.room-button.is-active::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  content: "";
  background: var(--red);
}

.room-dot {
  display: none;
}

.visit-card {
  display: none;
}

.admin-link,
.primary-button,
.quiet-button,
.tab,
.filter-toggle,
.mobile-nav-toggle,
.search-box,
.icon-button,
.dialog-close {
  border-radius: 999px;
}

.gallery-stage {
  display: flex;
  flex-direction: column;
  width: min(1240px, calc(100% - 72px));
  margin: 0 auto;
  padding: 64px 0 78px;
}

.topbar {
  order: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 410px);
  align-items: start;
  gap: 48px;
  margin-bottom: 22px;
}

.topbar h1,
.association-panel h2,
.feature-copy h2,
.section-heading h2,
.category-page h2,
.contact-panel h2,
.wechat-panel h2,
.exhibition-detail-copy h2,
.article-dialog-copy h2 {
  font-family: var(--serif);
  letter-spacing: 0;
}

.topbar h1 {
  max-width: 780px;
  margin: 8px 0 0;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.02;
  overflow-wrap: anywhere;
}

.eyebrow,
.visit-card span {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 38px;
  height: 1px;
  content: "";
  background: var(--red);
}

.top-actions {
  justify-content: flex-end;
  min-width: 0;
}

.search-box {
  min-height: 42px;
  border-color: var(--line);
  background: rgba(255, 252, 246, 0.8);
}

.search-box span {
  color: var(--ink);
  font-size: 18px;
}

.icon-button,
.dialog-close {
  border-color: var(--line);
  background: var(--paper-card);
}

.icon-button[aria-pressed="true"],
.tab.is-active,
.save-mini.is-saved,
.form-status.is-success {
  color: var(--white);
  border-color: var(--red);
  background: var(--red);
}

.association-panel {
  order: 2;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.58fr);
  gap: 44px;
  margin-bottom: 18px;
  padding: clamp(28px, 5vw, 56px);
  border-color: var(--line);
  background:
    linear-gradient(115deg, rgba(255, 252, 246, 0.94) 0%, rgba(255, 252, 246, 0.72) 58%, rgba(176, 138, 91, 0.12) 100%),
    var(--paper-card);
  box-shadow: var(--shadow);
}

.association-panel h2 {
  max-width: 760px;
  margin: 14px 0 18px;
  font-size: clamp(34px, 5vw, 58px);
  overflow-wrap: anywhere;
}

.association-panel p,
.wechat-panel p,
.contact-grid p,
.feature-copy p,
.category-page p,
.article-card-copy p:last-child,
.exhibition-card p,
.member-card p:last-child,
.program-card p:last-child,
.exhibition-detail-copy p {
  color: var(--muted);
}

.association-stats {
  gap: 12px;
}

.association-stats .stat-link {
  min-height: 92px;
  padding: 18px;
  border-radius: 0;
  background: rgba(246, 241, 232, 0.76);
}

.association-stats .stat-link:hover,
.association-stats .stat-link:focus-visible {
  border-color: rgba(176, 138, 91, 0.5);
  background: var(--paper-card);
  box-shadow: var(--shadow);
}

.quick-links {
  order: 3;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 26px 0 56px;
}

.quick-link {
  position: relative;
  min-height: 158px;
  padding: 26px 24px;
  overflow: hidden;
  border-radius: 0;
  background: rgba(255, 250, 240, 0.72);
}

.quick-link:hover {
  border-color: #cbb7a1;
  box-shadow: var(--shadow);
}

.quick-link::before {
  position: absolute;
  top: -28px;
  right: -28px;
  width: 88px;
  height: 88px;
  content: "";
  border: 1px solid rgba(143, 38, 40, 0.24);
  border-radius: 50%;
}

.quick-link span {
  color: var(--bronze);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.quick-link strong {
  max-width: 220px;
  margin-top: 12px;
  font-size: 20px;
  line-height: 1.36;
}

.exhibit-view {
  order: 4;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 20px;
  margin-bottom: 64px;
}

.wall-panel {
  min-height: 520px;
  padding: clamp(24px, 5vw, 54px);
  border-color: var(--line);
  background:
    linear-gradient(90deg, rgba(143, 38, 40, 0.08) 0, transparent 24%),
    var(--paper-soft);
}

.artwork-frame {
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--paper-card);
  box-shadow: var(--shadow-deep);
}

.artwork-frame::after {
  position: absolute;
  inset: 13px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.58);
  pointer-events: none;
}

.feature-frame {
  aspect-ratio: 1.08 / 1;
}

.feature-copy h2 {
  font-size: clamp(34px, 4vw, 56px);
}

.primary-button,
.quiet-button {
  min-height: 44px;
  padding: 0 22px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.primary-button {
  border-color: var(--red);
  color: var(--white);
  background: var(--red);
  box-shadow: 0 12px 28px rgba(143, 38, 40, 0.16);
}

.primary-button:hover:not(:disabled) {
  background: var(--red-dark);
}

.quiet-button {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}

.floor-map {
  border-color: rgba(222, 213, 200, 0.9);
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--paper-card);
  background-size: 48px 48px;
}

.floor-map::after {
  border-color: rgba(143, 38, 40, 0.42);
}

.map-node.is-active {
  border-color: var(--red);
  background: var(--red);
}

.category-page,
.collection-tools {
  order: 10;
}

.article-section {
  order: 5;
  margin-bottom: 64px;
}

.exhibition-section {
  order: 6;
  margin: 0 0 64px;
  padding: clamp(26px, 5vw, 48px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--white);
  background:
    radial-gradient(680px 340px at 82% 20%, rgba(143, 38, 40, 0.22), transparent 60%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    var(--black);
  background-size: auto, 72px 72px, auto;
}

.member-section {
  order: 7;
  margin-bottom: 64px;
}

.contact-panel {
  order: 8;
  margin-bottom: 18px;
  padding: clamp(28px, 4vw, 48px);
  border-color: var(--line);
  color: var(--white);
  background: var(--red);
}

.contact-panel .eyebrow,
.contact-panel p,
.contact-panel h2 {
  color: var(--white);
}

.contact-panel .eyebrow::before {
  background: rgba(255, 252, 246, 0.72);
}

.contact-grid {
  gap: 16px;
}

.contact-grid article {
  border-color: rgba(255, 255, 255, 0.18);
  border-radius: 0;
  background: rgba(27, 23, 19, 0.18);
}

.contact-grid p {
  color: #f8e1de;
}

.wechat-panel {
  order: 9;
  grid-template-columns: minmax(0, 1fr) 220px;
  margin-bottom: 0;
  padding: clamp(26px, 4vw, 42px);
  border-color: var(--line);
  background: var(--paper-card);
}

.wechat-qr,
.wechat-meta div,
.category-stat,
.contact-grid article,
.program-card,
.public-form,
.exhibition-detail,
.related-section,
.mini-card {
  border-radius: 0;
}

.wechat-qr {
  border-color: rgba(176, 138, 91, 0.5);
  background: var(--paper);
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  font-size: clamp(30px, 4vw, 42px);
}

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

.exhibition-section .section-heading h2,
.exhibition-section .section-heading p,
.exhibition-section .eyebrow {
  color: var(--white);
}

.exhibition-section .eyebrow::before {
  background: #d2b98d;
}

.article-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.article-card,
.exhibition-card,
.member-card,
.art-card {
  border-radius: 0;
  background: var(--paper-card);
  box-shadow: 0 12px 36px rgba(30, 22, 12, 0.04);
}

.article-card:hover,
.exhibition-card:hover,
.member-card:hover,
.art-card:hover {
  border-color: #c6b7a5;
  box-shadow: var(--shadow);
}

.article-card button {
  grid-template-columns: 0.82fr 1fr;
}

.article-cover {
  min-height: 210px;
  color: var(--white);
  background: var(--red);
}

.article-card-copy {
  padding: 22px;
}

.article-card-copy h3 {
  margin: 8px 0 10px;
  font-size: 21px;
}

.exhibition-grid {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.exhibition-card {
  padding: 16px;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.exhibition-card button {
  grid-template-columns: 132px minmax(0, 1fr);
}

.exhibition-card img {
  min-height: 112px;
  border-radius: 0;
}

.exhibition-card h3 {
  color: var(--white);
  font-size: 20px;
}

.exhibition-card p,
.exhibition-card dt,
.exhibition-card dd {
  color: #cfc8bc;
}

.member-grid {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.member-card {
  position: relative;
  padding: 18px;
  overflow: hidden;
}

.member-card::after {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  content: "";
  border: 1px solid rgba(143, 38, 40, 0.28);
  border-radius: 50%;
}

.member-card button {
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
}

.member-avatar,
.member-avatar-thumb,
.mini-avatar {
  border-radius: 0;
  background: var(--black);
}

.member-card h3 {
  font-size: 21px;
}

.art-grid {
  order: 12;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.art-card {
  gap: 14px;
  padding: 12px;
}

.thumb-frame {
  aspect-ratio: 4 / 5;
}

.card-meta {
  color: var(--bronze) !important;
}

.room-chip {
  border-radius: 999px;
  background: var(--black);
}

.save-mini {
  border-radius: 999px;
  background: var(--paper-card);
}

.empty-state,
.detail-empty {
  border-radius: 0;
  background: rgba(255, 252, 246, 0.6);
}

.image-fallback {
  background:
    linear-gradient(135deg, rgba(143, 38, 40, 0.08), transparent),
    var(--paper-soft);
}

.collection-tools {
  align-items: center;
  margin: 26px 0 22px;
}

.tab,
.filter-toggle,
.mobile-nav-toggle {
  background: var(--paper-card);
}

.public-form input,
.public-form textarea,
.upload-panel input,
.upload-panel textarea,
.upload-panel select,
.admin-message-controls select,
.admin-message-controls textarea {
  border-radius: 0;
  background: var(--paper);
}

.form-status.is-success {
  color: var(--red);
  background: transparent;
}

.form-status.is-error {
  color: var(--red);
}

.art-dialog,
.article-dialog,
.image-viewer,
.edit-dialog {
  border-radius: 0;
}

.dialog-media {
  background: var(--black);
}

.artwork-thumb {
  border-radius: 0;
}

.site-footer {
  color: #cbc4b8;
  background: var(--black);
}

.site-footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 34px;
  width: min(1240px, calc(100% - 72px));
  margin: 0 auto;
  padding: 42px 0;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-brand h2 {
  margin: 0 0 4px;
  color: var(--white);
  font-size: 18px;
}

.footer-brand p {
  margin: 0;
  color: #8e867b;
  font-size: 13px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 13px;
}

.footer-links a {
  color: #afa79a;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--white);
}

@media (max-width: 1180px) {
  .side-rail {
    gap: 18px;
  }

  .brand {
    min-width: 220px;
  }

  .brand small {
    display: none;
  }

  .room-button {
    font-size: 13px;
  }
}

@media (max-width: 980px) {
  .side-rail {
    position: sticky;
    height: 72px;
    padding: 0 16px;
  }

  .brand {
    min-width: 0;
  }

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

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

  .mobile-nav-toggle {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    min-width: 72px;
    min-height: 40px;
    margin-left: auto;
    border: 1px solid var(--line);
    color: var(--ink);
    background: var(--paper-card);
  }

  .side-rail .room-nav {
    position: absolute;
    top: 72px;
    right: 0;
    left: 0;
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 14px 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(27, 23, 19, 0.96);
    box-shadow: var(--shadow-deep);
  }

  .side-rail .room-nav.is-open {
    display: grid;
  }

  .room-button {
    justify-content: flex-start;
    min-height: 46px;
    padding: 0 4px;
    color: var(--white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .room-button:hover,
  .room-button.is-active {
    color: #d2b98d;
  }

  .room-button.is-active::after {
    display: none;
  }

  .gallery-stage,
  .site-footer-inner {
    width: calc(100% - 32px);
  }

  .gallery-stage {
    padding-top: 34px;
  }

  .topbar,
  .association-panel,
  .exhibit-view,
  .wall-panel,
  .wechat-panel {
    grid-template-columns: 1fr;
  }

  .topbar {
    gap: 24px;
  }

  .topbar h1 {
    font-size: clamp(38px, 10vw, 54px);
  }

  .quick-links,
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }

  .exhibition-section {
    padding: 24px 18px;
  }

  .site-footer-inner {
    display: grid;
  }
}

@media (max-width: 620px) {
  .side-rail {
    height: 70px;
    position: sticky;
    width: 100vw;
    max-width: 100vw;
  }

  .side-rail .room-nav {
    top: 70px;
  }

  .mobile-nav-toggle {
    position: fixed !important;
    top: 15px !important;
    right: 16px !important;
    z-index: 9999 !important;
    display: grid !important;
    margin-left: 0;
    box-shadow: 0 8px 18px rgba(27, 23, 19, 0.06);
  }

  .brand {
    max-width: calc(100% - 104px);
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }

  .brand strong {
    max-width: 168px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .gallery-stage {
    padding-bottom: 46px;
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
  }

  .topbar {
    display: grid;
    margin-bottom: 18px;
  }

  .topbar > *,
  .association-panel > *,
  .wall-panel > * {
    min-width: 0;
  }

  .topbar h1 {
    inline-size: min(100%, 8em);
    font-size: 38px;
    line-height: 1.08;
    word-break: break-word;
    line-break: anywhere;
  }

  .top-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .top-actions .icon-button {
    width: 100%;
  }

  .association-panel {
    padding: 24px 20px;
  }

  .association-panel h2,
  .feature-copy h2,
  .section-heading h2,
  .contact-panel h2,
  .wechat-panel h2 {
    inline-size: min(100%, 9em);
    font-size: 28px;
    word-break: break-word;
    line-break: anywhere;
  }

  .quick-links,
  .contact-grid,
  .article-card button,
  .exhibition-card button,
  .member-card button {
    grid-template-columns: 1fr;
  }

  .quick-links {
    gap: 12px;
    margin-bottom: 36px;
  }

  .quick-link {
    min-height: 128px;
    padding: 18px;
  }

  .quick-link strong {
    font-size: 18px;
  }

  .wall-panel {
    min-height: 0;
    padding: 18px;
  }

  .artwork-frame {
    padding: 14px;
  }

  .floor-map {
    display: none;
  }

  .article-cover {
    min-height: 190px;
  }

  .exhibition-card img,
  .member-avatar {
    width: 100%;
    height: 190px;
  }

  .collection-tools.is-filter-open .tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .site-footer-inner {
    padding: 32px 0;
  }
}

/* Runtime themeConfig mapping */
body {
  color: var(--color-text-main);
  background: var(--color-bg);
}

.gallery-stage,
.join-section,
.contact-section,
.article-section,
.member-section,
.exhibition-section,
.youth-section {
  padding-top: calc(64px * var(--theme-space-scale));
  padding-bottom: calc(72px * var(--theme-space-scale));
}

.association-panel,
.contact-panel,
.wechat-panel,
.public-form,
.detail-container,
.art-dialog,
.article-dialog,
.edit-dialog,
.confirm-card,
.upload-panel,
.admin-list-panel,
.site-settings,
.admin-section-head,
.admin-list-head,
.account-row,
.admin-art-row,
.admin-message-row,
.image-manager,
.stat-card,
.theme-panel,
.theme-preview,
.theme-preview-card {
  border-radius: var(--radius-card);
}

.primary-button,
.quiet-button,
.icon-button,
.favorite-button,
.mobile-nav-toggle,
.filter-toggle,
.tab,
.search-box,
.admin-tab,
.dialog-close,
.image-step,
.theme-color-grid label,
.upload-panel input,
.upload-panel textarea,
.upload-panel select,
.admin-message-controls select,
.admin-message-controls textarea,
.check-row,
.status-pill,
.tag,
.status-chip {
  border-radius: var(--radius-control);
}

.admin-body {
  font-family: var(--admin-font);
  background: var(--admin-bg);
  color: var(--color-text-main);
}

.theme-panel {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.72);
}

.theme-panel-head,
.theme-actions,
.theme-preview-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.theme-panel-head h4,
.theme-preview-card h4 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.2;
}

.theme-panel-head span {
  color: var(--muted);
  font-size: 12px;
}

.theme-color-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.theme-color-grid label {
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--paper-card);
}

.theme-color-grid input[type="color"] {
  width: 100%;
  height: 44px;
  min-height: 44px;
  padding: 4px;
  cursor: pointer;
}

.theme-color-grid em {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-style: normal;
}

.theme-preview {
  display: grid;
  gap: var(--preview-gap, 12px);
  padding: var(--preview-padding, 18px);
  border: 1px solid var(--preview-border, var(--line));
  color: var(--preview-text, var(--ink));
  background: var(--preview-bg, var(--paper));
  font-family: var(--preview-body-font, var(--sans));
  font-size: var(--preview-font-size, 16px);
}

.theme-preview-nav {
  min-height: 42px;
  padding: 0 14px;
  color: var(--preview-surface, var(--paper-card));
  background: var(--preview-dark, var(--black));
  border-radius: var(--preview-radius, 8px);
}

.theme-preview-nav span {
  color: rgba(255, 252, 246, 0.72);
  font-size: 12px;
}

.theme-preview-card {
  padding: var(--preview-padding, 18px);
  border: 1px solid var(--preview-border, var(--line));
  color: var(--preview-text, var(--ink));
  background: var(--preview-surface, var(--paper-card));
  border-radius: var(--preview-radius, 8px);
}

.theme-preview-card .eyebrow {
  color: var(--preview-accent, var(--bronze));
}

.theme-preview-card h4 {
  color: var(--preview-text, var(--ink));
  font-family: var(--preview-heading-font, var(--serif));
}

.theme-preview-card p:not(.eyebrow) {
  color: var(--preview-muted, var(--muted));
}

.theme-preview-card .primary-button {
  color: var(--preview-surface, var(--paper-card));
  border-color: var(--preview-brand, var(--red));
  background: var(--preview-brand, var(--red));
  border-radius: var(--preview-radius, 8px);
}

@media (max-width: 760px) {
  .theme-panel-head,
  .theme-actions,
  .theme-preview-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .theme-color-grid {
    grid-template-columns: 1fr 1fr;
  }
}
