:root {
  color-scheme: dark;
  --bg: #080b10;
  --panel: #0d121d;
  --panel-2: #141b28;
  --line: rgba(207, 222, 255, 0.14);
  --text: #edf4ff;
  --muted: #a8b4c7;
  --soft: #748299;
  --accent: #63f0cf;
  --accent-2: #e8ff7b;
  --danger: #ff8a8a;
  --radius: 8px;
  --shadow: 0 18px 70px rgba(0, 0, 0, 0.38);
  font-family: "Aptos", "Microsoft YaHei", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(105, 56, 96, 0.38), transparent 34rem),
    linear-gradient(180deg, #080b10 0%, #090d16 52%, #070a0f 100%);
}

button,
input,
textarea {
  font: inherit;
}

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

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 11, 16, 0.82);
  backdrop-filter: blur(18px);
}

.brand,
.admin-link,
.ghost-button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 22, 34, 0.86);
}

.brand {
  gap: 9px;
  padding: 0 12px;
  font-size: 17px;
  font-weight: 800;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background:
    linear-gradient(90deg, var(--accent) 0 48%, transparent 48% 52%, var(--accent-2) 52%),
    linear-gradient(180deg, transparent 0 38%, rgba(255, 255, 255, 0.55) 38% 62%, transparent 62%);
  transform: rotate(-18deg);
}

.admin-link,
.ghost-button {
  justify-content: center;
  padding: 0 12px;
  color: #dce8fb;
  font-size: 14px;
  font-weight: 750;
}

main {
  width: min(100%, 1060px);
  margin: 0 auto;
  padding: 20px 14px 90px;
}

.hero {
  padding: 12px 0 18px;
}

.eyebrow {
  width: fit-content;
  margin: 0 0 14px;
  padding: 7px 10px;
  border: 1px solid rgba(99, 240, 207, 0.35);
  border-radius: 999px;
  color: #a8fff0;
  background: rgba(99, 240, 207, 0.08);
  font-size: 13px;
  font-weight: 800;
}

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

h1 {
  max-width: 100%;
  margin-bottom: 12px;
  font-size: clamp(34px, 8vw, 42px);
  line-height: 1.08;
  letter-spacing: 0;
  word-break: normal;
}

.hero-copy {
  max-width: 29rem;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.trust-strip span {
  border: 1px solid rgba(207, 222, 255, 0.12);
  border-radius: 999px;
  padding: 6px 9px;
  color: #cbd8ea;
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
  font-weight: 750;
}

.service-cards {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  margin-inline: -14px;
  padding: 0 14px 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.service-cards::-webkit-scrollbar {
  display: none;
}

.service-card {
  flex: 0 0 140px;
  display: grid;
  gap: 6px;
  min-height: 100px;
  border: 1px solid rgba(99, 240, 207, 0.22);
  border-radius: var(--radius);
  padding: 14px 12px;
  color: #d8e6f5;
  background:
    linear-gradient(160deg, rgba(99, 240, 207, 0.12), rgba(255, 255, 255, 0.035) 54%),
    rgba(13, 18, 29, 0.82);
  font-weight: 750;
  text-align: left;
  transition: border-color 120ms, box-shadow 120ms;
}

.service-card:active {
  transform: scale(0.97);
}

.service-card.active {
  border-color: rgba(99, 240, 207, 0.76);
  background:
    linear-gradient(135deg, rgba(99, 240, 207, 0.26), rgba(232, 255, 123, 0.2)),
    rgba(13, 18, 29, 0.92);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22), 0 0 12px rgba(99, 240, 207, 0.12);
}

.service-card-kicker {
  width: fit-content;
  border-radius: 999px;
  padding: 3px 7px;
  color: #a8fff0;
  background: rgba(99, 240, 207, 0.1);
  font-size: 12px;
  font-weight: 850;
}

.service-card strong {
  font-size: 16px;
  line-height: 1.15;
}

.service-card small {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.35;
}

.tools {
  display: grid;
  gap: 10px;
  margin: 14px 0 18px;
}

.tools-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.tools-head h2 {
  margin: 0;
  font-size: 19px;
}

.tools-head span {
  color: var(--soft);
  font-size: 14px;
  font-weight: 750;
}

.search {
  display: grid;
  gap: 8px;
}

.search span,
.order-form span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.search input,
.order-form input,
.order-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  background: rgba(13, 18, 29, 0.86);
  color: var(--text);
}

