/* --- Event popup --------------------------------- */
.event-popup {
  position: fixed;
  left: 50%;
  top: 25%;
  transform: translate(-50%, -56%) scale(0.92);
  width: min(760px, calc(100vw - 48px));
  padding: 22px 26px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.42);
  background: linear-gradient(135deg, rgba(13,39,66,.96), rgba(34,96,156,.94));
  color: #f8fcff;
  box-shadow: 0 30px 60px rgba(10,24,43,.42);
  backdrop-filter: blur(6px);
  text-align: center;
  font-size: clamp(1.06rem, 2.5vw, 1.35rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  opacity: 0;
  transition: opacity 220ms ease, transform 220ms ease;
  z-index: 72;
}
.event-popup.show {
  opacity: 1;
  transform: translate(-50%, -25%) scale(1);
}

.reaction-banner {
  position: fixed;
  left: 50%;
  top: 25%;
  transform: translate(-50%, -56%) scale(0.92);
  width: min(760px, calc(100vw - 48px));
  padding: 18px 90px 18px 22px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.46);
  background: linear-gradient(135deg, rgba(13,39,66,.97), rgba(34,96,156,.95));
  color: #f8fcff;
  font-size: clamp(0.88rem, 2.2vw, 1rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 28px 54px rgba(10,24,43,.44);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 220ms ease, transform 220ms ease;
  z-index: 74;
  pointer-events: none;
  text-align: center;
}

.reaction-banner.show {
  opacity: 1;
  transform: translate(-50%, -25%) scale(1);
}

.reaction-banner-sender {
  font-weight: 900;
  margin-right: 3px;
}

.reaction-banner-message {
  font-weight: 800;
}

.reaction-banner-effect-love {
  background: linear-gradient(120deg, rgba(255, 82, 152, .96), rgba(255, 116, 177, .94));
  border-color: rgba(255, 204, 230, .9);
  box-shadow: 0 24px 44px rgba(255, 74, 156, .52);
  animation: reactionBannerPopIn 460ms ease;
}

.reaction-banner-effect-thanks {
  background: linear-gradient(120deg, rgba(251, 191, 36, .95), rgba(14, 165, 233, .9));
  border-color: rgba(254, 240, 138, .92);
  box-shadow: 0 24px 44px rgba(37, 99, 235, .44);
  animation: reactionBannerPopIn 460ms ease;
}

.reaction-banner-effect-respect {
  background: linear-gradient(120deg, rgba(34, 197, 94, .95), rgba(59, 130, 246, .9));
  border-color: rgba(187, 247, 208, .9);
  box-shadow: 0 24px 44px rgba(34, 197, 94, .38);
  animation: reactionBannerPopIn 460ms ease;
}

.reaction-banner-effect-hype {
  background: linear-gradient(120deg, rgba(249, 115, 22, .95), rgba(239, 68, 68, .92));
  border-color: rgba(254, 215, 170, .9);
  box-shadow: 0 24px 44px rgba(239, 68, 68, .44);
  animation: reactionBannerPopIn 460ms ease;
}

.reaction-banner-effect-laugh {
  background: linear-gradient(120deg, rgba(251, 191, 36, .95), rgba(245, 158, 11, .9));
  border-color: rgba(254, 240, 138, .9);
  box-shadow: 0 24px 44px rgba(217, 119, 6, .44);
  animation: reactionBannerPopIn 460ms ease;
}

.reaction-banner-effect-wow {
  background: linear-gradient(120deg, rgba(14, 165, 233, .95), rgba(59, 130, 246, .9));
  border-color: rgba(125, 211, 252, .9);
  box-shadow: 0 24px 44px rgba(37, 99, 235, .45);
  animation: reactionBannerPopIn 460ms ease;
}

.reaction-banner-effect-celebrate {
  background: linear-gradient(120deg, rgba(34, 197, 94, .95), rgba(234, 179, 8, .9));
  border-color: rgba(187, 247, 208, .9);
  box-shadow: 0 24px 44px rgba(21, 128, 61, .44);
  animation: reactionBannerPopIn 460ms ease;
}

.reaction-banner-effect-default {
  animation: reactionBannerPopIn 460ms ease;
}

