#f7-app-root .page-shell-swipe-host #tab-shell-search,
#f7-app-root .page-shell-section[data-name="shell-search"] {
  display: flex;
  flex-direction: column;
  gap: 0;
  box-sizing: border-box;
}

#f7-app-root .page-shell-swipe-host #tab-shell-search .f7-autonomous-section-tables,
#f7-app-root .page-shell-section[data-name="shell-search"] .f7-autonomous-section-tables {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: var(--tab-hdr-pt, 12px) var(--tab-hdr-px, 12px) 12px;
  min-height: 0;
  box-sizing: border-box;
  flex: 0 0 auto;
}

#f7-app-root .page-shell-swipe-host #tab-shell-search .f7-autonomous-tables-header,
#f7-app-root .page-shell-section[data-name="shell-search"] .f7-autonomous-tables-header {
  margin: 0;
  padding: 0 0 var(--tab-hdr-pb, 8px);
}

#f7-app-root .page-shell-swipe-host #tab-shell-search .f7-autonomous-tables-header__row,
#f7-app-root .page-shell-section[data-name="shell-search"] .f7-autonomous-tables-header__row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#f7-app-root .page-shell-swipe-host #tab-shell-search .f7-autonomous-tables-header__actions,
#f7-app-root .page-shell-section[data-name="shell-search"] .f7-autonomous-tables-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

#f7-app-root .page-shell-swipe-host #tab-shell-search .f7-autonomous-tables-header__icon-btn,
#f7-app-root .page-shell-section[data-name="shell-search"] .f7-autonomous-tables-header__icon-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.75);
  padding: 0;
  flex-shrink: 0;
  cursor: default;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
}

#f7-app-root .page-shell-swipe-host #tab-shell-search .f7-autonomous-tables-title,
#f7-app-root .page-shell-section[data-name="shell-search"] .f7-autonomous-tables-title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--tab-hdr-fs, 1.25rem);
  font-weight: var(--tab-hdr-fw, 700);
  line-height: 1.2;
  color: var(--t1, #f5f5f7);
}

#f7-app-root .page-shell-swipe-host #tab-shell-search .f7-autonomous-tables-view-toggle,
#f7-app-root .page-shell-section[data-name="shell-search"] .f7-autonomous-tables-view-toggle {
  flex-shrink: 0;
}

#f7-app-root .page-shell-swipe-host #tab-shell-search .f7-autonomous-tables-zone-strip-outer,
#f7-app-root .page-shell-section[data-name="shell-search"] .f7-autonomous-tables-zone-strip-outer {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#f7-app-root .page-shell-swipe-host #tab-shell-search .f7-autonomous-tables-zone-strip-bubble,
#f7-app-root .page-shell-section[data-name="shell-search"] .f7-autonomous-tables-zone-strip-bubble {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

#f7-app-root .page-shell-swipe-host #tab-shell-search .f7-autonomous-tables-zone-strip,
#f7-app-root .page-shell-section[data-name="shell-search"] .f7-autonomous-tables-zone-strip,
#f7-app-root .f7-autonomous-section-tables .f7-autonomous-tables-zone-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  padding-right: 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 20px), transparent);
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 20px), transparent);
}

#f7-app-root .page-shell-swipe-host #tab-shell-search .f7-autonomous-tables-zone-strip::-webkit-scrollbar,
#f7-app-root .page-shell-section[data-name="shell-search"] .f7-autonomous-tables-zone-strip::-webkit-scrollbar,
#f7-app-root .f7-autonomous-section-tables .f7-autonomous-tables-zone-strip::-webkit-scrollbar {
  display: none;
}

#f7-app-root .page-shell-swipe-host #tab-shell-search .f7-autonomous-tables-zone-pill,
#f7-app-root .page-shell-section[data-name="shell-search"] .f7-autonomous-tables-zone-pill,
#f7-app-root .f7-autonomous-section-tables .f7-autonomous-tables-zone-pill {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #e8e8ed;
  font: inherit;
  font-size: 0.8125rem;
  line-height: 1.2;
  padding: 8px 12px;
  cursor: pointer;
  white-space: nowrap;
}

#f7-app-root .page-shell-swipe-host #tab-shell-search .f7-autonomous-tables-zone-pill--active,
#f7-app-root .page-shell-section[data-name="shell-search"] .f7-autonomous-tables-zone-pill--active {
  border-color: rgba(120, 190, 255, 0.55);
  background: rgba(80, 140, 220, 0.22);
  color: #fff;
}

#f7-app-root .page-shell-swipe-host #tab-shell-search .f7-autonomous-tables-roster,
#f7-app-root .page-shell-section[data-name="shell-search"] .f7-autonomous-tables-roster {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#f7-app-root .page-shell-swipe-host #tab-shell-search .f7-autonomous-tables-zone-section,
#f7-app-root .page-shell-section[data-name="shell-search"] .f7-autonomous-tables-zone-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#f7-app-root .f7-autonomous-table-group {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  margin: 0;
  overflow: hidden;
  border: 1px solid transparent;
  transition: background 0.2s ease;
}

