.tt-app {
    max-width: 68rem;
    margin: 0 auto;
    padding-block: clamp(1rem, 3vw, 2.5rem);
    padding-inline: clamp(.75rem, 2vw, 1.25rem);
}
.tt-app h1, .tt-app h2, .tt-app h3, .tt-app p { margin-top: 0; }
.tt-app h1 { font-size: clamp(1.9rem, 1.4rem + 2.5vw, 3.4rem); line-height: 1.06; font-weight: 700; overflow-wrap: anywhere; }
.tt-app h2 { font-size: clamp(1.2rem, 1.05rem + .7vw, 1.65rem); font-weight: 700; }
.tt-app h3 { font-size: 1.05rem; font-weight: 700; }
.tt-app a:focus-visible, .tt-app button:focus-visible, .tt-app input:focus-visible, .tt-app select:focus-visible, .tt-app summary:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 3px; }
.tt-app .btn-club { color: #fff; background: #17643a; border-color: #17643a; }
.tt-app .btn-club:hover, .tt-app .btn-club:active { color: #fff; background: #134e32; border-color: #134e32; }
.tt-back { display: inline-block; margin-bottom: 1rem; }
.tt-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem 1.5rem; margin-bottom: 1.5rem; }
.tt-head p:not(.tt-kicker) { color: var(--text-muted); margin-bottom: 0; max-width: 56ch; }
.tt-kicker, .tt-side { color: #17643a; text-transform: uppercase; letter-spacing: .095em; font-size: .76rem; font-weight: 700; }
.tt-kicker { margin-bottom: .45rem; }
.tt-panel, .tt-list, .tt-standing { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.tt-panel { padding: clamp(.85rem, 2vw, 1.35rem); }
.tt-section { margin-top: 1.85rem; }
.tt-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem; margin-bottom: .7rem; }
.tt-section-head h2 { margin-bottom: 0; }
.tt-index-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1rem; }
.tt-list { list-style: none; padding: 0; margin: 0; }
.tt-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .85rem 1rem; }
.tt-list li + li { border-top: 1px solid var(--border); }
.tt-list small { display: block; color: var(--text-muted); }
.tt-tag, .tt-rounds a { background: var(--accent-soft); color: #17643a; border-radius: .45rem; padding: .24rem .58rem; font-size: .89rem; font-weight: 600; }
.tt-control { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1rem 2rem; align-items: start; }
.tt-advance { margin-top: .75rem; }
.tt-manage-actions, .tt-confirm-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.tt-manage-actions { margin-top: .85rem; }
.tt-share { min-width: 0; background: var(--accent-softer); padding: .7rem .9rem; border-radius: 10px; }
.tt-share summary { cursor: pointer; font-weight: 700; }
.tt-share img { display: block; margin-block: .7rem; max-width: 100%; height: auto; image-rendering: pixelated; }
.tt-share a, .tt-share details { display: block; margin-top: .55rem; }
.tt-share details p { margin: .45rem 0; color: var(--text-muted); }
.tt-rounds { display: flex; flex-wrap: wrap; gap: .4rem; padding: .15rem 0; margin-bottom: .8rem; }
.tt-rounds a { text-decoration: none; }
.tt-rounds a[aria-current] { color: white; background: #17643a; }
.tt-round-total { color: var(--text-muted); font-weight: 400; font-size: .9em; }
.tt-games { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: .85rem; }
.tt-match { min-width: 0; max-width: 37rem; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); scroll-margin-top: 5rem; }
.tt-match > header, .tt-match > footer, .tt-match-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: .45rem; padding: .65rem .85rem; }
.tt-match > header h3 { margin: 0; }
.tt-match > header span { color: var(--text-muted); }
.tt-match > footer { background: transparent; border: 0; color: var(--text); }
.tt-court { display: grid; grid-template-columns: minmax(0, 1fr) .35rem minmax(0, 1fr); background: #17643a; color: #fff; padding: .38rem; isolation: isolate; }
.tt-team { min-width: 0; padding: .55rem clamp(.45rem, 2vw, .85rem); border: 1px solid #86ad97; min-height: 5.2rem; position: relative; display: flex; flex-direction: column; justify-content: center; }
.tt-team:first-child { border-right: 0; }
.tt-team:last-child { border-left: 0; }
.tt-team.tt-winner { background: #134e32; }
.tt-side { color: #d5eee0; display: block; margin-bottom: .2rem; }
.tt-player { overflow-wrap: anywhere; font-size: clamp(.94rem, .85rem + .35vw, 1.12rem); line-height: 1.2; font-weight: 700; }
.tt-player + .tt-player { margin-top: .22rem; }
.tt-net { background: repeating-linear-gradient(to bottom, #cce5d7 0 3px, #17643a 3px 5px); box-shadow: inset 1px 0 #cce5d7, inset -1px 0 #cce5d7; }
.tt-result { font-variant-numeric: tabular-nums; display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem; }
.tt-result strong { font-size: 1.25rem; font-family: var(--font-head); }
.tt-result span, .tt-help { color: var(--text-muted); font-size: .93rem; }
.tt-help { margin: .5rem 0 0; }
.tt-scroll { overflow-x: auto; }
.tt-standing { border-spacing: 0; border-collapse: separate; width: 100%; font-variant-numeric: tabular-nums; }
.tt-standing td, .tt-standing th { padding: .58rem clamp(.45rem, 1.1vw, .85rem); text-align: right; }
.tt-standing th[scope="row"], .tt-standing th.tt-name { text-align: left; }
.tt-standing tbody tr > * { border-top: 1px solid var(--border); }
.tt-standing thead th { white-space: nowrap; font-weight: 700; }
.tt-standing small { color: var(--text-muted); }
.tt-delta { white-space: nowrap; color: var(--text-muted); }
.tt-delta-up { color: #17643a; font-weight: 700; }
.tt-delta-down { color: #862e26; font-weight: 700; }
.tt-notice { background: var(--accent-soft); border-left: .26rem solid var(--accent-strong); border-radius: .35rem; padding: .6rem .85rem; }
.tt-notice-error, .tt-form .errorlist { background: #fff0ed; color: #862e26; border-color: #b03c30; }
.tt-form { max-width: 44rem; }
.tt-field { margin-bottom: 1rem; }
.tt-field > label, .tt-share label, .tt-score-row label { display: block; font-weight: 600; }
.tt-field input:not([type="checkbox"]), .tt-field select, .tt-share input, .tt-score-input { width: 100%; border-radius: .45rem; border: 1px solid #899b93; padding: .45rem .55rem; min-height: 2.5rem; background: var(--surface); color: var(--text); }
.tt-field input[type="number"] { max-width: 10rem; }
.tt-field input[type="checkbox"] { accent-color: #17643a; width: 1.1rem; height: 1.1rem; vertical-align: middle; }
.tt-check > label { display: inline; }
.tt-players legend, .tt-score-row legend { font-size: 1rem; font-weight: 700; float: none; }
.tt-players legend, .tt-score-row legend, .tt-field > label, .tt-share > label { margin-bottom: .25rem; }
.tt-players .tt-help { margin: 0 0 .5rem; }
.tt-players #id_players { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .25rem .6rem; }
.tt-players label { display: block; padding: .38rem .45rem; border-radius: .4rem; background: var(--accent-softer); overflow-wrap: anywhere; }
.tt-guests { padding-top: .65rem; border-top: 1px solid var(--border); }
.tt-guests legend { float: none; font-size: 1rem; font-weight: 700; margin: 0; }
.tt-guests .tt-help { margin-bottom: .7rem; }
.tt-guest-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(5rem, .37fr) auto; align-items: start; gap: .55rem; margin-bottom: .65rem; }
.tt-guest-row[hidden] { display: none; }
.tt-guest-row label { font-weight: 600; }
.tt-guest-remove { align-self: start; padding-top: 1.55rem; }
@media (max-width: 420px) {
    .tt-guest-row { grid-template-columns: minmax(0, 1fr) minmax(5rem, .45fr); }
    .tt-guest-remove { grid-column: 1 / -1; padding-top: 0; }
}
.tt-form .errorlist { border-radius: .4rem; margin: .5rem 0; padding: .45rem .6rem .45rem 1.75rem; }
.tt-score-wrap { max-width: 34rem; }
.tt-score-wrap > .tt-court { border-radius: var(--radius) var(--radius) 0 0; }
.tt-score-form { border-radius: 0 0 var(--radius) var(--radius); }
.tt-score-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem .8rem; margin-bottom: .9rem; }
.tt-score-row legend small { font-weight: 400; color: var(--text-muted); }
.tt-score-input { font-size: 1.12rem; font-variant-numeric: tabular-nums; }
