body { background: #F3EDF0; }
.shell { max-width: 560px; margin: 0 auto; min-height: 100vh; background: var(--paper); position: relative; padding-bottom: calc(72px + var(--safe-b)); }
.shell.has-cart { padding-bottom: calc(140px + var(--safe-b)); }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px 6px; }
.logo { font-family: var(--display); font-size: 25px; color: var(--rani); text-decoration: none; line-height: 1.1; letter-spacing: .2px; }
.logo small { display: block; font-family: var(--font); font-size: 11.5px; color: var(--muted); letter-spacing: 0; font-weight: 600; }
.lang { min-height: 36px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); font-weight: 700; font-size: 14px; }
.deliver { display: flex; align-items: center; gap: 8px; padding: 0 16px 10px; font-size: 13.5px; color: var(--muted); }
.deliver .dot { color: var(--patti); }
.deliver.closed .dot { color: var(--danger); }
.deliver b { color: var(--ink); }

.searchbar { position: sticky; top: 0; z-index: 20; background: var(--paper); padding: 8px 16px 10px; border-bottom: 1px solid transparent; }
.searchbar.stuck { border-bottom-color: var(--line); }
.searchbox { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border-radius: 12px; background: var(--wash); border: 1.5px solid var(--line); color: var(--muted); text-decoration: none; font-size: 15px; }
.searchbox svg { flex: none; }
.searchbox input { border: 0; background: transparent; outline: none; width: 100%; font-size: 16px; min-height: 44px; color: var(--ink); }

.page-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 8px; position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: 18px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.back { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 0; background: transparent; color: var(--ink); text-decoration: none; }
.back:hover { background: var(--wash); }

main { padding: 0 16px; }
.section { margin: 18px 0 8px; }
.section h2 { font-size: 18px; margin-bottom: 12px; }
.section h2 small { font-weight: 600; color: var(--muted); font-size: 13px; margin-left: 6px; }

/* Notice */

/* Category tiles */
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 10px; }
.cat { display: block; min-width: 0; text-decoration: none; color: var(--ink); text-align: center; }
.cat .tile { width: 100%; aspect-ratio: 1; border-radius: 16px; display: grid; place-items: center; font-size: 34px; margin-bottom: 6px; }
.cat span { display: block; font-size: 12.5px; font-weight: 650; line-height: 1.2; overflow-wrap: anywhere; }

/* Signboard: the bazaar's painted shop boards */
.boards { display: grid; gap: 14px; }
.shop { display: block; text-decoration: none; color: var(--ink); }
.board {
  position: relative; border-radius: 10px; padding: 14px 16px 12px;
  background: var(--board, var(--rani)); color: #FFF4DC;
  box-shadow: inset 0 0 0 3px var(--board, var(--rani)), inset 0 0 0 5px rgba(255, 220, 140, .85);
}
.board::before, .board::after { content: ""; position: absolute; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 230, 170, .9); }
.board::before { left: 9px; }
.board::after { right: 9px; }
.board .bn { font-family: var(--display); font-size: 23px; line-height: 1.15; text-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.board .bs { font-size: 12.5px; opacity: .92; margin-top: 2px; font-weight: 600; }
.board.closed { filter: grayscale(.65) brightness(.95); }
.shop-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 2px 0; font-size: 13px; color: var(--muted); }
.shop-meta .pill { font-size: 12px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--patti); }
.tag::before { content: ""; width: 10px; height: 10px; border: 1.5px solid currentColor; border-radius: 2px; background: radial-gradient(circle, currentColor 2.5px, transparent 3px); }

