@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=Instrument+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f5f2eb;
  --surface: #ffffff;
  --ink: #1a1a18;
  --ink-soft: #6b6b60;
  --accent: #e84b1a;
  --accent-light: #fff0eb;
  --green: #1a7a4a;
  --green-light: #e8f5ee;
  --border: #dedad0;
  --shadow: 0 2px 20px rgba(26,26,24,0.08);
  --radius: 14px;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Instrument Sans', sans-serif;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(245,242,235,0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  display: flex; align-items: center; gap: 0;
  height: 58px;
  overflow-x: auto;
}

.logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 1.1rem;
  color: var(--ink); text-decoration: none;
  letter-spacing: -0.02em;
  margin-right: 28px; white-space: nowrap;
  flex-shrink: 0;
}
.logo span { color: var(--accent); }

.nav-tools {
  display: flex; gap: 2px;
  flex: 1; overflow-x: auto;
}

.nav-btn {
  background: none; border: none;
  padding: 6px 14px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.82rem; font-weight: 500;
  color: var(--ink-soft);
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  display: flex; align-items: center; gap: 6px;
  text-decoration: none;
}
.nav-btn:hover { background: var(--border); color: var(--ink); }
.nav-btn.active { background: var(--accent); color: #fff; }
.nav-btn .ni { font-size: 1rem; }

/* ── PAGES ── */
.page { display: none; position: relative; z-index: 1; }
.page.active { display: block; }

/* ── HOME ── */
.home-hero {
  text-align: center;
  padding: 80px 32px 60px;
  max-width: 700px;
  margin: 0 auto;
  animation: fadeUp 0.5s ease both;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 5px 14px; border-radius: 100px;
  border: 1px solid #f5c4b4;
  margin-bottom: 20px;
}

.home-hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800; line-height: 1.05;
  letter-spacing: -0.03em; margin-bottom: 18px;
}
.home-hero h1 em { font-style: normal; color: var(--accent); }

.home-hero p {
  font-size: 1rem; color: var(--ink-soft);
  line-height: 1.65; font-weight: 300;
  max-width: 480px; margin: 0 auto 40px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 32px 80px;
  position: relative; z-index: 1;
  animation: fadeUp 0.5s 0.1s ease both;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px 22px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow);
  text-align: left;
  display: flex; flex-direction: column; gap: 10px;
  text-decoration: none;
  color: inherit;
}
.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(26,26,24,0.13);
  border-color: var(--accent);
}

.tool-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.tool-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem; font-weight: 700;
  color: var(--ink);
}
.tool-card p { font-size: 0.8rem; color: var(--ink-soft); line-height: 1.5; font-weight: 300; }

.tool-tag {
  display: inline-block;
  font-size: 0.65rem; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 100px;
  background: var(--green-light); color: var(--green);
  border: 1px solid #b8dfc8;
  margin-top: auto;
}

/* ── TOOL PAGES ── */
.tool-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 32px 80px;
  animation: fadeUp 0.4s ease both;
}

.tool-page-wrap {
  position: relative; z-index: 1;
}

.tool-header {
  margin-bottom: 32px;
}

.back-btn {
  background: none; border: none;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.82rem; color: var(--ink-soft);
  cursor: pointer; padding: 0;
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 20px;
  transition: color 0.15s;
  text-decoration: none;
}
.back-btn:hover { color: var(--accent); }

.tool-header h1, .tool-header h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.8rem; font-weight: 800;
  letter-spacing: -0.02em; margin-bottom: 6px;
}

.tool-header p { font-size: 0.92rem; color: var(--ink-soft); font-weight: 300; }

/* ── DROP ZONE ── */
.drop-zone {
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 52px 32px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  box-shadow: var(--shadow);
}
.drop-zone:hover, .drop-zone.active {
  border-color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-2px);
}
.drop-zone input[type="file"] {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer;
  width: 100%; height: 100%;
}
.dz-icon {
  width: 60px; height: 60px;
  background: var(--accent-light);
  border: 2px solid #f5c4b4;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.8rem;
  transition: transform 0.2s;
}
.drop-zone:hover .dz-icon { transform: scale(1.1) rotate(-5deg); }
.drop-zone h3 { font-family: 'Syne', sans-serif; font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.drop-zone p { color: var(--ink-soft); font-size: 0.85rem; }
.drop-zone strong { color: var(--accent); }

/* ── CARD ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-top: 20px;
}
.card-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.88rem; font-weight: 700;
  margin-bottom: 16px; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between;
}
.card-hint { font-size: 0.75rem; color: var(--ink-soft); font-weight: 400; }

/* ── PREVIEW GRID ── */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.preview-item {
  background: #f0ede6;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: grab;
  position: relative;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  user-select: none;
}
.preview-item:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(26,26,24,0.1); }
.preview-item:active { cursor: grabbing; }
.preview-item.dragging { opacity: 0.3; transform: scale(0.94); }
.preview-item.drag-over { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,75,26,0.2); }

