/* ============================================================================
   PoshAngel — design system
   ============================================================================ */
:root {
  /* brand + accents — deep Poshmark-adjacent berry/wine */
  --brand: #8f1d49;
  --brand-700: #6d1537;
  --brand-50: #fbeaf1;
  --accent: #7c3aed;      /* AI / image features */
  --accent-50: #f3eefe;

  /* neutrals */
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --border: #e6e8ee;
  --border-strong: #d3d7e0;
  --text: #1b1e27;
  --text-2: #4b5160;
  --muted: #868d9c;

  /* status */
  --ok: #15803d; --ok-bg: #e8f6ed;
  --warn: #b45309; --warn-bg: #fef4e2;
  --danger: #dc2626; --danger-bg: #fdecec;

  /* shape */
  --r-xs: 6px; --r-sm: 9px; --r: 12px; --r-lg: 16px; --r-pill: 999px;

  /* elevation */
  --sh-sm: 0 1px 2px rgba(20,23,33,.06), 0 1px 1px rgba(20,23,33,.04);
  --sh: 0 2px 8px rgba(20,23,33,.06), 0 1px 2px rgba(20,23,33,.05);
  --sh-md: 0 6px 20px rgba(20,23,33,.10), 0 2px 6px rgba(20,23,33,.06);
  --sh-lg: 0 16px 40px rgba(20,23,33,.16);

  --font: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --topbar-h: 60px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--bg);
  font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
