:root {
  color-scheme: light;
  --bg: #f3eee6;
  --bg-ink: #e6ded1;
  --surface: #fffaf2;
  --surface-soft: #f7efe2;
  --surface-warm: #fbf5ea;
  --text: #241c17;
  --muted: #75695f;
  --line: #d8cab8;
  --line-strong: #c2ae96;
  --primary: #8f4b2e;
  --primary-dark: #683521;
  --accent: #c98243;
  --accent-soft: #f1dfc6;
  --danger: #9b3f30;
  --shadow: 0 18px 50px rgba(73, 45, 27, 0.12);
  --serif:
    "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia,
    "Noto Serif SC", "Songti SC", serif;
  --cjk-display:
    "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC",
    "PingFang SC", serif;
  --sans:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei",
    "Hiragino Sans", sans-serif;
}

:root:lang(zh-Hans) body,
:root:lang(ja) body,
:root:lang(ko) body {
  font-weight: 400;
}

:root:lang(zh-Hans) h1,
:root:lang(zh-Hans) h2,
:root:lang(zh-Hans) h3 {
  font-family: var(--cjk-display);
  font-weight: 700;
}

:root:lang(zh-Hans) .brand,
:root:lang(zh-Hans) .main-nav,
:root:lang(zh-Hans) button,
:root:lang(zh-Hans) .toggle-row,
:root:lang(zh-Hans) .upload-box strong,
:root:lang(zh-Hans) .upload-box em,
:root:lang(zh-Hans) .filter-button,
:root:lang(zh-Hans) .preset-platform,
:root:lang(zh-Hans) .preset-use {
  font-family: var(--sans);
  font-weight: 600;
}

:root:lang(ja) h1,
:root:lang(ja) h2,
:root:lang(ja) h3,
:root:lang(ja) .brand,
:root:lang(ja) .main-nav,
:root:lang(ja) button,
:root:lang(ja) .toggle-row,
:root:lang(ja) .upload-box strong,
:root:lang(ja) .upload-box em,
:root:lang(ja) .filter-button,
:root:lang(ja) .preset-platform,
:root:lang(ja) .preset-use,
:root:lang(ko) h1,
:root:lang(ko) h2,
:root:lang(ko) h3,
:root:lang(ko) .brand,
:root:lang(ko) .main-nav,
:root:lang(ko) button,
:root:lang(ko) .toggle-row,
:root:lang(ko) .upload-box strong,
:root:lang(ko) .upload-box em,
:root:lang(ko) .filter-button,
:root:lang(ko) .preset-platform,
:root:lang(ko) .preset-use {
  font-family: var(--sans);
  font-weight: 600;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 16% -10%, rgba(201, 130, 67, 0.16), transparent 34%),
    linear-gradient(180deg, #f6f0e7 0%, var(--bg) 42%, #efe7dc 100%);
  color: var(--text);
  font-family: var(--sans);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 58px;
  padding: 10px clamp(18px, 4vw, 42px);
  background: rgba(243, 238, 230, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: var(--text);
  border-radius: 8px;
  color: #f7eee1;
  font-family: var(--serif);
  font-weight: 800;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 28px);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 650;
}

.main-nav a {
  position: relative;
  padding: 4px 0;
  white-space: nowrap;
}

.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: -2px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  opacity: 0;
  transform: scaleX(0.75);
  transition:
    opacity 150ms ease,
    transform 150ms ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--primary);
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  opacity: 0.55;
  transform: scaleX(1);
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
}

.language-switcher select {
  width: auto;
  min-width: 150px;
  height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.8);
}

.hero-tool {
  padding: 22px clamp(14px, 3vw, 34px) 30px;
  scroll-margin-top: 72px;
}

.hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  max-width: 1440px;
  margin: 0 auto 14px;
  align-items: end;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 720px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.8vw, 3.3rem);
  font-weight: 620;
  line-height: 1;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.7vw, 1.12rem);
  line-height: 1.45;
}

.quick-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  list-style: none;
}

.quick-steps li {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 690;
  white-space: nowrap;
}

