:root {
  --bg: #ffffff;
  --surface: #f5f5f7;
  --surface-subtle: #fbfbfd;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --muted-light: #86868b;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.14);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-soft: rgba(0, 113, 227, 0.09);
  --green: #1d7a3e;
  --green-bg: rgba(52, 199, 89, 0.14);
  --amber: #9a5b00;
  --amber-bg: rgba(255, 149, 0, 0.14);
  --red: #c92a2a;
  --red-bg: rgba(255, 59, 48, 0.12);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; font-size: 15px; line-height: 1.55; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
[hidden] { display: none !important; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface); padding: 2px 6px; border-radius: 6px; font-size: 0.88em; color: var(--ink); }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Apple Frosted Topbar */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; }
.brand-logo { width: 30px; height: 30px; display: block; border-radius: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14); flex: none; }
.brand-wordmark {
  display: inline-flex; align-items: baseline;
  font-family: "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 18px; line-height: 1; letter-spacing: -0.04em;
}
.brand-wordmark b { font-weight: 700; color: var(--ink); }
.brand-wordmark span { font-weight: 400; color: var(--muted); }
.brand-sep { width: 1px; height: 14px; background: var(--line-strong); margin: 0 2px; }
.brand-sub { font-size: 12px; font-weight: 500; color: var(--muted-light); letter-spacing: 0.01em; }

.top-nav { display: flex; align-items: center; gap: 18px; }
.nav-link { font-size: 13px; color: var(--muted); font-weight: 500; text-decoration: none !important; padding: 5px 10px; border-radius: 980px; transition: all .15s; }
.nav-link:hover { color: var(--ink); background: var(--surface); }
.nav-link.active { color: var(--ink); background: var(--surface); font-weight: 600; }

