:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172e25;
  background: #f4f2ec;
  --green: #153c30;
  --green-dark: #0d2a22;
  --paper: #fffefa;
  --line: #deded3;
  --muted: #536058;
  --gold: #d7b77d;
  --serif: Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, p { margin: 0; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid #88662d; outline-offset: 3px; }

.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shell { width: min(100% - 2rem, 69rem); margin-inline: auto; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 5.125rem;
  padding-block: .75rem;
  border-bottom: 1px solid #dedbd0;
  margin-bottom: 1rem;
}
.brand { min-width: 0; }
.brand-logo { display: block; width: 6.25rem; height: 3.125rem; padding: .35rem .475rem; border-radius: .625rem; background: var(--green-dark); object-fit: contain; }
.brand-fallback { display: flex; align-items: center; gap: .625rem; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 2.625rem;
  height: 2.625rem;
  border: 1px solid var(--green);
  border-radius: .625rem;
  color: var(--gold);
  background: var(--green);
  font: .92rem var(--serif);
  letter-spacing: .04em;
}
.brand-name { font: 600 1.15rem/1.05 var(--serif); }
.brand-name small { display: block; margin-top: .18rem; color: var(--muted); font: .8125rem system-ui, sans-serif; }
.share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 2.75rem;
  padding: .35rem .8rem;
  border: 1px solid #d3d5c8;
  border-radius: 999px;
  background: var(--paper);
  color: var(--green);
  font-size: .875rem;
  font-weight: 650;
}
.share-button:hover { background: #ebece3; }

.card-layout, .stack { display: grid; align-content: start; gap: .875rem; min-width: 0; }
.identity {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: 17rem;
  padding: 1.45rem;
  border-radius: 1.15rem;
  color: #fff9ec;
  background: linear-gradient(135deg, #1b4939, var(--green-dark) 84%);
}
.identity::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 26rem;
  height: 24rem;
  top: -10rem;
  right: -13rem;
  border-radius: 48% 48% 0 0;
  transform: rotate(31deg);
  border: 1px solid #c6ad72a1;
  box-shadow: 0 0 0 13px #1c4134, 0 0 0 14px #c6ad7270,
              0 0 0 27px #1b4033, 0 0 0 28px #c6ad7255,
              0 0 0 41px #1b403366, 0 0 0 42px #c6ad7245,
              0 0 0 56px #1b40332b, 0 0 0 57px #c6ad7235;
  opacity: .64;
  mask-image: linear-gradient(135deg, #000 39%, transparent 81%);
}
.identity-content { min-width: 0; }
.portrait {
  display: grid;
  place-items: center;
  width: 5.25rem;
  height: 5.25rem;
  margin-bottom: 1.2rem;
  border-radius: 50%;
  border: 1px solid #bca163;
  background: #214c3b;
  box-shadow: 0 0 0 4px #d7b77d1c;
  overflow: hidden;
  color: var(--gold);
  font: 2rem var(--serif);
  letter-spacing: -.05em;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.identity h1 {
  font: 500 clamp(2rem, 7.8vw, 2.9rem)/1.02 var(--serif);
  letter-spacing: -.042em;
  text-wrap: balance;
}
.role { margin-top: .65rem; color: #f0d29a; font-size: 1rem; }
.location { display: flex; align-items: center; gap: .35rem; margin-top: .95rem; color: #d8e3d8; font-size: .875rem; }
.location .icon { width: 1rem; height: 1rem; }

.panel {
  min-width: 0;
  padding: 1.15rem;
  border: 1px solid #e3e1d7;
  border-radius: 1.15rem;
  background: var(--paper);
  box-shadow: 0 3px 12px #24291906;
}
h2 { font: 500 1.52rem/1.17 var(--serif); letter-spacing: -.02em; }
.panel > h2 { margin-bottom: .9rem; }
.primary-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 2.875rem;
  padding: .55rem .5rem;
  border: 1px solid transparent;
  border-radius: .625rem;
  font-size: .875rem;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
}
.button-primary { background: var(--green); color: #fffefa; }
.button-primary:hover { background: #22533f; }
.button-secondary { background: #f4f5ef; color: var(--green); border-color: #dce0d4; }
.button-secondary:hover { background: #e8ece2; }
.whatsapp-actions { display: grid; gap: .5rem; }
.primary-actions:has(> :not([hidden])) + .whatsapp-actions:has(> :not([hidden])) { margin-top: .625rem; }
.whatsapp-actions .channel { justify-content: flex-start; }
.channels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.channel {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 3.125rem;
  gap: .575rem;
  padding: .45rem .5rem;
  border-radius: .65rem;
  border: 1px solid #e8e8dd;
  background: #f8f8f2;
  font-size: .875rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.channel:hover { background: #ecefe5; border-color: #c6d0bd; }
.channel-icon { display: grid; place-items: center; flex: none; width: 1.85rem; height: 1.85rem; border-radius: .45rem; color: #1e4b37; background: #e9eee2; }
.channel-icon .icon { width: 1.05rem; height: 1.05rem; }
.channel strong { font-weight: 650; }
.channel small { display: block; margin-top: .13rem; color: var(--muted); font-size: .8125rem; }
.notice { color: var(--muted); font-size: .875rem; line-height: 1.45; }
.form-notice {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1rem;
  padding: .55rem .65rem;
  border-radius: .55rem;
  color: #624a24;
  background: #f5efdf;
}
.form-notice .icon { width: 1rem; height: 1rem; }
.form-fields { display: grid; gap: .7rem .8rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.field { display: grid; align-content: start; gap: .375rem; min-width: 0; }
label { font-size: .875rem; font-weight: 600; }
input, select, textarea {
  width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  padding: .5rem .65rem;
  border: 1px solid #ddded4;
  border-radius: .55rem;
  background: #fcfcf8;
  color: #37453d;
}
input:disabled, textarea:disabled, select:disabled { opacity: 1; -webkit-text-fill-color: #636c60; }
input::placeholder, textarea::placeholder { color: #636c60; opacity: 1; }
textarea { resize: vertical; min-height: 4.15rem; }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; padding-right: 1.75rem; }
.select-wrap::after {
  content: "";
  position: absolute;
  pointer-events: none;
  top: 43%;
  right: .8rem;
  width: .4rem;
  height: .4rem;
  border-right: 1.5px solid #636c60;
  border-bottom: 1.5px solid #636c60;
  transform: rotate(45deg);
}
.submit-button { background: #e7e9de; color: #50594e; }
.submit-button:disabled { cursor: default; }
.privacy { margin-top: .85rem; padding-top: .55rem; border-top: 1px solid #e8e8dd; font-size: .875rem; }
.privacy summary { width: fit-content; min-height: 2.75rem; padding: .7rem .15rem; color: var(--green); cursor: pointer; font-weight: 650; }
.privacy p { padding: 0 .15rem .25rem; color: var(--muted); line-height: 1.55; }
.qr-card { display: flex; align-items: center; gap: .8rem; }
.qr-card img { flex: none; object-fit: contain; }
.qr-card h2 { margin-bottom: .15rem; }
.text-link { display: inline-flex; align-items: center; min-height: 2.75rem; text-decoration: underline; color: var(--green); }
.footer { margin-top: 1rem; padding: 1rem 0 1.4rem; border-top: 1px solid #dedbd0; color: var(--muted); font-size: .8125rem; }

.toast:not(:empty) {
  position: fixed;
  z-index: 1;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  width: fit-content;
  max-width: calc(100% - 2rem);
  margin-inline: auto;
  padding: .65rem .9rem;
  border-radius: .625rem;
  background: var(--green-dark);
  color: white;
  text-align: center;
}
dialog { width: min(100% - 2rem, 28rem); padding: 1.25rem; border: 1px solid var(--line); border-radius: 1rem; color: inherit; background: var(--paper); }
dialog::backdrop { background: #10271f9c; }
dialog form { display: grid; gap: .75rem; }

@media (min-width: 32rem) {
  .form-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wide { grid-column: 1 / -1; }
}

@media (min-width: 50rem) {
  .shell { width: min(100% - 4rem, 69rem); }
  .topbar { min-height: 5.5rem; margin-bottom: 1.4rem; }
  .card-layout { grid-template-columns: minmax(18rem, 2fr) minmax(0, 3fr); }
  .card-layout, .stack { gap: 1rem; }
  .identity { min-height: 21rem; padding: 1.7rem; }
  .portrait { width: 6.4rem; height: 6.4rem; margin-bottom: 1.25rem; font-size: 2.4rem; }
  .panel { padding: 1.3rem; }
  .channel { padding-inline: .625rem; }
  .footer { margin-top: 1.2rem; }
}
