body { font-family: Arial, sans-serif; margin: 0; background: #111827; color: white; }
    .wrap { max-width: 520px; margin: 0 auto; padding: 24px 16px; }
    .card { background: #1f2937; border-radius: 18px; padding: 20px; margin-bottom: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
    h1, h2 { margin-top: 0; }
    label { display: block; margin: 14px 0 6px; color: #d1d5db; }
    input { width: 100%; box-sizing: border-box; padding: 13px; border-radius: 12px; border: 1px solid #374151; background: #111827; color: white; font-size: 16px; }
    button { width: 100%; margin-top: 14px; padding: 14px; border: 0; border-radius: 12px; background: #f97316; color: white; font-weight: bold; font-size: 16px; }
    .secondary { background: #374151; }
    .msg { margin-top: 14px; color: #fbbf24; white-space: pre-wrap; }
    .ok { color: #86efac; }
    .muted { color: #9ca3af; }
    pre { white-space: pre-wrap; background: #111827; padding: 12px; border-radius: 12px; overflow:auto; }

.task-card {
  margin-top: 16px;
}

.task-panel {
  background: #111827;
  border: 1px solid #374151;
  border-radius: 16px;
  padding: 16px;
}

.task-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
}

.task-desc {
  color: #e5e7eb;
  line-height: 1.45;
  margin-bottom: 14px;
}

.task-meta {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.badge {
  display: inline-block;
  padding: 7px 10px;
  border-radius: 999px;
  background: #374151;
  color: #e5e7eb;
  font-size: 13px;
  font-weight: 700;
}

.badge-ok {
  background: #14532d;
  color: #bbf7d0;
}

.badge-warn {
  background: #78350f;
  color: #fde68a;
}

.empty-state {
  color: #d1d5db;
  line-height: 1.5;
}

.leaderboard-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 6px 10px;
  align-items: center;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 14px;
  padding: 12px;
}

.leaderboard-row strong {
  font-size: 18px;
  color: #fbbf24;
}

.leaderboard-row span:nth-child(2) {
  font-weight: 700;
}

.leaderboard-row small {
  grid-column: 2;
  color: #9ca3af;
}

.task-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.task-actions button {
  margin-top: 0;
}

#photoInput {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #374151;
  background: #111827;
  color: #d1d5db;
}

#photoInput::file-selector-button {
  border: 0;
  border-radius: 10px;
  background: #374151;
  color: white;
  padding: 8px 12px;
  margin-right: 10px;
  cursor: pointer;
}

.admin-photo-preview {
  grid-column: 1 / -1;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid #374151;
  background: #111827;
}

.leaderboard-row .task-actions {
  grid-column: 1 / -1;
}

.task-map {
  width: 100%;
  height: clamp(380px, 58vh, 520px);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #374151;
  margin-top: 18px;
}

.map-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.map-actions a {
  display: block;
  text-align: center;
  text-decoration: none;
  background: #2563eb;
  color: white;
  padding: 12px;
  border-radius: 12px;
  font-weight: 700;
}

.map-actions a:hover {
  opacity: 0.92;
}

.team-card {
  margin-top: 16px;
}

.team-main-row,
.invite-box,
.team-member-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  margin-top: 10px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.team-grid > div {
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(148, 163, 184, 0.18);
}

.badge-good {
  background: rgba(34, 197, 94, 0.18);
}

.team-members-list {
  margin-top: 8px;
}

@media (max-width: 700px) {
  .team-grid {
    grid-template-columns: 1fr;
  }

  .team-main-row,
  .invite-box,
  .team-member-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

.google-login-card {
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.google-login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 11px 16px;
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid #d1d5db;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.google-login-button:hover {
  background: #f9fafb;
  color: #111827;
  text-decoration: none;
}

.google-login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 13px 18px;
  border-radius: 12px;
  background: #ffffff;
  color: #111827 !important;
  text-decoration: none !important;
  font-weight: 700;
  border: 1px solid #d1d5db;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.google-login-button:hover {
  background: #f3f4f6;
  transform: translateY(-1px);
  color: #111827 !important;
}

.google-login-button.full-width {
  width: 100%;
  margin-top: 12px;
}

.google-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  color: #4285F4;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Arial, sans-serif;
  font-size: 18px;
}

.google-login-card {
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.google-login-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 14px !important;
  min-height: 48px !important;
  padding: 10px 26px !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #f8fafc !important;
  border: 2px solid rgba(248, 250, 252, 0.65) !important;
  text-decoration: none !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

.google-login-button:hover {
  background: rgba(248, 250, 252, 0.08) !important;
  color: #ffffff !important;
  border-color: rgba(248, 250, 252, 0.9) !important;
  text-decoration: none !important;
  transform: none !important;
}

.google-login-button.full-width {
  width: 100% !important;
  margin-top: 12px !important;
}

.google-login-button .google-icon,
.google-icon {
  width: 26px !important;
  height: 26px !important;
  flex: 0 0 26px !important;
  display: block !important;
  background: transparent !important;
  border-radius: 0 !important;
}

.validation-section-card {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.45);
}

.validation-section-card h4 {
  margin-top: 0;
  margin-bottom: 8px;
}

.validation-section-card label {
  display: block;
  margin-top: 12px;
}

.qr-token-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.qr-token-card {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.35);
}

.qr-token-image {
  display: block;
  width: 180px;
  height: 180px;
  margin: 12px auto;
  border-radius: 10px;
  background: #ffffff;
}

.qr-token-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}


.qr-token-actions .button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  background: #374151;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  border: none;
  box-sizing: border-box;
  transition: 0.2s ease;
}

.qr-token-actions .button:hover {
  background: #4b5563;
}

.photo-status-box {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.45);
}

.photo-status-thumb {
  display: block;
  width: 100%;
  max-width: 240px;
  margin-top: 12px;
  border-radius: 12px;
}

.photo-upload-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  background: #f97316;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  box-sizing: border-box;
}

.photo-upload-button input {
  display: none;
}

.photo-upload-button.disabled {
  opacity: 0.65;
  pointer-events: none;
}

.admin-notification-bubble {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #374151;
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.admin-notification-bubble strong {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 13px;
  line-height: 22px;
  display: none;
}

.admin-notification-bubble.has-unread strong {
  display: block;
}

.admin-notification-toasts {
  position: fixed;
  right: 18px;
  bottom: 88px;
  z-index: 9999;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
}

.admin-notification-toast {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 14px;
  background: #111827;
  color: #ffffff;
  padding: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.admin-notification-toast span {
  display: block;
  margin-top: 4px;
  color: #cbd5e1;
  font-size: 14px;
}

.live-feed-item {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  text-align: left;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.45);
  color: #ffffff;
}

.live-feed-item strong,
.live-feed-item span,
.live-feed-item small {
  display: block;
}

.live-feed-item span {
  margin-top: 4px;
  color: #cbd5e1;
}

.live-feed-item small {
  margin-top: 4px;
  color: #94a3b8;
}

.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.dashboard-header h2 {
  margin-bottom: 4px;
}

.dashboard-menu {
  position: relative;
}

.dashboard-menu summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f59e0b;
  color: #111827;
  font-weight: 700;
  user-select: none;
}

.dashboard-menu summary::-webkit-details-marker {
  display: none;
}

.dashboard-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 220px;
  padding: 10px;
  border-radius: 16px;
  background: #111827;
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
  z-index: 1000;
}