.search input {
  min-height: 48px;
  padding: 0 14px;
  font-size: 16px;
}

.search input:focus,
.order-form input:focus,
.order-form textarea:focus {
  border-color: rgba(99, 240, 207, 0.66);
  box-shadow: 0 0 0 3px rgba(99, 240, 207, 0.13);
}

.filters {
  display: flex;
  gap: 7px;
  margin-inline: -14px;
  padding: 0 14px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.06);
  color: #c9d8ee;
  font-size: 14px;
  font-weight: 750;
}

.filter-chip span {
  color: var(--soft);
  font-size: 11px;
  font-weight: 850;
}

.filter-chip.active {
  border-color: rgba(99, 240, 207, 0.72);
  color: #07100e;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.filter-chip.active span {
  color: rgba(7, 16, 14, 0.66);
}

.gallery-shell {
  padding-top: 4px;
}

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

.section-head h2 {
  margin: 0;
  font-size: 19px;
}

.section-head span {
  color: var(--soft);
  font-size: 14px;
  font-weight: 750;
}

.gallery {
  display: grid;
  gap: 18px;
}

.gallery-grid {
  columns: 2 142px;
  column-gap: 10px;
}

.gallery-card {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 10px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: inherit;
  cursor: pointer;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.24);
  break-inside: avoid;
  text-align: left;
}

.gallery-card img {
  width: 100%;
  min-height: 130px;
  object-fit: cover;
  background: #111722;
}

.card-meta {
  position: absolute;
  inset: auto 8px 8px 8px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 34px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
  pointer-events: none;
}

.card-meta strong,
.card-meta span {
  border-radius: 6px;
  background: rgba(8, 11, 16, 0.74);
  backdrop-filter: blur(12px);
}

.card-meta strong {
  flex: 1 1 100%;
  max-width: 100%;
  padding: 6px 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #f4f8ff;
  font-size: 13px;
  line-height: 1.15;
  white-space: nowrap;
}

.card-meta span {
  flex: 0 0 auto;
  padding: 5px 6px;
  color: #a9fff0;
  font-size: 12px;
  font-weight: 800;
}

.card-meta .card-action {
  margin-left: auto;
  color: #07100e;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.empty-state {
  padding: 32px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(13, 18, 29, 0.7);
  text-align: center;
}

.load-more-button {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(99, 240, 207, 0.34);
  border-radius: var(--radius);
  color: #d7fff7;
  background: rgba(99, 240, 207, 0.08);
  font-weight: 850;
  font-size: 15px;
  cursor: pointer;
  transition: background 120ms, border-color 120ms;
}

.load-more-button:active {
  background: rgba(99, 240, 207, 0.16);
  border-color: rgba(99, 240, 207, 0.5);
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.58);
}

