@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("./assets/plus-jakarta-sans.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
:root {
  color-scheme: light;
  font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  color: #1f4d3a;
  background: #f6f3e8;
  font-synthesis: none;
  font-weight: 500;
  --ink: #1f4d3a;
  --dark: #1f4d3a;
  --muted: #3b5a49;
  --line: #d7dec8;
  --paper: #fff;
  --surface: #e3e8d5;
  --accent: #f0b84a;
  --error: #a22c26;
}
* { box-sizing: border-box; }
[hidden], .symbols { display: none !important; }
body { margin: 0; min-height: 100dvh; line-height: 1.5; }
h1, h2, p { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button, input::file-selector-button { transition: background-color 160ms ease, border-color 160ms ease; }
button:focus-visible, input:focus-visible { outline: 3px solid #1f4d3a; outline-offset: 3px; }
.top { background: var(--dark); color: var(--paper); }
.top-inner {
  max-width: 1120px; margin: auto; min-height: 76px;
  padding: max(12px, env(safe-area-inset-top)) clamp(14px, 5vw, 42px) 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: block; width: clamp(126px, 45vw, 185px); height: auto; }
.icon { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.install {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-height: 48px; color: #f6f3e8; background: #1f4d3a;
  border: 1px solid #a6bc9c; border-radius: 12px; padding: 8px 12px;
}
.install:hover { background: #315b47; }
.install:focus-visible { outline-color: #f6f3e8; }
.layout {
  display: grid; grid-template-areas: "intro" "pass" "privacy"; gap: 19px;
  max-width: 530px; margin: auto; padding: 25px clamp(14px, 5vw, 32px) max(25px, env(safe-area-inset-bottom));
}
.intro { grid-area: intro; }
.intro h1 { font-size: clamp(2rem, 8vw, 3.4rem); line-height: 1.04; font-weight: 800; letter-spacing: -.055em; text-wrap: balance; }
.intro h1 span { color: #1f4d3a; }
.intro p { margin-top: 7px; color: var(--muted); max-width: 36ch; }
.privacy { grid-area: privacy; display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: .875rem; }
.privacy .icon { width: 18px; height: 18px; margin-top: 2px; }
.pass { grid-area: pass; min-width: 0; border-radius: 23px; overflow: hidden; background: var(--paper); box-shadow: 0 14px 38px #1f4d3a14; border: 1px solid var(--line); }
.pass-head {
  position: relative; isolation: isolate; overflow: hidden;
  padding: 19px 21px 20px; color: #f6f3e8; background: var(--dark);
}
.pass-head::after {
  position: absolute; z-index: -1; content: ""; inset: 0 0 0 24%;
  pointer-events: none; opacity: .42; background:
    linear-gradient(90deg, var(--dark), #1f4d3a55 75%, transparent),
    url("./assets/patron-lomas.webp") right center / 275px auto;
}
.pass-label { color: #f6f3e8; font-size: .875rem; font-weight: 700; letter-spacing: .065em; }
.pass h2 { font-size: clamp(1.35rem, 5vw, 1.8rem); margin-top: 10px; line-height: 1.16; overflow-wrap: anywhere; }
.pass-head p { margin-top: 4px; color: #f6f3e8; overflow-wrap: anywhere; }
.pass-body { padding: 17px; display: grid; justify-items: center; gap: 12px; }
.empty { width: 100%; border: 1px dashed #7fb069; border-radius: 14px; background: var(--surface); padding: 16px 12px; text-align: center; }
.empty strong { display: block; font-size: 1.06rem; }
.empty p { color: var(--muted); margin: 5px auto 0; max-width: 29ch; }
.scan-mark { position: relative; display: grid; place-items: center; width: 49px; height: 49px; margin: 0 auto 8px; font-size: .875rem; font-weight: 800; color: #1f4d3a; }
.scan-mark .icon { position: absolute; width: 47px; height: 47px; stroke-width: 1.35; }
.qr-frame { width: min(100%, 220px); border: 1px solid var(--line); border-radius: 14px; background: white; }
.qr-frame img, .large-dialog img { width: 100%; aspect-ratio: 1; display: block; image-rendering: pixelated; }
.primary, .secondary {
  display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 51px;
  width: 100%; border-radius: 12px; padding: 11px 14px; color: var(--ink); font-weight: 750;
}
.primary { border: 1px solid #d29a2f; background: var(--accent); }
.primary:hover { background: #e9aa35; }
.primary:disabled { cursor: wait; opacity: .75; }
.secondary { border: 1px solid #a6b49a; background: var(--surface); }
.secondary:hover, .close:hover { background: #dce4cc; }
.text-button { min-height: 44px; border: 0; border-radius: 8px; color: #1f4d3a; background: transparent; padding: 8px 12px; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { background: var(--surface); }
dialog { color: var(--ink); width: min(calc(100% - 24px), 450px); max-height: calc(100dvh - 24px); border: 1px solid var(--line); border-radius: 20px; padding: clamp(15px, 4vw, 23px); }
dialog::backdrop { background: #173628b8; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.dialog-head h2 { font-size: 1.4rem; line-height: 1.18; }
.close { padding: 0; width: 46px; height: 46px; flex-shrink: 0; border: 0; border-radius: 50%; color: var(--ink); background: var(--surface); font-size: 1.6rem; }
form, .identity-fields { display: grid; gap: 12px; }
form label { display: block; font-weight: 700; }
label small { color: var(--muted); font-size: .875rem; font-weight: 400; margin-left: 6px; }
input { width: 100%; color: var(--ink); background: white; min-height: 48px; border: 1px solid #829679; border-radius: 9px; padding: 9px 12px; }
input[aria-invalid="true"] { border-color: var(--error); }
label input { display: block; margin-top: 5px; }
input[type="file"] { padding: 4px; }
input::file-selector-button { cursor: pointer; min-height: 44px; font: inherit; border: 0; border-radius: 6px; padding: 5px 9px; color: var(--ink); background: #e3e8d5; margin-right: 7px; }
.help, .status { font-size: .875rem; color: var(--muted); }
.status:empty { display: none; }
.status.error, .remove { color: var(--error); }
.large-dialog { width: min(calc(100% - 16px), 565px); }
.large-dialog img { width: min(100%, max(125px, calc(100dvh - 215px))); margin: auto; }
.large-dialog p, #install-guide p { color: var(--muted); }
.large-dialog p { text-align: center; margin: 8px 0 12px; }
#install-guide p + p { margin-top: 12px; }
@media (max-width: 760px) {
  .has-credential .layout { grid-template-areas: "pass" "intro" "privacy"; }
  .has-credential .intro h1 { font-size: clamp(1.25rem, 5vw, 1.65rem); }
  .has-credential .intro p { margin-top: 4px; }
}
@media (min-width: 761px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) minmax(350px, 445px);
    grid-template-areas: "intro pass" "privacy pass"; grid-template-rows: 1fr 1fr;
    gap: 12px clamp(35px, 8vw, 105px); max-width: 1080px;
    padding: clamp(55px, 9vw, 106px) 33px;
  }
  .intro { align-self: end; padding-bottom: 8px; }
  .intro h1 { font-size: clamp(2.5rem, 5.15vw, 4.25rem); text-wrap: initial; }
  .intro h1 span { display: block; }
  .intro p { margin-top: 15px; font-size: 1.12rem; }
  .privacy { align-self: start; }
  .pass { align-self: center; }
  .pass-head { padding: 22px 24px; }
  .pass-body { padding: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  button, input::file-selector-button { transition: none; }
}
