/* InkSign Global — BentoPDF-Inspired Calm Matte Dark Theme
 * Spacious breathing room, soft graphite surfaces (#1e1e20 / #262629),
 * periwinkle indigo accent (#6366f1), subtle ambient grid, zero visual clutter.
 */

:root {
  --bg-main: #1e1e20;
  --bg-card: #262629;
  --bg-elevated: #2e2e32;
  --bg-well: #1a1a1d;
  --fg-bright: #f4f4f6;
  --fg-body: #b4b4bb;
  --fg-muted: #7c7c86;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --indigo: #6366f1;
  --indigo-hover: #5558e6;
  --indigo-soft: rgba(99, 102, 241, 0.14);
  --indigo-border: rgba(129, 140, 248, 0.36);
  --emerald: #34d399;
  --amber: #fbbf24;
  --danger: #f87171;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --font-ui: "DM Sans", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-main);
  background-image:
    radial-gradient(640px 380px at 50% 190px, rgba(99, 102, 241, 0.11), transparent 75%),
    linear-gradient(to right, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 100% 100%, 52px 52px, 52px 52px;
  color: var(--fg-body);
  font-family: var(--font-ui);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button, input, select {
  font: inherit;
}

a {
  color: #818cf8;
  text-decoration: none;
}

a:hover {
  color: #a5b4fc;
}

.inapp-banner {
  background: rgba(251, 191, 36, 0.12);
  color: var(--amber);
  border-bottom: 1px solid rgba(251, 191, 36, 0.25);
  padding: 8px 16px;
  font-size: 13px;
  text-align: center;
}

/* ==================== Minimal Top Navbar ==================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(30, 30, 32, 0.84);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 60px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-left, .topbar-right, .topbar-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-nav {
  gap: 24px;
}

@media (max-width: 720px) {
  .topbar-nav {
    display: none;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg-bright);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.brand:hover {
  color: #ffffff;
}

.nav-link-sm {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-body);
  transition: color 0.15s;
}

.nav-link-sm:hover {
  color: var(--fg-bright);
}

.btn-pro-pill {
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-hover);
  background: var(--bg-card);
  color: var(--fg-bright);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-pro-pill:hover {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #ffffff;
}

.btn-pro-pill.is-active {
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52, 211, 153, 0.38);
  color: var(--emerald);
}

.doc-name {
  font-size: 13px;
  color: var(--fg-muted);
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==================== BentoPDF-Style Calm Landing ==================== */
.landing-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 64px 24px 56px;
}

.hero-center {
  text-align: center;
  max-width: 740px;
  margin: 0 auto 40px;
}

.hero-heading {
  margin: 0;
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.03em;
  color: var(--fg-bright);
}

.hero-badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  margin-left: 8px;
  border-radius: 13px;
  background: var(--indigo);
  color: #ffffff;
  vertical-align: middle;
  transform: rotate(-6deg) translateY(-4px);
  box-shadow: 0 10px 26px rgba(99, 102, 241, 0.35);
}

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #818cf8;
  margin: 26px auto 18px;
}

.hero-sub {
  margin: 0 auto 20px;
  font-size: 17px;
  color: var(--fg-body);
  max-width: 54ch;
}

.trust-inline {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 13.5px;
  color: var(--fg-body);
}

.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trust-chip-btn {
  background: none;
  border: none;
  color: var(--fg-body);
  padding: 2px 4px;
  cursor: pointer;
  border-radius: 6px;
}

.trust-chip-btn:hover {
  color: var(--fg-bright);
  background: rgba(255, 255, 255, 0.05);
}

.trust-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  font-size: 10.5px;
  font-weight: 700;
}

