:root {
  color-scheme: light;
  font-family: "DM Sans", "Aptos", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 100%;
  --ink: #221920;
  --muted: #6d6269;
  --page: #f7f5f4;
  --line: #ede6e7;
  --accent: #b5122b;
  --accent-dark: #920e21;
  --tint: #faedf0;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 50% 0%, #e8d7d9 0%, transparent 65%),
    linear-gradient(120deg, #f5f1ed, #f1eeeb 50%, #f7f3ee);
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid #be2e4b;
  outline-offset: 4px;
}
p, h1, h2 { margin: 0; }
svg { display: block; flex: none; }

.topbar {
  width: min(100% - 48px, 1152px);
  min-height: 78px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -.052em;
}
.wordmark > span:last-child { color: #8b4554; }
.brand-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-right: 9px;
  border-radius: 11px;
  background: #2a1b24;
  color: white;
}

.card-page {
  min-height: 100vh;
  min-height: 100dvh;
  background: #1e1019;
}
.card-main { width: 100%; max-width: 520px; margin: 0 auto; }
.namecard {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(22px, env(safe-area-inset-top)) clamp(19px, 6.2vw, 34px)
    max(20px, env(safe-area-inset-bottom));
  color: #fff6f6;
  background:
    radial-gradient(ellipse at 50% 0%, #462033 0%, transparent 60%),
    linear-gradient(160deg, #27161f, #1c1119 70%);
}
.namecard :is(a, button):focus-visible { outline-color: #ff9aa3; outline-offset: 2px; }
.card-tools {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: clamp(15px, 4vw, 22px);
}
.card-admin {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 9px;
  border: 1px solid #ffffff29;
  border-radius: 8px;
  color: #f1dce4;
  font-size: .74rem;
  font-weight: 650;
}
.card-admin svg { width: 13px; height: 13px; }
.card-admin:hover { background: #ffffff12; }
.card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: clamp(23px, 4svh, 35px);
  padding-block: 20px clamp(16px, 6svh, 42px);
}
.identity { text-align: center; }
.group-logo {
  display: block;
  width: clamp(150px, 47vw, 190px);
  height: auto;
  margin: 0 auto clamp(16px, 3svh, 24px);
  filter: brightness(1.35);
}
.identity h1 {
  max-width: 25ch;
  margin: auto;
  font-size: clamp(1.75rem, 7vw, 2.35rem);
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -.048em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.identity p {
  margin: 8px auto 0;
  color: #dcc0cb;
  font-size: .95rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 17px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 700;
  font-size: .9rem;
  line-height: 1.25;
  text-align: center;
  transition: background-color 140ms, border-color 140ms, color 140ms;
}
.primary { background: var(--accent); color: white; }
.primary:hover { background: var(--accent-dark); }
.secondary { border-color: #e7dade; background: #fff; color: #493342; }
.secondary:hover { border-color: #d2b9c1; background: #fcf5f7; }
.small { padding: 8px 12px; min-height: 39px; font-size: .82rem; }
.small svg { width: 16px; height: 16px; }
.contact-list { display: grid; gap: 8px; }
.contact-list > * {
  border: 1px solid #ffffff1c;
  border-radius: 12px;
  background: #ffffff08;
}
.contact-list > a:hover, .phone-row:focus-within { background: #ffffff12; }
.contact-row {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 55px;
  padding: 8px 11px;
}
.row-value {
  min-width: 0;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.phone-row { display: flex; align-items: center; }
.phone-row .contact-row { flex: 1; min-width: 0; }
.phone-row .contact-row:hover .row-value { color: #f5a6b5; }
.whatsapp-link {
  display: grid;
  flex: none;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-right: 7px;
  border: 1px solid #a5dcc22b;
  border-radius: 9px;
  color: #b6e8cb;
  background: #80d3a41f;
}
.whatsapp-link:hover { background: #80d3a435; }
.row-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 37px;
  height: 37px;
  border: 1px solid #efdcd9;
  border-radius: 12px;
  background: #f8eae7;
  color: #8b2342;
}
.row-icon svg { width: 18px; height: 18px; }
.namecard .row-icon {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: #ffffff12;
  color: #f0a9bc;
}
.card-actions { display: grid; gap: 8px; }
.card-actions .button { min-height: 47px; }
.save-button {
  border-color: #fa829151;
  background: #be2440;
  color: #fff;
}
.save-button:hover { background: #a81c36; }
.share-button {
  border-color: #ffffff37;
  background: transparent;
  color: #f8e5eb;
}
.share-button:hover { background: #ffffff0c; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
}

.text-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 6px 8px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #664955;
  font-size: .83rem;
  font-weight: 650;
}
.text-button svg { width: 16px; height: 16px; }
.text-button:hover { color: var(--accent); background: #f6e8ec; }

.admin-main { width: min(calc(100% - 32px), 768px); margin: 24px auto 48px; }
.panel {
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid #eadde0;
  border-radius: 22px;
  background: white;
  box-shadow: 0 14px 40px #46243011;
}
.panel h1 { font-size: clamp(1.6rem, 5vw, 2rem); letter-spacing: -.045em; }
.panel p { margin: 6px 0 0; color: var(--muted); line-height: 1.5; }
.login { max-width: 420px; margin: 0 auto; }
.login .row-icon { margin-bottom: 13px; }
.login .button { width: 100%; margin-top: 17px; }
.login form, .editor > form { margin-top: 20px; }
.admin-heading, .admin-list li, .item-actions, .editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.admin-list { padding: 0; margin: 18px 0 0; list-style: none; }
.admin-list li { padding: 13px 0; border-top: 1px solid var(--line); }
.admin-identity { display: grid; gap: 3px; overflow-wrap: anywhere; }
.admin-identity span { color: var(--muted); font-size: .85rem; }
.admin-identity .inactive { color: #991731; }
.item-actions { flex: none; }
.panel p.empty { margin-top: 22px; padding: 15px; background: #fbf7f8; border-radius: 12px; }
.back-link { display: inline-block; margin-bottom: 14px; color: var(--accent-dark); font-size: .88rem; font-weight: 700; }
.back-link:hover { text-decoration: underline; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
form label { display: grid; gap: 7px; font-size: .9rem; font-weight: 680; }
form input {
  width: 100%;
  min-height: 45px;
  border: 1px solid #e1d4d8;
  border-radius: 9px;
  padding: 9px 11px;
  color: var(--ink);
  background: white;
  font-size: 1rem;
}
form input::placeholder { color: #82757e; }
.editor-actions { justify-content: flex-start; margin-top: 18px; flex-wrap: wrap; }
.admin-qr {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
  padding: 13px;
  border: 1px solid #eadde0;
  border-radius: 13px;
  background: #fbf7f8;
}
.admin-qr img { display: block; border-radius: 8px; }
.admin-qr h2 { margin-bottom: 8px; font-size: 1rem; }
.status-form { padding-top: 13px; border-top: 1px solid var(--line); }
.status-form .button { margin-top: 10px; }
.panel p.hint, .status-form p { font-size: .84rem; }
.panel p.error { padding: 10px 12px; margin: 12px 0 0; background: var(--tint); color: var(--accent-dark); border-radius: 8px; }

@media (max-width: 520px) {
  .topbar { width: calc(100% - 36px); min-height: 61px; }
  .form-grid { grid-template-columns: 1fr; }
  .admin-heading, .admin-list li { align-items: flex-start; flex-direction: column; }
}
@media (min-width: 521px) {
  .card-page {
    display: grid;
    place-items: center;
    padding: 24px 0;
    background: radial-gradient(ellipse at 50% 25%, #3d2838, #1a131b 70%);
  }
  .card-main { max-width: 448px; }
  .namecard {
    min-height: min(720px, calc(100dvh - 48px));
    border: 1px solid #ffffff29;
    border-radius: 25px;
    box-shadow: 0 18px 70px #0006;
  }
}
@media (max-height: 600px) {
  .namecard {
    padding-top: max(13px, env(safe-area-inset-top));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
  .card-content { padding-block: 8px 16px; gap: 16px; }
  .group-logo { width: clamp(120px, 32svh, 165px); margin-bottom: 11px; }
  .identity h1 { font-size: clamp(1.53rem, 6.5vw, 1.95rem); }
  .identity p { margin-top: 5px; font-size: .88rem; }
  .contact-list { gap: 5px; }
  .contact-row { min-height: 43px; padding: 5px 8px; gap: 8px; }
  .namecard .row-icon { width: 31px; height: 31px; }
  .row-value { font-size: .85rem; }
  .whatsapp-link { width: 36px; height: 36px; margin-right: 4px; }
  .card-actions { gap: 6px; }
  .card-actions .button { min-height: 44px; }
}
@media (max-height: 420px) {
  .card-page { padding-block: 0; }
  .namecard {
    min-height: 100dvh;
    border-block: 0;
    border-radius: 0;
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
  .card-content { padding-block: 4px 9px; gap: 11px; }
  .group-logo { width: 113px; margin-bottom: 6px; }
  .identity h1 { font-size: 1.5rem; }
  .identity p { margin-top: 3px; font-size: .82rem; }
  .contact-row { min-height: 36px; padding-block: 3px; }
  .namecard .row-icon { width: 28px; height: 28px; }
  .whatsapp-link { width: 32px; height: 32px; }
}
@media (min-width: 450px) and (max-height: 420px) {
  .card-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
}
