html {
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    background: #f7f3f8;
    color: #211827;
    font-family: Arial, Helvetica, sans-serif;
}

.site-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
}

.site-sidebar {
    background: #5f146d;
    color: #e8efe9;
    min-height: 100vh;
    overflow-y: auto;
    padding: 18px 16px 24px;
    border-right: 4px solid #c7a847;
}

.site-nav {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.site-logo {
    display: block;
    text-align: center;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.site-logo img {
    width: min(189px, 100%);
}

.site-menu-toggle,
.site-back-button {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.site-menu-toggle {
    gap: 10px;
    width: 100%;
}

.site-back-button {
    width: 44px;
    min-width: 44px;
    padding: 0;
}

.site-back-chevron {
    width: 13px;
    height: 13px;
    border-bottom: 3px solid currentColor;
    border-left: 3px solid currentColor;
    transform: rotate(45deg);
}

.site-menu-toggle:hover,
.site-menu-toggle:focus,
.site-back-button:hover,
.site-back-button:focus {
    background: rgba(255, 255, 255, 0.2);
    outline: 2px solid rgba(255, 255, 255, 0.55);
    outline-offset: 2px;
}

.site-menu-icon,
.site-menu-icon::before,
.site-menu-icon::after {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: #ffffff;
}

.site-menu-icon {
    position: relative;
}

.site-menu-icon::before,
.site-menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
}

.site-menu-icon::before {
    top: -7px;
}

.site-menu-icon::after {
    top: 7px;
}

.site-nav ul {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-sidebar a {
    display: block;
    border-radius: 4px;
    color: #e8efe9;
    font-size: 14px;
    line-height: 1.3;
    padding: 6px 8px;
    text-decoration: none;
}

.site-sidebar a:hover,
.site-sidebar a:focus {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    outline: none;
}

.site-sidebar a.is-active,
.site-sidebar a[aria-current="page"] {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-weight: 700;
}

.site-sidebar img {
    max-width: 100%;
    height: auto;
}

.site-main {
    display: flex;
    min-width: 0;
    min-height: 100vh;
    flex-direction: column;
}

.site-content {
    flex: 1 0 auto;
    min-width: 0;
    overflow-x: auto;
    padding: 28px 34px 40px;
    transition: opacity 0.15s ease;
}

.is-loading-page .site-content {
    opacity: 0.55;
}

.site-content img {
    max-width: 100%;
    height: auto;
}

.site-footer {
    flex: 0 0 auto;
    padding: 18px 34px 24px;
    border-top: 1px solid #d5bddc;
    background: #efe7f2;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    border: 1px solid #d5bddc;
    border-radius: 6px;
    background: #ffffff;
    color: #42104c;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    padding: 8px 11px;
    text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus {
    border-color: #5f146d;
    background: #5f146d;
    color: #ffffff;
    outline: none;
}

.footer-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    fill: currentColor;
}

.content-page {
    max-width: 980px;
    margin: 0;
    font-size: 18px;
    line-height: 1.62;
}

.content-header,
.page-header {
    margin: 12px 0 28px;
    text-align: left;
}

.page-header:has(.page-actions) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 18px;
}

.page-header:has(.page-actions) h1 {
    margin-bottom: 0;
}

.content-logo {
    display: block;
    width: min(303px, 100%);
    margin: 0 0 12px;
}

.page-header .lead {
    max-width: 920px;
    color: #4d4053;
    font-size: 20px;
    line-height: 1.5;
}

.page-body {
    min-width: 0;
    line-height: 1.48;
}

.page-body p {
    margin-bottom: 10px;
}

.page-body p:has(+ ul),
.page-body p:has(+ ol) {
    margin-bottom: 4px;
}

.page-body ul,
.page-body ol {
    margin-top: 0;
    margin-bottom: 10px;
    margin-left: 1.75rem;
}

.page-body li {
    margin-bottom: 4px;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 32px;
    padding-top: 18px;
    border-top: 1px solid #d5bddc;
}

.page-actions:empty {
    display: none;
}

.page-header > .page-actions {
    justify-content: flex-end;
    margin-top: 0;
    margin-left: auto;
    padding-top: 0;
    border-top: 0;
}

.page-actions p,
.page-actions ul {
    margin: 0;
}

.content-page h1 {
    margin: 0 0 20px;
    color: #42104c;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.18;
}

.content-page h2 {
    margin: 30px 0 10px;
    color: #5f146d;
    font-size: 24px;
    line-height: 1.25;
}

.content-page h3 {
    margin: 24px 0 8px;
    color: #6f2a7d;
    font-size: 19px;
    line-height: 1.3;
}

.content-page .heading-accent {
    border-left: 5px solid #c7a847;
    padding-left: 10px;
}

.content-page .heading-rule {
    border-bottom: 1px solid #d5bddc;
    padding-bottom: 6px;
}

.content-page .heading-soft {
    border-radius: 5px;
    background: #f4ecf6;
    padding: 8px 10px;
}

.content-page p {
    margin: 0 0 10px;
}

.content-page ul,
.content-page ol {
    margin: 0 0 10px 1.75rem;
    padding: 0;
}

.content-page p + ul,
.content-page p + ol {
    margin-top: 0;
}

.content-page li {
    margin-bottom: 4px;
}

.content-page li:last-child {
    margin-bottom: 0;
}

.content-page .numbered-notes > li {
    margin-bottom: 10px;
}

.content-page .list-heading {
    margin-bottom: 4px;
}

.content-page a {
    color: #075a8c;
    text-underline-offset: 2px;
}

.btn-primary {
    --bs-btn-bg: #5f146d;
    --bs-btn-border-color: #5f146d;
    --bs-btn-color: #ffffff;
    --bs-btn-hover-bg: #42104c;
    --bs-btn-hover-border-color: #42104c;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-active-bg: #42104c;
    --bs-btn-active-border-color: #42104c;
    --bs-btn-active-color: #ffffff;
    --bs-btn-disabled-bg: #8a5a94;
    --bs-btn-disabled-border-color: #8a5a94;
    --bs-btn-disabled-color: #ffffff;
}

.btn-outline-primary {
    --bs-btn-color: #5f146d;
    --bs-btn-border-color: #5f146d;
    --bs-btn-hover-bg: #5f146d;
    --bs-btn-hover-border-color: #5f146d;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-active-bg: #42104c;
    --bs-btn-active-border-color: #42104c;
    --bs-btn-active-color: #ffffff;
}

.content-page a.btn,
.standard-page a.btn,
a.btn {
    text-decoration: none;
}

.content-page a.btn-outline-primary,
.standard-page a.btn-outline-primary,
a.btn-outline-primary,
.content-page a.btn-outline-primary:visited,
.standard-page a.btn-outline-primary:visited,
a.btn-outline-primary:visited {
    color: #5f146d;
}

.content-page a.btn-primary,
.standard-page a.btn-primary,
a.btn-primary,
.content-page a.btn-primary:visited,
.standard-page a.btn-primary:visited,
a.btn-primary:visited {
    color: #ffffff;
}

.content-page a.btn-primary:hover,
.content-page a.btn-primary:focus,
.standard-page a.btn-primary:hover,
.standard-page a.btn-primary:focus,
a.btn-primary:hover,
a.btn-primary:focus {
    color: #ffffff;
}

.content-page a.btn-outline-primary:hover,
.content-page a.btn-outline-primary:focus,
.standard-page a.btn-outline-primary:hover,
.standard-page a.btn-outline-primary:focus,
a.btn-outline-primary:hover,
a.btn-outline-primary:focus {
    border-color: #5f146d;
    background: #5f146d;
    color: #ffffff;
}

.legacy-content {
    max-width: 1100px;
}

.legacy-content table {
    width: auto;
    max-width: 100%;
    margin: 0 0 18px;
    border-collapse: collapse;
    background: #ffffff;
}

.legacy-content th,
.legacy-content td {
    padding: 6px 8px;
    vertical-align: top;
    border-bottom: 1px solid #e1e6e2;
}

.legacy-content th {
    font-weight: 700;
    text-align: left;
    background: #f0e7f3;
}

.legacy-content h1 {
    margin-bottom: 18px;
}

.legacy-content h2,
.legacy-content h3 {
    margin: 24px 0 12px;
}

.legacy-content center,
.legacy-content div {
    max-width: 100%;
}

.content-callout {
    margin-top: 28px;
    padding: 18px 20px;
    border-left: 5px solid #c7a847;
    background: #f4ecf6;
}

.member-list-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 18px;
    max-width: 760px;
}

.table-search {
    position: relative;
    flex: 1 1 420px;
    max-width: 520px;
}

.table-search .form-control {
    min-height: 48px;
    border-color: #d5bddc;
    border-radius: 8px;
    background: #ffffff;
    padding-left: 46px;
    color: #211827;
    box-shadow: 0 1px 2px rgba(66, 16, 76, 0.06);
}

.table-search .form-control:focus {
    border-color: #5f146d;
    box-shadow: 0 0 0 0.2rem rgba(95, 20, 109, 0.15);
}

.search-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    pointer-events: none;
}

