@media print {
  @page { size: A4; margin: 12mm; }

  /* pryč web UI */
  .topbar, .nav, .menu, .footer, .partners, .socialbar,
  .cta, #data-status,
  button, select, input,
  .filters, .day-switch, .livebar,
  .matchlinks,
  .btn, .themebtn, .menubtn {
    display: none !important;
  }

  /* netisknout URL za odkazy */
  a[href^="http"]::after { content: "" !important; }

  /* reset */
  * {
    box-shadow: none !important;
    text-shadow: none !important;
    animation: none !important;
    transition: none !important;
    filter: none !important;
  }
  html, body { background: #fff !important; color: #000 !important; }
  .wrap { max-width:none !important; width:100% !important; margin:0 !important; padding:0 !important; }

  /* tisk nemá rád radius */
  .card, .tablewrap, table, thead, tbody, tr, th, td, .pill, .badge {
    border-radius: 0 !important;
  }
  .card, .tablewrap { overflow: visible !important; }

  /* pagehead: nechat jen H1 */
  .pagehead .lead,
  .pagehead .cta,
  .pagehead .mini,
  .pagehead p,
  .pagehead hr {
    display: none !important;
  }
  .pagehead { margin: 0 0 8mm 0 !important; padding: 0 !important; }
  .pagehead .h1 { margin: 0 !important; font-size: 18pt !important; }

  /* nadpisy dnů přepsat přes data-print-title */
  section.card > .h2 {
    visibility: hidden !important;
    position: relative !important;
    margin: 0 0 6pt 0 !important;
  }
  section.card > .h2::after {
    visibility: visible !important;
    position: absolute !important;
    left: 0;
    top: 0;
    content: attr(data-print-title) !important;
    font-size: 12pt !important;
    font-weight: 700 !important;
  }

  /* tabulky */
  .schedule{
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: fixed !important; /* respektuj colgroup */
  }
  .schedule th, .schedule td{
    border: 1px solid #000 !important;
    padding: 5pt 6pt !important;
    font-size: 9.5pt !important;
    vertical-align: middle !important;
    background: transparent !important;
    color: #000 !important;
  }
  thead { display: table-header-group; }
  tr, td, th { page-break-inside: avoid; }

  /* ZABÍT pseudo-badge LIVE + DALŠÍ (jsou přes ::after) */
  table.schedule:not(.results) tr.is-live td:first-child::after,
  table.schedule:not(.results) tr.is-next td:first-child::after{
    content: "" !important;
    display: none !important;
  }

  /* sloupec ODKAZY pryč */
  col.col-links { width: 0 !important; }
  th.col-links, td.col-links { display: none !important; }

  /* SKÓRE jen v tisku */
  col.col-score { width: 44mm !important; } /* víc místa na psaní */
  th.col-score, td.col-score { display: table-cell !important; }

  td.col-score{
    position: relative;
    height: 18pt;
    font-weight: 700;
    text-align: center;
    font-size: 11pt;
  }
  td.col-score::after{
    content:"";
    position:absolute;
    left: 6pt;
    right: 6pt;
    bottom: 6pt;
    border-bottom: 1px solid #000;
  }

  /* ZÁKLAD šířek (všechny tabulky) */
  col.col-time { width: 8mm !important; min-width: 0 !important; }  /* ještě menší čas */
  col.col-hall { width: 18mm !important; }
  col.col-group{ width: 22mm !important; }  /* skupina A/B */
  col.col-match{ width: auto !important; }  /* zbytek padne zápasu */

  /* Zápas: čitelnost */
  .schedule td:nth-child(3){
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    font-weight: 600 !important;
  }

  /* PLAY-OFF: FÁZE je 3. sloupec → zmenšit a dovolit zalomení */
  #tbl-rozpis-nedele col.col-group { width: 14mm !important; } /* Fáze užší */
  #tbl-rozpis-nedele th:nth-child(3),
  #tbl-rozpis-nedele td:nth-child(3){
    font-size: 8.5pt !important;
    font-weight: 650 !important;
    text-align: center !important;
    white-space: normal !important; /* Semifinále se může zalomit */
    line-height: 1.1 !important;
  }

  /* PLAY-OFF: ZÁPAS je 4. sloupec → přepnout zalomení a dát prioritu */
  #tbl-rozpis-nedele th:nth-child(4),
  #tbl-rozpis-nedele td:nth-child(4){
    white-space: normal !important;
    font-weight: 650 !important;
  }

  /* Hala pill ať je "jen text", ale nezmizí */
  .pill{
    border: 1px solid #000 !important;
    background: transparent !important;
    padding: 1pt 4pt !important;
    font-size: 9pt !important;
    font-weight: 700 !important;
  }

    /* ČAS – opravdu minimální šířka */
  col.col-time {
    width: 8mm !important;
  }

  th.col-time,
  td.col-time,
  .schedule th:first-child,
  .schedule td:first-child {
    width: 8mm !important;
    min-width: 0 !important;
    padding-left: 4pt !important;
    padding-right: 4pt !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

    /* zrušit “nafukování” času z LIVE/NEXT */
  table.schedule:not(.results) tr.is-live td:first-child,
  table.schedule:not(.results) tr.is-next td:first-child{
    padding-left: 4pt !important;
  }

  /* čas: přetlačit 120px / min-width 110px */
  .schedule th:first-child,
  .schedule td:first-child{
    width: 12mm !important;
    min-width: 0 !important;
    padding-left: 4pt !important;
    padding-right: 4pt !important;
    white-space: nowrap !important;
    text-align: center !important;
  }

  /* čas: přetlačit 130px !important na col:first-child */
  #tbl-rozpis-patek col:first-child,
  #tbl-rozpis-sobota col:first-child,
  #tbl-rozpis-nedele col:first-child{
    width: 12mm !important;
  }

  /* když máš col-time třídu, tak ještě pojistka */
  col.col-time{ width: 12mm !important; }

}