.reaction-banner-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.reaction-banner-particle {
  position: absolute;
  left: calc(var(--x) * 1%);
  bottom: 6px;
  opacity: 0;
  transform: translate(-50%, 12px) scale(calc(var(--scale) * 0.62));
  animation: reactionBannerParticle 1200ms cubic-bezier(.2,.72,.24,1) forwards;
  animation-delay: var(--delay);
  filter: drop-shadow(0 2px 5px rgba(0,0,0,.3));
}

.reaction-banner-burst-love .reaction-banner-particle {
  font-size: 0.98rem;
}

.reaction-banner-burst-thanks .reaction-banner-particle,
.reaction-banner-burst-respect .reaction-banner-particle,
.reaction-banner-burst-celebrate .reaction-banner-particle {
  font-size: 0.9rem;
}

.reaction-banner-burst-hype .reaction-banner-particle,
.reaction-banner-burst-wow .reaction-banner-particle,
.reaction-banner-burst-laugh .reaction-banner-particle,
.reaction-banner-burst-default .reaction-banner-particle {
  font-size: 0.86rem;
}

@keyframes reactionBannerPopIn {
  0% { transform: translate(-50%, -25%) scale(0.95); }
  45% { transform: translate(-50%, -25%) scale(1.04); }
  100% { transform: translate(-50%, -25%) scale(1); }
}

@keyframes reactionBannerParticle {
  0% {
    opacity: 0;
    transform: translate(-50%, 12px) scale(calc(var(--scale) * 0.62));
  }
  14% {
    opacity: 1;
  }
  62% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--drift)), calc(-1 * var(--rise))) scale(var(--scale));
  }
}

.quick-match-modal {
  position: fixed;
  inset: 0;
  z-index: 71;
  display: grid;
  place-items: center;
  padding: 18px;
}

.quick-match-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 22, 39, 0.58);
  backdrop-filter: blur(3px);
}

.quick-match-sheet {
  position: relative;
  width: min(760px, 100%);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.4);
  background:
    radial-gradient(1000px 260px at 0% 0%, rgba(14,165,233,.2), transparent 62%),
    radial-gradient(1000px 260px at 100% 100%, rgba(34,197,94,.17), transparent 60%),
    linear-gradient(145deg, rgba(11, 31, 52, 0.97), rgba(28, 65, 104, 0.96));
  color: #f5fbff;
  box-shadow: 0 26px 50px rgba(5, 16, 30, 0.5);
  padding: 16px;
  display: grid;
  gap: 14px;
  animation: quickMatchIn 180ms ease-out;
}

@keyframes quickMatchIn {
  from { transform: translateY(8px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.quick-match-head h3 {
  font-size: clamp(1.15rem, 2.7vw, 1.45rem);
  color: #ffffff;
}

.quick-match-head p {
  margin-top: 4px;
  color: rgba(235, 247, 255, 0.9);
  font-size: 0.95rem;
}

.quick-match-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.quick-match-section {
  border: 1px solid rgba(186, 225, 255, 0.26);
  border-radius: 14px;
  padding: 10px;
  background: linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
}

.quick-match-section h4 {
  color: #ecf8ff;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.quick-match-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#quickMatchModeCards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quick-match-card {
  border: 1px solid rgba(186, 225, 255, 0.36);
  border-radius: 14px;
  background: linear-gradient(140deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  color: #eaf8ff;
  min-height: 74px;
  padding: 11px 12px;
  text-align: left;
  display: grid;
  gap: 3px;
  cursor: pointer;
  transition: transform 110ms, box-shadow 120ms, border-color 120ms, background 120ms;
}

.quick-match-card:hover {
  transform: translateY(-2px);
  border-color: rgba(162, 227, 255, 0.82);
  box-shadow: 0 10px 20px rgba(6, 22, 40, 0.3);
}

.quick-match-card.active {
  border-color: rgba(102, 224, 255, 0.95);
  box-shadow: 0 0 0 2px rgba(72, 204, 255, 0.28), 0 14px 26px rgba(6, 25, 46, 0.4);
  background: linear-gradient(130deg, rgba(53, 197, 255, 0.2), rgba(60, 225, 148, 0.13));
}

.quick-match-kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 900;
  font-size: 0.7rem;
  color: rgba(180, 238, 255, 0.88);
}

.quick-match-card strong {
  font-size: 1.1rem;
  color: #ffffff;
}

.quick-match-count-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  color: rgba(223, 242, 255, 0.92);
  font-size: 0.85rem;
}

.quick-match-count-head strong {
  font-size: 1.18rem;
  color: #fff;
}

.quick-match-count-slider {
  width: 100%;
  --quick-match-slider-progress: 100%;
  --quick-match-slider-ratio: 1;
  appearance: none;
  -webkit-appearance: none;
  background:
    radial-gradient(
      circle at calc(9px + (100% - 18px) * var(--quick-match-slider-ratio)) 50%,
      #53d6a2 0 8px,
      rgba(83,214,162,.18) 8px 10px,
      transparent 11px
    ),
    transparent;
  height: 26px;
}

.quick-match-count-slider::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.26);
  background: linear-gradient(
    90deg,
    #53d6a2 0,
    #53d6a2 var(--quick-match-slider-progress),
    rgba(255,255,255,.16) var(--quick-match-slider-progress),
    rgba(255,255,255,.16) 100%
  );
}

