/* Template Normal: foto besar, tombol simpan, daftar kontak berikon. */
:root {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --ink: #18242A;
  --muted: #66757B;
  --line: #E1E7EA;
  --accent: #B03A52;
  --avatar-bg: #DCEBEA;
  --font-main: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1517; --surface: #172024; --ink: #E5ECEE; --muted: #97A6AB; --line: #263338;
    --accent: #E28A9C; --avatar-bg: #1F3336;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.5;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 16px calc(28px + env(safe-area-inset-bottom, 0px));
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* --brand diisi inline dari warna aksen pilihan pengguna; turunannya dihitung di elemen yang sama. */
.page {
  --brand: #B03A52;
  --brand-fg: var(--brand);
  --brand-tint: color-mix(in srgb, var(--brand) 7%, var(--surface));
  max-width: 420px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px;
}
@media (prefers-color-scheme: dark) {
  .page {
    --brand-fg: color-mix(in srgb, var(--brand) 45%, white);
    --brand-tint: color-mix(in srgb, var(--brand) 14%, var(--surface));
  }
}

.hero { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 8px; }
.photo {
  width: 150px; height: 150px; border-radius: 50%; overflow: hidden;
  background: var(--avatar-bg); color: var(--ink);
  display: grid; place-items: center; font-weight: 700; font-size: 52px; letter-spacing: -.01em;
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.hero h1 { margin: 14px 0 0; font-size: clamp(24px, 7vw, 28px); font-weight: 700; letter-spacing: -.01em; line-height: 1.2; text-wrap: balance; }
.hero .role { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.hero .company { margin: 2px 0 0; color: var(--ink); font-weight: 600; font-size: 15px; }
.hero .bio { margin: 10px 0 0; color: var(--muted); max-width: 36ch; font-size: 14.5px; }
.save {
  margin-top: 18px; width: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 14px 16px; border-radius: 12px; background: var(--brand); color: #FFFFFF; font-weight: 600; font-size: 16px;
}
.save:hover { filter: brightness(1.08); }
.divider { width: 100%; margin: 22px 0 0; border: 0; border-top: 1px solid var(--line); }

/* Kontak, sosial media, Bagikan dan QR: gaya yang sama dengan template Kartu ID. */
.section-label { margin: 0 0 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.details { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.details li + li { border-top: 1px solid var(--line); }
.details a { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; }
.details a:hover { background: var(--brand-tint); }
.details svg.i { color: var(--muted); }
.details svg.go { width: 18px; height: 18px; }
.details a:hover svg.go { color: var(--brand-fg); }
.details .k { display: block; font-size: 12px; color: var(--muted); }
.details .v { display: block; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }

/* Tampilan kaca (latar bergambar): warna teks putih di semua mode, panel buram transparan. */
.backdrop { position: fixed; inset: 0; z-index: -1; }
body:has(.backdrop) { background: #111; }
.page.glass {
  --ink: #FFFFFF; --muted: rgba(255, 255, 255, .78); --line: rgba(255, 255, 255, .22);
  --brand-tint: rgba(255, 255, 255, .12); --brand-fg: #FFFFFF;
  color: var(--ink); padding: 22px 16px 18px; border-radius: 24px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(22px) saturate(1.2); backdrop-filter: blur(22px) saturate(1.2);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .45);
}
.glass .photo { background: rgba(255, 255, 255, .22); border: 3px solid rgba(255, 255, 255, .5); }
.glass .save { background: #FFFFFF; color: #18242A; }
.glass .details { background: rgba(255, 255, 255, .1); }

.brand-foot { text-align: center; font-size: 12.5px; padding-top: 4px; }
.brand-foot a { color: var(--muted); font-weight: 600; text-decoration: none; }
.brand-foot a:hover { color: var(--brand-fg); }

/* Baris kosong di pratinjau dashboard (tanda "-"). */
.details .row { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; }
.details .empty .v { color: var(--muted); }

/* Tampil di dalam iframe (pratinjau dashboard, contoh di beranda): tanpa scrollbar. */
html.embed { scrollbar-width: none; }
html.embed::-webkit-scrollbar { display: none; }