/* editorial serif for the wordmark, hero, section titles, and prices (fashion feel) */
.brand h1, .hero h1, .lsection h2, .authcard .brand h1, .price-amt { font-family: var(--font-display); letter-spacing: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.spacer { flex: 1; }
code { background: #eef0f4; padding: 1px 5px; border-radius: 5px; font-size: .9em; }

/* ---- top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px; background: rgba(255,255,255,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), #e0568f); color: #fff; font-size: 18px;
  box-shadow: var(--sh-sm);
}
.brand h1 { font-size: 17px; }
.brand .tag { font-size: 11.5px; color: var(--muted); font-weight: 500; margin-top: -1px; }
.statuspills { display: flex; gap: 8px; align-items: center; }
.spill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 550;
  padding: 5px 10px; border-radius: var(--r-pill); background: #f0f2f6; color: var(--text-2);
}
.spill .dot { width: 7px; height: 7px; border-radius: 50%; background: #c2c7d0; }
.spill.on { background: var(--ok-bg); color: var(--ok); }
.spill.on .dot { background: var(--ok); box-shadow: 0 0 0 3px rgba(21,128,61,.14); }
.spill.ai.on { background: var(--accent-50); color: var(--accent); }
.spill.ai.on .dot { background: var(--accent); box-shadow: 0 0 0 3px rgba(124,58,237,.14); }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap;
  padding: 8px 14px; border-radius: var(--r-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
}
.btn:hover { background: #f3f4f7; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-50); border-color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-700); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.accent:hover { filter: brightness(.94); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: #eef0f4; }
.btn.danger-ghost { border-color: transparent; background: transparent; color: var(--danger); }
.btn.danger-ghost:hover { background: var(--danger-bg); }
.btn.sm { padding: 6px 10px; font-size: 12.5px; }
.btn.icon { padding: 7px; width: 34px; }
.btn .spin { width: 14px; height: 14px; }

/* ---- toggle switch ---- */
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13px; color: var(--text-2); user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 38px; height: 22px; border-radius: var(--r-pill); background: #cfd3dc; position: relative; transition: background .18s; flex: 0 0 auto; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--sh-sm); transition: transform .18s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--accent-50); }

/* ---- inputs ---- */
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], textarea, select {
  font: inherit; width: 100%; padding: 8px 10px; border: 1px solid var(--border-strong);
  border-radius: var(--r-sm); background: var(--surface); color: var(--text); transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
input[readonly] { background: var(--surface-2); color: var(--muted); }
textarea { resize: vertical; min-height: 64px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23868d9c' d='M3 4.5 6 8l3-3.5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; padding-right: 26px; }

/* ---- layout ---- */
main { max-width: 1240px; margin: 0 auto; padding: 20px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--sh-sm); padding: 18px 20px; }

/* ---- segmented nav ---- */
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: #ebedf1; border-radius: var(--r); margin-bottom: 18px; }
.tab { border: none; background: transparent; padding: 8px 16px; border-radius: var(--r-sm); font: inherit; font-weight: 600; color: var(--text-2); cursor: pointer; display: flex; align-items: center; gap: 8px; }
.tab .n { width: 19px; height: 19px; border-radius: 50%; background: #d4d8e0; color: #fff; font-size: 11px; display: grid; place-items: center; }
.tab.active { background: var(--surface); color: var(--brand); box-shadow: var(--sh-sm); }
.tab.active .n { background: var(--brand); }

/* ---- dropzone / add bar ---- */
.addbar { display: flex; gap: 16px; align-items: stretch; margin-bottom: 16px; flex-wrap: wrap; }
.dropzone {
  flex: 1 1 360px; display: flex; align-items: center; gap: 16px; padding: 16px 18px;
  border: 1.5px dashed var(--border-strong); border-radius: var(--r); background: var(--surface);
  transition: border-color .15s, background .15s;
}
.dropzone.drag { border-color: var(--brand); background: var(--brand-50); }
.dropzone .dz-ico { font-size: 26px; }
.dropzone .dz-main { flex: 1; }
.dropzone .dz-title { font-weight: 600; }
.dropzone .dz-sub { font-size: 12px; color: var(--muted); }
.dz-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---- toolbar ---- */
.toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }

/* ---- filters ---- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chipfilter { border: 1px solid var(--border-strong); background: var(--surface); border-radius: var(--r-pill); padding: 6px 12px; font: inherit; font-size: 12.5px; font-weight: 550; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: background .12s, border-color .12s; }
.chipfilter:hover { background: #f3f4f7; }
.chipfilter.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.chipfilter .cnt { background: rgba(0,0,0,.08); border-radius: var(--r-pill); padding: 0 7px; font-size: 11px; line-height: 17px; }
.chipfilter.active .cnt { background: rgba(255,255,255,.25); }

/* ---- items list ---- */
.list { display: flex; flex-direction: column; gap: 8px; }
.item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--sh-sm); overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.item:hover { box-shadow: var(--sh); }
.item.review { border-left: 3px solid #e0a13a; }

/* collapsed row header (always visible, click to expand) */
.row-head { display: flex; align-items: center; gap: 12px; padding: 9px 12px; cursor: pointer; }
.row-head:hover { background: var(--surface-2); }
.row-head .cover { width: 46px; height: 46px; border-radius: var(--r-xs); object-fit: cover; border: 1px solid var(--border); flex: 0 0 auto; background: #f0f1f4; }
.row-head .info { flex: 1; min-width: 0; }
.row-head .ti { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-head .ti.untitled { color: var(--muted); font-weight: 500; font-style: italic; }
.row-head .meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-head .price { font-weight: 650; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.row-head .chev { color: var(--muted); transition: transform .18s; flex: 0 0 auto; font-size: 12px; }
.item.expanded .row-head .chev { transform: rotate(90deg); }
.row-body { display: none; border-top: 1px solid var(--border); }
.item.expanded .row-body { display: block; }
.item-top { display: flex; align-items: center; gap: 8px; padding: 10px 12px 0; }
.badge { font-size: 11px; font-weight: 650; padding: 2.5px 9px; border-radius: var(--r-pill); text-transform: capitalize; letter-spacing: .01em; }
.badge.new { background: #eef0f6; color: #5a6273; }
.badge.ready { background: var(--ok-bg); color: var(--ok); }
.badge.generating { background: var(--warn-bg); color: var(--warn); }
.badge.error { background: var(--danger-bg); color: var(--danger); }
.flag { font-size: 11.5px; font-weight: 600; color: var(--warn); background: var(--warn-bg); padding: 3px 9px; border-radius: var(--r-pill); }

.thumbs { display: flex; gap: 6px; padding: 10px 12px; overflow-x: auto; }
.thumb { position: relative; flex: 0 0 auto; }
.thumb img { height: 92px; width: 92px; object-fit: cover; border-radius: var(--r-xs); border: 1px solid var(--border); display: block; cursor: pointer; }
.thumb.cover img { border: 2px solid var(--brand); }
.thumb.source img { opacity: .45; filter: grayscale(.4); }
.thumb .ai { position: absolute; top: 4px; left: 4px; background: var(--accent); color: #fff; font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 4px; letter-spacing: .03em; }
.thumb .cs { position: absolute; bottom: 4px; left: 4px; background: var(--brand); color: #fff; font-size: 9px; font-weight: 600; padding: 1px 5px; border-radius: 4px; }
.thumb .cs.src { background: #9aa1ae; }
.thumb .delphoto { position: absolute; top: 2px; right: 2px; width: 19px; height: 19px; padding: 0; line-height: 17px; text-align: center; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; border: none; font-size: 14px; cursor: pointer; display: none; }
.thumb:hover .delphoto { display: block; }

.body { padding: 4px 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > .lbl { font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.field input, .field select, .field textarea { font-size: 13px; padding: 7px 9px; }
.fieldrow { display: flex; gap: 10px; }
.fieldrow > .field { flex: 1; min-width: 0; }
.note { font-size: 12px; line-height: 1.45; color: var(--warn); background: var(--warn-bg); padding: 8px 10px; border-radius: var(--r-xs); }
.note.err { color: var(--danger); background: var(--danger-bg); }

.actions { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--surface-2); }

/* ---- empty state ---- */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .big { font-size: 38px; margin-bottom: 10px; }
.empty .t { font-size: 16px; font-weight: 600; color: var(--text-2); }

/* ---- shows board ---- */
.board { display: flex; gap: 16px; align-items: flex-start; overflow-x: auto; padding-bottom: 12px; }
.col { flex: 0 0 300px; background: #eef0f3; border-radius: var(--r); padding: 12px; max-height: calc(100vh - 220px); display: flex; flex-direction: column; }
.col.queue { background: #e9ecf1; }
.col-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.col-head h3 { font-size: 13.5px; }
.col-head input { font-weight: 650; border: 1px solid transparent; background: transparent; padding: 4px 6px; border-radius: var(--r-xs); }
.col-head input:hover { background: rgba(255,255,255,.7); }
.col-head input:focus { background: #fff; border-color: var(--brand); }
.count { font-size: 11.5px; font-weight: 650; padding: 2px 8px; border-radius: var(--r-pill); background: #fff; color: var(--text-2); }
.count.full { background: var(--danger-bg); color: var(--danger); }
.progress { height: 4px; border-radius: 4px; background: #dde0e6; overflow: hidden; margin-bottom: 10px; }
.progress > span { display: block; height: 100%; background: var(--brand); transition: width .25s; }
.progress.full > span { background: var(--danger); }
.droplist { flex: 1; min-height: 52px; display: flex; flex-direction: column; gap: 7px; overflow-y: auto; padding: 2px; border-radius: var(--r-sm); transition: background .12s; }
.droplist.over { background: var(--brand-50); box-shadow: inset 0 0 0 2px var(--brand); }
.droplist .empty-col { font-size: 12px; color: var(--muted); text-align: center; padding: 18px 8px; }
.chip { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 6px 8px; display: flex; align-items: center; gap: 9px; cursor: grab; box-shadow: var(--sh-sm); }
.chip:active { cursor: grabbing; }
.chip.dragging { opacity: .4; }
.chip.review { border-left: 3px solid #e0a13a; }
.chip img { width: 38px; height: 38px; object-fit: cover; border-radius: var(--r-xs); flex: 0 0 auto; }
.chip .t { flex: 1; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 60px; }
.chip .pr { font-size: 12px; font-weight: 600; color: var(--text-2); }
.chip .ctrls { display: flex; align-items: center; gap: 4px; }
.chip .ctrls select { font-size: 11px; padding: 3px 18px 3px 6px; max-width: 92px; border-radius: var(--r-xs); }
.chip .rb { width: 26px; height: 26px; padding: 0; font-size: 12px; line-height: 1; flex: 0 0 auto; }
.col-foot { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.col-foot .row1 { display: flex; gap: 6px; }
.col-foot .row1 .btn { flex: 1; }
.col-foot .help { font-size: 11px; color: var(--muted); line-height: 1.4; }
.addcol { flex: 0 0 220px; }
.addcol .btn { width: 100%; height: 46px; border-style: dashed; background: transparent; }

/* ---- settings drawer ---- */
.scrim { position: fixed; inset: 0; background: rgba(20,23,33,.4); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; height: 100%; width: 420px; max-width: 92vw; background: var(--surface); z-index: 41; box-shadow: var(--sh-lg); transform: translateX(100%); transition: transform .25s ease; display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { font-size: 16px; }
.drawer-body { padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 22px; }
.setting { display: flex; flex-direction: column; gap: 8px; }
.setting h3 { font-size: 13.5px; }
.setting p { margin: 0; font-size: 12.5px; color: var(--muted); }
.inline-input { display: flex; gap: 8px; }
.inline-input input { flex: 1; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tplmap { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.tplrow { display: flex; align-items: center; gap: 10px; }
.tplrow .tpllbl { flex: 0 0 110px; font-size: 12.5px; font-weight: 550; color: var(--text-2); }
.tplrow select { flex: 1; font-size: 12.5px; padding: 6px 8px; }
.tplrow select.unmapped { border-color: #e0a13a; background: var(--warn-bg); }

/* ---- auth gate ---- */
.center { text-align: center; }
.hide-sm { }
.authgate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: var(--bg); padding: 20px; }
.authcard { width: 350px; max-width: 92vw; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-md); padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.authcard .brand { justify-content: center; }
.authcard .brand.center { flex-direction: column; gap: 8px; }
.authcard .brand h1 { font-size: 22px; }
.authcard input { width: 100%; }
/* keep the fields, button, and links evenly spaced within each auth panel */
#authForm, #authForgot, #authReset { display: flex; flex-direction: column; gap: 10px; }
.authcard .msg.err:empty { display: none; }

/* ---- admin: users ---- */
.userslist { display: flex; flex-direction: column; gap: 8px; }
.usercard { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px; background: var(--surface-2); }
.usercard.off { opacity: .6; }
.userrow { display: flex; align-items: center; gap: 8px; }
.userrow .uemail { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.userrow .ucred { font-weight: 650; font-size: 13px; color: var(--brand); }
.usersub { font-size: 11.5px; margin: 4px 0 8px; }
.useracts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.useracts .ucredinput { width: 90px; }

/* ---- lightbox ---- */
.lightbox { position: fixed; inset: 0; z-index: 70; background: rgba(15,17,22,.86); display: flex; align-items: center; justify-content: center; padding: 20px; animation: toastin .15s ease; }
.lb-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 100%; max-height: 100%; }
.lb-inner img { max-width: 92vw; max-height: 74vh; object-fit: contain; border-radius: var(--r); box-shadow: var(--sh-lg); background: #fff; }
.lb-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; }
.lb-count { color: rgba(255,255,255,.8); font-size: 13px; font-weight: 600; }
.lb-label { color: #fff; font-size: 13px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border: none; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lb-nav:hover { background: rgba(255,255,255,.3); }
.lb-nav.prev { left: 14px; } .lb-nav.next { right: 14px; }

/* ---- public landing ---- */
.landing { min-height: 100vh; background: linear-gradient(180deg, #faf6f8 0%, var(--bg) 340px); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--brand); margin-bottom: 18px; }
.lnav { display: flex; align-items: center; gap: 14px; padding: 13px 22px; background: rgba(255,255,255,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.lnav .brand h1 { font-size: 17px; }
.lnav-link { color: var(--text-2); font-weight: 550; font-size: 14px; }
.lnav-link:hover { color: var(--brand); text-decoration: none; }

.hero { max-width: 720px; margin: 0 auto; text-align: center; padding: 84px 22px 64px; }
.hero h1 { font-size: 50px; font-weight: 700; line-height: 1.08; }
.hero h1 .hl { color: var(--brand); font-style: italic; }
.hero p { font-size: 18px; color: var(--text-2); line-height: 1.65; margin: 22px auto 30px; max-width: 580px; }
.btn.lg { padding: 14px 32px; font-size: 16px; border-radius: var(--r); }
.hero .small { margin-top: 16px; }
.small { font-size: 12.5px; }

.lsection { max-width: 1040px; margin: 0 auto; padding: 44px 22px; }
.lsection h2 { font-size: 28px; letter-spacing: -.01em; }
.lsection h2.center { text-align: center; margin-bottom: 28px; }

.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.how-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; box-shadow: var(--sh-sm); }
.how-card .how-ico { font-size: 30px; }
.how-card h3 { font-size: 15px; margin: 10px 0 6px; }
.how-card p { font-size: 13px; color: var(--text-2); line-height: 1.5; margin: 0; }

.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; max-width: 680px; margin: 0 auto; }
.price-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--sh-sm); position: relative; }
.price-card.popular { border: 2px solid var(--brand); box-shadow: var(--sh); }
.price-flag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: 11px; font-weight: 650; padding: 3px 12px; border-radius: var(--r-pill); }
.price-name { font-weight: 650; font-size: 15px; color: var(--text-2); }
.price-amt { font-size: 38px; font-weight: 700; letter-spacing: -.02em; margin: 6px 0 2px; }
.price-amt span { font-size: 15px; font-weight: 500; color: var(--muted); }
.price-sub { color: var(--brand); font-weight: 600; font-size: 13.5px; margin-bottom: 14px; }
.price-card ul { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-direction: column; gap: 8px; }
.price-card li { font-size: 13.5px; color: var(--text-2); padding-left: 22px; position: relative; }
.price-card li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }

.authsec { display: flex; justify-content: center; }
.authsec .authcard { box-shadow: var(--sh-md); }
.lfoot { text-align: center; padding: 28px 22px 40px; color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--border); margin-top: 16px; }

/* ---- legal pages ---- */
.legal { max-width: 760px; margin: 0 auto; padding: 36px 22px 50px; }
.legal h1 { font-size: 30px; margin-bottom: 4px; }
.legal h2 { font-size: 17px; margin: 26px 0 8px; }
.legal p, .legal li { font-size: 14px; line-height: 1.65; color: var(--text-2); }
.legal ul { padding-left: 22px; display: flex; flex-direction: column; gap: 7px; }

@media (max-width: 680px) { .hero h1 { font-size: 31px; } .hero p { font-size: 15px; } .lsection h2 { font-size: 23px; } .lnav { padding: 12px 14px; } }

/* ---- help modal ---- */
.modal { position: fixed; inset: 0; z-index: 65; background: rgba(20,23,33,.5); display: grid; place-items: center; padding: 20px; }
.modal-card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-lg); width: 620px; max-width: 94vw; max-height: 88vh; display: flex; flex-direction: column; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h2 { font-size: 17px; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-body h3 { font-size: 14px; margin: 20px 0 8px; }
.modal-body h3:first-of-type { margin-top: 0; }
.help-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; line-height: 1.55; }
.modal-body details { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 9px 12px; margin-bottom: 6px; }
.modal-body details summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.modal-body details p { margin: 8px 0 0; font-size: 13px; color: var(--text-2); line-height: 1.5; }

/* ---- buy credits ---- */
.buyrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-sm); margin-bottom: 8px; }
.buyrow .buylbl { font-weight: 600; font-size: 14px; }

/* ---- first-run tour ---- */
.tour { position: fixed; inset: 0; z-index: 66; background: rgba(20,23,33,.62); display: grid; place-items: center; padding: 20px; }
.tour-card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-lg); width: 420px; max-width: 92vw; padding: 28px 24px 18px; text-align: center; animation: toastin .18s ease; }
.tour-emoji { font-size: 46px; line-height: 1; }
.tour-card h2 { font-size: 19px; margin: 12px 0 8px; }
.tour-card p { color: var(--text-2); font-size: 14px; line-height: 1.55; margin: 0; }
.tour-dots { display: flex; gap: 6px; justify-content: center; margin: 18px 0 2px; }
.tour-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); }
.tour-dots span.on { background: var(--brand); }
.tour-nav { display: flex; align-items: center; gap: 8px; margin-top: 14px; }

/* ---- toasts ---- */
.toasts { position: fixed; bottom: 22px; right: 22px; z-index: 60; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: 380px; padding: 12px 14px; border-radius: var(--r-sm); background: #21242d; color: #fff; box-shadow: var(--sh-md); font-size: 13px; animation: toastin .22s ease; }
.toast.ok { background: #14532d; }
.toast.err { background: #7f1d1d; }
.toast .ico { font-size: 15px; }
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } }

/* ---- spinner ---- */
.spin { display: inline-block; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; width: 14px; height: 14px; animation: spin .7s linear infinite; vertical-align: -2px; }
.spin.dark { border-color: rgba(0,0,0,.2); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }

.msg { font-size: 12.5px; color: var(--muted); }
.msg.ok { color: var(--ok); } .msg.err { color: var(--danger); }

/* ---- mobile / touch ---- */
.toast { max-width: min(380px, calc(100vw - 36px)); }

@media (max-width: 680px) {
  .topbar { padding: 0 12px; gap: 10px; }
  .brand .tag { display: none; }
  .brand h1 { font-size: 16px; }
  .spill .t { display: none; }            /* show just the status dot to save room */
  .spill { padding: 6px; }
  .hide-sm { display: none; }

  main { padding: 12px; }
  .tabs { display: flex; width: 100%; }
  .tab { flex: 1; justify-content: center; }

  .grid { grid-template-columns: 1fr; gap: 14px; }
  .fieldrow { flex-wrap: wrap; }
  .fieldrow > .field { flex: 1 1 44%; }    /* two per row on narrow screens */

  /* inputs at 16px so iOS doesn't zoom on focus */
  input, select, textarea, .field input, .field select, .field textarea { font-size: 16px; }

  /* show board: stack vertically — no hidden horizontal scrolling */
  .board { flex-direction: column; gap: 12px; overflow-x: visible; }
  .col, .addcol { flex: none; width: 100%; max-height: none; }
  .droplist { max-height: 48vh; }       /* tall shows scroll inside their own card */
  .addcol .btn { height: 48px; }
  .thumb img { height: 84px; width: 84px; }

  .drawer { width: 100%; max-width: 100%; }
  .toasts { left: 16px; right: 16px; align-items: stretch; }
  .toast { max-width: none; }

  /* comfortable tap targets */
  .btn.sm { padding: 9px 12px; }
  .btn.icon { width: 40px; height: 40px; }

  /* upload box: stack vertically so the text isn't crushed into a narrow column */
  .addbar { margin-bottom: 12px; }
  .dropzone { flex-direction: column; align-items: stretch; gap: 10px; text-align: center; padding: 16px; }
  .dropzone .dz-ico { display: none; }
  .dz-actions { width: 100%; justify-content: center; }
  .dz-actions .btn { flex: 1; }
  .dz-actions .switch { flex-basis: 100%; justify-content: center; }
}