.dashboard-menu-list button {
  width: 100%;
  margin-top: 8px;
}

.dashboard-menu-list button:first-child {
  margin-top: 0;
}

.compact-team-card {
  margin-bottom: 14px;
}

@media (max-width: 640px) {
  .dashboard-header {
    align-items: stretch;
  }

  .dashboard-menu-list {
    width: min(240px, 80vw);
  }
}

.task-map {
  position: relative;
}

.task-map-controls {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 5;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.task-map-controls button {
  width: auto;
  margin: 0;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.9);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.18);
  font-size: 14px;
}

.task-map {
  position: relative;
}

.task-map-controls {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 5;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.task-map-controls button {
  width: auto;
  margin: 0;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.9);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.18);
  font-size: 14px;
}

.maplibregl-popup-content {
  color: #111827;
  font-size: 14px;
  line-height: 1.35;
}

.maplibregl-popup-content strong {
  color: #111827;
}

.maplibregl-popup-close-button {
  display: none;
}

.map-control-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.map-style-btn.active {
  background: #2563eb;
  color: white;
}

.task-map-controls {
  display: flex;
  flex-direction: column;
}

.modern-map-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modern-map-btn,
.map-style-menu summary,
.map-style-dropdown button {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.82);
  backdrop-filter: blur(10px);
  color: white;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0,0,0,0.28);
}

.modern-map-btn.active {
  background: rgba(37, 99, 235, 0.92);
}

.map-style-menu {
  position: relative;
}

.map-style-menu summary {
  list-style: none;
}

.map-style-menu summary::-webkit-details-marker {
  display: none;
}

.map-style-dropdown {
  position: absolute;
  top: 0;
  right: 58px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.92);
  backdrop-filter: blur(12px);
}

.map-style-dropdown button {
  width: auto;
  min-width: 140px;
  padding: 0 14px;
  font-size: 14px;
  text-align: left;
}

.map-style-menu:not([open]) .map-style-dropdown {
  display: none;
}

.task-map-controls {
  position: static;
  left: auto;
  bottom: auto;
  z-index: auto;
  display: block;
  gap: 0;
}

.modern-map-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.map-icon-btn,
.map-style-menu summary {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  color: #111827;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.22);
  position: relative;
}

.map-icon-btn.active {
  background: rgba(37, 99, 235, 0.9);
  color: #ffffff;
}

.map-icon-btn::after,
.map-style-menu summary::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 54px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  background: rgba(17, 24, 39, 0.9);
  color: #ffffff;
  padding: 6px 9px;
  border-radius: 8px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
}

.map-icon-btn:hover::after,
.map-style-menu summary:hover::after {
  opacity: 1;
}

.map-icon-crosshair {
  width: 20px;
  height: 20px;
  border: 3px solid currentColor;
  border-radius: 50%;
  position: relative;
}

.map-icon-crosshair::before,
.map-icon-crosshair::after {
  content: "";
  position: absolute;
  background: currentColor;
}

