:root{
      --psp-red:#b91c1c;
      --psp-red-2:#7f1d1d;
      --psp-gold:#f7c948;
      --psp-ink:#0f172a;
      --psp-muted:#64748b;
      --panel:#ffffff;
      --panel-soft:rgba(255,255,255,.48);
      --border:rgba(15,23,42,.10);
      --shadow:0 18px 45px rgba(15,23,42,.10);
      --shadow-sm:0 8px 22px rgba(15,23,42,.08);
      --bg-1:#f8fafc;
      --bg-2:#edf2f7;
      --good:#16a34a;
      --warn:#f59e0b;
      --bad:#dc2626;
    }

    [data-bs-theme="dark"]{
      --psp-red:#ef4444;
      --psp-red-2:#991b1b;
      --psp-ink:#e5e7eb;
      --psp-muted:#94a3b8;
      --panel:#111827;
      --panel-soft:rgba(17,24,39,.56);
      --border:rgba(255,255,255,.10);
      --shadow:0 18px 45px rgba(0,0,0,.32);
      --shadow-sm:0 8px 22px rgba(0,0,0,.24);
      --bg-1:#0b1120;
      --bg-2:#111827;
    }

    html{ scroll-behavior:smooth; }
    html, body{ min-height:100%; }
    body{
      position:relative;
      overflow-x:hidden;
      color:var(--psp-ink);
      background:
        radial-gradient(circle at top left, rgba(185,28,28,.16), transparent 32rem),
        radial-gradient(circle at top right, rgba(247,201,72,.12), transparent 28rem),
        linear-gradient(180deg, var(--bg-1), var(--bg-2));
    }
    body::before{
      content:"";
      position:fixed;
      inset:0;
      z-index:0;
      background:var(--watermark-logo) center 38% / min(58vmin, 560px) no-repeat;
      opacity:.16;
      pointer-events:none;
      transform:translateZ(0);
      will-change:auto;
      filter:contrast(1.42) saturate(1.25) drop-shadow(0 20px 44px rgba(0,0,0,.16));
    }
    body > *{ position:relative; z-index:1; }

    .navbar.bg-psp-red{
      position:sticky;
      top:0;
      z-index:1030;
      background:
        linear-gradient(100deg, rgba(127,29,29,.98), rgba(185,28,28,.98) 55%, rgba(239,68,68,.94)) !important;
      box-shadow:0 10px 26px rgba(127,29,29,.22);
      border-bottom:1px solid rgba(255,255,255,.16);
      backdrop-filter:blur(10px);
    }
    .navbar-brand img{
      width:40px;
      height:40px;
      object-fit:contain;
      filter:drop-shadow(0 8px 16px rgba(0,0,0,.20));
    }
    .navbar-brand span{
      letter-spacing:.15px;
      white-space:normal;
      max-width:300px;
      display:inline-block;
      line-height:1.1;
    }
    .navbar-top-actions{
      display:flex;
      align-items:center;
      gap:.45rem;
      margin-left:auto;
    }
    .theme-toggle-btn{
      min-width:42px;
      width:42px;
      height:42px;
      padding:0;
      border-radius:999px;
      display:inline-flex;
      align-items:center;
      justify-content:center;
      line-height:1;
      box-shadow:inset 0 0 0 1px rgba(255,255,255,.12);
    }
    .theme-toggle-btn .theme-icon{
      font-size:1.05rem;
      line-height:1;
    }
    .navbar-toggler{
      min-height:42px;
      border-radius:.9rem;
    }
    .navbar-dark .nav-link{ opacity:.92; border-radius:999px; padding:.45rem .75rem; }
    .navbar-dark .nav-link.active{
      font-weight:700;
      background:rgba(255,255,255,.16);
      box-shadow:inset 0 0 0 1px rgba(255,255,255,.16);
    }
    .navbar-dark .nav-link:hover{ opacity:1; background:rgba(255,255,255,.10); }

    main.container{ max-width:1480px; }
    .card{
      border:1px solid var(--border);
      border-radius:1.1rem;
      background:var(--panel-soft);
      box-shadow:var(--shadow-sm);
      backdrop-filter:blur(12px);
    }
    .card-hover{
      transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
      will-change:transform;
    }
    .card-hover:hover{
      transform:translateY(-2px);
      box-shadow:var(--shadow);
      border-color:rgba(185,28,28,.24);
    }

    .btn{
      border-radius:.85rem;
      font-weight:600;
    }
    .btn-primary,
    .btn-success{
      background:linear-gradient(135deg, var(--psp-red), var(--psp-red-2)) !important;
      border-color:transparent !important;
      box-shadow:0 10px 22px rgba(185,28,28,.20);
    }
    .btn-outline-primary{
      color:var(--psp-red);
      border-color:rgba(185,28,28,.45);
    }
    .btn-outline-primary:hover{
      background:var(--psp-red);
      border-color:var(--psp-red);
      color:#fff;
    }
    .btn-outline-secondary{
      border-color:var(--border);
      color:var(--psp-muted);
      background:rgba(255,255,255,.35);
    }
    [data-bs-theme="dark"] .btn-outline-secondary{ background:rgba(255,255,255,.04); }

    .badge-psp{ background:linear-gradient(135deg, #111827, #334155); }
    .team-name{ font-weight:700; }
    .team-name.dsq{ color:var(--bad); }
    .badge-dsq{ background:var(--bad) !important; }

    .table{
      --bs-table-bg:transparent;
      --bs-table-striped-bg:rgba(15,23,42,.035);
      --bs-table-hover-bg:rgba(185,28,28,.06);
      margin-bottom:0;
    }
    [data-bs-theme="dark"] .table{
      --bs-table-striped-bg:rgba(255,255,255,.035);
      --bs-table-hover-bg:rgba(239,68,68,.08);
      color:#e5e7eb;
    }
    thead.table-psp,
    .table-sticky thead th{
      background:linear-gradient(135deg, #0f172a, #1e293b);
      color:#fff;
    }
    .table-striped>tbody>tr:nth-of-type(odd)>*,
    .table-striped>tbody>tr:nth-of-type(even)>*{
      background:transparent;
    }

    .live-dot{
      width:12px;
      height:12px;
      border-radius:50%;
      background:var(--good);
      box-shadow:0 0 0 rgba(22,163,74,.60);
    }
    .pulse{ animation:pulse 1.4s ease-out; }
    @keyframes pulse{
      0%{ box-shadow:0 0 0 0 rgba(22,163,74,.55); }
      70%{ box-shadow:0 0 0 14px rgba(22,163,74,0); }
      100%{ box-shadow:0 0 0 0 rgba(22,163,74,0); }
    }

    .live-hero{
      position:relative;
      overflow:hidden;
      border:1px solid var(--border);
      border-radius:1.35rem;
      background:
        linear-gradient(135deg, rgba(255,255,255,.54), rgba(255,255,255,.30)),
        radial-gradient(circle at right top, rgba(247,201,72,.22), transparent 28rem);
      box-shadow:var(--shadow);
      backdrop-filter:blur(14px);
    }
    [data-bs-theme="dark"] .live-hero{
      background:
        linear-gradient(135deg, rgba(17,24,39,.62), rgba(17,24,39,.40)),
        radial-gradient(circle at right top, rgba(239,68,68,.16), transparent 28rem);
    }
    .live-hero::after{
      content:"";
      position:absolute;
      width:18rem;
      height:18rem;
      right:-6rem;
      top:-8rem;
      background:radial-gradient(circle, rgba(185,28,28,.16), transparent 65%);
      pointer-events:none;
    }
    .hero-kpi{
      min-width:9rem;
      padding:.75rem .95rem;
      border-radius:1rem;
      border:1px solid var(--border);
      background:rgba(255,255,255,.52);
    }
    [data-bs-theme="dark"] .hero-kpi{ background:rgba(255,255,255,.055); }
    .hero-kpi .label{
      color:var(--psp-muted);
      font-size:.74rem;
      text-transform:uppercase;
      letter-spacing:.07em;
    }
    .hero-kpi .value{
      font-size:1.15rem;
      font-weight:800;
      line-height:1.1;
    }

    .live-card .card-body{ padding:1rem; }
    .live-card .table-wrap{
      max-height:calc(100vh - 320px);
      min-height:320px;
      overflow:auto;
      scrollbar-gutter:stable both-edges;
      border:1px solid var(--border);
      border-radius:.95rem;
      background:rgba(255,255,255,.18);
    }
    [data-bs-theme="dark"] .live-card .table-wrap{ background:rgba(255,255,255,.014); }
    @media (min-width:1200px){
      .live-card .table-wrap{ max-height:calc(100vh - 300px); }
    }
    .table-sticky thead th{
      position:sticky;
      top:0;
      z-index:2;
      border-bottom:0;
    }
    .live-table{
      font-size:clamp(.84rem, .92vw, .98rem);
    }
    .live-table td,
    .live-table th{
      white-space:nowrap;
      vertical-align:middle;
    }
    .live-team{
      max-width:30ch;
      overflow:hidden;
      text-overflow:ellipsis;
    }
    .rank-pill{
      display:inline-flex;
      align-items:center;
      justify-content:center;
      min-width:2.05rem;
      height:1.72rem;
      padding:0 .35rem;
      border-radius:999px;
      font-weight:800;
      background:rgba(15,23,42,.07);
    }
    .rank-1 .rank-pill{ background:rgba(247,201,72,.34); }
    .rank-2 .rank-pill{ background:rgba(148,163,184,.25); }
    .rank-3 .rank-pill{ background:rgba(180,83,9,.20); }
    .rank-1 td:first-child::after,
    .rank-2 td:first-child::after,
    .rank-3 td:first-child::after{
      display:inline-block;
      margin-left:.3rem;
      font-size:.9rem;
    }
    .rank-1 td:first-child::after{ content:"🏆"; }
    .rank-2 td:first-child::after{ content:"🥈"; }
    .rank-3 td:first-child::after{ content:"🥉"; }

    .toolbar-soft{
      padding:.45rem;
      border:1px solid var(--border);
      border-radius:1rem;
      background:rgba(255,255,255,.20);
    }
    [data-bs-theme="dark"] .toolbar-soft{ background:rgba(255,255,255,.018); }

    footer{
      background:linear-gradient(90deg, #0f172a, #111827);
      border-top:1px solid rgba(255,255,255,.08);
    }
    footer a{
      color:var(--psp-gold);
      text-decoration:none;
    }
    footer a:hover{ text-decoration:underline; }

    /* Tryb TV / projektor: aktywny po wybraniu zakładki "Wszystkie" */
    @media (min-width: 992px){
      body.live-view-all main.container{
        max-width:100vw;
        width:100vw;
        padding-left:.55rem;
        padding-right:.55rem;
        margin-top:.55rem !important;
      }
      body.live-view-all .live-hero{
        padding:.55rem .85rem !important;
        border-radius:.95rem;
      }
      body.live-view-all .display-6{
        font-size:clamp(1.2rem, 1.25vw, 1.85rem);
        margin-top:.25rem !important;
      }
      body.live-view-all .live-hero p{
        display:none;
      }
      body.live-view-all .toolbar-soft{
        padding:.25rem;
      }
      body.live-view-all .toolbar-soft .btn{
        padding:.28rem .5rem;
        font-size:.78rem;
      }
      body.live-view-all #live-updated{
        font-size:.82rem;
      }
      body.live-view-all .row.g-3{
        --bs-gutter-x:.45rem;
        --bs-gutter-y:.45rem;
        margin-top:.35rem !important;
      }
      body.live-view-all #card-overall,
      body.live-view-all #card-sztafeta,
      body.live-view-all #card-bojowe{
        flex:0 0 33.333333%;
        max-width:33.333333%;
      }
      body.live-view-all .card{
        border-radius:.8rem;
      }
      body.live-view-all .live-card .card-body{
        padding:.42rem;
      }
      body.live-view-all .live-card h2{
        font-size:clamp(.82rem, .78vw, 1.08rem);
      }
      body.live-view-all .live-card .badge{
        font-size:.62rem;
      }
      body.live-view-all .live-table{
        width:100%;
        table-layout:fixed;
        font-size:clamp(.56rem, .58vw, .78rem);
        line-height:1.02;
      }
      body.live-view-all .live-table td,
      body.live-view-all .live-table th{
        padding:.12rem .18rem;
        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
      }
      body.live-view-all .live-table th[style],
      body.live-view-all .live-table td[style]{
        width:auto !important;
      }
      body.live-view-all .live-team{
        max-width:none;
      }
      body.live-view-all .rank-pill{
        min-width:1.35rem;
        height:1.2rem;
        padding:0 .18rem;
        font-size:.64rem;
      }
      body.live-view-all .rank-1 td:first-child::after,
      body.live-view-all .rank-2 td:first-child::after,
      body.live-view-all .rank-3 td:first-child::after{
        display:none;
      }
      body.live-view-all .live-card .table-wrap{
        min-height:0;
        max-height:none;
        overflow:visible;
        border-radius:.65rem;
        scrollbar-gutter:auto;
      }
      body.live-view-all .table-sticky thead th{
        position:static;
      }
    }

    @media (max-width:991.98px){
      .navbar-brand span{ max-width:220px; }
      .live-card .table-wrap{ max-height:none; min-height:0; }
      .hero-kpi{ min-width:calc(50% - .35rem); }
    }
    @media (max-width:767.98px){
      .navbar-brand span{ max-width:170px; }
      .table th,
      .table td{ font-size:.88rem; }
      main.container{ margin-top:1rem !important; }
      .hero-kpi{ min-width:100%; }
      .toolbar-soft{ width:100%; overflow:auto; }
      .btn-group{ white-space:nowrap; }
    }


    /* ------------------------------------------------------------
       Mobile-first polish: telefony, tablety, obsługa dotykiem
       ------------------------------------------------------------ */
    :root{
      --mobile-bottom-nav-h:72px;
    }

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

    .form-control,
    .form-select,
    textarea{
      font-size:16px; /* iOS/Android: bez automatycznego zoomowania pól */
    }

    .btn,
    .form-control,
    .form-select,
    .dropdown-item{
      min-height:44px;
    }

    .btn-sm{
      min-height:38px;
      display:inline-flex;
      align-items:center;
      justify-content:center;
      gap:.35rem;
    }

    .mobile-bottom-nav{
      position:fixed;
      left:0;
      right:0;
      bottom:0;
      z-index:1040;
      height:var(--mobile-bottom-nav-h);
      padding:.45rem max(.55rem, env(safe-area-inset-left)) calc(.45rem + env(safe-area-inset-bottom)) max(.55rem, env(safe-area-inset-right));
      background:rgba(15,23,42,.94);
      border-top:1px solid rgba(255,255,255,.12);
      box-shadow:0 -14px 32px rgba(0,0,0,.25);
      backdrop-filter:blur(14px);
    }

    .mobile-bottom-nav .mobile-nav-inner{
      display:grid;
      grid-template-columns:repeat(4, minmax(0,1fr));
      gap:.35rem;
      height:100%;
      max-width:760px;
      margin:0 auto;
    }

    .mobile-bottom-nav a,
    .mobile-bottom-nav button{
      display:flex;
      flex-direction:column;
      align-items:center;
      justify-content:center;
      min-width:0;
      border:0;
      border-radius:.95rem;
      background:transparent;
      color:rgba(255,255,255,.78);
      text-decoration:none;
      font-family:inherit;
      font-size:.72rem;
      line-height:1.05;
      gap:.18rem;
      touch-action:manipulation;
    }

    .mobile-bottom-nav a .ico,
    .mobile-bottom-nav button .ico{
      font-size:1.08rem;
      line-height:1;
    }

    .mobile-bottom-nav a.active,
    .mobile-bottom-nav button:active{
      color:#fff;
      background:linear-gradient(135deg, rgba(185,28,28,.88), rgba(127,29,29,.88));
      box-shadow:0 8px 18px rgba(185,28,28,.22);
    }

    .mobile-section-title{
      display:none;
    }

    @media (hover:none){
      .card-hover:hover{
        transform:none;
      }
    }

    @media (max-width:991.98px){
      .navbar .container{
        align-items:center;
        gap:.45rem;
      }

      .navbar-brand{
        min-width:0;
        flex:1 1 auto;
        margin-right:0;
      }

      .navbar-brand span{
        overflow:hidden;
        text-overflow:ellipsis;
      }

      .navbar-collapse{
        flex-basis:100%;
      }

      .navbar-collapse{
        margin-top:.65rem;
        padding:.65rem;
        border-radius:1rem;
        background:rgba(15,23,42,.18);
        box-shadow:inset 0 0 0 1px rgba(255,255,255,.12);
      }

      .navbar-nav .nav-link{
        min-height:44px;
        display:flex;
        align-items:center;
        padding:.65rem .8rem;
      }

      .dropdown-menu{
        border-radius:1rem;
        overflow:hidden;
      }
    }

    @media (max-width:767.98px){
      body{
        padding-bottom:calc(var(--mobile-bottom-nav-h) + env(safe-area-inset-bottom));
      }

      body::before{
        display:block;
        background-position:center 42%;
        background-size:min(76vmin, 360px);
        opacity:.11;
      }

      main.container,
      .container{
        padding-left:.75rem;
        padding-right:.75rem;
      }

      main.container{
        margin-top:.85rem !important;
        margin-bottom:1.2rem !important;
      }

      .navbar{
        position:sticky;
        top:0;
      }

      .navbar-brand img{
        width:34px;
        height:34px;
      }

      .navbar-brand span{
        max-width:calc(100vw - 168px);
        font-size:.88rem;
        line-height:1.08;
      }

      .card,
      .live-hero{
        border-radius:1rem;
        backdrop-filter:none; /* płynniej na starszych telefonach */
      }

      .card-body{
        padding:.95rem;
      }

      .display-6{
        font-size:1.55rem;
        line-height:1.12;
      }

      .h3, h1.h3{
        font-size:1.28rem;
      }

      .h4, h1.h4{
        font-size:1.13rem;
      }

      .live-hero{
        padding:1rem !important;
      }

      .live-hero p{
        font-size:.92rem;
      }

      .hero-kpi{
        min-width:0;
        width:100%;
        padding:.72rem .82rem;
      }

      .hero-kpi .value{
        font-size:1.06rem;
      }

      .toolbar-soft{
        padding:.35rem;
        overflow-x:auto;
        -webkit-overflow-scrolling:touch;
        scrollbar-width:none;
      }

      .toolbar-soft::-webkit-scrollbar{
        display:none;
      }

      .toolbar-soft .btn-group{
        display:grid;
        grid-template-columns:repeat(4, max-content);
        gap:.35rem;
        width:max-content;
      }

      .toolbar-soft .btn{
        border-radius:.8rem !important;
        padding:.52rem .72rem;
      }

      .row.g-3{
        --bs-gutter-y:.85rem;
      }

      .d-flex.gap-2,
      .d-flex.gap-3{
        gap:.5rem !important;
      }

      .btn,
      .btn-sm{
        width:auto;
      }

      form .btn,
      .d-grid .btn{
        width:100%;
      }

      .list-group-item{
        border-radius:.9rem !important;
        margin-bottom:.55rem;
        border:1px solid var(--border);
      }

      footer{
        display:none;
      }
    }

    /* Tabele jako czytelne karty na telefonie */
    @media (max-width:575.98px){
      .mobile-section-title{
        display:block;
        margin:.35rem 0 .55rem;
        color:var(--psp-muted);
        font-size:.78rem;
        text-transform:uppercase;
        letter-spacing:.08em;
      }

      .table-responsive,
      .live-card .table-wrap{
        overflow:visible !important;
        max-height:none !important;
        min-height:0 !important;
        border:0 !important;
        background:transparent !important;
      }

      .table-responsive table,
      .live-card .table-wrap table,
      .table-responsive thead,
      .live-card .table-wrap thead,
      .table-responsive tbody,
      .live-card .table-wrap tbody,
      .table-responsive th,
      .live-card .table-wrap th,
      .table-responsive td,
      .live-card .table-wrap td,
      .table-responsive tr,
      .live-card .table-wrap tr{
        display:block;
        width:100%;
      }

      .table-responsive thead,
      .live-card .table-wrap thead{
        display:none;
      }

      .table-responsive tbody tr,
      .live-card .table-wrap tbody tr{
        margin-bottom:.75rem;
        padding:.72rem;
        border:1px solid var(--border);
        border-radius:1rem;
        background:var(--panel-soft);
        box-shadow:var(--shadow-sm);
      }

      .table-responsive tbody tr:last-child,
      .live-card .table-wrap tbody tr:last-child{
        margin-bottom:0;
      }

      .table-responsive td,
      .live-card .table-wrap td{
        display:flex;
        align-items:flex-start;
        justify-content:space-between;
        gap:1rem;
        min-height:34px;
        padding:.38rem 0 !important;
        border:0 !important;
        white-space:normal !important;
        text-align:right !important;
        font-size:.92rem !important;
      }

      .table-responsive td::before,
      .live-card .table-wrap td::before{
        content:attr(data-label);
        flex:0 0 42%;
        max-width:42%;
        color:var(--psp-muted);
        font-weight:700;
        text-align:left;
        white-space:normal;
      }

      .table-responsive td[data-label=""]::before,
      .live-card .table-wrap td[data-label=""]::before{
        display:none;
      }

      .table-responsive td .btn,
      .live-card .table-wrap td .btn{
        width:100%;
        margin-top:.25rem;
      }

      .live-card .table-wrap td:first-child{
        justify-content:flex-start;
      }

      .live-card .table-wrap td:first-child::before{
        display:none;
      }

      .live-team{
        max-width:none;
        text-overflow:clip;
        overflow:visible;
      }

      .rank-pill{
        min-width:2.25rem;
        height:2rem;
      }
    }


    @media (min-width:768px){
      .mobile-danger-action{
        margin-left:auto;
      }
    }

    @media (max-width:767.98px){
      .mobile-danger-action{
        width:100%;
      }

      .alert{
        border-radius:.95rem;
      }

      .alert.d-flex{
        align-items:flex-start !important;
        flex-direction:column;
      }

      .alert .d-flex{
        width:100%;
      }

      .alert .btn{
        flex:1;
      }
    }


/* Desktop/TV: pojedyncze zakładki mają używać pełnej szerokości i nie mieć wewnętrznego przewijania. */
@media (min-width: 992px){
  body.live-view-single main.container{
    max-width:100vw;
    width:100vw;
    padding-left:1.1rem;
    padding-right:1.1rem;
    margin-top:.8rem !important;
  }
  body.live-view-single #card-overall,
  body.live-view-single #card-sztafeta,
  body.live-view-single #card-bojowe{
    flex:0 0 100%;
    max-width:100%;
  }
  body.live-view-single .live-card .table-wrap{
    max-height:none !important;
    min-height:0 !important;
    overflow:visible !important;
    scrollbar-gutter:auto;
  }
  body.live-view-single .table-sticky thead th{
    position:static;
  }
  body.live-view-single .live-table{
    width:100%;
    table-layout:fixed;
    font-size:clamp(.94rem, 1.05vw, 1.22rem);
    line-height:1.16;
  }
  body.live-view-single .live-table th,
  body.live-view-single .live-table td{
    padding:.34rem .55rem;
    white-space:normal;
  }
  body.live-view-single .live-team{
    max-width:none;
    overflow:visible;
    text-overflow:clip;
  }
  body.live-view-single .rank-pill{
    min-width:2.35rem;
    height:2rem;
  }
}

@media (min-width: 1600px){
  body.live-view-single .live-table{
    font-size:clamp(1.05rem, 1.08vw, 1.35rem);
  }
  body.live-view-single .live-table th,
  body.live-view-single .live-table td{
    padding:.42rem .65rem;
  }
}


/* Mobilna wyszukiwarka drużyny nad dolnym menu w widoku wyników live */
.mobile-live-search{
  position:fixed;
  left:.75rem;
  right:.75rem;
  bottom:calc(var(--mobile-bottom-nav-h) + .45rem + env(safe-area-inset-bottom));
  z-index:1039;
  padding:.45rem;
  border:1px solid rgba(255,255,255,.14);
  border-radius:1rem;
  background:rgba(15,23,42,.88);
  backdrop-filter:blur(14px);
  box-shadow:0 -10px 26px rgba(0,0,0,.20);
}
.mobile-live-search input{
  border-radius:.85rem;
  min-height:42px;
}
@media (max-width:767.98px){
  body:has(.mobile-live-search){
    padding-bottom:calc(var(--mobile-bottom-nav-h) + 70px + env(safe-area-inset-bottom));
  }
}


/* Aktualizacja: data wydarzenia, pasek sędziego i szybka nawigacja admina */
.brand-title{
  display:flex;
  flex-direction:column;
  gap:.08rem;
  line-height:1.08;
}
.brand-event-date{
  display:block;
  font-size:.72rem;
  font-weight:600;
  color:rgba(255,255,255,.82);
}
.judge-info-bar{
  background:rgba(15,23,42,.88);
  color:#fff;
  border-bottom:1px solid rgba(255,255,255,.10);
  padding:.45rem 0;
  font-size:.92rem;
  box-shadow:0 8px 20px rgba(15,23,42,.14);
}
.judge-info-main{
  display:flex;
  flex-direction:column;
  gap:.08rem;
}
.judge-place-link{
  color:rgba(255,255,255,.88);
  text-decoration:none;
  font-size:.88rem;
}
.judge-place-link:hover{
  color:#fff;
  text-decoration:underline;
}
.judge-place-link--disabled{
  cursor:default;
}
.admin-nav-strip{
  background:linear-gradient(135deg, rgba(30,41,59,.96), rgba(15,23,42,.96));
  border-bottom:1px solid rgba(255,255,255,.10);
}
.admin-nav-strip .btn{
  border-color:rgba(255,255,255,.28);
  color:#fff;
}
.admin-nav-strip .btn:hover{
  background:rgba(255,255,255,.14);
  color:#fff;
}
@media (max-width:767.98px){
  .brand-event-date{ font-size:.66rem; }
  .judge-info-bar{ font-size:.84rem; }
}


/* Aktualizacja mobilna: przełącznik Lista/Szczegóły, lżejsze menu i czytelniejszy nagłówek */
.mobile-live-mode-switch{
  display:flex;
  gap:.35rem;
  padding:.25rem;
  border:1px solid var(--border);
  border-radius:999px;
  background:rgba(255,255,255,.36);
}
[data-bs-theme="dark"] .mobile-live-mode-switch{ background:rgba(15,23,42,.36); }
.mobile-live-mode-switch .btn{
  min-height:36px;
  border-radius:999px !important;
  padding:.38rem .72rem;
}
.mobile-team-list{ display:none; }
.mobile-team-item{
  display:grid;
  grid-template-columns:2.2rem minmax(0,1fr) auto;
  align-items:center;
  gap:.65rem;
  padding:.78rem .85rem;
  margin-bottom:.55rem;
  border:1px solid var(--border);
  border-radius:1rem;
  background:var(--panel-soft);
  box-shadow:var(--shadow-sm);
}
.mobile-team-no{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:2rem;
  height:2rem;
  border-radius:999px;
  color:#fff;
  background:linear-gradient(135deg, var(--psp-red), var(--psp-red-2));
  font-weight:800;
  font-size:.82rem;
}
.mobile-team-name{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-weight:800;
}
.mobile-team-meta{
  color:var(--psp-muted);
  font-size:.78rem;
  white-space:nowrap;
}
@media (max-width:991.98px){
  .navbar.bg-psp-red{
    background:linear-gradient(100deg, rgba(127,29,29,.86), rgba(185,28,28,.78) 58%, rgba(239,68,68,.72)) !important;
  }
  .navbar .container{
    flex-wrap:nowrap;
  }
  .navbar-brand{
    max-width:calc(100vw - 118px);
    padding-top:.25rem;
    padding-bottom:.25rem;
  }
  .navbar-brand img{
    width:30px;
    height:30px;
  }
  .brand-title{
    min-width:0;
  }
  .brand-title > span:first-child{
    display:block;
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:.82rem;
  }
  .brand-event-date{
    display:none;
  }
  .navbar-top-actions .theme-toggle-btn{
    display:none;
  }
  .navbar-toggler{
    min-height:36px;
    padding:.2rem .55rem;
    background:rgba(255,255,255,.10);
  }
  .navbar-collapse{
    position:absolute;
    left:.75rem;
    right:.75rem;
    top:calc(100% + .35rem);
    margin-top:0 !important;
    padding:.55rem !important;
    border-radius:1rem;
    background:rgba(15,23,42,.42) !important;
    backdrop-filter:blur(16px);
    box-shadow:0 18px 38px rgba(15,23,42,.22), inset 0 0 0 1px rgba(255,255,255,.14) !important;
  }
  .navbar-nav .nav-link{
    min-height:38px;
    padding:.5rem .7rem;
  }
}
@media (max-width:991.98px){
  body.mobile-live-list-mode #live-details-grid,
  body.mobile-live-list-mode .toolbar-soft{
    display:none !important;
  }
  body.mobile-live-list-mode .mobile-team-list{
    display:block;
  }
  body.mobile-live-details-mode .mobile-team-list{
    display:none !important;
  }
}

/* ------------------------------------------------------------
   v4: czytelniejsze mobile menu, pasek sędziego, lista/szczegóły i admin
   ------------------------------------------------------------ */
.judge-info-bar{
  padding:.52rem 0;
  background:linear-gradient(135deg, rgba(15,23,42,.94), rgba(30,41,59,.90));
}
.judge-info-bar .container{
  align-items:flex-start !important;
}
.judge-info-main{
  display:grid;
  gap:.18rem;
  line-height:1.22;
}
.judge-info-main > span,
.judge-place-link{
  display:block;
}
.judge-place-link{
  padding-top:.05rem;
}

.admin-settings-card .card-body{
  padding:1.25rem;
}
.admin-settings-form{
  width:100%;
}
.admin-settings-grid{
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);
  gap:1rem;
  align-items:start;
}
.settings-section{
  min-width:0;
  height:100%;
  padding:1rem;
  border:1px solid var(--border);
  border-radius:1rem;
  background:rgba(255,255,255,.42);
}
[data-bs-theme="dark"] .settings-section{
  background:rgba(15,23,42,.34);
}
.settings-section-title{
  margin:0 0 .85rem;
  font-size:.82rem;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--psp-muted);
}
.settings-section-live{
  grid-column:1 / -1;
}
.live-finish-box{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:1rem;
  padding:.85rem 1rem;
  border-radius:1rem;
  background:rgba(15,23,42,.055);
}
[data-bs-theme="dark"] .live-finish-box{
  background:rgba(255,255,255,.055);
}
.admin-settings-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:1rem;
}

