/* Material Design 3 + Glassmorphism Specification for Bingo Hub (bingo.zgqinc.gq) */

:root {
  /* Material Design 3 Tokens - Light (Aligned with eh.zgqinc.gq) */
  --md-sys-color-primary: #0061A4;
  --md-sys-color-on-primary: #FFFFFF;
  --md-sys-color-primary-container: #D1E4FF;
  --md-sys-color-on-primary-container: #001D36;

  --md-sys-color-secondary: #535F70;
  --md-sys-color-secondary-container: #D7E3F7;
  --md-sys-color-on-secondary-container: #101C2B;

  --md-sys-color-tertiary: #7D5260;
  --md-sys-color-on-tertiary: #FFFFFF;
  --md-sys-color-tertiary-container: #FFD8E4;
  --md-sys-color-on-tertiary-container: #31111D;

  --md-sys-color-error: #BA1A1A;
  --md-sys-color-on-error: #FFFFFF;

  --md-sys-color-background: #FDFDFF;
  --md-sys-color-on-background: #1A1C1E;
  --md-sys-color-surface: #FDFDFF;
  --md-sys-color-on-surface: #1A1C1E;
  --md-sys-color-surface-variant: #DFE2EB;
  --md-sys-color-on-surface-variant: #43474E;
  --md-sys-color-outline: #73777F;
  --md-sys-color-outline-variant: #C3C7CF;

  --md-sys-color-surface-container-low: #F3F3F7;
  --md-sys-color-surface-container: #EDEDF1;
  --md-sys-color-surface-container-high: #E7E8EC;

  --elevation-1: 0 1px 3px 1px rgba(0, 0, 0, 0.08), 0 1px 2px 0 rgba(0, 0, 0, 0.12);
  --elevation-2: 0 4px 12px 2px rgba(0, 0, 0, 0.08), 0 2px 6px 0 rgba(0, 0, 0, 0.15);
  --elevation-3: 0 12px 28px 4px rgba(0, 0, 0, 0.12), 0 4px 10px 0 rgba(0, 0, 0, 0.18);

  --radius-small: 8px;
  --radius-medium: 14px;
  --radius-large: 20px;
  --radius-full: 9999px;

  /* Frosted Glass Spec: 32dp blur, 72% Alpha, 1px inner stroke */
  --glass-blur: 32px;
  --glass-blur-deep: 60px;
  --glass-bg: color-mix(in srgb, var(--md-sys-color-surface) 72%, transparent);
  --glass-border: color-mix(in srgb, var(--md-sys-color-outline) 18%, transparent);
  --glass-highlight: none;
  --glass-inner-stroke: inset 0 1px 1px 0 rgba(255, 255, 255, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.15);

  /* Jekyll Inspired Motion Tokens */
  --motion-standard: cubic-bezier(0.2, 0, 0, 1);
  --motion-emphasized: cubic-bezier(0.2, 0, 0, 1);
  --motion-emphasized-decel: cubic-bezier(0.05, 0.7, 0.1, 1);
  --motion-emphasized-accel: cubic-bezier(0.3, 0, 0.8, 0.15);
  --dur-short4: 200ms;
  --dur-medium2: 300ms;
  --dur-medium3: 350ms;

  --font-family: 'Roboto', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --noise-url: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/></svg>");

  font-family: var(--font-family);
  color-scheme: light;
}