.map-icon-crosshair::before {
  width: 30px;
  height: 2px;
  left: -8px;
  top: 6px;
}

.map-icon-crosshair::after {
  width: 2px;
  height: 30px;
  left: 6px;
  top: -8px;
}

.map-icon-navigation {
  width: 0;
  height: 0;
  border-left: 10px solid currentColor;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  transform: rotate(-45deg);
}

.map-icon-target {
  width: 18px;
  height: 18px;
  border: 3px solid currentColor;
  border-radius: 50%;
  position: relative;
}

.map-icon-target::after {
  content: "";
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
  position: absolute;
  left: 3px;
  top: 3px;
}

.map-icon-layers {
  width: 20px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 3px;
  transform: skewY(-18deg);
  position: relative;
}

.map-icon-layers::before,
.map-icon-layers::after {
  content: "";
  position: absolute;
  left: -2px;
  width: 20px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.map-icon-layers::before {
  top: 5px;
  opacity: 0.65;
}

.map-icon-layers::after {
  top: 10px;
  opacity: 0.35;
}

.map-style-menu {
  position: relative;
}

.map-style-menu summary {
  list-style: none;
}

.map-style-menu summary::-webkit-details-marker {
  display: none;
}

.map-style-dropdown {
  position: absolute;
  right: 56px;
  top: 0;
  width: 150px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.88);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-style-dropdown button {
  height: 34px;
  width: 100%;
  border-radius: 10px;
  border: 0;
  background: rgba(255,255,255,0.08);
  color: #ffffff;
  font-size: 13px;
  text-align: left;
  padding: 0 10px;
}

.map-style-dropdown button.active {
  background: rgba(37, 99, 235, 0.95);
}

.map-style-menu:not([open]) .map-style-dropdown {
  display: none;
}

.map-icon-symbol {
  display: block;
  font-size: 24px;
  line-height: 1;
  transform: none;
}

.map-icon-crosshair,
.map-icon-navigation,
.map-icon-target,
.map-icon-layers {
  display: none !important;
}

.modern-map-controls {
  position: absolute;
  right: 12px;
  bottom: 52px;
  top: auto;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.map-icon-btn,
.map-style-menu summary {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.86);
  color: #111827;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.26);
  backdrop-filter: blur(10px);
}

.map-icon-btn.active {
  background: rgba(37, 99, 235, 0.95);
  color: #ffffff;
}

.map-icon-btn svg,
.map-style-menu summary svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.target-btn svg path:last-child {
  stroke: white;
}

.map-style-dropdown {
  right: 58px;
  bottom: 0;
  top: auto;
  width: 132px;
  padding: 8px;
}

.maplibregl-ctrl-attrib {
  font-size: 10px;
  opacity: 0.82;
}

.modern-map-controls {
  right: 10px;
  bottom: 16px;
  top: auto;
  gap: 8px;
}

.map-icon-btn,
.map-style-menu summary {
  width: 46px;
  height: 46px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255,255,255,0.45);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}

.map-icon-btn.active {
  background: rgba(37, 99, 235, 0.82);
}

.map-style-dropdown {
  right: 54px;
  bottom: 0;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(14px);
}

.map-style-dropdown button {
  background: rgba(255,255,255,0.10);
}

.map-style-dropdown button.active {
  background: rgba(37, 99, 235, 0.82);
}

.map-icon-btn svg,
.map-style-menu summary svg {
  fill: currentColor;
  stroke: currentColor;
}

.target-btn svg circle {
  fill: white;
  stroke: white;
}

.target-btn {
  background: rgba(37, 99, 235, 0.86) !important;
  color: #ffffff !important;
}

.target-btn svg {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.2;
}

.modern-map-controls {
  right: 10px !important;
  bottom: 12px !important;
  top: auto !important;
  gap: 9px !important;
}

.map-icon-btn,
.map-style-menu summary {
  width: 46px !important;
  height: 46px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.48) !important;
  color: #111827 !important;
  border: 1px solid rgba(255,255,255,0.42) !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.16) !important;
  backdrop-filter: blur(12px) !important;
}

.map-icon-btn.active {
  background: rgba(255, 255, 255, 0.58) !important;
  color: #111827 !important;
}

.map-icon-btn svg,
.map-style-menu summary svg {
  width: 25px !important;
  height: 25px !important;
  fill: currentColor !important;
  stroke: none !important;
}

.target-btn {
  background: rgba(255, 255, 255, 0.48) !important;
  color: #111827 !important;
}

.target-btn svg {
  fill: currentColor !important;
  stroke: none !important;
}

.map-style-dropdown {
  right: 56px !important;
  bottom: 0 !important;
  top: auto !important;
  width: 138px !important;
  background: rgba(17, 24, 39, 0.62) !important;
  backdrop-filter: blur(16px) !important;
}

.map-style-dropdown button {
  background: rgba(255,255,255,0.08) !important;
}

.map-style-dropdown button.active {
  background: rgba(255,255,255,0.20) !important;
}

.map-icon-btn,
.map-style-menu summary {
  background: rgba(255, 255, 255, 0.38) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
}

.map-icon-btn.active {
  background: rgba(255, 255, 255, 0.42) !important;
}

