/* POS table picker — floor-display DNA: dense, dark, status-glow, glass VR */

#pos-cat-portal-host > .pos-tbl-veil.pos-cat-veil,
.pos-tbl-veil.pos-cat-veil {
  --tbl-free: #34d399;
  --tbl-busy: #f59e0b;
  --tbl-reserved: #60a5fa;
  --tbl-dirty: #fb7185;
  --tbl-accent: #38bdf8;
  --tbl-gold: #f5d78e;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  place-items: stretch !important;
  padding: 0 !important;
  background:
    radial-gradient(ellipse 90% 50% at 50% -8%, rgba(56, 189, 248, 0.18), transparent 52%),
    radial-gradient(ellipse 45% 35% at 100% 100%, rgba(167, 139, 250, 0.12), transparent 55%),
    rgba(2, 6, 23, 0.32) !important;
  backdrop-filter: blur(6px) saturate(1.2) !important;
  -webkit-backdrop-filter: blur(6px) saturate(1.2) !important;
  animation: posTblVeilIn 0.22s ease-out both !important;
  color: #f8fafc;
}

#pos-cat-portal-host > .pos-tbl-veil.pos-cat-veil.is-closing,
.pos-tbl-veil.pos-cat-veil.is-closing {
  animation: posTblVeilOut 0.18s ease-in both !important;
  animation-delay: 0s !important;
}

.pos-cat-veil .pos-tbl-vr-grid,
.pos-tbl-veil .pos-tbl-vr-grid {
  position: absolute !important;
  left: -20%; right: -20%; top: 14%; bottom: -38%;
  pointer-events: none !important;
  z-index: 0 !important;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.42) 1.25px, transparent 1.25px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.42) 1.25px, transparent 1.25px) !important;
  background-size: 52px 52px !important;
  transform: perspective(900px) rotateX(64deg) scale(1.5) !important;
  transform-origin: 50% 0% !important;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.85) 0%, rgba(0,0,0,.45) 55%, transparent 92%) !important;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.85) 0%, rgba(0,0,0,.45) 55%, transparent 92%) !important;
  opacity: 0.9 !important;
  animation: posTblGridDrift 14s ease-in-out infinite alternate;
}
.pos-cat-veil .pos-tbl-vr-scan,
.pos-tbl-veil .pos-tbl-vr-scan {
  position: absolute !important;
  inset: 0; z-index: 1; pointer-events: none !important;
  background:
    radial-gradient(ellipse 50% 28% at 50% 100%, rgba(56, 189, 248, 0.22), transparent 70%),
    radial-gradient(circle at 18% 22%, rgba(255,255,255,.12) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 38%, rgba(255,255,255,.1) 0 1px, transparent 2px),
    radial-gradient(circle at 44% 68%, rgba(255,255,255,.08) 0 1.2px, transparent 2.4px) !important;
  animation: posTblTwinkle 5.5s ease-in-out infinite;
}

@keyframes posTblGridDrift {
  from { opacity: 0.82; transform: perspective(900px) rotateX(64deg) scale(1.48) translateY(0); }
  to { opacity: 1; transform: perspective(900px) rotateX(64deg) scale(1.52) translateY(-1.5%); }
}
@keyframes posTblTwinkle { 0%, 100% { opacity: 0.75; } 50% { opacity: 1; } }