/* Dark Theme Tokens (System Auto when not explicitly forced light) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --md-sys-color-primary: #9ECAFF;
    --md-sys-color-on-primary: #003258;
    --md-sys-color-primary-container: #00497D;
    --md-sys-color-on-primary-container: #D1E4FF;

    --md-sys-color-secondary: #BBC7DB;
    --md-sys-color-secondary-container: #3B4858;
    --md-sys-color-on-secondary-container: #D7E3F7;

    --md-sys-color-tertiary: #EFB8C8;
    --md-sys-color-on-tertiary: #492532;
    --md-sys-color-tertiary-container: #633B48;
    --md-sys-color-on-tertiary-container: #FFD8E4;

    --md-sys-color-error: #FFB4AB;
    --md-sys-color-on-error: #690005;

    --md-sys-color-background: #111318;
    --md-sys-color-on-background: #E2E2E6;
    --md-sys-color-surface: #111318;
    --md-sys-color-on-surface: #E2E2E6;
    --md-sys-color-surface-variant: #43474E;
    --md-sys-color-on-surface-variant: #C3C7CF;
    --md-sys-color-outline: #8D9199;
    --md-sys-color-outline-variant: #43474E;

    --md-sys-color-surface-container-low: #181A20;
    --md-sys-color-surface-container: #1D1F26;
    --md-sys-color-surface-container-high: #272A32;

    --elevation-1: 0 1px 3px 1px rgba(0, 0, 0, 0.4), 0 1px 2px 0 rgba(0, 0, 0, 0.6);
    --elevation-2: 0 4px 14px 2px rgba(0, 0, 0, 0.5), 0 2px 8px 0 rgba(0, 0, 0, 0.7);
    --elevation-3: 0 14px 32px 4px rgba(0, 0, 0, 0.6), 0 4px 12px 0 rgba(0, 0, 0, 0.8);

    --glass-bg: color-mix(in srgb, var(--md-sys-color-surface-container) 70%, transparent);
    --glass-border: color-mix(in srgb, var(--md-sys-color-outline) 22%, transparent);
    --glass-highlight: none;
    --glass-inner-stroke: inset 0 1px 1px 0 rgba(255, 255, 255, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.05);

    color-scheme: dark;
  }
}

/* Explicit Dark Theme override */
[data-theme="dark"] {
  --md-sys-color-primary: #9ECAFF;
  --md-sys-color-on-primary: #003258;
  --md-sys-color-primary-container: #00497D;
  --md-sys-color-on-primary-container: #D1E4FF;

  --md-sys-color-secondary: #BBC7DB;
  --md-sys-color-secondary-container: #3B4858;
  --md-sys-color-on-secondary-container: #D7E3F7;

  --md-sys-color-tertiary: #EFB8C8;
  --md-sys-color-on-tertiary: #492532;
  --md-sys-color-tertiary-container: #633B48;
  --md-sys-color-on-tertiary-container: #FFD8E4;

  --md-sys-color-error: #FFB4AB;
  --md-sys-color-on-error: #690005;

  --md-sys-color-background: #111318;
  --md-sys-color-on-background: #E2E2E6;
  --md-sys-color-surface: #111318;
  --md-sys-color-on-surface: #E2E2E6;
  --md-sys-color-surface-variant: #43474E;
  --md-sys-color-on-surface-variant: #C3C7CF;
  --md-sys-color-outline: #8D9199;
  --md-sys-color-outline-variant: #43474E;

  --md-sys-color-surface-container-low: #181A20;
  --md-sys-color-surface-container: #1D1F26;
  --md-sys-color-surface-container-high: #272A32;

  --elevation-1: 0 1px 3px 1px rgba(0, 0, 0, 0.4), 0 1px 2px 0 rgba(0, 0, 0, 0.6);
  --elevation-2: 0 4px 14px 2px rgba(0, 0, 0, 0.5), 0 2px 8px 0 rgba(0, 0, 0, 0.7);
  --elevation-3: 0 14px 32px 4px rgba(0, 0, 0, 0.6), 0 4px 12px 0 rgba(0, 0, 0, 0.8);

  --glass-bg: color-mix(in srgb, var(--md-sys-color-surface-container) 70%, transparent);
  --glass-border: color-mix(in srgb, var(--md-sys-color-outline) 22%, transparent);
  --glass-highlight: none;
  --glass-inner-stroke: inset 0 1px 1px 0 rgba(255, 255, 255, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.05);

  color-scheme: dark;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--md-sys-color-background);
  color: var(--md-sys-color-on-background);
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* App Header (Glassmorphic) */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  background-image: var(--noise-url);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--glass-inner-stroke), var(--elevation-1);
  padding: 10px 24px 6px 24px;
  transition: box-shadow 0.3s ease;
}

.header-filter-row {
  max-width: 1400px;
  margin: 6px auto 0 auto;
  width: 100%;
  overflow: hidden;
  max-height: 52px;
  opacity: 1;
  transform: translateY(0);
  transition: max-height 0.28s cubic-bezier(0.2, 0, 0, 1),
              opacity 0.22s cubic-bezier(0.2, 0, 0, 1),
              transform 0.28s cubic-bezier(0.2, 0, 0, 1),
              margin 0.28s cubic-bezier(0.2, 0, 0, 1);
  will-change: max-height, opacity, transform;
}

