:root{--bg:#0d0d10;--gold:#c7984b;--gold-soft:#e4c089;--text:#f3eadb;--muted:#cabda7;--line:rgba(199,152,75,.35);--shadow:0 18px 40px rgba(0,0,0,.45)}*{box-sizing:border-box}body{margin:0;color:var(--text);background:linear-gradient(180deg,#08080a,#111114 40%,#0b0b0d);font-family:"Segoe UI",Arial,sans-serif}img{max-width:100%;display:block}a{text-decoration:none;color:inherit}.container{width:min(1200px,calc(100% - 40px));margin:auto}.narrow{width:min(1100px,calc(100% - 40px));margin:auto}.site-header{position:sticky;top:0;z-index:50;background:rgba(7,7,9,.86);backdrop-filter:blur(10px);border-bottom:1px solid rgba(255,255,255,.07)}.header-inner{width:min(1240px,calc(100% - 28px));margin:auto;min-height:82px;display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{display:flex;align-items:center;gap:12px;font-family:Georgia,serif;font-size:1.7rem;color:var(--gold-soft)}.brand img{width:48px;height:48px;object-fit:cover;border-radius:8px}.main-nav{display:flex;align-items:center;gap:16px}.main-nav a:hover,.active{color:var(--gold-soft)}.menu-toggle{display:none;background:none;border:1px solid var(--line);color:var(--text);padding:8px 12px;border-radius:10px}.section-bg{position:relative;background-size:cover;background-position:center}.overlay{position:absolute;inset:0;background:linear-gradient(90deg,rgba(8,8,10,.80),rgba(10,10,12,.45),rgba(10,10,12,.15))}.overlay-soft{background:linear-gradient(180deg,rgba(8,8,10,.38),rgba(8,8,10,.28))}.hero-section{min-height:84vh;display:flex;align-items:center}.hero-section.small{min-height:56vh}.hero-grid{position:relative;z-index:1;display:grid;grid-template-columns:1.1fr .9fr;align-items:center;padding:88px 0 72px}.hero-copy h1{font-family:Georgia,serif;font-size:clamp(3rem,6vw,5.8rem);color:#ffffff;letter-spacing:.04em;margin:0 0 18px}.hero-rule{display:flex;align-items:center;gap:18px;margin-bottom:30px;font-family:Georgia,serif;font-size:1.45rem}.hero-rule span{height:1px;width:90px;background:var(--line)}.btn{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:0 22px;border-radius:12px;border:1px solid transparent;font-weight:600;box-shadow:var(--shadow);cursor:pointer}.btn-primary{background:linear-gradient(180deg,#c79047,#99622a);border-color:#d2a564;color:#fff8ef}.btn-secondary{background:rgba(18,18,20,.7);border-color:rgba(228,192,137,.45);color:#fff}.btn-small{min-height:38px;padding:0 14px}.hero-actions,.center-actions{display:flex;gap:14px;flex-wrap:wrap}.center-actions{justify-content:center;margin-top:28px}.info-band{border-top:1px solid rgba(255,255,255,.06);border-bottom:1px solid rgba(255,255,255,.06);background:rgba(10,10,13,.72)}.highlights-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;padding:22px 0}.highlight-card{text-align:center;padding:14px 18px;border-left:1px solid rgba(255,255,255,.08)}.highlight-card:first-child{border-left:none}.highlight-card h3{font-family:Georgia,serif;color:var(--gold-soft);margin:0 0 8px}.highlight-card p{color:var(--muted);line-height:1.55;margin:0}.content-section,.feature-section{padding:72px 0}.alt-surface{background:rgba(255,255,255,.02)}.section-heading{display:flex;align-items:center;gap:20px;margin-bottom:28px}.section-heading.center{justify-content:center}.section-heading.left{justify-content:flex-start}.section-heading:before,.section-heading:after{content:"";height:1px;width:140px;background:linear-gradient(90deg,transparent,var(--line),transparent)}.section-heading.left:before{display:none}.section-heading h2{font-family:Georgia,serif;font-style:italic;color:var(--gold-soft);font-size:clamp(2rem,4vw,3rem);margin:0;font-weight:500}.feature-panel,.profile-panel,.contact-card,.contact-form-card,.admin-preview-card{position:relative;z-index:1;background:rgba(12,12,14,.48);border:1px solid rgba(228,192,137,.18);border-radius:18px;padding:28px;box-shadow:var(--shadow)}.feature-panel{max-width:560px}.feature-panel h3{font-family:Georgia,serif;color:var(--gold-soft);font-size:2rem;margin:0 0 10px}.meta{color:#f6dfb9}.dogs-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:20px}.life-grid{display:grid;gap:20px}.life-centered{max-width:960px;margin:0 auto;grid-template-columns:repeat(3,1fr)}.dog-card,.life-card,.wide-card{background:linear-gradient(180deg,rgba(27,27,32,.96),rgba(15,15,18,.96));border:1px solid rgba(228,192,137,.12);border-radius:16px;overflow:hidden;box-shadow:var(--shadow)}.memoriam-card{filter:saturate(.6)}.dog-image-wrap{aspect-ratio:1/1;overflow:hidden}.dog-image-wrap img,.life-card img{width:100%;height:100%;object-fit:cover}.dog-card-body,.life-card-body{padding:18px}.dog-card h3,.life-card h3{font-family:Georgia,serif;color:#f5ebdb;font-size:1.8rem;margin:0 0 8px}.dog-card p,.life-card p{color:var(--muted);line-height:1.55}.text-link{color:var(--gold-soft)}.life-card img{aspect-ratio:3/2}.gallery-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.gallery-grid.mini{grid-template-columns:repeat(2,1fr)}.gallery-grid.full{grid-template-columns:repeat(3,1fr)}.gallery-item{margin:0;overflow:hidden;border-radius:14px;border:1px solid rgba(255,255,255,.07);background:#121216}.gallery-item img{width:100%;height:100%;object-fit:cover;aspect-ratio:auto}.gallery-grid.compact .gallery-item:nth-child(2){grid-column:span 2}.page-hero{padding:86px 0 38px;background:radial-gradient(circle at top,rgba(199,152,75,.18),transparent 30%)}.page-hero h1{font-family:Georgia,serif;color:#ffffff;font-size:clamp(2.8rem,5vw,5rem);margin:0}.page-hero p{color:var(--muted)}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:28px;align-items:start}.profile-main{width:100%;border-radius:18px;box-shadow:var(--shadow)}.title-line{color:var(--gold-soft);font-size:1.15rem}dl{display:grid;grid-template-columns:160px 1fr;gap:8px 16px}dt{color:var(--gold-soft)}dd{margin:0}.pedigree-wide{display:grid;grid-template-columns:1fr 1.4fr 1.4fr;gap:18px;align-items:center}.ped-root{display:flex;align-items:center;justify-content:center}.ped-branch{display:grid;grid-template-columns:1fr 1.4fr;gap:14px;align-items:center;position:relative}.ped-branch:before{content:"";position:absolute;left:-15px;right:0;top:50%;height:1px;background:var(--line);z-index:0}.ped-parent,.ped-ancestors{position:relative;z-index:1}.ped-ancestors{display:grid;gap:10px}.ped-node{background:linear-gradient(180deg,rgba(25,25,30,.96),rgba(12,12,15,.96));border:1px solid var(--line);border-radius:16px;padding:14px;text-align:center;box-shadow:var(--shadow)}.ped-node small{display:block;color:var(--muted);font-size:.78rem}.ped-node strong{font-family:Georgia,serif;color:var(--gold-soft);font-size:.95rem}.main-node{min-height:160px}.parent-node{min-height:110px}.kennel-preview{white-space:pre-wrap;max-height:260px;overflow:auto;background:#09090b;padding:16px;border-radius:12px}.card-grid{display:grid;gap:22px}.wide-card{display:grid;grid-template-columns:380px 1fr;gap:24px;align-items:center;padding:0}.wide-card img{width:100%;height:100%;object-fit:cover;aspect-ratio:16/9}.wide-card div{padding:22px}.wide-card h2{font-family:Georgia,serif;color:var(--gold-soft)}.contact-section{padding:76px 0}.contact-grid{position:relative;z-index:1;display:grid;grid-template-columns:.95fr 1.05fr;gap:24px}.contact-list{list-style:none;padding:0}.contact-list li{padding:8px 0;border-top:1px solid rgba(255,255,255,.08)}label span{display:block;margin-bottom:6px;color:#f0dec5}input,textarea,select{width:100%;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.04);color:#fff;border-radius:12px;padding:14px 16px;font:inherit}textarea{resize:vertical}.site-footer{background:#09090b;border-top:1px solid rgba(255,255,255,.08)}.footer-inner{width:min(1200px,calc(100% - 40px));margin:auto;min-height:76px;display:flex;align-items:center;justify-content:space-between;color:#b9ad99}.admin-body{min-height:100vh;background:linear-gradient(180deg,#0a0a0d,#141419)}.admin-login-wrap,.admin-editor-wrap{width:min(1180px,calc(100% - 32px));margin:auto;padding:40px 0}.admin-login-card,.admin-help,.cms-form{max-width:1060px;background:rgba(14,14,18,.92);border:1px solid rgba(228,192,137,.18);border-radius:18px;padding:28px;box-shadow:var(--shadow);margin:auto}.cms-form{display:grid;gap:20px}.admin-topbar{display:flex;align-items:center;justify-content:space-between;gap:18px}.admin-grid,.admin-visual-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.admin-tile,.admin-row{background:rgba(14,14,18,.92);border:1px solid rgba(228,192,137,.18);border-radius:18px;padding:22px}.admin-row{display:grid;grid-template-columns:1fr auto auto;gap:12px;align-items:center}.dropzone{border:2px dashed var(--line);padding:45px;text-align:center;border-radius:18px}.dropzone.drag{border-color:var(--gold-soft);background:rgba(199,152,75,.12)}.preview{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0}.preview img,.image-radio img,.image-admin-row img{width:120px;height:90px;object-fit:cover;border-radius:8px}.image-radio,.image-admin-row{display:inline-flex;gap:8px;align-items:center;margin:5px}.ped-edit-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.success-box,.error-box{padding:14px;border-radius:12px;margin:14px 0}.success-box{background:rgba(47,108,58,.22)}.error-box{background:rgba(130,40,40,.22)}.subnav{display:flex;gap:12px;flex-wrap:wrap;margin-top:20px}.admin-floating-save{position:fixed;right:24px;bottom:24px;z-index:999}
@media(max-width:1100px){.dogs-grid,.life-centered,.gallery-grid,.gallery-grid.full{grid-template-columns:repeat(2,1fr)}.two-col,.contact-grid,.hero-grid,.wide-card,.pedigree-wide{grid-template-columns:1fr}.admin-grid,.admin-visual-grid{grid-template-columns:1fr}.admin-row{grid-template-columns:1fr}.ped-branch{grid-template-columns:1fr}.ped-branch:before{display:none}}@media(max-width:760px){.menu-toggle{display:block}.main-nav{display:none;position:absolute;right:14px;top:74px;flex-direction:column;align-items:flex-start;background:rgba(8,8,10,.97);border:1px solid rgba(255,255,255,.08);border-radius:14px;padding:16px;min-width:220px}.main-nav.open{display:flex}.highlights-grid,.dogs-grid,.life-centered,.gallery-grid,.gallery-grid.full{grid-template-columns:1fr}.section-heading:before,.section-heading:after{width:40px}.hero-rule{font-size:1.1rem}.footer-inner,.admin-topbar{flex-direction:column;align-items:flex-start}}
.dog-profile-grid{display:grid;grid-template-columns:minmax(280px,.85fr) minmax(0,1.15fr);gap:28px;align-items:start}.dog-thumbs{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:12px}.dog-thumbs img{aspect-ratio:1/1;object-fit:cover;border-radius:10px;border:1px solid rgba(228,192,137,.16)}.eyebrow{margin:0 0 10px;color:var(--gold-soft);text-transform:uppercase;font-size:.76rem;letter-spacing:.12em}.fact-grid{display:grid;gap:12px}.fact-grid.compact{grid-template-columns:repeat(2,minmax(0,1fr));margin:18px 0}.fact-grid div,.editor-facts label{background:rgba(255,255,255,.035);border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:14px}.fact-grid span,.inline-edit span,.health-box label span{display:block;color:var(--muted);font-size:.84rem;margin-bottom:6px}.fact-grid strong{display:block;color:#fff8ef;font-size:.98rem;line-height:1.35}.intro-text{color:var(--text);line-height:1.7;margin:18px 0}.health-box{margin-top:18px;padding-top:18px;border-top:1px solid rgba(228,192,137,.16)}.health-box h3{font-family:Georgia,serif;color:var(--gold-soft);font-size:1.35rem;margin:0 0 12px}.health-list{display:grid;gap:8px;padding-left:18px;color:var(--muted);line-height:1.5}.muted-text,.cache-note{color:var(--muted)}.profile-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:20px}.cache-note{font-size:.9rem}.pedigree-tree{overflow:auto;padding:10px 0 24px}.pedigree-tree ul{position:relative;display:flex;align-items:center;gap:30px;list-style:none;margin:0;padding:0 0 0 34px}.pedigree-tree>ul{padding-left:0;min-width:1120px}.pedigree-tree li{position:relative;display:flex;align-items:center;gap:30px}.pedigree-tree li:before{content:"";position:absolute;left:-30px;top:50%;width:30px;height:1px;background:var(--line)}.pedigree-tree>ul>li:before{display:none}.pedigree-tree li>ul:before{content:"";position:absolute;left:0;top:25%;bottom:25%;width:1px;background:var(--line)}.tree-card{display:block;padding:0;border:none;background:transparent;min-height:0;border-radius:0;box-shadow:none}.tree-card strong{color:#fff;font-size:inherit;line-height:1.3;font-family:Arial,sans-serif}.tree-card small{color:#aaa;font-size:.85em}.tree-role{display:none}.dog-editor-form{max-width:none;background:transparent;border:0;border-radius:0;padding:0;box-shadow:none;margin:0}.admin-actions{display:flex;gap:12px;flex-wrap:wrap}.admin-dog-hero{padding:48px 0 28px}.inline-edit{display:block;margin-bottom:14px}.hero-title-edit input{font-family:Georgia,serif;color:var(--gold-soft);font-size:clamp(2.4rem,5vw,4.6rem);padding:10px 0;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent}.hero-subtitle-edit input{max-width:280px}.admin-image-panel .profile-main{margin-bottom:16px}.image-admin-list{display:grid;gap:8px;margin-top:10px}.check-row{display:flex;align-items:center;gap:10px;margin:10px 0 18px;color:var(--muted)}.check-row input,.image-radio input,.admin-body input[type=checkbox],.admin-body input[type=radio]{width:auto}.admin-pedigree-section{margin-top:0}.center-note{text-align:center}.admin-body textarea{min-height:120px}@media(max-width:1100px){.dog-profile-grid{grid-template-columns:1fr}.pedigree-tree>ul{min-width:960px}}@media(max-width:760px){.fact-grid.compact{grid-template-columns:1fr}.admin-floating-save{right:16px;bottom:16px}.tree-card{width:170px}}
.pedigree-table-wrap{overflow-x:auto;padding:4px 0 8px;width:100%}.visual-admin-form{margin:0}.open-inline{display:flex}.admin-save-note{position:fixed;right:24px;top:96px;z-index:1000}.admin-edit-copy{position:relative;z-index:1}.admin-edit-copy label,.visual-admin-form label{display:block;margin-bottom:14px}.admin-lang-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:18px}.editor-dl dd input{padding:10px 12px}.admin-gallery-item{position:relative;min-height:120px}.admin-gallery-item .btn,.admin-gallery-item .image-radio{position:absolute;left:10px;bottom:10px;z-index:2;box-shadow:none}.admin-gallery-item .image-radio{bottom:54px;background:rgba(8,8,10,.82);border:1px solid rgba(255,255,255,.12);border-radius:10px;padding:8px 10px;color:var(--text)}.admin-dropzone{margin-top:18px}.visual-admin-form .gallery-item img{width:100%;height:100%;object-fit:cover;aspect-ratio:4/3}@media(max-width:760px){.admin-lang-pair{grid-template-columns:1fr}.pedigree-table{min-width:860px}.open-inline{display:flex;position:static;flex-direction:row;background:transparent;border:0;padding:0;min-width:0}}

/* ===== GALLERY THUMBNAILS — small square previews ===== */
.gallery-thumb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}
.gallery-thumb-item {
    margin: 0;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.08);
    cursor: pointer;
    background: rgba(255,255,255,.04);
    transition: transform .18s, box-shadow .18s, border-color .18s;
    display: block;
}
.gallery-thumb-item:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(0,0,0,.55);
    border-color: rgba(199,152,75,.5);
}
.gallery-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity .2s;
}
@media(max-width:600px){
    .gallery-thumb-grid { grid-template-columns: repeat(auto-fill, minmax(90px,1fr)); gap:5px; }
}

