:root {
  --bg: #f4f1ec;
  --card: #ffffff;
  --ink: #1d1b18;
  --muted: #6b655d;
  --accent: #b08968;
  --accent-dark: #8c6a4f;
  --line: #e6e0d8;
  --ok: #3f9b6a;
  --err: #c0492f;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(40,30,20,.08);
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.55;
}
.container { max-width: 980px; margin: 0 auto; padding: 0 20px; }

/* header */
.site-header { background: rgba(255,255,255,.7); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 700; font-size: 20px; color: var(--ink); text-decoration: none; letter-spacing: .3px; }
.lang-switch { display: flex; gap: 4px; }
.lang-switch a { font-size: 20px; text-decoration: none; padding: 4px 6px; border-radius: 8px; filter: grayscale(.6); opacity: .65; transition: .15s; }
.lang-switch a:hover, .lang-switch a.active { filter: none; opacity: 1; background: var(--line); }

/* hero */
.hero { text-align: center; padding: 48px 0 28px; }
.hero h1 { font-size: clamp(26px, 4vw, 38px); margin: 0 0 12px; font-weight: 700; }
.hero .subtitle { color: var(--muted); font-size: 17px; max-width: 620px; margin: 0 auto; }

/* lookup card */
.lookup-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; max-width: 520px; margin: 0 auto 40px; }
.field-label { display: block; font-weight: 600; margin: 18px 0 8px; font-size: 14px; }
.field-label:first-child { margin-top: 0; }
.marketplace-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mp-option input { position: absolute; opacity: 0; }
.mp-box { display: flex; align-items: center; justify-content: center; height: 64px; border: 2px solid var(--line); border-radius: 10px; cursor: pointer; transition: .15s; background:#fff; }
.mp-box img { max-height: 32px; max-width: 80%; }
.mp-text { font-weight: 700; font-size: 18px; }
.mp-option input:checked + .mp-box { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(176,137,104,.15); }
input[type="text"] { width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 16px; font-family: inherit; }
input[type="text"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(176,137,104,.15); }
.btn-primary { width: 100%; margin-top: 22px; padding: 14px; background: var(--accent); color: #fff; border: none; border-radius: 10px; font-size: 16px; font-weight: 600; cursor: pointer; transition: .15s; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled { opacity: .6; cursor: default; }
.form-error { color: var(--err); margin-top: 14px; font-size: 14px; }

/* items */
.items-head { text-align: center; margin: 10px 0 26px; }
.items-head h2 { margin: 0 0 6px; }
.items-head .order-meta { color: var(--muted); font-size: 14px; }
.item-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 22px; overflow: hidden; }
.item-card.done { border: 2px solid var(--ok); }
.item-head { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.item-head .item-name { font-weight: 600; flex: 1; }
.item-head .item-badge { font-size: 12px; padding: 3px 10px; border-radius: 20px; background: var(--line); color: var(--muted); }
.item-head .item-badge.done { background: var(--ok); color: #fff; }
.item-body { padding: 22px; }
.multi-hint { background: #fbf7f1; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: 13px; color: var(--muted); margin-bottom: 16px; }

/* dropzone */
.dropzone { border: 2px dashed var(--line); border-radius: 12px; padding: 40px 20px; text-align: center; cursor: pointer; transition: .15s; color: var(--muted); }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: #fbf7f1; }
.dropzone svg { width: 40px; height: 40px; opacity: .5; margin-bottom: 10px; }

/* editor */
.editor-wrap { display: none; }
.editor-wrap.active { display: block; }
.editor-stage { background: #2b2723; border-radius: 12px; padding: 16px; display: flex; justify-content: center; }
.editor-canvas-holder { position: relative; }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tool-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border: 1px solid var(--line); background: #fff; border-radius: 9px; cursor: pointer; font-size: 14px; font-family: inherit; }
.tool-btn:hover { border-color: var(--accent); }
.zoom-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.zoom-row input[type=range] { flex: 1; accent-color: var(--accent); }
.bleed-hint, .lowres-warn { font-size: 13px; margin-top: 12px; padding: 10px 14px; border-radius: 10px; }
.bleed-hint { background: #fbf7f1; color: var(--muted); border: 1px solid var(--line); }
.lowres-warn { background: #fdf0ec; color: var(--err); border: 1px solid #f3d4cb; display: none; }
.lowres-warn.show { display: block; }
.editor-actions { display: flex; gap: 12px; margin-top: 18px; }
.editor-actions .btn-primary { margin-top: 0; }
.btn-secondary { padding: 14px 18px; background: #fff; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 15px; font-family: inherit; }

/* image-part selector (multiimage) */
.parts-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.part-tab { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: 13px; background:#fff; }
.part-tab.active { border-color: var(--accent); background: #fbf7f1; font-weight: 600; }
.part-tab.done::after { content: ' ✓'; color: var(--ok); }

/* submit all */
.submit-all-wrap { text-align: center; margin: 30px 0 60px; }
.submit-all-wrap .btn-primary { max-width: 360px; margin: 0 auto; }

/* done */
.done-card { text-align: center; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 56px 32px; max-width: 520px; margin: 30px auto 60px; }
.done-check { width: 72px; height: 72px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 38px; display: flex; align-items: center; justify-content: center; margin: 0 auto 22px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 24px 0; text-align: center; color: var(--muted); font-size: 13px; }

/* spinner */
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -3px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
