/* The Kapadia Family — shared styles (B&W Montserrat). */
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent;}
html,body{margin:0;}
body{font-family:'Montserrat',system-ui,Arial,sans-serif;color:#111;background:#e6e6e6;}
button,input,select,textarea{font-family:inherit;}
/* The HTML `hidden` attribute must always win over author display rules below
   (e.g. .view{display:flex} and .overlay{display:flex}); otherwise hidden
   views stack and the invisible profile overlay would block all clicks. */
[hidden]{display:none !important;}
@keyframes kFade{from{opacity:0;}to{opacity:1;}}
@keyframes kSheet{from{transform:translateY(100%);}to{transform:translateY(0);}}
@keyframes kPop{from{opacity:0;transform:translateY(10px);}to{opacity:1;transform:translateY(0);}}

.brand-badge{width:66px;height:66px;border-radius:50%;background:#111;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:28px;}
.brand-badge.sm{width:34px;height:34px;font-size:15px;}
.brand-badge.sq{width:34px;height:34px;border-radius:9px;background:#fff;color:#111;font-weight:800;font-size:15px;}

/* ---------- LOGIN ---------- */
.login-bg{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;background:#e6e6e6;}
.login-card{width:100%;max-width:412px;background:#fff;border-radius:20px;box-shadow:0 24px 60px rgba(0,0,0,.12);padding:38px 30px;animation:kPop .3s ease;}
.login-title{font-weight:800;font-size:30px;line-height:1.08;letter-spacing:-.02em;margin:22px 0 0;}
.login-sub{font-weight:500;font-size:13.5px;color:#6b7280;margin:8px 0 0;line-height:1.5;}
.field{display:block;margin-top:14px;}
.field span{display:block;font-weight:600;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:#9ca3af;margin-bottom:7px;}
.field input{width:100%;padding:14px 15px;border:1.5px solid #e5e7eb;border-radius:13px;background:#fafafa;font-size:15px;color:#111;outline:none;}
.field input:focus{border-color:#111;}
.btn-primary{margin-top:20px;width:100%;padding:15px;border:none;border-radius:13px;background:#111;color:#fff;font-weight:700;font-size:15px;cursor:pointer;}
.btn-primary:active{transform:scale(.99);}
.btn-secondary{padding:13px 18px;border:1.5px solid #e5e7eb;border-radius:11px;background:#fff;color:#6b7280;font-weight:700;font-size:14px;cursor:pointer;}
.form-error{margin-top:13px;font-weight:600;font-size:13px;color:#b91c1c;}
.form-ok{margin-top:13px;font-weight:600;font-size:13px;color:#15803d;}

/* ---------- APP SHELL ---------- */
.app-shell{position:relative;width:100%;max-width:448px;height:100vh;height:100dvh;margin:0 auto;background:#fff;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 0 60px rgba(0,0,0,.10);}
.topbar{flex:none;display:flex;align-items:center;justify-content:space-between;padding:16px 18px 12px;border-bottom:1px solid #f0f0f0;gap:12px;}
.brand{display:flex;align-items:center;gap:10px;min-width:0;}
.brand-name{font-weight:800;font-size:16px;line-height:1;letter-spacing:-.01em;white-space:nowrap;}
.brand-name.light{color:#fff;}
.brand-sub{font-weight:500;font-size:11px;color:#9ca3af;margin-top:2px;}
.topbar-right{display:flex;align-items:center;gap:10px;}
.top-nav{display:none;align-items:center;gap:2px;}
.top-nav button{border:none;background:transparent;font-weight:700;font-size:13px;color:#c2c2c2;padding:8px 13px;border-radius:9px;cursor:pointer;}
.top-nav button.active{color:#111;}
.btn-ghost{border:1px solid #e5e7eb;background:#fff;font-weight:600;font-size:11px;color:#6b7280;padding:7px 11px;border-radius:9px;cursor:pointer;text-decoration:none;}
.btn-ghost.dark{border-color:#3a3a3a;background:transparent;color:#fff;font-size:12px;padding:8px 13px;}

.seg{flex:none;display:flex;gap:5px;width:calc(100% - 28px);max-width:440px;margin:12px auto 4px;background:#f4f4f4;border-radius:13px;padding:5px;}
.seg button{flex:1;border:none;background:transparent;color:#6b7280;font-weight:600;font-size:12.5px;padding:10px;border-radius:9px;cursor:pointer;}
.seg button.active{background:#111;color:#fff;font-weight:700;}

.view{flex:1;min-height:0;display:flex;flex-direction:column;position:relative;}
.view.scroll{overflow:auto;}
.scroll{overflow:auto;}
.grow{flex:1;min-height:0;}
.view::-webkit-scrollbar,.scroll::-webkit-scrollbar,.tree-viewport::-webkit-scrollbar,.dir-list::-webkit-scrollbar{width:0;height:0;}
.wrap-920{max-width:920px;margin:0 auto;width:100%;padding:14px;}
.wrap-820{max-width:820px;margin:0 auto;width:100%;padding:18px;}
.wrap-560{max-width:560px;margin:0 auto;width:100%;padding:14px 16px 24px;}
.eyebrow{font-weight:700;font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:#9ca3af;margin-bottom:8px;}
.eyebrow.mt{margin-top:22px;}
.page-title{font-weight:800;font-size:24px;letter-spacing:-.02em;margin:0;}

/* ---------- TREE ---------- */
.tree-viewport{position:absolute;inset:0;overflow:auto;padding:70px 40px 40px;cursor:grab;background:#fff;background-image:radial-gradient(#ececec 1px,transparent 1px);background-size:22px 22px;touch-action:none;}
.tree-scale{display:flex;justify-content:center;min-width:max-content;transform:scale(.85);transform-origin:top center;transition:transform .16s ease;}
.zoom-bar{position:absolute;top:12px;right:12px;z-index:8;display:flex;gap:4px;background:#fff;border:1px solid #eee;border-radius:11px;padding:5px;box-shadow:0 4px 14px rgba(0,0,0,.08);}
.zoom-bar button{width:30px;height:30px;border:none;background:#f4f4f4;border-radius:8px;color:#111;font-size:18px;line-height:1;cursor:pointer;}
.zoom-bar #zoomReset{min-width:46px;background:transparent;font-weight:700;font-size:11px;}
.node{display:flex;flex-direction:column;align-items:center;}
.couple{display:flex;align-items:center;justify-content:center;}
.spouse-side{display:flex;align-items:center;}
.spouse-side.ghost{visibility:hidden;pointer-events:none;}
.tcard.spouse{background:#fafafa;}
.tcard{cursor:pointer;width:150px;background:#fff;border:2px solid #111;border-radius:14px;padding:13px 10px 11px;display:flex;flex-direction:column;align-items:center;text-align:center;box-shadow:0 2px 8px rgba(0,0,0,.06);transition:transform .14s ease;}
.tcard:active{transform:scale(.97);}
.tcard .av{width:50px;height:50px;border-radius:50%;background:#f1f1f1;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:18px;margin-bottom:8px;object-fit:cover;}
.tcard .nm{font-weight:700;font-size:14px;line-height:1.12;}
.tcard .yr{font-weight:500;font-size:10.5px;color:#9ca3af;margin-top:3px;}
.badge-mem{margin-top:5px;font-weight:700;font-size:8px;letter-spacing:.1em;text-transform:uppercase;color:#6b7280;background:#f1f1f1;padding:2px 7px;border-radius:999px;}
.mlink{display:flex;align-items:center;padding:0 1px;}
.mlink i{display:block;width:10px;height:2px;background:#111;}
.mlink b{display:block;width:8px;height:8px;background:#fff;border:2px solid #111;border-radius:50%;}
.toggle{margin-top:9px;border:1px solid #e5e7eb;background:#fff;color:#111;font-weight:700;font-size:11px;padding:5px 11px;border-radius:999px;cursor:pointer;}
.stub{width:2px;height:24px;background:#d6d6d6;}
.children{display:flex;justify-content:center;align-items:flex-start;}
.child-slot{position:relative;display:flex;flex-direction:column;align-items:center;padding:0 14px;}
.child-slot .hl{position:absolute;top:0;height:2px;background:#d6d6d6;}

/* ---------- CARDS / LISTS ---------- */
.card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:8px;}
.gen-label{margin:14px 0 8px;font-weight:700;font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:#9ca3af;}
.mcard{display:flex;align-items:center;gap:12px;padding:11px 13px;background:#fff;border:1px solid #eee;border-left:4px solid #111;border-radius:13px;cursor:pointer;box-shadow:0 1px 3px rgba(0,0,0,.04);}
.mcard:active{transform:scale(.99);}
.mcard .av{flex:none;width:42px;height:42px;border-radius:50%;background:#f1f1f1;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:14px;object-fit:cover;}
.mcard .info{min-width:0;flex:1;}
.mcard .nm{font-weight:700;font-size:14.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.mcard .sub{font-weight:500;font-size:12px;color:#9ca3af;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.mcard .blood{flex:none;font-weight:700;font-size:11px;color:#6b7280;border:1px solid #eee;border-radius:7px;padding:3px 7px;}

.search-bar-wrap{flex:none;padding:14px 16px 8px;}
.search-bar{display:flex;align-items:center;gap:10px;padding:12px 14px;background:#f4f4f4;border-radius:13px;max-width:680px;margin:0 auto;}
.search-bar input{flex:1;border:none;background:transparent;font-size:15px;color:#111;outline:none;}

/* ---------- PEDIGREE ---------- */
.select{width:100%;padding:12px 13px;border:1.5px solid #e5e7eb;border-radius:12px;background:#fafafa;font-size:14px;font-weight:600;color:#111;outline:none;}
.ped-chain{display:flex;flex-direction:column;align-items:stretch;margin-top:18px;}
.ped-row{display:flex;align-items:center;gap:11px;padding:13px;background:#fff;border:1px solid #eee;border-left:4px solid #111;border-radius:14px;box-shadow:0 1px 3px rgba(0,0,0,.05);}
.ped-row .av{flex:none;width:46px;height:46px;border-radius:50%;background:#f1f1f1;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:15px;cursor:pointer;object-fit:cover;}
.ped-row .lvl{font-weight:600;font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:#9ca3af;}
.ped-row .nm{font-weight:700;font-size:15px;cursor:pointer;}
.ped-row .sp{font-weight:500;font-size:12.5px;color:#6b7280;cursor:pointer;}
.ped-up{align-self:center;width:2px;height:18px;background:#d6d6d6;}

/* ---------- ABOUT ---------- */
.about-text{font-weight:500;font-size:14px;line-height:1.65;color:#4b5563;margin:10px 0 0;}
.about-text p,.about-text div{margin:0 0 10px;}
.about-text ul,.about-text ol{margin:8px 0 12px;padding-left:22px;}
.about-text li{margin:3px 0;}
.about-text strong,.about-text b{font-weight:700;color:#1f2937;}
/* Rich-text editor (admin About tab) */
.rte-toolbar{display:flex;gap:6px;margin:0 0 8px;}
.rte-toolbar button{min-width:38px;height:34px;border:1.5px solid #e5e7eb;background:#fff;border-radius:9px;font-size:14px;color:#111;cursor:pointer;}
.rte-toolbar button:hover{background:#f4f4f4;}
.rte-editor{min-height:160px;max-height:340px;overflow:auto;padding:14px;border:1.5px solid #e5e7eb;border-radius:12px;background:#fafafa;font-size:14px;line-height:1.6;color:#111;outline:none;}
.rte-editor:focus{border-color:#111;}
.rte-editor ul,.rte-editor ol{padding-left:22px;margin:8px 0;}
.rte-editor:empty:before{content:attr(data-placeholder);color:#9ca3af;}
.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin-top:20px;}
.stat{background:#f4f4f4;border-radius:16px;padding:16px;}
.stat.dark{background:#111;color:#fff;}
.stat b{display:block;font-weight:800;font-size:30px;line-height:1;}
.stat span{display:block;font-weight:600;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:#9ca3af;margin-top:6px;}
.stat.dark span{color:#bdbdbd;}
.age-stats{display:flex;flex-direction:column;gap:9px;}
.age-row{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;background:#fff;border:1px solid #eee;border-radius:13px;}
.age-row .l{font-weight:600;font-size:14px;}
.age-row .n{font-weight:800;font-size:18px;}

/* ---------- HISTORY ---------- */
.empty-note{margin-top:16px;padding:30px;text-align:center;color:#9ca3af;font-weight:600;font-size:14px;background:#fafafa;border:1px dashed #e5e7eb;border-radius:14px;}
.article-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px;margin-top:14px;}
.article-card{background:#fff;border:1px solid #eee;border-radius:16px;overflow:hidden;cursor:pointer;box-shadow:0 1px 3px rgba(0,0,0,.05);transition:transform .14s ease,box-shadow .14s ease;}
.article-card:hover{transform:translateY(-3px);box-shadow:0 10px 24px rgba(0,0,0,.10);}
.ac-banner{height:158px;background:#f1f1f1 center/cover no-repeat;}
.ac-noimg{display:flex;align-items:center;justify-content:center;background:#111;color:#fff;font-weight:800;font-size:30px;}
.ac-body{padding:14px 16px 16px;}
.ac-title{font-weight:800;font-size:17px;line-height:1.25;letter-spacing:-.01em;}
.ac-excerpt{margin-top:6px;font-weight:500;font-size:13px;line-height:1.55;color:#6b7280;}
.ac-meta{margin-top:10px;font-weight:700;font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:#9ca3af;}
.back-btn{border:1px solid #e5e7eb;background:#fff;font-weight:700;font-size:13px;color:#111;padding:9px 14px;border-radius:999px;cursor:pointer;margin-bottom:16px;}
.art-banner{height:300px;background:#f1f1f1 center/cover no-repeat;border-radius:16px;margin-bottom:18px;}
.art-title{font-weight:800;font-size:30px;line-height:1.12;letter-spacing:-.02em;margin:0;}
.art-meta{margin-top:8px;font-weight:700;font-size:12px;letter-spacing:.04em;text-transform:uppercase;color:#9ca3af;}
.art-content{margin-top:18px;font-weight:500;font-size:15px;line-height:1.7;color:#374151;}
.art-content p,.art-content div{margin:0 0 12px;}
.art-content ul,.art-content ol{margin:10px 0;padding-left:22px;}
.art-content strong,.art-content b{font-weight:700;color:#1f2937;}
.art-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;margin-top:10px;}
.art-gallery img{width:100%;height:150px;object-fit:cover;border-radius:12px;border:1px solid #eee;}
@media (max-width:520px){ .art-banner{height:200px;} .art-title{font-size:24px;} }

/* ---------- BOTTOM NAV ---------- */
.bottom-nav{flex:none;display:flex;border-top:1px solid #f0f0f0;background:#fff;padding:8px 6px 10px;}
.bottom-nav button{flex:1;border:none;background:transparent;display:flex;flex-direction:column;align-items:center;gap:3px;padding:5px;cursor:pointer;color:#c2c2c2;}
.bottom-nav button.active{color:#111;}
.bottom-nav svg{width:22px;height:22px;}
.bottom-nav span{font-weight:600;font-size:10px;}

/* ---------- PROFILE ---------- */
.overlay{position:fixed;inset:0;z-index:40;background:rgba(0,0,0,.4);animation:kFade .2s ease;display:flex;align-items:flex-end;justify-content:center;}
.sheet{width:100%;max-width:448px;max-height:90%;overflow:auto;background:#fff;border-radius:24px 24px 0 0;animation:kSheet .28s cubic-bezier(.22,.61,.36,1);}
.sheet::-webkit-scrollbar{width:0;}
.sheet-handle{position:sticky;top:0;background:#fff;padding:10px 0 0;display:flex;justify-content:center;}
.sheet-handle i{width:40px;height:5px;border-radius:3px;background:#e0e0e0;}
.profile-body{padding:14px 22px 28px;}
.profile-head{display:flex;align-items:center;gap:15px;}
.profile-head .av{flex:none;width:72px;height:72px;border-radius:50%;background:#f1f1f1;border:3px solid #111;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:26px;object-fit:cover;}
.profile-head .nm{font-weight:800;font-size:21px;line-height:1.1;letter-spacing:-.01em;}
.profile-head .rel{font-weight:500;font-size:13px;color:#9ca3af;margin-top:3px;}
.mem-pill{display:inline-block;margin-top:7px;font-weight:700;font-size:9.5px;letter-spacing:.1em;text-transform:uppercase;color:#6b7280;background:#f1f1f1;padding:3px 8px;border-radius:999px;}
.facts{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:20px;}
.fact{background:#f7f7f7;border-radius:13px;padding:13px;}
.fact.full{grid-column:1/-1;}
.fact .k{font-weight:700;font-size:9.5px;letter-spacing:.09em;text-transform:uppercase;color:#9ca3af;margin-bottom:5px;}
.fact .v{font-weight:700;font-size:14px;}
.sec-label{margin-top:20px;font-weight:700;font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:#9ca3af;margin-bottom:8px;}
.history{font-weight:500;font-size:14px;line-height:1.6;color:#374151;}
.rel-chips{display:flex;flex-wrap:wrap;gap:8px;}
.chip{border:1px solid #e5e7eb;background:#fff;font-weight:600;font-size:13px;padding:9px 14px;border-radius:999px;cursor:pointer;color:#111;}
.profile-close{margin-top:26px;width:100%;padding:14px;border:none;border-radius:13px;background:#111;color:#fff;font-weight:700;font-size:14px;cursor:pointer;}

/* ---------- ADMIN ---------- */
.admin-bg{background:#eef0f2;}
.admin-topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 22px;background:#111;}
.admin-main{max-width:1120px;margin:0 auto;padding:26px 22px 60px;}
.tabs{display:flex;gap:6px;background:#e2e5e8;border-radius:13px;padding:5px;width:fit-content;margin-bottom:22px;}
.tabs button{border:none;background:transparent;color:#6b7280;font-weight:600;font-size:13px;padding:9px 18px;border-radius:9px;cursor:pointer;}
.tabs button.active{background:#fff;color:#111;font-weight:700;box-shadow:0 1px 3px rgba(0,0,0,.1);}
.admin-cols{display:flex;flex-wrap:wrap;gap:20px;align-items:flex-start;}
.card{flex:1 1 420px;min-width:300px;background:#fff;border-radius:18px;box-shadow:0 2px 12px rgba(0,0,0,.06);padding:22px;}
.card.narrow{max-width:600px;flex:1 1 auto;}
.card h2{font-weight:800;font-size:19px;margin:0 0 3px;}
.card-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;}
.muted{font-weight:500;font-size:12.5px;color:#9ca3af;margin:0 0 16px;}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:13px;}
.grid2 .full{grid-column:1/-1;}
.grid2 label{display:block;}
.grid2 label>span{display:block;font-weight:600;font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;color:#9ca3af;margin-bottom:5px;}
.grid2 input,.grid2 select,.grid2 textarea{width:100%;padding:10px 12px;border:1.5px solid #e5e7eb;border-radius:10px;background:#fafafa;font-size:14px;outline:none;resize:vertical;}
.grid2 input:focus,.grid2 select:focus,.grid2 textarea:focus{border-color:#111;}
.check{display:flex;align-items:center;gap:9px;cursor:pointer;font-weight:600;font-size:13px;color:#374151;}
.check input{width:17px;height:17px;accent-color:#111;}
.row-btns{display:flex;gap:10px;margin-top:18px;}
.row-btns .btn-primary{margin-top:0;flex:1;padding:13px;border-radius:11px;font-size:14px;}
.dir-list{display:flex;flex-direction:column;gap:7px;max-height:560px;overflow:auto;margin-top:12px;padding-right:4px;}
.dir-row{display:flex;align-items:center;gap:11px;padding:9px 11px;background:#fafafa;border:1px solid #eee;border-left:4px solid #111;border-radius:11px;}
.dir-row .av{flex:none;width:34px;height:34px;border-radius:50%;background:#efefef;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:12px;}
.dir-row .info{min-width:0;flex:1;}
.dir-row .nm{font-weight:700;font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.dir-row .sub{font-weight:500;font-size:11px;color:#9ca3af;}
.mini{border:1px solid #e5e7eb;background:#fff;color:#111;font-weight:600;font-size:11px;padding:6px 10px;border-radius:8px;cursor:pointer;}
.mini.danger{border-color:#f0d4d0;background:#fdf2f0;color:#b91c1c;}
.cred-list{display:flex;flex-direction:column;gap:8px;margin:0 0 18px;}
.cred-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;background:#fafafa;border:1px solid #eee;border-radius:11px;}
.cred-row .num{font-weight:700;font-size:14px;}
.cred-row .meta{font-weight:500;font-size:12px;color:#9ca3af;}
.admin-tab .btn-primary{margin-top:14px;}
.admin-tab .select{margin-top:12px;}
.photo-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:8px;}
.photo-status{margin:0;}
.photo-preview{width:54px;height:54px;border-radius:8px;object-fit:cover;border:1px solid #e5e7eb;}
.hijri-row{display:flex;gap:8px;}
.hijri-row input{width:0;flex:1;}
.hijri-row select{flex:1.6;}
.field-label{font-weight:600;font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;color:#9ca3af;margin:14px 0 6px;}
.hijri-pop{position:absolute;z-index:50;top:calc(100% + 6px);left:0;width:286px;max-width:92vw;background:#fff;border:1px solid #e5e7eb;border-radius:14px;box-shadow:0 16px 40px rgba(0,0,0,.18);padding:12px;}
.hp-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;font-weight:700;font-size:14px;}
.hp-nav{width:30px;height:30px;border:1px solid #e5e7eb;background:#fff;border-radius:8px;font-size:16px;line-height:1;cursor:pointer;}
.hp-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:5px;}
.hp-day{height:34px;border:1px solid #eee;background:#fafafa;border-radius:8px;font-size:13px;font-weight:600;color:#111;cursor:pointer;}
.hp-day:hover{background:#f0f0f0;}
.hp-day.on{background:#111;color:#fff;border-color:#111;}
.hp-foot{margin-top:10px;text-align:right;}
.hp-clear{border:none;background:transparent;color:#9a3b2f;font-weight:700;font-size:12px;cursor:pointer;}
.gallery-head{display:flex;align-items:center;justify-content:space-between;margin-top:16px;}
.gallery-head .field-label{margin:0;}
.admin-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(90px,1fr));gap:8px;margin-top:8px;}
.gthumb{position:relative;}
.gthumb img{width:100%;height:80px;object-fit:cover;border-radius:9px;border:1px solid #eee;display:block;}
.gthumb-x{position:absolute;top:4px;right:4px;width:22px;height:22px;border:none;border-radius:50%;background:rgba(0,0,0,.6);color:#fff;font-size:14px;line-height:1;cursor:pointer;}

/* ---------- RESPONSIVE: desktop ---------- */
@media (min-width:760px){
  /* Fill the whole screen on desktop instead of a centered 1200px column. */
  .app-shell{max-width:none;width:100%;height:100vh;min-height:0;}
  .topbar{padding-left:max(24px,4vw);padding-right:max(24px,4vw);}
  .tree-viewport{padding-left:6vw;padding-right:6vw;}
  .top-nav{display:flex;}
  .bottom-nav{display:none;}
  .overlay{position:absolute;align-items:center;padding:32px;}
  .sheet{max-width:560px;max-height:86vh;border-radius:22px;animation:kPop .26s ease;box-shadow:0 30px 80px rgba(0,0,0,.4);}
  .sheet-handle{display:none;}
}
/* On large monitors keep reading columns comfortable but let the shell go full-bleed. */
@media (min-width:1280px){
  .wrap-920{max-width:1100px;}
}