.preview-item img {
  width: 100%; height: 160px;
  object-fit: contain; display: block;
  background: #f0ede6;
  image-orientation: from-image;
}

.item-footer {
  padding: 6px 9px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.item-name {
  font-size: 0.6rem; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 80px;
}
.item-num {
  font-family: 'Syne', sans-serif;
  font-size: 0.68rem; font-weight: 700;
  color: var(--accent); background: var(--accent-light);
  border-radius: 5px; padding: 1px 5px;
}

.btn-remove {
  position: absolute; top: 6px; right: 6px;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--border);
  color: var(--ink-soft); border-radius: 50%;
  width: 24px; height: 24px; font-size: 0.68rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; backdrop-filter: blur(4px);
}
.btn-remove:hover { background: #ff4757; color: #fff; border-color: #ff4757; }

/* PDF file list */
.pdf-list { display: flex; flex-direction: column; gap: 8px; }
.pdf-item {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
  cursor: grab; transition: all 0.15s;
  user-select: none;
}
.pdf-item:hover { border-color: var(--accent); }
.pdf-item.dragging { opacity: 0.3; }
.pdf-item.drag-over { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,75,26,0.15); }
.pdf-icon { font-size: 1.4rem; flex-shrink: 0; }
.pdf-info { flex: 1; min-width: 0; }
.pdf-name { font-size: 0.85rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdf-size { font-size: 0.72rem; color: var(--ink-soft); }
.pdf-num {
  font-family: 'Syne', sans-serif; font-size: 0.72rem; font-weight: 700;
  color: var(--accent); background: var(--accent-light);
  border-radius: 6px; padding: 2px 7px; flex-shrink: 0;
}
.pdf-del {
  background: none; border: none;
  color: var(--ink-soft); cursor: pointer; font-size: 0.8rem;
  padding: 4px; border-radius: 6px; transition: all 0.15s; flex-shrink: 0;
}
.pdf-del:hover { color: #ff4757; background: #fff0f0; }

/* ── OPTIONS ROW ── */
.options-row {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.opt-btn {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 16px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.82rem; font-weight: 500;
  cursor: pointer; transition: all 0.15s; color: var(--ink);
}
.opt-btn:hover { border-color: var(--accent); }
.opt-btn.selected { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── BOTTOM ACTION ── */
.action-row {
  display: flex; gap: 12px; align-items: flex-end;
  flex-wrap: wrap; margin-top: 16px;
}

.field-wrap { flex: 1; min-width: 200px; }
.field-wrap label {
  display: block; font-size: 0.72rem; font-weight: 500;
  color: var(--ink-soft); margin-bottom: 6px;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.field-input {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--ink);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.92rem; width: 100%; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,75,26,0.1); }
.field-input::placeholder { color: #bbb; }

.select-input {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--ink);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.92rem; width: 100%; outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b60' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.select-input:focus { border-color: var(--accent); }

.btn-primary {
  background: var(--accent); color: #fff;
  border: none; border-radius: 10px;
  padding: 12px 26px;
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem; font-weight: 700;
  cursor: pointer; white-space: nowrap;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(232,75,26,0.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(232,75,26,0.38); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary {
  background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--border); border-radius: 10px;
  padding: 12px 26px;
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem; font-weight: 700;
  cursor: pointer; white-space: nowrap;
  transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ── STATUS ── */
.status {
  text-align: center; font-size: 0.85rem;
  color: var(--ink-soft); min-height: 20px; margin-top: 12px;
}
.status.ok { color: var(--green); font-weight: 500; }
.status.err { color: var(--accent); }

/* ── QUALITY SLIDER ── */
.slider-wrap { display: flex; flex-direction: column; gap: 6px; }
.slider-wrap label { font-size: 0.72rem; font-weight: 500; color: var(--ink-soft); letter-spacing: 0.04em; text-transform: uppercase; }
.slider-row { display: flex; align-items: center; gap: 10px; }
input[type=range] {
  flex: 1; accent-color: var(--accent);
  height: 4px; cursor: pointer;
}
.slider-val {
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: 0.85rem; color: var(--accent);
  min-width: 36px; text-align: right;
}

/* ── PRIVACY BAR ── */
.privacy-bar {
  position: relative; z-index: 1;
  background: var(--green-light);
  border-top: 1px solid #b8dfc8;
  padding: 18px 32px;
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
}
.privacy-bar p { font-size: 0.82rem; color: var(--green); font-weight: 500; }

/* ── FOOTER ── */
footer {
  position: relative; z-index: 1;
  padding: 24px 32px;
  text-align: center; font-size: 0.78rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--border);
}

/* ── AD SLOTS ── */
.ad-banner {
  max-width: 900px; width: calc(100% - 64px);
  height: 90px; margin: 0 auto 32px;
  background: var(--surface);
  border: 1px dashed var(--border); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; color: var(--ink-soft);
  letter-spacing: 0.05em; text-transform: uppercase;
  position: relative; z-index: 1;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  nav { padding: 0 16px; }
  .tool-page { padding: 32px 16px 60px; }
  .tools-grid { padding: 0 16px 60px; grid-template-columns: 1fr 1fr; }
  .home-hero { padding: 48px 16px 32px; }
  .action-row { flex-direction: column; }
  .btn-primary { width: 100%; }
  .ad-banner { width: calc(100% - 32px); }
}

/* ── CROP MODAL ── */
#crop-modal {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.9); z-index: 2000;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 16px;
}
#crop-canvas {
  max-width: 100%; max-height: calc(100dvh - 130px);
  border-radius: 8px; touch-action: none; cursor: crosshair; display: block;
}
.crop-actions { display: flex; gap: 12px; }
.btn-crop {
  position: absolute; bottom: 6px; left: 6px;
  background: rgba(0,0,0,0.6); color: #fff; border: none;
  border-radius: 6px; padding: 3px 8px; font-size: 0.7rem; cursor: pointer;
}
.btn-crop:hover { background: var(--accent); }
.btn-rotate {
  position: absolute; bottom: 6px; right: 6px;
  background: rgba(0,0,0,0.6); color: #fff; border: none;
  border-radius: 6px; padding: 3px 8px; font-size: 0.7rem; cursor: pointer;
}
.btn-rotate:hover { background: var(--accent); }
.camera-row {
  display: flex; justify-content: center; margin-top: 12px;
}
.btn-camera {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 10px 20px; font-size: 0.88rem;
  cursor: pointer; color: var(--ink); font-weight: 500;
  transition: border-color .15s, box-shadow .15s;
}
.btn-camera:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }

/* ── CAMERA MODAL ── */
#camera-modal {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.95); z-index: 2000;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 16px;
}
#camera-video {
  max-width: 100%; max-height: calc(100dvh - 120px);
  border-radius: 10px; display: block; background: #111;
}
.camera-actions { display: flex; gap: 12px; }
#camera-capture-btn {
  background: var(--accent); color: #fff; border: none;
  border-radius: 10px; padding: 12px 32px; font-size: 1rem;
  font-weight: 600; cursor: pointer; transition: opacity .15s;
}
#camera-capture-btn:hover { opacity: 0.85; }

