.homebrew-create{margin-left:auto;white-space:nowrap;background:#7b3241;color:#fff;border-color:#7b3241}
.catalog-row:has(.hb-row-actions){grid-template-columns:42px minmax(160px,1fr) minmax(130px,.7fr) max-content}
.hb-row-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;max-width:340px}
.hb-row-actions button,.homebrew-create,.homebrew-form footer button,.homebrew-json button,.hb-visible-prompt button{display:inline-flex;align-items:center;justify-content:center;width:auto;min-width:0;min-height:42px;padding:10px 14px;font-size:14px;line-height:20px;white-space:nowrap;flex:0 0 auto;align-self:center;border-radius:8px}
.hb-row-actions button{height:42px}
.catalog-filters button{align-self:end;justify-self:start;width:auto;min-height:42px;padding:10px 14px;font-size:14px;line-height:20px;white-space:nowrap}
@media(min-width:701px){.catalog-filters:has(#itemName){grid-template-columns:minmax(0,2fr) minmax(0,1fr) auto}.catalog-filters:has(#spellName){grid-template-columns:minmax(0,2fr) repeat(2,minmax(0,1fr)) auto}}
.homebrew-form footer,.homebrew-json footer{align-items:center;flex-wrap:wrap}
.hb-json-tools button{justify-self:start;align-self:end}
@media(max-width:1050px){.catalog-row:has(.hb-row-actions){grid-template-columns:42px minmax(0,1fr)}.catalog-row:has(.hb-row-actions) .catalog-meta,.hb-row-actions{grid-column:2/-1}.hb-row-actions{justify-content:flex-start;max-width:none}}
@media(max-width:720px){.homebrew-json footer button,.homebrew-form footer button{flex:0 1 auto;max-width:100%;white-space:normal}.hb-row-actions{gap:6px}.hb-row-actions button{padding-inline:10px}.homebrew-create{margin-left:0!important}}
.modal:has(.homebrew-form),.modal:has(.homebrew-json){padding:12px;overflow:hidden}
.modal .paper:has(.homebrew-form),.modal .paper:has(.homebrew-json){width:min(1280px,96vw);max-width:1280px;max-height:94dvh;overflow:hidden;padding:18px}
.modal .paper .homebrew-form,.modal .paper .homebrew-json{width:100%;max-height:calc(94dvh - 38px);overflow-y:auto;overflow-x:hidden;padding-right:12px}
body:has(.modal .homebrew-form),body:has(.modal .homebrew-json){overflow:hidden}
.hb-visible-prompt{margin:20px 0;display:grid;gap:10px}
.hb-visible-prompt textarea{width:100%;resize:vertical;font:14px/1.5 ui-monospace,monospace}
.hb-visible-prompt button{justify-self:start}
.homebrew-library .homebrew-json{max-height:none;overflow:visible}
.homebrew-library .homebrew-json footer{position:static}
.hb-catalog-image{width:100px;height:90px;object-fit:contain;border-radius:8px}
.hb-field-guide{margin:20px 0;padding:16px;border:1px solid var(--edge);border-radius:12px;background:#fffaf0}
.hb-field-guide table{width:100%;border-collapse:collapse;table-layout:fixed}
.hb-field-guide th,.hb-field-guide td{padding:9px;text-align:left;border-bottom:1px solid var(--edge);overflow-wrap:anywhere}
.hb-field-guide th:first-child{width:38%}
.homebrew-form{max-height:90dvh;overflow:auto;padding:8px 4px 2px}
.homebrew-form>p{color:var(--text-muted,#6d6254);max-width:80ch}
.homebrew-form h2{padding-right:38px}
.homebrew-form h3{margin:22px 0 10px;color:#7b3241}
.homebrew-form .hb-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:10px 0}
.homebrew-form .hb-field{display:flex;flex-direction:column;gap:5px;font-weight:600}
.homebrew-form .hb-field input,.homebrew-form .hb-field textarea,.homebrew-form .hb-field select{width:100%;min-width:0;padding:10px;border:1px solid #cbbda8;border-radius:7px;background:#fffdf8;color:#29231e;font:inherit}
.homebrew-form .hb-field textarea{resize:vertical;line-height:1.5}
.homebrew-form .hb-wide{grid-column:1/-1}
.homebrew-form .hb-check{display:flex;align-items:center;gap:9px;min-height:44px;padding:8px 10px;border:1px solid #d4c7b3;border-radius:7px;background:#fffdf8}
.homebrew-form .hb-check input{accent-color:#7b3241;width:18px;height:18px}
.homebrew-form footer{position:sticky;bottom:-2px;display:flex;gap:10px;padding:12px 0 4px;background:#f8f3e8;border-top:1px solid #d8ccba}
.homebrew-error{padding:10px;border-left:4px solid #a83030;background:#fbe8e5;color:#711f1f}
.homebrew-create:hover{background:#5f2634}
.homebrew-create.secondary{margin-left:8px;background:#f4ead9;color:#542c2f;border-color:#cbbda8}
.homebrew-form{width:min(1080px,92vw);margin:0 auto}
.homebrew-form .hb-editor-head,.homebrew-json>h2{margin:0 0 18px;padding:4px 44px 17px 2px;border-bottom:1px solid #d8cbb8}
.hb-editor-head>span,.hb-library-head>span{display:block;margin-bottom:6px;color:#9a7041;font-size:.72rem;font-weight:800;letter-spacing:.16em}
.hb-editor-head h2{margin:0;color:#362a26;font:700 clamp(1.6rem,3vw,2.25rem)/1.12 Georgia,serif}
.hb-editor-head p{margin:9px 0 0;color:#75695c}
.homebrew-form .hb-base-picker{display:grid;grid-template-columns:minmax(220px,1fr) minmax(250px,1.5fr);align-items:center;gap:4px 16px;margin:16px 0;padding:14px 16px;border:1px solid #d6c4a8;border-radius:12px;background:#f1e5cf}
.homebrew-form .hb-base-picker small{grid-column:2;color:#6f6457;font-weight:400}
.hb-panel{margin:16px 0;padding:20px;border:1px solid #dfd2bf;border-radius:14px;background:linear-gradient(145deg,#fffdf8,#f8f1e5);box-shadow:0 5px 16px #43331b0a}
.hb-panel-title{margin:0 0 16px;padding-bottom:13px;border-bottom:1px solid #eadfce}
.hb-panel-title>span{color:#a07a4e;font-size:.69rem;font-weight:800;letter-spacing:.14em}
.hb-panel-title h3{margin:4px 0;color:#44332e;font:700 1.35rem/1.2 Georgia,serif}
.hb-panel-title p{margin:5px 0 0;color:#776c5f;font-size:.92rem}
.homebrew-form .hb-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.homebrew-form .hb-field{gap:7px;color:#494039;font-size:.9rem}
.homebrew-form .hb-field input,.homebrew-form .hb-field textarea,.homebrew-form .hb-field select{min-height:43px;padding:10px 12px;border:1px solid #d3c6b5;border-radius:8px;background:#fffefa;box-shadow:inset 0 1px 2px #2b1b100a;transition:border-color .15s,box-shadow .15s}
.homebrew-form .hb-field textarea{min-height:92px;line-height:1.55}
.homebrew-form .hb-field input:focus,.homebrew-form .hb-field textarea:focus,.homebrew-form .hb-field select:focus,.homebrew-json textarea:focus{outline:0;border-color:#916548;box-shadow:0 0 0 3px #91654826}
.homebrew-form .hb-field small{color:#827769;font-weight:400;font-size:.8rem}
.homebrew-form .hb-check{min-height:44px;border-color:#d8cbb9;background:#fffefa}
.homebrew-form .hb-specific .hb-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.homebrew-form footer button[type=submit]{background:#713442;border-color:#713442;color:#fff;font-weight:700}
.homebrew-form footer button[type=submit]:hover{background:#572733}
.homebrew-form footer button.secondary{background:transparent}
.homebrew-library{max-width:1160px;margin:0 auto;padding:10px 0 28px}
.hb-library-head{padding:20px 4px 22px;border-bottom:1px solid #ddcfbb}
.hb-library-head h1{margin:0;color:#392a26;font:700 clamp(2rem,4vw,3rem)/1.05 Georgia,serif}
.hb-library-head p{max-width:75ch;color:#74695c;font-size:1.03rem;line-height:1.6}
.hb-prompt-card{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:20px 0;padding:18px 20px;border:1px solid #d8c49f;border-radius:14px;background:linear-gradient(110deg,#f4e7d0,#fbf6eb)}
.hb-prompt-card b{font:700 1.15rem Georgia,serif;color:#543436}.hb-prompt-card p{margin:6px 0 0;color:#726454;line-height:1.5}
.hb-example-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:18px 0}
.hb-example-card{display:flex;flex-direction:column;min-height:220px;padding:20px;border:1px solid #ded0bb;border-radius:15px;background:#fffdf8;box-shadow:0 8px 22px #3e2a160c}
.hb-example-card .hb-kind{color:#9d7040;font-size:.7rem;font-weight:800;letter-spacing:.13em}
.hb-example-card h2{margin:9px 0 4px;color:#41312c;font:700 1.55rem Georgia,serif}
.hb-example-card p{flex:1;color:#75695e;line-height:1.55}
.hb-example-actions{display:flex;flex-wrap:wrap;gap:8px}.hb-example-actions button{flex:1 1 auto}
.hb-json-note{padding:15px 18px;border-left:4px solid #879077;border-radius:0 9px 9px 0;background:#eff0e7;color:#625f51}
.hb-json-note p{margin:5px 0 0;line-height:1.5}
.homebrew-json{max-height:90dvh;overflow:auto;padding:8px 4px 2px}
.homebrew-json h2{padding-right:38px}
.homebrew-json>p{max-width:78ch;color:var(--text-muted,#6d6254)}
.hb-json-tools{display:grid;grid-template-columns:minmax(180px,1fr) auto minmax(220px,1fr);gap:10px;align-items:end;margin:12px 0}
.hb-json-tools .hb-field{display:flex;flex-direction:column;gap:5px;font-weight:600}
.hb-json-tools select,.hb-json-tools input{padding:9px;border:1px solid #cbbda8;border-radius:7px;background:#fffdf8;font:inherit}
.homebrew-json textarea{display:block;width:100%;box-sizing:border-box;min-height:340px;resize:vertical;padding:12px;border:1px solid #b9aa94;border-radius:8px;background:#201e1c;color:#f8edda;font:13px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;tab-size:2}
.homebrew-json footer{position:sticky;bottom:-2px;display:flex;flex-wrap:wrap;gap:10px;padding:12px 0 4px;background:#f8f3e8;border-top:1px solid #d8ccba}
.homebrew-json-status{min-height:1.4em;margin:8px 0;color:#615746}
.homebrew-json-status.ok{color:#24633b}.homebrew-json-status.error{padding:9px;border-left:4px solid #a83030;background:#fbe8e5;color:#711f1f}
@media(max-width:680px){.homebrew-form .hb-grid{grid-template-columns:1fr}.homebrew-form .hb-wide{grid-column:auto}.homebrew-create{margin-left:0}.catalog>.row.space{align-items:flex-start;flex-wrap:wrap}}
@media(max-width:850px){.hb-example-grid{grid-template-columns:1fr}.homebrew-form .hb-specific .hb-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.hb-json-tools{grid-template-columns:1fr}.homebrew-json textarea{min-height:45dvh}.homebrew-json footer>*{flex:1 1 100%}.homebrew-form .hb-grid,.homebrew-form .hb-specific .hb-grid{grid-template-columns:1fr}.homebrew-form .hb-base-picker{grid-template-columns:1fr}.homebrew-form .hb-base-picker small{grid-column:auto}.hb-panel{padding:15px}.hb-prompt-card{align-items:flex-start;flex-direction:column}.hb-prompt-card button{width:100%}.homebrew-form{width:100%}}
.fs-progress {display:flex;flex-wrap:wrap;gap:.75rem;margin:1rem 0;padding:.75rem;border:1px solid var(--ss-border,#dfccb7);border-radius:8px;}
.fs-progress span {opacity:.65;}
.fs-progress [aria-current="step"] {color:var(--ss-accent,#753345);}
