:root {
  --paper: #f3eee6;
  --paper-2: #ebe4d8;
  --ink: #1b1713;
  --ink-soft: #5c5348;
  --line: rgba(27, 23, 19, 0.1);
  --accent: #c24b1e;
  --accent-2: #9a3512;
  --ok: #2c6a4a;
  --card: #fffaf3;
  --shadow: 0 18px 50px rgba(40, 24, 8, 0.08);
  --radius: 18px;
  --max: 1080px;
  --sans: "DM Sans", system-ui, sans-serif;
  --serif: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); }
body { min-height: 100vh; }
button, input, select { font-family: inherit; }
a { color: inherit; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }

.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0 10px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center; font-weight: 700; letter-spacing: -0.04em;
}
.word { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nav a, .ghost, .lang {
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  padding: 8px 12px; border-radius: 999px; text-decoration: none; cursor: pointer; font-size: 0.92rem;
}
.nav a.active, .lang.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.hero { padding: 36px 0 18px; }
.hero h1 {
  font-family: var(--serif); font-weight: 560; font-size: clamp(2.1rem, 5vw, 3.6rem);
  line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 12px; max-width: 16ch;
}
.lede { color: var(--ink-soft); font-size: 1.12rem; max-width: 54ch; margin: 0 0 18px; }
.trust {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin: 0 0 22px; max-width: 62ch; box-shadow: var(--shadow);
}
.trust h3 { margin: 0 0 6px; font-size: 1rem; }
.trust p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.5; }
.hide { display: none !important; }
.lab {
  display: flex; align-items: center; gap: 6px; font-weight: 600;
}
.tip {
  width: 18px; height: 18px; border-radius: 99px; border: 1px solid var(--line);
  display: inline-grid; place-items: center; font-size: 0.75rem; cursor: help;
  color: var(--ink-soft); background: #fff; flex: 0 0 18px;
}
.tip:hover, .tip:focus { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.pill {
  background: var(--paper-2); border-radius: 999px; padding: 6px 11px;
  font-size: 0.86rem; color: var(--ink-soft);
}

.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px; padding-bottom: 40px;
}
.tool {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; text-decoration: none; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px; min-height: 148px;
  transition: transform .15s ease;
}
.tool:hover { transform: translateY(-2px); }
.tool h3 { margin: 0; font-size: 1.08rem; }
.tool p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; flex: 1; }
.ico { font-size: 1.25rem; }

.screen { display: none; padding: 8px 0 60px; }
.screen.on { display: block; }

.back { margin: 8px 0 18px; }
h2.t { font-family: var(--serif); font-size: 2rem; margin: 0 0 6px; }
.hint { color: var(--ink-soft); margin: 0 0 18px; }

.drop {
  border: 1.5px dashed rgba(27,23,19,.28); border-radius: var(--radius);
  background: var(--card); min-height: 160px; display: grid; place-items: center;
  text-align: center; padding: 24px; cursor: pointer;
}
.drop.over { border-color: var(--accent); background: #fff3ea; }
.drop strong { display: block; margin-bottom: 4px; }
.drop span { color: var(--ink-soft); font-size: 0.92rem; }

.files { margin: 16px 0; display: flex; flex-direction: column; gap: 8px; }
.file {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 12px; display: flex; align-items: center; gap: 10px;
}
.file b { flex: 1; font-weight: 600; font-size: 0.95rem; }
.file small { color: var(--ink-soft); }
.file button {
  border: 0; background: transparent; cursor: pointer; color: var(--ink-soft); font-size: 1.1rem;
}

.thumbs {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px; margin: 16px 0;
}
.thumb {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 8px; text-align: center; position: relative;
}
.thumb canvas { width: 100%; height: auto; border-radius: 8px; background: #fff; }
.thumb .pg { font-size: 0.78rem; color: var(--ink-soft); margin-top: 6px; }
.thumb.gone { opacity: .35; }
.thumb .acts { display: flex; justify-content: center; gap: 4px; margin-top: 4px; }
.thumb .acts button {
  border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; padding: 2px 6px;
}

.opts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px; margin: 16px 0;
}
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; }
label.field input, label.field select, label.field textarea {
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff;
}
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }

.btn {
  background: var(--ink); color: var(--paper); border: 0; border-radius: 999px;
  padding: 12px 18px; font-weight: 600; cursor: pointer;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.sec { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.accent { background: var(--accent); }

.bar {
  height: 8px; background: var(--paper-2); border-radius: 99px; overflow: hidden; margin: 14px 0; display: none;
}
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }

.status { min-height: 1.4em; color: var(--ink-soft); font-size: 0.92rem; }
.status.err { color: #9b1c1c; }
.status.ok { color: var(--ok); }

.foot {
  border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--ink-soft); font-size: 0.9rem;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.price {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.price.hot { border-color: var(--ink); }
.price h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 1.6rem; }
.price .amt { font-size: 2rem; font-weight: 700; margin: 8px 0; }
.price ul { padding-left: 18px; color: var(--ink-soft); }
.prose { max-width: 62ch; line-height: 1.6; color: var(--ink-soft); }
.prose h3 { color: var(--ink); }

.banner {
  background: #fff3ea; border: 1px solid rgba(194,75,30,.25); border-radius: 14px;
  padding: 12px 14px; margin: 0 0 16px; font-size: 0.92rem; line-height: 1.45;
}
.banner strong { display: block; margin-bottom: 2px; }
.modal-bg {
  position: fixed; inset: 0; background: rgba(27,23,19,.45); display: none;
  place-items: center; padding: 20px; z-index: 40;
}
.modal-bg.on { display: grid; }
.modal {
  background: var(--card); border-radius: 20px; padding: 22px; max-width: 420px; width: 100%;
  box-shadow: var(--shadow);
}
.modal h3 { font-family: var(--serif); margin: 0 0 8px; font-size: 1.5rem; }
.modal p { color: var(--ink-soft); margin: 0 0 16px; line-height: 1.5; }
.modal .row { margin-top: 0; }
.acct { font-size: 0.85rem; color: var(--ink-soft); }

@media (max-width: 640px) {
  .hero h1 { max-width: none; }
  .top { align-items: flex-start; }
}
