@media screen {
    .test-shell .pools-filters,
    .test-shell .pools-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 10px 10px 8px;
        min-height: 30px;
        white-space: nowrap;
        font: 12px/18px Arial, sans-serif;
    }
    .test-shell .pools-filters { gap: 18px; }
    .test-shell .pools-filter-toggle,
    .test-shell .pools-filter-team,
    .test-shell .pool-draw-type,
    .test-shell .pool-toggle { display: inline-flex; align-items: center; gap: 7px; }
    .test-shell .pools-filters label,
    .test-shell .pool-controls label { color: #95a5b6; }
    .test-shell .pools-filters select,
    .test-shell .pool-controls select {
        box-sizing: border-box;
        width: 235px;
        min-width: 0;
        height: 28px;
        margin: 0;
        padding: 3px 8px;
        border: 1px solid var(--shell-dialog-border);
        border-radius: 4px;
        background: var(--shell-dialog-field-background);
        color: var(--shell-dialog-text);
        font: 12px Arial, sans-serif;
    }
    .test-shell .pools-filters input[type="checkbox"],
    .test-shell .pool-controls input[type="checkbox"] { margin: 0; accent-color: var(--shell-accent); }
    .test-shell .pools-actions { align-items: stretch; }
    .test-shell .pools-actions a { display: inline-flex; text-decoration: none; }
    /* Modified 2026-10-26: Keep long translated pool actions inside their available row. */
    .test-shell .pools-actions a { max-width: 100%; min-width: 0; }
    .test-shell .pools-actions button { margin: 0; white-space: normal; }
    .test-shell .pool-heading { margin: 12px 0 8px; padding-bottom: 8px; border-bottom: 1px solid var(--shell-dialog-border); }
    .test-shell .pool-heading h2 { margin: 0; color: var(--shell-dialog-text); font: 600 14px/20px Arial, sans-serif; }
    .test-shell .pool-controls {
        display: flex;
        align-items: center;
        gap: 16px;
        width: max-content;
        margin-bottom: 14px;
        padding: 7px 10px;
        border: 1px solid var(--shell-dialog-border);
        border-radius: 4px;
        background: var(--shell-dialog-field-background);
        font: 12px/18px Arial, sans-serif;
        white-space: nowrap;
    }
    .test-shell .pool-controls:empty { display: none; }
    .test-shell .pool-redraw-status { padding: 10px; color: var(--shell-accent-filter-text); background: var(--shell-accent-filter-background); }

    /* Linear pattern cards use normal flow; bracket connectors keep their geometry. */
    .test-shell #poolContainer .the_pool[program="1"][draw_type="9"] .participants > .part { margin-bottom: 8px; }

    .test-shell #poolContainer #pool_results {
        /* Modified 2026-10-27: Keep podium places in normal flow below the bracket and within the available width. */
        position: static;
        display: block;
        max-width: 100%;
        margin-top: 14px;
        box-sizing: border-box;
        width: 228px;
        min-height: 0;
        padding: 8px;
        border: 1px solid var(--shell-dialog-border);
        border-radius: 5px;
        background: var(--shell-dialog-header);
        color: var(--shell-dialog-text);
    }
    .test-shell #poolContainer #pool_results > div[position] {
        box-sizing: border-box;
        width: calc(100% - 22px);
        min-height: 30px;
        margin: 0 0 6px 22px;
        border: 1px solid var(--shell-dialog-border);
        border-radius: 3px;
        background: var(--shell-dialog-field-background);
    }
    .test-shell #poolContainer #pool_results > div[position]:last-child { margin-bottom: 0; }
    .test-shell #poolContainer #pool_results > div[position]::before { left: -22px; width: 18px; color: var(--shell-accent-light); font: 600 12px/28px Arial, sans-serif; text-align: center; }
    .test-shell #poolContainer #pool_results > div[position] > div { box-sizing: border-box; width: auto; min-height: 20px; margin: 4px; padding: 3px 6px; border: 0; border-radius: 3px; background: var(--shell-button-background); color: var(--shell-dialog-text); font: 12px/16px Arial, sans-serif; white-space: normal; }
}
