
:root{
  /* Display face: every heading, tab, table header and small uppercase label. It was Oswald, which is
     a strongly CONDENSED face — and most of these labels are 9.5-11px, uppercase, letter-spaced, which
     is already the hardest combination to read. Condensing the letterforms on top of that is what made
     "GROUP / SLOT" and "TOURNAMENT PLAYERS" hard work, and Turkish diacritics (İ Ş Ğ Ç Ö Ü) suffer
     most of all in a narrow face, because the marks have less room above the letter.
     Named once here so the whole site changes in one place.

     The fallback chain is not filler. This is a PWA that gets installed and used in sports halls,
     where fonts.googleapis.com is one more thing that can be slow or simply unreachable — and the old
     chain was 'Oswald', sans-serif, so a hall with no connection got whatever the browser defaults to.
     Naming the real system faces means the headings land on a clear, normal-width grotesque whether
     the web font arrives or not, which is the actual promise being made here. */
  --font-display:'Archivo','Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;

  /* Player names get their own face. They were set in IBM Plex Mono, which is a fine face for
     numbers and a poor one for names: a monospace gives "İ" the same width as "M", so Turkish names
     run wide and get cut off ("DANYAL AH…") in a grid column that is already narrow. Nunito is
     proportional and rounded, so the same name takes less room and reads more easily from across a
     hall. The fallback chain ends at the previous face, so a venue with no font loaded looks exactly
     as it did before rather than dropping to something arbitrary. */
  --font-player:'Nunito','Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;

    --paper:#F7F7FC;
    --paper-alt:#EEF0FC;
    --ink:#2A2264;
    --ink-soft:#8A8DA3;
    --line:#E1E2F5;
    --line-strong:#3A2F8C;
    --gold:#5B4FE0;
    --gold-soft:#FBE3C7;
    --slate:#3A2F8C;
    --slate-soft:#E7E8F6;
    --red:#C0392B;
    --green:#3FD1B0;
    --accent-dark:#FBE3C7;
    --on-dark-dim:#D9D6F5;
    --score-ink:#7A6323; /* the one text color every score-related input uses (schedule + both bracket states) */
    --faint-ink:#3F4262; /* text on the muted TBD/bye placeholder boxes — deliberately its own value, not --ink-soft, which fails contrast against that background */
    --shadow: 0 1px 2px rgba(58,47,140,0.08);
  }
  *{box-sizing:border-box;}
  html,body{margin:0;padding:0;}
  body{
    background:var(--paper);
    color:var(--ink);
    font-family:'IBM Plex Sans',sans-serif;
    -webkit-font-smoothing:antialiased;
  }
  .wrap{max-width:1180px;margin:0 auto;padding:28px 20px 80px;}

  /* header */
  header.top{
    display:flex;justify-content:space-between;align-items:flex-end;
    background:linear-gradient(135deg,#3A2F8C,#2A2264);
    border-radius:10px;padding:20px 26px 18px;margin-bottom:6px;flex-wrap:wrap;gap:10px;
    box-shadow:var(--shadow);
  }
  .brand{display:flex;flex-direction:column;gap:2px;}
  .header-right{display:flex;flex-direction:column;align-items:flex-end;gap:6px;}
  .kicker-block{display:flex;flex-direction:column;align-items:flex-end;text-align:right;}
  .kicker-block .num{
    font-family:var(--font-display);font-weight:700;font-size:16px;line-height:1.2;
    color:#fff;letter-spacing:1.5px;text-transform:uppercase;
  }
  .signature{
    font-family:'Great Vibes',cursive;font-weight:400;font-size:20px;color:var(--accent-dark);
    white-space:nowrap;line-height:1.1;
  }
  .brand h1{
    font-family:var(--font-display);font-weight:600;font-size:26.4px;text-transform:uppercase;
    letter-spacing:1.5px;margin:0;color:var(--accent-dark);
    display:inline-block;padding:3px 8px;border-radius:6px;cursor:pointer;
    transition:background 0.15s, color 0.15s, transform 0.1s;
  }
  /* The header title now reads the literal "masatenisi.pro" (see appTitleEl's innerHTML in
     renderDerived()) — .brand h1's own text-transform:uppercase would still force it to
     "MASATENISI.PRO" visually regardless, so override it back to as-typed lowercase here. */
  #appTitleEl{ text-transform:none; letter-spacing:0.3px; }
  /* the old "11 groups of 4 → ..." blurb under the title was clutter once the header was already
     doing its job with the tournament name in the selector below — dropped per explicit request,
     but the element/JS that fills it (updateSizeText()) is left alone so nothing else breaks */
  #appSubtitleEl{ display:none; }
  /* The "." in "masatenisi.pro" is rendered as a solid bold red circle rather than the plain glyph —
     sized in em so it scales with the title's own font-size (including the 22.8px mobile breakpoint
     below). The literal "." character stays in the DOM (title text/accessibility), just hidden via
     color:transparent — the circle is the span's own background box, not the glyph itself, so it's
     reliably round regardless of font. */
  #appTitleEl .title-dot{
    display:inline-block;width:0.24em;height:0.24em;min-width:5px;min-height:5px;
    background:var(--red);border-radius:50%;margin:0 1px;vertical-align:baseline;
    color:transparent;font-weight:900;overflow:hidden;
  }
  .brand h1:hover{
    background:rgba(251,227,199,0.18);color:#fff;transform:translateY(-1px);
  }
  .brand h1:active{ transform:translateY(0); }
  .brand p{margin:2px 0 0;font-size:12.5px;color:var(--on-dark-dim);letter-spacing:0.3px;}
  .legend{display:flex;gap:16px;font-family:'IBM Plex Mono',monospace;font-size:11px;color:var(--on-dark-dim);}
  .legend span{display:inline-flex;align-items:center;gap:6px;}
  .swatch{width:10px;height:10px;display:inline-block;border:1px solid rgba(255,255,255,0.5);}

  /* session bar — wraps onto extra lines rather than clipping off the edge of the window. This used
     to only wrap below the ~640px mobile breakpoint, so at an in-between window width the row could
     silently run past the right edge with several buttons (Player List, Switch User, etc.) neither
     visible nor reachable. */
  .session-bar{
    display:flex;align-items:center;gap:10px;flex-wrap:wrap;row-gap:6px;font-family:'IBM Plex Mono',monospace;font-size:11px;
    color:var(--on-dark-dim);
  }
  .session-bar .role-pill{
    font-family:var(--font-display);font-weight:600;font-size:10px;letter-spacing:0.5px;text-transform:uppercase;
    padding:3px 8px;border-radius:4px;background:rgba(255,255,255,0.15);color:#fff;
  }
  /* admin mode gets a literal small green "light" (like a power/status LED) in front of the badge
     text, on top of the existing cream admin background — a clear at-a-glance signal that editing
     (including drag-and-drop, which is admin-only) is active, not just a color-coded label. */
  .session-bar .role-pill.admin{
    background:var(--gold-soft);color:var(--ink);
    display:inline-flex;align-items:center;gap:5px;
  }
  .session-bar .role-pill.admin::before{
    content:'';width:7px;height:7px;border-radius:50%;flex:0 0 auto;
    background:var(--green);box-shadow:0 0 4px 1px var(--green);
  }
  .session-bar button{
    background:rgba(255,255,255,0.12);border:1px solid rgba(255,255,255,0.3);color:#fff;
    font-family:var(--font-display);font-size:10.5px;letter-spacing:0.4px;text-transform:uppercase;
    padding:5px 10px;border-radius:6px;cursor:pointer;
  }
  .session-bar button:hover{background:rgba(255,255,255,0.22);}
  /* now the first item in .session-manager (not .session-bar) — that row always has room, unlike the
     header bar which could clip off-screen at in-between window widths, so this button is guaranteed
     visible there. Needs its own complete button styling (not just a color override) since it no
     longer inherits from .session-bar button in its new location. */
  /* the button itself is now the dropdown trigger (see #championshipMenuPanel in the HTML and
     initDropdownMenu('championshipMenuBtn', ...) in the JS) — same red pill look as before, just
     opening a small menu instead of jumping straight to the picker. #championWindowBtn keeps its id
     and click handler unchanged as the panel's "Go to Championship Picker" row. */
  /* #playerModuleBtn moved out of the header bar into .session-manager (see the HTML), so it needs
     its own complete styling here — same pill geometry as its neighbours, in the dark ink fill of
     Save/Tournament ▾ rather than the red the Arena link uses, so the two sit side by side without
     competing. */
  #playerModuleBtn{
    font-family:var(--font-display);font-weight:600;font-size:10.5px;letter-spacing:0.4px;text-transform:uppercase;
    border:1px solid var(--ink);border-radius:6px;background:var(--ink);color:var(--paper);padding:6px 10px;cursor:pointer;
    /* 21 Sep 2026, by request ("PLEYER POOL ARENA must be ALİGNED RİGHT"): .session-manager is a
       flex row — an auto left-margin on the first of this trailing pair pushes both it and the
       Arena link (right after it in the DOM) to the row's right edge, whatever else is in the row. */
    margin-left:auto;
  }
  #playerModuleBtn:hover{background:var(--slate);border-color:var(--slate);}
  #championshipMenuBtn, #timeTableMenuBtn, #timeTableArenaLink, #simpleArenaLink{
    font-family:var(--font-display);font-weight:600;font-size:10.5px;letter-spacing:0.4px;text-transform:uppercase;
    border:1px solid var(--red);border-radius:6px;background:var(--red);color:#fff;padding:6px 10px;cursor:pointer;
  }
  #championshipMenuBtn:hover, #timeTableMenuBtn:hover, #timeTableArenaLink:hover, #simpleArenaLink:hover{background:#9E2E22;border-color:#9E2E22;}
  /* #timeTableArenaLink is an <a>, not a <button> — same pill look as its neighbors above, just
     without the underline/inline-flow an anchor gets by default. */
  #timeTableArenaLink, #simpleArenaLink{text-decoration:none;display:inline-block;}
  /* v254 — Basit Arena sits right after Arena: same pill, ink instead of red so the two read apart */
  #simpleArenaLink{background:var(--ink);border-color:var(--ink);}
  #simpleArenaLink:hover{background:#000;border-color:#000;}
  /* v254 — viewers see Basit Arena too (read-only); with Player List / Arena hidden for them it takes over
     their job of pushing the pair to the row's right edge */
  body:not(.admin-mode) .session-manager #simpleArenaLink{margin-left:auto;}
  /* v269 — Basit Arena switched off (by request) */
  #simpleArenaLink{display:none !important;}
  .sync-dot{width:6px;height:6px;border-radius:50%;background:var(--green);display:inline-block;}
  .sync-dot.busy{background:var(--gold-soft);}
  .sync-dot.err{background:var(--red);}
  .sync-dot.local{background:#9C8AE0;}
  #syncLabel:empty{display:none;}
  /* v77: on a phone the signed-in account/email in the header only costs room — hide it there */
  @media (max-width:640px){ #sessionName{display:none !important;} }
  /* v103 — viewers had no picker and so no way to see WHICH tournament is open */
  .viewer-tournament-title{font-family:var(--font-display);font-weight:700;font-size:20px;color:var(--ink);margin:4px 2px 10px;line-height:1.25;}
  .viewer-tournament-title .vtt-champ{display:block;font-size:12px;font-weight:600;letter-spacing:0.4px;text-transform:uppercase;color:var(--ink-soft);margin-bottom:2px;}
  /* v139 — not shown at all any more: the Şampiyona / Turnuva Kategorisi selectors above already name it */
  .viewer-tournament-title{display:none !important;}
  .text-scale-toggle{display:flex;gap:4px;margin-bottom:6px;}
  /* v107 — "Maçım nerede?" */
  .mmw-bar{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:nowrap;margin:0 2px 12px;}
  .swiss-go-btn{text-decoration:none;display:inline-block;}
  /* v154 — Rankings sits right next to SWISS (the auto margin takes the free space on its left; on phones,
     where all three buttons share the row in equal parts, there is none to take) */
  .rankings-go-btn{margin-left:auto;}
  /* v119 — on phones both buttons share one row: equal halves, smaller text, never wrap */
  @media (max-width:640px){
    .mmw-bar{gap:8px;}
    .mmw-bar .mmw-open-btn{flex:1 1 0;min-width:0;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
      font-size:clamp(11px,3.6vw,14px);padding:10px 6px;letter-spacing:0;}
    /* v154 — three buttons cut each other's labels short in one row: "Maçım nerede?" takes the first row
       on its own, Rankings and SWISS share the second */
    .mmw-bar{flex-wrap:wrap;}
    .mmw-bar #mmwOpenBtn{flex:1 1 100%;}
  }
  .mmw-open-btn{font-family:var(--font-display);font-weight:800;font-size:15px;letter-spacing:.3px;padding:11px 18px;border-radius:12px;
    border:2px solid var(--gold);background:var(--gold);color:#FFE066;cursor:pointer;box-shadow:0 4px 12px rgba(0,0,0,.15);}
  .mmw-open-btn:hover{background:var(--gold-soft);color:var(--ink);}
  /* v136 — Sonuç bülteni + Maçım nerede takip modu */
  .blt-box{max-width:620px;}
  .blt-img{display:block;width:100%;height:auto;border-radius:10px;box-shadow:0 6px 20px rgba(0,0,0,.25);margin-top:4px;}
  .blt-warn:empty{display:none;}
  .mmw-foot .mmw-follow-btn{border-color:#16a34a;color:#16a34a;}
  .mmw-foot .mmw-follow-btn.on{background:#16a34a;color:#fff;}
  #mmwFollowPill{position:fixed;left:50%;bottom:12px;transform:translateX(-50%);z-index:5500;display:none;align-items:center;gap:2px;max-width:calc(100vw - 24px);
    background:#16a34a;color:#fff;border-radius:999px;box-shadow:0 8px 24px rgba(0,0,0,.3);font:700 14px/1.2 'IBM Plex Sans',sans-serif;}
  #mmwFollowPill.paused{background:#b45309;}
  #mmwFollowPill button{background:transparent;border:0;color:inherit;font:inherit;cursor:pointer;}
  #mmwFollowPill .mfp-main{padding:10px 6px 10px 16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100vw - 80px);}
  #mmwFollowPill .mfp-x{padding:8px 14px 8px 8px;font-size:20px;line-height:1;}
  /* v137 — a centred card instead of a full-screen wall of type ("çok büyük fontlarda") */
  #mmwCall{position:fixed;inset:0;z-index:9000;display:none;align-items:center;justify-content:center;padding:20px;background:rgba(20,15,40,.55);}
  #mmwCall .mmw-call-card{width:100%;max-width:340px;display:flex;flex-direction:column;align-items:center;gap:8px;padding:22px 20px 18px;text-align:center;
    border-radius:18px;background:#16a34a;color:#fff;box-shadow:0 18px 50px rgba(0,0,0,.4);font-family:'Archivo','IBM Plex Sans',sans-serif;animation:mmwCallPulse 1.2s ease-in-out 3;}
  #mmwCall .mmw-call-k{font-size:13px;font-weight:700;letter-spacing:.06em;opacity:.9;}
  #mmwCall .mmw-call-big{font-size:44px;font-weight:900;line-height:1.05;white-space:nowrap;}
  #mmwCall .mmw-call-sub{font-size:16px;font-weight:700;}
  #mmwCall .mmw-call-meta{font-size:12px;opacity:.85;}
  #mmwCall .mmw-call-ok{margin-top:10px;font:700 15px 'IBM Plex Sans',sans-serif;padding:10px 22px;border-radius:10px;border:0;background:#fff;color:#14532d;cursor:pointer;}
  @keyframes mmwCallPulse{0%,100%{background:#16a34a}50%{background:#0f7a35}}
  @media print{ #mmwFollowPill, #mmwCall{display:none !important;} }
  /* v265 — 📢 Açılış Mesajı */
  #openMsgOverlay{position:fixed;inset:0;z-index:8800;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(20,15,40,.55);}
  #openMsgOverlay .openmsg-card{width:100%;max-width:440px;max-height:calc(100dvh - 32px);box-sizing:border-box;display:flex;flex-direction:column;gap:10px;padding:18px 18px 14px;border-radius:16px;background:var(--paper);color:var(--ink);box-shadow:0 18px 50px rgba(0,0,0,.4);border-top:6px solid var(--gold);font-family:'IBM Plex Sans',sans-serif;}
  #openMsgOverlay .openmsg-title{font-family:var(--font-display);font-size:19px;font-weight:800;line-height:1.25;}
  #openMsgOverlay .openmsg-text{font-size:15px;line-height:1.45;overflow-y:auto;overflow-wrap:anywhere;}
  #openMsgOverlay .openmsg-text a{color:#3b5bdb;font-weight:700;}
  #openMsgOverlay .openmsg-ok{align-self:flex-end;margin-top:4px;font:800 15px 'IBM Plex Sans',sans-serif;padding:9px 26px;border-radius:10px;border:0;background:var(--gold);color:#FFE066;cursor:pointer;}
  #openMsgEdOverlay{z-index:5200;}
  .openmsg-ed .openmsg-on{display:flex;align-items:center;gap:8px;font-weight:800;font-size:14px;margin:4px 2px 6px;cursor:pointer;}
  .openmsg-ed .openmsg-on input{width:auto;margin:0;}
  .openmsg-ed .openmsg-lbl{display:block;font-size:12px;font-weight:700;color:var(--ink-soft);margin:8px 2px 3px;}
  .openmsg-ed .openmsg-in{width:100%;box-sizing:border-box;font-size:15px;padding:8px 10px;border:1.5px solid var(--line);border-radius:8px;background:var(--paper-alt);color:var(--ink);font-family:'IBM Plex Sans',sans-serif;}
  .openmsg-ed textarea.openmsg-in{resize:vertical;line-height:1.4;}
  .openmsg-ed .openmsg-msg{min-height:18px;margin:8px 2px 0;font-size:13px;font-weight:700;color:#167A3E;}
  .openmsg-ed .openmsg-foot{display:flex;justify-content:flex-end;gap:8px;margin-top:8px;}
  .openmsg-ed .openmsg-foot .openmsg-save{background:var(--gold);color:#FFE066;border-color:var(--gold);}
  @media print{ #openMsgOverlay, #openMsgEdOverlay{display:none !important;} }
  .mmw-overlay{position:fixed;inset:0;z-index:5000;background:rgba(20,15,40,.5);display:flex;align-items:flex-start;justify-content:center;padding:24px 12px;overflow-y:auto;}
  .mmw-box{background:var(--paper);color:var(--ink);border-radius:16px;width:100%;max-width:480px;box-shadow:0 18px 50px rgba(0,0,0,.35);padding:14px 14px 12px;font-family:'IBM Plex Sans',sans-serif;}
  /* v177 — "Maçım nerede?" fits the window: the box never grows past the screen, only its middle scrolls
     (head and the buttons at the foot stay in view). Scoped to this window — other boxes share the classes. */
  #mmwOverlay{align-items:center;padding:10px;overflow:hidden;}
  #mmwOverlay .mmw-box{box-sizing:border-box;display:flex;flex-direction:column;max-height:calc(100vh - 20px);max-height:calc(100dvh - 20px);min-width:0;}
  #mmwOverlay .mmw-body{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;margin:0 -4px;padding:0 4px;}
  #mmwOverlay .mmw-head, #mmwOverlay .mmw-foot{flex:none;}
  .mmw-head{display:flex;align-items:center;gap:10px;margin-bottom:8px;}
  .mmw-head h2{flex:1;margin:0;font-family:var(--font-display);font-size:17px;}
  .mmw-x{border:none;background:transparent;font-size:22px;line-height:1;cursor:pointer;color:var(--ink-soft);padding:2px 6px;}
  .mmw-input{width:100%;box-sizing:border-box;font-size:16px;padding:10px 12px;border:2px solid var(--line);border-radius:10px;background:var(--paper-alt);color:var(--ink);}
  .mmw-hint{font-size:12px;color:var(--ink-soft);margin:8px 2px;}
  .mmw-names{display:flex;flex-direction:column;gap:6px;margin-top:10px;max-height:46vh;overflow-y:auto;}
  .mmw-name{text-align:left;font-size:14px;font-weight:700;padding:9px 12px;border:1.5px solid var(--line);border-radius:10px;background:var(--paper-alt);color:var(--ink);cursor:pointer;}
  .mmw-name small{display:block;font-weight:500;font-size:11.5px;color:var(--ink-soft);margin-top:2px;}
  .mmw-player{font-family:var(--font-display);font-size:17px;font-weight:800;margin:2px 2px 8px;}
  .mmw-card{border:1.5px solid var(--line);border-radius:10px;padding:9px 12px;margin-bottom:9px;background:var(--paper-alt);}
  .mmw-t{font-size:11.5px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;color:var(--ink-soft);margin-bottom:6px;}
  .mmw-card.mmw-done{background:#fff;opacity:.85;}
  .mmw-showdone{display:flex;align-items:center;gap:6px;margin:2px 0 9px;font-size:12.5px;color:var(--ink-soft);cursor:pointer;}
  .mmw-showdone input{width:auto;margin:0;}   /* v156 — a finished tournament, listed after the ones still being played */
  .mmw-next{font-size:14px;font-weight:800;background:var(--gold);color:#FFE066;border-radius:10px;padding:8px 11px;margin:4px 0 9px;line-height:1.35;}
  .mmw-next span.mmw-1l{font-size:11.5px;font-weight:600;color:#fff;opacity:.9;margin-top:4px;}
  .mmw-line{font-size:13px;font-weight:700;margin:4px 0;}
  /* v232 — "Maçım nerede?" gün rozeti (haftanın günü kendi renginde, bugün yeşil) + Programım'da gün başlığı */
  .mmw-day{display:inline-block;margin:0 6px 0 0;padding:1px 8px;border-radius:999px;font-size:11.5px;font-weight:800;letter-spacing:.2px;line-height:1.5;white-space:nowrap;vertical-align:1px;background:#e6e3ff;color:#3b2fb8;}
  .mmw-day.wd5{background:#fff0c2;color:#7a4b00;}
  .mmw-day.wd6{background:#d6f3ff;color:#00547a;}
  .mmw-day.wd0{background:#ffe0ea;color:#8a1240;}
  .mmw-day.today{background:#16a34a;color:#fff;}
  .mmw-next .mmw-next-k:has(.mmw-day){display:flex;align-items:center;white-space:nowrap;}
  .mmw-next .mmw-next-k .mmw-day{margin:0 0 0 6px;letter-spacing:.2px;min-width:0;overflow:hidden;text-overflow:ellipsis;}
  .mmw-dayhead{padding:8px 0 2px;border-top:1px solid var(--line);}
  .mmw-t + .mmw-dayhead{border-top:none;padding-top:2px;}
  .mmw-dayhead + .mmw-row{border-top:none;}
  /* v229 — SSTM (Swiss) turnuvasının kartı */
  .mmw-sw{display:inline-block;margin-left:4px;padding:0 5px;border-radius:4px;background:#5b4fe0;color:#fff;font-size:9.5px;letter-spacing:.5px;vertical-align:1px;}
  .mmw-row{display:flex;gap:8px;align-items:baseline;font-size:13px;padding:5px 0;border-top:1px solid var(--line);}
  .mmw-row:first-of-type{border-top:none;}
  .mmw-row .n{color:var(--ink-soft);font-size:11.5px;min-width:46px;font-family:'IBM Plex Mono',monospace;}
  .mmw-row .o{flex:1;min-width:0;font-weight:600;}
  .mmw-row .s{font-family:'IBM Plex Mono',monospace;font-weight:700;white-space:nowrap;}
  .mmw-row .w{color:#1e8e5a;} .mmw-row .l{color:#c0392b;}

  .mmw-row .o small.mmw-where{display:block;font-weight:500;font-size:11px;color:var(--ink-soft);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  /* v177 — code + WhatsApp on the name's own row; the "tournament · group · match" line is one row, the
     tournament name gives way (…) so the rest always shows */
  small.mmw-info{display:inline;white-space:nowrap;margin-left:6px;font-family:'IBM Plex Sans',sans-serif;font-size:11px;font-weight:500;color:var(--ink-soft);}
  small.mmw-info .mmw-wa{margin-left:4px;padding:1px 6px;}
  /* a little more room for the name column, so "NAME  Kod 1234 [wa]" fits one row on a phone */
  #mmwOverlay .mmw-row{gap:6px;}
  #mmwOverlay .mmw-row .n{min-width:40px;}
  #mmwOverlay .mmw-row .s{font-size:12px;}
  .mmw-1l{display:flex;min-width:0;white-space:nowrap;}
  .mmw-1l .mmw-tn{overflow:hidden;text-overflow:ellipsis;min-width:0;flex:0 1 auto;}
  .mmw-1l .mmw-rest{flex:none;}
  .mmw-row .o small.mmw-where.mmw-1l{display:flex;}
  .mmw-t{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .mmw-row .o small.mmw-clash{display:block;font-weight:700;font-size:11px;color:#c0392b;margin-top:2px;}
  .mmw-row.clash .n{color:#c0392b;font-weight:700;}
  .mmw-next .mmw-next-k{font-size:11px;letter-spacing:.6px;color:#fff;opacity:.9;font-weight:700;}
  /* v189 — Masa Kontrol on the next-match card */
  .mmw-next .mmw-next-st{display:inline-block;margin:5px 0 2px;padding:4px 10px;border-radius:8px;font-size:13px;font-weight:800;letter-spacing:.3px;}
  .mmw-next .mmw-next-st.called{background:#5B9BF0;color:#fff;animation:mmwStPulse 1.4s ease-in-out infinite;}
  .mmw-next .mmw-next-st.playing{background:#FFD84D;color:#3a2e00;}
  .mmw-next.st-called{box-shadow:0 0 0 3px #5B9BF0;}
  @keyframes mmwStPulse{0%,100%{opacity:1;}50%{opacity:.6;}}
  .mmw-next .mmw-next-big{display:flex;gap:16px;flex-wrap:wrap;font-family:var(--font-display);font-size:22px;line-height:1.15;margin:3px 0;}
  .mmw-next .mmw-next-opp{font-size:15px;font-weight:800;}
  .mmw-next small.mmw-next-info{display:inline;white-space:nowrap;margin-left:8px;font-size:11.5px;font-weight:600;color:#fff;opacity:.9;}
  .mmw-next small.mmw-next-info .mmw-wa{margin-left:6px;}
  .mmw-player small.mmw-pinfo{display:inline;white-space:nowrap;margin-left:8px;font-family:'IBM Plex Sans',sans-serif;font-size:11.5px;font-weight:500;color:var(--ink-soft);}
  .mmw-player small.mmw-pinfo .mmw-wa{margin-left:6px;}

  /* v112 — doubles & mixed pairs */
  .pr-box{max-width:820px !important;}
  .pr-tabs{display:flex;gap:6px;margin-bottom:10px;}
  .pr-tabs button{flex:1;font-size:15px;font-weight:800;padding:10px;border-radius:10px;border:2px solid var(--line);background:transparent;color:var(--ink);cursor:pointer;}
  .pr-tabs button.on{background:var(--gold);border-color:var(--gold);color:#FFE066;}
  .pr-tools{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:8px;}
  .pr-tools input,.pr-tools select{font-size:14px;padding:8px 10px;border:1.5px solid var(--line);border-radius:8px;background:var(--paper-alt);color:var(--ink);}
  .pr-tools input{flex:1;min-width:160px;}
  .pr-tools button{font-size:13.5px;font-weight:700;padding:8px 12px;border-radius:8px;border:1.5px solid var(--line);background:transparent;color:var(--ink);cursor:pointer;}
  .pr-tools button.pr-main{background:var(--gold);border-color:var(--gold);color:#FFE066;}
  .pr-table-wrap{max-height:55vh;overflow:auto;border:1px solid var(--line);border-radius:10px;}
  table.pr-table{width:100%;border-collapse:collapse;font-size:14px;}
  table.pr-table th{position:sticky;top:0;background:var(--paper-alt);text-align:left;font-size:12px;letter-spacing:.3px;color:var(--ink-soft);padding:8px 8px;border-bottom:1px solid var(--line);}
  table.pr-table td{padding:8px 8px;border-bottom:1px solid var(--line);vertical-align:top;}
  table.pr-table td.r{font-family:'IBM Plex Mono',monospace;font-weight:800;font-size:16px;white-space:nowrap;}
  table.pr-table small{display:block;color:var(--ink-soft);font-size:12px;margin-top:2px;}
  table.pr-table .warn{color:#c0392b;font-weight:700;}
  table.pr-table button.pr-x{border:none;background:transparent;color:#c0392b;font-size:18px;cursor:pointer;}
  .pr-report{font-size:13px;background:var(--paper-alt);border:1px dashed var(--line);border-radius:8px;padding:8px 10px;margin:6px 0 10px;white-space:pre-wrap;max-height:22vh;overflow:auto;}
  .pr-add{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:8px 0;}
  .pr-add select{width:100%;font-size:14px;padding:8px;border:1.5px solid var(--line);border-radius:8px;background:var(--paper-alt);color:var(--ink);}
  @media (max-width:640px){ .pr-add{grid-template-columns:1fr;} table.pr-table .pr-club{display:none;} }

  /* v114 — WhatsApp */
  .wa-btn{color:#fff !important;background:#1fa855 !important;border-color:#1fa855 !important;}
  .wa-btn:hover{background:#178a45 !important;}
  .mmw-wa{display:inline-flex;align-items:center;gap:3px;margin-left:8px;padding:2px 8px;font-size:12px;font-weight:700;line-height:1.4;border-radius:12px;border:1.5px solid #1fa855;background:#1fa855;color:#fff;cursor:pointer;vertical-align:1px;}
  .mmw-wa.wa-nophone{background:transparent;color:#1fa855;border-style:dashed;}
  .mmw-next .mmw-wa{border-color:#fff;}
  .mmw-next .mmw-wa.wa-nophone{color:#fff;}
  small > .mmw-wa:first-child{margin-left:0;}
  .wa-btn.wa-nophone{background:transparent !important;color:#1fa855 !important;border:1.5px dashed #1fa855 !important;}
  .wa-phone-row{display:flex;gap:8px;margin:6px 0 10px;}
  .wa-phone-row input{flex:1;font-size:17px;padding:10px 12px;border:2px solid var(--line);border-radius:10px;background:var(--paper-alt);color:var(--ink);}
  .wa-phone-row button{font-size:15px;font-weight:800;padding:10px 14px;border-radius:10px;border:none;background:#1fa855;color:#fff;cursor:pointer;}
  .wa-tpls{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 10px;}
  .wa-tpl{display:inline-flex;align-items:center;gap:4px;font-size:13px;font-weight:700;padding:7px 10px;border-radius:18px;border:1.5px solid var(--line);background:var(--paper-alt);color:var(--ink);cursor:pointer;}
  .wa-tpl.on{border-color:#1fa855;background:#e3f7ea;color:#14532d;}
  .wa-tpl .x{font-size:14px;color:#c0392b;padding-left:4px;}
  .wa-msg{width:100%;box-sizing:border-box;min-height:130px;font-size:15px;line-height:1.4;padding:10px 12px;border:2px solid var(--line);border-radius:10px;background:var(--paper-alt);color:var(--ink);font-family:'IBM Plex Sans',sans-serif;}
  .wa-keys{font-size:12px;color:var(--ink-soft);margin:6px 2px;}
  .wa-keys code{background:var(--paper-alt);border:1px solid var(--line);border-radius:4px;padding:0 4px;cursor:pointer;}
  .wa-send{width:100%;font-size:17px;font-weight:800;padding:13px;border-radius:11px;border:none;background:#1fa855;color:#fff;cursor:pointer;margin-top:8px;}
  .wa-warn{color:#c0392b;font-weight:700;font-size:13px;margin:4px 2px;}
  .mmw-foot{display:flex;gap:8px;flex-wrap:wrap;justify-content:space-between;margin-top:8px;}
  /* v110 — "where is my match" rows/next-match box double as a jump-to-that-match link (tap a name,
     land on its group/bracket card in the real tournament view) — see mmwGoToMatch(). */
  .mmw-goto{cursor:pointer;}
  .mmw-row.mmw-goto:hover, .mmw-row.mmw-goto:active{background:var(--paper-alt);margin:0 -14px;padding:6px 14px;border-radius:8px;}
  .mmw-next.mmw-goto:hover, .mmw-next.mmw-goto:active{filter:brightness(1.08);}

  /* v108 — referee score entry + admin inbox */
  .ref-list{display:flex;flex-direction:column;gap:6px;margin-top:6px;max-height:60vh;overflow-y:auto;}
  .ref-match{text-align:left;font-size:15px;padding:11px 12px;border:1.5px solid var(--line);border-radius:10px;background:var(--paper-alt);color:var(--ink);cursor:pointer;}
  .ref-match b{font-weight:800;} .ref-match small{display:block;color:var(--ink-soft);font-size:12.5px;margin-top:2px;}
  .ref-match.done{opacity:.55;}
  .ref-sets{display:grid;grid-template-columns:auto 1fr 1fr;gap:8px 10px;align-items:center;margin:10px 0;}
  .ref-sets .h{font-size:13px;font-weight:700;color:var(--ink-soft);text-align:center;}
  .ref-sets input{font-size:20px;text-align:center;padding:9px 6px;border:2px solid var(--line);border-radius:9px;background:var(--paper-alt);color:var(--ink);width:100%;box-sizing:border-box;}
  .ref-total{font-family:'IBM Plex Mono',monospace;font-size:26px;font-weight:800;text-align:center;margin:6px 0 10px;}
  .ref-send{width:100%;font-size:17px;font-weight:800;padding:13px;border-radius:11px;border:none;background:var(--gold);color:#FFE066;cursor:pointer;}
  .ref-ok{font-size:16px;font-weight:700;color:#1e8e5a;margin:10px 2px;}
  .inbox-btn{font-size:13px;font-weight:800;padding:5px 10px;border-radius:8px;border:2px solid #FFE066;background:#c0392b;color:#fff;cursor:pointer;}
  .inbox-row{border:1.5px solid var(--line);border-radius:10px;padding:10px 12px;margin-bottom:8px;background:var(--paper-alt);font-size:14.5px;}
  .inbox-row .warn{color:#c0392b;font-weight:700;font-size:13px;}
  .inbox-row .acts{display:flex;gap:8px;margin-top:8px;}
  .inbox-row .acts button{flex:1;font-size:14px;font-weight:800;padding:9px;border-radius:9px;border:1.5px solid var(--line);background:transparent;color:var(--ink);cursor:pointer;}
  .inbox-row .acts button.ok{background:#1e8e5a;border-color:#1e8e5a;color:#fff;}
  .mmw-foot button{font-size:12.5px;padding:7px 11px;border-radius:8px;border:1.5px solid var(--line);background:transparent;color:var(--ink);cursor:pointer;font-weight:700;}

  .text-scale-toggle button{flex:1;}

  /* both toggle groups now live inside the ⚙ Settings dropdown panel (a light card, see
     .dropdown-panel below) rather than inline in the dark header bar, so they're styled dark-on-light
     here rather than the old white-on-transparent — using the theme CSS vars means they still adapt
     correctly per Original/Minimalist without any separate [data-theme="minimalist"] override. */
  .lang-toggle{display:flex;gap:2px;border:1px solid var(--line);border-radius:6px;overflow:hidden;}
  .lang-toggle button{
    background:transparent;border:none;color:var(--ink-soft);font-family:var(--font-display);font-size:11px;
    font-weight:600;letter-spacing:0.4px;padding:6px 10px;cursor:pointer;border-radius:0;
  }
  .lang-toggle button.selected{background:var(--gold-soft);color:var(--ink);}
  .lang-toggle button:hover:not(.selected){background:var(--paper-alt);}

  .theme-toggle{display:flex;gap:2px;border:1px solid var(--line);border-radius:6px;overflow:hidden;}
  .theme-toggle button{
    background:transparent;border:none;color:var(--ink-soft);font-family:var(--font-display);font-size:11px;
    font-weight:600;letter-spacing:0.4px;padding:6px 10px;cursor:pointer;border-radius:0;text-transform:uppercase;
  }
  .theme-toggle button.selected{background:var(--gold-soft);color:var(--ink);}
  .theme-toggle button:hover:not(.selected){background:var(--paper-alt);}
  .settings-menu-panel-label{
    font-family:var(--font-display);font-weight:600;font-size:10px;text-transform:uppercase;
    letter-spacing:0.6px;color:var(--ink-soft);margin:6px 0 4px;padding:0 2px;
  }
  .settings-menu-panel-label:first-child{margin-top:2px;}

  /* ---- shared small dropdown menu: the header's ⚙ Settings menu and the tournament action menu
     both use this look + initDropdownMenu() (see JS) for open/close behavior ---- */
  .dropdown-menu{position:relative;display:inline-block;}
  .dropdown-panel{
    position:absolute;top:calc(100% + 6px);z-index:60;min-width:210px;
    background:var(--paper);border:1px solid var(--line);border-radius:8px;
    box-shadow:0 10px 28px rgba(0,0,0,0.22);padding:8px;display:flex;flex-direction:column;gap:2px;
  }
  .dropdown-panel.hidden{display:none;}
  .dropdown-panel button, .dropdown-panel a{
    width:100%;text-align:left;background:transparent;border:none;border-radius:6px;
    padding:8px 10px;font-family:'IBM Plex Sans',sans-serif;font-size:13px;font-weight:600;
    text-transform:none;letter-spacing:normal;color:var(--ink);cursor:pointer;
    text-decoration:none;display:block;box-sizing:border-box;
  }
  .dropdown-panel button:hover, .dropdown-panel a:hover{background:var(--paper-alt);}
  .dropdown-panel button.danger{color:var(--red);}
  .dropdown-panel button.danger:hover{background:rgba(199,62,44,0.1);}
  .dropdown-divider{height:1px;background:var(--line);margin:5px 2px;}
  /* right-aligned panels (header ones) would otherwise run off the edge of the viewport */
  .dropdown-panel.align-right{right:0;}
  /* .session-bar button and .session-admin-actions button (both class+element, same specificity as
     .dropdown-panel button above) are defined further down this stylesheet and would otherwise win
     the shared properties on source order alone, turning every menu item back into an uppercase pill
     button. Scoping the override to each actual parent container (two classes) beats them regardless
     of where either block sits in the file — same fix as #championWindowBtn/#championScreenSubtitle
     elsewhere in this file, just via container-scoping instead of an id. */
  .session-bar .dropdown-panel button,
  .session-admin-actions .dropdown-panel button{
    width:100%;text-align:left;background:transparent;border:none;border-radius:6px;
    padding:8px 10px;font-family:'IBM Plex Sans',sans-serif;font-size:13px;font-weight:600;
    text-transform:none;letter-spacing:normal;color:var(--ink);cursor:pointer;
  }
  .session-bar .dropdown-panel button:hover,
  .session-admin-actions .dropdown-panel button:hover{background:var(--paper-alt);}
  .session-admin-actions .dropdown-panel button.danger{background:transparent;color:var(--red);}
  .session-admin-actions .dropdown-panel button.danger:hover{background:rgba(199,62,44,0.1);}

  /* login screen — these are all full-page entry overlays (login, tournament-size picker,
     championship picker, champion/tournament-list screen, manage-championship modal), same
     fixed/centered/gradient-backdrop treatment as the in-app modal group below. This rule's body
     was accidentally lost at some point, leaving these five selectors dangling onto .mh-orphans's
     own unrelated margin/border rule below — which meant none of them got position:fixed or the
     centering, so each rendered as a plain in-flow block (left-aligned, roughly half width, no
     dark backdrop) instead of a proper full-screen overlay. Restored here, .mh-orphans back to its
     own rule. */
  #loginScreen, #sizeModal, #championshipPickScreen, #championScreen, #championManageModal{
    position:fixed;inset:0;background:linear-gradient(135deg,#3A2F8C,#2A2264);
    display:flex;align-items:center;justify-content:center;z-index:1000;padding:20px;
  }
  .mh-orphans{margin-top:10px;border-top:1px dashed var(--line);padding-top:8px;}
  .mh-orphan-note{font-size:11.5px;color:var(--ink-soft);margin:0 0 6px;}
  .mh-orphan-row{display:flex;align-items:center;gap:8px;font-size:12px;margin-bottom:5px;}
  .mh-orphan-name{font-weight:700;color:var(--ink);}
  .mh-orphan-meta{font-family:'IBM Plex Mono',monospace;font-size:11px;color:var(--ink-soft);}
  .mh-orphan-btn{font-family:var(--font-display);font-size:10.5px;font-weight:600;letter-spacing:0.4px;
    text-transform:uppercase;border:1px solid var(--red);border-radius:6px;background:transparent;
    color:var(--red);padding:4px 9px;cursor:pointer;margin-left:auto;}
  .mh-orphan-btn:hover{background:rgba(199,62,44,0.1);}
  .rr-recorded-line{font-size:11.5px;color:var(--ink-soft);margin:-4px 0 10px;}
  .rr-recorded-line.is-recorded{color:var(--gold);font-weight:600;}
  #recordResultsResetBtn:disabled{opacity:.45;cursor:not-allowed;}
  #playerModal, #playerImportModal, #loadFromDbModal, #recordResultsModal, #matchHistoryModal,
  #archiveModal, #tournamentListModal, #poolManageModal, #bulkDeleteModal, #champMatchListModal,
  #arenaDefsModal, #macroMindModal, #mtpActivityModal, #tpSlotModal, #seedListsModal, #mtpUsersModal{
    position:fixed;inset:0;background:linear-gradient(135deg,#3A2F8C,#2A2264);
    display:flex;align-items:center;justify-content:center;z-index:1000;padding:20px;
  }
  #mtpActivityModal .login-card{max-width:560px;max-height:88vh;overflow-y:auto;}
  /* v122 — 👥 Kullanıcılar ve Roller */
  #mtpUsersModal .login-card{max-width:820px;max-height:90vh;overflow-y:auto;}
  .usr-add{display:grid;grid-template-columns:1.2fr 1.4fr 1fr 1fr auto;gap:8px;align-items:end;margin:10px 0 14px;
    padding:12px;border:1px dashed var(--line);border-radius:10px;}
  .usr-add label{display:block;font-size:11px;font-weight:700;color:var(--muted,#666);margin-bottom:3px;}
  .usr-add input,.usr-add select,.usr-table select{width:100%;box-sizing:border-box;padding:7px 8px;border:1px solid var(--line);border-radius:7px;font:inherit;font-size:13px;}
  .usr-table{width:100%;border-collapse:collapse;font-size:13px;}
  .usr-table th{text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:.4px;color:var(--muted,#666);padding:6px;border-bottom:2px solid var(--line);}
  .usr-table td{padding:7px 6px;border-bottom:1px solid var(--line);vertical-align:middle;}
  .usr-table td.usr-mail{font-family:'IBM Plex Mono',monospace;font-size:12px;word-break:break-all;}
  .usr-badge{display:inline-block;font-size:10.5px;font-weight:800;padding:2px 8px;border-radius:20px;white-space:nowrap;}
  .usr-badge.superadmin{background:#3A2F8C;color:#FFE066;} .usr-badge.admin{background:#dfe7ff;color:#2A2264;}
  .usr-badge.disabled{background:#eee;color:#888;}
  .usr-table button{font-size:12px;padding:5px 9px;}
  #usrAddBtn{padding:8px 16px;border:0;border-radius:8px;background:var(--gold);color:#FFE066;font-weight:800;cursor:pointer;white-space:nowrap;}
  #usrAddBtn:disabled{opacity:.5;cursor:wait;}
  .usr-msg{margin:8px 0;padding:9px 12px;border-radius:8px;font-size:13px;display:none;white-space:pre-wrap;}
  .usr-msg.ok{display:block;background:#e7f7ec;color:#14532d;} .usr-msg.err{display:block;background:#fde8e8;color:#7f1d1d;}
  @media (max-width:640px){ .usr-add{grid-template-columns:1fr;} .usr-table th:nth-child(4),.usr-table td:nth-child(4){display:none;} }
  .ttg-version-badge{display:inline-block;font-family:'IBM Plex Mono',monospace;font-size:8.5px;font-weight:700;
    color:var(--ink-soft);background:var(--paper-alt,#F4F5FB);border:1px solid var(--line);border-radius:10px;
    padding:1px 7px;margin-left:6px;vertical-align:middle;cursor:pointer;}
  #loginScreen.hidden, #championshipPickScreen.hidden, #championScreen.hidden{display:none;}
  .login-card{
    background:var(--paper);border-radius:12px;padding:32px 30px;max-width:380px;width:100%;
    box-shadow:0 8px 30px rgba(0,0,0,0.3);
  }
  #championManageModal .login-card, #poolManageModal .login-card{max-width:440px;}
  #champMatchListModal .login-card{max-width:1100px;max-height:90vh;overflow-y:auto;}
  #timeTableGridModal .login-card{max-width:96vw;max-height:90vh;overflow-y:auto;}
  #bulkDeleteModal .login-card{max-width:480px;max-height:88vh;overflow-y:auto;}
  #arenaDefsModal .login-card{max-width:560px;max-height:88vh;overflow-y:auto;}
  /* MacroMind — scenario checkpoints for one tournament (players, groups, schedule, scores), see
     macroMindSaveScenario()/macroMindRecall(). Same list-of-rows shape as #archiveModal/#backupModal
     (.archive-row), just a bit wider since each row carries a label plus a two-line meta block
     (championship + saved-by/when). */
  #macroMindModal .login-card{max-width:620px;max-height:88vh;overflow-y:auto;}
  .macromind-row-info{display:flex;flex-direction:column;gap:1px;min-width:0;}
  .macromind-row-champ{font-size:11px;color:var(--gold);font-weight:600;}
  /* one Place's editable row in the ArenaDefs list — its own name + table-priority inputs (kept live-
     editable right in the row, no separate "edit mode" toggle) plus Save/Delete. Priority uses the same
     monospace treatment as the app's other numeric/table inputs so a long digit sequence stays easy to
     scan and compare against the printed venue layout. */
  .arena-defs-row-inputs{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0;}
  .arena-defs-row-inputs input{
    border:1px solid var(--line);border-radius:6px;padding:6px 8px;font-family:'IBM Plex Sans',sans-serif;
    font-size:13px;color:var(--ink);background:var(--paper);width:100%;
  }
  .arena-defs-row-inputs input.arena-defs-priority-input{font-family:'IBM Plex Mono',monospace;font-size:12.5px;}
  /* v309 — halls: table count · hall count · split button, then one line per hall */
  .arena-defs-halls{display:flex;flex-direction:column;gap:4px;}
  .arena-defs-halls-row{display:flex;gap:6px;align-items:center;flex-wrap:wrap;}
  .arena-defs-halls-row input[type=number]{width:96px;}
  .arena-defs-halls-row button{width:auto;margin:0;padding:6px 10px;}
  textarea.arena-defs-halls-text{width:100%;box-sizing:border-box;font-family:'IBM Plex Mono',monospace;font-size:12.5px;resize:vertical;}
  .arena-defs-add-card{
    border:1px dashed var(--line);border-radius:8px;padding:12px;margin-top:4px;display:flex;flex-direction:column;gap:8px;
  }
  .bulk-delete-preview-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px;
    font-family:'IBM Plex Sans',sans-serif;font-size:12.5px;font-weight:600;color:var(--ink-soft);}
  .bulk-delete-preview-actions{display:flex;gap:10px;}
  .link-btn{background:none;border:none;padding:0;color:var(--gold);font-family:'IBM Plex Sans',sans-serif;
    font-size:12px;font-weight:600;cursor:pointer;text-decoration:underline;}
  .link-btn:hover{color:var(--ink);}
  .champion-list{display:flex;flex-direction:column;gap:8px;max-height:320px;overflow-y:auto;}
  /* the tournament list inside one championship (#championList, tier 2 of the picker) — two columns,
     wide enough that most tournament names fit on one line; collapses to one column on narrow screens */
  #championScreen .login-card{max-width:560px;}
  #championList{
    display:grid;grid-template-columns:1fr 1fr;gap:8px;
    max-height:420px;overflow-y:auto;align-content:start;
  }
  @media (max-width:640px){
    #championScreen .login-card{max-width:380px;}
    #championList{grid-template-columns:1fr;}
  }
  .champion-item{
    width:100%;text-align:left;padding:11px 14px;border:1px solid var(--line);border-radius:8px;
    background:var(--paper-alt);color:var(--ink);font-family:'IBM Plex Sans',sans-serif;font-size:13.5px;
    font-weight:600;cursor:pointer;transition:background 0.15s,border-color 0.15s;
  }
  .champion-item:hover{background:var(--gold-soft);border-color:var(--gold);}
  /* the championship's own name — the headline of the tier-2 tournament picker, so it's the single
     biggest piece of text on that screen (bigger than the "Tournament Manager"/"Championship" labels
     above it) and doubles as a clickable "back to championship list" link; see championSubtitleClicked().
     Uses the #championScreenSubtitle id (rather than just the .champion-subtitle class) because
     .login-card p{font-size:12px;...} (class+element, higher specificity than a bare class) would
     otherwise win over font-size/color/line-height here regardless of source order. */
  .champion-subtitle{text-transform:uppercase;cursor:pointer;display:inline-block;}
  #championScreenSubtitle{
    font-family:var(--font-display);font-weight:700;font-size:26px;
    letter-spacing:0.4px;color:var(--ink);margin:2px 0 8px !important;line-height:1.25;
  }
  .champion-subtitle:hover, .champion-subtitle:focus-visible{color:var(--gold);outline:none;}
  .champion-subtitle:empty{display:none;cursor:default;}
  /* center the whole tier-2 header block (eyebrow / "Championship" / championship name / helper text);
     .champion-item keeps its own text-align:left below so the tournament buttons stay left-aligned */
  #championScreen .login-card{text-align:center;}
  .champion-checklist{
    max-height:260px;overflow-y:auto;display:flex;flex-direction:column;gap:2px;margin-bottom:14px;
    border:1px solid var(--line);border-radius:8px;padding:8px 10px;
  }
  .champion-check-row{display:flex;align-items:center;gap:8px;padding:6px 2px;font-size:13px;color:var(--ink);cursor:pointer;}
  .champion-check-row input{width:auto;}
  /* drag-to-reorder handle — only in the championship management checklist (#championChecklist), which
     controls the order tournaments appear in on the visitor-facing picker; see initChampionChecklistDnd() */
  .champion-drag-handle{
    cursor:grab;color:var(--ink-soft);font-size:13px;line-height:1;padding:2px 5px;user-select:none;
    flex:0 0 auto;letter-spacing:-1px;
  }
  .champion-drag-handle:active{cursor:grabbing;}
  #championChecklist .champion-check-row.dragging{opacity:0.35;}
  #archiveModal .login-card, #tournamentListModal .login-card{max-width:560px;}
  #backupModal .login-card{max-width:520px;max-height:88vh;overflow-y:auto;}
  .backup-oneclick{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:8px;}
  .backup-oneclick button{
    flex:1 1 180px;font-family:'IBM Plex Sans',sans-serif;font-size:13.5px;font-weight:700;
    padding:12px 12px;border-radius:10px;border:1px solid var(--accent, #3B4CCA);
    background:var(--accent, #3B4CCA);color:#fff;cursor:pointer;
  }
  .backup-oneclick button:hover{filter:brightness(1.08);}
  .backup-oneclick button:disabled{opacity:.55;cursor:default;filter:none;}
  .backup-best{font-size:12px;color:var(--ink-soft);margin:0 0 12px;min-height:15px;}
  .backup-actions{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px;}
  .backup-actions button{
    flex:1 1 auto;font-family:'IBM Plex Sans',sans-serif;font-size:12.5px;font-weight:600;
    padding:8px 10px;border-radius:8px;border:1px solid var(--line);background:var(--paper);
    color:var(--ink);cursor:pointer;
  }
  .backup-actions button:hover{background:var(--paper-2, #F3F4FB);}
  .health-pill{
    background:rgba(255,255,255,0.14);border:1px solid rgba(255,255,255,0.32);border-radius:999px;
    color:#fff;font-family:'IBM Plex Mono',monospace;font-size:11px;font-weight:600;
    padding:3px 9px;cursor:pointer;line-height:1.5;white-space:nowrap;
  }
  .health-pill:hover{background:rgba(255,255,255,0.26);}
  .health-pill.warn{background:rgba(230,170,40,0.30);border-color:rgba(255,215,140,0.6);}
  .health-pill.bad{background:rgba(230,70,70,0.34);border-color:rgba(255,160,160,0.65);}
  #healthModal .login-card{max-width:460px;max-height:88vh;overflow-y:auto;}
  .health-row{display:flex;justify-content:space-between;gap:14px;padding:6px 0;border-bottom:1px dotted var(--line);
    font-family:'IBM Plex Sans',sans-serif;font-size:12.5px;}
  .health-row:last-child{border-bottom:none;}
  .health-row .hk{color:var(--ink-soft);}
  .health-row .hv{font-family:'IBM Plex Mono',monospace;font-weight:700;color:var(--ink);text-align:right;}
  .health-row .hv.warn{color:#8a5a10;}
  .health-row .hv.bad{color:#a52020;}
  .health-sec{font-family:var(--font-display);text-transform:uppercase;letter-spacing:.6px;font-size:11.5px;
    color:var(--accent-dark);margin:14px 0 4px;}
  .health-sec:first-child{margin-top:0;}
  .health-note{font-family:'IBM Plex Sans',sans-serif;font-size:11.5px;color:var(--ink-soft);
    line-height:1.5;margin:8px 0 0;}
  .archive-list{
    max-height:320px;overflow-y:auto;display:flex;flex-direction:column;gap:6px;margin-bottom:14px;
  }
  .archive-row{
    display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 12px;
    border:1px solid var(--line);border-radius:8px;background:var(--paper-alt);flex-wrap:wrap;
  }
  .archive-row-info{display:flex;flex-direction:column;gap:1px;min-width:0;}
  .archive-row-name{font-family:'IBM Plex Sans',sans-serif;font-weight:600;font-size:13.5px;color:var(--ink);
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .archive-row-name .archive-row-current-tag{
    font-family:var(--font-display);font-weight:600;font-size:10.5px;letter-spacing:0.4px;text-transform:uppercase;
    color:var(--gold);border:1px solid var(--gold);border-radius:4px;padding:1px 5px;margin-left:7px;vertical-align:1px;
  }
  .archive-row-date{font-size:11px;color:var(--ink-soft);}
  .archive-row-actions{display:flex;gap:6px;flex:0 0 auto;flex-wrap:wrap;}
  .archive-row-actions button{
    font-family:var(--font-display);font-weight:500;font-size:10px;letter-spacing:0.4px;text-transform:uppercase;
    border:1px solid var(--ink);border-radius:6px;background:var(--ink);color:var(--paper);padding:5px 8px;cursor:pointer;
  }
  .archive-row-actions button:hover{background:var(--slate);}
  .archive-row-actions button.danger{background:var(--red);border-color:var(--red);}
  .archive-row-actions button.danger:hover{background:#9E2E22;}
  /* Tournament List modal only: Open/Rename/Duplicate/Archive get the warm cream treatment
     (same --gold/--gold-soft pairing already used for selected/highlighted states elsewhere)
     instead of the dark ink fill above; Delete stays red so it still reads as the destructive one. */
  #tournamentListModal .archive-row-actions button:not(.danger){
    background:var(--gold-soft);color:var(--ink);border-color:var(--gold);
  }
  #tournamentListModal .archive-row-actions button:not(.danger):hover{filter:brightness(0.95);}
  .champion-empty-hint{font-size:12px;color:var(--ink-soft);}
  /* v83 — bulk archive/restore bar (Tournament List + Archived Tournaments modals) */
  .tl-bulk-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:4px 0 10px;padding:8px 10px;
    border:1px dashed var(--line);border-radius:8px;background:var(--paper);}
  .tl-bulk-bar label{display:inline-flex;align-items:center;gap:6px;font-family:'IBM Plex Sans',sans-serif;
    font-size:12.5px;font-weight:600;color:var(--ink);cursor:pointer;margin:0;}
  .tl-bulk-bar select{font-size:12px;padding:4px 6px;border:1px solid var(--line);border-radius:6px;
    background:var(--paper-alt);color:var(--ink);width:auto;}
  .tl-bulk-bar button{font-family:var(--font-display);font-weight:600;font-size:10.5px;letter-spacing:0.4px;
    text-transform:uppercase;border:1px solid var(--gold);border-radius:6px;background:var(--gold-soft);
    color:var(--ink);padding:6px 9px;cursor:pointer;width:auto;margin:0;}
  .tl-bulk-bar button.tl-primary{background:var(--gold);color:#FFE066;}
  .tl-bulk-bar button:disabled{opacity:0.45;cursor:not-allowed;}
  .tl-bulk-bar .tl-spacer{flex:1 1 auto;}
  .archive-row .tl-row-check{flex:0 0 auto;width:18px;height:18px;margin:0;cursor:pointer;accent-color:var(--gold);}
  .archive-row.tl-checked{border-color:var(--gold);background:var(--gold-soft);}
  .archive-row .tl-row-left{display:flex;align-items:center;gap:10px;min-width:0;flex:0 1 auto;}
  .archive-row-date .tl-idle{color:var(--red);font-weight:600;margin-left:6px;}
  /* v147 — tournament date box in each Tournament List row (v324: after the name) */
  #tournamentListModal .tl-row-left{flex:1 1 100%;flex-wrap:wrap;gap:6px 10px;}
  #tournamentListModal .archive-row-info{flex:1 1 130px;}
  #tournamentListModal .archive-row-name{white-space:normal;overflow-wrap:anywhere;}
  #tournamentListModal .archive-row .tl-date{flex:0 1 auto;}
  #tournamentListModal .archive-row-actions{flex:0 1 auto;}
  .archive-row .tl-date{flex:0 0 auto;margin:0;display:inline-flex;}
  .archive-row .tl-date-input{font-family:'IBM Plex Mono',monospace;font-size:12.5px;font-weight:700;color:var(--ink);
    padding:4px 6px;border:1.5px solid var(--gold);border-radius:7px;background:#fff;width:auto;min-width:0;margin:0;}
  .archive-row .tl-date.tl-date-fromname .tl-date-input:first-child{border-style:dashed;font-weight:500;}
  .archive-row .tl-date{align-items:center;gap:4px;flex-wrap:wrap;}
  .archive-row .tl-date-dash{color:var(--ink-soft);font-weight:700;}
  .archive-row .tl-date-end:not(:focus):invalid, .archive-row .tl-date-end[value=""]{opacity:.7;}
  .archive-row .tl-ko2{display:inline-flex;align-items:center;gap:3px;font-size:11.5px;font-weight:700;color:var(--ink);cursor:pointer;margin:0 0 0 4px;}
  #championManageActions{margin-bottom:14px;}
  .login-card .num{
    font-family:var(--font-display);font-weight:700;font-size:14px;color:var(--gold);line-height:1.3;
    letter-spacing:1.2px;text-transform:uppercase;display:block;
  }
  .login-card h2{
    font-family:var(--font-display);font-weight:600;font-size:16px;text-transform:uppercase;
    letter-spacing:1px;margin:6px 0 4px;
  }
  .login-card p{font-size:12px;color:var(--ink-soft);margin:0 0 18px;line-height:1.5;}
  .login-field{margin-bottom:14px;}
  .login-field label{
    display:block;font-family:var(--font-display);font-size:10.5px;text-transform:uppercase;
    letter-spacing:0.6px;color:var(--ink-soft);margin-bottom:5px;
  }
  .login-field input, .login-field select{
    width:100%;padding:9px 10px;border:1px solid var(--line);border-radius:7px;background:var(--paper-alt);
    font-family:'IBM Plex Sans',sans-serif;font-size:13.5px;color:var(--ink);
  }
  .login-field input:focus, .login-field select:focus{outline:none;border-color:var(--gold);}
  .role-toggle{display:flex;gap:8px;}
  .role-toggle button{
    flex:1;padding:9px 8px;border:1px solid var(--line);border-radius:7px;background:var(--paper-alt);
    font-family:var(--font-display);font-size:11.5px;letter-spacing:0.5px;text-transform:uppercase;
    color:var(--ink-soft);cursor:pointer;
  }
  .role-toggle button.selected{background:var(--gold);color:#fff;border-color:var(--gold);}
  #loginSubmit{
    width:100%;padding:11px;border:none;border-radius:7px;background:var(--ink);color:var(--paper);
    font-family:var(--font-display);font-weight:600;font-size:13px;letter-spacing:0.6px;text-transform:uppercase;
    cursor:pointer;margin-top:4px;
  }
  #loginSubmit:hover{background:var(--slate);}
  .login-error{
    font-size:11.5px;color:var(--red);margin-top:8px;display:none;font-family:'IBM Plex Mono',monospace;
  }
  .login-error.show{display:block;}
  .viewer-banner{
    display:none;background:var(--gold-soft);color:var(--ink);font-family:'IBM Plex Mono',monospace;
    font-size:11.5px;padding:8px 14px;text-align:center;border-radius:8px;margin-bottom:16px;
  }
  .viewer-banner.show{display:block;}

  /* session manager */
  .session-manager{
    display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:14px;margin-bottom:16px;padding:10px 14px;
    background:var(--paper-alt);border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow);
  }
  @keyframes pulseHighlight{
    0%{ box-shadow:0 0 0 0 rgba(91,79,224,0.45); }
    70%{ box-shadow:0 0 0 10px rgba(91,79,224,0); }
    100%{ box-shadow:0 0 0 0 rgba(91,79,224,0); }
  }
  .session-manager.pulse-highlight{
    animation:pulseHighlight 0.9s ease-out;
    border-color:var(--gold);
  }
  .session-manager label{
    font-family:var(--font-display);font-weight:600;font-size:11px;text-transform:uppercase;
    letter-spacing:0.6px;color:var(--ink-soft);
  }
  .session-manager select{
    font-family:'IBM Plex Sans',sans-serif;font-size:15px;font-weight:700;padding:9px 12px;
    border:1px solid var(--line);border-radius:6px;background:var(--paper);color:var(--ink);
    max-width:320px;cursor:pointer;
    /* long championship/tournament names (e.g. "Recovered championship — 03/09/2026, 16:56") were
       stretching this box out instead of staying inside max-width — text-overflow only takes effect
       on a <select>'s own closed-state box (not its dropdown list) with overflow+white-space set too;
       supported in Chromium/Firefox, which is what this app targets (18 Sep 2026, by request). */
    overflow:hidden;white-space:nowrap;text-overflow:ellipsis;
  }
  .session-manager select:hover{border-color:var(--gold);}
  .session-manager select:focus{outline:none;border-color:var(--gold);}
  /* "Last saved HH:MM:SS by user@email" was more detail than needed in this row — hidden rather than
     removed from the DOM, since renderSessionBar() still writes to it (harmless when hidden). The
     margin-left:auto that used to live here moved to .share-btn below, so that layout still holds with
     this element display:none. */
  .session-meta{
    display:none;
  }
  /* was the same creamy gold look as the Tournament List modal's buttons, switched to green (18 Sep
     2026, by request) — a soft tint of the same --green used for the "Copied!" flash below, so the
     flash still reads as a distinct, more saturated state rather than looking identical to idle. */
  .share-btn{
    font-family:var(--font-display);font-weight:600;font-size:10.5px;letter-spacing:0.4px;text-transform:uppercase;
    border:1px solid var(--green);border-radius:6px;background:#D6F5EE;color:var(--ink);padding:6px 10px;cursor:pointer;
    transition:background 0.15s,filter 0.15s;margin-left:auto;
  }
  .share-btn:hover{filter:brightness(0.95);}
  .share-btn.copied{background:var(--green);border-color:var(--green);color:#fff;}
  .share-btn-icon{margin-right:4px;}
  .share-btn-icon:empty{margin-right:0;}
  /* the groups-title-row spot (next to Print All Groups) doesn't want the session-manager row's
     margin-left:auto — that row's own h2.section-title{flex:1 1 auto} already pushes everything after
     it to the right edge, so .share-btn's push-itself-right trick would just be redundant here. */
  .groups-title-row-btn{margin-left:0;flex:0 0 auto;}

  /* label-above-select pairing for the new Championship/Tournament selectors — each stacks its
     label over its own <select>, side by side as two columns (see .session-manager below) */
  /* align-self:flex-end so both groups' <select> elements sit on the same bottom line regardless of
     their "label" being different heights (Championship's is a whole button, Tournament's is plain
     text) — .session-manager's align-items:center would otherwise center each stack as a block and
     leave the two selects visibly offset from each other */
  .selector-group{display:flex;flex-direction:column;gap:3px;align-self:flex-end;}
  .session-admin-actions{display:flex;gap:6px;flex-wrap:wrap;}
  /* Share no longer sits in the session-manager row at all (moved to groups-title-row, 18 Sep 2026),
     so #sessionAdminActions is back to being the row's own first trailing item — same scoped-by-id
     reasoning as before: #championManageActions/#poolManageActions elsewhere reuse the .session-admin-
     actions class for its button styling only, they don't want this push-right behavior. */
  #sessionAdminActions{margin-left:auto;}
  .session-admin-actions button{
    font-family:var(--font-display);font-weight:500;font-size:10.5px;letter-spacing:0.4px;text-transform:uppercase;
    border:1px solid var(--ink);border-radius:6px;background:var(--ink);color:var(--paper);padding:6px 10px;cursor:pointer;
  }
  .session-admin-actions button:hover{background:var(--slate);}
  .session-admin-actions button.danger{background:var(--red);border-color:var(--red);}
  .session-admin-actions button.danger:hover{background:#9E2E22;}

  /* tabs — wraps onto a second row instead of horizontally scrolling once there isn't room for
     every tab (7 tabs no longer reliably fit one row below ~1140px window width): a scrolling tab
     bar has no visible affordance hinting more tabs exist off-screen, so tabs that don't fit would
     be silently invisible rather than just wrapped into view. */
  nav.tabs, nav.pm-tabs{
    display:flex;flex-wrap:wrap;gap:2px;margin:22px 0 0;border-bottom:1px solid var(--line);
  }
  nav.tabs button, nav.pm-tabs button{
    font-family:var(--font-display);font-weight:500;font-size:13.5px;letter-spacing:0.8px;
    text-transform:uppercase;background:none;border:none;border-bottom:3px solid transparent;
    padding:10px 16px;color:var(--ink-soft);cursor:pointer;white-space:nowrap;
    border-radius:8px 8px 0 0;
  }
  nav.tabs button.active, nav.pm-tabs button.active{color:var(--ink);border-bottom-color:var(--gold);background:var(--paper-alt);}
  nav.tabs button:hover, nav.pm-tabs button:hover{color:var(--ink);}

  section.panel{display:none;padding-top:22px;}
  section.panel.active{display:block;}

  /* Player Database module — a standalone full-screen overlay reachable from the header regardless
     of which tournament is currently open, holding the Player List + Rankings panels (moved here out
     of the per-tournament nav.tabs so the roster/rankings are shared across every tournament instead
     of scoped to whichever one happens to be selected). Reuses .login-card's paper/shadow styling but
     wider, since the roster table needs real width. */
  #playerModuleScreen{
    position:fixed;inset:0;background:linear-gradient(135deg,#3A2F8C,#2A2264);
    display:flex;align-items:flex-start;justify-content:center;z-index:950;padding:26px 20px;
    overflow-y:auto;
  }
  .player-module-card{
    background:var(--paper);border-radius:12px;padding:26px 28px 30px;max-width:1180px;width:100%;
    box-shadow:0 8px 30px rgba(0,0,0,0.3);
  }
  [data-theme="minimalist"] .player-module-card{ box-shadow:none;border:1px solid var(--line); }
  .player-module-head{
    display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;
    margin-bottom:4px;
  }
  .player-module-head-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
  .player-module-head h2{margin:0;}

  h2.section-title{
    font-family:var(--font-display);font-weight:600;font-size:17px;text-transform:uppercase;
    letter-spacing:1px;margin:0 0 4px;
  }
  p.section-sub{font-size:12.5px;color:var(--ink-soft);margin:0 0 18px;max-width:720px;line-height:1.5;}
  /* the Groups panel's title line, with the "print every group" action pushed to the far right */
  .groups-title-row{display:flex;align-items:center;gap:12px;margin:0 0 4px;}
  .groups-title-row h2.section-title{margin:0;flex:1 1 auto;}
  .tday-field{display:inline-flex;align-items:center;gap:6px;font-family:var(--font-display);font-size:11px;font-weight:700;
    letter-spacing:.04em;text-transform:uppercase;color:var(--ink-soft);}
  .tday-field select{font:inherit;text-transform:none;letter-spacing:0;font-size:12.5px;color:var(--ink);padding:4px 6px;
    border:1px solid var(--line);border-radius:6px;background:var(--paper-alt);}
  .tday-field.tday-empty select{border-color:var(--gold);background:#FFF7DD;}
  .tday-field input[type=time]{font:inherit;text-transform:none;letter-spacing:0;font-size:12.5px;color:var(--ink);padding:3px 6px;
    border:1px solid var(--line);border-radius:6px;background:var(--paper-alt);}
  .tday-field.tday-empty input[type=time]{border-color:var(--gold);background:#FFF7DD;}
  .arena-group-btn{margin-left:4px;}
  /* v209 — the Arena buttons double as drag handles onto the Arena grid */
  .mtp-arena-drag{cursor:grab;}
  .group-card .head .head-label.mtp-arena-drag{user-select:none;}
  .mtp-arena-drag:active{cursor:grabbing;}
  .arena-match-btn{margin-left:2px;}
  #timeTableArenaLink{position:relative;}
  .arena-unsched{display:inline-block;min-width:18px;margin-left:6px;padding:1px 5px;border-radius:9px;background:#fff;color:#B3261E;
    font-size:11px;font-weight:800;line-height:16px;text-align:center;vertical-align:1px;}
  .group-card.has-conflict{border-color:#D93025;box-shadow:0 0 0 2px rgba(217,48,37,0.35), var(--shadow);}
  .group-conflict-badge{background:#FDECEC;color:#8C1D18;border-bottom:1px solid #F3B8B4;padding:6px 10px;font-size:11px;line-height:1.35;}
  .group-conflict-badge b{display:block;margin-bottom:2px;}
  .print-all-groups-btn{
    flex:0 0 auto;display:inline-flex;align-items:center;gap:5px;
    background:var(--paper-alt);color:var(--ink);border:1px solid var(--line);border-radius:7px;
    padding:5px 10px;font-family:var(--font-display);font-size:11.5px;font-weight:600;
    letter-spacing:0.6px;text-transform:uppercase;cursor:pointer;
  }
  .print-all-groups-btn:hover{border-color:var(--gold);color:var(--gold);}
  /* the ✎ on a first-round bracket row, and how a row looks while it is being dragged onto */
  .bslot-edit-btn{
    background:transparent;border:1px solid var(--line);border-radius:5px;color:var(--ink-soft);
    font-size:10px;line-height:1;padding:2px 4px;margin-left:4px;cursor:pointer;flex:0 0 auto;
  }
  .bslot-edit-btn:hover{border-color:var(--gold);color:var(--gold);}
  .bmatch .row.bslot-draggable{cursor:grab;}
  .bmatch .row.bslot-drop{outline:2px solid var(--gold);outline-offset:-2px;}
  .print-group-tname{display:none;} /* only ever shown in the single-group print view, see @media print */
  .print-extra{display:none;}
  .players input.player-loc-input, .players input.player-club-input{ color:var(--ink) !important; }
  .players input.roster-dup{ background:#FFE066 !important; border-color:#E0B400 !important; color:#1d1a3a !important; }
  .gps{display:none;}
  /* v124 — viewers: no Player Pool / Arena buttons, no Çakışma (conflict) column.
     v138 — but the Şampiyona + Turnuva Kategorisi selectors ARE shown to viewers ("in user mode this must
     be seen"); only the admin-only pieces of that row stay hidden. */
  body:not(.admin-mode) #goRankingsBtn,   /* v237 — Rankings is admin-only */
  body:not(.admin-mode) .session-manager #playerModuleBtn,
  body:not(.admin-mode) .session-manager #timeTableArenaLink,
  body:not(.admin-mode) .session-manager #sessionAdminActions,
  body:not(.admin-mode) #manageChampionBtn,
  body:not(.admin-mode) #champMatchListMenuBtn{display:none !important;}
  body.viewer-mode .tp-conf-col{display:none !important;}
  .print-sets-row{display:none;} /* the blank "5 sets" scoring boxes — only ever shown in the single-group print view, see @media print */

  /* group grid */
  .group-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px;}

  #deconflictLocationsBtn{ margin-bottom:14px; }
  .swap-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;}
  .swap-card{
    background:var(--paper);border:1px solid var(--line);border-radius:8px;padding:8px 10px;
    cursor:grab;user-select:none;transition:transform 0.12s,box-shadow 0.12s,border-color 0.12s,background 0.12s;
  }
  .swap-card:active{cursor:grabbing;}
  .swap-card .swap-tag{
    font-family:var(--font-display);font-weight:600;font-size:10.5px;text-transform:uppercase;
    letter-spacing:0.5px;color:var(--ink-soft);display:block;margin-bottom:3px;
  }
  .swap-card .swap-name{
    font-family:'IBM Plex Sans',sans-serif;font-weight:600;font-size:13px;color:var(--ink);
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  }
  .swap-card .swap-loc{
    display:block;font-family:'IBM Plex Sans',sans-serif;font-size:10.5px;color:var(--ink-soft);
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:1px;
  }
  .swap-card .swap-club{
    display:block;font-family:'IBM Plex Sans',sans-serif;font-size:10.5px;font-style:italic;color:var(--ink-soft);
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:1px;
  }
  .swap-card.drag-over{border-color:var(--gold);box-shadow:0 0 0 2px var(--gold);transform:scale(1.03);}
  .swap-card.dragging{opacity:0.4;}
  .swap-card.selected{border-color:var(--gold);background:var(--gold-soft);box-shadow:0 0 0 2px var(--gold);}
  .swap-card.swap-changed{ background:#E3F7EE; border-color:var(--green); }
  .swap-card.dup-location{border-color:var(--red);background:#FBEAE8;}
  /* v222 — the picked card and the drop target show over the green (changed) / red (conflict) tints */
  #swapGrid .swap-card.selected{border-color:#E8A33D;background:#FFF1D6;box-shadow:0 0 0 3px #E8A33D;transform:scale(1.03);}
  #swapGrid .swap-card.drag-over{border-color:#E8A33D;box-shadow:0 0 0 3px #E8A33D;}
  .swap-hint{font-size:12.5px;color:var(--ink-soft);margin:0 0 10px;min-height:17px;}
  .swap-hint.picked{color:#8a5a00;font-weight:700;}
  .swap-hint.done{color:#1f7a55;font-weight:700;}
  /* v134 — il · kulüp on one line under the name; only the part that clashes is yellow */
  .swap-card .swap-meta{ display:block; margin-top:2px; font-family:'IBM Plex Sans',sans-serif; font-size:11px; color:var(--ink-soft);
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .swap-card .swap-meta .swap-loc, .swap-card .swap-meta .swap-club{ display:inline; margin:0; font-size:inherit; }
  .swap-card .swap-meta .swap-club{ font-style:normal; }
  .swap-card .swap-sep{ color:var(--ink-soft); }
  .swap-card .swap-loc.swap-dup, .swap-card .swap-club.swap-dup{ background:#FFE066; color:#1d1a3a !important; font-weight:700; border-radius:3px; padding:0 4px; }
  /* v156 — the card is two lines: "GRUP A · 1 · kulüp · il" on top, the name under it */
  .swap-card .swap-line1{ display:flex; align-items:baseline; gap:0; min-width:0; margin-bottom:3px; }
  .swap-card .swap-line1 .swap-tag{ display:inline; margin-bottom:0; flex:0 0 auto; white-space:nowrap; }
  .swap-card .swap-line1 .swap-meta{ display:block; margin-top:0; min-width:0; flex:1 1 auto; font-size:10.5px; }
  .swap-card .swap-line1 .swap-meta::before{ content:' · '; white-space:pre; color:var(--ink-soft); }

  .tournament-player-list-wrap{margin-top:24px;border-top:1px solid var(--line);padding-top:18px;}
  .tournament-player-list-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:10px;}
  .tournament-player-list-head h3{font-family:var(--font-display);font-size:16px;text-transform:uppercase;letter-spacing:.8px;margin:0 0 3px;}
  .tournament-player-list-head p{font-size:11.5px;color:var(--ink-soft);margin:0;}
  .tournament-player-count{font-family:'IBM Plex Mono',monospace;font-size:11px;color:var(--ink-soft);white-space:nowrap;}
  .tournament-player-table-scroll{overflow:auto;border:1px solid var(--line);border-radius:9px;background:var(--paper);}
  .tournament-player-table{width:100%;border-collapse:collapse;min-width:720px;}
  .tournament-player-table th{font-family:var(--font-display);text-transform:uppercase;letter-spacing:.55px;font-size:10px;text-align:left;background:var(--paper-alt);color:var(--ink-soft);padding:7px 8px;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:1;}
  .tournament-player-table td{padding:4px 6px;border-bottom:1px solid var(--line);vertical-align:middle;}
  .tournament-player-table tr:last-child td{border-bottom:0;}
  .tournament-player-table tr.swap-changed td{background:#E3F7EE;}
  .tournament-player-table .tp-num{width:38px;text-align:center;font-family:'IBM Plex Mono',monospace;font-size:10px;color:var(--ink-soft);}
  .tournament-player-table .tp-position{width:115px;font-family:var(--font-display);font-size:10.5px;white-space:nowrap;color:var(--ink-soft);}
  .tournament-player-table .tp-code-col{width:86px;}
  .tournament-player-table .tp-code-cell{font-family:'IBM Plex Mono',monospace;font-size:11px;color:var(--ink-soft);}
  .tournament-player-table input.tp-code-input{
    width:74px;padding:3px 6px;border:1px solid var(--line);border-radius:6px;background:var(--paper);
    color:var(--ink);font-family:'IBM Plex Mono',monospace;font-size:11.5px;
  }
  .tournament-player-table input.tp-code-input:focus{outline:none;border-color:var(--gold);}
  /* a code that named nobody: the box keeps what was typed so it can be corrected, rather than
     silently reverting and leaving the admin to wonder whether the keystroke registered at all */
  .tournament-player-table input.tp-code-input.tp-code-bad{border-color:var(--red);background:#FDECEC;}
  .tournament-player-edit{width:100%;min-width:130px;padding:6px 7px;border:1px solid transparent;border-radius:5px;background:transparent;font-family:'IBM Plex Sans',sans-serif;font-size:12px;color:var(--ink);}
  .tournament-player-edit:hover:not(:disabled){border-color:var(--line);background:var(--paper-alt);}
  .tournament-player-edit:focus{outline:none;border-color:var(--gold);background:var(--paper);box-shadow:0 0 0 2px var(--gold-soft);}
  .tournament-player-edit:disabled{opacity:.8;color:var(--ink);}

  .group-card{
    background:var(--paper-alt);border:1px solid var(--line);position:relative;
    border-radius:10px;overflow:hidden;box-shadow:var(--shadow);
  }
  .group-card .head{
    display:flex;flex-direction:column;gap:4px;
    background:var(--ink);color:var(--paper);padding:7px 12px;
    font-family:var(--font-display);letter-spacing:1px;font-size:12.5px;text-transform:uppercase;
  }
  /* 21 Sep 2026, by request ("first row group name is centered and second row all the others"):
     two stacked rows rather than one shared row — the group name on its own line, centered. The
     second row (day/table/time fields + print/erase buttons) is centered too, not right-aligned —
     right-aligned looked off-center on a narrow mobile card once it wrapped to its own line
     ("in mobie version second row is not centered"), and centered matches the reference screenshot
     at every width, not just desktop. */
  .group-card .head .head-label{width:100%;text-align:center;}
  .group-card .head .head-right{width:100%;justify-content:center;}
  .group-card .head .g-num{color:var(--accent-dark);font-weight:600;}
  .head-meta{display:flex;align-items:flex-end;flex-wrap:wrap;}
  .print-group-btn{
    background:rgba(255,255,255,0.14);border:1px solid rgba(255,255,255,0.35);border-radius:5px;
    color:#fff;font-size:12px;padding:4px 7px;cursor:pointer;line-height:1;align-self:flex-end;
    margin-left:8px;
  }
  .print-group-btn:hover{background:rgba(255,255,255,0.28);}
  /* Same shape as the print icon next to it, in the header's danger tint — it deletes scores, so it
     should not look like the neutral button it sits beside. Admin-only; never rendered for a viewer. */
  .erase-group-btn{
    background:rgba(255,120,120,0.20);border:1px solid rgba(255,190,190,0.55);border-radius:5px;
    color:#fff;font-size:12px;padding:4px 7px;cursor:pointer;line-height:1;align-self:flex-end;
    margin-left:6px;
  }
  .erase-group-btn:hover{background:rgba(255,110,110,0.42);}
  /* v45 — "WHY ARE THESE BROKEN": the day/Table/Time fields + print/erase buttons wrapped onto two
     ragged lines in the 3-column layout (~360px cards) — Time dropped to its own line under the day
     select, the buttons floated bottom-right. Compacted so the whole row fits on ONE centered line:
     narrower inputs, tighter gaps, everything vertically centered. Still wraps (centered) only when a
     card is genuinely too narrow. */
  .group-card .head .head-right{flex-wrap:wrap;gap:6px 0;align-items:center;}
  .group-card .head .head-meta{align-items:center;justify-content:center;flex-wrap:nowrap;}
  .group-card .head .meta-field{margin-right:7px;}
  .group-card .head .meta-field.meta-field-row{gap:3px;}
  .group-card .head .meta-table-prefix{font-size:11px;letter-spacing:0.3px;}
  .group-card .head .head-meta select{width:62px;padding:3px 2px;}
  .group-card .head .head-meta input.meta-table{width:40px;padding:3px 2px;}
  .group-card .head .head-meta input.meta-time{width:54px;padding:3px 2px;}
  .group-card .head .print-group-btn, .group-card .head .erase-group-btn{align-self:center;}
  .group-card .head .print-group-btn{margin-left:4px;}
  .group-card .head .erase-group-btn{margin-left:4px;}
  .meta-field{display:flex;flex-direction:column;align-items:center;gap:2px;margin-right:10px;}
  .meta-field:last-child{margin-right:0;}
  /* 21 Sep 2026, by request ("dont use day table and time titles"): the DAY/TABLE/TIME captions
     above each value are gone — just the value itself (e.g. "Daily", "5", "10:30") remains. */
  .meta-field label{ display:none; }
  /* the table field alone keeps a visible inline prefix ("Table: 2") right in front of its input —
     .meta-field-row lays that field out as a single row instead of the stacked column the others use. */
  .meta-field.meta-field-row{flex-direction:row;align-items:center;gap:4px;}
  /* 21 Sep 2026, by request ("in here these are very samall make 2 points bigger and bold"): the
     day/table/time values were 10-11px and regular weight — 2pt bigger and bold, all three. */
  .meta-table-prefix{
    font-family:var(--font-display);font-weight:700;font-size:12px;text-transform:uppercase;
    letter-spacing:0.6px;color:var(--on-dark-dim);white-space:nowrap;
  }
  /* 21 Sep 2026, by request ("Table: 2 sarı olsun"): the table field alone — prefix, input text,
     and (in the read-only view) the whole "Table: 2" span — is yellow, to stand out from the plain
     day/time values next to it. */
  .meta-table-prefix-yellow{ color:#FFE066; }
  .head-meta input.meta-table.yellow{ color:#FFE066; }
  .meta-val.meta-val-table{ color:#FFE066; }
  .head-meta select, .head-meta input{
    border:1px solid rgba(255,255,255,0.35);border-radius:5px;background:rgba(255,255,255,0.12);
    font-family:'IBM Plex Mono',monospace;font-size:13px;font-weight:700;padding:3px 6px;color:#fff;
    text-transform:none;letter-spacing:0;text-align:center;
  }
  .head-meta select{width:78px;text-align-last:center;}
  .head-meta input.meta-table{width:56px;}
  .head-meta input.meta-time{width:64px;}
  .head-meta select:focus, .head-meta input:focus{outline:none;border-color:var(--accent-dark);}
  .head-meta select option{color:var(--ink);}
  .head-meta .meta-val{
    font-family:'IBM Plex Mono',monospace;font-size:13px;font-weight:700;color:var(--on-dark-dim);
    text-transform:none;letter-spacing:0;padding:3px 0;text-align:center;width:100%;
  }
  /* 9 Oct 2026 (by request — "make the row under group names smaller size and a bit down"): the
     day/Table/Time/print/erase row in the group card header is ~2px smaller all round and sits a few
     px lower, further from the group name. Phones (<=640px) keep their larger thumb-sized fields. */
  @media (min-width: 641px){
    .group-card .head{ padding-bottom:9px; }
    .group-card .head .head-right{ margin-top:5px; }
    .group-card .head .meta-table-prefix{ font-size:9.5px; letter-spacing:0.3px; }
    .group-card .head .head-meta select,
    .group-card .head .head-meta input{ font-size:11px; padding:2px 2px; border-radius:4px; }
    .group-card .head .head-meta select{ width:56px; }
    .group-card .head .head-meta input.meta-table{ width:34px; }
    .group-card .head .head-meta input.meta-time{ width:46px; }
    .group-card .head .head-meta .meta-val{ font-size:11px; padding:2px 0; }
    .group-card .head .print-group-btn,
    .group-card .head .erase-group-btn{ font-size:10px; padding:3px 6px; border-radius:4px; }
  }
  .players{padding:8px 10px 4px;}
  .player-row{display:flex;align-items:center;gap:4px;margin-bottom:4px;}
  .player-row.drag-over{ outline:2px solid var(--gold); outline-offset:1px; border-radius:6px; }
  .player-row.dragging{ opacity:0.4; }
  .player-row.selected .drag-handle{ background:var(--gold-soft); border-color:var(--gold); }
  .player-row.swap-changed{ background:#E3F7EE; border-radius:6px; }
  .drag-handle{
    flex:0 0 auto;width:18px;height:22px;display:flex;align-items:center;justify-content:center;
    border:1px solid var(--line);border-radius:6px;background:var(--paper-alt);color:var(--ink-soft);
    cursor:grab;font-size:11px;user-select:none;
  }
  .drag-handle:active{ cursor:grabbing; }
  /* These three hold a name, a conflict note and a club — words, not numbers. They were set in the
     monospace face, which is the one face that buys nothing here: a monospace exists to keep columns
     of digits aligned, and the price it charges for that is wide, evenly-spaced letterforms that read
     slowly. Turkish pays the most, since İ and ı end up as wide as M. They now use the same player
     face as every other place a person's name appears in the app. Everything still in the monospace
     face — counts, codes, scores, set points, table numbers — is there because alignment is the
     point. */
  /* v53 — brought up with the fixture table below them (20 Sep 2026): a 9.5px roster sitting above a
     12px match list read as two different cards stacked in one box. */
  .player-name-input, .player-loc-input, .player-club-input{
    border:1px solid var(--line);border-radius:6px;background:var(--paper);
    font-family:var(--font-player);font-size:11.5px;padding:5px 7px;color:var(--ink);
  }
  .player-name-input{ flex:1 1 40%;min-width:0; }
  .player-loc-input{ flex:1 1 30%;min-width:0;color:var(--ink-soft); }
  .player-club-input{ flex:1 1 30%;min-width:0;color:var(--ink-soft); }
  .player-name-input:focus, .player-loc-input:focus, .player-club-input:focus{outline:none;border-color:var(--gold);}
  .slot-tag{color:var(--ink-soft);font-size:9.5px;margin-right:2px;font-family:'IBM Plex Mono',monospace;flex:0 0 auto;}

  /* player import box */
  .import-box{
    background:var(--paper-alt);border:1px solid var(--line);padding:16px 18px;margin-bottom:20px;
    border-radius:10px;box-shadow:var(--shadow);
  }
  .import-box .import-head{
    display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;margin-bottom:10px;
  }
  .import-box h3{
    font-family:var(--font-display);font-weight:600;font-size:13px;text-transform:uppercase;
    letter-spacing:1px;margin:0;
  }
  /* a real (small, outlined) button instead of a bare underlined text link — every other control on
     this screen is a button, so the one link-styled toggle read as an odd one-off */
  .import-box .import-toggle{
    font-family:var(--font-display);font-weight:600;font-size:10.5px;letter-spacing:0.4px;text-transform:uppercase;
    color:var(--ink);background:transparent;border:1px solid var(--line);border-radius:6px;
    cursor:pointer;padding:5px 10px;
  }
  .import-box .import-toggle:hover{background:var(--paper-alt);border-color:var(--gold);}
  .import-body{display:none;}
  .import-body.open{display:block;}
  .import-body textarea{
    width:100%;min-height:120px;font-family:'IBM Plex Mono',monospace;font-size:12.5px;
    border:1px solid var(--line);border-radius:8px;background:var(--paper);padding:10px;resize:vertical;color:var(--ink);
  }
  .import-body textarea:focus{outline:none;border-color:var(--gold);}
  .import-hint{font-size:11px;color:var(--ink-soft);margin:6px 0 12px;line-height:1.5;}
  .import-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;}
  .import-actions button{
    font-family:var(--font-display);font-weight:500;font-size:12px;letter-spacing:0.5px;text-transform:uppercase;
    border:1px solid var(--ink);border-radius:7px;background:var(--ink);color:var(--paper);padding:8px 14px;cursor:pointer;
  }
  .import-actions button:hover{background:var(--slate);}
  .import-actions button.secondary{background:transparent;color:var(--ink);}
  .import-actions button.secondary:hover{background:var(--paper);}
  .import-actions label{
    display:inline-flex;align-items:center;gap:5px;font-family:'IBM Plex Mono',monospace;font-size:11px;color:var(--ink-soft);
  }
  .import-status{
    font-family:'IBM Plex Mono',monospace;font-size:11.5px;margin-top:10px;padding:7px 10px;
    display:none;border-left:3px solid var(--gold);background:var(--paper);border-radius:0 6px 6px 0;
  }
  .import-status.show{display:block;}
  .import-status.warn{border-left-color:var(--red);}
  /* The fixture list is what a referee actually reads off the group card, so it carries the larger
     type here; the roster rows below it are just entry fields and are deliberately smaller. */
  /* Group card fixture table fonts (19 Sep 2026): all sized ~20% smaller than before, by request,
     to fit the 3-per-row Groups & Schedule layout more comfortably. */
  /* v53 (20 Sep 2026, by request) — the round-robin fixture table now uses the SAME treatment as the
     Standings tab's "Matches & Set Results" table, which is the other place the very same matches are
     listed: one scale, one set of rules, so the two tabs read as one app rather than two.
     Taken from .standings-match-table / .stand-match-names / .set-point-input:
       · 12px body, 10.5px uppercase column headers
       · solid hairline rules between rows, not dotted
       · names at 600 weight, WRAPPING onto a second line instead of being cut with an ellipsis — the
         standings cards sit three-up at this same width and wrap rather than truncate, and a name you
         can read matters more than a row that is one line tall
       · score boxes at the set-point-input's size and weight
     This deliberately undoes the ~20% shrink of 19 Sep: that was sized against the ellipsis layout,
     and the standings treatment buys the room back by wrapping instead. */
  /* 21 Sep 2026 (by request, after v14): the FIXTURE table's own fonts shrink — the mini Standings
     table in the same card ("this place") was already the right size and is NOT touched here, only
     the schedule/match list above it ("this place's fonts will be smaller"). ~2px down across the
     board from the v10/v14 scale. */
  table.sched{width:100%;border-collapse:collapse;margin-top:8px;font-size:10px;table-layout:fixed;}
  table.sched th{
    text-align:left;font-family:var(--font-display);font-weight:600;font-size:8.5px;
    letter-spacing:0.04em;text-transform:uppercase;color:var(--ink-soft);border-bottom:1px solid var(--line);
    padding:5px 4px;
  }
  table.sched td{padding:5px 4px;border-top:1px solid var(--line);vertical-align:middle;}
  table.sched tr:first-child td{border-top:none;}
  table.sched td.rnd{color:var(--ink-soft);font-family:'IBM Plex Mono',monospace;font-size:8.5px;width:18px;}
  table.sched td.sname{
    font-size:10px;font-family:var(--font-player);font-weight:600;color:var(--ink);
    white-space:normal;word-break:break-word;line-height:1.25;
  }
  table.sched td.score-cell{white-space:nowrap;padding-left:3px;padding-right:2px;}
  /* the referee is a person too — same face as every other name, kept italic and muted so it still
     reads as secondary to the two players actually on the table */
  table.sched td.refcell{
    font-family:var(--font-player);font-size:8.5px;color:var(--ink-soft);font-style:italic;
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-left:7px;
  }
  table.sched .score-pair{display:flex;align-items:center;justify-content:flex-end;flex-wrap:nowrap;gap:3px;}
  table.sched input.score{
    width:28px;flex:0 0 28px;height:23px;text-align:center;font-family:'IBM Plex Mono',monospace;
    font-size:10px;font-weight:800;
    border:1px solid #D9C9A0;border-radius:5px;background:#F6F0DE;color:var(--score-ink);padding:2px 1px;
  }
  table.sched input.score:focus{outline:none;border-color:var(--gold);}
  table.sched input.score::-webkit-outer-spin-button,
  table.sched input.score::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}
  table.sched input.score{-moz-appearance:textfield;}
  .vs{color:var(--ink-soft);padding:0 3px;font-family:'IBM Plex Mono',monospace;font-size:8.5px;}

  /* per-group standings, embedded at the bottom of each group card on the Groups & Schedule tab —
     only populated once that group's own 6 matches are all scored (see isGroupComplete()), so it's
     simply absent (no placeholder) for groups still in progress. Reuses table.stand's styling but
     flattened (no floating-card shadow/radius) since it already sits inside the group card. */
  .group-standings:empty{ display:none; }
  .group-standings table.stand{ box-shadow:none;border-radius:0;margin-top:14px; }
  /* Eleven columns (Player/W/Pts/SW/SL/SD/PW/PL/PD/Rank/Status) never fit a third of a screen at the
     Standings tab's own scale, so 20 Sep 2026 let this table scroll horizontally inside the card
     instead of silently clipping the Status column. 21 Sep 2026 (by request — "THİS WİDTH MUST BE FİT
     NO SCROLLİNG"): shrink everything enough to actually fit a card's width instead, so the scroll is
     no longer needed in the normal case (kept below only as a fallback for a pathologically long
     name). Player names now wrap onto two lines the same way table.sched's own name column already
     does, rather than forcing a fixed 145px; every other column, and the Status tag, shrink to match. */
  .group-standings{ overflow-x:auto; }
  .group-standings table.stand{ min-width:0; }
  .group-standings table.detailed-stand{ font-size:8.5px; }
  .group-standings table.detailed-stand th,
  .group-standings table.detailed-stand td{ padding:3px 2px; }
  .group-standings table.detailed-stand .name-col{
    min-width:0; width:30%; white-space:normal; word-break:break-word; line-height:1.25;
  }
  .group-standings table.detailed-stand .tag{ font-size:8px; padding:1px 3px; }
  /* 9 Oct 2026 (by request): breathing room under the group header, and the standings player
     names at the same size/weight as the match names in the fixture list below (table.sched td.sname). */
  .group-standings{ padding-top:12px; }
  .group-standings table.detailed-stand td.name-col{
    font-size:10px; font-family:var(--font-player); font-weight:600; color:var(--ink); line-height:1.25;
  }

  /* standings */
  .standings-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:16px;}
  table.stand{width:100%;border-collapse:collapse;font-size:12.5px;border-radius:10px;overflow:hidden;box-shadow:var(--shadow);}
  table.stand caption{
    text-align:left;font-family:var(--font-display);font-weight:600;font-size:12.5px;
    letter-spacing:1px;text-transform:uppercase;background:var(--ink);color:var(--paper);padding:6px 10px;
  }
  table.stand caption .g-num{color:var(--accent-dark);}
  table.stand th{
    text-align:center;font-family:'IBM Plex Mono',monospace;font-size:10px;color:var(--ink-soft);
    border-bottom:1px solid var(--line-strong);padding:5px 4px;background:var(--paper-alt);
  }
  table.stand th.name-col, table.stand td.name-col{text-align:left;}
  /* the player column only — every other cell in this table is a number, and numbers stay in the
     monospace face that keeps their columns aligned */
  table.stand td.name-col{font-family:var(--font-player);font-weight:400;}
  table.stand td{text-align:center;padding:5px 4px;border-bottom:1px solid var(--line);font-family:'IBM Plex Mono',monospace;background:var(--paper);}
  table.stand tr.qualified td{background:var(--gold-soft);}
  table.stand tr.consol td{background:var(--slate-soft);}
  .tag{
    font-family:'IBM Plex Mono',monospace;font-size:9.5px;padding:2px 5px;border:1px solid var(--line-strong);
    text-transform:uppercase;letter-spacing:0.5px;border-radius:4px;
  }
  .tag.comp{background:var(--gold);color:var(--paper);border-color:var(--gold);}
  .tag.cons{background:var(--slate);color:var(--paper);border-color:var(--slate);}

  /* Player List / Rankings tabs */
  .roster-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:14px;}
  .roster-toolbar-spacer{flex:1 1 auto;}
  .roster-search{
    padding:7px 10px;border:1px solid var(--line);border-radius:7px;background:var(--paper-alt);
    font-family:'IBM Plex Sans',sans-serif;font-size:13px;color:var(--ink);min-width:180px;
  }
  .roster-search:focus{outline:none;border-color:var(--gold);}
  .roster-inactive-toggle{
    display:inline-flex;align-items:center;gap:5px;font-family:'IBM Plex Sans',sans-serif;
    font-size:12.5px;color:var(--ink-soft);cursor:pointer;
  }
  .roster-inactive-toggle input{width:auto;}
  .roster-count{font-family:'IBM Plex Mono',monospace;font-size:11.5px;color:var(--ink-soft);}
  .roster-empty-hint{font-size:12.5px;color:var(--ink-soft);margin-top:10px;}
  /* Pool filter checkboxes — check any number on to show ONLY players from those pools (a hard filter:
     everyone else disappears from the Player Pool table / Load from Player List picker until every box
     is unchecked again — see applyPoolFilter()). Shared markup/JS (renderPoolFilterCheckboxes()) in
     both places; hidden entirely via inline style when no pools exist yet. A pool marked ★ default is
     the one auto-checked the first time the Player Database module opens each session. */
  .pool-filter-row{display:flex;align-items:center;gap:7px;flex-wrap:wrap;}
  .pool-filter-label{font-family:var(--font-display);font-size:11px;font-weight:600;letter-spacing:0.4px;
    text-transform:uppercase;color:var(--ink-soft);}
  .pool-filter-chips{display:flex;gap:11px;flex-wrap:wrap;}
  .pool-filter-check-item{
    display:flex;align-items:center;gap:5px;font-family:'IBM Plex Sans',sans-serif;font-size:12.5px;
    font-weight:600;color:var(--ink-soft);cursor:pointer;
  }
  .pool-filter-check-item input{width:auto;cursor:pointer;}
  .rr-choose-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin-top:6px;}   /* v239 */
  .rr-choose-row select,#rrChooseAll{width:auto;max-width:100%;}
  .pool-filter-check-item:has(input:checked){color:var(--ink);}
  .roster-table-wrap{overflow-x:auto;border-radius:10px;box-shadow:var(--shadow);}
  table.roster{width:100%;border-collapse:collapse;font-size:12.5px;background:var(--paper);}
  table.roster th{
    text-align:center;font-family:'IBM Plex Mono',monospace;font-size:10px;color:var(--ink-soft);
    border-bottom:1px solid var(--line-strong);padding:7px 6px;background:var(--paper-alt);white-space:nowrap;
  }
  table.roster th.name-col, table.roster td.name-col{text-align:left;}
  /* Player Pool / Rankings: the name itself is clickable — opens the same details each role's own
     row button already opens (see openPlayerDetails()) — styled just enough to read as clickable. */
  .player-name-link{cursor:pointer;}
  .player-name-link:hover{text-decoration:underline;color:var(--gold);}
  table.roster td{text-align:center;padding:6px;border-bottom:1px solid var(--line);white-space:nowrap;}
  table.roster td.mono{font-family:'IBM Plex Mono',monospace;}
  table.roster tr.inactive-row{opacity:0.55;}
  table.roster tr:hover td{background:var(--paper-alt);}
  .roster-actions{display:flex;gap:4px;justify-content:center;white-space:nowrap;}
  .roster-edit-btn, .roster-del-btn{
    font-family:var(--font-display);font-weight:500;font-size:10.5px;letter-spacing:0.3px;text-transform:uppercase;
    border-radius:5px;padding:4px 7px;cursor:pointer;
  }
  .player-modal-card{max-width:520px;max-height:88vh;overflow-y:auto;}
  .player-modal-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 14px;}
  .veteran-badge{font-size:11px;margin-left:2px;}
  /* v56 — My ranking (#) drag-to-order */
  #panel-players table.roster td.seed-cell{white-space:nowrap;font-weight:700;color:var(--ink);min-width:34px;}
  .seed-handle{display:inline-block;cursor:grab;color:var(--ink-soft);margin-right:5px;font-size:13px;touch-action:none;user-select:none;}
  tr.seed-draggable{cursor:grab;}
  tr.seed-dragging{opacity:.4;}
  tr.seed-over-top td{box-shadow:inset 0 3px 0 var(--gold);}
  tr.seed-over-bottom td{box-shadow:inset 0 -3px 0 var(--gold);}
  .seed-hint{font-size:11.5px;color:var(--ink-soft);margin:0 0 6px;}
  /* v59 — category divider rows */
  #panel-players table.roster tr.cat-sep-row td{background:var(--ink);color:#FFE066;text-align:left;padding:5px 10px;border-top:3px solid var(--gold);
    font-family:var(--font-display);font-weight:800;font-size:12px;letter-spacing:.8px;}
  #panel-players table.roster tr.cat-sep-row:hover td{background:var(--ink);}
  #panel-players table.roster tr.pool-more-row td{text-align:left;padding:12px 14px;background:var(--paper,#faf7ef);}
  #panel-players table.roster tr.pool-more-row .pool-more-info{margin-right:12px;font-size:12px;opacity:.8;}
  #panel-players table.roster tr.pool-more-row button{margin:0 4px;}
  #panel-players table.roster tr.cat-sep-row .cat-sep-count{margin-left:10px;font-family:'IBM Plex Mono',monospace;font-weight:500;font-size:10.5px;color:rgba(255,255,255,.75);letter-spacing:0;}
  .seedlists-save{display:flex;gap:8px;align-items:center;}
  .seedlists-save input{flex:1 1 auto;margin:0;}
  .seedlists-save button{width:auto;margin:0;white-space:nowrap;padding:8px 12px;font-size:12px;}
  .seedlist-row{display:flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid var(--line);border-radius:8px;margin-bottom:6px;background:var(--paper);}
  .seedlist-row .sl-info{flex:1 1 auto;min-width:0;}
  .seedlist-row .sl-name{font-weight:700;font-size:13px;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .seedlist-row .sl-meta{font-size:11px;color:var(--ink-soft);}
  .seedlist-row button{width:auto;margin:0;padding:5px 9px;font-size:11.5px;border-radius:6px;}
  .seedlist-row button.secondary{background:transparent;color:var(--ink);border:1px solid var(--line);}
  /* v53 — compact Edit/Add Player window */
  #playerModal .player-modal-card{max-width:760px;padding:20px 22px 18px;max-height:94vh;}
  #playerModal h2{font-size:15px;margin:0 0 12px;}
  #playerModal .player-modal-grid.pm3{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 12px;}
  #playerModal .login-field{margin:0;}
  #playerModal .login-field label{font-size:9.5px;letter-spacing:.5px;margin-bottom:3px;}
  #playerModal .login-field input, #playerModal .login-field select{padding:6px 9px;font-size:13px;height:32px;box-sizing:border-box;border-radius:6px;}
  #playerModal .login-field label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  #playerModal .pm-span3{grid-column:1 / -1;}
  /* v193 — Active is a field of the grid now (by request, between Participation and Notes) */
  #playerModal .login-field.pm-active-field input{width:22px;height:22px;padding:0;margin:5px 0 0;cursor:pointer;accent-color:var(--gold);}
  #playerModal .login-field.pm-active-field label{cursor:pointer;}
  /* v198 — the Pools row */
  #playerModal .pm-pools{display:flex;flex-wrap:wrap;gap:6px 16px;align-items:center;padding:4px 0 2px;}
  #playerModal .pm-pools .pm-pool-item{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap;
    text-transform:none;letter-spacing:0;margin:0;color:var(--ink);overflow:visible;}
  #playerModal .pm-pools .pm-pool-item input{width:17px;height:17px;padding:0;margin:0;cursor:pointer;accent-color:var(--gold);}
  #playerModal .pm-footer{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:14px;padding-top:12px;border-top:1px solid var(--line);}
  #playerModal .pm-footer .roster-inactive-toggle{margin:0;font-size:12px;}
  #playerModal .pm-footer-spacer{flex:1 1 auto;}
  #playerModal .pm-footer button{width:auto;margin:0;padding:7px 16px;font-size:12px;border-radius:6px;}
  #playerModal .pm-footer button.secondary{background:transparent;color:var(--ink);border:1px solid var(--line);}
  @media (max-width:640px){
    #playerModal .player-modal-grid.pm3{grid-template-columns:repeat(2,minmax(0,1fr));}
    #playerModal .pm-footer-spacer{flex-basis:100%;height:0;}
    #playerModal .pm-footer button{flex:1 1 0;}
  }
  /* v51 — "fit the window": the Player List grew to 16 columns and ran off the right edge. The card
     now uses the whole window (up to 1680px) and just THIS table is compacted — smaller type, tighter
     cells, and every text column allowed to wrap onto two lines instead of forcing a scrollbar. */
  #playerModuleScreen .player-module-card{max-width:1680px;}
  #panel-players table.roster{font-size:11.5px;table-layout:auto;}
  #panel-players table.roster th{padding:6px 3px;font-size:9.5px;white-space:normal;line-height:1.15;}
  /* v193 — headers a little bigger and on ONE line (by request); the table scrolls sideways if the window is narrow */
  #panel-players table.roster thead th{font-size:10.5px;white-space:nowrap;}
  #panel-players table.roster td.roster-active-cell{font-weight:700;}
  #panel-players table.roster td.roster-active-cell .ra-on{color:#1f9d6b;}
  #panel-players table.roster td.roster-active-cell .ra-off{color:#c0392b;}
  #panel-players table.roster td.roster-notes-cell{min-width:90px;max-width:180px;font-size:10.5px;}
  #panel-players table.roster td{padding:5px 3px;white-space:normal;line-height:1.25;}
  #panel-players table.roster td.name-col{min-width:110px;}
  #panel-players table.roster td.mono{white-space:nowrap;font-size:11px;}
  #panel-players table.roster td.wrap-col{min-width:52px;max-width:104px;font-size:10.5px;}
  #panel-players table.roster .roster-actions{white-space:nowrap;}
  #panel-players table.roster .roster-icon-btn{font-size:12px;padding:3px 5px;min-width:26px;}
  #panel-players table.roster th[data-pool-sort]{padding-right:13px;}
  #panel-players table.roster th[data-pool-sort]::after{right:2px;}
  /* v38 — Player List row actions as icon-only buttons */
  table.roster .roster-icon-btn{font-size:14px;line-height:1;padding:4px 7px;min-width:30px;text-transform:none;letter-spacing:0;}
  /* v38 — partner/category cells may wrap onto two lines so the wider Player List still fits */
  table.roster td.wrap-col{white-space:normal;min-width:70px;max-width:120px;font-size:11.5px;line-height:1.25;}
  /* Edit Player modal: clearer, more legible fonts than the generic .login-field styling
     (bigger + bolder + higher-contrast labels, bigger + heavier input text). Scoped to
     #playerModal only so the Login screen and other .login-field users are unaffected. */
  #playerModal .login-field label{
    font-size:9.5px;font-weight:700;color:var(--ink);letter-spacing:0.5px;
  }
  #playerModal .login-field input, #playerModal .login-field select{
    font-size:13px;font-weight:600;color:var(--ink);padding:5px 9px;height:32px;box-sizing:border-box;
  }
  /* Championship/tournament pickers now auto-enter as a guest viewer instead of showing the login
     screen (see enterFromChampionScreen()/bypassChampionship()) — this small text link is the only
     remaining way to reach the login screen directly, for an admin who needs the passcode field. */
  .admin-login-link{
    display:block;width:100%;margin-top:10px;padding:4px;background:none;border:none;
    font-family:'IBM Plex Sans',sans-serif;font-size:12px;color:var(--ink-soft);
    text-decoration:underline;cursor:pointer;text-align:center;
  }
  .admin-login-link:hover{color:var(--gold);}
  .import-preview-table-wrap{max-height:220px;overflow-y:auto;overflow-x:auto;border:1px solid var(--line);border-radius:8px;margin-bottom:10px;}
  .import-preview-table-wrap table.roster{box-shadow:none;}
  .record-results-card{max-width:680px;width:min(680px,94vw);}
  /* Set-score scoresheet table, printed on a bracket match's own box when it has one (see
     refreshPrintSetsLine() in the main script block) — a blank/Score/Set 1../Set 5 grid with one row
     per player, matching the layout of a real paper scoresheet, rather than a single combined
     "11:7, 9:11, ..." line. */
  .bst-table{width:100%;border-collapse:collapse;font-family:'IBM Plex Sans',sans-serif;font-size:9px;}
  .bst-table th, .bst-table td{border:1px solid #CFCFD6;padding:2px 3px;text-align:center;}
  .bst-table th{background:#F3F1FB;font-weight:600;color:var(--ink-soft);font-size:8px;text-transform:uppercase;}
  .bst-table td.bst-name{
    text-align:left;max-width:70px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600;
  }
  .bst-table td.bst-score{font-weight:700;}
  .match-history-card{max-width:1100px;width:min(1100px,96vw);max-height:92vh;overflow-y:auto;}
  /* The generic .import-preview-table-wrap max-height (220px) is sized for the small Import-from-Excel
     preview table elsewhere — inside the much bigger Match History card it left most of the card's own
     88vh/92vh allowance unused, forcing a cramped double-scrollbar (only ~6 rows visible, plus a
     horizontal scrollbar hiding the Points column) instead of actually using the room the card has. */
  .match-history-card .import-preview-table-wrap{max-height:64vh;}
  /* Long tournament names (recorded once per row) were eating most of the table's horizontal space and
     pushing Score/Points off-screen — cap and ellipsize this column instead; the full name is still on
     a hover title tooltip. */
  .rr-col-tournament{max-width:170px;overflow:hidden;text-overflow:ellipsis;text-align:left;}
  /* v154 — now at the top, and it stays there while the window scrolls */
  .match-history-export-row{display:flex;gap:8px;margin:0 0 6px;flex-wrap:wrap;justify-content:flex-end;
    position:sticky;top:0;z-index:2;background:inherit;padding:4px 0;}
  .match-history-export-row button{margin-top:0;background:transparent;color:var(--ink);border:1px solid var(--line);}
  .rr-delta-pos{color:var(--green);font-weight:600;}
  .rr-delta-neg{color:var(--red);font-weight:600;}
  .rr-elo-trend{display:inline-block;margin-right:4px;font-size:15px;font-weight:700;vertical-align:-1px;}
  /* Player Pool's ELO number itself — 2px bigger than the table's base 12.5px, and bold, so the
     headline rating stands out from the plain-weight numbers around it. Right-aligned (arrow +
     number together) so the digits line up on a consistent right edge regardless of whether a
     player's rating is 3 or 4 digits, instead of drifting left/right under the centered default.
     Needs the table.roster prefix (matching table.roster th/td's own specificity) — a bare
     .rr-elo-cell rule loses to the base center-align rule regardless of source order. */
  .rr-elo-cell{font-size:14.5px;font-weight:700;}
  table.roster th.rr-elo-cell, table.roster td.rr-elo-cell{text-align:right;}
  .rr-unmatched{
    background:var(--gold-soft);border-radius:8px;padding:10px 12px;font-size:12.5px;
    margin-bottom:10px;line-height:1.5;
  }
  /* per-player match breakdown — the expandable row inside the Record Results preview (see
     toggleRRMatchLog()) and the standalone Match History modal both render this same nested table
     (renderMatchLogTable()), just with the whole-tournament row wrapper differing between the two */
  .rr-expand-btn{
    background:transparent;border:1px solid var(--line);border-radius:6px;color:var(--ink);
    font-family:'IBM Plex Sans',sans-serif;font-size:11px;font-weight:600;padding:3px 7px;cursor:pointer;
  }
  .rr-expand-btn:hover{background:var(--paper-alt);}
  tr.rr-match-log-row.hidden{display:none;}
  tr.rr-match-log-row td{padding:0 0 10px 0;border:none;}
  table.rr-match-log{width:100%;font-size:12.5px;box-shadow:none;background:var(--paper-alt);}
  table.rr-match-log th{
    font-family:'IBM Plex Sans',sans-serif;font-size:10.5px;letter-spacing:0.4px;text-transform:uppercase;
    text-align:left;padding:6px 8px;color:var(--ink);opacity:0.65;
  }
  table.rr-match-log td{padding:5px 8px;}
  /* Opponent + Stage: force left alignment on both header and data cells (table.roster's base
     th/td rules default everything to centered, so this needs its own explicit class rather than
     relying on rule order) so the column titles line up with the text underneath them instead of
     floating centered above left-hanging names/stage labels. */
  table.rr-match-log th.rr-col-left, table.rr-match-log td.rr-col-left{text-align:left !important;}
  .rr-unmatched-tag{opacity:0.6;font-size:11px;}
  /* Admin-only per-row delete in the standalone Match History modal (renderMatchLogTable's
     opts.allowDelete) — small icon button, same footprint as .rr-expand-btn but red, so it doesn't
     compete visually with the mostly-neutral table it sits in. Never shown in the Record Results
     preview's reuse of this same table (that one never passes allowDelete). */
  .rr-row-delete-btn{
    background:transparent;border:1px solid var(--red);border-radius:6px;color:var(--red);
    font-size:12px;line-height:1;padding:3px 6px;cursor:pointer;
  }
  .rr-row-delete-btn:hover{background:var(--red);color:var(--paper);}

  /* seeding */
  table.seed{width:100%;border-collapse:collapse;font-size:13px;border-radius:10px;overflow:hidden;box-shadow:var(--shadow);}
  table.seed th{
    font-family:var(--font-display);font-size:11px;letter-spacing:1px;text-transform:uppercase;
    text-align:left;padding:8px 8px;color:var(--paper);
  }
  table.seed.comp th{background:var(--gold);color:var(--paper);}
  table.seed.cons th{background:var(--slate);}
  table.seed td{padding:6px 8px;border-bottom:1px solid var(--line);font-family:'IBM Plex Mono',monospace;background:var(--paper);}
  table.seed td.seedno{width:36px;color:var(--ink-soft);font-weight:600;}
  table.seed tr:nth-child(odd) td{background:var(--paper-alt);}
  table.seed tr.pool-break td{border-top:2px solid var(--ink);}

  /* same-group collision check */
  .collision-box{
    margin-top:26px;background:var(--paper-alt);border:1px solid var(--line);border-radius:10px;
    padding:16px 18px;box-shadow:var(--shadow);
  }
  .collision-box h3{
    font-family:var(--font-display);font-weight:600;font-size:13px;text-transform:uppercase;
    letter-spacing:1px;margin:0 0 6px;
  }
  .collision-summary{
    font-family:'IBM Plex Mono',monospace;font-size:12px;padding:8px 12px;margin-bottom:10px;
    border-radius:6px;border-left:3px solid var(--green);background:var(--paper);
  }
  .collision-summary.warn{border-left-color:var(--red);}
  table.collision-table{width:100%;border-collapse:collapse;font-size:12px;}
  table.collision-table th{
    text-align:left;font-family:var(--font-display);font-weight:500;font-size:10px;letter-spacing:0.6px;
    text-transform:uppercase;color:var(--ink-soft);border-bottom:1px solid var(--line-strong);padding:6px 8px;
  }
  table.collision-table td{padding:6px 8px;border-bottom:1px solid var(--line);font-family:'IBM Plex Mono',monospace;background:var(--paper);}
  table.collision-table tr.clash td{background:var(--gold-soft);}
  .clash-pill{
    font-family:'IBM Plex Mono',monospace;font-size:9.5px;padding:2px 6px;border-radius:4px;
    text-transform:uppercase;letter-spacing:0.4px;background:var(--red);color:#fff;
  }
  .ok-pill{
    font-family:'IBM Plex Mono',monospace;font-size:9.5px;padding:2px 6px;border-radius:4px;
    text-transform:uppercase;letter-spacing:0.4px;background:var(--green);color:#fff;
  }

  /* bracket — light "scoreboard" style */
  .arena{
    --bg:#F7F7FC; --header1:#3A2F8C; --header2:#2A2264; --purple:#5B4FE0;
    --lav:#EEF0FC; --lav-border:#D6D8F0; --peach:#FBE3C7; --peach-text:#8A5A22;
    --empty:#E9EAF6; --score-bg:#F6F0DE; --score-text:var(--score-ink);
    --txt:#1E1C33; --txt-dim:#585B76; --vs-bg:#E7E8F6; --line-c:#D9DAF0;
    background:var(--bg);border:1px solid #E7E7F2;border-radius:10px;overflow:hidden;
  }
  .arena-head{
    background:linear-gradient(135deg,var(--header1),var(--header2));
    padding:12px 26px;color:#fff;display:flex;justify-content:space-between;align-items:center;gap:12px;
  }
  .arena-tname{
    font-family:var(--font-display);font-weight:600;font-size:15px;letter-spacing:0.3px;
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--gold-soft);
  }
  /* which bracket this sheet is — see setArenaName(). Hidden on screen, where the tab and the
     section heading already say it; the @media print block turns it on. */
  .arena-tname-bracket{ display:none; }
  .arena-head .btns{display:flex;gap:8px;flex-shrink:0;}
  .arena-head .btns button{
    background:rgba(255,255,255,0.95);color:#332B7A;border:none;border-radius:7px;
    font-family:'IBM Plex Sans',sans-serif;font-weight:600;font-size:12px;padding:7px 13px;cursor:pointer;
  }
  .arena-head .btns button:hover{background:#fff;}

  .bracket-wrap{overflow-x:auto;padding:22px 26px 26px;background:var(--bg);}

  /* wipes entered scores, so it gets the same warning-red treatment as other destructive actions
     (Delete, etc.) rather than the neutral white/navy of Reopen Groups and Print next to it. Needs
     !important on color: [data-theme="minimalist"] .arena-head .btns button (further down this
     stylesheet) is more specific than a single .bracket-clear-btn class and would otherwise repaint
     it back to var(--ink) in that theme regardless of source order. */
  .bracket-clear-btn{
    font-family:'IBM Plex Sans',sans-serif;font-weight:600;font-size:11px;letter-spacing:0.3px;
    color:var(--red) !important;
  }
  .bracket-cols{display:flex;min-width:1240px;align-items:flex-start;}

  .bround{display:flex;flex-direction:column;position:relative;}
  .bround-label{
    font-family:'IBM Plex Sans',sans-serif;font-weight:600;font-size:10px;line-height:19px;height:19px;
    color:#4B5566;margin:0 0 6px 0;
  }
  .bcol-inner{position:relative;}

  .bmatch-wrap{position:absolute;width:158px;}
  /* v286 — the note box right above a hand-editable match (13BV MİKS SF · Game 1) */
  .bmatch-wrap .bmatch-note{position:absolute;left:0;right:0;bottom:calc(100% + 4px);z-index:3;}
  .bmatch-wrap .bmatch-note textarea{display:block;width:100%;box-sizing:border-box;resize:vertical;min-height:52px;font:600 11.5px/1.35 'IBM Plex Sans',sans-serif;color:#000;
    background:#FFF9DB;border:1.5px solid #E0B400;border-radius:6px;padding:5px 7px;}
  .bmatch-wrap .bmatch-note textarea:focus{outline:none;border-color:#B98F00;box-shadow:0 0 0 2px rgba(224,180,0,.25);}
  .bmatch-wrap .bmatch-note.ro{font:600 11.5px/1.35 'IBM Plex Sans',sans-serif;color:#000;background:#FFF9DB;border:1.5px solid #E0B400;border-radius:6px;padding:5px 7px;white-space:pre-wrap;word-break:break-word;}
  .bmatch .row.bslot-hand .pname{color:#8a5a00;}
  @media print{ .bmatch-wrap .bmatch-note textarea{border-width:1px;background:#fff;} }
  /* v215 — the match is on the Arena grid (table + time): ticked box at the top right, in the label's purple */
  .bmatch-wrap .arena-placed-chk{position:absolute;top:-2px;right:0;width:12px;height:12px;box-sizing:border-box;
    display:inline-flex;align-items:center;justify-content:center;border:1.5px solid var(--purple);border-radius:3px;
    background:var(--purple);color:#fff;font-size:9px;font-weight:800;line-height:1;cursor:default;}
  .bmatch-wrap .arena-placed-chk.arena-unplaced{border-color:#C0392B;background:#E74C3C;}
  /* v216 — the day, left of the Arena box; looks like the time field on the strip below */
  .bmatch-wrap .bmatch-day-lbl{position:absolute;top:-3px;right:16px;max-width:90px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
    font-family:'IBM Plex Sans',sans-serif;font-size:9px;font-weight:700;color:var(--txt);background:var(--paper);
    border:1px solid #CFCFD6;border-radius:3px;padding:0 4px;height:14px;line-height:12px;box-sizing:border-box;cursor:default;}
  .bmatch-wrap select.bmatch-day-sel{cursor:pointer;padding:0 1px;max-width:none;}
  @media print{ .bmatch-wrap .bmatch-day-lbl{display:none !important;} }
  @media print{ .bmatch-wrap .arena-placed-chk{display:none !important;} }
  .glabel{
    font-family:'IBM Plex Sans',sans-serif;font-weight:700;font-size:9px;line-height:10px;height:10px;
    color:var(--purple);margin:0 0 5px 0;
  }
  /* v241 — details window of a bracket match (see bmpOpen) */
  #bmPopup{display:none;position:fixed;z-index:4500;width:320px;max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);overflow-y:auto;box-sizing:border-box;
    background:#fff;border:1px solid var(--lav-border);border-radius:10px;box-shadow:0 8px 28px rgba(30,20,80,.25);padding:12px 14px;
    font-family:'IBM Plex Sans',sans-serif;font-size:13px;color:var(--ink);}
  #bmPopup small{display:block;font-size:12px;font-weight:500;color:#5A5F7A;margin-top:2px;}
  .bmp-head{position:relative;padding-right:26px;}
  .bmp-head b{font-size:14px;color:var(--purple);}
  .bmp-x{position:absolute;top:-4px;right:-4px;width:26px;height:26px;padding:0;background:none;border:none;box-shadow:none;font-size:20px;line-height:1;color:#5A5F7A;cursor:pointer;}
  .bmp-set input::placeholder{color:#B4B7CC;font-weight:400;}
  .bmp-where{margin:6px 0 10px;padding:5px 8px;border-radius:6px;background:var(--paper);font-weight:600;}
  .bmp-where.bmp-none{font-weight:500;color:#5A5F7A;}
  .bmp-match{display:grid;grid-template-columns:1fr 52px;gap:8px;align-items:center;}
  .bmp-player b{font-size:14px;}
  .bmp-player .bmp-tbd{font-weight:500;font-style:italic;color:#5A5F7A;}
  .bmp-seed{font-size:12px;color:#5A5F7A;}
  .bmp-player.bmp-win b{color:#167A3E;}
  .bmp-score{text-align:center;font-size:18px;font-weight:800;}
  .bmp-score input{width:100%;box-sizing:border-box;height:36px;padding:0;text-align:center;font-size:18px;font-weight:800;}
  .bmp-score input[readonly]{background:var(--paper);}
  .bmp-sets{display:grid;grid-template-columns:repeat(5,1fr);gap:5px;margin-top:12px;}
  .bmp-set{display:flex;flex-direction:column;align-items:center;gap:3px;margin:0;font-size:11px;font-weight:600;color:#5A5F7A;}
  .bmp-set input{width:100%;box-sizing:border-box;height:32px;padding:0 2px;text-align:center;font-size:14px;}
  .bmp-set b{height:32px;line-height:32px;font-size:14px;color:var(--ink);}
  .bmp-set .set-bad{border-color:#C0392B;color:#C0392B;}
  .bmp-msg{min-height:18px;margin-top:8px;font-weight:700;color:#167A3E;}
  .bmp-msg.bmp-bad{color:#C0392B;font-weight:600;}
  @media print{ #bmPopup{display:none !important;} }
  .bmatch{
    position:relative;background:#fff;border:1px solid var(--lav-border);border-radius:7px;
    overflow:hidden;font-family:'IBM Plex Sans',sans-serif;font-size:10px;
    box-shadow:0 1px 2px rgba(30,20,80,0.05);
  }
  .bmatch .row{
    display:flex;align-items:center;justify-content:space-between;gap:5px;
    padding:0 8px;height:32px;box-sizing:border-box;background:var(--lav);
  }
  .bmatch .row:first-child{border-bottom:1px solid var(--lav-border);}
  .bmatch .row.empty{background:var(--empty);}
  .bmatch .row.byepeach{background:var(--peach);}
  /* v53 — bold (20 Sep 2026, by request: "use bold fonts in both of brackets"). One rule covers the
     Competition and Consolation draws, which share this card. A real player's name is the thing being
     read across a hall; the seed tag and an undecided slot stay light on purpose, so the weight keeps
     saying "this one is somebody". */
  .bmatch .pname{
    flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--txt);font-weight:700;
    font-family:var(--font-player);
  }
  /* a genuinely empty slot (TBD, or a bye's blank half) is not a name, so it stays light — the weight
     is what says 'somebody'. A slot that DOES hold a player who is merely waiting for an opponent
     keeps the full weight and colour, and says "waiting" with the italic alone (20 Sep 2026). */
  .bmatch .row.empty .pname{color:var(--txt-dim);font-weight:400;font-style:italic;}
  .bmatch .row.empty.named .pname{color:var(--txt);font-weight:700;font-style:italic;}
  .bmatch .seedtag{color:var(--txt-dim);font-weight:400;margin-right:4px;font-size:9px;}
  .bmatch .scorebox{
    flex:0 0 24px;width:24px;min-width:19px;height:18px;padding:0 4px;background:var(--score-bg);color:var(--score-text);
    border:none;border-radius:5px;text-align:center;font-family:'IBM Plex Mono',monospace;font-size:10px;font-weight:700;
    box-sizing:border-box;
  }
  .bmatch input.scorebox{background:#FAF5E8;color:var(--score-ink);border:1.5px dashed #E3D6AE;}
  .bmatch input.scorebox:not(:placeholder-shown){background:var(--score-bg);color:var(--score-text);border:none;}
  .bmatch .scorebox:focus{outline:2px solid var(--purple);outline-offset:1px;}
  .bmatch input.scorebox::-webkit-outer-spin-button,
  .bmatch input.scorebox::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}
  .bmatch input.scorebox{-moz-appearance:textfield;}
  .bmatch .scorebox.static{display:flex;align-items:center;justify-content:center;}
  .bmatch .scorebox.faint{background:#C4C7E6;color:var(--faint-ink);font-weight:700;}
  /* winner accent is a left border, not a second box-shadow — every card keeps exactly one shadow
     layer (the outer .bmatch drop shadow below), winner or not, in either theme. */
  .bmatch.winner-top .row:first-child{background:#C7DBFF;border-left:3px solid var(--purple);}
  /* the SECOND row, not :last-child — the card's last element is the table/time strip appended after
     both player rows, so the old selector matched that strip and the bottom player never actually got
     the winner highlight. */
  .bmatch.winner-bottom > .row:nth-child(2){background:#C7DBFF;border-left:3px solid var(--purple);}
  /* the table/time "attached" to this bracket box — same bracketScores[bracketKey][r][i].table/.time
     fields the Time-Table List tab reads and writes; this is just a second view onto that data, kept
     to a fixed height so the tree's connector geometry (computed from a fixed card height) still lines
     up. A plain gray ticker bar so it reads as schedule info, distinct from the lavender player rows
     above it. Sized generously (width and font both) so the controls always sit fully inside the card,
     never clipped. */
  .bmatch-meta{
    display:flex;align-items:center;justify-content:center;gap:4px;
    height:17px;box-sizing:border-box;padding:0 5px;background:#E4E4E9;border-top:1px solid #CFCFD6;
    font-family:'IBM Plex Sans',sans-serif;font-size:9.5px;font-weight:600;color:#55555E;
    overflow:hidden;white-space:nowrap;
  }
  .bmatch-meta-sep{opacity:0.5;}
  .bmatch-meta-time, .bmatch-meta-table{font-weight:400;}
  /* admin-only editable variant of the strip above — a compact time <select> and a free-text table
     <input>, sized to fit the same fixed strip height so the card height (and connector math) never
     changes between the admin and viewer variants. Bold (unlike the plain read-only text viewers see
     above) so the two editable fields stand out as inputs — same treatment in both the Competition and
     Consolation brackets, since both share this one class. */
  /* this <select> also carries .mb-time-select (its own base styling, shared with group cards' time
     field), which sets its own font-weight:600 later in the stylesheet — same specificity as a lone
     .bmatch-meta-time-input rule would have, so it would otherwise win by cascade order regardless of
     which class the DOM lists first. The two-class selector here outranks it. */
  .bmatch-meta-time-input.mb-time-select{
    font-family:'IBM Plex Sans',sans-serif;font-size:9px;font-weight:700;color:var(--txt);
    background:var(--paper);border:1px solid #CFCFD6;border-radius:3px;padding:0 1px;
    height:14px;line-height:12px;cursor:pointer;width:62px;box-sizing:border-box;
  }
  .bmatch-meta-table-input{
    font-family:'IBM Plex Sans',sans-serif;font-size:9px;font-weight:700;color:var(--txt);
    background:var(--paper);border:1px solid #CFCFD6;border-radius:3px;padding:0 2px;
    height:14px;line-height:12px;width:24px;text-align:center;box-sizing:border-box;
  }
  .bmatch-meta-table-input::placeholder{color:#8A8A93;opacity:0.9;font-size:11px;}
  /* admin-only print icon, left of the time field — prints just this one match (see printMatchOnly())
     rather than the whole bracket. Sized to fit the same fixed 17px meta strip as everything else in it. */
  .print-match-btn{
    background:none;border:none;color:#55555E;font-size:11px;padding:0;margin-right:3px;
    cursor:pointer;line-height:1;height:14px;width:14px;display:inline-flex;align-items:center;justify-content:center;
    flex:0 0 auto;
  }
  .print-match-btn:hover{color:var(--red);}
  /* set-by-set scoresheet table attached to every bracket match box — invisible in the normal tree by
     default (see buildPrintSetsLine()/refreshPrintSetsLine()). Only turned on by .has-sets, which JS
     adds once the match actually has stored setScores data, and only under the
     print-single-match-comp/-cons @media print rule below, so a still-scoreless match prints with no
     table at all, not an empty one. */
  .bmatch-print-sets{display:none;}

  .connector path, .connector line{stroke:#9EA1CC;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;fill:none;}
  .connector .cdot{fill:#7A7DB0;}

  footer.foot{margin-top:50px;border-top:1px solid var(--line);padding-top:14px;font-size:11px;color:var(--ink-soft);font-family:'IBM Plex Mono',monospace;}

  /* print isolation: when a bracket's Print button is used, hide everything except that bracket */
  @media print {
    body.print-comp-only .wrap > header.top,
    body.print-comp-only .wrap > .session-manager,
    body.print-comp-only .wrap > .import-box,
    body.print-comp-only .wrap > .viewer-banner,
    body.print-comp-only .wrap > .legend,
    body.print-comp-only .wrap > nav.tabs,
    body.print-comp-only .wrap > footer.foot,
    body.print-comp-only section.panel:not(#panel-compbracket),
    body.print-comp-only #panel-compbracket > h2.section-title,
    body.print-comp-only #panel-compbracket > p.section-sub,
    body.print-comp-only #panel-compbracket .arena-head .btns,
    body.print-comp-only #panel-compbracket .arena-head .sub,

    body.print-cons-only .wrap > header.top,
    body.print-cons-only .wrap > .session-manager,
    body.print-cons-only .wrap > .import-box,
    body.print-cons-only .wrap > .viewer-banner,
    body.print-cons-only .wrap > .legend,
    body.print-cons-only .wrap > nav.tabs,
    body.print-cons-only .wrap > footer.foot,
    body.print-cons-only section.panel:not(#panel-consbracket),
    body.print-cons-only #panel-consbracket > h2.section-title,
    body.print-cons-only #panel-consbracket > p.section-sub,
    body.print-cons-only #panel-consbracket .arena-head .btns,
    body.print-cons-only #panel-consbracket .arena-head .sub
    { display:none !important; }

    body.print-comp-only section.panel#panel-compbracket,
    body.print-cons-only section.panel#panel-consbracket
    { display:block !important; padding-top:0 !important; }

    /* On paper the heading is gone, so the bracket names itself in front of the tournament. Not
       scoped to the two isolated print modes: printing the whole page puts BOTH brackets on paper,
       and then each of them needs the label just as much. */
    .arena-tname-bracket{ display:inline !important; }

    body.print-comp-only .wrap, body.print-cons-only .wrap{ max-width:none; padding:0; margin:0; }
    body.print-comp-only .arena, body.print-cons-only .arena{ border:none; box-shadow:none; }
    body.print-comp-only .bracket-wrap, body.print-cons-only .bracket-wrap{ overflow:visible; padding:0; }
    #medalsFloat{ display:none !important; }

    /* print isolation: printing a single group's matches from its own print icon */
    body.print-single-group .wrap > header.top,
    body.print-single-group .wrap > .session-manager,
    body.print-single-group .wrap > .import-box,
    body.print-single-group .wrap > .viewer-banner,
    body.print-single-group .wrap > .legend,
    body.print-single-group .wrap > nav.tabs,
    body.print-single-group .wrap > footer.foot,
    body.print-single-group section.panel:not(#panel-groups),
    body.print-single-group #panel-groups > h2.section-title,
    body.print-single-group .groups-title-row,
    body.print-single-group .print-all-groups-btn,
    body.print-single-group .print-group-btn,
    /* v124 — the on-screen extras above the groups and on each card head never belong on the sheet */
    body.print-single-group .viewer-tournament-title,
    body.print-single-group .mmw-bar,
    body.print-single-group .gs-boxes,
    body.print-single-group .erase-group-btn,
    body.print-single-group table.sched th.th-score,
    body.print-single-group table.sched th.th-ref,
    body.print-single-group table.sched td.score-cell,
    body.print-single-group table.sched td.refcell
    { display:none !important; }
    /* v124 — score and referee move to the second row of each match (next to the set boxes), so the
       names get the whole first row */
    body.print-single-group table.sched col.c-score,
    body.print-single-group table.sched col.c-ref{ width:0 !important; }
    body.print-single-group .print-extra{ display:flex; align-items:center; gap:14px; margin-left:auto; padding-left:10px; white-space:nowrap; font-size:9.5px; }
    body.print-single-group .print-extra-item{ display:flex; align-items:center; gap:4px; }
    body.print-single-group .print-extra-label{ text-transform:uppercase; letter-spacing:0.3px; color:#555; }
    /* v125 — the printed card is ONLY the referee sheet (.gps); every on-screen part of the card goes */
    body.print-single-group #printGroupTNameEl,
    body.print-single-group .group-card > *:not(.gps){ display:none !important; }
    body.print-single-group .group-card{ border:none !important; background:#fff !important; padding:0 !important; margin:0 !important; }
    body.print-single-group, body.print-single-group .wrap, body.print-single-group #panel-groups, body.print-single-group .group-grid{ background:#fff !important; }
    body.print-single-group .group-card{ overflow:visible !important; }
    body.print-single-group .gps{ display:block; color:#000; font-family:'IBM Plex Sans', Arial, sans-serif; font-size:11px; padding:0 3px; }
    body.print-single-group .gps, body.print-single-group .gps *{ font-weight:400 !important; text-shadow:none !important; }
    body.print-single-group .gps .gps-tname, body.print-single-group .gps .gps-group, body.print-single-group .gps .gps-pn,
    body.print-single-group .gps .gps-no{ font-weight:600 !important; }
    .gps-head{ display:flex; align-items:baseline; gap:14px; border-bottom:1.5px solid #000; padding-bottom:6px; margin-bottom:6px; }
    .gps-tname{ font-size:15px; text-transform:uppercase; letter-spacing:.4px; }
    .gps-meta{ flex:1; font-size:11px; color:#444; }
    .gps-group{ font-size:15px; text-transform:uppercase; letter-spacing:.6px; }
    .gps table{ width:100%; border-collapse:collapse; }
    .gps th{ font-size:8.5px; color:#666; text-transform:uppercase; letter-spacing:.5px; padding:2px 0 4px; text-align:center; }
    .gps td{ padding:0 4px; height:26px; text-align:center; font-size:12px; }
    .gps tbody{ break-inside:avoid; page-break-inside:avoid; }
    /* v144 — inside one match the line between its two players is very light; between matches a bit bolder
       v156 — "a bit bolder" is now a thin line (was 2px #555, which printed far too heavy), and the whole
       table has a frame of its own (by request) */
    .gps tbody + tbody tr.gps-r1 td{ border-top:1px solid #999; }
    .gps table.gps-score{ border:1.5px solid #000; }
    .gps table.gps-score thead th{ border-bottom:1px solid #999; padding-top:4px; }
    .gps table.gps-score .gps-no{ padding-left:6px; }
    .gps table.gps-score .gps-ref{ padding-right:8px; }
    .gps tr.gps-r1 td.gps-set, .gps tr.gps-r1 td.gps-tot{ border-bottom:1px solid #e6e6e6; }
    .gps tr.gps-r2 td.gps-set, .gps tr.gps-r2 td.gps-tot{ border-top:1px solid #e6e6e6; }
    .gps tbody tr.gps-r1 td{ padding-top:5px; } .gps tbody tr.gps-r2 td{ padding-bottom:5px; }
    .gps .gps-no{ width:18px; color:#888; font-size:10px; vertical-align:middle; }
    .gps .gps-pn{ text-align:left; white-space:nowrap; }
    .gps td.gps-set{ width:32px; } .gps td.gps-set, .gps td.gps-tot{ border:1px solid #999; }
    .gps .gps-tot{ width:40px; }
    .gps td.gps-tot{ border-left:2.5px solid #000; border-right:2.5px solid #000; }
    .gps th.gps-tot{ border-left:2.5px solid transparent; border-right:2.5px solid transparent; }
    .gps-players-row{ display:flex; flex-wrap:nowrap; gap:22px; padding:2px 0 8px; margin-bottom:4px; border-bottom:1px solid #ccc; font-size:11.5px; }
    .gps-pl{ white-space:nowrap; } .gps-pl-n{ color:#888; margin-right:5px; }
    body.print-single-group .gps .gps-pl{ font-weight:600 !important; } body.print-single-group .gps .gps-pl-n{ font-weight:400 !important; }
    .gps .gps-ref{ width:120px; font-size:9.5px; color:#555; text-align:right; vertical-align:middle; }
    @page{ margin:12mm; }
    /* with the status boxes gone, "GRUP" and its letter must stay together instead of flying apart */
    body.print-single-group .group-card .head .head-label{ justify-content:flex-start !important; }
    /* printing ALL of them (printAllGroups()) rides on the same isolation rules, and only adds:
       never split a card across a page boundary, and start each one on a fresh page. */
    body.print-all-groups .group-card{ break-inside:avoid; page-break-inside:avoid; }
    body.print-all-groups .group-card + .group-card{ break-before:page; page-break-before:always; }
    body.print-single-group .wrap{ max-width:none; padding:0; margin:0; }
    body.print-single-group .group-grid{ display:block; }
    body.print-single-group .group-card{ box-shadow:none; }
    body.print-single-group .print-group-tname{
      display:block; font-family:var(--font-display); font-weight:700; font-size:30px;
      color:#000; text-transform:uppercase; letter-spacing:0.8px; margin:0 0 16px;
      border-bottom:3px solid #000; padding-bottom:10px;
      text-shadow:0.6px 0 0 currentColor, -0.6px 0 0 currentColor; /* faux-bold: the display face tops out at 700, this adds a touch more visual weight for print */
    }
    /* the whole printed page, not just the heading — every label, name, and table cell in bold */
    body.print-single-group .wrap, body.print-single-group .wrap *{
      font-weight:700 !important;
      text-shadow:0.4px 0 0 currentColor, -0.4px 0 0 currentColor; /* same faux-bold boost as the heading, since most of this text sits well under the display face's 700 ceiling */
    }
    /* blank set-by-set scoring boxes under each match, for filling in by hand during play — a light,
       thin-lined gray box (not heavy black) so it stays unobtrusive, with a small label, sized to
       still let all five fit on one row instead of wrapping onto a second line. */
    body.print-single-group .print-sets-row{ display:table-row; }
    body.print-single-group .print-sets{
      display:flex; flex-wrap:nowrap; gap:6px; padding:6px 0 14px; border-bottom:1px dotted #999;
    }
    body.print-single-group .print-set{ display:flex; align-items:center; gap:3px; font-size:9px; }
    body.print-single-group .print-set-label{ text-transform:uppercase; letter-spacing:0.2px; white-space:nowrap; }
    body.print-single-group .print-set-dash{ padding:0 1px; color:#AAA; }
    body.print-single-group .print-box{
      display:inline-block; width:28px; height:22px; border:1px solid #AAA; border-radius:3px;
    }

    /* print isolation: printing a single bracket match from its own print icon (admin side, left of
       the time field on that match's box) — reuses the print-comp-only/print-cons-only chrome-hiding
       list (one variant per bracket, since only one bracket panel is ever the print target), then
       additionally collapses every OTHER round-column so only the target's own round shows, and
       switches that one match box from the tree's absolute positioning to normal centered static flow
       so it isn't left floating in the blank space its "top" offset used to place it in. Which sibling
       match boxes and round-columns get hidden is done in JS (printMatchOnly()) exactly like
       printGroupOnly() hides every other .group-card — CSS alone can't match "the one box whose
       bracket/round/index equal this specific match". */
    body.print-single-match-comp .wrap > header.top,
    body.print-single-match-comp .wrap > .session-manager,
    body.print-single-match-comp .wrap > .import-box,
    body.print-single-match-comp .wrap > .viewer-banner,
    body.print-single-match-comp .wrap > .legend,
    body.print-single-match-comp .wrap > nav.tabs,
    body.print-single-match-comp .wrap > footer.foot,
    body.print-single-match-comp section.panel:not(#panel-compbracket),
    body.print-single-match-comp #panel-compbracket > h2.section-title,
    body.print-single-match-comp #panel-compbracket > p.section-sub,
    body.print-single-match-comp #panel-compbracket .arena-head .btns,
    body.print-single-match-comp #panel-compbracket .arena-head .sub,
    body.print-single-match-comp .bround-label,

    body.print-single-match-cons .wrap > header.top,
    body.print-single-match-cons .wrap > .session-manager,
    body.print-single-match-cons .wrap > .import-box,
    body.print-single-match-cons .wrap > .viewer-banner,
    body.print-single-match-cons .wrap > .legend,
    body.print-single-match-cons .wrap > nav.tabs,
    body.print-single-match-cons .wrap > footer.foot,
    body.print-single-match-cons section.panel:not(#panel-consbracket),
    body.print-single-match-cons #panel-consbracket > h2.section-title,
    body.print-single-match-cons #panel-consbracket > p.section-sub,
    body.print-single-match-cons #panel-consbracket .arena-head .btns,
    body.print-single-match-cons #panel-consbracket .arena-head .sub,
    body.print-single-match-cons .bround-label,

    body.print-single-match-comp .print-match-btn,
    body.print-single-match-cons .print-match-btn
    { display:none !important; }

    body.print-single-match-comp section.panel#panel-compbracket,
    body.print-single-match-cons section.panel#panel-consbracket
    { display:block !important; padding-top:0 !important; }

    body.print-single-match-comp .wrap, body.print-single-match-cons .wrap{ max-width:none; padding:0; margin:0; }
    body.print-single-match-comp .arena, body.print-single-match-cons .arena{ border:none; box-shadow:none; }
    body.print-single-match-comp .bracket-wrap, body.print-single-match-cons .bracket-wrap{ overflow:visible; padding:0; }
    body.print-single-match-comp .bracket-cols, body.print-single-match-cons .bracket-cols{ min-width:0 !important; }
    body.print-single-match-comp .bround, body.print-single-match-cons .bround{ width:auto !important; margin:0 !important; }
    body.print-single-match-comp .bcol-inner, body.print-single-match-cons .bcol-inner{
      height:auto !important; display:flex !important; justify-content:center;
    }
    /* single-match print uses as much of the page's width as it reasonably can, not a small card
       floating in the corner — the wrapper goes wide, and everything inside it (names, scores, the
       meta strip, the set-score table) scales up to match rather than sitting tiny in a big box.
       A plain fixed px width, not a percentage: .bmatch-wrap sits inside a chain of nested flex
       containers reset to width:auto for this print mode, so a percentage here resolves against an
       indeterminate/auto-sized ancestor and collapses to a much smaller value than intended. */
    body.print-single-match-comp .bmatch-wrap, body.print-single-match-cons .bmatch-wrap{
      position:static !important; top:auto !important; width:700px !important; max-width:94% !important;
    }
    body.print-single-match-comp .glabel, body.print-single-match-cons .glabel{ font-size:15px; height:auto; line-height:1.3; }
    body.print-single-match-comp .bmatch, body.print-single-match-cons .bmatch{ font-size:18px; }
    body.print-single-match-comp .bmatch .row, body.print-single-match-cons .bmatch .row{ height:56px; padding:0 20px; }
    body.print-single-match-comp .bmatch .seedtag, body.print-single-match-cons .bmatch .seedtag{ font-size:14px; }
    body.print-single-match-comp .bmatch .scorebox, body.print-single-match-cons .bmatch .scorebox{
      flex:0 0 44px; width:44px; min-width:44px; height:34px; font-size:18px; border-radius:7px;
    }
    body.print-single-match-comp .bmatch-meta, body.print-single-match-cons .bmatch-meta{
      height:auto; padding:8px 20px; font-size:14px;
    }
    body.print-single-match-comp .bmatch-meta-time-input, body.print-single-match-cons .bmatch-meta-time-input,
    body.print-single-match-comp .bmatch-meta-table-input, body.print-single-match-cons .bmatch-meta-table-input{
      height:auto; font-size:13px; padding:2px 4px;
    }
    /* the set-by-set scoresheet table (see refreshPrintSetsLine()) — hidden everywhere except this
       one printed card, and only turned on via .has-sets, which JS only adds once the match actually
       has stored setScores data, so a still-scoreless match prints with no table at all rather than
       an empty one. */
    body.print-single-match-comp .bmatch-print-sets.has-sets, body.print-single-match-cons .bmatch-print-sets.has-sets{
      display:block !important; margin-top:14px;
    }
    body.print-single-match-comp .bst-table, body.print-single-match-cons .bst-table{
      font-size:16px;
    }
    body.print-single-match-comp .bst-table th, body.print-single-match-cons .bst-table th,
    body.print-single-match-comp .bst-table td, body.print-single-match-cons .bst-table td{
      padding:8px 14px;
    }
    body.print-single-match-comp .bst-table th, body.print-single-match-cons .bst-table th{ font-size:12px; }
    body.print-single-match-comp .bst-table td.bst-name, body.print-single-match-cons .bst-table td.bst-name{
      max-width:280px;
    }
    #medalsFloat{ display:none !important; }

    /* Match History modal's "Save as PDF" (printMatchHistoryOnly()) — unlike the targets above, this
       content lives in a fixed-position modal OUTSIDE .wrap rather than inside it, so the simplest
       correct rule is to hide .wrap entirely (nothing in it is being printed) and reset the modal from
       a fixed centered overlay back to normal in-flow layout so it actually paginates. */
    body.print-match-history-only .wrap{ display:none; }
    body.print-match-history-only #matchHistoryModal{
      position:static; background:none; padding:0; display:block;
    }
    body.print-match-history-only #matchHistoryModal .login-card{
      box-shadow:none; max-width:none; width:100%; max-height:none; overflow:visible; margin:0; padding:0;
    }
    body.print-match-history-only #matchHistoryCloseBtn,
    body.print-match-history-only .match-history-export-row,
    body.print-match-history-only #matchHistoryModal p{ display:none; }
  }

  /* floating animated medals */
  @keyframes medalBob{ 0%,100%{ transform:translateY(0) rotate(-3deg); } 50%{ transform:translateY(-7px) rotate(3deg); } }
  @keyframes medalShine{
    0%{ transform:translateX(-120%) rotate(20deg); opacity:0; }
    35%{ opacity:0.55; }
    60%{ transform:translateX(220%) rotate(20deg); opacity:0; }
    100%{ transform:translateX(220%) rotate(20deg); opacity:0; }
  }
  @keyframes medalsFloatIn{ from{ opacity:0; transform:translateY(16px) scale(0.96); } to{ opacity:1; transform:translateY(0) scale(1); } }

  #medalsFloat{
    position:absolute; right:18px; top:96px; z-index:900;
    display:none; flex-direction:column; gap:8px;
    background:linear-gradient(160deg,#FFFDF6,#FBF3DC);
    border:1px solid #E8D9A0; border-radius:14px;
    padding:14px 16px 12px; box-shadow:0 10px 30px rgba(58,47,140,0.18), 0 2px 6px rgba(0,0,0,0.08);
    animation:medalsFloatIn .5s ease-out;
    max-width:230px;
    user-select:none;
  }
  #medalsFloat .mf-head{
    display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:2px;
    cursor:grab;
  }
  #medalsFloat .mf-head:active{ cursor:grabbing; }
  #medalsFloat.dragging{ animation:none; transition:none; }
  #medalsFloat .mf-title{
    font-family:var(--font-display); font-weight:600; font-size:11px; letter-spacing:0.8px; text-transform:uppercase;
    color:#8A6D1B;
  }
  #medalsFloat .mf-close{
    background:none; border:none; cursor:pointer; color:#B8A968; font-size:13px; line-height:1; padding:2px;
  }
  #medalsFloat .mf-close:hover{ color:#7A6323; }
  .medal-item{
    display:flex; align-items:center; gap:10px; padding:6px 4px; position:relative; overflow:hidden; border-radius:8px;
  }
  .medal-item .medal-icon{
    font-size:24px; line-height:1; display:inline-block;
    animation:medalBob 2.6s ease-in-out infinite;
    filter:drop-shadow(0 2px 3px rgba(0,0,0,0.18));
  }
  .medal-item.silver .medal-icon{ animation-delay:.3s; }
  .medal-item.bronze .medal-icon{ animation-delay:.45s; }
  .medal-item.cons .medal-icon{ animation-delay:.6s; }
  .medal-item::after{
    content:''; position:absolute; top:-40%; left:0; width:30%; height:180%;
    background:linear-gradient(120deg, transparent, rgba(255,255,255,0.75), transparent);
    animation:medalShine 3.2s ease-in-out infinite;
    pointer-events:none;
  }
  .medal-item.silver::after{ animation-delay:1s; }
  .medal-item.bronze::after{ animation-delay:1.5s; }
  .medal-item.cons::after{ animation-delay:2s; }
  .medal-text{ min-width:0; }
  .medal-label{
    font-family:var(--font-display); font-weight:600; font-size:10.5px; letter-spacing:0.5px; text-transform:uppercase;
    color:#9C8038;
  }
  .medal-name{
    font-family:'IBM Plex Sans',sans-serif; font-weight:600; font-size:12.5px; color:#3A2F1C;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  }
  .medal-name + .medal-name{ margin-top:1px; }
  /* v287 — a podium place written by hand, and its ✎ */
  .medal-name:has(.medal-edit){display:flex;align-items:center;min-width:0;}
  .medal-name .mn{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;}
  .medal-name .medal-edit{flex:none;margin-left:5px;padding:0 4px;font-size:10px;line-height:1.3;border:1px solid var(--line);border-radius:4px;background:#fff;color:var(--ink-soft);cursor:pointer;vertical-align:1px;}
  .medal-name .medal-edit:hover{border-color:var(--gold);color:var(--gold);}
  .medal-name.medal-hand .mn{color:#8a5a00;}
  @media print{ .medal-name .medal-edit{display:none !important;} }

  /* ---- mobile: bigger touch targets, tighter spacing to make better use of a phone screen ---- */
  @media (max-width: 640px){
    .wrap{ padding:16px 12px 60px; }
    header.top{ padding:16px 16px 14px; }
    .brand h1{ font-size:22.8px; }
    .signature{ font-size:18px; }

    /* the session bar (theme toggle + language toggle + sync status + role pill + buttons) is
       a lot of controls for a phone-width row — let it wrap instead of running off-screen */
    .session-bar{ flex-wrap:wrap;justify-content:flex-end;row-gap:6px; }
    .theme-toggle, .lang-toggle{ margin-right:0; }

    /* keep the swap grid at 4 fixed columns (so column = slot position stays true) but shrink
       cards to fit a phone width instead of overflowing */
    .swap-grid{ gap:5px; }
    .swap-card{ padding:5px 4px; }
    .swap-card .swap-tag{ font-size:7.5px; margin-bottom:1px; }
    .swap-card .swap-name{ font-size:10.5px; }

    /* every button gets a real touch target (~40px+ tall) instead of the desktop-dense sizing */
    .session-admin-actions button, .share-btn, #championshipMenuBtn, #timeTableMenuBtn, #timeTableArenaLink, #simpleArenaLink, #playerModuleBtn{
      font-size:12px; padding:10px 12px;
    }
    .import-actions button{ font-size:13px; padding:11px 14px; }
    nav.tabs button{ font-size:12.5px; padding:12px 14px; }
    .print-group-btn{ font-size:15px; padding:7px 10px; }
    .arena-head .btns button{ font-size:13px; padding:9px 15px; }

    /* head-meta (Day/Table/Time) inputs — a little taller and wider for a thumb, not just a mouse pointer */
    .head-meta select, .head-meta input{ font-size:14px; padding:6px 7px; }
    .head-meta select{ width:84px; }
    .head-meta input.meta-table{ width:60px; }
    .head-meta input.meta-time{ width:68px; }

    /* player name fields and round-robin score boxes are what gets tapped over and over while
       actually running a tournament — worth the extra height */
    .players input{ padding:10px 10px; font-size:14px; }
    .drag-handle{ width:28px;height:34px;font-size:16px; }
    .player-name-input{ flex-basis:34%; }
    .player-loc-input{ flex-basis:33%; }
    .player-club-input{ flex-basis:33%; }
    table.sched input.score{ width:38px; flex:0 0 38px; padding:7px 2px; font-size:16px; }
    .session-manager select{ padding:9px 8px; font-size:15px; font-weight:700; max-width:220px; }

    #medalsFloat{ max-width:calc(100vw - 24px); }

    .player-modal-grid{ grid-template-columns:1fr; }
    .roster-search{ min-width:0; flex:1 1 100%; }
  }

  /* ============================================================
     MINIMALIST theme — an alternate stylesheet, toggled per-viewer
     (see .theme-toggle). "Original" (the rules above) is untouched;
     everything below only applies when html[data-theme="minimalist"]
     is set. Two restrained accents (a muted bronze for
     Competition/primary, a muted slate for Consolation/secondary)
     replace the bright purple/gold pair; gradients are flattened to
     solid colors; shadows are removed in favor of hairline borders.
     ============================================================ */
  html[data-theme="minimalist"]{
    --paper:#FFFFFF;
    --paper-alt:#F7F7F7;
    --ink:#1C1C1F;
    --ink-soft:#74747C;
    --line:#E6E6E7;
    --line-strong:#1C1C1F;
    --gold:#6B5B35;
    --gold-soft:#F1EDE4;
    --slate:#4B5563;
    --slate-soft:#EEF0F2;
    --red:#A8382E;
    --green:#3E7A56;
    /* --accent-dark / --on-dark-dim stay pale: group-card headers and table captions still sit
       on a dark var(--ink) background in this theme too, and rely on these for contrast. Only
       header.top itself flips to a light background — its text is re-pointed to --ink below
       instead of redefining these two globally (which would break every other dark-bg use). */
    --accent-dark:#EDE6D6;
    --on-dark-dim:#B4B4BC;
    --score-ink:#6B5B35;
    --faint-ink:#74747C;
    --shadow:none;
  }
  [data-theme="minimalist"] header.top{
    background:var(--paper);border:1px solid var(--line);box-shadow:none;
  }
  [data-theme="minimalist"] .kicker-block .num{ color:var(--ink); }
  [data-theme="minimalist"] .signature{ color:var(--ink); }
  [data-theme="minimalist"] .brand h1{ color:var(--ink); }
  [data-theme="minimalist"] .brand h1:hover{ background:var(--paper-alt);color:var(--ink);transform:none; }
  [data-theme="minimalist"] .brand p{ color:var(--ink-soft); }
  [data-theme="minimalist"] .session-bar{ color:var(--ink-soft); }
  [data-theme="minimalist"] .session-bar .role-pill{
    background:var(--paper-alt);color:var(--ink);border:1px solid var(--line);
  }
  [data-theme="minimalist"] .session-bar .role-pill.admin{ background:var(--gold-soft);color:var(--ink); }
  [data-theme="minimalist"] .session-bar button{
    background:var(--paper);border:1px solid var(--line);color:var(--ink);
  }
  [data-theme="minimalist"] .session-bar button:hover{ background:var(--paper-alt); }
  /* .lang-toggle/.theme-toggle no longer need minimalist-specific overrides — their base rules
     now use the --line/--ink-soft/--paper-alt theme vars directly (see near .dropdown-panel) */

  [data-theme="minimalist"] #loginScreen,
  [data-theme="minimalist"] #sizeModal,
  [data-theme="minimalist"] #championshipPickScreen,
  [data-theme="minimalist"] #championScreen,
  [data-theme="minimalist"] #championManageModal{ background:var(--paper-alt); }
  [data-theme="minimalist"] .login-card{ box-shadow:none;border:1px solid var(--line); }
  [data-theme="minimalist"] .champion-item{ background:var(--paper); }
  [data-theme="minimalist"] #championScreenSubtitle{ color:var(--gold); }

  [data-theme="minimalist"] .swap-card.swap-changed,
  [data-theme="minimalist"] .player-row.swap-changed{ background:#EDF2EE; }
  [data-theme="minimalist"] .swap-card.dup-location{ background:#F7EBEA; }

  [data-theme="minimalist"] table.sched input.score{
    border:1px solid #D9C9A0;background:#F6F0DE;color:var(--score-ink);
  }

  [data-theme="minimalist"] .arena{
    --bg:var(--paper); --header1:var(--ink); --header2:var(--ink); --purple:var(--gold);
    --lav:var(--paper-alt); --lav-border:var(--line); --peach:var(--gold-soft); --peach-text:var(--ink-soft);
    --empty:#F0F0F0; --score-bg:var(--paper-alt); --score-text:var(--ink);
    --txt:var(--ink); --txt-dim:var(--ink-soft); --line-c:var(--line);
    border-color:var(--line);
  }
  /* .bmatch keeps its one base drop-shadow in minimalist theme too (previously this theme zeroed it
     out, leaving winner cards with only their accent border and non-winner cards with none at all —
     now every card, winner or not, in either theme, has exactly that one shadow layer). */
  [data-theme="minimalist"] .bmatch.winner-top .row:first-child,
  [data-theme="minimalist"] .bmatch.winner-bottom > .row:nth-child(2){ background:var(--gold-soft); }
  [data-theme="minimalist"] .bmatch input.scorebox{ background:var(--paper-alt);border:1.5px dashed var(--ink-soft); }
  [data-theme="minimalist"] .bmatch .scorebox.faint{ background:#E4E4E6; }
  [data-theme="minimalist"] .connector path,
  [data-theme="minimalist"] .connector line{ stroke:#C7C7CC; }
  [data-theme="minimalist"] .connector .cdot{ fill:#9A9AA0; }
  [data-theme="minimalist"] .arena-head .btns button{ color:var(--ink); }
  [data-theme="minimalist"] .sync-dot.local{ background:#9A9AA5; }

  [data-theme="minimalist"] #medalsFloat{
    background:var(--paper);border:1px solid var(--line);
    box-shadow:0 2px 10px rgba(0,0,0,0.06);
  }
  [data-theme="minimalist"] #medalsFloat .mf-title{ color:var(--ink); }
  [data-theme="minimalist"] #medalsFloat .mf-close{ color:var(--ink-soft); }
  [data-theme="minimalist"] #medalsFloat .mf-close:hover{ color:var(--ink); }
  [data-theme="minimalist"] .medal-label{ color:var(--ink-soft); }
  [data-theme="minimalist"] .medal-name{ color:var(--ink); }

  [data-theme="minimalist"] .session-manager.pulse-highlight{ animation-name:pulseHighlightMinimal; }
  @keyframes pulseHighlightMinimal{
    0%{ box-shadow:0 0 0 0 rgba(28,28,31,0.35); }
    70%{ box-shadow:0 0 0 10px rgba(28,28,31,0); }
    100%{ box-shadow:0 0 0 0 rgba(28,28,31,0); }
  }

.tournament-player-table th[data-sort]{cursor:pointer;user-select:none;padding-right:20px;}
.tournament-player-table th[data-sort]:hover{color:var(--ink);}
.tournament-player-table th[data-sort]::after{content:'↕';position:absolute;right:7px;opacity:.35;}
.tournament-player-table th[data-sort].sort-active[data-sort-dir='asc']::after{content:'▲';opacity:1;}
.tournament-player-table th[data-sort].sort-active[data-sort-dir='desc']::after{content:'▼';opacity:1;}

.load-db-sort-field{margin-top:8px;}
.load-db-sort-field label{display:block;font-size:.82rem;font-weight:700;margin-bottom:4px;}
.load-db-sort-field select{width:100%;padding:9px 10px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);}

.load-db-letters-wrap{margin:8px 0 10px;font-size:.82rem;font-weight:700}.load-db-letters{display:flex;flex-wrap:wrap;gap:4px;margin-top:5px}.load-db-letters button{min-width:30px;padding:5px 7px;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--ink);cursor:pointer}.load-db-letters button:hover,.load-db-letters button.selected{font-weight:800;box-shadow:inset 0 0 0 2px currentColor}

.load-db-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
#loadFromDbList .champion-check-row{cursor:pointer;transition:background .12s ease,box-shadow .12s ease}
#loadFromDbList .champion-check-row:hover{box-shadow:inset 0 0 0 1px var(--line)}
#loadFromDbList .champion-check-row.selected{font-weight:700;box-shadow:inset 0 0 0 2px currentColor}
#loadFromDbList .champion-check-row input[type="checkbox"]{width:18px;height:18px;flex:0 0 auto}
/* v199 — ELO box on each row, the drag handle, the place number and the drop line */
#loadFromDbModal #loadFromDbList{max-height:min(52vh,520px);}
#loadFromDbList .lfd-handle{cursor:grab;color:var(--ink-soft);font-size:15px;line-height:1;padding:2px 3px;user-select:none;flex:0 0 auto;}
#loadFromDbList .lfd-handle:active{cursor:grabbing;}
#loadFromDbList .lfd-pos{font-family:'IBM Plex Mono',monospace;font-size:10.5px;color:var(--ink-soft);min-width:24px;text-align:right;flex:0 0 auto;font-weight:500;}
#loadFromDbList input.lfd-elo{width:66px;flex:0 0 auto;margin:0 0 0 auto;padding:3px 6px;font-size:12px;font-family:'IBM Plex Mono',monospace;text-align:right;
  border:1px solid var(--line);border-radius:5px;background:var(--paper);color:var(--ink);font-weight:600;}
#loadFromDbList .in-tournament-tag ~ input.lfd-elo{margin-left:6px;}
#loadFromDbList input.lfd-elo:focus{outline:none;border-color:var(--gold);box-shadow:0 0 0 2px rgba(212,160,23,.25);}
#loadFromDbList input.lfd-elo.lfd-changed{border-color:var(--gold);background:rgba(212,160,23,.10);}
#loadFromDbList input.lfd-elo.lfd-bad{border-color:var(--red,#C0392B);}
#loadFromDbList .champion-check-row.lfd-dragging{opacity:.4;}
#loadFromDbList .champion-check-row.lfd-over-top{box-shadow:inset 0 3px 0 var(--gold);}
#loadFromDbList .champion-check-row.lfd-over-bottom{box-shadow:inset 0 -3px 0 var(--gold);}
#loadFromDbModal .lfd-save-state{font-size:11.5px;font-weight:700;margin-left:8px;color:var(--ink-soft);}
#loadFromDbModal .lfd-save-state.ok{color:var(--green,#2E7D32);}
#loadFromDbModal .lfd-save-state.fail{color:var(--red,#C0392B);}
#loadFromDbModal .lfd-hint{font-size:11.5px;color:var(--ink-soft);margin:-4px 0 8px;font-style:italic;}
/* v200 — drag with an opening gap: the dragged row leaves the list, a dashed gap of its height opens where it would land */
.mtp-gap-src{display:none !important;}
div.mtp-gap{height:var(--gap-h,34px);flex:0 0 auto;box-sizing:border-box;border:2px dashed var(--gold);border-radius:7px;background:rgba(212,160,23,.10);animation:mtpGapIn .14s ease-out;}
@keyframes mtpGapIn{from{height:0;opacity:.3}to{height:var(--gap-h,34px);opacity:1}}
tr.mtp-gap td{height:var(--gap-h,28px);padding:0 !important;box-sizing:border-box;border:2px dashed var(--gold) !important;background:rgba(212,160,23,.10);}
.viewer-tournament-player-table input.tp-elo-input{width:60px;padding:2px 5px;border:1px solid var(--line);border-radius:5px;background:var(--paper);color:var(--ink);
  font-family:'IBM Plex Mono',monospace;font-size:11px;text-align:right;font-weight:600;}
.viewer-tournament-player-table input.tp-elo-input:focus{outline:none;border-color:var(--gold);}
.viewer-tournament-player-table input.tp-elo-input.lfd-changed{border-color:var(--gold);background:rgba(212,160,23,.10);}
.viewer-tournament-player-table input.tp-elo-input.lfd-bad{border-color:var(--red,#C0392B);}
#panel-tournamentplayers .lfd-save-state{font-size:11px;font-weight:700;margin-left:10px;color:var(--ink-soft);}
#panel-tournamentplayers .lfd-save-state.ok{color:var(--green,#2E7D32);}
#panel-tournamentplayers .lfd-save-state.fail{color:var(--red,#C0392B);}

/* v24: filter + sorting controls are intentionally visible inside Load Players modal */
/* v54 — Excel-like criteria filters */
.xf-row{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:8px 0 4px;}
.xf-row .xf-label{font-family:var(--font-display);font-size:10.5px;font-weight:700;letter-spacing:.8px;text-transform:uppercase;color:var(--ink-soft);margin-right:2px;}
.xf-btn{border:1px solid var(--line);border-radius:6px;background:var(--paper);color:var(--ink);font-size:12px;padding:5px 9px;cursor:pointer;font-weight:600;text-transform:none;letter-spacing:0;width:auto;margin:0;}
.xf-btn:hover{border-color:var(--gold);}
.xf-btn.on{background:var(--ink);color:#FFE066;border-color:var(--ink);}
.xf-btn .xf-n{font-family:'IBM Plex Mono',monospace;font-size:10.5px;opacity:.85;margin-left:3px;}
.xf-clear{border:0;background:transparent;color:var(--red,#C0392B);font-size:12px;font-weight:700;cursor:pointer;text-decoration:underline;width:auto;margin:0;padding:4px;}
.xf-pop{position:fixed;z-index:3000;width:270px;max-height:min(420px,70vh);display:flex;flex-direction:column;background:var(--paper);
  border:1px solid var(--line-strong,var(--line));border-radius:10px;box-shadow:0 14px 34px rgba(0,0,0,.28);padding:10px;}
.xf-pop input.xf-search{width:100%;box-sizing:border-box;padding:6px 8px;border:1px solid var(--line);border-radius:6px;font-size:12.5px;margin-bottom:6px;}
.xf-pop .xf-range{display:flex;gap:6px;align-items:center;font-size:12px;margin-bottom:6px;color:var(--ink-soft);}
.xf-pop .xf-range input{width:62px;padding:5px 6px;border:1px solid var(--line);border-radius:6px;font-size:12.5px;}
.xf-pop .xf-list{overflow-y:auto;flex:1 1 auto;border:1px solid var(--line);border-radius:6px;padding:4px 0;}
.xf-pop label{display:flex;align-items:center;gap:7px;padding:3px 9px;font-size:12.5px;cursor:pointer;color:var(--ink);text-transform:none;letter-spacing:0;font-weight:500;}
.xf-pop label:hover{background:var(--paper-alt);}
.xf-pop label .xf-c{margin-left:auto;font-family:'IBM Plex Mono',monospace;font-size:10.5px;color:var(--ink-soft);}
.xf-pop label.xf-all{font-weight:700;border-bottom:1px solid var(--line);margin-bottom:3px;padding-bottom:5px;}
.xf-pop .xf-actions{display:flex;gap:6px;margin-top:8px;}
.xf-pop .xf-actions button{flex:1;padding:6px 8px;font-size:12px;border-radius:6px;width:auto;margin:0;}
.xf-pop .xf-actions button.secondary{background:transparent;color:var(--ink);border:1px solid var(--line);}
.load-db-row-meta{font-family:'IBM Plex Mono',monospace;font-size:10.5px;color:var(--ink-soft);margin-left:6px;white-space:nowrap;}
.load-db-filter-panel{
  margin:10px 0 12px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface);
}
/* A group match against a slot nobody was entered into: shown, but visibly not a real fixture —
   greyed out, its names struck through, and no score boxes at all (see isGroupByeMatch). */
tr.bye-row .sname{opacity:.45;text-decoration:line-through;}
tr.bye-row .rnd, tr.bye-row .vs, tr.bye-row .refcell{opacity:.45;}
.bye-readout{font-size:11px;letter-spacing:.04em;text-transform:uppercase;opacity:.6;font-weight:600;}
.load-db-filter-top{
  display:flex;
  gap:8px;
  align-items:flex-end;
  flex-wrap:wrap;
}
.load-db-sort-box{
  flex:1 1 260px;
}
.load-db-sort-box label,
.load-db-letters-wrap > span{
  display:block;
  font-size:.8rem;
  font-weight:800;
  margin-bottom:5px;
}
.load-db-sort-box select{
  width:100%;
  min-height:38px;
  padding:7px 10px;
  border:1px solid var(--line);
  border-radius:7px;
  background:var(--bg);
  color:var(--ink);
  font:inherit;
}
.load-db-all-btn{
  min-height:38px;
  white-space:nowrap;
}
.load-db-letters-wrap{
  margin-top:9px;
}
.load-db-letters{
  display:flex;
  flex-wrap:wrap;
  gap:4px;
}
.load-db-letters button{
  min-width:29px;
  height:29px;
  padding:2px 6px;
  border:1px solid var(--line);
  border-radius:6px;
  background:var(--bg);
  color:var(--ink);
  cursor:pointer;
  font-weight:700;
}
.load-db-letters button:hover,
.load-db-letters button.selected{
  box-shadow:inset 0 0 0 2px currentColor;
}

.load-db-filter-heading{font-family:var(--font-display);font-size:.9rem;font-weight:700;letter-spacing:.06em;margin-bottom:8px;color:var(--ink)}

/* WEB v30 deployment: make Load Player filtering impossible to miss */
#loadFromDbModal .player-modal-card{max-width:760px;width:min(760px,94vw)}
#loadFromDbModal .load-db-filter-panel{
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
  margin:8px 0 10px !important;
  padding:9px !important;
  border:2px solid var(--line) !important;
  border-radius:9px !important;
}
#loadFromDbModal .load-db-filter-heading{
  display:block !important;
  font-size:.88rem !important;
  font-weight:800 !important;
  margin-bottom:7px !important;
}
#loadFromDbModal .load-db-filter-heading small{font-size:.7rem;opacity:.6}
#loadFromDbModal .load-db-filter-top{display:flex !important;gap:7px;align-items:end;flex-wrap:wrap}
#loadFromDbModal .load-db-sort-box{display:block !important;flex:1 1 250px}
#loadFromDbModal #loadFromDbSort{display:block !important;width:100%;min-height:36px}
#loadFromDbModal .load-db-letters-wrap{display:block !important;margin-top:7px}
/* v55 — "no need this part": the A–Z quick-letter strip is gone; typing the first letters in the search
   box does the same job (and better — see getVisibleLoadFromDbPlayers) */
#loadFromDbModal .load-db-letters-wrap{display:none !important}
#loadFromDbModal #loadFromDbLetters{display:flex !important;flex-wrap:wrap;gap:3px}
#loadFromDbModal #loadFromDbLetters button{display:inline-block !important;min-width:27px;height:27px;padding:2px 5px}
#loadFromDbModal .load-db-actions{display:flex !important;flex-wrap:wrap;gap:5px;align-items:center}

/* v32 fixed TMTT home link */
.tmtt-home-link{
  position:fixed;
  top:14px;
  left:18px;
  z-index:10000;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:7px 12px;
  border-radius:8px;
  background:var(--surface);
  color:var(--ink);
  border:1px solid var(--line);
  font-family:var(--font-display);
  font-weight:800;
  letter-spacing:.08em;
  text-decoration:none;
  box-shadow:0 2px 10px rgba(0,0,0,.12);
}
.tmtt-home-link:hover{transform:translateY(-1px);box-shadow:0 4px 14px rgba(0,0,0,.18)}

/* v33: use the existing header title as the TMTT home link; no extra header control */
.tmtt-title-link{color:inherit;text-decoration:none;cursor:pointer}
.tmtt-title-link:hover{text-decoration:underline}

/* v35-v38/v53 (19-20 Sep 2026) grew the fixture table's SCORE column in stages (up to 116px wide,
   23px font in viewer mode) to make scores easier to read at a glance. v13 (21 Sep 2026) reverts that
   growth: those widened columns, forced with !important, no longer matched the <colgroup>'s own
   66px score column, and three fixture tables side by side (the Groups & Schedule 3-per-row layout)
   would then add up to more than the row's width and force the whole card to scroll horizontally —
   by request ("THİS WİDTH MUST BE FİT NO SCROLLİNG"), alongside making this table's score display the
   same size as the Standings tab's "Matches & Set Results" score boxes (.set-point-input: 31×26,
   12px) — same request ("FOT SİZE MUST BE EQUAL TO HERE"). Score-cell/input.score now fall back to
   their original, un-widened definitions above (table.sched td.score-cell / input.score, ~line 847),
   which already match .set-point-input's scale. */
/* Both player names read left-aligned, straight after their "vs" — same as the MATCH header above
   them. Spelled out because these cells used to be caught by a score rule that centered them. */
table.sched td.sname{text-align:left !important;}
table.sched td.score-cell{
  text-align:center !important;
  vertical-align:middle !important;
}
table.sched .score-pair{
  width:100% !important;
  display:flex !important;
  justify-content:center !important;
  align-items:center !important;
  gap:3px !important;
}

/* v41 — Player Pool sortable headers */
table.roster th[data-pool-sort]{cursor:pointer;user-select:none;position:relative;padding-right:18px}
table.roster th[data-pool-sort]::after{content:'↕';position:absolute;right:5px;opacity:.35}
table.roster th[data-pool-sort].sort-active[data-sort-dir="asc"]::after{content:'▲';opacity:1}
table.roster th[data-pool-sort].sort-active[data-sort-dir="desc"]::after{content:'▼';opacity:1}

/* v42 — viewer-only Tournament Players tab */
.viewer-tournament-player-table th[data-vsort]{cursor:pointer;user-select:none;position:relative;padding-right:18px}
.viewer-tournament-player-table th[data-vsort]::after{content:'↕';position:absolute;right:5px;opacity:.35}
.viewer-tournament-player-table th[data-vsort].sort-active[data-sort-dir="asc"]::after{content:'▲';opacity:1}
.viewer-tournament-player-table th[data-vsort].sort-active[data-sort-dir="desc"]::after{content:'▼';opacity:1}
/* Tournament Players is a long reference list an admin scans rather than reads — smaller, tighter
   rows so far more of it fits on screen at once. */
.viewer-tournament-player-table td{font-size:10.5px;padding:1px 6px;line-height:1.35}
.tp-drag-hint{font-size:10.5px;color:var(--ink-soft);font-style:italic;margin-left:10px}
.champion-check-row .in-tournament-tag{margin-left:auto;font-size:9.5px;letter-spacing:.4px;text-transform:uppercase;
  color:var(--ink-soft);border:1px solid var(--line);border-radius:999px;padding:1px 7px;white-space:nowrap}
.champion-check-row.in-tournament .in-tournament-tag{border-color:var(--gold);color:var(--gold-ink,var(--ink))}
.viewer-tournament-player-table tr.tp-draggable{cursor:grab}
.viewer-tournament-player-table tr.tp-dragging{opacity:.4}
.viewer-tournament-player-table tr.tp-drop-target td{box-shadow:inset 0 2px 0 var(--gold),inset 0 -2px 0 var(--gold)}
.viewer-tournament-player-table tr.tp-empty-row td{opacity:.5;font-style:italic}
/* v50 — the Actions cell of an EMPTY slot stays fully visible: its "+" is how a player gets added */
.viewer-tournament-player-table tr.tp-empty-row td.tp-actions{opacity:1;font-style:normal}
.tp-action-btn.tp-action-add{border-color:var(--gold);color:var(--gold);font-weight:700;font-size:13px;padding:1px 7px}
.tp-slot-sub{font-size:12px;color:var(--ink-soft);margin:-4px 0 10px;}
.tp-slot-list{max-height:44vh;overflow-y:auto;border:1px solid var(--line);border-radius:8px;background:var(--paper);}
.tp-slot-list:empty{display:none;}
.tp-slot-item{display:flex;align-items:center;gap:8px;width:100%;text-align:left;padding:7px 10px;border:0;border-bottom:1px solid var(--line);
  background:transparent;color:var(--ink);cursor:pointer;font-size:13px;text-transform:none;letter-spacing:0;font-weight:500;}
.tp-slot-item:last-child{border-bottom:0;}
.tp-slot-item:hover, .tp-slot-item.active{background:var(--gold-soft,#FDE9D2);}
.tp-slot-item .tp-slot-name{flex:1 1 auto;font-weight:600;}
.tp-slot-item .tp-slot-meta{font-family:'IBM Plex Mono',monospace;font-size:11px;color:var(--ink-soft);white-space:nowrap;}
.tp-slot-item.in-use{opacity:.55;}
.tp-slot-item .tp-slot-inuse{font-size:10.5px;border:1px solid var(--line);border-radius:999px;padding:0 6px;color:var(--ink-soft);white-space:nowrap;}
.tp-slot-item .tp-slot-inuse.tp-slot-current{border-color:#3FD1B0;color:#0F7A62;background:#E8FBF5;}
.tp-slot-hint{font-size:11.5px;color:var(--ink-soft);margin:8px 0 10px;min-height:1em;}
.tp-slot-actions{display:flex;gap:8px;flex-wrap:wrap;}
.tp-slot-actions button{flex:1 1 auto;}
.viewer-tournament-player-table td.tp-actions{white-space:nowrap;text-align:right;width:64px;padding:0 5px}
.tp-action-btn{border:1px solid var(--line);border-radius:5px;background:var(--paper);color:var(--ink-soft);
  font-size:11px;line-height:1;padding:2px 5px;margin-left:3px;cursor:pointer}
.tp-action-btn:hover{border-color:var(--gold);color:var(--ink)}
.tp-action-danger:hover{border-color:#C0392B;color:#C0392B}
.viewer-tournament-player-table th{font-size:10px;padding:4px 6px;letter-spacing:.4px}
.viewer-tournament-player-table .viewer-player-name{font-weight:600}
/* v325 — photo column after the code */
.viewer-tournament-player-table .tp-photo-col{width:34px;padding-left:2px;padding-right:2px}
.viewer-tournament-player-table td.tp-photo-cell{height:28px;padding:1px 4px;white-space:nowrap;text-align:center}
.viewer-tournament-player-table .pp-thumb.tp-ph{width:26px;height:26px;margin:0;display:inline-block}
.viewer-tournament-player-table .pp-thumb.tp-ph + .pp-thumb.tp-ph{margin-left:-8px}
.viewer-player-head{margin-bottom:8px}

/* v43 — detailed sets + rally points in Standings */
.standings-group-detail{margin-bottom:22px;min-width:0}
table.detailed-stand{font-size:10px}
table.detailed-stand th,table.detailed-stand td{text-align:center;white-space:nowrap}
table.detailed-stand .name-col{text-align:left;min-width:145px}
.standings-match-block{margin-top:7px;border:1px solid var(--line);border-radius:8px;overflow:hidden;background:var(--surface)}
.standings-match-block h4{margin:0;padding:8px 10px;font-family:var(--font-display);font-size:12px;letter-spacing:.05em;background:var(--slate-soft)}
.standings-match-table{width:100%;border-collapse:collapse;font-size:12px}
.standings-match-table th,.standings-match-table td{padding:6px 5px;border-top:1px solid var(--line);text-align:center}
.standings-match-table td.set-result-cell{padding:6px 3px}
.standings-match-table th{font-size:10.5px;text-transform:uppercase;letter-spacing:.04em}
/* v51 — real player names run much longer than the "Player 1"-style placeholders, so this column no
   longer forces a one-line min-width: it wraps onto 2 lines at a capped width instead, which frees up
   the horizontal room the Set/Points columns need to stay visible instead of scrolling off-screen */
.stand-match-names{text-align:left!important;min-width:110px;max-width:150px;white-space:normal;word-break:break-word;line-height:1.3;font-weight:600}
.stand-match-score,.stand-match-points{font-family:'IBM Plex Mono',monospace;font-weight:900;font-size:13px;white-space:nowrap}
.set-result-pair{display:flex;align-items:center;justify-content:center;gap:2px;white-space:nowrap}
.set-point-input{width:31px;height:26px;padding:2px;text-align:center;font-family:'IBM Plex Mono',monospace;font-size:12px;font-weight:800;border:1px solid var(--line);border-radius:5px;background:var(--bg);color:var(--ink)}
@media(max-width:900px){.standings-group-detail{overflow-x:auto}.standings-match-table{min-width:600px}table.detailed-stand{min-width:720px}}
/* v78 — phone: the Standings tab must fit the screen with no sideways scrolling. Both tables drop
   their tablet min-widths, switch to fixed layout at 100% width, and shrink type/padding; player
   names wrap onto two lines instead of pushing the numeric columns off the right edge. */
@media(max-width:640px){
  #panel-standings .standings-group-detail{overflow-x:visible}
  #panel-standings table.detailed-stand{min-width:0;width:100%;table-layout:fixed;font-size:9px}
  #panel-standings table.detailed-stand th,
  #panel-standings table.detailed-stand td{padding:4px 1px;overflow:hidden;text-overflow:clip}
  #panel-standings table.detailed-stand th{font-size:8px;letter-spacing:0}
  #panel-standings table.detailed-stand .name-col{min-width:0;width:27%;white-space:normal;word-break:break-word;line-height:1.2}
  #panel-standings table.detailed-stand th:last-child,
  #panel-standings table.detailed-stand td:last-child{width:13%}
  #panel-standings table.detailed-stand .tag{font-size:7.5px;padding:1px 3px;letter-spacing:0}
  #panel-standings .standings-match-table{min-width:0;width:100%;table-layout:fixed;font-size:9.5px}
  #panel-standings .standings-match-table th,
  #panel-standings .standings-match-table td,
  #panel-standings .standings-match-table td.set-result-cell{padding:4px 1px}
  #panel-standings .standings-match-table th{font-size:7.5px;letter-spacing:0}
  #panel-standings .standings-match-table th:first-child,
  #panel-standings .stand-match-names{width:25%;min-width:0;max-width:none;font-size:9.5px}
  #panel-standings .standings-match-table th:nth-child(2){width:11%}
  #panel-standings .standings-match-table th:last-child{width:15%}
  #panel-standings .stand-match-score,
  #panel-standings .stand-match-points{font-size:10px;white-space:normal}
  #panel-standings .set-result-pair{font-size:9.5px;overflow:hidden}
  #panel-standings .set-score-combined{width:100%;min-width:0;height:26px;padding:0;font-size:9px;letter-spacing:-0.3px}
}

/* v45 — hide spinner/scroller controls on all numeric input boxes */
input[type="number"]{
  appearance:textfield;
  -moz-appearance:textfield;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button{
  -webkit-appearance:none;
  margin:0;
}

/* v46 — exactly three group cards per row on normal desktop widths (was 2, by request 19 Sep 2026) */
.group-grid{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:14px !important;
  align-items:start !important;
}
.standings-grid{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:14px !important;
  align-items:start !important;
}
.group-card,
.standings-group-detail{
  min-width:0 !important;
  width:100% !important;
}
/* narrower windows step down to 2, then 1, before things get cramped */
@media (max-width:1300px){
  .group-grid,
  .standings-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}
@media (max-width:900px){
  .group-grid,
  .standings-grid{
    grid-template-columns:1fr !important;
  }
}

/* v47 — one combined set-score box, e.g. 11:7 */
/* v50 — narrower, and normal weight (bold is reserved for the derived Score/Points columns,
   which are already font-weight:900 via .stand-match-score,.stand-match-points above) so the
   typed-in set numbers read as data entry, not as the result */
/* v51 — sized back up a little (with real long player names now wrapping instead of squeezing
   this column off-screen, there's room) so the digits are clearly readable — still not bold */
.set-result-pair{display:flex;align-items:center;justify-content:center}
/* v145 — "puan durumunda fontlar gruplar sekmesi ile aynı büyüklükte olsun": the Standings tab uses the
   Groups tab's own sizes — the standings table exactly like the mini table in a group card (8.5px figures,
   10px/600 names, 8px tags) and the match list like the card's fixture list (10px/600 names, 10px scores,
   8.5px headers). Desktop/tablet only; the phone layout (≤640px) keeps its own tuned sizes. */
@media(min-width:641px){
  #panel-standings table.detailed-stand{font-size:8.5px}
  #panel-standings table.detailed-stand th,#panel-standings table.detailed-stand td{padding:3px 2px}
  #panel-standings table.detailed-stand th{font-size:10px}
  #panel-standings table.detailed-stand td.name-col{font-size:10px;font-family:var(--font-player);font-weight:600;color:var(--ink);line-height:1.25}
  #panel-standings table.detailed-stand .tag{font-size:8px;padding:1px 3px}
  #panel-standings .standings-match-block h4{font-size:12.5px;font-weight:600}
  #panel-standings .standings-match-table{font-size:10px}
  #panel-standings .standings-match-table th{font-family:var(--font-display);font-size:8.5px;font-weight:600;color:var(--ink-soft)}
  #panel-standings .standings-match-table th,#panel-standings .standings-match-table td{padding:5px 4px}
  #panel-standings .stand-match-names{font-size:10px;font-family:var(--font-player);font-weight:600;line-height:1.25}
  #panel-standings .stand-match-score,#panel-standings .stand-match-points{font-size:10px;font-weight:700}
  #panel-standings td.set-result-cell,#panel-standings .set-result-pair{font-size:10px}
  #panel-standings .set-score-combined{font-size:10px;height:24px}
}
/* v146 — all five sets and Points fit inside the group's card (they were cut off after Set 4), and a set
   that breaks the rules is outlined red */
@media(min-width:641px){
  #panel-standings .standings-match-table{table-layout:fixed;width:100%;min-width:0}
  #panel-standings .standings-match-table th:nth-child(1),#panel-standings .standings-match-table td:nth-child(1){width:26%}
  #panel-standings .standings-match-table th:nth-child(2),#panel-standings .standings-match-table td:nth-child(2){width:10%}
  #panel-standings .standings-match-table th:nth-child(8),#panel-standings .standings-match-table td:nth-child(8){width:14%}
  #panel-standings .stand-match-names{min-width:0;max-width:none}
  #panel-standings td.set-result-cell{padding:4px 2px}
  #panel-standings .set-score-combined{width:100%;min-width:0;padding:0 1px;letter-spacing:-0.2px}
  #panel-standings .standings-group-detail{overflow-x:visible}
}
.set-score-combined.set-bad,.ref-sets input.set-bad{border-color:#d93025 !important;box-shadow:0 0 0 1px #d93025 inset;background:#fdecea !important}
.set-result-pair.set-bad{color:#d93025;text-decoration:line-through}
.set-score-combined{
  width:46px;
  height:30px;
  padding:2px 4px;
  text-align:center;
  font-family:'IBM Plex Mono',monospace;
  font-size:14px;
  font-weight:400;
  letter-spacing:.02em;
  border:1px solid var(--line);
  border-radius:5px;
  background:var(--bg);
  color:var(--ink);
}
.set-score-combined:focus{
  outline:none;
  border-color:var(--gold);
}

/* ==== Match List tab + Championship-wide "All Matches" modal — self-contained block ====
   Everything below is prefixed .mb- ("match board"). Reads existing match/score/groupMeta data;
   writes only into the same table/day/time fields the existing Groups & Schedule inputs already use.
   See renderMatchListTab() / matchBoard*() functions in the main script block for the JS half. */
.mb-tables-row{
  display:flex;flex-wrap:wrap;gap:10px;margin:14px 0 20px;
}
.mb-table-lane{
  flex:1 1 150px;min-width:150px;max-width:220px;
  background:var(--paper-alt);border:1px dashed var(--line);border-radius:8px;padding:8px 10px;
  transition:border-color 0.15s,background 0.15s;
}
.mb-table-lane.drag-over{border-color:var(--gold);background:var(--gold-soft);border-style:solid;}
.mb-table-lane-head{
  display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:6px;
  font-family:var(--font-display);font-weight:600;font-size:11.5px;text-transform:uppercase;
  letter-spacing:0.4px;color:var(--ink-soft);
}
.mb-table-lane-count{
  background:var(--ink);color:var(--paper);border-radius:10px;padding:1px 7px;font-size:10.5px;font-weight:700;
}
.mb-table-lane-cards{display:flex;flex-direction:column;gap:4px;min-height:20px;}
.mb-table-lane-chip{
  background:var(--paper);border:1px solid var(--line);border-radius:5px;padding:4px 6px;
  font-family:'IBM Plex Sans',sans-serif;font-size:11px;color:var(--ink);line-height:1.3;
}
.mb-table-lane-empty{font-size:11px;color:var(--txt-dim);font-style:italic;}
.mb-add-table-lane{
  flex:0 0 auto;display:flex;align-items:center;justify-content:center;min-width:60px;
  background:transparent;border:1px dashed var(--line);border-radius:8px;color:var(--ink-soft);
  font-family:'IBM Plex Sans',sans-serif;font-size:20px;font-weight:600;cursor:pointer;padding:8px;
}
.mb-add-table-lane:hover{border-color:var(--gold);color:var(--ink);}

.mb-stage-section{margin-bottom:26px;}
.mb-stage-title{
  font-family:var(--font-display);font-weight:700;font-size:15px;text-transform:uppercase;
  letter-spacing:0.4px;color:var(--ink);margin:0 0 10px;padding-bottom:6px;border-bottom:2px solid var(--line);
}
.mb-tournament-title{
  font-family:var(--font-display);font-weight:700;font-size:17px;color:var(--gold);
  margin:26px 0 4px;padding-top:14px;border-top:1px solid var(--line);
}
.mb-tournament-title:first-child{margin-top:0;padding-top:0;border-top:none;}
.mb-group-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px;}
.mb-group-card{
  background:var(--paper);border:1px solid var(--line);border-radius:8px;padding:10px 12px;cursor:grab;
  transition:background 0.15s,border-color 0.15s;user-select:none;
}
.mb-group-card.mb-dragging{opacity:0.4;}
/* a card being hovered by another dragged card, about to swap tables with it on drop */
.mb-group-card.mb-drop-target{outline:2px solid var(--gold);outline-offset:-2px;}
/* mb-assigned = a table has been assigned but the group isn't fully played out yet (yellow/creme);
   mb-scored = every match in the group has a recorded score (green) — scored always wins over
   assigned, since a finished group no longer needs to stand out as "still waiting at the table". */
.mb-group-card.mb-assigned{background:var(--gold-soft);border-color:var(--gold);}
.mb-group-card.mb-scored{background:#E3F7EE;border-color:var(--green);}
.mb-group-card-head{
  display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:6px;
}
.mb-group-card-head:last-child{margin-bottom:0;}
.mb-group-card-title{font-family:var(--font-display);font-weight:600;font-size:13px;color:var(--ink);}
.mb-group-card-table{
  font-family:'IBM Plex Sans',sans-serif;font-size:11px;font-weight:600;color:var(--ink-soft);
  background:var(--paper-alt);border-radius:5px;padding:2px 7px;
}
/* the "first column" time field on every card head — a <select> for admins (fixed 09:00–21:00,
   30-minute steps), a plain read-only badge for viewers. Shared by group cards and bracket cards. */
.mb-time-select{
  font-family:'IBM Plex Sans',sans-serif;font-size:11px;font-weight:600;color:var(--ink);
  background:var(--paper-alt);border:1px solid var(--line);border-radius:5px;padding:1px 4px;cursor:pointer;
}
.mb-time-badge{
  font-family:'IBM Plex Sans',sans-serif;font-size:11px;font-weight:600;color:var(--ink-soft);
  background:var(--paper-alt);border-radius:5px;padding:2px 7px;
}
.mb-match-row{
  display:flex;align-items:center;justify-content:space-between;gap:6px;
  font-family:'IBM Plex Sans',sans-serif;font-size:12px;color:var(--ink);padding:3px 0;
  border-top:1px solid var(--line);
}
.mb-match-row:first-of-type{border-top:none;}
.mb-match-row .mb-score{color:var(--ink-soft);font-family:'IBM Plex Mono',monospace;font-size:11.5px;flex-shrink:0;}
.mb-bracket-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:10px;}
.mb-bracket-card{
  background:var(--paper);border:1px solid var(--line);border-radius:8px;padding:9px 11px;cursor:grab;
  font-family:'IBM Plex Sans',sans-serif;transition:background 0.15s,border-color 0.15s;user-select:none;
}
.mb-bracket-card.mb-dragging{opacity:0.4;}
.mb-bracket-card.mb-drop-target{outline:2px solid var(--gold);outline-offset:-2px;}
/* same assigned/scored color convention as .mb-group-card above — see that comment. */
.mb-bracket-card.mb-assigned{background:var(--gold-soft);border-color:var(--gold);}
.mb-bracket-card.mb-scored{background:#E3F7EE;border-color:var(--green);}
.mb-bracket-card-head{
  display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:5px;
  font-family:var(--font-display);font-weight:600;font-size:10.5px;text-transform:uppercase;
  letter-spacing:0.3px;color:var(--ink-soft);
}
.mb-bracket-card-players{font-size:12.5px;color:var(--ink);line-height:1.5;}
.mb-bracket-card-players .mb-winner{font-weight:700;}
.mb-empty-hint{font-size:12.5px;color:var(--txt-dim);font-style:italic;padding:6px 0;}
#champMatchListModal .login-card > h2{margin-top:0;}
#champMatchListLoading{padding:30px;text-align:center;color:var(--ink-soft);font-family:'IBM Plex Sans',sans-serif;}

/* ---- Time-Table Table: the Excel-like grid pivot of the same championship match data ---- */
#timeTableGridModal .login-card > h2{margin-top:0;}
/* the three Friday/Saturday/Sunday tabs sitting above the grid — same look as the header's own
   .lang-toggle/.theme-toggle pill group, just its own class since it lives inside the modal and
   needs 3 evenly-sized segments instead of 2. */
.ttg-day-group{display:flex;gap:2px;border:1px solid var(--line);border-radius:6px;overflow:hidden;margin-top:10px;width:fit-content;}
.ttg-day-btn{
  background:transparent;border:none;color:var(--ink-soft);font-family:var(--font-display);font-size:12px;
  font-weight:600;letter-spacing:0.4px;text-transform:uppercase;padding:7px 16px;cursor:pointer;border-radius:0;
}
.ttg-day-btn.selected{background:var(--gold-soft);color:var(--ink);}
.ttg-day-btn:hover:not(.selected){background:var(--paper-alt);}
.ttg-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:10px;}
.ttg-toolbar label{font-family:var(--font-display);font-size:12px;font-weight:600;letter-spacing:0.3px;text-transform:uppercase;color:var(--ink-soft);}
.ttg-toolbar input#ttgTableCountInput{width:64px;padding:6px 8px;border:1px solid var(--line);border-radius:6px;background:var(--paper);color:var(--ink);font-family:'IBM Plex Mono',monospace;font-size:13px;}
.ttg-toolbar select#ttgStartTimeInput{padding:6px 8px;border:1px solid var(--line);border-radius:6px;background:var(--paper);color:var(--ink);font-family:'IBM Plex Mono',monospace;font-size:13px;}
.ttg-toolbar select#ttgPlaceInput{padding:6px 8px;border:1px solid var(--line);border-radius:6px;background:var(--paper);color:var(--ink);font-family:'IBM Plex Sans',sans-serif;font-size:13px;max-width:180px;}
.ttg-toolbar input#ttgTableCountInput:disabled{background:var(--paper-alt);color:var(--ink-soft);cursor:not-allowed;}
.ttg-toolbar button#ttgAutoAssignBtn{
  background:var(--gold-soft);color:var(--ink);border:1px solid var(--line);border-radius:6px;
  padding:7px 14px;font-family:var(--font-display);font-size:12px;font-weight:600;letter-spacing:0.3px;
  text-transform:uppercase;cursor:pointer;
}
.ttg-toolbar button#ttgAutoAssignBtn:hover{background:var(--gold);}
/* Reset sits right next to Auto-assign but is a destructive action (clears every table/day/time in
   this championship) — deliberately NOT gold like Auto-assign, styled instead like the app's other
   danger buttons (deleteSessionBtn, etc.) so it doesn't get clicked as casually. */
.ttg-toolbar button#ttgResetScheduleBtn{background:transparent;color:var(--red);border:1px solid var(--red);border-radius:6px;padding:7px 14px;font-family:var(--font-display);font-size:12px;font-weight:600;letter-spacing:0.3px;text-transform:uppercase;cursor:pointer;}
.ttg-toolbar button#ttgResetScheduleBtn:hover{background:rgba(199,62,44,0.1);}
.ttg-scroll{overflow-x:hidden;overflow-y:auto;border:1px solid var(--line);border-radius:9px;background:var(--paper);max-height:62vh;margin-top:8px;}
/* table-layout:fixed + width:100% makes every lane column share the available width evenly instead
   of forcing a horizontal scrollbar once there are many table lanes — the whole grid always fits the
   modal's width, no matter how many lanes are in play. The time column keeps a fixed width (below)
   so the remaining space splits evenly across just the lane columns. */
.ttg-table{width:100%;border-collapse:collapse;table-layout:fixed;}
.ttg-table th{
  font-family:var(--font-display);text-transform:uppercase;letter-spacing:.5px;font-size:10px;
  text-align:center;background:var(--paper-alt);color:var(--ink-soft);padding:6px 4px;
  border:1px solid var(--line);position:sticky;top:0;z-index:2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.ttg-table td{border:1px solid var(--line);padding:4px 5px;vertical-align:top;overflow:hidden;word-break:break-word;}
.ttg-table td.ttg-time-col{
  position:sticky;left:0;z-index:1;background:var(--paper-alt);font-family:'IBM Plex Mono',monospace;
  font-size:11px;font-weight:600;color:var(--ink-soft);text-align:center;white-space:nowrap;vertical-align:top;width:56px;
}
.ttg-table th.ttg-time-col{position:sticky;left:0;z-index:3;text-align:left;width:56px;}
.ttg-table td.ttg-filled{background:var(--gold-soft);}
/* a row-spanning block (a 90-minute group session covering 3 stacked slots) reads better with its
   chip centered in the tall cell rather than pinned to the top like an ordinary single-slot cell. */
.ttg-table td.ttg-span-block{vertical-align:middle;position:relative;}
/* A group session covers several time slots, so its cell is that many rows tall. The chip inside it
   stretches to fill the whole block rather than sitting as a small box at the top with empty tinted
   space underneath — the block IS the match, so it should read as one solid box. Only when the chip
   is alone in the cell: a double-booked cell keeps its chips stacked in normal flow so both stay
   readable (and the red conflict tint stays visible around them). */
.ttg-table td.ttg-span-block .ttg-chip:only-child{
  position:absolute; top:4px; right:4px; bottom:4px; left:4px;
  width:auto; margin:0; overflow:hidden;
}
/* two matches landing on the same time+table at once is a real double-booking, not just a full slot —
   flag it in red rather than the ordinary gold "assigned" tint used everywhere else in this module. */
/* v165 — table/time blocks (⛔ Bloke, edited in the Arena) */
.ttg-table td.ttg-blocked{background:repeating-linear-gradient(135deg,#ECEAF3 0 6px,#DAD6E6 6px 12px);cursor:not-allowed;padding:2px 4px;vertical-align:top;}
.ttg-blocked-lbl{display:block;font-size:10px;font-weight:600;color:#5b5577;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.2;}
.ttg-table td.ttg-block-clash{box-shadow:inset 0 0 0 2px #7a6fb0, inset 0 0 0 4px rgba(255,255,255,.6);}
.ttg-table td.ttg-conflict{background:#FBD9D9;border-color:var(--red);}
/* the actual grid cell itself (not just the small chip inside it) turns green once every match it
   holds is complete — the whole "Excel-style" box, so it reads at a glance across the whole table,
   not only in the rounded unscheduled-list cards. Never applied together with ttg-conflict — a real
   double-booking always stays flagged red regardless of either match's own score. Kept soft (0.25,
   down from an earlier 0.5) per explicit request — a pastel wash rather than a saturated fill, so the
   dark card text sitting on top of it (which stays dark, not white — also per explicit request) keeps
   its contrast. */
.ttg-table td.ttg-td-scored{background:rgba(63,209,176,0.08);}
/* Each match/group gets its own full frame (border + rounded corners), not just a divider line —
   a cell holding several stacked matches (a busy multi-round table) used to run its entries together
   with only a faint dashed top-border between them; now every single match/group is its own clearly
   bounded box, same idea as .ttg-unscheduled-row's card below. Background stays a light translucent
   white rather than solid, so the cell's own tint (gold=assigned, green=scored, red=conflict) still
   shows through around and behind every frame. Mirrors time-table.html's own .ttg-chip exactly. */
.ttg-chip{font-family:'IBM Plex Sans',sans-serif;font-size:10.5px;font-weight:700;line-height:1.35;color:var(--ink);
  border:1px solid rgba(0,0,0,0.18);border-radius:5px;background:rgba(0,0,0,0.04);padding:3px 5px;margin-bottom:3px;
  display:block;width:100%;box-sizing:border-box;}
.ttg-chip:last-child{margin-bottom:0;}
/* Names on a card can be selected and copied — a referee reading one out, or someone pasting a name
   into a message, should not have to retype it. Only while the card is not draggable: the browser's
   native drag gesture and a text selection are the same press-and-move, and an admin dragging a match
   onto a table would otherwise just highlight the text instead of moving anything. */
.ttg-chip{-webkit-user-select:text;user-select:text;}
.ttg-chip.ttg-draggable{-webkit-user-select:none;user-select:none;}
/* the tournament name leading a grid chip — bold like its counterpart in the not-yet-scheduled list
   (.ttg-unscheduled-tname), so it stands out the same way whether a match has a table+time yet or not. */
/* Fixed-size + ellipsis rather than a fixed character count: this band stays inline (it shares its
   line with the " · " separator and the match-label badge right after it), so it gets its own
   inline-block box capped to a share of the card's width, and the browser truncates to whatever
   actually fits there — full name stays in the title attribute for a hover. */
.ttg-chip .ttg-tname{font-weight:800;color:var(--ink);display:inline-block;max-width:62%;
  vertical-align:bottom;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
/* the group's players, listed inside its grid block — only there, where the four-slot session gives
   the room for them; the not-yet-scheduled list and single-slot bracket chips stay compact. */
.ttg-chip-players{
  margin-top:2px; font-family:var(--font-player); font-size:9px; font-weight:400;
  line-height:1.35; color:var(--ink); display:block; overflow:hidden;
}
/* One line, cut with an ellipsis if it must be — NOT wrapped. Wrapping was tried and is worse: a
   four-slot group block has room for four lines, so the moment one name takes two the fourth player
   drops off the bottom of the card entirely. Losing a whole player is worse than losing the tail of
   one name, and the name is a tooltip and a click away in full. Smaller type is the part that
   actually helps — at 9.5px a Turkish full name fits a normal lane column outright. */
.ttg-chip-players span{display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
/* v88 — group card match list: each match two rows (A over B), number on the left, scores right */
.ttg-table td.ttg-span-block .ttg-chip.ttg-chip-hasfx{display:flex; flex-direction:column;}
.ttg-chip-players.ttg-chip-fixtures{display:flex; flex-direction:column; flex:1 1 auto; min-height:0; container-type:size; container-name:fx; line-height:1.1;}
.ttg-chip-fixtures span.ttg-fx-line{display:flex; align-items:center; gap:4px; flex:1 1 0; min-height:0; overflow:hidden; padding:1px 0;
  font-size:clamp(8px, min(calc(100cqh / var(--fx-n, 6) / 2 * 0.6), calc(100cqw / var(--fx-ch, 14) * 1.45)), 11.5px);
  border-top:1px dashed rgba(0,0,0,0.12);}
.ttg-chip-fixtures span.ttg-fx-line:first-child{border-top:0;}
.ttg-chip-fixtures .ttg-fx-no{font-weight:700; flex:0 0 auto; min-width:1.4em;}
.ttg-chip-fixtures span.ttg-fx-pair{display:flex; flex-direction:column; flex:1 1 auto; min-width:0; overflow:visible;}
.ttg-chip-fixtures span.ttg-fx-p{display:flex; align-items:baseline; gap:5px; min-width:0; overflow:visible;}
.ttg-chip-fixtures span.ttg-fx-name{display:block; flex:0 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.ttg-chip-fixtures span.ttg-fx-score{display:block; flex:0 0 auto; font-family:'IBM Plex Mono',monospace; font-weight:700; overflow:visible;}
/* v96 — matches crisp, not faded: full colour, darker and a little heavier; a played match is told
   apart by its (bold) score, not by being greyed out */
.ttg-chip-fixtures span.ttg-fx-line, .ttg-chip-fixtures span.ttg-fx-done{opacity:1 !important; color:#1d1a3a;}
.ttg-chip-fixtures span.ttg-fx-name{font-weight:600; color:#1d1a3a;}
.ttg-chip-fixtures .ttg-fx-no{color:#1d1a3a;}
.ttg-chip-fixtures span.ttg-fx-score{color:#1d1a3a;}
.mb-fx-tip tr.done td.nm{color:#1d1a3a !important;}
/* v97 — winners normal, losers faded (group cards, knockout cards, hover panel) */
.ttg-chip-fixtures span.ttg-fx-p.ttg-fx-lose{opacity:.42;}
.ttg-chip .ttg-nm-lose{opacity:.42;}
.mb-fx-tip td.nm.lose{opacity:.42;}

/* v98 — group status boxes + card colour in the Arena / time-table grid */
.ttg-gs-boxes{display:inline-flex; gap:2px; margin-left:4px; vertical-align:middle;}
.ttg-gs-box{width:10px; height:10px; border:1px solid #8a86a8; border-radius:2px; box-sizing:border-box; display:inline-block; opacity:.5;}
.ttg-gs-box.edit{cursor:pointer;}
.ttg-gs-box.edit:hover{opacity:1;}
.ttg-gs-box.gsWhite{background:#fff;} .ttg-gs-box.gsYellow{background:#FFD84D;} .ttg-gs-box.gsGreen{background:#3FD1B0;} .ttg-gs-box.gsBlue{background:#5B9BF0;}
.ttg-chip.ttg-gs-called{background:#EEF5FF !important; border-color:#9CC1F2 !important;}   /* v187 */
.ttg-gs-box.on{opacity:1; border:2px solid #1d1a3a;}
/* 9 Oct 2026 (by request — "make the greens and yellows very light"): pale washes, softer edges */
.ttg-chip.ttg-gs-playing{background:#FFFCE6 !important; border-color:#EED97A !important;}
.ttg-chip.ttg-gs-done{background:#F0FBF7 !important; border-color:#A8E3D1 !important;}
/* v99 — Arena group card: group name LEFT, status boxes RIGHT */
.ttg-chip.ttg-chip-hasfx .ttg-glabel{display:flex !important; align-items:center; justify-content:space-between; text-align:left !important; gap:4px; width:100%;}
.ttg-chip.ttg-chip-hasfx .ttg-glabel .ttg-gs-boxes{margin-left:auto;}
/* v89 — a lone card fills its WHOLE block (absolute top/bottom 6px): the row-height max-height cap
   (written for 28px rows) left an empty strip under the card whenever the real rows were taller */
.ttg-table td.ttg-span-block > .ttg-chip:only-child{max-height:none;}
/* v93 — time column: only the full hours (10:00, 11:00 …) bold; the times between them small and light */
.ttg-table td.ttg-time-col.ttg-time-minor{font-size:10px; font-weight:400; color:#9a96b5;}
.ttg-table td.ttg-time-col.ttg-time-hour{font-weight:800;}
/* v91 — hover panel over a group card: every match with full names and the score */
.mb-fx-tip{display:none; position:fixed; z-index:9999; pointer-events:none; max-width:min(440px, calc(100vw - 12px));
  background:#fff; color:#1d1a3a; border:1px solid rgba(0,0,0,0.18); border-radius:8px; box-shadow:0 6px 22px rgba(0,0,0,0.22);
  padding:8px 10px; font-family:'IBM Plex Sans',sans-serif; font-size:12.5px; line-height:1.35;}
.mb-fx-tip-head{font-weight:800; font-size:12px; margin-bottom:5px; padding-bottom:4px; border-bottom:1px solid rgba(0,0,0,0.12);}
.mb-fx-tip table{border-collapse:collapse;}
.mb-fx-tip td{padding:2px 5px; white-space:nowrap; vertical-align:baseline;}
.mb-fx-tip td.no{font-weight:700; color:#6b6790; padding-left:0;}
.mb-fx-tip td.nm{font-weight:600;}
.mb-fx-tip td.vs{color:#9a96b5; font-size:11px; text-align:center;}
.mb-fx-tip td.sc{font-family:'IBM Plex Mono',monospace; font-weight:800; text-align:center;}
.mb-fx-tip tr.done td.nm{color:#6b6790;}
.mb-fx-tip-foot{margin-top:5px; padding-top:4px; border-top:1px solid rgba(0,0,0,0.10); font-size:11px; color:#6b6790; white-space:normal;}
/* v88 — too short for two rows per match (e.g. a 30-min grid): fall back to one row, A – B */
@container fx (max-height:22px){ .ttg-fx-n1 span.ttg-fx-pair{flex-direction:row; gap:3px;} .ttg-fx-n1 span.ttg-fx-p + span.ttg-fx-p::before{content:'– '; flex:0 0 auto;} .ttg-fx-n1 span.ttg-fx-name{flex:0 1 auto;} .ttg-fx-n1 span.ttg-fx-line{font-size:clamp(7px, min(calc(100cqh / 1 * 0.56), calc(100cqw / var(--fx-ch, 14) * 0.85)), 10px);} }
@container fx (max-height:44px){ .ttg-fx-n2 span.ttg-fx-pair{flex-direction:row; gap:3px;} .ttg-fx-n2 span.ttg-fx-p + span.ttg-fx-p::before{content:'– '; flex:0 0 auto;} .ttg-fx-n2 span.ttg-fx-name{flex:0 1 auto;} .ttg-fx-n2 span.ttg-fx-line{font-size:clamp(7px, min(calc(100cqh / 2 * 0.56), calc(100cqw / var(--fx-ch, 14) * 0.85)), 10px);} }
@container fx (max-height:66px){ .ttg-fx-n3 span.ttg-fx-pair{flex-direction:row; gap:3px;} .ttg-fx-n3 span.ttg-fx-p + span.ttg-fx-p::before{content:'– '; flex:0 0 auto;} .ttg-fx-n3 span.ttg-fx-name{flex:0 1 auto;} .ttg-fx-n3 span.ttg-fx-line{font-size:clamp(7px, min(calc(100cqh / 3 * 0.56), calc(100cqw / var(--fx-ch, 14) * 0.85)), 10px);} }
@container fx (max-height:88px){ .ttg-fx-n4 span.ttg-fx-pair{flex-direction:row; gap:3px;} .ttg-fx-n4 span.ttg-fx-p + span.ttg-fx-p::before{content:'– '; flex:0 0 auto;} .ttg-fx-n4 span.ttg-fx-name{flex:0 1 auto;} .ttg-fx-n4 span.ttg-fx-line{font-size:clamp(7px, min(calc(100cqh / 4 * 0.56), calc(100cqw / var(--fx-ch, 14) * 0.85)), 10px);} }
@container fx (max-height:110px){ .ttg-fx-n5 span.ttg-fx-pair{flex-direction:row; gap:3px;} .ttg-fx-n5 span.ttg-fx-p + span.ttg-fx-p::before{content:'– '; flex:0 0 auto;} .ttg-fx-n5 span.ttg-fx-name{flex:0 1 auto;} .ttg-fx-n5 span.ttg-fx-line{font-size:clamp(7px, min(calc(100cqh / 5 * 0.56), calc(100cqw / var(--fx-ch, 14) * 0.85)), 10px);} }
@container fx (max-height:132px){ .ttg-fx-n6 span.ttg-fx-pair{flex-direction:row; gap:3px;} .ttg-fx-n6 span.ttg-fx-p + span.ttg-fx-p::before{content:'– '; flex:0 0 auto;} .ttg-fx-n6 span.ttg-fx-name{flex:0 1 auto;} .ttg-fx-n6 span.ttg-fx-line{font-size:clamp(7px, min(calc(100cqh / 6 * 0.56), calc(100cqw / var(--fx-ch, 14) * 0.85)), 10px);} }
.ttg-chip.ttg-draggable, .ttg-unscheduled-row.ttg-draggable{cursor:grab;}
.ttg-chip.mb-dragging, .ttg-unscheduled-row.mb-dragging{opacity:0.4;}
/* a cell currently being hovered by a dragged chip, about to have its match dropped onto it */
.ttg-table td.ttg-drop-target{outline:2px solid var(--gold);outline-offset:-2px;}
/* ---- multi-cell selection (20 Sep 2026) ---------------------------------------------------------
   A chip that is part of the current selection, i.e. one of the matches the next drag/arrow-key move
   will carry. A ring rather than a fill: the chip's own accent band is the tournament identity channel
   (see below) and must survive being selected, so the marker sits OUTSIDE the card instead of
   recolouring it. The soft outer halo is what makes a selection of six chips read as one group from
   across the room rather than six unrelated outlines. */
.ttg-chip.ttg-sel{
  outline:2px solid var(--ink);outline-offset:-1px;
  box-shadow:0 0 0 3px rgba(42,34,100,0.20);
}
/* ---- touch drag (20 Sep 2026) -------------------------------------------------------------------
   The browser's native drag-and-drop never fires on a touch screen, so on the venue tablet a match
   could be selected but not moved. Long-pressing a match picks it up instead and a ghost follows the
   finger; see ttgBindTouchDrag(). Mouse drags are untouched and still use native DnD. */
.ttg-chip, .ttg-unscheduled-row{touch-action:manipulation;}
/* while a finger is carrying a match, the grid must not also scroll under it */
body.ttg-touch-dragging, body.ttg-touch-dragging .ttg-scroll{touch-action:none;overscroll-behavior:contain;}
.ttg-touch-ghost{
  position:fixed;z-index:1200;pointer-events:none;transform:translate(-50%,-50%);
  background:var(--paper);border:1px solid var(--gold);border-radius:6px;
  box-shadow:0 6px 16px rgba(0,0,0,0.28);padding:6px 10px;opacity:0.95;
  font-family:'IBM Plex Sans',sans-serif;font-size:12px;font-weight:700;color:var(--ink);
  max-width:60vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.ttg-touch-ghost .ttg-touch-count{
  display:inline-block;margin-left:7px;background:var(--gold);color:var(--ink);border-radius:999px;
  padding:1px 7px;font-family:'IBM Plex Mono',monospace;font-size:11px;
}
/* the column header / time cell an admin can click to select that whole table or time slot */
.ttg-table th.ttg-pickable, .ttg-table td.ttg-time-col.ttg-pickable{cursor:pointer;}
.ttg-table th.ttg-pickable:hover, .ttg-table td.ttg-time-col.ttg-pickable:hover{background:var(--gold-soft);color:var(--ink);}
/* the strip above the grid that appears once anything is selected (or once a move can be undone) —
   count, what the keys do, and the two actions. Hidden entirely when there is nothing to say. */
.ttg-selbar{display:none;align-items:center;gap:10px;flex-wrap:wrap;margin-top:8px;padding:7px 10px;
  border:1px solid var(--line);border-radius:7px;background:var(--paper-alt);}
.ttg-selbar-count{font-family:var(--font-display);font-size:12px;font-weight:700;letter-spacing:0.3px;
  text-transform:uppercase;color:var(--ink);}
.ttg-selbar-hint{font-family:'IBM Plex Sans',sans-serif;font-size:11.5px;color:var(--ink-soft);flex:1;min-width:120px;}
.ttg-selbar-btn{background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:6px;
  padding:6px 12px;font-family:var(--font-display);font-size:11.5px;font-weight:600;letter-spacing:0.3px;
  text-transform:uppercase;cursor:pointer;}
.ttg-selbar-btn:hover{background:var(--gold-soft);}
/* ---- unsaved-work warning (20 Sep 2026) ---------------------------------------------------------
   A save that keeps failing used to be reported by nothing but the small red dot in the header, which
   is exactly the wrong volume for "the result you just typed is not stored anywhere but this browser".
   Once a save has been failing for a little while this banner takes the top of the screen — above the
   navigator drawer, above the board, in front of any open modal — and stays until a save gets
   through. It says how long it has been and how many attempts have failed, because "since 16:42" is
   what tells an admin whether they are about to lose one score or an hour of them. */
.save-warn{
  position:fixed;top:0;left:0;right:0;z-index:1500;
  display:flex;align-items:center;gap:12px;flex-wrap:wrap;
  padding:10px 16px;padding-top:calc(10px + env(safe-area-inset-top, 0px));
  background:#C0392B;color:#FFF3F1;border-bottom:2px solid #8E2A20;
  box-shadow:0 4px 14px rgba(0,0,0,0.3);
  font-family:'IBM Plex Sans',sans-serif;font-size:13.5px;line-height:1.35;
}
/* display:flex above would otherwise beat the browser's own [hidden] rule, leaving an empty red bar
   across the top of a perfectly healthy app */
.save-warn[hidden]{display:none !important;}
.save-warn-icon{font-size:17px;flex:0 0 auto;}
.save-warn-text{flex:1;min-width:180px;}
.save-warn-text strong{font-weight:700;}
.save-warn-detail{display:block;font-family:'IBM Plex Mono',monospace;font-size:11.5px;opacity:0.92;margin-top:2px;}
.save-warn-btn{
  background:#FFF3F1;color:#8E2A20;border:none;border-radius:6px;min-height:40px;padding:8px 16px;
  font-family:var(--font-display);font-size:12px;font-weight:700;letter-spacing:0.3px;
  text-transform:uppercase;cursor:pointer;flex:0 0 auto;
}
.save-warn-btn:hover{background:#fff;}
.save-warn-btn[disabled]{opacity:0.6;cursor:default;}
/* the same strip in green, shown for a few seconds once a save finally lands, so the admin gets an
   explicit all-clear rather than having to notice the red thing is gone */
.save-warn.ok{background:#1F7A5C;border-bottom-color:#145C45;color:#EFFDF8;}
.save-warn.ok .save-warn-btn{color:#145C45;}
@media print{ .save-warn{display:none !important;} }
/* v129 — "Maçım nerede?" / "Go to SWISS" never print, whatever is being printed (group, all groups, bracket, single match) */
@media print{ .mmw-bar, #mmwOpenBtn, #goRankingsBtn, #goSwissBtn{display:none !important;} }
/* ---- top-edge navigator drawer (20 Sep 2026) ----------------------------------------------------
   A strip of pinned tournaments that slides down when the pointer is pushed against the top of the
   window. The hot zone is a full-width invisible band: 8px is enough to catch a deliberate "throw the
   mouse at the top" but thin enough that it is never crossed by accident on the way to the header.
   The drawer itself sits above everything except modals (which are 1000+), so it can open over the
   board without the board's own sticky header poking through. */
.nav-drawer-hot{position:fixed;top:0;left:0;right:0;height:8px;z-index:900;}
/* 21 Sep 2026, by request ("floating window"): on desktop the drawer is a true floating window —
   centered both ways on the page, not a strip sliding down from the top edge — with a dimmed backdrop
   behind it (below) the same way the mobile panel already had. Same trigger as always (the gold handle,
   hover or tap); only the box now scales/fades in from the middle instead of sliding from the top. The
   mobile media query below still overrides this to a full-height right-edge slide-in panel. */
.nav-drawer{
  position:fixed;top:50%;left:50%;z-index:901;box-sizing:border-box;
  /* v45 — 20% narrower (50% -> 40%, max 640 -> 512px) and 3 columns, by request */
  width:40%;max-width:512px;max-height:78vh;overflow-y:auto;overflow-x:hidden;
  background:var(--paper);border:2px solid var(--line);border-radius:14px;
  box-shadow:0 14px 40px rgba(0,0,0,0.3);
  transform:translate(-50%,-50%) scale(0.94);opacity:0;pointer-events:none;
  transition:transform .18s ease-out, opacity .18s ease-out;
}
.nav-drawer.open{transform:translate(-50%,-50%) scale(1);opacity:1;pointer-events:auto;}
/* v81 — drop-down entrance/exit (by request: "popup comes from Tournaments, drops down to the center
   and disappears from below"): the window grows out of the gold "▾ Tournaments" handle at the top
   centre, falls to the middle of the screen with a small bounce, and on close keeps falling — sliding
   out through the bottom edge. Replaces v46's paper-plane swoop. The open state keeps the centred
   transform, so positioning, max-height and mobile sizing are unchanged. Reduced-motion: no animation. */
@keyframes navPlaneIn{
  0%  {transform:translate(-50%,-50%) translateY(-50vh) scale(.12,.08);opacity:0;}
  18% {transform:translate(-50%,-50%) translateY(-42vh) scale(.35,.3);opacity:1;}
  62% {transform:translate(-50%,-50%) translateY(2.5vh) scale(1.02,.97);opacity:1;}
  80% {transform:translate(-50%,-50%) translateY(-1vh) scale(.99,1.01);}
  100%{transform:translate(-50%,-50%) scale(1);opacity:1;}
}
@keyframes navPlaneOut{
  0%  {transform:translate(-50%,-50%) scale(1);opacity:1;}
  20% {transform:translate(-50%,-50%) translateY(-1.5vh) scale(1.01);opacity:1;}
  100%{transform:translate(-50%,-50%) translateY(75vh) scale(.92);opacity:0;}
}
.nav-drawer.open{animation:navPlaneIn .6s cubic-bezier(.3,.7,.4,1) both;}
.nav-drawer.plane-out{animation:navPlaneOut .45s cubic-bezier(.55,0,.9,.45) both;pointer-events:none;}
@media (prefers-reduced-motion: reduce){
  .nav-drawer.open, .nav-drawer.plane-out{animation:none;}
}

.nav-drawer-inner{display:flex;flex-direction:column;align-items:stretch;gap:10px;padding:16px;}
/* 21 Sep 2026, by request ("no need tournaments title at the left, the top one is enough"): the big
   gold handle above already reads "▾ Tournaments", so the small repeated label inside the drawer body
   is redundant — hidden rather than removed from markup/JS, so nothing else has to change. */
.nav-drawer-title{ display:none; }
/* 21 Sep 2026, by request ("make it two columns"): a two-column grid instead of a wrapping row — reads
   better now that the drawer itself is a narrower centered panel (see v19) rather than a full-width
   strip. .nav-drawer-empty spans both columns so the "nothing pinned" message isn't squeezed into half
   the panel. */
/* min-width:0 on both the grid track container AND each grid item below — a grid item's default
   min-width is auto (its content's natural width), so a long tournament name would otherwise force
   its column wider than 1fr and blow the whole window past the mobile viewport ("must fit in the
   window in mobile"). With min-width:0 the item is free to shrink and the name inside truncates
   instead of pushing the layout wider. */
.nav-drawer-items{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;flex:1;min-width:0;width:100%;}
/* one pinned tournament. Sized past 44px tall on purpose — this gets tapped on a tablet at the venue,
   not just clicked with a mouse. */
.nav-drawer-item{
  display:flex;align-items:center;gap:8px;min-height:44px;width:100%;min-width:0;box-sizing:border-box;
  background:var(--paper-alt);color:var(--ink);border:1px solid var(--line);border-radius:8px;
  padding:6px 14px;font-family:'IBM Plex Sans',sans-serif;font-size:13px;font-weight:600;cursor:pointer;
}
.nav-drawer-item:hover{background:var(--gold-soft);border-color:var(--gold);}
/* the tournament already open — it stays clickable (harmless) but reads as "you are here".
   21 Sep 2026, by request ("when the background is blue text must be yellow"): the dark-ink
   text that works on every other (light) row background is too low-contrast on this gold/blue
   fill, so this one row gets its own yellow text instead. */
.nav-drawer-item.current{background:var(--gold);border-color:var(--gold);color:#FFE066;}
/* the name truncates with an ellipsis rather than forcing the item (and the whole floating window)
   wider than the screen; the champ tag next to it keeps its own width and never shrinks */
.nav-drawer-item .nav-drawer-name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.nav-drawer-item .nav-drawer-champ{flex:0 0 auto;font-size:10.5px;font-weight:500;color:var(--ink-soft);font-family:'IBM Plex Mono',monospace;}
.nav-drawer-item.current .nav-drawer-champ{color:#FFE066;}
/* spans both grid columns so the "nothing pinned" message and the pin-edit list's own empty
   state aren't squeezed into a single cell */
.nav-pin-draggable{cursor:grab;}
.nav-pin-draggable:active{cursor:grabbing;}
.nav-pin-dragging{opacity:.45;transform:scale(.96);}
.nav-pin-over{outline:2px dashed var(--gold);outline-offset:2px;}
.nav-drawer-reorder-hint{grid-column:1 / -1;font-size:11px;color:var(--ink-soft);text-align:center;margin-top:-2px;}
.nav-drawer-section{grid-column:1 / -1;margin-top:6px;font-family:var(--font-display);font-size:10.5px;font-weight:700;letter-spacing:1px;text-transform:uppercase;color:var(--ink-soft);}
.nav-drawer-add-link{justify-content:center;border-style:dashed !important;}
.nav-drawer-empty{grid-column:1 / -1;font-family:'IBM Plex Sans',sans-serif;font-size:12.5px;color:var(--ink-soft);}
.nav-drawer-edit{
  background:transparent;color:var(--ink-soft);border:1px solid var(--line);border-radius:8px;
  min-height:44px;padding:6px 14px;font-family:var(--font-display);font-size:11.5px;font-weight:600;
  letter-spacing:0.3px;text-transform:uppercase;cursor:pointer;flex:0 0 auto;
}
.nav-drawer-edit:hover{background:var(--paper-alt);color:var(--ink);}
.nav-drawer-edit.on{background:var(--gold-soft);color:var(--ink);border-color:var(--gold);}
/* pin-editing mode: every tournament listed, pinned ones filled in. Same pill shape as above so the
   list doesn't jump around when the mode is switched. */
.nav-drawer-pin{
  display:flex;align-items:center;gap:7px;min-height:44px;width:100%;min-width:0;box-sizing:border-box;
  background:transparent;color:var(--ink-soft);border:1px dashed var(--line);border-radius:8px;
  padding:6px 12px;font-family:'IBM Plex Sans',sans-serif;font-size:12.5px;cursor:pointer;
}
.nav-drawer-pin .nav-drawer-name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;}
.nav-drawer-pin:hover{border-color:var(--gold);color:var(--ink);}
.nav-drawer-pin.pinned{background:var(--paper-alt);border-style:solid;border-color:var(--gold);color:var(--ink);font-weight:600;}
.nav-drawer-pin .star{font-size:13px;}
/* The always-visible grab tab: how anyone finds out the drawer exists, and the only way in on a touch
   screen, where there is no hover to catch. 21 Sep 2026, by request ("I need big drawer handle and
   very visible"): sized and colored to be spotted at a glance rather than discovered by accident —
   full gold, bold label, always full opacity (was a tiny low-contrast strip that faded in on hover). */
.nav-drawer-handle{
  position:fixed;top:0;left:50%;transform:translateX(-50%);z-index:902;
  min-width:150px;height:34px;line-height:32px;padding:0 18px;
  /* blue/gold fill, yellow text — 21 Sep 2026, by request ("when the background is blue text
     must be yellow"). Hover/open swap the fill to the light peach gold-soft, where that same
     yellow would be unreadable, so those two states set the text back to --ink explicitly. */
  background:var(--gold);color:#FFE066;border:2px solid var(--line);border-top:none;
  border-radius:0 0 12px 12px;font-family:var(--font-display);font-size:14px;font-weight:800;
  letter-spacing:0.3px;cursor:pointer;opacity:1;box-shadow:0 5px 14px rgba(0,0,0,0.22);
}
.nav-drawer-handle:hover{background:var(--gold-soft);color:var(--ink);box-shadow:0 6px 18px rgba(0,0,0,0.3);}
.nav-drawer-handle.open{background:var(--gold-soft);color:var(--ink);}
/* v78 — attention animation ("pull down Tournament menüsüne animasyon ... dikkati çeksin"): every few
   seconds the handle drops and bounces once with a yellow glow ring, like a tab asking to be pulled.
   transform keeps translateX(-50%) in every frame (that is what centers it). Stops while hovered or
   open, and for anyone whose system asks for reduced motion. */
@keyframes navHandleNudge{
  0%,62%,100%{transform:translateX(-50%) translateY(0);box-shadow:0 5px 14px rgba(0,0,0,0.22),0 0 0 0 rgba(255,224,102,0);}
  68%{transform:translateX(-50%) translateY(7px);box-shadow:0 8px 18px rgba(0,0,0,0.3),0 0 0 4px rgba(255,224,102,0.75);}
  74%{transform:translateX(-50%) translateY(0);}
  80%{transform:translateX(-50%) translateY(4px);box-shadow:0 6px 16px rgba(0,0,0,0.26),0 0 0 9px rgba(255,224,102,0.25);}
  86%{transform:translateX(-50%) translateY(0);box-shadow:0 5px 14px rgba(0,0,0,0.22),0 0 0 14px rgba(255,224,102,0);}
}
.nav-drawer-handle{animation:navHandleNudge 4s ease-in-out 1s infinite;}
.nav-drawer-handle:hover,.nav-drawer-handle.open{animation:none;}
@media (prefers-reduced-motion:reduce){ .nav-drawer-handle{animation:none;} }
/* 21 Sep 2026, by request ("floating window"): the dimmed backdrop behind the drawer, previously only
   drawn below 640px (see the mobile note below), now shows at every width — a floating window earns
   a real backdrop, and tapping/clicking it closes the drawer the same way Escape does. */
.nav-drawer-backdrop{
  display:block;position:fixed;inset:0;background:rgba(20,15,40,0.42);z-index:900;
  opacity:0;pointer-events:none;transition:opacity .18s ease-out;
}
.nav-drawer-backdrop.open{opacity:1;pointer-events:auto;}
@media print{ .nav-drawer, .nav-drawer-handle, .nav-drawer-hot, .nav-drawer-backdrop{display:none !important;} }
/* 21 Sep 2026, by request ("want same floating window in responsive and mobile versions"): below
   640px this used to switch to a completely different right-edge slide-in panel (see the removed v16
   rules — no mouse to hover the top edge with, was the reasoning then). Now it stays the exact same
   centered floating window as desktop (same markup, same open/close JS, same gold top handle, same
   two-column grid) — only the width/height shrink to fit a phone screen, nothing about its position or
   how it opens changes. */
@media (max-width:640px){
  .nav-drawer-hot{ display:none; }
  .nav-drawer{ width:92vw; max-width:420px; max-height:84vh; }
  .nav-drawer-items{ grid-template-columns:1fr 1fr; } /* phone: 3 pills would be too cramped to read */
  .nav-drawer-handle{ min-width:0; width:auto; padding:0 14px; font-size:13px; height:30px; line-height:28px; }
  /* v103 — the fixed handle used to sit on top of the logo: start the page below it */
  body{ padding-top:22px; }
  .groups-title-row, #panel-groups .section-title-row{ flex-wrap:wrap; row-gap:8px; }
  #shareSessionBtn, #printAllGroupsBtn{ max-width:100%; }
}
/* brief flash after double-clicking a chip jumps to the real match card on its own tab */
.mb-goto-highlight{outline:3px solid var(--gold);outline-offset:2px;}
/* ---- one accent per tournament ------------------------------------------------------------------
   The grid mixes a whole championship into one table, and the name printed on a card was the only
   thing telling them apart — the slowest possible answer to "which of these is mine" on a screen read
   from across a hall.

   The colour is a solid BAND across the card's name line, not a wash behind the whole card. Three
   things pushed it there, and they are all the same underlying fact: a pale tint is not a colour you
   can identify. Two fills at 12% differ by a colour distance of about 1 — to the eye they are the same
   thing — while the same two hues at full strength differ by 19. So the hue runs at full strength on
   the band, where it is easiest to judge, the card body stays white so the player names stay readable,
   and the band doubles as the answer to "the group name must look different from the other text":
   it is the only text on the card that is not dark-on-white.

   The cell keeps no colour of its own. The gold "assigned" tint was redundant under a card (a cell
   holding a card is assigned) and only muddied the band; the green "complete" tint was worse, because
   the cell was the identity channel and by mid-afternoon most of a real grid is finished, so every
   completed match turned the same mint and the tournament colours disappeared. Completion is a ✓ on
   the band instead.

   Eight hues, the validated categorical set: worst adjacent colour-blind separation ΔE 9.1,
   normal-vision 19.6, every hue over 3:1 on white. Their ORDER is the safety mechanism, not
   decoration — neighbours are the ones most often seen together. Blue and green are here despite an
   earlier attempt without them: warm-only leaves four usable hues and no more, and four warm hues at
   any strength cap out around ΔE 6, which is what "the colours are very close" actually measured as.
   Green in particular only became free once "finished" stopped being green.
   Red is the one hue deliberately missing: it is the double-booking alarm, and a status colour that
   doubles as a series colour has stopped being a status colour. Cyan takes the eighth slot instead.

   Each band carries its own text colour, chosen so the name clears 4.5:1 against it — white on the
   dark hues, near-black on the light ones. Forcing white on all eight would have meant darkening
   amber and pink into mud, which measurably broke the separation this palette exists for.

   Past eight tournaments the hues repeat with a diagonal weave through the band — one direction, then
   the other — giving twenty-four identities from eight colours. No ninth hue is invented: eight is
   where a categorical palette stops being reliably distinguishable. */
.ttg-acc-0{--ttg-acc:#2166BD;--ttg-acc-ink:#FFFFFF;--ttg-acc-edge:rgba(33,102,189,0.45);}
.ttg-acc-1{--ttg-acc:#EB6834;--ttg-acc-ink:#141414;--ttg-acc-edge:rgba(235,104,52,0.45);}
.ttg-acc-2{--ttg-acc:#1BAF7A;--ttg-acc-ink:#141414;--ttg-acc-edge:rgba(27,175,122,0.45);}
.ttg-acc-3{--ttg-acc:#EDA100;--ttg-acc-ink:#141414;--ttg-acc-edge:rgba(237,161,0,0.45);}
.ttg-acc-4{--ttg-acc:#E87BA4;--ttg-acc-ink:#141414;--ttg-acc-edge:rgba(232,123,164,0.45);}
.ttg-acc-5{--ttg-acc:#008300;--ttg-acc-ink:#FFFFFF;--ttg-acc-edge:rgba(0,131,0,0.45);}
.ttg-acc-6{--ttg-acc:#4A3AA7;--ttg-acc-ink:#FFFFFF;--ttg-acc-edge:rgba(74,58,167,0.45);}
.ttg-acc-7{--ttg-acc:#00A0B8;--ttg-acc-ink:#141414;--ttg-acc-edge:rgba(0,160,184,0.45);}

/* The card body: white, with one line in its own hue. White because the band is doing the colouring
   and a tinted body underneath it would only dull it. */
.ttg-chip.ttg-acc, .ttg-unscheduled-row.ttg-acc{
  background-color:#FFFFFF;
  background-image:none;
  border-color:var(--ttg-acc-edge);
  box-shadow:none;
  overflow:hidden;                 /* so the band's square corners are clipped by the card's rounded ones */
}
/* The band itself — full-bleed to the card's edges, which is why it cancels the card's own padding. */
.ttg-chip.ttg-acc .ttg-tname, .ttg-unscheduled-row.ttg-acc .ttg-unscheduled-tname{
  display:block;
  background:var(--ttg-acc);
  color:var(--ttg-acc-ink);
  margin:-3px -5px 3px;
  padding:2px 5px;
  letter-spacing:0.2px;
}
/* Slots 9-24 reuse the eight hues with a diagonal weave through the band. The white it weaves with is
   the card body showing through, so a woven band reads as the same colour, differently woven — and the
   legend swatch is woven the same way, so the two are read as one thing. */
.ttg-chip.ttg-acc-alt .ttg-tname, .ttg-unscheduled-row.ttg-acc-alt .ttg-unscheduled-tname{
  background-image:repeating-linear-gradient(45deg, rgba(255,255,255,0.45) 0 4px, rgba(255,255,255,0) 4px 8px);
}
.ttg-chip.ttg-acc-alt2 .ttg-tname, .ttg-unscheduled-row.ttg-acc-alt2 .ttg-unscheduled-tname{
  background-image:repeating-linear-gradient(135deg, rgba(255,255,255,0.45) 0 4px, rgba(255,255,255,0) 4px 8px);
}
/* The group or round label, directly under the band. It is neither the band nor the player list, and
   before this it was styled as neither — plain body text between two things that both had a voice. */
/* The group or round label, directly under the band. It is told apart from the player names by
   COLOUR, not by weight — everything on this card being heavy was the problem, and a card whose every
   line shouts has no emphasis left to spend. The plum is dark enough to lead the eye without adding
   another loud thing to a grid that already carries a coloured band per card. */
.ttg-glabel{
  display:block;font-family:'IBM Plex Sans',sans-serif;font-weight:500;letter-spacing:0.2px;
  color:#5A0046;margin:0 0 1px;
}
/* A cell holding a card carries no colour of its own — see the block comment above. */
.ttg-table td.ttg-filled.ttg-td-acc{background:#FFFFFF;}
.ttg-legend-item.ttg-acc-alt2 .ttg-legend-swatch{
  background:repeating-linear-gradient(135deg, var(--ttg-acc) 0 3px, #FFFFFF 3px 6px);
}
/* "Complete" gets no colour and no fade on this grid, and that is the whole lesson of this rule.
   It used to wash the cell green. But the cell IS the identity channel now — the tournament's tint
   lives there — so on a real tournament day, where most of the grid is finished by mid-afternoon,
   every completed match turned the same mint and the tournament colours simply vanished under it.
   Fading the card instead was worse in a different way: it took the player names, which are the one
   thing on this screen anybody actually has to read, down with it.
   So completion is a single ✓ on the card's own name line. It is already the least urgent thing here
   — a finished match needs nobody — and a bracket card carries its score besides, which says the same
   thing in more detail.
   That leaves the double-booking as the only state with a colour at all, which is exactly right: it
   is the one thing on this screen that needs somebody now. Declared last so it wins over everything,
   at .ttg-filled specificity so it can repaint a cell that is already holding a card. */
/* Per explicit request: the ✓ mark that used to sit in front of a finished match's tournament name
   is gone — a finished match already reads as done from the green cell wash and (for a bracket card)
   its own score, so the checkmark was redundant clutter. */
/* Per explicit request: the CARD itself (the rounded box holding the text — chip's default fill is
   a near-transparent rgba(0,0,0,0.04), which let the cell's green wash underneath bleed straight
   through it) turns solid white once done, same as every other card on this grid. The green then only
   shows as a soft frame in the gap around the card — the cell's own 6px padding (.ttg-table td) —
   instead of washing over the text. Text stays in its normal dark colours (untouched), and the
   COMP/CONS badge goes back to its normal tinted style below since it's back to sitting on white. */
.ttg-chip.ttg-chip-done{background:#fff;box-shadow:0 1px 4px rgba(0,0,0,0.18);}
/* A double-booking carries a mark, not just a colour. The palette above already fills the warm half
   of the wheel, so no red exists that is safely far from all four tournament hues — and a status
   signal that can be mistaken for an identity is not a signal. The ring, the wash and the ⚠ are three
   things at once, none of which any card can produce, so it does not matter that the red is close to
   one of them. */
.ttg-table td.ttg-filled.ttg-conflict{background:#FDECEC;box-shadow:inset 0 0 0 2px var(--red);}
.ttg-table td.ttg-conflict{position:relative;box-shadow:inset 0 0 0 2px var(--red);}
.ttg-table td.ttg-conflict::after{
  content:'⚠';position:absolute;top:0;right:3px;font-size:11px;line-height:1.2;
  color:var(--red);pointer-events:none;
}
/* The legend is what turns the colours into information — without it a stripe is decoration. It is
   also the filter: clicking a tournament shows only that one, clicking it again shows them all, which
   is the same control the Tournament dropdown offers and the one people reach for first. */
.ttg-legend{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 10px;}
.ttg-legend-item{
  display:inline-flex;align-items:center;gap:6px;cursor:pointer;
  font-family:'IBM Plex Sans',sans-serif;font-size:11.5px;font-weight:700;color:var(--ink);
  border:1px solid var(--line);border-radius:999px;background:var(--paper);padding:3px 10px 3px 5px;
}
.ttg-legend-item:hover{border-color:var(--ttg-acc);}
.ttg-legend-item.ttg-legend-on{border-color:var(--ttg-acc);box-shadow:inset 0 0 0 1px var(--ttg-acc);}
/* dimmed rather than hidden while a filter is on: the tournaments you are NOT looking at are still
   part of the day, and their slots are still occupying tables in the grid behind the filter. */
.ttg-legend-item.ttg-legend-off{opacity:0.45;}
/* Auto-assign inclusion checkbox (21 Sep 2026) — mirrors time-table.html's own .ttg-legend-check. */
.ttg-legend-item .ttg-legend-check{width:13px;height:13px;flex:0 0 auto;accent-color:var(--ttg-acc);cursor:pointer;margin:0;}
.ttg-legend-swatch{
  width:13px;height:13px;border-radius:4px;flex:0 0 auto;
  background:var(--ttg-acc);border:1px solid rgba(0,0,0,0.18);
}
.ttg-legend-item.ttg-acc-alt .ttg-legend-swatch{
  background:repeating-linear-gradient(45deg, var(--ttg-acc) 0 3px, #FFFFFF 3px 6px);
}

#ttgUnscheduled{margin-top:12px;}
/* 8 columns of not-yet-scheduled matches under the grid instead of one long single-column list —
   makes much better use of the modal's width once there are more than a handful unscheduled. */
.ttg-unscheduled-list{display:grid;grid-template-columns:repeat(8, 1fr);gap:4px;}
@media (max-width: 900px){ .ttg-unscheduled-list{grid-template-columns:repeat(4, 1fr);} }
@media (max-width: 560px){ .ttg-unscheduled-list{grid-template-columns:repeat(2, 1fr);} }
.ttg-unscheduled-row{
  font-family:'IBM Plex Sans',sans-serif;font-size:11.5px;color:var(--ink-soft);
  background:var(--paper-alt);border-radius:6px;padding:5px 8px;
}
/* tournament name stands out (bold, full-size, in the site's own masatenisi.pro brand red — the same
   red as the "." dot in the header logo) — it's the thing that matters most when scanning a wall of
   unscheduled matches; the match/group label (round code + player names) below it is just detail, so
   it's dialed back smaller and softer. */
.ttg-unscheduled-tname{display:block;font-weight:700;color:var(--red);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.ttg-unscheduled-label{display:block;font-size:10px;color:var(--ink-soft);margin-top:1px;}
/* player names (a bracket match's "nameA vs nameB") — deliberately smaller than the round code (SF/
   QF/…) in front of them since that's what's actually quick to scan, but still full-strength ink
   black (not the softer grey used for supporting text elsewhere) since the names themselves are the
   whole point of the chip. */
/* The two names on a Comp/Cons card are set exactly like the four names in a group card — same face,
   same size, same weight. They are the same kind of thing (who is playing), and until now they were
   sized by a relative 0.9em off the card's own text, which meant that shrinking the group roster left
   the bracket names visibly larger for no reason anybody could name. An absolute size keeps the two
   locked together instead of drifting apart the next time either is touched. */
.ttg-names{display:block;font-size:9px;color:var(--ink);font-family:var(--font-player);font-weight:400;}
/* the score itself (once a bracket match has one) — deliberately smaller than the label text around
   it rather than competing for attention with the round/player names. */
.ttg-score{font-size:0.68em;font-weight:700;color:var(--ink-soft);}
/* Competition vs Consolation bracket indicator, shown right before the round code (R16/QF/SF/F) on
   every bracket-match chip — without it, a busy grid with both brackets running gives no visual way
   to tell a Competition R16 apart from a Consolation R16 at a glance. Gold = Competition/primary
   (matches the gold accent used for "selected/primary" states throughout the app), muted slate-on-
   paper = Consolation/secondary, same primary/secondary color pairing called out in the minimalist
   theme comment above. */
.ttg-bracket-badge{display:inline-block;font-size:8.5px;font-weight:800;letter-spacing:0.3px;text-transform:uppercase;padding:1px 4px;border-radius:3px;margin-right:3px;vertical-align:1px;}
/* Filled versus outlined, both in ink. These two badges appear on every bracket card on the grid;
   as two coloured pills they were eighty more spots of colour arguing with the tournament tints, and
   the shape distinction reads just as fast in a fifth of the visual weight. Back to its original
   translucent-ink-tint look (a brief solid-white version was tried and undone) now that the card
   underneath a done match is white again — the badge was only ever designed against a white card. */
/* Solid white rather than a translucent ink tint: a translucent fill reads fine sitting on a plain
   white card, but on an assigned-but-not-yet-scored cell (gold-soft wash showing through the chip's
   own near-transparent fill underneath it) that same translucency mixed into a muddy yellow — per
   explicit request, this badge is now solid white on every background it can sit on. */
/* v219 — Competition filled green (the score pill's green), Consolation filled white (by request) */
.ttg-bracket-badge.comp{background:#3FD1B0;color:#0b3a2e;border:1px solid #2FB596;}
.ttg-bracket-badge.cons{background:#fff;color:var(--ink);border:1px solid var(--line);}
/* the box itself turns green once its match/group is complete — not just the score text, the whole
   placeholder, so it reads at a glance without having to find and parse a number. A bracket match
   completes the moment it has a score; a group completes once every one of its own round-robin
   matches does (see mbGroupMatchesFromPayload()'s `complete` flag). In the grid this is the cell
   itself (.ttg-td-scored, above) — never the chip inside it too, which would just nest a second box.
   In the not-yet-scheduled list, where there's no outer cell to color, it's the row itself. */
/* same rule as the grid: the ✓ above says it, and no green box is needed to repeat it */
.ttg-unscheduled-row.ttg-scored{opacity:0.75;}

/* v63 — Install App is admin-only: hidden in viewer mode (and before login), whatever beforeinstallprompt does */
body:not(.admin-mode) #installBtn{display:none !important;}
/* v64 rule (selectors admin-only) removed in v138 — viewers can switch championship / tournament category */
/* v66 — Player List "Kategoriler" (Singles categories) menu */
#singlesCatPanel{min-width:230px;max-height:60vh;overflow-y:auto;}
#singlesCatPanel button{display:flex !important;justify-content:space-between;align-items:center;gap:12px;width:100%;text-align:left;
  background:transparent !important;border:none !important;border-radius:6px;padding:7px 10px;font-size:13px;font-weight:600;
  text-transform:none;letter-spacing:normal;color:var(--ink) !important;box-shadow:none !important;}
#singlesCatPanel button:hover{background:var(--paper-alt) !important;}
#singlesCatPanel button.sc-on{background:var(--gold-soft) !important;}
#singlesCatPanel .sc-count{font-size:11px;font-weight:700;color:var(--ink-soft);background:var(--paper-alt);border-radius:999px;padding:1px 8px;}
#singlesCatPanel .sc-head{font-size:10.5px;font-weight:700;letter-spacing:.6px;text-transform:uppercase;color:var(--ink-soft);padding:4px 10px 6px;}
#singlesCatBtn{background:var(--red) !important;border:1px solid var(--red) !important;color:#fff !important;padding:7px 12px;border-radius:6px;font-weight:700;cursor:pointer;}
#singlesCatBtn:hover{background:#9E2E22 !important;border-color:#9E2E22 !important;}
#singlesCatBtn.sc-active{box-shadow:0 0 0 3px rgba(199,62,44,0.28) !important;}
/* v69 — real time of a match whose time is between grid rows */
.ttg-offgrid-time{display:block;margin-top:2px;font-size:10px;font-weight:800;color:#B42318;background:#FEE4E2;border-radius:4px;padding:0 4px;text-align:center;}

/* v98 — group status boxes on the group card title */
.group-card .head .gs-boxes{display:inline-flex; gap:4px; margin-left:8px; vertical-align:middle;}
.group-card .head .gs-box{width:16px; height:16px; padding:0; margin:0; border:1.5px solid rgba(255,255,255,.55); border-radius:3px;
  display:inline-flex; align-items:center; justify-content:center; font-size:11px; line-height:1; font-weight:900; color:#1d1a3a;
  box-sizing:border-box; min-width:0; min-height:0; box-shadow:none; text-transform:none; letter-spacing:0;}
button.gs-box{cursor:pointer;}
.group-card .head .gs-box.gsWhite{background:#fff;}
.group-card .head .gs-box.gsBlue{background:#5B9BF0;}   /* v187 — called */
.group-card .head .gs-box.gsYellow{background:#FFD84D;}
.group-card .head .gs-box.gsGreen{background:#3FD1B0;}
.group-card .head .gs-box.on{border-color:#fff; border-width:2px; box-shadow:0 0 0 1px #1d1a3a;}
.group-card .head .gs-box.on::after{content:'✓';}
.group-card .head .gs-box:not(.on){opacity:.9;}
button.gs-box:hover{opacity:1 !important;}
.group-card.gs-playing{border-top:5px solid #FFD84D;}
.group-card.gs-done{border-top:5px solid #3FD1B0;}
.group-card.gs-called{border-top:5px solid #5B9BF0;}   /* v187 */
/* v99 — group card title: group name LEFT, status boxes RIGHT */
.group-card .head .head-label{display:flex !important; align-items:center; justify-content:space-between; width:100%; text-align:left !important; align-self:stretch;}
.group-card .head .head-label .gs-boxes{margin-left:auto;}
.group-card .head .head-label > .g-num{margin-left:6px;}
.group-card.gs-playing .head-label > .g-num, .group-card.gs-done .head-label > .g-num{border-radius:4px; padding:0 5px;}
.group-card.gs-playing .head-label > .g-num{background:#FFD84D; color:#1d1a3a;}
.group-card.gs-done .head-label > .g-num{background:#3FD1B0; color:#1d1a3a;}
/* v154 — group fixture scores in bold ("burada skorlar bold olsun"). The 800 asked for above never showed:
   the self-hosted IBM Plex Mono stops at 600, so the browser drew the nearest lighter face. Archivo 700
   (the player names' own face) is bundled, and tabular figures keep every digit the same width. !important
   is for the viewer's read-out, whose font-family is set inline in renderGroups. */
table.sched input.score,
table.sched .score-pair > span:not(.bye-readout){
  font-family:'Archivo',sans-serif !important; font-weight:700 !important; font-variant-numeric:tabular-nums;
}
/* v154 — tab bar: every tab on a light blue, the open one a step darker ("pasif sekmelerin arkaplanı light
   blue, aktif sekmenin ondan biraz koyu olsun"). Same for the Player Database's own tabs. */
:root{ --tab-bg:#CFE3FA; --tab-bg-hover:#BDD7F6; --tab-bg-active:#A3C6F0; }   /* one step darker, by request */
nav.tabs button, nav.pm-tabs button{ background:var(--tab-bg); color:#2F3D6E; font-weight:600; }   /* labels not faded, by request */
nav.tabs button:hover, nav.pm-tabs button:hover{ background:var(--tab-bg-hover); color:#1E2858; }
nav.tabs button.active, nav.pm-tabs button.active{ background:var(--tab-bg-active); color:#1A1F52; font-weight:700; }
/* v155 — 📊 summary button on the Tournament List label row */
.selector-head{ display:flex; align-items:center; justify-content:space-between; gap:8px; min-width:0; }
.champ-summary-bar-btn{ font-family:var(--font-display); font-weight:600; font-size:10px; letter-spacing:.3px; text-transform:uppercase;
  border:1px solid var(--gold); border-radius:6px; background:var(--gold); color:#fff; padding:2px 8px; cursor:pointer; white-space:nowrap; line-height:1.5; }
.champ-summary-bar-btn:hover{ background:var(--ink); border-color:var(--ink); }
/* v155 — admin tools inside ⚙ (moved out of the header bar): the "Yönetim" heading only for an admin;
   the buttons themselves are shown/hidden one by one in applySessionUI() */
body:not(.admin-mode) .settings-admin-label{ display:none; }
.settings-admin-tools{ display:flex; flex-direction:column; }
.settings-admin-tools .settings-admin-btn{ white-space:nowrap; }
/* v154 — the three buttons above the tabs (Maçım nerede? / Rankings / Go to SWISS) and the tabs themselves,
   a little smaller, by request (buttons were 15px / 11×18 padding, tabs 13.5px / 10×16) */
.mmw-open-btn{ font-size:13px; padding:8px 14px; border-radius:10px; }
nav.tabs button, nav.pm-tabs button{ font-size:12px; padding:8px 13px; }
/* v154 — Rankings on a phone: rank, name and rating fit the screen (by request); the other columns are
   still there by swiping the table sideways. The page and card margins were eating ~100px of a 375px
   screen, and a long name on one line pushed Rating off the edge. */
@media (max-width:640px){
  #playerModuleScreen{ padding:10px 6px; }
  #playerModuleScreen .player-module-card{ padding:16px 10px 20px; }
  table.rankings-table th, table.rankings-table td{ padding:5px 4px; font-size:12px; }
  table.rankings-table .rk-rank{ width:26px; }
  table.rankings-table td.name-col{ white-space:normal; min-width:0; max-width:150px; line-height:1.25; }
  /* main page: Championship and Tournament Category side by side — two rows instead of four (by request) */
  .session-manager .selector-group{ flex:1 1 0; min-width:0; }
  .session-manager .selector-group select{ width:100%; max-width:none; font-size:13px; padding:8px 6px; }
  .session-manager .selector-group label{ font-size:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
}
@media (max-width:640px){
  .mmw-bar .mmw-open-btn{ font-size:clamp(10.5px,3.3vw,13px); padding:8px 6px; }
  nav.tabs button, nav.pm-tabs button{ font-size:11.5px; padding:9px 11px; }
}

/* v230 — 📊 Özet: the championship's players, category by category (cpOpen in app.js) */
#cpOverlay .mmw-box{box-sizing:border-box;max-width:620px;display:flex;flex-direction:column;max-height:calc(100vh - 20px);max-height:calc(100dvh - 20px);min-width:0;}
#cpOverlay .mmw-body{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;margin:0 -4px;padding:0 4px;}
#cpOverlay .mmw-head, #cpOverlay .mmw-foot, #cpOverlay .cp-tools{flex:none;}
/* v288 — Şampiyona Özeti: two tabs; the summary scrolls in its own body */
#cpOverlay .cp-tabs{flex:none;display:flex;gap:6px;margin:0 0 10px;border-bottom:1.5px solid var(--line);}
#cpOverlay .cp-tabs button{font:700 13px var(--font-display);padding:8px 14px;border:1.5px solid transparent;border-bottom:0;border-radius:8px 8px 0 0;background:transparent;color:var(--ink-soft);cursor:pointer;margin-bottom:-1.5px;}
#cpOverlay .cp-tabs button.on{background:#fff;color:var(--ink);border-color:var(--line);border-bottom:1.5px solid #fff;}
#cpOverlay .cp-podbody{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;margin:0 -4px;padding:0 4px;}
#cpOverlay .cp-podbody .sm-head{margin-top:2px;}
#cpOverlay .sm-pod li{font-size:12px;}   /* v289 — names a little smaller */
/* v291 — 📈 İstatistikler */
#cpOverlay .cp-statbody{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;margin:0 -4px;padding:0 4px;}
#cpOverlay .cp-statbody .sm-head{margin-top:2px;}
#cpOverlay .cp-statbody .sm-table{font-size:12px;}
#cpOverlay .cp-statbody .sm-table td.n small, #cpOverlay .cp-statbody .sm-table td small{color:var(--ink-soft);font-size:10.5px;}
#cpOverlay .cs-scroll{overflow-x:auto;}
#cpOverlay .cs-tall{max-height:440px;overflow-y:auto;border-radius:12px;}
#cpOverlay .cs-tot td{font-weight:700;background:var(--paper-alt);}
#cpOverlay .cs-h4{margin:16px 0 6px;font-family:var(--font-display);font-size:12px;text-transform:uppercase;letter-spacing:.6px;color:var(--ink-soft);}
#cpOverlay td.cs-barcell{text-align:left;width:32%;}
#cpOverlay .cs-bar{display:inline-block;width:100%;min-width:50px;height:8px;background:var(--paper-alt);border-radius:4px;overflow:hidden;vertical-align:middle;}
#cpOverlay .cs-bar i{display:block;height:100%;background:#5b4fe0;border-radius:4px;}
#cpOverlay .cs-bar.hot i{background:#e07b2f;}
/* v290 — Fair Play award */
#cpOverlay .sm-fp{background:#fff;border:1px solid var(--line);border-left:4px solid #1fa855;border-radius:12px;padding:10px 14px;box-shadow:var(--shadow);max-width:520px;}
#cpOverlay .sm-fp .sm-pod li{font-size:13px;}
#cpOverlay .sm-fp-note{margin:6px 0 0;font-size:12px;color:var(--ink-soft);white-space:pre-wrap;}
#cpOverlay .sm-fp-edit{margin-left:8px;font:700 10.5px var(--font-display);letter-spacing:.3px;text-transform:none;padding:2px 8px;border:1px solid var(--line);border-radius:6px;background:#fff;color:var(--ink-soft);cursor:pointer;vertical-align:1px;}
#cpOverlay .sm-fp-edit:hover{border-color:var(--gold);color:var(--ink);}
#cpOverlay .cp-c-edit{font:inherit;color:var(--ink-soft);background:transparent;border:1px dashed var(--line);border-radius:5px;padding:0 5px;cursor:pointer;text-align:right;}
#cpOverlay .cp-c-edit:hover{border-color:var(--gold);color:var(--ink);}
@media print{ #cpOverlay .cp-c-edit{border:0;} }
#cpOverlay .sm-pod li .p small.sm-il{font-family:'IBM Plex Sans',sans-serif;font-size:10.5px;font-weight:500;color:var(--ink-soft);margin-left:2px;}
.cp-tools{margin-bottom:8px;}
.cp-q{width:100%;box-sizing:border-box;padding:8px 10px;border:1.5px solid var(--line);border-radius:8px;background:var(--paper-alt);color:var(--ink);font-size:14px;}
.cp-sum{font-size:12.5px;color:var(--ink-soft);margin:0 0 8px;font-weight:600;}
.cp-sec{border:1.5px solid var(--line);border-radius:10px;padding:7px 10px 6px;margin-bottom:9px;background:var(--paper-alt);}
.cp-h{display:flex;align-items:baseline;gap:6px;font-size:12px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;color:var(--ink);margin-bottom:3px;}
.cp-tn{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.cp-n{margin-left:auto;flex:none;font-weight:600;text-transform:none;letter-spacing:0;color:var(--ink-soft);}
.cp-empty .cp-n{font-style:italic;font-weight:400;}
.cp-tag{display:inline-block;padding:0 5px;border-radius:4px;border:1px solid var(--line);color:var(--ink-soft);font-size:9.5px;font-weight:600;}
.cp-tbl{width:100%;border-collapse:collapse;font-size:13px;}
.cp-tbl td{padding:4px 3px;border-top:1px solid var(--line);vertical-align:top;}
.cp-tbl .cp-i{width:24px;text-align:right;color:var(--ink-soft);font-variant-numeric:tabular-nums;padding-right:8px;}
.cp-pp{display:flex;gap:10px;align-items:baseline;}
.cp-pp + .cp-pp{margin-top:2px;}
.cp-nm{flex:1;min-width:0;font-weight:600;}
.cp-c{flex:none;max-width:45%;text-align:right;color:var(--ink-soft);font-size:12px;}
.cp-out .cp-nm{text-decoration:line-through;opacity:.6;}
.cp-wd{color:#c0392b;font-size:11px;}
.cp-swh{font-family:var(--font-display);font-weight:700;font-size:13.5px;margin:16px 0 8px;padding-top:10px;border-top:2px dashed var(--line);}
.cp-none{color:var(--ink-soft);font-size:13px;}
#cpOverlay .mmw-foot{align-items:center;}
/* v231 — the player list in two columns (down the left, then the right); one column on a phone */
#cpOverlay .mmw-box{max-width:920px;}
.cp-tbl, .cp-tbl tbody{display:block;}
.cp-tbl tbody{column-count:2;column-gap:24px;}
.cp-tbl tr{display:flex;break-inside:avoid;border-top:1px solid var(--line);}
.cp-tbl td{border-top:0;}
.cp-tbl .cp-i{flex:none;}
.cp-tbl .cp-p{flex:1 1 auto;min-width:0;}
@media (max-width:640px){ .cp-tbl tbody{column-count:1;} }
/* v231 — each category's header a band in its own colour (cpHeadStyle: the Arena's eight hues, woven past eight) */
.cp-sec{padding-top:0;overflow:hidden;}
.cp-h{margin:0 -10px 4px;padding:6px 10px;}
.cp-h .cp-n{color:inherit;opacity:.85;}
.cp-h .cp-tag,.cp-h .mmw-sw{color:inherit;border-color:currentColor;background:transparent;}
.cp-fr{display:flex;gap:8px;}
#cpOverlay .mmw-foot button{font-size:12.5px;padding:7px 11px;border-radius:8px;border:1.5px solid var(--line);background:transparent;color:var(--ink);cursor:pointer;font-weight:700;}
/* v230 — "📊 Şampiyona Oyuncuları" is longer than "📊 Özet": on a phone it would squeeze the Tournament List
   label to nothing, so the label row wraps (the button drops under the label, beside the 2-line Championship button) */
@media (max-width:640px){ .selector-head{ flex-wrap:wrap; row-gap:3px; } .selector-head > label{ flex:0 1 auto; } }
/* v244 — Player Pool: Club and City are edited in the table */
table.roster td.pcell{cursor:text;min-width:70px;}
table.roster td.pcell:hover,table.roster td.pcell:focus{outline:1px dashed var(--gold);outline-offset:-2px;}
table.roster td.pcell:has(input){padding:2px;outline:none;}
table.roster input.pcell-input{width:100%;min-width:110px;box-sizing:border-box;padding:3px 5px;border:1px solid var(--gold);border-radius:5px;background:var(--paper);color:var(--ink);font:inherit;text-align:center;}
table.roster input.pcell-input:focus{outline:none;box-shadow:0 0 0 2px rgba(212,160,23,.25);}
/* v245 — group header: Day/Table/Time and the icon buttons stay on one row at every width */
.group-card .head .head-right{flex-wrap:nowrap;}
.group-card .head .head-meta,
.group-card .head .head-meta .meta-field,
.group-card .head .head-meta select,
.group-card .head .head-meta input{flex:0 1 auto;min-width:0;}
.group-card .head .head-meta .meta-table-prefix{flex:none;white-space:nowrap;}
.group-card .head .print-group-btn,
.group-card .head .erase-group-btn{flex:none;}
.meta-cap-short{display:none;}
@media (max-width:640px){
  .meta-cap-full{display:none;}
  .meta-cap-short{display:inline;}
  .group-card .head .head-meta .meta-field{margin-right:4px;}
  .group-card .head .head-meta .meta-field.meta-field-row{gap:2px;}
  .group-card .head .head-meta .meta-table-prefix{font-size:10px;letter-spacing:0;}
  .group-card .head .head-meta select,
  .group-card .head .head-meta input{font-size:13px;padding:4px 1px;}
  .group-card .head .head-meta select{width:58px;}
  .group-card .head .head-meta input.meta-table{width:34px;}
  .group-card .head .head-meta input.meta-time{width:50px;}
  .group-card .head .print-group-btn,
  .group-card .head .erase-group-btn{padding:5px 6px;margin-left:3px;border-radius:5px;}
}
@media (max-width:374px){
  .group-card .head{padding-left:8px;padding-right:8px;}
  .group-card .head .head-meta .meta-field{margin-right:3px;}
  .group-card .head .head-meta .meta-table-prefix{font-size:9px;}
  .group-card .head .head-meta select,
  .group-card .head .head-meta input{font-size:11.5px;padding:3px 0;}
  .group-card .head .head-meta select{width:48px;}
  .group-card .head .head-meta input.meta-table{width:26px;}
  .group-card .head .head-meta input.meta-time{width:46px;flex-shrink:0;}
  .group-card .head .print-group-btn,
  .group-card .head .erase-group-btn{padding:4px 3px;margin-left:2px;}
}

/* v264 — Maçlarımı Göster window: every text size ×0.78 (by request: "yüzde 20-25 daha küçük").
   The search input stays 16px — iPhone zooms the page in on anything smaller. */
#mmwOverlay .mmw-head h2{font-size:13.5px;}
#mmwOverlay .mmw-x{font-size:18px;}
#mmwOverlay .mmw-hint{font-size:9.5px;}
#mmwOverlay .mmw-name{font-size:11px;padding:7px 10px;}
#mmwOverlay .mmw-name small{font-size:9px;}
#mmwOverlay .mmw-player{font-size:13.5px;}
#mmwOverlay .mmw-player small.mmw-pinfo{font-size:9px;}
/* v282 — doubles / mixed partner under the player's name */
#mmwOverlay .mmw-player .mmw-partner{margin-top:3px;font-size:12px;font-weight:700;color:#000;}
#mmwOverlay .mmw-player .mmw-partner .k{font-family:'IBM Plex Sans',sans-serif;font-size:10.5px;font-weight:700;color:var(--ink-soft);margin-right:5px;}
#mmwOverlay .mmw-t{font-size:9px;}
#mmwOverlay .mmw-showdone{font-size:10px;}
#mmwOverlay .mmw-next{font-size:11px;}
#mmwOverlay .mmw-next span.mmw-1l{font-size:9px;}
#mmwOverlay .mmw-next .mmw-next-k{font-size:9px;}
#mmwOverlay .mmw-next .mmw-next-st{font-size:10px;}
#mmwOverlay .mmw-next .mmw-next-big{font-size:17px;}
#mmwOverlay .mmw-next .mmw-next-opp{font-size:12px;}
#mmwOverlay .mmw-next small.mmw-next-info{font-size:9px;}
#mmwOverlay .mmw-line{font-size:10px;}
#mmwOverlay .mmw-day{font-size:9px;}
#mmwOverlay .mmw-sw{font-size:7.5px;}
#mmwOverlay .mmw-row{font-size:10px;}
#mmwOverlay .mmw-row .n{font-size:9px;}
#mmwOverlay .mmw-row .s{font-size:9.5px;}
#mmwOverlay .mmw-row .o small.mmw-where{font-size:9px;}
#mmwOverlay .mmw-row .o small.mmw-clash{font-size:9px;}
#mmwOverlay small.mmw-info{font-size:9px;}
#mmwOverlay .mmw-wa{font-size:9.5px;}
#mmwOverlay .mmw-foot button{font-size:10px;}

/* v264 — a pair (Mix / doubles) in a knockout box: one player per line, inside the same 32px row */
.bmatch .pname.pname2{display:flex;align-items:center;white-space:normal;}
.bmatch .pname2 .pn2{display:flex;flex-direction:column;min-width:0;line-height:1.15;}
.bmatch .pname2 .pn2 > span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.bmatch .pname2 .seedtag{flex:none;}

/* v267 — the phone layout tidied (by request: "cep telefonunda her şey iç içe görünüyor, sadeleştir").
   Desktop is untouched; everything below is ≤640px only. */
@media (max-width:640px){
  /* header card: title + "Tournament Manager / by …" on one row, ⚙ / role / Switch User on a slim second */
  header.top{padding:10px 12px;gap:6px 10px;align-items:center;margin-bottom:4px;}
  header.top .brand > div{display:flex;align-items:center;flex-wrap:nowrap;}
  .brand h1{font-size:19px;padding:2px 2px;}
  header.top .ttg-version-badge{margin-left:3px;padding:1px 5px;}
  .header-right{display:contents;}
  .kicker-block{margin-left:auto;flex:none;}
  .kicker-block .num{font-size:8px;letter-spacing:.6px;}
  .signature{font-size:13px;}
  .session-bar{flex:1 1 100%;flex-wrap:nowrap;justify-content:flex-end;gap:6px;}
  .session-bar #goMerkezBtn{margin-right:auto;white-space:nowrap;}   /* v321 */
  .session-bar button{font-size:10px;padding:4px 8px;}

  /* Championship and Tournament: one full-width row each — 🏆 menu + championship list, then the
     tournament list + 📊 Championship Players as an icon. The "Tournament List" label goes: the list
     names itself. */
  .session-manager{gap:8px;padding:8px 10px;margin-top:8px;margin-bottom:10px;}
  .session-manager .selector-group{flex:1 1 100%;flex-direction:row;align-items:center;gap:6px;align-self:auto;}
  .session-manager .selector-head{display:contents;}
  .session-manager .selector-head > label{display:none;}
  .session-manager .selector-group select{flex:1 1 auto;min-width:0;width:auto;max-width:none;font-size:15px;padding:9px 8px;}
  #sessionSelect{order:-1;}
  #championshipMenuBtn, #champSummaryBarBtn{flex:none;font-size:0;line-height:1;padding:9px 10px;border-radius:6px;}
  #championshipMenuBtn::before{content:"🏆 ▾";font-size:15px;}
  #champSummaryBarBtn::before{content:"📊";font-size:15px;}
  /* Basit Arena (and, for an admin, Player List / Arena / Tournament ▾) share the row under the lists */
  .session-manager > a, .session-manager > button{flex:1 1 0;min-width:0;text-align:center;white-space:nowrap;}
  .session-manager #playerModuleBtn, .session-manager #sessionAdminActions,
  body:not(.admin-mode) .session-manager #simpleArenaLink{margin-left:0;}

  /* Maçlarımı Göster stays the one big button; Rankings / SWISS become quiet outlined links under it */
  .mmw-bar{gap:6px;margin-bottom:10px;}
  .mmw-bar #mmwOpenBtn{font-size:15px;padding:11px 8px;}
  .mmw-bar .mmw-open-btn.swiss-go-btn, .mmw-bar .mmw-open-btn.rankings-go-btn{
    font-size:12px;padding:6px 8px;background:transparent;color:var(--gold);border-width:1.5px;box-shadow:none;margin-left:0;}

  /* the tabs: one row, swiped sideways, instead of three wrapped rows */
  nav.tabs{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;gap:3px;margin-top:12px;}
  nav.tabs::-webkit-scrollbar{display:none;}
  nav.tabs button{flex:none;white-space:nowrap;font-size:11.5px;padding:9px 11px;}
}

/* v270 — Maçlarımı Göster: the button row right under the title (was at the bottom) */
#mmwOverlay .mmw-head{order:0;}
#mmwOverlay .mmw-foot{order:1;margin:0 0 8px;padding-bottom:8px;border-bottom:1px solid var(--line);}
#mmwOverlay .mmw-foot:empty{display:none;}
#mmwOverlay .mmw-body{order:2;}

/* v271 — A+ text size zooms <body>, and a zoomed 100vh is taller than the screen: these windows divide by
   the zoom (--mtp-zoom, set by mtpApplyTextScale) so they always fit, top included. */
#mmwOverlay .mmw-box, #cpOverlay .mmw-box{max-height:calc((100vh - 20px) / var(--mtp-zoom, 1));max-height:calc((100dvh - 20px) / var(--mtp-zoom, 1));}
#openMsgOverlay .openmsg-card{max-height:calc((100vh - 32px) / var(--mtp-zoom, 1));max-height:calc((100dvh - 32px) / var(--mtp-zoom, 1));}
#bmPopup{max-height:calc((100vh - 16px) / var(--mtp-zoom, 1));max-width:calc((100vw - 16px) / var(--mtp-zoom, 1));}

/* v274 — Maçlarımı Göster: every text in the Programım + tournament cards bold and black (was grey / light) */
#mmwOverlay .mmw-card, #mmwOverlay .mmw-card *{color:#000;font-weight:700;}
#mmwOverlay .mmw-card .mmw-day{font-weight:800;}
/* v282 — the same texts 2px bigger (by request: "iki punto büyüsün") */
#mmwOverlay .mmw-card .mmw-t{font-size:11px;}
#mmwOverlay .mmw-card .mmw-line{font-size:12px;}
#mmwOverlay .mmw-card .mmw-day{font-size:11px;}
#mmwOverlay .mmw-card .mmw-row{font-size:12px;}
#mmwOverlay .mmw-card .mmw-row .n{font-size:11px;min-width:52px;}
#mmwOverlay .mmw-card .mmw-row .s{font-size:11.5px;}
#mmwOverlay .mmw-card .mmw-row .o small.mmw-where{font-size:11px;}
#mmwOverlay .mmw-card .mmw-row .o small.mmw-clash{font-size:11px;}
#mmwOverlay .mmw-card small.mmw-info{font-size:11px;}
/* v283 — the player's name 20% bigger; the Programım rows not bold (by request) */
#mmwOverlay .mmw-player{font-size:16.2px;}
#mmwOverlay .mmw-card.mmw-prog .mmw-row, #mmwOverlay .mmw-card.mmw-prog .mmw-row *{font-weight:400;}
#mmwOverlay .mmw-card.mmw-prog .mmw-row .mmw-wa, #mmwOverlay .mmw-card.mmw-prog .mmw-row .mmw-wa *{font-weight:700;}
/* v285 — the tournament cards not bold either (by request); title, day chips, WhatsApp buttons unchanged */
#mmwOverlay .mmw-card .mmw-row, #mmwOverlay .mmw-card .mmw-row *, #mmwOverlay .mmw-card .mmw-line, #mmwOverlay .mmw-card .mmw-line *{font-weight:400;}
#mmwOverlay .mmw-card .mmw-row .mmw-wa, #mmwOverlay .mmw-card .mmw-row .mmw-wa *, #mmwOverlay .mmw-card .mmw-line .mmw-wa, #mmwOverlay .mmw-card .mmw-line .mmw-wa *{font-weight:700;}
#mmwOverlay .mmw-card .mmw-line .mmw-day, #mmwOverlay .mmw-card .mmw-row .mmw-day{font-weight:800;}
#mmwOverlay .mmw-card.mmw-done{opacity:1;}
#mmwOverlay .mmw-card .mmw-row .s.w{color:#1e8e5a;}
#mmwOverlay .mmw-card .mmw-row .s.l, #mmwOverlay .mmw-card small.mmw-clash, #mmwOverlay .mmw-card .mmw-row.clash .n{color:#c0392b;}
#mmwOverlay .mmw-card .mmw-sw, #mmwOverlay .mmw-card .mmw-wa, #mmwOverlay .mmw-card .mmw-wa *{color:#fff;}
#mmwOverlay .mmw-card .mmw-wa.wa-nophone, #mmwOverlay .mmw-card .mmw-wa.wa-nophone *{color:#1fa855;}

/* v294 — player photos: small round picture on the cards, big one (≈10 cm) on a click */
.pp-thumb{width:26px;height:26px;border-radius:50%;object-fit:cover;vertical-align:middle;margin:-3px 7px -3px 0;cursor:zoom-in;background:#eef1f5;border:1px solid var(--line);}
.pp-thumb:hover{border-color:var(--gold);}
.pp-with{display:inline-flex;align-items:center;gap:7px;}
.pp-with .pp-thumb{flex:none;margin:0;}
.pp-thumb.mh-ph{width:52px;height:52px;margin:-6px 10px -6px 0;}
#mmwOverlay .pp-thumb.mmw-ph{width:48px;height:48px;float:left;margin:0 10px 4px 0;}
#mmwOverlay .mmw-player::after{content:'';display:block;clear:both;}
.pm-photo{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:-4px 0 10px;}
.pm-photo .pp-thumb.pm-photo-img{width:64px;height:64px;margin:0;}
.pm-photo-ph{width:64px;height:64px;border-radius:50%;background:#eef1f5;border:1px dashed var(--line);display:inline-flex;align-items:center;justify-content:center;font-size:30px;color:#9aa5b1;}
.pm-photo button{margin:0;}
.pm-photo small{color:var(--ink-soft);font-size:11.5px;}
#ppLightbox{position:fixed;inset:0;z-index:100000;background:rgba(10,14,20,.8);display:none;align-items:center;justify-content:center;padding:16px;cursor:zoom-out;}
#ppLightbox figure{margin:0;text-align:center;}
#ppLightbox img{display:block;width:min(10cm,92vw,78vh);height:auto;aspect-ratio:1/1;object-fit:cover;border-radius:14px;background:#fff;box-shadow:0 12px 40px rgba(0,0,0,.45);}
#ppLightbox figcaption{color:#fff;font:600 15px var(--font-display);margin-top:10px;letter-spacing:.3px;}
#ppLightbox .pp-lb-x{position:absolute;top:12px;right:14px;width:38px;height:38px;border-radius:50%;border:0;background:rgba(255,255,255,.15);color:#fff;font-size:18px;cursor:pointer;}
#ppCropOverlay{position:fixed;inset:0;z-index:100001;background:rgba(10,14,20,.6);display:flex;align-items:center;justify-content:center;padding:16px;}
#ppCropOverlay .pp-crop-card{background:#fff;border-radius:14px;padding:14px 18px 16px;width:100%;max-width:330px;box-shadow:0 12px 40px rgba(0,0,0,.35);text-align:center;}
#ppCropOverlay h3{margin:0 0 4px;font:700 16px var(--font-display);}
#ppCropOverlay .pp-crop-hint{margin:0 0 10px;font-size:12px;color:var(--ink-soft);}
#ppCropOverlay canvas{width:280px;height:280px;max-width:100%;border-radius:10px;background:#eef1f5;touch-action:none;cursor:grab;}
#ppCropOverlay canvas.drag{cursor:grabbing;}
#ppCropOverlay .pp-crop-zoom{display:flex;align-items:center;gap:8px;margin:8px 0 0;font-size:14px;}
#ppCropOverlay .pp-crop-zoom input{flex:1;}
#ppCropOverlay .pp-crop-btns{display:flex;gap:8px;justify-content:flex-end;margin-top:12px;}
#ppCropOverlay .pp-crop-btns button{margin:0;}
/* v295 — Maçlarımı Göster: the opponents' photos in front of their names (a pair: two, overlapping) */
#mmwOverlay .pp-thumb.mmw-oph{float:left;width:30px;height:30px;margin:0 8px 0 0;border:2px solid #fff;box-shadow:0 0 0 1px var(--line);}
#mmwOverlay .pp-thumb.mmw-oph + .pp-thumb.mmw-oph{margin-left:-14px;}
#mmwOverlay .pp-thumb.mmw-oph-big{width:40px;height:40px;margin-right:10px;}
#mmwOverlay .pp-thumb.mmw-oph:hover{box-shadow:0 0 0 1px var(--gold);}
#mmwOverlay .mmw-next-opp{display:flow-root;}
/* v296 — Edit Player: the photo is on the player's other (same-name) record */
.pm-photo small.pm-photo-other{display:flex;align-items:center;gap:6px;flex-basis:100%;}
.pm-photo .pp-thumb.pm-photo-oimg{width:24px;height:24px;margin:0;flex:none;}
/* v298 — Edit Player: paste / drop a picture into the photo field */
.pm-photo small.pm-photo-hint{flex-basis:100%;}
.pm-photo.pp-drop{outline:2px dashed var(--gold);outline-offset:4px;border-radius:10px;background:var(--paper-alt);}
/* v299 — 📝 Oyuncu Kaydı */
body:not(.admin-mode) #regOpenBtn.reg-closed{display:none;}
#regOpenBtn .reg-badge{display:inline-block;min-width:20px;padding:1px 6px;margin-left:4px;border-radius:999px;background:#d93025;color:#fff;font-size:12px;line-height:18px;}
@media print{ #regOpenBtn{display:none !important;} }
#regOverlay{align-items:center;padding:10px;overflow:hidden;}
#regOverlay .mmw-box{box-sizing:border-box;display:flex;flex-direction:column;max-height:calc(100vh - 20px);max-height:calc(100dvh - 20px);min-width:0;max-width:520px;}
#regOverlay .mmw-body{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;margin:0 -4px;padding:0 4px;}
.reg-form label{display:block;font-size:12.5px;font-weight:700;color:var(--ink-soft);margin:0 0 9px;}
.reg-form .mmw-input{margin-top:3px;font-size:15px;padding:8px 10px;}
.reg-row2{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
@media (max-width:420px){ .reg-row2{grid-template-columns:1fr;gap:0;} }
.reg-gender{display:flex;gap:14px;margin-top:9px;}
.reg-gender label{display:flex;align-items:center;gap:5px;margin:0;font-size:14px;color:var(--ink);font-weight:600;cursor:pointer;}
.reg-photo{display:flex;align-items:center;gap:12px;margin:2px 0 10px;}
.reg-photo small{display:block;font-size:11.5px;color:var(--ink-soft);margin-top:4px;}
.reg-photo .pp-thumb.pm-photo-img{width:64px;height:64px;margin:0;cursor:default;}
.reg-photo button{margin:0;}
.reg-form label.reg-kvkk{display:flex;gap:8px;align-items:flex-start;font-weight:500;font-size:12px;line-height:1.4;color:var(--ink);background:var(--paper-alt);border:1px solid var(--line);border-radius:8px;padding:8px 10px;cursor:pointer;}
.reg-kvkk input{margin-top:2px;flex:none;}
.reg-err{min-height:18px;margin:4px 2px;color:#c0392b;font-weight:700;font-size:13px;}
.reg-btns{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-top:6px;}
.reg-btns button{margin:0;}
.reg-msg{font-weight:700;font-size:15px;margin:6px 2px 10px;}
.reg-msg.ok{color:#167A3E;}
.reg-step{font-size:14px;margin:0 2px 10px;}
.reg-code{text-align:center;margin:6px 0 12px;}
.reg-code small{display:block;font-size:12px;color:var(--ink-soft);}
.reg-code b{display:inline-block;font:800 40px/1.1 'IBM Plex Mono',monospace;letter-spacing:8px;padding:6px 14px 6px 22px;border:2px dashed var(--gold);border-radius:12px;margin-top:4px;}
.reg-wa{display:flex;align-items:center;justify-content:center;gap:8px;text-decoration:none;background:#25D366;color:#fff;font-weight:800;font-size:17px;padding:13px 16px;border-radius:12px;box-shadow:0 4px 12px rgba(0,0,0,.15);}
.reg-wa svg{width:22px;height:22px;}
.reg-set label.reg-chk{display:flex;gap:8px;align-items:flex-start;font-size:13px;margin:2px 0 8px;cursor:pointer;}
.reg-set label.reg-lbl{display:block;font-size:12.5px;font-weight:700;color:var(--ink-soft);}
.reg-set .mmw-input{margin-top:3px;font-size:15px;padding:8px 10px;}
.reg-linkrow{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:10px;font-size:12px;}
.reg-linkrow code{font-size:11.5px;background:#fff;border:1px solid var(--line);border-radius:6px;padding:3px 6px;word-break:break-all;}
.reg-linkrow button{margin:0;padding:4px 10px;font-size:12px;}
.reg-h{margin-top:12px;}
.reg-item{display:flex;gap:10px;align-items:flex-start;border:1.5px solid var(--line);border-radius:10px;padding:9px 10px;margin-bottom:8px;background:var(--paper-alt);}
.reg-item.done{background:#fff;}
.reg-item .reg-th{width:48px;height:48px;margin:0;flex:none;font-size:22px;cursor:default;}
.reg-main{flex:1;min-width:0;}
.reg-main small{display:block;font-size:12px;color:var(--ink-soft);margin-top:2px;}
.reg-name{font-weight:800;font-size:14.5px;display:flex;flex-wrap:wrap;align-items:center;gap:6px;}
.reg-codechip{font:800 13px 'IBM Plex Mono',monospace;background:#fff4c2;border:1.5px solid var(--gold);border-radius:6px;padding:1px 7px;letter-spacing:1px;}
.reg-okchip{font-size:11.5px;font-weight:700;color:#167A3E;}
.reg-main small.reg-dup{color:#b45309;font-weight:700;}
.reg-acts{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px;}
.reg-acts button{margin:0;padding:5px 10px;font-size:12.5px;}
.reg-acts .reg-wa-btn{border-color:#25D366;color:#128C4A;}
.reg-acts .reg-wa-btn:not(.secondary){background:#25D366;color:#fff;}
.reg-acts .reg-pulse{animation:regPulse 1s ease-in-out 3;}
@keyframes regPulse{50%{box-shadow:0 0 0 5px rgba(37,211,102,.35);}}
/* v301 — Oyuncu Kaydı: the extra questions */
.reg-row2{align-items:end;}
.reg-row3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;align-items:end;}
@media (max-width:420px){ .reg-row3{grid-template-columns:1fr 1fr;gap:0 10px;} }
.reg-form textarea.mmw-input{resize:vertical;min-height:52px;font-family:inherit;}
.reg-main small.reg-x{color:var(--ink);}
/* v304 — 📑 Maç Listesi (championship-wide, PDF / Excel) */
#cmlOverlay{align-items:center;padding:10px;overflow:hidden;}
#cmlOverlay .mmw-box{box-sizing:border-box;display:flex;flex-direction:column;max-width:1100px;max-height:calc(100vh - 20px);max-height:calc(100dvh - 20px);min-width:0;}
#cmlOverlay .mmw-body{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;}
.cml-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:2px 0 8px;}
.cml-bar select,.cml-bar input{font-size:14px;padding:7px 9px;border:2px solid var(--line);border-radius:9px;background:var(--paper-alt);color:var(--ink);min-width:0;max-width:100%;}
.cml-bar input{flex:1 1 150px;}
.cml-btns{display:flex;gap:6px;margin-left:auto;}
.cml-btns button{margin:0;white-space:nowrap;}
.cml-sum{font-size:12.5px;color:var(--ink-soft);margin:0 2px 6px;font-weight:700;}
.cml-wrap{overflow-x:auto;}
table.cml{width:100%;border-collapse:collapse;font-size:13px;}
table.cml th{text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:.3px;color:var(--ink-soft);padding:5px 6px;border-bottom:2px solid var(--line);white-space:nowrap;}
table.cml td{padding:5px 6px;border-bottom:1px solid var(--line);vertical-align:top;}
table.cml tr.cml-tnrow td{background:var(--paper-alt);font-weight:800;font-size:13.5px;padding:7px 6px;border-bottom:2px solid var(--line);}
table.cml .sc{text-align:center;font-family:'IBM Plex Mono',monospace;font-weight:700;white-space:nowrap;}
table.cml td.nw{white-space:nowrap;}
table.cml td.p{min-width:130px;}
table.cml td.w{font-weight:800;color:#167A3E;}
@media print{ #cmlOverlay{display:none !important;} }
/* v305 — Oyuncu Kaydı: the openable «Turnuva bilgileri» section */
/* v306 — the header must read as «tap here to open» at first sight */
.reg-more{border:2px solid var(--gold);border-radius:12px;margin:4px 0 12px;background:var(--paper-alt);box-shadow:0 2px 8px rgba(91,79,224,.12);overflow:hidden;}
.reg-more>summary{cursor:pointer;list-style:none;padding:11px 12px;display:flex;align-items:center;gap:10px;user-select:none;background:rgba(91,79,224,.09);}
.reg-more>summary:hover{background:rgba(91,79,224,.15);}
.reg-more>summary::-webkit-details-marker{display:none;}
.reg-more>summary:focus-visible{outline:3px solid var(--gold);outline-offset:-3px;}
.reg-more-ic{font-size:22px;line-height:1;flex:none;}
.reg-more-tx{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px;}
.reg-more-tx b{font-size:15px;font-weight:800;color:var(--ink);}
.reg-more-tx small{font-size:12px;font-weight:600;color:var(--ink-soft);}
.reg-more-tg{flex:none;background:var(--gold);color:#fff;border-radius:999px;padding:6px 13px;font-weight:800;font-size:13px;white-space:nowrap;}
.reg-more:not([open]) .reg-more-tg{animation:regMorePulse 1.2s ease-in-out 2 .6s;}
@keyframes regMorePulse{50%{box-shadow:0 0 0 6px rgba(91,79,224,.28);}}
.reg-more .tg-c,.reg-more[open] .tg-o{display:none;}
.reg-more[open] .tg-c{display:inline;}
.reg-more[open]>summary{border-bottom:1px solid var(--line);}
.reg-more-body{padding:8px 12px 4px;}
.reg-more .mmw-input{background:var(--paper);}
/* v307 — 📸 camera window + the sign-up form's photo row */
.reg-photo{align-items:flex-start;border-radius:10px;}
.reg-photo.pp-drop{outline:2px dashed var(--gold);outline-offset:4px;}
.reg-photo-main{flex:1;min-width:0;}
.reg-photo-btns{display:flex;flex-wrap:wrap;gap:6px;}
.reg-photo-btns button{margin:0;padding:6px 10px;font-size:13px;}
#ppCamOverlay{z-index:100000;align-items:center;padding:10px;}
#ppCamOverlay .mmw-box{max-width:480px;}
.pp-cam-view{position:relative;background:#000;border-radius:12px;overflow:hidden;aspect-ratio:1/1;max-height:62vh;margin:0 auto;}
.pp-cam-view video{width:100%;height:100%;object-fit:cover;display:block;}
.pp-cam-view video.mirror{transform:scaleX(-1);}
.pp-cam-ring{position:absolute;inset:13%;border:3px dashed rgba(255,255,255,.75);border-radius:50%;pointer-events:none;}
.pp-cam-msg{font-size:13px;margin:8px 2px;min-height:18px;}
@media print{ #ppCamOverlay{display:none !important;} }
/* v280 — Maçlarımı Göster: «💬 PDF gönder» in WhatsApp green */
#mmwOverlay .mmw-foot .mmw-send-btn{border-color:#1fa855;color:#137a3b;}

/* v318 — the open tournament could not be read: its tabs are hidden, a notice takes their place */
body.mtp-unloaded nav.tabs, body.mtp-unloaded nav.tabs ~ section.panel{display:none !important;}
.mtp-unreadable{margin:14px 0;padding:16px 18px;border:2px solid #B3261E;border-radius:10px;background:#FDECEA;color:#5F1410;font-size:15px;line-height:1.5;}
.mtp-unreadable b{font-size:17px;}
.mtp-unreadable p{margin:6px 0 12px;max-width:70ch;}
.mtp-unreadable-btns{display:flex;flex-wrap:wrap;gap:8px;}
.mtp-unreadable-btns button{padding:9px 14px;border-radius:8px;border:1px solid #B3261E;background:#fff;color:#5F1410;font:inherit;font-weight:600;cursor:pointer;}
.mtp-unreadable-btns button[data-a=retry]{background:#B3261E;color:#fff;}
.mtp-unreadable-btns button:disabled{opacity:.6;cursor:default;}

/* v319 — «daha göster» row under the first 300 players of the Rankings */
#panel-rankings table tr.pool-more-row td{text-align:left;padding:12px 14px;background:var(--paper,#faf7ef);}
#panel-rankings table tr.pool-more-row .pool-more-info{margin-right:12px;font-size:12px;opacity:.8;}
#panel-rankings table tr.pool-more-row button{margin:0 4px;}