/* ── COOKIE BANNER ── */
#cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  background: #1a1a18;
  color: #f5f2eb;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: 0 -4px 32px rgba(0,0,0,0.25);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
#cookie-banner.visible { transform: translateY(0); }
#cookie-banner p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: #c8c8b8;
  flex: 1;
  min-width: 240px;
  font-weight: 300;
}
#cookie-banner a { color: #e8ff47; text-decoration: underline; }
.cookie-btns { display: flex; gap: 10px; flex-shrink: 0; flex-wrap: wrap; }
.btn-cookie-accept {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-family: 'Syne', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-cookie-accept:hover { opacity: 0.85; }
.btn-cookie-reject {
  background: transparent;
  color: #c8c8b8;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 10px 22px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-cookie-reject:hover { border-color: #888; color: #f5f2eb; }

@media (max-width: 600px) {
  #cookie-banner { padding: 16px; }
  .cookie-btns { width: 100%; }
  .btn-cookie-accept, .btn-cookie-reject { flex: 1; text-align: center; }
}

/* ── PRO BUTTON ── */
.nav-pro-btn {
  margin-left: auto;
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-family: 'Syne', sans-serif;
  font-size: 0.78rem; font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
  letter-spacing: 0.01em;
}
.nav-pro-btn:hover { opacity: 0.85; }
.nav-pro-btn.active-pro { background: var(--green); }

/* ── PRO MODAL OVERLAY ── */
#pro-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 900;
  background: rgba(26,26,24,0.55);
  backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
  padding: 16px;
}
#pro-overlay.open { display: flex; }

#pro-modal {
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 80px rgba(26,26,24,0.22);
  width: 100%; max-width: 480px;
  padding: 36px 32px 32px;
  position: relative;
  animation: fadeUp 0.25s ease both;
}
#pro-modal h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.35rem; font-weight: 800;
  margin-bottom: 6px;
}
#pro-modal .pro-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; font-size: 1.3rem;
  cursor: pointer; color: var(--ink-soft);
  line-height: 1;
}
.pro-tabs {
  display: flex; gap: 8px; margin: 20px 0 16px;
}
.pro-tab {
  flex: 1; padding: 12px 8px;
  border: 2px solid var(--border);
  border-radius: 12px; cursor: pointer;
  background: var(--bg);
  text-align: center; transition: all 0.15s;
  font-family: 'Instrument Sans', sans-serif;
}
.pro-tab:hover { border-color: var(--accent); }
.pro-tab.selected { border-color: var(--accent); background: var(--accent-light); }
.pro-tab .pro-price { font-family: 'Syne', sans-serif; font-size: 1.3rem; font-weight: 800; color: var(--accent); }
.pro-tab .pro-label { font-size: 0.72rem; color: var(--ink-soft); margin-top: 2px; }
.pro-tab .pro-save { font-size: 0.68rem; font-weight: 600; color: var(--green); margin-top: 3px; }

