/* Turnierplaner (Nutzer 2026-11-28/29): Layout auf den Bausteinen der App (app.css, ios.css, dark.css) */
.tp-page{max-width:760px;margin:0 auto;padding:calc(20px + env(safe-area-inset-top,0px)) 16px calc(40px + env(safe-area-inset-bottom,0px))}
.tp-page h1{font-size:28px;letter-spacing:-.6px;margin:0 0 4px;line-height:1.15}
.tp-lead{margin:0 0 18px;color:var(--muted);font-size:15px}
.tp-brand{display:flex;align-items:center;gap:12px;margin:0 0 18px}
.tp-brand .tp-ic{width:48px;height:48px;border-radius:12px;display:grid;place-items:center;background:var(--accent);color:#fff}
.tp-brand .tp-ic svg{width:28px;height:28px}
.tp-brand img{height:24px;width:auto}.tp-brand small{display:block;color:var(--muted);font-size:13px;font-weight:600;margin-top:2px}
.tp-bar{display:flex;align-items:center;gap:10px;margin:0 0 14px;min-height:40px}
.tp-bar .tp-back{color:var(--accent-text);font-size:17px;font-weight:600;padding:6px 0;background:none;border:0;cursor:pointer;white-space:nowrap}
.tp-bar .tp-sp{flex:1}
.tp-bar .tp-ibtn{width:38px;height:38px;border-radius:50%;background:var(--fill);color:var(--accent-text);display:grid;place-items:center;border:0;cursor:pointer;font-size:22px;line-height:1}
.tp-card{background:var(--cell);border-radius:14px;padding:16px;margin:0 0 14px}
.tp-h2{margin:22px 4px 8px;font-size:13px;font-weight:600;letter-spacing:.02em;text-transform:uppercase;color:var(--muted)}
.tp-list{background:var(--cell);border-radius:14px;overflow:hidden;margin:0 0 14px;padding:0;list-style:none}
.tp-row{display:flex;align-items:center;gap:12px;width:100%;padding:12px 16px;background:none;border:0;text-align:left;color:inherit;font:inherit;font-size:16px;cursor:pointer;min-height:52px}
.tp-row+.tp-row,.tp-list>li+li{border-top:.5px solid var(--separator)}
.tp-row .tp-main{flex:1;min-width:0}.tp-row .tp-main small{display:block;color:var(--muted);font-size:13px;margin-top:1px}
.tp-row .tp-main b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.tp-row .tp-chev{color:var(--muted);font-size:20px}
.tp-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;margin:0 0 14px}
.tp-tile{background:var(--cell);border-radius:14px;padding:16px;text-align:left;border:0;color:inherit;font:inherit;cursor:pointer;display:flex;flex-direction:column;gap:6px;min-height:118px}
.tp-tile b{font-size:17px;line-height:1.25}.tp-tile small{color:var(--muted);font-size:13px}
.tp-tile .tp-prog{height:6px;border-radius:3px;background:var(--fill);overflow:hidden;margin-top:auto}.tp-tile .tp-prog span{display:block;height:100%;background:var(--switch-on,#34c759)}
.tp-new{border:1.5px dashed var(--accent-line)!important;background:transparent!important;color:var(--accent-text)!important;align-items:center;justify-content:center;font-weight:600;font-size:16px}
.tp-form .field{margin-bottom:14px}
.tp-form label{font-size:13px;font-weight:600;color:var(--muted)}
.tp-form input,.tp-form select{font-size:16px;padding:11px 12px;border-radius:10px;background:var(--cell)}
.tp-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}
.tp-seg{display:flex;background:var(--fill);border-radius:10px;padding:2px;gap:2px;margin:0 0 14px}
.tp-seg button{flex:1;padding:8px 6px;border-radius:8px;border:0;background:none;color:inherit;font:inherit;font-size:14px;font-weight:600;cursor:pointer;min-width:0}
.tp-seg button[aria-checked=true]{background:var(--segment);box-shadow:0 1px 3px rgba(0,0,0,.12)}
.tp-switch{display:flex;align-items:center;gap:12px;padding:12px 16px;font-size:16px}
.tp-switch span{flex:1}
.tp-switch input{appearance:none;width:51px;height:31px;border-radius:16px;background:var(--switch-off);position:relative;cursor:pointer;flex:none;border:0;padding:0;margin:0;transition:background .2s}
.tp-switch input::after{content:"";position:absolute;top:2px;left:2px;width:27px;height:27px;border-radius:50%;background:#fff;box-shadow:0 2px 4px rgba(0,0,0,.2);transition:transform .2s}
.tp-switch input:checked{background:var(--switch-on)}.tp-switch input:checked::after{transform:translateX(20px)}
.tp-actions{display:grid;gap:10px;margin:16px 0 0}.tp-actions .btn{width:100%;font-size:16px;min-height:48px;border-radius:12px}
.tp-link{display:block;margin:14px auto 0;color:var(--accent-text);font-weight:600;background:none;border:0;font-size:16px;cursor:pointer;text-align:center}
.tp-danger{color:var(--red-text)!important}
.tp-team{display:grid;grid-template-columns:1fr auto 36px;gap:8px;align-items:center;padding:8px 12px}
.tp-team+.tp-team{border-top:.5px solid var(--separator)}
.tp-team input{font-size:16px;padding:9px 10px;border-radius:9px;min-width:0}
.tp-team select{font-size:15px;padding:8px;border-radius:9px;width:auto}
.tp-team .tp-own{font-size:12px;color:var(--accent-text);font-weight:600}
.tp-del{width:36px;height:36px;border:0;border-radius:50%;background:var(--fill);color:var(--muted);font-size:20px;cursor:pointer}
.tp-game{display:grid;grid-template-columns:58px 1fr auto;gap:12px;align-items:center;width:100%;padding:11px 16px;background:none;border:0;text-align:left;color:inherit;font:inherit;cursor:pointer}
.tp-game+.tp-game{border-top:.5px solid var(--separator)}
.tp-game .tp-when{display:flex;flex-direction:column;font-size:15px;font-weight:600}.tp-game .tp-when small{color:var(--muted);font-size:12px;font-weight:400}
.tp-game .tp-tm{display:flex;flex-direction:column;min-width:0;font-size:15px}.tp-game .tp-tm span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tp-game .tp-tm .tbd{color:var(--muted)}
.tp-game .tp-sc{display:flex;flex-direction:column;align-items:flex-end;font-size:17px;font-weight:700;font-variant-numeric:tabular-nums}
.tp-game .tp-sc small{font-size:12px;font-weight:400;color:var(--muted)}
.tp-game.done .tp-when{color:var(--muted);font-weight:500}
.tp-game:disabled{cursor:default;opacity:1}
.tp-table{width:100%;border-collapse:collapse;white-space:nowrap}
.tp-table th,.tp-table td{padding:9px 6px;text-align:center;font-variant-numeric:tabular-nums;font-size:15px;border:0;background:none}
.tp-table th{color:var(--muted);font-size:12px;font-weight:600;text-transform:none;letter-spacing:0}
.tp-table .l{text-align:left;width:100%;white-space:normal}.tp-table tbody tr td{border-top:.5px solid var(--separator)}
.tp-table td:first-child,.tp-table th:first-child{padding-left:16px}.tp-table td:last-child,.tp-table th:last-child{padding-right:16px}
.tp-rank{display:flex;align-items:center;gap:12px;padding:11px 16px;font-weight:600}
.tp-place{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--fill);font-size:14px;flex:none}
.tp-place.p1{background:#ffd60a;color:#000}.tp-place.p2{background:#d1d1d6;color:#000}.tp-place.p3{background:#d9a066;color:#000}
.tp-qr{display:grid;grid-template-columns:120px 1fr;gap:14px;align-items:center;padding:14px 16px}
.tp-qr .tp-qrimg{width:120px;height:120px;background:#fff;border-radius:10px;padding:6px}.tp-qr .tp-qrimg svg{width:100%;height:100%;display:block}
.tp-qr b{display:block;font-size:16px}.tp-qr small{display:block;color:var(--muted);font-size:13px;margin:2px 0 8px;hyphens:auto}
.tp-qr .tp-mini{display:flex;gap:8px;flex-wrap:wrap}
.tp-mini button,.tp-mini a{padding:7px 12px;border-radius:16px;background:var(--fill);color:var(--accent-text);font-weight:600;font-size:14px;border:0;cursor:pointer;text-decoration:none}
.tp-empty{padding:26px 16px;text-align:center;color:var(--muted)}
.tp-sheet{position:fixed;inset:0;z-index:50;background:var(--scrim);display:flex;align-items:flex-end;justify-content:center}
.tp-sheet[hidden]{display:none}
.tp-sheet-card{background:var(--sheet-bg);width:100%;max-width:520px;border-radius:16px 16px 0 0;padding:18px 16px calc(18px + env(safe-area-inset-bottom,0px));max-height:90dvh;overflow:auto}
@media (min-width:700px){.tp-sheet{align-items:center}.tp-sheet-card{border-radius:16px}}
.tp-sheet-head{display:flex;align-items:center;gap:10px;margin:0 0 14px}.tp-sheet-head h2{flex:1;font-size:19px;margin:0}
.tp-x{width:32px;height:32px;border-radius:50%;background:var(--fill);color:var(--muted);border:0;font-size:18px;cursor:pointer}
.tp-score{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:0 0 12px}
.tp-score .tp-side{background:var(--cell);border-radius:14px;padding:12px;text-align:center}
.tp-score .tp-side b{display:block;font-size:15px;margin:0 0 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tp-step{display:flex;align-items:center;justify-content:center;gap:10px}
.tp-step button{width:44px;height:44px;border-radius:50%;border:0;background:var(--fill);color:var(--accent-text);font-size:24px;font-weight:600;cursor:pointer}
.tp-step output{min-width:44px;font-size:34px;font-weight:700;font-variant-numeric:tabular-nums}
.tp-pens{margin:0 0 12px}.tp-pens p{margin:0 4px 8px;color:var(--muted);font-size:14px}
.tp-toast{position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);background:var(--inverse);color:var(--on-inverse);padding:12px 18px;border-radius:12px;font-size:15px;z-index:60;max-width:90vw}
.tp-page .error{color:var(--red-text);font-size:14px;min-height:0;margin:6px 0 0}
.tp-note{color:var(--muted);font-size:14px;margin:6px 4px 0}
@media (max-width:520px){.tp-new{min-height:64px}}

.tp-switch{cursor:pointer;font-weight:600}.tp-switch small{font-weight:400}
.tp-switch input[type=checkbox]{background-image:none!important;-webkit-appearance:none;appearance:none;width:51px!important;height:31px!important;min-width:51px;border-radius:16px!important;border:0!important;box-shadow:none!important}
.tp-switch input[type=checkbox]:checked{background:var(--switch-on)!important}
.tp-switch input[type=checkbox]:not(:checked){background:var(--switch-off)!important}
.tp-switch input[type=checkbox]::before{content:none!important;display:none!important}
.tp-switch input[type=checkbox]::after{content:""!important;display:block!important;position:absolute!important;top:2px!important;left:2px!important;width:27px!important;height:27px!important;border-radius:50%!important;background:#fff!important;-webkit-mask:none!important;mask:none!important;box-shadow:0 2px 4px rgba(0,0,0,.2)!important;transform:none;transition:transform .2s}
.tp-switch input[type=checkbox]:checked::after{transform:translateX(20px)!important}
.tp-switch.notice-switch input{order:2}.tp-switch.notice-switch>span{order:1}
@media (max-width:420px){.tp-score{gap:8px}.tp-score .tp-side{padding:10px 6px}.tp-step{gap:6px}.tp-step button{width:40px;height:40px}.tp-step output{min-width:34px;font-size:30px}}
