* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.container {
  width: min(980px, 100% - 24px);
  margin: 0 auto;
  padding: 20px 0 40px;
}

.container--admin {
  width: min(1600px, 100% - 24px);
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: saturate(1.15) blur(4px);
}

.topbar--sticky {
  position: sticky;
  top: 0;
  z-index: 1080;
  transition: box-shadow 160ms ease, background-color 160ms ease;
}

.topbar--sticky .topbar__inner {
  transition: padding 160ms ease;
}

.topbar--sticky .brand {
  transition: font-size 160ms ease;
}

.topbar--sticky.is-compact {
  box-shadow: 0 2px 10px rgba(31, 83, 139, 0.12);
}

.topbar--sticky.is-compact .topbar__inner {
  padding: 8px 0;
}

.topbar--sticky.is-compact .brand {
  font-size: 0.98rem;
}

.topbar--sticky.is-compact .muted {
  font-size: 0.9rem;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 12px 0;
}

.topbar__inner--player {
  flex-wrap: nowrap;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.nav a {
  margin-left: 12px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 8px;
}

.nav a:hover {
  background: #e9f2ff;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  background: var(--primary);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  z-index: 1000;
}

.skip-link:focus {
  top: 12px;
}