.pos-tbl-veil .pos-tbl-shell {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-height: 100dvh;
  max-height: 100svh;
  padding:
    max(0.55rem, env(safe-area-inset-top, 0px))
    max(0.55rem, env(safe-area-inset-right, 0px))
    max(0.55rem, env(safe-area-inset-bottom, 0px))
    max(0.55rem, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
  gap: 0.45rem;
  /* Pass clicks on empty shell chrome to the veil (dismiss) */
  pointer-events: none;
}
.pos-tbl-veil .pos-tbl-toolbar,
.pos-tbl-veil .pos-tbl-tabs,
.pos-tbl-veil .pos-tbl-dismiss {
  pointer-events: auto;
}
/* Metro must receive wheel/touch so long hall lists can scroll.
   Empty-area click still bubbles to the veil and dismisses. */
.pos-tbl-veil .pos-tbl-metro {
  pointer-events: auto !important;
  touch-action: pan-y;
  overscroll-behavior: contain;
}
.pos-tbl-veil .pos-tbl-card,
.pos-tbl-veil .pos-tbl-band,
.pos-tbl-veil .pos-tbl-empty {
  pointer-events: auto !important;
}

/* One toolbar row: hall tabs (scroll) + close at the end */
.pos-tbl-veil .pos-tbl-toolbar {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
  min-width: 0;
  width: 100%;
  padding: 0;
  margin: 0;
  animation: posTblTabsIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.pos-tbl-veil .pos-tbl-chrome { display: none !important; }

.pos-tbl-veil .pos-cat-dismiss.pos-tbl-dismiss {
  position: relative !important;
  top: auto !important;
  inset: auto !important;
  inset-inline-end: auto !important;
  flex: 0 0 2.55rem;
  width: 2.55rem;
  height: 2.55rem;
  min-width: 2.55rem;
  z-index: 6;
  margin: 0;
  order: 2;
  background:
    linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.88)) !important;
  color: #e0f2fe !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 10px 22px rgba(2, 6, 23, 0.45),
    0 0 18px rgba(56, 189, 248, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Mobile hall dropdown — hidden on desktop */
.pos-tbl-veil .pos-tbl-hall-dd {
  display: none;
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  order: 1;
  align-items: center;
}
.pos-tbl-veil .pos-tbl-hall-dd-pip {
  position: absolute;
  inset-inline-start: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--tab-accent, #38bdf8) 80%, #fff);
  box-shadow: 0 0 12px color-mix(in srgb, var(--tab-accent, #38bdf8) 70%, transparent);
  pointer-events: none;
  z-index: 2;
}
.pos-tbl-veil .pos-tbl-hall-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-width: 0;
  min-height: 2.65rem;
  padding: 0.55rem 2.4rem 0.55rem 1.85rem;
  border-radius: 14px;
  border: 1px solid rgba(245, 215, 142, 0.35);
  background:
    linear-gradient(155deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.88));
  color: #f8fafc;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 12px 28px rgba(2, 6, 23, 0.45),
    0 0 22px rgba(56, 189, 248, 0.12);
  cursor: pointer;
}
.pos-tbl-veil .pos-tbl-hall-select:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.35) inset,
    0 0 0 3px rgba(56, 189, 248, 0.18),
    0 14px 28px rgba(2, 6, 23, 0.5);
}
.pos-tbl-veil .pos-tbl-hall-select option {
  background: #0f172a;
  color: #f8fafc;
}
.pos-tbl-veil .pos-tbl-hall-dd-caret {
  position: absolute;
  inset-inline-end: 0.85rem;
  top: 50%;
  width: 0.55rem;
  height: 0.55rem;
  border-inline-end: 2px solid #f5d78e;
  border-bottom: 2px solid #f5d78e;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
  z-index: 2;
}
html[dir="rtl"] .pos-tbl-veil .pos-tbl-hall-select,
.pos-tbl-veil .pos-tbl-hall-select {
  padding-inline-start: 1.85rem;
  padding-inline-end: 2.4rem;
}

/* —— Luxury hall rail (floor-display DNA) —— */
.pos-tbl-veil .pos-tbl-tabs {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  order: 1;
  justify-content: flex-start;
  padding: 0;
  margin: 0;
}
.pos-tbl-veil .pos-tbl-tabs-rail {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.28rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  padding: 0.28rem;
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.55));
  border: 1px solid rgba(56, 189, 248, 0.28);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 12px 32px rgba(2, 6, 23, 0.4),
    0 0 40px rgba(56, 189, 248, 0.08);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.pos-tbl-veil .pos-tbl-tabs-rail::-webkit-scrollbar { display: none; width: 0; height: 0; }

