:root {
  --text: #161616;
  --muted: #747474;
  --line: #d9d9d9;
  --accent: #efaa4d;
  --accent-pressed: #dc963b;
  --cyan: #22aed1;
  --page-width: 760px;
}

* { box-sizing: border-box; }

html { background: #f2f3f4; }

body {
  margin: 0;
  color: var(--text);
  background: #f2f3f4;
  font-family: "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

button { font: inherit; }

.page-shell {
  width: min(100%, var(--page-width));
  min-height: 100svh;
  margin: 0 auto;
  padding-bottom: 106px;
  background: #fff;
  box-shadow: 0 0 28px rgba(0, 0, 0, .05);
}

main { padding: 30px 20px 38px; }

.verification {
  border: 2px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.certificate-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1024 / 713;
  background: #fff;
}

.certificate-image img {
  display: block;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  margin: -2px;
  object-fit: cover;
}

.verification-image {
  position: relative;
  width: 98%;
  margin: 8px auto 0;
  overflow: hidden;
  aspect-ratio: 1285 / 812;
  background: #fff;
}

.verification-image > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.verification-image .page-qr {
  position: absolute;
  top: 20.8%;
  left: 6.9%;
  width: 23.3%;
  height: auto;
  padding: 4px;
  border: 0;
  background: #fff;
}

.demo-watermark {
  position: absolute;
  right: 16px;
  bottom: 14px;
  padding: 7px 11px;
  border: 1px solid rgba(160, 24, 24, .58);
  color: #a01818;
  background: rgba(255, 255, 255, .9);
  font-size: clamp(12px, 2.6vw, 16px);
  font-weight: 700;
}

.verification {
  display: grid;
  grid-template-columns: 180px 1fr;
  width: 92.2%;
  min-height: 390px;
  margin: 14px auto 0;
  padding: 56px 36px;
  align-items: center;
  gap: clamp(28px, 6vw, 70px);
}

.qr-wrap {
  width: 180px;
  text-align: center;
}

.page-qr {
  display: grid;
  width: 180px;
  aspect-ratio: 1;
  padding: 7px;
  background: #fff;
  border: 1px solid #efefef;
  place-items: center;
}

.page-qr img,
.page-qr canvas { display: block; width: 100% !important; height: 100% !important; image-rendering: pixelated; }

.qr-wrap > p {
  margin: 9px 0 0;
  color: #666;
  font-size: 13px;
}

.verification-copy {
  text-align: center;
  font-family: SimSun, "Songti SC", serif;
  font-size: clamp(20px, 3.8vw, 29px);
  font-weight: 700;
  line-height: 1.55;
}

.verification-copy p { margin: 0; }

.actions {
  display: grid;
  gap: 28px;
  padding: 92px 38px 40px;
}

.actions button {
  width: 100%;
  min-height: 76px;
  border: 0;
  border-radius: 18px;
  color: white;
  background: var(--accent);
  font-size: 21px;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease;
}

.actions button:hover { background: #e7a143; }
.actions button:active { background: var(--accent-pressed); transform: scale(.992); }
.actions button:focus-visible, .nav-item:focus-visible { outline: 3px solid #168aac; outline-offset: 3px; }

.bottom-nav {
  position: fixed;
  z-index: 5;
  bottom: 0;
  left: 50%;
  display: grid;
  width: min(100%, var(--page-width));
  height: 94px;
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateX(-50%);
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid #ececec;
  background: rgba(255, 255, 255, .98);
}

.nav-item {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  border: 0;
  color: #2b2b2b;
  background: transparent;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
}

.nav-item + .nav-item { border-left: 1px solid #f0f0f0; }
.nav-item.is-active { color: #d88d2c; }

.nav-icon { position: relative; display: block; width: 24px; height: 24px; color: currentColor; }

.calendar-icon { border: 2px solid currentColor; border-radius: 4px; }
.calendar-icon::before { content: ""; position: absolute; inset: 5px 0 auto; border-top: 2px solid currentColor; }
.calendar-icon::after { content: ""; position: absolute; top: -4px; left: 5px; width: 10px; height: 6px; border-right: 2px solid currentColor; border-left: 2px solid currentColor; }

.hospital-icon::before {
  content: "+";
  position: absolute;
  inset: 1px 2px;
  border: 2px solid currentColor;
  border-radius: 4px 4px 2px 2px;
  font-size: 20px;
  font-weight: 400;
  line-height: 18px;
}

.toast {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: 118px;
  max-width: calc(100vw - 48px);
  padding: 12px 20px;
  opacity: 0;
  transform: translate(-50%, 10px);
  border-radius: 6px;
  color: white;
  background: rgba(24, 24, 24, .9);
  font-size: 15px;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

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

@media (max-width: 580px) {
  .page-shell { padding-bottom: 76px; box-shadow: none; }
  main { padding: 14px 12px 10px; }
  .actions { padding: 34px 22px 14px; gap: 16px; }
  .actions button { min-height: 54px; border-radius: 14px; font-size: 17px; }
  .bottom-nav { height: 72px; }
  .nav-item { gap: 3px; font-size: 14px; }
  .nav-icon { width: 21px; height: 21px; }
}

@media (max-width: 390px) {
  .verification-image .page-qr { padding: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