.map-icon-btn svg,
.map-style-menu summary svg {
  display: block !important;
  margin: 0 auto !important;
}

.target-btn svg {
  fill: #111827 !important;
  stroke: none !important;
}

.target-btn svg path {
  fill: #111827 !important;
  stroke: none !important;
}

.target-btn svg circle,
.target-btn svg path[stroke],
.target-btn svg path:last-child {
  fill: #111827 !important;
  stroke: none !important;
}

.fullscreen-start-mode {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(circle at top, rgba(34,197,94,0.32), transparent 42%), linear-gradient(135deg, #052e16, #020617 72%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.fullscreen-start-content {
  width: min(920px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 4vw, 36px);
  text-align: center;
}

.fullscreen-start-label {
  font-size: clamp(18px, 3vw, 34px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.86;
}

.fullscreen-start-button {
  width: min(760px, 92vw);
  min-height: clamp(150px, 32vh, 300px);
  border: 0;
  border-radius: clamp(28px, 6vw, 64px);
  background: linear-gradient(180deg, #facc15, #eab308);
  color: #111827;
  color: white;
  font-size: clamp(54px, 13vw, 150px);
  font-weight: 900;
  letter-spacing: 0.06em;
  box-shadow: 0 24px 80px rgba(34,197,94,0.42);
}

.fullscreen-start-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,0.12);
  color: white;
  font-size: 36px;
}

.fullscreen-start-done {
  font-size: clamp(58px, 14vw, 170px);
  font-weight: 950;
  letter-spacing: 0.08em;
  color: #4ade80;
}

.fullscreen-race-timer {
  font-variant-numeric: tabular-nums;
  font-size: clamp(50px, 12vw, 150px);
  font-weight: 900;
}

.fullscreen-start-secondary {
  width: auto;
  padding: 16px 26px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,0.16);
  color: white;
  font-size: 18px;
}

.fullscreen-start-close {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  padding: 0 !important;
  text-align: center !important;
}

.fullscreen-start-close::before {
  content: "";
}

.start-confetti-piece {
  position: fixed;
  top: -18px;
  z-index: 100000;
  width: 10px;
  height: 18px;
  border-radius: 3px;
  pointer-events: none;
  animation: startConfettiFall 2.4s ease-out forwards;
}

@keyframes startConfettiFall {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translate3d(var(--x), 105vh, 0) rotate(var(--r));
    opacity: 0;
  }
}

body.start-overlay-open {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
  touch-action: none !important;
  overscroll-behavior: none !important;
}

body.start-overlay-open .fullscreen-start-mode {
  touch-action: none;
  overscroll-behavior: contain;
}

.fullscreen-start-button {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.network-status-badge {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 99998;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}

.network-status-dot {
  width: 100%;
  height: 100%;
  border-radius: 999px;
}

.network-status-online .network-status-dot {
  background: #22c55e;
}

.network-status-checking .network-status-dot {
  background: #facc15;
}

.network-status-offline .network-status-dot {
  background: #ef4444;
}

.network-status-popup {
  position: absolute;
  left: 24px;
  bottom: -2px;
  white-space: nowrap;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.88);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.network-status-badge:hover .network-status-popup,
.network-status-badge:focus .network-status-popup,
.network-status-badge:active .network-status-popup {
  opacity: 1;
  transform: translateX(0);
}

.admin-shell {
  padding: 0 !important;
  overflow: hidden;
}

.admin-shell-header {
  padding: 22px 24px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(15,23,42,0.72);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.admin-shell-kicker {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.65;
  margin-bottom: 6px;
}

.admin-shell-header h2 {
  margin: 0;
  font-size: 28px;
}

.admin-nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(15,23,42,0.55);
  position: sticky;
  top: 92px;
  z-index: 39;
  backdrop-filter: blur(14px);
}

.admin-nav::-webkit-scrollbar {
  display: none;
}

.admin-nav-item {
  flex: 0 0 auto;
  border-radius: 14px !important;
  padding: 10px 16px !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  background: rgba(255,255,255,0.04) !important;
  transition: all 0.18s ease;
}

.admin-nav-item.active {
  background: linear-gradient(180deg, #2563eb, #1d4ed8) !important;
  border-color: rgba(255,255,255,0.14) !important;
  transform: translateY(-1px);
}

.admin-output {
  padding: 22px;
  min-height: 60vh;
}

.admin-output > *:first-child {
  margin-top: 0 !important;
}

@media (max-width: 768px) {
  .admin-shell-header {
    padding: 18px 16px 12px;
  }

  .admin-shell-header h2 {
    font-size: 22px;
  }

  .admin-nav {
    top: 78px;
    padding: 10px 12px;
  }

  .admin-output {
    padding: 16px;
  }
}

.admin-nav {
  position: sticky;
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(to right, transparent 0, black 18px, black calc(100% - 34px), transparent 100%);
}

.admin-nav-item {
  width: auto !important;
  min-width: max-content !important;
  max-width: none !important;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  scroll-snap-align: start;
  padding: 9px 14px !important;
  font-size: 14px !important;
}

.admin-nav::after {
  content: '›';
  position: sticky;
  right: 0;
  margin-left: -18px;
  width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.72);
  background: linear-gradient(to right, transparent, rgba(15,23,42,0.96));
  pointer-events: none;
  font-size: 22px;
  font-weight: 900;
}

@media (min-width: 900px) {
  .admin-nav {
    flex-wrap: wrap !important;
    overflow-x: visible !important;
    mask-image: none;
  }

  .admin-nav::after {
    display: none;
  }
}

.app-top-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.app-top-card h1 {
  margin-bottom: 6px;
}

.app-user-box {
  margin: 6px 0 0;
  font-size: 13px;
  opacity: 0.75;
}

.app-top-menu {
  flex: 0 0 auto;
}

.dashboard-content {
  margin-top: 0;
}

@media (max-width: 768px) {
  .app-top-card {
    align-items: stretch;
  }
}

.participant-event-status-strip {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(15,23,42,0.72);
  box-shadow: 0 8px 22px rgba(0,0,0,0.16);
}

.participant-event-status-active {
  background: linear-gradient(135deg, rgba(22,163,74,0.92), rgba(21,128,61,0.78));
}

.participant-event-status-waiting {
  background: linear-gradient(135deg, rgba(234,179,8,0.9), rgba(202,138,4,0.74));
  color: #111827;
}

.participant-status-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.78;
  margin-bottom: 3px;
}