.header-filter-row.filter-hidden {
  max-height: 0;
  opacity: 0;
  transform: translateY(-8px);
  margin-top: 0;
  margin-bottom: 0;
  pointer-events: none;
}

.header-filter-row .chip-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 0 6px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  display: flex;
}

.header-filter-row .chip-scroll::-webkit-scrollbar {
  display: none;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.brand-icon {
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--md-sys-color-primary), color-mix(in srgb, var(--md-sys-color-primary) 70%, #00a0dc));
  color: var(--md-sys-color-on-primary, #fff);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-medium);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--md-sys-color-primary) 35%, transparent);
}

.brand-icon svg {
  width: 26px;
  height: 26px;
  display: block;
}

.brand-text h1 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--md-sys-color-on-surface);
}

.brand-text p {
  font-size: 11.5px;
  color: var(--md-sys-color-on-surface-variant);
}

/* Material Design 3 Search Bar */
.search-wrap {
  flex: 0 1 420px;
  min-width: 220px;
}

.m3-search-bar {
  display: flex;
  align-items: center;
  background: var(--md-sys-color-surface-container-high);
  border-radius: var(--radius-full);
  height: 44px;
  padding: 0 14px;
  gap: 10px;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-outline-variant) 30%, transparent);
}

.m3-search-bar:hover {
  background: var(--md-sys-color-surface-container-highest, color-mix(in srgb, var(--md-sys-color-surface-container-high) 92%, black 8%));
  border-color: color-mix(in srgb, var(--md-sys-color-outline) 50%, transparent);
}

.m3-search-bar:focus-within {
  background: var(--md-sys-color-surface-container-highest, color-mix(in srgb, var(--md-sys-color-surface-container-high) 85%, black 15%));
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--md-sys-color-primary) 25%, transparent);
}

.search-bar-icon {
  font-size: 20px;
  color: var(--md-sys-color-on-surface-variant);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.search-bar-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  color: var(--md-sys-color-on-surface);
  line-height: normal;
}

.search-bar-input::placeholder {
  color: var(--md-sys-color-on-surface-variant);
  opacity: 0.75;
}

.search-bar-clear {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--md-sys-color-on-surface-variant);
  border-radius: 50%;
  transition: background-color 0.15s ease, color 0.15s ease;
  line-height: 1;
}

.search-bar-clear:hover {
  background: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent);
  color: var(--md-sys-color-on-surface);
}

.search-bar-clear md-icon {
  font-size: 18px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Owner Showcase Pill */
.owner-pill-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: color-mix(in srgb, var(--md-sys-color-surface-variant) 45%, transparent);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 20%, transparent);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  animation: card-enter var(--dur-medium3) var(--motion-emphasized-decel) both;
  transition: all 0.2s ease;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.owner-pill-toggle:hover {
  background: color-mix(in srgb, var(--md-sys-color-primary-container) 60%, transparent);
  border-color: var(--md-sys-color-primary);
}

.owner-pill-toggle.active {
  background: linear-gradient(135deg, #ff9800, #f57c00);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.4);
}

/* Main Container */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  position: relative;
  z-index: 1;
}

/* Category Filter Bar */
.filter-bar {
  margin-bottom: 20px;
  position: relative;
  width: 100%;
}

.chip-scroll {
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 8px 2px;
  scroll-behavior: smooth;
}

.chip-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

#category-chips {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 8px;
  min-width: max-content;
}

#category-chips md-filter-chip {
  flex-shrink: 0;
  white-space: nowrap;
}

.gallery-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 13.5px;
  padding: 0 4px;
  gap: 12px;
  flex-wrap: wrap;
}

/* Card Count Label: Loading & Loaded States */
.card-count-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--md-sys-color-primary);
  font-weight: 500;
  background: color-mix(in srgb, var(--md-sys-color-primary) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-primary) 24%, transparent);
  padding: 4px 13px 4px 9px;
  border-radius: 999px;
  font-size: 13px;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--md-sys-color-primary) 12%, transparent);
  letter-spacing: 0.2px;
  user-select: none;
}

