/* Medidas e cores tiradas do linktr.ee/drgilbertofilho (tema "air", claro) */
:root {
  --bg: #eceef1;          /* fundo do cartão */
  --backdrop: #d0d1d4;    /* fundo atrás do cartão no desktop */
  --btn: #ffffff;         /* botões dos links */
  --text: #000000;
  --font: "Link Sans Product", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --topbar-bg: color-mix(in srgb, rgba(255,255,255,.5), rgba(0,0,0,0) 12%);
}
* { box-sizing: border-box; }
html { background: var(--backdrop); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); font-size: 16px; line-height: 1; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; }

.backdrop { min-height: 100vh; }
.card {
  position: relative; margin: 0 auto; width: 100%; max-width: 580px;
  min-height: 100vh; background: var(--bg); padding: 14px 14px 40px;
}
@media (min-width: 640px) {
  .card {
    margin-top: 40px; min-height: calc(100vh - 40px); padding: 28px 28px 40px;
    border-radius: 24px 24px 0 0; box-shadow: 0 24px 32px rgba(0,0,0,.15);
  }
}

/* barra do topo */
.topbar { position: sticky; top: 14px; z-index: 5; display: flex; justify-content: space-between; align-items: center; height: 40px; }
@media (min-width: 640px) { .topbar { top: 28px; } }
.topbar-right { display: flex; gap: 6px; }
.pill {
  position: relative; display: flex; align-items: center; justify-content: center; height: 40px; min-width: 40px;
  border-radius: 16px; outline: 1px solid rgba(255,255,255,.4);
  -webkit-backdrop-filter: blur(16px) brightness(1.4); backdrop-filter: blur(16px) brightness(1.4);
  transition: transform .3s ease-out, opacity .3s ease-out;
}
.pill::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--topbar-bg); }
.pill:active { transform: scale(.95); }
.pill-text { padding: 0 16px; font-size: 14px; font-weight: 500; line-height: 21px; }
.pill-icon { width: 40px; }
.pill-spacer { visibility: hidden; }

/* perfil */
.profile { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 50px; }
.avatar { width: 96px; height: 96px; border-radius: 9999px; object-fit: cover; }
.profile h1 { margin: 14px 0 0; padding: 2px 0; font-size: 24px; font-weight: 600; line-height: 28.8px; }
.profile h2 { margin: 2px 0 0; padding: 0 42px; font-size: 16px; font-weight: 500; line-height: 24px; text-wrap: balance; }
.socials { display: flex; justify-content: center; margin-top: 8px; }
.social { display: block; padding: 8px; transition: transform .15s ease; }
.social:hover { transform: scale(1.1); }
.social svg { display: block; }

/* links */
.links { display: flex; flex-direction: column; gap: 14px; margin-top: 32px; }
.link { position: relative; background: var(--btn); border-radius: 8px; min-height: 64px; transition: transform .15s ease; }
.link:hover { transform: scale(1.02); }
.link-main {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 100%; min-height: 64px; padding: 12px 32px; text-align: center;
}
.link-title { display: block; width: 100%; font-size: 16px; font-weight: 500; line-height: 19.2px; text-wrap: balance; overflow: hidden; text-overflow: ellipsis; }
.link-sub { display: flex; align-items: center; justify-content: center; width: 100%; font-size: 12px; line-height: 18px; font-weight: 400; }
.link-sub > span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pin { width: 18px; height: 18px; flex-shrink: 0; margin-left: -4px; transform: scale(.9); }
.link-dots {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 64px;
}
.link-dots:hover { background: rgba(0,0,0,.06); }

/* rodapé */
.foot { display: flex; justify-content: center; align-items: center; gap: 0; margin-top: 176px; font-size: 12px; line-height: 18px; }
.foot span { padding: 0 4px; }
.foot a:hover, .foot button:hover { text-decoration: underline; text-underline-offset: 2px; }

/* QR "View on mobile" (só desktop) */
.qr { display: none; position: fixed; right: 47px; bottom: 32px; text-align: center; }
.qr p { margin: 0 0 4px; font-size: 14px; font-weight: 500; line-height: 21px; }
.qr img { width: 120px; height: 120px; mix-blend-mode: multiply; }
@media (min-width: 1024px) { .qr { display: block; } }

/* botão flutuante "Message" (aparece ao rolar) */
.float-msg {
  position: fixed; left: 50%; bottom: 24px; z-index: 6; display: flex; align-items: center; gap: 16px;
  padding: 8px 12px; border-radius: 9999px; background: color-mix(in srgb, #d0d1d4 80%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 8px 32px rgba(0,0,0,.1);
  transform: translate(-50%, 120px); opacity: 0; transition: transform .35s ease, opacity .35s ease; pointer-events: none;
}
.float-msg.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.float-msg img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.float-msg span { font-size: 14px; font-weight: 500; line-height: 20px; }

/* modais */
.modal { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; }
.modal[hidden] { display: none; }
.modal-bg { position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.sheet { position: relative; width: min(580px, 100%); max-height: 92vh; overflow: auto; background: #fff; border-radius: 24px; }
@media (max-width: 639px) { .modal { align-items: flex-end; } .sheet { border-radius: 24px 24px 0 0; } }
.sheet-head { padding: 14px 20px 8px; text-align: center; }
.map-frame { display: block; width: 100%; height: 440px; border: 0; background: #e5e3df; }
.sheet-actions { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; }
.btn-dark { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 9999px; background: #000; color: #fff; font-size: 14px; font-weight: 600; }
.round-group { display: flex; gap: 8px; }
.round { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.08); }
.sheet-share { padding: 20px; max-width: 420px; }
.share-head { display: flex; justify-content: space-between; align-items: center; font-size: 18px; font-weight: 600; line-height: 24px; gap: 12px; }
.share-url { margin: 14px 0; padding: 12px 14px; border-radius: 12px; background: #f3f3f1; font-size: 13px; line-height: 18px; word-break: break-all; }
.share-opt { display: block; width: 100%; padding: 14px; margin-top: 8px; border-radius: 12px; background: #f3f3f1; font-size: 15px; font-weight: 500; line-height: 20px; text-align: left; }
.share-opt:hover { background: #e9e9e6; }

/* consentimento */
.consent {
  position: fixed; z-index: 30; left: 16px; bottom: 16px; width: min(318px, calc(100% - 32px));
  background: #fff; border-radius: 24px; padding: 24px 20px 16px; box-shadow: 0 8px 40px rgba(0,0,0,.18);
  font-size: 12px; line-height: 16px;
}
.consent[hidden] { display: none; }
.consent h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; line-height: 20px; }
.consent p { margin: 0 0 16px; }
.consent a { text-decoration: underline; }
.consent-btn { display: block; width: 100%; height: 34px; margin-top: 12px; border-radius: 9999px; border: 1px solid #000; font-size: 12px; }
.consent-custom label { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
@media (max-width: 639px) { .consent { left: 0; bottom: 0; width: 100%; border-radius: 24px 24px 0 0; } }

/* ajustes de desktop/celular iguais ao original */
@media (min-width: 640px) { .profile { padding-top: 36px; } }
@media (max-width: 639px) { .link-title { font-size: 14px; line-height: 16.8px; } }
.link-maps .link-sub { padding: 0 12px; }
