body {
  font-family: var(--font-ui);
  color: var(--cream);
  background: radial-gradient(ellipse at center,
              var(--bg-1) 0%,
              var(--bg-2) 55%,
              var(--bg-3) 100%);
  background-attachment: fixed;
  position: relative;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.015) 0 2px, transparent 2px 8px);
  pointer-events: none;
  z-index: 0;
}

.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--space-5);
  background: linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.0));
  z-index: 100;
}

.brand {
  display: flex; align-items: center; gap: var(--space-3);
  font-family: var(--font-display);
  min-width: 0;          /* allow shrinking */
}
.brand-logo {
  color: var(--gold);
  font-size: 22px;
  letter-spacing: 4px;
  text-shadow: 0 2px 8px rgba(212,175,55,0.4);
  flex-shrink: 0;
}
.brand-title {
  font-size: 18px; font-weight: 700;
  color: var(--ivory);
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  border: 1px solid var(--gold-dark);
  color: var(--gold-light);
  font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(212,175,55,0.35);
}

.footer {
  position: fixed; bottom: 8px; left: 0; right: 0;
  text-align: center;
  font-size: 11px;
  color: rgba(244,236,216,0.45);
  z-index: 50;
}

/* Hide footer when game table is active */
body:has(#view-table.view--active) .footer { display: none; }

/* On small screens hide brand logo glyphs to free space */
@media (max-width: 600px) {
  .brand-logo  { display: none; }
  .brand-title { font-size: 14px; }
}
/* Hide footer when game table is active (modern :has) */
body:has(#view-table.view--active) .footer { display: none; }

/* Fallback: also hide via class set by JS on body */
body.is-on-table .footer { display: none; }

/* On small screens hide brand logo glyphs to free space */
@media (max-width: 600px) {
  .brand-logo  { display: none; }
  .brand-title { font-size: 14px; }
}