.loading-spinner {
  width: 13px;
  height: 13px;
  border: 2px solid color-mix(in srgb, var(--md-sys-color-primary) 28%, transparent);
  border-top-color: var(--md-sys-color-primary);
  border-radius: 50%;
  animation: spinner-rotate 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  display: inline-block;
  flex-shrink: 0;
}

@keyframes spinner-rotate {
  to { transform: rotate(360deg); }
}

.loading-dots span {
  display: inline-block;
  animation: loading-dot-bounce 1.4s infinite;
  font-weight: bold;
}
.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes loading-dot-bounce {
  0%, 80%, 100% { opacity: 0.2; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

.card-count-loaded {
  display: inline-flex;
  align-items: center;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--md-sys-color-on-surface-variant);
  font-weight: 500;
  background: color-mix(in srgb, var(--md-sys-color-surface-container-high) 60%, transparent);
  border: 1px solid var(--glass-border);
  padding: 4px 12px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--elevation-1);
}

.count-badge strong {
  color: var(--md-sys-color-primary);
  font-weight: 700;
}

.count-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--md-sys-color-primary);
  display: inline-block;
  box-shadow: 0 0 6px color-mix(in srgb, var(--md-sys-color-primary) 60%, transparent);
}

/* Skeleton Loading Cards */
.card-skeleton {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-inner-stroke), var(--elevation-1);
  border-radius: var(--radius-large);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.skeleton-thumb {
  width: 100%;
  height: 205px;
  background: linear-gradient(90deg, 
    color-mix(in srgb, var(--md-sys-color-surface-container) 80%, transparent) 0%, 
    color-mix(in srgb, var(--md-sys-color-surface-container-high) 95%, white 5%) 50%, 
    color-mix(in srgb, var(--md-sys-color-surface-container) 80%, transparent) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.8s infinite linear;
}

.skeleton-info {
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-line {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, 
    color-mix(in srgb, var(--md-sys-color-surface-container) 80%, transparent) 0%, 
    color-mix(in srgb, var(--md-sys-color-surface-container-high) 95%, white 5%) 50%, 
    color-mix(in srgb, var(--md-sys-color-surface-container) 80%, transparent) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.8s infinite linear;
}

.skeleton-line.title {
  width: 65%;
  height: 18px;
}

.skeleton-line.sub {
  width: 88%;
  height: 12px;
  opacity: 0.85;
}

.skeleton-line.footer {
  width: 40%;
  height: 14px;
  margin-top: 6px;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.gallery-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Keyframes Inspired by Jekyll Project */
@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.player-section.page-entering {
  animation: page-enter var(--dur-medium3) var(--motion-emphasized-decel) both;
}

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 22px;
}

.bingo-card-item {
  background: var(--glass-bg);
  background-image: var(--noise-url);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-inner-stroke), var(--elevation-1);
  border-radius: var(--radius-large);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  animation: card-enter var(--dur-medium3) var(--motion-emphasized-decel) both;
  transition: transform 0.24s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.24s cubic-bezier(0.2, 0, 0, 1), border-color 0.24s ease;
}

.bingo-card-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--glass-inner-stroke), var(--elevation-2);
  border-color: var(--md-sys-color-primary);
}

.card-thumb-wrap {
  position: relative;
  width: 100%;
  height: 205px;
  background-color: var(--md-sys-color-surface-container-high);
  overflow: hidden;
}

.card-thumb-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.42) 0%, transparent 35%, transparent 65%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
  z-index: 1;
}

.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.35s ease;
}

.bingo-card-item:hover .card-thumb {
  transform: scale(1.05);
}

.category-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.type-pill {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: rgba(0, 97, 164, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #005a99;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(0, 97, 164, 0.32);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  letter-spacing: 0.3px;
}

.type-pill.bottle {
  background: rgba(233, 30, 99, 0.14);
  color: #c2185b;
  border: 1px solid rgba(233, 30, 99, 0.32);
}

.type-pill.checklist {
  background: rgba(103, 58, 183, 0.14);
  color: #5e35b1;
  border: 1px solid rgba(103, 58, 183, 0.32);
}

[data-theme="dark"] .type-pill,
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .type-pill {
    background: rgba(158, 202, 255, 0.22);
    color: #cce4ff;
    border: 1px solid rgba(158, 202, 255, 0.45);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  }

  :root:not([data-theme="light"]) .type-pill.bottle {
    background: rgba(255, 64, 129, 0.22);
    color: #ff94ba;
    border: 1px solid rgba(255, 64, 129, 0.45);
  }

  :root:not([data-theme="light"]) .type-pill.checklist {
    background: rgba(186, 104, 200, 0.22);
    color: #e1bee7;
    border: 1px solid rgba(186, 104, 200, 0.45);
  }
}

