.card {
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  padding: var(--space-md);
  position: relative;
  overflow: hidden;
}

.card-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: var(--space-xs);
}

.card-title {
  font-size: var(--text-body);
  font-weight: 600;
}

.card-meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.card-body {
  font-size: 0.9rem;
}

.card-footer {
  margin-top: var(--space-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.8rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  font-size: var(--text-meta);
  font-weight: 500;
  border: 1px solid transparent;
}

.pill.game {
  border-color: rgba(0, 71, 171, 0.35);
  background: rgba(0, 71, 171, 0.08);
  color: var(--color-raid-blue-deep);
}

.pill.practice {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(219, 242, 255, 0.9);
}

.pill.social {
  border-color: rgba(234, 179, 8, 0.5);
  background: rgba(254, 249, 195, 0.9);
  color: #854d0e;
}

.pill.result-w {
  border-color: rgba(22, 163, 74, 0.6);
  background: rgba(220, 252, 231, 0.9);
  color: #166534;
}

.pill.result-l {
  border-color: rgba(239, 68, 68, 0.7);
  background: rgba(254, 226, 226, 0.9);
  color: #b91c1c;
}

.pill.result-t {
  border-color: rgba(234, 179, 8, 0.7);
  background: rgba(254, 249, 195, 0.9);
  color: #854d0e;
}

.tag-subtle {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  font-size: 0.7rem;
  color: var(--color-text-muted);
  background: rgba(243, 244, 246, 0.9);
}

/* Next game promo block */

.next-game {
  background: var(--color-surface-promo);
  border-left: 4px solid var(--color-raid-blue);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.next-game-label {
  margin: 0;
  font-size: var(--text-meta);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-raid-blue);
}

.next-game-opponent {
  margin: 0;
  font-size: var(--text-title);
  font-weight: 600;
  line-height: 1.2;
}

.next-game-date {
  font-size: var(--text-body);
  font-weight: 500;
  color: var(--color-text);
}

.next-game-meta {
  margin: 0;
  font-size: var(--text-meta);
  color: var(--color-text-muted);
}

.next-game-link {
  margin-top: var(--space-2);
  font-size: var(--text-meta);
  font-weight: 600;
  text-decoration: none;
}

.next-game-link:hover {
  text-decoration: underline;
}

/* Contact & staff lists */

.contact-list {
  list-style: none;
  margin: 0 0 var(--space-md);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.contact-list li {
  font-size: var(--text-body);
  line-height: 1.5;
}

.staff-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .staff-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .staff-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


.player-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  transition: box-shadow 0.18s ease, transform 0.1s ease;
}

.player-card:hover {
  box-shadow: 0 6px 20px rgba(0, 35, 90, 0.12);
}

@media (prefers-reduced-motion: reduce) {
  .player-card {
    transition: none;
  }

  .player-card:hover {
    transform: none;
  }
}

.player-media {
  position: relative;
  aspect-ratio: 1;
  background: rgba(0, 71, 171, 0.06);
  overflow: hidden;
}

.player-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.player-jersey-badge {
  position: absolute;
  bottom: var(--space-2);
  left: var(--space-2);
  background: var(--color-raid-blue);
  color: #ffffff;
  font-size: var(--text-meta);
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-sm);
  line-height: 1.2;
  box-shadow: 0 2px 8px rgba(0, 35, 90, 0.25);
}

.player-photo--placeholder {
  object-fit: cover;
  filter: blur(1px) saturate(0.85);
  transform: scale(1.05);
}

.pill.staff-pill {
  background: rgba(0, 0, 0, 0.06);
  color: var(--color-text-muted);
}

.player-avatar {
  width: 100%;
  height: 100%;
  border-radius: 0;
  background: linear-gradient(160deg, var(--color-raid-blue) 0%, var(--color-raid-blue-deep) 100%);
  border: none;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #ffffff;
  font-size: 2rem;
  letter-spacing: 0.04em;
}

.player-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-md);
}

.player-name {
  font-weight: 600;
  font-size: var(--text-body);
  margin: 0;
}

.player-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.player-facts {
  margin: 0;
  font-size: var(--text-meta);
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* Staff cards */

.staff-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  transition: box-shadow 0.18s ease;
}

