/* Zsombori család – nyilvános oldal
   Világos, hűvös pasztell: zsálya, tengerüveg, égkék. */

:root {
  --paper: #f3f8f7;
  --surface: #ffffff;
  --ink: #1e3a38;
  --ink-2: #4d6966;
  --line: #d4e4e0;
  --accent: #2a6e68;
  --accent-ink: #ffffff;
  --blue: #3b7aa0;
  --sage: #d6ecdd;
  --mint: #cae9e1;
  --glass: #cfe5ef;
  --sky: #dbe7f6;
  --danger: #a23b3b;

  --gen0-fill: #e3f1e4; --gen0-line: #78ad86;
  --gen1-fill: #dcf0e9; --gen1-line: #62a998;
  --gen2-fill: #dbedf3; --gen2-line: #5f9fb6;
  --gen3-fill: #e1e9f7; --gen3-line: #7497c6;
  --gen4-fill: #e7f0ea; --gen4-line: #8aae8f;

  --serif: "Palatino Linotype", "Book Antiqua", Palatino, "URW Palladio L", P052, "TeX Gyre Pagella", Georgia, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", Ubuntu, Roboto, system-ui, sans-serif;

  --wrap: 72rem;
  --radius-s: 6px;
  --radius-m: 14px;
  --shadow: 0 1px 2px rgba(30, 58, 56, .06), 0 8px 24px rgba(30, 58, 56, .08);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 3px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.005em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: .5rem 1rem; z-index: 50; }
.skip:focus { left: 1rem; }

.muted { color: var(--ink-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 2.6rem; padding: .45rem 1.1rem;
  border: 1px solid var(--accent); border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font: 600 .95rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
}
.btn:hover { background: #235d58; color: #fff; }
.btn--quiet { background: transparent; color: var(--accent); }
.btn--quiet:hover { background: var(--mint); color: var(--ink); }

/* ---------- Fejléc ---------- */
.site-head { border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .6); }
.site-head__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 4.5rem; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; }
.brand__mark svg { display: block; }
.brand__mark circle { fill: var(--mint); stroke: var(--accent); stroke-width: 1.6; }
.brand__mark path { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; }
.brand__name { font-family: var(--serif); font-size: 1.35rem; }

.site-nav { display: flex; gap: .25rem; }
.site-nav a {
  padding: .4rem .9rem; border-radius: 999px; color: var(--ink-2); text-decoration: none;
}
.site-nav a:hover { background: var(--mint); color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--sage); color: var(--ink); }

/* ---------- Nyitó ---------- */
.intro { padding: clamp(2rem, 6vw, 4.5rem) 0 1.75rem; }
.intro h1 { max-width: 18ch; }
.intro__text { max-width: 38rem; color: var(--ink-2); font-size: 1.125rem; }

.prose { max-width: 40rem; }
.prose h2 { margin-top: 1.4em; }
.prose h3 { margin-top: 1.2em; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose blockquote {
  margin: 1.4em 0; padding: .2em 0 .2em 1.2em;
  border-left: 3px solid var(--mint);
  font-family: var(--serif); font-size: 1.15em; color: var(--ink-2);
}
.prose p:last-child { margin-bottom: 0; }

/* ---------- Családi létszám ---------- */
.family-stats { margin: .4rem 0 1.4rem; }
.family-stats:empty { display: none; }
.family-stats__list {
  display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 .8rem; padding: 0; list-style: none;
}
.family-stats__list li {
  display: flex; flex-direction: column; min-width: 7.5rem;
  padding: .7rem 1rem .6rem; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line);
}
.family-stats__list li:nth-child(1) { border-top: 3px solid var(--gen1-line); }
.family-stats__list li:nth-child(2) { border-top: 3px solid var(--gen2-line); }
.family-stats__list li:nth-child(3) { border-top: 3px solid var(--gen3-line); }
.family-stats__list li:nth-child(4) { border-top: 3px solid var(--gen4-line); }
.family-stats__list li:nth-child(5) { border-top: 3px solid var(--gen0-line); }
.family-stats__list strong { font: 400 2.1rem/1.05 var(--serif); color: var(--ink); font-variant-numeric: lining-nums; }
.family-stats__list span { font-size: .9rem; color: var(--ink-2); }
.family-stats__note { margin: 0; max-width: 42rem; color: var(--ink-2); font-size: .98rem; }
.family-stats__note b { color: var(--ink); font-weight: 600; }