.progress-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 2;
  background: #2e7d32;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.card-info {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--md-sys-color-on-surface);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-sub {
  font-size: 12.5px;
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 14px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  border-top: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 15%, transparent);
  padding-top: 12px;
  gap: 10px;
}

.grid-badge {
  font-size: 11.5px;
  background: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface-variant);
  padding: 4px 10px;
  border-radius: var(--radius-small);
  font-weight: 500;
  flex-shrink: 0;
}

.card-footer .type-pill {
  position: static;
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.2px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--md-sys-color-on-surface-variant);
}

.empty-icon {
  font-size: 44px;
  margin-bottom: 12px;
}

/* ========================================= */
/* Player Section                            */
/* ========================================= */
.player-section {
  display: none;
}

.player-top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

#back-to-gallery {
  --md-text-button-container-height: 40px;
  --md-text-button-with-leading-icon-leading-space: 10px;
  --md-text-button-with-leading-icon-trailing-space: 16px;
  --md-text-button-label-text-size: 14px;
  font-weight: 500;
}

.player-header-card {
  background: var(--glass-bg);
  background-image: var(--noise-url);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-inner-stroke), var(--elevation-1);
  border-radius: var(--radius-large);
  padding: 20px 24px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.player-title-box h2 {
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-title-box p {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 13.5px;
}

.player-stats-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.checked-stats-pill {
  background: var(--md-sys-color-surface-container-high);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 13.5px;
}

.lines-badge {
  background: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface-variant);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 13.5px;
  transition: all 0.3s ease;
}

.lines-badge.active {
  background: linear-gradient(135deg, #ff9800, #f57c00);
  color: #fff;
  box-shadow: 0 3px 10px rgba(255, 152, 0, 0.4);
  animation: pulse 1.6s infinite alternate;
}

@keyframes pulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.04); }
}

/* Player Toolbar */
.player-toolbar {
  background: var(--glass-bg);
  background-image: var(--noise-url);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-inner-stroke), var(--elevation-1);
  border-radius: var(--radius-large);
  padding: 14px 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toolbar-primary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.toolbar-secondary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 14%, transparent);
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Segmented Mode Selector (Replaces raw md-tabs) */
.segmented-mode-selector {
  display: inline-flex;
  align-items: center;
  background: color-mix(in srgb, var(--md-sys-color-surface-container) 80%, transparent);
  border-radius: var(--radius-full);
  padding: 4px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-inner-stroke);
  gap: 3px;
  flex-shrink: 0;
}

.mode-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 15px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--md-sys-color-on-surface-variant);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: background 0.2s cubic-bezier(0.2, 0, 0, 1), color 0.2s cubic-bezier(0.2, 0, 0, 1), transform 0.15s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s cubic-bezier(0.2, 0, 0, 1);
  outline: none;
}

.mode-pill-btn:hover:not(.active) {
  background: color-mix(in srgb, var(--md-sys-color-on-surface) 9%, transparent);
  color: var(--md-sys-color-on-surface);
}

.mode-pill-btn.active {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  box-shadow: var(--elevation-1);
  font-weight: 600;
}

.mode-pill-btn:active {
  transform: scale(0.96);
}

/* Toolbar Buttons Spacing & Touch Targets */
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  row-gap: 10px;
  flex-wrap: wrap;
}