.pro-features {
  list-style: none; margin: 0 0 20px; padding: 0;
  display: flex; flex-direction: column; gap: 7px;
}
.pro-features li { font-size: 0.87rem; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; }
.pro-features li::before { content: '✓'; color: var(--green); font-weight: 700; flex-shrink: 0; }

.pro-cta-btn {
  width: 100%; padding: 14px;
  background: var(--accent); color: #fff;
  border: none; border-radius: 12px;
  font-family: 'Syne', sans-serif; font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: opacity 0.15s;
  margin-bottom: 12px;
}
.pro-cta-btn:hover { opacity: 0.88; }
.pro-cta-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.pro-divider {
  text-align: center; color: var(--ink-soft);
  font-size: 0.78rem; margin: 14px 0 12px;
  position: relative;
}
.pro-divider::before, .pro-divider::after {
  content: ''; position: absolute; top: 50%;
  width: 40%; height: 1px; background: var(--border);
}
.pro-divider::before { left: 0; }
.pro-divider::after { right: 0; }

/* ── FLOATING KO-FI BUTTON ── */
#kofi-fab {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 800;
  display: flex; align-items: center; gap: 8px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  padding: 10px 18px 10px 14px;
  font-family: 'Syne', sans-serif;
  font-size: 0.82rem; font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(26,26,24,0.14);
  transition: all 0.2s;
  cursor: pointer;
}
#kofi-fab:hover {
  background: #FF5E5B;
  border-color: #FF5E5B;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255,94,91,0.3);
}

/* ── POST-DOWNLOAD SUPPORT MODAL ── */
#support-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 850;
  background: rgba(26,26,24,0.5);
  backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
  padding: 16px;
}
#support-overlay.open { display: flex; }

#support-modal {
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 80px rgba(26,26,24,0.2);
  width: 100%; max-width: 420px;
  padding: 40px 32px 32px;
  position: relative;
  text-align: center;
  animation: fadeUp 0.25s ease both;
}
#support-modal .sup-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px;
  background: var(--bg); border: none;
  border-radius: 50%; font-size: 1.1rem;
  cursor: pointer; color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
