/* สไตล์ของระบบจองร่วมบุญ วัดเบญจมบพิตรดุสิตวนารามราชวรวิหาร */

/* ============================================================
   ระบบจองร่วมบุญ — วัดเบญจมบพิตรดุสิตวนารามราชวรวิหาร
   โทนสีถอดจากแผ่นประชาสัมพันธ์: ชมพูกลีบบัว / แดงเลือดหมู / ทอง
   ============================================================ */

:root {
  --rose-50:  #fdf4f6;
  --rose-100: #fbe9ee;
  --rose-200: #f6d3dc;
  --rose-300: #efb9c7;

  --maroon:      #8c1d2a;
  --maroon-dark: #6b1320;
  --maroon-soft: #a8384a;

  --gold:       #c9a227;
  --gold-light: #e8c96a;
  --gold-pale:  #f3e3b4;

  --cream:   #fffaf2;
  --cream-2: #f8efdd;

  --ink:   #3b2512;
  --muted: #8a6b43;
  --line:  #e6d3b4;

  --ok: #1b5e20;
  --warn: #8a4b00;
  --err: #b3261e;

  --radius: 18px;
  --shadow-sm: 0 2px 8px rgba(109, 20, 32, .07);
  --shadow:    0 10px 30px rgba(109, 20, 32, .12);
  --shadow-lg: 0 20px 50px rgba(109, 20, 32, .18);
  --sans: 'Sarabun', 'Noto Sans Thai', Tahoma, sans-serif;
  --serif: 'Noto Serif Thai', 'Sarabun', Tahoma, serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--rose-100);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* พื้นหลังไล่สีกลีบบัวแบบนุ่ม ๆ เลียนแบบแผ่นประชาสัมพันธ์ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1100px 560px at 8% -6%,  rgba(255,255,255,.95), transparent 62%),
    radial-gradient(900px 520px at 100% 4%,  rgba(239,185,199,.55), transparent 60%),
    radial-gradient(900px 620px at 50% 108%, rgba(243,205,214,.65), transparent 62%),
    linear-gradient(170deg, var(--rose-100), var(--rose-200));
}

h1, h2, h3, .serif { font-family: var(--serif); font-weight: 700; letter-spacing: .01em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px 140px; }

/* ---------- ส่วนหัว ---------- */

.topbar {
  background: linear-gradient(135deg, var(--maroon), var(--maroon-dark));
  color: #fff;
  padding: 10px 16px;
  font-size: 13px;
  text-align: center;
  letter-spacing: .02em;
  position: relative;
}
/* ลิงก์กลับหน้าแรก วางไว้ในแถบบนของทุกหน้า */
.topbar .home {
  color: var(--gold-pale); text-decoration: none; white-space: nowrap;
  border-bottom: 1px solid rgba(243,224,168,.45); padding-bottom: 1px;
}
.topbar .home:hover { color: #fff; border-color: #fff; }
.topbar .sep { opacity: .5; margin: 0 8px; }
.topbar::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-light), var(--gold), var(--gold-light), transparent);
}

.hero { text-align: center; padding: 30px 16px 8px; }

