:root { font: 16px/1.55 system-ui, sans-serif; color: #172c34; background: #eef3f1; }
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 48rem; margin: auto; padding: 1rem; }
header { display: flex; align-items: center; justify-content: space-between; margin: 0 0 1rem; }
header > a { font-weight: 750; }
section { background: white; padding: clamp(1rem, 4vw, 2rem); margin-bottom: 1rem; border: 1px solid #dce6e3; border-radius: 1rem; }
h1, h2 { line-height: 1.2; margin: 0 0 1rem; }
h1 { font-size: clamp(1.5rem, 5vw, 2.3rem); }
h2 { font-size: 1.25rem; }
a { color: #12635a; }
button, .button { display: inline-block; font: inherit; font-weight: 650; padding: .65rem 1rem; border-radius: .55rem; border: 1px solid #12635a; background: #12635a; color: white; text-decoration: none; cursor: pointer; }
.secondary { background: white; color: #12635a; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #bd7828; outline-offset: 2px; }
label { display: block; margin-bottom: .85rem; font-weight: 600; }
input:not([type=checkbox]), textarea { width: 100%; display: block; font: inherit; border: 1px solid #879b9b; border-radius: .45rem; padding: .55rem; margin-top: .3rem; }
canvas { display: block; width: 100%; aspect-ratio: 3; box-shadow: inset 0 0 0 1px #879b9b; border-radius: .45rem; background: #f7faf9; touch-action: none; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.person { border-top: 1px solid #dce6e3; padding: .85rem 0; }
.person p { margin: .15rem 0; }
.muted { color: #4b6464; }
.notice { background: #e5f2ed; border-radius: .45rem; padding: .75rem; }
.agenda { white-space: pre-wrap; overflow-wrap: anywhere; }
.sheet h1 { font-size: 1.35rem; text-align: center; }
table { border-collapse: collapse; width: 100%; table-layout: fixed; }
th, td { border: 1px solid #45555a; padding: .4rem .65rem; text-align: left; overflow-wrap: anywhere; }
td { height: 3.6rem; }
tr { break-inside: avoid; }
.signed { display: block; height: 2.65rem; max-width: 100%; }
.signed polyline { fill: none; stroke: #152734; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
@page { size: A4; margin: 16mm; }
@media print {
    :root { background: white; color: black; font-size: 11pt; }
    main { max-width: none; padding: 0; }
    .sheet { padding: 0; margin: 0; border: 0; }
    .sheet h1 { break-after: avoid; }
    .print-controls { display: none; }
    thead { display: table-header-group; }
}
.signature-modes { margin: 0 0 1rem; }
.signature-modes [aria-pressed=true] { background: #12635a; color: white; }
#photo-source { width: auto; max-width: 100%; max-height: 48vh; aspect-ratio: auto; }
#clean-preview { background: white; touch-action: auto; }
#photo-editor input[type=range] { padding: 0; border: 0; }
img.signed { width: auto; object-fit: contain; }

.admin-meeting { max-width: 86rem; }
.meeting-layout { display: grid; gap: 1rem; align-items: start; }
.meeting-details, .meeting-roster { min-width: 0; }
.meeting-roster { padding: clamp(1rem, 2vw, 1.5rem); }
.meeting-roster h2 { margin-bottom: .65rem; }
.meeting-roster .person {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .2rem .75rem;
    padding: .45rem 0;
    overflow-wrap: anywhere;
}
.meeting-roster .person .muted { grid-column: 1; margin: 0; font-size: .875rem; }
.meeting-roster .actions {
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-content: flex-end;
    margin: 0;
    gap: .3rem;
}
.meeting-roster .actions button { font-size: .83rem; padding: .23rem .48rem; min-height: 30px; }
.roster-list:focus-visible { outline: 2px solid #12635a; outline-offset: 3px; }
@media (min-width: 48rem) {
    .meeting-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr); }
    .roster-list { max-height: max(18rem, calc(100dvh - 10rem)); overflow-y: auto; padding-right: .4rem; }
}
@media (min-width: 72rem) {
    .meeting-roster .person { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto; }
    .meeting-roster .person .muted { grid-column: 2; }
    .meeting-roster .actions { grid-column: 3; grid-row: 1; }
}
@media (max-width: 32rem), (min-width: 48rem) and (max-width: 56rem) {
    .meeting-roster .person { grid-template-columns: minmax(0, 1fr); }
    .meeting-roster .actions { grid-column: 1; grid-row: auto; justify-content: flex-start; }
}

.directory-choices { max-height: 14rem; overflow-y: auto; margin-bottom: .75rem; }
.directory-choices label { margin: 0; padding: .3rem 0; overflow-wrap: anywhere; }
.directory-choices small { font-weight: 400; }
.directory-choices + button { margin-bottom: .5rem; }

.admin-header { flex-wrap: wrap; gap: .6rem 1rem; }
.admin-header nav { display: flex; flex-wrap: wrap; gap: .3rem; }
.admin-header nav a { padding: .35rem .65rem; border-radius: .4rem; text-decoration: none; }
.admin-header nav a[aria-current=page] { background: #dcece7; font-weight: 700; }
.member-directory { margin: 0; padding: 0; list-style: none; }
.member-directory li {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .1rem 1rem;
    padding: .45rem 0;
    border-top: 1px solid #dce6e3;
    overflow-wrap: anywhere;
}

@media screen {
    body:has(.admin-shell) { background: #f7f6f2; color: #101010; }
    .admin-shell { max-width: 76rem; padding: .65rem; }
    .admin-shell.admin-meeting { max-width: 86rem; }
    .admin-shell .admin-header { background: #101010; padding: .4rem .65rem; margin-bottom: .6rem; border-radius: .35rem; justify-content: flex-start; }
    .admin-header > form { margin-left: auto; }
    .admin-header .club-logo { display: block; width: 92px; height: 36px; object-fit: contain; }
    .admin-header nav a { color: #fff; }
    .admin-header nav a[aria-current=page] { background: #d8ff42; color: #101010; }
    .admin-shell section { padding: .7rem .85rem; margin-bottom: .6rem; border-color: #d8d5ce; border-radius: .4rem; }
    .admin-shell h1 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
    .admin-shell h2 { font-size: 1.05rem; }
    .admin-shell h1, .admin-shell h2 { margin-bottom: .45rem; }
    .admin-shell p { margin: .25rem 0 .55rem; }
    .admin-shell label { margin-bottom: .5rem; }
    .admin-shell input:not([type=checkbox]), .admin-shell textarea { padding: .35rem .5rem; margin-top: .13rem; border-color: #a39f96; }
    .admin-shell a { color: #101010; }
    .admin-shell button, .admin-shell .button { padding: .26rem .52rem; min-height: 32px; background: #101010; border-color: #101010; color: #fff; border-radius: .3rem; }
    .admin-shell button.secondary { background: #fff; color: #101010; border-color: #a39f96; }
    .admin-shell button.danger { color: #93231d; }
    .admin-shell button:disabled { opacity: .55; cursor: default; }
    .admin-shell .admin-header nav a { color: white; }
    .admin-shell .admin-header nav a[aria-current=page] { color: #101010; }
    .admin-shell .muted { color: #676661; }
    .admin-shell .meeting-layout { gap: .65rem; }
    .admin-shell summary { cursor: pointer; font-weight: 700; }
    .admin-shell details[open] > summary { margin-bottom: .45rem; }
    .edit-summary { display: list-item; width: fit-content; border: 1px solid #d8d5ce; padding: .15rem .45rem; border-radius: .3rem; }
    .admin-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .35rem .75rem; padding: .3rem 0; border-top: 1px solid #d8d5ce; }
    .admin-shell .member-directory li { align-items: center; padding: .3rem 0; }
    .admin-shell .directory-choices label { margin: 0; padding: .15rem 0; }
    .mail-nav { display: flex; gap: .4rem .8rem; flex-wrap: wrap; }
    .mail-nav a[aria-current=page] { background: #d8ff42; }
    .admin-shell fieldset { border: 1px solid #d8d5ce; margin: 0 0 .6rem; padding: .35rem .5rem; }
    .admin-shell .recipient { margin: .15rem 0; overflow-wrap: anywhere; }
}
.club-logo { display: block; width: 105px; height: auto; max-height: 46px; object-fit: contain; }

.payment-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 0 .8rem; }
#payment-barcode:not([hidden]) { width: auto; height: auto; max-width: 100%; aspect-ratio: auto; box-shadow: none; border-radius: 0; background: white; touch-action: auto; }
#payment-download[hidden] { display: none; }
.admin-row .actions { margin: 0; align-items: center; }