/* Template Store Home */
.store-hero { padding: 56px 0 28px; text-align: center; background: linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%); }
.store-hero-inner { max-width: 720px; margin: 0 auto; }
.store-hero h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 600; margin: 0 0 12px; }
.store-section { padding: 12px 0 64px; }
.store-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.cat-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.cat-pill { border: 0; background: var(--surface); color: var(--muted); padding: 6px 14px; border-radius: 980px; font-size: 13px; font-weight: 500; transition: all .15s; }
.cat-pill:hover { color: var(--ink); background: #e8e8ed; }
.cat-pill.active { background: var(--ink); color: #fff; }
.store-tools-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.store-search { width: 180px; height: 32px; border: 1px solid var(--line-strong); border-radius: 980px; padding: 0 13px; font-size: 13px; background: var(--surface-subtle); color: var(--ink); }
.store-search:focus { outline: none; border-color: var(--accent); background: #fff; }

.store-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.tpl-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; cursor: pointer; }
.tpl-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: 0 16px 36px rgba(0, 0, 0, 0.07); }
.tpl-cover { width: 100%; aspect-ratio: 16 / 10; background: var(--surface); border-bottom: 1px solid var(--line); overflow: hidden; display: block; }
.tpl-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.tpl-card:hover .tpl-cover img { transform: scale(1.02); }
.tpl-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.tpl-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.tpl-card-head h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
.tpl-price-pill { font-size: 14px; font-weight: 600; padding: 2px 11px; border-radius: 980px; background: var(--surface); color: var(--ink); flex: none; }
.tpl-price-pill.free { background: var(--green-bg); color: var(--green); }
.tpl-card-tagline { margin: 0 0 14px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.tpl-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }
.tpl-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tpl-tag { font-size: 11px; color: var(--muted); background: var(--surface); padding: 2px 8px; border-radius: 6px; }

.capture-callout { margin-top: 40px; background: var(--surface); border-radius: 20px; padding: 26px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.capture-callout h2 { margin: 0 0 4px; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.capture-callout p { margin: 0; font-size: 14px; color: var(--muted); }

/* Template Detail Live Demo View */
.tpl-sidebar { overflow-y: auto; }
.tpl-info-block { border-top: 1px solid var(--line); padding-top: 14px; }
.tpl-features { margin: 0; padding-left: 17px; font-size: 13px; color: var(--ink); display: flex; flex-direction: column; gap: 7px; }
.tpl-desc { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.65; }
.tpl-demo-note { margin: auto 0 0; font-size: 11px; color: var(--muted-light); background: var(--surface); padding: 10px 12px; border-radius: 10px; line-height: 1.5; }
.demo-canvas { flex: 1; min-height: 0; padding: 18px; display: flex; justify-content: center; overflow: auto; background: var(--surface); }
.demo-frame { width: 100%; height: 100%; min-height: 540px; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 12px 36px rgba(0, 0, 0, 0.09), 0 0 0 1px rgba(0, 0, 0, 0.06); transition: width .22s ease; }
.demo-frame.mobile { width: 390px; max-width: 100%; border-radius: 24px; }
.demo-frame iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }

@media (max-width: 820px) {
  .store-grid { grid-template-columns: 1fr; }
  .demo-canvas { padding: 10px; min-height: 68vh; }
}
.lookup-form { display: flex; gap: 6px; align-items: center; }
.lookup-form input {
  width: 165px; height: 30px; border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 0 10px; font-size: 12px; background: rgba(245, 245, 247, 0.7); color: var(--ink);
  transition: border-color .15s, background .15s;
}
.lookup-form input:focus { outline: none; border-color: var(--accent); background: #fff; }

/* Buttons */
.btn-primary, .btn-secondary, .btn-quiet, .btn-success, .btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 10px; padding: 9px 18px; font-size: 14px; font-weight: 500;
  border: 1px solid transparent; transition: all .15s ease; text-decoration: none !important;
}
.btn-pill { border-radius: 980px; padding: 11px 26px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface); }
.btn-quiet { background: var(--surface); color: var(--ink); }
.btn-quiet:hover { background: #e8e8ed; }
.btn-success { background: #1d1d1f; color: #fff; }
.btn-success:hover { background: #333336; }
.btn-danger { background: var(--red-bg); color: var(--red); }
.btn-xs { padding: 5px 12px; font-size: 12px; border-radius: 980px; }
.submit-btn { width: 100%; height: 44px; font-size: 15px; }

/* Centered Minimalist Hero + Tool Card */
.hero { padding: 64px 0 48px; background: linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%); }
.hero-center { max-width: 760px; margin: 0 auto; text-align: center; }
.hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin: 0 0 14px;
  color: var(--ink);
}
.hero-sub {
  font-size: 17px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 auto 32px;
  max-width: 560px;
  font-weight: 400;
}

.tool-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px 26px;
  text-align: left;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
}

.url-row { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.9fr); gap: 12px; }
.field { margin-bottom: 14px; border: 0; padding: 0; }
.field label { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.opt { float: right; color: var(--muted-light); font-weight: 400; }
.field input:not([type="radio"]), .field textarea, .field select {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 11px;
  padding: 11px 13px; font-size: 15px; color: var(--ink); background: var(--surface-subtle);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input:not([type="radio"]):focus, .field textarea:focus {
  outline: none; background: #fff; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.16);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Apple Segmented Control */
.mode-row { margin-bottom: 16px; }
.segmented {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px;
  background: rgba(118, 118, 128, 0.12);
  padding: 3px; border-radius: 10px;
}
.segmented label { position: relative; margin: 0; cursor: pointer; text-align: center; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: block; padding: 7px 10px; border-radius: 7.5px;
  font-size: 13px; font-weight: 500; color: var(--muted); transition: all .15s;
}
.segmented input:checked + span {
  background: #fff; color: var(--ink); font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12), 0 0.5px 1px rgba(0, 0, 0, 0.06);
}

.crawl-box {
  background: var(--surface); border-radius: 14px;
  padding: 14px 16px 4px; margin-bottom: 16px;
}
.crawl-box input, .crawl-box textarea { background: #fff; }
.advanced summary { font-size: 12px; color: var(--muted); cursor: pointer; margin-bottom: 10px; user-select: none; }

.submit-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 14px; border-top: 1px solid var(--line);
}
.price-inline { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.price-inline-val { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); line-height: 1.2; }
.price-inline-note { font-size: 12px; color: var(--muted); }
.submit-bar .btn-primary { min-width: 136px; height: 42px; font-size: 14px; flex: none; }

.turnstile-wrap { margin-bottom: 12px; }
.hero-footnote { margin: 18px 0 0; font-size: 12px; color: var(--muted-light); }
.form-tip { font-size: 12px; color: var(--muted-light); margin: 10px 0 0; text-align: center; }
.alert-error { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--red-bg); color: var(--red); font-size: 13px; }

/* Sections */
.section { padding: 36px 0 44px; }
.section-compact { padding: 8px 0 56px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-head h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.count-pill { font-size: 12px; font-weight: 500; background: var(--surface); color: var(--muted); padding: 2px 9px; border-radius: 99px; }

/* Jobs Grid */
.jobs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.empty-box {
  background: var(--surface); border-radius: 16px; padding: 36px 24px;
  text-align: center; color: var(--muted); font-size: 14px;
}
.job-card {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.job-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06); }
.job-thumb { border: 0; padding: 0; width: 100%; height: 180px; background: var(--surface); overflow: hidden; display: block; border-bottom: 1px solid var(--line); }
.job-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.job-thumb-placeholder { height: 100%; display: flex; align-items: center; justify-content: center; color: var(--muted-light); font-size: 13px; padding: 16px; text-align: center; }
.job-card-body { padding: 15px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.job-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.job-card-top h3 { margin: 0; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; }
.job-card-url { margin: 3px 0 10px; font-size: 12px; color: var(--muted-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.job-card-actions { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.job-card-actions .price-tag { margin-left: auto; font-weight: 600; color: var(--ink); font-size: 14px; }

.badge { display: inline-block; font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 980px; white-space: nowrap; background: var(--surface); color: var(--muted); }
.badge.running, .badge.queued { background: var(--accent-soft); color: var(--accent); }
.badge.completed, .badge.paid { background: var(--green-bg); color: var(--green); }
.badge.partial, .badge.pending_review { background: var(--amber-bg); color: var(--amber); }
.badge.failed, .badge.rejected, .badge.expired { background: var(--red-bg); color: var(--red); }

.progress-bar { height: 3px; border-radius: 3px; background: var(--surface); overflow: hidden; margin: 4px 0 8px; }
.progress-bar span { display: block; height: 100%; width: 32%; background: var(--accent); animation: slide 1.8s ease-in-out infinite; }
.progress-msg { font-size: 12px; color: var(--muted); margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(350%); } }

/* Clean Horizontal Pricing Strip */
.pricing-strip {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--surface); border-radius: 18px; overflow: hidden;
}
.pricing-item { padding: 24px 26px; display: flex; flex-direction: column; gap: 4px; position: relative; }
.pricing-item + .pricing-item::before { content: ""; position: absolute; left: 0; top: 24px; bottom: 24px; width: 1px; background: var(--line); }
.pricing-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.pricing-item strong { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); line-height: 1.2; margin: 2px 0; }
.pricing-item strong small { font-size: 13px; font-weight: 500; color: var(--muted); }
.pricing-item > small { font-size: 12px; color: var(--muted-light); }

/* Minimal Footer */
.footer { border-top: 1px solid var(--line); padding: 22px 0; font-size: 12px; color: var(--muted-light); background: var(--surface-subtle); }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Full-Page Capture Workbench (macOS Utility Style) */
.workbench-view { display: flex; flex-direction: column; height: calc(100dvh - 54px); min-height: 600px; background: var(--surface); }
.wb-bar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.wb-bar-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.wb-title-block { min-width: 0; }
.wb-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wb-title-row h1 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 380px; }
.wb-url { margin: 1px 0 0; font-size: 12px; color: var(--muted-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 520px; }
.wb-bar-right { display: flex; align-items: center; gap: 8px; flex: none; }

.wb-live-banner { background: #fff; border-bottom: 1px solid var(--line); padding: 9px 20px; }
.wb-live-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--ink); margin-bottom: 7px; }
.wb-live-msg { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.wb-live-metrics { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.wb-live-metrics strong { color: var(--ink); font-weight: 600; margin-left: 3px; }
.wb-live-track { height: 3px; border-radius: 99px; background: var(--surface); overflow: hidden; }
.wb-live-track span { display: block; height: 100%; border-radius: 99px; background: var(--accent); width: 14%; transition: width .35s ease; }

.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; box-shadow: 0 0 0 0 rgba(0, 113, 227, 0.45); animation: pulse 1.6s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(0, 113, 227, 0.5); } 70% { box-shadow: 0 0 0 7px rgba(0, 113, 227, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 113, 227, 0); } }

.wb-workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.wb-sidebar { background: var(--surface-subtle); border-right: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.wb-pages-block { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.wb-pages-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 8px; padding: 0 4px; }
.wb-pages-head strong { background: rgba(0, 0, 0, 0.06); color: var(--ink); padding: 1px 8px; border-radius: 99px; font-size: 11px; }
.wb-pages-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; padding-right: 2px; }
.wb-page-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 10px; padding: 8px 10px; transition: background .12s; animation: fadeInUp .22s ease; }
.wb-page-item:hover { background: rgba(0, 0, 0, 0.04); }
.wb-page-item.active { background: #fff; border-color: var(--line); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05); }
.wb-page-num { font-family: ui-monospace, monospace; font-size: 11px; font-weight: 600; color: var(--muted-light); width: 22px; text-align: center; flex: none; }
.wb-page-item.active .wb-page-num { color: var(--accent); }
.wb-page-info { min-width: 0; flex: 1; }
.wb-page-title { display: block; font-size: 13px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-page-path { display: block; font-size: 11px; color: var(--muted-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-new-tag { font-size: 10px; font-weight: 600; background: var(--green-bg); color: var(--green); padding: 1px 6px; border-radius: 99px; flex: none; }
.wb-page-skeleton { margin-top: 6px; display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 10px; background: rgba(0, 113, 227, 0.06); font-size: 12px; color: var(--accent); }
.wb-side-footer { border-top: 1px solid var(--line); padding-top: 12px; }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.wb-stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); }
.wb-stage-toolbar { background: rgba(255, 255, 255, 0.72); border-bottom: 1px solid var(--line); padding: 8px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.wb-device-switch { width: 148px; }
.wb-device-switch span { padding: 5px 8px; font-size: 12px; }
.wb-stage-path { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 140px; text-align: center; }
.wb-preview-canvas { flex: 1; min-height: 0; overflow: auto; padding: 24px; text-align: center; user-select: none; }
.wb-report-panel { flex: 1; min-height: 0; overflow: auto; padding: 24px; }

.wb-empty-stage { max-width: 480px; margin: 44px auto; text-align: center; }
.wb-empty-stage h3 { margin: 22px 0 6px; font-size: 17px; font-weight: 600; }
.wb-empty-stage p { margin: 0; font-size: 13px; color: var(--muted); }
.wb-mock-browser { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05); }
.wb-mock-bar { height: 30px; border-bottom: 1px solid var(--line); padding: 0 12px; display: flex; align-items: center; gap: 6px; background: var(--surface-subtle); }
.wb-mock-bar i { width: 8px; height: 8px; border-radius: 50%; background: #d2d2d7; }
.wb-mock-bar span { height: 10px; width: 42%; background: #e8e8ed; border-radius: 4px; margin-left: 10px; }
.wb-mock-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.shimmer-line, .shimmer-box, .shimmer-grid i { background: linear-gradient(90deg, #f2f2f5 25%, #e6e6eb 50%, #f2f2f5 75%); background-size: 200% 100%; animation: shimmer 1.6s infinite; border-radius: 6px; }
.shimmer-line { height: 12px; }
.shimmer-line.w-60 { width: 60%; }
.shimmer-line.w-90 { width: 90%; }
.shimmer-box { height: 112px; border-radius: 10px; }
.shimmer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.shimmer-grid i { height: 48px; display: block; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.shot-wrap { position: relative; display: inline-block; max-width: 100%; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 12px 38px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05); }
.shot-wrap.desktop { width: 100%; max-width: 1080px; }
.shot-wrap.desktop.actual-size { width: 1440px; max-width: none; }
.shot-wrap.mobile { width: 390px; max-width: 100%; border-radius: 20px; }
.shot-wrap img { display: block; width: 100%; height: auto; pointer-events: none; }
.watermark { position: absolute; inset: 0; pointer-events: none; background-image: repeating-linear-gradient(-28deg, transparent, transparent 160px, rgba(0, 0, 0, 0.025) 160px, rgba(0, 0, 0, 0.025) 162px); display: flex; align-items: flex-start; justify-content: center; padding-top: 16px; }
.watermark span { background: rgba(29, 29, 31, 0.72); backdrop-filter: blur(8px); color: #fff; font-size: 12px; padding: 5px 13px; border-radius: 980px; }

.unlock-box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 15px; }
.unlock-box.paid { border-color: rgba(52, 199, 89, 0.35); background: #f4fbf6; }
.unlock-box.pending { border-color: rgba(255, 149, 0, 0.35); background: #fffbf4; }
.unlock-box.live { background: #fff; }
.unlock-price { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); line-height: 1.2; margin: 6px 0; }
.unlock-meta { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.unlock-box .submit-btn { border-radius: 980px; height: 38px; font-size: 13px; }

.report-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; max-width: 820px; margin: 0 auto; text-align: left; }
.report-card h3 { margin: 0 0 8px; font-size: 17px; font-weight: 600; }
.report-card h4 { margin: 18px 0 8px; font-size: 14px; font-weight: 600; }
.report-card ul { padding-left: 18px; color: var(--muted); font-size: 13px; }

/* Apple Sheet Modal */
.modal { border: 1px solid var(--line); border-radius: 20px; padding: 0; background: #fff; color: var(--ink); box-shadow: 0 28px 80px rgba(0, 0, 0, 0.22); max-height: 92dvh; }
.modal::backdrop { background: rgba(0, 0, 0, 0.42); backdrop-filter: blur(6px); }
.modal-md { width: min(440px, calc(100vw - 24px)); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.modal-sub { margin: 2px 0 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.code-chip { font-family: ui-monospace, monospace; font-size: 11px; font-weight: 600; background: var(--surface); color: var(--ink); padding: 2px 8px; border-radius: 6px; }
.icon-btn { width: 30px; height: 30px; border: 0; border-radius: 99px; background: var(--surface); font-size: 19px; color: var(--muted); line-height: 1; flex: none; }
.icon-btn:hover { background: #e8e8ed; color: var(--ink); }

/* Pay dialog */
.pay-body { padding: 18px 22px 22px; }
.pay-summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--surface); border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; }
.pay-label { display: block; font-size: 11px; color: var(--muted); }
.pay-amount { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); line-height: 1.15; }
.pay-code-box { text-align: right; }
.pay-code-row { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.pay-code-row code { font-size: 14px; font-weight: 600; background: #fff; padding: 3px 9px; border: 1px solid var(--line); }
.pay-tabs { margin-bottom: 14px; }
.qr-stage { background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-align: center; margin-bottom: 14px; min-height: 210px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.qr-stage img { max-width: 220px; max-height: 300px; width: 100%; height: auto; border-radius: 10px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); }
.qr-hint { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.qr-fallback { font-size: 13px; color: var(--muted); padding: 20px; }

/* Toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: rgba(29, 29, 31, 0.9); backdrop-filter: blur(12px); color: #fff; padding: 9px 18px; border-radius: 980px; font-size: 13px; z-index: 60; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); }

/* Admin Console */
.admin-shell { max-width: 1040px; margin: 0 auto; padding: 28px 20px 64px; }
.capture-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.04); }
.capture-card h2 { margin: 0 0 16px; font-size: 18px; font-weight: 600; }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat-card { background: var(--surface); border-radius: 14px; padding: 16px; }
.stat-card span { display: block; font-size: 12px; color: var(--muted); }
.stat-card strong { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.stat-card.highlight { background: var(--amber-bg); }
.stat-card.highlight strong { color: var(--amber); }
.admin-order { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin-bottom: 12px; }
.admin-order.pending { border: 1.5px solid #ff9500; box-shadow: 0 4px 16px rgba(255, 149, 0, 0.1); }
.admin-order-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.admin-order-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.admin-order-actions button { flex: 1; min-width: 130px; border-radius: 980px; }

@media (max-width: 900px) {
  .url-row { grid-template-columns: 1fr; }
  .pricing-strip { grid-template-columns: 1fr; }
  .pricing-item + .pricing-item::before { left: 24px; right: 24px; top: 0; bottom: auto; width: auto; height: 1px; }
  .workbench-view { height: auto; }
  .wb-workspace { grid-template-columns: 1fr; }
  .wb-sidebar { border-right: 0; border-bottom: 1px solid var(--line); max-height: 440px; }
  .wb-preview-canvas { min-height: 62vh; }
  .wb-stage-path { text-align: left; }
  .top-nav > a { display: none; }
}
@media (max-width: 600px) {
  .hero { padding: 40px 0 32px; }
  .tool-card { padding: 18px; border-radius: 16px; }
  .submit-bar { flex-direction: column; align-items: stretch; }
  .submit-bar .btn-primary { width: 100%; }
  .topbar-inner { height: auto; padding: 10px 0; flex-wrap: wrap; }
  .lookup-form { width: 100%; }
  .lookup-form input { flex: 1; }
  .wb-bar, .wb-live-banner { padding: 10px 14px; }
  .wb-preview-canvas { padding: 12px; }
}

/* Catalog publishing: quiet form surfaces and generous room for real previews. */
.admin-toolbar-actions,.editor-heading,.editor-footer{display:flex;align-items:center;gap:12px}
.editor-heading{justify-content:space-between;align-items:flex-start;margin-bottom:24px}.editor-heading h2{margin:0 0 8px;font-size:24px;letter-spacing:-.6px}
.template-editor{width:min(740px,calc(100vw - 32px));max-height:calc(100dvh - 48px);border:1px solid var(--line);border-radius:20px;padding:28px;color:var(--ink);background:var(--bg);box-shadow:0 24px 80px #0003}
.template-editor::backdrop{background:#0005;backdrop-filter:blur(4px)}
.editor-grid{display:grid;grid-template-columns:1fr 1fr;gap:4px 20px}.editor-wide{grid-column:1/-1}
.template-editor input:not([type=checkbox]),.template-editor select,.template-editor textarea{width:100%;box-sizing:border-box;font:inherit;font-size:14px;line-height:1.5;padding:10px 12px;border:1px solid var(--line-strong);border-radius:10px;background:white;color:var(--ink)}
.template-editor input:disabled{background:var(--surface);color:var(--muted)}.template-editor textarea{resize:vertical}.template-editor small{display:block;margin-top:6px}
.template-upload-field{padding:18px;background:var(--surface);border-radius:12px;margin-bottom:24px}.template-upload-field label{display:block;font-weight:600;margin-bottom:10px}.template-upload-field p{margin-bottom:0}
.template-rights{display:flex;gap:10px;align-items:flex-start;font-size:13px;line-height:1.6;margin:12px 0 20px}.template-rights input{margin-top:5px}.editor-footer{justify-content:flex-end;padding-top:16px;border-top:1px solid var(--line)}
.template-manage-preview{width:180px;aspect-ratio:1.6;object-fit:cover;background:var(--surface);border:1px solid var(--line);border-radius:10px}.template-manage-body{display:flex;gap:20px;align-items:flex-start}.template-manage-info{flex:1;min-width:0}.template-manage-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.template-upload-notice{padding:16px 20px;background:var(--surface);border-radius:12px;margin-bottom:16px;line-height:1.65;font-size:14px}.template-upload-notice p{margin:4px 0}.template-upload-notice button{margin-top:8px}
.template-editor :focus-visible{outline:3px solid var(--accent);outline-offset:3px}
@media(max-width:600px){.template-editor{padding:20px;max-height:calc(100dvh - 24px)}.editor-grid{grid-template-columns:1fr}.editor-wide{grid-column:auto}.template-manage-body{flex-direction:column}.template-manage-preview{width:100%;max-width:320px}.editor-footer .btn-primary{width:100%}.admin-toolbar-actions{flex-wrap:wrap}.editor-heading h2{font-size:21px}}
.editor-heading{position:sticky;top:-28px;z-index:1;background:var(--bg);padding-top:8px;padding-bottom:12px}
@media(max-width:600px){.editor-heading{top:-20px}}
.template-editor .modal-sub{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.6}

/* Discovery keeps the template previews prominent and the controls compact. */
.store-toolbar { align-items: flex-start; margin-bottom: 16px; gap: 20px; }
.cat-pills { flex: 1 1 620px; gap: 8px; }
.cat-pill { font-size: 14px; min-height: 36px; padding: 6px 12px; }
.cat-count { opacity: .75; font-variant-numeric: tabular-nums; margin-left: 4px; }
.store-tools-right { flex: 1 1 100%; justify-content: space-between; }
.store-search { width: min(100%, 360px); height: 42px; border-radius: 10px; font-size: 16px; }
.store-filter-row, .store-filters, .store-empty-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.store-filter-row { justify-content: space-between; }
.store-filters label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.store-filters select { appearance: none; border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 30px 8px 10px; min-height: 40px; color: var(--ink); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%236e6e73' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center; }
.store-results { font-size: 14px; color: var(--muted); margin: 22px 0 16px; }
.store-message { padding: 40px 24px; border-radius: 16px; background: var(--surface); text-align: center; margin: 0 0 24px; }
.store-message h2 { font-size: 21px; margin: 0 0 8px; }
.store-message p { font-size: 16px; color: var(--muted); margin: 0 0 20px; }
.store-empty-actions { justify-content: center; }
.tpl-card { color: var(--ink); text-decoration: none !important; }
.tpl-card-action { color: var(--accent); font-size: 14px; font-weight: 500; }
.tpl-card-tagline, .tpl-features, .tpl-desc { font-size: 14px; }
.tpl-tag { font-size: 12px; }
:is(a, button, select, summary, input):focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.wb-sidebar.tpl-sidebar { overflow-y: auto; }
.tpl-purchase, .tpl-information { display: flex; flex-direction: column; gap: 14px; }
.tpl-facts { margin: 0; font-size: 14px; }
.tpl-facts > div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 6px 0; }
.tpl-facts dt { color: var(--muted); }
.tpl-facts dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.tpl-help summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.tpl-help p, .tpl-help ol { margin-top: 12px; }
.tpl-help ol { padding-left: 20px; font-size: 14px; display: grid; gap: 8px; }
.tpl-demo-note { font-size: 13px; color: var(--muted); }
#tpl-load-state { margin: 24px; }
#tpl-back-btn { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 900px) {
  .wb-sidebar.tpl-sidebar { display: contents; max-height: none; overflow: visible; }
  .tpl-purchase, .tpl-information { padding: 16px; background: var(--surface-subtle); }
  .tpl-purchase { order: 1; }
  #template-view .wb-stage { order: 2; }
  .tpl-information { order: 3; border-top: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .topbar-inner { padding: 12px 20px; }
  .store-hero h1 { text-wrap: balance; }
  #template-view .wb-bar-left { flex-basis: 100%; align-items: flex-start; }
  #template-view .wb-title-row h1 { white-space: normal; font-size: 17px; }
  #template-view .wb-bar-right { width: 100%; justify-content: flex-end; }
  .store-search { width: 100%; }
  .store-tools-right { gap: 12px; }
  .store-filters { width: 100%; gap: 12px; }
  .store-filters label { flex: 1 1 130px; justify-content: space-between; }
  .store-filters select { min-width: 0; flex: 1; font-size: 16px; }
  .store-filters label:last-child { flex-basis: 100%; }
  .store-results { line-height: 1.6; }
  .tpl-card-body { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .tpl-card, .tpl-cover img, .demo-frame, .cat-pill { transition: none; }
  .tpl-card:hover, .tpl-card:hover .tpl-cover img { transform: none; }
}