#f7-app-root .f7-autonomous-table-group.f7-autonomous-tables-card--mine {
  border-color: rgba(255, 106, 0, 0.22);
  background: rgba(255, 106, 0, 0.06);
}

#f7-app-root .f7-autonomous-tables-seat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

@media (min-width: 390px) {
  #f7-app-root .f7-autonomous-tables-seat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

#f7-app-root button.f7-autonomous-table-group.f7-autonomous-tables-seat-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  min-height: 72px;
  margin: 0;
  padding: 12px;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: default;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}

#f7-app-root button.f7-autonomous-table-group.f7-autonomous-tables-seat-tile .f7-autonomous-table-group__label {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#f7-app-root button.f7-autonomous-table-group.f7-autonomous-tables-seat-tile.f7-autonomous-tables-card--mine {
  border-color: rgba(255, 106, 0, 0.22);
  background: rgba(255, 106, 0, 0.06);
}

#f7-app-root button.f7-autonomous-table-group.f7-autonomous-tables-seat-tile.f7-autonomous-tables-card--pressed {
  border-color: rgba(120, 190, 255, 0.45);
  background: rgba(80, 140, 220, 0.14);
}

#f7-app-root .f7-autonomous-table-group__label-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px 4px;
  min-width: 0;
}

#f7-app-root .f7-autonomous-table-group__label {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

#f7-app-root .f7-autonomous-tables-card-badge {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 2px 8px;
  flex-shrink: 0;
}

#f7-app-root button.f7-autonomous-table-guest {
  border: 0;
  margin: 0;
  padding: 0;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

#f7-app-root button.f7-autonomous-table-guest:active {
  background: rgba(255, 255, 255, 0.06);
}

#f7-app-root .f7-autonomous-tables-card-guests {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 6px;
}

#f7-app-root .page-shell-swipe-host #tab-shell-search .f7-autonomous-tables-card-badge,
#f7-app-root .page-shell-section[data-name="shell-search"] .f7-autonomous-tables-card-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: #8ce6b0;
}

#f7-app-root .page-shell-swipe-host #tab-shell-search .f7-autonomous-tables-view-toggle,
#f7-app-root .page-shell-section[data-name="shell-search"] .f7-autonomous-tables-view-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 2px;
  background: rgba(255, 255, 255, 0.05);
  gap: 2px;
}

#f7-app-root .page-shell-swipe-host #tab-shell-search .f7-autonomous-tables-view-toggle-btn,
#f7-app-root .page-shell-section[data-name="shell-search"] .f7-autonomous-tables-view-toggle-btn {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #c8c8d0;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 7px 12px;
  cursor: pointer;
}

#f7-app-root .page-shell-swipe-host #tab-shell-search .f7-autonomous-tables-view-toggle-btn--active,
#f7-app-root .page-shell-section[data-name="shell-search"] .f7-autonomous-tables-view-toggle-btn--active {
  background: rgba(80, 140, 220, 0.28);
  color: #fff;
}

#f7-app-root .page-shell-swipe-host #tab-shell-search .f7-autonomous-tables-view-toggle-btn--disabled,
#f7-app-root .page-shell-section[data-name="shell-search"] .f7-autonomous-tables-view-toggle-btn--disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#f7-app-root .page-shell-swipe-host #tab-shell-search .f7-autonomous-tables-card--pressed,
#f7-app-root .page-shell-section[data-name="shell-search"] .f7-autonomous-tables-card--pressed,
#f7-app-root button.f7-autonomous-table-group.f7-autonomous-tables-seat-tile.f7-autonomous-tables-card--pressed {
  border-color: rgba(120, 190, 255, 0.45);
  background: rgba(80, 140, 220, 0.14);
}

#f7-app-root .page-shell-swipe-host #tab-shell-search .f7-autonomous-tables-empty,
#f7-app-root .page-shell-section[data-name="shell-search"] .f7-autonomous-tables-empty {
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 16px 14px;
  color: #b8b8c2;
  font-size: 0.875rem;
  line-height: 1.35;
  text-align: center;
}

#f7-app-root .f7-autonomous-tables-roster--pending-hidden,
#f7-app-root .f7-autonomous-tables-roster[data-shift-roster-pending="1"],
#f7-app-root .f7-autonomous-tables-roster-pending-surface,
#f7-app-root .f7-autonomous-section-tables[data-roster-surface-pending="1"] .f7-autonomous-tables-roster {
  display: none !important;
  visibility: hidden !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  pointer-events: none !important;
}

