:root {
  color-scheme: light;
  --ink: #191814;
  --muted: #6e6a61;
  --line: #ded9cf;
  --ivory: #f7f4ee;
  --paper: #fffefa;
  --gold: #b68a3a;
  --gold-dark: #7a5820;
  --success: #24744b;
  --warning: #a36114;
  --danger: #a13b32;
  --shadow: 0 14px 40px rgba(42, 36, 24, 0.09);
  --radius: 20px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--ivory); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 100% 0%, rgba(182, 138, 58, 0.10), transparent 32rem),
    var(--ivory);
  color: var(--ink);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }

#app-shell { min-height: 100dvh; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top)) 18px 13px;
  background: rgba(247, 244, 238, .92);
  border-bottom: 1px solid rgba(222, 217, 207, .85);
  backdrop-filter: blur(18px);
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--ink);
  color: #f4d590;
  font-family: Georgia, serif;
  font-size: 22px;
}
.brand-mark.large { width: 58px; height: 58px; margin: 0 auto 16px; font-size: 32px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: .15em; }
.brand small { margin-top: 1px; color: var(--muted); font-size: 11px; }
.connection {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 12px;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warning); }
.connection.live .status-dot { background: var(--success); }

main { width: min(920px, 100%); margin: 0 auto; padding: 22px 18px 120px; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 4px 0 22px; }
.page-head h1, .hero h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 500; line-height: 1.03; }
.page-head h1 { font-size: clamp(30px, 7vw, 46px); }
.page-head p { margin: 7px 0 0; color: var(--muted); }
.eyebrow { margin: 0 0 8px; color: var(--gold-dark); font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }

