/* =====================================================================
   JLW — "Standard UI" (Material-style member app)
   Loaded AFTER jlw-brand.css. Re-maps the brand tokens to the chosen
   theme (Navy / Maroon / Teal, set by admin in Site Settings) and adds
   the Standard UI components (prefix .s-).
   RULE (same as jlw-brand.css): no transform/filter on page wrappers.
   ===================================================================== */

:root,
[data-theme="navy"] {
    --s-p: #2B2E83;  --s-pd: #1F2266;  --s-tint: #EEEFFA;  --s-soft: #DADCF3;
    --s-p-rgb: 43, 46, 131;
}
[data-theme="maroon"] {
    --s-p: #8C1D40;  --s-pd: #6A1530;  --s-tint: #FBEEF2;  --s-soft: #F3D3DE;
    --s-p-rgb: 140, 29, 64;
}
[data-theme="teal"] {
    --s-p: #0E6E68;  --s-pd: #0A524E;  --s-tint: #E8F4F3;  --s-soft: #CBE6E3;
    --s-p-rgb: 14, 110, 104;
}

:root, [data-theme] {
    /* neutrals */
    --s-bg: #F6F6F9;
    --s-surface: #FFFFFF;
    --s-ink: #1A1B2E;
    --s-ink-2: #3B3D52;
    --s-muted: #5F6175;
    --s-faint: #8A8C9E;
    --s-line: #ECECF2;
    --s-line-2: #F0F0F4;
    --s-amber: #F5A623;
    --s-amber-ink: #3D2A00;
    --s-ok: #17663F;    --s-ok-bg: #E3F2EA;
    --s-warn: #8A5300;  --s-warn-bg: #FFF4DE;
    --s-bad: #B42318;   --s-bad-bg: #FDECEC;
    --s-r: 16px; --s-r-lg: 18px; --s-r-sm: 12px;
    --s-sh: 0 1px 2px rgba(20,20,40,.06);
    --s-sh-2: 0 6px 20px rgba(20,20,40,.10);

    /* re-map the older brand tokens so every existing screen follows the theme */
    --accent: var(--s-p);
    --accent-600: var(--s-pd);
    --accent-50: var(--s-tint);
    --accent-100: var(--s-soft);
    --ink: var(--s-ink);
    --ink-2: var(--s-ink-2);
    --muted: var(--s-muted);
    --line: var(--s-line);
    --bg: var(--s-bg);
    --surface: var(--s-surface);
    --r-xl: 20px; --r-lg: var(--s-r-lg); --r-md: var(--s-r); --r-sm: var(--s-r-sm);
    --sh-1: var(--s-sh);
    --sh-2: var(--s-sh-2);
}

body.jlw-body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: var(--s-bg);
    color: var(--s-ink);
    font-size: 15px;
}
h1, h2, h3, h4, h5, h6 { letter-spacing: -.01em; font-weight: 700; }
.jlw-h1 { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; }
.jlw-h2 { font-size: 1rem; font-weight: 700; letter-spacing: 0; }

/* ---------- Layout ---------- */
.jlw-main { max-width: 520px; padding: 16px 16px 112px; }
.jlw-main.jlw-main--immersive { padding-top: 0; }
.s-bleed { margin-left: -16px; margin-right: -16px; }

/* ---------- Top app bar ---------- */
.s-appbar {
    position: sticky; top: 0; z-index: 1030;
    background: var(--s-surface);
    border-bottom: 1px solid var(--s-line);
}
.s-appbar-inner {
    max-width: 520px; margin: 0 auto; height: 64px;
    display: flex; align-items: center; gap: 6px; padding: 0 6px 0 4px;
}
.s-appbar-brand { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; color: var(--s-ink); }
.s-appbar-brand img { width: 38px; height: 38px; object-fit: contain; flex-shrink: 0; }
.s-appbar-brand .t { font-size: 16px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-appbar-brand .s { font-size: 12px; font-weight: 500; color: var(--s-muted); line-height: 1.2; }
.s-iconbtn {
    width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--s-ink-2);
    display: inline-flex; align-items: center; justify-content: center; position: relative; flex-shrink: 0;
    text-decoration: none; font-size: 1.25rem; transition: background .15s ease;
}
.s-iconbtn:hover, .s-iconbtn:focus-visible { background: var(--s-bg); color: var(--s-ink); }
.s-iconbtn .s-count {
    position: absolute; top: 6px; right: 5px; min-width: 17px; height: 17px; padding: 0 4px;
    border-radius: 9px; background: #D92D20; color: #fff; font-size: 10px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; border: 2px solid var(--s-surface); box-sizing: content-box;
}
.s-iconbtn.is-accent { color: var(--s-p); }

