/* זוכרים – memorial pages platform */
:root {
  --bg: #e8eef5;
  --bg-soft: #f4f7fb;
  --card: #ffffff;
  --text: #2c3a4a;
  --text-muted: #5a6a7a;
  --accent: #f07828;
  --accent-hover: #d9661c;
  --blue: #6b8cce;
  --blue-dark: #4a6bb5;
  --blue-light: #c5d4ec;
  --nav-active: #5b7ec9;
  --shadow: 0 4px 24px rgba(44, 58, 74, 0.08);
  --radius: 16px;
  --font: "Heebo", "Assistant", "Segoe UI", Tahoma, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  direction: rtl;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-dark); text-decoration: none; }
a:hover { color: var(--accent); }

.container {
  width: min(1100px, 94%);
  margin-inline: auto;
}

/* Top bar */
.topbar {
  background: var(--card);
  border-bottom: 1px solid rgba(0,0,0,0.04);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}
.brand-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--bg);
  display: grid; place-items: center;
  font-size: 1.2rem;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: none;
  border-radius: 10px;
  padding: 0.55rem 1.1rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover { background: var(--accent-hover); color: #fff; }
.btn-ghost {
  background: var(--bg);
  color: var(--text);
}
.btn-ghost:hover { background: var(--blue-light); }
.btn-music {
  background: var(--bg);
  color: var(--text);
  min-width: 7.5rem;
}
.btn-music.is-on {
  background: #ffe8d6;
  color: var(--accent);
  box-shadow: 0 0 0 2px rgba(240,120,40,0.25);
}

/* Hero */
.hero {
  padding: 2rem 0 1.5rem;
}
.hero-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 2rem;
  padding: 1.75rem;
  align-items: center;
  overflow: hidden;
}
.hero-photo-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--bg);
}
.hero-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-photo-nav {
  position: absolute;
  inset-block: 0;
  width: 40px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.85);
  font-size: 1.6rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.hero-photo-nav.prev { inset-inline-start: 0; }
.hero-photo-nav.next { inset-inline-end: 0; }
.hero-photo-nav:hover { background: rgba(0,0,0,0.15); }
.hero-text { text-align: center; padding: 0.5rem 0.75rem; }
.hero-label {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}
.hero-name {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: #1e3a5f;
  margin-bottom: 1rem;
  line-height: 1.25;
}
.hero-tribute {
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.85;
  max-width: 36em;
  margin-inline: auto;
}

/* Candle */
.candle-section {
  padding: 0.5rem 0 1.5rem;
  text-align: center;
}
.candle-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.25rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  min-width: min(320px, 94%);
}
.candle-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
}
.candle-img {
  width: 110px;
  height: auto;
  transition: filter 0.4s, transform 0.3s;
  filter: grayscale(0.3) brightness(0.95);
}
.candle-btn.is-lit .candle-img {
  filter: none;
  animation: candleGlow 2.4s ease-in-out infinite;
}
@keyframes candleGlow {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(255,180,60,0.35)); transform: translateY(0); }
  50% { filter: drop-shadow(0 0 14px rgba(255,160,40,0.55)); transform: translateY(-2px); }
}
.candle-label {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.candle-btn.is-lit + .candle-label,
.candle-card .candle-label.is-lit {
  color: var(--accent);
}

/* Tabs nav */
.tabs-wrap {
  padding: 0.5rem 0 1.5rem;
  position: sticky;
  top: 58px;
  z-index: 90;
  background: linear-gradient(var(--bg) 70%, transparent);
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  background: var(--card);
  border-radius: 999px;
  padding: 0.55rem;
  box-shadow: var(--shadow);
}
.tab {
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  padding: 0.55rem 1.35rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.tab:hover { background: var(--bg); }
.tab.active {
  background: var(--nav-active);
  color: #fff;
}

/* Panels */
.panel {
  display: none;
  padding-bottom: 2.5rem;
  animation: fadeIn 0.35s ease;
}
.panel.active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.section-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.25rem;
}
.section-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #1e3a5f;
  margin-bottom: 0.35rem;
  text-align: center;
}
.section-sub {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-weight: 600;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.about-item {
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}
.about-item dt {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  font-weight: 600;
}
.about-item dd {
  font-weight: 700;
  color: var(--text);
  font-size: 1.02rem;
}
.about-summary {
  margin-top: 1.25rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.85;
  text-align: center;
  max-width: 42em;
  margin-inline: auto;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.85rem;
}
.gallery-item {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--bg);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}
.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Videos */
.videos-grid {
  display: grid;
  gap: 1.25rem;
}
.video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
  box-shadow: var(--shadow);
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-title {
  margin-top: 0.5rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}