.toolbar-actions md-outlined-button,
.toolbar-actions md-filled-button,
.toolbar-actions md-text-button {
  --md-outlined-button-container-height: 38px;
  --md-filled-button-container-height: 38px;
  --md-text-button-container-height: 38px;
  --md-outlined-button-with-leading-icon-leading-space: 14px;
  --md-outlined-button-with-leading-icon-trailing-space: 18px;
  --md-filled-button-with-leading-icon-leading-space: 14px;
  --md-filled-button-with-leading-icon-trailing-space: 20px;
  --md-outlined-button-label-text-size: 13.5px;
  --md-filled-button-label-text-size: 13.5px;
  --md-outlined-button-icon-size: 18px;
  --md-filled-button-icon-size: 18px;
  min-height: 38px;
  margin: 0;
  white-space: nowrap;
}

.toolbar-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--md-sys-color-on-surface-variant);
  letter-spacing: -0.01em;
}

#toolbar-stamp-group {
  display: flex;
  align-items: center;
  gap: 8px;
  row-gap: 8px;
  flex-wrap: wrap;
}

.stamp-style-chip {
  --md-filter-chip-container-height: 36px;
}

#toolbar-color-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.color-dots-picker {
  display: flex;
  align-items: center;
  gap: 12px;
}

.color-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  animation: card-enter var(--dur-medium3) var(--motion-emphasized-decel) both;
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s;
  border: 2px solid transparent;
  flex-shrink: 0;
}

.color-dot:hover {
  transform: scale(1.18);
}

.color-dot.active {
  transform: scale(1.24);
  border-color: #ffffff;
  box-shadow: 0 0 0 2px var(--md-sys-color-primary), var(--elevation-1);
}

/* Player Content Area */
.player-content-area {
  display: flex;
  gap: 24px;
  justify-content: center;
}

.canvas-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--glass-bg);
  background-image: var(--noise-url);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-inner-stroke), var(--elevation-2);
  border-radius: var(--radius-large);
  padding: 18px;
  max-width: 100%;
  overflow: auto;
  transition: opacity 0.18s cubic-bezier(0.2, 0, 0, 1), transform 0.18s cubic-bezier(0.2, 0, 0, 1);
  will-change: opacity, transform;
}

.canvas-container.view-animating,
.checklist-container.view-animating {
  opacity: 0;
  transform: translateY(6px) scale(0.99);
}

#bingo-canvas {
  display: block;
  max-width: 100%;
  border-radius: var(--radius-medium);
  box-shadow: var(--elevation-2);
  touch-action: none;
  user-select: none;
}

.canvas-hint {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--md-sys-color-on-surface-variant);
  text-align: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: color-mix(in srgb, var(--md-sys-color-surface-container) 65%, transparent);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
}

/* Digital Checklist Grid */
.checklist-container {
  display: grid;
  gap: 12px;
  width: 100%;
}

.checklist-cell {
  background: var(--glass-bg);
  background-image: var(--noise-url);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-inner-stroke), var(--elevation-1);
  border-radius: var(--radius-medium);
  padding: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100px;
  transition: all 0.2s ease;
  user-select: none;
  position: relative;
}

.checklist-cell:hover {
  border-color: var(--md-sys-color-primary);
  background-color: color-mix(in srgb, var(--md-sys-color-surface-container) 85%, transparent);
}

.checklist-cell.checked {
  border-color: #e53935;
  background: rgba(229, 57, 53, 0.08);
}

[data-theme="dark"] .checklist-cell.checked {
  background: rgba(229, 57, 53, 0.18);
}

.cell-coords {
  font-size: 11px;
  color: var(--md-sys-color-on-surface-variant);
  font-weight: 600;
  margin-bottom: 4px;
}

.cell-text {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--md-sys-color-on-surface);
  flex: 1;
}

.cell-check-indicator {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

/* Bottle Slider Cell in List Mode */
.bottle-cell {
  background: var(--glass-bg);
  background-image: var(--noise-url);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-inner-stroke), var(--elevation-1);
  border-radius: var(--radius-medium);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bottle-cell-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bottle-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
}