/* ===== LIGHTBOX ===== */
.lightbox-overlay {
    display: none;
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(3,3,5,.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    align-items: center;
    justify-content: center;
}
.lightbox-overlay.open { display: flex; }
.lb-stage {
    max-width: min(92vw, 1200px);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}
.lb-stage img {
    max-width: 100%;
    max-height: 84vh;
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(0,0,0,.85);
    object-fit: contain;
    display: block;
    transition: opacity .22s;
}
.lb-caption {
    color: rgba(255,255,255,.5);
    margin: 10px 0 0;
    font-size: .88rem;
    text-align: center;
}
.lb-close {
    position: fixed; top: 16px; right: 20px;
    background: rgba(16,16,20,.85);
    border: 1px solid rgba(228,192,137,.3);
    color: var(--gold-soft);
    border-radius: 50%; width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; cursor: pointer; z-index: 10001;
    transition: background .15s;
}
.lb-close:hover { background: rgba(199,152,75,.22); }
.lb-prev, .lb-next {
    position: fixed; top: 50%; transform: translateY(-50%);
    background: rgba(10,10,14,.75);
    border: 1px solid rgba(228,192,137,.28);
    color: var(--gold-soft);
    border-radius: 50%; width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; cursor: pointer; z-index: 10001;
    transition: background .15s; user-select: none;
    line-height: 1;
}
.lb-prev { left: 12px; padding-right: 3px; }
.lb-next { right: 12px; padding-left: 3px; }
.lb-prev:hover, .lb-next:hover { background: rgba(199,152,75,.2); }

/* ===== LITTER PAGE — panel overlapping hero ===== */
.litter-hero { min-height: 65vh; display: flex; align-items: flex-end; }
.litter-hero-inner {
    width: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: 0;
    position: relative;
    z-index: 1;
}
.litter-hero-panel {
    background: rgba(8,7,5,.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(199,152,75,.25);
    border-radius: 18px 18px 0 0;
    padding: 32px 36px 36px;
    max-width: 620px;
    position: relative;
    bottom: 0;
    margin-bottom: -2px;
}
.litter-hero-panel .eyebrow { color: var(--gold-soft); font-size: .85rem; letter-spacing: .08em; margin-bottom: 8px; }
.litter-hero-panel h1 { font-size: clamp(1.6rem,4vw,2.4rem); margin: 0 0 10px; color: #fff; }
.litter-summary { color: rgba(255,255,255,.75); margin-bottom: 16px; line-height: 1.6; }
.litter-parents { display: flex; gap: 24px; margin: 0; }
.litter-parents dt { color: var(--muted); font-size: .82rem; margin-bottom: 2px; }
.litter-parents dd { color: var(--gold-soft); font-family: Georgia,serif; margin: 0 0 0 0; }
.litter-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px,1fr));
    gap: 8px;
}
.litter-gallery-grid .gallery-thumb-item { border-radius: 8px; }