/* Life story */
.story-body {
  color: var(--text-muted);
  font-size: 1.08rem;
  line-height: 1.9;
  max-width: 46em;
  margin-inline: auto;
}
.story-body p { margin-bottom: 1.15rem; }
.story-photo {
  margin: 1.5rem auto;
  border-radius: 12px;
  overflow: hidden;
  max-width: 520px;
  box-shadow: var(--shadow);
}
.story-photo img {
  width: 100%;
  height: auto;
  object-fit: cover;
}
.story-credit {
  margin-top: 1.75rem;
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Guestbook */
.guestbook-form {
  display: grid;
  gap: 0.75rem;
  max-width: 520px;
  margin: 0 auto 1.5rem;
}
.guestbook-form input,
.guestbook-form textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--blue-light);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--text);
  resize: vertical;
}
.guestbook-form input:focus,
.guestbook-form textarea:focus {
  outline: 2px solid var(--blue);
  border-color: transparent;
}
.guestbook-list {
  display: grid;
  gap: 0.85rem;
  max-width: 640px;
  margin-inline: auto;
}
.guestbook-entry {
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  border-inline-start: 3px solid var(--accent);
}
.guestbook-entry .gb-name {
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 0.25rem;
}
.guestbook-entry .gb-msg {
  color: var(--text-muted);
  white-space: pre-wrap;
}
.guestbook-entry .gb-date {
  font-size: 0.8rem;
  color: #8a9aaa;
  margin-top: 0.4rem;
}
.guestbook-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 1rem;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 45, 0.88);
  z-index: 1000;
  display: none;
  place-items: center;
  padding: 1rem;
}
.lightbox.open { display: grid; }
.lightbox img {
  max-width: min(920px, 96vw);
  max-height: 88vh;
  border-radius: 10px;
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  inset-inline-start: 1rem;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: none;
  width: 42px; height: 42px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
}

/* Hidden YT music player */
#yt-music-host {
  position: fixed;
  width: 1px; height: 1px;
  bottom: 0; left: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 2rem 1rem 2.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.site-footer a { font-weight: 600; }