@media print {

  /* 1) ČAS: malinko širší, ať Chrome nekrátí na "09…" */
  col.col-time { width: 14mm !important; }

  .schedule th:first-child,
  .schedule td:first-child{
    width: 14mm !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  /* 2) PLAY-OFF: ZÁPAS (4. sloupec) nesmí být mikro */
  #tbl-rozpis-nedele col.col-match{
    width: auto !important;
  }

  #tbl-rozpis-nedele th:nth-child(4),
  #tbl-rozpis-nedele td:nth-child(4){
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    white-space: normal !important;
  }

  /* 3) PLAY-OFF: FÁZE (3. sloupec) drž úzké, ale ne na úkor zápasu */
  #tbl-rozpis-nedele col.col-group{ width: 16mm !important; }
}

@media print {
  #tbl-rozpis-nedele td:nth-child(4){
    word-break: keep-all !important;
  }
}

@media print {

  /* PLAY-OFF pavouk: v tisku musí být jasné rámečky a žádná opacity */
  #playoff-section{
    page-break-inside: avoid;
  }

  .playoff-grid{
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    grid-template-rows: repeat(4, auto) !important;
    column-gap: 10mm !important;
    row-gap: 6mm !important;
    align-items: center !important;
  }

  .round{
    gap: 6mm !important;
  }

  .round h3{
    color: #000 !important;
    font-size: 10pt !important;
    letter-spacing: .12em !important;
    margin: 0 0 4mm 0 !important;
  }

  .game{
    border: 1px solid #000 !important;
    background: transparent !important;
    color: #000 !important;
    opacity: 1 !important;
    padding: 4mm 5mm !important;
    min-height: 0 !important;
    border-radius: 0 !important; /* v tisku čisté */
  }

  .game-upcoming,
  .game-played{
    opacity: 1 !important; /* zabít zesvětlování */
  }

  .game .teamname{
    font-size: 10.5pt !important;
    font-weight: 700 !important;
  }

  .game .score{
    font-size: 10pt !important;
    font-weight: 700 !important;
    min-width: 0 !important;
  }

  /* winner: v tisku žádné šedé pill pozadí, jen podtržení */
  .game .winner{
    color: #000 !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    text-decoration: underline !important;
    text-underline-offset: 2pt !important;
  }

    /* DALŠÍ/LIVE řádky v tisku nesmí mít žádné zvýraznění času ani levý okraj */
  table.schedule tr.is-next td:first-child,
  table.schedule tr.is-live td:first-child {
    font-weight: 400 !important;
    border-left: 1px solid #000 !important;
    padding-left: 4pt !important; /* stejné jako ostatní */
  }

  /* pokud se tučný čas dělá přes span uvnitř buňky */
  table.schedule tr.is-next td:first-child *,
  table.schedule tr.is-live td:first-child * {
    font-weight: 400 !important;
  }
}
