/* Shree Jagannath Temple Bengaluru — booking app (devotee pages)
   Large type, high contrast, big tap targets: designed for elderly devotees on phones. */

:root {
  --maroon: #7a1d1d;
  --maroon-dark: #521010;
  --saffron: #d9701a;
  --turmeric: #f2bd2c;
  --cream: #fbf5e9;
  --paper: #fffdf8;
  --ink: #2a1b12;
  --muted: #5f4a3c;
  --line: #e3d3bb;
  --focus: #1b5fb5;
  --ok: #1d6b38;   --ok-bg: #e7f4ea;
  --warn: #7f5200; --warn-bg: #fff3d6;
  --bad: #a3221e;  --bad-bg: #fbe7e5;
  --info: #1d4b78; --info-bg: #e6eff8;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(60, 30, 10, .06), 0 4px 16px rgba(60, 30, 10, .06);
  --serif: Georgia, "Noto Serif", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  height: 100%;
}
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font: 18px/1.55 var(--sans);
  overflow-x: clip;
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--maroon); text-underline-offset: 3px; }
a:hover { color: var(--maroon-dark); }
h1, h2, h3, .h3 { font-family: var(--serif); line-height: 1.25; color: var(--maroon-dark); margin: 0 0 .5em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; }
h3, .h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pre { white-space: pre-line; }
.center { text-align: center; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.skip-link { position: absolute; left: -999px; top: 0; background: #fff; padding: .6rem 1rem; z-index: 10; }
.skip-link:focus { left: 1rem; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
main.wrap {
  flex: 1 0 auto;
  width: 100%;
  padding-top: 20px;
  padding-bottom: 32px;
}
main:focus { outline: none; }

/* ---------- header / footer */
.site-header {
  flex: none;
  background: var(--maroon); color: #fff;
  border-bottom: 5px solid var(--turmeric);
  box-shadow: inset 0 -9px 0 -5px var(--saffron);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.brand img { flex: none; background: var(--paper); border-radius: 50%; padding: 3px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; line-height: 1.25; overflow-wrap: anywhere; }
.brand-sub { font-size: .8rem; opacity: .9; line-height: 1.3; }
.site-nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.site-nav a {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  color: #fff; text-decoration: none; line-height: 1.25;
  padding: .5rem .75rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); font-size: .95rem;
}
.site-nav a:hover { background: rgba(255,255,255,.12); color: #fff; }

@media (max-width: 720px) {
  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding-bottom: 14px;
  }
  .brand { width: 100%; }
  .site-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .site-nav a {
    min-height: 44px;
    padding: .45rem .55rem;
    font-size: .875rem;
    border-radius: 12px;
  }
}

@media (max-width: 380px) {
  .site-nav {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Laptop / tablet desktop: restore header row + pill nav (overrides phone grid) */
@media (min-width: 721px) {
  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
  }
  .brand { width: auto; }
  .site-nav {
    width: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    grid-template-columns: unset;
  }
  .site-nav a {
    min-height: 0;
    border-radius: 999px;
    font-size: .95rem;
    padding: .5rem .75rem;
  }
}

/* Tablet: two home cards per row; third centered */
@media (min-width: 481px) and (max-width: 719px) {
  .home-paths { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-paths > li:last-child:nth-child(3) {
    grid-column: 1 / -1;
    max-width: 22rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
}

.site-footer {
  flex: none;
  margin-top: auto;
  background: var(--maroon-dark); color: #f6e7d2; padding: 24px 0; font-size: .95rem; text-align: center;
}
.site-footer a { color: #ffe3a6; }
.site-footer p { margin: .3em 0; }
.jai { font-family: var(--serif); color: var(--turmeric); letter-spacing: .05em; }

/* ---------- cards, alerts */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0 0 20px; box-shadow: var(--shadow); }
.card.inset { box-shadow: none; background: #fffaf0; margin-top: 16px; }
.card.subtle { background: transparent; box-shadow: none; }
.card.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }
.lead { font-size: 1.08rem; color: var(--muted); }
.hint { color: var(--muted); font-size: .92rem; margin: .3em 0 0; }
.sub { display: block; color: var(--muted); font-size: .9rem; }
.req { color: var(--bad); font-weight: 400; font-size: .85rem; }
.opt { color: var(--muted); font-weight: 400; font-size: .85rem; }

.alert { border-radius: 10px; padding: 14px 16px; margin: 0 0 16px; border: 1px solid; }
.alert-ok, .alert-success { background: var(--ok-bg); border-color: #b5dcc0; color: #12401f; }
.alert-warn { background: var(--warn-bg); border-color: #f0d38f; color: #4d3200; }
.alert-error, .alert-bad { background: var(--bad-bg); border-color: #efbcb7; color: #6e1411; }
.alert-info { background: var(--info-bg); border-color: #b8cfe6; color: #12304d; }
.callout { background: #fff7e2; border-left: 5px solid var(--turmeric); padding: 12px 16px; border-radius: 8px; margin: 16px 0; }

.badge { display: inline-block; padding: .2em .65em; border-radius: 999px; font-size: .88rem; font-weight: 600; border: 1px solid transparent; }
.badge-ok { background: var(--ok-bg); color: var(--ok); border-color: #b5dcc0; }
.badge-warn { background: var(--warn-bg); color: var(--warn); border-color: #f0d38f; }
.badge-bad { background: var(--bad-bg); color: var(--bad); border-color: #efbcb7; }
.badge-info { background: var(--info-bg); color: var(--info); border-color: #b8cfe6; }
.tag { display: inline-block; font-size: .8rem; background: #f5e9d6; color: var(--muted); border-radius: 6px; padding: .1em .5em; margin-left: .4em; }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 48px; padding: .6rem 1.2rem; border-radius: 10px;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  border: 2px solid var(--maroon); background: var(--paper); color: var(--maroon);
}
.btn:hover { background: #f8ecdc; color: var(--maroon-dark); }
.btn-primary { background: var(--maroon); color: #fff; }
.btn-primary:hover { background: var(--maroon-dark); color: #fff; border-color: var(--maroon-dark); }
.btn-secondary { background: var(--paper); }
.btn-lg { min-height: 56px; font-size: 1.1rem; padding: .7rem 1.5rem; }
.btn-small { min-height: 38px; font-size: .9rem; padding: .35rem .8rem; }
.btn-icon { min-width: 48px; padding: 0; font-size: 1.5rem; }
.btn[disabled] { opacity: .6; cursor: progress; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- home menu (Book Prasad / Puja / Find) */
.home-menu { padding: 8px 0 28px; }
.home-menu-head { text-align: center; margin-bottom: 28px; }
.home-menu-head h1 { font-size: clamp(1.65rem, 4vw, 2.15rem); margin-bottom: .35em; }
.home-menu-lead { color: var(--muted); font-size: 1.05rem; margin: 0; }
.home-paths {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 16px;
}
@media (min-width: 720px) {
  .home-paths { grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
}
.path-card {
  display: flex; flex-direction: column; gap: 10px; height: 100%;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 20px 18px; text-decoration: none; color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.path-card:hover, .path-card:focus-visible {
  border-color: var(--maroon); box-shadow: 0 4px 18px rgba(42, 27, 18, .08);
}
.path-card-title {
  font: 700 1.2rem/1.25 var(--serif); color: var(--maroon-dark);
}
.path-card-desc {
  flex: 1; color: var(--muted); font-size: .98rem; line-height: 1.45; margin: 0;
}
.path-card-action {
  font-weight: 700; color: var(--maroon); font-size: 1rem; margin-top: 4px;
}
.form-back { margin: 0 0 12px; font-size: .95rem; }
.home-how { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.home-how h2 { font-size: 1.25rem; }
.how-steps { padding-left: 1.3em; }
.how-steps li { margin-bottom: .5em; }
.price { font-weight: 700; color: var(--maroon-dark); }

/* ---------- progress indicator */
.progress { margin: 0 0 20px; }
.progress ol { list-style: none; display: flex; padding: 0; margin: 0; counter-reset: s; }
.progress li { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; text-align: center; font-size: .82rem; color: var(--muted); }
.progress li::before { content: ""; position: absolute; top: 17px; left: -50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.progress li:first-child::before { display: none; }
.progress li.done::before, .progress li.current::before { background: var(--saffron); }
.progress .dot { position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 2px solid var(--line); font-weight: 700; color: var(--muted); }
.progress li.done .dot { background: var(--saffron); border-color: var(--saffron); color: #fff; }
.progress li.current .dot { background: var(--maroon); border-color: var(--maroon); color: #fff; box-shadow: 0 0 0 4px rgba(122, 29, 29, .15); }
.progress li.current { color: var(--maroon-dark); font-weight: 700; }
.progress .lbl { margin-top: 4px; }
.progress-text { display: none; text-align: center; font-weight: 600; color: var(--maroon-dark); margin: 8px 0 0; }
@media (max-width: 620px) {
  .progress .lbl { display: none; }
  .progress-text { display: block; }
  .progress .dot { width: 30px; height: 30px; font-size: .9rem; }
  .progress li::before { top: 14px; }
}

/* ---------- forms */
fieldset { border: 0; margin: 0 0 20px; min-width: 0; }
legend { padding: 0; margin-bottom: .5em; width: 100%; }
legend h1, legend h2 { margin: 0; }
.field { margin: 0 0 18px; }
.field label, .coupon-qty label { display: block; font-weight: 600; margin-bottom: 6px; }
input[type=text], input:not([type]), input[type=tel], input[type=email], input[type=number], input[type=date], input[type=password], select, textarea {
  width: 100%; min-height: 52px; padding: .65rem .8rem;
  font: 1.05rem/1.4 var(--sans); color: var(--ink);
  background: #fff; border: 2px solid #b9a68e; border-radius: 10px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: 3px solid rgba(27, 95, 181, .25); outline-offset: 0; }
.has-error input, .has-error select, .has-error textarea, [aria-invalid="true"] { border-color: var(--bad); background: #fffafa; }
.field-error { color: var(--bad); font-weight: 600; font-size: .95rem; margin: 6px 0 0; }
.field-error::before { content: "⚠ "; }
.field-narrow { max-width: 280px; }
.grid-2 { display: grid; gap: 0 20px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.stack > * + * { margin-top: 0; }

.check-row { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; margin-bottom: 14px; }
.check-row.has-error { border-color: var(--bad); }
.check-row.wa-opt { border-color: var(--ok); background: var(--ok-bg); }
.check-row.wa-opt input[type=checkbox] { accent-color: var(--ok); }
input[type=checkbox],
input[type=radio] { width: 26px; height: 26px; flex: none; margin: 2px 0 0; accent-color: var(--maroon); }

.service-options { display: grid; gap: 12px; }
@media (min-width: 720px) { .service-options { grid-template-columns: 1fr 1fr; } }
.option-card { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 2px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.option-card:hover { border-color: #c9a77e; }
.option-card:has(input:checked) { border-color: var(--maroon); background: #fff6ea; box-shadow: 0 0 0 3px rgba(122, 29, 29, .12); }
.option-card.option-unavailable { border-color: rgba(163, 34, 30, .45); background: var(--bad-bg); cursor: not-allowed; }
.option-card.option-unavailable:has(input:checked) { box-shadow: 0 0 0 3px rgba(163, 34, 30, .15); }
.option-card .service-availability { width: 100%; margin-top: 10px; }
.option-card.option-food { border-style: dashed; }
.option-body { display: flex; flex-direction: column; gap: 4px; }
.option-title { font-weight: 700; font-size: 1.08rem; color: var(--maroon-dark); }
.option-desc { color: var(--muted); font-size: .92rem; }
.option-meta { font-size: .95rem; }

.service-panel { border-top: 2px dashed var(--line); padding-top: 14px; margin-top: 8px; }
.service-panel h3 { font-size: 1.1rem; }
.js .service-panel[data-inactive] { display: none; }
.js .service-panel.panel-unavailable {
  padding: 12px 14px; margin: 0 0 16px; border-radius: 12px;
  background: var(--bad-bg); border: 2px solid rgba(163, 34, 30, .25);
}
.js .step-availability-blocked .grid-2 > .field:not(:has(#service_date)),
.js .step-availability-blocked .wa-opt,
.js .step-availability-blocked .service-panel.panel-unavailable,
.js .step-availability-blocked > .field:last-of-type { opacity: .92; }
input:disabled, select:disabled, textarea:disabled, button:disabled {
  cursor: not-allowed; opacity: .72; background: #f3ece0;
}
.service-panel .slot-note { font-size: .9rem; color: var(--muted); }

.coupons { display: grid; gap: 12px; }
.coupon { border: 2px solid var(--line); border-radius: 12px; padding: 14px; background: #fff; }
.coupon:has(input[type=checkbox]:checked) { border-color: var(--saffron); background: #fffaf0; }
.coupon.has-error { border-color: var(--bad); }
.coupon-head { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.coupon-qty { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; padding-left: 38px; }
.coupon-qty label { margin: 0; width: 100%; font-weight: 500; }
.coupon-availability { width: 100%; margin-top: 4px; }
.coupon-stat-grid { display: grid; gap: 8px; margin-top: 4px; }
@media (min-width: 520px) {
  .coupon-stat-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}
.coupon-stat { background: var(--cream, #faf6ef); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.coupon-stat-k { display: block; font-size: 12px; font-weight: 600; color: var(--ink-soft, #5c4a3a); margin-bottom: 2px; }
.coupon-stat-v { display: block; font-size: 14px; font-weight: 600; color: var(--ink, #2a1b12); line-height: 1.35; }
.coupon-stat-live.is-loading .coupon-stat-v { color: var(--ink-soft, #5c4a3a); font-weight: 500; }
.booking-schedule { margin: 0 0 1rem; }
.booking-schedule-kv { margin-bottom: .75rem; }
.booking-schedule-heading { margin: 0 0 .5rem; font-size: 1rem; color: var(--maroon-dark); }
.booking-schedule-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.booking-schedule-item {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px;
  padding: 10px 12px; border-radius: 10px; background: var(--cream, #faf6ef); border: 1px solid var(--line);
}
.booking-schedule-item.is-cancelled { opacity: .85; background: #f8f0ee; }
.booking-schedule-name { font-weight: 700; color: var(--ink, #2a1b12); }
.booking-schedule-time { font-weight: 600; color: var(--maroon-dark); }
.booking-schedule-badge { margin-left: auto; }
.review-live-limits { margin-top: 12px; }
.review-live-limits .review-limit-line { margin: 0 0 6px; font-size: 14px; line-height: 1.4; }
.review-live-limits .review-limit-line:last-child { margin-bottom: 0; }
.coupon-status { width: 100%; margin: 10px 0 0; border-radius: 8px; font-size: 13px; font-weight: 600; line-height: 1.4; padding: 8px 10px; }
.coupon-status[hidden] { display: none !important; }
.coupon .btn-icon:disabled { opacity: .45; cursor: not-allowed; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper input { width: 90px; text-align: center; font-size: 1.2rem; font-weight: 700; }
.line-total { font-weight: 700; color: var(--maroon-dark); font-size: 1.05rem; }
.js [data-coupons][data-collapsed] { display: none; }

.estimate { margin-top: 18px; background: #fff7e2; border: 1px solid #f0d38f; border-radius: 12px; padding: 14px 16px; }
.estimate dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 0 0 8px; }
.estimate dd { margin: 0; text-align: right; font-weight: 600; }
.estimate-total { font-size: 1.15rem; margin: 0; }

.step-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.step-nav .btn-primary { margin-left: auto; }
.js .booking-form .step:not(.is-current) { display: none; }

.error-summary { border: 3px solid var(--bad); background: var(--bad-bg); border-radius: 12px; padding: 14px 18px; margin-bottom: 20px; }
.error-summary h2 { color: var(--bad); font-size: 1.15rem; }
.error-summary ul { margin: 0; padding-left: 1.2em; }
.error-summary a { color: var(--bad); font-weight: 600; }

/* ---------- tables & summaries */
table.items { width: 100%; border-collapse: collapse; margin: 8px 0 12px; font-size: 1rem; }
table.items th, table.items td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.items thead th { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
table.items .num { text-align: right; white-space: nowrap; }
table.items tfoot th { text-align: right; font-weight: 600; }
table.items tr.grand th, table.items tr.grand td { font-size: 1.2rem; font-weight: 800; color: var(--maroon-dark); border-top: 2px solid var(--maroon); border-bottom: 0; }
@media (max-width: 560px) {
  table.items thead th:nth-child(2), table.items tbody td:nth-child(2) { display: none; }
  table.items tfoot th { padding-left: 0; }
  table.items tfoot th[colspan] { }
}

.summary-grid { display: grid; gap: 8px 24px; }
@media (min-width: 720px) { .summary-grid { grid-template-columns: 1fr 1fr; } }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 12px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

.status-grid { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 12px 0; }
.status-grid dt { font-size: .85rem; color: var(--muted); }
.status-grid dd { margin: 2px 0 0; }

/* ---------- booking number / pay */
.booking-no-label { margin: 0; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.booking-no { font: 800 1.9rem/1.2 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; color: var(--maroon-dark); margin: 2px 0 8px; letter-spacing: .02em; overflow-wrap: anywhere; }
.status-card { border-top: 8px solid var(--info); }
.status-card.status-ok { border-top-color: var(--ok); }
.status-card.status-warn { border-top-color: var(--turmeric); }
.status-card.status-bad { border-top-color: var(--bad); }
.status-title { margin-top: 14px; }

.pay-card .pay-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.amount { font: 800 2.2rem/1.1 var(--sans); color: var(--maroon-dark); margin: 2px 0 0; }
.qr-layout { display: grid; gap: 20px; margin-top: 16px; align-items: start; }
@media (min-width: 760px) { .qr-layout { grid-template-columns: 320px 1fr; } }
.qr-box { margin: 0; background: #fff; border: 3px solid var(--maroon); border-radius: 16px; padding: 14px; text-align: center; }
.qr-box .qr { width: 100%; max-width: 280px; margin: 0 auto; display: block; background: #fff; }
.qr-box .qr svg { width: 100%; height: auto; display: block; }
.qr-box .qr svg .dark, .qr-box .qr svg path { fill: #000; }
.qr-box figcaption { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; font-weight: 600; }
.qr-amount { font-size: 1.6rem; font-weight: 800; color: var(--maroon-dark); }
.pay-steps { padding-left: 1.3em; }
.pay-steps li { margin-bottom: .5em; }
.upi-link { display: none; }
.is-mobile .upi-link { display: inline-flex; }

@media print {
  .site-header, .site-footer, .progress, .actions, .btn, form { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 0; }
}

/* Fieldset legends render on the border by default; keep step headings inside the card. */
fieldset.card > legend { float: left; width: 100%; padding-top: 2px; }
fieldset.card > legend + * { clear: both; }

/* Availability alert when a chosen date is closed or full */
.avail-dialog:not([open]) { display: none; }
.avail-dialog {
  border: 0; padding: 0; max-width: min(520px, calc(100vw - 32px));
  border-radius: var(--radius); box-shadow: 0 12px 40px rgba(40, 20, 10, .25);
  background: var(--paper);
}
.avail-dialog::backdrop { background: rgba(42, 27, 18, .55); }
.avail-dialog-inner { padding: 22px 20px 20px; }
.avail-dialog-inner h2 { color: var(--bad); margin-bottom: .75em; }
.avail-dialog-body { margin-bottom: 1.25em; font-size: 1.05rem; line-height: 1.5; }
.avail-dialog-body p { margin: 0 0 .65em; }
.avail-dialog-body ul { margin: 0; padding-left: 1.25em; }
.avail-dialog-lead { font-weight: 600; margin: 0 0 .75em; color: var(--ink, #2a1b12); }
.availability-recovery-hint { margin: 0 0 .75em; font-weight: 600; }
.avail-dialog-body li { margin-bottom: .5em; }
.avail-dialog-inner form,
.avail-dialog-actions { margin: 0; text-align: center; }

/* ERP-style busy overlay (see php/static/js/busy.js) */
.busy-screen { position: fixed; inset: 0; z-index: 80; background: rgba(62, 12, 22, 0.55); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 11vh 20px 20px; }
.busy-screen[hidden] { display: none; }
.busy-card { background: #fff; border-radius: 14px; padding: 22px 24px 26px; width: 360px; max-width: 100%; text-align: center; box-shadow: 0 12px 40px rgba(0,0,0,0.25); }
.busy-logo { width: 72px; height: 72px; object-fit: contain; display: block; margin: 0 auto 14px; }
.busy-card p { margin: 0; font-size: 16px; color: var(--maroon-dark); }
.busy-spin { width: 36px; height: 36px; margin: 0 auto 14px; border: 3px solid #e6dcc8; border-top-color: var(--maroon); border-radius: 50%; animation: busy-spin 0.8s linear infinite; }
@keyframes busy-spin { to { transform: rotate(360deg); } }
body.is-busy { overflow: hidden; }

@media (max-width: 480px) {
  .brand-name { font-size: 0.98rem; }
  .brand-sub { font-size: 0.72rem; line-height: 1.25; }
  .header-inner { padding-top: 8px; padding-bottom: 10px; }
  .step-nav { flex-direction: column; align-items: stretch; }
  .step-nav .btn-primary { margin-left: 0; width: 100%; }
  .pay-card .pay-head { flex-direction: column; align-items: stretch; }
  .amount { font-size: 1.85rem; overflow-wrap: anywhere; }
  dl.kv { grid-template-columns: 1fr; gap: 2px 0; }
  dl.kv dt { margin-top: 6px; }
  .field-narrow { max-width: none; width: 100%; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions .btn { width: 100%; }
  .row-between { flex-direction: column; align-items: stretch; }
}

/* Tablet: prasad coupon cards in two columns when room allows */
@media (min-width: 481px) and (max-width: 900px) {
  .coupons { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

body > #appBusy[hidden] { display: none; }