/* ---------- Családfa ---------- */
.tree-section { padding-bottom: 3rem; }

.tree-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .75rem; margin-bottom: .9rem;
}

.tree-search { position: relative; flex: 1 1 16rem; max-width: 24rem; }
.tree-search input {
  width: 100%; min-height: 2.7rem; padding: .5rem 1rem .5rem 2.5rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font: inherit; color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%234d6966' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m12.5 12.5 4 4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: .9rem 50%;
}
.tree-search input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--mint); }
.tree-search__results {
  position: absolute; z-index: 20; top: calc(100% + .35rem); left: 0; right: 0;
  margin: 0; padding: .35rem; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m);
  box-shadow: var(--shadow); max-height: 20rem; overflow: auto;
}
.tree-search__results li {
  padding: .5rem .75rem; border-radius: var(--radius-s); cursor: pointer; line-height: 1.3;
}
.tree-search__results li small { display: block; color: var(--ink-2); }
.tree-search__results li[aria-selected="true"], .tree-search__results li:hover { background: var(--mint); }
.tree-search__results .empty { cursor: default; color: var(--ink-2); }
.tree-search__results .empty:hover { background: none; }

.tree-tools { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.tree-tools button {
  min-height: 2.4rem; min-width: 2.4rem; padding: .3rem .85rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font: 500 .9rem var(--sans); color: var(--ink); cursor: pointer;
}
.tree-tools button:hover { border-color: var(--accent); background: var(--mint); }
.tree-tools__zoom { display: inline-flex; gap: .25rem; margin-left: .4rem; }
.tree-tools__zoom button { padding: .3rem .6rem; font-size: 1rem; }

.tree-stage {
  position: relative;
  height: clamp(460px, 74vh, 860px);
  margin-inline: clamp(0rem, 2vw, 1.25rem);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background-color: #f8fbfb;
  background-image: radial-gradient(circle, #d9e8e5 1px, transparent 1.2px);
  background-size: 22px 22px;
}

.tree { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.tree.is-dragging { cursor: grabbing; }

.tree-hint {
  position: absolute; left: 1rem; bottom: .6rem; margin: 0;
  font-size: .82rem; color: var(--ink-2);
  background: rgba(248, 251, 251, .85); padding: .15rem .5rem; border-radius: 6px;
  pointer-events: none;
}

.tree-empty { display: grid; place-content: center; justify-items: center; height: 100%; text-align: center; padding: 2rem; }

/* nemzedék-sávok */
.band rect { fill: rgba(255, 255, 255, .55); }
.band:nth-child(even) rect { fill: rgba(214, 236, 221, .28); }
.band text { font: 500 13px var(--sans); fill: var(--ink-2); }

.links path { fill: none; stroke: #a9c9c2; stroke-width: 1.6; }
.links path.is-nonblood { stroke-dasharray: 5 4; }
.node.is-nonblood .card { stroke-dasharray: 5 3; }
.links path.is-path { stroke: var(--accent); stroke-width: 2.4; }

.node { cursor: pointer; }
.node:focus { outline: none; }
.node .card { stroke-width: 1.2; transition: stroke-width .15s; }
.node:hover .card { stroke-width: 2; }
.node:focus-visible .card { stroke: var(--blue); stroke-width: 3; }
.node.is-selected .card { stroke: var(--accent); stroke-width: 2.6; filter: drop-shadow(0 4px 10px rgba(42, 110, 104, .22)); }
.node .name { font: 16px var(--serif); fill: var(--ink); }
.node .meta { font: 12.5px var(--sans); fill: var(--ink-2); }
.node .initials { font: 600 14px var(--sans); text-anchor: middle; dominant-baseline: central; fill: var(--ink); }
.node .avatar-bg { stroke-width: 1.2; }
.node .avatar-img { pointer-events: none; }
.node.is-deceased .name { fill: #34504d; }
.node .mourn { fill: none; stroke: var(--ink-2); stroke-width: 1.2; }

.gen-0 .card, .gen-0 .avatar-bg { fill: var(--gen0-fill); stroke: var(--gen0-line); }
.gen-1 .card, .gen-1 .avatar-bg { fill: var(--gen1-fill); stroke: var(--gen1-line); }
.gen-2 .card, .gen-2 .avatar-bg { fill: var(--gen2-fill); stroke: var(--gen2-line); }
.gen-3 .card, .gen-3 .avatar-bg { fill: var(--gen3-fill); stroke: var(--gen3-line); }
.gen-4 .card, .gen-4 .avatar-bg { fill: var(--gen4-fill); stroke: var(--gen4-line); }
.node .avatar-bg { fill: #fff; }

.toggle { cursor: pointer; }
.toggle circle { fill: var(--surface); stroke: var(--accent); stroke-width: 1.4; }
.toggle text { font: 600 10.5px var(--sans); fill: var(--accent); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.toggle:hover circle { fill: var(--mint); }
.toggle:focus { outline: none; }
.toggle:focus-visible circle { stroke: var(--blue); stroke-width: 3; }
.toggle.is-open circle { fill: var(--accent); }
.toggle.is-open text { fill: #fff; }

/* ---------- Személy panel ---------- */
.person-panel {
  position: absolute; top: .75rem; right: .75rem; bottom: .75rem;
  width: min(390px, calc(100% - 1.5rem));
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: auto; overscroll-behavior: contain;
  animation: panel-in .22s ease-out;
}
.person-panel[hidden] { display: none; }
@keyframes panel-in { from { opacity: 0; transform: translateX(14px); } }

.person-panel__close {
  position: sticky; top: .5rem; float: right; margin: .5rem .5rem 0 0; z-index: 2;
  width: 2.3rem; height: 2.3rem; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .92);
  font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--ink);
}
.person-panel__close:hover { background: var(--mint); }

.person-panel__body { padding: 1.25rem 1.4rem 1.6rem; }
.pp-gen { font-size: .85rem; color: var(--ink-2); margin: 0 0 .2rem; }
.pp-name { font-size: 1.9rem; margin: 0 0 .15rem; padding-right: 2rem; }
.pp-birthname { color: var(--ink-2); margin: 0 0 .8rem; }
.pp-facts { display: grid; grid-template-columns: auto 1fr; gap: .3rem .9rem; margin: .8rem 0 1rem; font-size: .96rem; }
.pp-facts dt { color: var(--ink-2); }
.pp-facts dd { margin: 0; }
.pp-bio { font-size: .98rem; margin: 1rem 0; }
.pp-section { margin-top: 1.3rem; }
.pp-section h3 { font-size: 1.05rem; margin: 0 0 .5rem; font-family: var(--sans); font-weight: 600; }
.pp-people { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.pp-people button {
  border: 1px solid var(--line); background: var(--paper); border-radius: 999px;
  padding: .3rem .75rem; font: inherit; font-size: .9rem; color: var(--ink); cursor: pointer;
}
.pp-people button:hover { background: var(--mint); border-color: var(--accent); }
.pp-edit { margin-top: 1.4rem; font-size: .9rem; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .5rem; margin: 1.5rem 0; }
.person-panel .gallery { grid-template-columns: repeat(3, 1fr); margin: 0; }
.gallery__item { display: block; border-radius: 8px; overflow: hidden; background: var(--sage); aspect-ratio: 1; border: 0; padding: 0; cursor: zoom-in; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.gallery__item:hover img { transform: scale(1.04); }
.article .gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); max-width: 48rem; }

/* ---------- Hírek ---------- */
.latest { padding: 1rem 0 4rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-head h2 { margin: 0; }

.post-list { display: grid; gap: 0; max-width: 52rem; }
.post-item {
  display: grid; grid-template-columns: 1fr; gap: 1rem;
  padding: 1.4rem 0; border-top: 1px solid var(--line);
}
.post-item:has(.post-item__img) { grid-template-columns: 9.5rem 1fr; }
.post-item__img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.post-item time { font-size: .88rem; color: var(--ink-2); }
.post-item h2, .post-item h3 { margin: .1rem 0 .35rem; font-size: 1.45rem; }
.post-item h2 a, .post-item h3 a { color: var(--ink); text-decoration: none; }
.post-item h2 a:hover, .post-item h3 a:hover { color: var(--accent); text-decoration: underline; }
.post-item p { margin: 0; color: var(--ink-2); }
.post-list--compact { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 0 2rem; max-width: none; }
.post-list--compact .post-item:has(.post-item__img) { grid-template-columns: 5.5rem 1fr; }
.post-list--compact h3 { font-size: 1.2rem; }

.page { padding: clamp(2rem, 5vw, 3.5rem) 0 4rem; }
.back { margin-bottom: 1.5rem; font-size: .95rem; }
.back a::before { content: "‹ "; }
.article__head { max-width: 44rem; margin-bottom: 1.5rem; }
.article__head time { color: var(--ink-2); }
.article__head h1 { margin-top: .2rem; }
.article__cover { margin: 0 0 2rem; max-width: 56rem; }
.article__cover img { border-radius: 16px; width: 100%; cursor: zoom-in; }
.article__cover figcaption { font-size: .9rem; color: var(--ink-2); margin-top: .5rem; }
.article .prose { font-size: 1.1rem; line-height: 1.7; }
.badge { display: inline-block; padding: .1rem .6rem; border-radius: 999px; background: var(--sky); font-size: .85rem; }
.edit-link { margin-top: 2rem; }

.pager { display: flex; gap: 1.25rem; align-items: center; margin-top: 2rem; }

/* ---------- Lábléc ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 1.5rem 0; font-size: .92rem; color: var(--ink-2); }
.site-foot__inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.site-foot p { margin: 0; }
.site-foot a { color: var(--ink-2); }

/* ---------- Képnézegető ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: grid; grid-template-columns: 3.5rem 1fr 3.5rem; align-items: center;
  background: rgba(21, 42, 40, .92);
}
.lightbox[hidden] { display: none; }
.lightbox__figure { margin: 0; display: grid; justify-items: center; gap: .75rem; max-height: 100vh; padding: 1rem 0; }
.lightbox__figure img { max-width: 100%; max-height: calc(100vh - 6rem); object-fit: contain; border-radius: 6px; }
.lightbox__figure figcaption { color: #e3f1ee; text-align: center; max-width: 40rem; }
.lightbox button {
  border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer;
  width: 2.8rem; height: 2.8rem; border-radius: 50%; font-size: 1.8rem; line-height: 1;
  justify-self: center;
}
.lightbox button:hover { background: rgba(255, 255, 255, .25); }
.lightbox__close { position: absolute; top: .75rem; right: .75rem; }

/* ---------- Mobil ---------- */
@media (max-width: 720px) {
  body { font-size: 1rem; }
  .tree-stage { height: 72vh; border-radius: 16px; margin-inline: .5rem; }
  .tree-tools__zoom { margin-left: 0; }
  .person-panel {
    top: auto; left: 0; right: 0; bottom: 0; width: 100%;
    max-height: 78%; border-radius: 18px 18px 0 0;
    animation-name: sheet-in;
  }
  @keyframes sheet-in { from { opacity: 0; transform: translateY(24px); } }
  .post-item:has(.post-item__img) { grid-template-columns: 5.5rem 1fr; }
  .post-item h2 { font-size: 1.25rem; }
  .lightbox { grid-template-columns: 2.8rem 1fr 2.8rem; }
  .tree-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Képek a panelen, szerkesztő mód ---------- */
.tree-empty { position: absolute; inset: 0; z-index: 1; background: #f8fbfb; }
.tree-empty[hidden] { display: none; }

.family-mark rect { fill: rgba(255, 255, 255, .8); stroke: var(--ink-2); stroke-width: 1; }
.family-mark circle { fill: var(--ink-2); }
.family-mark path { fill: none; stroke: var(--ink-2); stroke-width: 1; stroke-linejoin: round; }

.pp-slot { margin: 0 0 1rem; }
.pp-figure { margin: 0; }
.pp-figure figcaption { font-size: .88rem; color: var(--ink-2); margin-top: .4rem; }
.pp-photo-btn { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 12px; }
.pp-portrait { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--sage); }
.pp-family { width: 100%; max-height: 17rem; object-fit: cover; border-radius: 12px; background: var(--glass); }
.pp-slot--portrait { margin-top: -.25rem; }

.pp-drop {
  display: grid; place-items: center; width: 100%; min-height: 6.5rem;
  border: 2px dashed #b5d3cc; border-radius: 12px; background: #f6fbfa;
  color: var(--accent); font: 600 .95rem var(--sans); cursor: pointer;
}
.pp-slot--portrait .pp-drop { min-height: 8rem; }
.pp-drop:hover { background: var(--mint); border-color: var(--accent); }

.pp-caption-edit { display: flex; gap: .4rem; margin-top: .5rem; }
.pp-caption-edit input {
  flex: 1; min-width: 0; padding: .35rem .6rem; border: 1px solid #c5d9d4; border-radius: 8px;
  font: inherit; font-size: .88rem; color: var(--ink);
}
.pp-tools { display: flex; flex-wrap: wrap; gap: .2rem .9rem; margin-top: .4rem; font-size: .85rem; }

.pp-btn {
  min-height: 2.3rem; padding: .3rem .95rem; border-radius: 999px;
  border: 1px solid var(--accent); background: var(--accent); color: #fff;
  font: 600 .88rem var(--sans); cursor: pointer;
}
.pp-btn:hover { background: #235d58; }
.pp-btn:disabled { opacity: .6; cursor: progress; }
.pp-btn--quiet { background: transparent; color: var(--accent); }
.pp-btn--quiet:hover { background: var(--mint); }
.pp-btn--small { min-height: 2rem; padding: .2rem .7rem; font-size: .82rem; }
.pp-link { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; text-underline-offset: .15em; cursor: pointer; }
.pp-link--danger { color: var(--danger); }

.pp-admin {
  display: flex; flex-wrap: wrap; gap: .4rem;
  margin: 1rem 0 .25rem; padding: .75rem; border-radius: 12px; background: #f0f7f5; border: 1px solid var(--line);
}
.pp-foot { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1.6rem; padding-top: .9rem; border-top: 1px solid var(--line); font-size: .9rem; }

.pp-family-section h3 { margin-bottom: .6rem; }
.pp-small { font-size: .88rem; color: var(--ink-2); margin: 0 0 .6rem; }
.pp-sub { font-size: .92rem; font-weight: 600; margin: .9rem 0 .45rem; }

.pp-thumb { position: relative; }
.pp-thumb__tools {
  position: absolute; left: 3px; right: 3px; bottom: 3px;
  display: flex; gap: 2px; justify-content: space-between;
  opacity: 0; transition: opacity .15s;
}
.pp-thumb:hover .pp-thumb__tools, .pp-thumb:focus-within .pp-thumb__tools { opacity: 1; }
@media (hover: none) { .pp-thumb__tools { opacity: 1; } }
.pp-chip {
  border: 0; border-radius: 5px; padding: .1rem .3rem; background: rgba(255, 255, 255, .92);
  font: 600 .68rem var(--sans); color: var(--ink); cursor: pointer;
}
.pp-chip:hover { background: var(--mint); }
.pp-chip--danger { color: var(--danger); }
.person-panel .pp-section > .pp-btn { margin-top: .6rem; }

.pp-status { margin: 0 2.5rem .8rem 0; padding: .5rem .75rem; border-radius: 8px; font-size: .9rem; background: var(--paper); }
.pp-status.is-ok { background: #e6f4ec; }
.pp-status.is-error { background: #fbeceb; color: #6f2320; }
.pp-status.is-busy { background: var(--sky); }
.person-panel.is-busy { cursor: progress; }
.person-panel.is-busy .pp-btn, .person-panel.is-busy .pp-chip, .person-panel.is-busy .pp-drop { pointer-events: none; opacity: .6; }

.pp-form label { display: block; margin-bottom: .75rem; font-size: .88rem; font-weight: 600; }
.pp-form label small { font-weight: 400; color: var(--ink-2); }
.pp-form input, .pp-form select, .pp-form textarea {
  display: block; width: 100%; margin-top: .25rem; padding: .45rem .65rem;
  border: 1px solid #c5d9d4; border-radius: 8px; background: #fbfdfd;
  font: 400 .95rem/1.4 var(--sans); color: var(--ink);
}
.pp-form textarea { resize: vertical; }
.pp-form input:focus, .pp-form select:focus, .pp-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--mint); }
.pp-form__actions {
  position: sticky; bottom: -1.6rem; display: flex; gap: .5rem;
  padding: .7rem 0 1rem; background: linear-gradient(transparent, #fff 35%);
}

.admin-strip { background: #e3f1ec; border-bottom: 1px solid var(--line); font-size: .9rem; }
.admin-strip__inner { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; align-items: center; min-height: 2.4rem; }
.admin-strip form { margin: 0; }
.admin-strip button { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.admin-strip span { color: var(--ink-2); margin-right: auto; }

/* ---------- Elhunytak ---------- */
.node.is-deceased .card { fill: #eef1f0; stroke: #9aa7a4; }
.node.is-deceased .avatar-bg { fill: #f4f5f4; stroke: #6f7c79; stroke-width: 1.6; }
.node.is-deceased .avatar-img { filter: grayscale(.9) contrast(.95); }
.node.is-deceased .name { fill: #3f4f4d; }
.node.is-deceased .meta { fill: #66736f; }
.node .cross { font: 15px var(--serif); fill: #55625f; text-anchor: middle; }
.node.is-deceased.is-selected .card { stroke: #4f5d5a; }

.person-panel.is-memorial { border-top: 4px solid #8b9794; }
.person-panel.is-memorial .pp-portrait,
.person-panel.is-memorial .pp-slot--portrait img { filter: grayscale(.75); }
.pp-cross { font-size: .8em; color: #5d6a67; }
.pp-memorial {
  display: flex; flex-direction: column; gap: .15rem;
  margin: .2rem 0 1rem; padding: .65rem .9rem;
  border-left: 2px solid #9aa7a4; background: #f3f5f4; border-radius: 0 8px 8px 0;
}
.pp-memorial__years { font: 1.15rem var(--serif); color: var(--ink); letter-spacing: .02em; }
.pp-memorial__text { font: italic 1rem var(--serif); color: #56635f; }
.pp-check { display: flex !important; align-items: center; gap: .45rem; font-weight: 600; }
.pp-check input { width: auto !important; margin: 0 !important; }
.pp-check small { font-weight: 400; color: var(--ink-2); }

/* ---------- Házastársak, őspár ---------- */
.node .spouse { font: italic 13px var(--serif); fill: #4a6663; }
.node.is-root .card--root { fill: #e2f1e8; stroke: var(--accent); stroke-width: 1.8; }
.node.is-root .card-inner { fill: none; stroke: #9fcab7; stroke-width: 1; }
.node.is-root .root-label { font: 600 10.5px var(--sans); letter-spacing: .22em; fill: var(--accent); text-anchor: middle; }
.node.is-root .name--root { font: 17px var(--serif); fill: var(--ink); }
.node.is-root .root-and { font: italic 13px var(--serif); fill: var(--ink-2); }
.node.is-root .avatar-bg { fill: #fff; stroke: var(--accent); stroke-width: 1.6; }
.node.is-root:hover .card--root { stroke-width: 2.4; }
.node.is-root.is-selected .card--root { stroke-width: 3; }
.node.is-root.is-deceased .card--root { fill: #eaefed; stroke: #6f8a85; }
.node.is-root.is-deceased .card-inner { stroke: #b9c4c1; }

.pp-gen--root { letter-spacing: .08em; text-transform: uppercase; font-size: .75rem; font-weight: 600; color: var(--accent); }
.pp-name--couple { display: flex; flex-direction: column; line-height: 1.12; }
.pp-and { font-style: italic; font-size: .55em; color: var(--ink-2); margin: .1rem 0; }
.pp-name__second { display: block; }
.pp-name--couple .pp-cross { display: none; }
.pp-name__years { display: block; font-size: .5em; color: var(--ink-2); margin-top: .15rem; letter-spacing: .02em; }