/* Items grid */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 12px; }
@media (min-width: 440px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.item .ph { aspect-ratio: 4 / 3; border-radius: 12px; background: var(--wash); display: grid; place-items: center; font-size: 40px; overflow: hidden; border: 1px solid var(--line); }
.item .ph img { width: 100%; height: 100%; object-fit: cover; }
.item .ph .lt { font-family: var(--display); font-size: 40px; line-height: 1; color: rgba(43, 29, 36, .55); }
.item .nm { font-weight: 650; font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item .hi { font-size: 12.5px; color: var(--muted); }
.item .un { font-size: 12.5px; color: var(--muted); }
.item .from { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price { display: flex; align-items: baseline; gap: 6px; font-weight: 800; font-size: 15px; }
.price s { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.item .foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 4px; }

/* Item rows (shop menu) */
.rows { display: grid; }
.row-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.row-item:last-child { border-bottom: 0; }
.row-item .nm { font-weight: 650; font-size: 15px; }
.row-item .hi { font-size: 13px; color: var(--muted); }
.row-item .ds { font-size: 13px; color: var(--muted); margin-top: 4px; }
.row-item .side { display: grid; justify-items: center; gap: 8px; align-content: start; }
.row-item .thumb { width: 96px; height: 96px; border-radius: 12px; overflow: hidden; background: var(--wash); border: 1px solid var(--line); }
.row-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.menu-sec { margin-top: 18px; }
.menu-sec h3 { font-size: 16px; padding: 8px 0; border-bottom: 2px solid var(--ink); display: inline-block; }

/* Add / stepper */
.add { min-width: 86px; min-height: 38px; padding: 0 14px; border-radius: 10px; border: 1.5px solid var(--rani); background: var(--paper); color: var(--rani); font-weight: 800; font-size: 14px; }
.add:hover { background: var(--rani-wash); }
.stepper { display: inline-grid; grid-template-columns: 34px 28px 34px; align-items: center; min-height: 38px; border-radius: 10px; background: var(--rani); color: #fff; font-weight: 800; }
.stepper button { height: 38px; border: 0; background: transparent; color: #fff; font-size: 20px; font-weight: 700; line-height: 1; }
.stepper span { text-align: center; font-size: 15px; }
.oos { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.qty.bump .stepper { animation: bump .25s ease-out; }
@keyframes bump { 50% { transform: scale(1.08); } }

/* Shop hero */
.shop-hero { padding: 14px 16px 6px; }
.shop-hero .board { padding: 20px 18px 16px; }
.shop-hero .board .bn { font-size: 30px; }
.shop-hero .about { margin-top: 10px; color: var(--muted); font-size: 14px; }
.sec-nav { position: sticky; top: 57px; z-index: 15; background: var(--paper); display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.sec-nav::-webkit-scrollbar { display: none; }
.sec-nav .chip { min-height: 34px; font-size: 13px; }

/* Filter chips row */
.hscroll { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }

/* Empty state */

/* Sell card */
.sell { margin: 22px 0 10px; padding: 18px; border-radius: 16px; background: var(--genda-wash); display: grid; gap: 8px; }
.sell h3 { font-size: 17px; }
.sell p { font-size: 14px; color: #5C3B00; }
.sell .btn { justify-self: start; }

/* How it works */
.how { margin: 22px 0 6px; }
.how h2 { font-size: 17px; margin-bottom: 10px; }
.how ol { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.how li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center; font-size: 14px; }
.how li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--rani-wash); color: var(--rani-dark); font-weight: 800; }

.foot-links { padding: 18px 0 8px; font-size: 13px; color: var(--muted); display: grid; gap: 6px; }
.foot-links nav { display: flex; flex-wrap: wrap; gap: 14px; }
.foot-links a { color: var(--muted); }

/* Cart bar + bottom nav */
.cartbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(68px + var(--safe-b));
  width: min(calc(100% - 24px), 536px); z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding: 8px 16px; border-radius: 14px;
  background: var(--patti); color: #fff; text-decoration: none; font-weight: 800; box-shadow: 0 10px 28px rgba(31, 122, 58, .35);
}
.cartbar small { display: block; font-weight: 600; font-size: 12.5px; opacity: .9; }
.cartbar .go { font-size: 16px; }
.bnav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 560px; z-index: 31;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--paper); border-top: 1px solid var(--line); padding-bottom: var(--safe-b);
}
.bnav a { display: grid; justify-items: center; gap: 2px; padding: 8px 0 9px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-decoration: none; position: relative; }
.bnav a[aria-current="page"] { color: var(--rani); }
.bnav a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--genda); }
.bnav .badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--rani); color: #fff; font-size: 11px; display: grid; place-items: center; }

/* Cart & checkout */
.card { border: 1.5px solid var(--line); border-radius: 16px; padding: 14px; margin: 12px 0; }
.card h2, .card h3 { font-size: 16px; margin-bottom: 10px; }
.cart-shop { font-weight: 800; font-size: 14px; margin: 4px 0 2px; color: var(--rani-dark); }
.cart-line { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.cart-line:last-child { border-bottom: 0; }
.cart-line .nm { font-weight: 650; font-size: 14px; }
.cart-line .un { font-size: 12.5px; color: var(--muted); }
.cart-line .amt { font-weight: 800; min-width: 56px; text-align: right; }
.bill { display: grid; gap: 8px; font-size: 14px; }
.bill div { display: flex; justify-content: space-between; gap: 10px; }
.bill .total { font-weight: 800; font-size: 16px; padding-top: 8px; border-top: 1px solid var(--line); }
.freebar { margin: 10px 0 2px; }
.freebar .track { height: 6px; border-radius: 3px; background: var(--genda-wash); overflow: hidden; }
.freebar .fill { height: 100%; background: var(--genda); }
.freebar p { font-size: 13px; font-weight: 650; margin-top: 6px; color: #6B4600; }
.paybar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 560px; z-index: 32; background: var(--paper); padding: 10px 16px calc(10px + var(--safe-b)); box-shadow: var(--bar-shadow); }
.shell.checkout { padding-bottom: calc(96px + var(--safe-b)); }
.fine { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }
.loc { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.loc .ok { color: var(--patti); font-weight: 700; font-size: 13.5px; }
.slots h4 { margin: 12px 0 6px; font-size: 13.5px; color: var(--muted); }
.slots .chips .chip { min-height: 40px; }

/* Order tracking */
.done-head { text-align: center; padding: 22px 16px 8px; }
.done-head .big { font-family: var(--display); font-size: 30px; color: var(--patti); }
.done-head .no { font-weight: 800; font-size: 15px; margin-top: 4px; }
.done-head .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; }
.steps li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; position: relative; padding-bottom: 18px; color: var(--muted); }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line); background: var(--paper); margin: 2px 0 0 4px; z-index: 1; }
.steps li::after { content: ""; position: absolute; left: 12px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps li.done { color: var(--ink); }
.steps li.done::before { background: var(--patti); border-color: var(--patti); }
.steps li.done::after { background: var(--patti); }
.steps li.now { color: var(--ink); font-weight: 800; }
.steps li.now::before { border-color: var(--patti); box-shadow: 0 0 0 4px var(--patti-wash); }
.steps .t { font-size: 12.5px; color: var(--muted); font-weight: 500; display: block; }
.rider { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px; border-radius: 14px; background: var(--rani-wash); margin: 12px 0; font-weight: 700; }
.actions { display: grid; gap: 10px; margin: 14px 0; }
.olist { display: grid; gap: 10px; }
.orow { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 14px; border: 1.5px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); }
.orow .n { font-weight: 800; }
.orow .m { font-size: 13px; color: var(--muted); }

/* Info pages */
.prose { padding: 4px 0 20px; }
.prose h2 { font-size: 17px; margin: 18px 0 6px; }
.prose p, .prose li { font-size: 14.5px; color: #44343B; line-height: 1.6; }
.prose p + p { margin-top: 8px; }

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