.search-icon::before {
    content: "";
    position: absolute;
    left: 1px;
    top: 1px;
    width: 11px;
    height: 11px;
    border: 2px solid #706078;
    border-radius: 50%;
}

.search-icon::after {
    content: "";
    position: absolute;
    right: 1px;
    bottom: 2px;
    width: 8px;
    height: 2px;
    border-radius: 999px;
    background: #706078;
    transform: rotate(45deg);
    transform-origin: center;
}

.member-list-hint {
    margin: 0;
    color: #5a4b61;
    flex: 0 1 260px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.content-page table.membership-table {
    width: 100%;
}

.handicap-report-page #handicap-report thead th {
    vertical-align: bottom;
    white-space: nowrap;
}

.handicap-report-page #handicap-report thead th[scope="colgroup"] {
    text-align: center;
    vertical-align: middle;
}

.handicap-report-page #handicap-report thead tr:last-child th {
    text-align: center;
}

.handicap-report-page #handicap-report thead tr:first-child th:not(:first-child),
.handicap-report-page #handicap-report tbody td:not(:first-child) {
    text-align: center;
}

.tournament-results-page table.tournament-results-table {
    width: 100%;
}

.tournament-page-actions {
    max-width: 620px;
}

.time-recording-page table.time-recording-table {
    width: 100%;
}