.mobile-team-list{
  display:none;
}
.mobile-team-item{
  display:block;
  margin-bottom:.7rem;
  border:1px solid var(--border);
  border-radius:1.05rem;
  overflow:hidden;
  background:rgba(255,255,255,.58);
  box-shadow:var(--shadow-sm);
}
[data-bs-theme="dark"] .mobile-team-item{
  background:rgba(15,23,42,.62);
}
.mobile-team-summary{
  width:100%;
  border:0;
  background:transparent;
  color:inherit;
  display:grid;
  grid-template-columns:2.65rem minmax(0,1fr) 1.6rem;
  gap:.7rem;
  align-items:center;
  min-height:64px;
  padding:.72rem .82rem;
  text-align:left;
  font-family:inherit;
}
.mobile-team-no{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:2.45rem;
  height:2.45rem;
  border-radius:999px;
  color:#fff;
  background:linear-gradient(135deg, var(--psp-red), var(--psp-red-2));
  font-weight:900;
  font-size:.82rem;
  box-shadow:0 8px 18px rgba(185,28,28,.22);
}
.mobile-team-title-wrap{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:.12rem;
}
.mobile-team-name{
  display:block;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-weight:850;
  line-height:1.15;
}
.mobile-team-meta{
  display:block;
  color:var(--psp-muted);
  font-size:.78rem;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.mobile-team-chevron{
  justify-self:end;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:1.55rem;
  height:1.55rem;
  border-radius:999px;
  background:rgba(15,23,42,.08);
  color:var(--psp-muted);
  transition:transform .16s ease, background .16s ease;
}
[data-bs-theme="dark"] .mobile-team-chevron{
  background:rgba(255,255,255,.09);
}
.mobile-team-details{
  display:none;
  padding:0 .82rem .86rem 4.18rem;
}
.mobile-team-item.is-open .mobile-team-details{
  display:block;
}
.mobile-team-item.is-open .mobile-team-chevron{
  transform:rotate(180deg);
  background:rgba(185,28,28,.16);
  color:var(--psp-red);
}
.mobile-team-details-grid{
  display:grid;
  gap:.55rem;
}
.mobile-team-detail-card{
  border:1px solid var(--border);
  border-radius:.85rem;
  padding:.66rem .72rem;
  background:rgba(255,255,255,.50);
}
[data-bs-theme="dark"] .mobile-team-detail-card{
  background:rgba(255,255,255,.045);
}
.mobile-team-detail-title{
  display:block;
  margin-bottom:.42rem;
  font-size:.72rem;
  font-weight:850;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--psp-muted);
}
.mobile-team-detail-line{
  display:flex;
  justify-content:space-between;
  gap:.75rem;
  padding:.18rem 0;
  font-size:.87rem;
}
.mobile-team-detail-line span{
  color:var(--psp-muted);
}
.mobile-team-detail-line strong{
  text-align:right;
}
.mobile-live-mode-switch{
  width:100%;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:.35rem;
  padding:.25rem;
  border:1px solid var(--border);
  border-radius:1rem;
  background:rgba(255,255,255,.58);
}
.mobile-live-mode-switch .btn{
  width:100%;
  min-height:38px;
  border-radius:.8rem !important;
}
.live-updated-label{
  align-self:flex-end;
}