.quick-match-count-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -6px;
  border-radius: 50%;
  border: none;
  background: transparent;
  box-shadow: none;
}

.quick-match-count-slider::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.26);
  background: rgba(255,255,255,.16);
}

.quick-match-count-slider::-moz-range-progress {
  height: 8px;
  border-radius: 999px;
  background: #53d6a2;
}

.quick-match-count-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: transparent;
  box-shadow: none;
}

.quick-match-count-marks {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.quick-match-count-chip {
  min-height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(186,225,255,.36);
  background: rgba(255,255,255,.07);
  color: #eaf8ff;
  font-weight: 900;
  cursor: pointer;
  transition: transform 90ms, border-color 120ms, background 120ms;
}

.quick-match-count-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(162, 227, 255, 0.82);
}

.quick-match-count-chip.active {
  border-color: rgba(98, 233, 184, 0.95);
  box-shadow: 0 0 0 2px rgba(72, 204, 255, 0.22);
  background: linear-gradient(130deg, rgba(41, 169, 129, 0.36), rgba(44, 171, 214, 0.22));
}

.quick-match-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ─── Player Profile Modal ─────────────────────────────────────────────────── */

.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 75;
  display: grid;
  place-items: center;
  padding: 16px;
}

.profile-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 14, 26, 0.72);
  backdrop-filter: blur(6px);
}

.profile-sheet {
  position: relative;
  width: min(440px, 100%);
  max-height: min(88vh, 640px);
  overflow-y: auto;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.18);
  background:
    radial-gradient(700px 200px at 0% 0%, rgba(14,165,233,.18), transparent 60%),
    radial-gradient(700px 180px at 100% 100%, rgba(99,102,241,.18), transparent 60%),
    linear-gradient(160deg, rgba(10,24,46,.98), rgba(18,44,80,.96));
  color: #f0f8ff;
  box-shadow:
    0 32px 64px rgba(4,12,24,.6),
    0 0 0 1px rgba(255,255,255,.06) inset;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.2) transparent;
}

/* Close button */
.profile-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.7);
  font-size: 0.9rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 180ms, color 180ms;
}
.profile-close-btn:hover { background: rgba(255,255,255,.16); color: #fff; }

/* Hero row: avatar + name */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 36px; /* avoid close btn overlap */
}

.profile-avatar {
  flex-shrink: 0;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,.4);
  letter-spacing: -0.02em;
  border: 2.5px solid rgba(255,255,255,.25);
}

.profile-hero-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.profile-name {
  font-size: clamp(1.1rem, 3.5vw, 1.4rem);
  font-weight: 900;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.profile-edit-name-btn {
  align-self: flex-start;
  background: rgba(86,198,255,.14);
  border: 1px solid rgba(86,198,255,.35);
  border-radius: 8px;
  color: #7dd8ff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  cursor: pointer;
  transition: background 180ms, border-color 180ms;
  letter-spacing: 0.02em;
}
.profile-edit-name-btn:hover {
  background: rgba(86,198,255,.24);
  border-color: rgba(86,198,255,.6);
  color: #b8eaff;
}

/* Divider */
.profile-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.14) 30%, rgba(255,255,255,.14) 70%, transparent);
}

