:root {
  --ink: #171616;
  --muted: #68605a;
  --paper: #f8f5ee;
  --panel: #ffffff;
  --line: #ddd6cc;
  --accent: #8f2734;
  --accent-dark: #631c25;
  --olive: #596246;
  --blue: #31536a;
  --shadow: 0 16px 45px rgba(23, 22, 22, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, "Times New Roman", serif;
}

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

button,
a {
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 48px);
  background: rgba(248, 245, 238, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #fff;
  background: var(--ink);
  border-radius: 4px;
  font-size: 15px;
  letter-spacing: 0;
}

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

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 15px;
}

.main-nav a:hover {
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ghost-button,
.menu-button,
.text-button,
.tab {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 4px;
  cursor: pointer;
}

.ghost-button,
.menu-button {
  min-width: 44px;
  height: 40px;
}

.menu-button {
  display: none;
}

.hero {
  position: relative;
  min-height: 78vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #111;
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slides img {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  object-fit: cover;
  opacity: 0.82;
  transition: opacity 0.8s ease;
}

.hero-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.6);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.hero-dots button.is-active {
  background: #fff;
  border-color: #fff;
}

.hero-dots button:hover {
  border-color: #fff;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.12) 68%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding: 0 clamp(22px, 6vw, 76px) 76px;
  color: #fff;
}

.hero-copy p:first-child,
.section-heading p,
.artist-copy > p:first-child,
.contact-section p:first-child {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero-copy p:first-child {
  color: #f6d8b9;
}

.hero h1 {
  margin: 0;
  font-size: clamp(56px, 8vw, 112px);
  font-weight: 500;
  line-height: 0.96;
}

.hero-copy p {
  max-width: 560px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(18px, 2.1vw, 24px);
  line-height: 1.8;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
}

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

.primary-button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(143,39,52,0.3);
}

.secondary-button:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.ghost-button:hover,
.text-button:hover,
.tab:hover {
  background: rgba(23,22,22,0.06);
}

.icon-button:hover {
  background: rgba(23,22,22,0.06);
  border-color: var(--accent);
  color: var(--accent);
}

.secondary-button {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.secondary-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.section {
  padding: 86px clamp(18px, 5vw, 64px);
}

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

.section h2 {
  margin: 0;
  font-size: clamp(32px, 5vw, 58px);
  font-weight: 500;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 28px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  padding: 12px 13px;
}

textarea {
  resize: vertical;
}

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

.art-card {
  display: grid;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(23, 22, 22, 0.06);
  cursor: pointer;
}

.art-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(23, 22, 22, 0.15);
}

.card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.art-card figure {
  margin: 0;
  aspect-ratio: 4 / 3;
  background: #e7e0d5;
  overflow: hidden;
}

.art-card img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.art-card:hover img {
  transform: scale(1.05);
}

.art-card-body {
  padding: 16px;
  flex: 1;
}

.art-card h3 {
  margin: 0 0 10px;
  font-size: 21px;
  font-weight: 500;
}

.meta-line,
.price-line {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.price-line {
  margin-top: 12px;
  color: var(--accent);
}

.badge {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ece6dc;
  color: var(--olive);
  font-size: 12px;
}

.detail-section {
  padding-top: 30px;
}

.text-button {
  padding: 10px 14px;
  margin-bottom: 22px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 34px;
  align-items: start;
}

.detail-image {
  background: #e7e0d5;
  border: 1px solid var(--line);
}

.detail-image img {
  max-height: 78vh;
  object-fit: contain;
}

.detail-copy {
  position: sticky;
  top: 96px;
}

.detail-copy h2 {
  margin-bottom: 18px;
}

.detail-copy dl {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 8px 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.detail-copy dd {
  margin: 0;
}

.detail-copy p {
  color: #383430;
  line-height: 1.9;
}

.artist-section {
  background: #fff;
  border-block: 1px solid var(--line);
}

.artist-top {
  display: grid;
  grid-template-columns: minmax(200px, 360px) minmax(0, 1.4fr);
  gap: 48px;
  padding: 86px clamp(18px, 5vw, 64px);
  align-items: start;
}

.artist-portrait img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 4px;
}

.artist-copy {
  align-self: start;
}

.artist-copy p {
  max-width: 840px;
  color: #383430;
  line-height: 1.95;
}

.artist-honors {
  padding: 0 clamp(18px, 5vw, 64px) 86px;
}

.artist-honors h3 {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 500;
}

.timeline {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.timeline-year {
  color: var(--accent);
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 44px;
}

.contact-section p {
  color: #383430;
  line-height: 1.9;
}

.inquiry-form,
.admin-form {
  display: grid;
  gap: 16px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

label span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 14px;
}

.form-note {
  margin: 0;
  color: var(--olive);
}

.admin-section {
  background: #f0ebe3;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.tab {
  padding: 10px 14px;
}

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

.admin-panel {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(320px, 1.1fr);
  gap: 20px;
}

.admin-panel[hidden],
.detail-section[hidden] {
  display: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-line input {
  width: auto;
}

.checkbox-line span {
  margin: 0;
}

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

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

.admin-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.admin-item img {
  width: 76px;
  height: 62px;
  object-fit: cover;
  background: #e7e0d5;
}

.admin-item h3,
.admin-item p {
  margin: 0;
}

.admin-item p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.item-actions {
  display: flex;
  gap: 8px;
}

.icon-button {
  min-width: 38px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.compact-form {
  grid-template-columns: 1fr 170px auto;
  align-items: end;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(18px, 5vw, 64px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 6px;
}

/* 后台密码弹窗 */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(23, 22, 22, 0.55);
  padding: 20px;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-box {
  width: 100%;
  max-width: 400px;
  padding: 32px 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.modal-box h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 500;
}

.modal-box p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.modal-box input {
  margin-bottom: 8px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

@media (max-width: 920px) {
  .menu-button {
    display: inline-grid;
    place-items: center;
  }

  .main-nav {
    position: absolute;
    top: 76px;
    right: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    min-width: 190px;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .toolbar,
  .detail-layout,
  .artist-top,
  .contact-section,
  .admin-panel {
    grid-template-columns: 1fr;
  }

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

  .detail-copy {
    position: static;
  }
}

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

  .brand {
    min-width: 0;
  }

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

  .brand small {
    display: none;
  }

  .hero {
    min-height: 72vh;
  }

  .hero-copy {
    padding-bottom: 52px;
  }

  .section {
    padding-block: 58px;
  }

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

  .admin-item {
    grid-template-columns: 64px 1fr;
  }

  .admin-item img {
    width: 64px;
    height: 56px;
  }

  .item-actions {
    grid-column: 1 / -1;
  }
}