@media (max-width:991.98px){
  .admin-settings-grid{
    grid-template-columns:1fr;
  }
  .live-finish-box{
    align-items:flex-start;
    flex-direction:column;
  }
  .admin-settings-actions .btn{
    width:100%;
  }

  .navbar.bg-psp-red{
    min-height:54px;
    padding:.35rem 0;
    background:linear-gradient(100deg, rgba(127,29,29,.82), rgba(185,28,28,.68) 58%, rgba(239,68,68,.58)) !important;
    backdrop-filter:blur(18px);
  }
  .navbar.bg-psp-red .container{
    position:relative;
    flex-wrap:nowrap;
    align-items:center;
    gap:.35rem;
  }
  .navbar-brand{
    min-width:0;
    max-width:calc(100vw - 86px);
    padding:.18rem 0;
    margin-right:0;
    flex:1 1 auto;
  }
  .navbar-brand img{
    width:28px !important;
    height:28px !important;
    margin-right:.45rem !important;
  }
  .brand-title{
    min-width:0;
    max-width:100%;
  }
  .brand-title > span:first-child{
    display:block;
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:.82rem;
    line-height:1.05;
  }
  .brand-event-date{
    display:none !important;
  }
  .navbar-top-actions{
    flex:0 0 auto;
    margin-left:.25rem;
    gap:.25rem;
  }
  .navbar-top-actions .theme-toggle-btn{
    display:none !important;
  }
  .navbar-toggler{
    min-width:42px;
    min-height:36px;
    padding:.18rem .48rem;
    border-radius:.8rem;
    border-color:rgba(255,255,255,.25);
    background:rgba(15,23,42,.18);
  }
  .navbar-collapse{
    position:absolute;
    left:.75rem;
    right:.75rem;
    top:calc(100% + .45rem);
    z-index:1060;
    margin-top:0 !important;
    padding:.55rem !important;
    border:1px solid rgba(255,255,255,.16);
    border-radius:1.05rem;
    background:rgba(15,23,42,.56) !important;
    backdrop-filter:blur(20px);
    box-shadow:0 18px 42px rgba(0,0,0,.26);
  }
  .navbar-nav{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:.38rem;
  }
  .navbar-nav .nav-item.dropdown{
    grid-column:1 / -1;
  }
  .navbar-dark .nav-link,
  .navbar-nav .nav-link{
    min-height:38px;
    padding:.48rem .62rem;
    border-radius:.82rem;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    background:rgba(255,255,255,.07);
    font-size:.86rem;
  }
  .dropdown-menu-dark{
    background:rgba(15,23,42,.92);
    border-color:rgba(255,255,255,.12);
  }
  .judge-info-bar{
    font-size:.82rem;
    padding:.42rem 0;
  }
  .judge-info-bar .container{
    display:grid !important;
    grid-template-columns:1fr auto;
    gap:.5rem;
  }
  .judge-info-main{
    min-width:0;
  }
  .judge-place-link{
    font-size:.8rem;
  }
  .live-toolbar-row{
    align-items:stretch !important;
  }
}

