:root {
  --paper: #f6f5f2;
  --surface: #ffffff;
  --ink: #191816;
  --ink-soft: #4b4740;
  --muted: #7a746a;
  --line: #e3dfd6;
  --line-strong: #cec7b9;
  --accent: #8a5a3f;
  --accent-soft: #f2ebe4;
  --danger: #91402f;
  --disabled-ink: #98907f;
  --disabled-surface: #f1efe9;
  --sans: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, monospace;
  --shell: 1160px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -.02em; }
h1 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -.03em; }
h2 { font-size: 19px; }
h3 { font-size: 15px; }
p { margin: 0; }
a { color: inherit; }

button, input, textarea { font: inherit; color: inherit; }

/* ---------- primitives ---------- */

.label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.muted { color: var(--muted); }
.helper { font-size: 13px; color: var(--muted); }
.hidden { display: none !important; }
body.lightbox-open { overflow: hidden; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -60px; left: 16px; z-index: 20;
  background: var(--ink); color: var(--paper); padding: 10px 14px;
}
.skip-link:focus { top: 12px; }

button {
  cursor: pointer;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #faf9f6;
  padding: 11px 20px;
  border-radius: 2px;
  min-height: 42px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -.005em;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .12s var(--ease);
}
button:hover:not(:disabled) { background: #33302b; border-color: #33302b; }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled {
  cursor: not-allowed;
  background: var(--disabled-surface);
  border-color: var(--line);
  color: var(--disabled-ink);
}