.pos-tbl-veil .pos-tbl-tab {
  appearance: none;
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  border: 1px solid transparent !important;
  border-radius: 999px !important;
  padding: 0.42rem 0.85rem 0.42rem 0.55rem !important;
  cursor: pointer;
  font: inherit;
  color: #cbd5e1 !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
  isolation: isolate;
  overflow: hidden;
}
.pos-tbl-veil .pos-tbl-tab::before { display: none !important; }
.pos-tbl-veil .pos-tbl-tab-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--tab-accent, var(--tbl-accent)) 35%, transparent), transparent 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.pos-tbl-veil .pos-tbl-tab-pip {
  position: relative;
  z-index: 1;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--tab-accent, var(--tbl-accent)) 70%, #fff);
  box-shadow: 0 0 10px color-mix(in srgb, var(--tab-accent, var(--tbl-accent)) 70%, transparent);
  flex: 0 0 auto;
}
.pos-tbl-veil .pos-tbl-tab strong {
  position: relative;
  z-index: 1;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.pos-tbl-veil .pos-tbl-tab em {
  position: relative;
  z-index: 1;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 800;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.28rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16) !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(148, 163, 184, 0.22);
  font-variant-numeric: tabular-nums;
}
.pos-tbl-veil .pos-tbl-tab:hover {
  color: #f8fafc !important;
  background: rgba(56, 189, 248, 0.1) !important;
  transform: translateY(-1px);
}
.pos-tbl-veil .pos-tbl-tab:hover .pos-tbl-tab-glow { opacity: 0.55; }

.pos-tbl-veil .pos-tbl-tab.is-on {
  color: #04101c !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--tab-accent, var(--tbl-accent)) 88%, #fff) 0%,
      color-mix(in srgb, var(--tab-accent, var(--tbl-accent)) 55%, var(--tbl-gold)) 100%) !important;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35) inset,
    0 0 22px color-mix(in srgb, var(--tab-accent, var(--tbl-accent)) 45%, transparent),
    0 8px 18px rgba(2, 6, 23, 0.35) !important;
  transform: translateY(-1px);
  animation: posTblTabPulse 2.4s ease-in-out infinite;
}
.pos-tbl-veil .pos-tbl-tab.is-on .pos-tbl-tab-glow { opacity: 0.9; }
.pos-tbl-veil .pos-tbl-tab.is-on .pos-tbl-tab-pip {
  background: #0f172a;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}
.pos-tbl-veil .pos-tbl-tab.is-on em {
  background: rgba(15, 23, 42, 0.28) !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.15);
}
.pos-tbl-veil .pos-tbl-tab[data-hall="all"] { --tab-accent: #38bdf8; }

@keyframes posTblTabPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.06); }
}

/* —— Dense metro grid —— */
.pos-tbl-veil .pos-tbl-metro {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  margin: 0;
  padding: 0.05rem 0.25rem 0.55rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.42rem;
  align-content: start;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.55) rgba(2, 6, 23, 0.35);
  -ms-overflow-style: auto;
  -webkit-overflow-scrolling: touch;
}
.pos-tbl-veil .pos-tbl-metro::-webkit-scrollbar { display: block; width: 8px; height: 0; }
.pos-tbl-veil .pos-tbl-metro::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.45);
  border-radius: 999px;
}
.pos-tbl-veil .pos-tbl-metro::-webkit-scrollbar-track {
  background: rgba(2, 6, 23, 0.25);
  border-radius: 999px;
}

.pos-tbl-veil .pos-tbl-band {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.05rem 0;
  color: #7dd3fc !important;
  font-weight: 800;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  animation: posTblAssemble 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(40ms + var(--tile-i, 0) * 28ms);
}
.pos-tbl-veil .pos-tbl-band::before,
.pos-tbl-veil .pos-tbl-band::after {
  content: "";
  height: 1px;
  flex: 1 1 auto;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.55), transparent);
}
.pos-tbl-veil .pos-tbl-band span {
  padding: 0.18rem 0.65rem;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.55) !important;
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #e0f2fe !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
}

