:root {
  --bg: #f6f5f2; --surface: #ffffff; --surface-2: #efeee9; --text: #1d1d1f; --muted: #6b6b70; --line: #dcdad3;
  --accent: #e2561f; --accent-ink: #ffffff; --accent-soft: #fbe5da; --ok: #1f7a4d; --ok-soft: #dff2e7; --warn: #8a5a00; --warn-soft: #fbefd2;
  --bad: #b3261e; --bad-soft: #f9dedc; --radius: 14px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.05);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #141416; --surface: #1d1d20; --surface-2: #26262a; --text: #ececee; --muted: #a0a0a8; --line: #34343a;
    --accent: #ff7a45; --accent-ink: #1a0b04; --accent-soft: #3a2116; --ok: #6fd3a0; --ok-soft: #173326; --warn: #f2c46b; --warn-soft: #3a2f16;
    --bad: #ff8a80; --bad-soft: #3d1c1a; color-scheme: dark; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.5; }
a { color: var(--accent); }
header.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; max-width: 1100px; margin: 0 auto; }
.brand { font-weight: 750; letter-spacing: -.02em; font-size: 20px; text-decoration: none; color: var(--text); }
.brand span { color: var(--accent); }
.lang button { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 4px 10px; cursor: pointer; font: inherit; font-size: 13px; }
.lang button[aria-pressed="true"] { color: var(--text); border-color: var(--text); }
main { max-width: 1100px; margin: 0 auto; padding: 0 20px 60px; }
h1 { font-size: clamp(26px, 4vw, 38px); letter-spacing: -.03em; line-height: 1.15; margin: 10px 0 6px; }
.lead { color: var(--muted); margin: 0 0 22px; max-width: 60ch; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.drop { display: grid; place-items: center; text-align: center; min-height: 260px; padding: 30px; border: 2px dashed var(--line); border-radius: var(--radius);
  background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.drag { border-color: var(--accent); background: var(--accent-soft); }
.drop strong { display: block; font-size: 19px; margin-bottom: 4px; }
.drop small { color: var(--muted); }
.grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr; } }
.viewer { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.viewer canvas { display: block; width: 100%; height: 100%; border-radius: var(--radius); }
.viewer .dims { position: absolute; left: 12px; bottom: 10px; font-size: 13px; color: var(--muted); background: var(--surface); padding: 2px 8px; border-radius: 8px; }
.viewer .file { position: absolute; left: 12px; top: 10px; right: 120px; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer .change { position: absolute; right: 10px; top: 8px; }
.panel { padding: 18px; }
.field { margin-bottom: 16px; }
.field > label, .field > .label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { flex: 1 1 auto; min-width: 54px; padding: 8px 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 10px; cursor: pointer; font: inherit; font-size: 14px; }
.seg button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; font: inherit; font-size: 14px; color: var(--text); }
.swatch i { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }
.swatch[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.price { padding: 18px; border-top: 1px solid var(--line); }
.price .total { font-size: 34px; font-weight: 750; letter-spacing: -.03em; }
.price .tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; margin-left: 8px; vertical-align: middle; }
.tag.exact { background: var(--ok-soft); color: var(--ok); }
.tag.est { background: var(--warn-soft); color: var(--warn); }
.price .meta { color: var(--muted); font-size: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 650; cursor: pointer; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.small { padding: 6px 10px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.note { font-size: 14px; padding: 10px 12px; border-radius: 10px; margin: 10px 0; }
.note.warn { background: var(--warn-soft); color: var(--warn); }
.note.bad { background: var(--bad-soft); color: var(--bad); }
.note.ok { background: var(--ok-soft); color: var(--ok); }
.spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: auto; margin-top: 4px; }
.hidden { display: none !important; }
.steps { display: flex; gap: 18px; color: var(--muted); font-size: 14px; margin: 26px 0 0; flex-wrap: wrap; }
.steps b { color: var(--text); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 28px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.gallery figcaption { font-size: 13px; color: var(--muted); }
details summary { cursor: pointer; color: var(--muted); font-size: 14px; }
table.bd { width: 100%; font-size: 14px; border-collapse: collapse; margin-top: 8px; }
table.bd td { padding: 3px 0; } table.bd td:last-child { text-align: right; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 8px 0 8px 22px; position: relative; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 13px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.msgs { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.msg { max-width: 85%; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); font-size: 15px; white-space: pre-wrap; }
.msg.mine { align-self: flex-end; background: var(--accent-soft); }
.msg small { display: block; color: var(--muted); font-size: 12px; }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 30px 20px; }
