:root {
  --ink: #14211f;
  --muted: #6b7772;
  --line: #dfe5dd;
  --paper: #f7f5ef;
  --card: #fffefa;
  --accent: #0c7c6e;
  --accent-dark: #07564e;
  --mint: #d9eee7;
  --coral: #f18b6f;
  --shadow: 0 24px 60px rgba(23, 58, 48, .11);
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Manrope", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid rgba(12, 124, 110, .3); outline-offset: 3px; }

.page-shell {
  width: min(1240px, calc(100% - 64px));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(20, 33, 31, .12);
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; padding: 5px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px;
  border: 2px solid var(--ink); border-radius: 8px; transform: rotate(-8deg);
}
.brand-mark span { display: block; border-radius: 1px; background: var(--accent); }
.brand-mark span:nth-child(2) { background: var(--coral); }
.brand-mark span:nth-child(3) { background: var(--ink); }
.brand-mark span:nth-child(4) { background: var(--accent); }
.brand-name { font-size: 18px; font-weight: 800; letter-spacing: -.06em; }
.brand-name span, .footer-mark span { color: var(--accent); }
.privacy-pill { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(12, 124, 110, .12); }

.main-content { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(460px, 1.03fr); align-items: center; gap: clamp(60px, 10vw, 150px); padding: 76px 4.3% 82px; }
.intro { padding-top: 5px; }
.eyebrow { display: flex; align-items: center; gap: 11px; color: var(--accent); font-family: "DM Mono", monospace; font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow-line { width: 29px; height: 1px; background: var(--coral); }
h1 { max-width: 590px; margin: 22px 0 24px; font-size: clamp(50px, 6vw, 84px); line-height: .98; letter-spacing: -.075em; font-weight: 800; }
h1 em { color: var(--accent); font-style: normal; }
.intro-copy { max-width: 390px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.75; }
.mini-stats { display: flex; gap: 31px; margin-top: 54px; }
.mini-stat { display: flex; flex-direction: column; gap: 7px; }
.mini-stat strong { color: var(--coral); font-family: "DM Mono", monospace; font-size: 13px; font-weight: 500; }
.mini-stat span { color: var(--ink); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.qr-card { width: 100%; max-width: 506px; justify-self: end; padding: 29px 32px 32px; background: var(--card); border: 1px solid rgba(20, 33, 31, .09); border-radius: 18px; box-shadow: var(--shadow); }
.card-topline { display: flex; justify-content: space-between; margin-bottom: 27px; color: var(--accent); font-family: "DM Mono", monospace; font-size: 10px; font-weight: 500; letter-spacing: .12em; }
.card-index { color: #a1aaa4; }
label { display: block; margin-bottom: 11px; font-size: 13px; font-weight: 800; }
.input-wrap { display: flex; align-items: center; min-height: 57px; border: 1px solid #cfd9d2; border-radius: 9px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(12, 124, 110, .09); }
.input-prefix { width: 48px; color: var(--accent); font-size: 22px; text-align: center; }
input { flex: 1; min-width: 0; padding: 15px 4px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 14px; }
input::placeholder { color: #a4afa9; }
.clear-button { width: 41px; border: 0; color: #8b9791; background: transparent; font-size: 23px; line-height: 1; }
.field-meta { min-height: 37px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 8px 2px 12px; color: #8b9791; font-size: 10px; line-height: 1.4; }
.error-message { color: #ca5b43; text-align: right; }
.primary-button { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 17px 18px 17px 21px; border: 0; border-radius: 8px; color: #fff; background: var(--accent); font-size: 13px; font-weight: 800; transition: transform .2s, background .2s, box-shadow .2s; }
.primary-button:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(12, 124, 110, .18); }
.button-arrow { font-size: 21px; font-weight: 400; line-height: 12px; }
.result-divider { display: flex; align-items: center; gap: 12px; margin: 30px 0 19px; }
.result-divider span { flex: 1; height: 1px; background: var(--line); }
.result-divider small { color: #a1aaa4; font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: .12em; }
.qr-result { min-height: 238px; display: flex; align-items: center; justify-content: center; border: 1px dashed #d1dbd3; border-radius: 10px; background: #fbfcf8; }
.qr-placeholder { display: flex; align-items: center; flex-direction: column; gap: 15px; padding: 20px; color: #98a39d; text-align: center; }
.qr-placeholder p { margin: 0; font-size: 11px; }
.placeholder-glyph { width: 67px; height: 67px; padding: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; border: 1px solid #c9d5cd; border-radius: 8px; transform: rotate(3deg); }
.placeholder-glyph span { border: 3px solid #c5d1c9; border-radius: 2px; }
.placeholder-glyph span:nth-child(2), .placeholder-glyph span:nth-child(3) { border: 0; background: #dce5de; }
.qr-generated { width: 100%; display: flex; align-items: center; flex-direction: column; padding: 13px 13px 12px; }
.canvas-frame { width: 168px; height: 168px; display: grid; place-items: center; padding: 11px; background: #fff; border-radius: 7px; box-shadow: 0 5px 18px rgba(20, 33, 31, .09); }
#qr-canvas { display: block; max-width: 100%; height: auto; }
.generated-label { margin: 12px 0 13px; color: var(--accent); font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.result-actions { display: flex; gap: 8px; }
.secondary-button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border: 1px solid #cfd9d2; border-radius: 6px; color: var(--ink); background: #fff; font-size: 11px; font-weight: 700; transition: border-color .2s, color .2s, background .2s; }
.secondary-button:hover { border-color: var(--accent); color: var(--accent); background: #f2faf6; }
.download-icon { font-size: 17px; line-height: 10px; }
.copy-icon { font-size: 15px; line-height: 10px; }
.footer { display: flex; justify-content: space-between; align-items: center; padding: 19px 0 25px; border-top: 1px solid rgba(20, 33, 31, .12); color: #89938e; font-size: 10px; }
.footer-mark { color: var(--ink); font-family: "DM Mono", monospace; font-size: 10px; font-weight: 500; letter-spacing: .1em; }
.footer-mark i { color: #a5aea8; font-style: normal; }
.toast { position: fixed; right: 26px; bottom: 26px; z-index: 5; max-width: min(340px, calc(100% - 52px)); padding: 12px 16px; border-radius: 7px; color: #fff; background: var(--ink); box-shadow: 0 9px 26px rgba(20, 33, 31, .18); font-size: 12px; font-weight: 700; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .25s, transform .25s; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
[hidden] { display: none !important; }

@media (max-width: 840px) {
  .page-shell { width: min(100% - 36px, 600px); }
  .topbar { height: 82px; }
  .main-content { display: block; padding: 62px 0 58px; }
  .intro { margin-bottom: 47px; }
  h1 { font-size: clamp(52px, 13vw, 74px); }
  .qr-card { max-width: none; }
  .footer { gap: 20px; }
}
@media (max-width: 470px) {
  .page-shell { width: calc(100% - 32px); }
  .privacy-pill { font-size: 9px; letter-spacing: .04em; }
  h1 { font-size: 51px; }
  .intro-copy { font-size: 14px; }
  .mini-stats { margin-top: 35px; gap: 22px; }
  .mini-stat span { font-size: 9px; }
  .qr-card { padding: 25px 18px 22px; }
  .footer { align-items: flex-start; flex-direction: column; }
}