.hero {
  overflow: hidden;
  position: relative;
  padding: 30px;
  border-radius: 28px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
}
.hero::after {
  content: "Z";
  position: absolute;
  right: -18px;
  bottom: -76px;
  color: rgba(244, 213, 144, .08);
  font-family: Georgia, serif;
  font-size: 260px;
  line-height: 1;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { max-width: 550px; font-size: clamp(38px, 10vw, 67px); }
.hero p { max-width: 560px; color: #d6d0c5; line-height: 1.55; }
.hero .primary { margin-top: 9px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0 18px; }
.stat { padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 254, 250, .8); }
.stat strong { display: block; font-family: Georgia, serif; font-size: 26px; }
.stat span { color: var(--muted); font-size: 11px; }

.section-title { display: flex; align-items: center; justify-content: space-between; margin: 25px 0 12px; }
.section-title h2 { margin: 0; font-size: 19px; }
.section-title span { color: var(--muted); font-size: 12px; }
.product-list { display: grid; gap: 11px; }
.product-card {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 5px 20px rgba(42, 36, 24, .04);
}
.product-card[hidden] { display: none; }
.product-card-main { display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 14px; width: 100%; padding: 0; border: 0; background: transparent; color: var(--ink); text-align: left; }
.product-thumb { width: 72px; height: 72px; border-radius: 13px; background: #ebe7df; object-fit: cover; }
.product-card h3 { margin: 0 0 5px; font-size: 14px; }
.product-card p { margin: 0; color: var(--muted); font-size: 12px; }
.chevron { color: var(--gold-dark); font-size: 24px; }
.product-card-actions { display: flex; gap: 6px; margin-top: 10px; padding-top: 9px; border-top: 1px solid #eee9df; }
.product-card-actions button { flex: 1; min-height: 34px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: #faf8f3; color: var(--ink); font-size: 10px; font-weight: 800; }
.product-card-actions .shopify-card-action { border-color: #d8aa56; background: #fff5df; color: #684815; }
.product-card-actions .delete-card-action { flex: 0 0 auto; color: var(--danger); }
.product-card-actions button:disabled { opacity: .42; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; background: #ece9e2; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .05em; }
.badge.UPLOADED { background: #e0f1e8; color: var(--success); }
.badge.GENERATING, .badge.UPLOADING, .badge.QUEUED { background: #fff0d8; color: var(--warning); }
.badge.FAILED { background: #f8e1df; color: var(--danger); }
.badge.REVIEW_REQUIRED { background: #fff0d8; color: var(--warning); }
.badge.MAIN_REVIEW, .badge.SYNC_PENDING { background: #e7edf8; color: #335785; }

.operations-card { display: grid; gap: 14px; margin-bottom: 24px; padding: 17px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 5px 20px rgba(42, 36, 24, .04); }
.operations-card h2 { margin: 0; font-size: 18px; }
.operations-card p:not(.eyebrow) { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.plan-usage-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.plan-usage-counts span { display: grid; gap: 3px; padding: 10px; border-radius: 12px; background: #f7f4ed; color: var(--muted); font-size: 10px; }
.plan-usage-counts strong { color: var(--ink); font-size: 12px; }
.settings-card .plan-usage-card { margin: 14px 0 0; padding: 12px; box-shadow: none; }
.settings-card .plan-usage-card h2 { margin-bottom: 4px; }
@media (max-width: 460px) { .plan-usage-counts { grid-template-columns: 1fr; } }
.export-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.export-actions .ghost { min-height: 39px; padding: 8px 11px; font-size: 11px; }
.department-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.department-summary span { display: grid; gap: 3px; min-width: 0; padding: 9px; border-radius: 11px; background: #f5f1e9; color: var(--muted); font-size: 9px; line-height: 1.25; }
.department-summary strong { color: var(--ink); font-size: 15px; }
.product-filters { display: grid; grid-template-columns: 1fr 180px; gap: 9px; margin-bottom: 11px; }

.primary, .secondary, .ghost, .danger-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 17px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 800;
  text-decoration: none;
}
.primary { background: #d8aa56; color: #1f180d; }
.secondary { border-color: var(--ink); background: var(--ink); color: white; }
.ghost { border-color: var(--line); background: var(--paper); color: var(--ink); }
.danger-button { border-color: #edc3bf; background: #fff6f5; color: var(--danger); }
.wide { width: 100%; }
.text-button { padding: 4px; border: 0; background: transparent; color: var(--gold-dark); font-weight: 800; }

.create-mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: -7px 0 14px; padding: 5px; border: 1px solid var(--line); border-radius: 15px; background: #ebe6dc; }
.create-mode-switch button { min-height: 42px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-weight: 800; }
.create-mode-switch button.active { background: var(--paper); color: var(--ink); box-shadow: 0 3px 12px rgba(42, 36, 24, .08); }

.form-card, .content-card, .settings-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
label { display: grid; gap: 7px; color: #4e4a43; font-size: 13px; font-weight: 700; }
.optional-label { color: var(--muted); font-size: 10px; font-weight: 600; }
label.full { grid-column: 1 / -1; }
input, select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(182, 138, 58, .12); }
textarea { min-height: 100px; resize: vertical; }
.helper { color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.4; }
.visually-hidden { position: fixed !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }

.photo-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.photo-field legend { margin-bottom: 7px; color: #4e4a43; font-size: 13px; font-weight: 700; }
.camera-box {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 280px;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border: 1.5px dashed #b8afa0;
  border-radius: 20px;
  background: #f3efe7;
  color: var(--ink);
  font: inherit;
  text-align: center;
}
.camera-placeholder { padding: 30px; }
.camera-icon { display: block; margin-bottom: 9px; font-size: 42px; }
.camera-box img { width: 100%; height: 100%; max-height: 450px; object-fit: contain; background: white; }
.change-photo { position: absolute; right: 12px; bottom: 12px; padding: 8px 11px; border-radius: 999px; background: rgba(25, 24, 20, .88); color: white; font-size: 11px; font-weight: 800; }
.camera-tip { display: flex; gap: 8px; margin-top: 10px; color: var(--muted); font-size: 11px; }
.bulk-photo-picker { display: grid; width: 100%; min-height: 155px; place-items: center; align-content: center; gap: 5px; padding: 22px; border: 1.5px dashed #b8afa0; border-radius: 20px; background: #f3efe7; color: var(--ink); }
.bulk-photo-picker > span { margin-bottom: 4px; color: var(--gold-dark); font-size: 37px; }
.bulk-photo-picker small { color: var(--muted); }
.bulk-selection-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 15px 2px 10px; font-size: 13px; }
.bulk-photo-grid { display: grid; gap: 10px; }
.bulk-photo-card { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 15px; background: #faf8f3; }
.bulk-photo-card img { width: 112px; height: 112px; border-radius: 11px; background: white; object-fit: contain; }
.bulk-photo-card > div { min-width: 0; }
.bulk-photo-card > div > strong { display: block; margin: 1px 0 8px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.bulk-photo-card label { gap: 4px; font-size: 10px; }
.bulk-photo-card textarea { min-height: 68px; padding: 8px 9px; font-size: 12px; }
.bulk-overrides { margin-top: 8px; border-top: 1px solid var(--line); }
.bulk-overrides summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0 4px; color: var(--gold-dark); cursor: pointer; font-size: 11px; font-weight: 800; }
.bulk-overrides summary small { color: var(--muted); font-size: 9px; }
.bulk-override-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 9px 0 4px; }
.bulk-override-grid label { font-size: 10px; }
.bulk-override-grid input, .bulk-override-grid select { min-height: 40px; padding: 7px 8px; font-size: 11px; }
.bulk-help { display: grid; gap: 4px; margin: 15px 0; padding: 12px 14px; border-radius: 13px; background: #fff6e4; color: #654718; font-size: 12px; }
.bulk-help span { color: #806536; line-height: 1.45; }
.bulk-custom-size { display: grid; grid-column: 1 / -1; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 9px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: #faf8f3; }
.bulk-custom-size[hidden] { display: none; }
.bulk-custom-size > span { padding-bottom: 15px; color: var(--muted); font-weight: 800; }
.bulk-custom-size > p { grid-column: 1 / -1; margin: 0; }
.bulk-progress { margin-top: 12px; padding: 14px; border-radius: 14px; background: var(--ink); color: white; }
.bulk-progress strong, .bulk-progress span { display: block; }
.bulk-progress .progress-track { margin: 9px 0 7px; }
.bulk-progress span { color: #d9d2c6; font-size: 11px; }
.source-dialog { width: min(470px, calc(100% - 28px)); padding: 22px; border: 0; border-radius: 24px; background: var(--paper); box-shadow: 0 30px 90px rgba(0,0,0,.25); }
.source-dialog::backdrop, .image-viewer::backdrop, .shopify-review-dialog::backdrop { background: rgba(16, 15, 13, .76); backdrop-filter: blur(8px); }
.source-dialog h2 { margin: 0; font-family: Georgia, serif; font-weight: 500; }
.source-dialog p { margin: 7px 0 18px; color: var(--muted); }
.source-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.source-option { display: grid; gap: 4px; min-height: 135px; place-items: center; padding: 15px; border: 1px solid var(--line); border-radius: 17px; background: #faf7f0; color: var(--ink); }
.source-option > span { font-size: 34px; }
.source-option small { color: var(--muted); }

.size-panel { margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 17px; background: #fbf8f2; }
.generation-panel { margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 17px; background: #f4f1eb; }
.generation-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 13px; }
.generation-mode-card { position: relative; display: block; }
.generation-mode-card input { position: absolute; opacity: 0; pointer-events: none; }
.generation-mode-card span { display: grid; min-height: 82px; align-content: center; gap: 5px; padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: white; cursor: pointer; }
.generation-mode-card input:checked + span { border-color: var(--gold); background: #fff7e8; box-shadow: 0 0 0 2px rgba(182, 138, 58, .13); }
.generation-mode-card strong { font-size: 12px; }
.generation-mode-card small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.input-with-unit { display: grid; grid-template-columns: 1fr 82px; gap: 7px; }
.size-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.size-heading h2 { margin: 0; font-size: 16px; }
.size-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.size-heading > span { flex: none; padding: 6px 9px; border-radius: 999px; background: var(--ink); color: #f3d692; font-size: 11px; font-weight: 800; }
.size-presets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 14px 0; }
.size-preset { position: relative; display: block; }
.size-preset input { position: absolute; opacity: 0; pointer-events: none; }
.size-preset > span { display: grid; gap: 3px; min-height: 68px; align-content: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px; background: white; cursor: pointer; }
.size-preset input:checked + span { border-color: var(--gold); background: #fff7e8; box-shadow: 0 0 0 2px rgba(182, 138, 58, .13); }
.size-preset strong { font-size: 12px; }
.size-preset small { color: var(--muted); font-size: 10px; }
.size-fields { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 9px; }
.size-fields > span { padding-bottom: 15px; color: var(--muted); font-weight: 800; }
.size-fields input[readonly] { background: #f0ede6; color: #777168; }
.size-fields.custom input { background: white; color: var(--ink); }
.image-count-panel { margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 17px; background: #f6f1e8; }
.image-count-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.image-count-heading h2 { margin: 0; font-size: 16px; }
.image-count-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.image-count-heading output { flex: none; padding: 6px 9px; border-radius: 999px; background: var(--ink); color: #f3d692; font-size: 11px; font-weight: 800; }
.count-controls { display: grid; grid-template-columns: 48px 66px 48px 1fr; align-items: center; gap: 8px; margin: 16px 0 10px; }
.count-step { height: 48px; border: 1px solid var(--line); border-radius: 13px; background: white; color: var(--ink); font-size: 24px; line-height: 1; }
.count-step:active { border-color: var(--gold); background: #fff7e8; }
#image-count { padding-inline: 6px; text-align: center; font-size: 18px; font-weight: 800; }
#image-count-range { min-height: 34px; padding: 0; border: 0; background: transparent; box-shadow: none; accent-color: var(--gold-dark); }
.count-quick { display: flex; flex-wrap: wrap; gap: 7px; }
.count-quick button { min-height: 34px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--muted); font-size: 11px; font-weight: 800; }
.count-quick button.active { border-color: var(--gold); background: #fff7e8; color: var(--gold-dark); box-shadow: 0 0 0 2px rgba(182, 138, 58, .11); }
.shot-plan-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 9px; }
.shot-plan-heading strong { font-size: 13px; }
.shot-plan-heading span { color: var(--muted); font-size: 10px; text-align: right; }
.shot-plan { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.shot-card { position: relative; display: grid; min-width: 0; min-height: 112px; align-content: center; justify-items: center; gap: 4px; padding: 9px 5px 7px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.86); text-align: center; }
.shot-card .shot-number { position: absolute; top: 6px; left: 7px; color: #aaa296; font-size: 9px; font-weight: 800; }
.shot-graphic { display: grid; width: 58px; height: 50px; place-items: center; color: var(--gold-dark); }
.shot-graphic svg { width: 100%; height: 100%; }
.shot-card strong { width: 100%; overflow: hidden; color: #48443d; font-size: 10px; line-height: 1.15; text-overflow: ellipsis; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; }
.toggle-row input { width: 22px; min-height: 22px; }
.form-actions { display: flex; gap: 10px; margin-top: 18px; }

.progress-panel { padding: 22px; border-radius: 20px; background: var(--ink); color: white; }
.progress-panel h2 { margin: 0; font-family: Georgia, serif; font-weight: 500; }
.progress-panel p { color: #ccc5b8; }
.progress-track { height: 9px; overflow: hidden; border-radius: 99px; background: #39362f; }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ad7c2d, #f3d692); transition: width .5s ease; }
.progress-number { display: block; margin-top: 9px; color: #f3d692; font-size: 12px; }

.product-summary { display: flex; align-items: center; gap: 15px; margin-bottom: 18px; }
.product-summary img { width: 92px; height: 92px; border-radius: 18px; object-fit: cover; background: white; border: 1px solid var(--line); }
.product-summary h1 { margin: 0 0 7px; font-family: Georgia, serif; font-size: clamp(26px, 7vw, 42px); font-weight: 500; }
.product-summary p { margin: 0; color: var(--muted); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 9px; margin: 15px 0 20px; }
.shopify-product-action { position: sticky; bottom: 76px; z-index: 22; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 14px 0 18px; padding: 13px 14px; border: 1px solid #e3c37e; border-radius: 16px; background: rgba(255, 249, 234, .97); box-shadow: 0 12px 34px rgba(42, 36, 24, .16); backdrop-filter: blur(14px); }
.shopify-product-action.ready { border-color: #b9d9c7; background: rgba(242, 251, 246, .97); }
.shopify-product-action > div { min-width: 0; }
.shopify-product-action strong, .shopify-product-action small { display: block; }
.shopify-product-action strong { margin-bottom: 3px; font-size: 13px; }
.shopify-product-action small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.shopify-product-action button, .shopify-product-action a { flex: none; min-height: 44px; }
.warning { padding: 12px 14px; border-left: 4px solid var(--warning); border-radius: 10px; background: #fff4df; color: #6c461a; font-size: 13px; }
.error-box { padding: 12px 14px; border-left: 4px solid var(--danger); border-radius: 10px; background: #fff0ef; color: #742e28; font-size: 13px; }

.image-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.image-card { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--paper); }
.image-preview { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #eeeae2; }
.image-card img { display: block; width: 100%; max-height: 360px; object-fit: contain; background: #eeeae2; }
.zoom-hint { position: absolute; right: 9px; bottom: 9px; display: grid; width: 31px; height: 31px; place-items: center; border-radius: 50%; background: rgba(25, 24, 20, .82); color: white; font-size: 17px; }
.image-card footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 10px; }
.image-card strong { font-size: 12px; }
.image-card button { border: 0; background: transparent; color: var(--gold-dark); font-size: 11px; font-weight: 800; }

.content-card { margin-top: 16px; }
.content-card h2 { margin: 0; font-family: Georgia, serif; font-weight: 500; }
.content-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.content-card-heading .eyebrow { margin-bottom: 3px; font-size: 9px; }
.content-card-heading > span { color: var(--muted); font-size: 11px; }
.content-heading-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 7px; }
.content-heading-actions .ghost, .content-heading-actions .secondary { min-height: 38px; padding: 8px 11px; border-radius: 11px; font-size: 11px; }
.content-lock-note { margin: -4px 0 16px; padding: 10px 12px; border-radius: 10px; background: #f0eee9; color: var(--muted); font-size: 11px; }
.content-card .field-preview { margin-bottom: 15px; }
.field-preview small { display: block; margin-bottom: 4px; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.field-preview p { margin: 0; line-height: 1.5; }
.description-preview { line-height: 1.55; color: #46423c; }
.description-preview ul { padding-left: 20px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-list span { padding: 6px 9px; border: 1px solid #e2d7c2; border-radius: 999px; background: #fff8ea; color: #76551f; font-size: 11px; font-weight: 750; }
.media-seo-details { margin-top: 18px; border: 1px solid var(--line); border-radius: 15px; background: #faf8f3; }
.media-seo-details summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 14px; cursor: pointer; font-size: 13px; font-weight: 800; }
.media-seo-details summary small { color: var(--muted); font-size: 10px; font-weight: 600; }
.media-seo-list { display: grid; gap: 8px; padding: 0 10px 10px; }
.media-seo-row { min-width: 0; padding: 11px; border-radius: 11px; background: white; }
.media-seo-row strong { display: block; margin-bottom: 5px; font-size: 12px; }
.media-seo-row code { display: block; overflow-wrap: anywhere; color: var(--gold-dark); font-size: 10px; }
.media-seo-row p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.editor-grid .full { grid-column: 1 / -1; }
.editor-field { display: grid; gap: 7px; color: #4e4a43; font-size: 13px; font-weight: 700; }
.editor-field > label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.editable-note { color: var(--gold-dark); font-size: 10px; font-weight: 800; }
.tag-editor-list { display: flex; flex-wrap: wrap; gap: 7px; min-height: 50px; padding: 9px; border: 1px solid var(--line); border-radius: 13px; background: #faf8f3; }
.editable-tag { display: inline-flex; max-width: 100%; align-items: center; overflow: hidden; border: 1px solid #e2d7c2; border-radius: 999px; background: #fff8ea; }
.editable-tag input { width: auto; max-width: calc(100vw - 130px); min-height: 34px; padding: 6px 2px 6px 10px; border: 0; border-radius: 0; background: transparent; color: #76551f; font-size: 11px; font-weight: 750; }
.editable-tag input:focus { box-shadow: none; }
.editable-tag button { width: 32px; min-height: 34px; flex: none; padding: 0; border: 0; background: transparent; color: #9a6b27; font-size: 19px; line-height: 1; }
.editable-tag:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(182, 138, 58, .12); }
.tag-add-row { display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.tag-add-row .ghost { min-height: 48px; padding: 9px 14px; }
.description-editor { min-height: 260px; font-family: inherit; font-size: 13px; line-height: 1.6; }
.alt-editor-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin: 22px 0 10px; }
.alt-editor-heading h3 { margin: 0; font-size: 15px; }
.alt-editor-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.alt-editor-heading > span { flex: none; padding: 5px 8px; border-radius: 999px; background: #f0ede7; color: var(--muted); font-size: 10px; font-weight: 800; }
.alt-editor-list { display: grid; gap: 9px; }
.alt-editor-list label { padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: #faf8f3; }
.alt-editor-list textarea { min-height: 76px; font-size: 12px; }
.alt-editor-list small { overflow-wrap: anywhere; color: var(--gold-dark); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; font-weight: 500; }
.ai-revision-request { margin-top: 18px; padding: 13px; border: 1px solid #e6d4af; border-radius: 13px; background: #fff8ea; }
.ai-revision-request textarea { min-height: 76px; }
.content-editor-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.facts-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.facts-summary > div { display: grid; gap: 4px; min-width: 0; padding: 11px; border-radius: 12px; background: #faf8f3; }
.facts-summary small { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.facts-summary strong { overflow-wrap: anywhere; font-size: 12px; line-height: 1.4; }
.visual-analysis-summary { margin: 12px 0 0; padding: 12px; border-left: 3px solid var(--gold); border-radius: 8px; background: #fffaf0; color: #5c5345; font-size: 12px; line-height: 1.55; }
.variant-summary { display: grid; gap: 6px; margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #faf8f3; font-size: 11px; }
.variant-summary > strong { margin-bottom: 2px; }
.variant-summary span { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); }
.variant-summary code { color: var(--gold-dark); }

.bulk-control-card { margin: 0 0 18px; padding: 18px; border: 1px solid #d9c69f; border-radius: 20px; background: linear-gradient(145deg, #fffdf8, #f4ead7); box-shadow: var(--shadow); }
.bulk-control-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.bulk-control-heading h2 { margin: 0 0 5px; font-family: Georgia, serif; font-size: 24px; font-weight: 500; }
.bulk-control-heading p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.bulk-control-heading > span { flex: none; padding: 6px 9px; border-radius: 999px; background: var(--ink); color: #f3d692; font-size: 10px; font-weight: 800; }
.bulk-control-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.bulk-control-actions button { min-height: 38px; padding: 8px 11px; border-radius: 11px; font-size: 11px; }
.bulk-shopify-progress { margin-top: 12px; padding: 10px 12px; border-radius: 11px; background: rgba(255,255,255,.72); color: var(--muted); font-size: 11px; line-height: 1.45; }

.product-select-control { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.7); color: var(--muted); font-size: 10px; font-weight: 800; }
.product-select-control input { width: 17px; min-height: 17px; margin: 0; accent-color: var(--gold-dark); }
.product-select-control > span { flex: none; }
.readiness-pill { margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.readiness-pill.ready { color: #26734d; }
.readiness-pill.blocked { color: #a33d36; }

.readiness-card { margin: 16px 0; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: #fffdf8; }
.readiness-card.ready { border-color: #b9d8c6; background: #f5fbf7; }
.readiness-card.blocked { border-color: #e9c5c0; background: #fff9f8; }
.readiness-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.readiness-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.readiness-heading > span { flex: none; padding: 5px 8px; border-radius: 999px; background: var(--ink); color: #f3d692; font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.readiness-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.readiness-check { display: grid; grid-template-columns: 25px 1fr; gap: 8px; min-width: 0; padding: 10px; border-radius: 11px; background: white; }
.readiness-check > span { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; color: white; font-size: 12px; font-weight: 900; }
.readiness-check.pass > span { background: #26845a; }
.readiness-check.warning > span { background: #c88725; }
.readiness-check.block > span { background: var(--danger); }
.readiness-check strong, .readiness-check small { display: block; }
.readiness-check strong { margin-bottom: 2px; font-size: 11px; }
.readiness-check small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.readiness-note { margin: 11px 0 0; color: #7a5b28; font-size: 10px; }

.shopify-review-dialog { width: min(720px, calc(100% - 28px)); max-height: min(90dvh, 900px); padding: 0; overflow: auto; border: 0; border-radius: 24px; background: var(--paper); box-shadow: 0 35px 100px rgba(0,0,0,.38); }
#shopify-review-content { padding: 22px; }
.shopify-review-head { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.shopify-review-head h2, .shopify-review-loading h2 { margin: 0; font-family: Georgia, serif; font-size: 28px; font-weight: 500; }
.shopify-review-head p:not(.eyebrow), .shopify-review-loading p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.shopify-review-head .viewer-close { flex: none; width: 40px; height: 40px; border-color: var(--line); background: white; color: var(--ink); }
.shopify-review-loading { display: grid; min-height: 260px; align-content: center; justify-items: center; gap: 10px; text-align: center; }
.shopify-review-loading .brand-mark { width: 48px; height: 48px; }
.review-summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 12px; }
.review-summary-grid > div { display: grid; gap: 4px; min-width: 0; padding: 11px; border-radius: 11px; background: #f5f2eb; }
.review-summary-grid small { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.review-summary-grid strong { overflow-wrap: anywhere; font-size: 11px; line-height: 1.4; }
.review-check-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.review-check { display: grid; grid-template-columns: 25px 1fr; gap: 8px; min-width: 0; padding: 10px; border: 1px solid transparent; border-radius: 11px; background: white; }
.review-check > span { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; color: white; font-size: 12px; font-weight: 900; }
.review-check.pass { border-color: #d5e8dc; }
.review-check.pass > span { background: #26845a; }
.review-check.warning { border-color: #edddbd; }
.review-check.warning > span { background: #c88725; }
.review-check.block { border-color: #efceca; }
.review-check.block > span { background: var(--danger); }
.review-check strong { display: block; font-size: 11px; }
.review-check p { margin: 3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.4; }
.draft-safety-note { margin: 14px 0 0; padding: 12px 13px; border-left: 3px solid #26845a; border-radius: 9px; background: #f1f8f4; color: #285e45; font-size: 11px; line-height: 1.5; }
.shopify-review-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.shopify-review-actions button { min-height: 44px; }

.settings-grid { display: grid; gap: 12px; }
.settings-card h2 { margin: 0 0 8px; font-size: 17px; }
.settings-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.setting-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.empty { padding: 35px 20px; border: 1px dashed #beb6a8; border-radius: 18px; text-align: center; color: var(--muted); }
.empty strong { display: block; margin-bottom: 7px; color: var(--ink); }

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 7px 18px max(9px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 254, 250, .95);
  backdrop-filter: blur(18px);
}
.bottom-nav button { display: grid; place-items: center; gap: 2px; padding: 5px; border: 0; background: transparent; color: #827d73; font-size: 10px; }
.bottom-nav button.active { color: var(--ink); }
.nav-icon { font-size: 22px; line-height: 1; }
.nav-plus { display: grid; width: 42px; height: 42px; margin-top: -27px; place-items: center; border-radius: 50%; background: var(--ink); color: #f3d692; box-shadow: 0 8px 22px rgba(25, 24, 20, .25); font-size: 25px; }

.toast { position: fixed; right: 18px; bottom: 96px; z-index: 80; max-width: 360px; padding: 12px 15px; border-radius: 12px; background: var(--ink); color: white; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(15px); transition: .25s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.login-dialog { width: min(430px, calc(100% - 32px)); padding: 28px; border: 0; border-radius: 24px; box-shadow: 0 30px 90px rgba(0,0,0,.24); }
.login-dialog::backdrop { background: rgba(24, 22, 18, .64); backdrop-filter: blur(10px); }
.login-dialog h2, .login-dialog p { text-align: center; }
.login-dialog p { color: var(--muted); }

.legal-footer { display: flex; justify-content: center; gap: 20px; padding: 18px 20px calc(92px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 13px; }
.legal-footer a { color: inherit; }
.legal-page { width: min(820px, calc(100% - 32px)); margin: 36px auto 80px; }
.legal-page h1 { font: 48px/1.02 var(--display); margin: 8px 0 18px; }
.legal-page h2 { margin-top: 30px; }
.legal-page p, .legal-page li { color: var(--muted); line-height: 1.7; }
.legal-page .legal-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: clamp(22px, 5vw, 42px); }
.legal-back { display: inline-block; margin-bottom: 20px; color: var(--gold-dark); font-weight: 800; }
.form-error { min-height: 18px; color: var(--danger) !important; font-size: 12px; }

.image-viewer { width: min(1400px, calc(100vw - 32px)); height: min(94dvh, 1000px); padding: 0; overflow: hidden; border: 0; border-radius: 24px; background: #111; color: white; box-shadow: 0 35px 100px rgba(0,0,0,.45); }
.image-viewer form { position: absolute; z-index: 2; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); }
.viewer-close { display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; background: rgba(0,0,0,.68); color: white; font-size: 30px; line-height: 1; }
.image-viewer figure { display: grid; width: 100%; height: 100%; margin: 0; grid-template-rows: 1fr auto; }
.image-viewer img { width: 100%; height: 100%; min-height: 0; object-fit: contain; touch-action: pinch-zoom; }
.image-viewer figcaption { min-height: 44px; padding: 12px 70px 12px 16px; overflow: hidden; color: #ddd; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

@media (min-width: 720px) {
  main { padding-top: 34px; }
  .image-grid { grid-template-columns: repeat(3, 1fr); }
  .product-list { grid-template-columns: 1fr 1fr; }
  .bottom-nav { left: 50%; right: auto; width: 420px; transform: translateX(-50%); bottom: 14px; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
}

@media (max-width: 520px) {
  .form-grid { grid-template-columns: 1fr; }
  .editor-grid { grid-template-columns: 1fr; }
  .editor-grid .full { grid-column: auto; }
  label.full { grid-column: auto; }
  .hero { padding: 25px 22px; }
  .stats { gap: 7px; }
  .stat { padding: 12px 10px; }
  .stat strong { font-size: 22px; }
  .page-head .ghost { display: none; }
  .source-options { grid-template-columns: 1fr; }
  .source-option { min-height: 105px; }
  .size-presets { grid-template-columns: 1fr; }
  .count-controls { grid-template-columns: 48px 1fr 48px; }
  #image-count-range { grid-column: 1 / -1; }
  .shot-plan { grid-template-columns: repeat(2, 1fr); }
  .bulk-photo-card { grid-template-columns: 82px 1fr; }
  .bulk-photo-card img { width: 82px; height: 82px; }
  .bulk-photo-card textarea { min-height: 58px; }
  .bulk-custom-size { grid-template-columns: 1fr auto 1fr; }
  .generation-modes { grid-template-columns: 1fr; }
  .product-filters { grid-template-columns: 1fr; }
  .bulk-override-grid { grid-template-columns: 1fr; }
  .content-card-heading { align-items: start; }
  .content-heading-actions { max-width: 145px; }
  .content-editor-actions > button { width: 100%; }
  .shopify-product-action { bottom: calc(72px + env(safe-area-inset-bottom)); }
  .shopify-product-action button, .shopify-product-action a { max-width: 48%; padding-right: 13px; padding-left: 13px; font-size: 11px; text-align: center; }
  .bulk-control-heading { display: grid; }
  .bulk-control-heading > span { justify-self: start; }
  .bulk-control-actions button { flex: 1 1 calc(50% - 7px); }
  .readiness-checks { grid-template-columns: 1fr; }
  .review-summary-grid { grid-template-columns: 1fr 1fr; }
  .review-check-list { grid-template-columns: 1fr; }
  .shopify-review-dialog { width: 100vw; max-height: 100dvh; min-height: 100dvh; border-radius: 0; }
  #shopify-review-content { padding: 20px 17px max(24px, env(safe-area-inset-bottom)); }
  .shopify-review-actions { position: sticky; bottom: 0; margin: 18px -17px -24px; padding: 12px 17px max(14px, env(safe-area-inset-bottom)); background: rgba(255,254,250,.96); box-shadow: 0 -8px 24px rgba(25,24,20,.08); backdrop-filter: blur(12px); }
  .shopify-review-actions button { flex: 1 1 100%; }
  .image-viewer { width: 100vw; height: 100dvh; max-width: none; max-height: none; border-radius: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}


/* Photo-first creation: native, keyboard-accessible progressive disclosure. */
.create-details { margin: 14px 0; border: 1px solid var(--line); border-radius: 14px; padding: 0 16px; background: #faf8f3; }
.create-details > summary { padding: 16px 0; cursor: pointer; font-size: 14px; font-weight: 700; }
.create-details > summary small { display: block; margin: 6px 0 0 18px; color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.4; }
.create-details[open] { padding-bottom: 16px; }
.create-details > .form-grid { margin-top: 14px; }
.create-details.secondary-details { background: white; }
.create-details summary:focus-visible { outline: 2px solid var(--gold-dark); outline-offset: 4px; border-radius: 4px; }

/* Keep production status visible on the product list. */
.product-card-progress { padding: 2px 18px 14px; }
.product-card-progress > div:first-child { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.product-card-progress p, .product-card-stage { font-size: 12px; color: var(--muted); line-height: 1.5; }
.product-card-stage { margin: 0; padding: 0 18px 12px; }
.product-card-progress .progress-track { margin-top: 8px; }
.plain-description { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
