:root {
  color-scheme: light;
  --green: #5fa644;
  --green-dark: #145a32;
  --blue: #175995;
  --red: #ee4036;
  --ink: #17202a;
  --muted: #62717f;
  --line: #dce5df;
  --bg: #f5f8f6;
  --panel: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(95, 166, 68, 0.18), transparent 28rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 52%, #ffffff 100%);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px clamp(14px, 4vw, 32px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.brand img {
  width: clamp(150px, 16vw, 230px);
  height: auto;
  display: block;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  background: #ffffff;
  font-weight: 700;
}

.nav a.active {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: #ffffff;
}

.frame-wrap {
  width: 100%;
  min-height: calc(100vh - 64px);
}

iframe {
  display: block;
  width: 100%;
  min-height: calc(100vh - 64px);
  border: 0;
  background: #ffffff;
}

.setup {
  width: min(760px, calc(100% - 32px));
  margin: 42px auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(20px, 4vw, 34px);
  box-shadow: 0 20px 50px rgba(23, 32, 42, 0.1);
}

.setup h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1;
}

.setup p,
.setup li {
  color: var(--muted);
  line-height: 1.5;
}

.setup code {
  color: var(--green-dark);
  background: #eef7f0;
  padding: 2px 5px;
  border-radius: 5px;
}

.setup pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #f2f6f3;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.qr-page {
  min-height: calc(100vh - 64px);
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

.qr-card {
  width: min(640px, 100%);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
  padding: clamp(24px, 5vw, 48px);
  box-shadow: 0 20px 50px rgba(23, 32, 42, 0.1);
}

.qr-card:before {
  content: "";
  display: block;
  height: 8px;
  width: 180px;
  margin: 0 auto 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--blue), var(--red));
}

.eyebrow {
  color: var(--green-dark);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 13px;
  margin: 0 0 10px;
}

.qr-card h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1;
}

.qr-card p {
  color: var(--muted);
  line-height: 1.45;
}

.qr-image {
  width: min(330px, 86vw);
  height: min(330px, 86vw);
  display: block;
  margin: 20px auto;
  border: 10px solid #ffffff;
  box-shadow: 0 0 0 1px var(--line);
}

.qr-url {
  word-break: break-all;
  font-size: 14px;
}

.qr-card button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: linear-gradient(135deg, var(--green-dark), var(--blue));
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    position: static;
  }

  .brand img {
    width: min(210px, 68vw);
  }

  iframe {
    min-height: 100vh;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .topbar,
  .qr-card button {
    display: none;
  }

  .qr-page {
    min-height: auto;
    padding: 0;
  }

  .qr-card {
    box-shadow: none;
    border: 0;
  }
}
