:root {
  --paper: #FAF8F4;
  --card: #FFFFFF;
  --line: #EAE3D6;
  --line-soft: #EFE9DE;
  --line-strong: #D6CEBD;
  --line-dash: #CDC3B0;
  --ink: #211D15;
  --muted: #6F675A;
  --faint: #98917F;
  --disabled: #B5AE9E;
  --accent: #D2500F;
  --accent-dark: #A83E08;
  --accent-tint: #FAEDE3;
  --green: #2F7D4F;
  --green-tint: #EAF3EC;
  --green-line: #CFE4D4;
  --canvas: #F4EFE6;
  --icon-bg: #F6F1E8;
  --display: 'Bricolage Grotesque', 'Segoe UI', sans-serif;
  --body-font: 'Instrument Sans', 'Segoe UI', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', Consolas, monospace;
}

.legal-page{max-width:760px;margin:0 auto;padding:48px 24px 80px}.legal-brand{display:inline-block;margin-bottom:48px;color:var(--ink);font:700 24px/1 var(--serif);text-decoration:none}.legal-page article{background:var(--paper);border:1px solid var(--line);border-radius:20px;padding:clamp(24px,5vw,56px)}.legal-page h1{font-size:clamp(38px,7vw,68px);line-height:.95;margin:12px 0 36px}.legal-page h2{font-size:21px;margin:32px 0 8px}.legal-page p{line-height:1.7;color:var(--muted)}.legal-page a{color:inherit}.foot-links a{color:inherit;text-decoration:none}.foot-links a:hover{text-decoration:underline}

* { box-sizing: border-box; }
html, body { margin: 0; }
[hidden] { display: none !important; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body-font);
  font-size: 15px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; display: flex; flex-direction: column; }
button { font: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.mono { font-family: var(--mono); }
.display { font-family: var(--display); }
.label {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--faint);
}
.fine { font-size: 12px; line-height: 1.55; color: var(--faint); }
.fine.center { text-align: center; }
.hint { font-size: 12.5px; color: var(--faint); }
.sub { font-size: 14.5px; color: var(--muted); margin: 0; }
.hr { height: 1px; background: var(--line-soft); }
.vr { width: 1px; height: 20px; background: var(--line-soft); margin: 0 6px; }

.linklike { color: var(--accent); font-weight: 500; }
.linklike:hover { color: var(--accent-dark); }
.linklike.back { font-size: 13px; align-self: flex-start; }

/* ---------- chrome ---------- */