.participant-status-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  font-weight: 900;
  white-space: nowrap;
}

.participant-status-stats span {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
}

@media (max-width: 640px) {
  .participant-event-status-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .participant-status-stats {
    justify-content: flex-start;
    white-space: normal;
  }
}


.admin-nav-badge {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  background: #ef4444;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  line-height: 20px;
}

.admin-nav-badge[hidden] {
  display: none !important;
}


.participant-notification-toast {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 10000;
  width: auto;
  max-width: calc(100vw - 24px);
  box-sizing: border-box;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 16px;
  background: #111827;
  color: #ffffff;
  padding: 14px 16px;
  box-shadow: 0 14px 34px rgba(0,0,0,0.38);
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.participant-notification-toast strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.participant-notification-toast span {
  display: block;
  color: #cbd5e1;
  font-size: 14px;
}


.admin-task-gps-map {
  width: 100%;
  height: 480px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  background: #111827;
  margin: 8px 0 10px;
}

.admin-gps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 700px) {
  .admin-gps-grid {
    grid-template-columns: 1fr;
  }
}


html,
body {
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

* {
  box-sizing: border-box;
}

img,
video,
canvas,
svg {
  max-width: 100%;
}

.task-map,
.admin-task-gps-map,
.maplibregl-canvas,
.maplibregl-canvas-container {
  touch-action: pan-x pan-y pinch-zoom;
}

.admin-live-pin {
  width: 28px;
  height: 28px;
  position: relative;
  transform: rotate(45deg);
  border-radius: 50% 50% 50% 0;
  background: var(--pin-color, #3b82f6);
  border: 3px solid #ffffff;
  box-shadow: 0 6px 14px rgba(0,0,0,.35);
}

.admin-live-pin-dot {
  position: absolute;
  width: 9px;
  height: 9px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  border-radius: 999px;
  background: #ffffff;
}

.admin-live-dot-marker {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--marker-color, #3b82f6);
  border: 4px solid #ffffff;
  box-shadow: 0 5px 14px rgba(0,0,0,.35);
}


.map-3d-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 15px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.sos-bubble-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 42, .72);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}

.sos-bubble-card {
  width: min(440px, 100%);
  background: #111827;
  color: #ffffff;
  border: 1px solid rgba(248, 113, 113, .45);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
  padding: 18px;
}

.sos-bubble-title {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 6px;
}

.sos-option-btn {
  width: 100%;
  margin-top: 10px;
  justify-content: center;
  background: linear-gradient(135deg, #ef4444, #f97316);
  border: 0;
}

.sos-close-btn {
  width: 100%;
  margin-top: 10px;
}


.sos-status-box {
  margin-top: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(248, 113, 113, .45);
  background: rgba(127, 29, 29, .28);
  color: #fff;
}

.sos-status-box strong {
  display: block;
  font-weight: 900;
  margin-bottom: 4px;
}

.sos-status-box span {
  display: block;
  color: rgba(255,255,255,.78);
  line-height: 1.35;
}


.sos-detail-box {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.12);
}

.sos-detail-box label {
  display: block;
  font-weight: 800;
  margin-bottom: 6px;
}

.sos-detail-box textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(15, 23, 42, .95);
  color: #ffffff;
  padding: 12px;
  font: inherit;
  box-sizing: border-box;
}

.sos-detail-box textarea::placeholder {
  color: rgba(255,255,255,.45);
}


.sos-photo-label {
  display: block;
  margin-top: 10px;
  margin-bottom: 6px;
  font-weight: 800;
}

#sosPhotoInput {
  width: 100%;
  color: #ffffff;
  margin-bottom: 10px;
}


.notification-card {
  position: relative;
}

.notification-card-sos {
  border-color: rgba(248, 113, 113, .45);
}

.notification-card-sos.notification-open {
  background: linear-gradient(180deg, rgba(127, 29, 29, .24), rgba(15, 23, 42, .96));
}

