:root {
    --blue: #1d4ed8;
    --blue-dark: #1e3a8a;
    --orange: #f97316;
    --orange-dark: #ea580c;
    --ink: #1a2233;
    --muted: #5b6472;
    --bg: #f7f8fa;
    --card: #ffffff;
    --border: #e4e7ec;
    --fail-bg: #fdecec;
    --fail-fg: #b42318;
    --fail-border: #f5c2c0;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Header ---------- */

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    max-width: 1080px;
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 19px;
    color: var(--ink);
}

.brand:hover { text-decoration: none; }

.brand-mark {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 26px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--muted);
    font-weight: 600;
    font-size: 15px;
}

.nav-links a.active,
.nav-links a:hover {
    color: var(--blue);
    text-decoration: none;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--ink);
}

@media (max-width: 720px) {
    .nav-toggle { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 62px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        gap: 0;
        border-bottom: 1px solid var(--border);
    }
    .nav-links.open { display: flex; }
    .nav-links a { display: block; padding: 14px 24px; border-top: 1px solid var(--border); }
}

/* ---------- Hero ---------- */

.hero {
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    color: #fff;
    padding: 64px 0 76px;
}

/* Scrolling "Welcome new members" line under the homepage hero (right to left, looping) */
.welcome-ticker {
    background: var(--blue-dark);
    color: #fff;
    overflow: hidden;
    white-space: nowrap;
    padding: 12px 0;
    font-size: 17px;
}
.welcome-ticker-track {
    display: flex;
    width: max-content;
    animation: welcome-ticker-scroll linear infinite;
}
.welcome-ticker:hover .welcome-ticker-track { animation-play-state: paused; }
.welcome-ticker-item { flex-shrink: 0; min-width: 100vw; padding-right: 80px; }
.welcome-ticker-item strong { color: #fde68a; }
.welcome-ticker-sep { margin: 0 22px; color: #fde68a; }
@keyframes welcome-ticker-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.hero-inner {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.hero-text { flex: 1 1 360px; }

.hero-text h1 {
    font-size: 40px;
    line-height: 1.15;
    margin: 0 0 16px;
}

.hero-text p {
    font-size: 17px;
    color: #dbe6ff;
    max-width: 480px;
    margin: 0 0 28px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-art { flex: 1 1 320px; display: flex; justify-content: center; }

.hero-photo {
    width: 100%;
    max-width: 460px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 16px;
    border: 4px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn:hover { text-decoration: none; }

.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); }

.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.6); }
.btn-outline:hover { background: rgba(255,255,255,0.12); }

.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); }

/* ---------- Sections ---------- */