.staff-card:hover {
  box-shadow: 0 6px 20px rgba(0, 35, 90, 0.12);
}

.staff-media {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg) var(--space-md) var(--space-2);
  background: rgba(0, 71, 171, 0.04);
}

.staff-avatar {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 999px;
  font-size: 1.25rem;
}

.staff-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: 0 var(--space-md) var(--space-md);
  align-items: flex-start;
}

.staff-name {
  font-weight: 600;
  font-size: var(--text-body);
  margin: 0;
}

.staff-role-pill {
  font-size: var(--text-meta);
}

/* News cards without image */

.news-card--no-image .news-card-header {
  padding-top: var(--space-md);
}

.news-load-sentinel {
  height: 1px;
  margin-top: var(--space-2);
}

.news-load-status {
  text-align: center;
  margin-top: var(--space-2);
}

/* Event condensed rows (home upcoming list) */

.event-row {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.4rem 0.2rem;
  border-radius: 0.5rem;
}

.event-row-header {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
}

.event-row-title {
  font-size: 0.9rem;
}

.event-row-meta {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

/* Game badges inside table */

.result-pill-cell {
  display: inline-flex;
}

/* News cards (home) */

.news-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.news-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(0, 71, 171, 0.08);
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card-header {
  padding: var(--space-md);
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.news-card-title {
  font-size: var(--text-title);
  font-weight: 600;
  margin: 0;
  color: var(--color-raid-blue-deep);
}

.news-card-date {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.news-card-preamble {
  padding: var(--space-xs) var(--space-md) 0;
  font-size: 0.95rem;
  color: var(--color-text);
  margin: 0;
  line-height: 1.5;
}

.news-card-body {
  padding: var(--space-sm) var(--space-md) var(--space-md);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.news-card-body p {
  margin: 0;
  line-height: 1.6;
}

/* News dialog */

.news-dialog {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0, 35, 90, 0.25);
  padding: 0;
  max-width: 36rem;
  width: calc(100% - 2rem);
}

.news-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.news-dialog-inner {
  padding: var(--space-xl);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.news-dialog-inner .news-card-image {
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.news-dialog-inner .news-card-header {
  padding: 0 0 var(--space-sm);
}

.news-dialog-inner .news-card-preamble {
  padding: 0 0 var(--space-sm);
}

.news-dialog-inner .news-card-body {
  padding: 0;
}

.news-dialog-inner .news-card-body p {
  color: var(--color-text);
}

/* Admin */

.admin-layout {
  max-width: 56rem;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.admin-nav-group {
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  background: rgba(0, 0, 0, 0.015);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.admin-nav-group.is-active-group {
  border-color: var(--color-primary-soft);
  box-shadow: inset 3px 0 0 var(--color-primary);
}

.admin-nav-group--season {
  background: rgba(0, 0, 0, 0.03);
}

.admin-nav-group-label {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.admin-nav-group-hint {
  margin: 0 0 var(--space-sm);
}

.admin-season-context {
  margin-bottom: var(--space-sm);
}

.admin-season-context-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border-subtle);
  margin-bottom: var(--space-sm);
}

.admin-season-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-left: auto;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-tab {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}

.admin-tab:hover {
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.04);
}

.admin-tab.is-active {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-weight: 600;
}

/* Profile */

.profile-layout {
  max-width: 56rem;
}

.profile-body {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.profile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  background: rgba(0, 0, 0, 0.015);
}

.profile-nav-link {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--color-text-muted);
  text-decoration: none;
  text-align: left;
  background: none;
  border: none;
  width: 100%;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.profile-nav-link:hover {
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.04);
}

.profile-nav-link.is-active {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-weight: 600;
}

.profile-content h2 {
  margin: 0 0 var(--space-md);
  font-size: 1.15rem;
}

.profile-info-list {
  margin: 0;
}

.profile-info-row {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: var(--space-sm);
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--color-border-subtle);
}

.profile-info-row:last-child {
  border-bottom: none;
}

.profile-info-row dt {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.profile-info-row dd {
  margin: 0;
}

@media (max-width: 640px) {
  .profile-body {
    grid-template-columns: 1fr;
  }
}

.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.admin-section-header h2 {
  font-size: 1.1rem;
  margin: 0 0 0.15rem;
}

.admin-section-scope {
  margin: 0;
  max-width: 36rem;
}

.admin-form-wrap {
  margin-bottom: var(--space-lg);
}

.admin-form-wrap.is-hidden {
  display: none;
}

.admin-form {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  max-width: 28rem;
}

.admin-form-row {
  margin-bottom: var(--space-sm);
}

.admin-form-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: var(--color-text-muted);
}

.admin-form-row input:not([type="file"]):not([type="hidden"]),
.admin-form-row select,
.admin-form-row textarea {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
}

.admin-form-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: var(--space-md);
}

.admin-form-row-inline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: var(--space-sm);
}

.admin-form-details {
  margin-bottom: var(--space-sm);
}

.admin-form-details summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.admin-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
  margin-right: var(--space-md);
}

