/* Shared responsive safety layer for public, registration and admin screens. */
html { -webkit-text-size-adjust: 100%; }
html, body { max-width: 100%; overflow-x: hidden; }
img, svg, video, canvas { max-width: 100%; height: auto; }
input, select, textarea, button { max-width: 100%; }
.games-registration-closed { display: grid; gap: 8px; place-items: center; min-height: 220px; padding: 28px; border: 1px solid #e7c9d1; border-radius: 18px; background: linear-gradient(135deg, #fff8f9, #fff); color: #8f2540; text-align: center; }
.games-registration-closed b { padding: 8px 12px; border-radius: 999px; background: #ffe3e8; font-size: 13px; letter-spacing: .08em; }
.games-registration-closed span { color: #6f8097; }

@media (max-width: 980px) {
  .games-nav-inner { min-height: auto !important; padding-top: 10px !important; padding-bottom: 10px !important; }
  .games-links { width: 100%; max-width: 100%; overflow-x: auto; flex-wrap: nowrap !important; justify-content: flex-start !important; padding: 3px 0 8px; scrollbar-width: thin; }
  .games-links a { flex: 0 0 auto; }
  .games-container, .container, .wrap { width: min(100%, 100% - 28px) !important; }
  .simple-tournament-card { grid-template-columns: 200px minmax(0, 1fr); }
  .simple-card-content { padding-right: 20px; }
  .simple-open { position: static; display: inline-block; margin-top: 14px; transform: none; }
  .field-grid, .form-grid, .dashboard-grid, .overview, .workspaces, .games-split { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .quick-rules-head { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 700px) {
  body { font-size: 14px; }
  .games-nav-inner { align-items: flex-start !important; flex-direction: column !important; gap: 7px; }
  .games-brand { flex: 0 0 auto; }
  .games-brand img { width: 36px !important; height: 36px !important; }
  .games-links { gap: 6px !important; }
  .games-links a { padding: 8px 11px !important; font-size: 12px !important; }
  .games-hero-inner { min-height: auto !important; padding: 88px 0 56px !important; }
  .hero-corner-logos { top: 16px !important; }
  .games-title-lockup { white-space: nowrap; font-size: clamp(34px, 10vw, 58px) !important; letter-spacing: -0.06em !important; }
  .main-hero-info p { font-size: 14px !important; }
  .main-hero-info > div { width: 100%; flex-direction: column; }
  .main-hero-info a { width: 100%; }
  .games-clock { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .games-clock i { display: none !important; }
  .games-clock span { min-width: 0 !important; }
  .field-grid, .form-grid, .dashboard-grid, .overview, .workspaces, .games-split, .quick-rules-grid { grid-template-columns: 1fr !important; }
  .quick-rules-grid article { grid-template-columns: 38px 1fr !important; gap: 12px !important; }
  .quick-rules-grid article p { grid-column: 1 / -1 !important; }
  .simple-tournament-card { grid-template-columns: 1fr !important; }
  .simple-card-image { height: 190px; min-height: 0; }
  .simple-card-content { padding: 18px; }
  .simple-card-details { display: grid; grid-template-columns: 1fr; }
  .tournament-cover { min-height: 270px; }
  .tournament-list-section { padding: 46px 0 55px; }
  .tournament-list-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .tournament-search-wrap { align-items: stretch; flex-direction: column; gap: 8px; }
  .actions, .games-actions, .btn-row, .toolbar { align-items: stretch; flex-direction: column; }
  .actions > *, .games-actions > *, .btn-row > *, .toolbar > * { width: 100%; }
  .card, .panel, .workspace { border-radius: 14px !important; }
  table { display: block; width: 100%; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .table th, .table td { padding: 10px 8px; }
}

@media (max-width: 420px) {
  .games-container, .container, .wrap { width: min(100%, 100% - 20px) !important; }
  .games-links a { padding: 7px 9px !important; font-size: 11px !important; }
  h1 { font-size: clamp(28px, 9vw, 38px) !important; }
  .simple-card-content h3 { font-size: 20px; }
}

/* Home countdown on phones: four equal boxes in one row (the boxes are capped at 92px, so a 2-column grid left half the row empty). */
@media(max-width:800px){#gamesClock{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important}#gamesClock span{max-width:none!important}#gamesClock i{display:none!important}}
