  /* Spiel einrichten */
  #setupTab { display:none; grid-column:1/-1; height:100%; overflow:auto; padding:18px; }
  #configPanel { width:100%; max-width:100%; min-width:0; overflow-x:hidden; margin:0; }
  #configPanel h2 { margin-bottom:5px; font-size:26px; }
  .setup-intro { color:var(--muted); margin-bottom:16px; }
  .setup-section { width:100%; max-width:100%; min-width:0; overflow:hidden; background:#fff; padding:18px; border-radius:var(--radius); box-shadow:0 2px 10px rgba(16,24,40,.08); margin-bottom:14px; }
  .setup-section h3 { margin-bottom:14px; color:var(--blue-dark); }
  .setup-start-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .setup-start-card { min-width:0; padding:16px; border:1px solid #cbd5e1; border-radius:10px; background:#f8fafc; color:var(--ink); text-align:left; }
  button.setup-start-card { cursor:pointer; }
  button.setup-start-card:hover { border-color:#5597d8; background:#edf5fd; }
  .setup-start-card > strong, .setup-start-card > span { display:block; }
  .setup-start-card > strong { margin-bottom:5px; color:var(--blue-dark); font-size:17px; }
  .setup-start-card > span { color:var(--muted); font-size:13px; line-height:1.4; }
  .setup-start-from-schedule .field { margin:13px 0 9px; }
  .setup-start-from-schedule .primary-btn { width:100%; min-height:42px; }
  .setup-start-empty { margin-top:10px; }
  .setup-prerequisite-state { max-width:820px; margin:0 auto; }
  .setup-prerequisite-head { display:flex; align-items:flex-start; gap:14px; margin-bottom:18px; }
  .setup-prerequisite-head h3 { margin:0 0 5px; }
  .setup-prerequisite-head p { color:var(--muted); font-size:14px; line-height:1.5; }
  .setup-prerequisite-icon { flex:0 0 44px; width:44px; height:44px; display:grid; place-items:center; border-radius:12px; background:#e8f1fa; color:var(--blue-dark); font-size:22px; font-weight:950; }
  .setup-prerequisite-list { display:grid; gap:9px; }
  .setup-prerequisite-item { min-width:0; display:grid; grid-template-columns:28px minmax(0,1fr) auto; gap:11px; align-items:center; padding:13px 14px; border:1px solid #d8e0e9; border-radius:10px; background:#f8fafc; }
  .setup-prerequisite-item.is-complete { border-color:#b7ddca; background:#f2faf6; }
  .setup-prerequisite-status { width:24px; height:24px; display:grid; place-items:center; border:2px solid #98a2b3; border-radius:50%; color:#fff; font-size:14px; font-weight:950; }
  .setup-prerequisite-item.is-complete .setup-prerequisite-status { border-color:var(--green); background:var(--green); }
  .setup-prerequisite-item.is-complete .setup-prerequisite-status::before { content:"✓"; }
  .setup-prerequisite-item > div { min-width:0; }
  .setup-prerequisite-item strong, .setup-prerequisite-item small { display:block; }
  .setup-prerequisite-item strong { color:#253347; font-size:14px; }
  .setup-prerequisite-item small { margin-top:3px; color:var(--muted); font-size:12px; line-height:1.4; }
  .setup-prerequisite-item button { min-height:38px; margin:0; white-space:nowrap; }
  .setup-prerequisite-item.is-complete button { display:none; }
  .setup-prerequisite-note { margin:14px 2px 0; color:#475467; font-size:12px; line-height:1.45; }
  #configPanel .field-grid.previous-game-grid { grid-template-columns:minmax(100px,1fr) minmax(100px,1fr) 46px; align-items:end; }
  #configPanel .previous-game-grid .field { margin-bottom:0; }
  .previous-game-refresh { display:grid; width:46px; height:46px; min-height:46px; margin:0; padding:0; place-items:center; line-height:0; }
  .previous-game-refresh svg { display:block; width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
  #configPanel.setup-start-pending > .setup-intro,
  #configPanel.setup-start-pending > .setup-section:not(.setup-start-section),
  #configPanel.setup-start-pending > .config-buttons { display:none; }
  @media (max-width:700px) {
    .setup-start-options { grid-template-columns:1fr; }
    .setup-prerequisite-item { grid-template-columns:28px minmax(0,1fr); }
    .setup-prerequisite-item button { grid-column:2; width:100%; }
  }
  .roster-setup-section { height:clamp(560px,calc(100dvh - 150px),760px); min-height:0; display:flex; flex-direction:column; overflow:hidden; }
  .roster-setup-section .player-inputs { flex:1; min-height:0; margin-bottom:0; }
  .roster-setup-section .player-list { display:flex; flex-direction:column; min-height:0; overflow:hidden; }
  .roster-setup-section .roster-table { flex:1; min-height:0; max-height:none; }
  @media (min-width:761px) and (max-width:1180px) {
    .roster-setup-section { height:clamp(680px,calc(100dvh - 90px),920px); }
  }
  .setup-select-row { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto; gap:10px; align-items:end; margin-bottom:14px; }
  .setup-select-row .field { margin:0; }
  .setup-select-row button { margin-bottom:1px; }
  .setup-officials { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
  #configPanel .setup-officials select[hidden] { display:none; }
  .setup-official-trigger { width:100%; min-height:46px; padding:10px 32px 10px 11px; border:1px solid #cbd5e1; border-radius:8px; background:#fff; color:var(--ink); font:inherit; font-size:16px; text-align:left; cursor:pointer; position:relative; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .setup-official-trigger::after { content:"⌄"; position:absolute; right:11px; top:8px; color:#667085; font-size:22px; }
  .setup-official-trigger:focus-visible { outline:2px solid #155eef; outline-offset:2px; }
  .setup-official-picker:not([hidden]) { display:grid; gap:6px; margin-top:5px; padding:8px; border:1px solid #b8c9dc; border-radius:9px; background:#fff; box-shadow:0 8px 20px rgba(16,24,40,.12); }
  .setup-official-choices { display:grid; max-height:210px; overflow-y:auto; }
  .setup-official-choice { width:100%; padding:9px 8px; border:0; border-radius:5px; background:#fff; color:var(--ink); font:inherit; text-align:left; cursor:pointer; }
  .setup-official-choice:hover, .setup-official-choice:focus-visible { background:#edf5fd; }
  .setup-official-choice.create { margin-top:5px; border-top:1px solid #d8e0e9; border-radius:0; color:#155eef; font-weight:700; }
  .setup-official-no-results { margin:5px 8px; color:var(--muted); font-size:13px; }
  .setup-official-create:not([hidden]) { display:grid; gap:9px; margin-top:8px; padding:12px; border:1px solid #b8c9dc; border-radius:9px; background:#f8fafc; }
  .setup-official-create label { font-size:13px; font-weight:700; }
  .setup-official-actions { display:flex; flex-wrap:wrap; gap:7px; }
  .setup-official-actions button { min-height:36px; padding:7px 10px; }
  .setup-official-error:not([hidden]) { margin:0; color:#b42318; font-size:13px; }
  #configPanel .field { min-width:0; }
  #configPanel .field input:not([type=checkbox]), #configPanel .field select { display:block; width:100%; height:46px; min-height:46px; padding:10px 11px; border:1px solid #cbd5e1; border-radius:8px; background:#fff; color:var(--ink); font-size:16px; line-height:1.2; }
  #configPanel .setup-select-row button { min-height:46px; }
  .config-row { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:15px; }
  .config-row input[type=text], .config-row input[type=number] { flex:1; padding:10px; font-size:18px; border-radius:8px; border:1px solid #ccc; }
  .player-inputs { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:20px; min-width:0; margin-bottom:15px; }
  .player-list { background:#f8fafc; border:1px solid #d9e2ec; border-radius:10px; padding:12px; min-width:0; }
  .player-list h3 { margin-bottom:10px; font-size:18px; color:var(--ink); }
  .roster-table { display:flex; flex-direction:column; gap:5px; max-height:460px; overflow:auto; padding-right:3px; }
  .roster-head, .player-entry { display:grid; grid-template-columns:46px 58px 72px minmax(0,1fr); gap:8px; align-items:center; }
  .roster-head { position:sticky; top:0; z-index:2; padding:4px 8px; color:var(--muted); background:#f8fafc; font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
  .player-entry { margin:0; padding:6px 8px; background:#fff; border:1px solid #e2e8f0; border-radius:8px; }
  .player-entry:focus-within { border-color:#5597d8; box-shadow:0 0 0 2px rgba(7,94,181,.12); }
  .player-entry input[type=checkbox] { width:24px; height:24px; margin:auto; cursor:pointer; accent-color:var(--green); }
  .player-entry input[type=checkbox]:disabled { opacity:0.5; cursor:not-allowed; }
  .player-entry input[type=number], .player-entry input[type=text] { width:100%; min-width:0; padding:8px 9px; font-size:15px; color:var(--ink); background:#f8fafc; border:1px solid transparent; border-radius:6px; user-select:text; -webkit-user-select:text; }
  .player-entry input:focus { background:#fff; border-color:#7aa7d8; outline:none; }
  .add-player-btn { width:100%; margin-top:9px; padding:9px; border:1px dashed #8aa4bf; border-radius:8px; background:#f8fafc; color:var(--blue-dark); cursor:pointer; font-weight:800; }
  .add-player-btn:hover { background:#eaf2fb; }
  .team-source-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; align-items:end; }
  .team-source-row .field { margin-bottom:0; }
  .team-source-row button { min-height:46px; margin-bottom:0; }
  .stacked-team-fields { display:grid; grid-template-columns:minmax(0,1fr) minmax(120px,.42fr); gap:10px; margin:12px 0; }
  .two-column-roster { width:100%; max-width:100%; min-width:0; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:5px 10px; max-height:none; overflow:visible; }
  .two-column-roster .roster-head { grid-column:1 / -1; }
  .roster-team-section .player-list { margin-top:12px; }
  .coach-selection { margin:10px 0 12px; padding:10px; background:#f8fafc; border:1px solid #d9e2ec; border-radius:9px; }
  .coach-selection h4 { margin-bottom:8px; font-size:15px; }
  .coach-selection-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 10px; }
  .coach-choice { display:flex; align-items:center; gap:8px; min-width:0; padding:8px 10px; background:#fff; border:1px solid #e2e8f0; border-radius:8px; cursor:pointer; }
  .coach-choice input { flex:0 0 auto; width:22px; height:22px; accent-color:var(--green); }
  .coach-choice > span { overflow:hidden; font-size:14px; font-weight:700; white-space:nowrap; text-overflow:ellipsis; }
  .coach-empty { padding:8px; color:var(--muted); font-size:13px; }
  .master-coach-list { display:grid; gap:7px; }
  .master-coach-entry { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(170px,.75fr) auto; gap:7px; align-items:center; }
  .master-coach-entry input, .master-coach-entry select { min-height:42px; }
  #teamEditorPanel .settings-card { overflow:visible; }
  .coach-role-picker { position:relative; min-width:0; }
  .coach-role-picker.open { z-index:5; }
  .coach-role-picker select[hidden] { display:none !important; }
  .coach-role-trigger { width:100%; min-height:42px; padding:8px 30px 8px 11px; border:1px solid #cbd5e1; border-radius:8px; background:#fff; color:var(--ink); font:inherit; text-align:left; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:pointer; }
  .coach-role-trigger::after { content:"⌄"; position:absolute; right:10px; color:#64748b; }
  .coach-role-trigger:focus-visible, .coach-role-option:focus-visible, .coach-role-delete:focus-visible, .coach-role-create:focus-visible { outline:2px solid #155eef; outline-offset:2px; }
  .coach-role-panel { display:none; position:absolute; top:calc(100% + 4px); right:0; width:max(250px,100%); max-width:min(340px,85vw); z-index:20; padding:8px; border:1px solid #b8c9dc; border-radius:9px; background:#fff; box-shadow:0 8px 20px rgba(16,24,40,.18); }
  .coach-role-picker.open .coach-role-panel { display:grid; gap:6px; }
  .coach-role-panel input[type=search] { width:100%; min-height:40px; }
  .coach-role-choices { max-height:220px; overflow:auto; }
  .coach-role-choice { display:grid; grid-template-columns:minmax(0,1fr) 34px; align-items:center; gap:4px; }
  .coach-role-option { min-height:38px; padding:7px 8px; border:0; border-radius:5px; background:#fff; color:var(--ink); font:inherit; text-align:left; cursor:pointer; }
  .coach-role-option:hover { background:#edf5fd; }
  .coach-role-delete { width:32px; height:32px; border:0; border-radius:5px; background:#fff; color:var(--red); font-size:21px; cursor:pointer; }
  .coach-role-delete:hover:not(:disabled) { background:#fff1f0; }
  .coach-role-delete:disabled { opacity:.35; cursor:not-allowed; }
  .coach-role-empty { margin:8px; color:#64748b; font-size:13px; }
  .coach-role-create { min-height:38px; padding:7px 8px; border:0; border-radius:5px; background:#edf5fd; color:var(--blue-dark); font:inherit; font-weight:700; text-align:left; cursor:pointer; }
  .coach-role-create[hidden] { display:none; }
  .master-coach-head { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(170px,.75fr) 38px; gap:7px; padding:0 4px; color:#64748b; font-size:11px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
  .coach-choice-copy { display:flex; min-width:0; flex-direction:column; }
  .coach-choice-copy span { font-weight:800; }
  .coach-choice-copy small { overflow:hidden; color:#64748b; font-size:11px; font-weight:700; white-space:nowrap; text-overflow:ellipsis; }
  .einlauf-coach-card .einlauf-role { display:block; margin-bottom:2px; color:#5f6f82; font-size:11px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
  .remove-coach-btn { width:42px; height:42px; border:1px solid #e6b7b3; border-radius:8px; background:#fff; color:var(--red); cursor:pointer; font-size:20px; }
  .master-player-list { display:grid; gap:6px; }
  .master-player-head, .master-player-entry { display:grid; grid-template-columns:76px minmax(0,1fr) 76px 42px; gap:8px; align-items:center; }
  .master-player-head { padding:0 4px; color:var(--muted); font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
  .master-player-entry { padding:6px; background:#f8fafc; border:1px solid #e2e8f0; border-radius:8px; }
  .master-player-entry input { width:100%; min-width:0; min-height:42px; padding:9px; border:1px solid #cbd5e1; border-radius:7px; background:#fff; font-size:16px; }
  .master-player-entry input[type=radio] { width:22px; min-height:22px; height:22px; margin:auto; padding:0; accent-color:#155eef; cursor:pointer; }
  .team-intro-sequence { display:grid; gap:7px; }
  .team-intro-sequence-item { display:grid; grid-template-columns:42px 34px minmax(0,1fr); gap:10px; align-items:center; padding:8px; border:1px solid #d8e0e9; border-radius:9px; background:#f8fafc; color:#253347; font-weight:800; transition:border-color .15s ease,box-shadow .15s ease,opacity .15s ease; }
  .team-intro-sequence-item.is-dragging { opacity:.45; }
  .team-intro-sequence-item.drag-target { border-color:#155eef; box-shadow:0 0 0 2px rgba(21,94,239,.12); }
  .team-intro-sequence-position { width:28px; height:28px; display:grid; place-items:center; border-radius:50%; background:#e5effb; color:#075eb5; font-size:12px; font-weight:950; }
  .intro-sequence-drag-handle { width:42px; height:42px; border:1px solid #b8c9dc; border-radius:8px; background:#fff; color:#475467; cursor:grab; font-size:21px; font-weight:900; line-height:1; touch-action:none; }
  .intro-sequence-drag-handle:active { cursor:grabbing; }
  .team-captain-last > span { display:grid; gap:2px; }
  .team-captain-last small { color:#667085; font-size:11px; font-weight:650; line-height:1.35; }
  @media (max-width:700px) {
    .master-player-head, .master-player-entry { grid-template-columns:62px minmax(0,1fr) 58px 38px; gap:5px; }
    .master-player-entry { padding:5px; }
    .master-player-entry .remove-coach-btn { width:38px; }
    .master-player-head { font-size:10px; }
  }
  .roster-import { margin:14px 0; padding:11px; border:1px solid #d9e2ec; border-radius:9px; background:#f8fafc; }
  .roster-import summary { cursor:pointer; color:var(--blue-dark); font-weight:800; }
  .roster-import[open] summary { margin-bottom:12px; }
  .roster-import textarea { min-height:120px; }
  .quarter-input-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
  .overtime-editor { margin-top:12px; padding-top:12px; border-top:1px solid #d9e2ec; }
  .overtime-input-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
  .overtime-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
  .overtime-actions button { padding:8px 11px; border-radius:8px; border:1px solid #9db3ca; background:#fff; color:var(--blue-dark); cursor:pointer; font-weight:800; }
  .overtime-actions button:disabled { opacity:.45; cursor:not-allowed; }
  .quarter-input-card { padding:11px; background:#f8fafc; border:1px solid #d9e2ec; border-radius:9px; }
  .quarter-input-card h4 { margin-bottom:8px; color:var(--blue-dark); text-align:center; }
  .quarter-input-card .field { margin-bottom:7px; }
  .calculated-quarter { display:block; margin-top:7px; padding:7px; border-radius:7px; background:#eaf2ff; color:#174ea6; font-size:14px; font-weight:800; text-align:center; }
  #scoreOverlay { position:fixed; inset:0; z-index:300; display:none; align-items:center; justify-content:center; padding:20px; background:rgba(15,23,42,.72); }
  #scoreOverlay.open { display:flex; }
  .score-modal { width:min(880px,100%); max-height:92dvh; overflow:auto; padding:18px; background:#fff; border-radius:14px; box-shadow:0 18px 55px rgba(15,23,42,.35); }
  .score-modal-head { display:flex; align-items:start; justify-content:space-between; gap:15px; margin-bottom:14px; }
  .score-modal-head p { margin-top:4px; color:var(--muted); font-size:13px; }
  .score-close-btn { width:38px; height:38px; border:0; border-radius:8px; background:#eef2f6; color:var(--ink); cursor:pointer; font-size:23px; }
  .score-modal-actions { display:flex; justify-content:flex-end; gap:9px; margin-top:15px; }
  .config-buttons { margin:16px 0 28px; text-align:center; position:sticky; bottom:8px; z-index:10; }
  .config-buttons button { padding:10px 20px; font-size:18px; margin:0 10px; border-radius:8px; border:none; cursor:pointer; }
  #saveConfig { background:#28a745; color:white; }
  #cancelConfig { background:#dc3545; color:white; }
