/* =========================================================================
 * 维修名片 · 样式（手机优先）
 * 配色 / 圆角 / 间距都在 :root 变量里，改这里就能整体换风格。
 * ========================================================================= */

:root {
  --ink: #0e1424;
  --ink-soft: #2b3348;
  --paper: #f3f4f6;
  --line-soft: rgba(14, 20, 36, 0.07);
  --line: rgba(14, 20, 36, 0.14);
  --muted: #646b7d;
  --accent: #1f6bff;
  --good: #0f9f6e;
  --radius-sm: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  /* 系统字体：不请求外部字体，弱网 / 国内网络都不会卡首屏 */
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans",
    "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: manipulation;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body {
  padding: max(16px, var(--safe-t)) 16px calc(30px + var(--safe-b));
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* 有底部复制条时给内容留出空间 */
body.has-dock {
  padding-bottom: calc(88px + var(--safe-b));
}

body.is-locked {
  position: fixed;
  left: 0;
  right: 0;
  overflow: hidden;
}

/* ------------------------------ 布局骨架 -------------------------------- */

.shell {
  position: relative;
  width: min(100%, 420px);
  margin: 0 auto;
  display: grid;
  gap: 14px;
  opacity: 0;
  transform: translateY(6px);
}

body.is-ready .shell {
  opacity: 1;
  transform: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

/* ------------------------------ 1. 身份区 ------------------------------- */

.identity {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 188px;
  padding: 22px 24px 26px;
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(120% 130% at 92% 4%, rgba(86, 132, 255, 0.42), rgba(86, 132, 255, 0) 62%),
    radial-gradient(90% 120% at 4% 100%, rgba(255, 108, 166, 0.18), rgba(255, 108, 166, 0) 58%),
    linear-gradient(135deg, #0b0f18 0%, #151b28 56%, #090c13 100%);
  box-shadow: 0 16px 40px -24px rgba(8, 12, 24, 0.55);
}

/* 封面图：图片上再压一层深色渐变，保证白色文字可读 */
.identity-cover {
  position: absolute;
  inset: 0;
  background-color: #0b0f18;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.identity-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(6, 9, 16, 0.9) 0%, rgba(6, 9, 16, 0.68) 46%, rgba(6, 9, 16, 0.4) 100%),
    linear-gradient(0deg, rgba(6, 9, 16, 0.4), rgba(6, 9, 16, 0.06) 62%);
}

.identity-glow {
  position: absolute;
  top: -96px;
  right: -76px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 158, 255, 0.34), rgba(120, 158, 255, 0) 68%);
  pointer-events: none;
}

.identity-copy {
  position: relative;
  z-index: 1;
}

/* 在线状态小胶囊 */
.status {
  position: absolute;
  z-index: 1;
  top: 18px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 11.5px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.86);
  white-space: nowrap;
}

.status[hidden] {
  display: none;
}

.status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3ddc84;
  box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.18);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

/* 头像：等比圆形缩小，白描边 + 投影，避免和背景图糊在一起 */
.avatar {
  display: block;
  width: 68px;
  height: 68px;
  margin: 0 0 14px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.92);
  background: #1a2030;
  box-shadow: 0 0 0 1px rgba(6, 9, 16, 0.3), 0 10px 22px -10px rgba(6, 9, 16, 0.85);
}

.identity-copy h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.15;
  color: #fff;
}

.lede {
  margin: 10px 0 0;
}

.lede p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
}

.lede p + p {
  margin-top: 2px;
}

/* 平台同名 + 下拉提示：身份卡下方两行 */
.social {
  display: grid;
  gap: 3px;
  margin-top: -2px;
}

.accounts {
  margin: 0;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.accounts[hidden] {
  display: none;
}

.accounts-hint {
  margin: 0;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
  opacity: 0.85;
}

.accounts-hint .arrow {
  display: inline-block;
  margin-left: 3px;
  font-size: 11px;
  animation: nudge 1.6s ease-in-out infinite;
}

@keyframes nudge {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(3px);
  }
}