.notification-card-photo_uploaded {
  border-color: rgba(59, 130, 246, .35);
}

.notification-card-admin_force_complete {
  border-color: rgba(34, 197, 94, .35);
}

.notification-sos-image {
  width: 100%;
  max-width: 360px;
  border-radius: 14px;
  margin: 10px 0;
  display: block;
}


.participant-game-panel {
  position: relative;
  padding-bottom: 92px;
}

.participant-game-hero,
.participant-task-card,
.participant-nav-card,
.participant-hints-card,
.participant-submit-card {
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 20px;
  background: rgba(15, 23, 42, .82);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .22);
  padding: 16px;
  margin-bottom: 14px;
}

.participant-game-hero {
  background: linear-gradient(135deg, rgba(34, 197, 94, .22), rgba(59, 130, 246, .16));
}

.participant-event-title {
  font-weight: 900;
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.participant-event-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.participant-event-stats span,
.participant-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .92);
  font-weight: 800;
  padding: 6px 10px;
}

.participant-task-card .task-title {
  font-size: 1.22rem;
  margin-bottom: 10px;
}

.participant-task-card .task-desc {
  margin-bottom: 14px;
}

.participant-task-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.participant-pill.is-done {
  background: rgba(34, 197, 94, .18);
  border-color: rgba(34, 197, 94, .35);
}

.participant-pill.is-warn {
  background: rgba(245, 158, 11, .18);
  border-color: rgba(245, 158, 11, .35);
}

.participant-section-title {
  color: rgba(255, 255, 255, .7);
  font-size: .82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 10px;
}

.participant-nav-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.nav-app-card {
  min-height: 68px;
  border-radius: 16px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font-weight: 900;
  font-size: .76rem;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  color: white;
  text-align: center;
}

.nav-app-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.95);
  color: #111827;
  font-weight: 1000;
  font-size: 1rem;
}

.nav-google .nav-app-icon {
  color: #2563eb;
}

.nav-waze .nav-app-icon {
  color: #06b6d4;
}

.nav-apple .nav-app-icon {
  color: #111827;
}

.participant-action-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.participant-action-card,
.participant-primary-action {
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, .09);
  color: #ffffff;
  text-align: left;
  font: inherit;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.12);
}

.participant-action-card strong {
  display: block;
  font-weight: 900;
  margin-bottom: 4px;
}

.participant-action-card span {
  display: block;
  color: rgba(255,255,255,.62);
  font-size: .9rem;
}

.participant-primary-action {
  text-align: center;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(59, 130, 246, .95), rgba(37, 99, 235, .95));
}

.participant-photo-action {
  display: flex;
  align-items: center;
  justify-content: center;
}

.participant-photo-action input {
  display: none;
}