@media (max-width:767.98px){
  :root{ --mobile-bottom-nav-h:62px; }
  main.container{
    margin-top:.7rem !important;
  }
  .display-6{
    font-size:1.35rem;
  }
  .live-hero{
    padding:.85rem !important;
  }
  .live-hero p{
    font-size:.84rem;
  }
  .toolbar-soft{
    display:none;
  }
  .live-updated-label{
    align-self:center;
    font-size:.76rem;
  }
  .mobile-live-search{
    left:.55rem;
    right:.55rem;
    bottom:calc(var(--mobile-bottom-nav-h) + .38rem + env(safe-area-inset-bottom));
    padding:.32rem;
    border-radius:.95rem;
    background:rgba(15,23,42,.72);
    backdrop-filter:blur(18px);
  }
  .mobile-live-search input{
    min-height:38px;
    font-size:.92rem;
    border-radius:.78rem;
  }
  body:has(.mobile-live-search){
    padding-bottom:calc(var(--mobile-bottom-nav-h) + 62px + env(safe-area-inset-bottom));
  }
  .mobile-bottom-nav{
    height:var(--mobile-bottom-nav-h);
    padding:.34rem .48rem calc(.34rem + env(safe-area-inset-bottom));
    background:rgba(15,23,42,.76);
    backdrop-filter:blur(20px);
    border-top:1px solid rgba(255,255,255,.14);
    box-shadow:0 -10px 24px rgba(0,0,0,.20);
  }
  .mobile-bottom-nav .mobile-nav-inner{
    gap:.25rem;
  }
  .mobile-bottom-nav a,
  .mobile-bottom-nav button{
    min-height:0;
    border-radius:.78rem;
    font-size:.66rem;
    color:rgba(255,255,255,.82);
    background:rgba(255,255,255,.035);
  }
  .mobile-bottom-nav a .ico,
  .mobile-bottom-nav button .ico{
    font-size:.98rem;
  }
  .mobile-bottom-nav a.active,
  .mobile-bottom-nav button:active{
    background:rgba(185,28,28,.78);
    box-shadow:none;
  }
  .mobile-team-details{
    padding:0 .72rem .78rem .72rem;
  }
  .mobile-team-summary{
    grid-template-columns:2.4rem minmax(0,1fr) 1.45rem;
    min-height:60px;
    padding:.68rem .72rem;
  }
  .mobile-team-no{
    width:2.25rem;
    height:2.25rem;
    font-size:.78rem;
  }
  .mobile-team-name{
    font-size:.92rem;
  }
  .mobile-team-meta{
    font-size:.75rem;
  }
  body.mobile-live-list-mode #live-details-grid,
  body.mobile-live-list-mode .toolbar-soft{
    display:none !important;
  }
  body.mobile-live-list-mode .mobile-team-list{
    display:block !important;
  }
  body.mobile-live-details-mode .mobile-team-list{
    display:none !important;
  }
  .admin-settings-card .card-body{
    padding:1rem;
  }
  .settings-section{
    padding:.85rem;
    border-radius:.95rem;
  }
}

/* ------------------------------------------------------------
   v5: mobile menu czytelne, zakładki konkurencji + czerwono-żółty wygląd
   ------------------------------------------------------------ */
