/* Tournament generator (page tournament). Builds on wheel.css (fields, switches, segmented radios, steppers, chips,
   sticky bar, buttons, sheets) and its --lh-* tokens (dark mode included). Logical properties only: the bracket,
   tables and match rows mirror under dir="rtl". Print: A4 landscape, the board only. */

.lh-tn { --tn-col: 200px; --tn-gap: 40px; --tn-off: 5px; --tn-line: var(--lh-border-strong); } /* --tn-off: half of (top - bottom) slot padding */
.lh-tn .lh-tl-card { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 16px; background: var(--lh-surface); border: 1px solid var(--lh-border); border-radius: 16px; box-shadow: var(--lh-shadow-sm); min-width: 0; }

/* ───────── Setup ───────── */
.lh-tn-setup { margin: 0; }
.lh-tn-setup__s {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 6px 14px;
  border: 1px solid var(--lh-border); border-radius: 16px; background: var(--lh-surface); box-shadow: var(--lh-shadow-sm);
  cursor: pointer; list-style: none; font-weight: 750;
}
.lh-tn-setup__s::-webkit-details-marker { display: none; }
.lh-tn-setup__s::after { content: ""; flex: none; width: 9px; height: 9px; margin-inline-end: 4px; border-inline-end: 2px solid currentColor; border-block-end: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; opacity: .7; }
.lh-tn-setup[open] > .lh-tn-setup__s::after { transform: rotate(-135deg); }
.lh-tn-setup[open] > .lh-tn-setup__s { margin-block-end: 12px; }
.lh-tn-setup__t { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.lh-tn-setup__t .lh-ic { color: var(--lh-brand); }
.lh-tn-count { margin-inline-start: auto; color: var(--lh-brand-soft-ink); background: var(--lh-brand-soft); border-radius: 999px; padding: 4px 10px; font-size: .8125rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lh-tn-count.is-bad { color: var(--lh-danger); background: color-mix(in srgb, var(--lh-danger) 12%, transparent); }

.lh-tn-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 0; }
@media (min-width: 900px) { .lh-tn-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 20px; } }
.lh-tn-field { display: flex; flex-direction: column; gap: 6px; }
.lh-tn-l { margin: 0; font-weight: 750; font-size: .9375rem; }
.lh-tn-names { min-height: 200px; font-size: 1rem; }
.lh-tn-fmts .lh-segr__o span { min-height: 44px; }
.lh-tn .lh-segr__o span { min-height: 44px; }

.lh-tn-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 0 20px; }
.lh-tn-opts > * { grid-column: 1 / -1; }
.lh-tn-opts > .lh-tn-opt:not(.lh-tn-opt--full) { grid-column: auto; }
.lh-tn-grid[data-fmt="ko"] [data-for]:not([data-for~="ko"]),
.lh-tn-grid[data-fmt="rr"] [data-for]:not([data-for~="rr"]),
.lh-tn-grid[data-fmt="groups"] [data-for]:not([data-for~="groups"]) { display: none !important; }
.lh-tn-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.lh-tn-opt--full { grid-column: 1 / -1; flex-direction: column; align-items: stretch; gap: 6px; padding-block: 4px; }
.lh-tn-opt--full .lh-set__l { margin: 0; }
.lh-tn .lh-set__l { font-weight: 650; }
.lh-tn .lh-set__row--sw { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; padding-block: 8px; }
.lh-tn .lh-set__help { grid-column: 1 / -1; margin: 0; color: var(--lh-muted); font-size: .8125rem; line-height: 1.45; }
.lh-tn .lh-step__b { width: 44px; height: 44px; }
.lh-tn .lh-step .lh-num { height: 44px; }
.lh-tn-seedhint { color: var(--lh-warning); font-weight: 650; }
.lh-tn-pts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; padding: 6px 0 4px; border: 0; min-width: 0; }
.lh-tn-pts > legend { float: inline-start; margin-inline-end: 4px; padding: 0; line-height: 44px; }
.lh-tn-pt { display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; color: var(--lh-muted); font-weight: 650; }
.lh-tn-pt .lh-field { inline-size: 58px; min-height: 44px; padding: 6px; text-align: center; font-weight: 750; color: var(--lh-text); -moz-appearance: textfield; }
.lh-tn-plan { display: flex; align-items: flex-start; gap: 8px; margin: 2px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--lh-brand-soft); color: var(--lh-brand-soft-ink); font-weight: 650; font-size: .875rem; line-height: 1.45; }
.lh-tn-plan .lh-ic { width: 18px; height: 18px; margin-block-start: 1px; }