.admin-readonly-name {
  margin: 0;
  font-weight: 600;
}

.upload-thumb {
  display: block;
  margin-top: 0.5rem;
  max-width: 8rem;
  max-height: 8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-subtle);
  object-fit: cover;
}

.upload-thumb.is-hidden {
  display: none;
}

.admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-border-subtle);
}

.admin-row.is-local-test {
  border-left: 3px solid #f59e0b;
  padding-left: 0.6rem;
}

.admin-row-main {
  font-size: 0.9rem;
}

.admin-row-actions {
  display: flex;
  gap: 0.35rem;
}

.admin-person-block {
  padding: 0.5rem 0 1rem;
  border-bottom: 1px solid var(--color-border-subtle);
}

.admin-login-sublist {
  list-style: none;
  margin: 0.25rem 0 0.5rem 1rem;
  padding: 0;
}

.admin-login-sublist .admin-login-row {
  padding: 0.35rem 0;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.admin-login-details {
  flex: 1;
  min-width: 0;
}

.admin-login-summary {
  cursor: pointer;
  list-style: none;
}

.admin-login-summary::-webkit-details-marker {
  display: none;
}

.admin-session-sublist {
  list-style: none;
  margin: 0.35rem 0 0.5rem;
  padding: 0 0 0 0.75rem;
  border-left: 2px solid var(--color-border-subtle, #e2e8f0);
}

.admin-session-row.is-revoked {
  opacity: 0.55;
}

.admin-add-login {
  margin-left: 1rem;
}

.btn-small {
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
}

/* ---- Admin toolbar (dev toggle + sign-out) ---- */

.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: flex-end;
  padding: 0 0 0.75rem;
  margin-bottom: 0.25rem;
  flex-wrap: wrap;
}

.admin-season-field {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-season-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.admin-season-select {
  font: inherit;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-subtle);
}

.admin-api-badge {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
}

/* Toggle switch */

.dev-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.dev-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.dev-toggle-track {
  display: inline-block;
  position: relative;
  width: 2.5rem;
  height: 1.375rem;
  border-radius: 999px;
  background: var(--color-border-subtle);
  border: 1px solid rgba(0, 0, 0, 0.15);
  transition: background 0.2s;
  flex-shrink: 0;
}

.dev-toggle-track::after {
  content: "";
  position: absolute;
  top: 0.1875rem;
  left: 0.1875rem;
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s;
}

.dev-toggle input:checked + .dev-toggle-track {
  background: #1a6e3c;
}

.dev-toggle input:checked + .dev-toggle-track::after {
  transform: translateX(1.125rem);
}

.dev-toggle-label {
  font-size: 0.85rem;
}

/* Sign-in page */

.admin-signin {
  max-width: 28rem;
  margin: 2rem auto;
}

.admin-signin-msg {
  margin-top: 1rem;
  font-size: 0.9rem;
  word-break: break-all;
}

.admin-signin-msg a {
  color: var(--color-accent);
  word-break: break-all;
}

.admin-invite-msg {
  margin-top: 1rem;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
}

.admin-invite-msg.is-success {
  background: color-mix(in srgb, green 15%, transparent);
  color: var(--color-text);
}

.admin-invite-msg.is-error {
  background: color-mix(in srgb, red 15%, transparent);
  color: var(--color-text);
}

/* ---- Game recorder (admin) ---- */

.game-recorder {
  max-width: 56rem;
}

.game-recorder-title {
  margin: 0 0 var(--space-sm);
  font-size: 1.1rem;
}

.game-recorder-section {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border-subtle);
}

