:root {
    --brand: #f8b803;
    --brand-dark: #d99f00;
    --brand-soft: #fff4c7;
    --ink: #25241e;
    --muted: #6c685e;
    --canvas: #f6f2e8;
    --panel: #fff;
    --border: #ddd6c7;
    --danger: #a72b35;
    --success: #176b45;
    --shadow: 0 12px 34px rgba(35, 31, 20, .08);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
.member-body { margin: 0; min-width: 0; overflow-x: clip; background: var(--canvas); color: var(--ink); font-family: "Yu Gothic", YuGothic, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif; line-height: 1.7; overflow-wrap: anywhere; }
.member-body img { display: block; max-width: 100%; height: auto; }
.member-body a { color: inherit; text-underline-offset: .18em; }
.member-body button, .member-body input, .member-body select, .member-body textarea { font: inherit; }
.member-body :focus-visible { outline: 3px solid #1667c5; outline-offset: 3px; }
.member-shell { width: min(calc(100% - 40px), 1100px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: fixed; z-index: 999; top: 8px; left: 8px; transform: translateY(-140%); padding: 10px 16px; border-radius: 6px; background: #fff; color: #111; font-weight: 800; }
.skip-link:focus { transform: none; }
.member-header { border-top: 6px solid var(--brand); border-bottom: 1px solid var(--border); background: #fff; }
.member-header-inner { display: flex; align-items: center; min-height: 92px; gap: 18px; }
.member-logo img { width: min(260px, 58vw); }
.member-site-label { margin-left: auto; border-left: 4px solid var(--brand); padding: 4px 0 4px 12px; color: var(--muted); font-size: .74rem; font-weight: 900; letter-spacing: .16em; }
.member-menu-button { display: none; min-width: 48px; min-height: 48px; border: 0; border-radius: 8px; padding: 12px; background: var(--ink); }
.member-menu-button > span:not(.sr-only) { display: block; width: 23px; height: 2px; margin: 4px auto; background: #fff; }
.member-navigation { position: sticky; z-index: 50; top: 0; border-bottom: 4px solid var(--brand); background: var(--ink); color: #fff; }
.member-navigation .member-shell { display: flex; align-items: stretch; min-height: 52px; }
.member-navigation a, .member-navigation button { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 0; padding: 9px 18px; background: transparent; color: #fff; font-size: .84rem; font-weight: 800; text-decoration: none; cursor: pointer; }
.member-navigation a:hover, .member-navigation a.active, .member-navigation button:hover { background: var(--brand); color: #1b1a16; }
.member-navigation form { margin: 0 0 0 auto; }
.member-container { min-height: 55vh; padding-block: 32px 74px; }
.flash { margin-bottom: 20px; border: 1px solid; border-radius: 9px; padding: 12px 15px; }
.flash.success { border-color: #9bc9b3; background: #eef9f3; color: #15583b; }
.flash.error { border-color: #dfabb0; background: #fff1f2; color: #7e1d28; }
.flash ul { margin: 6px 0 0; padding-left: 22px; }
.flash .error-link { min-height: 0; border: 0; padding: 2px 0; background: transparent; color: inherit; font: inherit; text-align: left; text-decoration: underline; cursor: pointer; }
.member-body [aria-invalid="true"] { border-color: var(--danger) !important; }
.member-body .field-error { margin: 5px 0 0; color: var(--danger); font-size: .78rem; font-weight: 700; }
.member-footer { padding: 29px 0; background: #1c1b17; color: #b8b3a8; }
.member-footer .member-shell { display: flex; justify-content: space-between; gap: 20px; }
.member-footer span { color: var(--brand); font-size: .76rem; font-weight: 900; letter-spacing: .15em; }
.member-footer small { font-size: .72rem; }
.member-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; font-size: .72rem; }
.member-footer-links a { color: #d2cdc2; }

.eyebrow { margin: 0 0 6px; color: #765700; font-size: .7rem; font-weight: 900; letter-spacing: .16em; }
.member-page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.member-page-heading h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1.25; }
.member-page-heading p:last-child { margin: 7px 0 0; color: var(--muted); }
.portal-intro { max-width: 760px; margin: 0 auto 20px; border-left: 6px solid var(--brand); padding: 2px 0 2px 18px; }
.portal-intro h1 { margin: 0 0 7px; border: 0; padding: 0; font-size: clamp(1.45rem, 3.4vw, 1.85rem); }
.portal-intro p:last-child { margin: 0; color: var(--muted); font-size: .92rem; }
.portal-site-return { width: 100%; margin-top: 16px; border-radius: 9px !important; }
.system-card, .member-card { border: 1px solid var(--border); border-radius: 11px; background: var(--panel); box-shadow: var(--shadow); }
.member-welcome { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-bottom: 22px; border-top: 6px solid var(--brand); border-radius: 4px 4px 11px 11px; padding: 27px 30px; background: #fff; box-shadow: var(--shadow); }
.member-welcome h1 { margin: 0; font-size: clamp(1.7rem, 4vw, 2.3rem); }
.member-welcome p:last-child { margin: 7px 0 0; color: var(--muted); }
.member-welcome dl { display: flex; gap: 10px; margin: 0; }
.member-welcome dl div { min-width: 125px; border: 1px solid var(--border); border-radius: 8px; padding: 10px 13px; background: #faf8f1; }
.member-welcome dt { color: var(--muted); font-size: .7rem; }
.member-welcome dd { margin: 2px 0 0; font-weight: 900; }
.identity-notice { display: grid; grid-template-columns: auto 1fr; gap: 5px 16px; margin-bottom: 20px; border-left: 5px solid var(--brand); padding: 14px 17px; background: #fff9df; }
.identity-notice span { color: var(--muted); font-size: .82rem; }
.member-quick-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin: 0 0 22px; }
.member-quick-links a { min-height: 118px; border: 1px solid var(--border); border-radius: 10px; padding: 20px; background: #fff; text-decoration: none; box-shadow: var(--shadow); }
.member-quick-links a:hover { border-color: var(--brand-dark); transform: translateY(-2px); }
.member-quick-links strong, .member-quick-links span { display: block; }
.member-quick-links strong { font-size: 1.05rem; }
.member-quick-links span { margin-top: 6px; color: var(--muted); font-size: .77rem; }
.announcement-card, .history-card { margin-top: 20px; padding: 24px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.section-heading h2 { margin: 0; font-size: 1.35rem; }
.count-badge, .badge { display: inline-flex; align-items: center; min-height: 26px; border-radius: 999px; padding: 3px 9px; background: #ece9e0; font-size: .7rem; font-weight: 900; }
.badge.ok { background: #e4f4eb; color: #145e3e; }
.badge.warn { background: #fff0b8; color: #654900; }
.badge.ng { background: #f9e5e7; color: #81202a; }
.announcement-list article { display: grid; grid-template-columns: 105px 1fr; gap: 16px; border-top: 1px solid var(--border); padding: 15px 0; }
.announcement-list time { color: var(--muted); font-size: .76rem; }
.announcement-list article div > :first-child { margin-top: 0; }
.announcement-list article div > :last-child { margin-bottom: 0; }
.table-scroll { width: 100%; overflow-x: auto; }
.data { width: 100%; border-collapse: collapse; }
.data th, .data td { border-bottom: 1px solid var(--border); padding: 12px 10px; text-align: left; vertical-align: middle; }
.data th { color: var(--muted); font-size: .72rem; white-space: nowrap; }
.data td { font-size: .82rem; }
.data a { font-weight: 800; }
.empty-state { padding: 25px !important; color: var(--muted); text-align: center !important; }

.member-event-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 20px; }
.member-event-card { display: flex; min-height: 100%; overflow: hidden; flex-direction: column; border: 1px solid var(--border); border-radius: 11px; background: #fff; box-shadow: var(--shadow); }
.member-event-image { position: relative; display: block; overflow: hidden; aspect-ratio: 3 / 4; background: #26251f; text-decoration: none; }
.member-event-image img { width: 100%; height: 100%; object-fit: cover; }
.member-event-placeholder { display: grid; place-items: center; height: 100%; color: var(--brand); font-size: .78rem; font-weight: 900; letter-spacing: .16em; }
.event-status { position: absolute; right: 10px; bottom: 10px; z-index: 4; border-radius: 999px; padding: 5px 10px; background: #fff; font-size: .7rem; font-weight: 900; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.event-status.accepting { background: var(--brand); }
.event-status.full { background: #25241e; color: #fff; }
.event-status.preparing { background: #ece9e0; }
.event-status.cancelled { background: var(--danger); color: #fff; }
.member-event-card-content { display: flex; flex: 1 1 auto; flex-direction: column; padding: 0 18px 18px; }
.member-event-date { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; min-height: 68px; margin: 0 -18px 13px; padding: 11px 18px; background: var(--brand-soft); color: #684e00; }
.member-event-date span { color: #776f5e; font-size: .68rem; writing-mode: vertical-rl; }
.member-event-date strong { font-size: 1.25rem; white-space: nowrap; }
.member-event-date b { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font-size: .75rem; }
.member-event-card-content h2 { margin: 5px 0; font-size: 1.1rem; line-height: 1.45; }
.member-event-card-content h2 a { text-decoration: none; }
.member-event-card-content p { margin: 0 0 13px; color: var(--muted); font-size: .78rem; }
.member-event-card-content > a:last-child { display: inline-flex; align-items: center; min-height: 44px; margin-top: auto; color: #584300; font-size: .8rem; font-weight: 900; }

.member-event-detail { overflow: hidden; }
.member-event-detail-header { display: grid; grid-template-columns: minmax(230px, .55fr) minmax(0, 1fr); gap: 34px; align-items: center; border-bottom: 1px solid var(--border); padding: 28px; }
.member-event-detail-image { position: relative; overflow: hidden; border-radius: 9px; }
.member-event-detail-header img { display: block; width: 100%; max-height: 480px; object-fit: cover; aspect-ratio: 3 / 4; }
.full-booked-ribbon { position: absolute; top: 47%; left: 50%; z-index: 3; width: 145%; transform: translate(-50%, -50%) rotate(-10deg); padding: 11px 8px; background: #c51622; color: #fff; box-shadow: 0 5px 18px rgba(80,0,7,.42); font-size: clamp(1rem, 2vw, 1.35rem); font-weight: 950; letter-spacing: .2em; line-height: 1.15; text-align: center; text-indent: .2em; text-shadow: 0 1px 2px rgba(0,0,0,.35); pointer-events: none; }
.full-booked-ribbon.detail { padding: 16px 10px; font-size: clamp(1.35rem, 4vw, 2.25rem); }
.member-event-detail-header h1 { margin: 6px 0 12px; font-size: clamp(1.75rem, 4vw, 2.75rem); line-height: 1.25; }
.member-event-date { color: #674c00; font-weight: 900; }
.member-event-venue { color: var(--muted); }
.member-event-intro { padding: 25px 28px 0; }
.member-event-intro img { max-width: 100% !important; height: auto !important; }
.booking-panel { margin: 28px; border-top: 6px solid var(--brand); border-radius: 4px 4px 10px 10px; padding: 27px; background: #fbfaf5; }
.booking-panel h2 { margin: 0; font-size: 1.4rem; }
.booking-panel > p { margin: 7px 0 18px; color: var(--muted); font-size: .84rem; }
.booking-limit-notice { display: grid; gap: 3px; margin: 0 0 18px; border-left: 5px solid var(--brand); padding: 12px 15px; background: #fff8dc; }
.booking-limit-notice strong { color: #5d4600; }
.booking-limit-notice span { color: var(--muted); font-size: .78rem; }
.member-locked-card { margin-top: 30px; border-top: 6px solid #81202a; }
.member-locked-card .form-actions form { margin: 0; }
.booking-slot-list { display: grid; gap: 9px; }
.booking-slot { position: relative; display: grid; grid-template-columns: 26px 68px minmax(135px, 1fr) auto; align-items: center; gap: 12px; min-height: 62px; border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px; background: #fff; }
.booking-slot.selectable { cursor: pointer; }
.booking-slot.selectable:hover { border-color: var(--brand-dark); background: #fffaf0; }
.booking-slot input { width: 20px; height: 20px; accent-color: var(--brand-dark); }
.booking-slot .slot-number { font-weight: 900; }
.booking-slot time { font-variant-numeric: tabular-nums; }
.slot-result { border-radius: 999px; padding: 5px 10px; background: #ece9e0; font-size: .7rem; font-weight: 900; text-align: center; }
.slot-result.available { background: #e5f5eb; color: #145d3d; }
.slot-result.provisional { background: #fff0b8; color: #654900; }
.slot-result.waitlist { background: #fff0b8; color: #654900; }
.slot-result.reserved { background: #e6eefb; color: #234f8f; }
.slot-result.closed { color: #69655d; }
.booking-actions { position: sticky; bottom: 8px; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; border: 1px solid #cec6b5; border-radius: 9px; padding: 12px; background: rgba(255,255,255,.97); box-shadow: 0 10px 25px rgba(0,0,0,.13); }
.booking-actions p { margin: 0; color: var(--muted); font-size: .78rem; }
.button, .member-body button.primary { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid transparent; border-radius: 8px; padding: 10px 22px; background: var(--brand); color: #1c1b16; font-weight: 900; text-align: center; text-decoration: none; cursor: pointer; }
.button:hover, .member-body button.primary:hover { background: #e8ab00; }
.button.secondary { border-color: #aaa396; background: #fff; }
.booking-help { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; margin: 0 28px 28px; }
.booking-help div { border: 1px solid var(--border); border-radius: 9px; padding: 17px; background: #fff; }
.booking-help h2 { margin: 0 0 6px; font-size: .95rem; }
.booking-help p { margin: 0; color: var(--muted); font-size: .79rem; }
.booking-help a, .booking-panel > p a { color: #584300; font-weight: 900; }

.member-guide-heading { margin-bottom: 22px; border-left: 6px solid var(--brand); padding: 3px 0 3px 19px; }
.member-guide-heading h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1.25; }
.member-guide-heading p:last-child { max-width: 760px; margin: 8px 0 0; color: var(--muted); }
.guide-current-status { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; border: 1px solid #dbc46d; border-radius: 10px; padding: 17px 20px; background: #fff8dc; }
.guide-current-status strong, .guide-current-status span { display: block; }
.guide-current-status strong { color: #5d4600; }
.guide-current-status span { margin-top: 3px; color: var(--muted); font-size: .82rem; }
.guide-current-status a { flex: 0 0 auto; }
.guide-index { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 22px; }
.guide-index a { display: flex; align-items: center; min-height: 50px; border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; background: #fff; font-size: .82rem; font-weight: 900; text-decoration: none; box-shadow: var(--shadow); }
.guide-index a:hover { border-color: var(--brand-dark); background: #fffaf0; }
.guide-section { margin-top: 20px; padding: clamp(20px, 4vw, 30px); scroll-margin-top: 72px; }
.guide-section > :first-child { margin-top: 0; }
.guide-section > :last-child { margin-bottom: 0; }
.guide-section h2 { margin: 0 0 18px; font-size: clamp(1.25rem, 3vw, 1.55rem); }
.guide-section h3 { margin: 22px 0 8px; font-size: 1rem; }
.guide-section p { color: #4f4c44; }
.guide-section a { color: #584300; font-weight: 900; }
.guide-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: guide-step; }
.guide-steps li { position: relative; min-height: 155px; border: 1px solid var(--border); border-radius: 9px; padding: 50px 15px 16px; background: #faf8f1; counter-increment: guide-step; }
.guide-steps li::before { content: counter(guide-step); position: absolute; top: 14px; left: 15px; display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; background: var(--brand); color: #1b1a16; font-size: .78rem; font-weight: 900; }
.guide-steps strong, .guide-steps span { display: block; }
.guide-steps strong { margin-bottom: 6px; }
.guide-steps span { color: var(--muted); font-size: .79rem; }
.guide-note { margin: 18px 0 0; border-left: 5px solid var(--brand); padding: 13px 16px; background: #fff8dc; }
.guide-note strong, .guide-note span { display: block; }
.guide-note span { margin-top: 4px; color: var(--muted); font-size: .82rem; }
.guide-status-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.guide-status-list div { border: 1px solid var(--border); border-radius: 9px; padding: 14px 16px; background: #faf8f1; }
.guide-status-list dt { font-weight: 900; }
.guide-status-list dd { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }
.guide-check-list { margin: 12px 0; padding-left: 1.4em; }
.guide-check-list li + li { margin-top: 8px; }
.guide-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.terms-consent a { color: #584300; font-weight: 900; }
.member-terms { max-width: 900px; margin-inline: auto; }
.member-terms-heading { margin-bottom: 22px; border-left: 6px solid var(--brand); padding: 3px 0 3px 19px; }
.member-terms-heading h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1.25; }
.member-terms-heading p:last-child { margin: 8px 0 0; color: var(--muted); }
.terms-card { padding: clamp(22px, 5vw, 42px); }
.terms-intro { margin: 0 0 26px; border-left: 5px solid var(--brand); padding: 13px 16px; background: #fff8dc; }
.terms-section { scroll-margin-top: 72px; }
.terms-section + .terms-section { margin-top: 30px; border-top: 1px solid var(--border); padding-top: 26px; }
.terms-section h2 { margin: 0 0 10px; font-size: clamp(1.05rem, 2.5vw, 1.25rem); }
.terms-section p { margin: 8px 0; color: #4f4c44; }
.terms-section ol, .terms-section ul { margin: 9px 0; padding-left: 1.5em; }
.terms-section li + li { margin-top: 7px; }
.terms-section a { color: #584300; font-weight: 900; }
.terms-date { margin: 30px 0 0; color: var(--muted); font-size: .8rem; text-align: right; }

.member-body input:not([type="checkbox"]):not([type="radio"]), .member-body select, .member-body textarea { width: 100%; max-width: 100%; min-height: 48px; border: 1px solid #aaa396; border-radius: 7px; padding: 10px 12px; background: #fff; }
.member-body textarea { min-height: 150px; resize: vertical; }
.member-inquiry-card { width: 100%; max-width: none; padding: clamp(20px, 4vw, 34px); }
.member-inquiry-card #inquiry-body { min-height: 240px; }
.member-profile-card { margin-bottom: 20px; padding: clamp(20px, 4vw, 34px); }
.member-profile-card > :first-child { margin-top: 0; }
.member-profile-card > :last-child { margin-bottom: 0; }
.member-profile-card .form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; }
.auth-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; }
.auth-security-note { display: flex; flex-direction: column; gap: 3px; margin: 18px 0 0; border: 1px solid #d8cfb4; border-radius: 9px; padding: 12px 14px; background: #faf8f1; color: #4c4535; font-size: .84rem; }
.auth-security-note strong { color: var(--brand-dark); }
.mfa-card { max-width: 620px; margin: 0 auto; padding: 32px 30px 36px; }
.mfa-card .auth-panel-heading h1 { margin: 0 0 7px; font-size: clamp(1.35rem, 4vw, 1.8rem); }
.mfa-code-input { max-width: 320px; letter-spacing: .28em; font-size: 1.45rem !important; font-weight: 700; font-variant-numeric: tabular-nums; }
.mfa-secondary-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.mfa-secondary-actions form { margin: 0; }
.mfa-secondary-actions .link-button { min-height: 42px; border: 0; padding: 8px 6px; background: transparent; color: var(--muted); font: inherit; text-decoration: underline; cursor: pointer; }
.member-newsletter-choice { display: flex; align-items: flex-start; gap: 12px; border: 1px solid var(--border); border-radius: 9px; padding: 15px 17px; background: #faf8f1; cursor: pointer; }
.member-newsletter-choice input { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 3px; accent-color: var(--brand-dark); }
.member-newsletter-choice span, .member-newsletter-choice strong, .member-newsletter-choice small { display: block; }
.member-newsletter-choice small { margin-top: 3px; color: var(--muted); }
.member-body .withdraw-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid #7c1922; border-radius: 999px; padding: 10px 24px; background: #8f1c27; color: #fff; font-weight: 900; cursor: pointer; }
.member-body .withdraw-button:hover { background: #741721; }
.member-body input:focus, .member-body select:focus, .member-body textarea:focus { border-color: #856100; box-shadow: 0 0 0 3px rgba(248,184,3,.25); outline: 0; }

@media (max-width: 820px) {
    .member-body.menu-overlay-open { overflow: hidden; }
    .member-site-label { display: none; }
    .member-menu-button { display: block; margin-left: auto; }
    .member-menu-button > span:not(.sr-only) { transition: transform .18s, opacity .18s; }
    .member-menu-button[aria-expanded="true"] {
        position: fixed;
        z-index: 1002;
        top: max(18px, env(safe-area-inset-top));
        right: max(18px, env(safe-area-inset-right));
        box-shadow: 0 8px 24px rgba(0,0,0,.3);
    }
    .member-menu-button[aria-expanded="true"] > span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .member-menu-button[aria-expanded="true"] > span:nth-child(2) { opacity: 0; }
    .member-menu-button[aria-expanded="true"] > span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
    .member-navigation {
        position: fixed;
        z-index: 1000;
        inset: 0;
        display: none;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
        border-top: 7px solid var(--brand);
        border-bottom-width: 0;
        background: var(--ink);
        overscroll-behavior: contain;
    }
    .member-navigation.is-open { display: block; }
    .member-navigation .member-shell {
        display: grid;
        grid-template-columns: 1fr;
        align-content: start;
        gap: 8px;
        width: 100%;
        min-height: 100%;
        padding: calc(84px + env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) calc(32px + env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
    }
    .member-navigation .member-shell::before {
        content: "MEMBERS MENU";
        margin-bottom: 4px;
        color: #c2bba9;
        font-size: .78rem;
        font-weight: 900;
        letter-spacing: .17em;
    }
    .member-navigation a, .member-navigation button {
        justify-content: flex-start;
        width: 100%;
        min-height: 58px;
        border: 1px solid #504d43;
        border-radius: 10px;
        padding: 13px 18px;
        font-size: 1rem;
    }
    .member-navigation form { margin: 0; }
    .member-navigation form button { width: 100%; }
    .member-welcome { align-items: flex-start; flex-direction: column; }
    .member-quick-links { grid-template-columns: 1fr; }
    .member-quick-links a { min-height: 0; }
    .member-event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .member-event-detail-header { grid-template-columns: minmax(190px, .48fr) minmax(0, 1fr); }
    .guide-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .member-shell { width: min(calc(100% - 24px), 1100px); }
    .member-header-inner { min-height: 76px; }
    .member-logo img { width: 175px; }
    .member-container { padding-top: 20px; }
    .member-page-heading { align-items: flex-start; flex-direction: column; }
    .member-welcome { padding: 22px 17px; }
    .member-welcome dl { width: 100%; flex-wrap: wrap; }
    .member-welcome dl div { flex: 1 1 120px; min-width: 0; }
    .identity-notice { grid-template-columns: 1fr; }
    .announcement-card, .history-card { padding: 19px 14px; }
    .announcement-list article { grid-template-columns: 1fr; gap: 3px; }
    .member-event-grid { grid-template-columns: 1fr; }
    .member-event-card { display: grid; grid-template-columns: 41% 59%; }
    .member-event-card-content { align-self: stretch; padding: 0 13px 13px; }
    .member-event-date { min-height: 60px; margin: 0 -13px 9px; padding: 8px 10px; }
    .member-event-detail-header { grid-template-columns: 1fr; padding: 16px; }
    .member-event-detail-header img { max-height: none; }
    .member-event-intro { padding: 20px 16px 0; }
    .booking-panel { margin: 20px 12px; padding: 21px 12px; }
    .booking-slot { grid-template-columns: 25px 53px 1fr; gap: 8px; }
    .booking-slot .slot-result { grid-column: 1 / -1; }
    .booking-actions { align-items: stretch; flex-direction: column; }
    .booking-actions .button { width: 100%; }
    .booking-help { grid-template-columns: 1fr; margin: 0 12px 20px; }
    .guide-current-status { align-items: stretch; flex-direction: column; }
    .guide-current-status .button { width: 100%; }
    .guide-index, .guide-steps, .guide-status-list { grid-template-columns: 1fr; }
    .member-profile-card .form-actions .primary { width: 100%; }
    .member-footer .member-shell { flex-direction: column; }
    .member-footer-links { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* Login history and account security */
.security-page-heading { margin-bottom: 24px; }
.security-page-heading h1 { margin-bottom: 6px; }
.security-page-heading p:last-child { margin: 0; color: var(--muted); }
.account-security-card { margin-bottom: 22px; padding: 28px; }
.account-security-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; }
.account-security-heading h2 { margin: 0 0 7px; color: var(--brand-dark); font-size: clamp(1.25rem, 3vw, 1.6rem); }
.account-security-heading p:not(.eyebrow), .account-security-subheading p { margin: 0; color: var(--muted); font-size: .9rem; }
.account-security-heading form { flex: 0 0 auto; margin: 0; }
.account-security-group { margin-top: 26px; }
.account-security-group + .account-security-group { border-top: 1px solid var(--border); padding-top: 26px; }
.account-security-subheading { margin-bottom: 12px; }
.account-security-subheading h3 { margin: 0 0 4px; font-size: 1.05rem; }
.account-security-list { display: grid; gap: 10px; }
.account-security-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 13px; border: 1px solid var(--border); border-radius: 10px; padding: 15px 16px; background: #fff; }
.account-security-item.is-current { border-color: #d3b95e; background: #fffdf5; }
.account-security-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #e9e6dd; color: #6c6658; font-size: .74rem; }
.account-security-icon.trusted, .account-security-item.is-current .account-security-icon { background: #f8d66e; color: #433400; font-weight: 900; }
.account-security-details { min-width: 0; }
.account-security-item-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.account-security-item-heading strong { color: var(--brand-dark); }
.account-security-meta { display: flex; flex-wrap: wrap; gap: 5px 20px; margin: 7px 0 0; }
.account-security-meta div { display: flex; gap: 6px; }
.account-security-meta dt { color: var(--muted); font-size: .76rem; }
.account-security-meta dd { margin: 0; font-size: .78rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.security-user-agent { overflow: hidden; margin: 6px 0 0; color: var(--muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.security-badge { display: inline-flex; align-items: center; min-height: 24px; border-radius: 999px; padding: 3px 9px; font-size: .7rem; font-weight: 900; white-space: nowrap; }
.security-badge.current { background: #f8d66e; color: #493700; }
.security-badge.success { background: #dcefe2; color: #15592e; }
.security-badge.warning { background: #fae2df; color: #84291f; }
.security-secondary-button, .security-danger-button { min-height: 39px; border-radius: 999px; padding: 8px 15px; background: #fff; font: inherit; font-size: .78rem; font-weight: 900; cursor: pointer; }
.security-secondary-button { border: 1px solid #8a8069; color: var(--brand-dark); }
.security-danger-button { border: 1px solid #a64242; color: #852525; }
.security-secondary-button:hover { background: #f5f1e6; }
.security-danger-button:hover { background: #fff0ee; }
.account-security-empty { margin: 0; border: 1px dashed var(--border); border-radius: 9px; padding: 18px; color: var(--muted); text-align: center; }
.login-event-card { padding-bottom: 24px; }
.security-table-scroll { overflow-x: auto; margin-top: 18px; border: 1px solid var(--border); border-radius: 10px; }
.security-history-table { width: 100%; min-width: 760px; border-collapse: collapse; background: #fff; }
.security-history-table th, .security-history-table td { border-bottom: 1px solid var(--border); padding: 12px 13px; text-align: left; vertical-align: middle; }
.security-history-table th { background: #f6f3ea; color: var(--muted); font-size: .72rem; letter-spacing: .04em; }
.security-history-table td { font-size: .8rem; }
.security-history-table tr:last-child td { border-bottom: 0; }
.security-history-table td:nth-child(1), .security-history-table td:nth-child(4) { font-variant-numeric: tabular-nums; white-space: nowrap; }
.security-history-table td strong, .security-history-table td small { display: block; }
.security-history-table td small { overflow: hidden; max-width: 260px; margin-top: 3px; color: var(--muted); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 650px) {
    .account-security-card { padding: 20px 14px; }
    .account-security-heading { align-items: stretch; flex-direction: column; }
    .account-security-heading .security-secondary-button { width: 100%; }
    .account-security-item { grid-template-columns: 30px minmax(0, 1fr); align-items: start; padding: 14px 12px; }
    .account-security-item > form { grid-column: 2; }
    .account-security-item > form .security-danger-button { width: 100%; }
    .account-security-meta { display: grid; gap: 4px; }
}
