.text-tools{padding:16px;margin-top:12px;border:1px solid #d9e3dc;background:#fff;border-radius:14px;box-shadow:0 3px 12px #20312608}
.text-tools-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.text-tools-heading strong{font-size:.9rem}.text-tools-heading span{font-size:.75rem;color:var(--muted)}
.text-tools-fields{display:grid;grid-template-columns:minmax(140px,1.5fr) minmax(140px,1.25fr) 90px minmax(130px,1fr);gap:12px;align-items:end}
.text-tools-fields label{display:flex;flex-direction:column;gap:6px;margin:0;font-size:.8rem;color:var(--ink)}
.text-tools textarea,.text-tools select,.text-tools input[type=number]{margin:0;width:100%;min-width:0;padding:9px;border:1px solid var(--line);border-radius:8px;background:#fff;height:43px}
.text-tools textarea{resize:vertical;min-height:43px;max-height:100px}
.text-color-inputs{display:flex;gap:7px;align-items:center}.text-color-inputs input[type=color]{width:43px;height:43px;padding:3px;flex:0 0 43px;border:1px solid var(--line);border-radius:8px;background:#fff;cursor:pointer}
.text-color-inputs input[type=text]{width:90px;height:43px;margin:0;padding:8px;font-family:monospace;border:1px solid var(--line);border-radius:8px;min-width:0}
.text-palette{display:flex;align-items:center;gap:8px;margin-top:12px;flex-wrap:wrap}.text-palette span{font-size:.75rem;color:var(--muted);margin-right:3px}
.text-palette button{background:var(--swatch);border:1px solid #77877d77;width:27px;height:27px;border-radius:50%;padding:0;box-shadow:inset 0 0 0 2px #ffffff55}
.text-palette button[aria-pressed=true]{outline:2px solid var(--dark);outline-offset:3px}
.new-text-style{display:grid;grid-template-columns:minmax(0,1fr) 48px;gap:9px;align-items:end}.new-text-style input[type=color]{width:48px;height:42px;padding:3px;cursor:pointer}
.new-text-preview{display:block;padding:14px 10px;border:1px dashed #cbd6ce;border-radius:10px;overflow-wrap:anywhere;font-size:24px;text-align:center;min-height:66px;background:#f9fbf9;margin:10px 0 13px;white-space:pre-wrap}
.motif-browser-status{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:.75rem;color:var(--muted);margin:12px 0}
.motif-viewport{max-height:450px;overflow-y:auto;overscroll-behavior:contain;padding:3px;scrollbar-gutter:stable}
.motif-grid button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:0;aspect-ratio:auto;padding:8px}
.motif-grid img{height:95px;min-height:0;object-fit:contain;flex:1}.motif-name{display:block;font-size:.67rem;line-height:1.3;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}
.motif-more{width:100%;margin-top:10px;min-height:40px}.motif-loading{opacity:.65;pointer-events:none}
@media(max-width:1200px){.text-tools-fields{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.text-tools-fields>label:first-child{grid-column:1/-1}}
@media(max-width:800px){.text-tools-fields{grid-template-columns:minmax(0,1fr) minmax(110px,1fr)}.text-tools-fields>label:first-child{grid-column:1/-1}.text-tools{padding:12px}.motif-viewport{max-height:360px}}
@media(max-width:570px){.text-tools-heading{display:block}.text-tools-heading span{display:block;margin-top:4px}.text-tools-fields{grid-template-columns:minmax(0,1fr) 85px}.text-tools-fields>label:last-child{grid-column:1/-1}.text-color-inputs input[type=text]{width:100%}.text-tools-fields>label:nth-child(2){min-width:0}.motif-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.motif-grid button{width:auto;height:130px}.motif-grid img{height:85px}.motif-viewport{max-height:330px}.new-text-style{grid-template-columns:minmax(0,1fr) 60px}}
