:root {
  --bg: #f6f5f1; --surface: #ffffff; --surface-2: #eeede7;
  --ink: #24231f; --ink-2: #56544c; --muted: #6b685d;
  --line: #e7e5dc; --line-strong: #d9d6ca;
  --accent: #5f7c61; --accent-deep: #42584a; --accent-soft: #e6ece1; --ok: #4f9d6b; --danger: #b0594b;
  --shadow-sm: 0 1px 2px rgba(36,35,31,0.05), 0 4px 12px rgba(36,35,31,0.05);
  --shadow-md: 0 2px 6px rgba(36,35,31,0.05), 0 16px 40px rgba(36,35,31,0.1);
  --radius: 18px;
  --font-display: 'Space Grotesk','PingFang SC','Microsoft YaHei',system-ui,sans-serif;
  --font-body: 'Inter','PingFang SC','Microsoft YaHei',system-ui,sans-serif;
  --font-mono: 'IBM Plex Mono','SFMono-Regular',Consolas,monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
body::before { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.04; mix-blend-mode: multiply; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E"); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.garden { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: radial-gradient(1100px 640px at 82% -8%, rgba(95,124,97,0.1), transparent 62%), radial-gradient(820px 560px at 2% 16%, rgba(95,124,97,0.07), transparent 60%), radial-gradient(960px 720px at 92% 104%, rgba(95,124,97,0.09), transparent 66%); }
.shell { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px clamp(20px,5vw,72px); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(8px); position: sticky; top: 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; box-shadow: var(--shadow-sm); }
.brand__mark svg { width: 36px; height: 36px; display: block; }
.brand__word { display: flex; flex-direction: column; line-height: 1.15; }
.brand__word strong { font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: 0.02em; }
.brand__word small { margin-top: 4px; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.22em; color: var(--muted); }
.topbar__meta { display: flex; align-items: center; gap: 22px; }
.back { font-size: 13px; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--accent-deep); }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.status__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(79,157,107,0.14); }
.main { flex: 1; width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 40px 0 72px; }
.hero { max-width: 760px; margin-bottom: 36px; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em; color: var(--muted); text-transform: uppercase; }
.eyebrow__rule { width: 34px; height: 2px; background: var(--accent); border-radius: 1px; }
.hero__title { margin: 0 0 14px; font-family: var(--font-display); font-size: clamp(25px,5vw,40px); font-weight: 700; letter-spacing: 0; line-height: 1.05; }
.hero__dot { color: var(--accent); }
.hero__lead { margin: 0; font-size: 16px; line-height: 1.7; color: var(--ink-2); max-width: 640px; }
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 820px) { .tools { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.panel__title { margin: 0; padding: 14px 20px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; color: var(--ink-2); text-transform: uppercase; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.panel__body { padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 150px; padding: 24px 20px; text-align: center; border: 2px dashed var(--line-strong); border-radius: 14px; background: var(--surface-2); cursor: pointer; transition: all 0.18s ease; }
.dropzone:hover, .dropzone.is-dragover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone--sm { min-height: 72px; flex-direction: row; gap: 10px; padding: 16px; font-size: 13px; color: var(--muted); }
.dropzone__icon { width: 40px; height: 40px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dropzone__title { margin: 4px 0 0; font-family: var(--font-display); font-size: 15px; font-weight: 600; }
.dropzone__hint { margin: 0; font-size: 12.5px; color: var(--muted); }
.preview__stage { display: grid; place-items: center; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); padding: 16px; }
.preview__stage canvas { max-width: 100%; height: auto; border-radius: 8px; }
.btn { padding: 11px 22px; border-radius: 10px; font-size: 14px; font-weight: 600; background: var(--accent); color: #fff; }
.btn:hover:not(:disabled) { background: var(--accent-deep); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.option { margin: 0; }
.option--half { flex: 1; }
.option__label { display: block; font-size: 13px; color: var(--ink); margin-bottom: 8px; }
.option__label em { font-style: normal; font-family: var(--font-mono); color: var(--accent-deep); margin-left: 6px; }
.field { display: block; margin: 0; }
.field__label { display: block; font-size: 13px; color: var(--ink); margin-bottom: 8px; }
.text-input { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); padding: 11px 14px; font-family: var(--font-mono); font-size: 14px; color: var(--ink); outline: none; }
.text-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(95,124,97,0.14); }
.row { display: flex; gap: 14px; }
@media (max-width: 520px) { .row { flex-direction: column; } }
.segmented { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.segmented button { padding: 9px 18px; font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); }
.segmented button.is-active { background: var(--accent); color: #fff; }
.segmented button:not(.is-active):hover { color: var(--accent-deep); }
.field__control { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.field__control:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(95,124,97,0.14); }
.field__control input { flex: 1; min-width: 0; border: none; background: none; padding: 11px 14px; font-family: var(--font-mono); font-size: 14px; color: var(--ink); outline: none; }
.field__unit { padding: 0 14px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); border-left: 1px solid var(--line); }
.color { width: 100%; height: 42px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); padding: 4px; cursor: pointer; }
.range { width: 100%; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 4px; background: var(--line-strong); outline: none; }
.range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: var(--shadow-sm); cursor: pointer; }
.range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: var(--shadow-sm); cursor: pointer; }
.hint { font-size: 12px; line-height: 1.7; color: var(--muted); border-left: 3px solid var(--line-strong); padding-left: 10px; margin: 10px 0 0; }
.pos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 220px; }
.pos-grid button { aspect-ratio: 1.6; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; }
.pos-grid button::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.pos-grid button.is-active { border-color: var(--accent); background: var(--accent-soft); }
.pos-grid button.is-active::after { background: var(--accent); }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px clamp(20px,5vw,72px); border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
@media (max-width: 600px) { .footer { flex-direction: column; align-items: flex-start; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
