.dim-text-controls{display:grid;gap:1rem;min-width:0;color:var(--color-navy,#26334a)}
.dim-text-controls h2{margin:0;font-size:1.2rem;line-height:1.3}
.dim-text-controls p{margin:0;line-height:1.5}
.dim-text-controls__tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.4rem;padding:.3rem;border-radius:var(--radius-card,.65rem);background:var(--color-background-subtle,#fbf8f0)}
.dim-image-controls[data-dim-image-panel][hidden],.dim-text-controls [data-dim-text-panel][hidden]{display:none!important}
.dim-text-controls [data-dim-text-panel]>[hidden],.dim-text-controls [data-dim-text-empty] [hidden]{display:none!important}
.dim-image-controls,.dim-text-controls [data-dim-text-panel]{display:grid;gap:.9rem;min-width:0}
.dim-text-controls__empty{display:grid;gap:1rem;padding:2rem 1rem;text-align:center;justify-items:stretch}
.dim-text-controls__empty h2{max-width:22rem;justify-self:center;font-size:clamp(1.2rem,2vw,1.5rem)}
.dim-text-controls__empty p{max-width:28rem;justify-self:center;color:var(--color-text-muted,#5f6571)}
.dim-text-controls__empty-add{min-height:48px;width:100%;padding:.65rem 1rem;border:1px solid var(--color-action,#c94839);border-radius:var(--radius-button,.4rem);background:var(--color-action,#c94839);color:var(--color-white,#fff);font:inherit;font-weight:700}
.dim-text-controls__suggestion{display:grid;gap:.45rem;padding:1rem;border:1px solid rgba(38,51,74,.18);border-radius:var(--radius-card,.65rem);background:var(--color-background-subtle,#fbf8f0)}
.dim-text-controls__suggestion p:first-child{font-weight:700}
.dim-text-controls__suggestion [data-dim-text-suggestion-text]{white-space:pre-wrap;overflow-wrap:anywhere}
.dim-text-controls__suggestion button{justify-self:start;min-height:44px;padding:.55rem .8rem;border:1px solid var(--color-navy,#26334a);border-radius:var(--radius-button,.4rem);background:var(--color-white,#fff);color:inherit;font:inherit;font-weight:700}
.dim-text-controls [data-dim-text-tab]{min-height:48px;padding:.65rem;border:1px solid transparent;border-radius:var(--radius-button,.4rem);background:transparent;color:inherit;font:inherit;font-weight:700}
.dim-text-controls [data-dim-text-tab][aria-pressed=true]{background:var(--color-navy,#26334a);color:var(--color-white,#fff)}
.dim-text-controls__heading{display:flex;align-items:baseline;justify-content:space-between;gap:1rem}
.dim-text-controls [data-dim-text-count]{flex:none;color:var(--color-text-muted,#5f6571);font-size:.9rem}
.dim-text-controls__intro,.dim-text-controls__help,.dim-text-controls__keyboard,.dim-text-controls__safe-area{color:var(--color-text-muted,#5f6571);font-size:.86rem}
.dim-text-controls__layers{display:flex;align-items:stretch;gap:.45rem;min-width:0}
.dim-text-controls [data-dim-text-list]{display:flex;flex:1 1 auto;gap:.45rem;min-width:0}
.dim-text-controls [data-dim-text-layer-id]{flex:1 1 0;min-width:0;min-height:44px;padding:.55rem .65rem;border:1px solid rgba(38,51,74,.25);border-radius:var(--radius-button,.4rem);background:var(--color-white,#fff);color:inherit;text-align:center;font:inherit;font-size:.88rem;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dim-text-controls [data-dim-text-layer-id][aria-pressed=true]{border-color:var(--color-navy,#26334a);background:var(--color-navy,#26334a);color:var(--color-white,#fff)}
.dim-text-controls__add{flex:0 0 auto;min-height:44px;padding:.45rem .7rem;border:1px solid rgba(38,51,74,.25);border-radius:var(--radius-button,.4rem);background:var(--color-white,#fff);color:inherit;font:inherit;font-size:.88rem;font-weight:700;line-height:1.2}
.dim-text-controls__fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(9.5rem,100%),1fr));gap:.85rem}
.dim-text-controls__field{display:grid;align-content:start;gap:.35rem;min-width:0}
.dim-text-controls__field>label{font-size:.9rem;font-weight:700}
.dim-text-controls__field--text,.dim-text-controls__field--size{grid-column:1/-1}
.dim-text-controls__field :is(input,select,textarea){width:100%;min-width:0;min-height:44px;padding:.65rem;border:1px solid rgba(38,51,74,.5);border-radius:var(--radius-button,.4rem);background:var(--color-white,#fff);color:inherit;font:inherit}
.dim-text-controls__field textarea{min-height:5.5rem;resize:vertical}
.dim-text-controls__field input[type=range]{padding:.45rem 0;border:0;background:transparent;accent-color:var(--color-action,#c94839)}
.dim-text-controls__field--colour input[type=color]{width:44px;height:44px;padding:3px}
.dim-text-controls [aria-invalid=true]{border-color:var(--color-action,#c94839);outline:2px solid color-mix(in srgb,var(--color-action,#c94839) 25%,transparent)}
.dim-text-controls [data-dim-text-error]{margin:0;padding:.75rem;border-left:4px solid var(--color-action,#c94839);background:color-mix(in srgb,var(--color-action,#c94839) 8%,var(--color-white,#fff));line-height:1.45}
.dim-text-controls [data-dim-text-error][hidden]{display:none}
.dim-text-controls__swatches{display:flex;flex-wrap:wrap;gap:.5rem}
.dim-text-controls [data-dim-text-colour]{width:44px;height:44px;padding:0;border:2px solid var(--color-white,#fff);border-radius:50%;background:var(--dim-text-swatch,currentColor);box-shadow:0 0 0 1px rgba(38,51,74,.5);font-size:0}
.dim-text-controls [data-dim-text-colour][aria-pressed=true]{box-shadow:0 0 0 3px var(--color-action,#c94839)}
.dim-text-controls__disclosure{border-top:1px solid rgba(38,51,74,.18)}
.dim-text-controls__disclosure:last-of-type{border-bottom:1px solid rgba(38,51,74,.18)}
.dim-text-controls__disclosure>summary{display:flex;align-items:center;justify-content:space-between;gap:1rem;min-height:48px;padding:.65rem 0;cursor:pointer;font-weight:700;list-style:none}
.dim-text-controls__disclosure>summary::-webkit-details-marker{display:none}
.dim-text-controls__disclosure>summary::after{content:'+';flex:none;font-size:1.25rem;line-height:1}
.dim-text-controls__disclosure[open]>summary::after{content:'−'}
.dim-text-controls__disclosure-body{display:grid;gap:.85rem;padding:0 0 1rem}
.dim-text-controls__precision-fields{grid-template-columns:repeat(auto-fit,minmax(min(9.5rem,100%),1fr))}
.dim-text-controls__history,.dim-text-controls__actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.4rem}
.dim-text-controls__history button,.dim-text-controls__actions button{min-height:44px;padding:.45rem .6rem;border:0;background:transparent;color:inherit;font:inherit;text-decoration:underline;text-underline-offset:.18em}
.dim-text-controls [data-dim-text-placement-guidance]{margin:0;padding:.75rem;border-left:4px solid var(--color-navy,#26334a);background:color-mix(in srgb,var(--color-navy,#26334a) 7%,var(--color-white,#fff));line-height:1.45}
.dim-text-controls [data-dim-text-placement-guidance][hidden]{display:none}
.dim-text-controls button:focus-visible,.dim-text-controls summary:focus-visible,.dim-text-controls :is(input,select,textarea):focus-visible{outline:3px solid var(--color-action,#c94839);outline-offset:2px}
.dim-text-controls button:disabled,.dim-text-controls :is(input,select,textarea):disabled{cursor:not-allowed;opacity:.55}
@media(max-width:480px){.dim-text-controls__intro{display:none}.dim-text-controls [data-dim-text-layer-id]{padding-inline:.45rem;font-size:.8rem}.dim-text-controls__history,.dim-text-controls__actions{justify-content:center}.dim-text-controls__keyboard{display:none}}
@media(max-width:340px){.dim-text-controls__fields,.dim-text-controls__precision-fields{grid-template-columns:minmax(0,1fr)}.dim-text-controls__field--text,.dim-text-controls__field--size{grid-column:auto}.dim-text-controls [data-dim-text-list]{flex-wrap:wrap}.dim-text-controls [data-dim-text-layer-id]{flex-basis:calc(50% - .25rem)}}
@media(prefers-reduced-motion:reduce){.dim-text-controls *{scroll-behavior:auto!important;transition:none!important}}
