.qr-guide-page {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.qr-guide-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  gap: 28px;
  align-items: center;
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid rgba(185, 200, 218, .8);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 12% 10%, rgba(51, 102, 232, .18), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, #eef4ff 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-width: 0;
}

.qr-guide-hero h1 {
  max-width: 820px;
  margin: 10px 0 14px;
  font-size: clamp(2.25rem, 5vw, 4.8rem);
  line-height: .98;
  letter-spacing: -.04em;
  overflow-wrap: anywhere;
}

.qr-guide-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.24rem);
  line-height: 1.62;
}

.qr-guide-hero .hero-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 24px;
}

.qr-guide-hero-art {
  position: relative;
  min-height: 320px;
  border-radius: 24px;
  background: #83898d;
  border: 1px solid rgba(185, 200, 218, .88);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 24px 46px rgba(16, 42, 76, .12);
}

.qr-guide-hero-image {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  object-position: center;
}

.qr-guide-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.qr-guide-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid #cfe0f6;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: #244a86;
  font-weight: 800;
  font-size: .9rem;
}

.qr-guide-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 14px 32px rgba(15, 42, 76, .06);
}

.qr-guide-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 9px 12px;
  border-radius: 12px;
  color: var(--text);
  font-weight: 800;
}

.qr-guide-nav a:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

.qr-guide-section {
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 16px 34px rgba(15, 42, 76, .06);
  scroll-margin-top: 110px;
  min-width: 0;
}

.qr-guide-section h2 {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  letter-spacing: -.025em;
  line-height: 1.08;
}

.qr-guide-section h3 {
  margin: 0 0 8px;
  color: var(--text);
  line-height: 1.18;
}

.qr-guide-section p,
.qr-guide-section li {
  color: var(--muted);
  line-height: 1.65;
}

.qr-guide-lede {
  max-width: 860px;
  margin: 0 0 18px;
}

.guide-grid {
  display: grid;
  gap: 16px;
}

.guide-grid > * {
  min-width: 0;
}

.guide-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guide-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guide-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.guide-grid.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.guide-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid #d9e7f7;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.guide-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.guide-card p {
  margin: 0;
}

.guide-card.good {
  border-color: #b9ebd0;
  background: linear-gradient(180deg, #ffffff 0%, #f0fff7 100%);
}

.guide-card.warn {
  border-color: #f3d58a;
  background: linear-gradient(180deg, #ffffff 0%, #fffaf0 100%);
}

.guide-card.bad {
  border-color: #f3b6b6;
  background: linear-gradient(180deg, #ffffff 0%, #fff4f4 100%);
}

.guide-rule-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.guide-rule-list li {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid #d9e7f7;
  border-radius: 18px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
}

.guide-rule-list i,
.guide-card i {
  color: var(--brand);
}

.guide-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.guide-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

.guide-table th,
.guide-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.guide-table th {
  color: var(--text);
  background: #f4f8ff;
  font-weight: 900;
}

.guide-table tr:last-child td {
  border-bottom: 0;
}

.guide-example-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.guide-example-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d9e7f7;
  border-radius: 18px;
  background: #fff;
}

.guide-example-card strong {
  color: var(--text);
}

.guide-example-card small {
  color: var(--muted);
  line-height: 1.45;
}

.guide-mini-qr {
  --sample-bg: #ffffff;
  --sample-color: #111827;
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 16px;
  background: var(--sample-bg);
  border: 1px solid rgba(16, 42, 76, .12);
  overflow: hidden;
}

.guide-mini-qr::before {
  content: "";
  position: absolute;
  inset: 22%;
  background:
    linear-gradient(90deg, var(--sample-color) 45%, transparent 45% 56%, var(--sample-color) 56% 74%, transparent 74%),
    linear-gradient(0deg, transparent 12%, var(--sample-color) 12% 28%, transparent 28% 42%, var(--sample-color) 42% 56%, transparent 56% 72%, var(--sample-color) 72%);
  background-size: 25% 25%, 20% 20%;
  opacity: .95;
}

.guide-mini-qr .eye {
  position: absolute;
  width: 24%;
  aspect-ratio: 1;
  border: 8px solid var(--sample-color);
  border-radius: 4px;
  background: var(--sample-bg);
}

.guide-mini-qr .eye::after {
  content: "";
  position: absolute;
  inset: 24%;
  background: var(--sample-color);
  border-radius: 3px;
}

.guide-mini-qr .eye.one { left: 10%; top: 10%; }
.guide-mini-qr .eye.two { right: 10%; top: 10%; }
.guide-mini-qr .eye.three { left: 10%; bottom: 10%; }

.guide-mini-qr.good-navy {
  --sample-color: #102a4c;
}

.guide-mini-qr.risky-invert {
  --sample-bg: #111827;
  --sample-color: #ffffff;
}

.guide-mini-qr.bad-yellow {
  --sample-bg: #ffffff;
  --sample-color: #facc15;
}

.guide-mini-qr.bad-gray {
  --sample-bg: #dfe5ed;
  --sample-color: #9aa6b2;
}

.guide-mini-qr.quiet-zone::after {
  content: "";
  position: absolute;
  inset: 8%;
  border: 2px dashed rgba(51, 102, 232, .8);
  border-radius: 12px;
}

.guide-mini-qr.logo-demo .logo-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 8px;
  background: var(--brand);
  box-shadow: 0 0 0 8px var(--sample-bg);
}

.guide-printable-demo {
  display: grid;
  place-items: center;
  min-height: 250px;
  border: 1px solid #d9e7f7;
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(51, 102, 232, .07) 1px, transparent 1px),
    linear-gradient(0deg, rgba(51, 102, 232, .07) 1px, transparent 1px),
    #f7fbff;
  background-size: 26px 26px;
}