.icon-indigo { border: 1.5px solid #818cf8; color: #818cf8; }
.icon-emerald { border: 1.5px solid var(--emerald); color: var(--emerald); }
.icon-amber { border: 1.5px solid var(--amber); color: var(--amber); }

.trust-sep {
  width: 1px;
  height: 13px;
  background: var(--border-subtle);
}

/* Spacious Rounded Upload Card (Exact BentoPDF Sign Page Rhythm) */
.upload-shell {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 26px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 62px 24px;
  border: 1.5px dashed rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
  background: var(--bg-well);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.18s, background 0.18s;
}

.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--indigo);
  background: rgba(99, 102, 241, 0.07);
}

.drop-zone input[type="file"] {
  display: none;
}

.upload-glyph {
  color: var(--fg-muted);
  margin-bottom: 4px;
  transition: color 0.18s, transform 0.18s;
}

.drop-zone:hover .upload-glyph {
  color: #818cf8;
  transform: translateY(-2px);
}

.drop-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg-bright);
}

.drop-sub {
  font-size: 13px;
  color: var(--fg-muted);
}

.sample-row {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
}

.sample-label {
  color: var(--fg-muted);
}

.btn-sample {
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--fg-bright);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.btn-sample:hover {
  border-color: var(--indigo);
  background: var(--indigo-soft);
  color: #ffffff;
}

.err-msg {
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 13.5px;
  text-align: center;
}

/* Iconic 4-Tile Bento Stat Strip */
.why-section {
  margin-top: 72px;
}

.section-heading {
  margin: 0 0 28px;
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg-bright);
}

.section-heading span, .section-heading-sm span {
  color: var(--fg-muted);
}

.bento-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.stat-tile {
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
}

.stat-val {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.stat-lbl {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.88;
}

.tile-indigo {
  background: #6366f1;
  color: #ffffff;
}

.tile-light {
  background: #f3f3f1;
  color: #18181b;
}

.tile-striped {
  background-color: #252528;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.025) 0px,
    rgba(255, 255, 255, 0.025) 6px,
    transparent 6px,
    transparent 12px
  );
  color: var(--fg-bright);
}

.tile-slate {
  background: #323236;
  color: var(--fg-bright);
}

@media (max-width: 760px) {
  .bento-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Quiet Workflow Pills & Clean SEO Section */
.workflows-section {
  margin-top: 64px;
}

.section-heading-sm {
  margin: 0 0 18px;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--fg-bright);
}

.guide-links-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.guide-links-grid a {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--fg-body);
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.guide-links-grid a:hover {
  border-color: var(--indigo-border);
  background: var(--bg-elevated);
  color: var(--fg-bright);
}

.seo-body-card {
  margin-bottom: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px 30px;
}

.seo-body-card h2 {
  margin: 0 0 10px;
  font-size: 18px;
  color: var(--fg-bright);
}

.seo-body-card h2.mt-section {
  margin-top: 22px;
}

.seo-body-card p {
  margin: 0;
  font-size: 14px;
  color: var(--fg-body);
}

.faq-item {
  border-top: 1px solid var(--border-subtle);
  padding: 13px 0;
}

.faq-item:first-of-type {
  margin-top: 8px;
}

.faq-item h3 {
  margin: 0 0 4px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--fg-bright);
}

.faq-item p {
  margin: 0;
  font-size: 13.5px;
  color: var(--fg-body);
}

.site-footer {
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--fg-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: var(--fg-muted);
}

.footer-links a:hover {
  color: var(--fg-bright);
}

/* ==================== Studio Workspace (Clean Dark Layout) ==================== */
.studio {
  max-width: 1360px;
  margin: 0 auto;
  padding: 18px 22px 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 396px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 980px) {
  .studio {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .control-col {
    order: -1;
  }
}

.viewer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.warn-bar {
  margin: 0;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.25);
  color: var(--amber);
  font-size: 13px;
}

