::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

:root {
  --bg: #0e0f14;
  --bg-elevated: #1b1e29;
  --bg-card: #191c26;
  --text: #f2ede4;
  --text-dim: #9aa0b4;
  --accent: #ffb86b;
  --accent-strong: #ff9d3d;
  --aurora-1: #ffb86b;
  --aurora-2: #7c6cff;
  --aurora-3: #4fd1c5;
  --danger: #ff6b6b;
  --success: #7ee787;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 16px;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f7f3ec;
    --bg-elevated: #ffffff;
    --bg-card: #ffffff;
    --text: #1c1a17;
    --text-dim: #6b6558;
    --accent: #d97a2e;
    --accent-strong: #b8621f;
    --aurora-1: #ffcf9e;
    --aurora-2: #b8afff;
    --aurora-3: #9fe8de;
    --danger: #d64545;
    --success: #2e9e52;
    --border: rgba(0, 0, 0, 0.09);
  }
}
:root[data-theme="light"] {
  --bg: #f7f3ec;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --text: #1c1a17;
  --text-dim: #6b6558;
  --accent: #d97a2e;
  --accent-strong: #b8621f;
  --aurora-1: #ffcf9e;
  --aurora-2: #b8afff;
  --aurora-3: #9fe8de;
  --danger: #d64545;
  --success: #2e9e52;
  --border: rgba(0, 0, 0, 0.09);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  padding-bottom: 150px;
  position: relative;
}

@view-transition { navigation: auto; }

a { color: var(--accent); text-decoration: none; }

.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.15em;
  stroke-width: 2px;
}

/* ---------- Aurora background ---------- */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--bg);
  pointer-events: none;
}
header.topbar, main.container, footer.site-footer, .bottom-bar {
  position: relative;
  z-index: 1;
}
.waves-bg, .crt-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: var(--bg);
}

.vip-badge {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #c755f7, #7c6cff);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(199, 85, 247, 0.4);
}
.vip-badge .icon { width: 12px; height: 12px; }
.aurora-bg::before,
.aurora-bg::after,
.aurora-bg span {
  content: '';
  position: absolute;
  width: 95vw;
  height: 95vw;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.38;
  will-change: transform;
}
.aurora-bg::before {
  background: var(--aurora-1);
  top: -35vw;
  left: -30vw;
  animation: aurora-drift-a 26s ease-in-out infinite alternate;
}
.aurora-bg::after {
  background: var(--aurora-2);
  bottom: -40vw;
  right: -30vw;
  animation: aurora-drift-b 32s ease-in-out infinite alternate;
}
.aurora-bg span {
  background: var(--aurora-3);
  top: 25vh;
  left: 10vw;
  width: 75vw;
  height: 75vw;
  opacity: 0.22;
  animation: aurora-drift-c 38s ease-in-out infinite alternate;
}
@keyframes aurora-drift-a {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(6vw, 8vh) scale(1.15); }
}
@keyframes aurora-drift-b {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-6vw, -8vh) scale(1.1); }
}
@keyframes aurora-drift-c {
  from { transform: translate(-4vw, 5vh) scale(0.95); }
  to { transform: translate(5vw, -6vh) scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
  .aurora-bg::before, .aurora-bg::after, .aurora-bg span { animation: none; }
}

/* Ambient starfield — a handful of soft twinkling points over the aurora */
.stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1.5px 1.5px at 28% 44%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 45% 12%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1.5px 1.5px at 62% 30%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 78% 55%, rgba(255,255,255,0.85), transparent),
    radial-gradient(1.5px 1.5px at 88% 20%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 20% 70%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 55% 80%, rgba(255,255,255,0.75), transparent),
    radial-gradient(1px 1px at 92% 75%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 35% 92%, rgba(255,255,255,0.7), transparent);
  animation: star-twinkle 5s ease-in-out infinite alternate;
}
@keyframes star-twinkle {
  from { opacity: 0.5; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .stars { animation: none; opacity: 0.75; }
}

/* Soft "inverse" ripple: a light burst expanding from the touch point on an
   otherwise dark surface, for cards/buttons that opt in via .ripple. */
.ripple {
  position: relative;
  overflow: hidden;
}
.ripple-wave {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.18) 45%, transparent 72%);
  transform: scale(0);
  animation: ripple-expand 0.55s ease-out forwards;
  pointer-events: none;
}
@keyframes ripple-expand {
  to { transform: scale(1); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ripple-wave { display: none; }
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
  position: relative;
}

header.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(6px);
  z-index: 10;
}

