*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--body); font: 16px/1.55 var(--font-sans); }
h1, h2, h3 { font-family: var(--font-serif); color: var(--terracotta-dark); line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; color: var(--ink); }
p { margin: 0 0 1rem; }
a { color: var(--terracotta); }
img, video { max-width: 100%; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--gold-text); margin-bottom: .25rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.page { padding-top: 24px; padding-bottom: 64px; }
.page-narrow { max-width: 560px; margin: 0 auto; }

/* ---------- header ---------- */
.site-header { background: var(--terracotta); color: #fff; border-bottom: 3px solid var(--gold); position: sticky; top: 0; z-index: 20; }
.site-header .container { display: flex; align-items: center; gap: 16px; min-height: 58px; flex-wrap: wrap; }
.brand { font: 700 1.25rem var(--font-serif); color: #fff; text-decoration: none; display: flex; gap: 8px; align-items: center; }
.brand .lotus { color: var(--gold-soft); }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav a { color: #fff; text-decoration: none; padding: 10px 12px; border-radius: 8px; }
.nav a:hover { background: rgba(0, 0, 0, .14); }
.nav a[aria-current='page'] { background: rgba(0, 0, 0, .22); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.bell { position: relative; color: #fff; text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: 1.15rem; }
.bell:hover { background: rgba(0, 0, 0, .14); }
.bell .count { position: absolute; top: 2px; right: 2px; background: var(--gold); color: var(--ink); border-radius: 999px; font: 700 .7rem/1 var(--font-sans); padding: 3px 5px; }
.site-header .btn { min-height: 38px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 2px solid transparent; font: 600 1rem var(--font-sans); cursor: pointer; text-decoration: none; background: var(--terracotta); color: #fff; transition: filter .15s; }
.btn:hover { filter: brightness(1.07); }
.btn:disabled, .btn[aria-disabled='true'] { opacity: .55; cursor: not-allowed; filter: none; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--terracotta); border-color: var(--terracotta); }
.site-header .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .7); }
.btn-danger { background: #a63a30; }
.btn-green { background: var(--green); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .9rem; }
.qr-details { margin: 14px 0 4px; }
.qr-details summary { cursor: pointer; color: var(--terracotta); font-weight: 600; min-height: 44px; display: flex; align-items: center; justify-content: center; }
.btn-block + .qr-details { margin-top: 8px; }
.btn-block { width: 100%; }

/* ---------- cards & layout ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 16px; }
.grid > .card, .grid > .card + .card { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.hero { background: linear-gradient(135deg, var(--cream), #f9efdc); border-bottom: 1px solid var(--line); }
.hero .container { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; align-items: center; padding-top: 40px; padding-bottom: 40px; }
.hero .lead { font: italic 1.2rem var(--font-serif); color: var(--ink); }
.hero svg { width: 100%; max-width: 280px; margin: 0 auto; display: block; }
@media (max-width: 720px) { .hero .container { grid-template-columns: 1fr; } .hero svg { max-width: 120px; order: -1; } }

.choice { display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice .box { border: 2px solid var(--line); border-radius: var(--radius); background: #fff; padding: 14px 16px; transition: border-color .15s, background .15s; height: 100%; }
.choice input:checked + .box { border-color: var(--terracotta); background: #fdf1ec; }
.choice input:focus-visible + .box { outline: 3px solid var(--gold); outline-offset: 2px; }
.choice .title { font-weight: 700; color: var(--ink); display: flex; justify-content: space-between; gap: 8px; }
.price { font: 700 1.1rem var(--font-serif); color: var(--terracotta-dark); }

.steps { counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--gold-soft); color: var(--terracotta-dark); font-weight: 700; margin-bottom: 8px; }
.steps li strong { display: block; margin-bottom: 4px; }

/* ---------- forms ---------- */
.field { margin-bottom: 16px; }
.field label, .field .label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field .hint { font-size: .85rem; color: var(--muted); margin-top: 4px; }
input[type='text'], input[type='email'], input[type='password'], input[type='tel'], input[type='date'], input[type='search'], input[type='number'], input[type='url'], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid #d9c9ad; border-radius: var(--radius-sm); background: #fff; font: inherit; color: var(--ink);
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--terracotta); outline: 3px solid rgba(201, 154, 59, .35); }
.phone-input { display: flex; }
.phone-input .prefix { display: grid; place-items: center; padding: 0 14px; background: var(--cream); border: 1.5px solid #d9c9ad; border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); font-weight: 600; color: var(--ink); }
.phone-input input { flex: 1 1 0%; min-width: 0; width: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.otp-input { font-size: 1.6rem; letter-spacing: .5em; text-align: center; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--terracotta); flex: none; }
.error-text { color: #a63a30; font-weight: 600; min-height: 1.3em; margin: 4px 0 12px; }
.dropzone { border: 2px dashed var(--gold); border-radius: var(--radius); padding: 18px; text-align: center; background: #fffaf0; }
.dropzone img { max-height: 180px; border-radius: 10px; margin: 8px auto 0; display: block; }
.progress { height: 8px; background: var(--cream); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress > div { height: 100%; background: var(--gold); width: 0; transition: width .2s; }

/* ---------- badges, tables, misc ---------- */
.badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.badge--pending, .badge--in_progress, .badge--in_review { background: var(--amber-soft); color: var(--gold-text); }
.badge--confirmed { background: var(--blue-soft); color: var(--blue-text); }
.badge--completed { background: var(--green-soft); color: var(--green-text); }
.badge--cancelled { background: #ece7e0; color: #4a3f35; }
.badge--delivered { background: var(--cream); color: var(--terracotta-dark); }
.badge--rejected { background: var(--red-soft); color: var(--red-text); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th { text-align: left; background: var(--cream); color: var(--ink); font-size: .85rem; padding: 10px 12px; white-space: nowrap; }
td { padding: 11px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #fffaf0; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.pill { border: 0; border-radius: 999px; padding: 8px 16px; background: var(--cream); color: var(--ink); font: 600 .9rem var(--font-sans); cursor: pointer; }
.pill[aria-pressed='true'] { background: var(--terracotta); color: #fff; }
.booking-card { display: block; text-decoration: none; color: inherit; }
.booking-card h3 { margin-bottom: 2px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; margin: 0; }
.kv dt { color: var(--muted); font-size: .9rem; }
.kv dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.big-name { font: 700 1.5rem var(--font-serif); color: var(--ink); }
.banner { padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; }
.banner--ok { background: var(--green-soft); color: #2f5d39; }
.banner--warn { background: var(--amber-soft); color: #6f5010; }
.banner--bad { background: var(--red-soft); color: #7d2b23; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--line); }
.timeline li { padding: 0 0 14px 16px; position: relative; }
.timeline li::before { content: ''; position: absolute; left: -9px; top: 5px; width: 15px; height: 15px; border-radius: 50%; background: var(--gold); border: 3px solid var(--bg); }
.yt-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.yt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.upi-box { background: var(--gold-soft); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.qr { display: block; margin: 8px auto; border-radius: 12px; border: 1px solid var(--line); }
.amount { font: 700 2.2rem var(--font-serif); color: var(--terracotta-dark); }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.toast-wrap { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50; display: grid; gap: 8px; width: min(92vw, 420px); }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); }
.toast--error { background: #a63a30; }
.footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: .9rem; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--cream); border-top-color: var(--terracotta); border-radius: 50%; animation: spin .8s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } * { transition: none !important; } }

/* ---------- admin ---------- */
.admin { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin-side { background: var(--ink); color: #fff; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .brand { font-size: 1.3rem; color: var(--gold-soft); margin-bottom: 20px; display: block; line-height: 1.15; }
.admin-side nav { display: grid; gap: 4px; }
.admin-side a.link { color: #e9dcc6; text-decoration: none; padding: 10px 12px; border-radius: 8px; }
.admin-side a.link:hover { background: rgba(255, 255, 255, .08); }
.admin-side a.link[aria-current='page'] { background: var(--terracotta); color: #fff; }
.admin-side .who { margin-top: 24px; font-size: .85rem; color: #b9a98f; line-height: 1.5; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.admin-side .who-text { display: flex; flex-direction: column; min-width: 0; }
.admin-side .who-phone { overflow-wrap: anywhere; }
.admin-side .who strong { color: #fff; font-size: .95rem; }
.admin-side .who .btn { margin-top: 2px; color: #e9dcc6; border-color: rgba(255, 255, 255, .35); }
.side-sep { border: 0; border-top: 1px solid rgba(255, 255, 255, .15); margin: 8px 4px; width: calc(100% - 8px); }
.admin-main { padding: 24px; min-width: 0; }
.stat { border-left: 5px solid var(--terracotta); }
.stat .n { font: 700 1.9rem var(--font-serif); color: var(--ink); }
.stat--gold { border-left-color: var(--gold); } .stat--blue { border-left-color: var(--blue); } .stat--green { border-left-color: var(--green); }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding-top: 10px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; font-size: .72rem; color: var(--muted); }
.bars .fill { width: 100%; background: var(--gold); border-radius: 6px 6px 0 0; min-height: 2px; }
.bars .bar:last-child .fill { background: var(--terracotta); }

.mt { margin-top: 16px; }
.nowrap { white-space: nowrap; }

.admin-bar { background: var(--ink); color: #fff; border-bottom: 3px solid var(--gold); }
.admin-bar .container { display: flex; align-items: center; min-height: 58px; }
.admin-bar .brand { color: var(--gold-soft); }
.you { margin-left: 8px; }

/* ---------- avatars ---------- */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; flex: none; font-weight: 700; letter-spacing: .02em; color: #fff; user-select: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar--sm { width: 32px; height: 32px; font-size: .8rem; }
.avatar--md { width: 48px; height: 48px; font-size: 1.05rem; }
.avatar--lg { width: 104px; height: 104px; font: 700 2.1rem var(--font-serif); }
.avatar--c0 { background: var(--terracotta-dark); }
.avatar--c1 { background: var(--gold); color: var(--ink); }
.avatar--c2 { background: var(--green); }
.avatar--c3 { background: var(--blue); }
.site-header .avatar { border: 2px solid rgba(255, 255, 255, .85); }
.profile-chip { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; padding: 3px 14px 3px 3px; border: 2px solid rgba(255, 255, 255, .7); border-radius: 999px; font-weight: 600; font-size: .9rem; }
.profile-chip:hover { background: rgba(0, 0, 0, .14); }
.admin-side .who .avatar { border: 2px solid rgba(255, 255, 255, .25); }
.avatar-editor { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.avatar-editor-actions { flex: 1; min-width: 200px; }
.file-btn { position: relative; cursor: pointer; }
.file-btn input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-btn:focus-within { outline: 3px solid var(--gold); outline-offset: 2px; }
.locate-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.locate-row .hint { margin: 0; }


/* =====================================================================================================
   RESPONSIVE LAYER
   phones  <= 760px : compact top bar + bottom tab bar, one-column content, tables become cards
   tablets 761-1024 : desktop header, auto-fit grids
   admin   <= 860px : sidebar becomes a slim top bar with scrolling tabs
   ===================================================================================================== */
.tabbar { display: none; }
html { scroll-padding-bottom: 80px; }
.container { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.booking-card, .kv dd, .card h3, .banner { overflow-wrap: anywhere; }
.thumb { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: var(--cream); display: block; }
@media (max-width: 760px) { .thumb { width: 104px; height: 104px; } }
.profile-chip .chip-name { max-width: 9ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* touch screens: bigger targets, no tiny controls */
@media (pointer: coarse) {
  .btn-sm { min-height: 44px; }
  .pill { min-height: 44px; }
  .nav a { padding: 12px 14px; }
  .check input { width: 22px; height: 22px; }
  select, input[type='text'], input[type='email'], input[type='password'], input[type='tel'], input[type='date'], input[type='search'], input[type='number'], input[type='url'] { min-height: 48px; }
  .bell { padding: 10px 12px; }
}

@media (max-width: 1024px) {
  .admin { grid-template-columns: 190px 1fr; }
  .admin-main { padding: 20px; }
}

/* ---------------- phones: customer site ---------------- */
@media (max-width: 760px) {
  h1 { font-size: 1.6rem; }
  .page { padding-top: 16px; padding-bottom: 28px; }
  .card { padding: 16px; }
  .btn-sm, .site-header .btn { min-height: 44px; }   /* touch targets */

  .site-header .container { min-height: 54px; flex-wrap: nowrap; gap: 8px; }
  .brand { font-size: 1.1rem; }
  .nav { display: none; }                         /* the bottom tab bar replaces it */
  .header-actions { margin-left: auto; gap: 2px; }
  .header-logout { display: none; }               /* Log out lives on the Profile page on phones */
  .profile-chip { padding: 2px; border-width: 2px; }
  .profile-chip .chip-name { display: none; }

  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -2px 12px rgba(80, 50, 20, .1);
    padding-bottom: env(safe-area-inset-bottom); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right);
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 58px; padding: 6px 2px; color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 600; line-height: 1;
  }
  .tabbar a[aria-current='page'] { color: var(--terracotta); box-shadow: inset 0 3px 0 var(--terracotta); }
  .tabbar svg { width: 24px; height: 24px; }
  .tabbar .avatar { width: 26px; height: 26px; font-size: .7rem; }
  .tabbar a[aria-current='page'] .avatar { outline: 2px solid var(--terracotta); outline-offset: 1px; }
  body.has-tabbar { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .toast-wrap { bottom: calc(72px + env(safe-area-inset-bottom)); }

  .hero .container { padding-top: 24px; padding-bottom: 24px; gap: 12px; }
  .hero .lead { font-size: 1.05rem; }
  .avatar-editor { gap: 14px; }
  .avatar--lg { width: 88px; height: 88px; font-size: 1.8rem; }
  .amount { font-size: 1.9rem; }
  .qr { width: 200px; height: 200px; }
  .btn-block-mobile { width: 100%; }
}

/* very small phones */
@media (max-width: 420px) {
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dt { margin-top: 8px; font-size: .8rem; }
  .big-name { font-size: 1.3rem; }
  .row.between { gap: .5rem; }
}

/* landscape phones: keep the tab bar slim so content stays visible */
@media (max-width: 920px) and (max-height: 480px) {
  .tabbar a { min-height: 44px; flex-direction: row; gap: 8px; font-size: .8rem; }
  .tabbar svg { width: 20px; height: 20px; }
  body.has-tabbar { padding-bottom: calc(52px + env(safe-area-inset-bottom)); }
  .site-header .container { min-height: 46px; }
}

/* ---------------- admin: sidebar -> top bar ---------------- */
@media (max-width: 860px) {
  .admin { display: block; }
  .admin-side {
    position: sticky; top: 0; z-index: 25; height: auto;
    display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px;
    padding: 10px max(14px, env(safe-area-inset-left)) 0;
  }
  .admin-side .brand { grid-column: 1; margin: 0; font-size: 1.15rem; }
  .admin-side .brand br { display: none; }
  .admin-side .who { grid-column: 2; grid-row: 1; margin: 0; flex-direction: row; align-items: center; gap: 10px; }
  .admin-side .who .avatar { width: 36px; height: 36px; font-size: .85rem; }
  .admin-side .who-text { display: none; }
  .admin-side nav {
    grid-column: 1 / -1; display: flex; gap: 4px; overflow-x: auto; padding-bottom: 10px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .admin-side nav::-webkit-scrollbar { display: none; }
  .admin-side a.link { flex: none; white-space: nowrap; padding: 10px 14px; }
  .side-sep { display: none; }
  .admin-main { padding: 16px max(16px, env(safe-area-inset-left)) calc(24px + env(safe-area-inset-bottom)); }
}
@media (min-width: 561px) and (max-width: 860px) {
  .admin-side .who-text { display: flex; align-items: flex-end; text-align: right; }
  .admin-side .who-phone { display: none; }
}

/* ---------------- tables become readable cards on phones ---------------- */
@media (max-width: 760px) {
  .card.table-wrap:has(.rtable) { background: none; border: 0; box-shadow: none; padding: 0; overflow: visible; }
  .rtable, .rtable tbody, .rtable tr, .rtable td { display: block; width: 100%; background: transparent; }
  .rtable thead { display: none; }
  .rtable tr { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin: 0 0 12px; padding: 6px 14px; }
  .rtable td { display: flex; justify-content: space-between; align-items: center; gap: 14px; text-align: right; border-top: 0; padding: 7px 0; white-space: normal; overflow-wrap: anywhere; }
  .rtable td + td { border-top: 1px solid #f1e8d8; }
  .rtable td::before { content: attr(data-label); flex: none; color: var(--muted); font-size: .8rem; font-weight: 600; text-align: left; }
  .rtable td:first-child { font-weight: 700; }
  .rtable td .btn { min-height: 40px; }
  .rtable tr.clickable:hover td { background: transparent; }
  .card .rtable tr { box-shadow: none; background: var(--bg); }
  .table-wrap:has(.rtable) .nowrap { white-space: normal; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 14px; }
  .stat .n { font-size: 1.5rem; }
}
@media (max-width: 400px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat .muted { font-size: .78rem; }
}

/* ---------- polish ---------- */
fieldset { min-width: 0; }
fieldset legend.label { float: left; width: 100%; padding: 0 0 8px; }
fieldset legend.label + * { clear: both; }
.card .grid:has(> .field) { row-gap: 0; }              /* the fields carry their own bottom margin */
.table-wrap td:first-child a { white-space: nowrap; }   /* keep codes like SM-1001 on one line */

/* ---------- profile picture editor + location row (polish) ---------- */
.avatar-editor-pic { position: relative; display: block; flex: none; cursor: pointer; border-radius: 50%; }
.avatar-editor-pic:focus-within, .avatar-editor-pic:hover .avatar { filter: brightness(1.05); }
.avatar-badge { position: absolute; right: 0; bottom: 2px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--terracotta); color: #fff; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.avatar-badge svg { width: 16px; height: 16px; }
.avatar-editor-actions .hint { margin: 8px 0 0; }
.avatar-editor-actions .row { gap: 10px; }

@media (max-width: 560px) {
  .avatar-editor { flex-direction: column; text-align: center; gap: 12px; margin-bottom: 0; }
  .avatar-editor-actions { width: 100%; min-width: 0; }
  .avatar-editor-actions .row { justify-content: center; flex-wrap: nowrap; }
  .avatar-editor-actions .row .btn { flex: 1 1 0; max-width: 200px; }
  .avatar--lg { width: 112px; height: 112px; font-size: 2.3rem; }
  .locate-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .locate-row .btn { width: 100%; }
  .locate-row .hint { text-align: left; }
}

.locate-row .hint:empty { display: none; }
@media (min-width: 761px) { .profile-logout { display: none; } }   /* the desktop header already has Log out */


/* =====================================================================================================
   LAYOUT POLISH: spacing rhythm, home cards, admin action panels, forms, pagers, filter chips
   ===================================================================================================== */
.btn { line-height: 1.2; text-align: center; }
.row { row-gap: .5rem; }
.row.between > :first-child { min-width: 0; }

/* home: consistent vertical rhythm between sections, cards that line up */
.home-sections > section + section { margin-top: 48px; }
.home-sections > section > h2 { margin: 0 0 16px; }
.home-sections > p { margin: 28px 0 0; }
.cards-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); align-items: stretch; }

.occasion-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.occasion-card:hover { transform: translateY(-2px); border-color: var(--gold); box-shadow: 0 6px 18px rgba(80, 50, 20, .12); }
.occasion-card:focus-visible { outline-offset: 3px; }
.occ-icon { flex: none; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--gold-soft); color: var(--terracotta-dark); line-height: 1; }
.occ-text { flex: 1; min-width: 0; }
.occ-text h3 { margin: 0 0 2px; }
.occ-text p { margin: 0; color: var(--muted); }
.occ-go { flex: none; font-size: 1.4rem; font-weight: 700; color: var(--terracotta); transition: transform .15s ease; }
.occasion-card:hover .occ-go { transform: translateX(4px); }

.package-card { display: flex; flex-direction: column; gap: 10px; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pkg-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pkg-head h3 { margin: 0; }
.package-card p { margin: 0; flex: 1; color: var(--muted); }
.pkg-actions { margin-top: 8px; }
.steps li { height: 100%; }

@media (max-width: 760px) {
  .home-sections > section + section { margin-top: 36px; }
  .occasion-card { padding: 14px 16px; gap: 14px; }
  .occ-icon { width: 52px; height: 52px; }
  .package-card { padding: 16px; }
  .pkg-actions .btn { width: 100%; }
}

/* admin: action panels, link forms, card footers, pagers, filter chips */
.action-stack { display: flex; flex-direction: column; gap: 14px; }
.action-panel { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.action-panel .check { margin-bottom: 0; }
.action-panel .muted { margin: 0; }
.panel-title { margin: 0; font-weight: 700; color: var(--ink); }
.btn-danger-outline { background: #fff; color: #a63a30; border-color: #a63a30; }
.btn-danger-outline:hover { background: #fdf0ee; filter: none; }

.link-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.link-form .field { flex: 1 1 240px; margin: 0; min-width: 0; }
.link-form .btn { flex: none; min-height: 46px; }

.card-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.card-actions.between { justify-content: space-between; }
.card-actions .check { margin: 0; }
.card textarea + .card-actions { margin-top: 12px; }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pager-btns { display: flex; gap: 8px; }

@media (max-width: 760px) {
  .pills { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 2px 16px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .pills::-webkit-scrollbar { display: none; }
  .pill { flex: none; }
}
@media (max-width: 560px) {
  .link-form .btn, .card-actions .btn { width: 100%; }
  .card-actions, .card-actions.between { flex-direction: column; align-items: stretch; }
  .pager { flex-direction: column; align-items: stretch; text-align: center; }
  .pager-btns .btn { flex: 1; }
  .row.between > .btn { flex: none; }
}

.avatar[data-initials]::before { content: attr(data-initials); }

.bell::before { content: '🔔'; }


/* ---------- legal pages, footer links, privacy card ---------- */
.legal-doc { max-width: 760px; margin: 0 auto; }
.legal-doc h1 { margin-bottom: 4px; }
.legal-doc h2 { font-size: 1.25rem; margin: 30px 0 8px; }
.legal-doc p, .legal-doc li { line-height: 1.65; }
.legal-doc ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.legal-doc li { margin-bottom: 6px; }
.legal-doc ul ul { margin-top: 6px; }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 10px 24px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-underline-offset: 3px; }
.footer-links a:hover { color: var(--terracotta-dark); }
.privacy-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
@media (max-width: 560px) { .privacy-actions .btn { width: 100%; } }

h2.card-title { font-size: 1.1rem; color: var(--ink); margin: 0 0 6px; }
.takedown-row { display: flex; justify-content: space-between; align-items: center; gap: 12px 16px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.takedown-info { flex: 1 1 240px; min-width: 0; }
.takedown-links { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
@media (max-width: 560px) { .takedown-row .btn { width: 100%; } }

/* ---- Trust: footer contact, help button, sample videos, FAQ, payment promise, inline sign-in ---- */
.footer { align-items: flex-start; }
.footer-about { display: grid; gap: 10px; min-width: 0; }
.footer-tagline { color: var(--ink); font-weight: 600; line-height: 1.45; }
.footer-contact { font-style: normal; display: grid; gap: 4px; }
.footer-contact:empty { display: none; }
.fc-line { display: block; overflow-wrap: anywhere; }
.fc-nowrap { white-space: nowrap; }
.footer-contact a { color: var(--muted); text-underline-offset: 3px; }
.footer-contact a:hover { color: var(--terracotta-dark); }
body.has-wa .footer { padding-bottom: 84px; }   /* room so the round help button never sits over the last lines */

.wa-fab {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 25;
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--green); color: #fff; text-decoration: none;
  box-shadow: 0 6px 16px rgba(40, 30, 15, .3), 0 0 0 4px rgba(255, 255, 255, .85);
  transition: transform .15s ease, background .15s ease;
}
.wa-fab svg { width: 28px; height: 28px; }
.wa-fab:hover { background: #356a40; transform: translateY(-2px); }
.wa-fab:focus-visible { outline: 3px solid var(--gold-text); outline-offset: 4px; }
@media (max-width: 760px) {
  /* sits just above the bottom tab bar when there is one (not on the login page, which has none) */
  body.has-tabbar .wa-fab { bottom: calc(78px + env(safe-area-inset-bottom)); }
  .footer { display: grid; gap: 18px; padding-top: 24px; }
  .footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .footer-links a { display: flex; align-items: center; min-height: 44px; }
}
@media (max-height: 460px) and (max-width: 900px) { body.has-tabbar .wa-fab { bottom: calc(64px + env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { .wa-fab { transition: none; } .wa-fab:hover { transform: none; } }

.yt-frame--art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-box h3 { margin: 0 0 10px; }
.video-box .yt-frame + p { margin: 8px 0 0; }

.faq { display: grid; gap: 10px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.faq summary { cursor: pointer; padding: 14px 16px; min-height: 44px; font-weight: 600; list-style-position: inside; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq details p { margin: 0; padding: 12px 16px 16px; line-height: 1.6; }

.promise h2 { font-size: 1.1rem; margin: 0 0 8px; }
.promise ul { margin: 0 0 10px; padding-left: 1.2rem; }
.promise li { margin-bottom: 6px; line-height: 1.5; }
.signin-panel { border-color: var(--terracotta); }
.signin-panel h2 { font-size: 1.15rem; margin: 0 0 6px; }

.from-price { font-size: .95rem; font-weight: 600; color: var(--muted); margin-left: 4px; white-space: nowrap; }
.faq details[hidden] { display: none; }

/* ---- Booking page: status card, tracker, receipt ---- */
.status-card { border-color: var(--green); }
.status-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.status-head h2 { margin: 0; font-size: 1.15rem; }
.status-tick { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 700; }
.next-title { margin: 12px 0 6px; font-size: .95rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.next-list { margin: 0 0 12px; padding-left: 1.2rem; display: grid; gap: 8px; line-height: 1.5; }

.tracker { list-style: none; margin: 16px 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; counter-reset: none; }
.tracker-step { position: relative; display: grid; justify-items: center; gap: 4px; text-align: center; padding: 0 2px; }
.tracker-step::before { content: ''; position: absolute; top: 15px; left: calc(-50% + 18px); right: calc(50% + 18px); height: 2px; background: var(--line); }
.tracker-step:first-child::before { display: none; }
.tracker-step.is-done::before { background: var(--green); }
.tracker-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 2px solid var(--line); color: var(--muted); font-weight: 700; font-size: .85rem; }
.tracker-step.is-done .tracker-dot { background: var(--green); border-color: var(--green); color: #fff; }
.tracker-step.is-current .tracker-dot { border-color: var(--terracotta); color: var(--terracotta-dark); box-shadow: 0 0 0 4px var(--gold-soft); }
.tracker-label { font-weight: 700; font-size: .88rem; line-height: 1.25; }
.tracker-when { font-size: .78rem; color: var(--muted); line-height: 1.3; overflow-wrap: anywhere; }
.tracker--3 { grid-template-columns: repeat(3, 1fr); }
.report-text p { margin: 0 0 10px; line-height: 1.5; }
.report-text p:last-child { margin-bottom: 0; }
@media (max-width: 480px) {
  .tracker { grid-template-columns: 1fr; gap: 0; }
  .tracker-step { grid-template-columns: 32px 1fr; justify-items: start; text-align: left; column-gap: 12px; padding: 0 0 14px; }
  .tracker-step::before { top: 32px; bottom: 0; left: 15px; right: auto; width: 2px; height: auto; }
  .tracker-step:first-child::before { display: block; }
  .tracker-step:last-child { padding-bottom: 0; }
  .tracker-step:last-child::before { display: none; }
  .tracker-dot { grid-row: 1 / span 2; }
}
.receipt h1 { margin: 0 0 4px; font-size: 1.5rem; }
.receipt-amount { font-size: 1.2rem; }
@media print {
  #site-header, #site-footer, .tabbar, .wa-fab, .no-print, .toast-wrap { display: none !important; }
  body { background: #fff; padding: 0 !important; }
  .card { box-shadow: none; border: 1px solid #999; }
}

/* ---- Guided booking: steps, photo tips, what you get, pinned summary ---- */
.stepper { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 18px; padding: 0; }
.stepper-step { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; }
.stepper-step::before { content: ''; position: absolute; top: 15px; left: calc(-50% + 20px); right: calc(50% + 20px); height: 2px; background: var(--line); }
.stepper-step:first-child::before { display: none; }
.stepper-step.is-done::before, .stepper-step.is-current::before { background: var(--green); }
.stepper-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 2px solid var(--line); color: var(--muted); font-weight: 700; font-size: .9rem; }
.stepper-step.is-done .stepper-dot { background: var(--green); border-color: var(--green); color: #fff; }
.stepper-step.is-current .stepper-dot { border-color: var(--terracotta); color: var(--terracotta-dark); box-shadow: 0 0 0 4px var(--gold-soft); }
.stepper-label { font-size: .85rem; font-weight: 600; color: var(--muted); line-height: 1.25; }
.stepper-step.is-current .stepper-label, .stepper-step.is-done .stepper-label { color: var(--ink); }

.photo-tips { margin-top: 14px; }
.photo-tips .label { margin: 0 0 8px; }
.tips-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.tip { display: grid; justify-items: center; gap: 6px; text-align: center; }
.tip-art { position: relative; display: block; width: 64px; height: 64px; }
.tip-art svg { display: block; border-radius: 8px; }
.tip-mark { position: absolute; right: -6px; bottom: -6px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: .8rem; font-weight: 700; border: 2px solid #fff; }
.tip--good .tip-mark { background: var(--green); }
.tip--bad .tip-mark { background: #a8392b; }
.tip-text { font-size: .8rem; line-height: 1.3; color: var(--muted); }

.included h2 { margin: 0 0 8px; font-size: 1.1rem; }
.included-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.included-list li { position: relative; padding-left: 26px; line-height: 1.45; }
.included-list li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--green-text); font-weight: 700; }
.included-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0; padding-top: 10px; border-top: 1px solid var(--line); }
.included-total strong { font-size: 1.15rem; }

.summary-bar { display: grid; gap: 10px; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.summary-total strong { font-size: 1.2rem; }
@media (max-width: 760px) {
  .summary-bar {
    position: sticky; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 20;
    margin: 0 -16px; padding: 10px 16px; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgba(80, 50, 20, .12);
  }
  body.has-summary .wa-fab { bottom: calc(78px + 96px + env(safe-area-inset-bottom)); }
}
@media (min-width: 761px) { .summary-total { display: none; } }
.photo-tips .label { font-weight: 600; color: var(--ink); }

/* ---- Empty states and the booking-placed moment ---- */
.empty { display: grid; justify-items: center; gap: 6px; padding: 28px 16px; text-align: center; }
.empty p { margin: 0; }
.empty .btn { margin-top: 10px; }
.empty-icon { line-height: 1; color: var(--terracotta); }

.success-burst { position: relative; height: 92px; display: grid; place-items: center; overflow: hidden; margin: 0 0 4px; }
.burst-diya { color: var(--gold); line-height: 1; display: grid; animation: burst-pop .9s cubic-bezier(.2, 1.4, .4, 1) both; }
.burst-spark { position: absolute; left: 50%; top: 50%; margin: -8px 0 0 -8px; font-size: 1rem; color: var(--gold); opacity: 0; animation: burst-out 1.8s ease-out .15s both; }
.burst-spark.s0 { --x: -64px; --y: -26px; } .burst-spark.s1 { --x: 64px; --y: -26px; } .burst-spark.s2 { --x: -92px; --y: 8px; }
.burst-spark.s3 { --x: 92px; --y: 8px; } .burst-spark.s4 { --x: -34px; --y: -38px; } .burst-spark.s5 { --x: 34px; --y: -38px; }
@keyframes burst-pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes burst-out { 0% { opacity: 0; transform: translate(0, 0) scale(.4); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .burst-diya { animation: none; } .burst-spark { display: none; } }

/* ---- OTP screens: tidy, equal-width actions ---- */
.otp-input { text-indent: .5em; }               /* balances the trailing letter-spacing so the digits look centred */
.otp-actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 12px; }
.otp-actions .btn { width: 100%; min-height: 44px; padding: 0 12px; font-size: .95rem; }
@media (min-width: 440px) { .otp-actions { grid-template-columns: 1fr 1fr; } }
.link-btn { display: block; width: 100%; min-height: 44px; margin-top: 4px; background: none; border: 0; color: var(--muted); font: inherit; font-size: .95rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; border-radius: var(--radius); }
.link-btn:hover { color: var(--terracotta); }
.link-btn:focus-visible { outline: 3px solid var(--gold-text); outline-offset: 2px; }
form > .btn-block { margin-top: 4px; }
.error-text:empty { min-height: 0; margin: 0; }

/* ---- Temples ---- */
.temple-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.temple-photo { flex: none; width: 160px; height: 110px; border-radius: 12px; overflow: hidden; background: var(--gold-soft); display: grid; place-items: center; }
.temple-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.temple-photo-empty { color: var(--terracotta-dark); display: grid; place-items: center; }
.temple-photo-actions { min-width: 0; }
@media (max-width: 480px) { .temple-photo { width: 100%; height: 150px; } .temple-photo-actions { width: 100%; } }

.temple-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.temple-tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.temple-tile .temple-photo { width: 100%; height: 140px; border-radius: 0; }
.temple-tile-body { padding: 14px 16px 16px; display: grid; gap: 4px; flex: 1; align-content: start; }
.temple-tile h3 { margin: 0; font-size: 1.05rem; }
.temple-tile .temple-city { color: var(--muted); font-size: .9rem; }
.temple-tile .temple-priest { font-weight: 600; font-size: .92rem; }
.temple-tile p { margin: 0; line-height: 1.5; }
.temple-tile .btn { margin-top: 10px; align-self: start; }
/* shimmer while a photo loads, then the photo fades in */
.temple-tile .temple-photo { background: linear-gradient(100deg, var(--gold-soft) 30%, #fbf1d9 50%, var(--gold-soft) 70%) 0 0 / 220% 100%; animation: shimmer 1.4s linear infinite; }
.temple-tile .temple-photo img { opacity: 0; transition: opacity .35s ease; }
.temple-tile .temple-photo img.loaded { opacity: 1; }
@keyframes shimmer { to { background-position: -120% 0; } }
@media (prefers-reduced-motion: reduce) { .temple-tile .temple-photo { animation: none; } .temple-tile .temple-photo img { transition: none; } }
/* trust strip under the hero */
.trust-strip { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; }
.trust-strip li { display: flex; align-items: center; gap: 8px; font-size: .95rem; font-weight: 600; color: var(--body); }
.trust-strip li > span:first-child { color: var(--green-text); }
.temple-preview { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; margin-top: 10px; padding: 10px; background: var(--gold-soft); border-radius: var(--radius); }
.temple-preview .temple-photo { width: 96px; height: 72px; border-radius: 8px; }
.temple-preview strong { display: block; }

/* ---- Footer (brand, contact, links) ---- */
#site-footer { background: var(--cream); border-top: 1px solid var(--line); margin-top: 56px; }
.footer { display: block; padding-top: 36px; padding-bottom: 22px; color: var(--body); font-size: .95rem; }   /* (keep the container's side gutters) */
.footer-grid { display: grid; grid-template-columns: 1.2fr 1.4fr 1fr; gap: 28px 48px; align-items: start; }
.footer-logo { display: inline-flex; align-items: center; gap: 8px; font: 700 1.3rem var(--font-serif); color: var(--terracotta-dark); }
.footer-tagline { margin: 8px 0 0; max-width: 30ch; color: var(--muted); font-weight: 400; line-height: 1.5; }
.footer-title { margin: 0 0 10px; font: 700 .78rem var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.footer-contact { display: grid; gap: 4px; font-style: normal; }
.fc-line { display: flex; align-items: flex-start; gap: 10px; padding: 3px 0; color: var(--body); text-decoration: none; overflow-wrap: anywhere; }
a.fc-line:hover .fc-text { color: var(--terracotta-dark); text-decoration: underline; text-underline-offset: 3px; }
.fc-icon { flex: none; width: 1.4em; text-align: center; }
.footer-links { display: grid; gap: 0; }
.footer-links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line); }
.footer-links a::after { content: '›'; color: var(--terracotta); font-size: 1.2rem; line-height: 1; }
.footer-links a:hover { color: var(--terracotta-dark); }
.footer-copy { margin: 26px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) {
  .footer { padding-top: 28px; padding-bottom: 18px; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .footer-links { grid-template-columns: 1fr 1fr; gap: 10px; }
  .footer-links .footer-title { grid-column: 1 / -1; margin: 0; }
  .footer-links a { min-height: 48px; padding: 8px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
}
.footer-contact a.fc-line, .footer-contact .fc-line { color: var(--body); }

/* ---- Admin sidebar (desktop): brand, nav, and a tidy account card pinned to the bottom ---- */
.brand-sub { display: none; }
@media (min-width: 861px) {
  .admin-side { display: flex; flex-direction: column; gap: 0; }
  .admin-side .brand { margin-bottom: 16px; }
  .admin-side .brand-sub { display: block; margin-top: 8px; font: 600 .68rem var(--font-sans); letter-spacing: .16em; text-transform: uppercase; color: #b9a98f; }
  .admin-side nav { gap: 1px; }
  .admin-side a.link { padding: 9px 14px; border-radius: 10px; font-weight: 500; }
  .admin-side a.link[aria-current='page'] { font-weight: 700; }
  .admin-side .who {
    margin-top: auto; width: 100%;
    display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 2px 12px; align-items: center;
    padding: 10px 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px;
  }
  .admin-side .who .avatar { grid-row: 1; }
  .admin-side .who-text { grid-column: 2; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .admin-side .who-text strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; overflow-wrap: anywhere; }
  .admin-side .who-phone { font-size: .8rem; color: #b9a98f; }
  .admin-side .who .who-logout { grid-column: 1 / -1; width: 100%; min-height: 40px; margin: 10px 0 0; justify-content: center; }
}

/* ---- Language picker (button + list) ---- */
.lang-picker { position: relative; display: inline-flex; align-items: center; gap: 8px; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, .7); border-radius: 999px; font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; white-space: nowrap; }
.lang-btn:hover { background: rgba(0, 0, 0, .12); }
.lang-btn:focus-visible { outline: 3px solid var(--gold-soft); outline-offset: 2px; }
.lang-globe { font-size: 1.05rem; line-height: 1; }
.lang-caret { font-size: .7rem; opacity: .85; }
.lang-menu { position: absolute; z-index: 40; top: calc(100% + 8px); right: 0; min-width: 11rem; margin: 0; padding: 6px; list-style: none; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 28px rgba(60, 35, 15, .22); }
.lang-menu[hidden] { display: none; }
.lang-option { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 10px; cursor: pointer; font-weight: 600; }
.lang-option:hover, .lang-option:focus-visible { background: var(--gold-soft); outline: none; }
.lang-option[aria-selected='true'] { background: var(--terracotta); color: #fff; }
.lang-option[aria-selected='true']::after { content: '✓'; margin-left: auto; padding-left: 12px; }
/* in the footer: a light chip that opens its list upwards */
.lang-picker--labelled { margin-top: 14px; }
.lang-picker--labelled .lang-label { font-size: .85rem; color: var(--muted); }
.lang-picker--labelled .lang-btn { color: var(--ink); border-color: var(--line); background: #fff; }
.lang-picker--labelled .lang-btn:hover { background: var(--gold-soft); }
.lang-picker--labelled .lang-menu { top: auto; bottom: calc(100% + 8px); right: auto; left: 0; }
@media (max-width: 760px) {
  .site-header .lang-btn { padding: 0 8px; gap: 4px; border-width: 1px; font-size: .85rem; min-height: 44px; }
  .site-header .lang-caret { display: none; }
}

/* ---- Telugu and Hindi: plain, readable fonts (bundled, so they look the same on every device) ---- */
@font-face { font-family: 'Noto Sans Telugu'; src: url('/fonts/NotoSansTelugu-400.woff2') format('woff2'); font-weight: 100 600; font-style: normal; font-display: swap; unicode-range: U+0C00-0C7F, U+200C-200D, U+0964-0965; }
@font-face { font-family: 'Noto Sans Telugu'; src: url('/fonts/NotoSansTelugu-700.woff2') format('woff2'); font-weight: 601 900; font-style: normal; font-display: swap; unicode-range: U+0C00-0C7F, U+200C-200D, U+0964-0965; }
@font-face { font-family: 'Noto Sans Devanagari'; src: url('/fonts/NotoSansDevanagari-400.woff2') format('woff2'); font-weight: 100 600; font-style: normal; font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: 'Noto Sans Devanagari'; src: url('/fonts/NotoSansDevanagari-700.woff2') format('woff2'); font-weight: 601 900; font-style: normal; font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
html[lang='te'] { --font-serif: 'Noto Sans Telugu', system-ui, -apple-system, 'Segoe UI', Roboto, 'Nirmala UI', sans-serif; --font-sans: var(--font-serif); }
html[lang='hi'] { --font-serif: 'Noto Sans Devanagari', system-ui, -apple-system, 'Segoe UI', Roboto, 'Nirmala UI', sans-serif; --font-sans: var(--font-serif); }
html[lang='te'] body, html[lang='hi'] body { line-height: 1.7; }
html[lang='te'] .btn, html[lang='hi'] .btn { line-height: 1.35; }
/* no slanted text in Indian scripts (a computer-made slant looks wrong), and the brand name keeps its own look */
html[lang='te'] body *, html[lang='hi'] body * { font-style: normal; }
html[lang='te'] .brand, html[lang='hi'] .brand, html[lang='te'] .footer-logo, html[lang='hi'] .footer-logo, html[lang='te'] .splash-title, html[lang='hi'] .splash-title { font-family: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif; }

.upi-box .btn-ghost { color: var(--terracotta-dark); border-color: var(--terracotta-dark); }   /* readable on the soft gold box */

/* ---- header on narrow desktops / landscape phones: one tidy row ---- */
@media (min-width: 761px) and (max-width: 900px) {
  .site-header .chip-name { display: none; }
  .site-header .profile-chip { padding: 2px; }
  .site-header .nav a { padding: 10px 8px; }
  .site-header .lang-globe { display: none; }
  .site-header .lang-btn { padding: 0 10px; }
}
@media (min-width: 761px) and (max-width: 840px) {
  .site-header .header-logout { display: none; }   /* Log out is on the Profile page here (as on phones) */
  .profile-logout { display: block; }
}
.site-header .header-actions .btn { white-space: nowrap; }
@media (max-width: 400px) {
  .site-header .brand { font-size: 1.05rem; }
  .site-header .lang-btn { padding: 0 6px; }
}

/* Home: the temples become a swipe row on phones, so the page is not a long stack of tiles */
@media (max-width: 760px) {
  .temple-cards { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 8px; margin-inline: calc(-1 * var(--gutter, 16px)); padding-inline: var(--gutter, 16px); scroll-padding-inline: var(--gutter, 16px); }
  .temple-cards .temple-tile { flex: 0 0 78%; max-width: 300px; scroll-snap-align: start; }
  .trust-strip { justify-content: flex-start; flex-direction: column; gap: 6px; }
}

/* Booking form: quick date picks, collapsible photo tips */
.date-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.date-chip { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: .95rem; font-weight: 600; color: var(--terracotta-dark); cursor: pointer; }
.date-chip[aria-pressed='true'] { background: var(--gold-soft); border-color: var(--terracotta); }
details.photo-tips > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; list-style-position: inside; }
details.photo-tips[open] > summary { margin-bottom: 8px; }

/* Booking form: time-slot choices and the in-page calendar */
.slot-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.slot-choices .box { padding: 10px 14px; min-height: 48px; display: flex; align-items: center; }
.calendar { margin-top: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 10px; max-width: 360px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.cal-head-selects { display: flex; gap: 6px; flex: 1 1 auto; min-width: 0; }
/* Month/year pickers inside the calendar: an in-page button + listbox, not a native <select> (its list opens
   detached from the page in some browsers - the same reason the calendar itself exists). Every level down to the
   text span gets min-width: 0 so a long month name (e.g. "September") ellipsis-truncates instead of forcing the
   button past its share of the row (flex items default to a content-based minimum width that ignores max-width). */
.cal-picker { position: relative; flex: 1 1 0; min-width: 0; }
.cal-picker-btn { display: flex; align-items: center; gap: 4px; min-height: 44px; width: 100%; min-width: 0; padding: 4px 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-weight: 600; font-size: .92rem; color: var(--ink); cursor: pointer; }
.cal-picker-btn:hover { background: var(--gold-soft); }
.cal-picker-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.cal-picker-current { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-picker-caret { font-size: .7rem; opacity: .75; flex: none; }
.cal-picker-menu { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; min-width: 7rem; max-height: 14rem; overflow-y: auto; margin: 0; padding: 4px; list-style: none; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 28px rgba(60, 35, 15, .22); }
.cal-picker-menu[hidden] { display: none; }
.cal-picker-option { display: flex; align-items: center; min-height: 36px; padding: 0 10px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.cal-picker-option:hover, .cal-picker-option:focus-visible { background: var(--gold-soft); outline: none; }
.cal-picker-option[aria-selected='true'] { background: var(--terracotta); color: #fff; }
.time-picker-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.time-picker-colon { font-weight: 700; color: var(--muted); }
.cal-nav { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: #fff; font-size: 1.4rem; line-height: 1; color: var(--terracotta-dark); cursor: pointer; }
.cal-nav:disabled { opacity: .35; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cal-dow { text-align: center; font-size: .8rem; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal-day { min-height: 44px; min-width: 0; padding: 0; border: 0; border-radius: 10px; background: transparent; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
.cal-day:hover:not(:disabled) { background: var(--gold-soft); }
.cal-day:disabled { color: var(--muted); opacity: .45; cursor: default; }
.cal-day[aria-pressed='true'] { background: var(--terracotta); color: #fff; }
.cal-day:focus-visible, .cal-nav:focus-visible, .date-chip:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.selected-date { margin: 8px 0 0; font-weight: 600; color: var(--green-text); }
.selected-date:empty { display: none; }

/* My bookings: what is happening, in one line */
.next-line { margin: 4px 0 0; font-weight: 600; color: var(--green-text); }
.booking-card .next-line + .row { margin-top: 10px; }

/* First-visit language offer for Telugu / Hindi browsers */
.lang-prompt { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; padding: 8px 44px 8px 16px; background: var(--gold-soft); border-bottom: 1px solid var(--line); position: relative; font-weight: 600; }
.lang-prompt-x { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.1rem; color: var(--muted); cursor: pointer; }

/* Phones: the Book tab is the main action, so its icon sits in a filled circle */
@media (max-width: 760px) {
  /* a filled circle with clear space around it: it never touches the label, and the bar keeps its height */
  .tabbar a:nth-child(2) { color: var(--terracotta-dark); padding-top: 3px; gap: 4px; }
  .tabbar a:nth-child(2) svg { width: 32px; height: 32px; margin: 0; padding: 4px; box-sizing: border-box; border-radius: 50%; background: var(--terracotta); color: #fff; }
}
@media (max-height: 460px) and (max-width: 900px) { .tabbar a:nth-child(2) { padding-top: 6px; padding-bottom: 6px; } .tabbar a:nth-child(2) svg { width: 28px; height: 28px; padding: 3px; } }

/* the real date value lives in this input; it is invisible, takes no room and cannot be reached (the calendar is the control) */
.field input.date-store { position: absolute; left: 0; width: 1px; height: 1px; min-height: 0; margin: 0; padding: 0; border: 0; opacity: 0; overflow: hidden; pointer-events: none; }
/* labels of all four tabs sit on one line, whatever the icon above them */
@media (max-width: 760px) and (min-height: 461px) { .tabbar a { justify-content: flex-end; padding-bottom: 6px; } }

/* Temple registration: the priest's list of requests, and the admin's review cards */
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.request-row { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.request-row:last-child { border-bottom: 0; padding-bottom: 0; }
.request-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.request-video { width: 100%; max-height: 360px; border-radius: 12px; background: #000; }

.priest-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.priest-card h2, .priest-card p { margin: 0; }
.priest-card .priest-text { flex: 1 1 260px; display: grid; gap: 4px; }
.priest-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---- inline field errors, file picker, package includes ---- */
.field-error { color: #a63a30; font-weight: 600; font-size: .9rem; margin: 6px 0 0; }
.field-error::before { content: '! '; font-weight: 800; }
[aria-invalid='true'] { border-color: #a63a30 !important; }
.choice input[aria-invalid='true'] + .box { border-color: #a63a30; }
.file-pick { margin-top: 10px; cursor: pointer; }
input.sr-only:focus-visible + .file-pick, .dropzone input.sr-only:focus-visible ~ .file-pick { outline: 3px solid var(--gold); outline-offset: 2px; }
.includes { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 6px; font-size: .92rem; color: var(--body); }
.includes li { position: relative; padding-left: 24px; }
.includes li::before { content: ''; position: absolute; left: 2px; top: .35em; width: 12px; height: 7px; border-left: 2.5px solid var(--green-text); border-bottom: 2.5px solid var(--green-text); transform: rotate(-45deg); }
.package-card { position: relative; }
.package-card--recommended { border-color: var(--gold); box-shadow: 0 4px 16px rgba(201, 154, 59, .25); }
.badge-recommended { display: inline-block; align-self: flex-start; padding: 3px 12px; border-radius: 999px; background: var(--gold-soft); color: var(--gold-text); font-size: .78rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.badge-recommended--inline { margin-bottom: 8px; }
.pkg-actions a::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius); } /* the whole card is the tap target */
.package-card .includes { flex: 1; }

.fc-icon { display: grid; place-items: center; color: var(--terracotta-dark); }
.lang-globe { display: grid; place-items: center; }

/* ---- loading skeletons (fixed height, so the page does not jump when the content arrives) ---- */
.skeleton { min-height: 190px; pointer-events: none; }
.sk { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--cream) 0%, #fbf3e4 50%, var(--cream) 100%); background-size: 200% 100%; animation: sk-shimmer 1.4s linear infinite; }
.sk-title { height: 22px; width: 55%; margin-bottom: 6px; }
.sk-short { width: 65%; }
@keyframes sk-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }
.trust-strip { min-height: 26px; }

/* ---- photo positioner ---- */
body.crop-open { overflow: hidden; }
.crop-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(44, 33, 24, .72); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.crop-box { background: var(--card); border-radius: var(--radius); padding: 18px; width: min(100%, 380px); max-height: 100%; overflow-y: auto; box-shadow: 0 12px 40px rgba(0, 0, 0, .35); }
.crop-box h2 { margin-bottom: 4px; }
.crop-stage { position: relative; width: min(100%, 300px); aspect-ratio: 4 / 5; margin: 8px auto 12px; border-radius: 12px; overflow: hidden; background: #2c2118; touch-action: none; cursor: grab; }
.crop-stage:active { cursor: grabbing; }
.crop-canvas { display: block; width: 100%; height: 100%; }
.crop-guide { position: absolute; left: 22%; right: 22%; top: 12%; bottom: 22%; border: 2px dashed rgba(255, 255, 255, .85); border-radius: 50%; box-shadow: 0 0 0 9999px rgba(44, 33, 24, .35); pointer-events: none; }
.crop-zoom-label { display: grid; gap: 6px; font-weight: 600; color: var(--ink); margin-bottom: 14px; }
.crop-zoom-label input[type='range'] { width: 100%; min-height: 44px; accent-color: var(--terracotta); }
.crop-actions { display: grid; gap: 10px; }

/* ---- my bookings: grouped cards with a separate "Book again" link ---- */
.booking-card--rich { position: relative; }
.booking-card--rich .booking-link { color: inherit; text-decoration: none; display: block; }
.booking-card--rich .booking-link::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius); }
.booking-card--rich:has(.booking-link:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; } /* the link keeps its own ring too */
.booking-card--rich .booking-extra { position: relative; z-index: 1; margin-top: 10px; }
.booking-group { margin: 22px 0 10px; font-size: 1.15rem; }
.booking-group .count { color: var(--muted); font: 600 .9rem var(--font-sans); margin-left: 6px; }

/* six dashboard cards: three per row on desktops (2 x 3), so there is no orphaned second row */
@media (min-width: 861px) { .stats { grid-template-columns: repeat(3, 1fr); } }

/* ---- OTP: six animated boxes drawn over one real input ---- */
.otp-boxes { position: relative; width: 100%; margin: 4px 0 6px; }
.otp-cells { display: grid; grid-template-columns: repeat(6, minmax(0, 56px)); gap: 8px; justify-content: center; }
.otp-cell { display: grid; place-items: center; height: 58px; border: 2px solid #d9c9ad; border-radius: var(--radius-sm); background: #fff; color: var(--ink); font: 700 1.6rem var(--font-serif); transition: border-color .15s, background .15s, box-shadow .15s; }
.otp-boxes.is-entering .otp-cell { animation: otp-in .35s ease-out both; animation-delay: calc(var(--i) * 45ms); }
.otp-cell.is-filled { border-color: var(--terracotta); background: #fdf1ec; }
.otp-cell.is-active { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(201, 154, 59, .28); }
.otp-cell.is-active:not(.is-filled)::after { content: ''; width: 2px; height: 1.5rem; background: var(--terracotta); animation: otp-caret 1s steps(1) infinite; }
.otp-cell.pop { animation: otp-pop .2s ease-out; }
.otp-boxes input.otp-field { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 58px; padding: 0; border: 0; background: transparent; color: transparent; caret-color: transparent; font-size: 1.6rem; cursor: text; z-index: 1; }
.otp-boxes input.otp-field:focus { outline: none; border: 0; }
.otp-boxes.is-error .otp-cells { animation: otp-shake .4s ease-in-out; }
.otp-boxes.is-error .otp-cell { border-color: #a63a30; background: var(--red-soft); }
.otp-boxes.is-success .otp-cell { border-color: var(--green); background: var(--green-soft); color: var(--green-text); animation: otp-wave .5s ease-out both; animation-delay: calc(var(--i) * 60ms); }
@keyframes otp-in { from { opacity: 0; transform: translateY(8px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes otp-pop { 0% { transform: scale(.82); } 60% { transform: scale(1.1); } 100% { transform: scale(1); } }
@keyframes otp-caret { 50% { opacity: 0; } }
@keyframes otp-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }
@keyframes otp-wave { 0% { transform: translateY(0); } 40% { transform: translateY(-9px); } 100% { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .otp-cell, .otp-boxes.is-entering .otp-cell, .otp-boxes.is-error .otp-cells, .otp-boxes.is-success .otp-cell { animation: none; } .otp-cell.is-active:not(.is-filled)::after { animation: none; } }
@media (max-width: 360px) { .otp-cells { gap: 6px; } .otp-cell { height: 52px; font-size: 1.4rem; } }

.otp-field::placeholder { color: transparent; }

/* autofill must not paint its own coloured field over the boxes */
.otp-boxes input.otp-field:-webkit-autofill,
.otp-boxes input.otp-field:-webkit-autofill:hover,
.otp-boxes input.otp-field:-webkit-autofill:focus { -webkit-text-fill-color: transparent; caret-color: transparent; transition: background-color 600000s 0s, color 600000s 0s; animation: otp-autofill 1ms; }
@keyframes otp-autofill { from { opacity: 1; } to { opacity: 1; } }

/* very narrow phones (Galaxy Fold, small Androids): the top bar must never be wider than the screen */
@media (max-width: 340px) {
  .site-header .container { gap: 6px; }
  .brand { font-size: 1rem; min-width: 0; }
  .header-actions { gap: 4px; }
  .site-header .btn { padding: 0 12px; }
  .site-header .lang-btn { padding: 0 10px; }
  .site-header .lang-caret { display: none; }
}
@media (max-width: 300px) { .site-header .brand .lotus { display: none; } }

/* ---- Free library: book cards and the in-app PDF reader ---- */
.book-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.book-tile { display: flex; gap: 14px; align-items: center; text-decoration: none; color: inherit; }
.book-cover { flex: none; width: 64px; height: 84px; border-radius: 8px; background: var(--gold-soft); color: var(--terracotta-dark); display: grid; place-items: center; }
.book-tile-text { min-width: 0; }
.book-tile-text h2 { margin: 0 0 2px; font-size: 1.05rem; }
.book-reader-card { padding-top: 12px; }
.book-page-wrap { position: relative; display: flex; justify-content: center; min-height: 200px; }
.book-page-wrap .spinner { position: absolute; top: 50%; left: 50%; margin: -11px 0 0 -11px; }
/* The reader sizes .book-page itself (width/height in px) each render, matching the pair of stacked canvases
   inside it; see book-reader.js. perspective gives the flip its sense of depth. */
.book-page { position: relative; max-width: 100%; perspective: 1700px; }
.book-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  backface-visibility: hidden; transform-style: preserve-3d;
}
.book-canvas.is-back { z-index: 1; }
.book-canvas.is-front { z-index: 2; }
.book-canvas.is-flipping { transition: transform .45s cubic-bezier(.4, 0, .2, 1), box-shadow .45s ease; }
.book-canvas.flip-next { transform-origin: left center; transform: rotateY(-120deg); box-shadow: -18px 8px 34px rgba(40, 20, 10, .35); }
.book-canvas.flip-prev { transform-origin: right center; transform: rotateY(120deg); box-shadow: 18px 8px 34px rgba(40, 20, 10, .35); }
@media (prefers-reduced-motion: reduce) { .book-canvas.is-flipping { transition: none; } }
.book-controls { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.book-page-label { font-weight: 600; min-width: 9ch; text-align: center; }
.book-jump { display: flex; gap: 8px; align-items: center; }
.book-jump-input { width: 5rem; min-height: 44px; text-align: center; }
@media (max-width: 480px) { .book-controls .btn { flex: 1 1 auto; } }

/* ---- icons that replaced text symbols (lotus, play, sparkle, pencil, ticks, close, WhatsApp) ---- */
.lotus { display: inline-flex; align-items: center; }
.lotus svg { display: block; }
.btn svg { flex: none; vertical-align: middle; margin-right: 2px; }
.video-title { display: flex; align-items: center; gap: 8px; }
.video-title svg { flex: none; color: var(--terracotta); }
.status-tick svg, .tracker-dot svg, .stepper-dot svg, .tip-mark svg { display: block; stroke-width: 2.6; }
.lang-prompt-x svg { display: block; margin: auto; }
.fc-icon { display: inline-flex; align-items: center; justify-content: center; margin-top: 2px; color: var(--terracotta-dark); }
.fc-line:hover .fc-icon { color: var(--terracotta); }
.footer-links .footer-title { grid-column: 1 / -1; }
.wa-fab svg { width: 30px; height: 30px; }

/* ---- home: Our temples / Upcoming temples ---- */
.temple-tile .temple-photo { position: relative; }
.temple-badge { position: absolute; left: 10px; top: 10px; padding: 4px 10px; border-radius: 999px; background: #fff; color: var(--terracotta-dark); font-size: .78rem; font-weight: 700; letter-spacing: .02em; box-shadow: 0 1px 4px rgba(40, 30, 15, .2); }
.temple-tile.is-soon .temple-photo img { filter: saturate(.8); }
.temple-soon { display: flex; align-items: center; gap: 14px; }
.temple-soon strong { font-size: 1.05rem; }
.temple-soon p { margin: 2px 0 0; }
.temple-soon-icon { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--gold-soft); color: var(--terracotta-dark); }
.temple-soon[hidden] { display: none; }

/* ---- booking form: temple preference menu (No preference + our temples) ---- */
.temple-menu .cal-picker { flex: none; width: 100%; }
.temple-menu .cal-picker-btn { font-weight: 500; }
.temple-menu .cal-picker-menu { left: 0; right: 0; width: 100%; max-height: 16rem; }
.temple-menu .cal-picker-option { min-height: 44px; padding: 8px 12px; white-space: normal; line-height: 1.3; }

/* ---- mandatory fields: a red star on the label ---- */
.req-star { color: #a8392b; font-weight: 700; }
.req-note { margin: 0; }

/* footer: the company behind the product */
.footer-company { font-weight: 700; color: var(--ink); white-space: nowrap; }