/* Stats section */
.profile-stats-wrap { display: flex; flex-direction: column; gap: 12px; }

.profile-stats-heading {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(180,220,255,.55);
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.profile-stat-card {
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 10px 6px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}

.profile-stat-icon {
  font-size: 1.1rem;
  line-height: 1;
  margin-bottom: 2px;
}

.profile-stat-value {
  font-size: clamp(1.1rem, 3.5vw, 1.35rem);
  font-weight: 900;
  color: #e8f5ff;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums lining-nums;
}

.profile-stat-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: rgba(180,220,255,.55);
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

/* Footer */
.profile-footer {
  padding-top: 2px;
  display: flex;
  justify-content: center;
}

.profile-reset-btn {
  font-size: 0.8rem;
  background: linear-gradient(120deg, #c0392b, #e74c3c);
  border: 1px solid rgba(255,100,100,.4);
  color: #fff;
  border-radius: 10px;
  padding: 8px 18px;
  transition: background 180ms, box-shadow 180ms;
  box-shadow: 0 4px 12px rgba(200,40,40,.35);
}
.profile-reset-btn:hover {
  background: linear-gradient(120deg, #d44235, #ff5a47);
  box-shadow: 0 6px 16px rgba(200,40,40,.5);
}

@media (max-width: 400px) {
  .profile-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Name Modal ────────────────────────────────────────────────────────────── */

.name-modal {
  position: fixed;
  inset: 0;
  z-index: 76;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 10% 18px 18px;
}

.name-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 21, 38, 0.55);
  backdrop-filter: blur(3px);
}

.name-sheet {
  position: relative;
  width: min(520px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.42);
  background:
    radial-gradient(900px 200px at 0% 0%, rgba(14,165,233,.2), transparent 64%),
    radial-gradient(900px 200px at 100% 100%, rgba(34,197,94,.16), transparent 60%),
    linear-gradient(145deg, rgba(10,29,50,.97), rgba(25,60,96,.95));
  color: #f4fbff;
  box-shadow: 0 24px 46px rgba(6, 17, 30, 0.46);
  padding: 16px;
  display: grid;
  gap: 10px;
}

.name-head h3 {
  font-size: clamp(1.15rem, 2.8vw, 1.4rem);
  color: #fff;
}

.name-head p {
  margin-top: 4px;
  font-size: 0.92rem;
  color: rgba(224, 243, 255, 0.9);
}

.name-label {
  font-size: 0.84rem;
  font-weight: 800;
  color: rgba(210, 238, 255, 0.95);
}

.name-input {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(190, 226, 250, 0.56);
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(239,248,255,.94));
  color: #16324b;
  font-weight: 800;
  padding: 10px 12px;
}

.name-input:focus {
  outline: none;
  border-color: #56c6ff;
  box-shadow: 0 0 0 3px rgba(86,198,255,.22);
}

.name-actions {
  margin-top: 2px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.share-modal {
  position: fixed;
  inset: 0;
  z-index: 73;
  display: grid;
  place-items: center;
  padding: 18px;
}

.share-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 20, 36, 0.58);
  backdrop-filter: blur(4px);
}

.share-sheet {
  position: relative;
  width: min(760px, 100%);
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.42);
  background:
    radial-gradient(1100px 300px at 0% 0%, rgba(55, 176, 255, 0.18), transparent 60%),
    radial-gradient(900px 240px at 100% 100%, rgba(76, 214, 151, 0.16), transparent 58%),
    linear-gradient(145deg, rgba(12, 30, 48, 0.97), rgba(26, 62, 96, 0.95));
  color: #f4fbff;
  box-shadow: 0 28px 52px rgba(5, 16, 30, 0.48);
  padding: 18px;
  display: grid;
  gap: 16px;
  animation: quickMatchIn 180ms ease-out;
}

.share-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.share-head h3 {
  font-size: clamp(1.2rem, 2.8vw, 1.55rem);
  color: #ffffff;
}

.share-head p {
  margin-top: 5px;
  color: rgba(228, 242, 255, 0.9);
  font-size: 0.95rem;
}

.share-close-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(202, 232, 255, 0.32);
  background: rgba(255,255,255,.08);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 900;
  cursor: pointer;
}

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

