:root {
  --green: #20a668;
  --pale-green: #e1f9e4;
  --grid: #aaa;
  --muted: #a3a7a5;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: #ddd;
  color: #191919;
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; }

.page {
  position: relative;
  width: 100%;
  max-width: 600px;
  min-width: 320px;
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: #fff;
}

.hero { height: 406px; padding-top: 30px; color: #fff; background: var(--green); }
.hero-row { position: relative; }
.product-shot { width: 216px; height: 312px; padding: 5px 0; overflow: hidden; background: #fff; }
.product-shot { margin: 0 auto; }
.product-shot img { width: 100%; height: 100%; object-fit: contain; display: block; }
.scan-count { width: 146px; height: 146px; position: absolute; top: 10px; left: calc(50% + 110px); display: flex; flex-direction: column; justify-content: center; align-items: center; }
.scan-count strong { font-size: 58px; line-height: 64px; font-weight: 300; }
.scan-count span { font-size: 16px; line-height: 25px; }
.corner { position: absolute; width: 30px; height: 30px; border-color: rgba(255,255,255,.95); border-style: solid; }
.top-left { top: 0; left: 0; border-width: 2px 0 0 2px; }
.top-right { top: 0; right: 0; border-width: 2px 2px 0 0; }
.bottom-left { bottom: 0; left: 0; border-width: 0 0 2px 2px; }
.bottom-right { bottom: 0; right: 0; border-width: 0 2px 2px 0; }
.hero h2 { margin: 7px 0 0; text-align: center; font-size: 29px; line-height: 44px; font-weight: 400; }

.details { padding: 17px 36px 17px; background: rgba(222, 250, 226, .92); }
.info-block + .info-block { margin-top: 9px; }
.info-block h3 { height: 44px; margin: 0 0 3px 18px; display: flex; align-items: center; color: var(--green); font-size: 23px; line-height: 1; font-weight: 600; }
.info-block h3 img { display: block; width: 20px; height: 20px; margin-right: 6px; object-fit: contain; mix-blend-mode: multiply; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; background: rgba(255,255,255,.92); border: 3px solid #d6d8d6; color: var(--muted); font-size: 22px; }
th, td { height: 50px; padding: 6px 16px; border: 1px solid var(--grid); text-align: left; vertical-align: middle; font-weight: 400; line-height: 1.35; }
th { width: 38%; white-space: nowrap; }
td { overflow-wrap: anywhere; }
.info-block:first-child tr:first-child td { font-size: 21px; white-space: nowrap; overflow-wrap: normal; }
.product-info th, .product-info td { height: 50px; }
.product-info tr:nth-child(4) th, .product-info tr:nth-child(4) td { height: 60px; }

.introduction { padding: 0 0 6px; background: #fff; }
.introduction h2 { margin: 0 0 2px; padding: 10px 0 7px; text-align: center; font-size: 20px; line-height: 28px; font-weight: 500; }
.introduction img { display: block; width: 100%; height: auto; }

.floating-button {
  position: fixed;
  display: block;
  right: max(22px, calc((100vw - 600px) / 2 + 36px));
  bottom: max(80px, env(safe-area-inset-bottom));
  width: 43px;
  height: 43px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: url("../images/btn.gif") center / cover no-repeat;
  transform: rotate(90deg);
  cursor: pointer;
}

.authentic-toast {
  position: fixed;
  z-index: 10;
  top: 48%;
  left: 50%;
  min-width: 250px;
  padding: 12px 24px;
  border-radius: 3px;
  background: rgba(55, 55, 55, .9);
  color: #fff;
  text-align: center;
  font-size: 18px;
  line-height: 1.4;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: authentic-toast-hide 3s ease forwards;
}

.authentic-toast.is-loading { animation: none; }
.authentic-toast.is-error { background: rgba(178, 45, 45, .94); animation: none; }

@keyframes authentic-toast-hide {
  0%, 82% { opacity: 1; visibility: visible; }
  100% { opacity: 0; visibility: hidden; }
}

@media (max-width: 480px) {
  .page { max-width: none; }
  .hero { height: 271px; padding-top: 20px; }
  .product-shot { width: 144px; height: 208px; }
  .scan-count { left: calc(50% + 76px); width: 90px; height: 96px; }
  .scan-count strong { font-size: 40px; line-height: 45px; }
  .scan-count span { font-size: 12px; line-height: 19px; }
  .corner { width: 21px; height: 21px; }
  .hero h2 { margin-top: 4px; font-size: 20px; line-height: 34px; }
  .details { padding: 15px 20px; }
  .info-block h3 { margin-left: 9px; font-size: 19px; }
  .info-block h3 img { width: 18px; height: 18px; margin-right: 5px; }
  table { font-size: 16px; }
  th, td { height: 42px; padding: 5px 10px; }
  th { width: 38%; }
  .info-block:first-child tr:first-child td { font-size: 14px; }
  .product-info th, .product-info td { height: 42px; }
  .introduction h2 { font-size: 17px; }
  .floating-button { right: 18px; bottom: max(70px, env(safe-area-inset-bottom)); }
  .authentic-toast { min-width: 208px; padding: 9px 18px; font-size: 15px; }
}

@media (max-width: 360px) {
  .product-shot { width: 128px; height: 185px; }
  .scan-count { left: calc(50% + 66px); width: 80px; height: 90px; }
  .corner { width: 18px; height: 18px; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
