/* Text controls extend the existing editor palette and spacing. */
.cv-img.cv-text canvas{display:block;width:100%;height:100%;pointer-events:none}
.cv-text-loading{display:grid;place-items:center;height:100%;background:#eef5e8;color:#173f35;font:16px sans-serif;border:1px dashed #769486}
.text-presets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:10px 0 16px}
.text-presets button{min-height:44px;padding:8px 4px;white-space:nowrap;color:var(--ink)}
.text-presets small{display:block;font-size:11px;font-family:inherit;color:var(--muted);margin-top:3px}
.text-props textarea{resize:vertical;min-height:96px;width:100%;font-size:16px;line-height:1.5}
.text-props .prop-row{gap:8px}
.text-props .prop-row .lbl{flex:0 0 48px}
.text-props select,.text-props input{min-width:0;flex:1}
.text-props input[type=color]{min-height:38px;padding:3px}
.text-props details{margin-top:14px;padding-top:10px;border-top:1px solid var(--line,#d6e5d9)}
.text-props details summary{cursor:pointer;padding:7px 0}
.text-layer-icon{display:grid;place-items:center;width:32px;height:32px;flex:none;background:#e7f0e7;border-radius:4px;color:#173f35;font:700 20px Georgia,serif}
.text-font-notice{margin:8px 0;font-size:12px;line-height:1.55;color:var(--muted)}
.text-font-picker{min-width:0;margin:0 0 16px;padding:10px;border:1px solid var(--line,#d6e5d9);border-radius:8px}
.text-font-picker legend{padding:0 4px;font-size:13px;font-weight:700;color:var(--ink)}
.text-font-current{font-size:12px;line-height:1.5;margin:0 0 8px;overflow-wrap:anywhere;color:var(--ink)}
.text-font-picker .prop-row .lbl{flex-basis:32px}
.text-font-picker .input{width:0;max-width:100%}
.text-font-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.text-font-actions button{min-height:40px;min-width:0;white-space:nowrap}
.text-font-preview{margin-top:10px;padding:8px;background:var(--surface,#f4f8f2);border-radius:6px}
.text-font-preview[hidden],.text-font-specimen[hidden],.text-font-error[hidden]{display:none}
.text-font-specimen{font-size:26px;min-height:90px;max-height:220px;padding:8px 0;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--ink)}
.text-font-preview button{margin-top:8px}
.text-font-error{color:var(--danger,#a13e2c)}
.text-font-picker :focus-visible{outline:2px solid var(--accent,#256b60);outline-offset:2px}
@media(max-width:900px){.text-props input,.text-props select,.text-props button,.text-props summary{min-height:44px}.text-presets button{min-height:44px}.text-props textarea{font-size:16px}.text-font-picker .input{font-size:16px}}
@media(max-width:900px){body[data-studio-version="5"] #ed-root .ed-mobile .ed-pane-switch{grid-template-columns:repeat(4,minmax(0,1fr))}#ed-root .ed-pane-switch #ed-add-text{min-height:44px;min-width:0;padding:8px 2px;font-size:13px}}
