:root {
  color-scheme: light;
  --ink: #1f2629;
  --muted: #626e72;
  --line: #d9dfdc;
  --paper: #f8f7f2;
  --panel: #ffffff;
  --sage: #496a5c;
  --jade: #0f8c72;
  --red: #c52828;
  --gold: #bd8b35;
  --blue: #2c6fa3;
  --shadow: 0 20px 50px rgba(28, 39, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Noto Sans SC",
    Arial,
    sans-serif;
  background: var(--paper);
  color: var(--ink);
  letter-spacing: 0;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(31, 38, 41, 0.08);
  background: rgba(248, 247, 242, 0.9);
  backdrop-filter: blur(14px);
}

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

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

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

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

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

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
}

.site-nav a {
  white-space: nowrap;
}

.nav-action {
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(330px, 1.08fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  min-height: calc(100vh - 74px);
  padding: clamp(36px, 6vw, 78px) clamp(18px, 4vw, 56px) 38px;
}

.hero-copy {
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--jade);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(44px, 7vw, 86px);
  line-height: 1.03;
  font-weight: 900;
}

.hero-text {
  max-width: 590px;
  color: var(--muted);
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.8;
}

.hero-actions,
.summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

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

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

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

.hero-board {
  display: grid;
  grid-template-columns: 1.1fr 0.88fr;
  grid-template-rows: repeat(2, minmax(170px, 1fr));
  gap: 14px;
  align-self: stretch;
  min-height: 500px;
}

.hero-board article {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  border-radius: 8px;
  background: #111;
  box-shadow: var(--shadow);
}

.hero-board article:first-child {
  grid-row: span 2;
}

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

.hero-board span {
  position: absolute;
  left: 14px;
  bottom: 14px;
  max-width: calc(100% - 28px);
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 800;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  margin: 0 clamp(18px, 4vw, 56px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.trust-strip span {
  display: grid;
  min-height: 58px;
  place-items: center;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}

.section,
.builder-section {
  padding: clamp(54px, 8vw, 96px) clamp(18px, 4vw, 56px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading.compact {
  margin-bottom: 20px;
}

.section-heading h2 {
  margin-bottom: 12px;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.12;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.8;
}

.catalog-grid,
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.craft-card {
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 12px 36px rgba(31, 38, 41, 0.06);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.craft-card:hover,
.craft-card.is-active {
  transform: translateY(-3px);
  border-color: var(--jade);
  box-shadow: var(--shadow);
}

.craft-card img {
  width: 100%;
  aspect-ratio: 1 / 0.82;
  object-fit: cover;
}

.craft-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.craft-card h3 {
  margin-bottom: 0;
  font-size: 18px;
}

.craft-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.gallery-section {
  background: #fff;
}

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

.gallery-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 36px rgba(31, 38, 41, 0.06);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 0.78;
  object-fit: cover;
}

.gallery-item-body {
  display: grid;
  gap: 7px;
  padding: 15px;
}

.gallery-item small {
  color: var(--jade);
  font-size: 12px;
  font-weight: 900;
}

.gallery-item strong {
  font-size: 17px;
}

.gallery-item p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.tag-row,
.summary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.tag-row span,
.summary-tags span {
  padding: 6px 8px;
  border-radius: 6px;
  background: #eef4f1;
  color: var(--sage);
  font-size: 12px;
  font-weight: 800;
}

.builder-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 22px;
  align-items: start;
  background: #eef1ed;
}

.builder-panel,
.summary-panel,
.process-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(31, 38, 41, 0.06);
}

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

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

label {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

label.full {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
}

input,
select {
  height: 46px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  padding: 12px;
  line-height: 1.65;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--jade);
  outline: 3px solid rgba(15, 140, 114, 0.14);
}

.summary-panel {
  position: sticky;
  top: 92px;
  overflow: hidden;
}

.summary-media {
  background: #151819;
}

.summary-media img {
  width: 100%;
  aspect-ratio: 1 / 0.7;
  object-fit: cover;
}

.summary-content {
  padding: 20px;
}

.summary-content h3 {
  margin-bottom: 8px;
  font-size: 24px;
}

#summaryDesc {
  color: var(--muted);
  line-height: 1.7;
}

.summary-content label {
  margin-top: 18px;
}

#summaryText {
  background: #f7f8f6;
}

.helper-text {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

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

.process-grid article {
  padding: 22px;
}

.process-grid span {
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.process-grid h3 {
  margin: 10px 0 8px;
  font-size: 19px;
}

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

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 4vw, 56px);
  background: var(--ink);
  color: #fff;
}

.admin-login {
  display: grid;
  gap: 8px;
  min-width: min(100%, 390px);
}

.admin-login label {
  color: #fff;
}

.admin-login span {
  display: flex;
  gap: 8px;
}

.admin-login input {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.admin-login input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.admin-login p {
  min-height: 20px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.site-footer p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.72);
}

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

.compact-button {
  min-height: 38px;
  padding: 0 13px;
}

.button.danger {
  border-color: #cfd6d2;
  background: #fff;
  color: var(--red);
}

.admin-page {
  background: #eef1ed;
}

.admin-shell {
  padding: clamp(24px, 4vw, 56px);
}

.admin-hero,
.admin-section {
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(31, 38, 41, 0.06);
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(22px, 4vw, 36px);
}

.admin-hero h1 {
  margin-bottom: 10px;
  font-size: clamp(34px, 5vw, 58px);
}

.admin-hero p:not(.eyebrow) {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.7;
}

.admin-status {
  margin: 0 0 20px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--sage);
  font-weight: 800;
}

.admin-section {
  padding: clamp(18px, 3vw, 28px);
}

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

.admin-section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(26px, 3vw, 38px);
}

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

.upload-button {
  display: inline-flex;
  width: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

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

.admin-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.admin-card-media {
  display: grid;
  gap: 10px;
  align-content: start;
}

.admin-card-media img {
  width: 100%;
  aspect-ratio: 1 / 0.82;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  object-fit: cover;
}

.admin-card-media input {
  height: auto;
  padding: 9px;
  background: #fff;
}

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

.admin-card-fields label:nth-child(3),
.admin-card-fields label:nth-child(6),
.admin-card-fields .danger,
.admin-form-grid .full {
  grid-column: 1 / -1;
}

@media (max-width: 1180px) {
  .catalog-grid,
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-board {
    min-height: 430px;
  }
}

@media (max-width: 860px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .site-nav a {
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
  }

  .nav-action {
    border-color: var(--ink) !important;
    background: var(--ink) !important;
  }

  .trust-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .catalog-grid,
  .gallery-grid,
  .process-grid,
  .builder-section,
  .order-form,
  .admin-hero,
  .admin-card,
  .admin-card-fields,
  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-hero {
    align-items: stretch;
  }

  .admin-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-actions {
    justify-content: flex-start;
  }

  .summary-panel {
    position: static;
  }

  .hero-board {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .hero-board article:first-child {
    grid-row: auto;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 40px;
  }

  .hero {
    padding-top: 28px;
  }

  .hero-board {
    min-height: auto;
  }

  .hero-board article {
    min-height: 230px;
  }

  .trust-strip span {
    min-height: 50px;
    font-size: 13px;
  }

  .catalog-grid {
    gap: 12px;
  }

  .site-footer,
  .hero-actions,
  .summary-actions,
  .admin-login span {
    align-items: stretch;
    flex-direction: column;
  }
}