.share-option {
  min-height: 82px;
  border-radius: 16px;
  border: 1px solid rgba(192, 227, 249, 0.34);
  color: #f4fbff;
  text-align: center;
  padding: 12px 13px;
  cursor: pointer;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  transition: transform 110ms, border-color 120ms, box-shadow 120ms;
}

.share-option:hover {
  transform: translateY(-2px);
  border-color: rgba(180, 235, 255, 0.82);
  box-shadow: 0 14px 26px rgba(5, 16, 30, 0.26);
}

.share-option-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.share-option-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.share-option strong {
  font-size: 0.95rem;
  color: #ffffff;
}

.share-option-native {
  background: linear-gradient(135deg, rgba(66, 197, 255, 0.28), rgba(79, 228, 163, 0.18));
}

.share-option-whatsapp {
  background: linear-gradient(135deg, rgba(39, 199, 112, 0.34), rgba(22, 107, 62, 0.3));
}

.share-option-sms {
  background: linear-gradient(135deg, rgba(90, 181, 255, 0.28), rgba(44, 92, 178, 0.3));
}

.share-option-facebook {
  background: linear-gradient(135deg, rgba(66, 103, 178, 0.34), rgba(30, 56, 112, 0.3));
}

.share-option-telegram {
  background: linear-gradient(135deg, rgba(49, 169, 255, 0.34), rgba(22, 92, 148, 0.3));
}

.share-option-x {
  background: linear-gradient(135deg, rgba(28, 33, 41, 0.9), rgba(70, 79, 94, 0.8));
}

.share-option-email {
  background: linear-gradient(135deg, rgba(136, 148, 166, 0.34), rgba(62, 75, 95, 0.32));
}

.share-link-block {
  border: 1px solid rgba(192, 227, 249, 0.28);
  border-radius: 16px;
  padding: 12px;
  background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  display: grid;
  gap: 8px;
}

.share-link-label {
  font-size: 0.84rem;
  font-weight: 800;
  color: rgba(216, 239, 255, 0.96);
}

.share-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.share-link-input {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(190, 226, 250, 0.56);
  background: linear-gradient(135deg, rgba(255,255,255,.97), rgba(239,248,255,.94));
  color: #16324b;
  font-weight: 800;
  padding: 10px 12px;
}

.share-link-input:focus {
  outline: none;
  border-color: #56c6ff;
  box-shadow: 0 0 0 3px rgba(86,198,255,.22);
}

.share-copy-btn {
  min-width: 128px;
}

@media (max-width: 640px) {
  .name-sheet {
    width: 100%;
    border-radius: 14px;
    padding: 12px;
  }
  .name-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
  }

  .share-sheet {
    width: 100%;
    border-radius: 16px;
    padding: 14px;
  }

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

  .share-link-row {
    grid-template-columns: 1fr;
  }

  .share-copy-btn {
    width: 100%;
    min-width: 0;
  }
}

/* --- Toast --------------------------------------- */
.toast {
  position: fixed; right: 12px; bottom: 12px; max-width: 340px;
  background: #17253a; color: #fff; border-radius: 10px;
  padding: 9px 11px; font-size: 0.88rem; z-index: 50;
}

/* --- Winner overlay ------------------------------- */
.winner-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8,16,28,.62);
  backdrop-filter: blur(3px);
}
.winner-card {
  width: min(520px, calc(100vw - 30px));
  background: #ffffff;
  border: 1px solid #cfe0ff;
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(20,35,55,.28);
  padding: 18px;
  display: grid;
  gap: 10px;
  text-align: center;
}
.winner-card h2 {
  color: #1b4fb0;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
}
.winner-card p {
  color: var(--ink);
  font-size: 0.95rem;
}
.winner-card .btn {
  justify-self: center;
  min-width: 140px;
}
.hidden { display: none; }

/* --- Desktop one-screen -------------------------- */
body.game-active { overflow: hidden; }
body.game-active .app-shell {
  height: calc(var(--app-vh) - 16px);
  grid-template-rows: auto minmax(0,1fr);
}
body.game-active .main-header { padding: 5px 12px; }
body.game-active .main-header p { display: none; }
body.game-active .board { height: 100%; grid-template-rows: 1fr auto 1fr; }