/* —— Compact dark status cards —— */
.pos-tbl-veil .pos-tbl-card {
  --card-glow: var(--tbl-free);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  border-radius: 14px !important;
  padding: 0.38rem 0.4rem 0.28rem !important;
  border: 1.5px solid color-mix(in srgb, var(--card-glow) 55%, transparent) !important;
  background:
    linear-gradient(165deg, rgba(8, 15, 30, 0.92), rgba(2, 6, 23, 0.88)) !important;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 14px color-mix(in srgb, var(--card-glow) 22%, transparent),
    0 10px 18px rgba(2, 6, 23, 0.4) !important;
  color: #f8fafc !important;
  cursor: pointer;
  overflow: visible !important;
  opacity: 0;
  transform-origin: 50% 110%;
  transform-style: preserve-3d;
  animation: posTblAssemble 0.52s cubic-bezier(0.16, 1, 0.28, 1) both;
  animation-delay: calc(55ms + var(--tile-i, 0) * 32ms);
  contain: none !important;
  content-visibility: visible !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.pos-tbl-veil .pos-tbl-card.status-0 { --card-glow: var(--tbl-free); }
.pos-tbl-veil .pos-tbl-card.status-1 { --card-glow: var(--tbl-busy); }
.pos-tbl-veil .pos-tbl-card.status-2 { --card-glow: var(--tbl-reserved); }
.pos-tbl-veil .pos-tbl-card.status-3 { --card-glow: var(--tbl-dirty); }

.pos-tbl-veil .pos-tbl-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(125deg, rgba(255,255,255,0.1) 0%, transparent 34%, transparent 70%, color-mix(in srgb, var(--card-glow) 12%, transparent) 100%);
  z-index: 0;
}
.pos-tbl-veil .pos-tbl-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 18px color-mix(in srgb, var(--card-glow) 35%, transparent);
  opacity: 0.55;
  z-index: -1;
  animation: posTblCardAura 3.2s ease-in-out infinite;
  animation-delay: calc(var(--tile-i, 0) * 120ms);
}
@keyframes posTblCardAura {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.7; }
}

.pos-tbl-veil .pos-tbl-card:hover {
  transform: translate3d(0, -3px, 0) scale(1.02);
  border-color: color-mix(in srgb, var(--card-glow) 85%, #fff) !important;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--card-glow) 40%, transparent) inset,
    0 0 28px color-mix(in srgb, var(--card-glow) 45%, transparent),
    0 14px 24px rgba(2, 6, 23, 0.45) !important;
  z-index: 3;
}
.pos-tbl-veil .pos-tbl-card.is-active {
  border-width: 2px !important;
  border-color: color-mix(in srgb, var(--card-glow) 90%, #fff) !important;
  background:
    linear-gradient(165deg,
      color-mix(in srgb, var(--card-glow) 22%, rgba(8, 15, 30, 0.95)),
      rgba(2, 6, 23, 0.92)) !important;
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--card-glow) 55%, transparent),
    0 0 36px color-mix(in srgb, var(--card-glow) 50%, transparent),
    0 14px 26px rgba(2, 6, 23, 0.5) !important;
  z-index: 4;
  animation: posTblAssemble 0.4s cubic-bezier(0.16, 1, 0.28, 1) both, posTblActiveRing 1.8s ease-in-out infinite;
}
@keyframes posTblActiveRing {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.08); }
}