.doc-toolbar {
  position: sticky;
  top: 68px;
  z-index: 25;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  background: rgba(38, 38, 41, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.page-nav, .insert-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.page-indicator, .insert-label {
  font-size: 13px;
  color: var(--fg-muted);
  padding: 0 4px;
}

.sheet-scroll {
  display: flex;
  justify-content: center;
}

.page-stage {
  position: relative;
  width: 100%;
  max-width: 820px;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  user-select: none;
  overflow: hidden;
}

.page-stage.tap-line-mode {
  cursor: crosshair;
}

#pdfCanvas {
  display: block;
  width: 100%;
  height: auto;
}

/* Quick Field Anchors on White Document */
.field-flag {
  position: absolute;
  z-index: 12;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--indigo);
  background: rgba(238, 242, 255, 0.96);
  color: #4338ca;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}

.field-flag:hover {
  background: var(--indigo);
  color: #ffffff;
}

.field-flag.flag-initials {
  border-color: #7c3aed;
  color: #6d28d9;
  background: rgba(245, 243, 255, 0.96);
}

.field-flag.flag-initials:hover {
  background: #7c3aed;
  color: #ffffff;
}

.field-flag.flag-date {
  border-color: #0d9488;
  color: #0f766e;
  background: rgba(240, 253, 250, 0.96);
}

.field-flag.flag-date:hover {
  background: #0d9488;
  color: #ffffff;
}

/* Interactive Overlay Boxes on Document */
.overlay-box {
  position: absolute;
  z-index: 16;
  border: 1.5px dashed rgba(99, 102, 241, 0.7);
  background: rgba(99, 102, 241, 0.08);
  border-radius: 4px;
  cursor: grab;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.overlay-box:focus, .overlay-box:hover {
  border-style: solid;
  border-color: var(--indigo);
  background: rgba(99, 102, 241, 0.14);
  outline: none;
  z-index: 20;
}

.overlay-box.is-editing {
  border: 2px solid var(--indigo);
  background: rgba(99, 102, 241, 0.16);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
  z-index: 22;
}

.overlay-box:active {
  cursor: grabbing;
}

.overlay-box.box-empty {
  border-color: #d97706;
  background: rgba(254, 243, 199, 0.75);
  color: #92400e;
  font-size: 10.5px;
  font-weight: 600;
  padding: 0 4px;
  white-space: nowrap;
}

.overlay-box.box-empty > span {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.overlay-box.box-empty.is-editing {
  border-color: var(--indigo);
  background: rgba(224, 231, 255, 0.85);
  color: #3730a3;
}

.overlay-box img, .overlay-box svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.overlay-box.kind-text {
  justify-content: flex-start;
  padding: 0 4px 0 2px;
}

.overlay-box input {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  padding: 0 4px;
  margin: 0;
  outline: none;
  line-height: 1.2;
}

.drag-grip {
  font-size: 12px;
  color: #64748b;
  padding: 0 3px 0 1px;
  cursor: grab;
  user-select: none;
}

.box-del {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16);
}

.box-del:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
}

.resize-dot {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--indigo);
  border: 2px solid #ffffff;
  cursor: nwse-resize;
}

.sig-badge {
  position: absolute;
  top: -10px;
  left: -10px;
  min-width: 19px;
  height: 19px;
  border-radius: 999px;
  border: none;
  background: #18181b;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 5px;
}

/* ==================== Right Studio Panels ==================== */
.control-col {
  position: sticky;
  top: 72px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 980px) {
  .control-col {
    position: static;
  }
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 15px 16px;
}

.panel h2 {
  margin: 0 0 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--fg-bright);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.panel-head h2 {
  margin: 0;
}

.panel-head-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.target-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  margin-bottom: 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-well);
  border: 1px solid var(--border-subtle);
}

.target-bar-label {
  font-size: 11px;
  color: var(--fg-muted);
}

.target-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.target-pill {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--fg-body);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.target-pill:hover {
  border-color: var(--border-hover);
  color: var(--fg-bright);
}

.target-pill[aria-pressed="true"] {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #ffffff;
  font-weight: 600;
}

.target-pill.is-done::after {
  content: "✓";
  font-size: 11px;
}

.subtle-tip {
  margin: 0 0 9px;
  font-size: 12px;
  color: var(--fg-muted);
}

