.legacy-club-editor{display:none!important}
.club-management[hidden]{display:none}
.club-management{display:grid;gap:20px;min-width:0}
.club-management>div:first-of-type{display:grid;gap:16px}
.club-management p,.club-management-dialog p{margin:0;overflow-wrap:anywhere}
.club-management-table{width:100%;border-collapse:separate;border-spacing:0 12px;table-layout:fixed}
.club-management-table th{text-align:left;padding:12px;font-size:.88rem;vertical-align:bottom}
.club-management-table td{padding:16px 12px;vertical-align:top;border-block:1px solid var(--border);background:var(--surface)}
.club-management-table th:first-child{width:62px}
.club-management-table th:nth-child(2){width:26%}
.club-management-table th:last-child{width:170px}
.club-management-table td:first-child{border-left:1px solid var(--border);border-radius:var(--radius-md) 0 0 var(--radius-md)}
.club-management-table td:last-child{border-right:1px solid var(--border);border-radius:0 var(--radius-md) var(--radius-md) 0}
.club-management-table td>*+*{margin-top:8px}
.club-management-table td p,.club-management-table td strong,.club-management-table td a,.club-management-table td small{display:block;overflow-wrap:anywhere;line-height:1.45}
.club-management-table td .button{width:100%;white-space:normal}
.club-management-table th:first-child .club-check span,.club-management-table td:first-child .club-check span{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
label.club-check{display:flex!important;align-items:center;justify-content:flex-start;gap:10px;min-height:44px;flex-direction:row!important;position:relative}
.club-management-dialog label.club-check{justify-content:flex-start!important;width:100%;margin:0}
.club-check input[type=checkbox]{flex:0 0 20px;width:20px;height:20px;min-width:20px;min-height:20px;margin:0;padding:0}
.club-check span{min-width:0;overflow-wrap:anywhere}
.club-management-dialog{width:min(960px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:auto;padding:24px}
.club-management-dialog>.panel-heading{gap:16px;align-items:flex-start;margin-bottom:24px}
.club-management-dialog>.panel-heading h2{font-size:1.4rem;line-height:1.35;overflow-wrap:anywhere;min-width:0}
.club-management-dialog>.panel-heading button{flex:0 0 auto}
.club-management-dialog .form-stack{gap:20px}
.club-management-dialog fieldset{min-width:0;padding:16px;border:1px solid var(--border);border-radius:var(--radius-md);margin:0}
.club-editor-leaders{display:grid;gap:12px}
.club-schedule-editor{display:grid;gap:16px}
.club-schedule-edit-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.club-schedule-edit-row legend{padding-inline:6px}
.club-trash-row,.club-import-row{padding:18px;border:1px solid var(--border);border-radius:var(--radius-md);display:flex;flex-wrap:wrap;gap:12px;margin-block:16px}
.club-trash-row h3,.club-trash-row p,.club-import-row strong,.club-import-row p{width:100%}
.application-preview-dialog{width:min(1000px,calc(100vw - 24px));max-height:calc(100dvh - 24px)}
.application-preview-dialog iframe{display:block;width:100%;height:65vh;border:1px solid var(--border);margin-top:16px}
.report-table-scroll{overflow:auto;margin-top:20px}
.report-table-scroll td{white-space:pre-line;overflow-wrap:anywhere;vertical-align:top}
@media(max-width:850px){.club-management-table{display:block}.club-management-table thead{display:block}.club-management-table thead tr{display:block}.club-management-table th:not(:first-child){display:none}.club-management-table th:first-child{width:auto}.club-management-table th:first-child .club-check span{position:static;width:auto;height:auto;clip-path:none;white-space:normal}.club-management-table tbody{display:grid;gap:16px}.club-management-table tr{display:grid;grid-template-columns:36px minmax(0,1fr);border:1px solid var(--border);border-radius:var(--radius-md);padding:12px;gap:8px}.club-management-table td{padding:4px;border:0!important;border-radius:0!important;background:transparent}.club-management-table td:nth-child(n+3){grid-column:2}.club-management-table td:last-child{display:flex;flex-wrap:wrap;gap:8px}.club-management-table td:last-child .button{width:auto;max-width:100%}.club-management-dialog{padding:16px}.club-schedule-edit-row{grid-template-columns:minmax(0,1fr)}.club-management-dialog .form-grid{grid-template-columns:minmax(0,1fr)}}

@media(max-width:850px){.club-management-table thead{margin-bottom:16px}.club-management-table thead tr{display:block;border:0;border-radius:0;padding:0}.club-management-table th:first-child{padding:4px 0}}

.club-management-dialog .form-stack > h3{margin:0;font-size:1.125rem}
/* 0.36: bounded photo grids and readable, responsive council hierarchy. */
.name-parts-fields { display:grid; gap:12px; min-width:0; padding:16px; border:1px solid var(--border); border-radius:16px; }
.name-parts-fields>label { min-width:0; }.name-parts-fields small { display:block; margin-top:4px; }
.name-preview { margin:0; overflow-wrap:anywhere; }.name-account { margin-block:12px; }
.club-photo-gallery { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; min-width:0; margin-block:12px; }
.club-photo-gallery:has(>a:only-child) { grid-template-columns:minmax(0,1fr); }
.club-photo-gallery>a { display:block; min-width:0; border-radius:12px; overflow:hidden; }
.club-photo-gallery img { display:block; width:100%; height:auto; aspect-ratio:3/2; object-fit:cover; }
.club-photo-gallery>a:focus-visible { outline:3px solid var(--primary); outline-offset:3px; }
.photo-bank-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(180px,100%),1fr)); gap:16px; }
.photo-bank-item { min-width:0; display:flex; flex-direction:column; gap:8px; overflow-wrap:anywhere; padding:12px; border:1px solid var(--border); border-radius:14px; }
.photo-bank-item .club-photo-gallery { margin:0; }.photo-bank-item .button { white-space:normal; }
.club-photo-picker { display:grid; gap:16px; min-width:0; padding:16px; border:1px solid var(--border); border-radius:16px; }
.club-photo-picker>.compact-disclosure { padding:12px; }.club-photo-picker>.compact-disclosure>label { margin-block:12px; }
.council-tree { min-width:0; }.council-level { list-style:none; display:grid; gap:16px; padding:0; margin:0; }
.council-level .council-level { border-inline-start:2px solid var(--border); padding-inline-start:20px; margin:12px 0 0 12px; }
.council-level li,.council-position { min-width:0; }.council-position { display:grid; gap:12px; overflow-wrap:anywhere; padding:20px; }
.council-position h3,.council-position p { margin:0; }.council-position .compact-disclosure { margin:0; }
.council-members { padding-inline-start:20px; }.preserve-lines { white-space:pre-wrap; }.council-filters { margin-block:16px; }.council-tree { margin-top:20px; }
@media(min-width:700px) { .name-parts-fields { grid-template-columns:repeat(3,minmax(0,1fr)); }.name-parts-fields>.club-check,.name-parts-fields>.name-preview { grid-column:1/-1; } }
@media(max-width:700px) { .council-level .council-level { padding-inline-start:6px; margin-inline-start:3px; }.council-position { padding:14px; }.council-position .form-actions { flex-direction:column; align-items:stretch; } }
.club-photo-gallery { grid-template-columns:minmax(0,1fr); gap:12px; }
.club-photo-thumbnails { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:12px; }
.club-photo-thumbnails a { min-width:0; }
[data-page-panel="self-government"]>.page-heading { display:flex; flex-direction:column; align-items:flex-start; gap:4px; }
[data-page-panel="self-government"]>.page-heading p { margin:0; }
.council-filters,.council-tree { margin:0; }
.student-leadership { display:grid; gap:14px; padding:20px; min-width:0; }
.student-leadership h2,.student-leadership p { margin:0; }.student-leader-clubs { min-width:0; display:grid; gap:10px; padding:14px; }
.declaration-list { display:grid; gap:12px; padding:12px; }.declaration-row { padding-block:10px; border-bottom:1px solid var(--border); overflow-wrap:anywhere; }.declaration-row p { margin-top:6px; }
.resource-card>.club-photo-gallery>a>img,.club-choice-card>.club-photo-gallery>a>img { height:clamp(160px,19vw,240px); aspect-ratio:auto; }

/* 0.37: fields adapt to the form width, not to the whole screen. */
.name-parts-fields { grid-template-columns: minmax(0,1fr); }
.name-parts-fields > label { display:grid; grid-template-columns:minmax(0,1fr); align-content:start; gap:6px; }
.name-parts-fields > label > small { min-height:1.5em; }
.club-management-dialog .form-stack { padding-bottom:0; }
.club-management-dialog .form-stack > .form-actions { position:sticky; bottom:-24px; z-index:4; margin:0 -4px; padding:14px 4px; background:var(--surface); border-top:1px solid var(--border); box-shadow:0 -8px 16px rgb(0 0 0 / .06); }
.club-management-dialog :is(input,select,textarea,button) { scroll-margin-block:100px; }
@media(min-width:1000px) { .club-management-dialog .name-parts-fields { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:700px) { .club-management-dialog .form-stack > .form-actions { bottom:-16px; padding-block:10px; }.club-management-dialog .form-stack > .form-actions > button { flex:1 1 130px; } }