.rules-page {
    max-width: 1040px;
}

.rules-page h2 {
    margin-top: 30px;
    padding-bottom: 6px;
    border-bottom: 1px solid #d8d8d8;
}

.rules-article {
    margin-bottom: 8px;
    color: #555555;
    font-weight: 700;
}

.rules-page li {
    margin-bottom: 10px;
}

.rules-alpha {
    list-style-type: lower-alpha;
}

.cup-info-page {
    max-width: 1040px;
}

.cup-info-page h2 {
    margin-top: 30px;
    padding-bottom: 6px;
    border-bottom: 1px solid #d8d8d8;
}

.cup-note {
    font-weight: 700;
}

.points-table {
    width: auto;
    max-width: 100%;
    margin: 0 0 24px;
    border-collapse: collapse;
    font-size: 16px;
}

.points-table th,
.points-table td {
    padding: 6px 10px;
    border: 1px solid #d6d6d6;
    text-align: right;
}

.points-table th {
    background: #f1f5ef;
    color: #222222;
    font-weight: 700;
}

.gallery-page {
    max-width: none;
}

.gallery-carousel {
    max-width: 1120px;
    background: #111111;
}

.gallery-carousel .carousel-item img {
    width: 100%;
    height: min(72vh, 760px);
    object-fit: contain;
    background: #111111;
}

.gallery-carousel .carousel-control-prev,
.gallery-carousel .carousel-control-next {
    width: 9%;
}

.gallery-carousel .carousel-indicators {
    margin-bottom: 10px;
}

.ready-golf-page {
    max-width: 1040px;
}

.suggestion-list {
    list-style-position: outside;
}

