/* HEC Tech Option 3 dashboard skin */
:root{--hec-bg:#0d0f13;--hec-panel:#171a20;--hec-panel2:#20242c;--hec-red:#d3222a;--hec-green:#39c56b;--hec-text:#f6f7f9;--hec-muted:#aeb5c0}
body.hec-v3{background:var(--hec-bg);color:var(--hec-text)}
body.hec-v3 main.wrap{max-width:900px}
body.hec-v3 .search{background:#171a20;border:1px solid #343944;color:#fff}
body.hec-v3 .search::placeholder{color:#9098a5}
body.hec-v3 .app-menu>summary{background:#20242c;border-color:var(--hec-red)}
body.hec-v3 .top-actions{position:sticky;bottom:0;z-index:7;background:rgba(13,15,19,.94);padding:9px 4px;margin-left:-4px;margin-right:-4px;backdrop-filter:blur(10px)}
body.hec-v3 .top-actions button{min-width:0;flex:1}
body.hec-v3 .hec-dashboard{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:10px 0 8px}
body.hec-v3 .hec-stat{background:var(--hec-panel);border:1px solid #343944;border-radius:13px;padding:11px 6px;text-align:center;box-shadow:0 4px 16px #0003}
body.hec-v3 .hec-stat strong{display:block;font-size:21px;color:#fff;line-height:1.1}
body.hec-v3 .hec-stat span{display:block;font-size:11px;color:var(--hec-muted);margin-top:4px}
body.hec-v3 .hec-backup-line{font-size:12px;color:var(--hec-green);text-align:center;margin:7px 0 13px;font-weight:700}
body.hec-v3 .hec-categories{display:grid;grid-template-columns:repeat(2,1fr);gap:9px;margin:8px 0 14px}
body.hec-v3 .hec-cat{min-height:58px;background:var(--hec-panel);border:1px solid #343944;border-left:4px solid var(--hec-red);color:#fff;text-align:left;font-size:14px}
body.hec-v3 .hec-cat.active{background:#302126;border-color:var(--hec-red)}
body.hec-v3 .hec-section-title{font-size:13px;text-transform:uppercase;letter-spacing:.08em;color:#aeb5c0;margin:14px 0 7px}
body.hec-v3 #drive-backup{display:none}
body.hec-v3 .chips{display:none}
body.hec-v3 .count{color:#aeb5c0}
body.hec-v3 .tool{background:#171a20;border-color:#343944;color:#fff}
body.hec-v3 .tool img{background:#fff}
body.hec-v3 .muted{color:#aeb5c0}
body.hec-v3 .app-menu-panel{width:min(270px,calc(100vw - 32px));padding:8px}
body.hec-v3 .app-menu-panel .hec-backup-menu{margin-top:5px;border-top:1px solid #434955;padding-top:6px}
body.hec-v3 .app-menu-panel .hec-menu-label{font-size:11px;color:#aeb5c0;padding:7px 8px 4px;text-transform:uppercase;letter-spacing:.08em}
body.hec-v3 .app-menu-panel button{margin:3px 0}
@media(max-width:430px){body.hec-v3 .hec-stat strong{font-size:18px}body.hec-v3 .hec-stat span{font-size:10px}body.hec-v3 .top-actions button{font-size:15px;padding:10px 7px}}

/* V3 polish */
body.hec-v3 .hec-cat{display:flex;align-items:center;justify-content:space-between;gap:8px}
body.hec-v3 .hec-cat small{color:var(--hec-muted);font-size:11px;font-weight:650}
body.hec-v3 .hec-dashboard .hec-stat:nth-child(2) strong{color:#ffd166}
body.hec-v3 .hec-dashboard .hec-stat:nth-child(3) strong{color:#ffcf33}
body.hec-v3 .hec-dashboard .hec-stat:nth-child(4) strong{color:#d7dbe2}
body.hec-v3 .hec-menu-label{display:flex;align-items:center;justify-content:space-between}
body.hec-v3 .hec-classic-note{font-size:11px;color:#8f98a6;padding:5px 8px 2px}

body.hec-v3 #manual-backup-panel{display:none!important}
body.hec-v3 .hec-cat span{min-width:0;line-height:1.15}
body.hec-v3 .hec-cat small{margin-left:auto;white-space:nowrap;padding-left:8px}
body.hec-v3 .top-actions{position:fixed;left:0;right:0;bottom:0;margin:0;padding:10px max(14px,calc((100vw - 900px)/2));border-top:1px solid #2e333d}
body.hec-v3 main.wrap{padding-bottom:105px}

body.hec-v3 section#manual-backup-panel{display:none!important}

/* V3 visual polish */
body.hec-v3 .hectech-banner{background:#090a0d;border-bottom:1px solid #292d35}
body.hec-v3 .banner-image-wrap{box-shadow:0 10px 30px #0008}
body.hec-v3 .search-row{gap:12px;margin-top:18px}
body.hec-v3 .hec-stat{transition:transform .15s ease,border-color .15s ease}
body.hec-v3 .hec-cat{position:relative;overflow:hidden;padding:14px 16px;box-shadow:0 5px 16px #0002;transition:transform .12s ease,border-color .12s ease}
body.hec-v3 .hec-cat:active{transform:scale(.98)}
body.hec-v3 .hec-cat span:before{display:inline-block;width:25px;margin-right:7px;font-size:17px}
body.hec-v3 .hec-cat[data-hec-cat="Power Tools"] span:before{content:"⚡"}
body.hec-v3 .hec-cat[data-hec-cat="Hand Tools"] span:before{content:"🔧"}
body.hec-v3 .hec-cat[data-hec-cat="Lawn & Garden"] span:before{content:"🌿"}
body.hec-v3 .hec-cat[data-hec-cat="Home & Kitchen"] span:before{content:"⌂"}
body.hec-v3 .hec-cat[data-hec-cat="Automotive"] span:before{content:"◆"}
body.hec-v3 .hec-cat[data-hec-cat="Other"] span:before{content:"•••"}
body.hec-v3 .hec-section-title{font-weight:750}
body.hec-v3 #grid{gap:14px}
body.hec-v3 .tool{border-radius:15px;overflow:hidden;box-shadow:0 5px 18px #0004}
body.hec-v3 .top-actions{box-shadow:0 -8px 24px #0008}

/* Approved V3 header */
body.hec-v3 .hectech-banner .banner-image-wrap>img{content:url("./hec-v3-header.jpg");width:100%;aspect-ratio:600/285;object-fit:cover;object-position:center;display:block}
body.hec-v3 .hectech-banner .banner-subtitle{display:none!important}
body.hec-v3 .hectech-banner .wrap{max-width:900px}

/* Approved V3 compact header */
body.hec-v3 header.hectech-banner{display:none!important}
body.hec-v3 .hec-v3-header{background:radial-gradient(circle at 80% 35%,#421015 0,#15171b 34%,#08090b 72%);border-bottom:2px solid #d3222a;overflow:hidden}
body.hec-v3 .hec-v3-header-inner{max-width:900px;margin:auto;min-height:178px;position:relative;display:flex;align-items:center;padding:18px 18px 14px}
body.hec-v3 .hec-v3-brand{position:relative;z-index:2;width:63%;padding-right:6px}
body.hec-v3 .hec-v3-tools{font-size:31px;line-height:1;margin-bottom:4px}
body.hec-v3 .hec-v3-title{font-size:clamp(38px,11vw,66px);font-weight:1000;letter-spacing:-.055em;line-height:.9;color:#f5f5f5;text-shadow:0 3px 0 #000}
body.hec-v3 .hec-v3-title b{color:#ef1f2b}
body.hec-v3 .hec-v3-tag{margin-top:9px;font-size:clamp(11px,3.1vw,17px);font-weight:900;letter-spacing:.08em;white-space:nowrap}
body.hec-v3 .hec-v3-stripe{width:90%;height:4px;background:#e51f2a;margin-top:10px;transform:skewX(-24deg);box-shadow:0 7px 0 #6d0b10}
body.hec-v3 .hec-v3-avatar{position:absolute;right:4px;bottom:-5px;width:40%;max-height:174px;object-fit:contain;object-position:center bottom;filter:drop-shadow(-8px 4px 10px #0009)}
body.hec-v3 .hec-v3-mini{display:flex;gap:14px;margin-top:15px;font-size:9px;font-weight:900;letter-spacing:.08em;color:#e7e7e7}
body.hec-v3 .hec-v3-mini i{color:#ef1f2b;font-style:normal}
@media(max-width:430px){body.hec-v3 .hec-v3-header-inner{min-height:164px;padding-left:15px}body.hec-v3 .hec-v3-avatar{width:42%;max-height:160px}body.hec-v3 .hec-v3-brand{width:66%}}

/* Header recovery: keep proven embedded banner visible until approved art is stored as a real asset */
body.hec-v3 header.hectech-banner{display:block!important}
body.hec-v3 .hec-v3-header{display:none!important}
body.hec-v3 header.hectech-banner img{display:block!important;width:100%!important;height:auto!important;max-height:none!important}

/* V3 item list and category refinements */
body.hec-v3 .hec-cat{min-height:74px}
body.hec-v3 .hec-cat:after{content:"›";font-size:29px;line-height:1;color:#d7dce4;margin-left:6px}
body.hec-v3 .hec-cat small{font-size:12px}
body.hec-v3 .hec-items-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 0 4px}
body.hec-v3 .hec-items-heading .hec-section-title{margin:0}
body.hec-v3 .hec-sort{background:#171a20;color:#fff;border:1px solid #3b414c;border-radius:10px;padding:9px 10px;font-size:12px;font-weight:750}
body.hec-v3 #count{margin:0 0 12px}
body.hec-v3 #grid .tool{display:grid;grid-template-columns:minmax(115px,42%) 1fr;min-height:160px;background:#15191f}
body.hec-v3 #grid .tool>img{width:100%;height:100%;min-height:160px;object-fit:contain;border-radius:0}
body.hec-v3 #grid .tool .info{padding:14px 12px;display:flex;flex-direction:column;justify-content:center}
body.hec-v3 #grid .tool .info strong{font-size:18px;line-height:1.2}
body.hec-v3 #grid .tool .tag{order:3;margin-top:10px;width:max-content;background:#3a1116;color:#ff737b;border:1px solid #d3222a}
@media(max-width:430px){body.hec-v3 #grid .tool{grid-template-columns:44% 56%;min-height:145px}body.hec-v3 #grid .tool>img{min-height:145px}body.hec-v3 #grid .tool .info strong{font-size:17px}}

/* V3 mobile corrections */
body.hec-v3 .hec-items-heading{display:grid;grid-template-columns:1fr auto;align-items:center}
body.hec-v3 .hec-items-heading .hec-section-title{white-space:nowrap;font-size:15px;letter-spacing:.06em}
body.hec-v3 .hec-sort{width:auto;min-width:158px;max-width:190px}
@media(max-width:430px){body.hec-v3 .hec-items-heading{grid-template-columns:auto 1fr;gap:10px}body.hec-v3 .hec-sort{width:100%;min-width:0;max-width:none}}

/* V3 reliable text header - no image dependency */
body.hec-v3 header.hectech-banner{display:none!important}
body.hec-v3 .hec-safe-header{display:block;background:radial-gradient(circle at 85% 20%,#4b0b10 0,#17191e 28%,#08090b 70%);border-bottom:2px solid #d3222a;box-shadow:0 8px 24px #0008}
body.hec-v3 .hec-safe-inner{max-width:900px;margin:auto;min-height:170px;padding:23px 22px 18px;display:flex;flex-direction:column;justify-content:center}
body.hec-v3 .hec-safe-tools{font-size:29px;line-height:1;margin-bottom:4px}
body.hec-v3 .hec-safe-title{font-size:clamp(48px,13vw,78px);font-weight:1000;letter-spacing:-.065em;line-height:.88;color:#f5f5f5;text-shadow:0 4px 0 #000}
body.hec-v3 .hec-safe-title b{color:#ef1f2b}
body.hec-v3 .hec-safe-sub{font-size:clamp(12px,3.6vw,19px);font-weight:950;letter-spacing:.09em;margin-top:11px;color:#fff}
body.hec-v3 .hec-safe-rule{height:4px;width:min(460px,85%);background:#ed1d2a;margin-top:12px;transform:skewX(-25deg);box-shadow:0 8px 0 #67090d}
body.hec-v3 .hec-safe-mini{display:flex;gap:16px;margin-top:17px;font-size:10px;font-weight:900;letter-spacing:.09em;color:#e9e9ea}
body.hec-v3 .hec-safe-mini i{font-style:normal;color:#ef1f2b}

/* V3 approved artwork header */
body.hec-v3 .hec-safe-header{background:#08090b!important;overflow:hidden}
body.hec-v3 .hec-safe-inner{display:none!important}
body.hec-v3 .hec-approved-header{display:block;width:100%;max-width:900px;margin:0 auto;overflow:hidden;background:#08090b}
body.hec-v3 .hec-approved-header img{display:block;width:100%;height:auto;max-height:330px;object-fit:cover;object-position:center center}
@media(max-width:430px){body.hec-v3 .hec-approved-header img{height:205px;max-height:none;object-fit:cover;object-position:center 45%}}

/* V3 compact approved artwork header */
@media(max-width:430px){
 body.hec-v3 .hec-approved-header{height:180px}
 body.hec-v3 .hec-approved-header img{width:100%;height:180px;max-height:none;object-fit:cover;object-position:center 48%}
}

/* V3 favorites */
body.hec-v3 .tool{position:relative}
body.hec-v3 .favorite-card-btn{position:absolute;z-index:4;right:10px;top:10px;width:38px;height:38px;border-radius:50%;border:1px solid #555c68;background:#101217;color:#8d939d;font-size:22px;line-height:1;padding:0;box-shadow:0 3px 10px #0008}
body.hec-v3 .favorite-card-btn.is-favorite{color:#ffd34d;border-color:#d9a900;background:#29220d}
body.hec-v3 .detail-favorite-btn,body.hec-v3 .edit-favorite-btn{border:1px solid #555c68;background:#171a20;color:#e9ebef}
body.hec-v3 .detail-favorite-btn.is-favorite,body.hec-v3 .edit-favorite-btn.is-favorite{color:#ffd34d;border-color:#d9a900;background:#29220d}

/* V3 quick-favorite heart on every item card */
body.hec-v3 .favorite-card-btn{display:flex!important;align-items:center;justify-content:center;right:10px;top:10px;width:42px;height:42px;border-radius:50%;font-family:Arial,sans-serif;font-size:26px;font-weight:900;color:#a5abb4;background:#0d1015eF;border:2px solid #555d69;cursor:pointer}
body.hec-v3 .favorite-card-btn.is-favorite{color:#ef2633;border-color:#ef2633;background:#2a0d11}

/* V3 card badge layout: keep controls clear of PDF/status labels */
body.hec-v3 .favorite-card-btn{top:auto!important;right:12px!important;bottom:12px!important}
body.hec-v3 #grid .tool-loaned{border:3px solid #f2b705!important;box-shadow:0 0 0 2px #f2b705,0 0 22px #f2b70555!important;background:#211d10!important}
body.hec-v3 #grid .tool-loaned .info{background:linear-gradient(135deg,#211d10,#15191f 62%)}
body.hec-v3 #grid .loan-tag{top:auto!important;right:12px!important;bottom:62px!important;max-width:calc(56% - 24px)!important;white-space:normal!important;text-align:center!important;line-height:1.15!important;background:#ffe58a!important;color:#3f3000!important;border:1px solid #f2b705!important;box-shadow:0 3px 10px #0007}
body.hec-v3 #grid .tool-loaned .favorite-card-btn{bottom:12px!important}
@media(max-width:430px){body.hec-v3 #grid .loan-tag{max-width:calc(56% - 24px)!important}}

/* V3 loan label: place it over the photo so card details stay unobstructed */
body.hec-v3 #grid .tool-loaned .loan-tag{
 top:12px!important;left:12px!important;right:auto!important;bottom:auto!important;
 max-width:calc(44% - 24px)!important;white-space:normal!important;
 text-align:center!important;line-height:1.12!important;padding:7px 9px!important;
 background:rgba(255,255,255,.94)!important;color:#20242b!important;
 border:2px solid #f2b705!important;border-radius:9px!important;
 box-shadow:0 3px 10px #0006!important
}
body.hec-v3 #grid .tool-loaned .loan-borrower{color:#1769aa!important;font-weight:900!important}
body.hec-v3 #grid .tool-loaned{border-color:#f2b705!important}

/* V3 cleaner card annotations */
body.hec-v3 .favorite-card-btn{
 top:48px!important;right:12px!important;bottom:auto!important;
 width:auto!important;height:auto!important;min-width:0!important;
 padding:0!important;border:0!important;border-radius:0!important;
 background:transparent!important;box-shadow:none!important;
 color:#9ba1ab!important;font-size:31px!important;line-height:1!important
}
body.hec-v3 .favorite-card-btn.is-favorite{color:#ef2633!important;background:transparent!important;border:0!important}
body.hec-v3 #grid .tool-loaned .loan-tag{
 top:9px!important;left:10px!important;right:auto!important;bottom:auto!important;
 max-width:43%!important;padding:0!important;border:0!important;border-radius:0!important;
 background:transparent!important;box-shadow:none!important;text-align:left!important;
 color:#1f2329!important;font-size:13px!important;line-height:1.12!important;
 text-shadow:0 1px 2px #fff,0 0 4px #fff!important
}
body.hec-v3 #grid .tool-loaned .loan-tag .loan-borrower{color:#1769aa!important;font-weight:950!important}
body.hec-v3 #grid .tool-loaned .loan-tag::first-line{font-weight:900}

/* V3 precise placements from mobile review */
body.hec-v3 .favorite-card-btn{
 top:auto!important;right:12px!important;bottom:14px!important;
 width:auto!important;height:auto!important;padding:0!important;
 border:0!important;background:transparent!important;box-shadow:none!important;
 font-size:31px!important;line-height:1!important
}
body.hec-v3 #grid .tool-loaned .loan-tag{
 top:10px!important;left:10px!important;right:auto!important;bottom:auto!important;
 max-width:42%!important;padding:0!important;border:0!important;background:transparent!important;
 box-shadow:none!important;border-radius:0!important;font-size:12px!important;line-height:1.05!important;
 font-weight:900!important;color:#20242b!important;text-align:left!important;white-space:nowrap!important;
 text-shadow:0 1px 2px #fff,0 0 4px #fff!important
}
body.hec-v3 #grid .tool-loaned .loan-borrower{display:inline!important;color:#1769aa!important;font-weight:950!important}

/* V3 tactile dashboard shortcut cards */
body.hec-v3 .hec-stat{
 cursor:pointer!important;
 border:1px solid #3c4350!important;
 border-bottom:4px solid #080a0e!important;
 box-shadow:0 7px 0 #080a0e,0 10px 18px rgba(0,0,0,.42),inset 0 1px 0 rgba(255,255,255,.08)!important;
 transform:translateY(-2px);
 transition:transform .12s ease,box-shadow .12s ease,border-color .12s ease!important;
}
body.hec-v3 .hec-stat:active{
 transform:translateY(5px)!important;
 box-shadow:0 1px 0 #080a0e,0 3px 7px rgba(0,0,0,.35),inset 0 1px 4px rgba(0,0,0,.35)!important;
}
body.hec-v3 .hec-stat:nth-child(2),body.hec-v3 .hec-stat:nth-child(3){
 border-color:#66531d!important;
 box-shadow:0 7px 0 #171205,0 10px 18px rgba(0,0,0,.42),inset 0 1px 0 rgba(255,213,64,.12)!important;
}

/* V3 stronger raised shortcut buttons */
body.hec-v3 .hec-stat{
 transform:translateY(-6px)!important;
 border:2px solid #454d5b!important;
 border-bottom:6px solid #050609!important;
 box-shadow:0 10px 0 #050609,0 15px 24px rgba(0,0,0,.62),inset 0 2px 0 rgba(255,255,255,.12)!important;
}
body.hec-v3 .hec-stat:nth-child(2),body.hec-v3 .hec-stat:nth-child(3){
 border:2px solid #77611e!important;border-bottom:6px solid #120e03!important;
 box-shadow:0 10px 0 #120e03,0 15px 24px rgba(0,0,0,.62),inset 0 2px 0 rgba(255,213,64,.16)!important;
}
body.hec-v3 .hec-stat:active{
 transform:translateY(4px)!important;
 box-shadow:0 2px 0 #050609,0 4px 8px rgba(0,0,0,.45),inset 0 2px 5px rgba(0,0,0,.4)!important;
}

/* V3 unify all four dashboard shortcut buttons */
body.hec-v3 .hec-stat,
body.hec-v3 .hec-stat:nth-child(1),
body.hec-v3 .hec-stat:nth-child(2),
body.hec-v3 .hec-stat:nth-child(3),
body.hec-v3 .hec-stat:nth-child(4){
 transform:translateY(-6px)!important;
 border:2px solid #77611e!important;
 border-bottom:6px solid #120e03!important;
 box-shadow:0 10px 0 #120e03,0 15px 24px rgba(0,0,0,.62),inset 0 2px 0 rgba(255,213,64,.16)!important;
 cursor:pointer!important;
}
body.hec-v3 .hec-stat:active,
body.hec-v3 .hec-stat:nth-child(1):active,
body.hec-v3 .hec-stat:nth-child(2):active,
body.hec-v3 .hec-stat:nth-child(3):active,
body.hec-v3 .hec-stat:nth-child(4):active{
 transform:translateY(4px)!important;
 box-shadow:0 2px 0 #120e03,0 4px 8px rgba(0,0,0,.45),inset 0 2px 5px rgba(0,0,0,.4)!important;
}

/* V3 compact dashboard shortcuts with clear backup spacing */
body.hec-v3 .hec-dashboard{margin-bottom:4px!important}
body.hec-v3 .hec-stats{gap:10px!important;margin-bottom:18px!important}
body.hec-v3 .hec-stat,
body.hec-v3 .hec-stat:nth-child(n){
 min-height:78px!important;padding:10px 5px 8px!important;
 transform:translateY(-3px)!important;
 border-bottom-width:4px!important;
 box-shadow:0 7px 0 #120e03,0 10px 17px rgba(0,0,0,.55),inset 0 1px 0 rgba(255,213,64,.14)!important;
}
body.hec-v3 .hec-stat strong{font-size:26px!important;line-height:1!important}
body.hec-v3 .hec-stat span{font-size:13px!important}
body.hec-v3 .hec-backup-status{margin-top:8px!important}

/* V3 v72: truly compact stat buttons; preserve tactile depth without crowding backup */
body.hec-v3 .hec-stats{gap:8px!important;margin:0 0 13px!important;align-items:start!important}
body.hec-v3 .hec-stat,body.hec-v3 .hec-stat:nth-child(n){
 min-height:0!important;height:68px!important;padding:7px 3px 5px!important;
 transform:translateY(0)!important;border-width:1px!important;border-bottom-width:3px!important;
 box-shadow:0 5px 0 #120e03,0 8px 12px rgba(0,0,0,.48),inset 0 1px 0 rgba(255,213,64,.12)!important;
}
body.hec-v3 .hec-stat strong{font-size:23px!important;line-height:1!important;margin:0 0 4px!important}
body.hec-v3 .hec-stat span{font-size:11px!important;line-height:1.05!important}
body.hec-v3 .hec-stat:active,body.hec-v3 .hec-stat:nth-child(n):active{transform:translateY(4px)!important;box-shadow:0 1px 0 #120e03,0 3px 6px rgba(0,0,0,.4)!important}
body.hec-v3 .hec-backup-status{margin-top:9px!important}

/* V3 v73: smaller dashboard stat squares */
body.hec-v3 .hec-stats{gap:7px!important;margin-bottom:12px!important}
body.hec-v3 .hec-stat,body.hec-v3 .hec-stat:nth-child(n){
 height:58px!important;min-height:58px!important;padding:5px 2px 4px!important;
 border-bottom-width:3px!important;
 box-shadow:0 4px 0 #120e03,0 7px 10px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,213,64,.12)!important;
}
body.hec-v3 .hec-stat strong{font-size:20px!important;margin-bottom:3px!important}
body.hec-v3 .hec-stat span{font-size:10px!important}

/* V3 v74: shrink the actual dashboard card footprint, not just its text */
body.hec-v3 .hec-stats{
 display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
 gap:6px!important;margin:0 8px 12px!important
}
body.hec-v3 .hec-stat,body.hec-v3 .hec-stat:nth-child(n){
 box-sizing:border-box!important;width:100%!important;height:50px!important;min-height:50px!important;
 padding:4px 1px 3px!important;border-radius:10px!important;border-width:1px!important;border-bottom-width:3px!important;
 box-shadow:0 4px 0 #120e03,0 6px 9px rgba(0,0,0,.42),inset 0 1px 0 rgba(255,213,64,.12)!important;
}
body.hec-v3 .hec-stat strong{font-size:19px!important;line-height:.95!important;margin:0 0 2px!important}
body.hec-v3 .hec-stat span{font-size:9px!important;line-height:1!important;margin:0!important}

/* V3 v75: compact actual cards while restoring large readable labels */
body.hec-v3 .hec-dashboard{
 display:grid!important;grid-template-columns:repeat(4,minmax(0,72px))!important;
 justify-content:center!important;column-gap:8px!important;row-gap:0!important;
 margin:8px auto 12px!important;padding:0 4px!important
}
body.hec-v3 .hec-stat,body.hec-v3 .hec-stat:nth-child(n){
 width:72px!important;max-width:72px!important;height:48px!important;min-height:48px!important;
 padding:3px 1px 2px!important;border-radius:9px!important;
 display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;
}
body.hec-v3 .hec-stat strong{font-size:23px!important;line-height:.9!important;margin:0 0 4px!important}
body.hec-v3 .hec-stat span{font-size:11px!important;font-weight:800!important;line-height:.95!important;margin:0!important;white-space:nowrap!important}

/* V3 v79: cleaner item-detail actions */
body.hec-v3 .detail-actions-main{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:16px 0 22px}
body.hec-v3 .detail-actions-main button{min-width:0;min-height:42px;padding:8px 9px;font-size:13px;line-height:1.15}
body.hec-v3 .detail-actions-main .accessories-detail-btn{background:#d3222a;color:#fff}
body.hec-v3 .detail-actions-bottom{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:18px;padding-top:14px;border-top:1px solid #343944}
body.hec-v3 .detail-actions-bottom button{min-height:42px;padding:8px 13px;font-size:13px}
body.hec-v3 .detail-close-btn{margin-right:auto}
body.hec-v3 .detail-actions-bottom .archive-detail-btn{margin-left:auto;background:#303846;color:#fff;border:1px solid #d3222a}
@media(max-width:370px){body.hec-v3 .detail-actions-main{gap:7px}body.hec-v3 .detail-actions-main button{font-size:12px;padding:7px 5px}}

/* V3 v80: semantic item-detail button colors */
body.hec-v3 .detail-actions-main button{background:#2b313b!important;color:#f4f6f8!important;border:1px solid #555e6b!important;box-shadow:0 2px 5px #0003}
body.hec-v3 .detail-actions-main button.primary{background:#2b313b!important;color:#f4f6f8!important;border-color:#687381!important}
body.hec-v3 .detail-actions-main .accessories-detail-btn{background:#c9252d!important;color:#fff!important;border-color:#e0444b!important}
body.hec-v3 .detail-close-btn{background:#303640!important;color:#f4f6f8!important;border:1px solid #59616d!important}
body.hec-v3 .detail-actions-bottom .archive-detail-btn{background:#b86b12!important;color:#fff!important;border:1px solid #dc8a28!important}
body.hec-v3 .detail-actions-main .restore-item-btn{background:#247a45!important;color:#fff!important;border-color:#36a05f!important}
body.hec-v3 .detail-actions-main .delete-item-btn{background:#b9232b!important;color:#fff!important;border-color:#df3c45!important}
body.hec-v3 .detail-actions-main button:active,body.hec-v3 .detail-actions-bottom button:active{filter:brightness(.88)}

/* v93: restore centered 3-button bottom navigation after AI Add removal */
body.hec-v3 .top-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important;align-items:stretch!important;justify-content:center!important;padding-left:max(14px,calc((100vw - 900px)/2))!important;padding-right:max(14px,calc((100vw - 900px)/2))!important}
body.hec-v3 .top-actions>button{width:100%!important;max-width:none!important;margin:0!important}

/* v94: center the three bottom-nav buttons as one compact group */
body.hec-v3 .top-actions{
  display:flex!important;
  justify-content:center!important;
  align-items:stretch!important;
  gap:12px!important;
  padding:10px 14px!important;
}
body.hec-v3 .top-actions>button{
  flex:0 1 190px!important;
  width:min(30vw,190px)!important;
  max-width:190px!important;
  min-width:0!important;
  margin:0!important;
}
@media(max-width:600px){
  body.hec-v3 .top-actions>button{
    flex:0 1 calc((100vw - 52px)/3)!important;
    width:calc((100vw - 52px)/3)!important;
    max-width:190px!important;
  }
}

/* v95: hard reset bottom navigation to the approved 3-button geometry */
body.hec-v3 .controls.top-actions{
  position:fixed!important;
  left:50%!important;
  right:auto!important;
  bottom:0!important;
  transform:translateX(-50%)!important;
  box-sizing:border-box!important;
  width:100%!important;
  max-width:900px!important;
  margin:0!important;
  padding:10px 14px calc(10px + env(safe-area-inset-bottom))!important;
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important;
  align-items:stretch!important;
}
body.hec-v3 .controls.top-actions>button{
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin:0!important;
  flex:none!important;
}
body.hec-v3 .controls.top-actions #message-hector{gap:6px!important}

/* v96: barcode / QR scanner */
body.hec-v3 .hec-scan-row{display:flex;align-items:center;gap:10px;margin:8px 0 14px}
body.hec-v3 .hec-scan-code-btn{background:#c9252d!important;color:#fff!important;border:1px solid #e0444b!important;font-weight:800}
body.hec-v3 #hec-scan-code-status{font-size:12px;color:#8ed5a8;overflow-wrap:anywhere}
.hec-scanner-overlay{position:fixed;inset:0;z-index:99999;background:#000e;display:flex;align-items:center;justify-content:center;padding:18px}
.hec-scanner-box{width:min(94vw,520px);background:#171a20;color:#fff;border:1px solid #3a404b;border-radius:16px;padding:16px;text-align:center;box-shadow:0 18px 55px #000}
.hec-scanner-box h2{margin:0 0 5px}.hec-scanner-box p{margin:0 0 12px;color:#b9c0ca}
.hec-scanner-box video{display:block;width:100%;max-height:62vh;object-fit:cover;border-radius:12px;border:2px solid #d3222a;background:#050505}
.hec-scanner-box button{margin-top:14px;min-width:120px}

/* v97: mobile Add Item + scanner fixes */
body.hec-v3 #modalContent{scroll-behavior:smooth}
body.hec-v3.hec-scanning dialog#modal{visibility:hidden!important;pointer-events:none!important}
body.hec-v3.hec-scanning .hec-scanner-overlay{visibility:visible!important;pointer-events:auto!important}
body.hec-v3 .hec-scanner-overlay{z-index:2147483647!important}
@media(max-width:600px){
 body.hec-v3 dialog#modal{max-height:92dvh!important}
 body.hec-v3 #modalContent{max-height:86dvh!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch}
 body.hec-v3 #toolForm input,body.hec-v3 #toolForm textarea{scroll-margin-top:90px;scroll-margin-bottom:220px}
}

/* v98 product lookup feedback */
body.hec-v3 .hec-scan-row{flex-wrap:wrap}body.hec-v3 #hec-scan-code-status{flex:1 1 160px;line-height:1.4}

/* v99: always display barcode lookup progress */
body.hec-v3 #hec-scan-code-status{display:block!important;flex:1 1 100%!important;font-size:14px!important;font-weight:700!important;color:#22633a!important;white-space:normal!important;min-height:22px!important}

/* v101: choose-store barcode search */
.hec-store-picker{position:fixed;inset:0;z-index:2147483647;background:#000c;display:flex;align-items:center;justify-content:center;padding:18px}
.hec-store-card{width:min(94vw,520px);max-height:88dvh;overflow:auto;background:#fff;color:#111;border-radius:18px;padding:22px;box-shadow:0 18px 60px #000}
.hec-store-card h2{margin:0 0 8px}.hec-store-card p{margin:0 0 16px;line-height:1.4}
.hec-store-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0 18px}
.hec-store-grid button,.hec-store-actions button{min-height:48px;font-weight:800}
.hec-store-card label{display:block;font-weight:800;margin:8px 0}.hec-store-card input{box-sizing:border-box;width:100%;min-height:50px;font-size:16px;padding:10px;border:1px solid #bbb;border-radius:10px}
.hec-store-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}.hec-store-actions .primary{background:#d3222a;color:#fff}

/* Show Files/iCloud backup panel only when opened from the menu. */
body.hec-v3 section#manual-backup-panel.hec-backup-visible{display:block!important}

/* iCloud / Files backup: readable dark card matching the HEC TECH dashboard. */
body.hec-v3 section#manual-backup-panel.hec-backup-visible{
  box-sizing:border-box!important;
  background:linear-gradient(155deg,#232e40,#151c29)!important;
  color:#f6f8fc!important;
  border:2px solid #dc2935!important;
  border-radius:18px!important;
  box-shadow:0 12px 30px rgba(0,0,0,.42),0 0 0 1px rgba(255,255,255,.06) inset!important;
  padding:18px!important;
  margin:20px 0!important;
}
body.hec-v3 #manual-backup-panel summary{
  color:#fff!important;
  font-size:17px!important;
  font-weight:800!important;
  line-height:1.4!important;
}
body.hec-v3 #manual-backup-panel p:not([role="status"]){
  color:#dbe3ef!important;
  font-size:14px!important;
  line-height:1.55!important;
}
body.hec-v3 #manual-backup-panel .controls{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:12px!important;
  margin-top:16px!important;
}
body.hec-v3 #manual-backup-panel .controls button{
  display:block!important;
  width:100%!important;
  box-sizing:border-box!important;
  background:#d52330!important;
  color:#fff!important;
  border:1px solid #ff5964!important;
  border-radius:12px!important;
  padding:15px 12px!important;
  font-size:15px!important;
  font-weight:800!important;
  min-height:54px!important;
  box-shadow:0 5px 13px rgba(0,0,0,.22)!important;
}
body.hec-v3 #manual-backup-panel .controls button:nth-of-type(2){
  background:#303c50!important;
  border-color:#75849b!important;
}
body.hec-v3 #manual-backup-panel #portable-backup-status{
  color:#12492b!important;
  background:#e0f6e8!important;
  border:1px solid #94d7ae!important;
  line-height:1.5!important;
  border-radius:12px!important;
  overflow-wrap:anywhere!important;
}

/* Google Drive backup card: match the iCloud/Files dark card. */
body.hec-v3 #drive-backup[open]{
  box-sizing:border-box!important;
  background:linear-gradient(155deg,#232e40,#151c29)!important;
  color:#f6f8fc!important;
  border:2px solid #dc2935!important;
  border-radius:18px!important;
  box-shadow:0 12px 30px rgba(0,0,0,.42),0 0 0 1px rgba(255,255,255,.06) inset!important;
  padding:18px!important;
  margin:20px 0!important;
}
body.hec-v3 #drive-backup summary{
  color:#fff!important;
  font-size:17px!important;
  font-weight:800!important;
  line-height:1.4!important;
}
body.hec-v3 #drive-backup #drive-summary-status{
  color:#b9d6ee!important;
  line-height:1.5!important;
}
body.hec-v3 #drive-backup > p:not([role="status"]){
  color:#dbe3ef!important;
  font-size:14px!important;
  line-height:1.55!important;
}
body.hec-v3 #drive-backup > p:not([role="status"])[style*="background"]{
  background:#2d3b50!important;
  color:#eaf2fc!important;
  border:1px solid #50617a!important;
}
body.hec-v3 #drive-backup .controls{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:12px!important;
  margin-top:16px!important;
}
body.hec-v3 #drive-backup .controls button{
  display:block!important;
  width:100%!important;
  box-sizing:border-box!important;
  background:#d52330!important;
  color:#fff!important;
  border:1px solid #ff5964!important;
  border-radius:12px!important;
  padding:15px 12px!important;
  font-size:15px!important;
  font-weight:800!important;
  min-height:54px!important;
  box-shadow:0 5px 13px rgba(0,0,0,.22)!important;
}
body.hec-v3 #drive-backup .controls button:nth-of-type(2){
  background:#303c50!important;
  border-color:#75849b!important;
}
body.hec-v3 #drive-backup #drive-status{
  color:#e3f7ec!important;
  background:#234436!important;
  border:1px solid #4a8b6a!important;
  border-radius:12px!important;
  line-height:1.5!important;
  overflow-wrap:anywhere!important;
}

/* User-selectable HEC TECH themes: cosmetic only, inventory and backups untouched. */
body.hec-v3[data-hec-theme="redhot"]{--hec-accent:#f12b37;--hec-accent-light:#ff6771;--hec-accent-tint:#3b1b23;--hec-accent-contrast:#fff;--hec-accent-glow:#551018}
body.hec-v3[data-hec-theme="original"]{--hec-accent:#d3222a;--hec-accent-light:#f04a52;--hec-accent-tint:#302126;--hec-accent-contrast:#fff;--hec-accent-glow:#421015}
body.hec-v3[data-hec-theme="yellow"]{--hec-accent:#ffcc00;--hec-accent-light:#ffe169;--hec-accent-tint:#3b3417;--hec-accent-contrast:#181818;--hec-accent-glow:#514109}
body.hec-v3[data-hec-theme="ocean"]{--hec-accent:#008c95;--hec-accent-light:#24b9c2;--hec-accent-tint:#16343b;--hec-accent-contrast:#fff;--hec-accent-glow:#083f46}
body.hec-v3[data-hec-theme="forest"]{--hec-accent:#62b53e;--hec-accent-light:#8cdb68;--hec-accent-tint:#203822;--hec-accent-contrast:#101b12;--hec-accent-glow:#24451c}
body.hec-v3[data-hec-theme="orange"]{--hec-accent:#f47721;--hec-accent-light:#ffa35b;--hec-accent-tint:#392719;--hec-accent-contrast:#19120b;--hec-accent-glow:#522a0c}
body.hec-v3[data-hec-theme="lime"]{--hec-accent:#b8d432;--hec-accent-light:#d4e875;--hec-accent-tint:#31391a;--hec-accent-contrast:#1a2109;--hec-accent-glow:#35420e}
body.hec-v3[data-hec-theme]{--hec-red:var(--hec-accent)}
body.hec-v3[data-hec-theme]:not([data-hec-theme="original"]) .hec-cat,
body.hec-v3[data-hec-theme]:not([data-hec-theme="original"]) .hec-stat,
body.hec-v3[data-hec-theme]:not([data-hec-theme="original"]) .tool{border-color:color-mix(in srgb,var(--hec-accent) 37%,#343944)!important}
body.hec-v3[data-hec-theme]:not([data-hec-theme="original"]) .hec-cat{border-left:4px solid var(--hec-accent)!important}
body.hec-v3[data-hec-theme]:not([data-hec-theme="original"]) .hec-cat.active{background:var(--hec-accent-tint)!important;border-color:var(--hec-accent)!important}
body.hec-v3[data-hec-theme]:not([data-hec-theme="original"]) .hec-safe-header,
body.hec-v3[data-hec-theme]:not([data-hec-theme="original"]) .hec-v3-header{border-bottom-color:var(--hec-accent)!important}
body.hec-v3[data-hec-theme]:not([data-hec-theme="original"]) .hec-safe-title b,
body.hec-v3[data-hec-theme]:not([data-hec-theme="original"]) .hec-v3-title b,
body.hec-v3[data-hec-theme]:not([data-hec-theme="original"]) .hec-safe-mini i,
body.hec-v3[data-hec-theme]:not([data-hec-theme="original"]) .hec-v3-mini i{color:var(--hec-accent-light)!important}
body.hec-v3[data-hec-theme]:not([data-hec-theme="original"]) .hec-safe-rule,
body.hec-v3[data-hec-theme]:not([data-hec-theme="original"]) .hec-v3-stripe{background:var(--hec-accent)!important;box-shadow:none!important}
body.hec-v3[data-hec-theme]:not([data-hec-theme="original"]) .app-menu>summary{border-color:var(--hec-accent)!important}
body.hec-v3[data-hec-theme]:not([data-hec-theme="original"]) button.primary,
body.hec-v3[data-hec-theme]:not([data-hec-theme="original"]) .top-actions button.primary,
body.hec-v3[data-hec-theme]:not([data-hec-theme="original"]) .top-actions .primary,
body.hec-v3[data-hec-theme]:not([data-hec-theme="original"]) #drive-save,
body.hec-v3[data-hec-theme]:not([data-hec-theme="original"]) #manual-backup-panel .controls button:first-child{background:var(--hec-accent)!important;border-color:var(--hec-accent-light)!important;color:var(--hec-accent-contrast)!important}
body.hec-v3[data-hec-theme]:not([data-hec-theme="original"]) #drive-backup[open],
body.hec-v3[data-hec-theme]:not([data-hec-theme="original"]) section#manual-backup-panel.hec-backup-visible{border-color:var(--hec-accent)!important}
body.hec-v3[data-hec-theme]:not([data-hec-theme="original"]) .hec-backup-line{color:var(--hec-accent-light)!important}
body.hec-v3 .hec-theme-menu{border-top:1px solid #434955;margin:8px 0 3px;padding:7px 4px 3px;color:#fff}
body.hec-v3 .hec-theme-menu>summary{cursor:pointer;font-weight:800;padding:9px 7px;list-style:revert}
body.hec-v3 .hec-theme-options{display:grid;gap:4px;padding:4px}
body.hec-v3 .hec-theme-options button{background:#202833;color:#fff;border:1px solid #495365;border-radius:10px;text-align:left;padding:10px 12px;min-height:42px}
body.hec-v3 .hec-theme-options button.hec-theme-selected{border:2px solid var(--hec-accent,#d3222a);background:var(--hec-accent-tint,#302126);font-weight:800}

/* Red Hot is a distinct brighter red variant; Original retains the classic skin. */
body.hec-v3[data-hec-theme="redhot"] .hec-cat,
body.hec-v3[data-hec-theme="redhot"] .hec-stat,
body.hec-v3[data-hec-theme="redhot"] .tool{border-color:#74303b!important}
body.hec-v3[data-hec-theme="redhot"] .hec-cat{border-left:4px solid #f12b37!important}
body.hec-v3[data-hec-theme="redhot"] .hec-cat.active{background:#3b1b23!important;border-color:#f12b37!important}
body.hec-v3[data-hec-theme="redhot"] .hec-safe-header,
body.hec-v3[data-hec-theme="redhot"] .hec-v3-header{border-bottom-color:#f12b37!important}
body.hec-v3[data-hec-theme="redhot"] .hec-safe-title b,
body.hec-v3[data-hec-theme="redhot"] .hec-v3-title b{color:#ff6771!important}
body.hec-v3[data-hec-theme="redhot"] .hec-safe-rule,
body.hec-v3[data-hec-theme="redhot"] .hec-v3-stripe{background:#f12b37!important}
body.hec-v3[data-hec-theme="redhot"] .app-menu>summary,
body.hec-v3[data-hec-theme="redhot"] #drive-backup[open],
body.hec-v3[data-hec-theme="redhot"] section#manual-backup-panel.hec-backup-visible{border-color:#f12b37!important}
body.hec-v3[data-hec-theme="redhot"] #drive-save,
body.hec-v3[data-hec-theme="redhot"] #manual-backup-panel .controls button:first-child{background:#f12b37!important;border-color:#ff6771!important;color:#fff!important}

/* Theme artwork: show the complete wide banner without cropping. Original remains untouched. */
body.hec-v3[data-hec-theme]:not([data-hec-theme="original"]) .hec-approved-header{height:auto!important;max-height:none!important;overflow:visible!important}
body.hec-v3[data-hec-theme]:not([data-hec-theme="original"]) .hec-approved-header img{display:block!important;width:100%!important;height:auto!important;max-height:none!important;object-fit:contain!important;object-position:center center!important}

/* Keep Customize near the top and its choices reachable without scrolling the page. */
body.hec-v3 .app-menu-panel{max-height:min(76dvh,650px);overflow-y:auto;overscroll-behavior:contain}
body.hec-v3 .hec-theme-menu{margin-top:3px}

/* Theme the persistent Home button to match the selected palette. */
body.hec-v3[data-hec-theme]:not([data-hec-theme="original"]) .controls.top-actions > button.home-action{
  border:3px solid var(--hec-accent)!important;
  color:var(--hec-accent-light)!important;
  background:#303948!important;
}
body.hec-v3[data-hec-theme]:not([data-hec-theme="original"]) .controls.top-actions > button.home-action > span{
  color:var(--hec-accent)!important;
}

/* v136: Each theme picker is a full-color preview of its palette. */
body.hec-v3 .hec-theme-options button[data-hec-theme]{
  border:2px solid transparent!important;
  font-weight:800!important;
  text-shadow:none!important;
  transition:filter .15s ease,transform .15s ease;
}
body.hec-v3 .hec-theme-options button[data-hec-theme="original"]{background:#c91f2d!important;color:#fff!important;border-color:#f66b75!important}
body.hec-v3 .hec-theme-options button[data-hec-theme="ocean"]{background:#087f90!important;color:#fff!important;border-color:#5bd2dd!important}
body.hec-v3 .hec-theme-options button[data-hec-theme="yellow"]{background:#ffcf19!important;color:#1b1b1b!important;border-color:#ffe58b!important}
body.hec-v3 .hec-theme-options button[data-hec-theme="orange"]{background:#ef7827!important;color:#211307!important;border-color:#ffb474!important}
body.hec-v3 .hec-theme-options button[data-hec-theme="lime"]{background:#b8d432!important;color:#182008!important;border-color:#e1f78a!important}
body.hec-v3 .hec-theme-options button[data-hec-theme="forest"]{background:#55a83c!important;color:#fff!important;border-color:#9fe286!important}
body.hec-v3 .hec-theme-options button[data-hec-theme].hec-theme-selected{
  outline:3px solid #fff!important;
  outline-offset:-5px!important;
  box-shadow:0 0 0 2px #15191f!important;
}
body.hec-v3 .hec-theme-options button[data-hec-theme].hec-theme-selected::after{content:" ✓";font-weight:900}
body.hec-v3 .hec-theme-options button[data-hec-theme]:active{transform:scale(.985)}

/* Allow horizontal photo swipes without blocking vertical page scrolling. */
body.hec-v3 .hec-card-gallery,body.hec-v3 .hec-card-gallery>img{touch-action:pan-y;user-select:none;-webkit-user-select:none;-webkit-user-drag:none}

/* Compact raised category buttons, including all color themes. */
body.hec-v3 .hec-categories{gap:13px 12px;padding-bottom:5px}
body.hec-v3 .hec-categories .hec-cat{
 display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;
 min-width:0;min-height:120px;padding:13px 10px;border-radius:16px;
 border:1px solid #656d79!important;border-top-color:#929aa5!important;
 background:linear-gradient(155deg,#363c45 0%,#252a32 52%,#1b2027 100%)!important;
 box-shadow:inset 0 1px 0 #ffffff20,0 5px 0 #0c1016,0 8px 12px #0006;
 color:#f8fafc;text-align:center;touch-action:manipulation;
 transition:transform .12s ease,box-shadow .12s ease,border-color .12s ease;
}
body.hec-v3 .hec-categories .hec-cat .hec-cat-icon{width:30px;height:30px;flex:none;filter:drop-shadow(0 2px 1px #0005)}
body.hec-v3 .hec-categories .hec-cat span:before{content:none!important;display:none}
body.hec-v3 .hec-categories .hec-cat .hec-cat-label{font-size:14px;font-weight:800;line-height:1.2;margin:0;overflow-wrap:normal}
body.hec-v3 .hec-categories .hec-cat small{font-size:11px;line-height:1.3;color:#c2cad6;margin:0;padding:0}
body.hec-v3 .hec-categories .hec-cat.active{
 border:2px solid var(--hec-accent,#d3222a)!important;padding:12px 9px;
 background:linear-gradient(150deg,var(--hec-accent-tint,#302126),#1b2027)!important;
 box-shadow:inset 0 1px 0 #ffffff20,0 5px 0 #0c1016,0 8px 12px #0006;
}
body.hec-v3 .hec-categories .hec-cat:after{content:none}
body.hec-v3 .hec-categories .hec-cat.active:after{content:'✓';position:absolute;right:7px;top:6px;color:var(--hec-accent-light,#f04a52);font-size:15px;font-weight:900}
body.hec-v3 .hec-categories .hec-cat:active{transform:translateY(4px);box-shadow:inset 0 2px 4px #0005,0 1px 0 #0c1016,0 3px 5px #0004}
body.hec-v3 .hec-categories .hec-cat:focus-visible{outline:3px solid var(--hec-accent-light,#f04a52);outline-offset:4px}
@media(hover:hover){body.hec-v3 .hec-categories .hec-cat:hover{border-color:#b5bdc8!important}}
@media(prefers-reduced-motion:reduce){body.hec-v3 .hec-categories .hec-cat{transition:none}}

/* Keep the entire open menu reachable on short phone screens. */
body.hec-v3 .app-menu-panel{
 position:fixed;top:max(12px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));
 bottom:max(12px,env(safe-area-inset-bottom));left:auto;
 width:min(320px,calc(100vw - 24px));min-width:0;max-height:none;
 overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;touch-action:pan-y;
 -webkit-overflow-scrolling:touch;scrollbar-gutter:stable;
}
body.hec-v3 .app-menu-panel [data-hec-menu-close]{
 position:sticky;top:0;z-index:1;min-height:44px;background:#171d28;
 border:1px solid #697384;text-align:right;box-shadow:0 4px 8px #0008;
}

/* Menu outlines and interaction colors follow the selected theme. */
body.hec-v3 .app-menu-panel{border-color:var(--hec-accent,#d3222a)}
body.hec-v3 .app-menu-panel button{border-color:var(--hec-accent,#d3222a)}
body.hec-v3 .app-menu-panel button:hover,
body.hec-v3 .app-menu-panel button:active{background:var(--hec-accent,#d3222a);color:var(--hec-accent-contrast,#fff)}
body.hec-v3 .app-menu-panel button:focus-visible,
body.hec-v3 .app-menu-panel summary:focus-visible{outline:3px solid var(--hec-accent-light,#f04a52);outline-offset:2px}
body.hec-v3 .app-menu-panel [data-hec-menu-close]{border-color:var(--hec-accent,#d3222a);color:var(--hec-accent-light,#f04a52)}
body.hec-v3 .app-menu-panel [data-hec-menu-close]:hover{background:var(--hec-accent,#d3222a);color:var(--hec-accent-contrast,#fff)}

/* Loaned cards remain distinct in every selected theme. */
body.hec-v3 #grid .tool.tool-loaned{
 border:3px solid var(--hec-accent,#d3222a)!important;
 box-shadow:0 0 0 2px var(--hec-accent,#d3222a),0 5px 20px var(--hec-accent-glow,#421015)!important;
 background:var(--hec-accent-tint,#302126)!important;
}
body.hec-v3 #grid .tool.tool-loaned .info{background:linear-gradient(135deg,var(--hec-accent-tint,#302126),#15191f 78%)}
body.hec-v3 #grid .tool.tool-loaned .loan-tag{
 background:var(--hec-accent-tint,#302126)!important;color:#f5f7fb!important;
 border-color:var(--hec-accent,#d3222a)!important;
}
body.hec-v3 #grid .tool.tool-loaned .loan-tag .loan-borrower{color:#f5f7fb!important;font-weight:900!important}
body.hec-v3 #grid .tool.tool-loaned .return-card-btn{background:var(--hec-accent,#d3222a);color:var(--hec-accent-contrast,#fff);border-color:var(--hec-accent-light,#f04a52)}

/* Owned count stays on the dark details side, clear of the photo. */
.tool .info .hec-quantity-badge{display:inline-flex;align-self:flex-start;width:fit-content;max-width:100%;padding:4px 9px;margin:5px 0;border:1px solid var(--hec-accent,#d3222a);border-radius:8px;background:rgba(255,255,255,.08);color:inherit;font-size:13px;font-weight:800;line-height:1.3}

.hec-package-fields{margin:14px 0;padding:12px;border:1px solid currentColor;border-radius:12px}.hec-package-fields summary{font-weight:700;cursor:pointer}.hec-package-fields p{font-size:14px;line-height:1.4}.tool .info .hec-quantity-badge{white-space:normal;overflow-wrap:anywhere}

.hec-unit-manager{color:#f1f4f8}.hec-unit-manager label{display:grid;gap:6px;margin:12px 0}.hec-unit-manager input,.hec-unit-manager select,.hec-unit-manager textarea{width:100%;box-sizing:border-box}.hec-unit-manager button{margin:5px 7px 5px 0}.hec-unit-card{border:1px solid var(--hec-accent,#d3222a);border-radius:12px;padding:14px;margin:14px 0}.hec-unit-card p{overflow-wrap:anywhere}

#modalContent .hec-unit-manager p,#modalContent .hec-unit-manager label,#modalContent .hec-unit-manager summary{color:#e0e6ef}#modalContent .hec-unit-manager input,#modalContent .hec-unit-manager textarea,#modalContent .hec-unit-manager select{background:#222b38;color:#f5f7fa;border:1px solid var(--hec-accent,#d3222a);padding:10px;border-radius:9px;font-size:16px}