#support-modal .sup-close:hover { background: var(--border); color: var(--ink); }
#support-modal .sup-icon { font-size: 2.4rem; margin-bottom: 12px; }
#support-modal h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem; font-weight: 800;
  margin-bottom: 8px; color: var(--ink);
}
#support-modal p {
  font-size: 0.87rem; color: var(--ink-soft);
  line-height: 1.6; font-weight: 300;
  margin-bottom: 24px;
}
.sup-btn-kofi {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px;
  background: #FF5E5B; color: #fff;
  border: none; border-radius: 12px;
  font-family: 'Syne', sans-serif; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; text-decoration: none;
  transition: opacity 0.15s;
  margin-bottom: 10px;
}
.sup-btn-kofi:hover { opacity: 0.88; }
.sup-btn-pro {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px;
  background: var(--accent-light); color: var(--accent);
  border: 1.5px solid #f5c4b4; border-radius: 12px;
  font-family: 'Syne', sans-serif; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: opacity 0.15s;
  margin-bottom: 14px;
}
.sup-btn-pro:hover { opacity: 0.85; }
.sup-skip {
  font-size: 0.78rem; color: var(--ink-soft);
  cursor: pointer; background: none; border: none;
  text-decoration: underline; text-underline-offset: 3px;
}
.sup-skip:hover { color: var(--ink); }

.pro-token-row {
  display: flex; gap: 8px;
}
.pro-token-input {
  flex: 1; padding: 11px 14px;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-family: 'Instrument Sans', sans-serif; font-size: 0.88rem;
  background: var(--bg);
  transition: border-color 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pro-token-input:focus { outline: none; border-color: var(--accent); }
.pro-token-btn {
  padding: 11px 16px;
  background: var(--ink); color: #fff;
  border: none; border-radius: 10px;
  font-family: 'Syne', sans-serif; font-size: 0.83rem; font-weight: 700;
  cursor: pointer; transition: opacity 0.15s; white-space: nowrap;
}
.pro-token-btn:hover { opacity: 0.8; }
.pro-token-msg { font-size: 0.8rem; margin-top: 8px; min-height: 18px; }
.pro-token-msg.ok { color: var(--green); }
.pro-token-msg.err { color: var(--accent); }

/* ── UPGRADE BANNER (home, free users only) ── */
#upgrade-banner {
  max-width: 900px; margin: 0 auto 24px;
  padding: 0 32px;
  position: relative; z-index: 1;
}
.upgrade-banner-inner {
  background: linear-gradient(135deg, #fff0eb 0%, #fff 100%);
  border: 1.5px solid #f5c4b4;
  border-radius: var(--radius);
  padding: 18px 24px;
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap;
}
.upgrade-banner-inner p { flex: 1; margin: 0; font-size: 0.88rem; line-height: 1.5; color: var(--ink); min-width: 180px; }
.upgrade-banner-inner p strong { color: var(--accent); }
.upgrade-banner-btn {
  background: var(--accent); color: #fff;
  border: none; border-radius: 10px;
  padding: 10px 22px;
  font-family: 'Syne', sans-serif; font-size: 0.85rem; font-weight: 700;
  cursor: pointer; transition: opacity 0.15s; white-space: nowrap;
  flex-shrink: 0;
}
.upgrade-banner-btn:hover { opacity: 0.85; }

/* ── AFFILIATE SECTION ── */
.affiliate-section {
  max-width: 900px; margin: 0 auto 56px;
  padding: 0 32px;
  position: relative; z-index: 1;
}
.affiliate-section h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1rem; font-weight: 700;
  margin-bottom: 14px; color: var(--ink);
}
.affiliate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.affiliate-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  display: flex; flex-direction: column; gap: 6px;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}
.affiliate-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(26,26,24,0.1);
}
.affiliate-card-icon { font-size: 1.6rem; margin-bottom: 2px; }
.affiliate-card-name { font-family: 'Syne', sans-serif; font-size: 0.9rem; font-weight: 700; color: var(--ink); }
.affiliate-card-desc { font-size: 0.76rem; color: var(--ink-soft); line-height: 1.4; font-weight: 300; }
.affiliate-card-cta {
  margin-top: 6px;
  font-size: 0.73rem; font-weight: 600;
  color: var(--accent);
}