.pos-tbl-veil .pos-tbl-card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.02rem;
  padding: 0 0.1rem;
  position: relative;
  z-index: 1;
  min-height: 0;
}
.pos-tbl-veil .pos-tbl-card-meta strong {
  font-size: 0.8rem !important;
  font-weight: 800;
  color: #f8fafc !important;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pos-tbl-veil .pos-tbl-card-meta em {
  font-style: normal;
  font-size: 0.62rem !important;
  color: color-mix(in srgb, var(--card-glow) 75%, #e2e8f0) !important;
  font-weight: 750;
  line-height: 1.2;
}
.pos-tbl-veil .pos-tbl-card-meta .pos-tbl-dot {
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  margin-inline-end: 0.28rem;
  background: var(--card-glow);
  box-shadow: 0 0 8px color-mix(in srgb, var(--card-glow) 80%, transparent);
  vertical-align: middle;
}

.pos-tbl-veil .pos-tbl-card-stage {
  border-radius: 10px !important;
  background:
    radial-gradient(ellipse at 50% 35%, color-mix(in srgb, var(--card-glow) 18%, transparent), transparent 62%),
    rgba(0, 0, 0, 0.28) !important;
  padding: 0.1rem 0.05rem 0.15rem;
  min-height: 7.1rem !important;
  height: 7.1rem;
  position: relative;
  z-index: 1;
  border: 1px solid color-mix(in srgb, var(--card-glow) 22%, transparent) !important;
  overflow: visible !important;
}
.pos-tbl-veil .pos-tbl-card-stage .dt-stage {
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 6.6rem !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  overflow: visible !important;
}
.pos-tbl-veil .pos-tbl-card-stage .dt-svg {
  width: 100% !important;
  height: 6.6rem !important;
  max-height: none !important;
  overflow: visible !important;
}
.pos-tbl-veil .pos-tbl-card-stage .dt-tools { display: none !important; }

/* Density: hide long drag hint in picker */
.pos-tbl-veil .pos-tbl-card-hint { display: none !important; }

.pos-tbl-veil .pos-tbl-empty {
  grid-column: 1 / -1;
  margin: 2rem auto;
  color: #e0f2fe !important;
  font-weight: 800;
  font-size: 0.95rem;
  text-align: center;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.55) !important;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* Holographic build from the VR floor — distinct from category genie */
@keyframes posTblAssemble {
  0% {
    opacity: 0;
    transform: translate3d(0, 56px, 0) scale(0.42) rotateX(62deg);
    filter: brightness(2.4) blur(7px);
    box-shadow: 0 0 0 transparent;
  }
  42% {
    opacity: 1;
    transform: translate3d(0, -6px, 0) scale(1.05) rotateX(8deg);
    filter: brightness(1.35) blur(0);
  }
  72% {
    transform: translate3d(0, 2px, 0) scale(0.98) rotateX(0);
    filter: brightness(1.08);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotateX(0);
    filter: none;
  }
}
/* Dissolve back into the floor grid — not genie crush */
@keyframes posTblDissolve {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotateX(0) rotate(0deg);
    filter: brightness(1) blur(0);
  }
  28% {
    opacity: 1;
    transform: translate3d(0, -8px, 0) scale(1.06) rotateX(-6deg);
    filter: brightness(1.7) blur(0);
    box-shadow: 0 0 28px color-mix(in srgb, var(--card-glow, #38bdf8) 55%, transparent);
  }
  100% {
    opacity: 0;
    transform: translate3d(0, 64px, 0) scale(0.28) rotateX(68deg) rotate(var(--tbl-spin, 12deg));
    filter: brightness(2.2) blur(9px);
  }
}
@keyframes posTblGridCollapse {
  0% { opacity: 0.9; transform: perspective(900px) rotateX(64deg) scale(1.5); }
  100% { opacity: 0; transform: perspective(900px) rotateX(78deg) scale(1.85) translateY(12%); }
}
@keyframes posTblScanBurst {
  0% { opacity: 1; }
  40% { opacity: 1; background: radial-gradient(ellipse 70% 40% at 50% 60%, rgba(56,189,248,.45), transparent 70%); }
  100% { opacity: 0; }
}
@keyframes posTblOrbitIn {
  0% { opacity: 0; transform: translate3d(0, 14px, 0) scale(0.94); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes posTblVeilIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes posTblVeilOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes posTblTabsIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.96); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: none; }
}
@keyframes posTblTabsOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-16px) scale(0.92); filter: blur(3px); }
}

@media (min-width: 1280px) {
  .pos-tbl-veil .pos-tbl-metro {
    grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
    gap: 0.38rem;
  }
}