/* Fullscreen Wide Pad Mode */
.pad-panel.pad-fullscreen {
  position: fixed;
  inset: 18px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}

.pad-panel.pad-fullscreen .ink-paper {
  flex: 1;
  min-height: 240px;
}

.pad-panel.pad-fullscreen #inkCanvas {
  height: 100%;
}

.sig-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.sig-tab-wrap {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.sig-tab-btn {
  border: none;
  background: var(--bg-well);
  color: var(--fg-body);
  font-size: 12px;
  padding: 4px 9px;
  cursor: pointer;
}

.sig-tab-btn[aria-pressed="true"] {
  background: var(--indigo);
  color: #ffffff;
  font-weight: 600;
}

.sig-tab-del {
  border: none;
  border-left: 1px solid var(--border-subtle);
  background: var(--bg-well);
  color: var(--fg-muted);
  font-size: 13px;
  padding: 4px 6px;
  cursor: pointer;
}

/* Brushes & Ink Swatches */
.brush-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}

.brush-group {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  flex: 1;
}

.brush-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 5px 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-well);
  color: var(--fg-body);
  cursor: pointer;
  font-size: 11px;
}

.brush-btn canvas {
  width: 52px;
  height: 20px;
  display: block;
  background: #f4f4f6;
  border-radius: 4px;
}

.brush-btn[aria-pressed="true"] {
  border-color: var(--indigo);
  background: var(--indigo-soft);
  color: #ffffff;
  font-weight: 600;
}

.color-group {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-left: 4px;
}

.color-swatch {
  width: 23px;
  height: 23px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
  cursor: pointer;
  padding: 0;
}

.color-swatch[aria-pressed="true"] {
  box-shadow: 0 0 0 2px var(--indigo);
  transform: scale(1.1);
}

/* Vault */
.vault-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px;
  margin-bottom: 9px;
  border-radius: var(--radius-sm);
  background: var(--bg-well);
  border: 1px solid var(--border-subtle);
}

.vault-label {
  font-size: 11.5px;
  color: var(--fg-muted);
}

.vault-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vault-item {
  position: relative;
  display: inline-flex;
}

.vault-thumb-btn {
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: #f8fafc;
  cursor: pointer;
}

.vault-thumb-btn img {
  width: 64px;
  height: 22px;
  object-fit: contain;
  display: block;
}

.vault-del-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--border-hover);
  background: var(--bg-elevated);
  color: var(--fg-bright);
  font-size: 11px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

/* Crisp White Paper Pad inside Dark Inspector */
.ink-paper {
  position: relative;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #ffffff;
  overflow: hidden;
  touch-action: none;
}

#inkCanvas {
  display: block;
  width: 100%;
  height: 154px;
  cursor: crosshair;
}

.photo-tune-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--indigo-soft);
  border: 1px solid var(--indigo-border);
  font-size: 12px;
  color: var(--fg-bright);
}

.photo-tune-bar input[type="range"] {
  flex: 1;
  accent-color: var(--indigo);
}

.mono-val {
  font-family: var(--font-mono);
  font-size: 11.5px;
  min-width: 24px;
  text-align: right;
}

.batch-initials-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.btn-pro-action {
  flex: 1;
  border-color: var(--indigo-border) !important;
  background: var(--indigo-soft) !important;
  color: #a5b4fc !important;
  font-weight: 600;
}

.btn-pro-action:hover:not(:disabled) {
  background: var(--indigo) !important;
  color: #ffffff !important;
}

.pro-mini-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--indigo);
  color: #ffffff;
}

.pan-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.pan-left-group, .pan-right-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.pad-actions, .pad-extra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--fg-muted);
  margin-left: auto;
  cursor: pointer;
}

.party-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

/* Export Mode Cards */
.export-modes {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.mode-card {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--bg-well);
  cursor: pointer;
  transition: border-color 0.14s, background 0.14s;
}