.participant-floating-sos {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 90;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: 3px solid rgba(255,255,255,.86);
  background: linear-gradient(135deg, #ef4444, #991b1b);
  color: white;
  font-weight: 1000;
  box-shadow: 0 18px 38px rgba(127, 29, 29, .46);
}

@media (min-width: 520px) {
  .participant-event-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .participant-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


.participant-game-hero {
  display: none !important;
}

.participant-task-value {
  flex-basis: 100%;
  justify-content: flex-start;
}

.participant-nav-grid {
  gap: 12px;
}

.nav-app-card {
  min-height: 72px;
  background: rgba(255,255,255,.94);
  border-color: rgba(15,23,42,.12);
  box-shadow: 0 12px 26px rgba(0,0,0,.18);
}

.nav-app-card span:not(.nav-logo) {
  display: none;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 1000;
  line-height: 1;
}

.nav-logo-google {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: #2563eb;
  font-size: 1.55rem;
  background:
    radial-gradient(circle at 72% 72%, #34a853 0 18%, transparent 19%),
    radial-gradient(circle at 28% 72%, #fbbc05 0 18%, transparent 19%),
    radial-gradient(circle at 28% 28%, #ea4335 0 18%, transparent 19%),
    radial-gradient(circle at 72% 28%, #4285f4 0 18%, transparent 19%),
    #ffffff;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}

.nav-logo-waze {
  color: #111827;
  background: #7dd3fc;
  border-radius: 16px;
  padding: 10px 8px;
  font-size: .9rem;
  letter-spacing: -.03em;
}

.nav-logo-apple {
  color: #111827;
  font-size: 2.3rem;
}

.participant-hint-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.participant-hint-row .participant-action-card {
  text-align: center;
  min-height: 46px;
  padding: 10px 6px;
  font-weight: 900;
  font-size: .82rem;
  white-space: nowrap;
}

.participant-submit-title {
  text-align: center;
  color: rgba(255,255,255,.86);
}

.participant-submit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.participant-submit-grid .participant-primary-action {
  min-height: 76px;
  border-radius: 20px;
  font-size: 1.05rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, .95), rgba(34, 197, 94, .95));
  box-shadow: 0 14px 30px rgba(22, 163, 74, .25);
}

.participant-submit-grid .participant-photo-action {
  background: linear-gradient(135deg, rgba(59, 130, 246, .95), rgba(37, 99, 235, .95));
  box-shadow: 0 14px 30px rgba(37, 99, 235, .25);
}


.nav-logo-img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  display: block;
}

.nav-app-card {
  min-height: 86px;
  padding: 10px;
}

.nav-logo-apple {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: #f8fafc;
  font-size: 2.5rem;
}

.participant-hint-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.participant-hint-row .participant-action-card {
  width: auto;
  min-width: 150px;
  max-width: 220px;
  flex: 0 1 auto;
}

@media (max-width: 420px) {
  .participant-hint-row .participant-action-card {
    min-width: 132px;
    font-size: .78rem;
  }

  .nav-logo-img,
  .nav-logo-apple {
    width: 52px;
    height: 52px;
  }
}

.nav-app-card {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.nav-app-card:active {
  transform: scale(.96);
}

.nav-logo-img {
  width: 64px;
  height: 64px;
}

.nav-logo-apple {
  background: transparent !important;
  color: #ffffff;
  width: 64px;
  height: 64px;
}


.app-top-card h1 {
  font-size: 1.1rem !important;
  line-height: 1.15 !important;
  margin-bottom: 4px !important;
}

.app-top-card #status {
  display: none !important;
}

.app-user-box {
  margin: 0 !important;
  font-size: .82rem !important;
  opacity: .82;
}


.home-hero-card,
.home-form-card,
.my-team-card {
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 24px;
  background: rgba(15, 23, 42, .84);
  box-shadow: 0 18px 42px rgba(0,0,0,.24);
  padding: 18px;
  margin-top: 14px;
}

.home-hero-card h2,
.home-form-card h3,
.my-team-card h3 {
  margin: 4px 0 8px;
  line-height: 1.15;
}

.home-kicker {
  color: rgba(255,255,255,.62);
  font-size: .78rem;
  font-weight: 1000;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.home-event-status-strip {
  margin-top: 14px;
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(245,158,11,.25), rgba(234,179,8,.16));
  border: 1px solid rgba(245,158,11,.35);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.home-event-status-strip span {
  display: block;
  color: rgba(255,255,255,.72);
  font-size: .82rem;
  font-weight: 800;
}

.home-event-countdown {
  font-weight: 1000;
  white-space: nowrap;
}

.home-event-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.home-event-info-grid > div {
  border-radius: 16px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
  padding: 12px;
}

.home-event-info-grid span {
  display: block;
  color: rgba(255,255,255,.62);
  font-size: .78rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.home-action-grid,
.home-login-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.home-primary-action,
.home-secondary-action {
  border: 0;
  border-radius: 18px;
  min-height: 54px;
  padding: 14px;
  font-weight: 1000;
  cursor: pointer;
}

.home-primary-action {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  box-shadow: 0 16px 34px rgba(234, 88, 12, .28);
}

.home-secondary-action {
  background: rgba(255,255,255,.10);
  color: #fff;
  border: 1px solid rgba(255,255,255,.14);
}

.full-width {
  width: 100%;
}

.home-form-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.home-account-note,
.home-registered-team {
  border-radius: 16px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
  padding: 12px;
  margin: 12px 0;
}

.home-registered-team span,
.home-registered-team small {
  display: block;
  color: rgba(255,255,255,.64);
}

.home-registered-team strong {
  display: block;
  font-size: 1.12rem;
  margin: 3px 0;
}

.modern-invite-box {
  margin-top: 14px;
}

.modern-invite-box strong {
  font-size: 1.35rem;
  letter-spacing: .06em;
}

@media (min-width: 560px) {
  .home-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


#appTopCard.app-top-card:not([style*="display:none"]) {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 16px !important;
}

#appTopCard.app-top-card:not([style*="display:none"]) .app-top-menu {
  flex: 0 0 auto !important;
  width: auto !important;
  margin-left: auto !important;
  align-self: flex-start !important;
}

#appTopCard.app-top-card:not([style*="display:none"]) .app-top-menu summary {
  display: inline-flex !important;
  width: auto !important;
  min-width: 0 !important;
  white-space: nowrap !important;
}

#appTopCard.app-top-card:not([style*="display:none"]) .dashboard-menu-list {
  right: 0 !important;
  left: auto !important;
}


.leave-team-box {
  margin-top: 22px;
  border-color: rgba(239, 68, 68, .35);
  background: rgba(127, 29, 29, .18);
}

.leave-team-danger-button,
button.leave-team-danger-button {
  border: 1px solid rgba(239, 68, 68, .55);
  border-radius: 14px;
  background: linear-gradient(135deg, #ef4444, #991b1b);
  color: #ffffff;
  font-weight: 1000;
  min-height: 44px;
  padding: 11px 14px;
  cursor: pointer;
}

.finish-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(8px);
}

.finish-popup-card {
  width: min(420px, 100%);
  padding: 24px;
  border-radius: 24px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  color: #ffffff;
  text-align: left;
}

.finish-popup-title {
  font-size: 1.45rem;
  font-weight: 1000;
  margin-bottom: 10px;
}

.finish-popup-text {
  font-size: 1rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 18px;
}

#finishPopupCloseBtn {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 16px;
  background: #f97316;
  color: #ffffff;
  font-weight: 1000;
  font-size: 1rem;
  cursor: pointer;
}

#finishPopupCloseBtn:active {
  transform: translateY(1px);
}

.finish-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(8px);
}

