/* Curated template library; shares the Studio tool rail and responsive drawer. */
.hafu-ai .hai-template-intro{font-size:13px;line-height:1.6;margin:0 0 16px;color:#6d5865}
.hafu-ai .hai-template-search{display:flex;align-items:center;gap:9px;border:1px solid #ddd0d9;border-radius:9px;padding:0 11px;background:#fff;margin-bottom:13px}
.hafu-ai .hai-template-search input{width:100%;min-width:0;border:0;outline:0;padding:12px 0;background:transparent;font:inherit;font-size:13px;color:#352b32}
.hafu-ai .hai-template-search:focus-within{outline:2px solid #df286b;outline-offset:2px}
.hafu-ai .hai-template-filter{display:grid;gap:7px;font-size:12px;color:#6d5865;margin-bottom:13px}
.hafu-ai .hai-template-filter select{width:100%;max-width:100%;min-height:40px;border:1px solid #ddd0d9;border-radius:8px;background:#fff;font:inherit;color:#352b32;padding:8px}
.hafu-ai .hai-template-status{font-size:12px;line-height:1.65;color:#6d5865;margin:12px 0;overflow-wrap:anywhere}
.hafu-ai .hai-template-status.is-error{color:#a32240}
.hafu-ai .hai-template-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.hafu-ai .hai-template-card{margin:0;border:1px solid #eadfe6;border-radius:10px;overflow:hidden;background:#fff;display:flex;flex-direction:column;min-width:0;padding:0 0 10px}
.hafu-ai .hai-template-card img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain;background:#f5f1f4;border-bottom:1px solid #f0e8ed}
.hafu-ai .hai-template-card h3{font-size:12px;line-height:1.5;margin:10px 9px 4px;color:#352b32;font-weight:600;overflow-wrap:anywhere}
.hafu-ai .hai-template-card small{display:block;font-size:10px;line-height:1.5;color:#6d5865;margin:0 9px 10px}
.hafu-ai .hai-template-use{margin:auto 9px 0;min-height:37px;padding:7px 8px;border:1px solid #df286b;border-radius:7px;background:#fff3f8;font:inherit;font-size:12px;font-weight:600;color:#b71953;cursor:pointer}
.hafu-ai .hai-template-use:hover{background:#df286b;color:white}
.hafu-ai .hai-template-use:focus-visible,.hafu-ai .hai-template-pages button:focus-visible{outline:2px solid #df286b;outline-offset:3px}
.hafu-ai .hai-template-use:disabled{opacity:.55;cursor:wait}
.hafu-ai .hai-template-pages{display:flex;justify-content:center;align-items:center;gap:14px;margin:16px 0;font-size:12px;color:#59404e}
.hafu-ai .hai-template-pages[hidden]{display:none}
.hafu-ai .hai-template-note{font-size:11px;line-height:1.65;color:#6d5865;margin:17px 0 2px}
.hafu-ai.hai-is-template-applying .hai-workspace,.hafu-ai.hai-is-template-applying .hai-tool-panel,.hafu-ai.hai-is-template-applying .hai-tool-rail{pointer-events:none}
@media(max-width:650px){.hafu-ai .hai-template-list{gap:10px}.hafu-ai .hai-template-card h3{font-size:12px}.hafu-ai .hai-template-use{min-height:42px}.hafu-ai .hai-template-filter select{min-height:44px}.hafu-ai .hai-template-search input{min-height:44px;padding:9px 0}}