.order-sheet {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  max-height: min(92vh, 760px);
  padding: 10px 14px calc(18px + env(safe-area-inset-bottom));
  overflow-y: auto;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background: #101621;
  box-shadow: var(--shadow);
  transform: translateY(105%);
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.order-sheet.open {
  transform: translateY(0);
}

.sheet-handle {
  width: 44px;
  height: 4px;
  margin: 2px auto 12px;
  border-radius: 999px;
  background: rgba(220, 232, 251, 0.35);
}

.close-button {
  position: absolute;
  top: 8px;
  right: 10px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-size: 27px;
  line-height: 1;
}

.selected-preview {
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.selected-preview img {
  width: 94px;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  object-fit: cover;
}

.selected-kicker,
#selectedCategory {
  margin: 0;
  color: var(--soft);
  font-size: 13px;
}

.selected-price {
  width: fit-content;
  margin: 8px 0 0;
  border: 1px solid rgba(99, 240, 207, 0.32);
  border-radius: 999px;
  padding: 6px 9px;
  color: #a8fff0;
  background: rgba(99, 240, 207, 0.08);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.3;
}

.selected-preview h2 {
  margin: 4px 0;
  font-size: 22px;
  line-height: 1.12;
}

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

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

.optional-note {
  display: grid;
  gap: 7px;
}

.optional-note summary {
  width: fit-content;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.optional-note summary::marker {
  color: var(--accent);
}

.material-guide {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(99, 240, 207, 0.22);
  border-radius: var(--radius);
  padding: 11px 12px;
  background: rgba(99, 240, 207, 0.055);
}

.material-guide strong {
  color: #d7fff7;
  font-size: 14px;
}

.material-guide p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.order-form input,
.order-form textarea,
.optional-note textarea {
  min-height: 46px;
  padding: 11px 12px;
}

.order-form textarea,
.optional-note textarea {
  resize: vertical;
}

.file-picker strong {
  display: flex;
  min-height: 46px;
  align-items: center;
  padding: 0 12px;
  border: 1px dashed rgba(99, 240, 207, 0.46);
  border-radius: var(--radius);
  color: #d7fff7;
  background: rgba(99, 240, 207, 0.07);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.file-picker {
  position: relative;
  cursor: pointer;
}

.file-picker small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.payment-panel {
  display: grid;
  grid-template-columns: 1fr 104px;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(99, 240, 207, 0.22);
  border-radius: var(--radius);
  padding: 11px;
  background: rgba(99, 240, 207, 0.055);
}

.payment-copy {
  display: grid;
  gap: 5px;
}

.payment-copy strong {
  color: #f5fff6;
  font-size: 17px;
  line-height: 1.2;
}

.payment-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.payment-panel img {
  width: 104px;
  aspect-ratio: 3 / 4;
  border-radius: 7px;
  object-fit: cover;
  background: #fff;
}

.submit-button {
  min-height: 52px;
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #07100e;
  font-size: 16px;
  font-weight: 900;
}

.submit-button[disabled] {
  cursor: wait;
  opacity: 0.68;
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.form-message.error {
  color: var(--danger);
}

.admin-main {
  width: min(100%, 960px);
}

.admin-hero h1 {
  max-width: 12ch;
}

.admin-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(13, 18, 29, 0.62);
}

.ghost-button {
  color: var(--text);
}

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

.submission-card {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.submission-card img {
  width: 78px;
  aspect-ratio: 4 / 5;
  border-radius: 7px;
  object-fit: cover;
  background: #111722;
}

.submission-photo-fallback {
  display: grid;
  place-items: center;
  width: 78px;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px;
  background: #111722;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
}

.submission-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.submission-card p {
  margin: 3px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.submission-card .submission-price {
  color: #ffffff;
  font-weight: 800;
}

.submission-card a {
  color: #a8fff0;
  font-weight: 800;
}

@media (min-width: 720px) {
  .topbar {
    padding-inline: max(24px, calc((100vw - 1060px) / 2));
  }

  main {
    padding-top: 42px;
  }

  h1 {
    max-width: 10ch;
    font-size: clamp(58px, 7vw, 86px);
  }

  .tools {
    grid-template-columns: minmax(260px, 360px) 1fr;
    align-items: end;
  }

  .tools-head {
    grid-column: 1 / -1;
  }

  .filters {
    grid-column: 1 / 2;
    grid-row: 2;
  }

  .search {
    grid-column: 2 / 3;
    grid-row: 2;
  }

  .service-cards {
    margin-inline: 0;
    padding-inline: 0;
  }

  .service-card {
    flex-basis: 186px;
  }

  .filters {
    margin-inline: 0;
    padding-inline: 0;
  }

  .gallery-grid {
    columns: 4 210px;
    column-gap: 14px;
  }

  .gallery-card {
    margin-bottom: 14px;
  }

  .order-sheet {
    top: 0;
    left: auto;
    width: min(430px, 100vw);
    max-height: 100vh;
    border-top: 0;
    border-right: 0;
    border-radius: 18px 0 0 18px;
    transform: translateX(105%);
  }

  .order-sheet.open {
    transform: translateX(0);
  }

  .sheet-handle {
    display: none;
  }
}