/* ป้ายทองกรอบโค้งแบบในโปสเตอร์ */
.plaque {
  display: inline-block;
  max-width: 880px;
  padding: 20px 34px;
  background: linear-gradient(160deg, #f7e6bd, #e8c96a 48%, #d9b14f);
  border: 3px solid var(--maroon);
  border-radius: 26px 26px 22px 22px / 34px 34px 22px 22px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.65);
  position: relative;
}
.plaque::before {
  content: '';
  position: absolute; inset: 5px;
  border: 1px solid rgba(140,29,42,.45);
  border-radius: 20px;
  pointer-events: none;
}
.plaque .eyebrow { font-size: 14px; color: #6b1320; margin-bottom: 2px; }
.plaque h1 {
  margin: 2px 0;
  font-size: clamp(19px, 4.4vw, 30px);
  color: var(--maroon-dark);
  line-height: 1.45;
  text-shadow: 0 1px 0 rgba(255,255,255,.5);
  /* จัดความยาวแต่ละบรรทัดให้สมดุล กันคำสั้น ๆ ตกไปอยู่บรรทัดสุดท้ายลำพัง */
  text-wrap: balance;
}
.plaque .temple { font-size: clamp(14px, 3vw, 17px); color: #7a2b18; font-weight: 600; }

/* ภาพองค์พระบนหัวหน้าเว็บ */
.hero-art { margin: 20px auto 4px; max-width: 760px; }
.hero-art img {
  width: 100%; height: auto; display: block;
  border-radius: 18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(201,162,39,.35);
}
.hero-art figcaption {
  font-size: 12.5px; color: var(--muted); margin-top: 8px; line-height: 1.7;
}

.hero .purpose {
  max-width: 720px;
  margin: 16px auto 0;
  font-size: 15px;
  color: #6d4a2f;
  line-height: 1.85;
}

.edition-chip {
  display: inline-block;
  margin-top: 16px; padding: 9px 20px;
  background: rgba(255,255,255,.82);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px; color: var(--maroon);
  box-shadow: var(--shadow-sm);
}
.edition-chip b { font-family: var(--serif); }

/* ---------- ตัวบอกขั้นตอน ---------- */

.steps {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin: 26px auto 20px; flex-wrap: wrap;
}
.step { display: flex; align-items: center; gap: 8px; }
.step .dot {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; border: 2px solid var(--line);
  color: var(--muted); font-weight: 700; font-size: 14px;
  transition: .25s;
}
.step .lbl { font-size: 13px; color: var(--muted); }
.step.active .dot { background: var(--maroon); border-color: var(--maroon); color: #fff; }
.step.active .lbl { color: var(--maroon); font-weight: 700; }
.step.done .dot { background: var(--gold); border-color: var(--gold); color: #fff; }
.step .bar { width: 26px; height: 2px; background: var(--line); }
@media (max-width: 560px) { .step .lbl { display: none; } .step .bar { width: 18px; } }

/* ---------- การ์ด ---------- */

.card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 18px;
}
.card > h2 {
  margin: 0 0 4px;
  font-size: 20px; color: var(--maroon);
  display: flex; align-items: center; gap: 10px;
}
.card > h2::before {
  content: ''; width: 5px; height: 22px; border-radius: 3px;
  background: linear-gradient(var(--gold), var(--maroon));
}
.card .sub { color: var(--muted); font-size: 14px; margin: 0 0 16px; }

.layout { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 1000px) {
  .layout { grid-template-columns: 1fr 340px; align-items: start; }
  .side { position: sticky; top: 18px; }
}

/* ---------- การ์ดองค์พระ ---------- */

.group-title {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0 12px; font-family: var(--serif); font-size: 17px;
}
.group-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.badge-finish {
  padding: 5px 16px; border-radius: 999px; color: #fff; font-size: 14px;
  box-shadow: var(--shadow-sm);
}
.badge-finish.gold   { background: linear-gradient(135deg, #a8243a, #7c1322); }
.badge-finish.polish { background: linear-gradient(135deg, #a07320, #6d4a12); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }

.item {
  position: relative;
  background: linear-gradient(170deg, #fffdf8, var(--cream-2));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 16px 14px;
  text-align: center;
  transition: .2s;
}
.item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.item.picked { border-color: var(--maroon); box-shadow: 0 0 0 2px rgba(140,29,42,.14), var(--shadow); }
.item.sold { opacity: .55; filter: grayscale(.3); }

.size-ring {
  width: 62px; height: 62px; margin: 0 auto 10px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 26px; color: #fff;
  box-shadow: inset 0 -3px 8px rgba(0,0,0,.18), var(--shadow-sm);
}
.item.gold   .size-ring { background: radial-gradient(circle at 32% 28%, #c8475a, #8c1d2a 70%); }
.item.polish .size-ring { background: radial-gradient(circle at 32% 28%, #d4a74a, #8a6418 70%); }
.size-unit { font-size: 12px; color: var(--muted); margin-top: -8px; }

.item .name { font-size: 14px; color: var(--muted); margin: 6px 0 2px; }
.item .price { font-family: var(--serif); font-size: 21px; color: var(--maroon); }
.item .price small { font-size: 12px; color: var(--muted); font-weight: 400; font-family: var(--sans); }
.item .left { font-size: 12px; margin-top: 4px; min-height: 18px; }
.item .left.few { color: var(--err); font-weight: 600; }
.item .left.ok { color: var(--muted); }

.stepper {
  display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px;
}
.stepper button {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--maroon); background: #fff; color: var(--maroon);
  font-size: 20px; line-height: 1; cursor: pointer; transition: .15s;
  display: grid; place-items: center;
}
.stepper button:hover:not(:disabled) { background: var(--maroon); color: #fff; }
.stepper button:disabled { opacity: .3; cursor: not-allowed; }
.stepper .qty { min-width: 34px; font-family: var(--serif); font-size: 20px; }

.sold-tag {
  position: absolute; top: 10px; right: 10px;
  background: #777; color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 999px;
}

/* ---------- ฟอร์ม ---------- */

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field label .req { color: var(--err); }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; line-height: 1.6; }

input[type=text], input[type=tel], input[type=email], input[type=number],
input[type=datetime-local], textarea, select {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--sans); font-size: 16px; color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  transition: .18s;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--maroon);
  box-shadow: 0 0 0 3px rgba(140,29,42,.12);
}
input.bad, textarea.bad { border-color: var(--err); background: #fff6f5; }
textarea { resize: vertical; min-height: 86px; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 620px) { .row2 { grid-template-columns: 1fr; gap: 0; } }

.choice { display: grid; gap: 10px; }
.choice label {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 13px;
  background: #fff; cursor: pointer; font-weight: 500; transition: .15s;
}
.choice label:hover { border-color: var(--gold); }
.choice input { margin-top: 4px; accent-color: var(--maroon); width: 18px; height: 18px; flex: none; }
.choice label.on { border-color: var(--maroon); background: #fff7f8; box-shadow: 0 0 0 2px rgba(140,29,42,.1); }
.choice .t { font-weight: 700; display: block; }
.choice .d { font-size: 13px; color: var(--muted); font-weight: 400; }

.honey { position: absolute; left: -9999px; opacity: 0; height: 0; }

/* ---------- ยอดร่วมบุญ ---------- */

.amount-box {
  background: linear-gradient(170deg, #fffdf8, var(--cream-2));
  border: 1px solid var(--line); border-radius: 16px; padding: 18px;
}

/* แถวยอดเงิน: ซ้ายคือชื่อรายการ ขวาคือจำนวน */
.amount-row {
  display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center;
  padding: 13px 0; border-bottom: 1px dashed var(--line);
}
.amount-row:first-child { padding-top: 4px; }
.amount-label .t { display: block; font-weight: 700; font-size: 15px; }
.amount-label .d { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.6; }
.amount-field { display: flex; align-items: baseline; gap: 8px; }
.amount-field input {
  width: 150px; text-align: right;
  font-family: var(--serif); font-size: 24px; font-weight: 700; color: var(--maroon);
  padding: 8px 12px;
}
.amount-fixed {
  min-width: 150px; text-align: right; padding: 8px 12px;
  font-family: var(--serif); font-size: 24px; font-weight: 700; color: var(--maroon);
  background: #fff6e8; border: 1.5px solid var(--line); border-radius: 12px;
}
.amount-field .unit { font-size: 15px; color: var(--muted); }
@media (max-width: 560px) {
  .amount-row { grid-template-columns: 1fr; gap: 6px; }
  .amount-field { justify-content: flex-end; }
  .amount-field input, .amount-fixed { width: 100%; min-width: 0; flex: 1; }
}

.amount-total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 14px; padding-top: 14px; border-top: 2px solid var(--gold);
}
.amount-total .n { font-size: 15px; color: var(--muted); font-weight: 600; }
.amount-total .v { font-family: var(--serif); font-size: 28px; color: var(--maroon); }

.quick { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.quick button {
  border: 1.5px solid var(--gold); background: #fff; color: #8a6418;
  padding: 7px 16px; border-radius: 999px; cursor: pointer; font-family: var(--sans); font-size: 14px;
  transition: .15s;
}
.quick button:hover { background: var(--gold); color: #fff; }

/* ---------- ธนาคาร / QR ---------- */

.bank {
  background: #fff; border: 1.5px dashed var(--gold); border-radius: 16px; padding: 18px;
  display: grid; grid-template-columns: 1fr; gap: 16px; align-items: center;
}
@media (min-width: 680px) { .bank.has-qr { grid-template-columns: 200px 1fr; } }
.bank .qr {
  width: 100%; max-width: 200px; margin: 0 auto; aspect-ratio: 1;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  display: grid; place-items: center; overflow: hidden;
}
.bank .qr img { width: 100%; height: 100%; object-fit: contain; }
.bank .qr .ph { font-size: 13px; color: var(--muted); text-align: center; padding: 12px; }
.bank-head { display: flex; align-items: center; gap: 10px; }
.bank-logo {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  box-shadow: 0 2px 6px rgba(0,0,0,.14);
}
.bank .bname { font-family: var(--serif); font-size: 19px; color: var(--maroon); }
.pay-breakdown { font-size: 12.5px; color: var(--muted); line-height: 1.9; margin-top: 6px; }
.pay-breakdown span { display: block; }

.fee-tag {
  font-style: normal; font-size: 12px; font-weight: 600;
  background: var(--gold-pale); color: #6d5212;
  padding: 2px 9px; border-radius: 999px; margin-left: 6px; white-space: nowrap;
}
.bank .acc-label { font-size: 13px; color: var(--muted); margin-top: 8px; }
.acc-no {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px;
}
.acc-no .num {
  font-family: var(--serif); font-size: clamp(22px, 5.6vw, 29px);
  letter-spacing: 1px; color: var(--maroon-dark);
}
.btn-copy {
  border: 1.5px solid var(--maroon); background: #fff; color: var(--maroon);
  padding: 6px 15px; border-radius: 999px; cursor: pointer; font-size: 13px; font-family: var(--sans);
  transition: .15s; white-space: nowrap;
}
.btn-copy:hover { background: var(--maroon); color: #fff; }
.btn-copy.done { background: var(--ok); border-color: var(--ok); color: #fff; }

/* ---------- อัปโหลดสลิป ---------- */

.drop {
  border: 2px dashed var(--gold); border-radius: 16px;
  background: #fffdf7; padding: 26px 18px; text-align: center; cursor: pointer; transition: .18s;
}
.drop:hover, .drop.over { background: #fff6e6; border-color: var(--maroon); }
.drop .ico { font-size: 34px; line-height: 1; }
.drop .t { font-weight: 700; margin-top: 8px; }
.drop .d { font-size: 13px; color: var(--muted); }
.drop input { display: none; }
.slip-prev { margin-top: 14px; text-align: center; }
.slip-prev img {
  max-width: 260px; max-height: 340px; width: auto;
  border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.slip-prev .meta { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* ---------- กล่องข้อความ ---------- */

.note {
  border-radius: 12px; padding: 13px 15px; font-size: 14px; line-height: 1.75; margin: 14px 0;
  border-left: 4px solid;
}
.note.gold { background: #fff8e6; border-color: var(--gold); color: #6d5212; }
.note.red  { background: #fdeceb; border-color: var(--err);  color: #8a2017; }
.note.green{ background: #eaf5ec; border-color: var(--ok);   color: #17491b; }
.note.blue { background: #eaf1fb; border-color: #2a5fa5;     color: #1b3f73; }

/* ---------- สรุปรายการ ---------- */

.summary { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; }
.summary h3 { margin: 0 0 12px; font-size: 17px; color: var(--maroon); }
.sum-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0;
  border-bottom: 1px dashed var(--line); font-size: 14px; }
.sum-line:last-of-type { border-bottom: none; }
.sum-line .n { color: var(--muted); }
.sum-total { display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 12px; padding-top: 12px; border-top: 2px solid var(--gold); }
.sum-total .n { font-size: 14px; color: var(--muted); }
.sum-total .v { font-family: var(--serif); font-size: 25px; color: var(--maroon); }
.empty { color: var(--muted); font-size: 14px; text-align: center; padding: 14px 0; }

/* ---------- ปุ่ม ---------- */

.actions { display: flex; gap: 12px; justify-content: space-between; margin-top: 22px; }
.btn {
  border: none; border-radius: 999px; padding: 13px 30px;
  font-family: var(--sans); font-size: 16px; font-weight: 700; cursor: pointer;
  transition: .18s; display: inline-flex; align-items: center; gap: 8px; justify-content: center;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
a.btn, a.btn-copy { text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, var(--maroon), var(--maroon-dark)); color: #fff;
  box-shadow: 0 6px 18px rgba(140,29,42,.3); }
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(140,29,42,.38); }
.btn-ghost { background: #fff; color: var(--maroon); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--maroon); }
.btn-gold { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: #4a3608;
  box-shadow: 0 6px 18px rgba(201,162,39,.32); }
.btn-block { width: 100%; }

/* แถบสรุปล่างจอสำหรับมือถือ */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(255,250,242,.97); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); box-shadow: 0 -6px 22px rgba(109,20,32,.1);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px;
}
.mobile-bar .info { flex: 1; min-width: 0; }
.mobile-bar .l1 { font-size: 12px; color: var(--muted); }
.mobile-bar .l2 { font-family: var(--serif); font-size: 20px; color: var(--maroon); }
.mobile-bar .btn { padding: 12px 22px; font-size: 15px; }
@media (min-width: 1000px) { .mobile-bar { display: none; } .wrap { padding-bottom: 60px; } }

/* ---------- หน้าสำเร็จ ---------- */

.done-wrap { text-align: center; padding: 10px 0 6px; }
.done-mark {
  width: 86px; height: 86px; margin: 0 auto 14px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  display: grid; place-items: center; font-size: 44px; color: #fff;
  box-shadow: 0 10px 26px rgba(201,162,39,.4);
  animation: pop .5s cubic-bezier(.2,1.3,.4,1);
}
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.booking-no {
  display: inline-block; margin: 12px 0;
  padding: 12px 30px; border: 2px dashed var(--gold); border-radius: 14px; background: #fffdf5;
}
.booking-no .l { font-size: 13px; color: var(--muted); }
.booking-no .v { font-family: var(--serif); font-size: 31px; color: var(--maroon); letter-spacing: 1.5px; }

/* ---------- สถานะ ---------- */

.status-pill {
  display: inline-block; padding: 6px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 700;
}
.st-wait   { background: #fff3cd; color: var(--warn); }
.st-verify { background: #ffe8cc; color: #8a4b00; }
.st-ok     { background: #d7f0d7; color: var(--ok); }
.st-ship   { background: #e2d9f3; color: #4a2c7a; }
.st-cancel { background: #f8d7da; color: var(--maroon); }

.timeline { list-style: none; padding: 0; margin: 18px 0 0; }
.timeline li { position: relative; padding: 0 0 20px 32px; }
.timeline li::before {
  content: ''; position: absolute; left: 6px; top: 5px;
  width: 13px; height: 13px; border-radius: 50%;
  background: #fff; border: 2px solid var(--line);
}
.timeline li::after {
  content: ''; position: absolute; left: 12px; top: 20px; bottom: 0; width: 2px; background: var(--line);
}
.timeline li:last-child::after { display: none; }
.timeline li.on::before { background: var(--gold); border-color: var(--gold); }
.timeline li.on .tt { color: var(--maroon); font-weight: 700; }
.timeline li.cur::before { background: var(--maroon); border-color: var(--maroon);
  box-shadow: 0 0 0 4px rgba(140,29,42,.16); }
.timeline .tt { font-size: 15px; }
.timeline .td { font-size: 13px; color: var(--muted); }

/* ---------- ท้ายหน้า ---------- */

.footer { text-align: center; padding: 26px 16px 10px; font-size: 13.5px; color: #6d4a2f; line-height: 1.95; }
.footer .blessing {
  max-width: 680px; margin: 0 auto 18px; font-family: var(--serif); font-size: 15px; color: var(--maroon-dark);
}
.footer .contacts { background: rgba(255,255,255,.7); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 18px; max-width: 620px; margin: 0 auto; }
.footer .contacts .h { font-weight: 700; color: var(--maroon); margin-bottom: 6px; }

/* ---------- อื่น ๆ ---------- */

.hidden { display: none !important; }
.center { text-align: center; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(59,37,18,.45); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 20px;
}
.overlay .box {
  background: var(--cream); border-radius: var(--radius); padding: 28px 30px;
  text-align: center; box-shadow: var(--shadow-lg); max-width: 380px;
}
.overlay .ring {
  width: 44px; height: 44px; margin: 0 auto 14px; border-radius: 50%;
  border: 3px solid var(--rose-200); border-top-color: var(--maroon);
  animation: spin .8s linear infinite;
}

.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 96px; z-index: 95;
  background: var(--ink); color: #fff; padding: 11px 22px; border-radius: 999px;
  font-size: 14px; box-shadow: var(--shadow-lg);
  animation: rise .25s ease;
}
.toast.err { background: var(--err); }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 12px); } }

@media print {
  body::before, .mobile-bar, .actions, .steps, .topbar { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ccc; }
}