/* ===== DOG PAGE — compact layout ===== */
.dog-hero-compact { padding: 40px 0 28px; }
.dog-hero-compact h1 { margin-bottom: 4px; }
.in-memoriam-badge { color: var(--muted); font-style: italic; font-size: .95rem; }
.dog-profile-section { padding-top: 0; }
.dog-profile-grid-compact {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 32px;
    align-items: start;
}
@media(max-width:860px){ .dog-profile-grid-compact { grid-template-columns: 1fr; } }
.dog-img-col {}
.dog-img-col .profile-main { border-radius: 14px; width: 100%; height: auto; display: block; }
.dog-thumbs { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.dog-thumb {
    width: 62px; height: 62px; object-fit: cover;
    border-radius: 7px; cursor: pointer;
    border: 2px solid transparent !important;
    opacity: .6; transition: opacity .18s, border-color .18s;
}
.dog-thumb:hover { opacity: 1; border-color: rgba(228,192,137,.5) !important; }
.active-thumb { opacity: 1 !important; border-color: var(--gold-soft) !important; }
.dog-facts-col { padding: 0; }
.dog-official-name { font-size: clamp(1.1rem,2.5vw,1.5rem); margin: 0 0 6px; color: var(--gold-soft); }
.title-line { color: var(--muted); font-size: .9rem; margin: 0 0 14px; }
.dog-fact-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0 0 14px; }
.dog-fact-dl dt { color: var(--muted); font-size: .82rem; }
.dog-fact-dl dd { color: var(--text); font-weight: 600; margin: 0; font-size: .88rem; }
.dog-intro { color: var(--text); line-height: 1.7; font-size: .95rem; margin-bottom: 14px; }
.compact-health { padding: 12px 14px; }
.health-heading { font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 8px; font-family: Arial,sans-serif; font-weight: 600; }
.dog-links { display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.btn-sm { padding: 8px 18px; font-size: .88rem; }

/* ===== PEDIGREE — sukutaulu subheading ===== */
.pedigree-section { padding-top: 24px; }
.pedigree-subheading {
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--muted);
    font-family: Arial, sans-serif;
    font-weight: 600;
    margin: 0 0 10px;
}
/* Scale table to fit within the page, no horizontal scroll */
.pedigree-table-wrap {
    overflow-x: auto;
    padding-bottom: 8px;
    background: transparent;
    width: 100%;
}
/* Raw Kennelliitto table — dark theme, fits page width */
.kennel-raw {
    width: 100%;
    display: block;
}
.kennel-raw table {
    border-collapse: collapse;
    font-size: clamp(.6rem, 1vw, .75rem);
    font-family: Arial, Helvetica, sans-serif;
    background: #000 !important;
    color: #fff !important;
    width: 100%;
    table-layout: fixed;
}
.kennel-raw table td,
.kennel-raw table th {
    border: 1px solid #fff !important;
    padding: 2px 4px;
    vertical-align: middle;
    color: #fff !important;
    background: #000 !important;
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1.3;
}
.kennel-raw table th {
    background: #111 !important;
    font-weight: bold;
    text-align: center;
    color: #fff !important;
}
.kennel-raw table tr,
.kennel-raw table tbody,
.kennel-raw table thead {
    background: #000 !important;
}
.kennel-raw table a { color: #e4c089 !important; text-decoration: underline; }
.kennel-raw table a:hover { color: #fff !important; }
/* Fallback constructed table */
.pedigree-table {
    border-collapse: collapse;
    width: 100%;
    table-layout: fixed;
    font-family: Arial, sans-serif;
    font-size: clamp(.6rem, 1vw, .75rem);
    background: #000;
}
.pedigree-table td {
    border: 1px solid #fff;
    padding: 2px 4px;
    vertical-align: middle;
    background: #000;
    color: #fff;
    overflow-wrap: break-word;
}
.tree-card { background: transparent; border: none; padding: 0; min-height: 0; display: block; }
.tree-card strong { font-size: inherit; color: #fff; font-weight: 700; display: block; line-height: 1.3; }
.tree-card small { font-size: .85em; color: #aaa; display: block; }
.ped-empty { color: #555; }

/* ===== UPDATES / PÄIVITYKSET news feed ===== */
.updates-container { max-width: 820px; }
.updates-feed { display: flex; flex-direction: column; gap: 0; }
.update-card {
    padding: 24px 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
    position: relative;
}
.update-card:last-child { border-bottom: none; }
.update-meta { margin-bottom: 10px; }
.update-time {
    display: inline-block;
    font-size: .8rem;
    color: var(--muted);
    font-family: Arial, sans-serif;
    letter-spacing: .04em;
    margin-bottom: 4px;
}
.update-title {
    font-family: Georgia, serif;
    font-size: 1.15rem;
    color: var(--gold-soft);
    margin: 0;
    line-height: 1.3;
}
.update-text {
    color: var(--text);
    line-height: 1.75;
    font-size: .97rem;
    margin-bottom: 14px;
}
.update-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.update-thumb {
    width: 100px;
    height: 100px;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    margin: 0;
    border: 1px solid rgba(255,255,255,.1);
    flex-shrink: 0;
    transition: transform .15s, border-color .15s;
}
.update-thumb:hover { transform: scale(1.06); border-color: rgba(199,152,75,.5); }
.update-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ===== INDEX litters section — heading above image ===== */
.litter-feature-section {
    padding: 56px 0 0;
}
.litter-index-heading {
    margin-bottom: 28px;
}
.litter-index-heading h2 {
    font-family: Georgia, serif;
    font-style: italic;
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--gold-soft);
    font-weight: 500;
    margin: 0;
}
.litter-index-heading::before,
.litter-index-heading::after {
    content: "";
    height: 1px;
    width: 140px;
    background: linear-gradient(90deg, transparent, var(--line), transparent);
}
.litter-feature-img {
    position: relative;
    min-height: 52vh;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
}
.litter-feature-inner {
    position: relative;
    z-index: 1;
    padding: 56px 0;
}

/* ===== ADMIN DASHBOARD TILES ===== */
.admin-tile {
    display: flex; align-items: flex-start; gap: 14px;
    background: rgba(20,18,14,.92); border: 1px solid rgba(199,152,75,.22);
    border-radius: 18px; padding: 20px 22px; text-decoration: none;
    color: var(--text); transition: border-color .18s, background .18s;
}
.admin-tile:hover { border-color: rgba(199,152,75,.6); background: rgba(30,25,15,.98); }
.admin-tile strong { display:block; color: var(--gold-soft); font-family:Georgia,serif; font-size:1.05rem; margin-bottom:4px; }
.admin-tile p { margin:0; color:var(--muted); font-size:.88rem; }
.admin-tile-icon { font-size:1.6rem; flex-shrink:0; margin-top:2px; }
.admin-tile-group { background: rgba(20,18,14,.92); border: 1px solid rgba(199,152,75,.22); border-radius: 18px; overflow:hidden; }
.admin-tile-group-header { display:flex; align-items:center; gap:12px; padding:16px 20px 10px; border-bottom:1px solid rgba(255,255,255,.06); }
.admin-tile-group-header strong { color:var(--gold-soft); font-family:Georgia,serif; }
.admin-tile-sub { display:flex; align-items:center; gap:8px; padding:12px 20px; text-decoration:none; color:var(--text); border-bottom:1px solid rgba(255,255,255,.04); transition:background .15s; }
.admin-tile-sub:last-child { border-bottom:0; }
.admin-tile-sub:hover { background:rgba(199,152,75,.08); }
.admin-tile-sub span { flex:1; font-size:.95rem; }
.admin-tile-meta { color:var(--muted); font-size:.82rem; flex:0 !important; white-space:nowrap; }
.admin-tile-arrow { color:var(--gold-soft); flex:0 !important; opacity:.5; }
.image-admin-list { display:flex; flex-direction:column; gap:8px; }
.image-admin-row { display:flex; align-items:center; gap:10px; background:rgba(255,255,255,.03); border-radius:10px; padding:8px 10px; border:1px solid rgba(255,255,255,.06); }
.image-admin-row .image-radio { display:flex; align-items:center; gap:8px; flex:1; cursor:pointer; }
.image-admin-row .image-radio img { width:52px; height:52px; object-fit:cover; border-radius:7px; flex-shrink:0; }
.error-box { background:rgba(180,40,40,.18); border:1px solid rgba(220,80,80,.35); color:#f6b6b6; padding:12px 20px; border-radius:10px; margin:12px 20px; font-size:.95rem; }
.admin-event-card { padding:20px; }
.event-add-form { max-width: 720px; }
.gallery-item-natural { aspect-ratio: unset; }
.gallery-item-natural img { width:100%; height:auto; object-fit:unset; display:block; }
.admin-gallery-item-wrap { position:relative; break-inside:avoid; margin-bottom:10px; border-radius:14px; overflow:hidden; border:1px solid rgba(255,255,255,.07); }
.admin-gallery-item-wrap button { opacity:0; transition:opacity .15s; }
.admin-gallery-item-wrap:hover button { opacity:1; }

/* ===== SUBPAGE H1 — 40% smaller than hero h1 ===== */
.page-hero h1 {
    font-size: clamp(1.4rem, 3vw, 2.2rem) !important;
}

/* ===== LITTERS LIST PAGE ===== */
.litter-list-card {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 0;
    border: 1px solid rgba(199,152,75,.18);
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 28px;
    background: rgba(14,12,8,.9);
}
.litter-list-img {
    min-height: 260px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.litter-list-body {
    padding: 32px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}
.litter-list-body h2 {
    font-family: Georgia, serif;
    color: var(--gold-soft);
    font-size: clamp(1.2rem, 2.5vw, 1.7rem);
    margin: 0;
}
.litter-list-body p { color: var(--text); margin: 0; line-height: 1.65; }
.litter-list-body .eyebrow { color: var(--muted); font-size: .82rem; margin: 0; }
.litter-parents.compact { margin: 4px 0 8px; }
@media(max-width: 780px){
    .litter-list-card { grid-template-columns: 1fr; }
    .litter-list-img { min-height: 200px; }
}

/* ===== LITTER DETAIL PAGE ===== */
.litter-detail-hero {
    height: 42vh;
    min-height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.litter-detail-hero .overlay,
.litter-detail-hero .overlay-soft,
.litter-list-img .overlay,
.litter-list-img .overlay-soft {
    background: linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.38)) !important;
}
.litter-detail-body { padding-top: 0; }
.litter-detail-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 32px;
    align-items: start;
    margin-top: -60px;
    position: relative;
    z-index: 2;
}
.litter-detail-info {
    padding: 28px 30px 30px;
}
.litter-detail-info h1 {
    font-size: clamp(1.3rem, 2.5vw, 1.9rem) !important;
    margin: 6px 0 12px;
    color: var(--gold-soft);
}
.litter-desc { color: var(--text); line-height: 1.75; margin-top: 14px; }
@media(max-width: 860px){
    .litter-detail-grid { grid-template-columns: 1fr; margin-top: 0; }
}

/* ===== HOME — recent life updates ===== */
.home-updates-feed {
    margin-top: 40px;
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: 28px;
}
.home-updates-heading {
    font-family: Georgia, serif;
    font-size: 1rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin: 0 0 20px;
    font-weight: 500;
}
.home-updates-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.home-update-item {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.home-update-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}
.home-update-page {
    color: var(--gold-soft);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .07em;
}
.home-update-time {
    color: var(--muted);
    font-size: .78rem;
    white-space: nowrap;
}
.home-update-title {
    color: #fff;
    font-family: Georgia, serif;
    font-size: .97rem;
    margin: 0;
    line-height: 1.35;
}
.home-update-imgs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.home-update-imgs img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 7px;
    border: 1px solid rgba(255,255,255,.08);
}
.home-update-item .text-link {
    font-size: .85rem;
    margin-top: 4px;
}

/* ===== PEDIGREE — litter-count cells keep black border ===== */
/* Cells containing only a number (litter count) use black border */
.kennel-raw table td.lcount,
.kennel-raw table td[class*="lcount"],
.kennel-raw table td[title*="pentue"],
.kennel-raw table td[title*="litter"] {
    border-color: #000 !important;
}
/* Kennelliitto marks these with a specific bgcolor — keep dark outline */
.kennel-raw table td[bgcolor],
.kennel-raw table td[style*="background"] {
    border-color: #000 !important;
}

/* ===== PEDIGREE — fix litter-count cells (identified by JS) ===== */
.kennel-raw table td.ped-litter-cell {
    border: 1px solid #000 !important;
    color: #fff !important;
    background: #111 !important;
    text-align: center;
    font-size: .72rem;
}

/* ===== BTN explicit white text ===== */
.btn, .btn-primary, .btn-secondary, .btn-small { color: #fff !important; }

/* ===== LIFE UPDATES GRID on index ===== */
.life-updates-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}
@media(max-width: 860px) { .life-updates-grid { grid-template-columns: 1fr; } }

.life-theme-col {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.life-theme-img-link { display: block; text-decoration: none; }
.life-theme-img {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: 14px 14px 0 0;
    overflow: hidden;
}
.life-theme-img .overlay,
.life-theme-img .overlay-soft {
    background: linear-gradient(180deg, rgba(0,0,0,.10) 0%, rgba(0,0,0,.55) 100%) !important;
}
.life-theme-label {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 10px 14px;
    font-family: Georgia, serif;
    font-size: 1.05rem;
    color: #fff;
    background: linear-gradient(0deg, rgba(0,0,0,.65), transparent);
    z-index: 1;
}
.life-theme-updates {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
    border-top: none;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.life-theme-update-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,.05);
    text-decoration: none;
    transition: opacity .15s;
}
.life-theme-update-row:last-child { border-bottom: none; }
.life-theme-update-row:hover { opacity: .8; }
.life-update-time {
    font-size: .75rem;
    color: var(--muted);
    letter-spacing: .03em;
}
.life-update-title {
    font-size: .9rem;
    color: var(--text);
    line-height: 1.35;
}
.life-theme-more {
    display: block;
    padding: 8px 14px;
    font-size: .82rem;
    background: rgba(255,255,255,.02);
    border: 1px solid rgba(255,255,255,.07);
    border-top: none;
    border-radius: 0 0 14px 14px;
    text-align: right;
}

/* ===== HOME GALLERY PREVIEW — orientation-aware thumbnails ===== */
.home-gallery-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 24px;
}
.home-gallery-thumb {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
    transition: transform .18s, border-color .18s, box-shadow .18s;
    cursor: pointer;
}
.home-gallery-thumb:hover {
    transform: scale(1.05);
    border-color: rgba(199,152,75,.5);
    box-shadow: 0 6px 20px rgba(0,0,0,.5);
}
/* Landscape: 150×100 */
.home-gallery-thumb.thumb-land {
    width: 150px;
    height: 100px;
}
/* Portrait: 100×150 */
.home-gallery-thumb.thumb-port {
    width: 100px;
    height: 150px;
}
.home-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
@media(max-width:600px){
    .home-gallery-thumb.thumb-land { width: 120px; height: 80px; }
    .home-gallery-thumb.thumb-port { width: 80px;  height: 120px; }
}

/* ===== HOME GALLERY — cinematic arc scatter ===== */
.home-gallery-scatter {
    position: relative;
    width: 100%;
    height: 340px;
    margin: 0 auto 32px;
    /* JS positions each photo via inline style */
}
.scatter-photo {
    position: absolute;
    display: block;
    overflow: hidden;
    border-radius: 6px;
    border: 3px solid rgba(255,255,255,.92);
    box-shadow: 0 8px 32px rgba(0,0,0,.65), 0 2px 6px rgba(0,0,0,.4);
    cursor: pointer;
    transition: transform .25s cubic-bezier(.34,1.56,.64,1),
                box-shadow .25s ease,
                z-index 0s;
    will-change: transform;
    transform-origin: center bottom;
    /* Base transform set by JS; hover adds lift */
}
.scatter-photo:hover {
    box-shadow: 0 20px 56px rgba(0,0,0,.8), 0 4px 12px rgba(199,152,75,.35);
    z-index: 20 !important;
}
.scatter-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}
/* Sizes */
.scatter-photo.photo-land { width: 150px; height: 100px; }
.scatter-photo.photo-port { width: 100px; height: 150px; }

/* Gold shimmer on hover */
.scatter-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(228,192,137,.18), transparent 60%);
    opacity: 0;
    transition: opacity .25s;
    pointer-events: none;
}
.scatter-photo:hover::after { opacity: 1; }

@media(max-width: 700px){
    .home-gallery-scatter { height: 260px; }
    .scatter-photo.photo-land { width: 110px; height: 73px; }
    .scatter-photo.photo-port { width: 73px;  height: 110px; }
}

/* ===== HEALTH TABLE — same dark theme as pedigree ===== */
.health-table-wrap {
    overflow-x: auto;
    width: 100%;
    margin-top: 8px;
}
.health-table-wrap table {
    border-collapse: collapse;
    font-size: clamp(.62rem, 1vw, .78rem);
    font-family: Arial, Helvetica, sans-serif;
    background: #000 !important;
    color: #fff !important;
    width: 100%;
}
.health-table-wrap table td,
.health-table-wrap table th {
    border: 1px solid #fff !important;
    padding: 3px 6px;
    vertical-align: top;
    color: #fff !important;
    background: #000 !important;
    line-height: 1.35;
    white-space: pre-line;
}
.health-table-wrap table th {
    background: #111 !important;
    font-weight: bold;
    text-align: left;
}
.health-table-wrap table a { color: #e4c089 !important; text-decoration: underline; }
.health-table-wrap table a:hover { color: #fff !important; }
