/* ===========================================================
   AI Review — shared stylesheet (review page + setup page)
   =========================================================== */
:root {
  --brand: #b45309;
  --brand-soft: rgba(180,83,9, .10);
  --brand-line: rgba(180,83,9, .28);
  --bg: #fffcf5;
  --card: #ffffff;
  --ink: #1c1917;
  --ink-2: #57534e;
  --ink-3: #a8a29e;
  --line: #f2e7d4;
  --ok: #16a34a;
  --warn: #d97706;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(28,25,23, .04), 0 12px 32px -12px rgba(28,25,23, .14);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14100a;
    --card: #1e1710;
    --ink: #f8f4ee;
    --ink-2: #a8a29e;
    --ink-3: #7d746b;
    --line: #2f271c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 34px -14px rgba(0, 0, 0, .7);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 280px;
  background: radial-gradient(120% 100% at 50% 0%, var(--brand-soft), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 0 auto;
  padding: 26px 16px 60px;
}

.wrap.wide { max-width: 1040px; }

/* ---------- business header ---------- */
.biz { text-align: center; margin-bottom: 22px; }

.biz .logo {
  width: 68px; height: 68px;
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; line-height: 1;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.biz h1 {
  margin: 0 0 6px;
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -.4px;
  line-height: 1.25;
}

.biz .sub {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
}

.biz .sub b { color: var(--brand); font-weight: 600; }

/* ---------- cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 18px;
  margin-bottom: 14px;
}

.card h2 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.2px;
  display: flex; align-items: center; gap: 8px;
}

.card h2 .n {
  width: 22px; height: 22px; flex: none;
  border-radius: 7px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

.card .hint {
  margin: 0 0 14px;
  color: var(--ink-3);
  font-size: 12.5px;
  padding-left: 30px;
}

/* FAQ */
#faq h2 { margin-bottom: 14px; }

#faq h3 {
  margin: 18px 0 5px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -.1px;
}

#faq h3:first-of-type { margin-top: 0; }

#faq p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-2);
}

#faq a { color: var(--brand); }

.hidden { display: none !important; }

/* ---------- stars ---------- */
.stars {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 6px 0 2px;
}

.stars button {
  background: none; border: 0; cursor: pointer;
  font-size: 36px; line-height: 1;
  padding: 4px 2px;
  filter: grayscale(1) opacity(.32);
  transition: transform .14s ease, filter .14s ease;
  -webkit-tap-highlight-color: transparent;
}

.stars button:active { transform: scale(.88); }
.stars button.on { filter: none; transform: scale(1.06); }

.rate-label {
  text-align: center;
  margin: 8px 0 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  min-height: 20px;
}

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 550;
  font-family: inherit;
  cursor: pointer;
  transition: .15s ease;
  -webkit-tap-highlight-color: transparent;
}

.chip:hover { border-color: var(--brand-line); }

.chip.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px -8px var(--brand);
}

.seg {
  display: inline-flex;
  background: var(--brand-soft);
  border-radius: 12px;
  padding: 3px;
  gap: 2px;
}

.seg button {
  border: 0; background: none;
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--ink-2);
  padding: 7px 14px;
  border-radius: 9px;
  cursor: pointer;
  transition: .15s;
}

.seg button.on { background: var(--card); color: var(--brand); box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }

.opt-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

.opt-row:last-of-type { border-bottom: 0; }
.opt-row .lbl { font-size: 13px; font-weight: 600; color: var(--ink-2); }

/* switch */
.sw { position: relative; width: 46px; height: 27px; flex: none; }
.sw input { opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }

.sw span {
  position: absolute; inset: 0;
  background: var(--line);
  border-radius: 999px;
  transition: .2s;
  pointer-events: none;
}

.sw span::after {
  content: ""; position: absolute;
  top: 3px; left: 3px; width: 21px; height: 21px;
  background: #fff; border-radius: 50%;
  transition: .2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}

.sw input:checked + span { background: var(--brand); }
.sw input:checked + span::after { transform: translateX(19px); }

/* ---------- buttons ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-family: inherit; font-size: 14.5px; font-weight: 650;
  padding: 14px 16px;
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: .15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(.985); }

.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 10px 24px -12px var(--brand);
}

.btn.green { background: #128c7e; border-color: #128c7e; color: #fff; }
.btn.big { padding: 16px; font-size: 15.5px; }
.btn.sm { width: auto; padding: 10px 14px; font-size: 13px; border-radius: 11px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.row { display: flex; gap: 8px; }
.row .btn { flex: 1; }

/* ---------- output ---------- */
.out-box {
  position: relative;
  border: 1px solid var(--brand-line);
  background: var(--brand-soft);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 12px;
}

textarea#out {
  width: 100%;
  min-height: 148px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.62;
  padding: 12px;
  resize: vertical;
  outline: none;
}

.steps-mini {
  margin: 14px 0 0;
  padding: 0 0 0 18px;
  color: var(--ink-2);
  font-size: 12.8px;
  line-height: 1.75;
}

