:root {
  --accent: #12a8a0;
  --ink: #17201f;
  --muted: #65716f;
  --paper: #f6f4ef;
  --panel: #ffffff;
  --line: rgba(20, 34, 31, 0.12);
  --shadow: 0 16px 44px rgba(12, 24, 22, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 16px;
  background: rgba(246, 244, 239, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  font-weight: 800;
  letter-spacing: 0;
}

.admin-link,
.ghost-btn,
.primary-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.admin-link,
.ghost-btn {
  padding: 0 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
}

.primary-btn {
  padding: 0 18px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--accent), transparent 64%);
}

.hero {
  position: relative;
  min-height: calc(100svh - 56px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #0d1514;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 12, 12, 0.08), rgba(8, 12, 12, 0.1) 36%, rgba(8, 12, 12, 0.82));
}

.hero-image {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 18px 36px;
  color: #fff;
}

.eyebrow,
.section-head span,
.contact span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

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

h1 {
  max-width: 720px;
  margin-top: 10px;
  font-size: clamp(38px, 12vw, 88px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 680px;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 16px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.quick-info {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.quick-info div {
  padding: 16px;
  background: var(--panel);
}

.quick-info span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.quick-info strong {
  font-size: 15px;
}

.section {
  padding: 34px 16px;
}

.section-head {
  margin-bottom: 18px;
}

h2 {
  margin-top: 6px;
  font-size: 25px;
  line-height: 1.18;
  letter-spacing: 0;
}

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

.work-card {
  overflow: hidden;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(19, 29, 27, 0.08);
}

.work-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  background: #d8ddd8;
  cursor: zoom-in;
}

.work-image img {
  height: 100%;
  object-fit: cover;
}

.work-info {
  display: grid;
  gap: 5px;
  align-items: start;
  padding: 9px;
}

.work-info h3 {
  font-size: 14px;
  line-height: 1.25;
}

.work-info strong {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 0 7px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent), transparent 88%);
  color: var(--accent);
  font-size: 13px;
  white-space: nowrap;
}

.work-info p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.38;
}

.services {
  display: grid;
  gap: 10px;
}

.service-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.service-card span {
  color: var(--accent);
  font-weight: 900;
}

.service-card h3 {
  margin-top: 10px;
  font-size: 19px;
}

.service-card p,
.step p,
.contact p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.65;
}

.steps {
  display: grid;
  gap: 12px;
}

.step {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
}

.step strong {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 8px;
  background: var(--accent);
}

.step h3 {
  font-size: 18px;
}

.contact {
  margin: 18px 16px 32px;
  padding: 22px;
  border-radius: 8px;
  background: #17201f;
  color: #fff;
}

.contact p {
  color: rgba(255, 255, 255, 0.72);
}

.contact .primary-btn {
  margin-top: 18px;
}

.site-footer {
  padding: 4px 16px 18px;
  text-align: center;
}

.site-footer a {
  color: rgba(23, 32, 31, 0.42);
  font-size: 12px;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: var(--paper);
}

.login-screen[hidden] {
  display: none;
}

.login-box {
  width: min(360px, 100%);
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-box h1 {
  color: var(--ink);
  font-size: 28px;
  line-height: 1.1;
}

.login-box input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
}

.login-box button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  font: inherit;
  font-weight: 800;
}

.login-box p {
  min-height: 20px;
  color: #b32626;
  font-size: 13px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(6, 10, 9, 0.88);
}

.lightbox[hidden] {
  display: none;
}

.lightbox button {
  position: fixed;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  color: #fff;
  font-size: 28px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.lightbox img {
  max-height: 88svh;
  width: auto;
  max-width: 100%;
  border-radius: 8px;
}

.admin-shell {
  max-width: 920px;
  margin: 0 auto;
  padding: 18px 16px 44px;
}

.admin-title {
  margin: 14px 0 18px;
}

.admin-title p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.field label {
  font-size: 13px;
  font-weight: 800;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.field textarea {
  min-height: 100px;
  resize: vertical;
}

.toggle-row {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.toggle-row label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
}

.product-editor {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.hero-image-editor {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.hero-preview {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  object-fit: cover;
  background: #d8ddd8;
}

.editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.album-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.editor-head h2 {
  font-size: 21px;
}

.editor-head button,
.remove-product {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  font-weight: 800;
}

.editor-head button {
  padding: 0 14px;
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  white-space: nowrap;
}

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

.product-row {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbf8;
}

.product-row > img {
  width: 112px;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  object-fit: cover;
  background: #d8ddd8;
}

.product-fields {
  display: grid;
  gap: 8px;
}

.image-tools {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
}

.image-tools input[readonly] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-tools button,
.upload-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.upload-btn input {
  display: none;
}

.product-fields label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.product-fields input,
.product-fields select,
.product-fields textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.product-fields textarea {
  min-height: 74px;
  resize: vertical;
}

.remove-product {
  grid-column: 1 / -1;
  color: #9f2f2f;
}

.admin-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 10px;
  padding: 14px 0 0;
  background: linear-gradient(180deg, transparent, var(--paper) 30%);
}

.admin-actions button,
.admin-actions a {
  flex: 1;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font: inherit;
  font-weight: 800;
}

.admin-actions button:first-child {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.toast {
  min-height: 24px;
  margin-top: 12px;
  color: var(--accent);
  font-weight: 800;
}

.album-dialog {
  width: min(920px, calc(100vw - 24px));
  max-height: calc(100svh - 36px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.album-dialog::backdrop {
  background: rgba(6, 10, 9, 0.62);
}

.album-panel {
  max-height: calc(100svh - 36px);
  overflow: auto;
  padding: 16px;
  border-radius: 8px;
  background: var(--paper);
}

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

.album-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #d8ddd8;
}

.album-item:focus,
.album-item:hover {
  border-color: var(--accent);
}

.album-item img {
  height: 100%;
  object-fit: cover;
}

.album-item span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  font-size: 12px;
  font-weight: 900;
}

@media (min-width: 720px) {
  .topbar {
    padding: 0 28px;
  }

  .hero-copy {
    padding: 0 42px 58px;
  }

  .quick-info {
    grid-template-columns: repeat(3, 1fr);
  }

  .section {
    padding: 54px 42px;
  }

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

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

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

  .contact {
    margin: 20px 42px 56px;
  }

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

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

  .product-row {
    grid-template-columns: 180px 1fr auto;
    align-items: start;
  }

  .product-row > img {
    width: 180px;
  }

  .remove-product {
    grid-column: auto;
    padding: 0 14px;
  }

  .field-wide,
  .toggle-row {
    grid-column: 1 / -1;
  }
}