.mode-card input[type="radio"] {
  margin-top: 3px;
  accent-color: var(--indigo);
}

.mode-card.is-selected {
  border-color: var(--indigo);
  background: var(--indigo-soft);
}

.mode-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-bright);
  display: flex;
  align-items: center;
  gap: 6px;
}

.mode-card-sub {
  font-size: 11.5px;
  color: var(--fg-muted);
  margin-top: 1px;
}

.scan-options-box {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px;
  border-radius: 10px;
  background: var(--bg-well);
  border: 1px solid var(--border-subtle);
}

.scan-select {
  width: 100%;
  padding: 6px 8px;
  font-size: 12px;
  border-radius: 7px;
  border: 1px solid var(--border-hover);
  background: var(--bg-card);
  color: var(--fg-bright);
}

.scan-select-sm {
  width: auto;
  padding: 4px 8px;
}

.flatten-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--fg-body);
  cursor: pointer;
  padding: 2px 0;
}

.flatten-row input {
  accent-color: var(--indigo);
}

/* Soft Modern Buttons */
.btn-tool, .btn-ghost {
  padding: 5px 11px;
  font-size: 12.5px;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--fg-bright);
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-ghost {
  background: transparent;
}

.btn-tool:hover:not(:disabled), .btn-ghost:hover:not(:disabled) {
  background: #3a3a40;
  border-color: var(--border-hover);
  color: #ffffff;
}

.btn-tool:disabled, .btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-accent {
  border-color: var(--indigo-border);
  background: var(--indigo-soft);
  color: #a5b4fc;
  font-weight: 600;
}

.btn-accent:hover:not(:disabled) {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #ffffff;
}

.btn-primary {
  width: 100%;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  background: var(--indigo);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.14s;
  text-align: center;
  display: inline-block;
}

.btn-primary:hover:not(:disabled) {
  background: var(--indigo-hover);
  color: #ffffff;
}

.btn-link {
  border: none;
  background: none;
  color: #818cf8;
  font-size: 12.5px;
  padding: 4px 2px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-sm { padding: 4px 9px; font-size: 12px; }
.btn-xs { font-size: 12px; }

.export-panel {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.status-note {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--emerald);
}

.status-note.is-err {
  color: var(--danger);
}

.inapp-result {
  margin-top: 8px;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-well);
}

.inapp-result img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.legal-note {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--fg-muted);
  line-height: 1.45;
}