header.topbar .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: 0.01em;
  color: var(--text);
}
header.topbar .brand .icon { color: var(--accent); width: 1.15em; height: 1.15em; }
.brand-logo { height: 26px; width: auto; display: block; }
.brand-logo-light { display: none; }
.brand-logo-dark { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .brand-logo-light { display: block; }
  :root:not([data-theme]) .brand-logo-dark { display: none; }
}
:root[data-theme="light"] .brand-logo-light { display: block; }
:root[data-theme="light"] .brand-logo-dark { display: none; }
:root[data-theme="dark"] .brand-logo-light { display: none; }
:root[data-theme="dark"] .brand-logo-dark { display: block; }

.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-actions .icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.topbar-actions .icon-btn .icon { width: 16px; height: 16px; }

.closed-badge, .status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}
.status-pill.open { background: rgba(126,231,135,0.15); color: var(--success); }
.status-pill.closed { background: rgba(255,107,107,0.15); color: var(--danger); }

.category-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 700;
  margin: 22px 0 12px;
  scroll-margin-top: 76px;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.greeting {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 16px;
  animation: card-in 0.4s cubic-bezier(0.2, 0, 0, 1) backwards;
}
.greeting-emoji {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.greeting-title { font-weight: 800; font-size: 1.1rem; }
.greeting-sub { color: var(--text-dim); font-size: 0.85rem; margin-top: 1px; }

.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 6px;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.chip:active { background: var(--accent); color: #1a1200; }

/* ---------- Item cards ---------- */
.item-card {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 12px;
  max-height: 300px;
  overflow: hidden;
  transition: opacity 0.2s ease, transform 0.15s ease, max-height 0.3s ease, margin 0.3s ease, padding 0.3s ease, border-width 0.3s ease;
  animation: card-in 0.36s cubic-bezier(0.2, 0, 0, 1) backwards;
}
.item-card:active { transform: scale(0.99); }
.item-card.sold-out { opacity: 0.42; }
.item-card.filtered-out {
  opacity: 0;
  transform: scale(0.95);
  max-height: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  pointer-events: none;
}
.category-title.filtered-out { display: none; }

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 16px;
  margin-bottom: 12px;
  color: var(--text-dim);
}
.search-box .icon { flex-shrink: 0; }
.search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.92rem;
}
.search-box input::placeholder { color: var(--text-dim); }

.view-mode-row { display: flex; gap: 6px; justify-content: flex-end; margin-bottom: 10px; }
.view-mode-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.view-mode-btn .icon { width: 15px; height: 15px; }
.view-mode-btn.active { background: var(--accent); color: #1a1200; border-color: var(--accent); }

/* Grid view: vertical cards. Scoped to #item-listing only, so a stale
   body.view-grid/view-masonry class left over from the AJAX tab-router never
   reaches cart.php/wishlist.php, which reuse .item-card outside #item-listing. */
.view-grid #item-listing { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.view-grid #item-listing .item-card { flex-wrap: wrap; align-items: center; justify-content: center; text-align: center; margin-bottom: 0; max-height: 420px; }
.view-grid #item-listing .item-thumb { flex: 0 0 100%; width: 100%; height: 110px; }
.view-grid #item-listing .item-info { flex: 0 0 100%; width: 100%; }
.view-grid #item-listing .category-title { grid-column: 1 / -1; }

/* Masonry view: CSS multi-column */
.view-masonry #item-listing { columns: 2; column-gap: 10px; }
.view-masonry #item-listing .item-card { break-inside: avoid; flex-wrap: wrap; align-items: center; justify-content: center; text-align: center; max-height: 420px; }
.view-masonry #item-listing .item-thumb { flex: 0 0 100%; width: 100%; height: 120px; }
.view-masonry #item-listing .item-info { flex: 0 0 100%; width: 100%; }
.view-masonry #item-listing .category-title { break-inside: avoid; column-span: all; }

/* Grid disclosure: category capsules that open into an iOS-folder-style modal */
.disclosure-capsule {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 12px;
  cursor: pointer;
}
.disclosure-summary { display: flex; align-items: center; gap: 12px; }
.disclosure-icons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; flex-shrink: 0; }
.disclosure-icons img { width: 20px; height: 20px; border-radius: 6px; object-fit: cover; background: var(--bg-elevated); }
.disclosure-title-wrap { flex: 1; min-width: 0; }
.disclosure-title { font-weight: 800; font-size: 1rem; }
.disclosure-count { color: var(--text-dim); font-size: 0.8rem; }
.disclosure-summary .icon { margin-left: auto; color: var(--text-dim); }
.disclosure-items { display: none; }