.live-stage-switch .btn-group{
  box-shadow:0 8px 22px rgba(127,29,29,.10);
}
.live-stage-switch .btn{
  border-color:rgba(185,28,28,.30);
}
.live-stage-switch .btn-primary{
  color:#fff !important;
  background:linear-gradient(135deg, var(--psp-red), var(--psp-red-2)) !important;
  box-shadow:inset 0 -2px 0 rgba(247,201,72,.55);
}
.mobile-live-mode-switch .btn-primary{
  color:#fff !important;
  background:linear-gradient(135deg, var(--psp-red), var(--psp-red-2)) !important;
  box-shadow:inset 0 -2px 0 rgba(247,201,72,.55);
}
.judge-place-link{
  text-decoration:underline !important;
  text-decoration-thickness:2px;
  text-underline-offset:3px;
  text-decoration-color:var(--psp-gold) !important;
  font-weight:800;
}

@media (max-width:991.98px){
  .navbar.bg-psp-red{
    min-height:auto !important;
    padding:.42rem 0 !important;
    background:linear-gradient(100deg, #7f1d1d 0%, #b91c1c 58%, #d97706 100%) !important;
    border-bottom:2px solid rgba(247,201,72,.70) !important;
    backdrop-filter:none !important;
  }
  .navbar.bg-psp-red .container{
    align-items:center !important;
    flex-wrap:nowrap !important;
    gap:.5rem !important;
  }
  .navbar-brand{
    flex:1 1 auto !important;
    min-width:0 !important;
    max-width:none !important;
    margin-right:0 !important;
    padding:.08rem 0 !important;
    align-items:center !important;
  }
  .navbar-brand img{
    width:26px !important;
    height:26px !important;
    flex:0 0 auto !important;
  }
  .brand-title,
  .navbar-brand .brand-title{
    display:block !important;
    min-width:0 !important;
    max-width:none !important;
    line-height:1.08 !important;
    letter-spacing:.05px !important;
  }
  .brand-title > span:first-child{
    display:block !important;
    max-width:none !important;
    overflow:visible !important;
    text-overflow:clip !important;
    white-space:normal !important;
    overflow-wrap:anywhere !important;
    font-size:.86rem !important;
    font-weight:900 !important;
    line-height:1.08 !important;
  }
  .brand-event-date{
    display:block !important;
    margin-top:.12rem !important;
    color:#fff3bf !important;
    font-size:.70rem !important;
    font-weight:800 !important;
    line-height:1.05 !important;
    letter-spacing:.02em !important;
    text-transform:uppercase !important;
  }
  .navbar-top-actions{
    flex:0 0 auto !important;
    margin-left:.15rem !important;
  }
  .navbar-toggler{
    min-width:42px !important;
    min-height:38px !important;
    border:1px solid rgba(247,201,72,.65) !important;
    background:rgba(15,23,42,.20) !important;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.12) !important;
  }
  .navbar-collapse{
    position:absolute !important;
    left:.65rem !important;
    right:.65rem !important;
    top:calc(100% + .45rem) !important;
    z-index:1060 !important;
    padding:.65rem !important;
    border:2px solid rgba(247,201,72,.65) !important;
    border-radius:1rem !important;
    background:linear-gradient(160deg, #7f1d1d 0%, #991b1b 52%, #5f1212 100%) !important;
    backdrop-filter:none !important;
    box-shadow:0 22px 48px rgba(0,0,0,.38) !important;
  }
  .navbar-nav{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:.45rem !important;
  }
  .navbar-nav .nav-item.dropdown{
    grid-column:1 / -1 !important;
  }
  .navbar-dark .nav-link,
  .navbar-nav .nav-link{
    min-height:42px !important;
    padding:.56rem .68rem !important;
    border:1px solid rgba(247,201,72,.34) !important;
    border-radius:.85rem !important;
    background:rgba(247,201,72,.10) !important;
    color:#fff !important;
    opacity:1 !important;
    font-weight:800 !important;
    text-shadow:0 1px 2px rgba(0,0,0,.22) !important;
  }
  .navbar-dark .nav-link.active,
  .navbar-nav .nav-link.active{
    background:linear-gradient(135deg, #f7c948, #f59e0b) !important;
    color:#451a03 !important;
    box-shadow:0 8px 18px rgba(0,0,0,.20) !important;
    text-shadow:none !important;
  }
  .dropdown-menu-dark{
    background:#7f1d1d !important;
    border:1px solid rgba(247,201,72,.55) !important;
    box-shadow:0 18px 34px rgba(0,0,0,.28) !important;
  }
  .dropdown-menu-dark .dropdown-item,
  .dropdown-menu-dark .dropdown-item-text{
    color:#fff !important;
  }
  .dropdown-menu-dark .dropdown-item:hover{
    background:rgba(247,201,72,.20) !important;
  }

  .judge-info-bar{
    padding:.5rem 0 !important;
    background:linear-gradient(135deg, #111827, #1f2937) !important;
    border-bottom:1px solid rgba(247,201,72,.35) !important;
  }
  .judge-info-bar .container{
    display:flex !important;
    flex-direction:column !important;
    align-items:flex-start !important;
    gap:.25rem !important;
  }
  .judge-info-main{
    display:flex !important;
    flex-direction:column !important;
    align-items:flex-start !important;
    gap:.16rem !important;
    width:100% !important;
    line-height:1.25 !important;
  }
  .judge-info-main > span,
  .judge-place-link{
    display:block !important;
    width:100% !important;
  }
  .judge-place-link{
    color:#fde68a !important;
    font-size:.84rem !important;
  }
  .judge-info-bar .badge{
    margin-top:.12rem !important;
  }
}

@media (max-width:767.98px){
  .live-toolbar-row{
    align-items:stretch !important;
  }
  .toolbar-soft,
  .live-stage-switch{
    display:block !important;
    width:100% !important;
  }
  .live-stage-switch .btn-group{
    display:grid !important;
    grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
    width:100% !important;
    gap:.35rem !important;
  }
  .live-stage-switch .btn{
    width:100% !important;
    min-height:40px !important;
    border-radius:.9rem !important;
    font-size:.84rem !important;
    font-weight:900 !important;
    background:rgba(255,255,255,.72) !important;
  }
  [data-bs-theme="dark"] .live-stage-switch .btn{
    background:rgba(15,23,42,.78) !important;
  }
  .live-stage-switch .btn-primary{
    background:linear-gradient(135deg, var(--psp-red), var(--psp-red-2)) !important;
  }
  .mobile-live-mode-switch{
    margin-top:.15rem !important;
    background:rgba(255,255,255,.72) !important;
    border-color:rgba(185,28,28,.20) !important;
  }
  [data-bs-theme="dark"] .mobile-live-mode-switch{
    background:rgba(15,23,42,.78) !important;
  }
  .mobile-live-mode-switch .btn{
    font-weight:900 !important;
  }
  .mobile-bottom-nav{
    background:linear-gradient(100deg, #7f1d1d, #991b1b 62%, #78350f) !important;
    border-top:2px solid rgba(247,201,72,.60) !important;
    backdrop-filter:none !important;
  }
  .mobile-bottom-nav a,
  .mobile-bottom-nav button{
    background:rgba(247,201,72,.08) !important;
    border:1px solid rgba(247,201,72,.18) !important;
    color:#fff !important;
  }
  .mobile-bottom-nav a.active,
  .mobile-bottom-nav button:active{
    background:linear-gradient(135deg, #f7c948, #f59e0b) !important;
    color:#451a03 !important;
    font-weight:900 !important;
  }
  .mobile-team-item{
    border-color:rgba(185,28,28,.18) !important;
  }
  .mobile-team-item.is-open{
    border-color:rgba(185,28,28,.42) !important;
    box-shadow:0 12px 28px rgba(127,29,29,.12) !important;
  }
  .mobile-team-no{
    background:linear-gradient(135deg, var(--psp-red), var(--psp-red-2)) !important;
    box-shadow:0 0 0 2px rgba(247,201,72,.40), 0 8px 18px rgba(127,29,29,.20) !important;
  }
}

/* ------------------------------------------------------------
   v6: strażacki mobile UI, bez przełącznika Lista/Szczegóły
   ------------------------------------------------------------ */
:root{
  --psp-fire-red:#c41111;
  --psp-fire-red-dark:#7a0f0f;
  --psp-fire-gold:#ffda57;
  --psp-fire-gold-2:#f7b733;
  --psp-fire-navy:#263f93;
  --psp-fire-navy-dark:#17285f;
  --psp-fire-gray:#b8b8b8;
  --psp-fire-black:#171717;
}

.mobile-live-mode-switch{ display:none !important; }

@media (max-width:991.98px){
  body{
    background:
      radial-gradient(circle at top left, rgba(196,17,17,.18), transparent 22rem),
      radial-gradient(circle at top right, rgba(255,218,87,.16), transparent 20rem),
      linear-gradient(180deg, #fff8e5 0%, #f3f4f6 44%, #eef2ff 100%) !important;
  }
  [data-bs-theme="dark"] body{
    background:
      radial-gradient(circle at top left, rgba(196,17,17,.22), transparent 22rem),
      radial-gradient(circle at top right, rgba(255,218,87,.10), transparent 20rem),
      linear-gradient(180deg, #111827 0%, #171717 60%, #111827 100%) !important;
  }

  /* Górne menu: pełna nazwa + data, solidne tło, bez przezroczystości. */
  .navbar.bg-psp-red{
    position:sticky !important;
    top:0 !important;
    min-height:auto !important;
    padding:.48rem 0 .50rem !important;
    background:
      linear-gradient(135deg, var(--psp-fire-red-dark) 0%, var(--psp-fire-red) 52%, #d62828 100%) !important;
    border-bottom:3px solid var(--psp-fire-gold) !important;
    box-shadow:0 12px 28px rgba(122,15,15,.35) !important;
    backdrop-filter:none !important;
  }
  .navbar.bg-psp-red .container{
    position:relative !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    align-items:center !important;
    gap:.55rem !important;
    padding-left:.72rem !important;
    padding-right:.72rem !important;
  }
  .navbar-brand{
    grid-column:1 / 2 !important;
    min-width:0 !important;
    max-width:none !important;
    margin:0 !important;
    padding:0 !important;
    align-items:flex-start !important;
  }
  .navbar-brand img{
    width:34px !important;
    height:34px !important;
    margin-top:.1rem !important;
    margin-right:.52rem !important;
    filter:drop-shadow(0 4px 8px rgba(0,0,0,.30)) !important;
  }
  .brand-title,
  .navbar-brand .brand-title{
    display:flex !important;
    flex-direction:column !important;
    min-width:0 !important;
    max-width:100% !important;
    line-height:1.08 !important;
  }
  .brand-title > span:first-child{
    display:block !important;
    max-width:100% !important;
    overflow:visible !important;
    text-overflow:clip !important;
    white-space:normal !important;
    overflow-wrap:anywhere !important;
    color:#fff !important;
    font-size:.94rem !important;
    font-weight:950 !important;
    letter-spacing:.01em !important;
    line-height:1.08 !important;
    text-shadow:0 2px 3px rgba(0,0,0,.35) !important;
  }
  .brand-event-date{
    display:block !important;
    margin-top:.18rem !important;
    width:max-content !important;
    max-width:100% !important;
    padding:.16rem .46rem !important;
    border-radius:999px !important;
    background:linear-gradient(135deg, var(--psp-fire-gold), var(--psp-fire-gold-2)) !important;
    color:#3b1f00 !important;
    font-size:.69rem !important;
    font-weight:950 !important;
    line-height:1.05 !important;
    letter-spacing:.02em !important;
    text-transform:none !important;
    box-shadow:0 4px 10px rgba(0,0,0,.16) !important;
  }
  .navbar-top-actions{
    grid-column:2 / 3 !important;
    align-self:start !important;
    margin:0 !important;
    padding-top:.05rem !important;
  }
  .navbar-top-actions .theme-toggle-btn{ display:none !important; }
  .navbar-toggler{
    min-width:44px !important;
    min-height:40px !important;
    border:2px solid rgba(255,218,87,.86) !important;
    border-radius:.9rem !important;
    background:linear-gradient(135deg, var(--psp-fire-navy), var(--psp-fire-navy-dark)) !important;
    box-shadow:0 8px 16px rgba(0,0,0,.26), inset 0 0 0 1px rgba(255,255,255,.10) !important;
  }
  .navbar-toggler:focus{ box-shadow:0 0 0 .22rem rgba(255,218,87,.32) !important; }

  .navbar-collapse{
    grid-column:1 / -1 !important;
    position:absolute !important;
    left:.72rem !important;
    right:.72rem !important;
    top:calc(100% + .55rem) !important;
    z-index:1060 !important;
    padding:.72rem !important;
    border:2px solid var(--psp-fire-gold) !important;
    border-radius:1rem !important;
    background:
      linear-gradient(155deg, var(--psp-fire-red-dark) 0%, #9d1414 48%, var(--psp-fire-navy-dark) 100%) !important;
    backdrop-filter:none !important;
    box-shadow:0 24px 52px rgba(0,0,0,.44) !important;
  }
  .navbar-nav{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:.48rem !important;
  }
  .navbar-nav .nav-item.dropdown{ grid-column:1 / -1 !important; }
  .navbar-dark .nav-link,
  .navbar-nav .nav-link{
    min-height:44px !important;
    padding:.58rem .68rem !important;
    border:1px solid rgba(255,218,87,.50) !important;
    border-radius:.88rem !important;
    background:rgba(255,255,255,.09) !important;
    color:#fff !important;
    opacity:1 !important;
    font-weight:900 !important;
    text-align:center !important;
    text-shadow:0 1px 2px rgba(0,0,0,.30) !important;
  }
  .navbar-dark .nav-link.active,
  .navbar-nav .nav-link.active{
    background:linear-gradient(135deg, var(--psp-fire-gold), var(--psp-fire-gold-2)) !important;
    color:#321600 !important;
    border-color:rgba(255,255,255,.55) !important;
    box-shadow:0 8px 18px rgba(0,0,0,.22) !important;
    text-shadow:none !important;
  }
  .dropdown-menu-dark{
    width:100% !important;
    padding:.45rem !important;
    background:#7a0f0f !important;
    border:1px solid rgba(255,218,87,.72) !important;
    border-radius:.9rem !important;
    box-shadow:0 18px 34px rgba(0,0,0,.30) !important;
  }

  /* Pasek pod menu: sędzia + miejsce, czytelny jak w PSP. */
  .judge-info-bar{
    padding:.55rem 0 !important;
    background:linear-gradient(135deg, var(--psp-fire-navy-dark), var(--psp-fire-navy)) !important;
    border-bottom:2px solid rgba(255,218,87,.72) !important;
    color:#fff !important;
  }
  .judge-info-bar .container{
    display:flex !important;
    flex-direction:column !important;
    align-items:flex-start !important;
    gap:.28rem !important;
  }
  .judge-info-main{
    display:flex !important;
    flex-direction:column !important;
    gap:.16rem !important;
    width:100% !important;
    line-height:1.26 !important;
  }
  .judge-info-main > span,
  .judge-place-link{
    display:block !important;
    width:100% !important;
  }
  .judge-place-link{
    color:var(--psp-fire-gold) !important;
    font-size:.86rem !important;
    font-weight:950 !important;
    text-decoration:underline !important;
    text-decoration-thickness:2px !important;
    text-underline-offset:4px !important;
    text-decoration-color:var(--psp-fire-gold) !important;
  }
  .judge-info-bar .badge{
    margin-top:.1rem !important;
    background:var(--psp-fire-gold) !important;
    color:#321600 !important;
    font-weight:950 !important;
  }

  /* Live: na mobile zawsze kafelki drużyn, bez osobnego trybu Szczegóły. */
  .live-hero{
    border:1px solid rgba(196,17,17,.14) !important;
    background:rgba(255,255,255,.74) !important;
  }
  [data-bs-theme="dark"] .live-hero{ background:rgba(17,24,39,.76) !important; }
  .live-toolbar-row{ align-items:stretch !important; }
  .toolbar-soft,
  .live-stage-switch{
    display:block !important;
    width:100% !important;
  }
  .live-stage-switch .btn-group{
    display:grid !important;
    grid-template-columns:repeat(3, minmax(0,1fr)) !important;
    gap:.38rem !important;
    width:100% !important;
    padding:.25rem !important;
    border:1px solid rgba(196,17,17,.18) !important;
    border-radius:1rem !important;
    background:rgba(255,255,255,.66) !important;
  }
  .live-stage-switch .btn{
    width:100% !important;
    min-height:42px !important;
    border-radius:.82rem !important;
    border:1px solid rgba(196,17,17,.28) !important;
    background:#fff !important;
    color:var(--psp-fire-red-dark) !important;
    font-weight:950 !important;
    font-size:.85rem !important;
  }
  .live-stage-switch .btn-primary{
    background:linear-gradient(135deg, var(--psp-fire-red), var(--psp-fire-red-dark)) !important;
    color:#fff !important;
    border-color:rgba(255,218,87,.78) !important;
    box-shadow:inset 0 -3px 0 rgba(255,218,87,.72), 0 8px 18px rgba(122,15,15,.18) !important;
  }
  #live-details-grid{ display:none !important; }
  .mobile-team-list{ display:block !important; }
  body.mobile-live-details-mode .mobile-team-list,
  body.mobile-live-list-mode .mobile-team-list{ display:block !important; }
  body.mobile-live-details-mode #live-details-grid,
  body.mobile-live-list-mode #live-details-grid{ display:none !important; }

  .mobile-team-item{
    border:1px solid rgba(196,17,17,.18) !important;
    border-left:5px solid var(--psp-fire-red) !important;
    border-radius:1.05rem !important;
    background:linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,248,229,.88)) !important;
    box-shadow:0 10px 24px rgba(23,23,23,.08) !important;
  }
  [data-bs-theme="dark"] .mobile-team-item{
    background:linear-gradient(135deg, rgba(31,41,55,.96), rgba(23,23,23,.92)) !important;
  }
  .mobile-team-item.is-open{
    border-color:rgba(196,17,17,.46) !important;
    border-left-color:var(--psp-fire-gold) !important;
    box-shadow:0 14px 30px rgba(122,15,15,.14) !important;
  }
  .mobile-team-summary{
    min-height:64px !important;
    grid-template-columns:2.75rem minmax(0,1fr) 1.7rem !important;
    padding:.76rem .78rem !important;
  }
  .mobile-team-no{
    width:2.45rem !important;
    height:2.45rem !important;
    background:linear-gradient(135deg, var(--psp-fire-red), var(--psp-fire-red-dark)) !important;
    color:#fff !important;
    box-shadow:0 0 0 2px rgba(255,218,87,.70), 0 8px 18px rgba(122,15,15,.22) !important;
  }
  .mobile-team-name{
    font-size:.96rem !important;
    font-weight:950 !important;
    color:var(--psp-fire-black) !important;
  }
  [data-bs-theme="dark"] .mobile-team-name{ color:#fff !important; }
  .mobile-team-meta{
    color:var(--psp-fire-navy) !important;
    font-weight:850 !important;
    font-size:.76rem !important;
  }
  [data-bs-theme="dark"] .mobile-team-meta{ color:#c7d2fe !important; }
  .mobile-team-chevron{
    background:linear-gradient(135deg, var(--psp-fire-gold), var(--psp-fire-gold-2)) !important;
    color:#321600 !important;
    font-weight:950 !important;
  }
  .mobile-team-detail-card{
    background:rgba(255,255,255,.72) !important;
    border:1px solid rgba(38,63,147,.18) !important;
    border-radius:.95rem !important;
  }
  [data-bs-theme="dark"] .mobile-team-detail-card{
    background:rgba(17,24,39,.72) !important;
  }
  .mobile-team-detail-title{
    color:var(--psp-fire-navy) !important;
    font-weight:950 !important;
  }
  [data-bs-theme="dark"] .mobile-team-detail-title{ color:#c7d2fe !important; }

  .mobile-bottom-nav{
    background:linear-gradient(100deg, var(--psp-fire-navy-dark), var(--psp-fire-navy) 52%, var(--psp-fire-red-dark)) !important;
    border-top:3px solid var(--psp-fire-gold) !important;
    backdrop-filter:none !important;
  }
  .mobile-bottom-nav a,
  .mobile-bottom-nav button{
    background:rgba(255,255,255,.08) !important;
    border:1px solid rgba(255,218,87,.22) !important;
    color:#fff !important;
  }
  .mobile-bottom-nav a.active,
  .mobile-bottom-nav button:active{
    background:linear-gradient(135deg, var(--psp-fire-gold), var(--psp-fire-gold-2)) !important;
    color:#321600 !important;
    font-weight:950 !important;
  }
}

@media (max-width:575.98px){
  .brand-title > span:first-child{ font-size:.88rem !important; }
  .brand-event-date{ font-size:.65rem !important; }
  .navbar-brand img{ width:31px !important; height:31px !important; }
  .navbar-toggler{ min-width:42px !important; min-height:38px !important; }
  .live-stage-switch .btn{ font-size:.78rem !important; padding:.42rem .2rem !important; }
  .mobile-team-summary{ grid-template-columns:2.55rem minmax(0,1fr) 1.55rem !important; }
}

/* ------------------------------------------------------------
   v8: spokojniejszy, profesjonalny UI PSP
   Zmiana charakteru kolorów: mniej agresywne tła, subtelniejsze cienie,
   większy kontrast treści i czytelniejsze menu mobilne.
   ------------------------------------------------------------ */
:root{
  --psp-red:#a5161a;
  --psp-red-2:#6f1518;
  --psp-fire-red:#a5161a;
  --psp-fire-red-dark:#641316;
  --psp-fire-gold:#d8a83a;
  --psp-fire-gold-2:#f1cd68;
  --psp-fire-navy:#223b78;
  --psp-fire-navy-dark:#152654;
  --psp-fire-gray:#e6e0d3;
  --psp-fire-black:#171923;
  --psp-cream:#fbf7ef;
  --psp-surface:#ffffff;
  --psp-surface-2:#f7f2e8;
  --psp-line:rgba(40,45,64,.12);
  --shadow:0 18px 45px rgba(26,31,46,.12);
  --shadow-sm:0 10px 24px rgba(26,31,46,.08);
  --shadow-elegant:0 18px 50px rgba(31,41,55,.12), 0 2px 8px rgba(31,41,55,.06);
  --bg-1:#fbf7ef;
  --bg-2:#eef1f6;
  --border:rgba(31,41,55,.12);
}

body{
  background:
    radial-gradient(circle at 16% 0%, rgba(165,22,26,.10), transparent 30rem),
    radial-gradient(circle at 88% 6%, rgba(216,168,58,.13), transparent 28rem),
    linear-gradient(180deg, #fbf7ef 0%, #f6f4ef 42%, #eef1f6 100%) !important;
}
body::before{
  opacity:.085 !important;
  filter:contrast(1.10) saturate(.92) drop-shadow(0 18px 38px rgba(31,41,55,.10)) !important;
}

.card,
.live-hero,
.list-group-item,
.admin-settings-card{
  border-color:var(--psp-line) !important;
  background:rgba(255,255,255,.78) !important;
  box-shadow:var(--shadow-sm) !important;
  backdrop-filter:blur(14px) saturate(1.06) !important;
}
.card-hover:hover{
  transform:translateY(-1px) !important;
  box-shadow:var(--shadow-elegant) !important;
  border-color:rgba(165,22,26,.18) !important;
}
.btn,
.form-control,
.form-select{
  border-radius:.8rem !important;
}
.btn-primary,
.btn-success{
  background:linear-gradient(135deg, #a5161a 0%, #751519 100%) !important;
  box-shadow:0 10px 22px rgba(117,21,25,.16) !important;
}
.btn-outline-primary{
  color:#7a1619 !important;
  border-color:rgba(165,22,26,.28) !important;
  background:rgba(255,255,255,.58) !important;
}
.btn-outline-primary:hover{
  background:#a5161a !important;
  color:#fff !important;
  border-color:#a5161a !important;
}

.navbar.bg-psp-red{
  background:linear-gradient(120deg, #641316 0%, #8f171b 56%, #a5161a 100%) !important;
  border-bottom:1px solid rgba(216,168,58,.42) !important;
  box-shadow:0 12px 28px rgba(45,18,20,.18) !important;
}
.navbar-dark .nav-link{
  color:rgba(255,255,255,.90) !important;
}
.navbar-dark .nav-link.active{
  background:rgba(216,168,58,.18) !important;
  color:#fff !important;
  box-shadow:inset 0 0 0 1px rgba(216,168,58,.26) !important;
}

.judge-info-bar{
  background:rgba(255,255,255,.78) !important;
  border-bottom:1px solid rgba(34,59,120,.12) !important;
  color:#202434 !important;
  box-shadow:0 8px 20px rgba(31,41,55,.05) !important;
}
.judge-info-main strong{ color:#641316 !important; }
.judge-place-link{
  color:#223b78 !important;
  text-decoration-color:rgba(216,168,58,.86) !important;
  text-decoration-thickness:2px !important;
  text-underline-offset:4px !important;
}

.live-hero{
  background:
    linear-gradient(135deg, rgba(255,255,255,.82), rgba(255,255,255,.60)),
    radial-gradient(circle at right top, rgba(216,168,58,.14), transparent 27rem) !important;
}
.live-hero::after{
  background:radial-gradient(circle, rgba(165,22,26,.08), transparent 65%) !important;
}
.hero-kpi{
  background:rgba(255,255,255,.64) !important;
  box-shadow:0 8px 22px rgba(31,41,55,.06) !important;
}
.live-stage-switch .btn-group{
  background:rgba(255,255,255,.64) !important;
  border-color:rgba(31,41,55,.10) !important;
  box-shadow:0 8px 22px rgba(31,41,55,.06) !important;
}
.live-stage-switch .btn{
  border-color:rgba(31,41,55,.12) !important;
  background:rgba(255,255,255,.82) !important;
  color:#273044 !important;
}
.live-stage-switch .btn-primary{
  background:linear-gradient(135deg, #8f171b 0%, #641316 100%) !important;
  color:#fff !important;
  border-color:rgba(216,168,58,.38) !important;
  box-shadow:0 10px 24px rgba(100,19,22,.16), inset 0 -2px 0 rgba(216,168,58,.42) !important;
}

.mobile-team-item{
  border-color:rgba(31,41,55,.11) !important;
  border-left-color:#a5161a !important;
  background:rgba(255,255,255,.86) !important;
  box-shadow:0 12px 28px rgba(31,41,55,.08) !important;
}
.mobile-team-item.is-open{
  border-color:rgba(165,22,26,.20) !important;
  border-left-color:#d8a83a !important;
  box-shadow:0 18px 38px rgba(31,41,55,.11) !important;
}
.mobile-team-no{
  background:linear-gradient(135deg, #8f171b 0%, #641316 100%) !important;
  box-shadow:0 0 0 2px rgba(216,168,58,.38), 0 8px 18px rgba(31,41,55,.12) !important;
}
.mobile-team-chevron{
  background:#f1cd68 !important;
  color:#3d2a07 !important;
  box-shadow:0 8px 18px rgba(31,41,55,.08) !important;
}
.mobile-team-detail-card{
  background:rgba(250,247,241,.82) !important;
  border-color:rgba(34,59,120,.12) !important;
}
.mobile-team-detail-title{ color:#223b78 !important; }

.table-sticky thead th,
thead.table-psp{
  background:linear-gradient(135deg, #243044 0%, #152654 100%) !important;
}
.rank-pill{
  background:rgba(34,59,120,.10) !important;
  color:#152654 !important;
  border:1px solid rgba(34,59,120,.10) !important;
}
.rank-1 .rank-pill{
  background:linear-gradient(135deg, #f1cd68, #d8a83a) !important;
  color:#3d2a07 !important;
}
.rank-2 .rank-pill{ background:#eef1f6 !important; color:#273044 !important; }
.rank-3 .rank-pill{ background:#f3e5cf !important; color:#6b3b16 !important; }

/* Admin: bardziej uporządkowane ustawienia i spokojniejsze sekcje. */
.admin-settings-card{
  overflow:hidden !important;
}
.admin-settings-card .card-body{
  padding:1.15rem !important;
}
.admin-settings-grid{
  gap:1rem !important;
}
.settings-section{
  border:1px solid rgba(31,41,55,.10) !important;
  background:linear-gradient(180deg, rgba(255,255,255,.88), rgba(250,247,241,.72)) !important;
  border-radius:1rem !important;
  padding:1rem !important;
  box-shadow:0 10px 24px rgba(31,41,55,.055) !important;
}
.settings-section-title{
  display:flex !important;
  align-items:center !important;
  gap:.45rem !important;
  margin-bottom:.85rem !important;
  color:#641316 !important;
  font-size:.86rem !important;
  font-weight:800 !important;
  letter-spacing:.02em !important;
  text-transform:uppercase !important;
}
.settings-section-title::before{
  content:"";
  width:.65rem;
  height:.65rem;
  border-radius:999px;
  background:#d8a83a;
  box-shadow:0 0 0 4px rgba(216,168,58,.16);
}
.live-finish-box{
  border:1px solid rgba(34,59,120,.12) !important;
  background:rgba(255,255,255,.70) !important;
  border-radius:1rem !important;
  box-shadow:none !important;
}

@media (max-width:991.98px){
  body{
    background:
      radial-gradient(circle at 12% -4%, rgba(165,22,26,.09), transparent 18rem),
      radial-gradient(circle at 92% 0%, rgba(216,168,58,.12), transparent 18rem),
      linear-gradient(180deg, #fbf7ef 0%, #f8f4ec 48%, #eef1f6 100%) !important;
  }

  .navbar.bg-psp-red{
    padding:.54rem 0 !important;
    background:linear-gradient(135deg, #641316 0%, #8b171b 58%, #a5161a 100%) !important;
    border-bottom:1px solid rgba(216,168,58,.50) !important;
    box-shadow:0 10px 24px rgba(36,20,22,.20) !important;
  }
  .navbar.bg-psp-red .container{
    gap:.6rem !important;
    padding-left:.82rem !important;
    padding-right:.82rem !important;
  }
  .navbar-brand img{
    width:34px !important;
    height:34px !important;
    filter:drop-shadow(0 4px 8px rgba(0,0,0,.18)) !important;
  }
  .brand-title > span:first-child{
    color:#fff !important;
    font-size:.92rem !important;
    font-weight:850 !important;
    letter-spacing:.005em !important;
    text-shadow:none !important;
  }
  .brand-event-date{
    width:fit-content !important;
    margin-top:.22rem !important;
    padding:.18rem .5rem !important;
    background:rgba(255,255,255,.14) !important;
    border:1px solid rgba(241,205,104,.42) !important;
    color:#fff4cc !important;
    box-shadow:none !important;
    font-weight:750 !important;
  }
  .navbar-toggler{
    border:1px solid rgba(241,205,104,.58) !important;
    background:rgba(21,38,84,.82) !important;
    box-shadow:0 8px 18px rgba(0,0,0,.16) !important;
  }
  .navbar-collapse{
    top:calc(100% + .45rem) !important;
    padding:.72rem !important;
    border:1px solid rgba(216,168,58,.34) !important;
    background:linear-gradient(180deg, #fffaf0 0%, #f5eee2 100%) !important;
    box-shadow:0 22px 60px rgba(31,41,55,.24) !important;
    border-radius:1.15rem !important;
  }
  .navbar-dark .nav-link,
  .navbar-nav .nav-link{
    min-height:42px !important;
    background:#ffffff !important;
    border:1px solid rgba(31,41,55,.10) !important;
    color:#2c3345 !important;
    text-shadow:none !important;
    font-weight:760 !important;
    box-shadow:0 8px 18px rgba(31,41,55,.055) !important;
  }
  .navbar-dark .nav-link.active,
  .navbar-nav .nav-link.active{
    background:linear-gradient(135deg, #8f171b 0%, #641316 100%) !important;
    color:#fff !important;
    border-color:rgba(216,168,58,.42) !important;
    box-shadow:0 10px 22px rgba(100,19,22,.16) !important;
  }
  .dropdown-menu-dark{
    background:#fffaf0 !important;
    border:1px solid rgba(31,41,55,.10) !important;
    box-shadow:0 14px 28px rgba(31,41,55,.12) !important;
  }
  .dropdown-menu-dark .dropdown-item{
    color:#2c3345 !important;
    border-radius:.75rem !important;
  }
  .dropdown-menu-dark .dropdown-item:hover{
    background:rgba(216,168,58,.18) !important;
  }

  .judge-info-bar{
    padding:.52rem 0 !important;
    background:rgba(255,255,255,.80) !important;
    border-bottom:1px solid rgba(31,41,55,.08) !important;
    color:#202434 !important;
  }
  .judge-info-bar .container{
    gap:.24rem !important;
  }
  .judge-info-main{
    font-size:.86rem !important;
    color:#202434 !important;
  }
  .judge-place-link{
    color:#223b78 !important;
    font-size:.86rem !important;
    font-weight:780 !important;
    text-decoration:underline !important;
    text-decoration-color:#d8a83a !important;
    text-decoration-thickness:2px !important;
    text-underline-offset:4px !important;
  }
  .judge-info-bar .badge{
    background:#f1cd68 !important;
    color:#3d2a07 !important;
    font-weight:800 !important;
  }

  .live-hero{
    border:1px solid rgba(31,41,55,.10) !important;
    background:rgba(255,255,255,.80) !important;
    box-shadow:0 14px 34px rgba(31,41,55,.09) !important;
  }
  .live-stage-switch .btn-group{
    padding:.28rem !important;
    gap:.32rem !important;
    border-radius:1rem !important;
    background:rgba(255,255,255,.72) !important;
    border:1px solid rgba(31,41,55,.10) !important;
    box-shadow:0 10px 24px rgba(31,41,55,.065) !important;
  }
  .live-stage-switch .btn{
    min-height:41px !important;
    background:#fff !important;
    color:#32394a !important;
    border:1px solid rgba(31,41,55,.10) !important;
    font-weight:800 !important;
    font-size:.82rem !important;
  }
  .live-stage-switch .btn-primary{
    background:linear-gradient(135deg, #8f171b 0%, #641316 100%) !important;
    color:#fff !important;
    border-color:rgba(216,168,58,.36) !important;
    box-shadow:0 10px 22px rgba(100,19,22,.15), inset 0 -2px 0 rgba(216,168,58,.36) !important;
  }

  .mobile-team-list{
    display:block !important;
    gap:.72rem !important;
  }
  .mobile-team-item{
    border:1px solid rgba(31,41,55,.10) !important;
    border-left:4px solid #a5161a !important;
    border-radius:1rem !important;
    background:rgba(255,255,255,.88) !important;
    box-shadow:0 12px 28px rgba(31,41,55,.075) !important;
    overflow:hidden !important;
  }
  .mobile-team-item.is-open{
    border-color:rgba(165,22,26,.18) !important;
    border-left-color:#d8a83a !important;
    box-shadow:0 16px 36px rgba(31,41,55,.10) !important;
  }
  .mobile-team-summary{
    min-height:62px !important;
    padding:.74rem .76rem !important;
  }
  .mobile-team-name{
    color:#202434 !important;
    font-weight:820 !important;
    font-size:.95rem !important;
  }
  .mobile-team-meta{
    color:#5b6475 !important;
    font-weight:680 !important;
    font-size:.75rem !important;
  }
  .mobile-team-no{
    width:2.36rem !important;
    height:2.36rem !important;
    background:#223b78 !important;
    color:#fff !important;
    font-weight:850 !important;
    box-shadow:0 0 0 2px rgba(216,168,58,.30), 0 8px 18px rgba(31,41,55,.12) !important;
  }
  .mobile-team-chevron{
    background:#f4e4b6 !important;
    color:#5b3a08 !important;
  }
  .mobile-team-detail-card{
    background:#fbf7ef !important;
    border:1px solid rgba(31,41,55,.08) !important;
    box-shadow:none !important;
  }
  .mobile-team-detail-line{
    border-color:rgba(31,41,55,.08) !important;
  }

  .mobile-bottom-nav{
    height:62px !important;
    background:rgba(255,255,255,.92) !important;
    border-top:1px solid rgba(31,41,55,.10) !important;
    box-shadow:0 -14px 34px rgba(31,41,55,.10) !important;
    backdrop-filter:blur(14px) saturate(1.05) !important;
  }
  .mobile-bottom-nav .mobile-nav-inner{
    gap:.32rem !important;
  }
  .mobile-bottom-nav a,
  .mobile-bottom-nav button{
    background:transparent !important;
    border:0 !important;
    color:#475064 !important;
    font-weight:740 !important;
  }
  .mobile-bottom-nav a.active,
  .mobile-bottom-nav button:active{
    background:#223b78 !important;
    color:#fff !important;
    box-shadow:0 10px 18px rgba(34,59,120,.18) !important;
  }
}

@media (max-width:575.98px){
  .brand-title > span:first-child{ font-size:.86rem !important; line-height:1.12 !important; }
  .brand-event-date{ font-size:.64rem !important; }
  .navbar-brand img{ width:30px !important; height:30px !important; }
  .navbar-toggler{ min-width:40px !important; min-height:38px !important; }
  .live-stage-switch .btn{ font-size:.77rem !important; padding:.42rem .18rem !important; }
}

[data-bs-theme="dark"]{
  --psp-surface:#111827;
  --psp-surface-2:#172033;
  --psp-line:rgba(255,255,255,.10);
  --bg-1:#0f172a;
  --bg-2:#111827;
}
[data-bs-theme="dark"] body{
  background:
    radial-gradient(circle at 16% 0%, rgba(165,22,26,.14), transparent 30rem),
    radial-gradient(circle at 88% 6%, rgba(216,168,58,.08), transparent 28rem),
    linear-gradient(180deg, #0f172a 0%, #111827 100%) !important;
}
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .live-hero,
[data-bs-theme="dark"] .list-group-item,
[data-bs-theme="dark"] .admin-settings-card{
  background:rgba(17,24,39,.76) !important;
  border-color:rgba(255,255,255,.10) !important;
}
[data-bs-theme="dark"] .judge-info-bar{
  background:rgba(17,24,39,.80) !important;
  color:#e5e7eb !important;
}
[data-bs-theme="dark"] .settings-section{
  background:linear-gradient(180deg, rgba(17,24,39,.86), rgba(15,23,42,.74)) !important;
  border-color:rgba(255,255,255,.10) !important;
}
@media (max-width:991.98px){
  [data-bs-theme="dark"] .navbar-collapse{
    background:linear-gradient(180deg, #111827 0%, #172033 100%) !important;
    border-color:rgba(216,168,58,.24) !important;
  }
  [data-bs-theme="dark"] .navbar-dark .nav-link,
  [data-bs-theme="dark"] .navbar-nav .nav-link{
    background:rgba(255,255,255,.06) !important;
    color:#f8fafc !important;
    border-color:rgba(255,255,255,.10) !important;
  }
  [data-bs-theme="dark"] .dropdown-menu-dark{
    background:#111827 !important;
    border-color:rgba(255,255,255,.10) !important;
  }
  [data-bs-theme="dark"] .dropdown-menu-dark .dropdown-item{ color:#f8fafc !important; }
  [data-bs-theme="dark"] .mobile-team-item{ background:rgba(17,24,39,.86) !important; border-color:rgba(255,255,255,.10) !important; }
  [data-bs-theme="dark"] .mobile-team-name{ color:#f8fafc !important; }
  [data-bs-theme="dark"] .mobile-team-meta{ color:#cbd5e1 !important; }
  [data-bs-theme="dark"] .mobile-team-detail-card{ background:rgba(15,23,42,.78) !important; border-color:rgba(255,255,255,.10) !important; }
  [data-bs-theme="dark"] .mobile-bottom-nav{ background:rgba(17,24,39,.92) !important; border-top-color:rgba(255,255,255,.10) !important; }
  [data-bs-theme="dark"] .mobile-bottom-nav a,
  [data-bs-theme="dark"] .mobile-bottom-nav button{ color:#cbd5e1 !important; }
}
