.eb-grid{display:block;width:100%;min-width:0;max-width:100%;overflow:auto;max-height:min(68vh,780px);margin-top:18px;padding-bottom:10px;scrollbar-color:var(--tour-green) var(--tour-ground);overscroll-behavior-inline:contain;touch-action:pan-x pan-y}
.eb-branch-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.eb-branch-head>h3{font-size:15px;margin:0}.eb-draw-actions{display:flex;gap:8px}.eb-draw-actions button{border:1px solid var(--tour-line);border-radius:999px;background:var(--tour-white);color:var(--tour-ink);padding:7px 12px;font:inherit;font-size:12px;font-weight:650;cursor:pointer}.eb-draw-actions button:disabled{opacity:.48;cursor:default}.eb-draw-actions button:focus-visible{outline:2px solid var(--tour-green);outline-offset:2px}
.eb-canvas{position:relative;isolation:isolate;min-width:max-content}
.eb-connectors{position:absolute;inset:0;pointer-events:none;fill:none;stroke:var(--tour-muted);stroke-width:1}
.eb-advance-trace{stroke:var(--tour-green);stroke-width:3;stroke-dasharray:1;stroke-linecap:round;opacity:0}
.eb-branch{margin-top:24px}.eb-branch>h3{font-size:15px;margin:0 0 8px}.eb-round-title{width:240px;margin:0;font-size:13px;font-weight:600;color:var(--tour-muted)}
.eb-match{box-sizing:border-box;width:256px;height:180px;border:1px solid var(--tour-line);border-radius:18px;padding:10px 12px;margin:0;background:var(--tour-white);overflow-wrap:anywhere;box-shadow:0 8px 22px rgba(25,54,51,.08)}.eb-route-match{border-color:var(--tour-green);box-shadow:0 0 0 2px color-mix(in srgb,var(--tour-green) 18%,transparent),0 8px 22px rgba(25,54,51,.08)}.eb-own-match{border-color:var(--tour-green);box-shadow:0 0 0 2px color-mix(in srgb,var(--tour-green) 24%,transparent),0 8px 22px rgba(25,54,51,.08)}.eb-own-label{flex:none;border-radius:999px;background:color-mix(in srgb,var(--tour-green) 12%,white);color:var(--tour-green);padding:3px 7px;font-size:11px;font-weight:750}.eb-jump-highlight{animation:eb-jump-highlight .9s ease-out both}.eb-route-edge{stroke:var(--tour-green);stroke-width:2.5}
@keyframes eb-jump-highlight{0%,100%{outline:0 solid transparent}18%,58%{outline:4px solid color-mix(in srgb,var(--tour-green) 42%,transparent);outline-offset:2px}}
.eb-match a{display:block;text-decoration:none;line-height:1.35}.eb-match a:hover{text-decoration:underline}.eb-match .eb-side{display:flex;align-items:center;gap:8px;min-height:50px;border-bottom:1px solid var(--tour-soft-line)}.eb-winner{font-weight:700;color:var(--tour-green)}
.eb-name{flex:1;min-width:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:13px}.eb-set-score{flex-shrink:0;font-size:13px;font-variant-numeric:tabular-nums}.eb-match .eb-result{font-size:11px;font-weight:400;line-height:1.35;margin-top:8px}.eb-match .eb-live{font-weight:600;color:var(--tour-green)}
.draw-identity{display:inline-flex;align-items:center;gap:8px;min-width:0;max-width:100%;vertical-align:middle}.draw-player-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.draw-portrait-wrap{position:relative;display:inline-flex;flex:0 0 34px;width:34px;height:34px}.draw-portrait{display:block;width:34px;height:34px;border-radius:50%;object-fit:cover;background:#dcefeb}.draw-initials{display:grid;place-items:center;color:#146d63;font-size:11px;font-weight:750;letter-spacing:.02em}.draw-rank{position:absolute;right:0;bottom:0;width:19px;height:19px;display:grid;place-items:center}.draw-rank img{position:absolute;inset:0;width:100%;height:100%}.draw-rank span{position:relative;font-size:8px;font-weight:800;color:#193633}.eb-name .draw-identity{width:100%}.eb-name .draw-player-name{white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.eb-hint{font-size:12px;color:var(--tour-muted)}.eb-print-table,.sheet-print-header{display:none}
.sheet-toolbar{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:16px;margin:16px 0}.sheet-toolbar p{margin:0;color:var(--tour-muted);font-size:13px}
.format-template-picker{padding-bottom:20px;margin-bottom:20px;border-bottom:1px solid var(--tour-line)}
.eb-meta,.eb-match small{color:var(--tour-muted);font-size:12px}.eb-meta{display:flex;align-items:center;justify-content:space-between;gap:6px;line-height:1.25}.eb-status{flex:none;padding:3px 7px;border-radius:999px;background:var(--tour-ground);font-size:12px;font-weight:650;white-space:nowrap}.eb-result{font-weight:650;font-variant-numeric:tabular-nums;margin-top:8px}
.eb-dialog{width:min(860px,calc(100vw - 24px));max-width:860px}.eb-slots{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:18px 0}.eb-slots label[hidden]{display:none}.eb-preview{border-top:1px solid var(--tour-line);margin-top:20px;padding-top:20px}.eb-preview ul{padding-left:22px}.eb-preview .check{display:flex;align-items:flex-start;gap:10px;margin:16px 0}.eb-preview input[type=checkbox]{width:18px;min-height:18px;flex-shrink:0}.eb-history summary{cursor:pointer}.eb-history section{margin-top:18px;border-top:1px solid var(--tour-line);padding-top:12px}.eb-form [role=alert]:empty{display:none}.eb-form [role=alert]{color:#8c2f23}.eb-grid:focus-visible,.eb-match a:focus-visible{outline:2px solid var(--tour-green);outline-offset:2px}
@media(max-width:600px){.eb-slots{grid-template-columns:1fr}.eb-round{flex-basis:220px}.eb-dialog{padding:16px}.eb-form button{min-height:44px}}
@media(max-width:600px){.eb-branch-head{align-items:flex-start;flex-direction:column}.eb-draw-actions button{min-height:40px}}
@media(prefers-reduced-motion:reduce){.eb-jump-highlight{animation:none;outline:3px solid color-mix(in srgb,var(--tour-green) 42%,transparent);outline-offset:2px}}
@media print {
  @page {size:A4 landscape;margin:12mm}
  body{background:white!important;color:black!important}
  body:has(.tournament-sheet) .tour-ribbon,body:has(.tournament-sheet) .tour-main>:not(.tournament-sheet){display:none!important}
  .tour-main{max-width:none!important;width:auto!important;margin:0!important;padding:0!important}
  .sheet-toolbar,.eb-controls,.eb-history,.eb-hint,.eb-branch,.gm-scroll-hint,.gm-resolve{display:none!important}
  .sheet-print-header{display:block;margin-bottom:16px}.sheet-print-header h1{font-size:20px}.sheet-print-header p{font-size:12px}
  .tournament-sheet .panel{padding:0;border:0;box-shadow:none;margin:14px 0}
  .eb-print-table{display:table;width:100%;border-collapse:collapse;font-size:10px}
  .eb-print-table th,.eb-print-table td{border:1px solid #999;padding:5px;text-align:left;overflow-wrap:anywhere}
  .eb-print-table th{background:#eee}.eb-print-table tr{break-inside:avoid}
  .gm-scroll,.table-scroll{overflow:visible;max-width:none;border:0}
  .gm-table{width:100%;min-width:0;font-size:10px}.gm-table th,.gm-table td{min-width:0;padding:5px;border-color:#999}
  .gm-table .gm-player,.gm-table .gm-corner{position:static;width:145px;min-width:0;max-width:none;background:white}
  .gm-table thead th{position:static;background:#eee}.gm-cell{white-space:normal;color:black;text-decoration:none}
  .gm-section{break-inside:avoid}.gm-note{max-width:none;font-size:10px}.gm-diagonal{background:#eee!important}
  .eb-section{break-before:auto}thead{display:table-header-group}a{color:black}
}

.table-print-pages{display:none}
@media print {
  @page table-a5-portrait{size:A5 portrait;margin:0}
  @page table-a5-landscape{size:A5 landscape;margin:0}
  @page table-a4-portrait{size:A4 portrait;margin:0}
  @page table-a4-landscape{size:A4 landscape;margin:0}
  @page table-a3-portrait{size:A3 portrait;margin:0}
  @page table-a3-landscape{size:A3 landscape;margin:0}
  body:has(>.table-print-pages)>:not(.table-print-pages){display:none!important}
  body:has(>.table-print-pages){padding:0!important;margin:0!important}
  .table-print-pages{display:block}
  .table-print-pages svg{display:block;break-inside:avoid}
  .table-print-pages svg+svg{break-before:page}
}