.disclosure-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.disclosure-modal-backdrop.open { opacity: 1; pointer-events: auto; }
.disclosure-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.disclosure-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.disclosure-modal-title { font-weight: 800; font-size: 1.05rem; }
.disclosure-modal-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-elevated);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  flex-shrink: 0;
}
.disclosure-modal-body { padding: 14px 16px; overflow-y: auto; }
.disclosure-modal-body .item-card:last-child { margin-bottom: 0; }
@media (prefers-reduced-motion: reduce) {
  .disclosure-modal-backdrop { transition: none; }
}

.morph-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16/7;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--bg-elevated);
  cursor: pointer;
}
.morph-slides { position: relative; width: 100%; height: 100%; }
.morph-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.08);
  filter: blur(14px);
  transition: opacity 1.1s ease, transform 1.1s ease, filter 1.1s ease;
  pointer-events: none;
}
.morph-slide.active { opacity: 1; transform: scale(1); filter: blur(0); pointer-events: auto; }
.morph-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.morph-caption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.morph-indicators { position: absolute; bottom: 10px; right: 14px; display: flex; gap: 6px; z-index: 2; }
.morph-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.45); transition: background 0.2s ease, transform 0.2s ease; }
.morph-dot.active { background: #fff; transform: scale(1.3); }
@media (prefers-reduced-motion: reduce) {
  .morph-slide { transition: opacity 0.3s ease; transform: none !important; filter: none !important; }
}

.category-wheel { display: none; }
@media (min-width: 1024px) {
  .category-wheel {
    display: block;
    position: fixed;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
  }
  .category-wheel-track {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .wheel-item {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    padding: 2px 0;
    transform-origin: left center;
    transition: color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.65;
  }
  .wheel-item:hover { opacity: 1; }
  .wheel-item.active {
    color: var(--accent);
    font-size: 1.05rem;
    opacity: 1;
    transform: translateX(4px) scale(1.08);
  }
  .wheel-item:nth-child(n):not(.active) { transform: translateX(0) rotate(-1.5deg); }
}

.wishlist-heart {
  position: absolute;
  bottom: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  padding: 0;
}
.wishlist-heart .heart-outline {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  transition: fill 0.15s ease, stroke 0.15s ease, transform 0.3s cubic-bezier(0.17, 0.89, 0.32, 1.49);
}
.wishlist-heart.active .heart-outline { fill: #ff5470; stroke: #ff5470; }
.wishlist-heart.pop .heart-outline { transform: scale(1.35); }
.wishlist-heart .heart-burst {
  position: absolute;
  inset: -14px;
  pointer-events: none;
}
.wishlist-heart .heart-burst span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ff5470;
  opacity: 0;
  transform: translate(-50%, -50%);
}
.wishlist-heart.bursting .heart-burst span {
  animation: heart-burst-dot 0.55s ease-out forwards;
}
@keyframes heart-burst-dot {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0); }
}
.drawer-wishlist-heart {
  position: absolute;
  top: 10px;
  right: 10px;
  bottom: auto;
  left: auto;
  width: 34px;
  height: 34px;
  z-index: 5;
}
.drawer-wishlist-heart .heart-outline { width: 18px; height: 18px; }