.finish-popup-card {
  width: min(420px, 100%);
  padding: 24px;
  border-radius: 24px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  color: #ffffff;
  text-align: left;
}

.finish-popup-title {
  font-size: 1.45rem;
  font-weight: 1000;
  margin-bottom: 10px;
}

.finish-popup-text {
  font-size: 1rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 18px;
}

#finishPopupCloseBtn {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 16px;
  background: #f97316;
  color: #ffffff;
  font-weight: 1000;
  font-size: 1rem;
  cursor: pointer;
}

#finishPopupCloseBtn:active {
  transform: translateY(1px);
}

.finish-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(8px);
}

.finish-popup-card {
  width: min(420px, 100%);
  padding: 24px;
  border-radius: 24px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  color: #ffffff;
  text-align: left;
}

.finish-popup-title {
  font-size: 1.45rem;
  font-weight: 1000;
  margin-bottom: 10px;
}

.finish-popup-text {
  font-size: 1rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 18px;
}

#finishPopupCloseBtn {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 16px;
  background: #f97316;
  color: #ffffff;
  font-weight: 1000;
  font-size: 1rem;
  cursor: pointer;
}

#finishPopupCloseBtn:active {
  transform: translateY(1px);
}

.finish-popup-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}

.finish-popup-stats > div {
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.finish-popup-stats span {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.68);
  margin-bottom: 4px;
}

.finish-popup-stats strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 1000;
  color: #ffffff;
}


.participant-submit-grid > :only-child {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(100%, 320px);
}

@media (max-width: 640px) {
  .home-event-status-strip {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .home-event-status-strip > div,
  .home-event-countdown {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    line-height: 1.35;
  }

  .home-event-countdown {
    text-align: left;
  }
}


.admin-team-payment-card.is-paid {
  border-color: rgba(34, 197, 94, 0.75);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.16), rgba(15, 23, 42, 0.96));
}

.admin-team-payment-card.is-unpaid {
  border-color: rgba(239, 68, 68, 0.75);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.14), rgba(15, 23, 42, 0.96));
}

.payment-confirm-button {
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
  color: #ffffff !important;
  border-color: rgba(34, 197, 94, 0.9) !important;
}

.danger-button {
  background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
  color: #ffffff !important;
  border-color: rgba(239, 68, 68, 0.9) !important;
}

.payment-waiting-box {
  border-color: rgba(239, 68, 68, 0.7);
  background: rgba(239, 68, 68, 0.12);
}

.payment-ready-box {
  border-color: rgba(34, 197, 94, 0.7);
  background: rgba(34, 197, 94, 0.12);
}


.photo-preview-button {
  border: 0;
  background: transparent;
  padding: 0;
  width: auto;
  min-width: 0;
  display: inline-flex;
  cursor: pointer;
}

.photo-preview-button:hover {
  transform: scale(1.03);
}

.photo-action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.photo-action-row button {
  flex: 1 1 140px;
}

.photo-view-button {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  color: #ffffff !important;
  border: none !important;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.photo-lightbox.is-open {
  display: flex;
}

.photo-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(8px);
}

.photo-lightbox-content {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1100px);
  max-height: 92vh;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 14px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.45);
}

.photo-lightbox-content img {
  display: block;
  max-width: 100%;
  max-height: 84vh;
  border-radius: 16px;
  object-fit: contain;
}

.photo-lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 999px;
  padding: 0;
  background: #ef4444 !important;
  color: #ffffff !important;
  border: 2px solid rgba(255,255,255,0.7) !important;
  font-size: 28px;
  line-height: 1;
}


.admin-event-cover-thumb,
.admin-event-cover-preview,
.public-event-cover {
  width: 100%;
  display: block;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.14);
  margin-bottom: 14px;
}

.admin-event-cover-thumb {
  max-height: 220px;
}

.admin-event-cover-preview {
  max-height: 280px;
}

.public-event-cover {
  max-height: 260px;
}

.app-top-card [data-action="logout"][data-admin-only="true"] {
  width: auto !important;
  min-width: 150px !important;
  margin-left: auto !important;
  align-self: center !important;
  white-space: nowrap !important;
}

#appTopCard > div:first-child:has([data-action="logout"][data-admin-only="true"]) {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  align-items: center !important;
  column-gap: 16px !important;
}

#appTopCard > div:first-child:has([data-action="logout"][data-admin-only="true"]) h1,
#appTopCard > div:first-child:has([data-action="logout"][data-admin-only="true"]) #userBox,
#appTopCard > div:first-child:has([data-action="logout"][data-admin-only="true"]) #status {
  grid-column: 1 !important;
}

#appTopCard [data-action="logout"][data-admin-only="true"] {
  grid-column: 2 !important;
  grid-row: 1 / span 3 !important;
  width: auto !important;
  min-width: 150px !important;
  margin: 0 !important;
  align-self: center !important;
  justify-self: end !important;
  white-space: nowrap !important;
}

/* Hide participant leaderboard button only */
#appTopMenu button[data-action="loadLeaderboard"] {
  display: none !important;
}