.toast {
  position: fixed;
  left: 50%; bottom: 26px;
  transform: translate(-50%, 20px);
  background: #1c1917; color: #fff;
  font-size: 13.5px; font-weight: 600;
  padding: 12px 20px;
  border-radius: 999px;
  opacity: 0; pointer-events: none;
  transition: .25s ease;
  z-index: 99;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

.foot {
  text-align: center;
  color: var(--ink-3);
  font-size: 11.5px;
  margin-top: 26px;
  line-height: 1.7;
}

.foot a { color: var(--ink-3); }

/* ---------- setup page ---------- */
.field { margin-bottom: 15px; }

.field label {
  display: block;
  font-size: 12.5px; font-weight: 650;
  color: var(--ink-2);
  margin-bottom: 6px;
}

.field .tip { font-weight: 400; color: var(--ink-3); }

.field input[type=text],
.field input[type=url],
.field select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  border-radius: 12px;
  padding: 12px 13px;
  font-family: inherit;
  font-size: 14.5px;
  outline: none;
  transition: .15s;
}

.field input:focus, .field select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.swatches { display: flex; gap: 8px; flex-wrap: wrap; }

.swatches button {
  width: 34px; height: 34px;
  border-radius: 11px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: .15s;
}

.swatches button.on { border-color: var(--ink); transform: scale(1.1); }

/* logo upload */
.logo-up { display: flex; gap: 14px; align-items: flex-start; }
.logo-up .logo-act { flex: 1; min-width: 0; }
.logo-up .row { flex-wrap: wrap; }
.logo-up .row .btn { flex: 0 0 auto; }

.logo-prev {
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  border: 1px dashed var(--brand-line);
  border-radius: 14px;
  background: var(--brand-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 7px;
}

.logo-prev img { max-width: 100%; max-height: 100%; display: block; }
.logo-prev span { font-size: 10.5px; line-height: 1.35; text-align: center; color: var(--ink-3); }

.qr-box {
  text-align: center;
  padding: 22px 18px;
  border: 1px dashed var(--brand-line);
  border-radius: 16px;
  background: var(--brand-soft);
}

.qr-box #qr { display: inline-flex; padding: 12px; background: #fff; border-radius: 14px; }
.qr-box #qr img, .qr-box #qr canvas { display: block; width: 220px !important; height: 220px !important; }

.linkbox {
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  color: var(--ink-2);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  margin: 12px 0;
  max-height: 96px;
  overflow: auto;
}

.note {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-2);
  background: var(--brand-soft);
  border-left: 3px solid var(--brand);
  border-radius: 0 10px 10px 0;
  padding: 11px 13px;
  margin: 0 0 14px;
}

.note.warn { background: rgba(217, 119, 6, .1); border-color: var(--warn); }

/* printable table-tent card — colourful, print-color-safe */
.print-card {
  display: none;
  position: relative;
  overflow: hidden;
  text-align: center;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 0 0 0;
  border-radius: 24px;
  border: 2px solid #78350f;
  background: #fff;
  color: #1c1917;
  font-family: var(--font);
  /* warna browser background colours print me drop kar deta hai */
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* gradient header + do halke decorative bubbles */
.print-card .pc-head {
  position: relative;
  overflow: hidden;
  padding: 22px 24px 48px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2, #f59e0b) 60%, var(--brand-3, #fbbf24) 100%);
  color: #fff;
}

.print-card .pc-head::before,
.print-card .pc-head::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .13);
}

.print-card .pc-head::before { width: 150px; height: 150px; top: -70px; left: -46px; }
.print-card .pc-head::after { width: 96px; height: 96px; bottom: -34px; right: -22px; }

.print-card .pc-badge {
  position: relative;
  display: inline-block;
  margin: 0 0 10px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .2);
  border: 1px solid rgba(255, 255, 255, .45);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.print-card h3 {
  position: relative;
  margin: 0 0 5px;
  font-size: 27px;
  line-height: 1.2;
  letter-spacing: -.5px;
}

.print-card .pc-sub {
  position: relative;
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, .88);
}

/* QR tile header par thoda overlap karke float karta hai */
.print-card .pc-body { position: relative; margin-top: -28px; padding: 0 24px 4px; }

.print-card .pc-qr {
  display: inline-block;
  padding: 14px;
  background: #fff;             /* quiet zone — scan reliability ke liye zaroori */
  border: 2px solid var(--brand-line);
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(120,53,15, .18);
}

.print-card .pc-qr img, .print-card .pc-qr canvas { width: 260px !important; height: 260px !important; display: block; }

.print-card .pc-cta {
  display: inline-block;
  margin: 18px 0 0;
  padding: 9px 20px;
  border-radius: 999px;
  background: var(--brand-soft);
  border: 1.5px solid var(--brand-line);
  color: var(--brand);
  font-size: 18px;
  font-weight: 800;
}

/* emoji ki jagah text stars — colour print me pakka aata hai */
.print-card .pc-star {
  margin: 12px 0 0;
  font-size: 25px;
  line-height: 1;
  letter-spacing: 5px;
  color: #f59e0b;
}

.print-card .pc-tip {
  margin: 12px 0 18px;
  font-size: 12px;
  line-height: 1.6;
  color: #57534e;
}

.print-card .pc-foot {
  padding: 11px 20px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2, #f59e0b) 60%, var(--brand-3, #fbbf24) 100%);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
}

@media print {
  @page { margin: 12mm; }
  body::before, .wrap > *:not(#printArea) { display: none !important; }
  #printArea, .print-card { display: block !important; }
  html, body { background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .wrap { padding: 0; max-width: none; }
  .print-card { break-inside: avoid; page-break-inside: avoid; box-shadow: none; }
  /* print me soft shadow flat grey block ban jata hai — border se replace */
  .print-card .pc-qr { box-shadow: none; border-color: var(--brand-line); }
}

@media (max-width: 520px) {
  .grid2 { grid-template-columns: 1fr; }
  .biz h1 { font-size: 22px; }
}
