:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --text-muted: #475569;
  --text-soft: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef2ff;
  --accent-blue: #2563eb;
  --emerald: #10b981;
  --emerald-dark: #059669;
  --emerald-soft: #ecfdf5;
  --amber: #f59e0b;
  --danger: #ef4444;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 12px 30px -10px rgba(15, 23, 42, 0.09), 0 4px 10px -4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 26px 56px -18px rgba(79, 70, 229, 0.18), 0 8px 22px -8px rgba(15, 23, 42, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; overflow-x: clip; max-width: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(circle at 14% 0%, #eef2ff 0%, #f8fafc 30%, #ffffff 100%);
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.hero-split > *, .zigzag-row > *, .api-grid > * { min-width: 0; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }

/* ---- Top Navbar ---- */
.navbar {
  position: sticky; top: 0; z-index: 70;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}
.nav-inner {
  max-width: 1260px; margin: 0 auto; padding: 0 20px; height: 66px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 850; font-size: 1.18rem; letter-spacing: -0.025em; flex-shrink: 0;
}
.brand-icon {
  width: 36px; height: 36px; border-radius: 11px;
  background: linear-gradient(135deg, #4f46e5 0%, #2563eb 55%, #10b981 100%);
  display: inline-flex; align-items: center; justify-content: center; color: #fff;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.28);
}
.brand-badge {
  font-size: 0.66rem; font-weight: 800; padding: 2px 7px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); letter-spacing: 0.04em;
}
.nav-links { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
.nav-links a, .nav-drop-btn {
  padding: 8px 12px; border-radius: 9px; font-size: 0.88rem; font-weight: 650;
  color: var(--text-muted); transition: all 0.16s ease; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; border: none; background: transparent; cursor: pointer;
}
.nav-links a:hover, .nav-drop-btn:hover { color: var(--primary); background: var(--primary-soft); }
.nav-dropdown { position: relative; display: inline-flex; align-items: center; }
.nav-drop-menu {
  position: absolute; top: 100%; left: 0; min-width: 256px;
  margin-top: 6px;
  background: #fff; border: 1px solid var(--border); border-radius: 15px;
  padding: 8px; box-shadow: var(--shadow-lg); z-index: 140;
  display: none; flex-direction: column; gap: 2px;
}
/* Invisible hover bridge eliminating any cursor gap between Tools button and dropdown menu */
.nav-drop-menu::before {
  content: "";
  position: absolute;
  top: -18px;
  left: -14px;
  right: -14px;
  height: 24px;
  background: transparent;
}
.nav-dropdown:not([data-dd-ready="1"]):hover .nav-drop-menu,
.nav-dropdown.open .nav-drop-menu { display: flex; }
.nav-dropdown.open .nav-drop-btn { color: var(--primary); background: var(--primary-soft); }
.nav-drop-menu a {
  width: 100%; justify-content: flex-start; padding: 9px 12px; font-size: 0.84rem;
  border-radius: 9px; color: var(--text);
}
.nav-drop-menu a:hover { background: var(--primary-soft); color: var(--primary); }
.nav-reward-link {
  color: #065f46 !important; background: var(--emerald-soft); border: 1px solid rgba(16, 185, 129, 0.28);
}
.nav-reward-link:hover { background: #d1fae5 !important; color: #047857 !important; }
.nav-reward-pill {
  font-size: 0.69rem; font-weight: 850; padding: 2px 6px; border-radius: 999px;
  background: var(--emerald); color: #fff; line-height: 1.2;
}
.nav-actions { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; flex-shrink: 0; }

.lang-toggle {
  display: inline-flex; background: var(--surface-soft); border: 1px solid var(--border);
  border-radius: 10px; padding: 2px;
}
.lang-btn {
  border: none; background: transparent; padding: 5px 9px; font-size: 0.77rem; font-weight: 750;
  color: var(--text-muted); border-radius: 7px; cursor: pointer; transition: all 0.15s;
}
.lang-btn.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }

.credit-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px;
  background: var(--emerald-soft); border: 1px solid rgba(16, 185, 129, 0.32);
  color: #065f46; font-size: 0.8rem; font-weight: 750;
}
.credit-pill.unlimited {
  background: linear-gradient(135deg, #eef2ff 0%, #ecfdf5 100%);
  border-color: rgba(79, 70, 229, 0.35); color: var(--primary);
}
.owner-toggle-btn {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 999px;
  border: 1px dashed var(--border-strong); background: #fff; color: var(--text-muted);
  font-size: 0.77rem; font-weight: 700; cursor: pointer;
}
.owner-toggle-btn.active {
  background: linear-gradient(135deg, #4f46e5, #10b981); border-color: transparent; color: #fff;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: 11px; border: 1px solid transparent;
  font-size: 0.88rem; font-weight: 650; cursor: pointer; transition: all 0.16s ease; white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%); color: #fff;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.25);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(79, 70, 229, 0.35); }
.btn-emerald {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%); color: #fff;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.24);
}
.btn-emerald:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(16, 185, 129, 0.34); }
.btn-outline { background: #fff; border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface-soft); color: var(--text); }
.btn-sm { padding: 6px 12px; font-size: 0.81rem; border-radius: 9px; }
.btn-lg { padding: 12px 22px; font-size: 0.96rem; border-radius: 13px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ---- Container & Two-Column Dewatermark/Unwatermark Hero ---- */
.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

.hero { padding: 34px 0 42px; }
.hero-split {
  display: grid; grid-template-columns: 1.06fr 0.94fr; gap: 30px; align-items: stretch;
}
.hero-left-col {
  display: flex; flex-direction: column; justify-content: space-between;
}
.hero-right-col {
  display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
}
.hero-trust-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}
.hero-trust-card {
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  padding: 13px 14px; box-shadow: var(--shadow-sm);
  display: flex; align-items: flex-start; gap: 10px;
}
.hero-trust-ico {
  width: 34px; height: 34px; border-radius: 10px; background: var(--primary-soft);
  color: var(--primary); display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.hero-trust-card strong { display: block; font-size: 0.83rem; font-weight: 800; color: var(--text); line-height: 1.25; }
.hero-trust-card span { display: block; font-size: 0.74rem; color: var(--text-muted); margin-top: 2px; line-height: 1.35; }
.hero-bonus-cta {
  background: linear-gradient(135deg, #eef2ff 0%, #ecfdf5 100%);
  border: 1.5px solid rgba(79, 70, 229, 0.24); border-radius: 18px;
  padding: 15px 18px; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; box-shadow: var(--shadow-sm);
}
.hero-bonus-cta strong { display: block; font-size: 0.9rem; font-weight: 850; color: var(--text); }
.hero-bonus-cta span { display: block; font-size: 0.77rem; color: var(--text-muted); margin-top: 2px; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border-radius: 999px;
  background: #fff; border: 1px solid rgba(79, 70, 229, 0.18); color: var(--primary);
  font-size: 0.77rem; font-weight: 750; box-shadow: var(--shadow-sm); margin-bottom: 14px;
  max-width: 100%; flex-wrap: wrap;
}
.hero-pill .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--emerald);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}
.hero h1 {
  font-size: clamp(1.9rem, 3.6vw, 2.95rem); font-weight: 850; line-height: 1.1;
  letter-spacing: -0.035em; color: var(--text); margin-bottom: 12px;
}
.hero h1 .grad {
  background: linear-gradient(135deg, #4f46e5 0%, #2563eb 52%, #10b981 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub { font-size: 0.98rem; color: var(--text-muted); margin-bottom: 18px; max-width: 580px; }

/* Compact Mode Tabs + 4 AI Layer Chips + Prompt Box */
.upload-panel-card {
  background: #fff; border: 1px solid var(--border); border-radius: 22px;
  padding: 18px; box-shadow: var(--shadow-lg);
}
.mode-pills-row {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 8px; margin-bottom: 14px;
}
.mode-pills {
  display: inline-flex; background: var(--surface-soft); padding: 3px; border-radius: 11px; gap: 3px;
}
.mode-pill-btn {
  border: none; background: transparent; padding: 7px 13px; border-radius: 8px;
  font-size: 0.82rem; font-weight: 700; color: var(--text-muted); cursor: pointer; transition: all 0.15s;
}
.mode-pill-btn.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }

/* 4 Selectable Detection Layer Toggle Chips */
.layers-row {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 12px;
}
.layers-title { font-size: 0.76rem; font-weight: 750; color: var(--text-soft); margin-right: 2px; }
.layer-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  border: 1.5px solid var(--border); background: #fff; font-size: 0.78rem; font-weight: 700;
  color: var(--text-muted); cursor: pointer; user-select: none; transition: all 0.15s;
}
.layer-chip input { display: none; }
.layer-chip .chk-dot {
  width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; font-size: 0.62rem; color: #fff;
}
.layer-chip.on {
  border-color: rgba(79, 70, 229, 0.45); background: var(--primary-soft); color: var(--primary);
}
.layer-chip.on .chk-dot { background: var(--primary); border-color: var(--primary); }

/* AI Instruction Prompt Box */
.ai-prompt-wrap { margin-bottom: 14px; }
.ai-prompt-label {
  display: flex; align-items: center; gap: 6px; font-size: 0.76rem; font-weight: 750;
  color: var(--text-muted); margin-bottom: 5px;
}
.ai-prompt-input {
  width: 100%; padding: 9px 12px; border-radius: 11px; border: 1px solid var(--border-strong);
  background: #f8fafc; font-size: 0.84rem; color: var(--text); outline: none; transition: all 0.16s;
}
.ai-prompt-input:focus {
  background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

/* Dropzone inside Upload Card */
.dropzone {
  border: 2px dashed rgba(79, 70, 229, 0.34); border-radius: 17px;
  background: linear-gradient(180deg, #fafbff 0%, #f5f7ff 100%);
  padding: 24px 18px 20px; text-align: center; cursor: pointer; transition: all 0.18s ease;
}
.dropzone.dragover { border-color: var(--primary); background: #eef2ff; transform: scale(1.01); }
.drop-icon-circle {
  width: 52px; height: 52px; border-radius: 15px; margin: 0 auto 10px;
  background: linear-gradient(135deg, #4f46e5, #2563eb); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.25);
}
.dropzone h2 { font-size: 1.08rem; font-weight: 800; margin-bottom: 4px; }
.dropzone p { font-size: 0.81rem; color: var(--text-soft); margin-bottom: 14px; }
.drop-cta-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* 4 Quick Demo Thumbnails under Dropzone */
.demo-strip { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--border); }
.demo-label { font-size: 0.77rem; font-weight: 750; color: var(--text-muted); margin-bottom: 9px; }
.hero-demo-thumbs {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px;
}
.hero-demo-chip {
  border: 1.5px solid var(--border); border-radius: 11px; background: #fff; padding: 4px;
  cursor: pointer; text-align: center; transition: all 0.15s;
}
.hero-demo-chip:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.hero-demo-chip img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 7px; display: block;
}
.hero-demo-chip span {
  display: block; font-size: 0.71rem; font-weight: 750; color: var(--text); margin-top: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Right Column: Bulletproof Native Range Before/After Showcase Slider */
.hero-showcase-card {
  background: #fff; border: 1px solid var(--border); border-radius: 22px;
  padding: 12px; box-shadow: var(--shadow-lg);
}
.ba-slider-box {
  position: relative; width: 100%; aspect-ratio: 4/3; border-radius: 15px; overflow: hidden;
  background: #0f172a; user-select: none; -webkit-user-select: none;
  direction: ltr;
  --pos: 78%;
}
.ba-slider-box .ba-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  pointer-events: none; user-select: none; -webkit-user-drag: none;
}
.ba-slider-box .ba-before-img {
  z-index: 2;
  clip-path: inset(0 calc(100% - var(--pos, 78%)) 0 0);
  -webkit-clip-path: inset(0 calc(100% - var(--pos, 78%)) 0 0);
}
.ba-slider-box .ba-after-img {
  z-index: 1;
}
.ba-divider {
  position: absolute; top: 0; bottom: 0; left: var(--pos, 78%); width: 3px; background: #fff; z-index: 10;
  box-shadow: 0 0 12px rgba(15, 23, 42, 0.55); transform: translateX(-50%); pointer-events: none;
}
.ba-handle {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #2563eb); border: 3px solid #fff;
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.78rem; letter-spacing: 2px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.38); pointer-events: none;
}
.ba-range {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0;
  cursor: ew-resize; z-index: 25; margin: 0; padding: 0; direction: ltr;
  -webkit-appearance: none; appearance: none; touch-action: pan-y;
}
.ba-tag {
  position: absolute; top: 12px; z-index: 12; padding: 4px 10px; border-radius: 8px;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; color: #fff; pointer-events: none;
}
.ba-tag.left { left: 12px; background: rgba(15, 23, 42, 0.76); }
.ba-tag.right { right: 12px; background: rgba(5, 150, 105, 0.88); }

.hero-showcase-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 10px; flex-wrap: wrap;
}
.hero-showcase-hint { font-size: 0.76rem; font-weight: 650; color: var(--text-soft); }
.hero-switch-pills { display: flex; gap: 5px; flex-wrap: wrap; }
.hero-sw-btn {
  border: 1px solid var(--border); background: var(--surface-soft); color: var(--text-muted);
  font-size: 0.73rem; font-weight: 700; padding: 4px 9px; border-radius: 8px; cursor: pointer;
}
.hero-sw-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---- Processing Card ---- */
.processing-card {
  max-width: 680px; margin: 22px auto; padding: 34px 24px; border-radius: 22px;
  background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-lg); text-align: center;
}
.spinner {
  width: 48px; height: 48px; border: 4px solid var(--primary-soft);
  border-top-color: var(--primary); border-right-color: var(--emerald);
  border-radius: 50%; margin: 0 auto 14px; animation: spin 0.85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Live Studio Editor (Before/After + Dual Erase/Restore Brush) ---- */
.editor-section { margin: 8px auto 48px; }
.editor-shell {
  background: #fff; border: 1px solid var(--border); border-radius: 24px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.editor-topbar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 10px; padding: 13px 18px; background: #fff; border-bottom: 1px solid var(--border);
}
.editor-tabs { display: inline-flex; background: var(--surface-soft); padding: 4px; border-radius: 12px; gap: 4px; flex-wrap: wrap; }
.ed-tab {
  border: none; background: transparent; padding: 8px 13px; border-radius: 9px;
  font-size: 0.83rem; font-weight: 700; color: var(--text-muted); cursor: pointer;
}
.ed-tab.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.editor-right-tools { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.dl-group { display: inline-flex; align-items: center; border-radius: 11px; overflow: hidden; border: 1px solid rgba(16, 185, 129, 0.35); }
.dl-fmt-select { border: none; background: #ecfdf5; color: #065f46; font-weight: 750; font-size: 0.81rem; padding: 9px 10px; cursor: pointer; outline: none; }
.dl-group .btn-emerald { border-radius: 0; box-shadow: none; }

/* Dual Brush Toolbar */
.brush-toolbar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 12px 18px; background: linear-gradient(90deg, #eef2ff 0%, #ecfdf5 100%);
  border-bottom: 1px solid var(--border);
}
.brush-tool-switch {
  display: inline-flex; background: #fff; border: 1px solid var(--border-strong);
  border-radius: 11px; padding: 3px; gap: 3px;
}
.brush-mode-btn {
  border: none; background: transparent; padding: 7px 12px; border-radius: 8px;
  font-size: 0.82rem; font-weight: 750; color: var(--text-muted); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.brush-mode-btn.active-erase { background: var(--primary); color: #fff; }
.brush-mode-btn.active-restore { background: var(--emerald-dark); color: #fff; }

.brush-controls-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.brush-slider-wrap { display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; font-weight: 700; }
.brush-slider-wrap input[type="range"] { width: 120px; accent-color: var(--primary); }
.brush-size-badge {
  min-width: 44px; text-align: center; padding: 2px 8px; border-radius: 999px;
  background: #fff; border: 1px solid var(--border); font-family: var(--mono); font-size: 0.77rem;
}
.brush-hint-bar {
  padding: 8px 18px; font-size: 0.81rem; font-weight: 650; color: var(--primary);
  background: #f5f7ff; border-bottom: 1px solid rgba(79, 70, 229, 0.14);
}
.brush-hint-bar.restore-mode { color: #065f46; background: #ecfdf5; border-bottom-color: rgba(16, 185, 129, 0.25); }
.notice-bar {
  padding: 10px 18px; font-size: 0.84rem; font-weight: 650; color: #92400e;
  background: #fffbeb; border-bottom: 1px solid #fde68a;
}

.stage-viewport {
  position: relative; min-height: 480px; max-height: 76vh; width: 100%; overflow: auto;
  display: flex; align-items: center; justify-content: center; padding: 18px;
  background-color: #f1f5f9;
  background-image:
    linear-gradient(45deg, #e2e8f0 25%, transparent 25%),
    linear-gradient(-45deg, #e2e8f0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e2e8f0 75%),
    linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}
.stage-frame {
  position: relative; display: inline-block; border-radius: 12px; overflow: hidden;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.18); background: #fff;
  user-select: none; -webkit-user-select: none; direction: ltr;
  --pos: 78%;
}
.stage-img {
  display: block; max-width: none; height: auto; pointer-events: none;
  user-select: none; -webkit-user-drag: none;
}
.processing-preview-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  margin: 0 auto 18px; max-width: 560px;
}
.processing-preview-img {
  max-width: 100%; max-height: 300px; min-height: 180px; width: auto; height: auto;
  object-fit: contain; border-radius: 14px; border: 2px solid rgba(79, 70, 229, 0.28);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.14); background: #f8fafc;
}
.processing-preview-meta {
  font-size: 0.82rem; font-weight: 750; color: var(--primary);
  background: var(--primary-soft); padding: 4px 12px; border-radius: 999px;
}
.btn-replace {
  background: #eef2ff; border: 1px solid #c7d2fe; color: #3730a3; font-weight: 750;
}
.btn-replace:hover { background: #e0e7ff; border-color: #818cf8; color: #312e81; }
.btn-close-ed {
  background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; font-weight: 750;
}
.btn-close-ed:hover { background: #fee2e2; border-color: #f87171; color: #991b1b; }
.compare-before-overlay {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; z-index: 4;
  pointer-events: none; user-select: none; -webkit-user-drag: none;
  clip-path: inset(0 calc(100% - var(--pos, 78%)) 0 0);
  -webkit-clip-path: inset(0 calc(100% - var(--pos, 78%)) 0 0);
}
.compare-divider {
  position: absolute; top: 0; bottom: 0; left: var(--pos, 78%); width: 3px; background: #fff;
  box-shadow: 0 0 12px rgba(15, 23, 42, 0.5); z-index: 12; pointer-events: none; transform: translateX(-50%);
}
.compare-handle {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #2563eb); border: 3px solid #fff;
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.78rem; letter-spacing: 2px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.35); pointer-events: none;
}
.editor-ba-range {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0;
  cursor: ew-resize; z-index: 25; margin: 0; padding: 0;
  -webkit-appearance: none; appearance: none; touch-action: pan-y;
}
.stage-corner-tag {
  position: absolute; top: 14px; z-index: 10; padding: 4px 10px; border-radius: 8px;
  background: rgba(15, 23, 42, 0.72); color: #fff; font-size: 0.72rem; font-weight: 800; pointer-events: none;
}
.stage-corner-tag.left { left: 14px; }
.stage-corner-tag.right { right: 14px; background: rgba(5, 150, 105, 0.86); }
.brush-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 15; cursor: none; touch-action: none; }
.brush-cursor {
  position: fixed; pointer-events: none; border-radius: 50%;
  border: 2px solid #4f46e5; background: rgba(79, 70, 229, 0.24);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9); transform: translate(-50%, -50%);
  z-index: 9999; display: none;
}
.brush-cursor.restore { border-color: #059669; background: rgba(16, 185, 129, 0.28); }

.editor-telemetry {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 10px; padding: 12px 18px; background: #f8fafc; border-top: 1px solid var(--border); font-size: 0.81rem;
}
.telemetry-pills { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.t-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 8px;
  background: #fff; border: 1px solid var(--border); color: var(--text-muted); font-weight: 600;
}
.t-pill strong { color: var(--text); }
.t-pill.green strong { color: #059669; }
.zoom-bar { display: inline-flex; align-items: center; gap: 6px; }

/* ---- Conversion Sections (4 Steps, 6 Use Cases, Platforms, Why, Reviews, Pricing, API, FAQ) ---- */
.section-block { padding: 66px 0; border-top: 1px solid rgba(226, 232, 240, 0.72); }
.section-block.soft { background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%); }
.section-head { text-align: center; max-width: 740px; margin: 0 auto 38px; }
.section-kicker {
  display: inline-block; font-size: 0.73rem; font-weight: 800; letter-spacing: 0.1em;
  color: var(--primary); background: var(--primary-soft); padding: 4px 12px;
  border-radius: 999px; margin-bottom: 10px;
}
.section-head h2 {
  font-size: clamp(1.55rem, 2.8vw, 2.25rem); font-weight: 850; letter-spacing: -0.03em; margin-bottom: 10px;
}
.section-head p { color: var(--text-muted); font-size: 0.96rem; }

/* 4 Steps Grid */
.steps-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.step-card {
  background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 22px 20px;
  box-shadow: var(--shadow-sm);
}
.step-num {
  width: 40px; height: 40px; border-radius: 12px; background: var(--primary-soft);
  color: var(--primary); font-weight: 850; font-size: 1.05rem;
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.step-card h3 { font-size: 1rem; font-weight: 800; margin-bottom: 6px; }
.step-card p { font-size: 0.85rem; color: var(--text-muted); }

/* 8 Interactive Alternating Zigzag Showcase Rows (Dewatermark.ai Flow!) */
.case-tabs {
  display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 36px;
}
.case-tab-btn {
  padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--border);
  background: #fff; color: var(--text-muted); font-size: 0.82rem; font-weight: 700;
  cursor: pointer; transition: all 0.16s;
}
.case-tab-btn:hover { border-color: var(--primary); color: var(--primary); }
.case-tab-btn.active {
  background: linear-gradient(135deg, #4f46e5, #2563eb); border-color: transparent;
  color: #fff; box-shadow: 0 6px 18px rgba(79, 70, 229, 0.25);
}
.zigzag-list {
  display: flex; flex-direction: column; gap: 38px;
}
.zigzag-row {
  display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 40px; align-items: center;
  background: #fff; border: 1.5px solid var(--border); border-radius: 24px;
  padding: 26px; box-shadow: var(--shadow-md); transition: border-color 0.2s, box-shadow 0.2s;
}
.zigzag-row.is-reversed {
  grid-template-columns: 1.08fr 0.92fr;
}
.zigzag-row.is-reversed .zigzag-media { order: -1; }
.zigzag-row.highlighted { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.zigzag-media {
  width: 100%; max-width: 100%; overflow: hidden; border-radius: 16px;
}
.zigzag-media .ba-slider-box {
  width: 100%; max-width: 100%; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden;
}
.zigzag-media .ba-slider-box img {
  max-width: 100%; width: 100%; height: 100%; object-fit: cover; display: block;
}
.zigzag-copy {
  display: flex; flex-direction: column; gap: 12px; padding: 6px 8px;
}
.case-card-num {
  align-self: flex-start; font-size: 0.72rem; font-weight: 850; color: var(--primary);
  background: var(--primary-soft); padding: 4px 11px; border-radius: 999px;
}
.case-card-title { font-size: clamp(1.22rem, 2vw, 1.52rem); font-weight: 850; letter-spacing: -0.025em; line-height: 1.2; }
.case-card-desc { font-size: 0.92rem; color: var(--text-muted); line-height: 1.6; }
.zigzag-bullets {
  list-style: none; display: flex; flex-direction: column; gap: 7px; margin: 4px 0 8px;
}
.zigzag-bullets li {
  font-size: 0.86rem; font-weight: 600; color: var(--text);
  display: flex; align-items: flex-start; gap: 8px;
}
.zigzag-bullets li::before {
  content: "✓"; color: var(--emerald); font-weight: 900; flex-shrink: 0;
}
.zigzag-actions {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px;
}
.zigzag-hint { font-size: 0.76rem; font-weight: 650; color: var(--text-soft); }

/* Daily Login Rewards (+10 Credits Every Day!) */
.rewards-card {
  background: linear-gradient(135deg, #ffffff 0%, #eef2ff 52%, #ecfdf5 100%);
  border: 1.5px solid rgba(79, 70, 229, 0.24); border-radius: 26px;
  padding: 32px; box-shadow: var(--shadow-lg);
}
.rewards-top {
  display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.rewards-head-copy { max-width: 640px; }
.rewards-bonus-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  background: #fff; border: 1px solid rgba(16, 185, 129, 0.35); color: #065f46;
  font-size: 0.77rem; font-weight: 800; margin-bottom: 10px;
}
.rewards-cta-box {
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
.reward-countdown {
  font-family: var(--mono); font-size: 0.82rem; font-weight: 750; color: var(--primary);
  background: #fff; border: 1px solid var(--border); padding: 5px 12px; border-radius: 999px;
}
.rewards-days-grid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px;
}
.reward-day-pill {
  background: #fff; border: 1.5px solid var(--border); border-radius: 16px;
  padding: 14px 10px; text-align: center; transition: all 0.18s;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.reward-day-pill.claimed {
  border-color: var(--emerald); background: #ecfdf5;
}
.reward-day-pill.is-today:not(.claimed) {
  border-color: var(--primary); box-shadow: 0 8px 20px rgba(79, 70, 229, 0.16);
  transform: translateY(-2px);
}
.reward-day-num { font-size: 0.73rem; font-weight: 800; color: var(--text-soft); text-transform: uppercase; }
.reward-day-pts { font-size: 1.05rem; font-weight: 850; color: var(--primary); }
.reward-day-pill.claimed .reward-day-pts { color: #059669; }
.reward-day-state {
  width: 24px; height: 24px; border-radius: 50%; background: var(--surface-soft);
  color: var(--text-soft); font-size: 0.75rem; font-weight: 900;
  display: inline-flex; align-items: center; justify-content: center;
}
.reward-day-pill.claimed .reward-day-state { background: var(--emerald); color: #fff; }
.reward-day-pill.is-today:not(.claimed) .reward-day-state { background: var(--primary); color: #fff; }

/* API & MCP Code Switcher */
.code-tabs { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.code-tab-btn {
  border: 1px solid rgba(148, 163, 184, 0.25); background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1; padding: 5px 11px; border-radius: 8px; font-size: 0.75rem; font-weight: 700; cursor: pointer;
}
.code-tab-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.mcp-highlight-card {
  margin-top: 18px; background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  color: #e2e8f0; border-radius: 20px; padding: 20px 22px; border: 1px solid rgba(99, 102, 241, 0.35);
  box-shadow: var(--shadow-md);
}
.mcp-badge {
  display: inline-block; font-size: 0.68rem; font-weight: 850; letter-spacing: 0.06em;
  padding: 3px 9px; border-radius: 999px; background: rgba(16, 185, 129, 0.2); color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.mcp-highlight-card h3 { font-size: 1.05rem; font-weight: 800; color: #fff; margin: 8px 0 5px; }
.mcp-highlight-card p { font-size: 0.83rem; color: #cbd5e1; margin-bottom: 12px; }
.mcp-highlight-card pre {
  font-family: var(--mono); font-size: 0.78rem; line-height: 1.55;
  background: rgba(2, 6, 23, 0.65); padding: 14px; border-radius: 12px; overflow-x: auto;
  color: #e2e8f0; border: 1px solid rgba(148, 163, 184, 0.16);
}

/* Platforms (Web, iOS, macOS) */
.platforms-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.plat-card {
  background: #fff; border: 1.5px solid var(--border); border-radius: 20px; padding: 26px 24px;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px;
}
.plat-card.live { border-color: var(--emerald); background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%); }
.plat-badge {
  align-self: flex-start; font-size: 0.69rem; font-weight: 800; letter-spacing: 0.06em;
  padding: 4px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary);
}
.plat-card.live .plat-badge { background: var(--emerald-soft); color: #065f46; }
.plat-card h3 { font-size: 1.12rem; font-weight: 850; }
.plat-card p { font-size: 0.87rem; color: var(--text-muted); }

/* Why & Reviews Grids */
.why-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.why-card {
  background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 22px;
  box-shadow: var(--shadow-sm);
}
.why-card h3 { font-size: 0.98rem; font-weight: 800; margin: 10px 0 6px; }
.why-card p { font-size: 0.85rem; color: var(--text-muted); }
.why-ico {
  width: 40px; height: 40px; border-radius: 11px; background: var(--primary-soft);
  color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}

.reviews-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.review-card {
  background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 22px;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
}
.review-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.review-stars { color: #f59e0b; letter-spacing: 2px; font-size: 0.95rem; }
.review-verified-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 800;
  color: #065f46; background: var(--emerald-soft); border: 1px solid rgba(16, 185, 129, 0.28);
}
.review-quote { font-size: 0.89rem; color: var(--text); line-height: 1.62; }
.review-author { font-size: 0.8rem; font-weight: 750; color: var(--text-soft); }

.reviews-empty-card {
  max-width: 780px; margin: 0 auto;
  background: linear-gradient(135deg, #ffffff 0%, #f8faff 55%, #ecfdf5 100%);
  border: 1px solid var(--border-strong); border-radius: 22px; padding: 30px 28px;
  box-shadow: var(--shadow-md); text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.reviews-empty-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; font-size: 0.74rem; font-weight: 850;
  color: #065f46; background: var(--emerald-soft); border: 1px solid rgba(16, 185, 129, 0.30);
  letter-spacing: 0.04em;
}
.reviews-empty-card h3 { font-size: 1.25rem; font-weight: 850; color: var(--text); letter-spacing: -0.02em; }
.reviews-empty-card p { font-size: 0.92rem; color: var(--text-muted); max-width: 600px; line-height: 1.62; }
.reviews-empty-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

.review-form-card {
  max-width: 720px; margin: 22px auto 0;
  background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 24px;
  box-shadow: var(--shadow-sm); text-align: left;
}
.review-form-card h3 { font-size: 1.06rem; font-weight: 850; margin-bottom: 6px; }
.review-form-sub { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 14px; }
.star-picker { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.star-pick-btn {
  border: 1px solid var(--border); background: var(--surface-soft); color: #cbd5e1;
  width: 38px; height: 38px; border-radius: 10px; font-size: 1.25rem; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: all 0.14s ease;
}
.star-pick-btn.active {
  color: #f59e0b; background: #fffbeb; border-color: rgba(245, 158, 11, 0.45);
}
.review-textarea {
  width: 100%; min-height: 88px; resize: vertical; padding: 11px 13px; border-radius: 12px;
  border: 1px solid var(--border-strong); font: inherit; font-size: 0.9rem; color: var(--text);
  background: #fff;
}
.review-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.review-form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-top: 12px; }

/* Batch & History */
.batch-panel {
  margin: 22px auto 44px; background: #fff; border: 1px solid var(--border);
  border-radius: 22px; padding: 22px; box-shadow: var(--shadow-md);
}
.batch-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.batch-grid, .history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.batch-item-card, .history-card {
  background: #fff; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm);
}
.batch-item-thumb { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.history-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--border); aspect-ratio: 16/9; }
.history-pair img { width: 100%; height: 100%; object-fit: cover; display: block; }
.batch-item-body, .history-info { padding: 12px 14px; }
.batch-item-name, .history-title { font-size: 0.84rem; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.batch-item-sub, .history-meta { font-size: 0.74rem; color: var(--text-soft); margin: 3px 0 9px; }
.batch-item-actions, .history-actions { display: flex; gap: 6px; }
.empty-state {
  text-align: center; padding: 38px 20px; border-radius: 18px; background: #fff;
  border: 1px dashed var(--border-strong); color: var(--text-soft);
}

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.price-card {
  position: relative; background: #fff; border: 1.5px solid var(--border); border-radius: 20px;
  padding: 26px 22px; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
}
.price-card.featured {
  border-color: var(--primary); background: linear-gradient(180deg, #ffffff 0%, #f5f7ff 100%);
  box-shadow: var(--shadow-lg);
}
.popular-ribbon {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, #4f46e5, #2563eb); color: #fff;
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; padding: 4px 12px; border-radius: 999px;
}
.price-name { font-size: 1.05rem; font-weight: 800; }
.price-val { margin: 12px 0 16px; display: flex; align-items: baseline; gap: 4px; }
.price-num { font-size: 2.3rem; font-weight: 850; letter-spacing: -0.04em; }
.price-per { color: var(--text-soft); font-size: 0.86rem; font-weight: 600; }
.price-features { list-style: none; margin-bottom: 22px; flex: 1; }
.price-features li { font-size: 0.85rem; color: var(--text-muted); padding: 6px 0; display: flex; align-items: center; gap: 8px; }
.price-features li::before { content: "✓"; color: var(--emerald); font-weight: 900; }

/* API */
.api-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 22px; align-items: start; }
.code-card {
  background: #0f172a; color: #e2e8f0; border-radius: 20px; padding: 20px 22px;
  box-shadow: var(--shadow-md); overflow-x: auto;
}
.code-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 0.78rem; color: #94a3b8; font-weight: 700; }
.code-card pre { font-family: var(--mono); font-size: 0.8rem; line-height: 1.6; white-space: pre-wrap; word-break: break-all; }
.api-keys-card { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 22px; box-shadow: var(--shadow-sm); }
.api-create-row { display: flex; gap: 8px; margin: 14px 0 16px; }
.input-text {
  width: 100%; padding: 10px 13px; border-radius: 10px; border: 1px solid var(--border-strong);
  font-size: 0.9rem; outline: none; background: #fff;
}
.input-text:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12); }
.key-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-radius: 11px; background: var(--surface-soft); margin-bottom: 8px; font-size: 0.81rem;
}
.key-val { font-family: var(--mono); font-weight: 600; color: var(--primary); }

/* FAQ Accordion */
.faq-list { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: #fff; border: 1px solid var(--border); border-radius: 15px; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.faq-item summary {
  padding: 16px 20px; font-weight: 750; font-size: 0.95rem; cursor: pointer;
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.25rem; color: var(--primary); font-weight: 700; }
.faq-item[open] summary::after { content: "−"; }
.faq-ans { padding: 0 20px 16px; font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; }

/* Modals */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 140; background: rgba(15, 23, 42, 0.54);
  backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-card {
  width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto;
  background: #fff; border-radius: 22px; padding: 26px; box-shadow: 0 28px 65px rgba(15, 23, 42, 0.25);
  position: relative;
}
.modal-card.wide { max-width: 660px; }
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%;
  border: none; background: var(--surface-soft); cursor: pointer; font-size: 1.15rem; color: var(--text-muted);
}
.form-group { margin-bottom: 13px; }
.form-group label { display: block; font-size: 0.81rem; font-weight: 750; color: var(--text-muted); margin-bottom: 5px; }
.form-error { color: var(--danger); font-size: 0.82rem; font-weight: 650; margin-bottom: 10px; }

/* Toasts */
.toast-container { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 18px; border-radius: 12px; background: #0f172a; color: #fff;
  font-size: 0.85rem; font-weight: 650; box-shadow: 0 14px 30px rgba(15, 23, 42, 0.25);
}
.toast.success { background: #065f46; }
.toast.error { background: #b91c1c; }

/* Footer */
.site-footer {
  padding: 34px 20px 44px; text-align: center; border-top: 1px solid var(--border);
  color: var(--text-soft); font-size: 0.83rem; background: #fff;
}
.footer-links {
  display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-bottom: 12px;
}
.footer-links button, .footer-links a {
  border: none; background: transparent; color: var(--text-muted); font-size: 0.83rem; font-weight: 650; cursor: pointer;
}
.footer-links button:hover, .footer-links a:hover { color: var(--primary); }

/* Dedicated Multi-Page SSR Content Styles (/pricing, /api-docs, /about, /privacy, /terms, /refund) */
.subpage-main { padding: 48px 0 72px; }
.subpage-hero { text-align: center; max-width: 760px; margin: 0 auto 40px; }
.subpage-hero h1 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); font-weight: 850; letter-spacing: -0.03em; margin-bottom: 10px; }
.subpage-hero p { font-size: 0.98rem; color: var(--text-muted); }
.subpage-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.subpage-card {
  background: #fff; border: 1px solid var(--border); border-radius: 20px;
  padding: 26px; box-shadow: var(--shadow-sm);
}
.subpage-card h2, .subpage-card h3 { font-size: 1.08rem; font-weight: 800; margin-bottom: 10px; color: var(--text); }
.subpage-card p { font-size: 0.91rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 10px; }
.subpage-card code {
  font-family: var(--mono); font-size: 0.82rem; background: var(--surface-soft);
  color: var(--primary); padding: 2px 6px; border-radius: 6px;
}
.legal-doc { max-width: 860px; margin: 0 auto; }
.legal-doc h3 { margin-top: 18px; }
.legal-doc h3:first-child { margin-top: 0; }

/* Back-to-Top Floating Button (Right Bottom, never collides with Mobile Bottom Nav) */
.scroll-top-btn {
  position: fixed; right: 22px; bottom: 26px; z-index: 98;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(79, 70, 229, 0.25);
  background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
  color: #fff; font-size: 1.25rem; font-weight: 800; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 10px 26px rgba(79, 70, 229, 0.34);
  opacity: 0; pointer-events: none; transform: translateY(14px);
  transition: opacity 0.22s ease, transform 0.22s ease, box-shadow 0.18s ease;
}
.scroll-top-btn.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.scroll-top-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(79, 70, 229, 0.44); }

/* Mobile App-Like Bottom Navigation Bar */
.mobile-bottom-nav {
  display: none;
}

.hidden { display: none !important; }

/* ---- Mobile-First Responsive Overrides ---- */
@media (max-width: 1060px) {
  .hero-split { grid-template-columns: 1fr; }
  .steps-grid, .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .platforms-grid, .why-grid, .reviews-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .api-grid { grid-template-columns: 1fr; }
  .zigzag-row, .zigzag-row.is-reversed { grid-template-columns: 1fr; gap: 22px; padding: 18px; }
  .zigzag-row .zigzag-media, .zigzag-row.is-reversed .zigzag-media { order: -1; }
  .rewards-days-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  body { padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)); }
  .container { padding: 0 14px; max-width: 100%; overflow-x: hidden; }
  .nav-links { display: none; }
  .nav-inner { height: auto; padding: 10px 14px; flex-wrap: wrap; }
  .nav-actions { flex-wrap: wrap; }
  .hero { padding: 18px 0 26px; }
  .upload-panel-card { padding: 14px 12px; }
  .hero-trust-grid { grid-template-columns: 1fr; }
  .steps-grid, .platforms-grid, .why-grid, .reviews-grid, .pricing-grid { grid-template-columns: 1fr; }
  .hero-demo-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .rewards-card { padding: 20px 16px; }
  .rewards-cta-box { align-items: flex-start; width: 100%; }
  .rewards-days-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .btn { min-height: 42px; }
  .stage-viewport { padding: 10px; min-height: 300px; }
  .toast-container { bottom: 84px; right: 14px; left: 14px; }
  .subpage-card-grid { grid-template-columns: 1fr; }
  .scroll-top-btn { right: 14px; bottom: 84px; width: 42px; height: 42px; }
  pre, code { max-width: 100%; white-space: pre-wrap; word-break: break-word; }

  .mobile-bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
    display: grid; grid-template-columns: repeat(5, 1fr);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
    padding: 6px 6px calc(8px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
  }
  .mob-nav-btn {
    border: none; background: transparent; color: var(--text-muted);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; font-size: 0.69rem; font-weight: 700; padding: 6px 2px; border-radius: 10px; cursor: pointer;
  }
  .mob-nav-btn.active { color: var(--primary); background: var(--primary-soft); }
  .mob-nav-btn .ico { font-size: 1.12rem; line-height: 1; }
}

/* ---- Phase 5: Profile Avatar Pill, Buttons, 2-Col 7-Day Rewards Modal & Account Workspace ---- */
.nav-reward-btn {
  font-family: inherit; font-size: 0.86rem; font-weight: 700; padding: 7px 11px;
  border-radius: 9px; display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer; white-space: nowrap; transition: all 0.16s ease;
}
.credit-pill { cursor: pointer; font-family: inherit; }
.nav-avatar-pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 4px;
  border-radius: 999px; background: var(--surface-soft); border: 1px solid var(--border-strong);
  color: var(--text); font-size: 0.82rem; font-weight: 750; transition: all 0.16s ease;
  text-decoration: none; white-space: nowrap;
}
.nav-avatar-pill:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.nav-avatar-circle {
  width: 28px; height: 28px; border-radius: 999px;
  background: linear-gradient(135deg, #4f46e5, #10b981); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.74rem; font-weight: 850; letter-spacing: 0.02em; flex-shrink: 0;
}
.nav-avatar-name { max-width: 115px; overflow: hidden; text-overflow: ellipsis; }
.nav-new-badge {
  font-size: 0.65rem; font-weight: 900; padding: 2px 7px; border-radius: 999px;
  background: linear-gradient(135deg, #10b981, #059669); color: #fff; letter-spacing: 0.04em;
}
.lang-trigger-btn {
  border: 1px solid var(--border-strong); background: var(--surface-soft);
  padding: 6px 10px; border-radius: 10px; font-size: 0.8rem; font-weight: 750; color: var(--text);
}
.lang-drop-menu {
  left: auto; right: 0; min-width: 280px;
  display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px;
}
.nav-dropdown.lang-dropdown:not([data-dd-ready="1"]):hover .lang-drop-menu,
.nav-dropdown.lang-dropdown.open .lang-drop-menu { display: grid; }
.lang-drop-menu a, .lang-pick-btn {
  width: 100%; display: flex; align-items: center; gap: 7px; padding: 8px 10px;
  border-radius: 9px; font-size: 0.82rem; font-weight: 650; color: var(--text);
  border: none; background: transparent; cursor: pointer; text-decoration: none;
  font-family: inherit; text-align: left; white-space: nowrap;
}
.lang-drop-menu a:hover, .lang-pick-btn:hover,
.lang-drop-menu a.active, .lang-pick-btn.active { background: var(--primary-soft); color: var(--primary); font-weight: 800; }

.btn-report {
  background: #fffbeb; border: 1px solid #fcd34d; color: #b45309; font-weight: 750;
}
.btn-report:hover { background: #fef3c7; border-color: #f59e0b; color: #92400e; }

html[dir="rtl"] .nav-drop-menu { left: auto; right: 0; }
html[dir="rtl"] .lang-drop-menu, html[dir="rtl"] .credit-popover { right: auto; left: 0; }
html[dir="rtl"] .lang-drop-menu a, html[dir="rtl"] .lang-pick-btn { text-align: right; }

/* Credit Summary Popover */
.credit-pop-wrap { position: relative; display: inline-flex; align-items: center; }
.credit-popover {
  position: absolute; top: calc(100% + 10px); right: 0; width: 280px; z-index: 150;
  background: #fff; border: 1px solid var(--border-strong); border-radius: 18px;
  padding: 16px; box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16);
  display: flex; flex-direction: column; gap: 12px;
}
.cp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 0.88rem; }
.cp-bar-item { display: flex; flex-direction: column; gap: 6px; }
.cp-bar-row { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--text-muted); }
.cp-bar-row strong { color: var(--text); font-weight: 800; }
.cp-actions { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; border-top: 1px solid var(--border); }

.btn-emerald {
  background: linear-gradient(135deg, #10b981, #059669); color: #fff; border: none;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.28);
}
.btn-emerald:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-emerald:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }
.btn-danger {
  background: #dc2626; color: #fff; border: 1px solid #b91c1c;
}
.btn-danger:hover { background: #b91c1c; }
.btn-xs { padding: 5px 10px; font-size: 0.76rem; border-radius: 8px; min-height: 30px; }

/* 2-Column 7-Day Daily Check-In Rewards Modal (Original PureMark AI Dark Indigo + Emerald/Gold) */
.rewards-modal-shell {
  position: relative; width: 100%; max-width: 820px; border-radius: 26px; overflow: hidden;
  background: #fff; box-shadow: 0 28px 70px rgba(15, 23, 42, 0.38);
  border: 1px solid rgba(79, 70, 229, 0.22);
}
.rewards-modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 10;
  background: rgba(255, 255, 255, 0.92); color: var(--text);
  border: 1px solid var(--border); width: 34px; height: 34px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
}
.rewards-modal-grid { display: grid; grid-template-columns: 300px 1fr; }
.rewards-modal-left {
  background: linear-gradient(155deg, #1e1b4b 0%, #312e81 52%, #0f172a 100%);
  color: #fff; padding: 28px 24px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
}
.rm-streak-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px; border-radius: 999px;
  background: rgba(16, 185, 129, 0.2); border: 1px solid rgba(52, 211, 153, 0.45);
  color: #6ee7b7; font-size: 0.74rem; font-weight: 850; letter-spacing: 0.06em;
}
.rm-gift-orb {
  width: 74px; height: 74px; border-radius: 22px; margin-top: 4px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.65), rgba(16, 185, 129, 0.55));
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex; align-items: center; justify-content: center; font-size: 2.15rem;
  box-shadow: 0 14px 32px rgba(16, 185, 129, 0.25);
}
.rm-today-kicker { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; color: #c7d2fe; }
.rm-today-val {
  font-size: 2.2rem; font-weight: 900; letter-spacing: -0.03em; line-height: 1.05;
  background: linear-gradient(135deg, #ffffff 0%, #6ee7b7 60%, #fde68a 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.rm-left-desc { font-size: 0.82rem; color: #cbd5e1; line-height: 1.55; margin-bottom: 4px; }
.rm-countdown {
  font-size: 0.76rem; font-weight: 700; color: #a5b4fc;
  padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12); width: 100%;
}
.rewards-modal-right { padding: 28px 26px; background: #f8fafc; display: flex; flex-direction: column; gap: 16px; }
.rm-right-head h2, .rm-right-head h3 { font-size: 1.24rem; font-weight: 850; color: var(--text); }
.rm-right-head p { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }
.rm-days-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rm-day-card {
  background: #fff; border: 1px solid var(--border); border-radius: 15px; padding: 13px 12px;
  display: flex; flex-direction: column; gap: 6px; position: relative;
  box-shadow: var(--shadow-sm); transition: all 0.15s ease;
}
.rm-day-card.today {
  border-color: var(--primary); background: linear-gradient(180deg, #eef2ff, #ffffff);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14);
}
.rm-day-card.claimed { border-color: rgba(16, 185, 129, 0.45); background: #ecfdf5; }
.rm-day-card.grand {
  grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #eef2ff 0%, #ecfdf5 55%, #fffbeb 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.55); padding: 14px 18px;
}
.rm-day-head { display: flex; align-items: center; gap: 8px; font-size: 0.76rem; font-weight: 800; color: var(--text-muted); }
.rm-grand-tag {
  font-size: 0.67rem; font-weight: 900; padding: 2px 8px; border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; letter-spacing: 0.04em;
}
.rm-day-amt { font-size: 1.15rem; font-weight: 900; color: var(--primary); }
.rm-day-card.grand .rm-day-amt { font-size: 1.35rem; color: #059669; }
.rm-day-state { font-size: 0.82rem; font-weight: 850; color: var(--emerald-dark); }
.rm-right-foot { display: flex; justify-content: flex-end; margin-top: auto; }
.reward-day-pill.is-grand { border-color: rgba(245, 158, 11, 0.55); background: linear-gradient(180deg, #fffbeb, #ecfdf5); }

/* ---- Original PureMark AI Left-Sidebar Customer Workspace (/account, /my-account, /my-plan, /api-management, /referral, /support) ---- */
.account-body { background: #f8fafc; min-height: 100vh; }
.acc-shell { padding: 30px 0 64px; }
.acc-guest-card {
  max-width: 480px; margin: 28px auto; background: #fff; border: 1px solid var(--border);
  border-radius: 22px; padding: 30px 28px; box-shadow: var(--shadow-md); text-align: center;
}
.acc-guest-card h1, .acc-guest-card h2 { font-size: 1.45rem; font-weight: 850; margin: 10px 0 8px; letter-spacing: -0.02em; }
.acc-guest-card p { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 18px; line-height: 1.55; }
.acc-auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px;
  background: var(--surface-soft); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 18px;
}
.acc-auth-tab {
  border: none; background: transparent; padding: 9px 10px; border-radius: 9px;
  font-size: 0.82rem; font-weight: 750; color: var(--text-muted); cursor: pointer;
}
.acc-auth-tab.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.acc-auth-form { text-align: left; display: flex; flex-direction: column; gap: 12px; }
.auth-error {
  padding: 10px 12px; border-radius: 10px; background: #fef2f2;
  border: 1px solid #fecaca; color: #b91c1c; font-size: 0.83rem; font-weight: 650;
}

.acc-layout { display: grid; grid-template-columns: 262px minmax(0, 1fr); gap: 24px; align-items: start; }
.acc-sidebar {
  background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 18px 14px;
  box-shadow: var(--shadow-sm); position: sticky; top: 82px;
  display: flex; flex-direction: column; gap: 14px;
}
.acc-side-profile {
  display: flex; align-items: center; gap: 11px; padding: 6px 8px 14px;
  border-bottom: 1px solid var(--border);
}
.acc-side-avatar {
  width: 42px; height: 42px; border-radius: 13px;
  background: linear-gradient(135deg, #4f46e5, #2563eb 55%, #10b981);
  color: #fff; font-weight: 850; font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.acc-side-meta { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.acc-side-meta strong { font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-plan-chip {
  display: inline-flex; width: fit-content; align-items: center;
  padding: 2px 8px; border-radius: 999px; font-size: 0.68rem; font-weight: 850;
  color: var(--primary); background: var(--primary-soft); letter-spacing: 0.05em;
}
.acc-plan-chip.lg { font-size: 0.74rem; padding: 4px 11px; }
.acc-side-nav { display: flex; flex-direction: column; gap: 4px; }
.acc-nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px;
  font-size: 0.88rem; font-weight: 700; color: var(--text-muted); text-decoration: none;
  transition: all 0.15s ease;
}
.acc-nav-item:hover { background: var(--surface-soft); color: var(--primary); }
.acc-nav-item.active {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(16, 185, 129, 0.1));
  color: var(--primary); font-weight: 800; border: 1px solid rgba(79, 70, 229, 0.22);
}
.acc-nav-ico { width: 20px; text-align: center; font-size: 1rem; }
.acc-side-reward-box {
  background: linear-gradient(135deg, #eef2ff 0%, #ecfdf5 100%);
  border: 1px solid rgba(16, 185, 129, 0.28); border-radius: 14px; padding: 13px;
}

.acc-content { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.acc-pane { display: flex; flex-direction: column; gap: 18px; }
.acc-pane-head h1, .acc-pane-head h2 { font-size: 1.55rem; font-weight: 900; letter-spacing: -0.025em; color: var(--text); }
.acc-card > h2 { font-size: 1.05rem; font-weight: 850; color: var(--text); }
.acc-pane-head p { font-size: 0.9rem; color: var(--text-muted); margin-top: 4px; }
.acc-card {
  background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}
.acc-profile-banner {
  display: flex; align-items: center; gap: 16px; padding-bottom: 18px; margin-bottom: 18px;
  border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.acc-big-avatar {
  width: 60px; height: 60px; border-radius: 18px;
  background: linear-gradient(135deg, #4f46e5, #2563eb 55%, #10b981);
  color: #fff; font-weight: 900; font-size: 1.35rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.acc-uid-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.acc-uid-label { font-size: 0.78rem; font-weight: 750; color: var(--text-soft); }
.acc-uid-row code {
  padding: 3px 9px; border-radius: 8px; background: var(--surface-soft);
  border: 1px solid var(--border); font-size: 0.82rem; font-weight: 750; color: var(--primary);
}
.acc-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.acc-danger-card { border-color: rgba(220, 38, 38, 0.28); background: #fffafb; }
.acc-danger-card h2, .acc-danger-card h3 { color: #b91c1c; font-size: 1.02rem; font-weight: 850; margin-bottom: 6px; }
.acc-danger-card p { font-size: 0.86rem; color: var(--text-muted); margin-bottom: 14px; }
.acc-delete-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.acc-delete-row .input-text { flex: 1; min-width: 220px; }

.acc-plan-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 20px;
}
.acc-credit-bars { display: flex; flex-direction: column; gap: 18px; }
.acc-bar-box {
  background: var(--surface-soft); border: 1px solid var(--border); border-radius: 15px; padding: 16px 18px;
}
.acc-bar-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 0.9rem; }
.acc-bar-top span { font-weight: 850; color: var(--primary); }
.acc-progress-track { height: 11px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.acc-progress-fill { height: 100%; border-radius: 999px; transition: width 0.35s ease; }
.acc-progress-fill.primary { background: linear-gradient(90deg, #4f46e5, #2563eb); }
.acc-progress-fill.emerald { background: linear-gradient(90deg, #10b981, #059669); }
.acc-bar-note { font-size: 0.8rem; color: var(--text-muted); margin-top: 8px; }

.acc-api-key-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.acc-key-list { display: flex; flex-direction: column; gap: 10px; }
.acc-key-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 13px; background: var(--surface-soft); border: 1px solid var(--border);
}
.acc-key-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.acc-key-code { font-size: 0.82rem; color: var(--primary); word-break: break-all; }
.acc-key-actions { display: flex; gap: 6px; align-items: center; }

.acc-stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.acc-stat-card {
  background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 18px 20px;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 6px;
}
.acc-stat-label { font-size: 0.78rem; font-weight: 750; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.04em; }
.acc-stat-val { font-size: 1.75rem; font-weight: 900; color: var(--text); letter-spacing: -0.03em; }
.acc-stat-val.emerald { color: #059669; }
.acc-chart-wrap { width: 100%; overflow-x: auto; }
.acc-table-wrap { width: 100%; overflow-x: auto; }
.acc-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.acc-table th {
  text-align: left; padding: 10px 12px; font-size: 0.74rem; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-soft); border-bottom: 1px solid var(--border);
}
.acc-table td { padding: 11px 12px; border-bottom: 1px solid var(--border); color: var(--text); }
.acc-status-pill {
  display: inline-flex; padding: 3px 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 800;
}
.acc-status-pill.ok { background: var(--emerald-soft); color: #065f46; }
.acc-status-pill.err { background: #fef2f2; color: #b91c1c; }

.acc-copy-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.acc-copy-row .input-text { flex: 1; min-width: 220px; }
.acc-mini-lbl { font-size: 0.74rem; font-weight: 750; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.acc-code-big {
  font-size: 1.25rem; font-weight: 900; letter-spacing: 0.08em; color: var(--primary);
  padding: 5px 12px; border-radius: 10px; background: var(--primary-soft); display: inline-block;
}
.acc-ticket-item {
  padding: 13px 14px; border-radius: 13px; background: var(--surface-soft);
  border: 1px solid var(--border); margin-bottom: 10px;
}

@media (max-width: 900px) {
  .acc-layout { grid-template-columns: 1fr; }
  .acc-sidebar { position: static; }
  .acc-side-nav { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .acc-nav-item { white-space: nowrap; flex-shrink: 0; }
  .acc-form-grid, .acc-stats-grid { grid-template-columns: 1fr; }
  .rewards-modal-grid { grid-template-columns: 1fr; }
  .rm-days-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- v16 Full Mobile Viewport Lock (0px Horizontal Overflow on 360px/390px LTR & RTL) ---- */
@media (max-width: 768px) {
  .navbar { width: 100%; max-width: 100vw; }
  .nav-inner {
    height: auto; min-height: 54px; padding: 8px 12px; gap: 6px 8px;
    flex-wrap: wrap; justify-content: space-between; align-items: center;
  }
  .brand { gap: 7px; flex-shrink: 0; }
  .brand-icon { width: 30px; height: 30px; border-radius: 9px; }
  .brand-text { font-size: 1.02rem; }
  .brand-badge { font-size: 0.6rem; padding: 1px 5px; }
  .nav-actions {
    gap: 6px; flex-wrap: wrap; justify-content: flex-end;
    max-width: 100%; flex: 0 1 auto;
  }
  .nav-actions .btn,
  .nav-actions .lang-trigger-btn {
    min-height: 36px; padding: 6px 10px; font-size: 0.78rem; line-height: 1.2;
  }
  .nav-actions .btn-primary { padding: 6px 11px; }
  .nav-actions .credit-pill { min-height: 36px; padding: 5px 10px; font-size: 0.76rem; }
  .nav-actions .nav-avatar-pill { min-height: 36px; padding: 2px 8px 2px 3px; font-size: 0.76rem; }
  .nav-avatar-name { max-width: 78px; }

  /* 12-Language Dropdown locked inside mobile viewport (LTR + RTL) */
  .lang-drop-menu,
  html[dir="rtl"] .lang-drop-menu {
    position: fixed !important;
    top: var(--nav-drop-top, 96px) !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: calc(100vw - 24px) !important;
    max-height: min(68vh, 430px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 12px;
    border-radius: 18px;
    z-index: 400;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24), 0 0 0 1px rgba(79, 70, 229, 0.14);
  }
  .lang-drop-menu::before { display: none; }
  .lang-drop-menu a,
  .lang-pick-btn {
    min-width: 0;
    padding: 10px 10px;
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 11px;
  }
  .lang-drop-menu a.active,
  .lang-pick-btn.active {
    background: var(--primary-soft);
    border-color: rgba(79, 70, 229, 0.35);
    color: var(--primary);
  }

  /* Credit Summary Popover locked inside mobile viewport (LTR + RTL) */
  .credit-popover,
  html[dir="rtl"] .credit-popover {
    position: fixed !important;
    top: var(--nav-drop-top, 96px) !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: calc(100vw - 24px) !important;
    z-index: 400;
  }

  /* Strict 0px overflow guards across all sections & account cards */
  .mode-tabs { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .hero-slider-pills { flex-wrap: wrap; gap: 6px; }
  .hero-demo-chip { min-width: 0; overflow: hidden; }
  .hero-demo-chip span {
    font-size: 0.68rem; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; max-width: 100%; display: block;
  }
  .ba-slider, .zigzag-row, .pricing-card, .acc-card, .acc-guest-card, .modal-card {
    max-width: 100%; min-width: 0;
  }
  .acc-card { padding: 16px 14px; }
  .acc-delete-row .input-text, .acc-copy-row .input-text { min-width: 0; width: 100%; }
}

@media (max-width: 430px) {
  .brand-badge { display: none; }
  .brand-icon { width: 27px; height: 27px; border-radius: 8px; }
  .brand-text { font-size: 0.96rem; }
  .nav-inner { padding: 8px 10px; gap: 6px; }
  .nav-actions { gap: 5px; }
  .nav-actions .btn,
  .nav-actions .lang-trigger-btn {
    padding: 5px 8px; font-size: 0.74rem; min-height: 34px;
  }
  .lang-drop-menu a, .lang-pick-btn { padding: 9px 8px; font-size: 0.82rem; }
}

/* Dedicated Programmatic Tool & Sector SSR Guide Section (0px Mobile Overflow) */
.ssr-guide-sec { background: #ffffff; border-top: 1px solid #e2e8f0; }
.ssr-guide-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px;
  margin-top: 24px;
}
.ssr-guide-card {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 16px;
  padding: 20px; transition: border-color 0.2s, transform 0.2s;
}
.ssr-guide-card:hover { border-color: #c7d2fe; transform: translateY(-2px); }
.ssr-guide-card h3 { font-size: 1rem; font-weight: 800; color: #0f172a; margin-bottom: 8px; }
.ssr-guide-card p { font-size: 0.9rem; color: #475569; line-height: 1.58; margin: 0; }
.ssr-subhead {
  font-size: 1.15rem; font-weight: 850; color: #0f172a; margin: 34px 0 14px;
  text-align: center;
}
.ssr-steps-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
}
.ssr-step-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px; padding: 16px;
}
.ssr-step-num {
  flex: 0 0 28px; width: 28px; height: 28px; border-radius: 999px;
  background: linear-gradient(135deg, #4f46e5, #2563eb); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.82rem;
}
.ssr-step-item p { margin: 0; font-size: 0.88rem; color: #334155; line-height: 1.52; }
.ssr-faq-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.ssr-faq-item {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px; padding: 14px 18px;
}
.ssr-faq-item summary {
  cursor: pointer; font-weight: 750; font-size: 0.94rem; color: #0f172a; list-style: none;
}
.ssr-faq-item summary::-webkit-details-marker { display: none; }
.ssr-faq-item p { margin: 10px 0 0; font-size: 0.89rem; color: #475569; line-height: 1.6; }
.footer-sector-links a { font-size: 0.82rem; opacity: 0.92; }
.footer-lang-row { opacity: 0.85; font-size: 0.8rem; }
@media (max-width: 820px) {
  .ssr-guide-grid, .ssr-steps-grid { grid-template-columns: 1fr; }
}

/* Live Async Batch Queue Progress Bar */
.batch-progress-wrap {
  width: 100%; max-width: 460px; margin: 16px auto 0; text-align: left;
}
.batch-progress-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 0.84rem; color: var(--text-main); margin-bottom: 7px; flex-wrap: wrap;
}
.batch-progress-meta span {
  color: var(--text-muted); font-size: 0.8rem; max-width: 260px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.batch-progress-track {
  width: 100%; height: 10px; border-radius: 999px; background: #e2e8f0; overflow: hidden;
}
.batch-progress-bar {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #4f46e5, #2563eb, #10b981);
  transition: width 0.35s ease;
}