/* ==================== Clean Dark Modals ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: 18px;
  max-width: 500px;
  width: 100%;
  padding: 24px 26px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  max-height: 92vh;
  overflow-y: auto;
}

.modal-wide {
  max-width: 660px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-head h3 {
  margin: 0;
  font-size: 18px;
  color: var(--fg-bright);
}

.modal-close {
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 17px;
  cursor: pointer;
  color: var(--fg-body);
}

.modal-close:hover {
  color: #ffffff;
}

.modal-lead {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--fg-body);
}

.verify-steps {
  margin: 0 0 18px;
  padding-left: 20px;
  font-size: 13.5px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--fg-body);
}

.verify-steps code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-well);
  color: #a5b4fc;
  padding: 2px 6px;
  border-radius: 5px;
}

.pro-reason-banner {
  margin: 0 0 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--indigo-soft);
  border: 1px solid var(--indigo-border);
  color: #c7d2fe;
  font-size: 13px;
  font-weight: 500;
}

.scan-preview-wrap {
  margin-bottom: 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-well);
  padding: 10px;
}

.scan-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-bright);
}

.scan-preview-stage {
  max-height: 260px;
  overflow: auto;
  display: flex;
  justify-content: center;
  background: #141416;
  border-radius: 8px;
  padding: 8px;
}

#scanPreviewCanvas {
  max-width: 100%;
  height: auto;
  border-radius: 3px;
}

.pro-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.pro-plans-grid.mt-lg {
  margin-top: 24px;
}

.plan-box {
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 18px 16px;
  background: var(--bg-well);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.plan-box-featured {
  border-color: var(--indigo);
  background: rgba(99, 102, 241, 0.09);
}

.plan-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-muted);
}

.plan-tag-hot {
  color: #818cf8;
}

.plan-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--fg-bright);
}

.plan-price {
  font-size: 28px;
  font-weight: 800;
  color: var(--fg-bright);
  letter-spacing: -0.02em;
}

.plan-price small {
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-muted);
}

.plan-desc {
  margin: 0 0 8px;
  font-size: 12.5px;
  color: var(--fg-muted);
  flex: 1;
}

.plan-list {
  margin: 8px 0 14px;
  padding: 12px 0 0 18px;
  border-top: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--fg-body);
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.plan-btn {
  width: 100%;
  padding: 9px 12px;
  font-size: 13px;
  margin-top: auto;
}

.license-box {
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
  font-size: 13px;
  color: var(--fg-body);
}

.license-box.mt-md {
  margin-top: 20px;
}

.license-sub {
  margin: 4px 0 8px;
  font-size: 12.5px;
  color: var(--fg-muted);
}

.license-input-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.license-input-row input {
  flex: 1;
  padding: 8px 11px;
  border-radius: 8px;
  border: 1px solid var(--border-hover);
  background: var(--bg-well);
  color: var(--fg-bright);
  font-family: var(--font-mono);
  font-size: 12px;
}

.pro-active-box {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--emerald);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

/* ==================== Standalone Pricing & Legal Pages ==================== */
.page-shell {
  max-width: 880px;
  margin: 44px auto 64px;
  padding: 0 24px;
}

.prose-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 36px 34px;
}

.prose-card h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.2vw, 34px);
  font-weight: 700;
  color: var(--fg-bright);
  letter-spacing: -0.02em;
}

.prose-card h2 {
  margin: 26px 0 8px;
  font-size: 17px;
  font-weight: 600;
  color: var(--fg-bright);
}

.prose-card p, .prose-card li {
  color: var(--fg-body);
  font-size: 14.5px;
  line-height: 1.65;
}

.prose-card ul {
  padding-left: 20px;
}

/* ==================== Early Access Launch Card & Minimal Accordion FAQ ==================== */
.ea-launch-box {
  padding: 18px 20px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.14), rgba(38, 38, 41, 0.92));
  border: 1px solid rgba(99, 102, 241, 0.38);
  margin-bottom: 14px;
}

.ea-launch-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #a5b4fc;
  margin-bottom: 6px;
}

.ea-launch-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--fg-bright);
}

.ea-launch-desc {
  margin: 0 0 14px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--fg-body);
}

.ea-launch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.faq-minimal-wrap {
  margin-top: 36px;
}

.bento-faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bento-faq {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0 18px;
  transition: border-color 0.16s ease;
}

.bento-faq:hover,
.bento-faq[open] {
  border-color: var(--border-hover);
}

.bento-faq summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 0;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--fg-bright);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
}

.bento-faq summary::-webkit-details-marker {
  display: none;
}

.bento-faq summary::after {
  content: '+';
  font-size: 17px;
  font-weight: 400;
  color: var(--fg-muted);
  transition: transform 0.15s ease;
}

.bento-faq[open] summary::after {
  content: '−';
  color: #a5b4fc;
}

.bento-faq summary h3.faq-q {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  line-height: 1.4;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.footer-disclaimer {
  font-size: 11.5px;
  color: var(--fg-muted);
  opacity: 0.82;
}

.bento-faq p {
  margin: 0 0 15px;
  font-size: 13.8px;
  line-height: 1.65;
  color: var(--fg-body);
}

@media (max-width: 680px) {
  .landing-shell { padding: 40px 16px 44px; }
  .upload-shell { padding: 16px; }
  .drop-zone { padding: 44px 16px; }
  .page-shell { padding: 0 16px; }
  .prose-card { padding: 24px 18px; }
}