.button-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.button-secondary:hover:not(:disabled) {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.text-button {
  background: transparent;
  border: 0;
  padding: 4px 0;
  min-height: 32px;
  color: var(--ink-soft);
  font-size: 13.5px;
}
.text-button:hover:not(:disabled) {
  background: transparent;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.account .text-button[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

:is(button, input, textarea, a, .dropzone):focus-visible {
  outline: 1.5px solid var(--accent);
  outline-offset: 2px;
}

.field { margin-top: 20px; }
label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 7px;
}

input:not([type=file]), textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: 2px;
  padding: 11px 13px;
  font-size: 15px;
  min-height: 44px;
  transition: border-color .2s var(--ease);
}
input:not([type=file]):hover, textarea:hover { border-color: #b8b0a1; }
input:not([type=file]):focus, textarea:focus { border-color: var(--ink); outline-offset: 1px; }
input::placeholder, textarea::placeholder { color: #a8a196; }
textarea { resize: vertical; line-height: 1.6; }

/* ---------- chrome ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 8;
  background: rgba(246, 245, 242, .86);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--shell);
  margin: 0 auto;
  min-height: 62px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.02em;
}
.brand-mark { width: 21px; height: 21px; color: var(--accent); }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-word-light { font-weight: 400; color: var(--muted); }
.account { display: flex; align-items: center; gap: 20px; }
.account-email { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

.shell { max-width: var(--shell); margin: 0 auto; padding: 46px 32px 120px; }

.message {
  position: sticky;
  top: 78px;
  z-index: 7;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-left: 2px solid var(--accent);
  border-radius: 2px;
  padding: 12px 16px;
  margin-bottom: 26px;
  font-size: 13.5px;
}
.message.error { border-left-color: var(--danger); color: var(--danger); }

/* ---------- sign in ---------- */

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .82fr);
  gap: 72px;
  align-items: center;
  padding: 40px 0 60px;
}
.auth-form-side { max-width: 420px; }
.auth h1 { margin: 14px 0 16px; }
.lede { color: var(--ink-soft); font-size: 16px; max-width: 42ch; }
.auth form { margin-top: 30px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.auth-plate {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfaf7, #f1eee7);
  border-radius: 2px;
  padding: 40px 40px 26px;
  color: var(--accent);
}
.auth-plate svg { width: 100%; height: auto; display: block; color: #b08a6d; }
.plate-caption {
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- overview ---------- */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.page-head h1 { margin-top: 10px; }
.page-head-note { color: var(--muted); font-size: 13.5px; max-width: 30ch; text-align: right; }

.composer { padding: 30px 0 28px; border-bottom: 1px solid var(--line); }
.composer-title {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.composer-row { display: flex; gap: 10px; align-items: stretch; }
.composer-row .autocomplete { flex: 1; min-width: 0; }
.composer-row input { min-height: 46px; }
.composer-row button { min-height: 46px; white-space: nowrap; }
.composer .helper { min-height: 18px; margin-top: 10px; }

.autocomplete { position: relative; }
.suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  z-index: 6;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  box-shadow: 0 18px 40px -22px rgba(40, 33, 22, .45);
  overflow: hidden;
}
.suggestions button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--ink);
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  min-height: 46px;
  font-weight: 400;
  padding: 12px 14px;
}
.suggestions button:last-child { border-bottom: 0; }
.suggestions button:hover { background: var(--accent-soft); }

.rule-head { padding: 34px 0 14px; }
.rule-head h2 {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.listing-list { border-top: 1px solid var(--line); }
.listing-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 24px;
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 20px 0;
  min-height: 62px;
  font-weight: 400;
}
.listing-link:hover:not(:disabled) { background: transparent; color: var(--accent); }
.listing-link .listing-address {
  font-size: 16px;
  letter-spacing: -.015em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.listing-link .listing-meta { font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.listing-link .listing-arrow { color: var(--line-strong); font-size: 13px; transition: transform .2s var(--ease), color .2s var(--ease); }
.listing-link:hover .listing-arrow { color: var(--accent); transform: translateX(3px); }
.empty-note { padding: 26px 0; color: var(--muted); font-size: 14px; border-bottom: 1px solid var(--line); }

/* ---------- listing detail ---------- */

.back { margin-bottom: 26px; }
.detail-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.detail-head h1 { margin: 10px 0 8px; max-width: 26ch; text-wrap: balance; }
.detail-location { color: var(--muted); font-size: 14px; }
.detail-tools { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.danger-button, .danger-text { color: var(--danger) !important; }
.cost { font-family: var(--mono); font-size: 11.5px; color: var(--muted); text-align: right; white-space: nowrap; }

.step { padding: 44px 0; border-bottom: 1px solid var(--line); }
.step-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}
.step-title { display: flex; gap: 18px; }
.step-index {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--line-strong);
  padding-top: 4px;
  min-width: 22px;
}
.step-note { color: var(--muted); font-size: 13.5px; margin-top: 6px; max-width: 54ch; }
.step-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.action-lock { align-self: center; }

.dropzone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-left: 40px;
  border: 1px dashed var(--line-strong);
  border-radius: 2px;
  background: transparent;
  padding: 22px 24px;
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.dropzone:hover { border-color: #b8b0a1; }
.dropzone.dragging { border-color: var(--accent); background: var(--accent-soft); }
.drop-body { display: flex; flex-direction: column; gap: 3px; }
.drop-body strong { font-size: 15px; font-weight: 500; letter-spacing: -.01em; }
.upload-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.upload-actions button { min-height: 38px; padding: 8px 14px; font-size: 13px; position: relative; z-index: 1; }

.count { font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* ---------- photographs ---------- */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px 22px;
  margin: 36px 0 0 40px;
}
.photo-card { min-width: 0; display: flex; flex-direction: column; }
.photo-preview, .compare {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #ece8e0;
  border: 1px solid var(--line);
}
.photo-preview > img, .compare img { display: block; width: 100%; height: 100%; object-fit: cover; }
.preview-shimmer { position: absolute; inset: 0; z-index: 3; background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,.55) 45%, transparent 65%); animation: shimmer 1.25s infinite; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .preview-shimmer { background: rgba(255,255,255,.28); } }

.compare .after { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--reveal, 50%)); }
.compare-line {
  position: absolute; left: var(--reveal, 50%); top: 0; bottom: 0;
  width: 1px; background: rgba(255, 255, 255, .9);
  box-shadow: 0 0 0 1px rgba(25, 24, 22, .18);
  transform: translateX(-.5px); pointer-events: none;
}
.compare-label {
  position: absolute; top: 10px;
  padding: 4px 7px;
  background: rgba(250, 249, 246, .92);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  pointer-events: none;
}
.compare-label.before { left: 10px; }
.compare-label.after-label { right: 10px; }
.ai-watermark {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 4px 7px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 2px;
  background: rgba(25, 24, 22, .58);
  color: rgba(255,255,255,.9);
  font-size: 9px;
  line-height: 1.2;
  letter-spacing: .04em;
  white-space: nowrap;
  pointer-events: none;
}
.compare-watermark {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 10px;
}
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; }
.compare-handle {
  position: absolute; left: var(--reveal, 50%); top: 50%;
  transform: translate(-50%, -50%);
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: rgba(250, 249, 246, .95);
  border-radius: 100px;
  color: var(--ink);
  font-size: 10px;
  letter-spacing: .08em;
  pointer-events: none;
}
.image-expand {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  width: 36px;
  min-height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 999px;
  background: rgba(25,24,22,.72);
  color: #fff;
  font-size: 19px;
  line-height: 1;
  opacity: .9;
}
.image-expand:hover:not(:disabled) { background: var(--ink); border-color: #fff; }

.photo-details { padding-top: 12px; display: flex; flex-direction: column; flex: 1; }
.photo-topline { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.photo-details h3 {
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.status::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 100px;
  background: var(--line-strong);
}
.status.is-approved::before, .status.is-edited::before { background: #5c7a52; }
.status.is-rejected { color: var(--danger); }
.status.is-rejected::before { background: var(--danger); }
.status.is-ok { color: #4e6b45; }
.status.is-ok::before { background: #5c7a52; }
.status.is-ko { color: var(--danger); }
.status.is-ko::before { background: var(--danger); }

.photo-note {
  font-size: 12.5px;
  text-wrap: pretty;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 6px;
  min-height: 34px;
}
.qa-retry { margin-top: 10px; padding: 10px 12px; border-left: 2px solid var(--danger); background: #fbf0ed; color: var(--danger); font-size: 12px; line-height: 1.45; animation: rise-in .35s var(--ease) both; }
.qa-retry strong { display: block; font-weight: 600; margin-bottom: 2px; }
.qa-retouching { margin-top: 10px; color: var(--accent); font-size: 12px; display: flex; align-items: center; gap: 7px; }
.sparkle { display: inline-block; animation: sparkle 1.2s ease-in-out infinite; }

.rating-row { display: flex; align-items: center; gap: 8px; margin: 12px 0 14px; }
.rating-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 2px;
}
.rating {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  min-height: 28px;
  min-width: 54px;
  padding: 3px 10px;
  font-size: 11.5px;
  border-radius: 2px;
}
.rating:hover:not(:disabled) { background: transparent; border-color: var(--ink); color: var(--ink); }
.rating[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.photo-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.photo-actions button {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  min-height: 24px;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 400;
}
.photo-actions button:hover:not(:disabled) {
  background: transparent;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.feedback-form { margin-top: 14px; }
.feedback-form label { font-size: 11.5px; }
.feedback-form textarea { font-size: 13.5px; min-height: 84px; }
.feedback-form button { margin-top: 10px; min-height: 36px; padding: 8px 14px; font-size: 13px; }

/* ---------- description, video, activity ---------- */

.description-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.75;
  max-width: 68ch;
  margin-left: 40px;
  color: var(--ink-soft);
}
.description-text.muted { color: var(--muted); }
.description-writing { margin: 28px 0 30px 40px; max-width: 700px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.writing-status { display: flex; align-items: center; gap: 9px; color: var(--ink-soft); font-size: 14px; }
.writing-sparkle { color: var(--accent); animation: sparkle 1.2s ease-in-out infinite; }
.writing-cursor { width: 1px; height: 17px; background: var(--accent); animation: cursor-blink .85s steps(2, start) infinite; }
.writing-lines { display: grid; gap: 10px; margin-top: 18px; }
.writing-lines span { position: relative; display: block; height: 10px; width: 100%; overflow: hidden; background: #eeeae3; border-radius: 2px; }
.writing-lines span:nth-child(2) { width: 91%; }
.writing-lines span:nth-child(3) { width: 97%; }
.writing-lines span:nth-child(4) { width: 72%; }
.writing-lines span::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,.85) 48%, transparent 70%); animation: shimmer 1.35s infinite; }
.description-change-toggle { margin: 18px 0 0 40px; }
.review-area, .step > .field, .step > .step-actions { margin-left: 40px; }
.step > .field { max-width: 560px; }
.review-area { margin-top: 20px; }

.video-output { margin-left: 40px; }
.video-output video { display: block; width: 100%; max-width: 640px; border: 1px solid var(--line); }
.video-output a { color: var(--accent); text-underline-offset: 4px; }
.video-output p { margin-top: 12px; font-size: 13px; }
.video-options { display: flex; align-items: center; gap: 12px; margin: 18px 40px 0; max-width: 640px; }
.video-options label { color: var(--ink-soft); font-size: 12px; }
.video-options select { min-height: 38px; padding: 8px 30px 8px 10px; border: 1px solid var(--line); border-radius: 2px; background: var(--paper); color: var(--ink); font: inherit; }
.video-progress { margin: 18px 40px 0; max-width: 640px; padding: 16px 18px; border: 1px solid var(--line); background: linear-gradient(115deg, #f8f5ef, #fff 45%, #f8f5ef); background-size: 220% 100%; animation: video-sheen 2.6s ease-in-out infinite; }
.video-progress-head { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 13px; }
.video-sparkle { color: var(--accent); animation: sparkle-pulse 1.4s ease-in-out infinite; }
.video-progress-dots { letter-spacing: .2em; animation: dots-blink 1.2s steps(3, end) infinite; }
.video-progress-track { height: 3px; margin-top: 13px; overflow: hidden; background: #e5dfd4; }
.video-progress-track span { display: block; width: 42%; height: 100%; background: var(--accent); animation: video-progress 1.8s ease-in-out infinite; }
@keyframes video-sheen { 0%,100% { background-position: 0 0; } 50% { background-position: 100% 0; } }
@keyframes video-progress { 0% { transform: translateX(-120%); } 100% { transform: translateX(340%); } }
@keyframes sparkle-pulse { 0%,100% { opacity: .45; transform: scale(.85) rotate(0); } 50% { opacity: 1; transform: scale(1.1) rotate(18deg); } }
@keyframes dots-blink { 0% { opacity: .3; } 45% { opacity: 1; } 100% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .video-progress, .video-sparkle, .video-progress-dots, .video-progress-track span { animation: none; } }

.events {
  margin-left: 40px;
  max-height: 240px;
  overflow: auto;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.events div { padding: 9px 0; border-bottom: 1px solid var(--line); }
.events div:last-child { border-bottom: 0; }
.step-activity { border-bottom: 0; }

@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes sparkle { 0%, 100% { opacity: .35; transform: scale(.8) rotate(0deg); } 50% { opacity: 1; transform: scale(1.15) rotate(18deg); } }
@keyframes cursor-blink { 0%, 45% { opacity: 1; } 46%, 100% { opacity: 0; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; } .writing-cursor { opacity: 1; } }

.prompt-list { margin-left: 40px; max-width: 760px; }
.prompt-list label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; }
.prompt-list textarea { min-height: 150px; font-family: var(--mono); font-size: 12.5px; }
.prompt-list button { margin: 10px 0 30px; }

.admin-shell { padding-top: 52px; padding-bottom: 90px; }
.admin-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.admin-heading .lede { margin-top: 9px; color: var(--muted); }
.admin-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-bottom: 36px; }
.admin-metric { min-height: 124px; padding: 22px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 9px; }
.admin-metric strong { font-size: 27px; font-weight: 500; letter-spacing: -.04em; }
.admin-panel { min-width: 0; padding: 28px; margin-bottom: 28px; background: var(--surface); border: 1px solid var(--line); }
.admin-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.admin-panel-head h2 { margin-top: 3px; }
.admin-table-wrap { overflow-x: auto; }
.admin-panel table { width: 100%; border-collapse: collapse; font-size: 12px; white-space: nowrap; }
.admin-panel th { padding: 8px 10px; color: var(--muted); font-family: var(--mono); font-size: 9px; font-weight: 500; letter-spacing: .1em; text-align: left; text-transform: uppercase; border-bottom: 1px solid var(--line-strong); }
.admin-panel td { padding: 15px 10px; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.admin-panel tr:last-child td { border-bottom: 0; }
.admin-panel code { font-family: var(--mono); font-size: 10px; }
.admin-two-col { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .6fr); gap: 28px; align-items: start; }
.admin-bottom-grid { grid-template-columns: minmax(300px, .7fr) minmax(0, 1.3fr); }
.admin-subline { display:block; margin-top:4px; color:var(--muted); font-size:11px; }
.admin-open { white-space:nowrap; text-decoration:underline; text-underline-offset:3px; }
.admin-pagination { display:flex; align-items:center; justify-content:flex-end; gap:14px; margin-top:22px; font-size:12px; color:var(--muted); }
.admin-pagination button {
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 12.5px;
}
.admin-pagination button:hover:not(:disabled) { background: var(--accent-soft); border-color: var(--ink); color: var(--ink); }
.admin-pagination button:disabled { background: var(--disabled-surface); border-color: var(--line); color: var(--disabled-ink); cursor: not-allowed; }
.empty-cell { color: var(--muted) !important; text-align: center; padding: 22px !important; }
.log-status { color: var(--accent); font-family: var(--mono); }
.log-status.is-error { color: var(--danger); }
.admin-prompts { display: grid; gap: 10px; }
.admin-prompt { border:1px solid var(--line); padding:14px; }
.admin-prompt[open] { display:grid; gap:12px; }
.admin-prompt summary { cursor:pointer; font-weight:500; text-transform:capitalize; }
.admin-prompt label { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.admin-prompt textarea { min-height: 120px; width: 100%; font-family: var(--mono); font-size: 11px; }
.admin-prompt button { justify-self: start; min-height: 36px; padding: 7px 13px; font-size: 12px; }
.admin-loading { position: relative; overflow: hidden; padding: 30px 0; color: var(--muted); }

@media (max-width: 900px) {
  .admin-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-two-col { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 560px) {
  .admin-heading { align-items: flex-start; flex-direction: column; }
  .admin-heading button { width: 100%; }
  .admin-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-metric { min-height: 105px; padding: 14px; }
  .admin-metric strong { font-size: 22px; }
  .admin-panel { padding: 15px; }
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  padding: 64px 22px 18px;
  background: rgba(25, 24, 22, .9);
  animation: lightbox-in .2s ease-out both;
}
.lightbox-stage { display: grid; justify-items: center; align-content: center; gap: 10px; max-width: min(94vw, 1200px); min-height: 0; }
.lightbox-stage img { display: block; max-width: min(94vw, 1200px); max-height: calc(100dvh - 285px); width: auto; height: auto; object-fit: contain; box-shadow: 0 18px 70px rgba(0,0,0,.32); }
.lightbox-watermark { margin-top: -4px; }
.lightbox-stage p { color: rgba(255,255,255,.78); font-size: 13px; text-align: center; margin: 0; }
.lightbox-compare { display: flex; gap: 4px; padding: 4px; border: 1px solid rgba(255,255,255,.32); border-radius: 999px; background: rgba(25,24,22,.7); }
.lightbox-compare button { min-height: 44px; min-width: 108px; padding: 8px 16px; border: 0; border-radius: 999px; background: transparent; color: #fff; font-size: 14px; }
.lightbox-compare button[aria-pressed="true"] { background: #fff; color: var(--ink); }
.lightbox-compare button:hover:not([aria-pressed="true"]) { background: rgba(255,255,255,.16); }
.lightbox-counter { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.55) !important; }
.lightbox-close { position: fixed; top: 18px; right: 22px; z-index: 2; width: 42px; min-height: 42px; padding: 0; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; background: rgba(25,24,22,.55); color: #fff; font-size: 27px; line-height: 1; }
.lightbox-close:hover:not(:disabled) { background: #fff; color: var(--ink); border-color: #fff; }
.lightbox-nav {
  position: fixed; top: 50%; z-index: 2; transform: translateY(-50%);
  width: 46px; min-height: 46px; padding: 0;
  border: 1px solid rgba(255,255,255,.5); border-radius: 999px;
  background: rgba(25,24,22,.55); color: #fff; font-size: 30px; line-height: 1;
}
.lightbox-nav.prev { left: 18px; }
.lightbox-nav.next { right: 18px; }
.lightbox-nav:hover:not(:disabled) { background: #fff; color: var(--ink); border-color: #fff; }
.lightbox-nav:active:not(:disabled) { transform: translateY(-50%); }
.lightbox-nav:disabled { opacity: .3; background: rgba(25,24,22,.55); border-color: rgba(255,255,255,.25); color: #fff; }
.lightbox-nav.hidden { display: none !important; }
.lightbox-thumbs {
  display: flex; gap: 8px; align-items: center;
  max-width: 100%; padding: 10px 2px 2px;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin;
}
.lightbox-thumb {
  flex: 0 0 auto; width: 72px; height: 54px; padding: 0;
  border: 1px solid rgba(255,255,255,.28); border-radius: 2px;
  background: rgba(25,24,22,.6); overflow: hidden; opacity: .55;
  transition: opacity .2s var(--ease), border-color .2s var(--ease);
}
.lightbox-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lightbox-thumb:hover:not(:disabled) { opacity: .85; background: rgba(25,24,22,.6); border-color: rgba(255,255,255,.6); }
.lightbox-thumb[aria-selected="true"] { opacity: 1; border-color: #fff; }
@keyframes lightbox-in { from { opacity: 0; } to { opacity: 1; } }

.edit-modal {
  position: fixed;
  inset: 0;
  z-index: 31;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(25, 24, 22, .6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: lightbox-in .2s ease-out both;
}
.edit-modal-card {
  width: min(760px, 100%);
  max-height: calc(100dvh - 44px);
  overflow: auto;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: 0 24px 80px rgba(25, 24, 22, .32);
  animation: rise-in .2s var(--ease) both;
}
.edit-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.edit-modal-head h2 { margin: 3px 0 0; }
.edit-modal-help { margin: 8px 0 16px; }

.icon-button {
  width: 38px; min-height: 38px; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: transparent; color: var(--ink-soft);
  font-size: 24px; line-height: 1;
}
.icon-button:hover:not(:disabled) { background: var(--accent-soft); border-color: var(--ink); color: var(--ink); }

.mask-editor {
  position: relative;
  width: 100%;
  aspect-ratio: var(--image-ratio, 4 / 3);
  max-height: 52dvh;
  margin-inline: auto;
  overflow: hidden;
  background: repeating-conic-gradient(#efece5 0 25%, #e5e1d8 0 50%) 0 0 / 22px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 2px 2px 0 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6);
}
.mask-editor img { display: block; width: 100%; height: 100%; object-fit: contain; }
.mask-editor canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
/* the paint layer is drawn opaque and made translucent here, so overlapping
   strokes never build up into a solid block that hides the photo underneath */
#mask-paint { cursor: crosshair; opacity: .42; }
.mask-editor.is-erasing #mask-paint { cursor: cell; }
.mask-data-canvas { display: none !important; }
.mask-cursor {
  position: absolute; top: 0; left: 0; z-index: 2;
  width: var(--brush, 64px); height: var(--brush, 64px);
  margin: calc(var(--brush, 64px) / -2) 0 0 calc(var(--brush, 64px) / -2);
  border: 1.5px solid rgba(255, 255, 255, .95);
  border-radius: 999px;
  box-shadow: 0 0 0 1.5px rgba(25, 24, 22, .45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s var(--ease);
}
.mask-editor:hover .mask-cursor, .mask-editor.is-painting .mask-cursor { opacity: 1; }
.mask-editor.is-erasing .mask-cursor { border-style: dashed; }

/* ---------- mask toolbar ---------- */

.mask-tools {
  display: flex;
  align-items: center;
  gap: 10px 18px;
  flex-wrap: wrap;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-top: 0;
  border-radius: 0 0 2px 2px;
  background: linear-gradient(var(--paper), #efece6);
}
.mask-mode { display: flex; border: 1px solid var(--line-strong); border-radius: 2px; background: var(--surface); overflow: hidden; }
.mask-mode-button {
  display: flex; align-items: center; gap: 8px;
  border: 0; border-radius: 0; min-height: 36px; padding: 7px 14px;
  background: transparent; color: var(--ink-soft); font-size: 13px;
}
.mask-mode-button + .mask-mode-button { border-left: 1px solid var(--line-strong); }
.mask-mode-dot { width: 11px; height: 11px; border-radius: 999px; background: currentColor; }
.mask-mode-dot.is-hollow { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.mask-mode-button:hover:not(:disabled) { background: var(--accent-soft); color: var(--ink); }
.mask-mode-button[aria-checked="true"] { background: var(--ink); color: #faf9f6; }
.mask-mode-button[aria-checked="true"]:hover:not(:disabled) { background: #33302b; color: #faf9f6; }

.mask-size-field {
  display: flex; align-items: center; gap: 12px;
  flex: 1 1 210px; min-width: 0;
  padding: 0 14px;
  border-inline: 1px solid var(--line);
}
/* the dot mirrors the brush size, so the control explains itself at a glance */
.mask-size-preview {
  flex: 0 0 26px;
  display: block;
  width: var(--preview, 22px); height: var(--preview, 22px);
  margin-inline: calc((26px - var(--preview, 22px)) / 2);
  border-radius: 999px;
  background: rgba(184, 67, 45, .42);
  box-shadow: inset 0 0 0 1px rgba(184, 67, 45, .75);
  transition: width .12s var(--ease), height .12s var(--ease), margin .12s var(--ease);
}
.mask-size-field input[type=range] {
  flex: 1 1 auto;
  min-width: 80px;
  width: auto;
  min-height: 26px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(var(--ink), var(--ink)) left center / var(--fill, 50%) 3px no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) left center / 100% 3px no-repeat;
  -webkit-appearance: none;
  appearance: none;
  cursor: ew-resize;
}
.mask-size-field input[type=range]::-webkit-slider-runnable-track { height: 3px; background: transparent; border: 0; }
.mask-size-field input[type=range]::-moz-range-track { height: 3px; background: transparent; border: 0; }
.mask-size-field input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 17px; height: 17px; margin-top: -7px;
  border: 1px solid var(--ink); border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(25, 24, 22, .28);
  transition: transform .12s var(--ease);
}
.mask-size-field input[type=range]::-moz-range-thumb {
  width: 15px; height: 15px;
  border: 1px solid var(--ink); border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(25, 24, 22, .28);
}
.mask-size-field input[type=range]:active::-webkit-slider-thumb { transform: scale(1.12); }
.mask-size-field output {
  flex: 0 0 auto;
  font-family: var(--mono); font-size: 11px; letter-spacing: .04em;
  color: var(--muted); min-width: 44px; text-align: right;
  font-variant-numeric: tabular-nums;
}
.mask-history { display: flex; gap: 8px; margin-left: auto; }
.mask-history .icon-button { font-size: 17px; }
.mask-history .button-secondary { min-height: 38px; padding: 8px 14px; font-size: 13px; background: var(--surface); }
.mask-history .button-secondary:hover:not(:disabled) { background: var(--accent-soft); border-color: var(--ink); }

.mask-status {
  display: flex; align-items: center; gap: 8px;
  margin: 12px 0 0;
}
.mask-status::before {
  content: ""; flex: 0 0 auto;
  width: 7px; height: 7px; border-radius: 999px;
  background: var(--line-strong);
}
.mask-status[data-painted="true"] { color: var(--ink-soft); }
.mask-status[data-painted="true"]::before { background: #b8432d; }

#mask-feedback { width: 100%; }
.field-error { margin-top: 7px; font-size: 12.5px; color: var(--danger); }
.edit-modal-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 22px; padding-top: 18px;
  border-top: 1px solid var(--line);
}

@media (max-width: 720px) {
  .edit-modal { padding: 12px; }
  .edit-modal-card { max-height: calc(100dvh - 24px); padding: 18px; }
  .edit-modal-actions button { flex: 1; }
  .mask-tools { gap: 10px 12px; padding: 10px; }
  .mask-mode { flex: 1 1 100%; }
  .mask-mode-button { flex: 1; justify-content: center; }
  .mask-size-field { flex: 1 1 auto; padding: 0; border-inline: 0; }
  .mask-history { margin-left: 0; }
  .lightbox { padding: 60px 12px 12px; }
  .lightbox-nav { width: 40px; min-height: 40px; }
  .lightbox-nav.prev { left: 8px; }
  .lightbox-nav.next { right: 8px; }
  .lightbox-thumb { width: 56px; height: 42px; }
}

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .auth { grid-template-columns: 1fr; gap: 44px; }
  .auth-plate { display: none; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .header-inner { padding: 0 18px; min-height: 56px; }
  .account { gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
  .account .text-button { font-size: 12px; }
  .account-email { display: none; }
  .shell { padding: 30px 18px 90px; }
  .page-head, .detail-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .page-head-note, .cost { text-align: left; }
  .composer-row { flex-direction: column; }
  .composer-row button { width: 100%; }
  .listing-link { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .listing-link .listing-arrow { display: none; }
  .step { padding: 34px 0; }
  .step-title { gap: 12px; }
  .step-index { display: none; }
  .dropzone, .photo-grid, .description-text, .description-writing, .description-change-toggle, .review-area, .step > .field,
  .step > .step-actions, .video-output, .video-options, .video-progress, .events, .prompt-list { margin-left: 0; }
  .dropzone { flex-direction: column; align-items: stretch; }
  .upload-actions button { flex: 1; }
  .photo-grid { grid-template-columns: 1fr; gap: 26px; }
  .step-actions > button { flex: 1 1 100%; }
  .message { top: 66px; }
}