.bottle-pct-badge {
  font-size: 12px;
  font-weight: 700;
  color: #e91e63;
  background: color-mix(in srgb, #e91e63 15%, transparent);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.bottle-slider-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bottle-slider {
  flex: 1;
  accent-color: #e91e63;
  cursor: pointer;
  height: 6px;
  border-radius: 3px;
}

/* Split Mode */
/* Split Mode (Responsive: 2-column on desktop, vertical stacked on mobile) */
@media (min-width: 901px) {
  .player-content-area.mode-split {
    display: grid;
    grid-template-columns: minmax(340px, 1fr) minmax(380px, 1.35fr);
    gap: 24px;
    align-items: start;
    width: 100%;
  }

  .player-content-area.mode-split .canvas-container {
    position: sticky;
    top: 88px;
  }
}

@media (max-width: 900px) {
  .player-content-area.mode-split {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
  }

  .player-content-area.mode-split .canvas-container {
    position: static;
    width: 100%;
    max-height: none;
    overflow: visible;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .player-content-area.mode-split .checklist-container {
    width: 100%;
  }
}

/* Dialog styling (Frosted Glass & 60dp Depth of Field Scrim) */
md-dialog::part(scrim) {
  backdrop-filter: blur(60px);
  -webkit-backdrop-filter: blur(60px);
  background-color: rgba(0, 0, 0, 0.45);
}

md-dialog::part(container) {
  background: var(--glass-bg);
  background-image: var(--noise-url);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-inner-stroke), var(--elevation-3);
  border-radius: var(--radius-large);
}

#original-dialog {
  --md-dialog-max-width: 92vw;
  --md-dialog-max-height: 90vh;
}

#watermark-dialog {
  --md-dialog-max-width: 520px;
  min-width: min(500px, calc(100vw - 32px));
  width: min(520px, calc(100vw - 32px));
}

#original-dialog [slot="headline"],
#watermark-dialog [slot="headline"] {
  padding: 24px 28px 16px 28px;
  box-sizing: border-box;
}

.dialog-headline {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--md-sys-color-on-surface);
}

.dialog-headline-icon {
  color: var(--md-sys-color-primary);
  font-size: 24px;
}

#watermark-dialog .dialog-content {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 28px 12px 28px;
  width: 100%;
  box-sizing: border-box;
}

#original-dialog .dialog-content {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 28px 8px 28px;
  box-sizing: border-box;
}

.dialog-description {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--md-sys-color-on-surface-variant);
  margin: 0 0 16px 0;
}

.dialog-form-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 18px;
  width: 100%;
  box-sizing: border-box;
}

.dialog-form-fields md-outlined-text-field {
  width: 100%;
  box-sizing: border-box;
}

.dialog-setting-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-medium);
  background: color-mix(in srgb, var(--md-sys-color-surface-container) 60%, transparent);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-inner-stroke);
  box-sizing: border-box;
}

.dialog-setting-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.setting-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
}

.setting-desc {
  font-size: 12px;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.4;
}

.dialog-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 12px 28px 24px 28px;
  width: 100%;
  box-sizing: border-box;
}

.dialog-actions-row md-filled-button,
.dialog-actions-row md-text-button,
.dialog-actions-row md-outlined-button {
  --md-filled-button-container-height: 42px;
  --md-text-button-container-height: 42px;
  --md-outlined-button-container-height: 42px;
  --md-filled-button-leading-space: 20px;
  --md-filled-button-trailing-space: 20px;
  --md-outlined-button-leading-space: 18px;
  --md-outlined-button-trailing-space: 20px;
  --md-text-button-leading-space: 16px;
  --md-text-button-trailing-space: 16px;
  min-height: 42px;
  margin: 0;
}

.dialog-img-wrap {
  max-width: 85vw;
  max-height: calc(85vh - 140px);
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.dialog-img-wrap img {
  max-width: 100%;
  max-height: calc(85vh - 150px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-medium);
  box-shadow: var(--elevation-2);
}

/* Toast */
.app-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: color-mix(in srgb, var(--md-sys-color-on-surface) 90%, #000);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  color: var(--md-sys-color-surface);
  padding: 12px 26px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--elevation-3), inset 0 0 0 1px rgba(255, 255, 255, 0.15);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  z-index: 2000;
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
}

.app-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ========================================= */
/* App Footer (Aligned with eh.zgqinc.gq)   */
/* ========================================= */
.app-footer {
  padding: 40px 20px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.85rem;
  border-top: 1px solid var(--md-sys-color-surface-variant);
  margin-top: 48px;
  position: relative;
  z-index: 1;
}

.footer-license-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-license-row a,
.footer-license-link {
  color: var(--md-sys-color-primary);
  text-decoration: none;
}

