/* Site shell — matches board.css / sidebar.css game chrome */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body.site-page {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  background: radial-gradient(circle at top, var(--bg-lift), var(--bg));
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body.site-page > main {
  display: block;
  flex: 1;
  min-width: 0;
  width: 100%;
}

/* Header — same as game page (board.css header) */
body.site-page .site-header {
  flex-shrink: 0;
  padding: 18px 24px 10px;
  border-bottom: 1px solid var(--glass-line);
  background: oklch(18% 0.018 260 / 70%);
  backdrop-filter: blur(12px);
}

body.site-page--landing .site-header h1,
body.site-page--lobby .site-header h1 {
  font-size: 22px;
}

body.site-page .site-header h1 {
  margin: 0 0 6px;
  font-size: 20px;
  letter-spacing: 0.02em;
  font-weight: 600;
}

body.site-page .site-header__brand a {
  color: inherit;
  text-decoration: none;
}

body.site-page .site-header__brand a:hover {
  color: oklch(96% 0.02 260);
}

body.site-page .subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

body.site-page .site-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Nav controls — match header-menu__trigger */
.site-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 72px;
  margin: 0;
  padding: 8px 14px;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid var(--glass-line);
  background: oklch(24% 0.02 260 / 80%);
  color: var(--text);
  text-decoration: none;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.site-nav__link:hover {
  background: oklch(32% 0.03 260 / 90%);
  border-color: oklch(58% 0.06 260 / 45%);
  color: oklch(96% 0.02 260);
}

.site-nav__link:focus-visible {
  outline: 2px solid oklch(68% 0.12 250);
  outline-offset: 2px;
}

/* Gold accent — matches new-game / End Turn highlight */
.site-nav__link--accent {
  border-color: oklch(72% 0.14 82);
  background: oklch(32% 0.08 82);
  color: oklch(94% 0.04 82);
  box-shadow: 0 0 12px oklch(72% 0.16 82 / 35%);
}

.site-nav__link--accent:hover {
  border-color: oklch(78% 0.16 82);
  background: oklch(36% 0.1 82);
  color: oklch(98% 0.03 82);
  box-shadow: 0 0 16px oklch(72% 0.18 82 / 45%);
}

#clerk-user-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 40px;
  flex-shrink: 0;
}

#clerk-user-button .mode-select {
  width: auto;
  margin: 0;
}

.site-auth-error {
  border-color: oklch(52% 0.14 25);
  color: oklch(78% 0.1 25);
  cursor: help;
  max-width: 220px;
  white-space: normal;
  text-align: center;
  font-size: 12px;
  line-height: 1.3;
}

/* Panel cards — match sidebar aside */
.site-panel {
  border-radius: 18px;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px oklch(100% 0 0 / 7%);
}

.site-section-title {
  display: block;
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Landing — see landing.css */
/* Lobby — see lobby.css */

/* Online game page — header + invite bar as one grid row */
.game-top-chrome {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: 0;
}

.game-top-chrome > .site-header {
  border-bottom: none;
}

.online-game-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  padding: 8px 24px 10px;
  text-align: center;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  border-bottom: 1px solid var(--glass-line);
  background: oklch(18% 0.018 260 / 70%);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px oklch(100% 0 0 / 8%);
}

.online-game-banner__text {
  flex: 1 1 220px;
  margin: 0;
  color: var(--text);
  word-break: break-word;
}

.online-game-banner__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.online-game-banner .mode-select {
  width: auto;
  min-width: 96px;
  margin: 0;
  padding: 8px 12px;
  font-size: 13px;
}

.online-begin-game--ready:not(:disabled) {
  box-shadow:
    0 0 0 2px oklch(72% 0.14 150 / 55%),
    0 0 20px oklch(62% 0.12 150 / 35%);
  animation: online-begin-pulse 2s ease-in-out infinite;
}

@keyframes online-begin-pulse {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.12);
  }
}

.site-footer {
  flex-shrink: 0;
  margin: 0;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--glass-line);
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
  text-align: center;
  background: oklch(18% 0.018 260 / 50%);
}

@media (max-width: 640px) {
  body.site-page .site-header {
    flex-wrap: wrap;
    gap: 12px;
  }

  body.site-page .site-header__brand {
    flex: 1 1 100%;
  }

}