/* ── BLOG ── */
.blog-wrap {
  max-width: 740px; margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
  position: relative; z-index: 1;
}
.breadcrumb { font-size: 0.82rem; color: var(--ink-soft); margin-bottom: 1.75rem; }
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 0.4rem; }
.blog-meta { font-size: 0.83rem; color: var(--ink-soft); margin-bottom: 2rem; }
.blog-wrap h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800; line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem; color: var(--ink);
}
.blog-wrap h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem; font-weight: 700;
  color: var(--ink); margin: 2.2rem 0 0.75rem;
  border-left: 3px solid var(--accent); padding-left: 0.75rem;
}
.blog-wrap h3 { font-size: 1.05rem; font-weight: 600; color: var(--ink); margin: 1.5rem 0 0.5rem; }
.blog-wrap p { color: var(--ink); line-height: 1.75; margin-bottom: 1rem; font-weight: 300; }
.blog-wrap ul, .blog-wrap ol { color: var(--ink); line-height: 1.75; padding-left: 1.4rem; margin-bottom: 1rem; font-weight: 300; }
.blog-wrap li { margin-bottom: 0.4rem; }
.blog-wrap strong { color: var(--ink); font-weight: 600; }
.blog-wrap a { color: var(--accent); }
.cta-box {
  background: var(--accent-light); border: 1px solid #f5c4b4;
  border-radius: 12px; padding: 1.5rem 1.75rem;
  margin: 2.5rem 0; text-align: center;
}
.cta-box p { margin-bottom: 1rem; font-size: 1rem; color: var(--ink); font-weight: 400; }
.cta-btn {
  display: inline-block; background: var(--accent); color: #fff;
  font-weight: 700; padding: 0.75rem 2rem;
  border-radius: 8px; text-decoration: none;
  font-size: 1rem; transition: background 0.2s;
}
.cta-btn:hover { background: #d43d0f; }
.step-box {
  background: var(--surface); border-radius: 10px;
  padding: 1.1rem 1.4rem; margin: 0.75rem 0;
  border-left: 3px solid var(--accent); color: var(--ink);
  box-shadow: var(--shadow); font-weight: 300;
}
.step-box strong { color: var(--accent); font-weight: 700; }
.faq-item { border-top: 1px solid var(--border); padding: 1rem 0; }
.faq-item h3 { margin-top: 0; }
.blog-footer-nav {
  display: flex; gap: 1rem; flex-wrap: wrap;
  margin-top: 3rem; padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.blog-footer-nav a { color: var(--accent); text-decoration: none; font-size: 0.9rem; }
.blog-footer-nav a:hover { text-decoration: underline; }
.use-case-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem; margin: 1rem 0 1.5rem;
}
.use-case-card {
  background: var(--surface); border-radius: 10px;
  padding: 1rem; border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.use-case-card strong { color: var(--accent); display: block; margin-bottom: 0.3rem; font-size: 0.9rem; }
.use-case-card span { color: var(--ink-soft); font-size: 0.85rem; }
.size-table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: 0.9rem; }
.size-table th {
  background: var(--accent-light); color: var(--ink);
  padding: 0.65rem 0.9rem; text-align: left;
  border-bottom: 2px solid #f5c4b4; font-weight: 600;
}
.size-table td { padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--border); color: var(--ink); font-weight: 300; }
.size-table tr:hover td { background: var(--accent-light); }
.blog-index { max-width: 820px; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; position: relative; z-index: 1; }
.blog-index h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800; color: var(--ink);
  letter-spacing: -0.02em; margin-bottom: 0.5rem;
}
.blog-index > p { color: var(--ink-soft); margin-bottom: 2.5rem; font-weight: 300; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.post-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  text-decoration: none; display: block;
  transition: all 0.2s; box-shadow: var(--shadow);
}
.post-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(26,26,24,0.1); }
.post-tag {
  display: inline-block; font-size: 0.75rem;
  background: var(--accent-light); color: var(--accent);
  padding: 0.2rem 0.6rem; border-radius: 4px;
  margin-bottom: 0.75rem; border: 1px solid #f5c4b4;
  font-weight: 500;
}
.post-card h2 { font-family: 'Syne', sans-serif; font-size: 1.05rem; font-weight: 700; color: var(--ink); margin: 0 0 0.6rem; line-height: 1.35; }
.post-card p { font-size: 0.88rem; color: var(--ink-soft); line-height: 1.6; margin: 0; font-weight: 300; }
.post-meta { font-size: 0.78rem; color: var(--ink-soft); margin-top: 0.75rem; }