.lh-tn .lh-bar { margin-inline: auto; }
.lh-tn-stale { max-width: 680px; margin: 10px auto 0; text-align: center; }
@media (max-width: 767.98px) {
  .lh-tn .lh-bar.is-static { position: static; padding: 0; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.lh-tn-privacy { display: flex; align-items: flex-start; gap: 8px; margin-block-start: 16px; padding-inline: 4px; }
.lh-tn-privacy .lh-ic { flex: none; width: 18px; height: 18px; margin-block-start: 1px; }

/* ───────── Board ───────── */
.lh-tn-board { margin-block-start: 22px; scroll-margin-block-start: 72px; min-width: 0; }
.lh-tn-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 16px; border: 2px dashed var(--lh-border); border-radius: 18px; color: var(--lh-muted); text-align: center; }
.lh-tn-empty p { margin: 0; max-width: 40ch; }
.lh-tn-empty__ic { width: 40px; height: 40px; color: var(--lh-accent); }
.lh-tn-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; margin-block-end: 14px; }
.lh-tn-head__t { min-width: 0; flex: 1 1 260px; }
.lh-tn-title { margin: 0; font-size: clamp(1.25rem, 4.2vw, 1.625rem); line-height: 1.2; overflow-wrap: anywhere; outline: none; }
.lh-tn-meta { margin: 4px 0 0; color: var(--lh-muted); font-size: .875rem; font-variant-numeric: tabular-nums; }
.lh-tn-acts { display: flex; flex-wrap: wrap; gap: 2px; }
.lh-tn-act { min-height: 44px; }
@media (max-width: 639.98px) {
  .lh-tn-act__t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lh-tn-act { width: 44px; min-width: 44px; padding: 0; }
  .lh-tn-acts { inline-size: 100%; justify-content: space-between; padding: 2px; border-radius: 14px; background: var(--lh-surface-2); }
}