.quick-steps li + li::before {
  width: 18px;
  height: 1px;
  margin-right: 2px;
  background: var(--line);
  content: "";
}

.quick-steps strong {
  font: inherit;
}

.quick-steps span {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: var(--primary-dark);
  background: rgba(157, 80, 49, 0.12);
  border: 1px solid rgba(157, 80, 49, 0.24);
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 760;
}

.tool-shell {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(420px, 1fr) minmax(240px, 300px);
  gap: 12px;
  max-width: 1440px;
  min-width: 0;
  margin: 0 auto;
  align-items: start;
}

.control-panel,
.preview-panel,
.preset-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(73, 45, 27, 0.09);
}

.control-panel::before,
.preview-panel::before,
.preset-panel::before,
.article-card::before {
  display: block;
  width: 38px;
  height: 2px;
  margin-bottom: 12px;
  background: var(--accent);
  border-radius: 99px;
  content: "";
  opacity: 0.75;
}

.control-panel {
  position: sticky;
  top: 74px;
  padding: 14px;
}

.upload-box {
  position: relative;
  display: grid;
  min-height: 144px;
  place-items: center;
  gap: 6px;
  padding: 16px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(143, 75, 46, 0.08), rgba(201, 130, 67, 0.14)),
    var(--surface-soft);
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.upload-box strong {
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 650;
}

.upload-box:hover,
.upload-box:focus-visible,
.upload-box.is-dragging {
  border-color: var(--primary);
  transform: translateY(-1px);
  outline: none;
}

.upload-box input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fffaf2;
  background: var(--primary);
  border-radius: 8px;
  font-size: 1.55rem;
  line-height: 1;
}

.upload-box span,
.upload-box em,
.upload-box small,
.control-group label,
.label-row span,
.panel-title-row span,
#currentMeta,
.ratio-note {
  color: var(--muted);
}

