:root {
  --canvas: #f5f6f8;
  --surface: #ffffff;
  --text: #17191c;
  --muted: #777c84;
  --line: #e9ebee;
  --blue: #2563eb;
  --blue-hover: #1d4ed8;
  --success: #16845b;
  color-scheme: light;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--canvas);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--text);
  background: var(--canvas);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.page {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}

.card {
  width: min(100%, 480px);
  padding: 32px;
  border: 1px solid rgba(23, 25, 28, 0.06);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 16px 50px rgba(25, 33, 45, 0.08);
}

.header {
  display: flex;
  align-items: flex-start;
  padding-bottom: 27px;
  border-bottom: 1px solid var(--line);
}

.title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 13px;
}

.pin {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  color: var(--blue);
  background: #eef4ff;
}

.pin svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.title p {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 12px;
}

h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

.address-block {
  padding: 26px 0 24px;
}

.address {
  margin: 0;
  font-size: clamp(21px, 5.6vw, 25px);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.55;
}

.contact {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 16px;
  margin: 24px 0 0;
}

.contact div {
  min-width: 0;
}

.contact dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
}

.contact dd {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

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

.copy-button {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 13px;
  color: white;
  background: var(--blue);
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  transition: background 150ms ease, transform 150ms ease;
}

.copy-button svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.copy-button:hover {
  background: var(--blue-hover);
}

.copy-button:active {
  transform: scale(0.985);
}

.copy-button.is-copied {
  background: var(--success);
}

.copy-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.sf-entry {
  margin-top: 27px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.sf-entry:not([hidden]) {
  display: block;
}

.sf-info {
  display: flex;
  align-items: center;
  gap: 13px;
}

.sf-info img {
  display: block;
  flex: 0 0 auto;
  border: 1px solid #f0f0f0;
  border-radius: 13px;
  background: white;
}

.sf-info h2 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 650;
}

.sf-info p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.mini-code {
  display: grid;
  margin-top: 20px;
  place-items: center;
}

.mini-code img {
  display: block;
  width: min(54vw, 206px);
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  -webkit-touch-callout: default;
}

.scan-hint {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.toast {
  position: fixed;
  z-index: 10;
  right: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px 10px 10px;
  border-radius: 999px;
  color: white;
  background: rgba(23, 25, 28, 0.94);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, 12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(50%, 0);
}

.toast-icon {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--success);
  font-size: 11px;
}

noscript {
  position: fixed;
  inset: auto 16px 16px;
  padding: 12px;
  border-radius: 10px;
  color: white;
  background: #a01f1f;
  text-align: center;
}

:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 3px;
}

@media (max-width: 520px) {
  .page {
    place-items: start center;
    padding: max(12px, env(safe-area-inset-top)) 10px max(12px, env(safe-area-inset-bottom));
  }

  .card {
    padding: 24px 20px;
    border-radius: 20px;
  }

  .header {
    padding-bottom: 22px;
  }

  .address-block {
    padding: 22px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