.lh-tn-champ {
  display: flex; align-items: center; gap: 14px; margin-block-end: 16px; padding: 14px 18px; border-radius: 20px; color: #FFFFFF;
  background: radial-gradient(130% 160% at 50% 0%, #7B61FF 0%, #5B3DF5 48%, #3B23B8 100%); box-shadow: 0 14px 34px rgba(59, 35, 184, .3);
}
.lh-tn-champ.is-pop { animation: lh-tn-pop .55s cubic-bezier(.2, .9, .3, 1.3); }
.lh-tn-champ__ic { display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 18px; background: #FFB800; color: #14151A; }
.lh-tn-champ__ic .lh-ic { width: 32px; height: 32px; }
.lh-tn-champ__t { min-width: 0; }
.lh-tn-champ__k { margin: 0; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
:lang(ar) .lh-tn-champ__k { letter-spacing: 0; font-size: .875rem; }
.lh-tn-champ__n { margin: 0; font-size: clamp(1.375rem, 5.4vw, 2rem); font-weight: 900; line-height: 1.15; overflow-wrap: anywhere; }
.lh-tn-champ__s { margin: 4px 0 0; font-size: .875rem; opacity: .92; }
@keyframes lh-tn-pop { from { transform: scale(.9); opacity: .2; } }

.lh-tn-h3 { margin: 0 0 10px; font-size: 1.0625rem; font-weight: 800; }
.lh-tn-note { margin: 8px 2px 0; color: var(--lh-muted); font-size: .8125rem; line-height: 1.45; }
.lh-tn-stage + .lh-tn-stage { margin-block-start: 26px; }

/* ───────── Bracket ───────── */
.lh-tn-rtabs { display: flex; gap: 8px; margin-block-end: 6px; padding-block: 4px 8px; overflow-x: auto; scrollbar-width: none; }
.lh-tn-rtabs::-webkit-scrollbar { display: none; }
.lh-tn-rtab { flex: none; white-space: nowrap; }
.lh-tn-br { display: flex; align-items: stretch; gap: var(--tn-gap); padding: 6px 4px 14px; overflow-x: auto; overscroll-behavior-x: contain; border-radius: 12px; }
.lh-tn-br:focus-visible { outline: 2px solid var(--lh-focus); outline-offset: 2px; }
.lh-tn-col { display: flex; flex-direction: column; flex: 0 0 var(--tn-col); min-width: 0; }
.lh-tn-col__h { margin: 0 0 4px; min-height: 20px; color: var(--lh-muted); font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:lang(ar) .lh-tn-col__h { letter-spacing: 0; font-size: .8125rem; }
.lh-tn-col__m { display: flex; flex-direction: column; flex: 1; margin: 0; padding: 0; list-style: none; }
.lh-tn-slot { position: relative; display: flex; align-items: center; flex: 1 1 0; padding-block: 22px 12px; } /* min-height: auto = never shorter than its card */
/* connectors: a line out of every match, a bracket into the next one (25 % → 75 % = the two feeders) */
.lh-tn-col:not(.is-final):not(.lh-tn-col--x) .lh-tn-slot::after {
  content: ""; position: absolute; inset-inline-end: calc(var(--tn-gap) / -2); inline-size: calc(var(--tn-gap) / 2);
  inset-block-start: calc(50% + var(--tn-off) - 1px); block-size: 2px; background: var(--tn-line);
}
.lh-tn-col:not(:first-child):not(.lh-tn-col--x) .lh-tn-slot::before {
  content: ""; position: absolute; inset-inline-start: calc(var(--tn-gap) / -2); inline-size: calc(var(--tn-gap) / 2);
  inset-block: calc(25% + var(--tn-off)) calc(25% - var(--tn-off)); border-inline-start: 2px solid var(--tn-line);
  background: linear-gradient(var(--tn-line), var(--tn-line)) center / 100% 2px no-repeat;
}
.lh-tn-col:not(.is-final):not(.lh-tn-col--x) .lh-tn-slot.is-done::after { background: var(--lh-brand); }

.lh-tn-m {
  position: relative; display: flex; flex-direction: column; inline-size: 100%; margin: 0; padding: 0;
  border: 1px solid var(--lh-border); border-radius: 12px; background: var(--lh-surface); box-shadow: var(--lh-shadow-sm);
  color: inherit; font: inherit; text-align: start; transition: border-color .12s, box-shadow .12s;
}
button.lh-tn-m:hover { border-color: var(--lh-brand); box-shadow: var(--lh-shadow-md); }
button.lh-tn-m:active { scale: .98; }
.lh-tn-m__no { position: absolute; inset-block-end: calc(100% + 3px); inset-inline-start: 6px; color: var(--lh-muted); font-size: .6875rem; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1; }
.lh-tn-m__r { display: flex; align-items: center; gap: 8px; min-height: 36px; padding-inline: 10px 8px; }
.lh-tn-m__r:first-of-type { border-start-start-radius: 11px; border-start-end-radius: 11px; }
.lh-tn-m__r:last-of-type { border-end-start-radius: 11px; border-end-end-radius: 11px; }
.lh-tn-m__r + .lh-tn-m__r { border-block-start: 1px solid var(--lh-border); }
.lh-tn-m__n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .9375rem; }
.lh-tn-m__s { display: inline-flex; align-items: center; justify-content: flex-end; gap: 2px; flex: none; min-width: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.lh-tn-m__tb { width: 15px; height: 15px; color: var(--lh-success); }
.lh-tn-m__sd { display: inline-grid; place-items: center; flex: none; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 7px; background: var(--lh-surface-2); color: var(--lh-muted); font-size: .6875rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.lh-tn-m__r.is-win { background: color-mix(in srgb, var(--lh-success) 13%, transparent); }
.lh-tn-m__r.is-win .lh-tn-m__n { font-weight: 800; }
.lh-tn-m__r.is-out { color: var(--lh-muted); }
.lh-tn-m__r.is-tbd .lh-tn-m__n { color: var(--lh-muted); font-style: italic; font-weight: 500; font-size: .8125rem; }
.lh-tn-m.is-bye { border-style: dashed; background: transparent; box-shadow: none; }
.lh-tn-m.is-wait { box-shadow: none; }
.lh-tn-m__bye .lh-tn-m__n { font-style: normal; text-transform: uppercase; letter-spacing: .05em; font-size: .6875rem; font-weight: 800; }

@media screen and (max-width: 767.98px) {
  .lh-tn-br { display: block; padding: 0; overflow: visible; }
  .lh-tn-col { display: none; }
  .lh-tn-col.is-cur { display: flex; }
  .lh-tn-col__h { display: none; }
  .lh-tn-slot { flex: none; min-height: 0; padding-block: 18px 2px; }
  .lh-tn-slot::before, .lh-tn-slot::after { display: none !important; }
  .lh-tn-m__r { min-height: 44px; }
}
@media print, (min-width: 768px) { .lh-tn-rtabs { display: none; } }

/* draw animation: names hidden behind a shimmer, then revealed one by one */
.lh-tn .is-veil { color: transparent !important; border-radius: 6px; background: linear-gradient(90deg, var(--lh-surface-2) 0%, var(--lh-border) 50%, var(--lh-surface-2) 100%) 0 0 / 200% 100%; animation: lh-tn-shim 1.1s linear infinite; }
.lh-tn bdi.is-veil, .lh-tn bdi.is-in { display: inline-block; max-inline-size: 100%; vertical-align: bottom; }
.lh-tn .is-in { animation: lh-tn-in .32s var(--lh-ease); }
@keyframes lh-tn-shim { to { background-position: -200% 0; } }
@keyframes lh-tn-in { from { opacity: 0; transform: translateY(5px) scale(.94); } }
.lh-tn-board.is-revealing [data-mid], .lh-tn-board.is-revealing [data-act] { pointer-events: none; }

/* ───────── Tables and matchdays ───────── */
.lh-tn-rr { display: grid; gap: 22px; }
@media (min-width: 1024px) { .lh-tn-rr { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; } }
.lh-tn-tw { overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid var(--lh-border); border-radius: 14px; background: var(--lh-surface); }
.lh-tn-tbl { inline-size: 100%; border-collapse: collapse; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.lh-tn-tbl th, .lh-tn-tbl td { padding: 9px 6px; border-block-end: 1px solid var(--lh-border); text-align: center; white-space: nowrap; }
.lh-tn-tbl tbody tr:last-child > * { border-block-end: 0; }
.lh-tn-tbl thead th { background: var(--lh-surface-2); color: var(--lh-muted); font-size: .75rem; font-weight: 800; }
.lh-tn-tbl abbr { text-decoration: none; cursor: help; }
.lh-tn-tbl .lh-tn-c-name { inline-size: 100%; max-inline-size: 0; overflow: hidden; text-overflow: ellipsis; text-align: start; font-weight: 650; }
.lh-tn-tbl .lh-tn-c-pos { inline-size: 2.2em; padding-inline-start: 10px; color: var(--lh-muted); font-weight: 700; }
.lh-tn-tbl .lh-tn-c-pts { padding-inline-end: 12px; font-weight: 850; }
.lh-tn-tbl tbody tr.is-q > .lh-tn-c-pos { color: var(--lh-success); background: linear-gradient(to right, var(--lh-success) 3px, transparent 3px); }
[dir="rtl"] .lh-tn-tbl tbody tr.is-q > .lh-tn-c-pos { background: linear-gradient(to left, var(--lh-success) 3px, transparent 3px); }
.lh-tn-grp:not(.is-complete) .lh-tn-tbl tbody tr.is-q > .lh-tn-c-pos { background-image: none; color: var(--lh-muted); }
.lh-tn-lot { margin-inline-start: 3px; color: var(--lh-warning); font-weight: 900; cursor: help; }
@media screen and (max-width: 519.98px) { .lh-tn-tbl:not(.is-compact) :is(.lh-tn-c-gf, .lh-tn-c-ga) { display: none; } }
@media screen and (max-width: 379.98px) { .lh-tn-tbl:not(.is-compact) :is(.lh-tn-c-w, .lh-tn-c-d, .lh-tn-c-l) { display: none; } .lh-tn-tbl th, .lh-tn-tbl td { padding-inline: 4px; } }

.lh-tn-days { display: flex; flex-direction: column; gap: 8px; }
.lh-tn-day { border: 1px solid var(--lh-border); border-radius: 14px; background: var(--lh-surface); }
.lh-tn-day > summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; cursor: pointer; list-style: none; font-weight: 750; }
.lh-tn-day > summary::-webkit-details-marker { display: none; }
.lh-tn-day > summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-inline-start: 2px; border-inline-end: 2px solid currentColor; border-block-end: 2px solid currentColor; transform: rotate(45deg); opacity: .6; transition: transform .15s; }
.lh-tn-day[open] > summary::after { transform: rotate(-135deg); }
.lh-tn-day__c { margin-inline-start: auto; color: var(--lh-muted); font-size: .8125rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.lh-tn-day.is-done > summary .lh-tn-day__c, .lh-tn-grp.is-complete .lh-tn-grp__h .lh-tn-day__c { color: var(--lh-success); }
.lh-tn-games { display: flex; flex-direction: column; gap: 5px; margin: 0; padding: 0 8px 8px; list-style: none; }
.lh-tn-g {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; inline-size: 100%; min-height: 46px;
  padding: 6px 10px; border: 1px solid transparent; border-radius: 11px; background: var(--lh-surface-2); color: inherit; font: inherit; text-align: start;
}
.lh-tn-g:hover { border-color: var(--lh-brand); }
.lh-tn-g__a, .lh-tn-g__b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.lh-tn-g__a { text-align: end; }
.lh-tn-g .is-win { font-weight: 850; }
.lh-tn-g__s { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 66px; padding: 4px 8px; border-radius: 8px; background: var(--lh-surface); font-weight: 850; font-variant-numeric: tabular-nums; }
.lh-tn-g.is-done .lh-tn-g__s { background: var(--lh-brand); color: var(--lh-brand-ink); }
.lh-tn-g__d { opacity: .65; }
.lh-tn-rest { margin: 0; padding: 0 14px 12px; color: var(--lh-muted); font-size: .8125rem; }

.lh-tn-grps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.lh-tn-grp { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 12px; border: 1px solid var(--lh-border); border-radius: 16px; background: var(--lh-surface); box-shadow: var(--lh-shadow-sm); }
.lh-tn-grp__h { display: flex; align-items: center; gap: 8px; margin: 0; padding-inline: 2px; font-size: 1rem; font-weight: 850; }
.lh-tn-grp .lh-tn-tw { border-radius: 10px; }
.lh-tn-gm { border: 0; background: none; }
.lh-tn-gm > summary { min-height: 44px; padding: 0 4px; font-size: .9375rem; }
.lh-tn-gm > summary::after { margin-inline-start: auto; }
.lh-tn-games--grp { padding: 0; }
.lh-tn-dl { margin-block-start: 4px; padding-inline: 2px; color: var(--lh-muted); font-size: .75rem; font-weight: 800; }
.lh-tn-qkey { display: inline-block; width: 10px; height: 10px; margin-inline-end: 6px; border-radius: 3px; background: var(--lh-success); vertical-align: middle; }

/* ───────── Score dialog, image ───────── */
.lh-tn-sd { display: flex; flex-direction: column; gap: 10px; }
.lh-tn-sd__ctx { margin-block-end: 10px; }
.lh-tn-sd__row { display: flex; align-items: center; gap: 12px; }
.lh-tn-sd__n { flex: 1; min-width: 0; font-weight: 750; font-size: 1.0625rem; overflow-wrap: anywhere; }
.lh-tn-sd__in { flex: none; inline-size: 80px; min-height: 52px; text-align: center; font-size: 1.375rem; font-weight: 850; font-variant-numeric: tabular-nums; }
.lh-tn-sd__w { display: flex; flex-direction: column; gap: 4px; margin: 14px 0 0; padding: 10px 12px 12px; border: 1px solid var(--lh-border); border-radius: 12px; }
.lh-tn-sd__w > legend { padding-inline: 4px; }
.lh-tn-sd__o { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 650; cursor: pointer; }
.lh-tn-sd__o input { width: 20px; height: 20px; margin: 0; accent-color: var(--lh-brand); }
.lh-tn-dlg .lh-warn { margin-block-start: 10px; }
.lh-tn-img { display: block; max-inline-size: 100%; max-block-size: 52vh; margin: 10px auto 0; border-radius: 12px; box-shadow: var(--lh-shadow-md); }

@media (prefers-reduced-motion: reduce) {
  .lh-tn .is-veil, .lh-tn .is-in, .lh-tn-champ.is-pop { animation: none; }
}
html.lh-reduced .lh-tn .is-in, html.lh-reduced .lh-tn-champ.is-pop { animation: none; }

/* ───────── Print: A4 landscape, the board only ─────────
   The bracket is sized in em: app.js sets --tn-print-zoom before printing so that it fits the page (a CSS zoom
   would not be taken into account when Chrome splits pages). */
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  .c-crumbs, .c-subtitle, .c-content, .c-main--tool > .c-h1, .lh-tn-setup, .lh-tn .lh-bar, .lh-tn-stale, .lh-tn-acts, .lh-tn-rtabs, .lh-tn-privacy,
  .lh-tn-empty, .lh-toasts, .lh-tn-note .lh-tn-qkey, .lh-confetti { display: none !important; }
  .lh-tn { --tn-line: #888; margin: 0; }
  body:has(.lh-tn) { min-height: 0 !important; }
  .c-main--tool:has(.lh-tn) { padding-block-end: 0 !important; }
  .lh-tn-board { margin: 0; }
  .lh-tn-head { margin-block-end: 3mm; }
  .lh-tn-champ { box-shadow: none; margin-block-end: 4mm; padding: 6px 14px; gap: 10px; }
  .lh-tn-champ__ic { width: 36px; height: 36px; border-radius: 10px; }
  .lh-tn-champ__ic .lh-ic { width: 22px; height: 22px; }
  .lh-tn-champ__t { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 14px; }
  .lh-tn-champ__n { font-size: 15pt; }
  .lh-tn-champ__s { margin: 0; }
  .lh-tn-champ, .lh-tn-champ__ic, .lh-tn-g.is-done .lh-tn-g__s, .lh-tn-m__r.is-win, .lh-tn-tbl thead th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  .lh-tn-br { display: flex !important; overflow: visible; padding: 0; font-size: calc(12px * var(--tn-print-zoom, 1)); --tn-col: 14em; --tn-gap: 2.2em; --tn-off: .45em; }
  .lh-tn-col { display: flex !important; }
  [dir="rtl"] .lh-tn-br { direction: ltr; flex-direction: row-reverse; } /* same picture; Chrome splits RTL flex rows too early */
  [dir="rtl"] .lh-tn-col { direction: rtl; }
  .lh-tn-champ.is-pop { animation: none; }
  .lh-tn-col__h { display: flex !important; align-items: flex-end; justify-content: center; min-height: 2.6em; margin-block-end: .2em; font-size: .8em; white-space: normal; }
  .lh-tn-slot { padding-block: 1.4em .5em; }
  .lh-tn-m { border-radius: .8em; box-shadow: none; }
  .lh-tn-m__r { min-height: 2em; gap: .6em; padding-inline: .8em .6em; }
  .lh-tn-m__r:first-of-type { border-start-start-radius: .75em; border-start-end-radius: .75em; }
  .lh-tn-m__r:last-of-type { border-end-start-radius: .75em; border-end-end-radius: .75em; }
  .lh-tn-m__n, .lh-tn-m__s { font-size: 1em; }
  .lh-tn-m__r.is-tbd .lh-tn-m__n { font-size: .9em; }
  .lh-tn-m__s { min-width: 2em; }
  .lh-tn-m__no { font-size: .75em; }
  .lh-tn-m__sd { min-width: 1.8em; height: 1.8em; font-size: .7em; }
  .lh-tn-m__tb { width: 1.1em; height: 1.1em; }
  .lh-tn-m, .lh-tn-day:not(.lh-tn-gm), .lh-tn-g, .lh-tn-tw { break-inside: avoid; page-break-inside: avoid; }

  .lh-tn-rr { grid-template-columns: 1fr 1fr; }
  .lh-tn-grps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lh-tn-grp { box-shadow: none; }
  .lh-tn-tbl { font-size: 9pt; }
  .lh-tn-tbl th, .lh-tn-tbl td { padding-block: 4px; }
  .lh-tn-g { min-height: 24px; padding-block: 1px; font-size: 9pt; }
  .lh-tn-g__s { padding-block: 1px; }
}