.cart-fab {
  position: fixed;
  right: 18px;
  bottom: calc(88px + env(safe-area-inset-bottom));
  z-index: 25;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #1a1200;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cart-fab:active { transform: scale(0.92); }
.cart-fab-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--danger);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg);
}

.cart-drawer-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.cart-drawer-line img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--bg-elevated); }
.cart-drawer-line .cdl-name { flex: 1; font-size: 0.85rem; }
.cart-drawer-line .cdl-qty { color: var(--text-dim); font-size: 0.8rem; }
.cart-drawer-line .cdl-total { font-weight: 700; font-size: 0.85rem; }
.cart-drawer-subtotal { display: flex; justify-content: space-between; padding: 10px 0; font-weight: 800; }

.product-page-card { position: relative; background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 16px; margin-top: 4px; }
.product-page-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(160deg, #2a2e3d, #1b1e29);
  margin-bottom: 8px;
}
.pp-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.35s ease; display: flex; align-items: center; justify-content: center; }
.pp-slide.active { opacity: 1; }
.pp-slide img { width: 100%; height: 100%; object-fit: cover; }
.pp-slide .icon { width: 48px; height: 48px; color: var(--text-dim); }

.share-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.25s ease, background 0.25s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.share-icon:hover { opacity: 1; background: var(--bg-elevated); transform: scale(1.08) rotate(-8deg); }
.share-icon-svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.share-icon-check {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.5) rotate(-45deg);
  color: var(--success);
  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.share-icon-check .icon { width: 15px; height: 15px; }
.share-icon.copied .share-icon-svg { opacity: 0; transform: scale(0.5) rotate(45deg); }
.share-icon.copied .share-icon-check { opacity: 1; transform: scale(1) rotate(0deg); }
.share-icon.copied { opacity: 1; background: color-mix(in srgb, var(--success) 15%, transparent); }

.drawer-share-icon { position: absolute; top: 44px; right: 10px; z-index: 5; }

