/* Roots page. Builds on weather.css (shell) and vault.css (buttons, dialogs, forms). */
.roots-page { --c-main: #b07d10; --c-bright: #ffd968; --c-dark: #6b4a00; --c-tint: #fff4cf; --leaf: #2f6b3a; }
.roots-main { align-items: start; }
.roots-panel { width: min(1100px, 100%); min-width: 0; }
.roots-hero { display: flex; gap: 22px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.roots-logo { width: clamp(150px, 22vw, 230px); height: auto; flex: none; filter: drop-shadow(0 6px 14px rgba(60, 40, 0, .25)); }
.roots-intro { flex: 1 1 320px; min-width: 0; }
.roots-intro h1 { margin: 0 0 6px; color: var(--c-dark); }
.roots-intro p { margin: 0 0 8px; }
.plus { display: inline-block; font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: #10263a; color: var(--c-bright); border-radius: 6px; padding: 2px 7px; vertical-align: middle; }
.roots-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: thin; }
.roots-page .tab[aria-selected="true"], .roots-page .subtab[aria-selected="true"] { background: var(--c-bright); border-color: var(--c-main); color: #1a1200; }
.roots-page .btn.primary { background: var(--c-bright); border-color: var(--c-main); color: #1a1200; }
.roots-page .btn:hover, .roots-page .tab:hover { border-color: var(--c-main); }
.subtabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; }
.subtab { flex: none; border: 1px solid var(--line); background: var(--glass-strong); color: var(--ink); border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 700; cursor: pointer; }
.view { min-width: 0; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 12px; margin-bottom: 12px; }
.box { background: var(--glass-strong); border: 1px solid var(--line); border-radius: 18px; padding: 14px 18px; margin-bottom: 12px; min-width: 0; }
.box h3 { margin: 0 0 8px; font-size: 1.05rem; color: var(--c-dark); }
.box.plus-box { border-style: dashed; border-color: var(--c-main); background: linear-gradient(135deg, var(--c-tint), #fff); }
.sec { margin: 18px 0 8px; font-size: 1.15rem; color: var(--c-dark); }
.sec small { color: var(--ink-soft); font-weight: 600; }
.sec-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.sec-head h2 { margin: 0; font-size: 1.25rem; color: var(--c-dark); }
.empty-note { color: var(--ink-soft); margin: 6px 0; }
.prompt { font-family: "Playfair Display", serif; font-size: 1.2rem; margin: 4px 0 10px; color: var(--c-dark); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 12px; }
.tile { background: var(--glass-strong); border: 1px solid var(--line); border-radius: 16px; padding: 12px; text-align: center; cursor: pointer; font: inherit; color: var(--ink); }
.tile strong { display: block; font-size: 1.6rem; color: var(--c-dark); }
.tile span { font-size: .8rem; color: var(--ink-soft); font-weight: 700; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { display: inline-block; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 11px; font: inherit; font-size: .82rem; font-weight: 700; color: var(--ink); cursor: pointer; margin: 2px 4px 2px 0; }
.chip:hover { border-color: var(--c-main); }
.chip.static { cursor: default; }
.list { display: grid; gap: 8px; }
.item { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; min-width: 0; }
.item h4 { margin: 0 0 2px; font-size: 1rem; }
.item small, .meta { color: var(--ink-soft); }
.item p { margin: 6px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.item .row { margin-top: 8px; }
/* pedigree */
.ped-wrap { overflow: auto; padding: 10px 2px 16px; }
.pn { display: flex; align-items: center; }
.pp { display: flex; flex-direction: column; justify-content: center; gap: 8px; margin-left: 26px; position: relative; }
.pp::before { content: ""; position: absolute; left: -14px; top: 18%; bottom: 18%; border-left: 2px solid var(--c-main); }
.pp > .pn { position: relative; }
.pp > .pn::before { content: ""; position: absolute; left: -14px; width: 14px; top: 50%; border-top: 2px solid var(--c-main); }
.pbox { min-width: 150px; max-width: 190px; background: #fff; border: 1px solid var(--c-main); border-radius: 12px; padding: 7px 10px; font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.pbox strong { display: block; font-size: .9rem; overflow-wrap: anywhere; }
.pbox small { color: var(--ink-soft); font-size: .75rem; }
.pbox.focus { background: var(--c-tint); border-width: 2px; }
.pbox.living { border-style: dashed; }
.pbox.ghost { border-style: dotted; border-color: var(--line); color: var(--ink-soft); }
/* gallery */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.mcard { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; min-width: 0; display: flex; flex-direction: column; }
.mcard .mm { aspect-ratio: 4 / 3; background: #10263a; display: grid; place-items: center; color: #fff; overflow: hidden; }
.mcard .mm img, .mcard .mm video { width: 100%; height: 100%; object-fit: cover; }
.mcard .mm audio { width: 92%; }
.mcard .mb { padding: 8px 10px; }
.mcard .mb strong { display: block; overflow-wrap: anywhere; font-size: .92rem; }
/* timeline */
.tl { position: relative; margin-left: 12px; padding-left: 18px; border-left: 3px solid var(--c-main); display: grid; gap: 10px; }
.tl .ev { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.tl .ev::before { content: ""; position: absolute; left: -28px; top: 14px; width: 14px; height: 14px; border-radius: 50%; background: var(--c-bright); border: 3px solid var(--c-main); }
.tl .ev.mine::before { background: var(--leaf); border-color: #1d4527; }
.tl .ev.ppl::before { background: #fff; border-color: var(--c-dark); }
.tl .yr { font-weight: 800; color: var(--c-dark); font-size: .85rem; }
.tl .tag { font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin-left: 6px; }
.ctx-note { font-size: .85rem; color: var(--ink-soft); }
.profile h2 { margin: 0; }
.profile .ph { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.profile .ph img { width: 84px; height: 84px; border-radius: 16px; object-fit: cover; border: 1px solid var(--c-main); background: var(--c-tint); }
.profile h3 { margin: 14px 0 4px; font-size: .95rem; color: var(--c-dark); }
.pending { display: grid; gap: 6px; margin-top: 8px; }
.pending .p { display: flex; gap: 8px; align-items: center; background: var(--c-tint); border-radius: 10px; padding: 6px 10px; font-size: .85rem; }
.rec-on { color: #b00020; font-weight: 800; }
.fld { margin: 10px 0; }
.fld > label, .fld > .lab { display: block; font-weight: 700; margin-bottom: 4px; }
.fld small { color: var(--ink-soft); }
input[type="url"], input[type="number"], input[type="file"] { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; background: #fff; font: inherit; color: var(--ink); }
select[multiple] { min-height: 96px; }
.roots-page .tl, .roots-page .ped-wrap { max-width: 100%; }
.site { margin-bottom: 10px; }
.site a { font-weight: 800; color: var(--c-dark); }
details.box > summary { cursor: pointer; font-weight: 800; color: var(--c-dark); }
@media print {
  .site-header, .roots-tabs, .roots-hero, .vault-footer, .btn, .toast { display: none !important; }
  .weather-page { background: #fff !important; }
}