.section { padding: 60px 0; }
.section-alt { background: #fff; }

.section-head { text-align: center; max-width: 620px; margin: 0 auto 40px; }
.section-head .eyebrow {
    color: var(--orange);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.section-head h2 { font-size: 30px; margin: 8px 0 10px; }
.section-head p { color: var(--muted); margin: 0; }

/* ---------- Cards ---------- */

.grid {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.04);
}

.card .badge {
    display: inline-block;
    background: #eaf1ff;
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 12px;
}
/* Upcoming/Past label on homepage cards: same size as .level-tag */
.card .badge.status-badge { font-size: 17px; padding: 7px 18px; }
a.badge { text-decoration: none; }
a.badge:hover { filter: brightness(0.95); text-decoration: underline; }

.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.card .meta { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.card .meta strong { color: var(--ink); }

/* ---------- Testimonials ---------- */

.testimonial {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 26px;
}
.testimonial p.quote {
    font-size: 15px;
    font-style: italic;
    color: var(--ink);
    margin: 0 0 14px;
}
.testimonial .who { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.testimonial .who span { font-weight: 400; color: var(--muted); }
.testimonial .who-photo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; cursor: zoom-in; }

.spotlight-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.spotlight-photo {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    cursor: zoom-in;
    margin-bottom: 14px;
    border: 3px solid var(--card, #fff);
    box-shadow: 0 0 0 1px var(--border);
}
.spotlight-name { font-weight: 700; font-size: 17px; color: var(--ink); }
.spotlight-affiliation { font-size: 13px; color: var(--muted); margin-top: 2px; margin-bottom: 14px; }
.spotlight-joined { font-size: 13px; font-weight: 600; color: var(--orange); margin: -8px 0 14px; }

/* Homepage "Happy Birthday" section (members with a birthday this month) */
.section-birthday { background: linear-gradient(180deg, #fff7ed 0%, #fdf2f8 100%); }
.spotlight-birthday { font-size: 14px; font-weight: 700; color: #db2777; margin: -8px 0 14px; }
.birthday-today {
    display: inline-block;
    background: #db2777;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 999px;
    margin: -6px 0 14px;
}
.field-hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.spotlight-card p.quote { margin: 0; }
.search-bar {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
    max-width: 560px; margin: 0 auto 28px;
}
.search-bar input[type="search"] {
    flex: 1 1 240px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}
.search-bar-clear { font-size: 14px; }
.spotlight-card[hidden], .tournament-card[hidden] { display: none; }
.spotlight-photo-placeholder {
    display: flex; align-items: center; justify-content: center;
    background: var(--blue); color: #fff; font-size: 34px; font-weight: 700; cursor: default;
}

/* Member detail popup (homepage "Our Members") */
.member-modal-box {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 32px 28px 26px;
    max-width: 720px;
    width: 100%;
    max-height: 100%;
    overflow-y: auto;
    text-align: center;
    display: flex; flex-direction: column; align-items: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.member-modal-photo {
    display: block;
    max-width: 100%;
    max-height: 55vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    margin-bottom: 16px;
}
.member-modal-box p.quote { margin: 0; font-style: italic; white-space: pre-line; }
.member-modal-close {
    position: absolute; top: 8px; right: 12px;
    background: none; border: none; font-size: 28px; line-height: 1;
    color: var(--muted); cursor: pointer; padding: 4px 8px;
}
.member-modal-close:hover { color: #f97316; }

/* ---------- Calendar / Table ---------- */

.event-row {
    display: flex;
    align-items: center;
    gap: 18px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
}

.event-date {
    background: var(--blue);
    color: #fff;
    border-radius: 10px;
    text-align: center;
    padding: 8px 12px;
    min-width: 62px;
    flex-shrink: 0;
}
.event-date .day { font-size: 20px; font-weight: 800; line-height: 1; }
.event-date .mon { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }

.event-info { flex: 1; min-width: 0; }
.event-info h4 { margin: 0 0 4px; font-size: 16px; }
.event-info .meta { font-size: 13px; color: var(--muted); }

.level-tag {
    font-size: 17px;
    font-weight: 700;
    padding: 7px 18px;
    border-radius: 999px;
    flex-shrink: 0;
}
.level-beginner { background: #e6f7ec; color: #16794c; }
.level-intermediate { background: #fff4e0; color: #b45309; }
.level-advanced { background: #fdecea; color: #b3261e; }
.level-all { background: #eaf1ff; color: #1d4ed8; }

/* ---------- Contact form ---------- */

.contact-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 34px;
}
@media (max-width: 780px) {
    .contact-grid { grid-template-columns: 1fr; }
}

form.contact-form label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin: 14px 0 6px;
}
form.contact-form input,
form.contact-form select,
form.contact-form textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}
form.contact-form textarea { resize: vertical; min-height: 110px; }
form.contact-form select { background: #fff; color: var(--ink); }

.info-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
}
.info-box h3 { margin-top: 0; }
.info-line { display: flex; gap: 12px; margin-bottom: 14px; font-size: 14px; }
.info-line svg { flex-shrink: 0; margin-top: 2px; }
.map-placeholder {
    margin-top: 18px;
    border-radius: 12px;
    height: 160px;
    background:
        repeating-linear-gradient(45deg, #eaf1ff, #eaf1ff 10px, #f2f6ff 10px, #f2f6ff 20px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    font-weight: 700;
    font-size: 13px;
    border: 1px dashed #b9cdfa;
}

.contact-map {
    display: block;
    width: 100%;
    height: 220px;
    margin-top: 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
}

/* Honeypot field: hidden from people, but spam bots fill it in. */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.label-hint { font-weight: 400; color: var(--muted); }
.join-section { border-top: 1px solid var(--border); scroll-margin-top: 70px; }
.info-box p { font-size: 14px; }
.join-steps { padding-left: 20px; margin: 0; font-size: 14px; line-height: 1.7; }
.page-hero p a { color: inherit; text-decoration: underline; }

.form-note {
    font-size: 12px;
    color: var(--muted);
    margin-top: 10px;
}

/* ---------- CTA banner ---------- */

.cta {
    background: var(--orange);
    color: #fff;
    text-align: center;
    padding: 46px 24px;
    border-radius: 18px;
}
.cta h2 { margin: 0 0 10px; font-size: 26px; }
.cta p { margin: 0 0 22px; color: #fff2e6; }

/* ---------- Footer ---------- */

.site-footer {
    background: var(--ink);
    color: #cbd3e1;
    padding: 46px 0 24px;
    margin-top: 30px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}
@media (max-width: 720px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-grid h4 { color: #fff; font-size: 14px; margin: 0 0 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; font-size: 14px; }
.footer-grid a { color: #cbd3e1; }
.footer-grid a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 17px; margin-bottom: 10px; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 18px;
    font-size: 13px;
    color: #8b93a3;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

/* ---------- Page header (non-home pages) ---------- */

.page-hero {
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    color: #fff;
    padding: 46px 0;
    text-align: center;
}
.page-hero h1 { margin: 0 0 8px; font-size: 32px; }
.page-hero p { margin: 0; color: #dbe6ff; }


/* ---------- Tournament list / detail toggle ---------- */

.tournament-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tournament-card {
    display: flex;
    align-items: center;
    gap: 18px;
    width: 100%;
    text-align: left;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.tournament-card-thumb {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.tournament-card:hover {
    border-color: var(--blue);
    box-shadow: 0 4px 14px rgba(29, 78, 216, 0.12);
}

.tournament-arrow {
    margin-left: auto;
    color: var(--blue);
    font-size: 18px;
    flex-shrink: 0;
}

.tournament-detail .detail-heading {
    font-size: 20px;
    margin: 40px 0 16px;
}
.tournament-detail .detail-heading:first-of-type {
    margin-top: 8px;
}

.back-link {
    background: none;
    border: none;
    color: var(--blue);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    margin-bottom: 24px;
}
.back-link:hover { text-decoration: underline; }

/* ---------- Admin: flash, empty state, delete button ---------- */

.flash {
    background: #eaf1ff;
    color: #1d4ed8;
    border: 1px solid #c3d7fb;
    padding: 10px 16px;
    border-radius: 10px;
    margin: 0 0 16px;
    font-size: 14px;
}
.flash-error {
    background: var(--fail-bg);
    color: var(--fail-fg);
    border-color: var(--fail-border);
}

.empty {
    color: var(--muted);
    font-size: 14px;
    padding: 10px 0;
}

.delete-btn {
    background: var(--danger, #d3372f);
    color: #fff;
    border: none;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.delete-btn:hover { background: #b32d26; }
.confirm-pending { background: #7a1f1a !important; }

.btn-small { padding: 6px 12px; font-size: 13px; border-radius: 6px; }

/* ---------- Lightbox (full-scale photo viewer) ---------- */

.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 20, 30, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 40px 40px 84px;
    overflow: hidden;
    touch-action: none;
}
.lightbox-overlay.open { display: flex; }

.lightbox-full {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform-origin: center center;
    transition: transform 0.12s ease-out;
    cursor: zoom-in;
    user-select: none;
    -webkit-user-drag: none;
}
.lightbox-overlay.zoomed .lightbox-full { cursor: grab; }
.lightbox-overlay.zoomed .lightbox-full:active { cursor: grabbing; transition: none; }

.lightbox-controls {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 999px;
    padding: 6px;
    z-index: 2;
}
.lightbox-btn {
    min-width: 40px;
    height: 40px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    padding: 0 12px;
    font-family: inherit;
}
.lightbox-btn:hover:not(:disabled) { background: #f97316; }
.lightbox-btn:disabled { opacity: 0.35; cursor: default; }
.lightbox-btn-reset { font-size: 14px; }
.lightbox-zoom-level {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    min-width: 52px;
    text-align: center;
}

/* ‹ › buttons, only shown for a gallery of more than one photo */
.lightbox-nav {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    padding: 0;
    cursor: pointer;
}
.lightbox-nav svg { display: block; margin: auto; }
.lightbox-nav:hover { background: #f97316; }
.lightbox-nav-prev { left: 16px; }
.lightbox-nav-next { right: 16px; }
.lightbox-overlay.has-gallery .lightbox-nav { display: block; }
.lightbox-overlay.has-gallery { padding-left: 84px; padding-right: 84px; }
.lightbox-counter { display: none; color: #fff; font-size: 14px; font-weight: 700; padding: 0 10px 0 8px; }
.lightbox-overlay.has-gallery .lightbox-counter { display: inline; }
@media (max-width: 600px) {
    .lightbox-nav { width: 44px; height: 44px; }
    .lightbox-nav-prev { left: 6px; }
    .lightbox-nav-next { right: 6px; }
    .lightbox-overlay.has-gallery { padding-left: 16px; padding-right: 16px; }
}

.lightbox-close {
    position: absolute;
    z-index: 2;
    top: 20px;
    right: 28px;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
}
.lightbox-close:hover { color: #f97316; }

/* ---------- Comments ---------- */

.comment-item { border-bottom: 1px solid var(--border); padding: 14px 0; }
.comment-item:last-child { border-bottom: none; }
.comment-author { font-weight: 700; font-size: 14px; }
.comment-date { color: var(--muted); font-size: 12px; margin-left: 8px; }
.comment-body { margin: 6px 0 0; white-space: pre-line; }

/* ---------- Tournament participants & results ---------- */
.participant-count { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.participant-list { display: flex; flex-wrap: wrap; gap: 8px; }
.participant-chip {
    display: inline-flex; align-items: center; gap: 8px;
    background: #f7f8fa; border: 1px solid var(--border); border-radius: 999px;
    padding: 4px 14px 4px 4px; font-size: 14px;
}
button.participant-chip { font: inherit; color: inherit; cursor: pointer; }
button.participant-chip:hover { border-color: var(--blue); background: #eef2ff; }
.participant-chip img, .participant-initial {
    width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.participant-initial {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--blue); color: #fff; font-size: 13px; font-weight: 700;
}
.result-category { font-weight: 700; margin: 18px 0 6px; }
.result-category:first-child { margin-top: 0; }
.result-row {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 8px 0; border-bottom: 1px solid var(--border);
}
.result-row:last-child { border-bottom: none; }
.result-place { min-width: 140px; font-weight: 600; }
.result-names { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.result-amp { color: var(--muted); font-weight: 600; }

/* Tournament history inside the member Detail popup */
.member-history { width: 100%; text-align: left; margin-top: 20px; border-top: 1px solid var(--border); padding-top: 14px; }
.member-history h4 { margin: 0 0 10px; font-size: 15px; }
.member-history ul { list-style: none; margin: 0; padding: 0; }
.member-history li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.member-history li:last-child { border-bottom: none; }
.member-history .mh-date { color: var(--muted); font-size: 12px; margin-left: 6px; }
.member-history .mh-result { display: block; margin-top: 3px; font-size: 13px; }
.member-history .empty { margin: 0; }

/* ---------- Search page ---------- */
.search-section-title { margin: 30px 0 12px; font-size: 20px; }
.search-member {
    display: flex; gap: 16px; align-items: flex-start;
    background: var(--card); border: 1px solid var(--border); border-radius: 12px;
    padding: 16px 20px; margin-bottom: 12px;
}
.search-member > img, .search-member > .participant-initial { width: 56px; height: 56px; font-size: 22px; }
.search-member-body { flex: 1; min-width: 0; }
.search-member-body .spotlight-name { text-align: left; }
.search-member-body ul { margin: 8px 0 0; padding-left: 18px; font-size: 14px; }
.search-member-body li { margin: 4px 0; }
.search-member-body .mh-date { color: var(--muted); font-size: 12px; }
a.tournament-card { text-decoration: none; color: inherit; }

/* ---------- YouTube videos (tournament + activity detail) ---------- */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.video-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.video-thumb, .video-card iframe {
    display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; background: #000;
}
.video-thumb { position: relative; cursor: pointer; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-play {
    position: absolute; top: 50%; left: 50%; width: 68px; height: 48px; transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7); border-radius: 12px; transition: background 0.15s;
}
.video-play::after {
    content: ''; position: absolute; top: 50%; left: 54%; transform: translate(-50%, -50%);
    border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff;
}
.video-thumb:hover .video-play, .video-thumb:focus-visible .video-play { background: #f00; }
.video-title { padding: 10px 14px; font-size: 14px; font-weight: 600; }

/* Member Detail popup as a large window (2026-10-17): nearly full screen but
   framed — dark page behind, rounded white window with a shadow — so it
   clearly reads as something to close. The window scrolls; contents stay in
   a readable centred column; a sticky "× Close" button stays in view. */
#member-modal { padding: 32px; touch-action: auto; }  /* the photo lightbox's touch-action: none would block finger-scrolling here */
#member-modal .member-modal-box {
    max-width: 1000px; width: 100%; height: 100%; max-height: none;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    padding: 0 32px 40px;
    justify-content: flex-start;
    overscroll-behavior: contain;
}
#member-modal .member-modal-box > * { width: 100%; max-width: 860px; }
#member-modal .member-modal-photo { width: auto; max-height: 60vh; flex-shrink: 0; }
#member-modal .spotlight-name { font-size: 26px; }
#member-modal .spotlight-affiliation { font-size: 16px; margin-bottom: 12px; }
#member-modal .member-modal-box p.quote { font-size: 18px; }
#member-modal .member-history { margin-top: 28px; }
#member-modal .member-history h4 { font-size: 18px; }
#member-modal .member-history li { font-size: 15px; padding: 12px 0; }
#member-modal .member-history .mh-result { font-size: 14px; }
#member-modal .member-modal-close {
    position: sticky; top: 0; z-index: 1;
    align-self: flex-end; width: auto; max-width: none;
    margin: 12px -16px 12px 0;
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0;  /* hides the markup's own ×; the label comes from ::before / ::after */
    font-weight: 600; line-height: 1; color: #fff;
    background: #1f2937; border-radius: 999px; padding: 9px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
#member-modal .member-modal-close::before { content: '\00d7'; font-size: 22px; font-weight: 400; }
#member-modal .member-modal-close::after { content: 'Close'; font-size: 15px; }
#member-modal .member-modal-close:hover { background: #f97316; color: #fff; }
@media (max-width: 600px) {
    #member-modal { padding: 12px; }
    #member-modal .member-modal-box { padding: 0 16px 28px; border-radius: 12px; }
    #member-modal .member-modal-close { margin-right: -4px; }
    #member-modal .member-modal-photo { max-height: 45vh; }
}
