/* Event Face Gallery — guest styles (wedding stationery look, mobile-first)
   رنگ اصلی از تنظیمات افزونه می‌آید: --efg-accent */

@font-face { font-family: "EFG Vazirmatn"; font-weight: 400; font-display: swap; src: url(../fonts/vazirmatn-arabic-400-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "EFG Vazirmatn"; font-weight: 500; font-display: swap; src: url(../fonts/vazirmatn-arabic-500-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "EFG Vazirmatn"; font-weight: 700; font-display: swap; src: url(../fonts/vazirmatn-arabic-700-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "EFG Vazirmatn"; font-weight: 400; font-display: swap; src: url(../fonts/vazirmatn-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "EFG Vazirmatn"; font-weight: 700; font-display: swap; src: url(../fonts/vazirmatn-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "EFG Nastaliq"; font-weight: 400; font-display: swap; src: url(../fonts/noto-nastaliq-urdu-arabic-400-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }

.efg-app {
  --efg-accent: #a3786a;
  --efg-accent-ink: #7c5548;
  --efg-accent-soft: #f3ebe7;
  --efg-ink: #3a2e35;
  --efg-muted: #85767d;
  --efg-paper: #fbf7f5;
  --efg-line: #eadfdb;
  --efg-ok: #4c8a6a;
  --efg-danger: #b3261e;
  --efg-body: inherit;
  --efg-display: inherit;
  direction: rtl;
  color: var(--efg-ink);
  background: var(--efg-paper);
  font-family: var(--efg-body);
  font-size: 16px;
  line-height: 1.85;
  -webkit-text-size-adjust: 100%;
}
@supports (color: color-mix(in srgb, red 50%, white)) {
  .efg-app, .efg-lb {
    --efg-accent-ink: color-mix(in srgb, var(--efg-accent) 78%, #000);
    --efg-accent-soft: color-mix(in srgb, var(--efg-accent) 11%, #fff);
  }
}
.efg-bf-vazir { --efg-body: "EFG Vazirmatn", Tahoma, sans-serif; }
.efg-hf-vazir { --efg-display: "EFG Vazirmatn", Tahoma, sans-serif; }
.efg-hf-nastaliq { --efg-display: "EFG Nastaliq", "EFG Vazirmatn", serif; }

.efg-app *, .efg-lb * { box-sizing: border-box; }
.efg-app :focus-visible, .efg-lb :focus-visible { outline: 2px solid var(--efg-accent); outline-offset: 3px; }

/* تمام‌صفحه */
body.efg-fullscreen { margin: 0; background: #fbf7f5; }
body.efg-fullscreen .efg-app { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
body.efg-fullscreen .efg-main { flex: 1; }

/* ---------- سربرگ برند ---------- */
.efg-brand {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 20px 14px;
  border-bottom: 1px solid var(--efg-line);
  background: #fff;
}
.efg-brand-logo { display: block; max-height: 44px; max-width: 160px; width: auto; height: auto; }
.efg-brand-text { display: flex; flex-direction: column; line-height: 1.5; text-align: start; }
.efg-brand-text strong { font-size: 15px; font-weight: 700; color: var(--efg-ink); }
.efg-brand-text span { font-size: 12.5px; color: var(--efg-muted); }

/* ---------- بدنه ---------- */
.efg-main { padding: 22px 16px 40px; }
.efg-screen { max-width: 480px; margin: 0 auto; animation: efg-in .35s ease-out; }
.efg-screen.efg-gallery { max-width: 1120px; }
@keyframes efg-in { from { opacity: 0; transform: translateY(6px); } }

.efg-card {
  padding: 30px 22px 24px;
  border: 1px solid var(--efg-line);
  border-radius: 24px;
  background: #fff;
  text-align: center;
}
.efg-card-flat { margin-top: 8px; }
.efg-mark {
  width: 72px; height: 48px; margin: 0 auto 14px;
  color: var(--efg-accent);
}
.efg-mark svg { width: 100%; height: 100%; }
.efg-mark.is-warn { color: var(--efg-danger); width: 48px; }
.efg-h { margin: 0 0 6px; font-size: 21px; font-weight: 700; line-height: 1.6; color: var(--efg-ink); }
.efg-sub { margin: 0 0 20px; font-size: 14.5px; color: var(--efg-muted); }
.efg-wait { margin: 16px 0 4px; }

/* طاق (کاور) — عنصر شاخص طراحی */
.efg-hero { text-align: center; }
.efg-arch {
  position: relative;
  width: min(74vw, 300px);
  aspect-ratio: 4 / 5;
  margin: 12px auto 22px;
}
.efg-arch::before {
  content: ""; position: absolute; inset: -9px;
  border: 1px solid var(--efg-accent);
  border-radius: 999px 999px 26px 26px;
  opacity: .55;
  pointer-events: none;
}
.efg-arch img, .efg-arch-empty {
  display: block; width: 100%; height: 100%;
  border-radius: 999px 999px 18px 18px;
  object-fit: cover;
}
.efg-arch-empty { display: grid; place-items: center; background: var(--efg-accent-soft); color: var(--efg-accent); }
.efg-arch-empty svg { width: 42%; }
.efg-arch-sm { width: min(40vw, 170px); margin-bottom: 16px; }

.efg-names {
  margin: 0;
  font-family: var(--efg-display);
  font-size: clamp(30px, 8.4vw, 46px);
  font-weight: 400;
  line-height: 2.05;
  color: var(--efg-ink);
}
.efg-hf-vazir .efg-names, .efg-hf-theme .efg-names { font-weight: 700; line-height: 1.5; font-size: clamp(26px, 7vw, 38px); }
.efg-sprig { display: block; width: 150px; height: 16px; margin: 2px auto 8px; color: var(--efg-accent); }
.efg-date { margin: 0; font-size: 15px; color: var(--efg-muted); }
.efg-welcome { max-width: 34ch; margin: 12px auto 18px; font-size: 15.5px; color: var(--efg-ink); }
.efg-days {
  display: inline-block; margin: 12px 0 0; padding: 3px 14px;
  border-radius: 99px; background: var(--efg-accent-soft);
  font-size: 13px; color: var(--efg-accent-ink);
}

/* فرم‌ها */
.efg-form { display: flex; flex-direction: column; gap: 12px; }
.efg-code-in {
  width: 100%; height: 60px; padding: 0 12px;
  border: 1.5px solid var(--efg-line); border-radius: 16px;
  background: var(--efg-paper); color: var(--efg-ink);
  font: 700 22px/1 "EFG Vazirmatn", ui-monospace, Menlo, monospace;
  letter-spacing: .3em; text-align: center;
  transition: border-color .2s, background .2s;
}
.efg-code-in::placeholder { color: #cbbfc2; letter-spacing: .2em; }
.efg-code-in:focus, .efg-lbl input:focus { outline: none; border-color: var(--efg-accent); background: #fff; }
.efg-fields { display: grid; gap: 12px; margin: 0 0 16px; text-align: start; }
.efg-lbl { display: grid; gap: 4px; font-size: 13.5px; color: var(--efg-muted); }
.efg-lbl input {
  width: 100%; height: 50px; padding: 0 14px;
  border: 1.5px solid var(--efg-line); border-radius: 14px;
  background: var(--efg-paper); color: var(--efg-ink);
  font: inherit; font-size: 16px;
}

.efg-btn {
  position: relative; width: 100%; min-height: 54px; padding: 0 24px;
  border: 0; border-radius: 16px;
  background: var(--efg-accent-ink); color: #fff;
  font: inherit; font-size: 16px; font-weight: 700;
  cursor: pointer;
  transition: opacity .2s, transform .12s;
  -webkit-tap-highlight-color: transparent;
}
.efg-btn:active { transform: scale(.985); }
.efg-btn:disabled { opacity: .35; cursor: not-allowed; }
.efg-btn.is-busy { color: transparent; }
.efg-btn.is-busy::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%;
  animation: efg-rot .8s linear infinite;
}
.efg-btn-sm { width: auto; min-height: 44px; font-size: 14px; flex-shrink: 0; }
.efg-link {
  margin-top: 12px; padding: 8px 10px;
  border: 0; background: none;
  color: var(--efg-muted); font: inherit; font-size: 14px;
  text-decoration: underline; text-underline-offset: 5px;
  cursor: pointer;
}
.efg-err { min-height: 1.4em; margin: 10px 0 0; font-size: 14px; color: var(--efg-danger); }
.efg-err:empty { margin: 0; }
.efg-check { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 15px; cursor: pointer; }
.efg-check input { width: 22px; height: 22px; margin: 0; accent-color: var(--efg-accent-ink); }

/* ---------- دوربین ---------- */
.efg-camwrap { text-align: center; }
.efg-cam {
  position: relative;
  width: min(100%, 44vh, 360px);
  aspect-ratio: 3 / 4;
  margin: 4px auto 18px;
  border-radius: 999px 999px 28px 28px;
  overflow: hidden;
  background: #2a2227;
  box-shadow: 0 0 0 1px var(--efg-line), 0 0 0 9px var(--efg-paper), 0 0 0 10px var(--efg-accent);
}
.efg-cam video { width: 100%; height: 100%; object-fit: cover; display: block; transform: scaleX(-1); }
.efg-cam-guide {
  position: absolute; inset: 16% 18% 12%;
  border: 2px dashed rgba(255,255,255,.75);
  border-radius: 50%;
  box-shadow: 0 0 0 100vmax rgba(42, 34, 39, .45);
  transition: border-color .3s;
}
.efg-cam.is-done .efg-cam-guide { border-style: solid; border-color: #9fe0bb; }
.efg-cue {
  position: absolute; z-index: 2;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.92); color: var(--efg-accent-ink);
}
.efg-cue svg { width: 30px; height: 30px; }
.efg-cue.is-left { top: 44%; left: 6%; animation: efg-nudge-l 1.1s ease-in-out infinite; }
.efg-cue.is-right { top: 44%; right: 6%; animation: efg-nudge-r 1.1s ease-in-out infinite; }
@keyframes efg-nudge-l { 50% { transform: translateX(-6px); } }
@keyframes efg-nudge-r { 50% { transform: translateX(6px); } }
@keyframes efg-pulse { 50% { transform: scale(.88); } }
.efg-cam-load { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: #2a2227; transition: opacity .4s; }
.efg-cam.is-live .efg-cam-load { opacity: 0; pointer-events: none; }

.efg-dots { display: flex; justify-content: center; gap: 8px; margin: 0 0 10px; padding: 0; list-style: none; }
.efg-dots li { width: 28px; height: 4px; border-radius: 4px; background: var(--efg-line); transition: background .3s; }
.efg-dots li.is-active { background: var(--efg-accent); }
.efg-dots li.is-done { background: var(--efg-ok); }
.efg-hint { min-height: 1.8em; margin: 0; font-size: 18px; font-weight: 700; }
.efg-tip { max-width: 32ch; margin: 8px auto 0; font-size: 13.5px; color: var(--efg-muted); }
.efg-tip:empty { display: none; }

.efg-spin {
  display: inline-block; width: 28px; height: 28px;
  border: 2.5px solid rgba(163,120,106,.25); border-top-color: #a3786a;
  border-radius: 50%;
  animation: efg-rot .8s linear infinite;
}
.efg-spin-lg { width: 40px; height: 40px; margin-top: 8px; }
.efg-boot { display: grid; place-items: center; min-height: 50vh; }
@keyframes efg-rot { to { transform: rotate(360deg); } }

/* ---------- گالری ---------- */
.efg-hero-sm { margin-bottom: 22px; }
.efg-tabs {
  position: sticky; top: 8px; z-index: 5;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  max-width: 440px; margin: 0 auto 18px; padding: 5px;
  border-radius: 18px;
  background: rgba(243, 235, 231, .92);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.efg-tabs button {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 10px;
  border: 0; border-radius: 14px; background: none;
  color: var(--efg-muted); font: inherit; font-size: 15px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.efg-tabs button[aria-selected="true"] { background: #fff; color: var(--efg-ink); font-weight: 700; box-shadow: 0 1px 2px rgba(58,46,53,.08); }
.efg-tabs b {
  min-width: 24px; padding: 0 7px;
  border-radius: 99px; background: var(--efg-accent-soft);
  font-size: 12.5px; font-weight: 700; line-height: 22px; color: var(--efg-accent-ink);
}

.efg-note {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  max-width: 640px; margin: 0 auto 18px; padding: 12px 16px;
  border: 1px solid var(--efg-line); border-radius: 16px; background: #fff;
}
.efg-note p { flex: 1 1 220px; margin: 0; font-size: 14px; color: var(--efg-muted); }

.efg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin: 0 -12px; }
.efg-item {
  position: relative; display: block; aspect-ratio: 1; padding: 0;
  border: 0; overflow: hidden; background: var(--efg-accent-soft);
  cursor: zoom-in; -webkit-tap-highlight-color: transparent;
}
.efg-item img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.efg-empty { grid-column: 1 / -1; padding: 48px 16px; text-align: center; color: var(--efg-muted); }
.efg-out { text-align: center; margin-top: 18px; }
@media (min-width: 700px) {
  .efg-main { padding: 36px 24px 56px; }
  .efg-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin: 0; }
  .efg-item { border-radius: 6px; }
}

/* ---------- پابرگ ---------- */
.efg-foot {
  padding: 28px 20px calc(28px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--efg-line);
  background: #fff;
  text-align: center;
}
.efg-foot-name { margin: 0 0 12px; font-size: 15px; font-weight: 700; }
.efg-contacts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 12px; }
.efg-contact {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 42px; padding: 0 14px;
  border: 1px solid var(--efg-line); border-radius: 99px;
  color: var(--efg-ink); font-size: 14px; text-decoration: none;
}
.efg-contact svg { width: 18px; height: 18px; color: var(--efg-accent-ink); }
.efg-contact:hover { border-color: var(--efg-accent); }
.efg-address { display: flex; align-items: flex-start; justify-content: center; gap: 6px; max-width: 40ch; margin: 0 auto 6px; font-size: 13.5px; color: var(--efg-muted); }
.efg-address svg { flex: none; width: 16px; height: 16px; margin-top: 4px; }
.efg-foot-note { margin: 6px 0 0; font-size: 13px; color: var(--efg-muted); }

/* ---------- نمایش بزرگ ---------- */
html.efg-lock, html.efg-lock body { overflow: hidden; }
.efg-lb {
  position: fixed; inset: 0; z-index: 999999;
  display: flex; flex-direction: column;
  background: #1f191d; color: #efe7ea;
  font-family: var(--efg-body, inherit);
  animation: efg-fade .18s ease-out;
}
.efg-lb.efg-bf-vazir { --efg-body: "EFG Vazirmatn", Tahoma, sans-serif; }
@keyframes efg-fade { from { opacity: 0; } }
.efg-lb-top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px;
  font-size: 14px;
}
.efg-lb-btn {
  flex: none; width: 46px; height: 46px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: rgba(255,255,255,.1); color: #fff;
  cursor: pointer; text-decoration: none;
}
.efg-lb-btn[hidden] { visibility: hidden; display: grid; }
.efg-lb-btn svg { width: 22px; height: 22px; }
.efg-lb-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 0 calc(16px + env(safe-area-inset-bottom, 0px)); }
.efg-lb-stage img {
  max-width: 100%; max-height: calc(100vh - 90px); max-height: calc(100dvh - 90px);
  object-fit: contain;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  transition: opacity .2s;
}
.efg-lb-stage .efg-spin { position: absolute; opacity: 0; }
.efg-lb.is-loading .efg-lb-stage img { opacity: .25; }
.efg-lb.is-loading .efg-lb-stage .efg-spin { opacity: 1; }
.efg-lb-prev, .efg-lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.efg-lb-prev { right: 16px; }
.efg-lb-next { left: 16px; }
@media (max-width: 700px) { .efg-lb-prev, .efg-lb-next { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .efg-screen, .efg-cue, .efg-lb { animation: none !important; }
  .efg-app *, .efg-lb * { transition: none !important; }
}

/* ================= v3: حساب، صفحه‌ی اصلی، اسکن QR، چیدمان هم‌تراز ================= */
.efg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.efg-btn svg { width: 22px; height: 22px; flex: none; }
.efg-btn + .efg-btn { margin-top: 10px; }
.efg-btn-ghost { background: #fff; color: var(--efg-accent-ink); box-shadow: inset 0 0 0 1.5px var(--efg-accent); }
.efg-btn-danger { background: var(--efg-danger); }
.efg-pill-note { margin: -6px 0 18px; padding: 8px 12px; border-radius: 12px; background: var(--efg-accent-soft); color: var(--efg-accent-ink); font-size: 13.5px; }
.efg-done { width: 52px; height: 52px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; background: #e4f2ea; color: var(--efg-ok); font-size: 24px; font-weight: 700; }
.efg-fields .efg-btn { margin-top: 6px; }
.efg-fields { margin-bottom: 0; }

.efg-home-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 4px 14px; }
.efg-home-head .efg-link { margin: 0; }
.efg-hello { margin: 0; font-size: 20px; font-weight: 700; }
.efg-email { margin: 0; font-size: 13.5px; color: var(--efg-muted); text-align: right; }
.efg-add .efg-h { font-size: 18px; margin-bottom: 14px; }
.efg-or { display: flex; align-items: center; gap: 12px; margin: 14px 0; color: var(--efg-muted); font-size: 13px; }
.efg-or::before, .efg-or::after { content: ""; flex: 1; height: 1px; background: var(--efg-line); }
.efg-inline { display: flex; gap: 8px; }
.efg-inline .efg-code-in { flex: 1; min-width: 0; height: 54px; font-size: 18px; letter-spacing: .18em; }
.efg-inline .efg-btn { width: auto; flex: none; min-height: 54px; margin: 0; }
.efg-section { margin: 26px 4px 12px; font-size: 16px; font-weight: 700; }
.efg-evs { display: grid; gap: 10px; }
.efg-ev {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px;
  border: 1px solid var(--efg-line); border-radius: 18px; background: #fff;
  font: inherit; color: inherit; text-align: right; cursor: pointer;
}
.efg-ev:disabled { opacity: .55; cursor: default; }
.efg-ev-img { flex: none; width: 58px; height: 72px; border-radius: 29px 29px 8px 8px; overflow: hidden; display: grid; place-items: center; background: var(--efg-accent-soft); color: var(--efg-accent); }
.efg-ev-img img { width: 100%; height: 100%; object-fit: cover; }
.efg-ev-img svg { width: 34px; }
.efg-ev-txt { display: grid; gap: 1px; min-width: 0; }
.efg-ev-txt b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.efg-ev-txt small { font-size: 13px; color: var(--efg-muted); }
.efg-ev-state { color: var(--efg-accent-ink) !important; }
.efg-evs .efg-empty { padding: 20px 8px; }

.efg-danger-zone { margin-top: 18px; text-align: right; }
.efg-danger-zone summary { cursor: pointer; color: var(--efg-danger); font-size: 14px; padding: 6px 0; }

.efg-back { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 6px; padding: 8px 4px; border: 0; background: none; font: inherit; font-size: 14px; color: var(--efg-muted); cursor: pointer; }
.efg-back svg { width: 18px; height: 18px; }

.efg-scan { border-radius: 24px; }
.efg-scan video { transform: none; }
.efg-scan-box { position: absolute; inset: 22% 14%; border-radius: 18px; box-shadow: 0 0 0 100vmax rgba(42, 34, 39, .45); outline: 3px solid rgba(255,255,255,.9); }
.efg-scan.is-done .efg-scan-box { outline-color: #9fe0bb; }

/* چیدمان هم‌تراز: ارتفاع ردیف‌ها یکسان، پهنای هر عکس به نسبت واقعی آن */
.efg-jgrid { --rowh: 118px; display: flex; flex-wrap: wrap; gap: 3px; margin: 0 -12px; }
.efg-jgrid::after { content: ""; flex-grow: 999999; }
.efg-jgrid .efg-item { flex-grow: calc(var(--r) * 100); flex-basis: calc(var(--r) * var(--rowh)); aspect-ratio: var(--r); border-radius: 0; }
.efg-jgrid .efg-empty { flex: 1 1 100%; }
@media (min-width: 700px) {
  .efg-jgrid { --rowh: 210px; gap: 6px; margin: 0; }
  .efg-jgrid .efg-item { border-radius: 6px; }
}

/* امضای سازنده */
.efg-credit {
  margin: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: #f4eeeb; color: var(--efg-muted);
  font-size: 12px; line-height: 1.9; text-align: center;
}
.efg-credit-links { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; margin-inline-start: 6px; }
.efg-credit a { color: var(--efg-accent-ink); text-decoration: none; }
.efg-foot { padding-bottom: 22px; }

/* ================= v4: پوسته‌ها، آلبوم، حریم خصوصی ================= */
.efg-app.efg-theme-classic { --efg-accent: #b08d57; --efg-ink: #1f1c1a; --efg-paper: #f6f4ef; --efg-line: #e2dbcd; --efg-muted: #776f64; }
.efg-app.efg-theme-sage    { --efg-accent: #6f8a6e; --efg-ink: #2c382d; --efg-paper: #f4f7f2; --efg-line: #dde5da; --efg-muted: #6a7769; }
.efg-app.efg-theme-navy    { --efg-accent: #3f5277; --efg-ink: #1f2a40; --efg-paper: #f3f5f9; --efg-line: #dbe1ec; --efg-muted: #677086; }
.efg-app.efg-theme-blush   { --efg-accent: #c07a86; --efg-ink: #43303a; --efg-paper: #fdf6f7; --efg-line: #f0dde1; --efg-muted: #8b747e; }
.efg-app.efg-theme-classic .efg-brand, .efg-app.efg-theme-classic .efg-foot { background: #1f1c1a; color: #efe9dd; border-color: #1f1c1a; }
.efg-app.efg-theme-classic .efg-brand-text strong, .efg-app.efg-theme-classic .efg-foot-name { color: #efe9dd; }
.efg-app.efg-theme-classic .efg-contact { color: #efe9dd; border-color: #4a443c; }
.efg-app.efg-theme-classic .efg-contact svg { color: var(--efg-accent); }

.efg-check a { color: var(--efg-accent-ink); }
.efg-privacy-text { margin: 0 0 18px; text-align: right; font-size: 14.5px; line-height: 2; color: var(--efg-ink); }



/* قلب انتخاب آلبوم */
.efg-item { cursor: zoom-in; }
.efg-heart {
  position: absolute; top: 6px; left: 6px;
  width: 34px; height: 34px; padding: 0;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: rgba(20, 16, 18, .35); color: #fff;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.efg-heart svg { width: 19px; height: 19px; }
.efg-heart.is-on { background: #fff; color: #d0455f; }
.efg-heart.is-on svg path { fill: currentColor; }
.efg-heart:disabled { cursor: default; }
.efg-album-bar {
  position: sticky; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 6;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  max-width: 620px; margin: 16px auto 0; padding: 10px 12px 10px 16px;
  border-radius: 18px; background: var(--efg-ink); color: #fff; font-size: 14px;
  box-shadow: 0 8px 24px -12px rgba(0,0,0,.5);
}
.efg-album-bar .efg-btn { background: #fff; color: var(--efg-ink); margin: 0; min-height: 40px; }
.efg-lb-actions { display: flex; gap: 8px; }
.efg-lb-heart.is-on { background: #fff; color: #d0455f; }
.efg-lb-heart.is-on svg path { fill: currentColor; }

/* ================= v5: تب‌های بیشتر، عکس مهمان، نصب اپ، ذخیره ================= */
.efg-tabs.is-many {
  display: flex; max-width: 100%; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
}
.efg-tabs.is-many::-webkit-scrollbar { display: none; }
.efg-tabs.is-many button { flex: 0 0 auto; padding: 0 14px; white-space: nowrap; scroll-snap-align: start; }
@media (min-width: 700px) { .efg-tabs.is-many { justify-content: center; width: fit-content; } }

.efg-upload {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 14px;
  max-width: 640px; margin: 0 auto 16px; padding: 14px 16px;
  border: 1.5px dashed var(--efg-accent); border-radius: 18px; background: #fff;
}
.efg-upload[hidden] { display: none; }
.efg-upload > div { flex: 1 1 220px; }
.efg-upload b { font-size: 15px; }
.efg-upload p { margin: 2px 0 0; font-size: 13px; color: var(--efg-muted); }
.efg-upload label.efg-btn { cursor: pointer; margin: 0; }
.efg-upload label.is-disabled { opacity: .4; pointer-events: none; }
.efg-upload .efg-upload-status { flex-basis: 100%; margin: 0; color: var(--efg-accent-ink); }
.efg-upload .efg-upload-status:empty { display: none; }

.efg-item.is-pending img { opacity: .55; }
.efg-badge-pending {
  position: absolute; bottom: 6px; right: 6px; padding: 1px 8px; border-radius: 99px;
  background: rgba(255,255,255,.92); color: var(--efg-ink); font-size: 11px;
}
.efg-del-own {
  position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; padding: 0;
  display: grid; place-items: center; border: 0; border-radius: 50%;
  background: rgba(20,16,18,.5); color: #fff; cursor: pointer;
}
.efg-del-own svg { width: 17px; height: 17px; }

.efg-install {
  position: relative; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 0 0 14px; padding: 14px 44px 14px 16px;
  border-radius: 18px; background: var(--efg-ink); color: #fff;
}
.efg-install > div { flex: 1 1 200px; }
.efg-install b { font-size: 15px; }
.efg-install p { margin: 2px 0 0; font-size: 13px; opacity: .85; }
.efg-install p svg { width: 16px; height: 16px; vertical-align: -3px; }
.efg-install .efg-btn { background: #fff; color: var(--efg-ink); margin: 0; }
.efg-install-x { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; padding: 0; border: 0; background: none; color: #fff; opacity: .7; cursor: pointer; }
.efg-install-x svg { width: 18px; height: 18px; }

/* وقتی ذخیره مجاز است: نگه داشتن انگشت روی عکس ← «Save to Photos» */
.efg-can-save img, .efg-lb.efg-can-save .efg-lb-stage img { -webkit-touch-callout: default; }

/* حالت اپ نصب‌شده روی آیفون: فاصله از ناچ */
@media (display-mode: standalone) {
  .efg-brand { padding-top: calc(18px + env(safe-area-inset-top, 0px)); }
}

.efg-tabs.is-cols { grid-template-columns: repeat(var(--n), 1fr); max-width: 560px; }
.efg-tabs.is-cols button { padding: 0 4px; font-size: 14px; gap: 5px; }
.efg-credit a, .efg-contact span[dir="ltr"] { unicode-bidi: isolate; white-space: nowrap; }

/* عناصر پنهان‌شده همیشه پنهان بمانند (دکمه‌ها display خودشان را دارند) */
.efg-app [hidden] { display: none !important; }
.efg-cue.is-up { top: 5%; left: 50%; margin-left: -28px; animation: efg-nudge-u 1.1s ease-in-out infinite; }
.efg-cue.is-down { bottom: 5%; left: 50%; margin-left: -28px; animation: efg-nudge-d 1.1s ease-in-out infinite; }
@keyframes efg-nudge-u { 50% { transform: translateY(-6px); } }
@keyframes efg-nudge-d { 50% { transform: translateY(6px); } }

/* v7: تأیید عکس مهمان‌ها توسط صاحبان مراسم */
.efg-mod { position: absolute; bottom: 6px; left: 6px; display: flex; gap: 6px; }
.efg-mod button { min-width: 36px; height: 36px; padding: 0 10px; border: 0; border-radius: 18px; font: inherit; font-size: 14px; font-weight: 700; color: #fff; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.efg-mod-ok { background: var(--efg-ok); }
.efg-mod-no { background: var(--efg-danger); }
.efg-mod-hide { background: rgba(20,16,18,.7); font-size: 12px !important; font-weight: 500 !important; }
.efg-owner-note { border-color: var(--efg-accent); }
