#hat069Gallery[hidden]{display:none!important}
#hat069Gallery{position:fixed;inset:0;z-index:99990;font-family:system-ui,-apple-system,'Segoe UI',sans-serif}
.hat069-overlay{position:absolute;inset:0;background:rgba(6,12,21,.76);backdrop-filter:blur(5px)}
.hat069-window{position:absolute;inset:min(3vh,30px) max(12px,calc((100vw - 1120px)/2));bottom:min(3vh,30px);border-radius:19px;display:flex;flex-direction:column;overflow:hidden;background:#15222d;color:#f4f8fb;border:1px solid #4a6575;box-shadow:0 24px 72px #0008}
.hat069-head{display:flex;justify-content:space-between;align-items:center;padding:15px 20px;border-bottom:1px solid #435966;gap:12px;background:#1e3240}
.hat069-head strong{font-size:18px}.hat069-head small{display:block;font-size:11px;opacity:.8;margin-top:4px}
#hat069Close{background:#2f4250;border:0;color:#fff;font-size:18px;border-radius:9px;padding:7px 13px}
.hat069-filter{display:flex;gap:14px;padding:12px 18px;align-items:end}.hat069-filter label{display:grid;gap:4px;font-size:12px;flex:1;max-width:520px}
.hat069-filter label:first-child{max-width:180px}.hat069-filter input,.hat069-filter select{background:#243e50;color:#fff;padding:10px;border:1px solid #526e80;border-radius:9px;min-width:0;font-size:14px}
.hat069-categories{display:flex;gap:7px;overflow:auto;padding:2px 18px 12px;scrollbar-width:thin;flex-shrink:0}
.hat069-categories button{white-space:nowrap;background:#273c49;color:#dfeef4;border:1px solid #506576;border-radius:999px;padding:7px 12px;font-size:12px}
.hat069-categories button.active{background:#256b7a;border-color:#70d6d8;color:white}
.hat069-count{padding:0 18px 8px;font-size:12px;color:#afccd7}
.hat069-grid{overflow-y:auto;min-height:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:min-content;gap:13px;padding:8px 18px 18px;align-content:start}
.hat069-item{min-width:0;text-align:left;border:1px solid #4e6877;background:#203747;color:#f5f8fa;border-radius:13px;padding:9px;display:flex;flex-direction:column;gap:6px;cursor:pointer;transition:.15s}
.hat069-item:hover,.hat069-item:focus-visible{border-color:#80dfe8;transform:translateY(-2px);background:#294a5f;outline:none}
.hat069-preview{height:95px;background:#101f2a;border-radius:9px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.hat069-preview svg{height:92px;width:100%;max-width:210px}
.hat069-item-meta{display:flex;justify-content:space-between;align-items:center;gap:8px;color:#b5cbda;font-size:10px}
.hat069-grade{background:#20596d;color:#c8f7ff;padding:3px 7px;border-radius:6px}
.hat069-item strong{font-size:13px;line-height:1.3}.hat069-item small{font-size:11px;color:#bed1dc;line-height:1.4}
.hat069-foot{padding:9px 18px;background:#162c3b;font-size:11px;color:#b5c9d2;border-top:1px solid #455e6f}
@media(max-width:740px){.hat069-window{inset:0;border-radius:0}.hat069-head strong{font-size:15px}.hat069-filter{gap:7px;padding:10px}.hat069-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;padding:8px}.hat069-categories{padding:0 9px 8px}.hat069-preview{height:72px}.hat069-preview svg{height:72px}.hat069-item{padding:6px}.hat069-foot{display:none}}
/* Override legacy #toolbar/nav globals without affecting the main whiteboard. */
#hat069Gallery .hat069-categories{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;flex-wrap:nowrap!important;width:100%!important;height:auto!important;max-height:54px!important;min-height:36px!important;position:static!important;overflow-x:auto!important;overflow-y:hidden!important;box-sizing:border-box}
#hat069Gallery .hat069-categories button{display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;width:auto!important;min-width:0!important;height:32px!important;margin:0!important}
#hat069Gallery .hat069-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important}
@media(max-width:740px){#hat069Gallery .hat069-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* V0.8.0: one gallery, built-in sample management; accessible actions. */
#hat069Gallery .hat080-card{cursor:default;transform:none}
#hat069Gallery .hat080-card:hover{transform:none}
#hat069Gallery .hat080-actions{display:flex;flex-wrap:wrap;gap:5px;margin-top:auto;padding-top:6px}
#hat069Gallery .hat080-actions button{font:600 11px system-ui,-apple-system,'Segoe UI',sans-serif;border:1px solid #63869c;background:#24495b;color:#f5fcff;border-radius:8px;padding:7px 8px;min-height:34px;cursor:pointer;flex:1 1 66px;white-space:nowrap}
#hat069Gallery .hat080-actions button:first-child{background:#14796c;border-color:#64ad9e}
#hat069Gallery .hat080-actions button:focus-visible{outline:2px solid #7debd9;outline-offset:1px}
#hat069Gallery #hat080RestoreHidden{border:1px solid #608b99;background:#305565;color:white;padding:6px 9px;border-radius:8px;font-size:12px;cursor:pointer}
#hat069Gallery .hat069-filter{flex-wrap:wrap;align-items:center}
#hat069Gallery .hat069-filter #hatshapeBrowse{flex:0 0 auto;min-width:150px;white-space:normal;margin:0}
#hat069Gallery .hat069-filter label{flex:1 1 165px}
#hat069Gallery .hat069-filter label:nth-child(2){max-width:180px}
@media(max-width:740px){#hat069Gallery .hat069-filter #hatshapeBrowse{flex:1 1 100%}#hat069Gallery .hat080-actions button{flex:1 1 85px}}

/* 0.8.2: full artwork previews generated by the live SVG renderer, not category icons */
#hat069Gallery .hat069-preview{height:120px;background:#101f2a}
#hat069Gallery .hat069-preview svg{height:116px;width:100%;max-width:250px;object-fit:contain}
@media(max-width:740px){#hat069Gallery .hat069-preview{height:91px}#hat069Gallery .hat069-preview svg{height:87px;max-width:100%}}
