:root {
  color-scheme: light;
  --paper: #f7f6f2;
  --surface: #ffffff;
  --ink: #26362f;
  --muted: #788477;
  --green: #315848;
  --green-dark: #244737;
  --sage: #edf2ec;
  --border: #e4e7df;
  --orange: #db9670;
  --shadow: 0 4px 20px rgb(31 48 34 / 3%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 14px; line-height: 1.6; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button, select { touch-action: manipulation; }
button { border: 0; background: none; }
button:disabled { cursor: default; }
button, a, select, input { outline: none; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid #97b09a; outline-offset: 4px; }
button { transition: color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
a { color: inherit; text-decoration: none; }
p, h1, h2 { margin: 0; }
[hidden] { display: none !important; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 19px; height: 19px; flex: 0 0 19px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }

.site-header { height: 85px; border-bottom: 1px solid var(--border); background: rgb(255 255 255 / 67%); }
.header-inner { max-width: 1344px; height: 100%; padding: 0 32px; margin: 0 auto; display: flex; align-items: center; gap: 58px; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 23px; font-weight: 750; line-height: 1.15; letter-spacing: 2px; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px 12px 12px 3px; display: grid; place-items: center; background: var(--green); color: white; }
.brand-mark .icon { width: 25px; height: 25px; stroke-width: 1.35; }
.brand-en { display: block; margin-top: 5px; font-size: 8px; font-weight: 650; letter-spacing: 2px; }
.main-nav { align-self: stretch; display: flex; align-items: stretch; gap: 30px; }
.main-nav a, .main-nav button { position: relative; display: flex; align-items: center; padding: 0 1px; font-size: 13px; color: #8c938d; }
.main-nav a.active { color: var(--green); font-weight: 650; }
.main-nav a.active::after { position: absolute; content: ""; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--green); }
.main-nav a:hover, .main-nav button:hover { color: var(--green); }
.connection-badge { margin-left: auto; display: flex; align-items: center; gap: 8px; color: #7b867d; font-size: 11px; white-space: nowrap; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #93a591; box-shadow: 0 0 0 4px #93a59114; }
.connection-badge.error, .connection-badge.offline { color: #a77556; }
.connection-badge.error .status-dot, .connection-badge.offline .status-dot { background: #bb8b67; }
.connection-badge.connected .status-dot, .connection-badge.online .status-dot { background: #649371; }

.page-shell { width: calc(100% - 64px); max-width: 1280px; margin: 0 auto; }
.intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 43px 0 34px; }
.eyebrow { display: flex; align-items: center; gap: 7px; color: #899389; font-size: 11px; letter-spacing: 1px; }
.eyebrow > span { width: 5px; height: 5px; border-radius: 50%; background: #86a08b; }
h1 { margin-top: 12px; font-size: clamp(29px, 3vw, 40px); line-height: 1.4; font-weight: 650; letter-spacing: 1px; }
h1 > span { color: var(--green); }
.intro-description { margin-top: 10px; font-size: 13px; color: #788477; }
.stepper { display: flex; align-items: center; gap: 14px; padding-top: 20px; white-space: nowrap; }
.step { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #788477; }
.step b { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid #e1e5db; border-radius: 50%; font-size: 9px; font-weight: 500; font-variant-numeric: tabular-nums; }
.step.active { color: var(--green); }
.step.active b { background: #e7eee4; color: var(--green); border-color: #dce5d8; }
.step.done { color: #65826a; }
.step.done b { background: var(--green); border-color: var(--green); color: #fff; }
.stepper > .icon { width: 12px; height: 12px; flex-basis: 12px; color: #b4bdb0; }

.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 296px; align-items: start; gap: 20px; }
.workspace-card, .settings-card, .export-card { border: 1px solid var(--border); background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); }
.workspace-card { min-width: 0; overflow: hidden; }
.workspace-topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 75px; padding: 16px 22px; }
.file-info { display: flex; align-items: center; gap: 11px; min-width: 0; }
.file-icon { display: grid; place-items: center; width: 35px; height: 38px; flex-shrink: 0; color: #8b9c85; border-radius: 7px; background: #f3f5ee; }
.file-info > div { min-width: 0; }
.file-info strong { display: block; overflow: hidden; max-width: 400px; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.file-info span:not(.file-icon) { display: block; margin-top: 3px; color: #788477; font-size: 11px; }
.workspace-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 0; min-height: 32px; color: #71816e; font-size: 12px; white-space: nowrap; }
.text-button .icon { width: 15px; height: 15px; flex-basis: 15px; }
.text-button:hover:not(:disabled) { color: var(--green); }
.text-button:disabled { opacity: .38; }
.tiny-tag { padding: 3px 7px; font-size: 11px; color: var(--green); background: #edf3e9; border-radius: 4px; }
.image-stage { position: relative; height: 465px; overflow: hidden; border-top: 1px solid #eff0eb; border-bottom: 1px solid #e8eae3; background-color: #f8f9f5; background-image: radial-gradient(#d9ddd2 0.7px, transparent 0.7px); background-size: 16px 16px; isolation: isolate; }
.empty-state { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 22px; }
.upload-art { width: 188px; height: 140px; position: relative; margin-bottom: 16px; }
.art-orbit { position: absolute; width: 134px; height: 134px; left: 27px; top: 0; border: 1px dashed #cfd9c8; border-radius: 50%; transform: rotate(-15deg); }
.art-orbit::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: #edf1e6; }
.art-photo { position: absolute; width: 116px; height: 86px; top: 24px; left: 34px; border: 5px solid white; background: #e3e9dc; border-radius: 9px; transform: rotate(-8deg); box-shadow: 0 6px 14px rgb(57 76 49 / 8%); }
.art-photo > svg { width: 100%; height: 100%; fill: none; stroke: #96ac8b; stroke-width: 1.8; stroke-linejoin: round; }
.art-photo > svg rect { stroke: transparent; }
.art-photo > svg circle { fill: #c2d0ad; stroke: none; }
.art-photo > svg path { fill: #c7d4bb; stroke: #a8bc9d; }
.art-photo::before { content: ""; position: absolute; inset: 0; border: 4px solid white; border-radius: 8px; background: #d6e0cd; transform: rotate(15deg) translate(8px, -4px); z-index: -1; }
.art-spark { position: absolute; display: grid; place-items: center; right: -17px; bottom: -10px; width: 39px; height: 39px; background: white; color: #648052; border-radius: 10px; box-shadow: 0 3px 10px #3158480f; transform: rotate(8deg); }
.art-spark .icon { width: 24px; height: 24px; }
.art-dot { position: absolute; border-radius: 50%; background: #c2d1b6; }
.dot-one { width: 6px; height: 6px; top: 19px; right: 26px; }
.dot-two { width: 4px; height: 4px; left: 17px; bottom: 25px; }
.empty-state h2 { font-size: 21px; font-weight: 550; letter-spacing: .5px; }
.empty-state > p { margin-top: 8px; color: #788477; font-size: 12px; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 11px 23px; border: 1px solid var(--green); border-radius: 7px; background: var(--green); color: white; font-weight: 500; font-size: 14px; }
.primary-button:hover:not(:disabled) { background: var(--green-dark); border-color: var(--green-dark); box-shadow: 0 4px 10px #31584815; }
.primary-button:active:not(:disabled) { transform: translateY(1px); }
.primary-button:disabled { background: #aebcaf; border-color: #aebcaf; color: #f9fbf7; }
.upload-button { min-width: 154px; margin-top: 25px; }
.upload-button .icon { width: 16px; height: 16px; flex-basis: 16px; }
.upload-formats { margin-top: 13px; color: #83907d; font-size: 11px; letter-spacing: .3px; }
.canvas-viewport { position: absolute; inset: 0; overflow: hidden; touch-action: none; }
.canvas-stack { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
.canvas-stack canvas { position: absolute; left: 0; top: 0; display: block; }
#imageCanvas { box-shadow: 0 4px 24px #203c281a; pointer-events: none; }
#maskCanvas { cursor: none; touch-action: none; }
.brush-cursor { position: absolute; z-index: 3; border: 1.5px solid white; border-radius: 50%; box-shadow: 0 0 0 1px #315848c9, inset 0 0 0 1px #31584842; pointer-events: none; }
.brush-cursor.erasing, .brush-cursor.erase, .brush-cursor.eraser { border-style: dashed; }
.view-label { position: absolute; left: 16px; bottom: 15px; padding: 5px 10px; border: 1px solid #ffffff9c; border-radius: 5px; background: #fffffff0; box-shadow: 0 2px 8px #26362f0d; color: #60715f; font-size: 11px; pointer-events: none; }
.drop-overlay { position: absolute; z-index: 8; inset: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; border: 1.5px dashed #719066; border-radius: 8px; background: #f1f6ecf2; color: var(--green); pointer-events: none; }
.drop-overlay > .icon { width: 34px; height: 34px; flex-basis: 34px; }
.drop-overlay strong { font-size: 17px; font-weight: 550; }
.processing-overlay { position: absolute; z-index: 10; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #f8faf4ed; backdrop-filter: blur(6px); text-align: center; padding: 24px; }
.processing-spinner { width: 37px; height: 37px; margin-bottom: 22px; border: 2px solid #d9e3d5; border-top-color: var(--green); border-radius: 50%; animation: turn 900ms linear infinite; }
.processing-overlay strong { font-size: 17px; font-weight: 550; }
.processing-overlay > span { margin-top: 9px; color: #788477; font-size: 12px; }
.processing-overlay .text-button { margin-top: 17px; text-decoration: underline; text-underline-offset: 4px; }
@keyframes turn { to { transform: rotate(360deg); } }

.canvas-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 61px; padding: 12px 17px; }
.tool-group, .zoom-controls { display: flex; align-items: center; gap: 4px; }
.tool-button, .icon-button { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 34px; border: 1px solid transparent; border-radius: 5px; color: #838e80; }
.tool-button { gap: 7px; padding: 0 11px; font-size: 13px; }
.tool-button .icon { width: 16px; height: 16px; flex-basis: 16px; }
.tool-button.active { background: #edf2e7; border-color: #e1e9db; color: var(--green); }
.tool-button:hover:not(.active):not(:disabled), .icon-button:hover:not(:disabled) { background: #f0f3ec; color: var(--green); }
.tool-button:disabled, .icon-button:disabled { opacity: .35; }
.icon-button { padding: 0 7px; }
.icon-button .icon { width: 16px; height: 16px; flex-basis: 16px; }
.toolbar-divider { height: 17px; width: 1px; margin: 0 9px; background: #e8ebe4; }
.zoom-controls { gap: 1px; }
.zoom-controls > span { min-width: 39px; text-align: center; color: #788477; font-size: 11px; font-variant-numeric: tabular-nums; }
.zoom-controls > .icon-button { min-width: 27px; font-size: 18px; font-weight: 300; }
.zoom-controls #fitBtn { margin-left: 5px; }
.workspace-hint { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 43px; padding: 7px 21px; border-top: 1px solid #eff0eb; background: #fdfdfb; }
.workspace-hint > span { display: flex; align-items: center; gap: 7px; color: #788477; font-size: 11px; }
.selection-indicator { width: 7px; height: 7px; flex-shrink: 0; border-radius: 2px; border: 1px solid #dda783; background: #f1c4a7a1; }
.compare-button { font-size: 11px; min-height: 25px; padding: 3px 0; }
.compare-button:active:not(:disabled), .compare-button.active, .compare-button[aria-pressed="true"] { color: var(--green); }

.settings-column { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.settings-card, .export-card { padding: 18px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.panel-heading h2 { font-size: 14px; font-weight: 650; }
.section-number { color: #b0b6a9; font-size: 8px; letter-spacing: 2px; }
.setting-section { margin-bottom: 18px; }
.field-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; font-size: 13px; }
.field-heading label, .field-heading > span:first-child { color: #697862; font-weight: 500; }
.field-heading output { padding: 2px 6px; border-radius: 3px; background: #f4f5ef; color: #788477; font-size: 11px; line-height: 1.4; font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; height: 15px; display: block; margin: 0; padding: 0; background: transparent; accent-color: var(--green); cursor: pointer; -webkit-appearance: none; appearance: none; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 4px; background: #e3e9db; }
input[type="range"]::-webkit-slider-thumb { width: 11px; height: 11px; margin-top: -4px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px white, 0 0 0 4px #dfe6d8; -webkit-appearance: none; appearance: none; }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 4px; background: #e3e9db; }
input[type="range"]::-moz-range-thumb { width: 11px; height: 11px; border: 0; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px white, 0 0 0 4px #dfe6d8; }
.range-labels { display: flex; justify-content: space-between; margin-top: 6px; color: #788477; font-size: 11px; }
.method-field { min-width: 0; border: 0; padding: 0; }
.method-field legend { padding: 0; margin-bottom: 9px; color: #697862; font-size: 13px; font-weight: 500; }
.method-option { display: flex; align-items: center; gap: 9px; min-height: 60px; padding: 9px 10px; margin-bottom: 8px; border: 1px solid #e8ebe2; border-radius: 6px; cursor: pointer; transition: background 160ms ease, border-color 160ms ease; }
.method-option:last-child { margin-bottom: 0; }
.method-option:hover { border-color: #bccbb5; }
.method-option.selected, .method-option:has(input:checked) { background: #f5f8f0; border-color: #b8c8ad; }
.method-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.method-option:has(input:focus-visible) { outline: 3px solid #97b09a; outline-offset: 3px; }
.method-icon { display: grid; place-items: center; width: 27px; height: 27px; flex-shrink: 0; border-radius: 5px; background: #f2f4ec; color: #91a280; }
.selected .method-icon, .method-option:has(input:checked) .method-icon { background: #e7eedf; color: #729360; }
.method-icon .icon { width: 16px; height: 16px; flex-basis: 16px; }
.method-option strong { display: block; font-size: 13px; font-weight: 550; line-height: 1.4; }
.method-option small { display: block; margin-top: 4px; color: #788477; font-size: 11px; line-height: 1.45; }
.radio-visual { width: 12px; height: 12px; flex-shrink: 0; margin-left: auto; border: 1px solid #d4dccd; border-radius: 50%; }
.selected .radio-visual, .method-option:has(input:checked) .radio-visual { border-color: #6d8c5f; background: #6d8c5f; box-shadow: inset 0 0 0 3px white; }
.field-caption { color: #83907d; font-size: 11px; }
.segmented-control { display: flex; gap: 2px; padding: 3px; border-radius: 6px; background: #f2f4ed; }
.segmented-control button { flex: 1; min-height: 29px; border: 1px solid transparent; border-radius: 4px; color: #788477; font-size: 13px; }
.segmented-control button.active { border-color: #e0e6d7; background: white; color: #557346; box-shadow: 0 1px 3px #324c2710; }
.segmented-control button:hover:not(.active) { color: var(--green); }
.repair-action { padding-top: 0; }
.repair-button { width: 100%; min-height: 43px; gap: 8px; padding: 10px 14px; }
.repair-button .icon { width: 17px; height: 17px; flex-basis: 17px; }
.button-arrow { margin-left: auto; font-size: 16px; font-weight: 350; }
.repair-action > p { min-height: 14px; margin-top: 7px; text-align: center; color: #788477; font-size: 11px; }
.export-card { padding-top: 17px; padding-bottom: 16px; }
.export-card .panel-heading { margin-bottom: 15px; }
.export-card .panel-heading > .icon { width: 16px; height: 16px; color: #a3ae98; }
.export-select-label { display: block; margin-bottom: 6px; color: #788477; font-size: 12px; }
select { width: 100%; height: 35px; padding: 0 30px 0 10px; border: 1px solid #e1e6db; border-radius: 5px; background-color: #fff; color: #63765c; font-size: 13px; cursor: pointer; }
select:hover { border-color: #b6c7aa; }
.secondary-button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 38px; margin-top: 11px; border: 1px solid #c6d2bc; border-radius: 5px; background: #f8faf4; color: #638052; font-size: 13px; font-weight: 500; }
.secondary-button:hover:not(:disabled) { background: #edf3e6; border-color: #91ab81; }
.secondary-button:disabled { border-color: #e3e8dc; background: #fbfcf9; color: #b1baa7; }
.secondary-button .icon { width: 15px; height: 15px; flex-basis: 15px; }
.export-note { display: block; margin-top: 9px; color: #83907d; font-size: 11px; text-align: center; }
.local-note { display: flex; gap: 9px; padding: 2px 7px 0; }
.local-note-icon { display: block; color: #91a185; padding-top: 1px; }
.local-note-icon .icon { width: 16px; height: 16px; flex-basis: 16px; }
.local-note p { font-size: 11px; line-height: 1.7; }
.local-note strong { display: block; font-weight: 500; color: #71836a; }
.local-note p > span { display: block; margin-top: 3px; color: #83907d; font-size: 11px; }

.examples-section { display: flex; justify-content: space-between; align-items: center; gap: 28px; margin-top: 31px; padding: 25px 0; border-top: 1px solid var(--border); }
.examples-intro { flex-shrink: 0; }
.eyebrow.small { color: #9ba68f; font-size: 9px; letter-spacing: 1.2px; }
.examples-intro h2 { margin-top: 6px; font-size: 15px; font-weight: 550; }
.examples-intro p { margin-top: 5px; font-size: 11px; color: #788477; }
.example-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; width: 59%; max-width: 700px; }
.example-card { display: flex; align-items: center; min-width: 0; gap: 13px; padding: 9px; text-align: left; border: 1px solid var(--border); border-radius: 8px; background: #fdfdfb; }
.example-card:hover { background: white; border-color: #b9c9ae; box-shadow: 0 3px 10px #31584808; transform: translateY(-1px); }
.example-card img { display: block; width: 77px; height: 60px; border-radius: 4px; object-fit: cover; background: #e7e9e0; }
.example-card > span { min-width: 0; }
.example-card strong { display: block; color: #6a7b5e; font-size: 13px; font-weight: 550; }
.example-card small { display: block; margin-top: 4px; color: #788477; font-size: 11px; white-space: nowrap; }
.example-card > .icon { margin-left: auto; width: 14px; height: 14px; flex-basis: 14px; color: #a9b49f; }
.tip-strip { display: flex; align-items: center; gap: 9px; padding: 13px 17px; border: 1px solid #e6e9dd; border-radius: 6px; background: #f0f2e9; color: #788477; font-size: 11px; line-height: 1.7; }
.tip-strip > .icon { width: 14px; height: 14px; flex-basis: 14px; color: #95a286; }
.tip-strip strong { margin-right: 10px; color: #778968; font-weight: 550; }
.tip-strip > span { margin-left: auto; color: #83907d; font-size: 11px; white-space: nowrap; }
.site-footer { display: flex; justify-content: space-between; gap: 20px; width: calc(100% - 64px); max-width: 1280px; margin: 0 auto; padding: 27px 0 25px; color: #83907d; font-size: 11px; }
.site-footer > span:last-child { color: #8f9b88; letter-spacing: 1px; }
.footer-divider { margin: 0 9px; color: #c2c8b9; }

.toast { position: fixed; z-index: 100; bottom: 32px; left: 50%; max-width: min(560px, calc(100vw - 32px)); padding: 12px 19px; border: 1px solid #d8e1d3; border-radius: 8px; background: #fffffffa; box-shadow: 0 8px 35px #1d352825; color: #3f5e36; font-size: 12px; transform: translateX(-50%); }
.toast.error { border-color: #ead6c3; color: #99704c; }
.guide-dialog { width: min(500px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 27px; overflow: auto; border: 1px solid #dde5d6; border-radius: 12px; background: #fffffc; color: var(--ink); box-shadow: 0 15px 80px #223b2b2b; }
.guide-dialog::backdrop { background: #1c30275e; backdrop-filter: blur(4px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-heading h2 { font-size: 18px; font-weight: 600; }
.guide-steps { display: flex; flex-direction: column; gap: 20px; margin: 24px 0; padding-left: 22px; }
.guide-steps li { padding-left: 6px; color: #71905f; font-size: 13px; }
.guide-steps strong { color: #52684a; font-size: 12px; font-weight: 600; }
.guide-steps p { margin-top: 5px; color: #8f9986; font-size: 11px; line-height: 1.9; }
.guide-shortcuts { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; padding: 11px; border: 1px solid #e6ebdf; border-radius: 5px; background: #f5f7ef; color: #788477; font-size: 11px; }
kbd { display: inline-block; padding: 1px 5px; border: 1px solid #dde4d6; border-radius: 3px; background: white; color: #6f8062; font: inherit; box-shadow: 0 1px 1px #2f48200a; }
.guide-note { margin: 15px 0 21px; color: #788477; font-size: 11px; line-height: 1.9; }
.guide-dialog > .primary-button { width: 100%; }

@media (min-width: 1500px) {
  .intro { padding-top: 52px; padding-bottom: 40px; }
}

@media (max-width: 1100px) {
  .header-inner { gap: 38px; }
  .stepper { gap: 9px; }
  .step { gap: 5px; font-size: 11px; }
  .step b { width: 23px; height: 23px; }
  .example-list { width: 62%; }
  .example-card { gap: 9px; }
  .example-card img { width: 61px; height: 55px; }
  .tip-strip > span { display: none; }
}

@media (max-width: 1000px) {
  .page-shell, .site-footer { width: calc(100% - 40px); }
  .header-inner { padding: 0 20px; }
  .editor-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 14px; }
  .settings-card, .export-card { padding-left: 16px; padding-right: 16px; }
  .intro { padding: 34px 0 28px; }
  .intro-description { font-size: 12px; }
  .stepper { flex-direction: column; align-items: flex-start; gap: 7px; padding-top: 0; }
  .stepper > .icon { display: none; }
  .step { gap: 8px; font-size: 11px; }
  .step b { width: 20px; height: 20px; font-size: 8px; }
  .workspace-topbar { padding: 15px; }
  .workspace-actions .text-button { font-size: 0; gap: 0; min-width: 32px; }
  .workspace-actions .text-button .icon { width: 17px; height: 17px; flex-basis: 17px; }
  .tiny-tag { display: none; }
  .image-stage { height: 455px; }
  .canvas-toolbar { padding-left: 10px; padding-right: 10px; gap: 5px; }
  .tool-button { padding: 0 8px; gap: 5px; }
  .toolbar-divider { margin: 0 3px; }
  .icon-button { min-width: 28px; padding: 0 5px; }
  .zoom-controls { gap: 0; }
  .zoom-controls > span { min-width: 32px; }
  .zoom-controls > .icon-button { min-width: 24px; }
  .zoom-controls #fitBtn { margin-left: 1px; }
  .workspace-hint { padding: 9px 15px; }
  .workspace-hint > span { font-size: 11px; }
  .compare-button { gap: 4px; font-size: 11px; }
  .examples-section { gap: 16px; }
  .examples-intro h2 { font-size: 13px; }
  .examples-intro p { font-size: 11px; }
  .example-list { width: 60%; gap: 10px; }
  .example-card { gap: 8px; padding: 7px; }
  .example-card img { width: 49px; height: 52px; }
  .example-card small { white-space: normal; font-size: 11px; }
  .example-card > .icon { display: none; }
}

@media (max-width: 760px) {
  .site-header { height: 73px; }
  .header-inner { gap: 30px; }
  .brand { font-size: 20px; gap: 9px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 10px 10px 10px 3px; }
  .brand-en { font-size: 6px; letter-spacing: 1.8px; }
  .main-nav { margin-left: auto; gap: 20px; }
  .main-nav a, .main-nav button { font-size: 12px; }
  .connection-badge { display: none; }
  .intro { align-items: flex-start; padding-top: 29px; }
  .eyebrow { font-size: 9px; letter-spacing: .5px; }
  h1 { font-size: 31px; margin-top: 10px; }
  .intro-description { max-width: 365px; font-size: 12px; line-height: 1.9; }
  .stepper { padding-top: 3px; gap: 7px; }
  .step { font-size: 11px; }
  .editor-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .image-stage { height: 420px; }
  .workspace-topbar { min-height: 66px; }
  .file-info strong { max-width: min(400px, 65vw); }
  .workspace-actions .text-button { font-size: 12px; gap: 5px; }
  .canvas-toolbar { min-height: 60px; padding: 11px 13px; gap: 12px; }
  .tool-button { padding: 0 10px; min-height: 38px; }
  .icon-button { min-width: 38px; height: 38px; }
  .text-button { min-height: 38px; }
  input[type="range"] { height: 38px; }
  .toolbar-divider { margin: 0 6px; }
  .zoom-controls > .icon-button { min-width: 38px; }
  .workspace-hint { min-height: 44px; }
  .settings-column { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; align-items: start; }
  .settings-card { grid-row: span 2; padding: 19px; }
  .settings-card .panel-heading { margin-bottom: 20px; }
  .export-card { padding: 19px; }
  .method-option { min-height: 61px; }
  .method-option small { font-size: 11px; }
  .field-heading, .method-field legend { font-size: 13px; }
  .segmented-control button { min-height: 38px; font-size: 13px; }
  .repair-button { min-height: 46px; }
  .secondary-button { min-height: 43px; }
  select { height: 41px; font-size: 13px; }
  .export-select-label { font-size: 12px; }
  .export-card .panel-heading { margin-bottom: 19px; }
  .export-note { font-size: 11px; }
  .local-note { align-self: start; padding: 0 5px; }
  .local-note strong { font-size: 11px; }
  .local-note p > span { font-size: 11px; line-height: 1.8; }
  .examples-section { align-items: flex-start; flex-direction: column; gap: 17px; margin-top: 26px; padding-top: 24px; }
  .examples-intro h2 { font-size: 15px; }
  .examples-intro p { font-size: 11px; }
  .example-list { width: 100%; gap: 12px; }
  .example-card { padding: 8px; gap: 11px; }
  .example-card img { width: 66px; height: 57px; }
  .example-card small { font-size: 11px; }
  .example-card > .icon { display: block; }
  .tip-strip { align-items: flex-start; padding: 12px 14px; font-size: 11px; }
  .tip-strip > .icon { margin-top: 2px; }
  .site-footer { padding-top: 23px; padding-bottom: 23px; font-size: 11px; }
}

@media (max-width: 480px) {
  .page-shell, .site-footer { width: calc(100% - 28px); }
  .header-inner { padding: 0 16px; gap: 16px; }
  .main-nav { gap: 16px; }
  .main-nav a, .main-nav button { font-size: 11px; }
  .brand { font-size: 19px; gap: 8px; }
  .brand-mark { width: 33px; height: 33px; }
  .brand-mark .icon { width: 22px; height: 22px; }
  .brand-en { font-size: 5px; letter-spacing: 1.6px; }
  .intro { display: block; padding-top: 24px; padding-bottom: 22px; }
  h1 { font-size: 29px; }
  .intro-description { margin-top: 9px; font-size: 11px; }
  .stepper { flex-direction: row; justify-content: space-between; margin-top: 23px; padding: 0; }
  .stepper > .icon { display: block; width: 10px; height: 10px; flex-basis: 10px; }
  .step { gap: 6px; font-size: 11px; }
  .step b { width: 20px; height: 20px; }
  .workspace-card, .settings-card, .export-card { border-radius: 9px; }
  .workspace-topbar { min-height: 64px; padding: 12px; }
  .file-info { gap: 8px; }
  .file-icon { width: 30px; height: 33px; }
  .file-icon .icon { width: 17px; height: 17px; }
  .file-info strong { max-width: 200px; font-size: 13px; }
  .file-info span:not(.file-icon) { font-size: 11px; }
  .workspace-actions .text-button { font-size: 0; gap: 0; min-width: 30px; }
  .image-stage { height: 360px; }
  .upload-art { margin-bottom: 6px; transform: scale(.88); }
  .empty-state { padding: 12px; }
  .empty-state h2 { font-size: 19px; }
  .empty-state > p { font-size: 11px; }
  .upload-button { min-height: 44px; margin-top: 20px; }
  .upload-formats { font-size: 11px; margin-top: 11px; }
  .canvas-toolbar { flex-wrap: wrap; gap: 6px; padding: 8px; }
  .tool-group { gap: 2px; }
  .tool-button { gap: 4px; min-width: 38px; height: 38px; padding: 0 7px; font-size: 13px; }
  .tool-button .icon { width: 15px; height: 15px; flex-basis: 15px; }
  .icon-button { min-width: 38px; height: 38px; }
  .toolbar-divider { margin: 0 3px; height: 16px; }
  .zoom-controls { margin-left: auto; gap: 0; }
  .zoom-controls > .icon-button { min-width: 38px; padding-left: 3px; padding-right: 3px; }
  .zoom-controls > span { min-width: 34px; font-size: 11px; }
  .workspace-hint { padding: 9px 12px; align-items: flex-start; gap: 10px; }
  .workspace-hint > span { font-size: 11px; gap: 6px; max-width: 60%; line-height: 1.7; }
  .workspace-hint .selection-indicator { margin-top: 3px; }
  .compare-button { min-height: 38px; font-size: 11px; flex-shrink: 0; }
  .compare-button .icon { width: 13px; height: 13px; flex-basis: 13px; }
  .view-label { left: 10px; bottom: 10px; font-size: 11px; }
  .settings-column { display: flex; gap: 12px; }
  .settings-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 16px; width: 100%; padding: 18px 16px; }
  .settings-card .panel-heading { grid-column: 1 / -1; margin-bottom: 22px; }
  .settings-card > .setting-section { margin-bottom: 20px; }
  .settings-card > .setting-section:has(#brushSize) { grid-column: 1; grid-row: 2; }
  .settings-card .method-field { grid-column: 1 / -1; grid-row: 3; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 9px; margin-bottom: 19px; }
  .method-field legend { margin-bottom: 11px; }
  .method-option { min-height: 76px; position: relative; align-items: flex-start; padding: 10px 9px; margin-bottom: 0; gap: 7px; }
  .method-icon { width: 24px; height: 24px; margin-top: 1px; }
  .method-option strong { font-size: 13px; padding-top: 3px; }
  .method-option small { max-width: 104px; font-size: 11px; line-height: 1.5; margin-top: 5px; }
  .radio-visual { position: absolute; right: 7px; top: 7px; width: 9px; height: 9px; }
  .selected .radio-visual, .method-option:has(input:checked) .radio-visual { box-shadow: inset 0 0 0 2px white; }
  .field-heading, .method-field legend { font-size: 13px; }
  .field-caption { display: none; }
  .field-heading { margin-bottom: 13px; min-height: 18px; }
  .range-labels { font-size: 11px; }
  .segmented-control { margin-top: -1px; padding: 2px; }
  .segmented-control button { min-height: 38px; font-size: 13px; }
  .settings-card > .setting-section:has(.segmented-control) { grid-column: 2; grid-row: 2; }
  .repair-action { grid-column: 1 / -1; }
  .repair-button { min-height: 44px; }
  .repair-action > p { margin-top: 8px; font-size: 11px; }
  .export-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 12px; align-items: center; padding: 18px 16px; }
  .export-card .panel-heading { grid-column: 1 / -1; margin-bottom: 16px; }
  .export-select-label { grid-column: 1; margin-bottom: 6px; font-size: 12px; }
  .export-card select { grid-column: 1; font-size: 11px; padding-left: 8px; height: 40px; }
  .export-card .secondary-button { grid-column: 2; grid-row: 3; align-self: stretch; min-height: 40px; margin-top: 0; font-size: 13px; }
  .export-note { grid-column: 1 / -1; margin-top: 12px; font-size: 11px; }
  .local-note { padding: 0 8px; }
  .local-note p > span { display: inline; margin-top: 0; font-size: 11px; }
  .local-note strong { font-size: 11px; }
  .examples-section { margin-top: 24px; padding: 22px 0; }
  .example-list { gap: 9px; }
  .example-card { flex-wrap: wrap; gap: 9px; padding: 8px; }
  .example-card img { width: 100%; height: 94px; }
  .example-card strong { font-size: 13px; }
  .example-card small { font-size: 11px; margin-top: 2px; }
  .example-card > .icon { width: 12px; height: 12px; flex-basis: 12px; }
  .tip-strip { font-size: 11px; padding: 11px 12px; }
  .tip-strip strong { margin-right: 5px; }
  .site-footer { display: block; padding-top: 20px; }
  .site-footer > span:last-child { display: block; margin-top: 5px; font-size: 11px; }
  .guide-dialog { padding: 21px; }
  .dialog-heading h2 { font-size: 16px; }
  .guide-steps { margin-top: 20px; padding-left: 18px; }
  .toast { bottom: 20px; font-size: 11px; padding: 11px 15px; }
}

@media (max-width: 359px) {
  .main-nav { gap: 12px; }
  .main-nav a { display: none; }
  .tool-button { padding: 0 6px; }
  .tool-button span { display: none; }
  .zoom-controls > .icon-button { min-width: 38px; }
  .file-info strong { max-width: 170px; }
  .method-option { gap: 5px; padding-left: 7px; }
  .method-icon { width: 19px; }
  .method-option small { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
  .processing-spinner { animation-duration: 1.8s; }
}
