.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.site-header__brand {
  min-width: 0;
}

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

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

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.header-menu {
  position: relative;
}

/* Game trigger sizing lives in site.css (.site-header__actions .header-menu__trigger) */

.header-menu__panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 188px;
  padding: 8px;
  border: 1px solid var(--glass-line);
  border-radius: 12px;
  background: oklch(16% 0.02 260 / 98%);
  box-shadow: 0 12px 32px oklch(8% 0.03 260 / 50%);
}

.header-menu__panel[hidden] {
  display: none;
}

a.header-menu__item.site-nav__link,
button.header-menu__item.site-nav__link {
  display: block;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

button.header-menu__item.site-nav__link {
  font: inherit;
  font-weight: 600;
  font-size: 14px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--glass-line);
  border-radius: 10px;
  background: oklch(24% 0.02 260 / 80%);
  color: var(--text);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.icon-button:hover {
  background: oklch(32% 0.03 260 / 90%);
  border-color: oklch(58% 0.06 260 / 45%);
  color: oklch(92% 0.02 260);
}

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

.icon-button__glyph {
  width: 22px;
  height: 22px;
}

.icon-button--sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.icon-button--sm .icon-button__glyph {
  width: 18px;
  height: 18px;
}

.icon-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.notation-log-modal {
  width: min(560px, calc(100vw - 32px));
  max-height: min(72vh, 640px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--glass-line);
  border-radius: 14px;
  background: oklch(16% 0.02 260 / 96%);
  color: var(--text);
  box-shadow: 0 24px 64px oklch(8% 0.03 260 / 55%);
}

.notation-log-modal::backdrop {
  background: oklch(8% 0.02 260 / 62%);
  backdrop-filter: blur(4px);
}

.notation-log-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 12px 16px;
  border-bottom: 1px solid var(--glass-line);
}

.notation-log-modal__toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.notation-log-modal__heading {
  min-width: 0;
}

.notation-log-modal__title {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.notation-log-modal__count {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.notation-log-modal__body {
  display: block;
  margin: 0;
  padding: 14px 16px 16px;
  max-height: min(56vh, 520px);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: oklch(48% 0.04 260) transparent;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  -webkit-user-select: text;
  user-select: text;
}

.notation-log-modal__body::-webkit-scrollbar {
  display: block;
  width: 8px;
}

.notation-log-modal__body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: oklch(48% 0.04 260 / 70%);
}

/* Notifications bell (header) */
.site-header__actions .notifications-menu__trigger {
  position: relative;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.site-header__actions .notifications-menu__trigger:hover {
  border: none;
  background: oklch(32% 0.03 260 / 45%);
  box-shadow: none;
}

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

.notifications-menu__icon {
  display: block;
}

.notifications-menu__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  border: 1px solid oklch(72% 0.14 82);
  background: oklch(42% 0.12 82);
  color: oklch(98% 0.02 82);
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-sizing: border-box;
}

.notifications-menu__badge[hidden] {
  display: none;
}

.notifications-menu__panel {
  min-width: 300px;
  max-width: min(360px, 92vw);
  max-height: min(70vh, 480px);
  overflow: auto;
}

.notifications-menu__empty {
  margin: 0;
  padding: 8px 4px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.notifications-menu__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notifications-menu__list[hidden],
.notifications-menu__empty[hidden] {
  display: none;
}

.notifications-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  background: oklch(22% 0.02 260 / 60%);
}

.notifications-item__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.notifications-item__avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.notifications-item__text {
  min-width: 0;
}

.notifications-item__title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.notifications-item__sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
}

.notifications-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.notifications-item__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--glass-line);
  background: oklch(24% 0.02 260 / 80%);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.notifications-item__btn:hover {
  background: oklch(32% 0.03 260 / 90%);
  border-color: oklch(58% 0.06 260 / 45%);
}

.notifications-item__btn--primary {
  border-color: oklch(72% 0.14 82);
  background: oklch(32% 0.08 82);
  color: oklch(94% 0.04 82);
}

.notifications-item__btn--primary:hover {
  border-color: oklch(78% 0.16 82);
  background: oklch(36% 0.1 82);
}