.footer-license-row a:hover,
.footer-license-link:hover {
  text-decoration: underline;
}

.footer-dot {
  opacity: 0.5;
}

.cc-logo {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

.cc-logo a {
  color: var(--md-sys-color-primary);
  text-decoration: none;
}

.cc-logo a:hover {
  text-decoration: underline;
}

.footer-disclaimer {
  max-width: 680px;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--md-sys-color-outline);
  margin: 4px 0 8px;
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-submit-tip {
  color: var(--md-sys-color-on-surface-variant);
  font-weight: 500;
}

.footer-disclaimer a,
.footer-disclaimer .disclaimer-highlight {
  color: var(--md-sys-color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s;
}

.footer-disclaimer a:hover {
  opacity: 0.8;
}

.footer-links {
  display: flex;
  gap: 24px;
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--md-sys-color-outline);
  text-decoration: none;
  transition: color 0.2s;
  font-size: 0.88rem;
}

.footer-link:hover {
  color: var(--md-sys-color-primary);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .player-content-area.mode-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .main-content {
    padding: 16px 14px;
  }
  .app-header {
    padding: 8px 14px;
  }
  .header-inner {
    flex-wrap: wrap;
    gap: 8px;
  }
  .brand-text p {
    display: none;
  }
  .brand-text h1 {
    font-size: 16px;
  }
  .brand-icon {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
  .brand-icon svg {
    width: 22px;
    height: 22px;
  }
  .search-wrap {
    order: 10;
    flex: 1 1 100%;
    width: 100%;
    margin-top: 4px;
  }
  .header-actions {
    gap: 6px;
  }
  .owner-pill-toggle {
    font-size: 11.5px;
    padding: 3px 8px;
  }
  .player-header-card {
    padding: 16px;
  }
  .toolbar-primary-row,
  .toolbar-secondary-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .toolbar-group {
    width: 100%;
    justify-content: flex-start;
  }
  .segmented-mode-selector {
    width: 100%;
    display: flex;
  }
  .mode-pill-btn {
    flex: 1;
    padding: 8px 6px;
    font-size: 12px;
  }
  .toolbar-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
  }
  #btn-export-image {
    grid-column: 1 / -1;
  }
}

@keyframes gallery-grid-fade {
  0% {
    opacity: 0.2;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.gallery-grid-entering {
  animation: gallery-grid-fade 280ms cubic-bezier(0.05, 0.7, 0.1, 1) forwards;
}

.player-content-area.mode-canvas {
  display: flex;
  justify-content: center;
  width: 100%;
}

.player-content-area.mode-list {
  display: block;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
}

/* Fullscreen Player Styles */
#player-section:fullscreen,
#player-section:-webkit-full-screen {
  background: var(--md-sys-color-background);
  color: var(--md-sys-color-on-background);
  overflow-y: auto;
  padding: 16px 24px;
  width: 100vw;
  height: 100vh;
  box-sizing: border-box;
}

#player-section:fullscreen .player-content-area.mode-canvas,
#player-section:-webkit-full-screen .player-content-area.mode-canvas {
  height: calc(100vh - 160px);
  display: flex;
  justify-content: center;
  align-items: center;
}


/* Mobile In-App Edge-to-Edge Immersive (Cancelled Margins & Full Width with Transition) */
@media (max-width: 768px) {
  .canvas-container {
    transition: margin 0.3s cubic-bezier(0.2, 0, 0, 1),
                padding 0.3s cubic-bezier(0.2, 0, 0, 1),
                border-radius 0.3s ease,
                box-shadow 0.3s ease;
  }

  #bingo-canvas {
    transition: width 0.3s cubic-bezier(0.2, 0, 0, 1),
                border-radius 0.3s ease,
                box-shadow 0.3s ease;
  }

  .player-section.mobile-immersive .canvas-container {
    margin-left: -14px;
    margin-right: -14px;
    width: 100vw;
    max-width: 100vw;
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 0;
    box-shadow: none;
    background: transparent;
    overflow: visible;
  }

  .player-section.mobile-immersive #bingo-canvas {
    border-radius: 0;
    box-shadow: none;
  }

  .player-section.mobile-immersive .canvas-hint {
    margin: 8px auto 0 auto;
    border-radius: var(--radius-full);
  }
}