/* Family hub */
.family-hero {
  text-align: center;
  padding: 2.5rem 0 1.5rem;
}
.family-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: #1e3a5f;
  margin-bottom: 0.5rem;
}
.family-hero p { color: var(--text-muted); max-width: 32em; margin-inline: auto; }
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.1rem;
  padding-bottom: 3rem;
}
.person-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  color: inherit;
}
.person-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(44,58,74,0.12);
  color: inherit;
}
.person-card .avatar {
  width: 110px; height: 110px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 0.85rem;
  background: var(--bg);
  border: 3px solid var(--blue-light);
}
.person-card .avatar.placeholder {
  display: grid; place-items: center;
  font-size: 2.4rem;
  color: var(--blue);
}
.person-card h2 {
  font-size: 1.15rem;
  color: #1e3a5f;
  margin-bottom: 0.25rem;
}
.person-card .rel {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.person-card .badge {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: #e8f0e4;
  color: #3d6b3a;
}
.person-card .badge.stub {
  background: #f0f0f0;
  color: #888;
}

/* Responsive */
@media (max-width: 760px) {
  .hero-card {
    grid-template-columns: 1fr;
    padding: 1.15rem;
    gap: 1.15rem;
  }
  .hero-photo-wrap { max-width: 320px; margin-inline: auto; width: 100%; order: -1; }
  .tabs {
    border-radius: 14px;
    justify-content: stretch;
  }
  .tab { flex: 1 1 40%; text-align: center; padding: 0.55rem 0.6rem; font-size: 0.9rem; }
  .tabs-wrap { top: 52px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .section-card { padding: 1.25rem 1rem; }
}

/* ---- Share form ---- */
.subsection-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e3a5f;
  margin: 1.5rem 0 0.75rem;
  text-align: center;
}
.empty-hint {
  text-align: center;
  color: var(--text-muted);
  padding: 0.75rem;
  font-size: 0.95rem;
}
.share-form {
  display: grid;
  gap: 0.9rem;
  max-width: 560px;
  margin: 0 auto;
}
.share-form .field {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--text);
  font-size: 0.92rem;
}
.share-form .field span { color: var(--text-muted); font-weight: 600; }
.share-form input:not([type]),
.share-form input[type="password"],
.share-form input[type="search"],
.share-form input[type="text"],
.share-form input[type="email"],
.share-form input[type="tel"],
.share-form input[type="url"],
.share-form input[type="file"],
.share-form textarea,
.share-form select {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  padding: 0.75rem 1rem;
  border: 1px solid var(--blue-light);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--text);
}
.share-form textarea { resize: vertical; }
.share-form input:focus,
.share-form textarea:focus {
  outline: 2px solid var(--blue);
  border-color: transparent;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.type-fieldset {
  border: 1px solid var(--blue-light);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  background: var(--bg-soft);
}
.type-fieldset legend {
  padding: 0 0.4rem;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.radio {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  cursor: pointer;
}
.share-note {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}
.share-status {
  text-align: center;
  font-weight: 600;
  min-height: 1.4em;
}
.share-status.is-ok { color: #2f8f55; }
.share-status.is-error { color: #c0392b; }
.community-stories {
  display: grid;
  gap: 0.85rem;
  max-width: 640px;
  margin-inline: auto;
}
.community-story {
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  border-inline-start: 3px solid var(--accent);
}
.community-story .gb-name {
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 0.35rem;
}
.community-story .gb-msg {
  color: var(--text-muted);
  white-space: pre-wrap;
  line-height: 1.75;
}
.hero-placeholder {
  width: 100%;
  height: 100%;
  min-height: 240px;
  display: grid;
  place-items: center;
  font-size: 4rem;
  background: var(--bg);
}

/* Admin */
.admin-wrap { max-width: 820px; margin: 2rem auto; padding: 0 1rem 3rem; }
.admin-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.admin-item {
  border: 1px solid var(--blue-light);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.85rem;
  background: var(--bg-soft);
}
.admin-item img {
  max-width: 220px;
  border-radius: 8px;
  margin-top: 0.5rem;
}
.admin-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; flex-wrap: wrap; }
.btn-ok { background: #2fbf71; color: #fff; }
.btn-ok:hover { background: #259a5a; color: #fff; }
.btn-bad { background: #ff5a5f; color: #fff; }
.btn-bad:hover { background: #e0454a; color: #fff; }

@media (max-width: 760px) {
  .field-row { grid-template-columns: 1fr; }
  .topbar-actions { flex-wrap: wrap; justify-content: flex-end; }
}

[hidden] { display: none !important; }

/* ===================== Platform additions ===================== */
.narrow { max-width: 760px; }
.narrow-card { max-width: 520px; margin: 2rem auto; }
main.container, main.narrow { padding-top: 1.25rem; padding-bottom: 2rem; }
.center-card { text-align: center; }
.loading-card { text-align: center; color: var(--text-muted); margin-top: 2rem; }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.9rem; }
.btn-big { width: 100%; padding: 0.9rem 1.2rem; font-size: 1.1rem; margin-top: 0.5rem; }
.btn[disabled] { opacity: 0.6; cursor: wait; }
.hint { color: var(--text-muted); font-size: 0.92rem; margin: 0.4rem 0; }
.linklike { background: none; border: 0; color: var(--blue-dark); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
.footer-links { font-size: 0.9rem; }
.footer-links a { font-weight: 500; }

/* Landing */
.landing-hero { text-align: center; max-width: 640px; margin: 3rem auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2.5rem 1.5rem; }
.landing-candle { font-size: 3rem; line-height: 1; margin-bottom: 0.5rem; }
.landing-hero h1 { font-size: 2.4rem; color: #1e3a5f; margin-bottom: 0.25rem; }
.landing-tagline { font-size: 1.15rem; color: var(--accent); font-weight: 600; margin-bottom: 1.25rem; }
.landing-text { color: var(--text-muted); margin-bottom: 0.9rem; }
.landing-actions { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; margin-top: 1.25rem; }

/* Forms */
.form-steps .section-card { margin-bottom: 1rem; }
.step-title { display: flex; align-items: center; gap: 0.5rem; }
.step-num { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--accent); color: #fff; font-size: 1rem; }
.share-form input[type=file] { padding: 0.5rem; background: var(--bg-soft); border-radius: 10px; border: 1px dashed var(--blue-light); width: 100%; }
.share-form input[type=checkbox] { width: 1.15rem; height: 1.15rem; accent-color: var(--accent); }
.pw-wrap { display: flex; gap: 0.4rem; align-items: center; }
.pw-wrap input { flex: 1; }
.slug-wrap { display: flex; align-items: center; gap: 0.25rem; background: var(--bg-soft); border-radius: 10px; padding-inline-start: 0.6rem; }
.slug-prefix { color: var(--text-muted); font-size: 0.9rem; white-space: nowrap; }
.slug-wrap input { flex: 1; min-width: 6rem; }
.terms-check { margin: 0.75rem 0; display: flex; gap: 0.5rem; align-items: flex-start; }
.done-link { font-size: 1.1rem; font-weight: 700; word-break: break-all; }
.thumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.4rem 0 0.8rem; }
.thumbs img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; }
.thumb { position: relative; display: inline-block; }
.thumb button { position: absolute; top: 4px; inset-inline-end: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,0.65); color: #fff; cursor: pointer; font-size: 0.85rem; }

/* Person page extras */
.hero-dates { color: var(--text-muted); font-weight: 600; margin-bottom: 0.5rem; }
.notice-hidden { background: #fff3cd; color: #7a5b00; border-radius: 10px; padding: 0.6rem 1rem; margin-top: 1rem; text-align: center; }
.report-line { text-align: center; margin: 1rem 0 0.5rem; font-size: 0.88rem; }
.report-line .linklike { color: var(--text-muted); }
.dialog { border: 0; border-radius: var(--radius); padding: 1.25rem; width: min(480px, 94vw); box-shadow: var(--shadow); }
.dialog::backdrop { background: rgba(0,0,0,0.45); }

/* Dashboards */
.family-block { border-top: 1px solid var(--bg); padding-top: 0.9rem; margin-top: 0.9rem; }
.person-list { list-style: none; margin: 0.5rem 0; }
.person-row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; padding: 0.6rem 0; border-bottom: 1px dashed var(--bg); }
.person-row-main { flex: 1; min-width: 12rem; }
.row-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.mini-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; background: var(--bg); }
.badge-warn, .badge-new { display: inline-block; font-size: 0.78rem; border-radius: 999px; padding: 0.05rem 0.55rem; margin-inline-start: 0.35rem; }
.badge-warn { background: #fde2e1; color: #a12622; }
.badge-new { background: #e1f5ea; color: #1d7a45; }
.pending-img { max-width: 240px; max-height: 240px; border-radius: 10px; margin: 0.5rem 0; }
.back-link { display: inline-block; margin: 0.25rem 0 0.75rem; font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.stat { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0.9rem; text-align: center; }
.stat b { display: block; font-size: 1.7rem; color: #1e3a5f; }
.stat span { color: var(--text-muted); font-size: 0.9rem; }
.filter-input { width: 100%; padding: 0.6rem 0.8rem; border-radius: 10px; border: 1px solid var(--blue-light); font: inherit; margin-bottom: 0.5rem; }

/* Legal drafts */
.legal-card { max-width: 760px; margin: 1.5rem auto; }
.draft-banner { background: #fff3cd; color: #7a5b00; border-radius: 10px; padding: 0.6rem 1rem; margin-bottom: 1rem; font-weight: 600; }
.legal-list { padding-inline-start: 1.25rem; margin: 0.75rem 0 1rem; }
.legal-list li { margin-bottom: 0.5rem; }

@media (max-width: 760px) {
  .topbar-actions .btn { padding: 0.4rem 0.7rem; font-size: 0.85rem; }
  .landing-hero h1 { font-size: 2rem; }
  .row-actions { width: 100%; }
}

/* mobile overflow fixes (long host names) */
.slug-wrap { flex-wrap: wrap; max-width: 100%; padding: 0.3rem 0.6rem; }
.slug-prefix { white-space: normal; overflow-wrap: anywhere; }
.share-form .field, .share-form .field > *, .section-card { min-width: 0; }
.hint, .done-link, .person-row-main, .section-sub { overflow-wrap: anywhere; }

/* ===================== Wizard v2 ===================== */
.wizard { padding-bottom: 6rem; }
.wizard-top { margin: 0.5rem 0 1rem; }
.wizard-title { font-size: 1.5rem; color: #1e3a5f; margin-bottom: 0.5rem; }
.progress { height: 10px; background: var(--card); border-radius: 999px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--blue-light); }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #f5a35f); transition: width .3s; border-radius: 999px; }
.progress-text { font-weight: 700; color: var(--text-muted); margin-top: 0.35rem; font-size: 0.95rem; }
.notice-draft { background: #e1f5ea; color: #1d6b40; border-radius: 10px; padding: 0.5rem 0.9rem; margin-top: 0.6rem; font-size: 0.92rem; }
.step-intro { color: var(--text-muted); margin: -0.25rem 0 1rem; }
.share-form small.ex { display: block; color: #8494a6; font-size: 0.82rem; font-weight: 400; margin-top: 0.15rem; }
.field-error { display: block; color: #c0392b; font-size: 0.85rem; font-weight: 600; }
.field-error:empty { display: none; }
input.is-invalid { outline: 2px solid #e57373 !important; }
.wizard-nav { position: sticky; bottom: 0; display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.75rem 0; background: linear-gradient(transparent, var(--bg) 30%); z-index: 50; }
.wizard-nav .btn { flex: 1; padding: 0.85rem 1rem; font-size: 1.05rem; }
#step-error { margin-top: 0.5rem; }
.date-block { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.file-btn { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.main-photo-pick { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.main-photo-preview { width: 120px; height: 120px; border-radius: 16px; background: var(--bg-soft); display: grid; place-items: center; overflow: hidden; border: 1px dashed var(--blue-light); font-size: 2rem; }
.main-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-list { display: grid; gap: 0.75rem; margin-top: 0.75rem; }
.photo-item { display: grid; grid-template-columns: 84px 1fr; grid-template-rows: auto auto; gap: 0.35rem 0.75rem; align-items: center; background: var(--bg-soft); border-radius: 12px; padding: 0.5rem; }
.photo-item img { grid-row: span 2; width: 84px; height: 84px; object-fit: cover; border-radius: 10px; }
.photo-item .photo-caption { width: 100%; }
.photo-tools { display: flex; gap: 0.35rem; }
.video-row { display: grid; grid-template-columns: 88px 1fr auto; gap: 0.6rem; align-items: start; background: var(--bg-soft); border-radius: 12px; padding: 0.5rem; margin-bottom: 0.6rem; }
.video-thumb { width: 88px; height: 50px; border-radius: 8px; background: #dfe6ef; display: grid; place-items: center; overflow: hidden; color: #8494a6; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-fields { display: grid; gap: 0.35rem; min-width: 0; }
.video-fields input { width: 100%; }
.chapter-row { border: 1px solid var(--blue-light); border-radius: 12px; padding: 0.75rem; margin-bottom: 0.75rem; display: grid; gap: 0.5rem; }
.chapter-head { display: flex; justify-content: space-between; align-items: center; }
.chapter-num { font-weight: 700; color: var(--accent); }
.chapter-title { font-size: 1.15rem; color: #1e3a5f; margin: 1.25rem 0 0.5rem; }
.preview-frame { border: 3px dashed var(--accent); border-radius: 18px; padding: 0.25rem 0 1rem; margin: 0 0 1rem; background: var(--bg); position: relative; overflow: hidden; }
.preview-label { background: var(--accent); color: #fff; font-weight: 700; text-align: center; padding: 0.2rem; font-size: 0.85rem; }
.preview-frame .container { width: 96%; }
.hero-maiden { color: var(--text-muted); font-size: 1.05rem; margin-top: -0.25rem; }
.hero-dates-heb { font-weight: 500; }
.hero-place { color: var(--text-muted); font-size: 0.95rem; }
.gallery-fig { margin: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.gallery-fig figcaption { font-size: 0.85rem; color: var(--text-muted); text-align: center; line-height: 1.4; }
@media (max-width: 480px) {
  .date-block { grid-template-columns: 1fr; gap: 0; }
  .video-row { grid-template-columns: 64px 1fr auto; }
  .video-thumb { width: 64px; height: 40px; }
}
.music-credit { text-align: center; font-size: 0.78rem; color: #8494a6; margin: 0.25rem auto 1rem; padding: 0 1rem; }
/* share buttons + toast */
.share-btns { display: inline-flex; flex-wrap: wrap; gap: 0.4rem; }
.btn-wa { background: #25d366; color: #fff; border: none; }
.btn-wa:hover { background: #1ebe5a; color: #fff; }
.z-toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(150%); background: #1e3a5f; color: #fff; padding: 0.6rem 1.4rem; border-radius: 999px; font-weight: 700; z-index: 9999; transition: transform .25s; pointer-events: none; }
.z-toast.show { transform: translateX(-50%) translateY(0); }
.invite-card { border: 2px solid var(--accent); }
.invite-card .invite-url { direction: ltr; text-align: right; font-size: 0.9rem; color: var(--text-muted); overflow-wrap: anywhere; margin: 0.25rem 0 0.75rem; }
.person-row .share-row { flex-basis: 100%; margin-top: 0.35rem; }
@media (max-width: 480px) { .share-btns .btn { flex: 1 1 auto; } .invite-card .share-btns { display: flex; } }
/* QR modal */
.qr-modal { position: fixed; inset: 0; background: rgba(15, 30, 50, .6); display: flex; align-items: center; justify-content: center; z-index: 9000; padding: 1rem; }
.qr-modal[hidden] { display: none; }
.qr-box { background: #fff; border-radius: 20px; padding: 1.25rem; width: min(440px, 100%); max-height: 100%; overflow: auto; position: relative; text-align: center; }
.qr-close { position: absolute; top: .5rem; left: .75rem; background: none; border: none; font-size: 2rem; line-height: 1; cursor: pointer; color: #6b7c93; }
.qr-img-wrap { background: #fff; border: 1px solid #e3e9f1; border-radius: 12px; padding: .5rem; }
.qr-img-wrap img { width: 100%; height: auto; display: block; }
.qr-url { overflow-wrap: anywhere; margin: .5rem 0 .25rem; }
.qr-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: .75rem; }
.qr-actions .btn { padding: .7rem .4rem; }
body.qr-open { overflow: hidden; }
@media print {
  body.qr-printing > *:not(.qr-modal) { display: none !important; }
  body.qr-printing .qr-modal { position: static; background: none; padding: 0; }
  body.qr-printing .qr-box { width: 100%; max-height: none; box-shadow: none; padding: 0; }
  body.qr-printing .qr-box > *:not(#qr-print) { display: none !important; }
  body.qr-printing .qr-img-wrap { border: none; }
  body.qr-printing .qr-img-wrap img { width: 12cm; margin: 0 auto; }
}
/* edit links */
.links-box { text-align: right; width: min(520px, 100%); }
.links-box .section-title { text-align: center; padding-inline: 1.5rem; }
.link-status { font-weight: 700; color: #6b7c93; margin: .5rem 0 .25rem; }
.link-status.is-on { color: #1d8a4a; }
.links-share .share-btns { display: flex; }
.links-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin: .75rem 0; }
.links-create { display: grid; gap: .5rem; margin-top: .5rem; }
.links-create select, .links-create input { width: 100%; padding: .6rem .75rem; border: 1px solid var(--blue-light); border-radius: 10px; font: inherit; background: #fff; }
.rev-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.rev-list li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; background: var(--bg-soft); border-radius: 10px; padding: .45rem .6rem; font-size: .9rem; }
.stub-form { display: grid; gap: .6rem; }
.stub-form input, .stub-form select { width: 100%; padding: .6rem .75rem; border: 1px solid var(--blue-light); border-radius: 10px; font: inherit; background: #fff; }
.links-box .invite-url { direction: ltr; text-align: left; font-size: .85rem; color: var(--text-muted); overflow-wrap: anywhere; word-break: break-all; background: var(--bg-soft); border-radius: 8px; padding: .4rem .6rem; margin: .5rem 0; }

/* e-mail confirmation flow */
.notice-ok { background: #eef7ee; border: 1px solid #b9dcb9; color: #245c24; border-radius: 10px; padding: .7rem .9rem; margin: .6rem 0; }
.confirm-wait { margin-top: 1rem; padding: 1rem; border: 2px solid var(--accent, #b08a4a); border-radius: 14px; background: #fffaf2; }
.confirm-wait h3 { margin: 0 0 .5rem; font-size: 1.15rem; }
.confirm-wait p { margin: .35rem 0; overflow-wrap: anywhere; }
.confirm-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }

/* ===================== Account login: chooser, page workspace, access admin ===================== */
.page-cards { display: grid; gap: 0.75rem; margin: 0.75rem 0 1rem; }
@media (min-width: 640px) { .page-cards { grid-template-columns: 1fr 1fr; } }
.page-card { display: flex; align-items: center; gap: 0.85rem; padding: 0.8rem; border-radius: 14px; background: var(--bg-soft);
  border: 1px solid var(--blue-light); color: var(--text); text-decoration: none; min-height: 92px; }
a.page-card:hover, a.page-card:focus-visible { border-color: var(--accent); background: #fff; color: var(--text); }
.page-card.is-off { opacity: 0.92; background: #f3f4f6; border-style: dashed; flex-wrap: wrap; }
.page-card.is-off .pc-photo { filter: grayscale(0.8); }
.pc-photo { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; flex: 0 0 68px; display: inline-grid; place-items: center; background: var(--bg); font-size: 1.8rem; }
.pc-body { display: flex; flex-direction: column; gap: 0.1rem; flex: 1; min-width: 0; }
.pc-name { font-size: 1.08rem; }
.pc-dates { color: var(--text-muted); font-size: 0.9rem; }
.pc-family { color: var(--text-muted); font-size: 0.82rem; }
.pc-badges { margin-top: 0.2rem; display: flex; gap: 0.3rem; flex-wrap: wrap; }
.pc-go { font-size: 1.6rem; color: var(--accent); }
.pc-req { width: 100%; display: flex; justify-content: flex-end; }
.badge-soft { display: inline-block; background: var(--blue-light); color: #1e3a5f; border-radius: 999px; padding: 0.05rem 0.55rem; font-size: 0.78rem; font-weight: 600; }
.count-badge { display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding: 0 0.35rem; border-radius: 999px; background: #ff5a5f; color: #fff; font-size: 0.8rem; font-weight: 700; margin-inline-start: 0.3rem; }
.page-head { display: flex; align-items: center; gap: 1rem; }
.page-head .section-title { margin: 0.1rem 0; }
.ph-photo { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex: 0 0 84px; display: inline-grid; place-items: center; background: var(--bg); font-size: 2rem; }
.page-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1rem 0 0.75rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.35rem; }
.chip { display: inline-flex; align-items: center; gap: 0.25rem; border-radius: 999px; padding: 0.1rem 0.55rem; font-size: 0.8rem; background: var(--bg); color: var(--text); }
.chip.is-active { background: #dff5e8; color: #1d6b40; }
.chip.is-expired, .chip.is-denied { background: #fde2e2; color: #8a2b2b; }
.chip.is-pending { background: #fff3cd; color: #7a5b00; }
.chip-x { border: 0; background: none; cursor: pointer; font-size: 1rem; line-height: 1; color: inherit; padding: 0 0.15rem; }
.check-list { max-height: 320px; overflow: auto; border: 1px solid var(--blue-light); border-radius: 10px; padding: 0.4rem 0.6rem; background: var(--bg-soft); margin-bottom: 0.75rem; }
.check-item { display: flex; gap: 0.5rem; align-items: flex-start; padding: 0.35rem 0; border-bottom: 1px solid var(--bg); }
.check-item input { width: 1.15rem; height: 1.15rem; accent-color: var(--accent); margin-top: 0.2rem; }
.assign-row { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: flex-end; }
.assign-row .field { flex: 1 1 200px; margin-bottom: 0.4rem; }
.assign-row select, .assign-row input { width: 100%; }
.fill-claim { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
#claim-result.is-error { background: #fde2e2; color: #8a2b2b; }
@media (max-width: 480px) {
  .topbar-actions .btn { padding: 0.4rem 0.7rem; font-size: 0.9rem; }
  .page-head { flex-direction: column; text-align: center; }
}
.assign-row select, .assign-row input[type=date], .assign-row input[type=email] { padding: 0.6rem 0.75rem; border-radius: 10px; border: 1px solid var(--blue-light); background: var(--bg-soft); font: inherit; color: var(--text); min-height: 2.6rem; }