.nav {
  height: 72px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px; border-bottom: 1px solid var(--line-soft);
  background: var(--paper);
}
.nav-left { display: flex; align-items: center; gap: 36px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo span { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-link { font-size: 14px; font-weight: 500; color: var(--muted); }
.nav-link:hover { color: var(--ink); }
.nav-link.is-active { font-weight: 600; color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 16px; }
.is-soon { cursor: default; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 500;
}
.chip-green { border: 1px solid var(--green-line); background: var(--green-tint); color: var(--green); }
.chip-plain { border: 1px solid #E4DCCD; background: var(--card); color: var(--ink); font-size: 13px; padding: 6px 13px; }
.chip-plain:hover { border-color: var(--accent); color: var(--accent); }
.chip-mono { font-family: var(--mono); font-size: 12px; color: var(--muted); background: var(--icon-bg); padding: 4px 10px; }

.btn { border-radius: 8px; font-weight: 600; transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.05s; }
.btn:active { transform: translateY(1px); }
.btn-ink { background: var(--ink); color: #FBF9F5; font-size: 14px; padding: 9px 16px; }
.btn-primary {
  background: var(--accent); color: #FFFFFF; font-size: 14.5px; font-weight: 650;
  padding: 11px 20px; border-radius: 9px;
  box-shadow: 0 6px 16px rgba(210, 80, 15, 0.25);
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled { background: #D8D0C0; box-shadow: none; cursor: default; }
.btn-big { width: 100%; padding: 13px; font-size: 15px; border-radius: 10px; }
.btn-ghost {
  border: 1px solid var(--line-strong); background: var(--card);
  font-size: 13px; font-weight: 500; padding: 7px 12px; color: var(--ink);
}
.btn-ghost:hover:not(:disabled) { border-color: var(--faint); }
.btn-ghost:disabled { color: var(--disabled); border-color: var(--line); cursor: default; }
.icon-btn {
  width: 32px; height: 32px; border: 1px solid #E4DCCD; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { border-color: var(--faint); }

.foot {
  border-top: 1px solid var(--line-soft);
  padding: 14px 48px; display: flex; align-items: center; justify-content: space-between;
  font-size: 12.5px; color: var(--faint);
}
.foot-links { display: flex; gap: 18px; }

/* ---------- screens ---------- */

.screen { display: flex; flex-direction: column; flex: 1; }
.screen[hidden] { display: none; }
.screen-center { align-items: center; justify-content: center; padding: 48px; }

/* ---------- dashboard ---------- */

#screen-dashboard { padding: 0 48px 32px; max-width: 1440px; width: 100%; margin: 0 auto; }
.hero { padding-top: 38px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.hero h1 {
  margin: 0; font-family: var(--display); font-size: clamp(32px, 4vw, 46px);
  font-weight: 700; letter-spacing: -0.022em; line-height: 1.04;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { margin: 0; font-size: 16.5px; line-height: 1.55; color: var(--muted); max-width: 680px; }

.job-band {
  margin-top: 26px; background: var(--card); border: 1px solid #E9E2D6; border-radius: 16px;
  box-shadow: 0 1px 2px rgba(33, 29, 21, 0.04), 0 10px 28px rgba(33, 29, 21, 0.05);
  padding: 14px; display: flex; align-items: stretch; gap: 16px;
}
.dropzone {
  flex: 1.5; border: 1.5px dashed var(--line-dash); background: #FDFBF7; border-radius: 10px;
  padding: 22px 26px; display: flex; align-items: center; gap: 18px;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone.is-over { border-color: var(--accent); background: var(--accent-tint); }
.dz-title { font-size: 16.5px; font-weight: 600; }
.dz-sub { font-size: 13px; color: var(--faint); margin-top: 4px; }
.band-right { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 4px 12px 4px 4px; }
.search-box {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid #E4DCCD; background: var(--paper); border-radius: 8px; padding: 10px 12px;
}
.search-box:focus-within { border-color: var(--accent); }
.search-box input { flex: 1; border: none; background: none; font-size: 14px; padding: 0; outline: none; }
.search-box input::placeholder { color: var(--faint); }
.search-box kbd {
  font-family: var(--mono); font-size: 11px; color: var(--faint);
  border: 1px solid #E4DCCD; border-radius: 5px; padding: 2px 6px; background: var(--card);
}
.quick-chips { display: flex; gap: 8px; flex-wrap: wrap; }

.tools-head { display: flex; align-items: baseline; justify-content: space-between; margin-top: 30px; }
.tools-head h2 { margin: 0; font-family: var(--display); font-size: 21px; font-weight: 650; letter-spacing: -0.01em; }
.tabs { display: flex; gap: 22px; align-items: center; }
.tab { font-size: 13.5px; font-weight: 500; color: var(--faint); padding-bottom: 3px; border-bottom: 2px solid transparent; }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }

.tool-grid {
  margin-top: 16px; display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
}
.tool-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px;
  display: flex; gap: 12px; align-items: flex-start; text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.tool-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(210, 80, 15, 0.13), 0 8px 20px rgba(33, 29, 21, 0.07);
  transform: translateY(-1px);
}
.tool-card:hover .tc-icon { background: var(--accent-tint); }
.tool-card:hover .tc-icon svg { stroke: var(--accent); }
.tc-icon {
  width: 38px; height: 38px; flex: 0 0 auto; border-radius: 9px; background: var(--icon-bg);
  display: flex; align-items: center; justify-content: center; transition: background 0.15s;
}
.tc-icon svg { stroke: var(--ink); transition: stroke 0.15s; }
.tc-text { display: flex; flex-direction: column; gap: 3px; }
.tc-name { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.tc-desc { font-size: 12.5px; line-height: 1.4; color: var(--faint); }
.soon-tag {
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--faint); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px;
}

/* ---------- staging ---------- */

#screen-staging { padding: 34px 48px 40px; max-width: 1440px; width: 100%; margin: 0 auto; }
#screen-staging .display { margin: 8px 0 6px; font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.staging-cols { display: flex; gap: 28px; margin-top: 24px; align-items: flex-start; }
.file-col { flex: 1.4; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.file-row {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; display: flex; align-items: center; gap: 14px;
}
.fr-thumb {
  width: 44px; height: 56px; flex: 0 0 auto; background: var(--paper);
  border: 1px solid var(--line-soft); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
}
.fr-text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.fr-name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-meta { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.fr-remove { color: var(--faint); display: flex; padding: 4px; border-radius: 6px; }
.fr-remove:hover { color: var(--accent); background: var(--accent-tint); }
.add-more {
  border: 1.5px dashed var(--line-dash); border-radius: 12px; padding: 15px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--muted); font-size: 13.5px; font-weight: 500;
}
.add-more:hover { border-color: var(--accent); color: var(--accent); }
.total { font-size: 12px; color: var(--faint); padding: 2px 4px; }

.suggest-col { width: 440px; flex: 0 0 auto; display: flex; flex-direction: column; gap: 12px; }
.sg-primary {
  background: var(--ink); color: #FBF9F5; border-radius: 14px; padding: 20px;
  display: flex; flex-direction: column; gap: 10px; text-align: left; width: 100%;
}
.sg-primary .sgp-head { display: flex; align-items: center; gap: 10px; }
.sg-primary .sgp-title { font-family: var(--display); font-size: 18px; font-weight: 650; }
.sg-primary .sgp-desc { font-size: 13.5px; line-height: 1.5; color: #B9B2A4; }
.sg-primary .sgp-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.sg-primary .sgp-meta { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.sg-primary .sgp-cta {
  background: var(--accent); color: #FFFFFF; border-radius: 8px; padding: 9px 16px;
  font-size: 14px; font-weight: 600;
}
.sg-primary:hover .sgp-cta { background: var(--accent-dark); }
.sg-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px;
  display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
}
.sg-card:hover { border-color: var(--accent); }
.sg-icon {
  width: 36px; height: 36px; flex: 0 0 auto; border-radius: 9px; background: var(--icon-bg);
  display: flex; align-items: center; justify-content: center;
}
.sg-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.sg-name { font-size: 14.5px; font-weight: 600; }
.sg-desc { font-size: 12.5px; color: var(--faint); }
.sg-go { font-size: 13.5px; font-weight: 600; color: var(--accent); }
.pipeline-card {
  border: 1px solid #E9E2D6; background: var(--icon-bg); border-radius: 12px;
  padding: 16px; display: flex; flex-direction: column; gap: 6px; margin-top: 6px;
}
.pc-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.pc-sub { font-size: 12.5px; line-height: 1.5; color: var(--muted); }

/* ---------- tool screens ---------- */

.screen-tool { background: var(--paper); }
.tool-bar {
  height: 64px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; background: var(--card); border-bottom: 1px solid var(--line-soft);
}
.tb-left { display: flex; align-items: center; gap: 14px; }
.tb-title { font-family: var(--display); font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }
.sub-bar {
  height: 52px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; background: var(--card); border-bottom: 1px solid var(--line-soft);
}
.sb-group { display: flex; align-items: center; gap: 8px; }
.tool-body { flex: 1; display: flex; min-height: 0; align-items: stretch; }
.merge-canvas {
  flex: 1; background: var(--canvas); padding: 28px;
  display: flex; flex-wrap: wrap; gap: 18px; align-content: flex-start; overflow: auto;
}
.merge-empty {
  width: 100%; padding: 80px 0; display: flex; align-items: center; justify-content: center;
  color: var(--faint); font-size: 14.5px;
}
.merge-card {
  width: 208px; background: var(--card); border-radius: 12px; padding: 12px;
  display: flex; flex-direction: column; gap: 10px; cursor: pointer;
  border: 1px solid #E7E0D2; box-shadow: 0 1px 2px rgba(33, 29, 21, 0.05);
  text-align: left; transition: border-color 0.12s, box-shadow 0.12s;
}
.merge-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(210, 80, 15, 0.16), 0 10px 22px rgba(33, 29, 21, 0.10);
}
.mc-thumb {
  position: relative; height: 128px; background: var(--paper);
  border: 1px solid #F0EADF; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.mc-ord {
  position: absolute; top: 8px; left: 8px; width: 22px; height: 22px; border-radius: 999px;
  background: var(--ink); color: #FBF9F5; font-family: var(--mono); font-size: 11.5px;
  display: flex; align-items: center; justify-content: center;
}
.mc-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-meta { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }

.page-card {
  width: 128px; background: var(--card); border-radius: 10px; padding: 8px;
  display: flex; flex-direction: column; gap: 6px; cursor: pointer;
  border: 1px solid #E7E0D2; box-shadow: 0 1px 2px rgba(33, 29, 21, 0.05);
  text-align: center; transition: border-color 0.12s, box-shadow 0.12s;
}
.page-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(210, 80, 15, 0.16), 0 8px 18px rgba(33, 29, 21, 0.10);
}
.pg-thumb {
  position: relative; height: 140px; background: var(--paper);
  border: 1px solid #F0EADF; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}
.pg-thumb svg { transition: transform 0.15s; }
.pg-rot {
  position: absolute; top: 6px; right: 6px; font-family: var(--mono); font-size: 10.5px;
  background: var(--accent-tint); color: var(--accent-dark); border-radius: 999px; padding: 1px 6px;
}
.pg-label { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.mc-ord.alt { background: var(--accent); }
.page-card.is-static { cursor: default; }
.mono-input.num {
  width: 74px; border: 1px solid #E4DCCD; border-radius: 8px;
  padding: 7px 10px; background: var(--card); font-size: 13px;
}
.pg-check {
  position: absolute; top: 6px; left: 6px; z-index: 1;
  width: 20px; height: 20px; border-radius: 999px; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(210, 80, 15, 0.35);
}

.thumb-slot {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; overflow: hidden;
}

.wm-stage { position: relative; width: 400px; height: 490px; display: flex; align-items: center; justify-content: center; }
.wm-stage.is-placeable { cursor: crosshair; }
.sign-pad {
  width: 100%; height: 120px; background: #FFFFFF;
  border: 1.5px dashed var(--line-dash); border-radius: 10px;
  touch-action: none; cursor: crosshair;
}
#sign-overlay { position: absolute; pointer-events: none; }
#redact-overlay { position: absolute; pointer-events: none; }
#redact-stage-wrap .wm-stage { touch-action: none; }
#wm-overlay {
  position: absolute; display: flex; align-items: center; justify-content: center;
  pointer-events: none; overflow: hidden;
}
#wm-preview-text { font-family: var(--body-font); font-weight: 700; white-space: nowrap; line-height: 1; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg .chip-plain.is-active {
  border-color: var(--accent); color: var(--accent-dark);
  background: var(--accent-tint); font-weight: 600;
}
.thumb-slot canvas {
  border-radius: 3px; background: #FFFFFF;
  box-shadow: 0 0 0 1px var(--line-soft), 0 1px 3px rgba(33, 29, 21, 0.08);
  max-width: 100%; max-height: 100%;
}
.ip-img {
  max-width: 100%; max-height: 100%; border-radius: 3px;
  box-shadow: 0 0 0 1px var(--line-soft), 0 1px 3px rgba(33, 29, 21, 0.08);
}

.tool-side {
  width: 340px; flex: 0 0 auto; background: var(--card); border-left: 1px solid var(--line-soft);
  padding: 24px; display: flex; flex-direction: column; gap: 16px;
}
.filename-row {
  border: 1px solid #E4DCCD; border-radius: 8px; padding: 10px 12px;
  display: flex; align-items: center; gap: 8px; background: var(--paper);
}
.mono-input { font-family: var(--mono); font-size: 13px; border: none; background: none; outline: none; flex: 1; min-width: 0; }
.mono-input.big {
  font-size: 15px; border: 1px solid #E4DCCD; border-radius: 8px; padding: 12px 14px;
  background: var(--paper); width: 100%;
}
.mono-input.big:focus { border-color: var(--accent); }
.side-note { font-size: 13.5px; font-weight: 600; }

.center-wrap { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 48px; background: var(--canvas); }
.center-card {
  width: 520px; max-width: 100%; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 26px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 1px 2px rgba(33, 29, 21, 0.04), 0 10px 28px rgba(33, 29, 21, 0.05);
}
.opt-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 16px;
  display: flex; align-items: center; gap: 14px;
}
.opt-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(210, 80, 15, 0.14); }
.opt-card.is-disabled { opacity: 0.6; }
.radio {
  width: 18px; height: 18px; flex: 0 0 auto; border-radius: 999px; border: 2px solid #C9C0AE;
  display: flex; align-items: center; justify-content: center;
}
.opt-card.is-selected .radio { border-color: var(--accent); }
.radio-dot { width: 8px; height: 8px; border-radius: 999px; background: transparent; }
.opt-card.is-selected .radio-dot { background: var(--accent); }
.oc-text { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.oc-name { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.oc-desc { font-size: 12.5px; line-height: 1.45; color: var(--faint); }
.oc-est { font-size: 11.5px; color: var(--faint); flex: 0 0 auto; }
#compress-opts { display: flex; flex-direction: column; gap: 10px; }
.opt-card { width: 100%; text-align: left; }
.oc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: 0 0 auto; }
.oc-size { font-family: var(--mono); font-size: 15px; }
.oc-save { font-size: 11.5px; color: var(--green); font-weight: 600; }
.oc-save.is-muted { color: var(--faint); font-weight: 500; }
.rec-pill { background: var(--accent-tint); color: var(--accent-dark); border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 600; }

/* ---------- processing / done ---------- */

.proc, .done {
  width: 620px; max-width: 100%; display: flex; flex-direction: column;
  align-items: center; gap: 20px; text-align: center; margin-top: -24px;
}
.proc .display, .done .display { margin: 0; font-size: 27px; font-weight: 650; letter-spacing: -0.015em; }
.done .display { font-size: 31px; font-weight: 700; }
.pulse-badge {
  width: 76px; height: 76px; border-radius: 999px; background: var(--icon-bg);
  display: flex; align-items: center; justify-content: center;
  animation: bindery-pulse 2.2s ease-in-out infinite;
}
@keyframes bindery-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.check-badge {
  width: 68px; height: 68px; border-radius: 999px; background: var(--green-tint);
  border: 1px solid var(--green-line); display: flex; align-items: center; justify-content: center;
}
.progress { width: 100%; height: 8px; border-radius: 999px; background: #EDE7DA; overflow: hidden; }
#proc-fill { height: 8px; width: 0%; background: var(--accent); border-radius: 999px; transition: width 0.2s ease; }
#proc-meta { font-size: 12.5px; color: var(--muted); }
.steps { display: flex; gap: 30px; align-items: center; margin-top: 4px; flex-wrap: wrap; justify-content: center; }
.step { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--faint); }
.step.is-active { color: var(--ink); font-weight: 600; }
.step.is-done { color: var(--muted); }
.step-dot { width: 14px; height: 14px; border-radius: 999px; border: 1.5px solid #D8D0C0; flex: 0 0 auto; }
.step.is-active .step-dot { border-color: var(--accent); border-top-color: transparent; animation: bindery-spin 1.1s linear infinite; }
.step.is-done .step-dot { border-color: var(--green); background: var(--green-tint); }
@keyframes bindery-spin { to { transform: rotate(360deg); } }

.result-card {
  width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 18px; display: flex; align-items: center; gap: 14px;
  box-shadow: 0 1px 2px rgba(33, 29, 21, 0.04); text-align: left;
}
.rc-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.rc-name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-meta { font-size: 12px; color: var(--faint); }
.bars { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: flex; align-items: center; gap: 12px; }
.bar-label { font-size: 11.5px; color: var(--faint); width: 48px; text-align: right; }
.bar-track { flex: 1; height: 8px; border-radius: 999px; background: #EDE7DA; overflow: hidden; }
.bar-fill { height: 8px; border-radius: 999px; }
.bar-before { background: #C9C0AE; width: 100%; }
.bar-after { background: var(--green); width: 0%; }
.bar-val { font-size: 11.5px; color: var(--faint); width: 64px; text-align: left; }
.bar-val.is-green { color: var(--green); font-weight: 500; }
.chain { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: 8px; align-items: flex-start; }
.done .quick-chips { justify-content: flex-start; }

/* ---------- overlays ---------- */

#drop-veil {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(250, 248, 244, 0.92);
  display: flex; align-items: center; justify-content: center;
}
#drop-veil[hidden] { display: none; }
.veil-inner {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  font-family: var(--display); font-size: 24px; font-weight: 650;
  border: 2px dashed var(--accent); border-radius: 20px; padding: 48px 72px;
  background: var(--card); color: var(--ink);
}

.nav-account { display: flex; align-items: center; gap: 14px; }
.account-chip { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }

.modal-veil {
  position: fixed; inset: 0; z-index: 65;
  background: rgba(33, 29, 21, 0.35);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal-card {
  position: relative; width: 400px; max-width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 28px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 24px 64px rgba(33, 29, 21, 0.25);
}
.modal-title { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.015em; }
.modal-sub { margin: 0 0 4px; font-size: 13.5px; }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 8px; color: var(--faint);
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { color: var(--ink); background: var(--icon-bg); }
.pro-list { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.5; color: var(--muted); display: grid; gap: 6px; }
.pro-price { font-size: 14px; color: var(--ink); }
.pro-badge { background: var(--accent-tint); color: var(--accent-dark); font-weight: 600; padding: 4px 10px; font-size: 12px; }

#toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #FBF9F5; font-size: 13.5px; font-weight: 500;
  padding: 11px 18px; border-radius: 10px; z-index: 60;
  box-shadow: 0 10px 28px rgba(33, 29, 21, 0.25); max-width: 80vw;
}
#toast[hidden] { display: none; }

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .nav, .foot, #screen-dashboard, #screen-staging { padding-left: 24px; padding-right: 24px; }
  .nav-links { display: none; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .job-band { flex-direction: column; }
  .staging-cols { flex-direction: column; }
  .suggest-col { width: 100%; }
  .tool-body { flex-direction: column; }
  .tool-side { width: 100%; border-left: none; border-top: 1px solid var(--line-soft); }
}
@media (max-width: 640px) {
  .tool-grid { grid-template-columns: 1fr; }
  .nav-right .chip-green span { display: none; }
  .sub-bar { height: auto; padding: 10px 16px; flex-wrap: wrap; gap: 8px; }
  .sub-bar .hint { display: none; }
  .tools-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .tabs { flex-wrap: wrap; gap: 10px 14px; }
  .job-band { padding: 10px; }
  .dropzone { padding: 16px; }
}
