@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 16px;
  --bg: #171a1f;
  --panel: #21252c;
  --border: #373d46;
  --muted: #9099a6;
  --text: #e8ecf2;
  --accent: #ef686f;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background-image: radial-gradient(#313742 .6px, transparent .6px); background-size: 22px 22px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: not-allowed; opacity: .4; }
button, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible, .canvas:focus-visible { outline: 2px solid #f9959b; outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.micro-label { font-family: 'Space Grotesk', sans-serif; font-size: .6875rem; font-weight: 500; letter-spacing: .12em; color: #9aa3b1; }
/* Scale both responsive width limits together, preserving the supplied wordmark's proportions. */
.brand { --brand-scale: .6; position: absolute; left: 50%; top: 20px; transform: translateX(-50%); width: calc(min(680px,100vw - 160px) * var(--brand-scale)); height: auto; }
.controls-toggle { position: fixed; top: 25px; right: 28px; z-index: 15; display: flex; align-items: center; gap: 9px; border: 1px solid #424954; border-radius: 10px; padding: 10px 13px; background: #242930; box-shadow: 0 4px 20px #0002; font-size: .8125rem; transition: background .15s; }
.controls-toggle:hover { background: #303640; }
.controls-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.controls-toggle[aria-expanded=true] { background: #34303a; border-color: #7a525a; }
.workbench { min-height: 100dvh; height: 100dvh; padding: 110px 40px 40px; display: flex; flex-direction: column; transition: margin .22s; }
.stage { flex: 1; min-height: 150px; display: flex; align-items: center; justify-content: center; padding: 40px 24px 50px; margin-bottom: 32px; }
.canvas-cluster { position: relative; width: 430px; height: 430px; flex-shrink: 0; }
.canvas { width: 100%; height: 100%; position: relative; background-color: #e5e7e5; background-image: linear-gradient(45deg,#cbd0cd 25%,transparent 25%),linear-gradient(-45deg,#cbd0cd 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#cbd0cd 75%),linear-gradient(-45deg,transparent 75%,#cbd0cd 75%); background-size: 14px 14px; background-position: 0 0,0 7px,7px -7px,-7px 0; box-shadow: 0 18px 65px #0003; user-select: none; touch-action: pan-y; }
.canvas > svg { display: block; width: 100%; height: 100%; }
/* A 1px border plus a 1px gap sits outside the canvas without changing the artwork's dimensions. */
.canvas::after { content: ''; position: absolute; inset: -2px; border: 1px solid #65717f; pointer-events: none; }
.canvas-toolbar { position: absolute; bottom: calc(100% + 8px); left: 0; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.canvas-size { border: 0; background: none; padding: 0; font-family: 'Space Grotesk',sans-serif; font-size: .75rem; letter-spacing: .04em; color: #a5aeba; }
.canvas-size:hover { color: #fff; }
/* Anchor the action beside the lower right edge, leaving the artwork and bottom counts unobstructed. */
.canvas-fit { position: absolute; left: calc(100% + 10px); bottom: 0; display: grid; place-items: center; width: 27px; height: 27px; padding: 4px; border: 1px solid #424d5b; border-radius: 6px; background: #252c35; color: #aab6c5; }
.canvas-fit:hover { background: #343e4a; color: #fff; }
.canvas-fit svg, .small-test-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.corner { position: absolute; width: 10px; height: 10px; border-color: #788493; border-style: solid; pointer-events: none; }
.corner-tl { top: -6px; left: -6px; border-width: 1px 0 0 1px; }
.corner-br { bottom: -6px; right: -6px; border-width: 0 1px 1px 0; }
.counts { position: absolute; top: calc(100% + 19px); left: 50%; transform: translateX(-50%); white-space: nowrap; color: #949eac; font-size: .75rem; letter-spacing: .01em; display: flex; align-items: center; gap: 15px; }
.counts b { font-family: 'Space Grotesk',sans-serif; color: #c7d0dc; font-weight: 500; margin-right: 4px; }
.counts .count-divider { color: #505b69; }
/* The dock uses the spare left gutter, so opening it never changes or covers the centred composer. */
.small-test-dock { position: fixed; left: 25px; bottom: 45px; z-index: 10; width: min(360px,calc((100vw - 680px) / 2 - 50px)); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.small-test { width: 100%; min-width: 0; padding: 15px; border: 1px solid #424b58; border-radius: 12px; background: #22272f; box-shadow: 0 12px 35px #0003; }
.small-test-toggle { display: flex; align-items: center; gap: 8px; border: 1px solid #424954; border-radius: 8px; padding: 8px 11px; background: #242930; font-size: .75rem; }
.small-test-toggle:hover { background: #303640; }
.small-test-toggle[aria-expanded=true] { background: #34303a; border-color: #7a525a; }
.small-test-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px 12px; margin-bottom: 14px; }
.small-test .micro-label { font-size: .6875rem; white-space: nowrap; color: #7e8998; }
.small-test-unit { color: #7e8998; font-size: .625rem; }
/* Scroll oversized samples locally so their actual pixel dimensions never squeeze the composer or page. */
#small-previews { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; max-height: clamp(140px,30dvh,280px); overflow: auto; padding-bottom: 6px; scrollbar-width: thin; scrollbar-color: #515b68 transparent; }
#small-previews:focus-visible { outline: 2px solid #f9959b; outline-offset: 4px; }
.small-preview { display: flex; align-items: flex-start; gap: 12px; width: max-content; flex-shrink: 0; }
.small-preview .sample { width: max-content; flex-shrink: 0; }
/* SVG width and height are the measured sample size, independent of the available column width. */
.small-preview svg { display: block; flex-shrink: 0; max-width: none; }
.small-preview span { font: .6875rem/16px 'Space Grotesk', sans-serif; color: #8591a1; width: 22px; flex-shrink: 0; text-align: right; }
#small-previews.portrait { flex-direction: row; }
.portrait .small-preview { flex-direction: column; gap: 8px; }
.portrait .small-preview span { text-align: left; }
.input-area { width: min(100%,680px); min-width: 0; margin: 0 auto; flex-shrink: 0; }
.translation-heading { display: flex; align-items: center; gap: 12px; margin: 0 4px 9px; }
.translation-heading .micro-label { font-size: .6875rem; }
.translation-heading .text-button { padding: 0; font-size: .6875rem; color: #798595; }
.translation { display: flex; flex-wrap: wrap; gap: 7px; max-height: 104px; overflow: auto; scrollbar-width: thin; scrollbar-color: #515b68 transparent; margin-bottom: 12px; }
.letter { display: inline-flex; align-items: center; gap: 12px; padding: 7px 10px; border: 1px solid #343d48; border-radius: 6px; background: #20252c; font-family: 'Space Grotesk',sans-serif; font-size: .8125rem; line-height: 1; }
.letter .character { color: #b8c1ce; font-size: .75rem; }
.letter .code { letter-spacing: .1em; color: #edf0f4; white-space: nowrap; }
.line-break { align-self: center; font: .7rem 'Space Grotesk',sans-serif; color: #758395; padding: 2px 5px; }
.translation:empty:after { content: 'Your letters will appear here'; font-size: .75rem; color: #7d8999; padding: 4px; }
.composer { border: 1px solid #46505d; border-radius: 17px; background: #222730; padding: 16px 19px 12px; box-shadow: 0 10px 35px #0002; }
.composer:focus-within { border-color: #7a8494; box-shadow: 0 0 0 1px #7a849430,0 10px 35px #0002; }
.composer textarea { display: block; width: 100%; min-height: 48px; max-height: 150px; overflow-y: auto; padding: 0; border: 0; outline: none; resize: none; background: transparent; color: #f0f3f7; font-family: 'Space Grotesk',sans-serif; font-size: 1.125rem; line-height: 1.6; letter-spacing: .01em; }
.composer textarea:focus-visible { outline: none; }
.composer textarea::placeholder { color: #85909e; }
.composer-meta { display: flex; justify-content: space-between; gap: 20px; margin-top: 10px; font-size: .6875rem; color: #8e99aa; }
kbd { font: inherit; border: 1px solid #46505d; border-radius: 4px; padding: 1px 4px; margin-right: 4px; color: #b4becc; }
.notice { margin: 8px 4px 0; font-size: .75rem; color: #d8ad81; line-height: 1.45; min-height: 0; }
.notice:empty { display: none; }
.version, .export-hint { position: fixed; bottom: 15px; font-family: 'Space Grotesk',sans-serif; font-size: .6875rem; color: #7e8998; }
.version { left: 25px; }.version span { margin: 0 5px; color: #515e70; }.export-hint { right: 26px; font-family: 'DM Sans',sans-serif; }
.controls-panel { position: fixed; z-index: 20; top: 80px; right: 24px; bottom: 42px; width: 360px; border: 1px solid #424b58; background: #22272f; border-radius: 17px; box-shadow: 0 18px 70px #0006; display: flex; flex-direction: column; overflow: hidden; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 18px; border-bottom: 1px solid #373f4a; flex-shrink: 0; }
.panel-heading .micro-label { font-size: .625rem; }.panel-heading h1 { font: 500 1.4rem 'Space Grotesk',sans-serif; letter-spacing: -.045em; margin: 5px 0 0; }
.icon-button { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #a9b4c3; font-size: 25px; font-weight: 400; }
.icon-button:hover { background: #343c48; color: #fff; }
.controls-body { overflow: auto; scrollbar-width: thin; scrollbar-color: #505b6b transparent; flex: 1; min-height: 0; }
/* The slider, value field, and nudge arrows form one quiet control in the existing drawer palette. */
.controls-intro { margin: 0; padding: 16px 22px; border-bottom: 1px solid #38404c; color: #c3cbd7; font-size: .75rem; line-height: 1.7; }
.controls-intro span { color: var(--muted); font-size: .6875rem; }
.controls-body > details { border-bottom: 1px solid #38404c; padding: 0 22px; }
summary { display: flex; align-items: center; gap: 8px; padding: 19px 0; cursor: pointer; list-style: none; font-size: .875rem; font-weight: 550; }
summary::-webkit-details-marker { display: none; }
summary:after { content: '+'; font-size: 18px; font-weight: 400; color: #8896a8; margin-left: auto; }
details[open] summary:after { content: '−'; }
.section-caption { margin-left: auto; color: #8e9aac; font-size: .625rem; font-weight: 400; }
summary:has(.section-caption):after { margin-left: 3px; }
.control { margin: 0 0 22px; }
.control-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.control label, .toggle-row label, .select-row label, .color-row label, .dimension-field label { font-size: .8125rem; color: #c3cbd7; }
.value-field { display: flex; align-items: center; gap: 5px; border: 1px solid #424c59; border-radius: 6px; background: #191e25; padding-right: 8px; flex-shrink: 0; }
/* Composite fields own their focus treatment; outlining the inner input cuts across the unit or swatch. */
.value-field:focus-within, .color-input:focus-within { border-color: #de838b; box-shadow: 0 0 0 1px #de838b26; }
#controls input:focus-visible, #controls select:focus-visible { outline: none; }
#controls .dimension-field input:focus-visible, #controls select:focus-visible { border-color: #de838b; box-shadow: 0 0 0 1px #de838b26; }
.value-field > span { font: .6875rem 'Space Grotesk',sans-serif; color: #98a5b7; white-space: nowrap; }
.value-box, .dimension-field input { background: #191e25; border: 1px solid #404a58; border-radius: 5px; color: #e0e5ed; font-family: 'Space Grotesk',sans-serif; font-size: .75rem; padding: 6px; text-align: right; width: 62px; -moz-appearance: textfield; }
.value-field .value-box { border: 0; background: transparent; width: 58px; padding: 7px 0 7px 7px; }
.value-box::-webkit-inner-spin-button, .dimension-field input::-webkit-inner-spin-button { display: none; }
.range-track { display: grid; grid-template-columns: 30px minmax(0,1fr) 30px; align-items: center; gap: 10px; }
.range-nudge { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid #434d5b; border-radius: 6px; color: #c2cbd8; background: #2a313b; touch-action: none; user-select: none; transition: background .12s, border-color .12s, transform .12s; }
.range-nudge svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.range-nudge:hover:not(:disabled) { background: #40313c; border-color: #ba7780; color: #ffe2e6; }
.range-nudge:active:not(:disabled) { background: #62404b; transform: scale(.94); }
.range-nudge:disabled { opacity: .3; cursor: default; }
.range-rail { position: relative; min-width: 0; }
/* A full-height input preserves a comfortable hit area around the thin visual track. */
input[type=range] { --range-progress: 0%; appearance: none; -webkit-appearance: none; width: 100%; display: block; height: 28px; margin: 0; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: linear-gradient(to right,#d98790 var(--range-progress),#485260 var(--range-progress)); }
input[type=range]::-moz-range-track { height: 3px; border-radius: 3px; background: linear-gradient(to right,#d98790 var(--range-progress),#485260 var(--range-progress)); }
input[type=range]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4.5px; border: 2px solid #f4abb1; border-radius: 50%; background: #dd7c86; box-shadow: 0 1px 5px #0004; }
input[type=range]::-moz-range-thumb { width: 9px; height: 9px; border: 2px solid #f4abb1; border-radius: 50%; background: #dd7c86; box-shadow: 0 1px 5px #0004; }
input[type=range]:active::-webkit-slider-thumb { box-shadow: 0 0 0 5px #dd7c8626; }
input[type=range]:active::-moz-range-thumb { box-shadow: 0 0 0 5px #dd7c8626; }
/* Keyboard focus follows the slider thumb instead of framing the invisible input hit area. */
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px #22272f,0 0 0 5px #de838b; }
input[type=range]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px #22272f,0 0 0 5px #de838b; }
.range-zero { position: absolute; top: 20px; width: 1px; height: 4px; background: #8c97a7; pointer-events: none; }
.range-scale { display: flex; align-items: center; justify-content: space-between; min-height: 19px; margin: 1px 40px 0; color: #929fb0; font: .625rem 'Space Grotesk',sans-serif; }
.zero-gap { padding: 4px 6px; margin: 0 -4px; border: 0; border-radius: 4px; background: transparent; color: #b8a0a8; font: inherit; }
.zero-gap:hover:not(:disabled) { color: #ffd0d7; background: #44343d; }
.zero-gap:disabled { cursor: default; }
.control-hint { margin: 5px 0 0; color: #929fb0; font-size: .6875rem; line-height: 1.5; }
.is-inactive .range-track, .is-inactive .value-field, .is-inactive .range-scale { opacity: .4; }
.is-inactive input[type=range] { cursor: not-allowed; }
.is-inactive .range-nudge:disabled { opacity: 1; }
.control-subheading { margin: 22px 0 16px; padding-top: 18px; border-top: 1px solid #38404c; font: .625rem 'Space Grotesk',sans-serif; letter-spacing: .1em; color: #97a4b6; }
.section-footer { display: flex; justify-content: flex-end; margin: -1px 0 18px; }
.section-footer .text-button { font-size: .6875rem; color: #98a5b7; padding: 4px 0; }
.section-footer .text-button:hover { color: #ffd0d7; }
.section-footer span { margin-right: 3px; }
.fit-content-button { display: flex; align-items: center; justify-content: space-between; width: 100%; margin: -4px 0 22px; border: 1px solid #485463; border-radius: 6px; background: #2a313b; padding: 10px; font-size: .75rem; }
.fit-content-button:hover:not(:disabled) { background: #343c48; border-color: #7a8494; }
.toggle-row small { display: block; margin-top: 4px; color: #929fb0; font-size: .6875rem; font-weight: 400; line-height: 1.5; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 19px; }
.switch { appearance: none; margin: 0; width: 30px; height: 18px; border-radius: 20px; background: #4a5463; position: relative; cursor: pointer; flex-shrink: 0; }
.switch:disabled { opacity: .4; cursor: not-allowed; }
#controls .switch:focus-visible, #controls .color-label input:focus-visible { outline: 2px solid #de838b; outline-offset: 2px; }
.switch:after { content: ''; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: #f5f6f8; transition: transform .15s; }.switch:checked { background: #df666e; }.switch:checked:after { transform: translateX(12px); }
.select-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 19px; }
/* Let labels wrap on narrow screens rather than squeezing option text into the chevron's reserved space. */
.select-row select { flex-shrink: 0; }
/* Keep the native menu and keyboard behavior, with predictable space for the closed control's chevron. */
select { appearance: none; -webkit-appearance: none; color: #dde4ed; background-color: #2c3440; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%23abb7c8' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 12px 12px; border: 1px solid #485463; border-radius: 5px; padding: 7px 32px 7px 10px; font-size: .75rem; max-width: 160px; min-width: 0; cursor: pointer; }
.control-help { font-size: .75rem; color: #98a5b7; line-height: 1.6; margin: -3px 0 19px; }
.direction-label { font: .625rem 'Space Grotesk',sans-serif; letter-spacing: .09em; color: #8e9bb0; margin: 0 0 9px; }
.direction-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; margin-bottom: 17px; }
.direction-button { border: 1px solid #434e5d; background: #29313c; border-radius: 6px; padding: 9px 4px; display: flex; flex-direction: column; align-items: center; gap: 7px; color: #abb7c8; font-size: .625rem; min-width: 0; }
.direction-button svg { width: 23px; height: 21px; stroke: currentColor; stroke-width: 1.6; fill: none; }
.direction-button[aria-pressed=true] { border-color: #de838b; background: #43323d; color: #ffe8ec; }
.dimensions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 19px; }.dimension-field label { display: block; margin-bottom: 8px; }.dimension-field input { width: 100%; text-align: left; padding: 8px 10px; font-size: .875rem; }
.color-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 15px; }
.color-label { display: flex; align-items: center; gap: 8px; }.color-label input { accent-color: #ed7f88; width: 13px; height: 13px; margin: 0; cursor: pointer; }
.color-input { display: flex; align-items: center; gap: 7px; padding: 4px 6px; border: 1px solid #455161; background: #29313d; border-radius: 5px; }.color-input input[type=color] { border: 0; background: none; width: 22px; height: 22px; padding: 0; cursor: pointer; }.color-input input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }.color-input input[type=color]::-webkit-color-swatch { border: 0; border-radius: 3px; }.color-input input[type=text] { background: transparent; border: 0; padding: 0; width: 65px; color: #d0d9e5; font: .6875rem 'Space Grotesk',sans-serif; }.color-input:has(input:disabled) { opacity: .4; }
.panel-reset { display: flex; align-items: center; justify-content: space-between; padding: 15px 22px; flex-shrink: 0; font-size: .6875rem; color: #909db0; }.text-button { border: 0; padding: 0; background: transparent; color: #b6c0ce; font-size: .75rem; }.text-button:hover { color: #fff; }
.share-fallback { padding: 12px 22px 0; flex-shrink: 0; }
.share-fallback label { display: block; margin-bottom: 7px; font-size: .75rem; color: #c3cbd7; }
.share-fallback input { width: 100%; min-width: 0; padding: 8px; border: 1px solid #485463; border-radius: 5px; background: #191e25; color: #e0e5ed; font-size: .75rem; }
.svg-code-dialog { width: min(640px,calc(100vw - 40px)); padding: 22px; border: 1px solid #4c5767; border-radius: 14px; background: #252d39; color: var(--text); }
.svg-code-dialog::backdrop { background: #0d1116b3; }
.svg-code-dialog h2 { margin: 0 0 12px; font: 500 1.2rem 'Space Grotesk',sans-serif; }
.svg-code-dialog p { margin: 0 0 16px; color: #a1afc2; font-size: .875rem; line-height: 1.5; }
.svg-code-dialog textarea { display: block; width: 100%; height: min(280px,40dvh); padding: 12px; resize: vertical; border: 1px solid #485463; border-radius: 6px; background: #191e25; color: #e0e5ed; font: .75rem/1.5 monospace; }
.svg-code-dialog form { display: flex; justify-content: flex-end; margin-top: 18px; }
.context-menu { position: fixed; z-index: 40; width: 228px; border: 1px solid #4c5767; border-radius: 12px; padding: 7px; background: #252d39; box-shadow: 0 15px 55px #0006; }
.menu-caption { display: block; padding: 9px 10px 10px; font: .625rem 'Space Grotesk',sans-serif; letter-spacing: .1em; color: #93a2b8; }
.context-menu button { width: 100%; border: 0; border-radius: 7px; background: transparent; padding: 11px 10px; display: flex; align-items: center; justify-content: space-between; gap: 14px; text-align: left; font-size: .875rem; }.context-menu button:hover,.context-menu button:focus { background: #364354; outline: none; }.context-menu small { display: block; font-size: .6875rem; color: #a1afc2; margin-top: 4px; }.file-tag { font: .625rem 'Space Grotesk',sans-serif; color: #bac9de; border: 1px solid #58677b; border-radius: 4px; padding: 3px 5px; }
.toast { position: fixed; left: 50%; top: 82px; transform: translate(-50%,-5px); z-index: 60; pointer-events: none; opacity: 0; padding: 10px 18px; border-radius: 9px; background: #e7ecf1; color: #202630; font-size: .8125rem; box-shadow: 0 8px 30px #0004; transition: opacity .18s,transform .18s; }.toast.visible { opacity: 1; transform: translate(-50%,0); }
.empty-state { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: #858e96; font-size: .8125rem; gap: 12px; background: transparent; }.empty-state span { font: 1.8rem 'Space Grotesk',sans-serif; color: #c2c8cb; letter-spacing: .2em; }

@media(min-width:1150px) { body.controls-open .workbench { margin-right: 388px; } }
@media(min-width:1588px) { body.controls-open .small-test-dock { width: min(360px,calc((100vw - 1068px) / 2 - 50px)); } }
/* Hide both the panel and its toggle when the left gutter is too narrow, including beside an open drawer. */
@media(max-width:1199px) { .small-test-dock { display: none; } }
@media(max-width:1587px) { body.controls-open .small-test-dock { display: none; } }
@media(min-width:1700px) { .workbench { padding-top: 110px; padding-bottom: 52px; }.brand { top: 33px; }.stage { padding-bottom: 52px; } }
@media(max-width:950px) { .controls-toggle span { display: none; }.workbench { padding-left: 25px; padding-right: 25px; }.export-hint { display: none; }.counts { gap: 10px; font-size: .6875rem; } }
@media(max-width:680px) {
  .brand { left: 50%; transform: translateX(-50%); top: 30px; width: calc(min(460px,100vw - 124px) * var(--brand-scale)); height: auto; }
  .controls-toggle { top: 22px; right: 17px; padding: 9px; }.controls-toggle span { display: none; }
  .workbench { padding: 98px 22px 37px; min-height: 100dvh; height: 100dvh; }
  .stage { padding: 38px 14px 44px; min-height: 150px; margin-bottom: 24px; }
  .counts { top: calc(100% + 15px); gap: 9px; font-size: .625rem; }.counts .count-divider { display: none; }
  .translation-heading { gap: 8px; flex-wrap: wrap; }.translation { max-height: 64px; gap: 5px; margin-bottom: 10px; }.letter { padding: 6px 8px; gap: 8px; font-size: .75rem; }.composer { padding: 13px 10px 10px; border-radius: 14px; }.composer textarea { width: 100%; font-size: 1rem; min-height: 42px; max-height: 94px; }.composer-meta { font-size: .625rem; margin-top: 7px; flex-wrap: wrap; gap: 6px; }
  .version { left: 21px; bottom: 11px; font-size: .625rem; }.canvas-size { font-size: .6875rem; }
  .controls-panel { width: calc(100% - 24px); top: 72px; right: 12px; bottom: 18px; max-width: 420px; }.panel-backdrop { position: fixed; inset: 0; z-index: 18; background: #0d1116a3; backdrop-filter: blur(3px); }
  .notice { font-size: .6875rem; }.toast { top: 73px; max-width: 90vw; text-align: center; width: max-content; }
}
@media(max-height:690px) and (min-width:681px) { .workbench { padding-top: 100px; padding-bottom: 30px; }.stage { padding-top: 26px; padding-bottom: 42px; }.composer textarea { min-height: 30px; max-height: 70px; }.composer { padding-top: 11px; }.translation { max-height: 42px; }.small-test #small-previews { gap: 11px; }.notice { font-size: .6875rem; } }
/* Give fingers more room without changing the compact controls used with a mouse. */
@media(pointer:coarse) {
  .range-track { grid-template-columns: 40px minmax(0,1fr) 40px; gap: 8px; }
  .range-nudge { width: 40px; height: 40px; }
  .range-scale { margin-left: 48px; margin-right: 48px; }
}
/* High-contrast modes can suppress background images and shadows; restore system focus and arrows there. */
@media(forced-colors:active) {
  select { appearance: auto; -webkit-appearance: auto; background-image: none; padding-right: 8px; }
  #controls input:focus-visible, #controls select:focus-visible { outline: 2px solid Highlight; outline-offset: 2px; }
  .value-field:focus-within, .color-input:focus-within { border-color: Highlight; }
}
@media(prefers-reduced-motion:reduce) { *, *:before, *:after { transition: none !important; } }