.game-recorder-section h4,
.game-recorder-section h5 {
  margin: 0 0 var(--space-sm);
  font-size: 1rem;
}

.game-recorder-attendees {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-xs);
}

.game-recorder-attendee {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: 0.35rem 0;
}

.game-recorder-attendee-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.game-recorder-attendee-pos {
  width: auto;
  min-width: 4rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
}

.game-recorder-event-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: var(--space-sm);
}

.game-recorder-events-wrap {
  overflow-x: auto;
  margin-bottom: var(--space-sm);
}

.game-recorder-events-table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.game-recorder-events-table th,
.game-recorder-events-table td {
  border: 1px solid var(--color-border-subtle);
  padding: 0.35rem 0.45rem;
  vertical-align: middle;
}

.game-recorder-events-table th {
  background: rgba(0, 0, 0, 0.04);
  font-weight: 600;
  text-align: left;
}

.game-recorder-events-table select,
.game-recorder-events-table input[type="text"] {
  width: 100%;
  min-width: 4.5rem;
  padding: 0.35rem 0.4rem;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: inherit;
}

.game-recorder-table-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.game-recorder-table-detail select {
  flex: 1 1 6rem;
  min-width: 5rem;
}

.game-recorder-event tr:hover,
tr.game-recorder-event:hover {
  background: rgba(0, 0, 0, 0.02);
}

.game-recorder-events {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-md);
}

.game-recorder-event {
  background: rgba(0, 0, 0, 0.02);
}

.game-recorder-event-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--space-sm);
}

.game-recorder-event-header .game-recorder-remove-event {
  margin-left: auto;
}

.game-recorder-field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.game-recorder-field-row label {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
  gap: 0.25rem;
}

.game-recorder-field-row input,
.game-recorder-field-row select {
  width: 100%;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
}

.game-recorder-event-fields {
  border: none;
  margin: 0;
  padding: 0;
}

.game-recorder-events-empty {
  margin: var(--space-sm) 0 0;
}

.game-recorder-events-empty.is-hidden {
  display: none;
}

.game-recorder-stats-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
}

.game-recorder-stats-list li {
  padding: 0.25rem 0;
}

.game-recorder-goalie-ga .game-recorder-field-row {
  margin-top: var(--space-sm);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Header account control ---- */

.btn-account-signin {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.btn-account-signin:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.8);
}

.account-menu {
  position: relative;
}

.account-menu[open] .account-dropdown {
  display: flex;
}

.account-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  cursor: pointer;
  list-style: none;
  transition: background 0.18s ease;
}

.account-avatar:hover {
  background: rgba(255, 255, 255, 0.28);
}

.account-avatar::-webkit-details-marker {
  display: none;
}

.account-avatar-mark {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
  line-height: 1;
  user-select: none;
}

.account-dropdown {
  display: none;
  flex-direction: column;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 10rem;
  background: #ffffff;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 35, 90, 0.18);
  overflow: hidden;
  z-index: 200;
}

.account-link,
.account-signout {
  display: block;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  color: var(--color-text);
  text-decoration: none;
  text-align: left;
  background: none;
  border: none;
  width: 100%;
  cursor: pointer;
  transition: background 0.14s ease;
}

.account-link:hover,
.account-signout:hover {
  background: rgba(0, 71, 171, 0.06);
  color: var(--color-primary);
}

.account-signout {
  border-top: 1px solid var(--color-border-subtle);
  color: var(--color-text-muted);
}

/* ---- Sign-in dialog ---- */

.signin-dialog {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0, 35, 90, 0.25);
  padding: 0;
  max-width: 26rem;
  width: calc(100% - 2rem);
}

.signin-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.signin-dialog-inner {
  padding: var(--space-xl);
  position: relative;
}

.signin-dialog-inner h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  color: var(--color-raid-blue);
  margin-bottom: var(--space-md);
}

.dialog-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--color-text-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease;
}

.dialog-close:hover {
  background: rgba(0, 0, 0, 0.12);
  color: var(--color-text);
}