.accounts b {
  font-weight: 600;
  color: var(--ink-soft);
}

/* ------------------------------ 2. 通用区块 ----------------------------- */

.block {
  padding: 18px 18px 20px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 28px -20px rgba(15, 23, 42, 0.28);
}

.block h2 {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--muted);
}

.block-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 13px;
}

.hint {
  font-size: 11.5px;
  color: var(--muted);
  text-align: right;
}

.plain {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink-soft);
}

/* ------------------------------ 3. 工位实拍 ----------------------------- */

/* 缩略图墙：一行三张，点开看大图 */
.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.shot {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
  cursor: pointer;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

.shot:active {
  transform: scale(0.97);
}

.shot img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  background: #111;
}

.shot:focus-visible {
  outline: 2px solid rgba(14, 20, 36, 0.45);
  outline-offset: 2px;
}

/* 大图预览 */
.shot-view {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: calc(28px + var(--safe-t)) 18px calc(48px + var(--safe-b));
  background: rgba(14, 20, 36, 0.9);
  cursor: zoom-out;
  overscroll-behavior: none;
  touch-action: pan-y;
}

.shot-view[hidden] {
  display: none;
}

.shot-view img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  pointer-events: none;
}

.shot-count {
  position: absolute;
  top: calc(14px + var(--safe-t));
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.82);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.shot-view-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(16px + var(--safe-b));
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
  pointer-events: none;
}

/* ------------------------------ 4. 二维码 ------------------------------- */

/* 二维码并排：两列，最后一个（奇数个时）占满整行 */
.qr-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: start;
  min-width: 0;
}


.qr-list[hidden] {
  display: none;
}

.qr-item {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 8px;
  padding: 8px;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px dashed rgba(14, 20, 36, 0.16);
}

.qr-item figcaption {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(92, 107, 138, 0.1);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.35;
  text-align: center;
}

.qr-item.is-placeholder img {
  filter: saturate(0.85);
  opacity: 0.92;
}

.qr-item .qr-ico {
  width: 13px;
  height: 13px;
  flex: none;
  color: #5c6b8a;
}

/* 二维码区引导语 */
.qr-lead {
  margin: -3px 0 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--ink-soft);
}

.qr-lead[hidden] {
  display: none;
}

/* 每个二维码下方的小字说明 */
.qr-tip {
  margin: 0;
  text-align: center;
  font-size: 10px;
  line-height: 1.5;
  color: var(--muted);
  opacity: 0.92;
}

.qr-tip span {
  display: block;
}

.copy-head {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--line-soft);
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.copy-head[hidden] {
  display: none;
}

.qr-item img {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  display: block;
  -webkit-touch-callout: default;
  -webkit-user-select: auto;
  user-select: auto;
  pointer-events: auto;
}

/* --------------------- 5. 联系方式（二维码下方，点击复制） --------------- */

.copy-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.copy-list[hidden] {
  display: none;
}

.copy-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.62);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  animation: copy-in 0.34s ease both;
  animation-delay: calc(var(--i, 0) * 60ms);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.14s ease;
}

@keyframes copy-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.copy-item:active {
  transform: scale(0.99);
  background: rgba(14, 20, 36, 0.05);
}

.copy-item:focus-visible {
  outline: 2px solid rgba(14, 20, 36, 0.45);
  outline-offset: 2px;
}

.copy-text {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.copy-ico {
  width: 22px;
  height: 22px;
  flex: none;
  color: #5c6b8a;
}

.copy-tag {
  flex: none;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(92, 107, 138, 0.12);
  color: #5c6b8a;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.copy-value {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.copy-action {
  flex: none;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
}

.copy-item.is-copied {
  animation: copied 0.5s ease;
}

.copy-item.is-copied .copy-action {
  color: var(--good);
}

@keyframes copied {
  0% {
    background: rgba(14, 20, 36, 0.06);
  }
  100% {
    background: rgba(255, 255, 255, 0.62);
  }
}

/* 桌面端才生效的悬停态，避免手机点完还留着 hover */
@media (hover: hover) and (pointer: fine) {
  .copy-item:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--line);
  }

  .copy-item:hover .copy-value {
    color: var(--ink);
  }
}

