:root {
  color-scheme: light;
  --ink: #202a26;
  --muted: #748079;
  --line: #dce4de;
  --paper: #f2f5f2;
  --panel: #fbfcfa;
  --accent: #c85b43;
  --mono: "DM Mono", monospace;
  --sans: "Manrope", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #edf2ed;
  --muted: #a8b5ac;
  --line: #35433a;
  --paper: #1d2621;
  --panel: #26312b;
  --accent: #ee947b;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.app-shell { min-height: 100vh; padding: 0 clamp(18px, 2.5vw, 40px); }
.topbar { min-height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 17px; font-weight: 800; letter-spacing: 0; }
.brand-light { color: #8a8b83; font-weight: 500; }
.brand-mark { display: grid; width: 25px; height: 25px; grid-template-columns: 1fr 1fr; gap: 3px; transform: rotate(-8deg); }
.brand-mark i { background: #263a32; border-radius: 2px; }
.brand-mark i:nth-child(2) { background: #c85b43; border-radius: 50%; }
.brand-mark i:nth-child(3) { background: #6c9b79; border-radius: 50% 2px 50% 2px; }
.brand-mark i:nth-child(4) { background: #e3bd69; }
.topbar-meta, .eyebrow, .panel-foot, .keyboard-hint, .stage-caption, .preview-footer { font: 10px var(--mono); letter-spacing: 0; }
.topbar-meta { display: flex; align-items: center; gap: 9px; color: #777970; }
.status-dot, .live-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #4e8a6d; }
.theme-control { display: inline-flex; align-items: center; gap: 8px; color: #777970; font-size: 10px; font-weight: 700; cursor: pointer; }
.theme-control > svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.theme-switch { display: inline-block; flex: none; }
.button { border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-size: 12px; font-weight: 700; transition: transform .18s ease, background .18s ease; }
.button:hover { transform: translateY(-2px); }
.button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.button-dark { min-height: 40px; padding: 0 15px; color: #fff; background: #b84e38; border-radius: 7px; }
.button-dark:hover { background: #963d2c; }
.workspace { width: 100%; min-height: calc(100vh - 82px); display: grid; grid-template-columns: minmax(280px, 334px) minmax(0, 1fr); }
.editor-panel { padding: 42px 31px 22px 3px; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.panel-heading { padding-bottom: 28px; }
.eyebrow { color: #86877f; }
.panel-heading .eyebrow { display: flex; justify-content: space-between; max-width: 250px; }
.panel-heading h1 { margin: 17px 0 7px; font-size: clamp(36px, 3.4vw, 48px); line-height: 1.03; font-weight: 700; letter-spacing: 0; }
.panel-heading h1 em { font-family: Georgia, serif; font-weight: 400; color: #c85b43; }
.panel-heading p { margin: 12px 0 0; color: #85867e; font-size: 12px; }
.control-section { padding: 19px 0 20px; border-top: 1px solid var(--line); }
.section-title { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.section-title > span { color: #92938c; font: 10px var(--mono); }
.section-title h2 { margin: 0; font-size: 13px; font-weight: 700; }
.field-label { display: block; margin: 0 0 8px; color: #6d6f68; font-size: 11px; font-weight: 600; }
.color-control { height: 39px; display: flex; align-items: center; padding: 4px 9px 4px 5px; border: 1px solid #dce3ee; border-radius: 8px; background: #fff; }
.color-control input[type="color"] { width: 27px; height: 27px; padding: 0; border: 0; border-radius: 2px; background: transparent; cursor: pointer; }
.color-control input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-control input[type="color"]::-webkit-color-swatch { border: 1px solid #00000012; border-radius: 2px; }
.hex-input { width: 82px; margin-left: 9px; padding: 4px 0; border: 0; outline: 0; background: transparent; color: #5e6059; font: 11px var(--mono); }
.color-chip { width: 5px; height: 19px; margin-left: auto; border-radius: 4px; background: var(--accent); }
.custom-color-picker { display: grid; gap: 9px; }
.background-color-trigger { width: 100%; min-height: 42px; display: flex; align-items: center; gap: 10px; padding: 5px 11px 5px 6px; border: 1px solid #dce3ee; border-radius: 8px; background: #fff; color: #3a465a; font: 11px var(--mono); text-align: left; cursor: pointer; }
.background-color-trigger:hover { border-color: #9bb6e1; }
.picked-color { width: 29px; height: 29px; flex: none; border: 1px solid #00000014; border-radius: 7px; background: #eaf2ff; }
.color-trigger-caret { margin-left: auto; color: #72809a; font: 15px var(--sans); }
.color-picker-popover { position: fixed; z-index: 100; width: 270px; display: grid; gap: 9px; padding: 11px; border: 1px solid #d7e0ec; border-radius: 11px; background: #fcfdff; box-shadow: 0 10px 30px #22324d35; }
.picker-value-row .hex-input { width: 100%; margin: 0; padding: 5px 0; color: #30394a; }
.picker-current-color { width: 27px; height: 27px; flex: none; border: 1px solid #00000014; border-radius: 6px; background: #eaf2ff; }
.color-spectrum { position: relative; height: 112px; overflow: hidden; border: 1px solid #00000012; border-radius: 8px; outline-color: #c85b43; background-color: hsl(var(--picker-hue, 218deg) 100% 50%); background-image: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, transparent); cursor: crosshair; touch-action: none; }
.spectrum-thumb { position: absolute; left: var(--picker-saturation, 8%); top: calc(100% - var(--picker-brightness, 100%)); width: 17px; height: 17px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 1px 4px #0008; transform: translate(-50%, -50%); pointer-events: none; }
.picker-hue-label { display: flex; justify-content: space-between; color: #68768a; font-size: 10px; font-weight: 600; }
.picker-hue-label output { font: 10px var(--mono); }
.picker-hue { width: 100%; height: 13px; margin: -4px 0 0; appearance: none; border-radius: 10px; background: linear-gradient(to right, #f33, #ff0, #0f0, #0ff, #00f, #f0f, #f33); cursor: pointer; }
.picker-hue::-webkit-slider-thumb { width: 15px; height: 15px; appearance: none; border: 2px solid #fff; border-radius: 50%; background: #c85b43; box-shadow: 0 1px 4px #0005; }
.picker-hue::-moz-range-thumb { width: 11px; height: 11px; border: 2px solid #fff; border-radius: 50%; background: #c85b43; box-shadow: 0 1px 4px #0005; }
.picker-swatches { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.preset-swatch { width: 100%; aspect-ratio: 1; padding: 0; border: 2px solid #fff; border-radius: 6px; background: var(--swatch); box-shadow: 0 0 0 1px #d9e1ec; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.preset-swatch:hover { transform: translateY(-1px); }
.preset-swatch.selected { box-shadow: 0 0 0 2px #c85b43; }
.background-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin: -1px 0 9px; padding: 3px; border: 1px solid #dce4de; border-radius: 9px; background: #edf1ed; }
.background-mode { min-height: 27px; border: 0; border-radius: 7px; background: transparent; color: #69778d; font-size: 10px; font-weight: 600; cursor: pointer; }
.background-mode.selected { background: #fff; color: #a84b36; box-shadow: 0 1px 4px #28385818; }
.gradient-controls { display: grid; gap: 8px; }
.gradient-colors { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.gradient-color-field { min-width: 0; min-height: 39px; display: flex; align-items: center; justify-content: space-between; padding: 4px 7px 4px 9px; border: 1px solid #dce3ee; border-radius: 8px; background: #fff; color: #69778d; font-size: 10px; font-weight: 600; }
.gradient-color-trigger { width: 27px; height: 27px; padding: 0; border: 1px solid #00000012; border-radius: 7px; background: var(--swatch); cursor: pointer; }
.gradient-angle-wrap select { height: 34px; }
.gradient-angle-wrap .select-caret { top: 7px; }
.fa-glyph { font-family: "Font Awesome 6 Free"; font-weight: 900; }
.icon-choice-row { min-height: 46px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 5px 6px 5px 9px; border: 1px solid #dce3ee; border-radius: 9px; background: #fff; }
.selected-icon-preview { display: grid; place-items: center; width: 30px; height: 30px; color: #b84e38; font-size: 20px; }
.selected-icon-name { overflow: hidden; color: #36445a; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.icon-picker-button { min-height: 32px; display: inline-flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid #ead6cf; border-radius: 7px; background: #faeee9; color: #964330; font-size: 10px; font-weight: 700; cursor: pointer; }
.icon-picker-button:hover { background: #f6e2dc; }
.icon-picker-button span { font-size: 14px; }
.icon-dialog { width: min(640px, calc(100vw - 28px)); max-width: none; max-height: min(760px, calc(100dvh - 32px)); padding: 20px; overflow: hidden; border: 1px solid #d8e2ef; border-radius: 16px; background: #fcfdff; color: #273347; box-shadow: 0 24px 80px #13233f42; }
.icon-dialog::backdrop { background: #17253d73; backdrop-filter: blur(3px); }
.icon-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 16px; }
.icon-dialog-header h2 { margin: 5px 0 0; font-size: 19px; }
.icon-dialog-close { width: 36px; height: 36px; border: 1px solid #dce3ee; border-radius: 10px; background: #fff; color: #53627a; font-size: 24px; line-height: 1; cursor: pointer; }
.icon-search-wrap { min-height: 42px; display: flex; align-items: center; gap: 9px; padding: 0 11px; border: 1px solid #dce3ee; border-radius: 9px; background: #fff; color: #76849a; }
.icon-search-wrap > span { font-size: 22px; }
.icon-search-wrap input { width: 100%; border: 0; outline: 0; background: transparent; color: #273347; font-size: 12px; }
.icon-filter-row { display: flex; gap: 6px; margin: 12px 0; overflow-x: auto; }
.icon-filter { min-height: 30px; padding: 0 12px; border: 1px solid #dce3ee; border-radius: 18px; background: #fff; color: #66748a; font-size: 10px; font-weight: 700; cursor: pointer; }
.icon-filter.selected { border-color: #d9a396; background: #faeae5; color: #964330; }
.icon-grid { max-height: min(52vh, 410px); display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 7px; padding: 2px 2px 4px; overflow: auto; overscroll-behavior: contain; }
.icon-library-option { min-width: 0; min-height: 76px; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 8px 4px; border: 1px solid #e1e7f0; border-radius: 10px; background: #fff; color: #3b4a61; cursor: pointer; transition: border-color .14s ease, background .14s ease, color .14s ease, transform .14s ease; }
.icon-library-option:hover { transform: translateY(-1px); border-color: #aac3e9; background: #f3f7ff; color: #315f9f; }
.icon-library-option[aria-selected="true"] { border-color: #c85b43; background: #faeae5; color: #964330; box-shadow: inset 0 0 0 1px #c85b43; }
.icon-library-option .fa-glyph { font-size: 23px; }
.icon-library-option > span:last-child { max-width: 100%; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.icon-dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; color: #8591a4; font: 9px var(--mono); }
.icon-dialog-counts { display: flex; flex-direction: column; gap: 4px; }
.icon-dialog-actions { display: flex; align-items: center; gap: 6px; }
.icon-dialog-action { min-height: 32px; padding: 0 9px; border: 1px solid #dce3ee; border-radius: 6px; background: #fff; color: #53627a; font: 10px var(--sans); font-weight: 700; cursor: pointer; }
.icon-dialog-action:hover { border-color: #d9a396; background: #faeee9; }
.icon-dialog-action:disabled { opacity: .45; cursor: not-allowed; }
.icon-dialog-apply { border-color: #b84e38; background: #b84e38; color: #fff; }
.icon-dialog-apply:hover { border-color: #963d2c; background: #963d2c; }
.size-mode-label { margin-top: 14px; }
.size-mode-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; border: 1px solid #dce3ee; border-radius: 9px; background: #edf1f7; }
.size-mode-option { min-height: 30px; border: 0; border-radius: 6px; background: transparent; color: #68768a; font-size: 10px; font-weight: 700; cursor: pointer; }
.size-mode-option.selected { background: #fff; color: #2f5fae; box-shadow: 0 1px 4px #28385818; }
.placement-label { margin-top: 14px; }
.placement-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 3px; border: 1px solid #dce3ee; border-radius: 9px; background: #edf1f7; }
.placement-option { min-height: 29px; padding: 0 4px; border: 0; border-radius: 6px; background: transparent; color: #68768a; font-size: 9px; font-weight: 700; cursor: pointer; transition: background .16s ease, color .16s ease, box-shadow .16s ease; }
.placement-option:hover { color: #b84e38; }
.placement-option.selected { background: #fff; color: #a84b36; box-shadow: 0 1px 4px #28385818; }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; width: 100%; height: 39px; padding: 0 33px 0 11px; border: 1px solid #dce3ee; border-radius: 8px; background: #fff; color: #30394a; font-size: 11px; outline-color: #7da4e7; cursor: pointer; }
.select-caret { position: absolute; right: 12px; top: 9px; color: #777970; font-size: 15px; pointer-events: none; }
.palette-label { margin-top: 13px; }
.custom-palette-controls { display: grid; gap: 7px; margin-top: 9px; }
.palette-hint { color: #71809a; font-size: 10px; font-weight: 600; }
.custom-palette { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.custom-palette-color { display: block; width: 100%; aspect-ratio: 1; padding: 3px; border: 2px solid #fff; border-radius: 8px; background: var(--swatch); box-shadow: 0 0 0 1px #d9e1ec; cursor: pointer; transition: box-shadow .15s ease, transform .15s ease; }
.custom-palette-color:hover { transform: translateY(-1px); }
.rainbow-row { display: flex; align-items: center; gap: 10px; margin-top: 15px; cursor: pointer; }
.rainbow-icon { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid #e3e1d8; border-radius: 50%; color: #ef7962; font-size: 19px; }
.rainbow-copy { display: flex; flex: 1; flex-direction: column; gap: 2px; }
.rainbow-copy strong, .resolution-label strong { font-size: 11px; font-weight: 700; }
.rainbow-copy small, .resolution-label small { color: #92938b; font-size: 9px; }
.switch { position: relative; width: 33px; height: 19px; }
.switch input { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch-track { position: absolute; inset: 0; border-radius: 12px; background: #d5d5ce; transition: background .2s; pointer-events: none; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: white; box-shadow: 0 1px 2px #0002; transition: transform .2s; }
.switch input:checked + .switch-track { background: #c85b43; }
.switch input:checked + .switch-track::after { transform: translateX(14px); }
.switch input:focus-visible + .switch-track { outline: 2px solid #477bd5; outline-offset: 2px; }
.sliders-section { padding-bottom: 15px; }
.range-label { display: flex; justify-content: space-between; margin: 0 0 6px; color: #6d6f68; font-size: 10px; font-weight: 600; }
.range-label output { color: #85877f; font: 10px var(--mono); }
.range-input { width: 100%; height: 14px; margin: 0; appearance: none; background: transparent; cursor: pointer; }
.range-input::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: linear-gradient(to right, #c85b43 0%, #c85b43 42%, #dce4de 42%, #dce4de 100%); }
.range-input::-moz-range-track { height: 3px; border-radius: 2px; background: #dce3ee; }
.range-input::-webkit-slider-thumb { width: 12px; height: 12px; margin-top: -4.5px; appearance: none; border: 2px solid #fff; border-radius: 50%; background: #c85b43; box-shadow: 0 0 0 1px #c85b43; }
.range-input::-moz-range-thumb { width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; background: #c85b43; box-shadow: 0 0 0 1px #c85b43; }
.scale-label { margin-top: 11px; }
.opacity-label { margin-top: 11px; }
.muted-label { margin-top: 11px; }
.button-random { width: 100%; min-height: 41px; margin-top: auto; padding: 0 13px; border: 1px solid #d7e0ee; border-radius: 8px; background: transparent; font-size: 11px; }
.button-random:hover { background: #f7ece8; }
.button-random svg { width: 16px; height: 16px; }
.button-random > span { margin-left: auto; color: #83847c; font-size: 16px; }
.panel-foot { display: flex; justify-content: space-between; margin-top: 18px; color: #a3a49b; font-size: 9px; }
.panel-foot span:last-child { color: #c85b43; font-size: 15px; }

.preview-panel { min-width: 0; padding: 27px 0 18px 35px; display: flex; flex-direction: column; }
.preview-toolbar { min-height: 35px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.preview-title { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.preview-title strong { font-weight: 700; }
.live-dot { width: 6px; height: 6px; }
.preview-divider { color: #c2c2b9; }
.preview-title > span:last-child { color: #898a82; }
.keyboard-hint { color: #a3a49b; font-size: 9px; }
.canvas-stage { position: relative; flex: 1; min-height: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 48px 45px; overflow: hidden; background-color: #edf1ed; background-image: linear-gradient(#dfe6df 1px, transparent 1px), linear-gradient(90deg, #dfe6df 1px, transparent 1px); background-size: 22px 22px; }
.canvas-frame { position: relative; width: min(100%, 1280px); aspect-ratio: 16 / 9; overflow: hidden; background: #f3eee7; border-radius: 6px; box-shadow: 0 18px 45px #24332b24, 0 2px 6px #24332b18; animation: appear .48s ease both; transition: aspect-ratio .25s ease; }
.canvas-frame.ratio-ultrawide { aspect-ratio: 21 / 9; }
.canvas-frame.ratio-phone { width: auto; height: min(54vh, 460px); aspect-ratio: 9 / 19.5; }
.canvas-frame.ratio-square { width: min(77%, 560px); aspect-ratio: 1; }
#wallpaper-canvas { display: block; width: 100%; height: 100%; }
.canvas-stamp { position: absolute; right: 15px; bottom: 13px; display: flex; align-items: center; gap: 5px; color: #252923bb; mix-blend-mode: multiply; }
.canvas-stamp > span:first-child { font: italic 20px Georgia, serif; }
.canvas-stamp > span:last-child { font: 6px var(--mono); line-height: 1.3; }
.stage-caption { position: absolute; right: 0; bottom: 14px; left: 0; display: flex; justify-content: space-between; color: #909189; font-size: 9px; }
.export-panel { padding: 24px 0 19px; border-bottom: 1px solid var(--line); }
.export-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 15px; }
.export-heading h2 { margin: 5px 0 0; font-size: 17px; font-weight: 700; }
.export-step { color: #a1a299; font: 10px var(--mono); }
.export-step i { color: #d3d2ca; font-style: normal; }
.format-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.format-option { position: relative; min-width: 0; min-height: 67px; display: grid; grid-template-columns: 39px 1fr; grid-template-rows: 1fr 1fr; align-items: center; padding: 9px 10px; border: 1px solid #dce3ee; border-radius: 8px; background: #fff; text-align: left; cursor: pointer; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.format-option:hover { border-color: #9bb6e1; }
.format-option.selected { border-color: #c85b43; background: #fbefeb; box-shadow: inset 0 0 0 1px #c85b43; }
.format-icon { grid-row: 1 / span 2; display: grid; place-items: center; width: 30px; height: 30px; }
.format-icon i { display: block; border: 1.3px solid #8b8d84; border-radius: 1px; }
.selected .format-icon i { border-color: #477bd5; }
.landscape i { width: 27px; height: 17px; }
.ultrawide-icon i { width: 30px; height: 13px; }
.portrait i { width: 14px; height: 26px; }
.square-icon i { width: 21px; height: 21px; }
.format-name { overflow: hidden; color: #343630; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.format-ratio { color: #92938a; font: 9px var(--mono); }
.resolution-row { min-height: 62px; display: flex; align-items: end; justify-content: space-between; gap: 15px; padding-top: 15px; }
.resolution-label { display: flex; align-items: center; gap: 9px; }
.resolution-label > span:last-child { display: flex; flex-direction: column; gap: 3px; }
.resolution-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: #f7e9e4; color: #a84b36; font-size: 17px; }
.resolution-select-wrap { position: relative; min-width: 180px; }
.resolution-select-wrap select { width: 100%; height: 36px; padding: 0 30px 0 11px; appearance: none; border: 1px solid #dce3ee; border-radius: 8px; outline-color: #7da4e7; background: #fff; color: #30394a; font-size: 10px; cursor: pointer; }
.resolution-select-wrap > span { position: absolute; top: 7px; right: 11px; color: #777970; pointer-events: none; }
.preview-footer { display: flex; justify-content: space-between; padding-top: 15px; color: #a3a49b; font-size: 9px; }
.preview-footer b { color: #777970; font-weight: 400; }
@keyframes appear { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (min-height: 900px) {
  .editor-panel { padding-top: 52px; }
  .canvas-stage { min-height: 470px; }
  .preview-panel { padding-top: 38px; }
}
@media (max-width: 1050px) {
  .app-shell { padding: 0 3%; }
  .workspace { grid-template-columns: minmax(260px, 300px) minmax(0, 1fr); }
  .editor-panel { padding-right: 22px; }
  .preview-panel { padding-left: 24px; }
  .canvas-stage { padding-right: 26px; padding-left: 26px; }
  .format-grid { gap: 6px; }
  .format-option { grid-template-columns: 32px 1fr; padding: 8px 6px; }
}
@media (max-width: 760px) {
  .app-shell { padding: 0 19px; }
  .topbar { min-height: 68px; }
  .topbar-meta { display: none; }
  .theme-label-text { display: none; }
  .button-dark { min-height: 37px; padding: 0 10px; font-size: 10px; }
  .button-dark svg { width: 15px; }
  .workspace { min-height: auto; display: flex; flex-direction: column; }
  .editor-panel { order: 2; padding: 28px 0 22px; border-right: 0; }
  .panel-heading { padding-bottom: 20px; }
  .panel-heading h1 { font-size: 39px; }
  .panel-heading h1 br { display: none; }
  .panel-heading .eyebrow { max-width: none; }
  .control-section { padding: 17px 0; }
  .button-random { margin-top: 10px; }
  .preview-panel { order: 1; padding: 20px 0 18px; }
  .preview-toolbar { min-height: 31px; }
  .keyboard-hint { font-size: 8px; }
  .canvas-stage { min-height: 280px; padding: 24px 15px 37px; }
  .canvas-frame { width: 100%; }
  .canvas-frame.ratio-phone { height: min(42vh, 320px); }
  .canvas-frame.ratio-square { width: min(82%, 410px); }
  .stage-caption { bottom: 11px; font-size: 8px; }
  .export-panel { padding-top: 21px; }
  .format-option { min-height: 63px; grid-template-columns: 1fr; grid-template-rows: 26px auto; padding: 7px; }
  .icon-dialog { padding: 15px; }
  .icon-grid { grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); }
  .icon-dialog-footer { align-items: stretch; flex-direction: column; gap: 9px; }
  .icon-dialog-counts { flex-direction: row; justify-content: space-between; }
  .icon-dialog-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .icon-dialog-action { padding: 0 5px; font-size: 9px; }
  .format-icon { display: none; }
  .format-name { font-size: 9px; }
  .format-ratio { font-size: 8px; }
  .resolution-row { align-items: center; }
  .resolution-select-wrap { min-width: 145px; max-width: 48%; }
  .preview-footer { padding-bottom: 0; }
}
@media (max-width: 380px) {
  .app-shell { padding: 0 13px; }
  .brand { font-size: 15px; }
  .button-dark span { display: none; }
  .button-dark { width: 39px; padding: 0; }
  .format-grid { gap: 5px; }
  .format-option { padding: 6px 5px; }
  .resolution-label small { font-size: 8px; }
  .resolution-select-wrap { min-width: 132px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

:root[data-theme="dark"] .topbar { border-color: var(--line); }
:root[data-theme="dark"] .topbar-meta,
:root[data-theme="dark"] .theme-control,
:root[data-theme="dark"] .field-label,
:root[data-theme="dark"] .range-label,
:root[data-theme="dark"] .resolution-select-wrap > span { color: #b7c5da; }
:root[data-theme="dark"] .brand-light,
:root[data-theme="dark"] .panel-heading p,
:root[data-theme="dark"] .rainbow-copy small,
:root[data-theme="dark"] .resolution-label small { color: #9aabc4; }
:root[data-theme="dark"] .color-control,
:root[data-theme="dark"] .picker-value-row,
:root[data-theme="dark"] .background-color-trigger,
:root[data-theme="dark"] .color-picker-popover,
:root[data-theme="dark"] .placement-picker,
:root[data-theme="dark"] .background-modes,
:root[data-theme="dark"] .gradient-color-field,
:root[data-theme="dark"] .select-wrap select,
:root[data-theme="dark"] .resolution-select-wrap select { border-color: #3a465a; background-color: #263246; color: #edf2fb; }
:root[data-theme="dark"] .shape-picker,
:root[data-theme="dark"] .placement-picker,
:root[data-theme="dark"] .background-modes { border-color: #3a465a; background: #222c3b; }
:root[data-theme="dark"] .picker-value-row { border-color: #3a465a; background: #263246; }
:root[data-theme="dark"] .background-color-trigger,
:root[data-theme="dark"] .color-picker-popover { border-color: #3a465a; background: #263246; color: #edf2fb; }
:root[data-theme="dark"] .custom-palette-color { border-color: #263246; }
:root[data-theme="dark"] .palette-hint { color: #a9bad4; }
:root[data-theme="dark"] .picker-value-row .hex-input { color: #edf2fb; }
:root[data-theme="dark"] .picker-hue-label { color: #b7c5da; }
:root[data-theme="dark"] .preset-swatch { border-color: #232d3d; }
:root[data-theme="dark"] .preset-swatch.selected { box-shadow: 0 0 0 2px #8db5ff; }
:root[data-theme="dark"] .placement-option.selected,
:root[data-theme="dark"] .background-mode.selected { border-color: #587db7; background: #354968; color: #dce9ff; box-shadow: none; }
:root[data-theme="dark"] .placement-option { color: #aebbd0; }
:root[data-theme="dark"] .placement-option:hover { color: #f0a18a; }
:root[data-theme="dark"] .icon-choice-row,
:root[data-theme="dark"] .size-mode-picker { border-color: #3a465a; background: #263246; }
:root[data-theme="dark"] .selected-icon-name { color: #e1eaf8; }
:root[data-theme="dark"] .selected-icon-preview { color: #f0a18a; }
:root[data-theme="dark"] .icon-picker-button { border-color: #765347; background: #49332f; color: #ffe0d6; }
:root[data-theme="dark"] .icon-picker-button:hover { background: #594039; }
:root[data-theme="dark"] .size-mode-option { color: #afbdd2; }
:root[data-theme="dark"] .size-mode-option.selected { background: #354968; color: #dce9ff; box-shadow: none; }
:root[data-theme="dark"] .icon-dialog { border-color: #3a465a; background: #232d3d; color: #edf2fb; }
:root[data-theme="dark"] .icon-dialog-close,
:root[data-theme="dark"] .icon-search-wrap,
:root[data-theme="dark"] .icon-library-option { border-color: #3a465a; background: #263246; color: #d7e2f2; }
:root[data-theme="dark"] .icon-dialog-action { border-color: #3a465a; background: #263246; color: #d7e2f2; }
:root[data-theme="dark"] .icon-dialog-apply { border-color: #d97960; background: #d97960; color: #281e1a; }
:root[data-theme="dark"] .icon-search-wrap input { color: #edf2fb; }
:root[data-theme="dark"] .icon-filter { border-color: #3a465a; background: #263246; color: #afbdd2; }
:root[data-theme="dark"] .icon-filter.selected,
:root[data-theme="dark"] .icon-library-option[aria-selected="true"] { border-color: #d97960; background: #49332f; color: #ffe0d6; }
:root[data-theme="dark"] .icon-library-option:hover { background: #2c3b52; }
:root[data-theme="dark"] .hex-input { color: #edf0e6; }
:root[data-theme="dark"] .background-mode { color: #adb9cd; }
:root[data-theme="dark"] .rainbow-icon { border-color: #3a465a; }
:root[data-theme="dark"] .button-dark { background: #d97960; color: #281e1a; }
:root[data-theme="dark"] .button-dark:hover { background: #ef947b; }
:root[data-theme="dark"] .button-random { border-color: #3a465a; }
:root[data-theme="dark"] .button-random:hover { background: #29364a; }
:root[data-theme="dark"] .canvas-stage { background-color: #222c27; background-image: linear-gradient(#303d35 1px, transparent 1px), linear-gradient(90deg, #303d35 1px, transparent 1px); }
:root[data-theme="dark"] .canvas-frame { box-shadow: 0 15px 35px #0005, 0 2px 5px #0003; }
:root[data-theme="dark"] .format-option { border-color: #3a465a; background: #232d3d; }
:root[data-theme="dark"] .format-option:hover { border-color: #7898c8; }
:root[data-theme="dark"] .format-option.selected { border-color: #d97960; background: #49332f; box-shadow: inset 0 0 0 1px #d97960; }
:root[data-theme="dark"] .format-name { color: #edf2fb; }
:root[data-theme="dark"] .format-ratio,
:root[data-theme="dark"] .preview-title > span:last-child,
:root[data-theme="dark"] .preview-divider { color: #a1a69a; }
:root[data-theme="dark"] .range-input::-moz-range-track { background: #3a465a; }