/* ==========================================================
   اتبعني — "Sunrise" theme · mobile-first, warm & hopeful
   ========================================================== */

:root {
    /* surfaces */
    --bg:          #FFF8F0;
    --bg-2:        #FFF1E4;
    --surface:     #FFFFFF;
    --surface-2:   #FFFAF5;
    --line:        #F2E6DA;
    --line-2:      #EADBCB;

    /* ink */
    --ink:         #2A1E3F;
    --ink-2:       #4A3F5E;
    --muted:       #8A7F9C;

    /* brand */
    --sun:         #FFB23F;
    --orange:      #FF7A45;
    --coral:       #FF5D7A;
    --mint:        #1FBF94;
    --mint-soft:   #E3F8F1;
    --sky:         #3D9BFF;
    --sky-soft:    #E6F2FF;
    --lilac:       #8B6CFF;
    --lilac-soft:  #F0EBFF;
    --peach-soft:  #FFEDE2;
    --sun-soft:    #FFF4DC;
    --rose-soft:   #FFE8ED;
    --danger:      #E5484D;

    --grad-sun:    linear-gradient(135deg, #FFC24B 0%, #FF8A47 48%, #FF5D7A 100%);
    --grad-dawn:   linear-gradient(160deg, #FFE3C2 0%, #FFD1D8 55%, #E9DEFF 100%);
    --grad-mint:   linear-gradient(135deg, #4BE3B5 0%, #1FBF94 100%);
    --grad-sky:    linear-gradient(135deg, #6CC1FF 0%, #3D7BFF 100%);
    --grad-lilac:  linear-gradient(135deg, #B79CFF 0%, #7B5CFF 100%);

    --r-xl: 28px;
    --r-lg: 22px;
    --r:    16px;
    --r-sm: 12px;

    --sh-1: 0 1px 2px rgba(74,45,20,.05), 0 4px 14px rgba(74,45,20,.06);
    --sh-2: 0 6px 24px rgba(255,122,69,.18), 0 2px 6px rgba(74,45,20,.06);
    --sh-3: 0 18px 40px rgba(255,93,122,.28);

    --appbar-h: 62px;
    --tabbar-h: 74px;
    --ease: cubic-bezier(.2,.8,.2,1);
    --spring: cubic-bezier(.34,1.56,.64,1);

    --font: 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Baloo Bhaijaan 2', 'Tajawal', system-ui, sans-serif;

    /* bootstrap bridges */
    --bs-body-font-family: var(--font);
    --bs-body-color: var(--ink);
    --bs-body-bg: var(--bg);
    --bs-border-color: var(--line);
    --bs-link-color: var(--orange);
    --bs-link-hover-color: var(--coral);
    --bs-link-color-rgb: 255,122,69;
    --bs-link-hover-color-rgb: 255,93,122;
    --bs-primary: var(--orange);
    --bs-primary-rgb: 255,122,69;
    --bs-success-rgb: 31,191,148;
    --bs-secondary-color: var(--muted);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}
body::before {          /* soft sunrise wash */
    content: "";
    position: fixed; inset: 0 0 auto 0; height: 420px;
    background:
        radial-gradient(60% 70% at 85% 0%, rgba(255,194,75,.28) 0%, transparent 70%),
        radial-gradient(50% 60% at 5% 10%, rgba(255,93,122,.14) 0%, transparent 70%);
    pointer-events: none; z-index: -1;
}
h1,h2,h3,h4,h5,h6 { color: var(--ink); font-weight: 800; line-height: 1.35; }
a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--coral); }
::selection { background: rgba(255,178,63,.4); }
.ic { flex-shrink: 0; vertical-align: middle; }
.display { font-family: var(--font-display); }
.num { font-family: var(--font-display); font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid rgba(255,122,69,.45); outline-offset: 2px; border-radius: 10px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #F0C9A8; border-radius: 8px; }

.page {
    flex: 1 0 auto;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 18px 16px 28px;
}
body.has-tabbar .page { padding-bottom: calc(var(--tabbar-h) + 32px + env(safe-area-inset-bottom)); }
@media (min-width: 992px) {
    .page { padding: 32px 24px 48px; }
    body.has-tabbar .page { padding-bottom: 48px; }
}

/* ==========================================================
   App bar
   ========================================================== */
.appbar {
    position: sticky; top: 0; z-index: 1030;
    height: var(--appbar-h);
    display: flex; align-items: center;
    background: rgba(255,248,240,.82);
    backdrop-filter: saturate(1.6) blur(14px);
    -webkit-backdrop-filter: saturate(1.6) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s, box-shadow .2s;
}
.appbar.scrolled { border-color: var(--line); box-shadow: 0 6px 20px rgba(74,45,20,.06); }
.appbar-inner {
    width: 100%; max-width: 1120px; margin: 0 auto;
    padding: 0 16px; display: flex; align-items: center; gap: 12px;
}
.brand {
    display: inline-flex; align-items: center; gap: 10px;
    color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 1.45rem;
}
.brand:hover { color: var(--ink); }
.brand-mark {
    width: 38px; height: 38px; border-radius: 13px;
    display: grid; place-items: center;
    background: var(--grad-sun); color: #fff;
    box-shadow: var(--sh-2);
    position: relative; overflow: hidden;
}
.brand-mark::after {
    content: ""; position: absolute; inset: -40%;
    background: conic-gradient(from 0deg, transparent 0 70%, rgba(255,255,255,.55) 80%, transparent 90%);
    animation: spin 6s linear infinite;
}
.brand-mark svg { position: relative; z-index: 1; }
.appbar-nav { display: none; margin-inline-start: 18px; gap: 4px; }
.appbar-nav a {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 14px; border-radius: 999px;
    color: var(--ink-2); font-weight: 700; font-size: .95rem;
    transition: background .2s, color .2s;
}
.appbar-nav a:hover { background: var(--peach-soft); color: var(--orange); }
.appbar-nav a.active { background: var(--ink); color: #fff; }
@media (min-width: 992px) { .appbar-nav { display: flex; } }
.appbar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
    position: relative;
    width: 42px; height: 42px; border-radius: 14px;
    display: grid; place-items: center;
    background: var(--surface); color: var(--ink);
    border: 1px solid var(--line);
    box-shadow: var(--sh-1);
    transition: transform .15s var(--spring), background .2s;
}
.icon-btn:hover { color: var(--orange); background: var(--surface); }
.icon-btn:active { transform: scale(.9); }
.icon-btn .dot {
    position: absolute; top: -4px; inset-inline-end: -4px;
    min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
    background: var(--coral); color: #fff; font-size: .7rem; font-weight: 800;
    display: grid; place-items: center; border: 2px solid var(--bg);
    animation: pop .5s var(--spring);
}
.me-chip { display: inline-flex; align-items: center; gap: 8px; padding: 3px; padding-inline-end: 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 700; box-shadow: var(--sh-1); }
.me-chip:hover { color: var(--orange); }
.me-chip .me-name { display: none; }
@media (min-width: 992px) { .me-chip .me-name { display: inline; } }
@media (max-width: 991.98px) { .me-chip { padding-inline-end: 3px; } }

/* ==========================================================
   Avatars
   ========================================================== */
.avatar {
    --h: 24;
    width: 40px; height: 40px; border-radius: 50%;
    display: inline-grid; place-items: center; flex-shrink: 0;
    font-weight: 800; font-size: .95rem; color: #fff;
    background: linear-gradient(135deg, hsl(var(--h) 92% 66%), hsl(calc(var(--h) + 35) 85% 58%));
    box-shadow: inset 0 -3px 0 rgba(0,0,0,.08);
    overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 32px; height: 32px; font-size: .78rem; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.2rem; }
.avatar.xl { width: 104px; height: 104px; font-size: 2.2rem; border: 4px solid #fff; box-shadow: var(--sh-2); }

/* ==========================================================
   Bottom tab bar (mobile)
   ========================================================== */
.tabbar {
    position: fixed; z-index: 1040;
    inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    height: var(--tabbar-h);
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    border-radius: 26px;
    box-shadow: 0 12px 36px rgba(74,45,20,.14);
    padding: 0 6px;
}
@media (min-width: 992px) { .tabbar { display: none; } }
.tab {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    height: 100%; color: var(--muted); font-size: .72rem; font-weight: 700;
    background: none; border: 0; padding: 0;
    position: relative; transition: color .2s;
}
.tab .ic { transition: transform .3s var(--spring); }
.tab:active .ic { transform: scale(.82); }
.tab.active { color: var(--orange); }
.tab.active::before {
    content: ""; position: absolute; top: 8px; width: 46px; height: 32px; border-radius: 12px;
    background: var(--peach-soft); z-index: -1; animation: pop .35s var(--spring);
}
.tab-fab { position: relative; }
.tab-fab .fab {
    width: 62px; height: 62px; margin-top: -30px; border-radius: 22px;
    display: grid; place-items: center; color: #fff;
    background: var(--grad-sun); box-shadow: var(--sh-3);
    border: 4px solid var(--bg);
    transform: rotate(-6deg);
    transition: transform .3s var(--spring);
}
.tab-fab:active .fab { transform: rotate(0) scale(.9); }
.tab-fab.active .fab { animation: wiggle 2.8s ease-in-out infinite; }
.tab-fab.active::before { display: none; }
.tab-fab .fab-done {
    position: absolute; top: -34px; inset-inline-end: calc(50% - 38px);
    width: 22px; height: 22px; border-radius: 50%; background: var(--mint); color: #fff;
    display: grid; place-items: center; border: 2px solid #fff;
}

/* ==========================================================
   Bottom sheet (More menu) — bootstrap offcanvas-bottom
   ========================================================== */
.sheet.offcanvas-bottom {
    height: auto; max-height: 88dvh;
    border: 0 !important;
    border-radius: 30px 30px 0 0;
    background: var(--bg);
    padding-bottom: env(safe-area-inset-bottom);
}
.sheet .grabber { width: 44px; height: 5px; border-radius: 9px; background: var(--line-2); margin: 10px auto 4px; }
.sheet .offcanvas-body { padding: 8px 18px 24px; }
.sheet-user {
    display: flex; align-items: center; gap: 14px;
    padding: 16px; border-radius: var(--r-lg);
    background: var(--grad-sun); color: #fff; margin-bottom: 16px;
    box-shadow: var(--sh-2);
}
.sheet-user .avatar { border: 3px solid rgba(255,255,255,.7); }
.sheet-user b { font-size: 1.1rem; display: block; }
.sheet-user small { opacity: .9; }
.sheet-user a { color: #fff; }
.tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    padding: 16px 6px; border-radius: 20px; text-align: center;
    background: var(--surface); border: 1px solid var(--line);
    color: var(--ink); font-weight: 700; font-size: .85rem;
    transition: transform .2s var(--spring), box-shadow .2s;
    position: relative;
}
.tile:hover { color: var(--ink); box-shadow: var(--sh-1); transform: translateY(-2px); }
.tile:active { transform: scale(.94); }
.tile .tile-ic { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; }
.tile .badge-dot { position: absolute; top: 10px; inset-inline-end: 14px; background: var(--coral); color:#fff; border-radius: 99px; font-size: .68rem; padding: 2px 7px; font-weight: 800; }
.t-peach { background: var(--peach-soft); color: var(--orange); }
.t-mint  { background: var(--mint-soft);  color: var(--mint); }
.t-sky   { background: var(--sky-soft);   color: var(--sky); }
.t-lilac { background: var(--lilac-soft); color: var(--lilac); }
.t-sun   { background: var(--sun-soft);   color: #D98A00; }
.t-rose  { background: var(--rose-soft);  color: var(--coral); }
.sheet-logout {
    margin-top: 14px; width: 100%;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px; border-radius: 18px; border: 1.5px dashed var(--line-2);
    background: transparent; color: var(--danger); font-weight: 800;
}

/* ==========================================================
   Toasts (flash messages)
   ========================================================== */
.toast-stack {
    position: fixed; z-index: 1080; top: calc(var(--appbar-h) + 10px);
    inset-inline: 12px; display: flex; flex-direction: column; gap: 10px; align-items: center;
    pointer-events: none;
}
.toasty {
    pointer-events: auto;
    width: 100%; max-width: 460px;
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: 18px;
    background: var(--surface); color: var(--ink);
    box-shadow: 0 14px 40px rgba(74,45,20,.18);
    border: 1px solid var(--line);
    animation: toast-in .5s var(--spring) both;
    position: relative; overflow: hidden;
}
.toasty.out { animation: toast-out .35s var(--ease) forwards; }
.toasty .t-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; color: #fff; }
.toasty.success .t-ic { background: var(--grad-mint); }
.toasty.error .t-ic { background: linear-gradient(135deg,#FF8A8A,#E5484D); }
.toasty.info .t-ic { background: var(--grad-sky); }
.toasty .t-msg { flex: 1; font-weight: 700; font-size: .93rem; line-height: 1.5; }
.toasty .t-x { background: none; border: 0; color: var(--muted); padding: 4px; }
.toasty .t-bar { position: absolute; bottom: 0; inset-inline-start: 0; height: 3px; width: 100%; background: currentColor; opacity: .18; transform-origin: right; animation: bar 5s linear forwards; }

/* ==========================================================
   Page headers
   ========================================================== */
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.page-head .back {
    width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center;
    background: var(--surface); border: 1px solid var(--line); color: var(--ink);
}
.page-head h1, .aurora-section-title {
    font-family: var(--font-display);
    font-size: 1.65rem; font-weight: 700; margin: 0; color: var(--ink); line-height: 1.3;
}
.aurora-section-title { margin-bottom: 1rem; }
.page-head .sub { color: var(--muted); font-size: .9rem; font-weight: 500; margin-top: 2px; }
.page-head .actions { margin-inline-start: auto; display: flex; gap: 8px; flex-shrink: 0; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .78rem; font-weight: 800; letter-spacing: .02em;
    color: var(--orange); background: var(--peach-soft);
    padding: 5px 12px; border-radius: 999px;
}
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 12px; }
.section-title h2, .section-title h3 { font-size: 1.15rem; margin: 0; font-weight: 800; }
.section-title a { font-weight: 700; font-size: .88rem; }
@media (min-width: 768px) { .page-head h1, .aurora-section-title { font-size: 2rem; } }

/* ==========================================================
   Cards
   ========================================================== */
.card, .aurora-card, .s-card {
    background: var(--surface);
    border: 1px solid var(--line) !important;
    border-radius: var(--r-lg) !important;
    box-shadow: var(--sh-1);
    color: var(--ink);
}
.card-body { padding: 18px; color: var(--ink); }
.card-img-top { border-radius: var(--r-lg) var(--r-lg) 0 0 !important; }
.s-card { padding: 18px; }
.s-card.pad-lg { padding: 22px; }
.lift { transition: transform .25s var(--spring), box-shadow .25s; }
.lift:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(74,45,20,.1); }
.lift:active { transform: scale(.98); }
.aurora-card { transition: transform .25s var(--spring), box-shadow .25s; }

/* ==========================================================
   Buttons
   ========================================================== */
.btn {
    font-weight: 800; border-radius: 16px; padding: .72rem 1.3rem;
    transition: transform .15s var(--spring), box-shadow .2s, background .2s, color .2s;
    position: relative; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:active { transform: scale(.96); }
.btn-sm { padding: .45rem .95rem; font-size: .85rem; border-radius: 12px; }
.btn-lg { padding: .95rem 1.6rem; font-size: 1.05rem; border-radius: 18px; }
.btn-aurora, .btn-primary, .btn-sun {
    background: var(--grad-sun) !important; color: #fff !important; border: 0 !important;
    box-shadow: var(--sh-2);
}
.btn-aurora:hover, .btn-primary:hover, .btn-sun:hover { box-shadow: var(--sh-3); color: #fff; }
.btn-outline-aurora, .btn-soft {
    background: var(--peach-soft) !important; color: var(--orange) !important; border: 0 !important;
}
.btn-outline-aurora:hover, .btn-soft:hover { background: #FFE0CF !important; }
.btn-ghost { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--line-2); color: var(--ink); background: var(--surface-2); }
.btn-mint { background: var(--grad-mint) !important; color: #fff !important; border: 0; box-shadow: 0 8px 20px rgba(31,191,148,.28); }
.btn-mint:hover { color: #fff; }
.btn-sky { background: var(--sky-soft); color: var(--sky); border: 0; }
.btn-sky:hover { background: #D6E9FF; color: var(--sky); }
.btn-wa { background: #E3F8EC; color: #13A35A; border: 0; }
.btn-wa:hover { background: #D0F2DE; color: #0E8A4B; }
.btn-light { background: #fff; color: var(--ink); border: 0; }
.btn-outline-light { color: var(--ink); border: 1px solid var(--line); background: var(--surface); }
.btn-outline-light:hover { background: var(--surface-2); color: var(--ink); }
.btn-outline-secondary { color: var(--ink-2); border: 1px solid var(--line-2); background: var(--surface); }
.btn-outline-secondary:hover { background: var(--bg-2); color: var(--ink); border-color: var(--line-2); }
.btn-outline-danger { color: var(--danger); border: 0; background: #FDECEC; }
.btn-outline-danger:hover { background: #FAD9DA; color: var(--danger); }
.btn-block { width: 100%; }
.btn .ripple {
    position: absolute; border-radius: 50%; transform: scale(0);
    background: rgba(255,255,255,.55); animation: ripple .6s linear; pointer-events: none;
}
.btn-soft .ripple, .btn-ghost .ripple, .btn-outline-aurora .ripple { background: rgba(255,122,69,.25); }
.btn.is-loading { pointer-events: none; opacity: .85; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite; display: inline-block; }
.btn-soft .spinner, .btn-ghost .spinner { border-color: rgba(255,122,69,.25); border-top-color: var(--orange); }

/* ==========================================================
   Chips, badges, pills
   ========================================================== */
.badge { font-weight: 800; border-radius: 999px; padding: .42em .8em; font-size: .74rem; }
.bg-level, .badge.bg-level { background: var(--lilac-soft) !important; color: var(--lilac) !important; }
.aurora-badge-leader { background: var(--grad-sun) !important; color: #fff !important; }
.bg-success { background: var(--mint-soft) !important; color: #0F9B76 !important; }
.bg-secondary { background: #F1ECF5 !important; color: var(--ink-2) !important; }
.bg-danger { background: #FDECEC !important; color: var(--danger) !important; }
.bg-dark { background: var(--ink) !important; color: #fff !important; }
.bg-primary { background: var(--orange) !important; }
.bg-aurora { background: var(--grad-sun) !important; color: #fff; }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 999px;
    font-size: .8rem; font-weight: 800; white-space: nowrap;
    background: var(--bg-2); color: var(--ink-2);
}
.chip.peach { background: var(--peach-soft); color: var(--orange); }
.chip.mint  { background: var(--mint-soft); color: #0F9B76; }
.chip.sky   { background: var(--sky-soft); color: #2272D9; }
.chip.lilac { background: var(--lilac-soft); color: var(--lilac); }
.chip.sun   { background: var(--sun-soft); color: #B87300; }
.chip.rose  { background: var(--rose-soft); color: #D63A5C; }
.chip.white { background: rgba(255,255,255,.25); color: #fff; backdrop-filter: blur(6px); }

.chip-scroller {
    display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 10px; margin: 0 -16px 8px;
    scrollbar-width: none; scroll-snap-type: x proximity;
}
.chip-scroller::-webkit-scrollbar { display: none; }
.filter-chip {
    scroll-snap-align: start;
    display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
    padding: 9px 16px; border-radius: 999px; font-weight: 800; font-size: .88rem;
    background: var(--surface); color: var(--ink-2); border: 1px solid var(--line);
    transition: all .2s var(--ease);
}
.filter-chip:hover { color: var(--orange); border-color: #FFD3BD; }
.filter-chip.active { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 0 6px 16px rgba(42,30,63,.25); }
.btn-check:checked + .filter-chip { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 0 6px 16px rgba(42,30,63,.25); }
.btn-check + .filter-chip { cursor: pointer; }
.chip-label { font-size: .75rem; font-weight: 800; color: var(--muted); margin: 6px 0 6px; }

/* ==========================================================
   Forms
   ========================================================== */
.form-label { font-weight: 800; color: var(--ink-2); font-size: .9rem; margin-bottom: 6px; }
.form-control, .form-select {
    background-color: var(--surface-2);
    border: 1.5px solid var(--line);
    border-radius: 14px;
    color: var(--ink);
    padding: .78rem 1rem;
    font-size: 1rem;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.form-control-sm, .form-select-sm { padding: .5rem .8rem; font-size: .88rem; border-radius: 11px; }
.form-select { background-position: left .9rem center; padding-left: 2.4rem; }
.form-control:focus, .form-select:focus {
    background-color: #fff; border-color: var(--orange); color: var(--ink);
    box-shadow: 0 0 0 4px rgba(255,122,69,.15);
}
.form-control::placeholder { color: #B6ABC4; }
.form-control[readonly] { background: var(--bg-2); color: var(--muted); }
.form-check-input { width: 1.25em; height: 1.25em; border: 2px solid var(--line-2); background-color: #fff; }
.form-check-input:checked { background-color: var(--orange); border-color: var(--orange); }
.form-check-input:focus { box-shadow: 0 0 0 4px rgba(255,122,69,.15); border-color: var(--orange); }
.form-switch .form-check-input { width: 2.6em; height: 1.45em; }
.form-check-label { color: var(--ink-2); font-weight: 600; }
.text-validation, .field-validation-error { color: var(--danger); font-size: .82rem; font-weight: 700; display: block; margin-top: 4px; }
.validation-summary-errors ul { list-style: none; padding: 12px 14px; margin: 0 0 12px; background: #FDECEC; border-radius: 14px; color: var(--danger); font-weight: 700; font-size: .9rem; }
.input-validation-error { border-color: var(--danger) !important; background: #FFF7F7 !important; }
.input-group-text { background: var(--bg-2); border: 1.5px solid var(--line); color: var(--muted); border-radius: 14px; }

.field { position: relative; margin-bottom: 16px; }
.field .f-ic { position: absolute; top: 26px; inset-inline-start: 14px; transform: translateY(-50%); color: #C1B5CF; pointer-events: none; transition: color .2s; }
.field.has-label .f-ic { top: 54px; }
.field .form-control.with-ic { padding-inline-start: 46px; }
.field:focus-within .f-ic { color: var(--orange); }
.field .pw-toggle {
    position: absolute; inset-inline-end: 6px; top: 6px;
    width: 38px; height: 38px; border-radius: 11px; border: 0; background: transparent; color: var(--muted);
    display: grid; place-items: center;
}
.field.has-label .pw-toggle { top: 34px; }
.field .pw-toggle.on { color: var(--orange); }
.field .form-label { display: block; height: 22px; line-height: 22px; margin-bottom: 6px; }

/* file picker */
.file-pick {
    display: flex; align-items: center; gap: 12px;
    padding: 12px; border-radius: 16px; border: 2px dashed var(--line-2);
    background: var(--surface-2); cursor: pointer; transition: border-color .2s, background .2s;
}
.file-pick:hover { border-color: var(--orange); background: #FFF6F0; }
.file-pick input[type=file] { display: none; }
.file-pick .fp-ic { width: 44px; height: 44px; border-radius: 14px; background: var(--peach-soft); color: var(--orange); display: grid; place-items: center; flex-shrink: 0; overflow: hidden; }
.file-pick .fp-ic img { width: 100%; height: 100%; object-fit: cover; }
.file-pick .fp-txt { flex: 1; min-width: 0; font-weight: 700; color: var(--ink-2); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==========================================================
   Alerts / empty states
   ========================================================== */
.alert { border: 0; border-radius: 18px; font-weight: 600; padding: 14px 16px; }
.alert-success { background: var(--mint-soft); color: #0B7A5D; }
.alert-warning { background: var(--sun-soft); color: #946000; }
.alert-danger  { background: #FDECEC; color: #B4282D; }
.alert-info    { background: var(--sky-soft); color: #1D5FB5; }
.alert a { font-weight: 800; }

.empty {
    text-align: center; padding: 36px 20px; border-radius: var(--r-xl);
    background: var(--surface); border: 1.5px dashed var(--line-2);
}
.empty .e-art {
    width: 96px; height: 96px; margin: 0 auto 14px; border-radius: 32px;
    display: grid; place-items: center; font-size: 2.6rem;
    background: var(--grad-dawn);
    animation: float 4s ease-in-out infinite;
}
.empty h3 { font-size: 1.15rem; margin-bottom: 6px; }
.empty p { color: var(--muted); margin: 0 auto 16px; max-width: 26rem; font-size: .93rem; }

/* ==========================================================
   Tables → cards on mobile
   ========================================================== */
.table { --bs-table-bg: transparent; --bs-table-color: var(--ink); color: var(--ink); margin-bottom: 0; }
.table thead th { color: var(--muted); font-size: .78rem; font-weight: 800; border-bottom: 1px solid var(--line) !important; padding: 10px 12px; white-space: nowrap; background: transparent; }
.table td { border-color: var(--line) !important; padding: 12px; vertical-align: middle; }
.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-bg-type: var(--surface-2); }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: var(--bg-2); }
.table-warning > * { --bs-table-bg: var(--sun-soft) !important; }
.table-responsive { border-radius: var(--r); }

@media (max-width: 767.98px) {
    .aurora-table thead, .table.auto-cards thead { display: none; }
    .aurora-table, .aurora-table tbody, .aurora-table tr, .aurora-table td { display: block; width: 100%; }
    .aurora-table tr {
        background: var(--surface-2); border: 1px solid var(--line); border-radius: 18px;
        padding: 8px 4px; margin-bottom: 10px;
    }
    .card .aurora-table tr { background: var(--surface-2); }
    .aurora-table td {
        border: 0 !important; padding: 7px 12px !important;
        display: flex; align-items: center; justify-content: space-between; gap: 12px;
        text-align: start; max-width: none !important;
        white-space: normal !important;
    }
    .aurora-table td::before {
        content: attr(data-label); color: var(--muted); font-size: .78rem; font-weight: 800; flex-shrink: 0;
    }
    .aurora-table td[dir="ltr"] { flex-direction: row-reverse; }
    .aurora-table td:not([data-label])::before, .aurora-table td[data-label=""]::before { display: none; }
    .aurora-table td[colspan] { justify-content: center; }
    .aurora-table td.d-flex { justify-content: flex-end; flex-wrap: wrap; }
    .aurora-table td form.d-flex { flex-wrap: nowrap; }
    .aurora-table td > :last-child:not(:first-child) { text-align: end; }
}

/* ==========================================================
   List group
   ========================================================== */
.list-group { border-radius: var(--r-lg); gap: 8px; }
.list-group-item {
    background: var(--surface) !important; color: var(--ink) !important;
    border: 1px solid var(--line) !important; border-radius: 18px !important; padding: 14px 16px;
}
.list-group-item + .list-group-item { border-top-width: 1px !important; }
.list-group-item-action:hover { background: var(--surface-2) !important; }
.list-group-item.active { background: var(--ink) !important; color: #fff !important; border-color: var(--ink) !important; }

/* modal / dropdown */
.modal-content { background: var(--surface); border: 0; border-radius: var(--r-xl); color: var(--ink); }
.dropdown-menu { border: 1px solid var(--line); border-radius: 18px; padding: 8px; box-shadow: 0 16px 40px rgba(74,45,20,.14); }
.dropdown-item { border-radius: 12px; padding: 9px 12px; font-weight: 700; color: var(--ink-2); }
.dropdown-item:hover { background: var(--peach-soft); color: var(--orange); }

.progress { height: 10px; background: var(--bg-2); border-radius: 99px; }
.progress-bar { background: var(--grad-sun) !important; border-radius: 99px; }
.text-aurora { color: var(--orange) !important; }
.text-muted { color: var(--muted) !important; }
.text-success { color: var(--mint) !important; }
.text-white { color: #fff !important; }
hr { border-color: var(--line); opacity: 1; }

/* pagination */
.page-link { border-radius: 12px !important; margin: 0 3px; border: 1px solid var(--line); color: var(--ink-2); font-weight: 700; }
.page-item.active .page-link { background: var(--orange); border-color: var(--orange); }

/* ==========================================================
   Stat tiles (shared, also admin)
   ========================================================== */
.stat-tile, .streak-hero {
    position: relative; overflow: hidden;
    padding: 18px; border-radius: var(--r-lg);
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1);
    transition: transform .25s var(--spring);
    height: 100%;
}
.stat-tile:hover { transform: translateY(-3px); }
.stat-tile .stat-num, .streak-hero .stat-num { font-family: var(--font-display); font-size: 2rem; font-weight: 700; line-height: 1.1; color: var(--ink); }
.stat-tile .stat-label { color: var(--muted); font-size: .85rem; font-weight: 700; margin-top: 4px; }
.stat-tile::after { content: ""; position: absolute; inset-inline-end: -26px; top: -26px; width: 86px; height: 86px; border-radius: 50%; background: var(--peach-soft); opacity: .8; }
.stat-tile > * { position: relative; z-index: 1; }
.streak-hero { background: var(--grad-sun); color: #fff; border: 0; box-shadow: var(--sh-2); font-weight: 700; }
.streak-hero .stat-num { color: #fff; }
.streak-flame { color: var(--orange); font-weight: 800; }
.row > [class*=col]:nth-child(4n+2) > .stat-tile::after { background: var(--mint-soft); }
.row > [class*=col]:nth-child(4n+3) > .stat-tile::after { background: var(--sky-soft); }
.row > [class*=col]:nth-child(4n+4) > .stat-tile::after { background: var(--lilac-soft); }

/* mini stat strip */
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini-stat { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 12px 8px; text-align: center; }
.mini-stat .v { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; line-height: 1.1; display: block; }
.mini-stat .l { font-size: .74rem; font-weight: 800; color: var(--muted); }

/* ==========================================================
   TODAY
   ========================================================== */
.greet { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.greet .hello { font-size: .92rem; color: var(--muted); font-weight: 700; }
.greet h1 { font-family: var(--font-display); font-size: 1.7rem; margin: 0; font-weight: 700; }
.greet .wave { display: inline-block; animation: wave 2.4s ease-in-out infinite; transform-origin: 70% 70%; }
.greet .actions { margin-inline-start: auto; }

.hero-sun {
    position: relative; overflow: hidden; isolation: isolate;
    border-radius: var(--r-xl); padding: 20px;
    background: var(--grad-sun); color: #fff;
    box-shadow: var(--sh-3);
}
.hero-sun::before, .hero-sun::after {
    content: ""; position: absolute; border-radius: 50%; z-index: -1;
    background: rgba(255,255,255,.16);
}
.hero-sun::before { width: 240px; height: 240px; top: -110px; inset-inline-end: -70px; animation: float 7s ease-in-out infinite; }
.hero-sun::after  { width: 150px; height: 150px; bottom: -70px; inset-inline-start: -30px; animation: float 9s ease-in-out infinite reverse; }
.hero-row { display: flex; align-items: center; gap: 18px; }
.ring-wrap { position: relative; width: 128px; height: 128px; flex-shrink: 0; }
.ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-wrap .track { stroke: rgba(255,255,255,.28); }
.ring-wrap .bar { stroke: #fff; transition: stroke-dashoffset 1s var(--ease); filter: drop-shadow(0 0 6px rgba(255,255,255,.6)); }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-center .flame { font-size: 1.6rem; line-height: 1; animation: flicker 1.6s ease-in-out infinite; display: inline-block; }
.ring-center .n { font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; line-height: 1; }
.ring-center .u { font-size: .75rem; font-weight: 800; opacity: .92; }
.hero-copy h2 { color: #fff; font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; margin: 0 0 4px; }
.hero-copy p { margin: 0 0 10px; opacity: .95; font-weight: 600; font-size: .92rem; line-height: 1.6; }
.hero-copy .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.hero-stats > div { background: rgba(255,255,255,.2); backdrop-filter: blur(6px); border-radius: 16px; padding: 10px 6px; text-align: center; }
.hero-stats .v { display: block; font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; line-height: 1.1; }
.hero-stats .l { font-size: .72rem; font-weight: 800; opacity: .92; }

.verse-card {
    position: relative; overflow: hidden;
    border-radius: var(--r-xl); padding: 22px 20px 16px;
    background: linear-gradient(150deg, #F3EEFF 0%, #FFF0F4 100%);
    border: 1px solid #ECE3FF;
}
.verse-card .qmark { position: absolute; top: -18px; inset-inline-end: 12px; font-size: 7rem; font-family: Georgia, serif; color: rgba(139,108,255,.14); line-height: 1; pointer-events: none; }
.verse-card .v-text { font-size: 1.15rem; font-weight: 700; line-height: 2; color: var(--ink); margin: 10px 0 8px; position: relative; }
.verse-card .v-ref { color: var(--lilac); font-weight: 800; font-size: .9rem; }
.verse-card .v-actions { display: flex; gap: 8px; margin-top: 12px; }
.verse-card .v-actions button { border: 0; background: rgba(255,255,255,.7); color: var(--lilac); border-radius: 12px; padding: 7px 12px; font-weight: 800; font-size: .8rem; display: inline-flex; align-items: center; gap: 6px; transition: transform .15s var(--spring); }
.verse-card .v-actions button:active { transform: scale(.92); }
.verse-card .eyebrow { background: rgba(255,255,255,.75); color: var(--lilac); }

.journey-head { display: flex; align-items: center; gap: 12px; margin: 26px 0 12px; }
.journey-head h2 { font-size: 1.15rem; margin: 0; }
.journey-head .count { margin-inline-start: auto; font-weight: 800; color: var(--orange); font-size: .9rem; }
.journey-bar { height: 10px; border-radius: 99px; background: var(--bg-2); overflow: hidden; margin-bottom: 16px; }
.journey-bar > span { display: block; height: 100%; width: 0; background: var(--grad-sun); border-radius: 99px; transition: width .6s var(--ease); }

.steps { position: relative; display: flex; flex-direction: column; gap: 12px; }
.steps::before { content: ""; position: absolute; top: 30px; bottom: 30px; inset-inline-start: 33px; width: 3px; border-radius: 3px; background: repeating-linear-gradient(to bottom, var(--line-2) 0 6px, transparent 6px 12px); }
.step {
    position: relative; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: hidden;
    transition: border-color .3s, box-shadow .3s, transform .25s var(--spring);
}
.step-head { display: flex; align-items: center; gap: 12px; padding: 14px; cursor: pointer; user-select: none; }
.step-ic { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; font-size: 1.25rem; flex-shrink: 0; position: relative; z-index: 1; transition: transform .4s var(--spring); }
.step-title { flex: 1; min-width: 0; }
.step-title b { display: block; font-size: 1rem; }
.step-title small { color: var(--muted); font-weight: 600; font-size: .8rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-chev { color: var(--muted); transition: transform .3s var(--ease); }
.step.open .step-chev { transform: rotate(180deg); }
.step-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.step.open .step-body { grid-template-rows: 1fr; }
.step-body > div { overflow: hidden; }
.step-body .inner { padding: 0 16px 16px; }
.step-body .content { background: var(--surface-2); border-radius: 16px; padding: 14px 16px; line-height: 2; font-size: 1.02rem; color: var(--ink); white-space: pre-line; }
.step-body .ref { color: var(--orange); font-weight: 800; font-size: .88rem; margin-bottom: 6px; display: block; }
.check-btn {
    margin-top: 12px; width: 100%;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px; border-radius: 14px; border: 2px solid var(--line);
    background: #fff; color: var(--ink-2); font-weight: 800;
    transition: all .25s var(--ease);
}
.check-btn:hover { border-color: var(--mint); color: var(--mint); }
.step.done { border-color: #BDEEDD; }
.step.done .step-ic { background: var(--grad-mint) !important; color: #fff; transform: rotate(-8deg) scale(1.05); }
.step.done .step-title b { color: #0F9B76; }
.step.done .check-btn { background: var(--mint-soft); border-color: transparent; color: #0F9B76; }
.step-tick { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; color: transparent; flex-shrink: 0; transition: all .3s var(--spring); }
.step.done .step-tick { background: var(--mint); border-color: var(--mint); color: #fff; transform: scale(1.1); }

.write-card {
    margin-top: 16px; border-radius: var(--r-xl); padding: 18px;
    background: var(--surface); border: 2px solid transparent;
    background-image: linear-gradient(var(--surface), var(--surface)), var(--grad-sun);
    background-origin: border-box; background-clip: padding-box, border-box;
    box-shadow: var(--sh-2);
}
.write-card .w-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.write-card .w-head .step-ic { background: var(--grad-sun); color: #fff; }
.write-card h3 { font-size: 1.1rem; margin: 0; }
.write-card .w-sub { color: var(--muted); font-size: .85rem; font-weight: 600; }
.prompt-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 10px; }
.prompt-chips::-webkit-scrollbar { display: none; }
.prompt-chips button { white-space: nowrap; border: 1px dashed #FFC7A8; background: #FFF7F1; color: var(--orange); border-radius: 999px; padding: 7px 12px; font-weight: 800; font-size: .8rem; transition: transform .15s var(--spring); }
.prompt-chips button:active { transform: scale(.92); }
.medit-ta {
    width: 100%; min-height: 140px; resize: none;
    border: 1.5px solid var(--line); border-radius: 18px; padding: 14px 16px;
    background: var(--surface-2); color: var(--ink); font-size: 1.02rem; line-height: 1.9;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.medit-ta:focus { outline: none; border-color: var(--orange); background: #fff; box-shadow: 0 0 0 4px rgba(255,122,69,.13); }
.medit-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.medit-foot .counter { color: var(--muted); font-size: .8rem; font-weight: 700; }
.medit-foot .btn { margin-inline-start: auto; }
.points-pill { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; background: var(--sun-soft); color: #B87300; font-weight: 800; font-size: .8rem; }
.done-banner {
    display: flex; align-items: center; gap: 14px;
    padding: 16px; border-radius: var(--r-lg); margin-bottom: 16px;
    background: var(--grad-mint); color: #fff; box-shadow: 0 12px 28px rgba(31,191,148,.3);
    position: relative; overflow: hidden;
}
.done-banner .big { font-size: 2rem; animation: bounce 2s ease-in-out infinite; }
.done-banner b { display: block; font-size: 1.05rem; }
.done-banner small { opacity: .95; font-weight: 600; }

@media (min-width: 992px) {
    .today-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 24px; align-items: start; }
    .today-grid .sticky-col { position: sticky; top: calc(var(--appbar-h) + 20px); }
    .journey-head { margin-top: 0; }
}

/* ==========================================================
   Leaderboard
   ========================================================== */
.seg {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px;
    padding: 5px; border-radius: 18px; background: var(--bg-2); margin-bottom: 18px; position: relative;
}
.seg button { border: 0; background: transparent; padding: 10px; border-radius: 14px; font-weight: 800; color: var(--muted); position: relative; z-index: 1; transition: color .25s; }
.seg button.active { color: var(--ink); }
.seg .seg-ind { position: absolute; top: 5px; bottom: 5px; border-radius: 14px; background: #fff; box-shadow: var(--sh-1); transition: all .35s var(--spring); }
.tab-pane-x { display: none; animation: fade-up .4s var(--ease); }
.tab-pane-x.show { display: block; }

.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 10px; margin: 8px 0 18px; }
.pod { text-align: center; }
.pod .avatar { margin: 0 auto 8px; position: relative; }
.pod .medal { position: absolute; bottom: -6px; inset-inline-start: 50%; transform: translateX(50%); font-size: 1.3rem; }
.pod .name { font-weight: 800; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod .pts { font-family: var(--font-display); font-weight: 700; color: var(--orange); }
.pod .block { margin-top: 8px; border-radius: 18px 18px 8px 8px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; color: #fff; }
.pod.p1 .block { height: 108px; background: var(--grad-sun); box-shadow: var(--sh-2); }
.pod.p2 .block { height: 80px; background: var(--grad-sky); }
.pod.p3 .block { height: 62px; background: var(--grad-lilac); }
.pod.p1 .avatar { animation: float 3.5s ease-in-out infinite; }
.pod.p1 .crown { font-size: 1.5rem; display: block; margin-bottom: -4px; animation: bounce 2.2s ease-in-out infinite; }

.rank-list { display: flex; flex-direction: column; gap: 8px; }
.rank-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line);
}
.rank-row .r { width: 28px; text-align: center; font-family: var(--font-display); font-weight: 700; color: var(--muted); font-size: 1.1rem; }
.rank-row .who { flex: 1; min-width: 0; }
.rank-row .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-row .who small { color: var(--muted); font-weight: 700; font-size: .78rem; }
.rank-row .pts { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.rank-row .pts small { font-family: var(--font); font-size: .7rem; color: var(--muted); font-weight: 800; }

.medit-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; height: 100%; display: flex; flex-direction: column; box-shadow: var(--sh-1); }
.medit-card .who { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.medit-card .who b { font-size: .95rem; }
.medit-card .who small { color: var(--muted); font-weight: 700; font-size: .75rem; display: block; }
.medit-card .txt { flex: 1; line-height: 1.95; white-space: pre-line; color: var(--ink-2); margin-bottom: 12px; }
.like-btn {
    align-self: flex-start;
    display: inline-flex; align-items: center; gap: 6px;
    border: 0; border-radius: 999px; padding: 7px 14px;
    background: var(--rose-soft); color: #D63A5C; font-weight: 800;
    transition: transform .2s var(--spring), background .2s;
    position: relative;
}
.like-btn .like-icon { display: inline-flex; transition: transform .35s var(--spring); }
.like-btn.liked { background: #FFD6E0; color: #C42552; box-shadow: inset 0 0 0 2px #FF8FA8; }
.like-btn.liked .like-icon { animation: heart .45s var(--spring); }
.like-btn:disabled { opacity: .55; }
.like-burst { position: absolute; pointer-events: none; font-size: .9rem; animation: burst .8s ease-out forwards; }

/* ==========================================================
   Group / library / generic list cards
   ========================================================== */
.g-card { border-radius: var(--r-xl); overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); height: 100%; display: flex; flex-direction: column; }
.g-cover { --h: 24; height: 120px; position: relative; background: linear-gradient(135deg, hsl(var(--h) 95% 72%), hsl(calc(var(--h) + 45) 90% 64%)); overflow: hidden; }
.g-cover img { width: 100%; height: 100%; object-fit: cover; }
.g-cover .g-emoji { position: absolute; inset: 0; display: grid; place-items: center; font-size: 3rem; opacity: .9; }
.g-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(42,30,63,.35), transparent 60%); }
.g-cover .chips { position: absolute; top: 12px; inset-inline-start: 12px; display: flex; gap: 6px; z-index: 1; }
.g-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.g-body h3 { font-size: 1.1rem; margin: 0; }
.g-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.g-actions { margin-top: auto; display: flex; gap: 8px; }
.g-actions .btn { flex: 1; }

.lib-card { display: flex; gap: 14px; padding: 12px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); color: var(--ink); height: 100%; }
.lib-card:hover { color: var(--ink); }
.lib-thumb { width: 88px; min-height: 104px; border-radius: 16px; flex-shrink: 0; overflow: hidden; display: grid; place-items: center; color: #fff; position: relative; }
.lib-thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.lib-thumb.t1 { background: var(--grad-sun); }
.lib-thumb.t2 { background: var(--grad-sky); }
.lib-thumb.t3 { background: var(--grad-lilac); }
.lib-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.lib-info h3 { font-size: 1rem; margin: 0; line-height: 1.5; }
.lib-info p { color: var(--muted); font-size: .85rem; margin: 0; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lib-info .open { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--orange); font-size: .88rem; }

/* challenge */
.ch-card { border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); overflow: hidden; margin-bottom: 16px; }
.ch-top { padding: 18px; background: var(--grad-dawn); position: relative; }
.ch-top h3 { font-size: 1.2rem; margin: 8px 0 4px; }
.ch-top p { margin: 0; color: var(--ink-2); font-size: .9rem; line-height: 1.7; }
.ch-time { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: .8rem; font-weight: 800; color: var(--ink-2); }
.ch-time .progress { flex: 1; height: 8px; background: rgba(255,255,255,.7); }
.ch-body { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.stand { display: flex; align-items: center; gap: 10px; }
.stand .r { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; background: var(--bg-2); color: var(--ink-2); flex-shrink: 0; }
.stand:nth-child(1) .r { background: var(--grad-sun); color: #fff; }
.stand:nth-child(2) .r { background: var(--grad-sky); color: #fff; }
.stand:nth-child(3) .r { background: var(--grad-lilac); color: #fff; }
.stand .bar-wrap { flex: 1; min-width: 0; }
.stand .bar-wrap .nm { display: flex; justify-content: space-between; font-weight: 800; font-size: .9rem; margin-bottom: 5px; gap: 8px; }
.stand .bar-wrap .nm span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stand .bar { height: 10px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.stand .bar > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #FFD08A, #FF9A6B); width: 0; transition: width 1.1s var(--ease); }
.stand.mine .bar > span { background: var(--grad-mint); }
.stand.mine .nm { color: #0F9B76; }

/* notifications */
.notif-list { display: flex; flex-direction: column; gap: 10px; }
.notif-item {
    display: flex; gap: 12px; padding: 14px; border-radius: 20px;
    background: var(--surface); border: 1px solid var(--line);
    transition: opacity .35s, transform .35s var(--ease), background .3s;
}
.notif-item .n-ic { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; flex-shrink: 0; background: var(--bg-2); color: var(--muted); }
.notif-item.unread { background: linear-gradient(90deg, #FFF4EC, #fff); border-color: #FFD9C4; }
.notif-item.unread .n-ic { background: var(--grad-sun); color: #fff; }
.notif-item .n-main { flex: 1; min-width: 0; }
.notif-item .n-main b { display: block; margin-bottom: 2px; }
.notif-item .n-main p { margin: 0 0 4px; color: var(--ink-2); font-size: .92rem; line-height: 1.7; }
.notif-item .n-main small { color: var(--muted); font-weight: 700; font-size: .75rem; }
.notif-read-btn { align-self: center; border: 0; width: 38px; height: 38px; border-radius: 12px; background: var(--mint-soft); color: var(--mint); display: grid; place-items: center; flex-shrink: 0; }

/* person card */
.person { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.person .who { flex: 1; min-width: 0; }
.person .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .who small { color: var(--muted); font-weight: 700; font-size: .8rem; }
.person .acts { display: flex; gap: 6px; flex-shrink: 0; }
.round-act { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; border: 0; transition: transform .15s var(--spring); }
.round-act:active { transform: scale(.88); }
.round-act.call { background: var(--sky-soft); color: var(--sky); }
.round-act.wa { background: #E3F8EC; color: #13A35A; }

/* attendance toggles */
.att-list { display: flex; flex-direction: column; gap: 8px; }
.att-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--surface); border: 1.5px solid var(--line); cursor: pointer; transition: all .25s var(--ease); user-select: none; }
.att-row input[type=checkbox] { display: none; }
.att-row .who { flex: 1; min-width: 0; font-weight: 800; }
.att-row .note { margin-top: 8px; }
.att-row .state { padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: .78rem; background: var(--bg-2); color: var(--muted); transition: all .25s var(--spring); white-space: nowrap; }
.att-row.on { border-color: #A8E9D5; background: #F4FDF9; }
.att-row.on .state { background: var(--mint); color: #fff; transform: scale(1.05); }
.att-sum { position: sticky; top: calc(var(--appbar-h) + 8px); z-index: 5; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 18px; background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border: 1px solid var(--line); box-shadow: var(--sh-1); margin-bottom: 12px; }
.att-sum .num { font-size: 1.4rem; font-weight: 700; color: var(--mint); }

/* tool tiles (leader) */
.tool-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tool { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); font-weight: 800; font-size: .88rem; transition: transform .2s var(--spring), background .2s; }
.tool:hover { color: var(--ink); background: #fff; transform: translateY(-2px); }
.tool:active { transform: scale(.95); }
.tool .tile-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }

/* history heat map */
.heat { display: grid; grid-template-columns: repeat(auto-fill, minmax(26px, 1fr)); gap: 6px; }
.heat i { aspect-ratio: 1; border-radius: 8px; background: var(--bg-2); display: block; position: relative; transition: transform .2s var(--spring); }
.heat i.on { background: var(--grad-mint); box-shadow: 0 3px 8px rgba(31,191,148,.25); }
.heat i.att { background: var(--grad-sky); }
.heat i.today { outline: 2.5px solid var(--orange); outline-offset: 2px; }
.heat i:hover { transform: scale(1.2); z-index: 1; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .78rem; font-weight: 800; color: var(--muted); margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; border-radius: 5px; display: inline-block; }
.hist-item { display: flex; gap: 12px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.hist-item .d { width: 52px; flex-shrink: 0; text-align: center; border-radius: 14px; padding: 6px 0; background: var(--bg-2); }
.hist-item .d b { display: block; font-family: var(--font-display); font-size: 1.35rem; line-height: 1.1; }
.hist-item .d small { font-size: .7rem; font-weight: 800; color: var(--muted); }
.hist-item.ok .d { background: var(--mint-soft); color: #0F9B76; }
.hist-item .body { flex: 1; min-width: 0; }
.hist-item .body p { margin: 6px 0 0; color: var(--ink-2); font-size: .9rem; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.hist-item .body p.expanded { -webkit-line-clamp: unset; }

/* profile */
.profile-hero { position: relative; border-radius: var(--r-xl); overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); text-align: center; padding-bottom: 18px; margin-bottom: 16px; }
.profile-hero .cover { height: 110px; background: var(--grad-sun); position: relative; overflow: hidden; }
.profile-hero .cover::before { content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.18); top: -80px; inset-inline-start: -40px; }
.profile-hero .av-wrap { position: relative; width: 104px; margin: -54px auto 10px; }
.profile-hero .cam { position: absolute; bottom: 2px; inset-inline-end: -2px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; border: 3px solid #fff; cursor: pointer; transition: transform .2s var(--spring); }
.profile-hero .cam:active { transform: scale(.88); }
.profile-hero h2 { font-family: var(--font-display); font-size: 1.4rem; margin: 0 0 6px; }

/* form section card */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 20px; box-shadow: var(--sh-1); }
.form-card .fc-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-weight: 800; margin-bottom: 14px; }
.form-card .fc-title .tile-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; }

/* ==========================================================
   AUTH
   ========================================================== */
.auth { max-width: 460px; margin: 0 auto; }
.auth-art { position: relative; height: 150px; margin-bottom: 4px; display: grid; place-items: center; }
.auth-art .sunball { width: 116px; height: 116px; border-radius: 50%; background: var(--grad-sun); box-shadow: 0 0 0 16px rgba(255,178,63,.14), 0 0 0 34px rgba(255,178,63,.07), var(--sh-3); display: grid; place-items: center; color: #fff; animation: float 5s ease-in-out infinite; }
.auth-art .orbit { position: absolute; font-size: 1.5rem; animation: orbit 14s linear infinite; }
.auth-art .orbit.o2 { animation-duration: 18s; animation-direction: reverse; font-size: 1.2rem; }
.auth h1 { font-family: var(--font-display); text-align: center; font-size: 1.8rem; font-weight: 700; margin-bottom: 4px; }
.auth .lead-sm { text-align: center; color: var(--muted); font-weight: 600; margin-bottom: 20px; }
.auth .switch { text-align: center; margin-top: 18px; color: var(--muted); font-weight: 700; }
.stepper { display: flex; gap: 8px; margin-bottom: 18px; }
.stepper span { flex: 1; height: 6px; border-radius: 99px; background: var(--line); position: relative; overflow: hidden; }
.stepper span::after { content: ""; position: absolute; inset: 0; background: var(--grad-sun); transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.stepper span.on::after { transform: scaleX(1); }
.wiz-step { display: none; animation: fade-up .4s var(--ease); }
.wiz-step.show { display: block; }
.wiz-nav { display: flex; gap: 10px; margin-top: 8px; }
.wiz-nav .btn { flex: 1; }

/* ==========================================================
   LANDING
   ========================================================== */
.lp-hero { position: relative; text-align: center; padding: 18px 0 8px; }
.lp-hero .eyebrow { margin-bottom: 14px; }
.lp-h1 { font-family: var(--font-display); font-size: 2.5rem; font-weight: 700; line-height: 1.25; margin-bottom: 12px; }
.lp-h1 .hl { background: var(--grad-sun); -webkit-background-clip: text; background-clip: text; color: transparent; position: relative; }
.lp-lead { color: var(--ink-2); font-size: 1.05rem; line-height: 1.9; max-width: 34rem; margin: 0 auto 20px; font-weight: 500; }
.lp-cta { display: flex; flex-direction: column; gap: 10px; max-width: 360px; margin: 0 auto; }
@media (min-width: 576px) { .lp-cta { flex-direction: row; justify-content: center; max-width: none; } }
.lp-proof { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font-size: .85rem; font-weight: 700; color: var(--muted); }
.lp-proof .pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(31,191,148,.6); animation: pulse 1.8s infinite; }
.lp-avatars { display: inline-flex; }
.lp-avatars .avatar { width: 28px; height: 28px; font-size: .7rem; border: 2px solid var(--bg); margin-inline-start: -8px; }

.phone {
    position: relative; max-width: 330px; margin: 28px auto 0;
    border-radius: 38px; padding: 12px; background: var(--ink);
    box-shadow: 0 30px 60px rgba(42,30,63,.3); transform: rotate(-3deg);
    animation: float 6s ease-in-out infinite;
}
.phone-screen { border-radius: 28px; background: var(--bg); overflow: hidden; padding: 14px; text-align: start; }
.phone .notch { width: 90px; height: 20px; border-radius: 0 0 14px 14px; background: var(--ink); margin: -14px auto 10px; }
.phone .mini-hero { border-radius: 20px; padding: 14px; background: var(--grad-sun); color: #fff; display: flex; align-items: center; gap: 12px; }
.phone .mini-hero .n { font-family: var(--font-display); font-size: 2rem; font-weight: 700; line-height: 1; }
.phone .mini-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-top: 8px; border-radius: 14px; background: #fff; border: 1px solid var(--line); font-weight: 700; font-size: .85rem; }
.phone .mini-row .tk { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: #fff; flex-shrink: 0; }
.phone .mini-row .tk.off { background: transparent; border: 2px solid var(--line-2); }
.float-badge { position: absolute; padding: 8px 12px; border-radius: 16px; background: #fff; box-shadow: var(--sh-2); font-weight: 800; font-size: .8rem; display: flex; align-items: center; gap: 6px; white-space: nowrap; transform: rotate(3deg); }
.float-badge.b1 { top: 60px; inset-inline-end: -26px; animation: float 4s ease-in-out infinite; }
.float-badge.b2 { bottom: 70px; inset-inline-start: -30px; animation: float 5s ease-in-out infinite reverse; }
@media (max-width: 420px) { .float-badge.b1 { inset-inline-end: -8px; } .float-badge.b2 { inset-inline-start: -8px; } }

.lp-sec { padding: 44px 0 8px; }
.lp-sec-h { text-align: center; margin-bottom: 22px; }
.lp-sec-h h2 { font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; margin: 10px 0 6px; }
.lp-sec-h p { color: var(--muted); max-width: 32rem; margin: 0 auto; font-weight: 600; }

.snap-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 14px; margin: 0 -16px; scrollbar-width: none; }
.snap-row::-webkit-scrollbar { display: none; }
.snap-row > * { scroll-snap-align: center; flex: 0 0 78%; }
@media (min-width: 768px) { .snap-row { display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; margin: 0; padding: 0; } .snap-row > * { flex: none; } }
.how { position: relative; padding: 20px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.how .n { position: absolute; top: 14px; inset-inline-end: 16px; font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; color: var(--bg-2); line-height: 1; }
.how .e { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; font-size: 1.7rem; margin-bottom: 12px; }
.how h3 { font-size: 1.05rem; margin-bottom: 6px; }
.how p { color: var(--muted); font-size: .88rem; margin: 0; line-height: 1.8; }

.feat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 768px) { .feat-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.feat { padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); transition: transform .25s var(--spring), box-shadow .25s; }
.feat:hover { transform: translateY(-4px) rotate(-.5deg); box-shadow: var(--sh-2); }
.feat .e { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 10px; }
.feat h3 { font-size: .98rem; margin-bottom: 4px; }
.feat p { color: var(--muted); font-size: .82rem; margin: 0; line-height: 1.75; }

.sample-card { border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-2); overflow: hidden; max-width: 680px; margin: 0 auto; }
.sample-card .s-head { padding: 18px; background: var(--grad-dawn); }
.sample-card .s-head h3 { margin: 8px 0 0; font-size: 1.2rem; }
.sample-card .s-verse { margin-top: 12px; font-weight: 700; line-height: 2; }
.sample-card .s-verse small { display: block; color: var(--lilac); font-weight: 800; }
.sample-card .s-rows { padding: 8px 18px; }
.sample-card .s-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.sample-card .s-row:last-child { border: 0; }
.sample-card .s-row .e { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-size: 1.2rem; flex-shrink: 0; }
.sample-card .s-row small { color: var(--muted); font-weight: 800; font-size: .76rem; }
.sample-card .s-row div div { line-height: 1.8; }
.sample-card .s-lock { margin: 0 12px 12px; padding: 14px; border-radius: 18px; background: var(--ink); color: #fff; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sample-card .s-lock b { display: block; }
.sample-card .s-lock small { opacity: .75; }
.sample-card .s-lock .btn { margin-inline-start: auto; }

.stats-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 18px 10px; border-radius: var(--r-xl); background: var(--ink); color: #fff; text-align: center; }
.stats-band .v { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; line-height: 1.1; background: var(--grad-sun); -webkit-background-clip: text; background-clip: text; color: transparent; display: block; }
.stats-band .l { font-size: .75rem; font-weight: 700; opacity: .8; line-height: 1.5; display: block; }
@media (min-width: 768px) { .stats-band .v { font-size: 2.4rem; } .stats-band .l { font-size: .9rem; } }

.final-cta { position: relative; overflow: hidden; margin-top: 44px; padding: 34px 20px; border-radius: var(--r-xl); text-align: center; background: var(--grad-sun); color: #fff; box-shadow: var(--sh-3); }
.final-cta h2 { color: #fff; font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; }
.final-cta p { opacity: .95; font-weight: 600; max-width: 30rem; margin: 0 auto 18px; }
.final-cta .btn-light { color: var(--orange); }
.final-cta::before { content: "☀"; position: absolute; font-size: 12rem; opacity: .12; top: -60px; inset-inline-start: -30px; animation: spin 40s linear infinite; }

.site-foot { text-align: center; color: var(--muted); font-size: .85rem; font-weight: 600; padding: 24px 16px 30px; }
body.has-tabbar .site-foot { display: none; }
@media (min-width: 992px) { body.has-tabbar .site-foot { display: block; } }

/* ==========================================================
   ADMIN
   ========================================================== */
.admin-shell { display: grid; grid-template-columns: 1fr; gap: 20px; width: 100%; max-width: 1360px; margin: 0 auto; padding: 18px 16px 40px; flex: 1 0 auto; }
@media (min-width: 992px) { .admin-shell { grid-template-columns: 250px 1fr; padding: 28px 24px 48px; } }
.admin-side { display: none; }
@media (min-width: 992px) { .admin-side { display: block; position: sticky; top: calc(var(--appbar-h) + 20px); align-self: start; } }
.side-nav { display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; color: var(--ink-2); font-weight: 700; font-size: .93rem; transition: background .2s, color .2s; }
.side-nav a:hover { background: var(--peach-soft); color: var(--orange); }
.side-nav a.active { background: var(--grad-sun); color: #fff; box-shadow: var(--sh-2); }
.side-nav .sn-label { font-size: .72rem; font-weight: 800; color: var(--muted); padding: 10px 12px 4px; }
.admin-main { min-width: 0; }
.admin-burger { display: grid; }
@media (min-width: 992px) { .admin-burger { display: none; } }
.offcanvas.admin-drawer { background: var(--bg); border: 0 !important; width: 290px; }
.offcanvas.admin-drawer .side-nav { box-shadow: none; border: 0; background: transparent; padding: 0; }

.min-w-0 { min-width: 0; }

/* ---------- Date strip + synaxarium ---------- */
.date-strip { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 16px; }
@media (min-width: 576px) { .date-strip { grid-template-columns: 1.4fr 1fr; } }
.date-card { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: hidden; }
.dc-row { display: flex; align-items: center; gap: 10px; padding: 12px; }
.dc-row + .dc-row { border-inline-start: 1px dashed var(--line-2); }
.dc-row small { display: block; font-size: .7rem; font-weight: 800; color: var(--muted); }
.dc-row b { display: block; font-size: .86rem; line-height: 1.45; }
.dc-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; font-weight: 800; }
.synax-tile {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-lg);
    background: linear-gradient(135deg, #3A2A5C 0%, #5B3F8C 100%); color: #fff;
    box-shadow: 0 10px 24px rgba(58,42,92,.28); position: relative; overflow: hidden;
    transition: transform .2s var(--spring);
}
.synax-tile::after { content: ""; position: absolute; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,194,75,.18); inset-inline-start: -30px; top: -50px; }
.synax-tile:hover { color: #fff; transform: translateY(-2px); }
.synax-tile:active { transform: scale(.97); }
.synax-tile .st-ic { width: 42px; height: 42px; border-radius: 14px; background: rgba(255,255,255,.14); display: grid; place-items: center; font-size: 1.35rem; flex-shrink: 0; position: relative; z-index: 1; }
.synax-tile .st-txt { flex: 1; min-width: 0; position: relative; z-index: 1; }
.synax-tile b { display: block; font-size: 1rem; }
.synax-tile small { display: block; opacity: .85; font-weight: 600; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.synax-tile .st-chev { position: relative; z-index: 1; opacity: .8; }
.synax-nav { display: flex; align-items: center; gap: 10px; padding: 12px; margin-bottom: 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.synax-nav .sn-mid { flex: 1; text-align: center; display: flex; flex-direction: column; align-items: center; }
.synax-nav .sn-mid b { font-size: 1.35rem; font-weight: 700; line-height: 1.3; }
.synax-nav .sn-mid small { color: var(--muted); font-weight: 700; }
.synax-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 18px; box-shadow: var(--sh-1); scroll-margin-top: calc(var(--appbar-h) + 12px); }
.synax-card .sc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.synax-card .sc-ic { width: 42px; height: 42px; border-radius: 14px; background: var(--sun-soft); display: grid; place-items: center; font-size: 1.3rem; flex-shrink: 0; }
.synax-card h2 { font-size: 1.12rem; margin: 0; line-height: 1.6; }
.synax-card .sc-body { line-height: 2.05; font-size: 1.02rem; color: var(--ink-2); }
.synax-card .sc-body p { margin-bottom: .8rem; }

/* ---------- Admin passage picker ---------- */
.picker { border: 1.5px dashed #BBD9FF; background: #F5FAFF; border-radius: 18px; margin-bottom: 10px; }
.picker > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; }
.picker > summary::-webkit-details-marker { display: none; }
.picker > summary .tile-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.picker > summary b { display: block; font-size: .92rem; }
.picker > summary small { display: block; color: var(--muted); font-weight: 600; font-size: .78rem; }
.picker .pk-chev { color: var(--muted); transition: transform .3s var(--ease); }
.picker[open] .pk-chev { transform: rotate(180deg); }
.picker[open] { background: #fff; border-style: solid; }
.picker .pk-body { padding: 0 14px 14px; animation: fade-up .3s var(--ease); }
.pk-cv { display: flex; align-items: center; gap: 6px; direction: ltr; }
.pk-cv .form-control { text-align: center; padding-left: .4rem; padding-right: .4rem; }
.pk-cv span { font-weight: 800; color: var(--muted); }
.flash-fill { animation: flash-fill 1.2s var(--ease); }
@keyframes flash-fill { 0% { box-shadow: 0 0 0 0 rgba(61,155,255,.5); background-color: #EAF4FF; } 100% { box-shadow: 0 0 0 10px rgba(61,155,255,0); } }
.apply-box > summary { list-style: none; }
.apply-box > summary::-webkit-details-marker { display: none; }
.apply-box[open] > summary { background: var(--bg-2) !important; color: var(--ink-2) !important; box-shadow: none; }
.apply-box[open] form { animation: fade-up .35s var(--ease); }

/* ==========================================================
   Reveal on scroll + keyframes
   ========================================================== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.stagger > * { animation: fade-up .5s var(--ease) both; }
.stagger > *:nth-child(2) { animation-delay: .05s; }
.stagger > *:nth-child(3) { animation-delay: .1s; }
.stagger > *:nth-child(4) { animation-delay: .15s; }
.stagger > *:nth-child(5) { animation-delay: .2s; }
.stagger > *:nth-child(6) { animation-delay: .25s; }
.stagger > *:nth-child(7) { animation-delay: .3s; }
.stagger > *:nth-child(n+8) { animation-delay: .35s; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes wiggle { 0%,90%,100% { transform: rotate(-6deg); } 93% { transform: rotate(6deg) scale(1.05); } 96% { transform: rotate(-10deg); } }
@keyframes wave { 0%,60%,100% { transform: rotate(0); } 10%,30% { transform: rotate(16deg); } 20%,40% { transform: rotate(-8deg); } }
@keyframes flicker { 0%,100% { transform: scale(1) rotate(-3deg); } 50% { transform: scale(1.12) rotate(3deg); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-24px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-16px) scale(.96); } }
@keyframes bar { to { transform: scaleX(0); } }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }
@keyframes heart { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }
@keyframes burst { 0% { opacity: 1; transform: translate(0,0) scale(.6); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.2); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(31,191,148,.6); } 70% { box-shadow: 0 0 0 10px rgba(31,191,148,0); } 100% { box-shadow: 0 0 0 0 rgba(31,191,148,0); } }
@keyframes orbit { from { transform: rotate(0deg) translateX(92px) rotate(0deg); } to { transform: rotate(360deg) translateX(92px) rotate(-360deg); } }

#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 2000; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
}