.item-thumb {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  background: linear-gradient(160deg, #2a2e3d, #1b1e29);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-thumb .icon { width: 28px; height: 28px; }

.item-badge {
  position: absolute;
  top: -6px;
  left: -6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.item-badge.new { background: var(--accent); color: #1a1200; }
.item-badge.bestseller { background: var(--success); color: #06280a; }
.item-badge.combo { background: var(--aurora-2); color: #fff; }

.food-dot {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.food-dot::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
}
.food-dot.veg { background: #fff; }
.food-dot.veg::after { background: #2e7d32; }
.food-dot.non-veg { background: #fff; }
.food-dot.non-veg::after { background: #b3261e; }
.food-dot.egg { background: #fff; }
.food-dot.egg::after { background: #b3261e; }
.drawer-heading .food-dot { position: relative; top: auto; right: auto; bottom: auto; margin-top: 4px; flex-shrink: 0; }

.discount-ribbon {
  position: absolute;
  top: 12px;
  left: -30px;
  width: 116px;
  transform: rotate(-45deg);
  background: linear-gradient(90deg, #e0242c, #ff6b4a);
  text-align: center;
  z-index: 3;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  overflow: hidden;
}
.discount-shimmer-text {
  position: relative;
  display: block;
  padding: 3px 0;
  font-size: 0.62rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
}
.discount-ribbon::after {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,0.75), transparent);
  animation: discount-shimmer 2.6s ease-in-out infinite;
}
@keyframes discount-shimmer {
  0% { left: -60%; }
  50% { left: 130%; }
  100% { left: 130%; }
}
.mrp-strike {
  color: var(--text-dim);
  text-decoration: line-through;
  font-size: 0.78rem;
  font-weight: 500;
  margin-left: 6px;
}
@media (prefers-reduced-motion: reduce) {
  .discount-ribbon::after { animation: none; }
}

.combo-badge {
  display: inline-block;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  margin: 2px 0;
}
.drawer-combo-badge { margin-bottom: 8px; }

.item-info { flex: 1; min-width: 0; }
.item-name { font-weight: 700; font-size: 0.98rem; display: block; color: var(--text); text-decoration: none; }
.item-price { color: var(--text-dim); font-size: 0.85rem; margin-top: 2px; font-weight: 600; }

.stock-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  margin-top: 5px;
  font-weight: 600;
}
.stock-indicator .icon { width: 13px; height: 13px; }
.stock-indicator.plenty { color: var(--text-dim); }
.stock-indicator.low { color: var(--accent); text-shadow: 0 0 12px rgba(255,184,107,0.5); }
.stock-indicator.critical { color: var(--danger); }
.stock-indicator.out { color: var(--text-dim); text-decoration: line-through; }

.qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.qty-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--danger);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease;
}
.qty-btn .icon { width: 16px; height: 16px; }
.qty-btn:active { transform: scale(0.9); }
.qty-btn:disabled { opacity: 0.35; }
.qty-value { min-width: 18px; text-align: center; font-weight: 800; font-size: 1rem; }

.add-btn {
  background: var(--accent);
  color: #1a1200;
  border: none;
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.add-btn:active { transform: scale(0.95); }
.add-btn:disabled { background: var(--bg-elevated); color: var(--text-dim); }
.add-btn .icon { width: 15px; height: 15px; }

.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(27, 30, 41, 0.92);
  backdrop-filter: none;
  border-top: 1px solid var(--border);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--accent);
  color: #1a1200;
  border: none;
  border-radius: 999px;
  padding: 13px 22px;
  font-weight: 800;
  font-size: 0.95rem;
  width: 100%;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.btn .icon { width: 17px; height: 17px; }
.btn:active { transform: scale(0.98); }
.btn.secondary { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); }
.btn:disabled { opacity: 0.5; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.8rem; color: var(--text-dim); margin-bottom: 6px; font-weight: 600; }
.field input, .field select {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 14px;
  color: var(--text);
  font-size: 1rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  animation: card-in 0.36s cubic-bezier(0.2, 0, 0, 1) backwards;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .item-card, .card { animation: none; }
}

/* ---------- Selectable option list (checkout) ---------- */
.option-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.option-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.option-item:has(input:checked) { border-color: var(--accent); background: rgba(255,184,107,0.08); }
.option-item .icon-wrap {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}
.option-item .icon-wrap .icon { width: 19px; height: 19px; }
.option-item .option-body { flex: 1; }
.option-item .option-title { font-weight: 700; font-size: 0.92rem; color: var(--text); }
.option-item .option-sub { color: var(--text-dim); font-size: 0.76rem; margin-top: 1px; }
.option-item input[type=radio] { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }
.option-item.disabled { opacity: 0.4; cursor: not-allowed; }

.error-msg { display: flex; align-items: center; gap: 6px; color: var(--danger); font-size: 0.85rem; margin: 8px 0; }
.hint { color: var(--text-dim); font-size: 0.78rem; margin-top: 6px; }

.token-card {
  text-align: center;
  padding: 36px 20px;
  background: radial-gradient(circle at top, rgba(255,184,107,0.14), var(--bg-card));
  border: 1px dashed var(--accent);
  border-radius: 20px;
  animation: card-in 0.4s cubic-bezier(0.2, 0, 0, 1) backwards;
}
.token-code {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-shadow: 0 0 24px rgba(255,184,107,0.35);
  margin: 10px 0;
}
.token-pin {
  font-size: 1.1rem;
  letter-spacing: 0.3em;
  color: var(--text-dim);
}
.token-qr {
  width: 140px;
  height: 140px;
  margin: 16px auto 0;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
}
.token-qr svg { width: 100%; height: 100%; display: block; }

.order-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 0.92rem; }
.order-row.total { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 12px; font-weight: 800; font-size: 1.05rem; }

footer.site-footer {
  padding: 24px 16px 100px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.7;
}
footer.site-footer a { color: var(--text-dim); text-decoration: underline; }

.dia-text-reveal {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  background: linear-gradient(90deg, #A97CF8, #F38CB8, #FDCC92, #A97CF8);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: dia-shimmer 6s ease-in-out infinite, dia-reveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  animation-timeline: view();
  animation-range: entry 0% cover 30%;
}
@keyframes dia-shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes dia-reveal {
  from { opacity: 0; clip-path: inset(0 100% 0 0); }
  to { opacity: 1; clip-path: inset(0 0 0 0); }
}
@media (prefers-reduced-motion: reduce) {
  .dia-text-reveal { animation: none; background-position: 30% 50%; }
}

.text-loop {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 68px;
  z-index: 29;
  max-width: 456px;
  margin: 0 auto;
  overflow: hidden;
  white-space: nowrap;
  border-radius: 999px;
  padding: 8px 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  background: var(--ribbon-color, #5227FF);
}
.tl-track {
  display: inline-flex;
  width: max-content;
  animation: tl-scroll 14s linear infinite;
}
.text-loop:hover .tl-track { animation-play-state: paused; }
.tl-copy { display: inline-flex; padding-right: 2em; }
.tl-char {
  display: inline-block;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  animation: tl-bob 1.6s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.045s);
}
.tl-char.tl-space { width: 0.35em; }
@keyframes tl-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes tl-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) {
  .tl-track { animation: none; }
  .tl-char { animation: none; }
}

.empty-state {
  text-align: center;
  padding: 70px 20px;
  color: var(--text-dim);
}
.empty-state .icon { width: 40px; height: 40px; margin-bottom: 10px; opacity: 0.6; }

table.admin-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
table.admin-table th, table.admin-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); }
table.admin-table th { color: var(--text-dim); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; }

.admin-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.admin-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.85rem;
}
.admin-nav a.active { background: var(--accent); color: #1a1200; border-color: var(--accent); }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; }
.badge.pending { background: rgba(255,184,107,0.15); color: var(--accent); }
.badge.confirmed { background: rgba(126,231,135,0.15); color: var(--success); }
.badge.ready { background: rgba(126,231,135,0.25); color: var(--success); }
.badge.completed { background: rgba(154,160,180,0.2); color: var(--text-dim); }
.badge.cancelled, .badge.expired { background: rgba(255,107,107,0.15); color: var(--danger); }
.badge.out_for_delivery { background: rgba(255,184,107,0.25); color: var(--accent); }

/* ---------- Dynamic rotating banner ---------- */
.dynamic-banner {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 2px 0 18px;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 600;
  overflow: hidden;
}
.dynamic-banner .icon { color: var(--accent); flex-shrink: 0; }
.dynamic-banner-text { display: inline-block; }
.dynamic-banner-text.enter { animation: banner-in 0.32s cubic-bezier(0.2, 0, 0, 1); }
@keyframes banner-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .dynamic-banner-text.enter { animation: none; }
}

/* ---------- Item tap targets (opens the product drawer) ---------- */
.item-tap { cursor: pointer; }

/* ---------- Product drawer ---------- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 7, 10, 0.6);
  backdrop-filter: blur(2px);
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}
.drawer-backdrop.open { opacity: 1; visibility: visible; }

.drawer-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 41;
  background: var(--bg-elevated);
  border-radius: 24px 24px 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
  max-width: 480px;
  margin: 0 auto;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  max-height: 85vh;
  overflow-y: auto;
}
.drawer-sheet.open { transform: translateY(0); opacity: 1; }

.drawer-handle {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  margin: 6px auto 16px;
}

.drawer-media {
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: 16px;
  background: linear-gradient(160deg, #2a2e3d, #1b1e29);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 8px;
}
.drawer-media.carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.drawer-media.carousel::-webkit-scrollbar { display: none; }
.drawer-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; }
.drawer-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.drawer-media .icon { width: 48px; height: 48px; color: var(--text-dim); }

.drawer-dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 12px; }
.drawer-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border); transition: background 0.2s ease, transform 0.2s ease; }
.drawer-dot.active { background: var(--accent); transform: scale(1.3); }

.drawer-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.drawer-name { font-size: 1.25rem; font-weight: 800; }
.drawer-price { color: var(--accent); font-size: 1.5rem; font-weight: 800; margin: 4px 0 10px; }
.drawer-interest {
  display: flex; align-items: center; gap: 6px;
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger); font-size: 0.78rem; font-weight: 700;
  padding: 7px 10px; border-radius: 10px; margin-bottom: 12px;
}
.drawer-interest .icon { width: 14px; height: 14px; flex-shrink: 0; }
.drawer-description { color: var(--text-dim); font-size: 0.85rem; line-height: 1.5; margin-bottom: 16px; }

.drawer-details { border-top: 1px solid var(--border); padding-top: 14px; }
.details-title { font-weight: 700; font-size: 0.9rem; margin-bottom: 10px; }
.details-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; font-size: 0.82rem; }
.details-list dt { color: var(--text-dim); font-weight: 600; }
.details-list dd { margin: 0; color: var(--text); text-align: right; }

.counter-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-bottom: 18px;
}
.counter-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease;
}
.counter-btn:active { transform: scale(0.9); }
.counter-btn:disabled { opacity: 0.35; }
.counter-track { position: relative; overflow: hidden; height: 2.2rem; width: 3rem; }
.counter-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.counter-digit { display: inline-block; }
.counter-digit.slide-up-in { animation: counter-up-in 0.22s cubic-bezier(0.2, 0, 0, 1); }
.counter-digit.slide-down-in { animation: counter-down-in 0.22s cubic-bezier(0.2, 0, 0, 1); }
@keyframes counter-up-in {
  from { opacity: 0; transform: translateY(14px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes counter-down-in {
  from { opacity: 0; transform: translateY(-14px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.counter-row.shake { animation: counter-shake 0.32s ease; }
@keyframes counter-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}
@media (prefers-reduced-motion: reduce) {
  .counter-digit.slide-up-in, .counter-digit.slide-down-in, .counter-row.shake { animation: none; }
}

/* ---------- Gooey bottom tab bar ---------- */
.gooey-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.gooey-layer {
  position: absolute;
  inset: 0;
  height: 62px;
  filter: url(#goo-filter);
  pointer-events: none;
}
.gooey-pill {
  position: absolute;
  top: 8px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 20px rgba(255,184,107,0.5);
  transition: left 0.45s cubic-bezier(0.65, 0, 0.35, 1);
  view-transition-name: gooey-pill;
}
.gooey-dot { display: none; }
.gooey-tabs {
  position: relative;
  display: flex;
  height: 62px;
}
.gooey-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-dim);
  font-size: 0.66rem;
  font-weight: 700;
}
.gooey-icon-wrap { position: relative; display: flex; transition: color 0.2s ease; }
.gooey-tab.active .gooey-icon-wrap { color: #1a1200; }
.gooey-tab.active .gooey-label { color: var(--text); }
.gooey-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: var(--danger);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  border-radius: 999px;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
@media (prefers-reduced-motion: reduce) {
  .gooey-pill { transition: none; }
}

/* ---------- Goo delete-confirm (cart line removal) ---------- */
.goo-delete { position: relative; flex-shrink: 0; width: 34px; height: 34px; transition: width 0.3s ease; }
.goo-delete.confirming { width: 78px; }
.goo-delete-layer { position: absolute; inset: 0; filter: url(#goo-filter); }
.goo-delete-trigger, .goo-delete-no, .goo-delete-yes {
  position: absolute;
  top: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.goo-delete-trigger .icon, .goo-delete-no .icon, .goo-delete-yes .icon { width: 15px; height: 15px; }
.goo-delete-trigger { left: 0; background: var(--bg-card); color: var(--text-dim); opacity: 1; }
.goo-delete-no { left: 0; background: var(--bg-elevated); color: var(--text); opacity: 0; transform: scale(0.5); }
.goo-delete-yes { left: 0; background: var(--danger); color: #fff; opacity: 0; transform: scale(0.5); }
.goo-delete.confirming .goo-delete-trigger { opacity: 0; transform: scale(0.5); pointer-events: none; }
.goo-delete.confirming .goo-delete-no { opacity: 1; transform: scale(1); }
.goo-delete.confirming .goo-delete-yes { left: 44px; opacity: 1; transform: scale(1); }
@media (prefers-reduced-motion: reduce) {
  .goo-delete, .goo-delete-trigger, .goo-delete-no, .goo-delete-yes { transition: none; }
}

/* ---------- Payment pending / waiting state ---------- */
.pay-waiting {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 12px;
}
.pay-spinner {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-left-color: var(--accent);
  border-top-color: rgba(255,184,107,0.25);
  animation: pay-spin 1s linear infinite;
  flex-shrink: 0;
}
@keyframes pay-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .pay-spinner { animation: none; }
}

/* ---------- Payment success celebration ---------- */
.pay-success { text-align: center; padding: 8px 0 4px; position: relative; }
.pay-success-glow {
  width: 100px; height: 100px; margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(126,231,135,0.4), transparent 70%);
  animation: glow-pulse 1.6s ease forwards;
  position: absolute;
  left: 50%; top: 4px; transform: translateX(-50%);
}
.pay-checkmark { display: block; margin: 0 auto 14px; position: relative; animation: pay-checkmark-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
@keyframes pay-checkmark-in {
  from { opacity: 0; transform: rotate(-180deg) scale(0.7); }
  to { opacity: 1; transform: rotate(0) scale(1); }
}
.pay-checkmark-circle, .pay-checkmark-check {
  fill: none; stroke: var(--success); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round;
}
.pay-checkmark-circle { stroke-dasharray: 264; stroke-dashoffset: 264; animation: draw-line 0.7s cubic-bezier(0.65, 0, 0.35, 1) forwards; }
.pay-checkmark-check { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw-line 0.4s 0.5s cubic-bezier(0.65, 0, 0.35, 1) forwards; }
@keyframes draw-line { to { stroke-dashoffset: 0; } }
@keyframes glow-pulse { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0.5; } }
.pay-success h2 { font-size: 1.1rem; font-weight: 800; margin: 4px 0 4px; color: var(--success); }
.pay-success p { color: var(--text-dim); font-size: 0.85rem; margin: 0; }
@media (prefers-reduced-motion: reduce) {
  .pay-checkmark-circle, .pay-checkmark-check, .pay-success-glow, .pay-checkmark { animation: none; stroke-dashoffset: 0; opacity: 1; transform: none; }
}

/* ---------- Snappy client-side tab navigation ---------- */
main.page-swap-in { animation: page-swap-in 0.28s cubic-bezier(0.2, 0, 0, 1); }
main.page-swap-out { opacity: 0.5; transition: opacity 0.15s ease; }
@keyframes page-swap-in {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  main.page-swap-in { animation: none; }
}

/* ---------- Snappy in-place update feedback ---------- */
.pulse-snap { animation: pulse-snap 0.32s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes pulse-snap {
  0% { transform: scale(1); }
  40% { transform: scale(1.22); }
  100% { transform: scale(1); }
}
.item-card.row-leaving {
  animation: row-leave 0.22s ease forwards;
  pointer-events: none;
}
@keyframes row-leave {
  to { opacity: 0; transform: scale(0.94) translateX(12px); max-height: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pulse-snap, .item-card.row-leaving { animation: none; }
}

.btn.shimmer { position: relative; overflow: hidden; }
.btn.shimmer::after {
  content: '';
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,0.55), transparent);
  animation: shimmer-sweep 3.2s ease-in-out infinite;
}
@keyframes shimmer-sweep {
  0% { left: -60%; }
  40%, 100% { left: 140%; }
}
@media (prefers-reduced-motion: reduce) {
  .btn.shimmer::after { animation: none; display: none; }
}