/* ------------------------------ 6. 服务信息 ----------------------------- */

.info {
  margin: 0;
  display: grid;
  gap: 2px;
}

.info[hidden] {
  display: none;
}

.info-row {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line-soft);
}

.info-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.info-row:first-child {
  padding-top: 0;
}

.info-row dt {
  font-size: 12.5px;
  color: var(--muted);
}

.info-row dd {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ------------------------------ 7. 常见问题 ----------------------------- */

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

.faq-item {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.6);
  overflow: hidden;
}

.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 13px 14px;
  font-size: 13.8px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary .icon {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.faq-item[open] summary .icon {
  transform: rotate(180deg);
}

.faq-item p {
  margin: 0;
  padding: 0 13px 13px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

/* ------------------------------ 页脚 / 提示 ----------------------------- */

.foot {
  text-align: center;
  padding: 6px 4px 2px;
}

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

.foot-meta {
  margin-top: 5px !important;
  opacity: 0.7;
}

.foot .dot {
  margin: 0 4px;
}

/* ------------------------------ 8. 底部复制条 --------------------------- */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 8px;
  padding: 10px 14px calc(10px + var(--safe-b));
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid var(--line-soft);
  box-shadow: 0 -8px 24px -18px rgba(14, 20, 36, 0.5);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  animation: dock-in 0.26s ease both;
}

.dock[hidden] {
  display: none;
}

@keyframes dock-in {
  from {
    transform: translateY(100%);
  }
  to {
    transform: none;
  }
}

.dock-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 48px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: #eef1f7;
  color: var(--ink);
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  transition: background 0.18s ease, transform 0.14s ease, color 0.18s ease;
}

.dock-btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.dock-btn--main {
  background: var(--good);
  color: #fff;
}

.dock-btn:active {
  transform: scale(0.98);
}

.dock-btn.is-copied {
  background: var(--ink);
  color: #fff;
}

.dock-btn--main.is-copied {
  background: var(--ink);
}

/* ------------------------------ 9. 轻提示 ------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + var(--safe-b));
  transform: translateX(-50%) translateY(10px);
  z-index: 40;
  max-width: 84vw;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(14, 20, 36, 0.92);
  color: #fff;
  font-size: 13px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ------------------------------ 10. 降级 / 无障碍 ----------------------- */

@media (prefers-reduced-motion: reduce) {
  .shell,
  body.is-ready .shell {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .copy-item,
  .copy-item.is-copied,
  .dock,
  .status i,
  .accounts-hint .arrow {
    animation: none;
    transition: none;
  }
}

@media (max-width: 360px) {
  body {
    padding: max(12px, var(--safe-t)) 12px calc(26px + var(--safe-b));
  }

  body.has-dock {
    padding-bottom: calc(84px + var(--safe-b));
  }

  .identity {
    min-height: 168px;
    padding: 18px 18px 22px;
    border-radius: 24px;
  }

  .identity-copy h1 {
    font-size: 28px;
  }

  .avatar {
    width: 58px;
    height: 58px;
    margin-bottom: 12px;
  }

  .status {
    top: 14px;
    right: 14px;
    padding: 4px 8px 4px 7px;
    font-size: 11px;
  }

  .copy-list {
    margin-top: 12px;
    padding-top: 12px;
  }

  .copy-item {
    gap: 8px;
    padding: 10px;
  }

  .info-row {
    grid-template-columns: 68px 1fr;
  }

  .dock-btn {
    font-size: 13.5px;
  }
}
