/* ============================================================
   PPI ALUMNI — Batch 14 features
   Batch leaderboard · Memories wall · Facebook profile frame

   Loaded by layouts/app.blade.php right after style.css. Kept apart from
   style.css so the public-site rewrite never has to carry these rules. Uses
   the site's shared tokens and classes (.container, .section-eyebrow, .btn,
   .form-control, .page-header …) and adds its own, all prefixed lb- / mem- /
   fr- / frame-promo.

   Palette (same as style.css v6 "Royal"): blue #2563eb (#1e40af / #0b1f4b) ·
   green #059669 / #10b981 · teal #0d9488 · gold #f5b301 / #fbbf24 ·
   surfaces #f4f8fc #ecfdf5 #eff6ff #fffbeb · ink #0f172a · muted #475569
   ============================================================ */

:root {
    --f-blue: #2563eb;
    --f-blue-deep: #1e40af;
    --f-navy: #0b1f4b;
    --f-green: #10b981;
    --f-green-deep: #059669;
    --f-teal: #0d9488;
    --f-gold: #fbbf24;
    --f-gold-deep: #f5b301;
    --f-gold-ink: #92400e;
    --f-surface: #f4f8fc;
    --f-mint: #ecfdf5;
    --f-sky: #eff6ff;
    --f-butter: #fffbeb;
    --f-ink: #0f172a;
    --f-muted: #475569;
    --f-line: rgba(15, 23, 42, 0.08);
    --f-line-strong: rgba(15, 23, 42, 0.16);
    --f-shadow: 0 2px 6px rgba(11, 31, 75, 0.05), 0 22px 48px -24px rgba(11, 31, 75, 0.28);
    --f-shadow-lg: 0 4px 14px rgba(11, 31, 75, 0.06), 0 40px 80px -36px rgba(11, 31, 75, 0.35);
    --f-radius: 20px;
    --f-radius-sm: 12px;
    --f-grad: linear-gradient(135deg, #1e40af 0%, #2563eb 48%, #0d9488 100%);
    --f-grad-h: linear-gradient(90deg, #2563eb 0%, #14b8a6 100%);
    --f-grad-hair: linear-gradient(90deg, #2563eb 0%, #14b8a6 50%, #fbbf24 100%);
    --f-grad-gold: linear-gradient(135deg, #fde68a 0%, #fbbf24 48%, #f59e0b 100%);
    --f-grad-green: linear-gradient(135deg, #34d399 0%, #10b981 50%, #0d9488 100%);
    --f-grad-navy: linear-gradient(160deg, #0b1f4b 0%, #1e40af 62%, #2563eb 100%);
    --f-font-display: var(--font-display, 'Plus Jakarta Sans', 'Inter', sans-serif);
}

/* --------------------------------------------------------------------------
   1. BATCH LEADERBOARD
   -------------------------------------------------------------------------- */
.lb-section { padding: var(--section-y, 96px) 0; background: #fff; position: relative; overflow: hidden; }
.lb-section::before {
    content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
    background:
        radial-gradient(48% 60% at 100% 0%, rgba(37, 99, 235, 0.08), transparent 62%),
        radial-gradient(44% 56% at 0% 100%, rgba(251, 191, 36, 0.1), transparent 60%);
}
.lb-section > .container { position: relative; z-index: 1; }

.lb { min-width: 0; }
.lb__head-text { min-width: 0; }
.lb__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; margin-bottom: 36px; }
.lb__head .section-title { margin-bottom: 10px; }
.lb__head .section-sub { max-width: 60ch; }
.lb__total {
    display: flex; align-items: center; gap: 16px; padding: 18px 24px; border-radius: 18px; color: #fff;
    background: var(--f-grad-navy); box-shadow: 0 24px 44px -20px rgba(11, 31, 75, 0.6); position: relative; overflow: hidden;
}
.lb__total::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(70% 120% at 100% 0%, rgba(20, 184, 166, 0.4), transparent 60%); }
.lb__total > * { position: relative; }
.lb__total-num { font-family: var(--f-font-display); font-size: 44px; line-height: 1; font-weight: 800; letter-spacing: -0.04em; background: linear-gradient(90deg, #fde68a, #fbbf24 55%, #f59e0b); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.lb__total-label { font-size: 12px; line-height: 1.35; color: rgba(255, 255, 255, 0.78); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }

.lb__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lb__row {
    display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 18px;
    padding: 14px 18px 14px 14px; background: #fff; border: 1px solid var(--f-line); border-radius: 16px;
    box-shadow: 0 1px 2px rgba(11, 31, 75, 0.04); transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
}
.lb__row:hover { transform: translateY(-2px); box-shadow: var(--f-shadow); border-color: rgba(37, 99, 235, 0.25); }
.lb__rank {
    width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 15px; color: var(--f-blue-deep); background: var(--f-sky); border: 1px solid rgba(37, 99, 235, 0.16);
    font-variant-numeric: tabular-nums;
}
.lb__rank i { font-size: 19px; }
.lb__row--gold .lb__rank { background: var(--f-grad-gold); color: #78350f; border-color: transparent; box-shadow: 0 10px 22px -8px rgba(245, 158, 11, 0.8); }
.lb__row--silver .lb__rank { background: linear-gradient(135deg, #f8fafc, #cbd5e1 60%, #94a3b8); color: #1e293b; border-color: transparent; box-shadow: 0 10px 22px -8px rgba(100, 116, 139, 0.6); }
.lb__row--bronze .lb__rank { background: linear-gradient(135deg, #fed7aa, #d97706 70%, #b45309); color: #fff7ed; border-color: transparent; box-shadow: 0 10px 22px -8px rgba(180, 83, 9, 0.7); }
.lb__row--gold {
    border-color: transparent; position: relative;
    background: linear-gradient(90deg, #fffbeb, #fff 55%) padding-box, var(--f-grad-hair) border-box;
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.14), 0 24px 44px -24px rgba(245, 158, 11, 0.55);
}
.lb__session { display: grid; gap: 8px; min-width: 0; }
.lb__session strong { font-family: var(--f-font-display); font-size: 16px; font-weight: 800; color: var(--f-ink); letter-spacing: -0.01em; }
.lb__bar { display: block; height: 10px; border-radius: 999px; background: var(--f-sky); overflow: hidden; }
.lb__bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--f-grad-h); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.08); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.lb__row--gold .lb__bar-fill { background: var(--f-grad-gold); }
.lb__row--silver .lb__bar-fill { background: linear-gradient(90deg, #94a3b8, #cbd5e1); }
.lb__row--bronze .lb__bar-fill { background: linear-gradient(90deg, #b45309, #f59e0b); }
.lb__count { display: flex; flex-direction: column; align-items: flex-end; line-height: 1; font-variant-numeric: tabular-nums; font-family: var(--f-font-display); font-size: 28px; font-weight: 800; letter-spacing: -0.03em; background: var(--f-grad-h); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.lb__count small { font-family: var(--font-body, Inter, sans-serif); font-size: 11px; color: var(--f-muted); -webkit-text-fill-color: var(--f-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; margin-top: 4px; }

.lb__cta {
    margin-top: 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    padding: 18px 22px; border-radius: 16px; background: var(--f-navy); color: #fff; font-weight: 600;
    background-image: radial-gradient(70% 120% at 100% 0%, rgba(16, 185, 129, 0.35), transparent 60%), radial-gradient(50% 100% at 0% 100%, rgba(37, 99, 235, 0.45), transparent 60%);
    box-shadow: 0 24px 44px -24px rgba(11, 31, 75, 0.7);
}
.lb__cta > span { display: inline-flex; align-items: center; gap: 10px; }
.lb__cta > span i { color: var(--f-gold); }

/* compact variant — event page sidebar */
.event-sidebar-lb { margin-top: 24px; }
.lb--compact { background: #fff; border: 1px solid var(--f-line); border-radius: 20px; padding: 18px; box-shadow: var(--f-shadow); }
.lb__title { margin: 0 0 12px; font-family: var(--f-font-display); font-size: 15px; font-weight: 800; color: var(--f-ink); display: flex; align-items: center; gap: 8px; }
.lb__title i { color: var(--f-gold-deep); }
.lb--compact .lb__list { gap: 6px; }
.lb--compact .lb__row { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; padding: 8px 10px; border-radius: 12px; box-shadow: none; }
.lb--compact .lb__row:hover { transform: none; }
.lb--compact .lb__row--gold { box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.14); }
.lb--compact .lb__rank { width: 30px; height: 30px; font-size: 12px; border-radius: 9px; }
.lb--compact .lb__rank i { font-size: 13px; }
.lb--compact .lb__session { gap: 5px; }
.lb--compact .lb__session strong { font-size: 13.5px; }
.lb--compact .lb__bar { height: 6px; }
.lb--compact .lb__count { font-size: 20px; }
.lb--compact .lb__count small { font-size: 9.5px; margin-top: 2px; }
.lb--compact .lb__cta { margin-top: 14px; padding: 12px 14px; font-size: 13px; border-radius: 12px; box-shadow: none; }
.lb--compact .lb__cta .text-link { color: var(--f-gold); font-weight: 700; }

/* --------------------------------------------------------------------------
   2. MEMORIES — cards, wall, teaser strip, form
   -------------------------------------------------------------------------- */
.mem-section { padding: var(--section-y, 96px) 0; background: #fff; }
.mem-section--form { background: var(--f-surface); }

.mem-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.mem-toolbar .section-title { margin-bottom: 8px; }
.mem-toolbar__text { min-width: 0; }

/* The wall is a true masonry (CSS columns) so short cards never leave a hole
   under them; the home teaser is a plain 4-up grid. */
.mem-grid { columns: 3; column-gap: 24px; }
.mem-grid > .mem-card { display: inline-flex; width: 100%; vertical-align: top; margin: 0 0 24px; break-inside: avoid; -webkit-column-break-inside: avoid; page-break-inside: avoid; }
.mem-grid--teaser { columns: auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; align-items: start; }
.mem-grid--teaser > .mem-card { display: flex; margin: 0; }

/* v15: a photo-print card — white frame, photo with a soft vignette and a
   glass year chip, story below. A story without a photo becomes a quote card
   on a mint wash. The lift (translate) lives in the motion query at the end. */
.mem-card {
    position: relative; background: #fff; border: 1px solid var(--f-line); border-radius: 22px; overflow: hidden;
    box-shadow: 0 1px 2px rgba(11, 31, 75, 0.04), 0 18px 40px -26px rgba(11, 31, 75, 0.38);
    display: flex; flex-direction: column; transition: translate .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s ease, border-color .3s;
    break-inside: avoid;
}
.mem-card:hover { transform: none; box-shadow: 0 2px 6px rgba(11, 31, 75, 0.05), 0 34px 64px -30px rgba(37, 99, 235, 0.45); border-color: rgba(37, 99, 235, 0.28); }
.mem-card--featured { border-color: transparent; background: linear-gradient(#fff, #fff) padding-box, var(--f-grad-hair) border-box; box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.16), 0 18px 40px -26px rgba(245, 158, 11, 0.55); }
.mem-card--featured:hover { border-color: transparent; box-shadow: 0 0 0 5px rgba(251, 191, 36, 0.22), 0 34px 64px -30px rgba(245, 158, 11, 0.6); }
.mem-card__media { position: relative; margin: 8px 8px 0; border-radius: 16px; overflow: hidden; background: var(--f-sky); isolation: isolate; }
.mem-card__media img { display: block; width: 100%; height: auto; max-height: 420px; object-fit: cover; transition: scale .6s cubic-bezier(.2, .8, .2, 1); }
.mem-card__media::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 62%, rgba(11, 31, 75, 0.5) 100%); box-shadow: inset 0 0 0 1px rgba(11, 31, 75, 0.06); border-radius: inherit; }
.mem-card__year {
    position: absolute; left: 12px; bottom: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 11px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); color: var(--f-navy); font-size: 12px; font-weight: 800;
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); letter-spacing: 0.02em; box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.5);
    font-variant-numeric: tabular-nums;
}
.mem-card__year i { color: var(--f-blue); }
.mem-card__year--inline { position: static; background: #fff; color: var(--f-blue-deep); align-self: flex-start; margin-bottom: 2px; box-shadow: none; border: 1px solid rgba(37, 99, 235, 0.2); }
.mem-card__year--inline i { color: var(--f-blue); }
.mem-card__body { position: relative; padding: 18px 20px 16px; display: flex; flex-direction: column; gap: 10px; }
.mem-card--text .mem-card__body { flex: 1 1 auto; padding-top: 26px; background: radial-gradient(70% 60% at 100% 0%, rgba(16, 185, 129, 0.14), transparent 70%), linear-gradient(180deg, var(--f-mint), #fff 62%); }
.mem-card--text::before { content: ''; position: absolute; left: 0; top: 22px; bottom: 22px; width: 4px; border-radius: 0 4px 4px 0; background: var(--f-grad-green); z-index: 1; }
.mem-card__quote { position: absolute; top: 18px; right: 20px; font-size: 40px; line-height: 1; color: rgba(5, 150, 105, 0.16); pointer-events: none; }
.mem-card--text .mem-card__title { padding-right: 46px; }
.mem-card__badge {
    align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
    background: var(--f-grad-gold); color: #78350f; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
    box-shadow: 0 8px 16px -8px rgba(245, 158, 11, 0.8);
}
.mem-card__badge i { color: #92400e; }
.mem-card__title { margin: 0; font-family: var(--f-font-display); font-size: 20px; line-height: 1.25; font-weight: 800; color: var(--f-ink); letter-spacing: -0.02em; }
.mem-card__story { margin: 0; font-size: 15px; line-height: 1.7; color: var(--f-muted); white-space: pre-line; overflow-wrap: anywhere; }
.mem-card__story-wrap { margin: 0; }
.mem-card__story-wrap summary { list-style: none; cursor: pointer; display: grid; gap: 8px; }
.mem-card__story-wrap summary::-webkit-details-marker { display: none; }
.mem-card__more { font-size: 13px; font-weight: 700; color: var(--f-blue); display: inline-flex; gap: 6px; align-items: center; }
.mem-card__more-close { display: none; }
.mem-card__story-wrap[open] .mem-card__story--short { display: none; }
.mem-card__story-wrap[open] .mem-card__more-open { display: none; }
.mem-card__story-wrap[open] .mem-card__more-close { display: inline-flex; gap: 6px; align-items: center; }
.mem-card__story-wrap[open] > .mem-card__story { margin-top: 0; }
.mem-card__story-wrap[open] summary { order: 2; }
.mem-card__story-wrap[open] { display: flex; flex-direction: column; gap: 8px; }
.mem-card__foot { display: flex; align-items: center; gap: 12px; padding-top: 14px; margin-top: 4px; border-top: 1px dashed var(--f-line-strong); }
.mem-card__avatar {
    width: 40px; height: 40px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center;
    background: var(--f-grad); color: #fff; font-family: var(--f-font-display); font-weight: 800; font-size: 15px;
    border: 2px solid #fff; box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.22), 0 6px 14px -6px rgba(30, 64, 175, 0.6);
}
.mem-card--featured .mem-card__avatar { background: var(--f-grad-gold); color: var(--f-navy); box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.35), 0 6px 14px -6px rgba(245, 158, 11, 0.7); }
.mem-card--text .mem-card__avatar { background: var(--f-grad-green); box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.25), 0 6px 14px -6px rgba(5, 150, 105, 0.6); }
.mem-card__who { display: grid; gap: 2px; min-width: 0; }
.mem-card__who strong { font-size: 14px; color: var(--f-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.mem-card__who small { font-size: 12.5px; color: var(--f-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mem-grid--teaser .mem-card__media img { aspect-ratio: 4 / 3; max-height: none; }
.mem-grid--teaser .mem-card__title { font-size: 17px; }
.mem-grid--teaser .mem-card__story { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mem-grid--teaser .mem-card__body { padding: 16px 18px 14px; }

/* "Opening soon" notice on the share form (the wall itself uses .mem-state). */
.mem-notice {
    display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; border-radius: 18px;
    background: radial-gradient(60% 120% at 100% 0%, rgba(251, 191, 36, 0.2), transparent 60%), var(--f-butter);
    border: 1px solid rgba(245, 179, 1, 0.45); color: var(--f-ink); margin-bottom: 40px;
}
.mem-notice > i { width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; color: var(--f-navy); background: var(--f-grad-gold); flex: none; margin-top: 0; box-shadow: 0 10px 20px -10px rgba(245, 158, 11, 0.85); }
.mem-notice strong { display: block; margin-bottom: 4px; font-family: var(--f-font-display); font-weight: 800; }
.mem-notice span { color: var(--f-muted); font-size: 15px; line-height: 1.6; }
.mem-notice--tight { margin-bottom: 22px; padding: 16px 18px; }

/* The invitation band: royal gradient, four glass step tiles, an instant
   camera printing a campus photo (.mem-cam, in the v15 block below). */
.mem-invite {
    margin-top: 80px; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr); gap: 40px; align-items: center;
    padding: 56px 60px; border-radius: 32px; color: #fff; background: var(--f-grad-navy); position: relative; overflow: hidden; isolation: isolate;
    box-shadow: 0 34px 70px -32px rgba(11, 31, 75, 0.7);
}
.mem-invite::before {
    content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(50% 90% at 100% 0%, rgba(16, 185, 129, 0.42), transparent 62%), radial-gradient(46% 90% at 0% 100%, rgba(251, 191, 36, 0.26), transparent 60%),
                radial-gradient(40% 60% at 70% 110%, rgba(59, 130, 246, 0.55), transparent 70%);
}
.mem-invite::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: var(--pattern-grid); opacity: 0.9; }
.mem-invite > * { position: relative; }
.mem-invite__text { min-width: 0; }
.mem-invite .section-eyebrow { color: #fff; background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.22); }
.mem-invite .section-eyebrow::before { background: var(--f-grad-gold); box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.22); }
.mem-invite h3 { margin: 14px 0 10px; font-family: var(--f-font-display); font-size: clamp(26px, 2.5vw, 38px); line-height: 1.12; font-weight: 800; letter-spacing: -0.03em; color: #fff; }
.mem-invite p { margin: 0; max-width: 60ch; color: rgba(255, 255, 255, 0.8); line-height: 1.7; }

/* Home teaser + gallery strip */
.mem-teaser { padding: var(--section-y, 96px) 0; background: linear-gradient(180deg, #fff, var(--f-mint)); }
.mem-teaser__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.mem-strip { padding: 72px 0 var(--section-y, 96px); background: var(--f-surface); border-top: 1px solid var(--f-line); }
.mem-strip__track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 300px); gap: 20px; overflow-x: auto; padding: 4px 4px 18px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.mem-strip__track > .mem-card { scroll-snap-align: start; }
.mem-strip__track .mem-card__media img { aspect-ratio: 4 / 3; max-height: none; }
.mem-strip__track .mem-card__title { font-size: 17px; }
.mem-strip__track .mem-card__story { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Share form */
.mem-form-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 40px; align-items: start; }
.mem-form-aside { position: sticky; top: 100px; }
.mem-form-aside .section-title { margin-bottom: 24px; }
/* v15: the three steps read as one timeline card with a gradient rail. */
.mem-steps { list-style: none; margin: 0 0 20px; padding: 10px 22px; display: grid; gap: 0; background: #fff; border: 1px solid var(--f-line); border-radius: 22px; box-shadow: 0 1px 2px rgba(11, 31, 75, 0.04), 0 18px 40px -30px rgba(11, 31, 75, 0.4); }
.mem-steps li { position: relative; display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; }
.mem-steps li + li { border-top: 1px dashed var(--f-line-strong); }
.mem-steps li:not(:last-child)::after { content: ''; position: absolute; left: 18px; top: 58px; bottom: -14px; width: 2px; border-radius: 2px; background: linear-gradient(180deg, rgba(37, 99, 235, 0.45), rgba(16, 185, 129, 0.35)); }
.mem-steps li > span { position: relative; z-index: 1; flex: none; width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--f-grad); color: #fff; font-weight: 800; box-shadow: 0 0 0 4px #fff, 0 8px 16px -8px rgba(30, 64, 175, 0.7); }
.mem-steps li:nth-child(2) > span { background: var(--f-grad-green); }
.mem-steps li:nth-child(3) > span { background: var(--f-grad-gold); color: var(--f-navy); }
.mem-steps strong { display: block; color: var(--f-ink); margin-bottom: 2px; font-weight: 700; }
.mem-steps small { font-size: 13.5px; color: var(--f-muted); line-height: 1.55; }
.mem-form-tip { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: var(--f-sky); border: 1px solid rgba(37, 99, 235, 0.2); font-size: 13.5px; color: var(--f-muted); line-height: 1.55; }
.mem-form-tip i { color: var(--f-blue); flex: none; margin-top: 3px; }

.mem-form-card { background: #fff; border: 1px solid var(--f-line); border-radius: 24px; padding: 34px 36px; box-shadow: var(--f-shadow-lg); position: relative; overflow: hidden; }
.mem-form-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--f-grad-hair); }
.mem-form .form-label { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.mem-optional { font-size: 12px; font-weight: 500; color: var(--f-muted); text-transform: none; letter-spacing: 0; }
.mem-hint { display: block; text-align: right; font-size: 12px; color: var(--f-muted); margin-top: 6px; }
.mem-error { display: block; margin-top: 6px; font-size: 13px; color: #b91c1c; font-weight: 600; }
.mem-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.mem-picker { position: relative; }
.mem-picker__input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 2; }
.mem-picker__drop {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
    padding: 34px 20px; border: 2px dashed rgba(37, 99, 235, 0.35); border-radius: 16px; background: var(--f-sky); color: var(--f-muted);
    transition: border-color .2s, background .2s;
}
.mem-picker__drop > i { width: 56px; height: 56px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; color: #fff; background: var(--f-grad); margin-bottom: 8px; box-shadow: 0 12px 24px -12px rgba(37, 99, 235, 0.8); }
.mem-picker__drop strong { color: var(--f-ink); font-size: 16px; }
.mem-picker__drop > span { font-size: 13px; }
.mem-picker:hover .mem-picker__drop, .mem-picker__input:focus-visible ~ .mem-picker__drop { border-color: var(--f-blue); background: #e0ecff; }
.mem-picker__preview { position: relative; border-radius: 16px; overflow: hidden; background: var(--f-surface); border: 1px solid var(--f-line); }
.mem-picker__preview img { display: block; width: 100%; max-height: 420px; object-fit: contain; background: #0b1f4b; }
.mem-picker__clear {
    position: absolute; top: 12px; right: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 12px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, 0.92); color: var(--f-ink); font-weight: 700; font-size: 13px; cursor: pointer; box-shadow: var(--f-shadow);
}
.mem-moderation { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin: 6px 0 20px; border-radius: 12px; background: var(--f-mint); border: 1px solid rgba(5, 150, 105, 0.25); font-size: 13.5px; color: var(--f-muted); line-height: 1.6; }
.mem-moderation i { color: var(--f-green-deep); flex: none; margin-top: 3px; }

/* --------------------------------------------------------------------------
   3. PROFILE FRAME — home promo + the /frame page
   -------------------------------------------------------------------------- */
/* The home promo (.frame-promo*) was redesigned in batch 16 — its rules live
   in the "v16-frame" block at the end of this file. */

.fr-section { padding: var(--section-y, 96px) 0; background: var(--f-surface); }
.fr-app { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 40px; align-items: start; }
.fr-stage-wrap { position: sticky; top: 100px; }
.fr-stage {
    position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 28px; overflow: hidden;
    background: #fff; border: 1px solid var(--f-line); box-shadow: var(--f-shadow-lg);
}
.fr-stage.is-drop { outline: 3px dashed var(--f-blue); outline-offset: -8px; }
.fr-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.fr-stage canvas.is-dragging { cursor: grabbing; }
.fr-app:not(.has-photo) .fr-stage canvas { cursor: default; }
.fr-stage__empty {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    text-align: center; color: var(--f-muted); pointer-events: none; padding: 24px;
}
.fr-stage__empty i { width: 72px; height: 72px; border-radius: 24px; display: inline-flex; align-items: center; justify-content: center; font-size: 30px; color: #fff; background: var(--f-grad); margin-bottom: 10px; box-shadow: 0 16px 30px -12px rgba(37, 99, 235, 0.8); }
.fr-stage__empty strong { color: var(--f-ink); font-size: 17px; font-family: var(--f-font-display); font-weight: 800; }
.fr-stage__empty span { font-size: 13.5px; }
.fr-stage__hint {
    position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 7px 12px; border-radius: 999px;
    background: rgba(11, 31, 75, 0.8); color: #fff; font-size: 12px; font-weight: 600; pointer-events: none; backdrop-filter: blur(6px); white-space: nowrap;
}
.fr-stage__hint i { color: var(--f-gold); }
.fr-privacy { margin: 14px 0 0; text-align: center; font-size: 13px; color: var(--f-muted); }
.fr-privacy i { color: var(--f-green-deep); }

.fr-panel { background: #fff; border: 1px solid var(--f-line); border-radius: 24px; padding: 30px 32px; box-shadow: var(--f-shadow); position: relative; overflow: hidden; }
.fr-panel::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--f-grad-hair); }
.fr-panel__title { margin: 12px 0 22px; font-family: var(--f-font-display); font-size: clamp(26px, 2.2vw, 32px); font-weight: 800; letter-spacing: -0.03em; color: var(--f-ink); }
.fr-panel__title em { font-style: normal; font-weight: inherit; background: var(--f-grad-h); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.fr-step { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 14px; padding: 18px 0; border-top: 1px solid var(--f-line); }
.fr-step:first-of-type { border-top: 0; padding-top: 0; }
.fr-step__num { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--f-grad); color: #fff; font-weight: 800; font-size: 15px; box-shadow: 0 8px 16px -8px rgba(30, 64, 175, 0.7); }
.fr-step:nth-of-type(2) .fr-step__num { background: var(--f-grad-green); }
.fr-step:nth-of-type(3) .fr-step__num { background: var(--f-grad-gold); color: var(--f-navy); }
.fr-step__body { display: grid; gap: 10px; min-width: 0; }
.fr-step__body > strong { font-size: 16px; color: var(--f-ink); font-family: var(--f-font-display); font-weight: 800; }
.fr-photo-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.fr-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.fr-note { font-size: 13px; color: var(--f-muted); }
.fr-note a { color: var(--f-blue); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.fr-zoom { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; color: var(--f-muted); }
.fr-zoom input[type="range"] { width: 100%; accent-color: var(--f-blue); height: 30px; cursor: pointer; }
.fr-hint { font-size: 12.5px; color: var(--f-muted); }
.fr-styles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fr-style { cursor: pointer; }
.fr-style input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.fr-style__card { display: grid; gap: 4px; padding: 14px; border-radius: 16px; border: 2px solid var(--f-line); background: var(--f-surface); transition: border-color .2s, background .2s, box-shadow .2s; height: 100%; }
.fr-style input:checked + .fr-style__card { border-color: var(--f-blue); background: var(--f-sky); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14); }
.fr-style input:focus-visible + .fr-style__card { outline: 3px solid rgba(37, 99, 235, 0.55); outline-offset: 2px; }
.fr-style__thumb { width: 54px; height: 54px; border-radius: 12px; margin-bottom: 6px; }
.fr-style__thumb--ring { border-radius: 50%; background: conic-gradient(from -90deg, #1e40af, #10b981, #fbbf24, #10b981, #1e40af); position: relative; }
.fr-style__thumb--ring::after { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: #fff; }
.fr-style__thumb--banner { background: linear-gradient(180deg, #cfe3ff 0 62%, transparent 62%), linear-gradient(170deg, transparent 58%, #1e40af 58%, #10b981 80%, #fbbf24); }
.fr-style__name { font-weight: 800; color: var(--f-ink); font-size: 15px; }
.fr-style__desc { font-size: 12.5px; color: var(--f-muted); line-height: 1.45; }
.fr-actions { display: grid; gap: 10px; margin-top: 22px; }
.fr-status { font-size: 13px; color: var(--f-green-deep); font-weight: 600; min-height: 18px; text-align: center; }
.fr-status.is-error { color: #b91c1c; }
.fr-tip { display: flex; gap: 14px; align-items: flex-start; margin-top: 22px; padding: 16px 18px; border-radius: 16px; background: var(--f-sky); border: 1px solid rgba(37, 99, 235, 0.2); }
.fr-tip > i { flex: none; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #1877f2; color: #fff; font-size: 16px; }
.fr-tip strong { display: block; color: var(--f-ink); margin-bottom: 3px; }
.fr-tip span { font-size: 13.5px; color: var(--f-muted); line-height: 1.6; }
.fr-tip em { font-style: normal; font-weight: 700; color: var(--f-ink); }

/* `hidden` must win over the display values set above. */
.fr-stage__empty[hidden], .fr-stage__hint[hidden], .mem-picker__drop[hidden], .mem-picker__preview[hidden], .fr-actions .btn[hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   4. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
    .mem-grid { columns: 2; }
    .mem-grid--teaser { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mem-form-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .mem-form-aside { position: static; }
    .fr-app { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .fr-stage-wrap { position: static; max-width: 560px; margin: 0 auto; width: 100%; }
}

@media (max-width: 767px) {
    .lb__head { margin-bottom: 24px; }
    .lb__total { width: 100%; }
    .lb__row { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; padding: 12px 14px 12px 10px; }
    .lb__rank { width: 34px; height: 34px; font-size: 13px; border-radius: 10px; }
    .lb__rank i { font-size: 15px; }
    .lb__session strong { font-size: 14.5px; }
    .lb__count { font-size: 24px; }
    .lb__cta { padding: 16px; }
    .lb__cta .btn { width: 100%; }

    .mem-grid { columns: 1; column-gap: 18px; }
    .mem-grid > .mem-card { margin-bottom: 18px; }
    .mem-grid--teaser { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .mem-toolbar { margin-bottom: 28px; }
    .mem-toolbar .btn { width: 100%; }
    .mem-teaser__actions { width: 100%; }
    .mem-teaser__actions .btn { flex: 1 1 auto; }
    .mem-invite { padding: 26px 22px; margin-top: 44px; border-radius: 22px; }
    .mem-invite .btn { width: 100%; }
    .mem-form-card { padding: 22px 18px; border-radius: 18px; }
    .mem-strip__track { grid-auto-columns: minmax(240px, 82vw); }

    .fr-panel { padding: 22px 18px; border-radius: 18px; }
    .fr-styles { grid-template-columns: minmax(0, 1fr); }
    .fr-photo-actions .btn { flex: 1 1 auto; }
    .fr-stage { border-radius: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .lb__row, .mem-card, .lb__bar-fill { transition: none; }
    .lb__row:hover, .mem-card:hover { transform: none; }
}

/* ==== v15-home — batch 15 leaderboard rules (base + media) ==== */
/* A competition board: a podium for the top three on a dark "arena" stage
   (2nd – 1st – 3rd, metallic stands, crown on #1), the chasing pack as a
   ranked list beside it. The compact sidebar variant keeps one narrow list. */
.lb-section { background: #fff; }
.lb-section::before {
    background:
        radial-gradient(42% 56% at 100% 0%, rgba(37, 99, 235, 0.08), transparent 64%),
        radial-gradient(40% 52% at 0% 100%, rgba(251, 191, 36, 0.12), transparent 62%);
}
.lb__head { align-items: flex-end; margin-bottom: 32px; }
.lb__total { padding: 16px 22px 16px 16px; gap: 14px; border-radius: 20px; }
.lb__total-icon {
    width: 48px; height: 48px; flex: none; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--f-grad-gold); color: #78350f; font-size: 19px; box-shadow: 0 10px 22px -10px rgba(245, 158, 11, 0.9), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.lb__board { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.lb__board--solo { grid-template-columns: minmax(0, 1fr); }

/* The stage: deep navy, a gold spotlight over first place, faint light beams */
.lb__stage {
    position: relative; isolation: isolate; overflow: hidden; min-width: 0; min-height: 470px;
    display: flex; align-items: flex-end; justify-content: center; padding: 48px 28px 0; border-radius: 28px;
    background:
        radial-gradient(46% 42% at 50% 30%, rgba(251, 191, 36, 0.3), transparent 72%),
        radial-gradient(50% 60% at 0% 100%, rgba(20, 184, 166, 0.32), transparent 70%),
        radial-gradient(50% 60% at 100% 100%, rgba(59, 130, 246, 0.4), transparent 70%),
        linear-gradient(170deg, #0a1c46 0%, #10296a 55%, #173a92 100%);
    box-shadow: 0 2px 6px rgba(11, 31, 75, 0.08), 0 40px 80px -40px rgba(11, 31, 75, 0.7), 0 1px 0 rgba(255, 255, 255, 0.12) inset;
}
.lb__stage::before {        /* light beams from above */
    content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: conic-gradient(from 180deg at 50% -18%, transparent 0deg 150deg, rgba(255, 255, 255, 0.07) 162deg, rgba(255, 255, 255, 0.13) 180deg, rgba(255, 255, 255, 0.07) 198deg, transparent 210deg 360deg);
}
.lb__stage::after {         /* a fine dot grid + a floor line */
    content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(180deg, transparent calc(100% - 2px), rgba(253, 230, 138, 0.35) calc(100% - 2px)),
                url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'><circle cx='11' cy='11' r='1' fill='%23ffffff' fill-opacity='0.16'/></svg>");
    -webkit-mask-image: linear-gradient(180deg, #000, rgba(0, 0, 0, 0.35)); mask-image: linear-gradient(180deg, #000, rgba(0, 0, 0, 0.35));
}

.lb__board--solo .lb__stage { min-height: 400px; }
.lb__stage-tag {
    position: absolute; top: 20px; left: 22px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18); color: rgba(255, 255, 255, 0.86);
    font-size: 10.5px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
}
.lb__stage-tag i { color: #fcd34d; font-size: 11px; }
.lb-podium { position: relative; z-index: 1; list-style: none; margin: 0; padding: 0; width: 100%; max-width: 660px; display: flex; align-items: flex-end; justify-content: center; gap: 14px; }
.lb-podium__place { --lb-metal: var(--f-grad-gold); --lb-stand-h: 168px; --lb-ink: #78350f; --lb-glow: rgba(245, 158, 11, 0.75);
    flex: 1 1 0; min-width: 0; max-width: 214px; display: flex; flex-direction: column; align-items: stretch; }
.lb-podium__place--pos1 { order: 2; }
.lb-podium__place--pos2 { order: 1; }
.lb-podium__place--pos3 { order: 3; }
.lb-podium__place--gold   { --lb-metal: linear-gradient(180deg, #fef3c7 0%, #fcd34d 22%, #f59e0b 64%, #b45309 100%); --lb-stand-h: 168px; --lb-ink: #78350f; --lb-glow: rgba(245, 158, 11, 0.75); }
.lb-podium__place--silver { --lb-metal: linear-gradient(180deg, #ffffff 0%, #e2e8f0 24%, #94a3b8 70%, #64748b 100%); --lb-stand-h: 124px; --lb-ink: #1e293b; --lb-glow: rgba(148, 163, 184, 0.7); }
.lb-podium__place--bronze { --lb-metal: linear-gradient(180deg, #ffedd5 0%, #fdba74 22%, #ea580c 66%, #9a3412 100%); --lb-stand-h: 96px; --lb-ink: #431407; --lb-glow: rgba(234, 88, 12, 0.7); }

.lb-podium__card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 6px 18px; text-align: center; min-width: 0; }
.lb-podium__place--gold .lb-podium__card::before {   /* a halo behind the winner */
    content: ''; position: absolute; left: 50%; top: -10px; width: 190px; height: 190px; margin-left: -95px; z-index: -1; border-radius: 50%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.38), transparent 66%); filter: blur(6px);
}
.lb-podium__crown { display: block; margin-bottom: -4px; color: #fcd34d; font-size: 26px; line-height: 1; filter: drop-shadow(0 4px 10px rgba(251, 191, 36, 0.75)); }
.lb-podium__medal {
    width: 54px; height: 54px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--lb-metal); color: var(--lb-ink); font-size: 21px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12), 0 14px 26px -10px var(--lb-glow), 0 2px 0 rgba(255, 255, 255, 0.7) inset, 0 -3px 0 rgba(0, 0, 0, 0.12) inset;
}
.lb-podium__place--gold .lb-podium__medal { width: 66px; height: 66px; font-size: 26px; box-shadow: 0 0 0 5px rgba(251, 191, 36, 0.22), 0 18px 34px -10px var(--lb-glow), 0 2px 0 rgba(255, 255, 255, 0.7) inset, 0 -3px 0 rgba(0, 0, 0, 0.12) inset; }
.lb-podium__label { margin-top: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.72); }
.lb-podium__place--gold .lb-podium__label { color: #fde68a; }
.lb-podium__session {
    display: block; max-width: 100%; font-family: var(--f-font-display); font-size: 18px; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; color: #fff;
    overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.lb-podium__count {
    display: inline-flex; align-items: baseline; gap: 6px; margin-top: 2px; font-family: var(--f-font-display); font-size: 32px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; color: #fff;
    font-variant-numeric: tabular-nums;
}
.lb-podium__place--gold .lb-podium__count { font-size: 42px; background: linear-gradient(180deg, #fef3c7, #fbbf24 60%, #f59e0b); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.lb-podium__count small { font-family: var(--font-body, Inter, sans-serif); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.66); -webkit-text-fill-color: rgba(255, 255, 255, 0.66); }

.lb-podium__stand {
    position: relative; height: var(--lb-stand-h); display: flex; align-items: flex-start; justify-content: center; padding-top: 14px;
    border-radius: 16px 16px 0 0; background: var(--lb-metal); transform-origin: bottom center;
    box-shadow: 0 8px 0 -2px rgba(255, 255, 255, 0.35) inset, 0 -1px 0 rgba(255, 255, 255, 0.6) inset, 0 -24px 40px -26px var(--lb-glow);
}
.lb-podium__stand::after {   /* the lit top face */
    content: ''; position: absolute; left: 0; right: 0; top: 0; height: 10px; border-radius: 16px 16px 0 0; background: rgba(255, 255, 255, 0.35);
}
.lb-podium__stand span {
    position: relative; font-family: var(--f-font-display); font-size: 54px; font-weight: 800; line-height: 1; letter-spacing: -0.04em;
    color: var(--lb-ink); opacity: 0.55; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}
.lb-podium__place--bronze .lb-podium__stand span { color: #fff7ed; opacity: 0.85; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18); }
/* One or two sessions: the podium still stands, just narrower */
.lb-podium--1 .lb-podium__place { max-width: 260px; }
.lb-podium--2 .lb-podium__place { max-width: 240px; }

/* The chasing pack (ranks 4–10) */
.lb__chase {
    min-width: 0; display: flex; flex-direction: column; padding: 20px 18px 14px; border-radius: 28px;
    background: #fff; border: 1px solid var(--f-line); box-shadow: var(--f-shadow);
}
.lb__chase-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 8px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--f-line);
    font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--f-muted);
}
.lb__chase-head i { color: var(--f-blue); margin-right: 6px; }
.lb__chase .lb__list { gap: 2px; }
.lb__chase .lb__row {
    grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; padding: 10px 8px; border: 0; border-radius: 14px; background: transparent; box-shadow: none;
}
.lb__chase .lb__row:hover { transform: none; box-shadow: none; background: var(--f-sky); }
.lb__chase .lb__row + .lb__row { box-shadow: 0 -1px 0 var(--f-line); }
.lb__chase .lb__row:hover, .lb__chase .lb__row:hover + .lb__row { box-shadow: none; }
.lb__chase .lb__rank { width: 38px; height: 38px; border-radius: 12px; font-size: 14px; }
.lb__chase .lb__session { gap: 7px; }
.lb__chase .lb__session strong { font-size: 15px; overflow-wrap: anywhere; line-height: 1.3; }
.lb__chase .lb__bar { height: 8px; }
.lb__chase .lb__count { font-size: 23px; }
.lb__chase .lb__count small { font-size: 10px; margin-top: 3px; }
.lb__row--tied .lb__rank { letter-spacing: -0.02em; }
.lb__bar-fill { transform-origin: left center; }
.lb__cta { margin-top: 24px; }

/* Compact (event sidebar, ~340px): a neat list; medals for places 1–3 */
.lb--compact { padding: 18px 16px 16px; }
.lb--compact .lb__title { padding-bottom: 12px; margin-bottom: 8px; border-bottom: 1px solid var(--f-line); }
.lb--compact .lb__list { gap: 4px; }
.lb--compact .lb__row { padding: 8px 8px; border-color: transparent; background: transparent; }
.lb--compact .lb__row--gold { background: linear-gradient(90deg, #fffbeb, #fff 70%); border-color: rgba(251, 191, 36, 0.35); box-shadow: none; }
.lb--compact .lb__session strong { overflow-wrap: anywhere; line-height: 1.3; }
.lb--compact .lb__row + .lb__row:not(.lb__row--gold) { box-shadow: 0 -1px 0 var(--f-line); }

@media (prefers-reduced-motion: no-preference) {
    .lb-podium__crown { animation: lbCrownFloat 3.2s ease-in-out infinite; }
    .lb-podium__stand { transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s; }
    .lb__bar-fill { transition: transform 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s, width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
    .reveal-ready .lb__stage:not(.is-revealed) .lb-podium__stand { transform: scaleY(0.25); }
    .reveal-ready .lb__chase:not(.is-revealed) .lb__bar-fill { transform: scaleX(0); }
}
@keyframes lbCrownFloat { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-4px) rotate(4deg); } }

@media (max-width: 1023px) {
    .lb__board { grid-template-columns: minmax(0, 1fr); }
    .lb__stage { min-height: 0; }
}
@media (max-width: 767px) {
    .lb__total { padding: 14px 16px 14px 14px; }
    .lb__total-icon { width: 42px; height: 42px; font-size: 16px; border-radius: 13px; }
    .lb__stage { padding: 58px 10px 0; border-radius: 22px; }
    .lb__board--solo .lb__stage { min-height: 0; }
    .lb__stage-tag { top: 14px; left: 14px; font-size: 9.5px; }
    .lb-podium { gap: 8px; }
    .lb-podium__place--gold   { --lb-stand-h: 118px; }
    .lb-podium__place--silver { --lb-stand-h: 88px; }
    .lb-podium__place--bronze { --lb-stand-h: 66px; }
    .lb-podium__card { gap: 4px; padding: 0 2px 12px; }
    .lb-podium__place--gold .lb-podium__card::before { width: 140px; height: 140px; margin-left: -70px; }
    .lb-podium__crown { font-size: 20px; }
    .lb-podium__medal { width: 42px; height: 42px; font-size: 16px; }
    .lb-podium__place--gold .lb-podium__medal { width: 50px; height: 50px; font-size: 20px; }
    .lb-podium__label { font-size: 9px; letter-spacing: 0.1em; margin-top: 4px; }
    .lb-podium__session { font-size: 14px; }
    .lb-podium__count { font-size: 22px; flex-direction: column; align-items: center; gap: 2px; }
    .lb-podium__place--gold .lb-podium__count { font-size: 28px; }
    .lb-podium__count small { font-size: 9px; letter-spacing: 0.06em; }
    .lb-podium__stand { padding-top: 10px; border-radius: 12px 12px 0 0; }
    .lb-podium__stand::after { border-radius: 12px 12px 0 0; height: 7px; }
    .lb-podium__stand span { font-size: 34px; }
    .lb__chase { padding: 16px 10px 10px; border-radius: 22px; }
    .lb__chase .lb__row { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; padding: 10px 6px; }
    .lb__chase .lb__rank { width: 34px; height: 34px; font-size: 13px; border-radius: 10px; }
    .lb__chase .lb__session strong { font-size: 14px; }
    .lb__chase .lb__count { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    .lb-podium__crown { animation: none; }
    .lb-podium__stand, .lb__bar-fill { transform: none !important; transition: none; }
}
/* ==== /v15-home ==== */

/* ==== v15-pages — batch 15 memories-page rules (base + media) ==== */

/* --- Wall intro: heading + actions beside a collage of campus prints ------ */
.mem-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr); gap: 56px; align-items: center; margin-bottom: 64px; }
.mem-intro__text { min-width: 0; }
.mem-intro .section-title { margin-bottom: 12px; }
.mem-intro__facts { list-style: none; margin: 24px 0 30px; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.mem-count {
    display: inline-flex; align-items: center; gap: 9px; padding: 7px 16px 7px 7px; border-radius: 999px;
    background: var(--f-sky); border: 1px solid rgba(37, 99, 235, 0.2); color: var(--f-muted); font-size: 14px; font-weight: 600; line-height: 1.2;
}
.mem-count > i { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--f-grad); color: #fff; font-size: 12px; box-shadow: 0 6px 14px -6px rgba(30, 64, 175, 0.7); }
.mem-count strong { font-family: var(--f-font-display); font-size: 17px; font-weight: 800; color: var(--f-ink); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.mem-count--soon { padding-left: 14px; background: var(--f-butter); border-color: rgba(245, 179, 1, 0.5); }
.mem-count--soon strong { color: var(--f-gold-ink); font-size: 15px; }
.mem-count--new { background: var(--f-mint); border-color: rgba(5, 150, 105, 0.3); }
.mem-count--new > i { background: var(--f-grad-green); box-shadow: 0 6px 14px -6px rgba(5, 150, 105, 0.7); }
.mem-count--new strong { color: #065f46; font-size: 15px; }
.mem-count__dot { position: relative; width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--f-gold-deep); box-shadow: 0 0 0 4px rgba(245, 179, 1, 0.22); }
.mem-intro__fact { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--f-muted); }
.mem-intro__fact i { color: var(--f-green-deep); }
.mem-intro__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.mem-collage { position: relative; aspect-ratio: 1.1 / 1; max-width: 580px; width: 100%; justify-self: end; }
.mem-collage::before {
    content: ''; position: absolute; inset: 7% 2% 2% 6%; border-radius: 46% 54% 42% 58% / 52% 44% 56% 48%; z-index: 0;
    background: var(--pattern-dots), radial-gradient(60% 60% at 85% 15%, rgba(251, 191, 36, 0.2), transparent 70%), radial-gradient(60% 60% at 10% 90%, rgba(16, 185, 129, 0.16), transparent 70%), linear-gradient(135deg, var(--f-sky), #f8fbff);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.1);
}
.mem-polaroid {
    position: absolute; z-index: 1; width: 50%; margin: 0; padding: 11px 11px 40px; background: #fff; border-radius: 6px;
    box-shadow: 0 1px 3px rgba(11, 31, 75, 0.08), 0 26px 44px -20px rgba(11, 31, 75, 0.5);
    transition: rotate .5s cubic-bezier(.2, .8, .2, 1), translate .5s cubic-bezier(.2, .8, .2, 1);
}
.mem-polaroid img { display: block; width: 100%; aspect-ratio: 1 / 0.84; object-fit: cover; border-radius: 2px; background: var(--f-sky); filter: saturate(0.9) sepia(0.14) contrast(1.04); }
.mem-polaroid.is-blank img { visibility: hidden; }
.mem-polaroid:has(figcaption) { padding-bottom: 0; }
.mem-polaroid figcaption { padding: 11px 4px 13px; text-align: center; font-family: var(--f-font-display); font-size: 14px; font-weight: 700; color: #334155; letter-spacing: -0.005em; }
/* a strip of tape holding each print */
.mem-polaroid::before { content: ''; position: absolute; top: -11px; left: 50%; width: 86px; height: 24px; margin-left: -43px; rotate: -4deg; background: rgba(253, 230, 138, 0.78); box-shadow: 0 2px 6px rgba(11, 31, 75, 0.1); }
.mem-polaroid--1 { left: 1%; top: 13%; rotate: -8deg; }
.mem-polaroid--2 { right: 1%; top: 2%; width: 47%; rotate: 6deg; z-index: 2; }
.mem-polaroid--2::before { background: rgba(167, 243, 208, 0.8); rotate: 5deg; }
.mem-polaroid--3 { left: 25%; bottom: 1%; width: 50%; rotate: -2deg; z-index: 3; }
.mem-polaroid--3::before { background: rgba(191, 219, 254, 0.85); }
.mem-collage__slot {
    position: absolute; right: 3%; bottom: 7%; z-index: 4; width: 118px; aspect-ratio: 1 / 1.12; rotate: 7deg;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    border: 2px dashed rgba(37, 99, 235, 0.5); border-radius: 10px; background: rgba(255, 255, 255, 0.86);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: var(--f-blue-deep); font-size: 12.5px; font-weight: 800; letter-spacing: 0.02em;
    box-shadow: 0 16px 30px -18px rgba(11, 31, 75, 0.5);
}
.mem-collage__slot i { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--f-grad-gold); color: var(--f-navy); font-size: 14px; box-shadow: 0 8px 18px -8px rgba(245, 158, 11, 0.9); }

/* --- Empty and "opening soon" states: a stack of blank prints ---------------- */
.mem-state {
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 44px; align-items: center;
    padding: 44px 52px; border-radius: 30px; border: 1px solid var(--f-line);
    background: radial-gradient(50% 100% at 100% 0%, rgba(37, 99, 235, 0.1), transparent 62%), linear-gradient(160deg, #fff 0%, var(--f-surface) 100%);
    box-shadow: 0 1px 2px rgba(11, 31, 75, 0.04), 0 24px 50px -32px rgba(11, 31, 75, 0.4);
}
.mem-state--soon { border-color: rgba(245, 179, 1, 0.45); background: radial-gradient(50% 100% at 100% 0%, rgba(251, 191, 36, 0.22), transparent 62%), radial-gradient(40% 80% at 0% 100%, rgba(16, 185, 129, 0.1), transparent 60%), linear-gradient(160deg, var(--f-butter) 0%, #fff 70%); }
.mem-state--empty { border: 2px dashed rgba(37, 99, 235, 0.28); }
.mem-state__art { position: relative; width: 200px; height: 186px; flex: none; }
.mem-state__frame { position: absolute; width: 124px; height: 146px; padding: 10px 10px 30px; background: #fff; border-radius: 6px; box-shadow: 0 1px 3px rgba(11, 31, 75, 0.08), 0 20px 34px -18px rgba(11, 31, 75, 0.5); }
.mem-state__frame::before { content: ''; display: block; width: 100%; height: 100%; border-radius: 3px; background: linear-gradient(160deg, #d1fae5, #a7f3d0); }
.mem-state__frame--back { left: 6px; top: 22px; rotate: -13deg; }
.mem-state__frame--mid { left: 70px; top: 4px; rotate: 10deg; }
.mem-state__frame--mid::before { background: linear-gradient(160deg, #fef3c7, #fde68a); }
.mem-state__frame--front { left: 36px; top: 30px; rotate: -2deg; z-index: 1; }
.mem-state__frame--front::before { background: var(--f-grad-navy); }
.mem-state__frame--front > i { position: absolute; left: 10px; right: 10px; top: 10px; bottom: 30px; display: flex; align-items: center; justify-content: center; color: var(--f-gold); font-size: 38px; }
.mem-state--empty .mem-state__frame--front::before { background: var(--f-grad); }
.mem-state--empty .mem-state__frame--front > i { color: #fff; }
.mem-state__body { min-width: 0; }
.mem-state__tag { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 12px; border-radius: 999px; background: #fff; border: 1px solid rgba(245, 179, 1, 0.5); color: var(--f-gold-ink); font-size: 11.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.mem-state__title { margin: 14px 0 8px; font-family: var(--f-font-display); font-size: clamp(24px, 2.2vw, 30px); line-height: 1.18; font-weight: 800; color: var(--f-ink); letter-spacing: -0.025em; }
.mem-state--empty .mem-state__title { margin-top: 0; }
.mem-state__text { margin: 0 0 22px; max-width: 58ch; color: var(--f-muted); font-size: 16px; line-height: 1.7; }
.mem-state--soon .mem-state__text { margin-bottom: 0; }
.mem-state--soon { grid-template-columns: auto minmax(0, 1fr) minmax(240px, 0.45fr); }
.mem-state__todo { list-style: none; margin: 0; padding: 18px; display: grid; gap: 10px; border-radius: 20px; background: rgba(255, 255, 255, 0.8); border: 1px solid rgba(245, 179, 1, 0.35); }
.mem-state__todo li { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--f-ink); }
.mem-state__todo i { width: 34px; height: 34px; flex: none; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; color: var(--f-gold-ink); background: var(--f-butter); border: 1px solid rgba(245, 179, 1, 0.45); }

/* --- Invitation band: four steps + the camera ------------------------------ */
.mem-flow { list-style: none; margin: 28px 0 32px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.mem-flow__step {
    position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 16px 14px 15px; border-radius: 18px;
    background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.16);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.mem-flow__step:not(:last-child)::after { content: ''; position: absolute; z-index: 1; top: 35px; right: -14px; width: 14px; height: 2px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.35), rgba(251, 191, 36, 0.9)); }
.mem-flow__icon { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; color: var(--f-gold); background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.2); }
.mem-flow__step:last-child { background: rgba(251, 191, 36, 0.12); border-color: rgba(253, 230, 138, 0.4); }
.mem-flow__step:last-child .mem-flow__icon { background: var(--f-grad-gold); color: var(--f-navy); border-color: transparent; box-shadow: 0 10px 20px -10px rgba(245, 158, 11, 0.9); }
.mem-flow__text { display: grid; gap: 3px; }
.mem-flow__text small { font-size: 10.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.66); }
.mem-flow__text strong { font-size: 14.5px; line-height: 1.3; font-weight: 700; color: #fff; }

.mem-invite__art { display: flex; justify-content: center; align-items: center; min-height: 360px; }
.mem-cam { position: relative; width: 300px; height: 352px; flex: none; }
.mem-cam__body {
    position: absolute; z-index: 2; left: 18px; top: 0; width: 264px; height: 206px; border-radius: 40px 40px 30px 30px;
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 60%, #0b1f4b 60%, #12306f 100%);
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.9), inset 0 -3px 0 rgba(0, 0, 0, 0.25), 0 34px 60px -24px rgba(0, 0, 0, 0.65);
}
.mem-cam__stripe { position: absolute; left: 50%; top: 0; width: 24px; height: 60%; margin-left: -12px; background: linear-gradient(90deg, #2563eb 0 33%, #10b981 33% 66%, #fbbf24 66%); }
.mem-cam__lens {
    position: absolute; left: 50%; top: 34px; width: 120px; height: 120px; margin-left: -60px; border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, #0b1f4b 0 34%, #1e293b 35% 54%, #0f172a 55% 70%, #e2e8f0 71% 76%, #94a3b8 77% 100%);
    box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.55), inset 0 0 0 3px rgba(255, 255, 255, 0.6);
}
.mem-cam__lens > span { position: absolute; left: 30%; top: 26%; width: 22%; height: 16%; border-radius: 50%; background: rgba(255, 255, 255, 0.55); rotate: -30deg; filter: blur(1px); }
.mem-cam__flash { position: absolute; left: 22px; top: 22px; width: 54px; height: 32px; border-radius: 8px; background: linear-gradient(180deg, #f8fafc, #cbd5e1); box-shadow: inset 0 0 0 2px #e2e8f0, inset 0 -8px 12px -6px rgba(15, 23, 42, 0.25); }
.mem-cam__finder { position: absolute; right: 24px; top: 22px; width: 34px; height: 34px; border-radius: 10px; background: radial-gradient(circle at 35% 35%, #475569, #0f172a 70%); box-shadow: inset 0 0 0 3px #cbd5e1; }
.mem-cam__shutter { position: absolute; left: 28px; top: 88px; width: 26px; height: 26px; border-radius: 50%; background: var(--f-grad-gold); box-shadow: 0 4px 10px -3px rgba(245, 158, 11, 0.9), inset 0 -2px 0 rgba(0, 0, 0, 0.15); }
.mem-cam__slot { position: absolute; left: 50%; bottom: 22px; width: 184px; height: 8px; margin-left: -92px; border-radius: 6px; background: #020617; box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.12); }
.mem-cam__print {
    position: absolute; z-index: 1; left: 66px; top: 170px; width: 168px; padding: 10px 10px 0; background: #fff; border-radius: 4px; rotate: 4deg;
    box-shadow: 0 24px 40px -18px rgba(0, 0, 0, 0.6);
}
.mem-cam__print img { display: block; width: 100%; aspect-ratio: 1 / 0.9; object-fit: cover; border-radius: 2px; filter: saturate(0.9) sepia(0.15); }
.mem-cam__print > span { display: block; padding: 8px 2px 11px; text-align: center; font-family: var(--f-font-display); font-size: 12px; font-weight: 700; color: #334155; }
.mem-cam__chip {
    position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; white-space: nowrap;
    font-size: 12.5px; font-weight: 800; color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    box-shadow: 0 14px 28px -14px rgba(0, 0, 0, 0.6);
}
.mem-cam__chip--ok { left: -18px; top: 236px; background: rgba(16, 185, 129, 0.9); border: 1px solid rgba(167, 243, 208, 0.6); }
.mem-cam__chip--pin { right: -16px; top: 128px; background: var(--f-grad-gold); color: var(--f-navy); border: 1px solid rgba(253, 230, 138, 0.8); }

/* --- Share form: header, two labelled parts, a friendlier drop zone --------- */
.mem-form-back { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 14px; font-size: 14px; font-weight: 700; color: var(--f-blue-deep); }
.mem-form-back i { width: 30px; height: 30px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: var(--f-blue); background: var(--f-sky); border: 1px solid rgba(37, 99, 235, 0.22); transition: translate .3s cubic-bezier(.2, .8, .2, 1); }
.mem-form-back:hover { color: var(--f-blue); }
.mem-form-head { display: flex; align-items: center; gap: 16px; margin: 2px 0 24px; padding-bottom: 20px; border-bottom: 1px solid var(--f-line); }
.mem-form-head__icon { width: 52px; height: 52px; flex: none; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; color: var(--f-navy); background: var(--f-grad-gold); box-shadow: 0 12px 24px -12px rgba(245, 158, 11, 0.85); }
.mem-form-head__title { margin: 0 0 2px; font-family: var(--f-font-display); font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--f-ink); }
.mem-form-head__sub { margin: 0; font-size: 14px; line-height: 1.5; color: var(--f-muted); }
.mem-form-step { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--f-blue-deep); }
.mem-form-step::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(37, 99, 235, 0.28), transparent); }
.mem-form-step span { width: 26px; height: 26px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; letter-spacing: 0; color: #fff; background: var(--f-grad); }
.mem-form-step--2 { margin-top: 10px; color: #065f46; }
.mem-form-step--2::after { background: linear-gradient(90deg, rgba(5, 150, 105, 0.3), transparent); }
.mem-form-step--2 span { background: var(--f-grad-green); }
.mem-picker__drop { padding: 28px 20px 24px; background: radial-gradient(60% 90% at 50% 0%, rgba(37, 99, 235, 0.09), transparent 70%), var(--f-sky); }
.mem-picker__art { position: relative; width: 104px; height: 80px; margin-bottom: 8px; }
.mem-picker__art > span { position: absolute; top: 4px; width: 62px; height: 72px; padding: 6px 6px 16px; border-radius: 4px; background: #fff; box-shadow: 0 1px 3px rgba(11, 31, 75, 0.1), 0 12px 22px -12px rgba(11, 31, 75, 0.55); }
.mem-picker__art > span::before { content: ''; display: block; width: 100%; height: 100%; border-radius: 2px; background: linear-gradient(160deg, #fef3c7, #fde68a); }
.mem-picker__art > span:first-child { left: 6px; rotate: -10deg; }
.mem-picker__art > span:last-child { right: 6px; rotate: 7deg; }
.mem-picker__art > span:last-child::before { background: var(--f-grad); }
.mem-picker__art i { position: absolute; left: 6px; right: 6px; top: 6px; bottom: 16px; display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; }
.mem-picker__btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--f-blue-deep); background: #fff; border: 1px solid rgba(37, 99, 235, 0.3); box-shadow: 0 6px 14px -8px rgba(37, 99, 235, 0.55); }
.mem-picker__btn i { color: var(--f-blue); }

/* --- Motion (only for visitors who have not asked for less) ---------------- */
@media (prefers-reduced-motion: no-preference) {
    .mem-card:hover { translate: 0 -5px; }
    .mem-card:hover .mem-card__media img { scale: 1.04; }
    .mem-collage:hover .mem-polaroid--1 { rotate: -10deg; translate: -8px -4px; }
    .mem-collage:hover .mem-polaroid--2 { rotate: 8deg; translate: 8px -6px; }
    .mem-collage:hover .mem-polaroid--3 { rotate: 0deg; translate: 0 6px; }
    .mem-count__dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--f-gold-deep); animation: memPing 2.4s cubic-bezier(0, 0, .2, 1) infinite; }
    .mem-cam__print { animation: memPrint 1.2s cubic-bezier(.2, .8, .2, 1) both; animation-delay: .2s; }
    .mem-form-back:hover i { translate: -3px 0; }
}
@keyframes memPing { 0% { transform: scale(1); opacity: 0.6; } 80%, 100% { transform: scale(2.6); opacity: 0; } }
@keyframes memPrint { from { translate: 0 -46px; } to { translate: 0 0; } }

/* --- Responsive -------------------------------------------------------------- */
@media (max-width: 1199px) {
    .mem-intro { gap: 40px; }
    .mem-invite { grid-template-columns: minmax(0, 1fr); padding: 48px 44px; }
    .mem-invite__art { min-height: 0; padding-top: 8px; }
}
@media (max-width: 1023px) {
    .mem-intro { grid-template-columns: minmax(0, 1fr); gap: 36px; margin-bottom: 48px; }
    .mem-collage { justify-self: center; max-width: 520px; }
    .mem-state { padding: 36px; gap: 32px; }
    .mem-state--soon { grid-template-columns: auto minmax(0, 1fr); }
    .mem-state__todo { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .mem-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mem-flow__step:nth-child(2)::after { display: none; }
}
@media (max-width: 767px) {
    .mem-intro { margin-bottom: 40px; }
    .mem-intro__facts { margin: 18px 0 24px; }
    .mem-intro__actions .btn { flex: 1 1 100%; }
    .mem-collage { max-width: 400px; }
    .mem-polaroid { padding: 8px 8px 28px; }
    .mem-polaroid figcaption { padding: 8px 2px 10px; font-size: 12px; }
    .mem-polaroid::before { width: 64px; margin-left: -32px; height: 20px; top: -9px; }
    .mem-collage__slot { width: 92px; font-size: 11px; gap: 6px; }
    .mem-collage__slot i { width: 30px; height: 30px; font-size: 12px; }
    .mem-state, .mem-state--soon { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 32px 20px; gap: 18px; border-radius: 22px; }
    .mem-state__todo { width: 100%; grid-template-columns: minmax(0, 1fr); padding: 14px; text-align: left; }
    .mem-state__art { width: 180px; height: 170px; }
    .mem-state__text { margin-left: auto; margin-right: auto; font-size: 15px; }
    .mem-state .btn { width: 100%; }
    .mem-invite { margin-top: 56px; padding: 32px 20px 28px; border-radius: 24px; gap: 20px; }
    .mem-flow { grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 22px 0 26px; }
    .mem-flow__step { flex-direction: row; align-items: center; gap: 14px; padding: 12px 14px; }
    .mem-flow__step:not(:last-child)::after { display: block; top: auto; bottom: -10px; right: auto; left: 33px; width: 2px; height: 10px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(251, 191, 36, 0.9)); }
    .mem-flow__step:nth-child(2)::after { display: block; }
    .mem-invite .btn { width: 100%; }
    .mem-cam { scale: 0.86; margin: -24px 0 -30px; }
    .mem-cam__chip--ok { left: -6px; }
    .mem-cam__chip--pin { right: -6px; }
    .mem-steps { padding: 6px 16px; border-radius: 18px; }
    .mem-form-head { gap: 12px; margin-bottom: 20px; padding-bottom: 16px; }
    .mem-form-head__icon { width: 44px; height: 44px; font-size: 17px; border-radius: 14px; }
    .mem-form-head__title { font-size: 19px; }
    .mem-form-head__sub { font-size: 13px; }
}
/* ==== /v15-pages ==== */

/* ==== v16-frame — batch 16 frame promo + frame page rules (base + media) ==== */

/* --- /frame page: stage, empty state, Facebook mini preview --- */
.fr-stage { background: #0b1f4b; }
.fr-stage canvas:focus-visible { outline: 3px solid rgba(251, 191, 36, 0.9); outline-offset: -4px; }
.fr-stage__empty { pointer-events: auto; cursor: pointer; }
.fr-stage__empty-card {
    display: grid; justify-items: center; gap: 6px; max-width: 300px; padding: 22px 26px 20px; border-radius: 22px;
    background: rgba(255, 255, 255, 0.92); border: 1px solid rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    box-shadow: 0 26px 50px -24px rgba(11, 31, 75, 0.6); transition: transform .2s ease, box-shadow .2s ease;
}
.fr-stage__empty:hover .fr-stage__empty-card { transform: translateY(-2px); box-shadow: 0 30px 56px -24px rgba(11, 31, 75, 0.7); }
.fr-photo-actions:has(.fr-file:focus-visible) label.btn { outline: 3px solid rgba(37, 99, 235, 0.55); outline-offset: 3px; }

.fr-under {
    display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 12px 16px 12px 12px;
    border-radius: 18px; background: #fff; border: 1px solid var(--f-line); box-shadow: var(--f-shadow);
}
.fr-mini { flex: none; width: 68px; height: 68px; border-radius: 50%; padding: 3px; background: var(--f-grad-gold); box-shadow: 0 10px 20px -12px rgba(11, 31, 75, 0.7); }
.fr-mini canvas { display: block; width: 100%; height: 100%; border-radius: 50%; background: #dbe5f5; }
.fr-under__text { display: grid; gap: 3px; min-width: 0; }
.fr-under__text strong { font-family: var(--f-font-display); font-size: 14.5px; font-weight: 800; color: var(--f-ink); }
.fr-under__hint { font-size: 13px; line-height: 1.45; color: var(--f-muted); }
.fr-under__hint i { color: var(--f-blue); margin-right: 2px; }
.fr-under__hint[hidden] { display: none !important; }
.fr-under .fr-privacy { margin: 0; text-align: left; font-size: 12.5px; line-height: 1.45; }

/* --- style picker: three round previews --- */
.fr-styles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fr-style { position: relative; display: block; }
.fr-style__card { position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; padding: 14px 10px 12px; text-align: center; }
.fr-style__card:hover { border-color: rgba(37, 99, 235, 0.35); }
.fr-style__thumb {
    position: relative; width: 76px; height: 76px; margin: 0 0 6px; border-radius: 50%; overflow: hidden; flex: none;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08), 0 10px 20px -12px rgba(11, 31, 75, 0.75); transition: transform .25s ease, box-shadow .25s ease;
}
.fr-style__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.fr-style__thumb--ring { background: radial-gradient(circle, #dbe5f5 0 49%, #f3cd5c 49% 53%, transparent 53%), conic-gradient(from -90deg, #1d4ed8, #0b5876, #081a48, #0b5876, #1d4ed8); }
.fr-style__thumb--ring::after { content: none; }
.fr-style__thumb--banner { background: linear-gradient(180deg, #cbd5e1 0 63%, #f3cd5c 63% 67%, #0e2668 67%); }
.fr-style__thumb--gold { background: radial-gradient(circle, #dbe5f5 0 48%, #c99528 48% 51%, #fbf4e4 51% 90%, #c99528 90%); }
.fr-style:hover .fr-style__thumb { transform: scale(1.04); }
.fr-style input:checked + .fr-style__card .fr-style__thumb { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--f-blue), 0 12px 22px -12px rgba(11, 31, 75, 0.75); }
.fr-style__text { display: grid; gap: 2px; min-width: 0; }
.fr-style__name { font-size: 14.5px; }
.fr-style__desc { font-size: 12px; line-height: 1.4; }
.fr-style__check {
    position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%;
    display: grid; place-items: center; background: var(--f-blue); color: #fff; font-size: 10px;
    transform: scale(0); transition: transform .2s ease;
}
.fr-style input:checked + .fr-style__card .fr-style__check { transform: scale(1); }

/* --- Home promo: a navy showcase with the three real frames fanned out ---
   Sits directly under the photo-card promo on the same tinted band, so the
   two read as one "Show you're coming" block. */
.frame-promo { padding: 0 0 var(--section-y, 96px); background: var(--paper, #f4f8fc); }
.frame-promo__card {
    position: relative; isolation: isolate; overflow: hidden;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.24fr); align-items: center; gap: 40px;
    padding: 60px 48px 60px 64px; border-radius: 32px; color: #fff;
    background:
        radial-gradient(55% 75% at 88% 18%, rgba(251, 191, 36, 0.22), transparent 62%),
        radial-gradient(50% 70% at 0% 100%, rgba(20, 184, 166, 0.24), transparent 64%),
        linear-gradient(150deg, #0b1f4b 0%, #10286a 55%, #173c92 100%);
    border: 1px solid rgba(253, 230, 138, 0.2);
    box-shadow: 0 2px 6px rgba(11, 31, 75, 0.08), 0 44px 90px -40px rgba(11, 31, 75, 0.75);
}
.frame-promo__card::before {
    content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.55;
    background-image: radial-gradient(rgba(253, 230, 138, 0.55) 1px, transparent 1.6px), radial-gradient(rgba(255, 255, 255, 0.4) 1px, transparent 1.6px);
    background-size: 46px 46px, 71px 71px; background-position: 0 0, 23px 31px;
    -webkit-mask-image: radial-gradient(60% 85% at 78% 45%, #000, transparent 75%); mask-image: radial-gradient(60% 85% at 78% 45%, #000, transparent 75%);
}
.frame-promo__card::after { content: ''; position: absolute; left: 10%; right: 10%; top: 0; height: 1px; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(253, 230, 138, 0.85), transparent); }
.frame-promo__content { min-width: 0; }
.frame-promo__title {
    margin: 18px 0 14px; font-family: var(--f-font-display); font-size: clamp(30px, 1.55rem + 1.35vw, 44px);
    font-weight: 800; line-height: 1.08; letter-spacing: -0.03em; color: #fff; text-wrap: balance;
}
.frame-promo__title em {
    font-style: normal; font-weight: inherit;
    background: linear-gradient(90deg, #fde68a 0%, #fbbf24 55%, #f59e0b 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.frame-promo__lede { margin: 0 0 28px; max-width: 46ch; font-size: 16.5px; line-height: 1.65; color: rgba(255, 255, 255, 0.82); }
.frame-promo__points { list-style: none; margin: 0 0 34px; padding: 0; display: grid; gap: 16px; }
.frame-promo__points li { display: flex; gap: 14px; align-items: flex-start; }
.frame-promo__points i {
    flex: none; width: 42px; height: 42px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center;
    font-size: 15px; color: #fde68a; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(253, 230, 138, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.frame-promo__points span { font-size: 14.5px; line-height: 1.5; color: rgba(255, 255, 255, 0.74); }
.frame-promo__points strong { display: block; margin-bottom: 1px; font-size: 15.5px; font-weight: 700; color: #fff; }
.frame-promo__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; }
.frame-promo__cta { min-width: 220px; }
.frame-promo__cta:focus-visible { outline: 3px solid #fde68a; outline-offset: 4px; }
.frame-promo__note { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; line-height: 1.45; color: rgba(255, 255, 255, 0.74); }
.frame-promo__note i { flex: none; color: #fde68a; }

/* v17: three real portraits. Gold (front, raised) in the middle; Ring and
   Banner tucked behind it, lower-left / lower-right, far enough out that
   every face stays fully visible. Positions are % of the fan box. */
.frame-promo__visual { position: relative; min-width: 0; }
.frame-promo__visual::before {
    content: ''; position: absolute; left: 50%; top: 44%; width: 78%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.38) 0%, rgba(59, 130, 246, 0.2) 46%, transparent 70%); filter: blur(28px);
}
.frame-promo__fan { position: relative; z-index: 1; list-style: none; margin: 0; padding: 0; aspect-ratio: 1.46 / 1; }
/* soft floor shadow that grounds the trio */
.frame-promo__fan::after {
    content: ''; position: absolute; left: 12%; right: 12%; bottom: 0; height: 9%; z-index: -1; border-radius: 50%; pointer-events: none;
    background: radial-gradient(closest-side, rgba(0, 6, 24, 0.55), transparent); filter: blur(6px);
}
.frame-promo__sample { position: absolute; width: 37.5%; top: 30%; --fp-tilt: 0deg; --fp-x: 0%; --fp-y: 0px; --fp-s: 1; transform: translate(var(--fp-x), var(--fp-y)) rotate(var(--fp-tilt)) scale(var(--fp-s)); }
.frame-promo__sample--ring { z-index: 1; left: -1%; --fp-tilt: -7deg; }
.frame-promo__sample--banner { z-index: 2; left: 63.5%; --fp-tilt: 7deg; }
.frame-promo__sample--gold { z-index: 3; left: 23.5%; top: 2%; width: 53%; }
.frame-promo__art {
    position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 22px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2), 0 28px 54px -22px rgba(0, 6, 24, 0.9), 0 10px 22px -14px rgba(0, 6, 24, 0.6);
}
.frame-promo__art img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
/* glass sheen along the top edge of every card */
.frame-promo__art::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 32%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
/* CSS art under each image: what shows if a sample file is missing */
.frame-promo__sample--ring .frame-promo__art { background: radial-gradient(circle, #dbe5f5 0 36%, #f3cd5c 36% 37.5%, #1d4ed8 37.5% 47%, #f3cd5c 47% 48.5%, #0b1f4b 48.5%); }
.frame-promo__sample--banner .frame-promo__art { background: linear-gradient(180deg, #cbd5e1 0 66%, #f3cd5c 66% 67%, #0e2668 67%); }
.frame-promo__sample--gold .frame-promo__art {
    border-radius: 26px;
    background: radial-gradient(circle, #dbe5f5 0 36%, #c99528 36% 37.5%, #fbf4e4 37.5% 47%, #c99528 47% 48.5%, #f3ead6 48.5%);
    box-shadow: 0 0 0 1.5px rgba(253, 230, 138, 0.9), 0 0 0 6px rgba(251, 191, 36, 0.14), 0 44px 80px -26px rgba(0, 6, 24, 0.95), 0 0 90px -8px rgba(251, 191, 36, 0.5);
}
.frame-promo__tag {
    position: absolute; left: 50%; bottom: -13px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 14px; border-radius: 999px; white-space: nowrap;
    font-size: 11px; font-weight: 800; line-height: 1.2; letter-spacing: 0.16em; text-transform: uppercase; color: var(--f-navy);
    background: #fff; box-shadow: 0 0 0 1px rgba(11, 31, 75, 0.08), 0 10px 22px -10px rgba(0, 6, 24, 0.8);
}
.frame-promo__tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--f-blue, #2563eb); }
.frame-promo__sample--gold .frame-promo__tag { bottom: -15px; padding: 7px 16px; font-size: 11.5px; background: var(--f-grad-gold); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5) inset, 0 12px 26px -10px rgba(120, 76, 6, 0.9); }
.frame-promo__sample--gold .frame-promo__tag::before { background: var(--f-navy, #0b1f4b); }
/* "your photo here" hint, pinned to the front card's top-right corner */
.frame-promo__hint {
    position: absolute; z-index: 4; left: 66%; top: -1%; display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 13px 5px 5px; border-radius: 999px; white-space: nowrap;
    font-size: 12px; font-weight: 700; line-height: 1.2; color: var(--f-navy, #0b1f4b);
    background: #fff; box-shadow: 0 0 0 1px rgba(11, 31, 75, 0.06), 0 14px 28px -12px rgba(0, 6, 24, 0.85);
}
.frame-promo__hint i {
    flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; color: var(--f-navy, #0b1f4b); background: var(--f-grad-gold);
}
.frame-promo__hint::after {
    content: ''; position: absolute; left: 20px; bottom: -5px; width: 10px; height: 10px; background: #fff; transform: rotate(45deg); border-radius: 0 0 2px 0;
}

@media (prefers-reduced-motion: no-preference) {
    .frame-promo__sample { transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
    .frame-promo__hint { transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .frame-promo__card:hover .frame-promo__sample--ring { --fp-x: -3%; --fp-tilt: -9deg; }
    .frame-promo__card:hover .frame-promo__sample--banner { --fp-x: 3%; --fp-tilt: 9deg; }
    .frame-promo__card:hover .frame-promo__sample--gold { --fp-y: -6px; --fp-s: 1.02; }
    .frame-promo__card:hover .frame-promo__hint { transform: translateY(-6px); }
}
@media (max-width: 1180px) {
    .frame-promo__card { gap: 32px; padding: 52px 40px 52px 48px; }
}
@media (max-width: 1023px) {
    .frame-promo__card { grid-template-columns: minmax(0, 1fr); gap: 36px; padding: 48px 40px 60px; }
    .frame-promo__visual { width: 100%; max-width: 560px; margin: 0 auto; }
}
@media (max-width: 767px) {
    .frame-promo__card { gap: 28px; padding: 34px 20px 46px; border-radius: 24px; }
    .frame-promo__title { font-size: clamp(27px, 7.4vw, 34px); margin-top: 16px; }
    .frame-promo__lede { margin-bottom: 24px; font-size: 15.5px; }
    .frame-promo__points { margin-bottom: 28px; gap: 14px; }
    .frame-promo__points i { width: 40px; height: 40px; }
    .frame-promo__actions { flex-direction: column; align-items: stretch; gap: 12px; }
    .frame-promo__cta { width: 100%; min-width: 0; }
    .frame-promo__note { justify-content: center; text-align: center; }
    .frame-promo__visual { width: auto; margin: 0 -4px; }
    .frame-promo__art { border-radius: 16px; }
    .frame-promo__sample--gold .frame-promo__art { border-radius: 18px; }
    .frame-promo__tag { bottom: -11px; padding: 5px 10px; gap: 5px; font-size: 9.5px; letter-spacing: 0.14em; }
    .frame-promo__tag::before { width: 5px; height: 5px; }
    .frame-promo__sample--gold .frame-promo__tag { bottom: -12px; padding: 5px 12px; font-size: 10px; }
    .frame-promo__hint { gap: 6px; padding: 4px 10px 4px 4px; font-size: 11px; }
    .frame-promo__hint i { width: 20px; height: 20px; font-size: 9.5px; }
    .frame-promo__hint::after { left: 15px; width: 8px; height: 8px; bottom: -4px; }
}
/* Phones: too narrow to fan three cards and keep every face clear, so they
   stack as a pyramid — Gold on top, Ring below-left, Banner below-right. */
@media (max-width: 560px) {
    .frame-promo__fan { aspect-ratio: 1 / 1.1; }
    .frame-promo__fan::after { left: 6%; right: 6%; height: 6%; }
    .frame-promo__sample { width: 47.5%; top: 52%; }
    .frame-promo__sample--ring { left: 1%; --fp-tilt: -4deg; }
    .frame-promo__sample--banner { left: 51.5%; --fp-tilt: 4deg; }
    .frame-promo__sample--gold { left: 18%; top: 1%; width: 64%; }
    .frame-promo__hint { left: auto; right: 0; top: -2%; }
}

@media (max-width: 560px) {
    .fr-styles { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .fr-style__card { grid-template-columns: 56px minmax(0, 1fr); align-items: center; justify-items: start; column-gap: 14px; padding: 10px 44px 10px 10px; text-align: left; }
    .fr-style__thumb { width: 56px; height: 56px; margin: 0; }
    .fr-style__check { top: 50%; right: 14px; margin-top: -11px; }
    .fr-under { padding: 10px 12px 10px 10px; gap: 12px; }
    .fr-mini { width: 58px; height: 58px; }
    .fr-stage__empty-card { max-width: 236px; padding: 14px 16px 13px; border-radius: 18px; gap: 4px; }
    .fr-stage__empty .fr-stage__empty-card i { width: 50px; height: 50px; border-radius: 16px; font-size: 21px; margin-bottom: 6px; }
    .fr-stage__empty .fr-stage__empty-card strong { font-size: 15px; }
    .fr-stage__empty .fr-stage__empty-card span { font-size: 12.5px; line-height: 1.4; }
}

@media (prefers-reduced-motion: reduce) {
    .fr-stage__empty-card, .fr-style__thumb, .fr-style__check { transition: none; }
    .fr-stage__empty:hover .fr-stage__empty-card, .fr-style:hover .fr-style__thumb { transform: none; }
}
/* ==== /v16-frame ==== */