.guide-printable-model {
  width: min(72%, 270px);
  aspect-ratio: 1.15 / 1;
  position: relative;
  transform: perspective(720px) rotateX(58deg) rotateZ(-17deg);
  transform-style: preserve-3d;
  border-radius: 18px;
  background: #f6f8fb;
  border: 6px solid #3867f4;
  box-shadow:
    0 18px 0 #c8d4e3,
    0 34px 38px rgba(16, 42, 76, .22);
}

.guide-printable-model::before {
  content: "";
  position: absolute;
  inset: 17%;
  background:
    linear-gradient(90deg, #111827 45%, transparent 45% 55%, #111827 55% 72%, transparent 72%),
    linear-gradient(0deg, transparent 10%, #111827 10% 22%, transparent 22% 40%, #111827 40% 60%, transparent 60% 78%, #111827 78%);
  background-size: 20% 20%, 18% 18%;
  box-shadow: 0 8px 0 rgba(17, 24, 39, .35);
}

.guide-callout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid #cfe0f6;
  border-radius: 18px;
  background: #f7fbff;
}

.guide-callout i {
  color: var(--brand);
  margin-top: 3px;
}

.guide-snippet {
  display: block;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid #d9e7f7;
  border-radius: 14px;
  background: #f8fbff;
  color: var(--text);
  font-weight: 800;
  line-height: 1.45;
}

.guide-checklist {
  columns: 2;
  column-gap: 26px;
  margin: 18px 0 0;
  padding-left: 20px;
}

.guide-checklist li {
  break-inside: avoid;
  margin: 0 0 10px;
}

@media (max-width: 1100px) {
  .qr-guide-hero,
  .guide-grid.two,
  .guide-grid.three,
  .guide-grid.four,
  .guide-grid.five {
    grid-template-columns: 1fr;
  }

  .guide-rule-list,
  .guide-example-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .qr-guide-hero {
    padding: 22px;
  }

  .qr-guide-hero h1 {
    font-size: clamp(2rem, 10vw, 2.65rem);
  }

  .qr-guide-hero .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .qr-guide-hero-art {
    min-height: 240px;
  }

  .qr-guide-hero-image {
    min-height: 240px;
  }

  .qr-guide-pill-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .qr-guide-pill {
    justify-content: center;
    min-width: 0;
    text-align: center;
    white-space: normal;
  }

  .guide-rule-list,
  .guide-example-grid {
    grid-template-columns: 1fr;
  }

  .guide-checklist {
    columns: 1;
  }

  .qr-guide-nav {
    align-items: stretch;
  }

  .qr-guide-nav a,
  .qr-guide-hero .btn {
    width: 100%;
    justify-content: center;
    min-width: 0;
    white-space: normal;
    text-align: center;
  }
}
