@charset "UTF-8";

:root {
  color-scheme: dark;
  --ink: #19191b;
  --ink-raised: #222326;
  --paper: #f4f2ee;
  --paper-muted: #cbc8c2;
  --line: rgba(255, 255, 255, .12);
  --line-dark: rgba(25, 25, 27, .14);
  --accent: #d94336;
  --accent-hover: #f05a4b;
  --mint: #64d7b4;
  --font: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--ink); }
body { margin: 0; color: var(--paper); font-family: var(--font); font-size: 15px; line-height: 1.55; }
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

.public-page, .admin-page {
  min-height: 100vh;
  background-color: var(--ink);
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 56px 56px;
}
.topbar {
  width: min(1160px, calc(100% - 64px));
  height: 86px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; gap: 11px; align-items: center; text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(100,215,180,.65);
  color: var(--mint);
  font-size: 17px;
  font-weight: 700;
}
.brand-name { display: grid; gap: 1px; font-size: 15px; font-weight: 700; line-height: 1.2; }
.brand-name small { color: #8a8987; font-size: 9px; font-family: Arial, sans-serif; font-weight: 600; letter-spacing: 1.3px; }
.admin-link { display: inline-flex; gap: 9px; align-items: center; color: #bbb9b4; text-decoration: none; font-size: 13px; }
.admin-link:hover { color: #fff; }
.admin-link span { color: var(--mint); font-size: 17px; }

.contact-layout {
  width: min(640px, calc(100% - 64px));
  min-height: calc(100vh - 148px);
  margin: 0 auto;
  padding: 48px 0 56px;
  display: grid;
  grid-template-columns: minmax(0, 480px);
  justify-content: center;
  align-items: center;
}
.preview-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
.contact-copy { width: 100%; max-width: 440px; margin: 0 auto; padding: 8px 0; text-align: center; }
.eyebrow { margin: 0 0 21px; color: #96948f; font-family: Arial, sans-serif; font-size: 10px; font-weight: 700; letter-spacing: 1.7px; }
.eyebrow span { color: var(--mint); }
h1, h2, p { margin-top: 0; }
.contact-copy h1 { margin: 0; color: var(--paper); font-size: 48px; font-weight: 650; line-height: 1.24; }
.intro { margin: 20px 0 26px; color: #aaa8a2; font-size: 14px; }
.qr-row { display: flex; align-items: center; justify-content: center; }
.qr-frame {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
}
.qr-frame img { display: block; width: auto; height: auto; max-width: 100%; margin: 0 auto; object-fit: contain; }
.qr-empty { display: grid; justify-items: center; gap: 8px; color: #797773; font-size: 10px; }
.qr-placeholder-mark { display: grid; width: 70px; height: 70px; place-items: center; border: 1px dashed #b5b2ad; color: #7d7a75; font-family: Arial, sans-serif; font-size: 14px; font-weight: 700; }
.qr-caption { display: grid; gap: 8px; }
.qr-caption strong { color: #e8e5df; font-size: 15px; }
.qr-caption span { color: #999791; font-size: 11px; line-height: 1.9; }
.update-note { min-height: 18px; margin: 14px 0 0; color: #777570; font-size: 10px; }
.page-footer {
  width: min(1160px, calc(100% - 64px));
  min-height: 62px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #777570;
  font-size: 10px;
}

.admin-main { width: min(1000px, calc(100% - 64px)); margin: 0 auto; padding: 64px 0 80px; }
.admin-heading { margin-bottom: 34px; }
.admin-heading .eyebrow { margin-bottom: 10px; }
.admin-heading h1 { margin: 0 0 8px; font-size: 34px; font-weight: 650; }
.admin-heading > p:last-child { margin: 0; color: #a5a29c; font-size: 13px; }
.auth-panel { width: min(100%, 460px); padding: 28px 0; }
.auth-panel .eyebrow { margin-bottom: 12px; }
.auth-panel h2 { margin: 0 0 7px; font-size: 21px; }
.auth-description { margin: 0 0 23px; color: #a5a29c; font-size: 13px; }
.form-stack { display: grid; gap: 17px; }
.settings-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, .7fr); gap: 70px; align-items: start; }
.settings-form { padding-top: 8px; }
.form-section-heading { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.section-index { padding-top: 2px; color: var(--mint); font-family: Arial, sans-serif; font-size: 11px; font-weight: 700; }
.form-section-heading h2 { margin: 0 0 3px; font-size: 17px; }
.form-section-heading p { margin: 0; color: #989690; font-size: 11px; }
.field { display: grid; gap: 8px; color: #cfccc6; font-size: 12px; }
.field input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 2px;
  outline: none;
  background: #202124;
  color: #f4f2ee;
  font-size: 13px;
}
.field input:focus { border-color: var(--mint); box-shadow: 0 0 0 2px rgba(100,215,180,.12); }
.field input::placeholder { color: #777570; }
.qr-section-heading { margin-top: 35px; }
.upload-row { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; }
.upload-control { display: inline-flex; min-height: 40px; align-items: center; gap: 8px; padding: 0 13px; border: 1px solid rgba(255,255,255,.23); color: #eeeae3; cursor: pointer; font-size: 12px; }
.upload-control:hover { border-color: var(--mint); }
.upload-control span { color: var(--mint); font-size: 18px; }
.file-name { max-width: 250px; overflow: hidden; color: #92908a; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.form-actions { display: flex; align-items: center; gap: 20px; margin-top: 30px; }
.primary-button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 12px; padding: 0 18px; border: 0; border-radius: 2px; background: var(--accent); color: #fff; cursor: pointer; font-size: 13px; font-weight: 700; }
.primary-button:hover { background: var(--accent-hover); }
.primary-button:disabled { opacity: .58; cursor: wait; }
.text-button { padding: 8px 0; border: 0; background: none; color: #999791; cursor: pointer; font-size: 12px; }
.text-button:hover { color: #fff; }
.form-message { min-height: 20px; margin: 0; color: var(--mint); font-size: 12px; }
.form-message.is-error { color: #ff8578; }
.preview-panel { padding: 18px; border: 1px solid var(--line); background: rgba(255,255,255,.025); }
.preview-topline { display: flex; justify-content: space-between; align-items: center; color: #d7d4ce; font-size: 11px; }
.preview-status { display: inline-flex; gap: 7px; align-items: center; color: #9b9993; font-family: Arial, sans-serif; font-size: 9px; letter-spacing: 1px; }
.preview-status i { width: 6px; height: 6px; }
.preview-qr-frame { display: grid; width: 100%; aspect-ratio: 1; margin-top: 18px; place-items: center; padding: 12px; background: #fff; }
.preview-qr-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.preview-empty { display: grid; justify-items: center; gap: 10px; color: #797773; font-size: 11px; }
.preview-empty .qr-placeholder-mark { width: 74px; height: 74px; }
.preview-label { margin: 13px 0 21px; color: #e4e0da; text-align: center; font-size: 12px; }
.preview-link-label { margin-bottom: 5px; color: #898781; font-size: 10px; }
.preview-url { margin: 0; overflow-wrap: anywhere; color: #bcb9b3; font-family: Arial, sans-serif; font-size: 11px; }
.admin-page .page-footer { margin-top: 10px; }

@media (max-width: 760px) {
  .topbar, .contact-layout, .page-footer { width: calc(100% - 36px); }
  .topbar { height: 70px; }
  .contact-layout { min-height: 0; padding: 24px 0 44px; grid-template-columns: minmax(0, 480px); }
  .contact-copy { max-width: none; padding: 0 2px; }
  .contact-copy h1 { font-size: 38px; }
  .intro { margin: 14px 0 20px; }
  .qr-row { justify-content: center; }
  .page-footer { min-height: 58px; gap: 14px; font-size: 9px; }
  .admin-main { width: calc(100% - 40px); padding: 40px 0 55px; }
  .admin-heading { margin-bottom: 26px; }
  .admin-heading h1 { font-size: 29px; }
  .settings-layout { grid-template-columns: 1fr; gap: 32px; }
  .preview-panel { width: min(100%, 330px); }
}

@media (max-width: 400px) {
  .topbar, .contact-layout, .page-footer { width: calc(100% - 28px); }
  .contact-copy h1 { font-size: 34px; }
  .page-footer span:last-child { text-align: right; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