.suggestion-list li {
    margin-bottom: 8px;
}

.content-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 0;
}

.content-actions a {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #5f146d;
    background: #ffffff;
    color: #5f146d;
    text-decoration: none;
    font-weight: 700;
}

.content-actions a:hover,
.content-actions a:focus {
    background: #5f146d;
    color: #ffffff;
}

.board-page {
    max-width: 1120px;
}

.board-page .lead {
    color: #4d4053;
}

.board-grid {
    margin-bottom: 14px;
}

.person-card {
    border-color: #d5bddc;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(66, 16, 76, 0.08);
    overflow: hidden;
    text-align: center;
}

.person-card .card-img-top {
    width: 100%;
    height: 280px;
    object-fit: contain;
    object-position: center top;
    background: #f0e7f3;
    border-bottom: 1px solid #d5bddc;
}

.person-card .card-body {
    padding: 14px 12px 16px;
}

.person-card .card-title {
    margin: 0 0 4px;
    font-size: 18px;
}

.person-card .card-text {
    margin: 0;
    color: #4d4053;
    font-size: 15px;
}

.board-photo-placeholder {
  align-items: center;
  background: #f3eaf5;
  color: #6b4072;
  display: flex;
  font-size: 4rem;
  justify-content: center;
}

.home-page {
    max-width: 1080px;
}

.home-intro,
.notice-list,
.link-section {
    margin-bottom: 28px;
}

.notice-list {
    padding: 16px 18px;
    border-left: 5px solid #c7a847;
    background: #fbf4df;
}

.action-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-left: 0;
    list-style: none;
}

.action-links a {
    display: inline-block;
    padding: 7px 11px;
    border: 1px solid #d5bddc;
    background: #ffffff;
    color: #5f146d;
    text-decoration: none;
}

.action-links a:hover,
.action-links a:focus {
    border-color: #5f146d;
    background: #f4ecf6;
}

@media (max-width: 760px) {
    .site-shell {
        grid-template-columns: 1fr;
    }

    .site-main {
        min-height: 0;
    }

    .site-sidebar {
        min-height: 0;
        position: sticky;
        top: 0;
        z-index: 10;
        padding: 10px 12px;
        border-right: 0;
        border-bottom: 4px solid #c7a847;
        overflow: visible;
    }

    .site-nav {
        position: relative;
        gap: 8px;
    }

    .site-logo {
        padding: 8px 56px 10px;
    }

    .site-logo img {
        width: min(150px, 64vw);
    }

    .site-menu-toggle {
        display: inline-flex;
        position: absolute;
        top: 26px;
        right: 0;
        justify-content: center;
        width: 44px;
        min-width: 44px;
        padding-inline: 0;
    }

    .site-back-button:not([hidden]) {
        display: inline-flex;
        position: absolute;
        top: 26px;
        left: 0;
    }

    .site-menu-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .site-nav ul {
        display: none;
        max-height: calc(100vh - 180px);
        overflow-y: auto;
        padding: 4px 0 2px;
    }

    .site-sidebar.is-menu-open .site-nav ul {
        display: flex;
    }

    .site-sidebar a {
        font-size: 15px;
        padding: 9px 10px;
    }

    .person-card .card-img-top {
        height: min(72vw, 380px);
    }

    .site-content {
        padding: 18px 14px 28px;
    }

    .site-footer {
        padding: 14px;
    }

    .footer-links {
        align-items: stretch;
        flex-direction: column;
    }

    .footer-links a {
        width: 100%;
        justify-content: center;
    }

    .content-page {
        font-size: 16px;
    }

    .content-page h1 {
        font-size: 26px;
    }
}

@media print {
    .site-shell {
        display: block;
        min-height: 0;
    }

    .site-sidebar {
        display: none !important;
    }

    .site-footer {
        display: none !important;
    }

    .site-content {
        overflow: visible;
        padding: 0;
    }

    .content-page,
    .legacy-content,
    .gallery-page,
    .board-page,
    .cup-info-page,
    .rules-page,
    .ready-golf-page,
    .home-page {
        max-width: none;
    }
}