#f7-app-root .f7-autonomous-tables-roster--pending-hidden .f7-autonomous-map-table,
#f7-app-root .f7-autonomous-tables-roster[data-shift-roster-pending="1"] .f7-autonomous-map-table {
  display: none !important;
}

#f7-app-root .f7-autonomous-search-paint-surface[data-search-tables-paint-held="1"],
#f7-app-root .f7-autonomous-search-paint-surface[data-search-tables-paint-state="JOIN_IN_FLIGHT"],
#f7-app-root .f7-autonomous-search-paint-surface[data-search-tables-paint-state="ROSTER_PENDING"] {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#f7-app-root .f7-autonomous-search-paint-surface[data-search-tables-paint-held="0"] {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

#f7-app-root .f7-autonomous-table-guest-card {
  width: 100%;
  max-width: none;
  margin: 0;
}

#f7-app-root .f7-autonomous-table-guest {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  line-height: 1.25;
  color: #f2f2f7;
  position: relative;
}

#f7-app-root .f7-autonomous-table-guest--self {
  opacity: 0.85;
}

#f7-app-root .f7-autonomous-table-guest__avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
}

#f7-app-root .f7-autonomous-table-guest__avatar-wrap .bubble-proof-table-avatar {
  width: 100%;
  height: 100%;
}

#f7-app-root .f7-autonomous-table-guest__avatar {
  flex-shrink: 0;
}

#f7-app-root .f7-autonomous-table-guest__main {
  flex: 1 1 auto;
  min-width: 0;
}

#f7-app-root .f7-autonomous-table-guest__name {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

#f7-app-root .f7-autonomous-table-guest__meta {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.55);
}

#f7-app-root .f7-autonomous-table-guest__status {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#f7-app-root .f7-autonomous-table-guest__subline {
  margin-top: 2px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#f7-app-root .f7-autonomous-table-guest__dot {
  position: absolute;
  right: 0;
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(10, 10, 14, 0.9);
  margin: 0;
}

#f7-app-root .f7-autonomous-table-guest__dot--online {
  background: #4caf50;
}

#f7-app-root .f7-autonomous-table-guest__dot--offline {
  background: #d32f2f;
}

#f7-app-root .f7-autonomous-tables-unmapped {
  width: 100%;
  margin-top: 8px;
}

#f7-app-root .f7-autonomous-tables-unmapped__title {
  display: none;
}

#f7-app-root .f7-autonomous-tables-empty[hidden] {
  display: none !important;
}

#f7-app-root .f7-autonomous-tables-unmapped__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Proof §4 row mapping for autonomous person-first list */
#f7-app-root .f7-autonomous-section-tables .bubble-proof-table-card {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

#f7-app-root .f7-autonomous-section-tables .bubble-proof-table-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  min-width: 0;
}

#f7-app-root .f7-autonomous-section-tables .bubble-proof-table-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #ff6a00, #330011);
}

#f7-app-root .f7-autonomous-section-tables .bubble-proof-table-line {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
}

#f7-app-root .f7-autonomous-section-tables .bubble-proof-table-name {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
}

#f7-app-root .f7-autonomous-section-tables .bubble-proof-table-status-meta {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  overflow: hidden;
}

#f7-app-root .f7-autonomous-section-tables .bubble-proof-table-emoji {
  flex-shrink: 0;
  font-size: 12px;
  line-height: 1;
}

#f7-app-root .f7-autonomous-section-tables .bubble-proof-table-status {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Per-table participants containment — labels/chrome only until roster re-enable gate */
#f7-app-root
  .f7-autonomous-section-tables[data-autonomous-tables-participants-contained="1"]
  .f7-autonomous-tables-card-guests,
#f7-app-root
  .f7-autonomous-section-tables[data-autonomous-tables-participants-contained="1"]
  .f7-autonomous-table-guest,
#f7-app-root
  .f7-autonomous-section-tables[data-autonomous-tables-participants-contained="1"]
  .f7-autonomous-tables-unmapped {
  display: none !important;
}

/* Map table participants popup — centered over scheme (Схема only) */
#f7-app-root .f7-autonomous-section-tables .f7-autonomous-map-table-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 12500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.45);
}

#f7-app-root .f7-autonomous-section-tables .f7-autonomous-map-table-popup-backdrop[hidden] {
  display: none !important;
}

#f7-app-root .f7-autonomous-section-tables .f7-autonomous-map-table-popup {
  width: min(100%, 360px);
  max-height: min(70vh, 480px);
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #1a1a22;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

#f7-app-root .f7-autonomous-section-tables .f7-autonomous-map-table-popup__header {
  flex: 0 0 auto;
  padding: 14px 16px 10px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#f7-app-root .f7-autonomous-section-tables .f7-autonomous-map-table-popup__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 10px 12px 14px;
  -webkit-overflow-scrolling: touch;
}

#f7-app-root .f7-autonomous-section-tables .f7-autonomous-map-table-popup__body .f7-autonomous-search-people-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