/* Phone / tablet — toolbar row + compact tables */
@media (max-width: 768px) {
  .pos-tbl-veil.pos-cat-veil {
    background:
      radial-gradient(ellipse 100% 42% at 50% -6%, rgba(245, 215, 142, 0.12), transparent 48%),
      radial-gradient(ellipse 70% 40% at 0% 30%, rgba(56, 189, 248, 0.14), transparent 55%),
      rgba(2, 6, 23, 0.4) !important;
  }

  .pos-tbl-veil .pos-tbl-shell {
    padding:
      max(0.7rem, calc(env(safe-area-inset-top, 0px) + 0.25rem))
      max(0.5rem, env(safe-area-inset-right, 0px))
      max(0.75rem, calc(env(safe-area-inset-bottom, 0px) + 0.25rem))
      max(0.5rem, env(safe-area-inset-left, 0px)) !important;
    gap: 0.45rem !important;
  }

  .pos-tbl-veil .pos-tbl-toolbar {
    gap: 0.4rem !important;
    align-items: center !important;
  }

  /* Phone: replace truncated hall pills with full-width luxury dropdown */
  .pos-tbl-veil .pos-tbl-tabs,
  .pos-tbl-veil .pos-tbl-tabs--rail {
    display: none !important;
  }
  .pos-tbl-veil .pos-tbl-hall-dd {
    display: flex !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }
  .pos-tbl-veil .pos-tbl-hall-select {
    min-height: 2.75rem !important;
    font-size: 0.9rem !important;
    border-radius: 15px !important;
  }

  .pos-tbl-veil .pos-cat-dismiss.pos-tbl-dismiss {
    position: relative !important;
    top: auto !important;
    inset: auto !important;
    flex: 0 0 2.55rem !important;
    width: 2.55rem !important;
    height: 2.55rem !important;
    min-width: 2.55rem !important;
    font-size: 1.3rem !important;
    border: 1px solid rgba(245, 215, 142, 0.4) !important;
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.08) inset,
      0 10px 20px rgba(2, 6, 23, 0.45) !important;
  }

  .pos-tbl-veil .pos-tbl-metro {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.4rem !important;
    padding: 0.05rem 0.02rem max(0.85rem, calc(env(safe-area-inset-bottom, 0px) + 0.3rem)) !important;
  }
  .pos-tbl-veil .pos-tbl-card {
    border-radius: 14px !important;
    padding: 0.32rem 0.34rem 0.28rem !important;
    gap: 0.12rem !important;
    border-width: 1.4px !important;
  }
  .pos-tbl-veil .pos-tbl-card-meta {
    gap: 0 !important;
  }
  .pos-tbl-veil .pos-tbl-card-meta strong {
    font-size: 0.72rem !important;
  }
  .pos-tbl-veil .pos-tbl-card-meta em {
    font-size: 0.58rem !important;
  }
  .pos-tbl-veil .pos-tbl-card-stage {
    border-radius: 10px !important;
    padding: 0.05rem 0.02rem 0.08rem !important;
  }
  .pos-tbl-veil .pos-tbl-card-stage,
  .pos-tbl-veil .pos-tbl-card-stage .dt-stage {
    min-height: 3.85rem !important;
    height: 3.85rem !important;
  }
  .pos-tbl-veil .pos-tbl-card-stage .dt-svg {
    height: 3.55rem !important;
  }
  .pos-tbl-veil .pos-tbl-band {
    margin: 0.02rem 0 !important;
    font-size: 0.62rem !important;
  }
  .pos-tbl-veil .pos-tbl-band span {
    font-size: 0.66rem !important;
    padding: 0.2rem 0.55rem !important;
  }
}

@media (max-width: 420px) {
  .pos-tbl-veil .pos-tbl-metro {
    gap: 0.32rem !important;
  }
  .pos-tbl-veil .pos-tbl-card {
    border-radius: 12px !important;
    padding: 0.28rem 0.28rem 0.22rem !important;
  }
  .pos-tbl-veil .pos-tbl-card-stage,
  .pos-tbl-veil .pos-tbl-card-stage .dt-stage {
    min-height: 3.45rem !important;
    height: 3.45rem !important;
  }
  .pos-tbl-veil .pos-tbl-card-stage .dt-svg {
    height: 3.15rem !important;
  }
  .pos-tbl-veil .pos-tbl-hall-select {
    min-height: 2.55rem !important;
    font-size: 0.84rem !important;
  }
  .pos-tbl-veil .pos-cat-dismiss.pos-tbl-dismiss {
    width: 2.4rem !important;
    height: 2.4rem !important;
    min-width: 2.4rem !important;
    flex-basis: 2.4rem !important;
  }
}

/* Slightly wider phones can show 3 compact table cards */
@media (min-width: 430px) and (max-width: 768px) {
  .pos-tbl-veil .pos-tbl-metro {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.38rem !important;
  }
  .pos-tbl-veil .pos-tbl-card-stage,
  .pos-tbl-veil .pos-tbl-card-stage .dt-stage {
    min-height: 3.55rem !important;
    height: 3.55rem !important;
  }
  .pos-tbl-veil .pos-tbl-card-stage .dt-svg {
    height: 3.25rem !important;
  }
}