/* Page header used by inner screens (title + actions, optional tabs) */
.s-pagehead { background: var(--s-surface); border-bottom: 1px solid var(--s-line); margin: -16px -16px 14px; }
.s-pagehead-row { height: 60px; display: flex; align-items: center; gap: 4px; padding: 0 8px 0 16px; }
.s-pagehead h1 { flex: 1; margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.s-pagehead .meta { font-size: 13px; color: var(--s-muted); font-weight: 500; }
.s-pagehead-pad { padding: 0 16px 12px; }

/* Tabs with underline indicator */
.s-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.s-tab {
    height: 48px; border: 0; background: transparent; font: inherit; font-size: 14px; font-weight: 500;
    color: var(--s-muted); border-bottom: 3px solid transparent; text-decoration: none;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.s-tab.active { color: var(--s-p); font-weight: 700; border-bottom-color: var(--s-p); }
.s-tab .n { font-size: 11px; font-weight: 700; background: var(--s-tint); color: var(--s-p); border-radius: 9px; padding: 1px 7px; }

/* ---------- Bottom navigation (Material 3) ---------- */
.jlw-bottomnav.s-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040;
    background: var(--s-surface); border-top: 1px solid var(--s-line);
    padding: 0 0 env(safe-area-inset-bottom); box-shadow: none;
}
.s-nav .jlw-bottomnav-inner { max-width: 520px; margin: 0 auto; height: 76px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; }
.s-nav .jlw-nav-link {
    display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0;
    font-size: 12px; font-weight: 500; color: var(--s-muted); text-decoration: none; position: relative;
}
.s-nav .jlw-nav-link .ico { width: 60px; height: 32px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.s-nav .jlw-nav-link.active { color: var(--s-ink); font-weight: 700; }
.s-nav .jlw-nav-link.active .ico { background: var(--s-tint); color: var(--s-p); }
.s-nav .jlw-nav-link .dot { position: absolute; top: 2px; left: calc(50% + 10px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #D92D20; color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* ---------- Generic surfaces ---------- */
.s-card { background: var(--s-surface); border-radius: var(--s-r-lg); box-shadow: var(--s-sh); }
.s-section { margin-bottom: 16px; }
.s-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.s-section-head h2 { margin: 0; font-size: 16px; font-weight: 700; }
.s-link { font-size: 13px; font-weight: 600; color: var(--s-p); text-decoration: none; padding: 8px 0; }
.s-link:hover { color: var(--s-pd); }
.jlw-card { border-radius: var(--s-r-lg); box-shadow: var(--s-sh); }
.jlw-section-title { font-size: 16px; font-weight: 700; }
.jlw-section-title .link-more { color: var(--s-p); font-weight: 600; }

/* chips / badges */
.s-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; padding: 4px 8px; border-radius: 6px; background: #F2F2F6; color: var(--s-ink); white-space: nowrap; }
.s-chip.is-p { background: var(--s-tint); color: var(--s-p); }
.s-chip.is-ok { background: var(--s-ok-bg); color: var(--s-ok); }
.s-chip.is-warn { background: var(--s-warn-bg); color: var(--s-warn); }
.s-chip.is-bad { background: var(--s-bad-bg); color: var(--s-bad); }
.s-chip.is-muted { background: #EDEDF2; color: var(--s-muted); }
.s-chip.is-lg { font-size: 12px; padding: 5px 10px; border-radius: 8px; }

.s-filter { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.s-filter::-webkit-scrollbar { display: none; }
.s-filter button, .s-filter a {
    flex-shrink: 0; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid #D6D7E0; background: var(--s-surface);
    color: var(--s-ink-2); font: inherit; font-size: 13px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.s-filter .active { background: var(--s-tint); color: var(--s-p); border-color: var(--s-p); }

/* search field */
.s-search { height: 48px; border-radius: 24px; background: #F1F1F5; display: flex; align-items: center; gap: 10px; padding: 0 16px; color: var(--s-muted); text-decoration: none; }
.s-search i { font-size: 1.05rem; }
.s-search input { flex: 1; border: 0; background: transparent; font: inherit; font-size: 14.5px; color: var(--s-ink); outline: none; min-width: 0; }
.s-search .spin { margin-left: auto; }

/* buttons */
.s-btn {
    height: 52px; padding: 0 22px; border-radius: 14px; border: 0; background: var(--s-p); color: #fff;
    font: inherit; font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    text-decoration: none; transition: background .15s ease;
}
.s-btn:hover, .s-btn:focus { background: var(--s-pd); color: #fff; }
.s-btn:disabled { opacity: .55; }
.s-btn.is-block { width: 100%; }
.s-btn.is-sm { height: 40px; padding: 0 14px; border-radius: 10px; font-size: 13px; }
.s-btn.is-outline { background: var(--s-surface); color: var(--s-p); border: 1.5px solid var(--s-p); }
.s-btn.is-outline:hover { background: var(--s-tint); color: var(--s-p); }
.s-btn.is-ghost { background: var(--s-surface); color: var(--s-ink); border: 1px solid var(--s-line); }
.s-btn.is-white { background: #fff; color: var(--s-p); }
.jlw-btn-primary { background: var(--s-p); border-color: var(--s-p); border-radius: 14px; }
.jlw-btn-primary:hover, .jlw-btn-primary:focus { background: var(--s-pd); border-color: var(--s-pd); box-shadow: 0 8px 20px rgba(var(--s-p-rgb), .22); }
.jlw-btn-soft { background: var(--s-tint); color: var(--s-p); border-color: var(--s-tint); }
.form-control:focus, .form-select:focus { border-color: var(--s-p); box-shadow: 0 0 0 4px rgba(var(--s-p-rgb), .12); }

/* ---------- Home ---------- */
.s-hello { margin: 2px 0 14px; }
.s-hello .k { font-size: 14px; color: var(--s-muted); }
.s-hello .n { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }

.s-banner { position: relative; height: 168px; border-radius: var(--s-r-lg); overflow: hidden; background: var(--s-p); color: #fff; display: block; text-decoration: none; }
.s-banner:hover { color: #fff; }
.s-banner .img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.s-banner .shade { position: absolute; inset: 0; background: rgba(10,10,30,.42); }
.s-banner .wm { position: absolute; right: -36px; top: -12px; width: 196px; height: 196px; object-fit: contain; opacity: .14; }
.s-banner .body { position: absolute; inset: 0; padding: 18px; display: flex; flex-direction: column; }
.s-banner .tag { align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: 1px; background: var(--s-amber); color: var(--s-amber-ink); padding: 4px 9px; border-radius: 6px; text-transform: uppercase; }
.s-banner .t { font-size: 22px; font-weight: 800; line-height: 1.15; margin-top: 10px; max-width: 92%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.s-banner .m { font-size: 13px; color: rgba(255,255,255,.88); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-banner .cta { margin-top: auto; align-self: flex-start; background: #fff; color: var(--s-p); font-size: 13px; font-weight: 700; padding: 9px 14px; border-radius: 10px; }
.s-carousel .carousel-indicators { position: static; margin: 10px 0 0; gap: 6px; }
.s-carousel .carousel-indicators [data-bs-target] { width: 6px; height: 6px; border-radius: 3px; background: #CFD0DB; opacity: 1; border: 0; margin: 0; transition: width .2s ease, background .2s ease; }
.s-carousel .carousel-indicators .active { width: 18px; background: var(--s-p); }

.s-quick { background: var(--s-surface); border-radius: var(--s-r-lg); box-shadow: var(--s-sh); padding: 16px 8px 8px; display: grid; grid-template-columns: repeat(4, 1fr); row-gap: 8px; }
.s-quick a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-bottom: 8px; text-decoration: none; color: var(--s-ink); font-size: 12px; font-weight: 500; text-align: center; line-height: 1.2; }
.s-quick .ico { width: 48px; height: 48px; border-radius: 14px; background: var(--s-tint); color: var(--s-p); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; position: relative; }
.s-quick .ico.is-solid { background: var(--s-p); color: #fff; }
.s-quick .ico .n { position: absolute; top: -5px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #D92D20; color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; box-sizing: content-box; }

.s-next { display: flex; gap: 12px; align-items: center; padding: 12px; text-decoration: none; color: var(--s-ink); }
.s-next:hover { color: var(--s-ink); }
.s-datebox { width: 56px; flex-shrink: 0; border-radius: 12px; background: var(--s-p); color: #fff; text-align: center; padding: 7px 0; line-height: 1.05; }
.s-datebox .m { display: block; font-size: 11px; font-weight: 700; letter-spacing: 1px; opacity: .9; }
.s-datebox .d { display: block; font-size: 22px; font-weight: 800; }
.s-next .t { font-size: 15px; font-weight: 700; line-height: 1.3; }
.s-next .s { font-size: 12.5px; color: var(--s-muted); margin-top: 2px; }
.s-countdown { display: flex; gap: 6px; margin-top: 8px; }
.s-countdown span { font-size: 11.5px; font-weight: 700; background: var(--s-tint); color: var(--s-p); padding: 3px 8px; border-radius: 6px; }

.s-bday { padding: 14px 16px; }
.s-bday-row { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.s-stack { display: flex; }
.s-stack > * { border: 2px solid #fff !important; box-shadow: none !important; }
.s-stack > * + * { margin-left: -10px; }
.s-bday-row .who { flex: 1; min-width: 0; font-size: 13.5px; color: var(--s-ink-2); }

.s-hlist { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 6px; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; }
.s-hlist::-webkit-scrollbar { display: none; }
.s-hlist > * { scroll-snap-align: start; flex-shrink: 0; }

.s-evmini { width: 232px; background: var(--s-surface); border-radius: var(--s-r); box-shadow: var(--s-sh); overflow: hidden; text-decoration: none; color: var(--s-ink); }
.s-evmini:hover { color: var(--s-ink); }
.s-evmini .media { position: relative; height: 112px; background: var(--s-p); }
.s-evmini .media > * { width: 100%; height: 100%; }
.s-evmini .date { position: absolute; left: 10px; top: 10px; background: #fff; border-radius: 10px; padding: 4px 9px; text-align: center; line-height: 1.05; }
.s-evmini .date .m { display: block; font-size: 10.5px; font-weight: 700; color: var(--s-p); }
.s-evmini .date .d { display: block; font-size: 18px; font-weight: 800; color: var(--s-ink); }
.s-evmini .b { padding: 10px 12px 12px; }
.s-evmini .t { font-size: 14.5px; font-weight: 700; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-evmini .s { font-size: 12.5px; color: var(--s-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.s-notice { display: flex; gap: 12px; padding: 12px 14px; text-decoration: none; color: var(--s-ink); }
.s-notice + .s-notice { border-top: 1px solid var(--s-line-2); }
.s-notice .bar { width: 4px; border-radius: 4px; background: var(--s-soft); flex-shrink: 0; }
.s-notice.is-pinned .bar { background: var(--s-amber); }
.s-notice .t { font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-notice .s { font-size: 12.5px; color: var(--s-muted); margin-top: 1px; }

.s-quote { padding: 16px 18px; border-left: 0; text-decoration: none; display: block; color: var(--s-ink); }
.s-quote .k { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; color: var(--s-p); }
.s-quote .q { font-size: 15px; font-weight: 600; line-height: 1.5; margin-top: 6px; }
.s-quote .a { font-size: 12.5px; color: var(--s-muted); margin-top: 4px; }

.s-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.s-stats > * { background: var(--s-surface); border-radius: var(--s-r); box-shadow: var(--s-sh); padding: 12px; text-decoration: none; color: var(--s-ink); }
.s-stats .n { font-size: 20px; font-weight: 800; }
.s-stats .l { font-size: 12px; color: var(--s-muted); font-weight: 500; }

/* ---------- Events list ---------- */
.s-evcard { display: flex; gap: 12px; background: var(--s-surface); border-radius: var(--s-r); padding: 10px; text-decoration: none; color: var(--s-ink); box-shadow: var(--s-sh); }
.s-evcard:hover { color: var(--s-ink); box-shadow: var(--s-sh-2); }
.s-evcard .poster { width: 92px; height: 108px; flex-shrink: 0; border-radius: 12px; overflow: hidden; position: relative; background: var(--s-pd); color: #fff; }
.s-evcard .poster > .jlw-media-img, .s-evcard .poster > .jlw-media-placeholder { width: 100%; height: 100%; }
.s-evcard .poster .shade { position: absolute; inset: 0; background: rgba(10,10,30,.38); }
.s-evcard .poster .date { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.s-evcard .poster .date .m { font-size: 12px; font-weight: 700; letter-spacing: 1px; opacity: .92; }
.s-evcard .poster .date .d { font-size: 30px; font-weight: 800; margin: 2px 0; }
.s-evcard .poster .date .w { font-size: 12px; font-weight: 600; opacity: .92; }
.s-evcard.is-past .poster { background: #8A8C9E; }
.s-evcard .body { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 2px 4px 2px 0; }
.s-evcard .t { font-size: 15.5px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.s-evcard .ln { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--s-muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-evcard .ln i { font-size: 13px; }
.s-evcard .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.s-month { font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--s-muted); text-transform: uppercase; margin: 6px 2px 0; }

/* ---------- Event detail ---------- */
.jlw-cover { height: 250px; margin: 0 -16px; background: var(--s-p); }
.jlw-cover .jlw-media-placeholder { background: var(--s-p); }
.jlw-cover .jlw-media-placeholder .jlw-media-wm { opacity: .16; filter: brightness(0) invert(1); }
.jlw-cover-btn { width: 44px; height: 44px; top: 12px; left: 12px; background: rgba(0,0,0,.30); color: #fff; border: 0; backdrop-filter: none; }
.jlw-cover-btn--right { left: auto; right: 12px; }
.jlw-sheet { position: relative; margin: -24px -16px 0; background: var(--s-surface); border-radius: 24px 24px 0 0; padding: 20px 20px 0; box-shadow: none; min-height: calc(100vh - 226px); }
.jlw-sheet .jlw-h1 { font-size: 24px; margin-top: 8px; }
.jlw-info-list { background: transparent; box-shadow: none; padding: 0; margin: 16px 0; }
.jlw-info-row { padding: 8px 0; gap: 14px; }
.jlw-info-row + .jlw-info-row { border-top: 0; }
.jlw-info-row .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--s-tint); color: var(--s-p); font-size: 1.15rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.jlw-info-row .t { font-size: 15px; font-weight: 600; }
.jlw-info-row .s { font-size: 13px; color: var(--s-muted); }
.jlw-going-block { background: transparent; box-shadow: none; padding: 0; }
.jlw-price-chip { border-radius: 8px; font-size: 12px; font-weight: 700; padding: 5px 10px; background: var(--s-ok-bg); color: var(--s-ok); }
.jlw-price-chip.is-paid { background: var(--s-tint); color: var(--s-p); }
.jlw-cta-bar { background: var(--s-surface); border-top: 1px solid var(--s-line); box-shadow: none; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
.jlw-cta-price .label { font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.jlw-cta-price .value { font-size: 20px; }
.jlw-cta-actions .btn { height: 50px; border-radius: 14px; padding: 0 20px; display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Members directory ---------- */
.s-list { background: var(--s-surface); border-radius: var(--s-r-lg); box-shadow: var(--s-sh); overflow: hidden; }
.s-person { display: flex; align-items: center; gap: 12px; padding: 0 6px 0 14px; min-height: 68px; }
.s-person + .s-person { border-top: 1px solid var(--s-line-2); }
.s-person .who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--s-ink); padding: 10px 0; }
.s-person .nm { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-person .sub { font-size: 12.5px; color: var(--s-muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-person .s-iconbtn { width: 44px; height: 44px; font-size: 1.15rem; }
.s-person .s-iconbtn.is-call { color: var(--s-p); }
.s-person .s-iconbtn.is-wa { color: #128C4A; }

/* ---------- Profile ---------- */
.s-profile-head { background: var(--s-p); color: #fff; margin: -16px -16px 0; padding: 14px 16px 64px; }
.s-profile-head .top { display: flex; align-items: center; justify-content: space-between; }
.s-profile-head h1 { color: #fff; font-size: 22px; font-weight: 700; margin: 0; }
.s-profile-head .s-iconbtn { color: #fff; }
.s-profile-head .s-iconbtn:hover { background: rgba(255,255,255,.12); color: #fff; }
.s-profile-head .me { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.s-profile-head .ring { border-radius: 50%; border: 3px solid var(--s-amber); flex-shrink: 0; position: relative; }
.s-profile-head .nm { font-size: 20px; font-weight: 700; line-height: 1.2; }
.s-profile-head .ph { font-size: 13px; color: rgba(255,255,255,.85); margin-top: 2px; }
.s-profile-head .role { font-size: 12.5px; font-weight: 700; color: #FFD48A; margin-top: 2px; }

.s-idcard { position: relative; margin-top: -48px; background: var(--s-surface); border-radius: var(--s-r-lg); padding: 16px; box-shadow: var(--s-sh-2); }
.s-idcard .head { display: flex; align-items: center; gap: 10px; }
.s-idcard .head img { width: 40px; height: 40px; object-fit: contain; }
.s-idcard .k { font-size: 12px; color: var(--s-muted); font-weight: 500; }
.s-idcard .uid { font-size: 19px; font-weight: 800; letter-spacing: 1px; }
.s-idcard .tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.s-idcard .tiles > div { background: var(--s-bg); border-radius: 12px; padding: 10px 12px; }
.s-idcard .tiles .v { font-size: 14px; font-weight: 700; }
.s-idcard .qr { display: flex; justify-content: center; margin-top: 14px; }
.s-idcard .qr svg { width: 168px; height: 168px; }

.s-menu { background: var(--s-surface); border-radius: var(--s-r-lg); box-shadow: var(--s-sh); overflow: hidden; }
.s-menu-row { display: flex; align-items: center; gap: 14px; min-height: 54px; padding: 0 16px; width: 100%; border: 0; background: transparent; text-decoration: none; color: var(--s-ink); font: inherit; font-size: 15px; font-weight: 500; text-align: left; }
.s-menu-row + .s-menu-row { border-top: 1px solid var(--s-line-2); }
.s-menu-row > i:first-child { color: var(--s-p); font-size: 1.15rem; width: 22px; text-align: center; }
.s-menu-row .t { flex: 1; }
.s-menu-row .chev { color: #9A9CAE; }
.s-menu-row .badge-n { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: var(--s-tint); color: var(--s-p); }
.s-menu-row .badge-n.is-red { background: #D92D20; color: #fff; }
.s-menu-row:hover { background: #FAFAFC; color: var(--s-ink); }
.s-logout { height: 50px; border-radius: 14px; background: var(--s-surface); border: 0; box-shadow: var(--s-sh); color: var(--s-bad); font: inherit; font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }

/* ---------- Login (OTP) ---------- */
body.jlw-auth-body { background: var(--s-surface); }
.s-auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; background: var(--s-surface); }
.s-auth-brand { background: var(--s-p); color: #fff; padding: 52px 24px 40px; text-align: center; border-radius: 0 0 32px 32px; }
.s-auth-logo { width: 96px; height: 96px; margin: 0 auto; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.s-auth-logo img { width: 82px; height: 82px; object-fit: contain; }
.s-auth-brand h1 { color: #fff; margin: 20px 0 0; font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.s-auth-brand .chap { margin: 6px 0 0; font-size: 13px; letter-spacing: 2px; font-weight: 600; color: #F5C46B; }
.s-auth-brand .tag { margin: 12px 0 0; font-size: 14px; color: rgba(255,255,255,.85); }
.s-auth-body { flex: 1; padding: 32px 24px 0; }
.s-auth-body h2 { margin: 0; font-size: 22px; font-weight: 700; }
.s-auth-body .lead { margin: 6px 0 0; font-size: 14px; color: var(--s-muted); line-height: 1.5; }
.s-auth-label { display: block; margin-top: 24px; font-size: 13px; font-weight: 600; color: var(--s-ink-2); }
.s-phone { margin-top: 8px; height: 56px; border: 1.5px solid #D6D7E0; border-radius: 14px; display: flex; align-items: center; overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease; }
.s-phone:focus-within { border-color: var(--s-p); box-shadow: 0 0 0 4px rgba(var(--s-p-rgb), .12); }
.s-phone .cc { padding: 0 14px; height: 100%; display: flex; align-items: center; font-size: 16px; font-weight: 600; background: var(--s-tint); border-right: 1px solid var(--s-line); }
.s-phone input { flex: 1; min-width: 0; border: 0; outline: none; padding: 0 14px; font: inherit; font-size: 17px; font-weight: 500; letter-spacing: .5px; color: var(--s-ink); background: transparent; }
.s-otp { margin-top: 22px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.s-otp input { height: 54px; min-width: 0; border: 1.5px solid #D6D7E0; border-radius: 12px; text-align: center; font: inherit; font-size: 22px; font-weight: 700; color: var(--s-ink); outline: none; }
.s-otp input.filled, .s-otp input:focus { border-color: var(--s-p); }
.s-otp input:focus { box-shadow: 0 0 0 4px rgba(var(--s-p-rgb), .12); }
.s-auth-note { margin-top: 18px; font-size: 13px; color: var(--s-muted); text-align: center; line-height: 1.5; }
.s-auth-note a, .s-auth-note button { color: var(--s-p); font-weight: 700; }
.s-back { border: 0; background: transparent; padding: 0; height: 44px; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 14px; font-weight: 600; color: var(--s-p); }
.s-auth-foot { padding: 20px 24px 28px; text-align: center; font-size: 12px; color: var(--s-faint); }

/* ---------- Shared bits ---------- */
.jlw-offcanvas .list-group-item.active { background: var(--s-tint); color: var(--s-p); }
.jlw-offcanvas .list-group-item.active i { color: var(--s-p); }
.jlw-media-placeholder { background: var(--s-tint); }
#jlwSplash { background: var(--s-p) !important; }
.s-empty { text-align: center; color: var(--s-muted); padding: 40px 16px; }
.s-empty i { font-size: 2.2rem; display: block; margin-bottom: 8px; color: var(--s-faint); }
.s-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

@media (prefers-reduced-motion: reduce) {
    .s-carousel .carousel-item { transition: none; }
}

/* ---------- Self-registration (/join) ---------- */
.s-join .s-join-brand { padding: 36px 24px 28px; }
.s-join .s-join-brand .s-auth-logo { width: 72px; height: 72px; }
.s-join .s-join-brand .s-auth-logo img { width: 60px; height: 60px; }
.s-join .s-join-brand h1 { margin-top: 14px; font-size: 21px; }
.s-join .s-auth-body { padding-top: 24px; padding-bottom: 8px; }
.s-join-h { margin: 26px 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--s-p); }
.s-join-l { display: block; margin: 2px 0 4px; font-size: 12.5px; font-weight: 600; color: var(--s-ink-2); }
.s-join .form-control, .s-join .form-select { height: 48px; border-radius: 12px; border: 1.5px solid #D6D7E0; font-size: 15px; }
.s-join .s-phone { height: 48px; border-radius: 12px; }
.s-join .s-phone input { font-size: 15px; }
.s-join-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.s-join-seg button { display: flex; align-items: center; gap: 10px; text-align: left; padding: 12px; border-radius: 14px; border: 1.5px solid #D6D7E0; background: var(--s-surface); font: inherit; color: var(--s-ink); min-height: 64px; }
.s-join-seg button i { font-size: 20px; color: var(--s-muted); }
.s-join-seg button b { display: block; font-size: 15px; }
.s-join-seg button small { display: block; font-size: 11.5px; color: var(--s-muted); line-height: 1.3; }
.s-join-seg button.active { border-color: var(--s-p); background: var(--s-tint); }
.s-join-seg button.active i { color: var(--s-p); }
.s-join-plans { margin-top: 10px; display: grid; gap: 8px; }
.s-join-plan { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--s-line); cursor: pointer; margin: 0; }
.s-join-plan .dot { width: 18px; height: 18px; flex: 0 0 18px; border-radius: 50%; border: 2px solid #B9BBC8; }
.s-join-plan.active { border-color: var(--s-p); }
.s-join-plan.active .dot { border: 5px solid var(--s-p); }
.s-join-plan b { display: block; font-size: 14.5px; }
.s-join-plan small { display: block; font-size: 12px; color: var(--s-muted); line-height: 1.35; }
.s-join-plan .amt { font-weight: 800; font-size: 15px; color: var(--s-p); white-space: nowrap; }
.s-join-info { margin-top: 10px; font-size: 12.5px; color: var(--s-ink-2); background: var(--s-tint); border-radius: 10px; padding: 8px 10px; }
.s-join-photo { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px dashed #C4C6D3; border-radius: 14px; cursor: pointer; margin: 0; }
.s-join-photo i { font-size: 22px; color: var(--s-p); }
.s-join-photo img { width: 44px; height: 54px; object-fit: cover; border-radius: 6px; }
.s-join-photo b { display: block; font-size: 14px; }
.s-join-photo small { display: block; font-size: 12px; color: var(--s-muted); }
.s-join-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.s-join-done { width: 72px; height: 72px; margin: 8px auto 0; border-radius: 50%; background: #E7F6EC; color: #1A7F3C; display: flex; align-items: center; justify-content: center; font-size: 38px; }
.s-join-formno { display: inline-block; margin-top: 14px; padding: 8px 14px; border-radius: 10px; background: var(--s-tint); font-size: 14px; }
.s-join-steps { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--s-ink-2); line-height: 1.55; }
.s-join-steps li + li { margin-top: 6px; }

/* Self-registration — full form wizard */
.s-join .s-join-brand.is-compact { display: flex; align-items: center; gap: 14px; text-align: left; padding: 18px 20px; border-radius: 0 0 22px 22px; }
.s-join .s-join-brand.is-compact .s-auth-logo { width: 48px; height: 48px; flex: 0 0 48px; margin: 0; }
.s-join .s-join-brand.is-compact .s-auth-logo img { width: 40px; height: 40px; }
.s-join .s-join-brand.is-compact h1 { margin: 0; font-size: 17px; }
.s-join .s-join-brand.is-compact .chap { margin-top: 2px; font-size: 11px; }
.s-join .s-join-brand.is-compact .tag { display: none; }
.s-join-progress { padding: 18px 24px 0; }
.s-join-stepicon { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; background: var(--s-tint); color: var(--s-p); display: flex; align-items: center; justify-content: center; font-size: 19px; }
.s-join-stepno { font-size: 12px; font-weight: 600; color: var(--s-muted); }
.s-join-steptitle { font-size: 19px; font-weight: 800; color: var(--s-ink); line-height: 1.2; }
.s-join-bar { margin-top: 12px; height: 6px; border-radius: 6px; background: var(--s-line); overflow: hidden; }
.s-join-bar span { display: block; height: 100%; background: var(--s-p); border-radius: 6px; transition: width .25s ease; }
.s-join-dots { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.s-join-dots button { width: 22px; height: 22px; padding: 0; border: 0; background: transparent; position: relative; }
.s-join-dots button::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: #D6D7E0; }
.s-join-dots button.ok::after { background: rgba(var(--s-p-rgb), .45); }
.s-join-dots button.cur::after { inset: 5px; background: var(--s-p); }
.s-join-dots button:disabled { cursor: default; }
.s-err { margin-top: 4px; font-size: 12.5px; color: #C0352B; }
.s-hint { margin-top: 4px; font-size: 12px; color: var(--s-muted); line-height: 1.4; }
.s-linkbtn { border: 0; background: transparent; padding: 4px 2px; font: inherit; font-size: 13px; font-weight: 700; color: var(--s-p); text-transform: none; letter-spacing: 0; }
.s-join .form-control.is-invalid, .s-join .form-select.is-invalid { border-color: #D92D20; }
.s-join .s-phone.is-bad { border-color: #D92D20; }
.s-join textarea.form-control { height: auto; }
.s-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.s-opt { position: relative; margin: 0; cursor: pointer; }
.s-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.s-opt span { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border-radius: 20px; border: 1.5px solid #D6D7E0; font-size: 14px; font-weight: 600; color: var(--s-ink-2); background: var(--s-surface); line-height: 1.25; }
.s-opt input:checked + span { border-color: var(--s-p); background: var(--s-p); color: #fff; }
.s-opt input:focus-visible + span { box-shadow: 0 0 0 4px rgba(var(--s-p-rgb), .18); }
.s-checks { display: grid; gap: 6px; }
.s-check { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 11px 12px; border-radius: 12px; border: 1.5px solid var(--s-line); cursor: pointer; font-size: 14px; line-height: 1.35; color: var(--s-ink-2); }
.s-check input { width: 20px; height: 20px; flex: 0 0 20px; margin: 0; accent-color: var(--s-p); }
.s-check:has(input:checked) { border-color: var(--s-p); background: var(--s-tint); color: var(--s-ink); }
.s-check--box { font-size: 13.5px; }
.s-join-rowcard { border: 1.5px solid var(--s-line); border-radius: 14px; padding: 12px; margin-bottom: 10px; }
.s-join-fee { display: flex; justify-content: space-between; gap: 12px; padding: 14px; border-radius: 14px; background: var(--s-p); color: #fff; }
.s-join-fee small { display: block; font-size: 11.5px; opacity: .8; }
.s-join-fee b { display: block; font-size: 22px; font-weight: 800; }
.s-join-fee b.fav { font-size: 13.5px; font-weight: 700; line-height: 1.3; }
.s-join-doc { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border: 1.5px dashed #C4C6D3; border-radius: 14px; margin-bottom: 10px; }
.s-join-doc.has { border-style: solid; border-color: var(--s-p); background: var(--s-tint); }
.s-join-doc.bad { border-color: #D92D20; }
.s-join-doc-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; margin: 0; cursor: pointer; }
.s-join-doc .thumb { width: 44px; height: 52px; flex: 0 0 44px; border-radius: 8px; background: var(--s-surface); display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--s-p); font-size: 22px; box-shadow: inset 0 0 0 1px var(--s-line); }
.s-join-doc .thumb img { width: 100%; height: 100%; object-fit: cover; }
.s-join-doc b { display: block; font-size: 14px; line-height: 1.3; }
.s-join-doc b .req { font-size: 10.5px; font-weight: 700; color: #C0352B; background: #FDECEA; border-radius: 6px; padding: 1px 6px; margin-left: 4px; vertical-align: 1px; }
.s-join-doc small { display: block; font-size: 12px; color: var(--s-muted); line-height: 1.35; }
.s-join-review { padding: 4px 14px; }
.s-join-review .r { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--s-line); }
.s-join-review .r:last-child { border-bottom: 0; }
.s-join-review .k { flex: 0 0 34%; font-size: 12.5px; color: var(--s-muted); }
.s-join-review .v { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--s-ink); word-break: break-word; }
.s-join-decl { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--s-ink-2); line-height: 1.5; }
.s-join-decl li + li { margin-top: 6px; }
.s-join-actions { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; margin: 20px -24px 0; padding: 12px 24px calc(12px + env(safe-area-inset-bottom)); background: var(--s-surface); box-shadow: 0 -6px 18px rgba(0,0,0,.06); }
.s-join .lead { font-size: 13.5px; }
.s-auth-foot a { color: var(--s-p); font-weight: 600; }
.s-btn.is-ghost:hover, .s-btn.is-ghost:focus { background: var(--s-tint); color: var(--s-ink); }
.s-join-fee > div:first-child { flex: 0 0 auto; }
.s-join-fee > div:last-child { flex: 1; min-width: 0; }
.s-join-fee b { white-space: nowrap; }
.s-join-fee b.fav { white-space: normal; }
.s-join-errs { margin-top: 16px; padding: 12px 14px; border-radius: 14px; background: #FDECEA; color: #8A1C14; font-size: 13px; }
.s-join-errs .hd { font-weight: 700; display: flex; gap: 6px; align-items: flex-start; }
.s-join-errs ul { margin: 6px 0 0; padding-left: 22px; }
.s-join-errs .other { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: #fff; }
.s-join-errs .other b { display: block; font-size: 13px; color: var(--s-ink); }
.s-join-errs .other small { display: block; font-size: 12px; color: #8A1C14; line-height: 1.35; }
.s-req { color: #D92D20; font-weight: 800; margin-left: 1px; }
.s-join-doc b .req { color: #D92D20; }

/* OTP validity + device restore */
.s-otp-exp { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px; background: var(--s-tint); color: var(--s-ink-2); font-size: 13px; }
.s-otp-exp strong { color: var(--s-ink); font-variant-numeric: tabular-nums; }
.s-otp-exp.is-low { background: #FFF4E5; color: #8A4B00; }
.s-otp-exp.is-low strong { color: #8A4B00; }
.s-otp-exp.is-expired { background: #FDECEA; color: #B42318; font-weight: 600; }
.s-restoring { display: none; position: fixed; inset: 0; z-index: 2000; background: var(--s-surface); flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--s-ink-2); font-weight: 600; }
.s-restoring .spinner-border { color: var(--s-p); width: 2.4rem; height: 2.4rem; }
.jlw-restoring .s-restoring { display: flex; }

/* Self-registration v3: member type + verified lookup */
.s-join-seg--stack { grid-template-columns: 1fr; }
.s-join-seg--stack button { min-height: 72px; }
.s-join-seg--stack button .bi-chevron-right { font-size: 16px; }
.s-join-lookup { padding: 14px; border-radius: 14px; border: 1.5px solid var(--s-line); }
.s-join-verified { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: #E7F6EC; color: #14532D; }
.s-join-verified i { font-size: 22px; color: #1A7F3C; }
.s-join-verified b { display: block; font-size: 14px; }
.s-join-verified small { display: block; font-size: 12.5px; line-height: 1.4; }
.s-join .s-phone.is-locked { background: var(--s-tint); }
.s-join .s-phone.is-locked input { color: var(--s-ink); font-weight: 600; }

/* <x-date-picker> on the join page */
.s-join .jlw-date { display: flex; align-items: center; }