.upload-box strong,
.upload-box span,
.upload-box em,
.upload-box small {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.upload-box em {
  color: var(--primary-dark);
  font-size: 0.84rem;
  font-style: normal;
  font-weight: 820;
}

.upload-box small {
  max-width: 290px;
  font-size: 0.78rem;
  line-height: 1.4;
}

.original-wrap {
  margin-top: 12px;
}

.original-wrap summary {
  cursor: pointer;
}

.panel-title-row,
.label-row,
.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.panel-title-row h2 {
  margin: 0;
  font-size: 1rem;
}

.original-wrap img {
  display: block;
  width: 100%;
  max-height: 150px;
  margin-top: 10px;
  object-fit: contain;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.control-group {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.control-group label {
  font-size: 0.9rem;
  font-weight: 720;
}

.helper-text {
  margin: 0;
  color: #7f5227;
  font-size: 0.84rem;
  line-height: 1.45;
}

select,
input[type="range"] {
  width: 100%;
}

select {
  height: 44px;
  padding: 0 12px;
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
}

select:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(143, 75, 46, 0.22);
  outline-offset: 2px;
}

.color-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 10px;
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 8px;
}

input[type="color"] {
  width: 42px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
}

input[type="range"] {
  accent-color: var(--primary);
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-top: 12px;
  padding: 10px 12px;
  color: var(--primary-dark);
  background: var(--surface-warm);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 760;
  cursor: pointer;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.toggle-row:has(input:disabled) {
  color: var(--muted);
  background: #eee6db;
  cursor: not-allowed;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  font-weight: 760;
  cursor: pointer;
}

.primary-button {
  padding: 0 18px;
  color: #fff8ec;
  background: var(--primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.primary-button:hover {
  background: var(--primary-dark);
}

.primary-button:disabled {
  cursor: not-allowed;
  background: #9caaa7;
}

.secondary-button {
  color: var(--primary-dark);
  background: #f4eadc;
  border: 1px solid #d6c4ac;
}

.secondary-button:hover {
  background: #ecddca;
}

.preview-panel {
  min-width: 0;
  padding: 14px;
}

.preview-toolbar {
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.download-group {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.download-group span {
  color: var(--muted);
  font-size: 0.86rem;
}

.preview-toolbar h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 3vw, 1.9rem);
  font-weight: 650;
  letter-spacing: 0;
}

#currentMeta {
  margin: 6px 0 0;
}

.preview-stage {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 520px;
  place-items: center;
  padding: 14px;
  background:
    linear-gradient(45deg, #eee5d7 25%, transparent 25%),
    linear-gradient(-45deg, #eee5d7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eee5d7 75%),
    linear-gradient(-45deg, transparent 75%, #eee5d7 75%);
  background-color: #faf5ec;
  background-position:
    0 0,
    0 10px,
    10px -10px,
    -10px 0;
  background-size: 20px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  user-select: none;
}

canvas {
  display: block;
  min-width: 0;
  max-width: 100%;
  max-height: min(66vh, 720px);
  width: auto;
  height: auto;
  background: #fffaf2;
  box-shadow: 0 12px 32px rgba(73, 45, 27, 0.16);
  touch-action: none;
}

.canvas-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.safe-area {
  position: absolute;
  inset: 9%;
  display: grid;
  place-items: start end;
  padding: 8px;
  border: 2px dashed rgba(242, 153, 74, 0.95);
  box-shadow: 0 0 0 9999px rgba(14, 35, 34, 0.08);
  color: #7d4d18;
  font-size: clamp(0.7rem, 1.5vw, 0.9rem);
  font-weight: 820;
  pointer-events: none;
}

.safe-area span {
  padding: 4px 7px;
  background: rgba(255, 248, 239, 0.96);
  border: 1px solid #f2d3b1;
  border-radius: 6px;
}

.empty-state {
  position: absolute;
  inset: 18px;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 250, 242, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.empty-state strong {
  color: var(--text);
  font-size: 1.08rem;
}

.ratio-note {
  margin: 10px 0 0;
  padding: 9px 11px;
  background: #fff3df;
  border: 1px solid #e8c894;
  border-radius: 8px;
  color: #7f5227;
  font-size: 0.92rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.filter-button {
  min-height: 32px;
  padding: 0 10px;
  color: var(--muted);
  background: #fbf5ea;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 760;
}

.filter-button:hover,
.filter-button.is-active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.preset-card {
  display: grid;
  gap: 4px;
  min-height: 80px;
  padding: 10px;
  text-align: left;
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.preset-card:hover,
.preset-card.is-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(143, 75, 46, 0.1);
}

.preset-platform {
  font-size: 0.78rem;
  color: var(--primary-dark);
  font-weight: 820;
  text-transform: uppercase;
}

.preset-use {
  color: var(--text);
  font-weight: 780;
}

.preset-size {
  color: var(--muted);
  font-size: 0.82rem;
}

.preset-panel {
  position: sticky;
  top: 74px;
  max-height: calc(100vh - 92px);
  padding: 14px;
  overflow: auto;
}

.panel-heading {
  margin-bottom: 10px;
}

.panel-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 650;
}

.preset-panel .preset-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.feedback-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 10px;
  max-width: 1440px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.feedback-strip a {
  color: var(--primary-dark);
  font-weight: 780;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.content-band {
  padding: 52px clamp(16px, 4vw, 56px);
  background: rgba(255, 250, 242, 0.7);
  border-top: 1px solid var(--line);
}

.content-band:nth-of-type(odd) {
  background: var(--bg);
}

.section-heading {
  max-width: 920px;
  margin: 0 auto 22px;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  font-weight: 640;
  letter-spacing: 0;
}

.section-heading p:last-child {
  max-width: 700px;
  color: var(--muted);
}

.table-wrap {
  max-width: 1040px;
  margin: 0 auto;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf2;
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  background: #f1e5d4;
  color: #4d3829;
  font-size: 0.88rem;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 1040px;
  margin: 0 auto;
}

details {
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 8px;
}

summary {
  padding: 16px;
  color: var(--text);
  font-weight: 780;
  cursor: pointer;
}

details p {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--muted);
  line-height: 1.55;
}

.policy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.policy-grid article {
  max-width: 420px;
  padding: 18px;
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.policy-grid h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-weight: 650;
}

.policy-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.policy-grid article > a {
  display: inline-flex;
  margin-top: 14px;
  color: var(--primary-dark);
  font-weight: 760;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 24px;
  padding: 26px clamp(16px, 4vw, 56px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer a:hover {
  color: var(--primary);
}

.page-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 46px clamp(16px, 5vw, 56px) 64px;
}

.page-shell h1 {
  max-width: 780px;
  margin-bottom: 18px;
}

.page-lede {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.65;
}

.page-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 680;
}

.tool-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 14px;
  padding: 0 16px;
  color: #fff;
  background: var(--primary);
  border-radius: 8px;
  font-weight: 820;
}

.tool-cta:hover {
  background: var(--primary-dark);
}

.article-card {
  margin-top: 22px;
  padding: clamp(18px, 4vw, 34px);
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.article-card h2 {
  margin: 28px 0 10px;
  font-family: var(--serif);
  font-weight: 650;
}

.article-card h2:first-child {
  margin-top: 0;
}

.article-card p,
.article-card li {
  color: var(--muted);
  line-height: 1.7;
}

.article-card a {
  color: var(--primary-dark);
  font-weight: 760;
}

.article-card ul {
  padding-left: 1.2rem;
}

.guide-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.guide-links a {
  display: grid;
  gap: 6px;
  min-height: 112px;
  padding: 16px;
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 8px;
  transition:
    border-color 150ms ease,
    transform 150ms ease,
    box-shadow 150ms ease;
}

.guide-links a:hover {
  border-color: var(--line-strong);
  box-shadow: 0 14px 34px rgba(73, 45, 27, 0.1);
  transform: translateY(-1px);
}

.guide-links strong {
  color: var(--text);
}

.guide-links span {
  color: var(--muted);
}

@media (max-width: 920px) {
  .hero-copy {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .quick-steps {
    justify-content: flex-start;
  }

  .tool-shell {
    grid-template-columns: 1fr;
  }

  .control-panel,
  .preset-panel {
    position: static;
    max-height: none;
  }

  .preview-stage {
    min-height: 300px;
  }

  .faq-grid,
  .policy-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 0;
  }

  body {
    overflow-x: hidden;
  }

  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    padding: 12px 20px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .main-nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px 18px;
    font-size: 0.88rem;
  }

  .language-switcher {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    width: 100%;
    align-items: center;
  }

  .language-switcher select {
    min-width: 0;
    width: 100%;
  }

  .hero-tool {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    padding-inline: 20px;
    padding-top: 24px;
  }

  .upload-box {
    min-height: 148px;
    gap: 6px;
    padding: 18px 16px;
  }

  .upload-icon {
    width: 40px;
    height: 40px;
  }

  .upload-box small {
    font-size: 0.78rem;
  }

  .original-wrap {
    margin-top: 12px;
  }

  .original-wrap img {
    max-height: 160px;
  }

  .hero-copy,
  .control-panel,
  .preview-panel,
  .preset-panel,
  .upload-box {
    width: 100%;
    max-width: 100%;
  }

  .tool-shell {
    width: 100%;
    max-width: 100%;
  }

  h1 {
    max-width: 12ch;
    font-size: 2rem;
    line-height: 1.04;
  }

  .hero-subtitle {
    max-width: 30ch;
    font-size: 0.98rem;
  }

  .preview-panel,
  .control-panel,
  .preset-panel {
    min-width: 0;
    padding: 14px;
  }

  .preview-stage {
    min-height: 260px;
    padding: 10px;
  }

  canvas {
    width: 100%;
  }

  .canvas-wrap {
    width: 100%;
  }

  .empty-state {
    inset: 10px;
  }

  .preview-toolbar {
    display: grid;
  }

  .download-group {
    width: 100%;
    justify-items: stretch;
  }

  .download-group span {
    text-align: center;
  }

  .primary-button {
    width: 100%;
  }

  .preset-grid,
  .preset-panel .preset-grid {
    grid-template-columns: 1fr;
  }
}
