body {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 10px 0 30px;
    font-family: Arial, Helvetica, sans-serif;
}
form, table {
    text-align: left;
}
td {
    padding: 5px;
}
input, button, .btn {
    font-size: 1em;
}

/* Buttons shown after a search */
.actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 1em;
    font-family: inherit;
    line-height: 1.2;
    text-decoration: none;
    border-radius: 5px;
    cursor: pointer;
}
.btn-primary {
    color: #fff;
    background: #1a73e8;
    border: 1px solid #1a73e8;
}
.btn-secondary {
    color: #333;
    background: #fff;
    border: 1px solid #aaa;
}

/* Single player view */
.team-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 10px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: fit-content;
    max-width: 95vw;
    font-size: 1.4em;
}
.team-info td {
    vertical-align: top;
}
.team-info td:first-child {
    color: #555;
    white-space: nowrap;
    padding-right: 15px;
}
.team-info td:last-child {
    overflow-wrap: anywhere;
}

/* Coach view: one block per team */
.team {
    width: 900px;
    max-width: 95vw;
    box-sizing: border-box;
    margin: 15px 0;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}
.team-header {
    margin-bottom: 10px;
}
.team-number {
    margin: 0 0 6px;
    font-size: 2em;
}
.coach-line {
    font-size: 1.05em;
    margin-bottom: 2px;
}
.practice {
    margin-top: 8px;
    font-size: 1.1em;
}
.practice .team-field {
    margin-bottom: 2px;
}
.team-label {
    color: #555;
}
.table-wrap {
    max-width: 100%;
    overflow-x: auto;
}
.roster {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
}
.roster th, .roster td {
    border: 1px solid #999;
    padding: 4px 8px;
    vertical-align: top;
    overflow-wrap: anywhere;
}
.roster tr.row1 td, .roster tr.row2 td {
    height: 1.5em;
}
.roster tr.row2 td {
    color: #555;
}
.col-player { width: 28%; }
.col-parent-1 { width: 18%; }
.col-parent-2 { width: 22%; }
.col-parent-3 { width: 32%; }
.player-name { font-weight: bold; }
.player-detail { font-size: 0.9em; color: #555; padding-left: 10px; }

@media (max-width: 600px) {
    body { padding: 8px; }
    h1 { font-size: 1.5em; }
    .team { max-width: 100%; padding: 6px; }
    .team-number { font-size: 1.6em; }
    .practice { font-size: 1em; }
    .team-line { gap: 2px 14px; }
    .roster th, .roster td { padding: 3px 4px; font-size: 0.85em; }
    input[type=text] { width: 100%; box-sizing: border-box; padding: 8px; }
    .team-info { font-size: 1.1em; }
}

@media print {
    .actions, form, .page-title { display: none; }
    body { display: block; padding: 0; }
    .team { width: auto; max-width: none; margin: 0 0 12px; border: none; padding: 0; break-inside: auto; }
    .roster tr.row1, .roster tr.row2 { break-inside: avoid; }
    .table-wrap { overflow: visible; }
}
