/* ===============================================================
   KNMS premium dark theme.

   Deliberately dark-first: the dark-purple -> gold -> cyan accent
   language depends on glow, and glow only reads against a dark
   surface. Accents are pitched brighter than their light-theme
   equivalents so they luminesce rather than muddy.

   NOTE: the printed ID card (assets/css/id-card.css) and outgoing
   email (includes/mailer.php) hardcode their own light palette on
   purpose — a physical card and an inbox must not follow this theme.
   =============================================================== */
:root {
    /* Royal-purple brand surfaces — warmer and richer than before so the gold
       reads as regal rather than clinical. Used as BACKGROUNDS. */
    --knms-primary: #3b1f6e;
    --knms-primary-light: #5a2f9c;
    --knms-primary-dark: #23124a;

    /* Gold is the PRIMARY accent in this theme: headings, panel frames, ornaments. */
    --knms-accent: #ffb92e;
    --knms-accent-light: #ffd77a;
    --knms-accent-deep: #c88516;

    /* Page + panel surfaces — deep violet rather than neutral black. */
    --knms-bg: #150a2e;
    --knms-bg-elev: #1d0f3d;
    --knms-surface: #23134a;
    --knms-surface-2: #2d1a5c;

    /* Type. --knms-heading is separate from --knms-primary because the
       latter is a background; one token can't be both. */
    --knms-heading: #ffd77a;
    --knms-text: #ece5ff;
    --knms-muted: #b7a8e0;
    --knms-border: #4a2f8f;
    /* Gold frame used on panels, matching the reference design. */
    --knms-frame: rgba(255, 185, 46, 0.55);

    --knms-success: #34d399;
    --knms-success-bg: rgba(52, 211, 153, 0.14);
    --knms-error: #fb7185;
    --knms-error-bg: rgba(251, 113, 133, 0.14);
    --knms-warn: #fbbf24;
    --knms-warn-bg: rgba(251, 191, 36, 0.14);

    /* Shadows are deeper on dark so elevation still reads. */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 44px rgba(0, 0, 0, 0.6);

    --radius: 14px;
    --radius-sm: 8px;
    --footer-h: 72px;

    /* Accent palette — brighter than the light-theme values so they glow. */
    --gloss-purple: #8b5cf6;
    --gloss-purple-light: #c4b5fd;
    --gloss-purple-deep: #4c1d95;
    --gloss-cyan: #22d3ee;
    --gloss-cyan-light: #a5f3fc;
    --gloss-deep: #0c1a3d;

    /* Glow tokens — gold leads, matching the reference design. */
    --glow-purple: rgba(139, 92, 246, 0.7);
    --glow-gold: rgba(255, 185, 46, 0.75);
    --glow-cyan: rgba(34, 211, 238, 0.62);
}

* { box-sizing: border-box; }

html { -webkit-tap-highlight-color: transparent; }

body {
    margin: 0;
    font-family: 'Inter', "Segoe UI", Roboto, -apple-system, sans-serif;
    background: var(--knms-bg);
    color: var(--knms-text);
    padding-bottom: calc(var(--footer-h) + env(safe-area-inset-bottom, 0px));
    -webkit-font-smoothing: antialiased;
    animation: page-fade 0.25s ease-out;
}

@keyframes page-fade {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

h1, h2, h3 {
    font-family: 'Poppins', 'Inter', sans-serif;
    color: var(--knms-heading);
    letter-spacing: -0.01em;
}
h1 { font-size: 1.6rem; font-weight: 700; }

a { color: var(--knms-primary-light); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--knms-accent); }

.icon { width: 1.25em; height: 1.25em; display: inline-block; vertical-align: -0.22em; }

/* Text selection + focus states pick up the gradient identity too */
::selection { background: rgba(139, 92, 246,0.25); color: inherit; }

a:focus-visible, button:focus-visible, .btn:focus-visible, .footer-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 92, 246,0.25), 0 0 10px var(--glow-cyan);
    border-radius: 4px;
}

/* Custom scrollbar — thin gradient thumb instead of the default gray bar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--knms-bg); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gloss-purple), var(--knms-accent), var(--gloss-cyan));
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { filter: brightness(1.15); }
* { scrollbar-width: thin; scrollbar-color: var(--gloss-purple) var(--knms-bg); }

/* Top bar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(36,27,77,0.82) 0%, rgba(21,15,46,0.9) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: 0.7rem 1.25rem;
    flex-wrap: wrap;
    gap: 0.5rem;
    box-shadow: var(--shadow-md);
}
/* Persistent brand accent — the dark-purple → gold → cyan signature on every page */
.topbar::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -3px;
    height: 3px;
    background: linear-gradient(90deg, var(--gloss-purple), var(--knms-accent), var(--gloss-cyan));
    box-shadow: 0 0 10px var(--glow-purple), 0 0 10px var(--glow-cyan);
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
}
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--knms-accent), var(--knms-accent-light));
    color: var(--knms-primary-dark);
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: var(--shadow-sm);
}
.topnav { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.topnav a { color: rgba(255,255,255,0.8); font-size: 0.88rem; font-weight: 500; position: relative; padding: 0.25rem 0; }
.topnav a:hover { color: #fff; }
.topnav a.is-active { color: #fff; }
.topnav a.is-active::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 2px;
    background: linear-gradient(90deg, var(--gloss-purple), var(--knms-accent), var(--gloss-cyan));
    border-radius: 2px;
    box-shadow: 0 0 8px var(--glow-purple), 0 0 8px var(--glow-cyan);
}
.topnav a.btn-join { background: linear-gradient(135deg, var(--gloss-purple), var(--knms-accent) 60%, var(--gloss-cyan)); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.35); padding: 0.4rem 0.9rem; border-radius: 999px; font-weight: 600; transition: box-shadow 0.2s ease, filter 0.2s ease; }
.topnav a.btn-join:hover { filter: brightness(1.1); box-shadow: 0 0 16px var(--glow-purple), 0 0 16px var(--glow-cyan); }

.page {
    max-width: 960px;
    margin: 1.5rem auto;
    padding: 0 1rem;
}

.card {
    background: var(--knms-surface);
    border: 1px solid var(--knms-border);
    border-radius: var(--radius);
    padding: 1.4rem;
    margin-bottom: 1.1rem;
    /* Luminous edge — a faint always-on gradient-tinted ring, not just on hover */
    box-shadow: var(--shadow-sm), 0 0 0 1px rgba(139, 92, 246,0.16), 0 0 14px rgba(34,211,238,0.10);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-md), 0 0 0 1px rgba(139, 92, 246,0.34), 0 0 26px rgba(139, 92, 246,0.20); }

/* Small glowing marker before every card subheading — a quiet, consistent premium cue */
.card h3 { display: flex; align-items: center; gap: 0.5rem; }
.card h3::before {
    content: '';
    width: 7px;
    height: 7px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gloss-purple), var(--knms-accent), var(--gloss-cyan));
    box-shadow: 0 0 6px var(--glow-purple);
}

.hero {
    text-align: center;
    color: #fff;
    background:
        radial-gradient(circle at 15% 20%, rgba(212,164,55,0.35), transparent 45%),
        radial-gradient(circle at 88% 82%, rgba(139, 92, 246,0.4), transparent 50%),
        linear-gradient(135deg, var(--knms-primary) 0%, var(--knms-primary-dark) 100%);
    border: none;
    box-shadow: var(--shadow-lg), 0 0 0 rgba(0,0,0,0);
    position: relative;
    animation: hero-glow 6s ease-in-out infinite;
}
/* Rotating conic-gradient halo — an animated glowing ring traced around the hero card */
.hero::before {
    content: '';
    position: absolute;
    inset: -3px;
    z-index: 0;
    border-radius: inherit;
    padding: 3px;
    background: conic-gradient(from 0deg, var(--gloss-purple), var(--knms-accent), var(--gloss-cyan), var(--gloss-purple));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.85;
    animation: halo-spin 8s linear infinite;
    pointer-events: none;
}
@keyframes halo-spin { to { transform: rotate(360deg); } }
@keyframes hero-glow {
    0%, 100% { box-shadow: var(--shadow-lg), 0 0 36px var(--glow-purple); }
    50% { box-shadow: var(--shadow-lg), 0 0 44px var(--glow-cyan); }
}
/* Decorative accents (hexagon cluster, dashed ticks, wave lines) — inspired
   by the glossy AI-template reference; reused on any dark gradient banner. */
.hero-decor {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
}
.decor-hex { position: absolute; top: 14px; right: 16px; opacity: 0.9; filter: drop-shadow(0 0 6px var(--glow-purple)); }
.decor-hex.decor-inline { position: static; display: inline-block; filter: drop-shadow(0 0 4px var(--glow-cyan)); margin: 0 0.3rem; }
.decor-dashes { position: absolute; top: 18px; left: 22px; opacity: 0.8; }
.decor-waves { position: absolute; bottom: -4px; left: -4px; width: 62%; height: 90px; }

.hero h1 { color: #fff; margin-bottom: 0.3rem; font-size: 1.9rem; font-family: 'Goldman', 'Poppins', sans-serif; }
.hero p { opacity: 0.88; margin-top: 0; }
.hero .eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, var(--gloss-purple-light), var(--knms-accent-light), var(--gloss-cyan-light), var(--gloss-purple-light));
    background-size: 300% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradient-shift 6s linear infinite;
}
@keyframes gradient-shift { to { background-position: 300% center; } }
.hero-content { position: relative; z-index: 2; }

/* Compact hero banner for auth entry points (login/register) — same premium
   gradient + glow language, sized down and paired with a plain form body. */
.auth-card { max-width: 440px; margin: 0 auto; padding: 0; overflow: hidden; }
.auth-hero {
    text-align: center;
    color: #fff;
    padding: 1.75rem 1.5rem 1.4rem;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 15% 15%, rgba(212,164,55,0.35), transparent 45%),
        radial-gradient(circle at 90% 85%, rgba(139, 92, 246,0.4), transparent 50%),
        linear-gradient(135deg, var(--knms-primary) 0%, var(--knms-primary-dark) 100%);
}
.auth-hero .icon {
    width: 2.1rem;
    height: 2.1rem;
    color: var(--gloss-cyan-light);
    filter: drop-shadow(0 0 8px var(--glow-cyan));
    margin-bottom: 0.35rem;
}
.auth-hero-content { position: relative; z-index: 2; }
.auth-hero h1 { color: #fff; font-size: 1.3rem; margin: 0 0 0.2rem; font-family: 'Goldman', 'Poppins', sans-serif; }
.auth-hero p { opacity: 0.85; margin: 0; font-size: 0.85rem; }
.auth-body { padding: 1.4rem 1.4rem 1.6rem; }

/* Organic glowing "blob" shapes — soft blurred color pools sitting behind the
   spheres, echoing the teal/magenta glow pools from the reference artwork. */
.blob-field {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
}
.blob {
    position: absolute;
    filter: blur(18px);
    opacity: 0.55;
    animation: blob-drift 10s ease-in-out infinite;
}
.blob-cyan { background: radial-gradient(circle, var(--gloss-cyan) 0%, transparent 70%); border-radius: 60% 40% 55% 45% / 45% 55% 40% 60%; }
.blob-purple { background: radial-gradient(circle, var(--gloss-purple) 0%, transparent 70%); border-radius: 45% 55% 40% 60% / 55% 45% 60% 40%; }
@keyframes blob-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(8px, -10px) scale(1.08); }
}

/* Glossy orb decorations — inspired by glossy sphere / liquid-bubble artwork.
   Pure CSS: a soft white highlight fading into a saturated color, with an
   inset shadow for depth, so each div reads as a glassy 3D sphere. */
.orb-field {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}
.orb {
    position: absolute;
    border-radius: 50%;
    opacity: 0.9;
    filter: blur(0.5px);
    box-shadow: inset -10px -12px 26px rgba(0,0,0,0.28), inset 6px 8px 16px rgba(255,255,255,0.25), 0 12px 28px rgba(0,0,0,0.3), 0 0 30px var(--orb-glow, transparent);
    animation: orb-float 7s ease-in-out infinite;
}
.orb-purple { --orb-glow: var(--glow-purple); background: radial-gradient(circle at 32% 28%, #fff 0%, var(--gloss-purple-light) 18%, var(--gloss-purple) 55%, var(--gloss-purple-deep) 100%); }
.orb-cyan { --orb-glow: var(--glow-cyan); background: radial-gradient(circle at 32% 28%, #fff 0%, var(--gloss-cyan-light) 18%, var(--gloss-cyan) 55%, #0891a8 100%); }
.orb-navy { --orb-glow: var(--glow-gold); background: radial-gradient(circle at 32% 28%, #fff 0%, #5b7bc7 18%, var(--knms-primary-light) 55%, var(--gloss-deep) 100%); }

@keyframes orb-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-12px) scale(1.03); }
}
@media (prefers-reduced-motion: reduce) {
    .orb, .blob, .hero, .hero::before, .hero .eyebrow, .btn-accent, .btn.is-loading { animation: none; }
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, var(--knms-primary-light), var(--knms-primary));
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.6rem 1.3rem;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); color: #fff; text-decoration: none; }
.btn:active { transform: translateY(0); }
/* Static glass reflection — a soft highlight across the top half, always present */
.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.04) 45%, transparent 55%);
    pointer-events: none;
}
/* Glossy sheen sweep on hover — echoes the light reflecting off a glass sphere */
.btn::after {
    content: '';
    position: absolute;
    top: -60%;
    left: -30%;
    width: 30%;
    height: 220%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.65), transparent);
    transform: rotate(20deg);
    transition: left 0.55s ease;
    pointer-events: none;
}
.btn:hover::after { left: 130%; }
.btn-accent {
    background: linear-gradient(135deg, var(--gloss-purple), var(--knms-accent) 55%, var(--gloss-cyan));
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.35);
    transition: transform 0.15s ease, box-shadow 0.25s ease;
    animation: btn-breathe 3s ease-in-out infinite;
}
.btn-accent:hover {
    box-shadow: 0 6px 20px rgba(12,18,32,0.25), 0 0 22px var(--glow-purple), 0 0 26px var(--glow-cyan);
    animation-play-state: paused;
}
@keyframes btn-breathe {
    0%, 100% { box-shadow: var(--shadow-sm), 0 0 10px var(--glow-purple); }
    50% { box-shadow: var(--shadow-sm), 0 0 18px var(--glow-cyan); }
}
.btn-secondary { background: var(--knms-surface); color: var(--knms-text); border: 1px solid var(--knms-border); box-shadow: none; }
.btn-secondary:hover { border-color: var(--knms-primary-light); color: var(--knms-text); }
.btn-danger { background: linear-gradient(135deg, #e14b42, var(--knms-error)); }

.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; margin-bottom: 0.35rem; font-weight: 600; font-size: 0.88rem; color: var(--knms-heading); }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1.5px solid var(--knms-border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--knms-surface);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gloss-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246,0.15), 0 0 10px var(--glow-cyan);
}

.flash { padding: 0.75rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: 0.9rem; font-weight: 500; border-left: 3px solid transparent; animation: page-fade 0.25s ease-out; }
.flash-success { background: var(--knms-success-bg); color: var(--knms-success); border: 1px solid #bfe6cf; border-left: 3px solid var(--knms-success); box-shadow: 0 0 14px rgba(27,138,76,0.12); }
.flash-error { background: var(--knms-error-bg); color: var(--knms-error); border: 1px solid #f4c3bf; border-left: 3px solid var(--knms-error); box-shadow: 0 0 14px rgba(208,52,44,0.12); }

/* Avatar chip — gradient-ring initials, used anywhere a member is referenced */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gloss-purple), var(--knms-accent) 55%, var(--gloss-cyan));
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.72rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 0 0 2px var(--knms-surface), 0 0 8px var(--glow-purple);
    flex-shrink: 0;
    vertical-align: middle;
}
.avatar-sm { width: 1.5rem; height: 1.5rem; font-size: 0.6rem; }
.avatar-lg { width: 3.2rem; height: 3.2rem; font-size: 1.1rem; }
.name-row { display: inline-flex; align-items: center; gap: 0.5rem; }

/* Gradient capacity meter — event registration fill */
.capacity-meter { width: 100%; height: 8px; border-radius: 999px; background: var(--knms-border); overflow: hidden; margin-top: 0.4rem; }
.capacity-meter-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--gloss-purple), var(--knms-accent), var(--gloss-cyan));
    box-shadow: 0 0 8px var(--glow-cyan);
    transition: width 0.3s ease;
}
.capacity-meter-fill.is-full { background: linear-gradient(90deg, var(--knms-error), var(--knms-warn)); box-shadow: 0 0 8px rgba(208,52,44,0.4); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--knms-border); font-size: 0.88rem; }
th { color: var(--knms-muted); font-weight: 600; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.04em; }
tr:last-child td { border-bottom: none; }
/* Luminous row hover — a dashboard-table cue matching the rest of the accent language */
table tr:not(:first-child) {
    position: relative;
    transition: background 0.15s ease;
}
table tr:not(:first-child):hover {
    background: linear-gradient(90deg, rgba(139, 92, 246,0.14), rgba(34,211,238,0.04));
    box-shadow: inset 2px 0 0 var(--gloss-purple);
}

/* Wrap any <table> that can outgrow a phone screen — scrolls horizontally
   inside its own box instead of blowing out the page or wrapping awkwardly. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -0.2rem; }
.table-scroll table { min-width: 480px; }
@media (max-width: 600px) {
    .table-scroll { margin: 0 -1rem; padding: 0 1rem; }
}

/* Quick filter box above a table-scroll — instant client-side search */
.list-filter { position: relative; margin-bottom: 0.9rem; }
.list-filter input {
    width: 100%;
    padding: 0.6rem 0.8rem 0.6rem 2.3rem;
    border: 1.5px solid var(--knms-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--knms-surface);
    color: var(--knms-text);
}
.list-filter input:focus {
    outline: none;
    border-color: var(--gloss-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246,0.15), 0 0 10px var(--glow-cyan);
}
.list-filter .icon { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); width: 1.1rem; height: 1.1rem; color: var(--knms-muted); pointer-events: none; transition: color 0.15s ease, filter 0.15s ease; }
.list-filter:focus-within .icon { color: var(--gloss-purple); filter: drop-shadow(0 0 4px var(--glow-cyan)); }
.list-filter-empty { color: var(--knms-muted); font-size: 0.88rem; padding: 0.5rem 0; display: none; }

/* Accessibility: visually-hidden skip link, revealed on keyboard focus —
   same gradient + glow language as the rest of the interface. */
.skip-link {
    position: absolute;
    left: -999px;
    top: auto;
    background: linear-gradient(135deg, var(--gloss-purple), var(--knms-accent) 55%, var(--gloss-cyan));
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.35);
    font-weight: 600;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 0 16px var(--glow-purple), 0 0 16px var(--glow-cyan);
    z-index: 100;
}
.skip-link:focus {
    left: 0.75rem;
    top: 0.75rem;
    outline: none;
}

/* Disabled/submitting state for buttons — prevents double-submit confusion */
.btn[disabled] { opacity: 0.7; cursor: progress; pointer-events: none; }
.btn.is-loading { opacity: 0.85; cursor: progress; pointer-events: none; animation: btn-loading-glow 1.1s ease-in-out infinite; }
@keyframes btn-loading-glow {
    0%, 100% { box-shadow: var(--shadow-sm), 0 0 6px var(--glow-purple); }
    50% { box-shadow: var(--shadow-sm), 0 0 16px var(--glow-cyan); }
}

.badge-pill {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.badge-pending { background: var(--knms-warn-bg); color: var(--knms-warn); }
.badge-active { background: var(--knms-success-bg); color: var(--knms-success); }
.badge-rejected, .badge-suspended { background: var(--knms-error-bg); color: var(--knms-error); }

/* Decorative gradient badge — for achievements/highlights, not status (status stays
   flat semantic color so pending/active/rejected remain instantly readable). */
.badge-gradient {
    background: linear-gradient(135deg, var(--gloss-purple), var(--knms-accent), var(--gloss-cyan));
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.35);
    box-shadow: 0 0 8px var(--glow-purple);
}

/* Leaderboard rank markers — gold/cyan/purple spotlight for the top 3 */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 50%;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--knms-muted);
    background: var(--knms-bg);
    border: 1px solid var(--knms-border);
}
.rank-badge.rank-1 { background: linear-gradient(135deg, var(--knms-accent), var(--knms-accent-light)); color: #4a3403; box-shadow: 0 0 10px var(--glow-gold); border: none; }
.rank-badge.rank-2 { background: linear-gradient(135deg, var(--gloss-cyan), var(--gloss-cyan-light)); color: #013844; box-shadow: 0 0 10px var(--glow-cyan); border: none; }
.rank-badge.rank-3 { background: linear-gradient(135deg, var(--gloss-purple), var(--gloss-purple-light)); color: #fff; box-shadow: 0 0 10px var(--glow-purple); border: none; }

/* SaaS-style dashboard header — dark gradient panel with reflection sheen and
   a luminous bottom edge, used atop admin/analytics dashboards. */
.dashboard-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    color: #fff;
    padding: 1.1rem 1.4rem;
    border-radius: var(--radius);
    margin-bottom: 1.3rem;
    background: linear-gradient(135deg, var(--knms-primary) 0%, var(--knms-primary-dark) 100%);
    box-shadow: var(--shadow-md), 0 0 24px var(--glow-purple);
    overflow: hidden;
}
.dashboard-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.08), transparent 55%);
    pointer-events: none;
}
.dashboard-header::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gloss-purple), var(--knms-accent), var(--gloss-cyan));
    box-shadow: 0 0 10px var(--glow-cyan);
}
.dashboard-header .icon-badge {
    position: relative;
    z-index: 1;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gloss-purple), var(--knms-accent) 55%, var(--gloss-cyan));
    box-shadow: 0 0 14px var(--glow-purple);
    flex-shrink: 0;
}
.dashboard-header .icon-badge .icon { width: 1.4rem; height: 1.4rem; color: #fff; }
.dashboard-header .dashboard-header-text { position: relative; z-index: 1; }
.dashboard-header h1 { color: #fff; margin: 0; font-size: 1.35rem; font-family: 'Goldman', 'Poppins', sans-serif; }
.dashboard-header p { margin: 0.15rem 0 0; opacity: 0.8; font-size: 0.85rem; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-tile {
    background: var(--knms-surface);
    border: 1px solid var(--knms-border);
    border-radius: var(--radius);
    padding: 1.1rem 1rem;
    text-align: center;
    box-shadow: var(--shadow-sm), 0 0 0 1px rgba(139, 92, 246,0.14);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    position: relative;
    overflow: hidden;
}
/* Luminous top edge — faintly present at rest, fully lit on hover */
.stat-tile::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gloss-purple), var(--knms-accent), var(--gloss-cyan));
    opacity: 0.35;
    box-shadow: 0 0 8px var(--glow-purple);
    transition: opacity 0.2s ease;
}
.stat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md), 0 0 22px rgba(139, 92, 246,0.28); }
.stat-tile:hover::before { opacity: 1; }
.stat-tile .value { font-family: 'Poppins', sans-serif; font-size: 1.7rem; font-weight: 700; color: var(--knms-heading); }
.stat-tile .label { font-size: 0.76rem; color: var(--knms-muted); margin-top: 0.15rem; }

/* Footer navigation — fixed, native-app style */
.footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    background: rgba(16, 12, 31, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--knms-border);
    box-shadow: 0 -4px 20px rgba(16,24,40,0.08);
    z-index: 50;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.footer-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.55rem 0.25rem 0.5rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--knms-muted);
    position: relative;
    transition: color 0.15s ease;
}
.footer-link .icon { width: 1.35em; height: 1.35em; transition: transform 0.15s ease; }
.footer-link:hover, .footer-link:focus, .footer-link:focus-within { color: var(--knms-heading); text-decoration: none; }
.footer-link:active .icon { transform: scale(0.88); }
.footer-link.is-active { color: var(--knms-heading); }
.footer-link.is-active::before {
    content: '';
    position: absolute;
    top: 2px;
    width: 22px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--gloss-purple), var(--knms-accent), var(--gloss-cyan));
    box-shadow: 0 0 6px var(--glow-purple);
}
.footer-expandable { cursor: pointer; }
.footer-submenu {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--knms-surface);
    border: 1px solid var(--knms-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 0.4rem;
    white-space: nowrap;
    margin-bottom: 0.6rem;
}
.footer-expandable:hover .footer-submenu,
.footer-expandable:focus-within .footer-submenu {
    display: flex;
    flex-direction: column;
}
.footer-submenu a { padding: 0.4rem 0.7rem; color: var(--knms-text); font-size: 0.8rem; font-weight: 500; border-radius: 6px; }
.footer-submenu a:hover { background: var(--knms-bg); }

/* Legacy/CMS photo showcase gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.8rem;
}
.gallery-item {
    position: relative;
    display: block;
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    background: var(--knms-bg);
    box-shadow: var(--shadow-sm), 0 0 0 1px rgba(139, 92, 246,0.16);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.gallery-item:hover, .gallery-item:focus-visible {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), 0 0 18px var(--glow-purple);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-item-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 0.5rem 0.6rem 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #fff;
    text-align: left;
    background: linear-gradient(0deg, rgba(13,21,38,0.85), transparent);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* ---------------------------------------------------------------
   CMS content blocks
   --------------------------------------------------------------- */
.cms-block-bare { margin-bottom: 1.1rem; }
.cms-richtext { line-height: 1.65; }
.cms-richtext > *:first-child { margin-top: 0; }
.cms-richtext > *:last-child { margin-bottom: 0; }
.cms-richtext img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.cms-richtext blockquote {
    margin: 1rem 0;
    padding: 0.6rem 1rem;
    border-left: 3px solid var(--gloss-purple);
    background: var(--knms-bg);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Milestone timeline — a glowing gradient rail with dotted markers */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.6rem; position: relative; }
.timeline::before {
    content: '';
    position: absolute;
    left: 5px; top: 6px; bottom: 6px;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--gloss-purple), var(--knms-accent), var(--gloss-cyan));
    box-shadow: 0 0 8px var(--glow-purple);
}
.timeline-item { position: relative; padding-bottom: 1.3rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker {
    position: absolute;
    left: -1.6rem;
    top: 0.35rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gloss-purple), var(--knms-accent), var(--gloss-cyan));
    box-shadow: 0 0 0 3px var(--knms-surface), 0 0 10px var(--glow-purple);
}
.timeline-year {
    display: inline-block;
    font-family: 'Goldman', 'Poppins', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--gloss-purple);
    margin-bottom: 0.15rem;
}
.timeline-title { display: block; color: var(--knms-heading); font-family: 'Poppins', sans-serif; }
.timeline-text { margin: 0.25rem 0 0; color: var(--knms-muted); font-size: 0.9rem; line-height: 1.55; }

/* Pull quote */
.cms-quote {
    margin: 0 0 1.1rem;
    padding: 1.6rem 1.5rem;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 18%, rgba(212,164,55,0.12), transparent 45%),
        radial-gradient(circle at 88% 82%, rgba(139, 92, 246,0.12), transparent 50%),
        var(--knms-surface);
}
.cms-quote::before {
    content: '"';
    position: absolute;
    top: -0.6rem; left: 0.7rem;
    font-family: 'Goldman', serif;
    font-size: 5rem;
    line-height: 1;
    color: var(--gloss-purple);
    opacity: 0.18;
}
.cms-quote blockquote {
    margin: 0;
    position: relative;
    font-size: 1.12rem;
    line-height: 1.6;
    color: var(--knms-text);
    font-style: italic;
}
.cms-quote figcaption {
    margin-top: 0.7rem;
    font-weight: 700;
    font-size: 0.88rem;
    background: linear-gradient(90deg, var(--gloss-purple), var(--knms-accent), var(--gloss-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Call-to-action panel */
.cms-cta {
    text-align: center;
    color: #fff;
    background:
        radial-gradient(circle at 15% 20%, rgba(212,164,55,0.3), transparent 45%),
        radial-gradient(circle at 88% 82%, rgba(139, 92, 246,0.38), transparent 50%),
        linear-gradient(135deg, var(--knms-primary) 0%, var(--knms-primary-dark) 100%);
    border: none;
    box-shadow: var(--shadow-md), 0 0 26px var(--glow-purple);
}
.cms-cta h3 { color: #fff; justify-content: center; }
.cms-cta p { opacity: 0.9; margin-top: 0; }

/* Responsive video embed */
.cms-video { position: relative; padding-top: 56.25%; border-radius: var(--radius-sm); overflow: hidden; background: #000; }
.cms-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------------------------------------------------------------
   News module
   --------------------------------------------------------------- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1.1rem;
}
.news-card {
    display: flex;
    flex-direction: column;
    background: var(--knms-surface);
    border: 1px solid var(--knms-border);
    border-radius: var(--radius);
    overflow: hidden;
    color: inherit;
    box-shadow: var(--shadow-sm), 0 0 0 1px rgba(139, 92, 246,0.16);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.news-card:hover { transform: translateY(-2px); color: inherit; box-shadow: var(--shadow-md), 0 0 26px rgba(139, 92, 246,0.26); }
.news-card.is-featured { box-shadow: var(--shadow-md), 0 0 0 1px rgba(212,164,55,0.35), 0 0 20px var(--glow-gold); }
.news-card-media { width: 100%; height: 150px; object-fit: cover; display: block; background: var(--knms-bg); }
.news-card-body { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.9rem 1rem 1rem; }
.news-card-meta { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.news-card-body strong { color: var(--knms-heading); font-family: 'Poppins', sans-serif; line-height: 1.35; }
.news-card-excerpt { color: var(--knms-muted); font-size: 0.85rem; line-height: 1.5; }
.news-card-date { color: var(--knms-muted); font-size: 0.76rem; margin-top: 0.1rem; }

/* Filter chips (news categories) */
.chip-row { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.chip {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--knms-muted);
    background: var(--knms-surface);
    border: 1px solid var(--knms-border);
    transition: color 0.15s ease, box-shadow 0.2s ease;
}
.chip:hover { color: var(--knms-heading); }
.chip.is-active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--gloss-purple), var(--knms-accent) 60%, var(--gloss-cyan));
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 0 12px var(--glow-purple);
}

/* CMS page directory cards (pages/index.php) */
.page-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.1rem;
}
.page-card {
    display: flex;
    flex-direction: column;
    background: var(--knms-surface);
    border: 1px solid var(--knms-border);
    border-radius: var(--radius);
    overflow: hidden;
    color: inherit;
    box-shadow: var(--shadow-sm), 0 0 0 1px rgba(139, 92, 246,0.16);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.page-card:hover {
    transform: translateY(-2px);
    color: inherit;
    box-shadow: var(--shadow-md), 0 0 26px rgba(139, 92, 246,0.26);
}
.page-card-media { width: 100%; height: 140px; object-fit: cover; display: block; background: var(--knms-bg); }
.page-card-media-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--knms-primary), var(--knms-primary-dark));
}
.page-card-media-empty .icon { width: 2.2rem; height: 2.2rem; color: var(--knms-accent-light); filter: drop-shadow(0 0 8px var(--glow-gold)); }
.page-card-body { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.9rem 1rem 1rem; }
.page-card-body strong { color: var(--knms-heading); font-family: 'Poppins', sans-serif; }
.page-card-sub { color: var(--knms-muted); font-size: 0.82rem; }
.page-card-body .badge-pill { align-self: flex-start; margin-top: 0.15rem; }

/* Lightbox modal for gallery photos + their elaborated details */
.lightbox { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.lightbox[hidden] { display: none; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(6,10,20,0.82); backdrop-filter: blur(4px); }
.lightbox-dialog {
    position: relative;
    z-index: 1;
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--knms-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg), 0 0 40px var(--glow-purple);
}
.lightbox-image { width: 100%; max-height: 60vh; object-fit: contain; background: #000; display: block; }
.lightbox-info { padding: 1.1rem 1.3rem 1.3rem; }
.lightbox-info h4 { margin: 0 0 0.4rem; color: var(--knms-heading); }
.lightbox-info p { margin: 0; color: var(--knms-muted); white-space: pre-line; }
.lightbox-close, .lightbox-nav {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(13,21,38,0.55);
    color: #fff;
    cursor: pointer;
    z-index: 2;
}
.lightbox-close { top: 0.6rem; right: 0.6rem; width: 2.1rem; height: 2.1rem; font-size: 1.3rem; line-height: 1; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 2.4rem; height: 2.4rem; font-size: 1.6rem; }
.lightbox-prev { left: 0.6rem; }
.lightbox-next { right: 0.6rem; }
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(139, 92, 246,0.75); box-shadow: 0 0 12px var(--glow-purple); }

@media (max-width: 600px) {
    .topnav { display: none; }
    .page { margin: 1rem auto; }
    .hero h1 { font-size: 1.5rem; }
    .lightbox { padding: 0; }
    .lightbox-dialog { max-height: 100vh; height: 100%; border-radius: 0; }
}

/* (The former prefers-color-scheme:dark override was removed — the theme is
   now dark by default, and that block set a *different*, paler palette which
   would have overridden this one on dark-preference devices.) */

/* ---------------------------------------------------------------
   Notification centre — bell badge + unread item treatment
   --------------------------------------------------------------- */

.nav-bell { position: relative; display: inline-flex; align-items: center; }
.nav-bell .icon { width: 1.15rem; height: 1.15rem; }
.nav-bell-count {
    position: absolute;
    top: -6px;
    right: -9px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--gloss-purple), var(--knms-accent) 60%, var(--gloss-cyan));
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
    box-shadow: 0 0 8px var(--glow-purple);
}

.notification-item { transition: box-shadow 0.2s ease, transform 0.2s ease; }
.notification-item.is-unread {
    border-left: 3px solid transparent;
    border-image: linear-gradient(180deg, var(--gloss-purple), var(--knms-accent), var(--gloss-cyan)) 1;
    box-shadow: var(--shadow-sm), 0 0 0 1px rgba(139, 92, 246,0.12), 0 0 18px rgba(139, 92, 246,0.08);
}
.notification-icon {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--gloss-purple), var(--knms-accent) 55%, var(--gloss-cyan));
    box-shadow: 0 0 10px var(--glow-purple);
}
.notification-icon .icon { width: 1.1rem; height: 1.1rem; color: #fff; }

/* Celebration row on the personalised dashboard */
.celebration-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.35rem 0; }
.celebration-when {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: var(--knms-warn-bg);
    color: var(--knms-warn);
}
.celebration-when.is-today {
    background: linear-gradient(135deg, var(--gloss-purple), var(--knms-accent) 60%, var(--gloss-cyan));
    color: #fff;
    box-shadow: 0 0 10px var(--glow-purple);
}

/* ---------------------------------------------------------------
   Celebrations: today's birthday / anniversary cards + wish wall
   --------------------------------------------------------------- */
.celebration-card { position: relative; overflow: hidden; padding-top: 1.9rem; }
/* Gradient ribbon across the top of a celebrant's card */
.celebration-banner {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--gloss-purple), var(--knms-accent), var(--gloss-cyan));
    box-shadow: 0 0 14px var(--glow-purple);
}
.celebration-head { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
.celebration-photo {
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px var(--knms-surface), 0 0 12px var(--glow-purple);
}
.celebration-head h3 { font-size: 1.12rem; }
.celebration-head h3::before { display: none; }

.wish-form { margin-top: 1rem; }
.wish-sent {
    margin-top: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--knms-success);
}
.wish-sent .icon { width: 1rem; height: 1rem; }

.wish-wall { margin-top: 1.1rem; border-top: 1px solid var(--knms-border); padding-top: 0.9rem; }
.wish-wall h4 {
    margin: 0 0 0.7rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.86rem;
    color: var(--knms-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.wish-item { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.5rem 0; }
.wish-item p {
    margin: 0.2rem 0 0;
    font-size: 0.9rem;
    line-height: 1.55;
    padding: 0.5rem 0.75rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) var(--radius-sm);
    background: var(--knms-bg);
    border-left: 2px solid var(--gloss-purple);
}

/* ---------------------------------------------------------------
   Email template editor: merge-field chips + rendered preview
   --------------------------------------------------------------- */
.placeholder-help {
    background: var(--knms-bg);
    border: 1px dashed var(--knms-border);
    border-radius: var(--radius-sm);
    padding: 0.8rem 1rem;
    margin-bottom: 1.1rem;
}
.placeholder-help strong { color: var(--knms-heading); font-size: 0.88rem; }
.placeholder-help p { margin: 0.2rem 0 0.6rem; color: var(--knms-muted); font-size: 0.82rem; }
.placeholder-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.placeholder-chip {
    font-size: 0.76rem;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: var(--knms-surface);
    border: 1px solid var(--knms-border);
    color: var(--gloss-purple);
    font-weight: 600;
}

.email-preview {
    border: 1px solid var(--knms-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    max-width: 560px;
    background: var(--knms-surface);
    box-shadow: var(--shadow-sm);
}
.email-preview-header {
    background: linear-gradient(135deg, var(--knms-primary), var(--knms-primary-dark));
    padding: 1.1rem 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.email-preview-eyebrow {
    color: var(--knms-accent-light);
    font-size: 0.66rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 700;
}
.email-preview-heading { color: #fff; font-size: 1.12rem; font-weight: 700; font-family: 'Poppins', sans-serif; }
.email-preview-accent {
    height: 3px;
    background: linear-gradient(90deg, var(--gloss-purple), var(--knms-accent), var(--gloss-cyan));
}
.email-preview-body { padding: 1.2rem 1.3rem; font-size: 0.92rem; line-height: 1.65; }
.email-preview-body p { margin: 0 0 0.8rem; }

/* ===============================================================
   Mobile-native refinements + three-colour theme coverage
   (dark-purple -> gold -> cyan) for the newer modules
   =============================================================== */

/* Footer nav: badge on the Alerts tab so unread count is visible on phones,
   where the top bar is hidden entirely. */
.footer-icon-wrap { position: relative; display: inline-flex; }
.footer-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--gloss-purple), var(--knms-accent) 60%, var(--gloss-cyan));
    color: #fff;
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 15px;
    text-align: center;
    box-shadow: 0 0 6px var(--glow-purple);
}

/* News cards: additive only — the base card styling (incl. the gold featured
   glow) is defined earlier and deliberately left intact. This just adds the
   three-colour top edge used on stat tiles, for consistency. */
.news-card { position: relative; }
.news-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gloss-purple), var(--knms-accent), var(--gloss-cyan));
    opacity: 0.35;
    transition: opacity 0.2s ease;
    z-index: 1;
}
.news-card:hover::before { opacity: 1; box-shadow: 0 0 10px var(--glow-purple); }

/* ---------------------------------------------------------------
   Mobile-native behaviour
   --------------------------------------------------------------- */
@media (max-width: 600px) {
    /* Comfortable tap targets (Apple/Google guidance is ~44px). */
    .btn { min-height: 44px; padding: 0.7rem 1.2rem; }
    .footer-link { min-height: 52px; justify-content: center; }

    /* Full-width primary actions read as native app buttons. */
    .auth-body .btn[type="submit"],
    .auth-body button.btn { width: 100%; justify-content: center; }

    /* Stat tiles: 2-up instead of cramped 4-up. */
    .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
    .stat-tile { padding: 0.9rem 0.6rem; }
    .stat-tile .value { font-size: 1.35rem; }

    .card { padding: 1.1rem; border-radius: 12px; }
    .dashboard-header { flex-direction: row; padding: 0.9rem 1rem; }
    .dashboard-header h1 { font-size: 1.1rem; }
    .dashboard-header p { font-size: 0.78rem; }

    /* Never let a long email/URL blow out the page width. */
    body { overflow-x: hidden; }
    td, th { word-break: break-word; }

    .news-grid { grid-template-columns: 1fr; }
    .id-card-sheet { padding: 0.75rem; gap: 1rem; }
}

/* Momentum scrolling + snap for horizontally scrolling tables on touch. */
@media (hover: none) {
    .table-scroll { scroll-snap-type: x proximity; }
    .card:hover { transform: none; }
    .news-card:hover { transform: none; }
}

/* ===============================================================
   Premium dark theme — depth, luminosity, ambient light
   =============================================================== */

/* Ambient aurora behind the whole page: two vast, soft colour pools that make
   the background feel lit rather than flat black. Fixed + non-interactive. */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 55% at 12% -8%, rgba(139, 92, 246, 0.20), transparent 60%),
        radial-gradient(ellipse 70% 50% at 92% 8%, rgba(34, 211, 238, 0.13), transparent 60%),
        radial-gradient(ellipse 90% 60% at 50% 108%, rgba(240, 184, 64, 0.09), transparent 65%);
}

/* Surfaces: a subtle top sheen so cards read as lit glass, not flat blocks. */
.card,
.stat-tile,
.news-card {
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 42%);
    background-color: var(--knms-surface);
}

/* Inputs need to sit *below* the surface on dark, otherwise they disappear. */
.form-group input,
.form-group select,
.form-group textarea,
.list-filter input {
    background: var(--knms-bg-elev);
    color: var(--knms-text);
    border-color: var(--knms-border);
}
.form-group input::placeholder,
.form-group textarea::placeholder,
.list-filter input::placeholder { color: #7d75a6; }
/* Dark-theme date/time pickers ship black glyphs; invert so they stay visible. */
.form-group input[type="date"]::-webkit-calendar-picker-indicator,
.form-group input[type="datetime-local"]::-webkit-calendar-picker-indicator { filter: invert(0.8); }

.btn-secondary { background: var(--knms-surface-2); }
.btn-secondary:hover { border-color: var(--gloss-purple); box-shadow: 0 0 12px var(--glow-purple); }

/* Links: violet-tinted, gold on hover — readable against the dark surface. */
a { color: var(--gloss-purple-light); }
a:hover { color: var(--knms-accent-light); }

/* Headline treatment: gradient text for the biggest headings.
   Guarded by @supports — without background-clip:text the transparent fill
   would render the heading invisible rather than merely unstyled. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .dashboard-header h1,
    .hero h1 {
        background: linear-gradient(100deg, #ffffff 20%, var(--gloss-cyan-light) 55%, var(--gloss-purple-light) 90%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
    }
}

/* Brand mark + accent chips gain a true halo on dark. */
.brand-mark { box-shadow: 0 0 14px var(--glow-gold); color: #2a1e05; }
.rank-badge { background: var(--knms-surface-2); }
.avatar { box-shadow: 0 0 0 2px var(--knms-surface), 0 0 12px var(--glow-purple); }

/* Tables read better with a tinted header row than bare text on dark. */
th { background: rgba(139, 92, 246, 0.07); }
table tr:not(:first-child):hover {
    background: linear-gradient(90deg, rgba(139,92,246,0.10), rgba(34,211,238,0.10));
    box-shadow: inset 2px 0 0 var(--gloss-purple);
}

/* Section headings get a luminous underline accent. */
.card h3 { text-shadow: 0 0 18px rgba(139, 92, 246, 0.28); }

/* Selection + scrollbar tuned for the darker canvas. */
::selection { background: rgba(139, 92, 246, 0.40); color: #fff; }
::-webkit-scrollbar-track { background: var(--knms-bg-elev); }

/* Code/pre blocks (admin SMTP transcript) must not stay light. */
pre, code {
    background: var(--knms-bg-elev) !important;
    color: var(--gloss-cyan-light);
    border-color: var(--knms-border) !important;
}

/* Footer submenu floats above a dark page — give it real elevation. */
.footer-submenu { background: var(--knms-surface-2); box-shadow: var(--shadow-lg), 0 0 22px rgba(139,92,246,0.22); }
.footer-submenu a:hover { background: rgba(139, 92, 246, 0.16); }

/* The dark theme is the design; don't let the OS flip surfaces back to light. */
:root { color-scheme: dark; }

/* ===============================================================
   Community Vision + Legacy photo showcase
   =============================================================== */

.vision-card {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(139,92,246,0.14), transparent 55%),
        linear-gradient(315deg, rgba(34,211,238,0.10), transparent 55%),
        var(--knms-surface);
    border-color: rgba(139, 92, 246, 0.30);
}
/* Soft gold bloom behind the statement, echoing the hero. */
.vision-glow {
    position: absolute;
    inset: -40% -20% auto auto;
    width: 60%;
    height: 180%;
    background: radial-gradient(circle, rgba(240,184,64,0.14), transparent 62%);
    pointer-events: none;
}
.vision-content { position: relative; z-index: 1; }
.vision-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--knms-accent-light);
    margin-bottom: 0.6rem;
}
.vision-eyebrow .icon { color: var(--gloss-cyan); filter: drop-shadow(0 0 6px var(--glow-cyan)); }
.vision-body {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.75;
    color: var(--knms-text);
    max-width: 62ch;
}

/* Horizontally scrolling photo strip — snaps like a native carousel on touch. */
.showcase-strip {
    display: flex;
    gap: 0.85rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0.2rem 0.2rem 0.9rem;
    margin: 0 -0.2rem;
}
.showcase-item {
    position: relative;
    flex: 0 0 auto;
    width: 190px;
    scroll-snap-align: start;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--knms-border);
    box-shadow: var(--shadow-sm), 0 0 0 1px rgba(139,92,246,0.14);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    display: block;
}
.showcase-item img {
    width: 100%;
    height: 145px;
    object-fit: cover;
    display: block;
    background: var(--knms-bg-elev);
}
.showcase-item:hover {
    transform: translateY(-3px);
    text-decoration: none;
    box-shadow: var(--shadow-md), 0 0 22px var(--glow-purple);
}
.showcase-caption {
    display: block;
    padding: 0.5rem 0.6rem 0.6rem;
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--knms-text);
    background: linear-gradient(180deg, rgba(255,255,255,0.04), transparent);
}

@media (max-width: 600px) {
    .showcase-item { width: 62vw; }
    .showcase-item img { height: 40vw; }
    .vision-body { font-size: 0.96rem; }
}

/* ===============================================================
   Immersive landing page (homepage)
   Deep-purple cosmic band with gold/cyan panels, matching the
   approved design. Full-bleed: it breaks out of .page's max-width.
   =============================================================== */
.landing {
    position: relative;
    /* Break out of the centred .page column to run edge-to-edge. */
    margin: -1.5rem calc(50% - 50vw) 1.6rem;
    padding: 2.4rem max(1rem, calc(50vw - 480px)) 2rem;
    overflow: hidden;
    background:
        /* Warm sunset core low behind the portrait — the scene's light source.
           Kept tight and saturated so it reads as a glow, not a grey haze. */
        radial-gradient(ellipse 26% 18% at 47% 60%, rgba(255, 214, 130, 0.85) 0%, rgba(255, 176, 66, 0.45) 45%, transparent 78%),
        radial-gradient(ellipse 48% 34% at 47% 62%, rgba(247, 145, 40, 0.42) 0%, rgba(214, 96, 30, 0.16) 48%, transparent 76%),
        radial-gradient(ellipse at 74% 22%, #7b3fbf 0%, transparent 56%),
        radial-gradient(ellipse at 10% 8%, #4c1d95 0%, transparent 60%),
        linear-gradient(160deg, #2a1259 0%, #1a0b3d 48%, #12082c 100%);
    color: #fff;
    isolation: isolate;
}

/* Decorative sky: sweeping gold arcs, colour pools and a star field */
.landing-sky { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
/* Thick glowing light-ribbon arcs. A tinted top/right border on a huge ellipse
   reads as a sweeping streak; the layered drop-shadows supply the bloom.
   (A conic-gradient ring was tried and largely vanished at these ellipse
   proportions, because closest-side masking collapsed the visible band.) */
.landing-arc {
    position: absolute;
    border-radius: 50%;
    border: 5px solid transparent;
    border-top-color: rgba(255, 212, 128, 0.95);
    border-right-color: rgba(255, 168, 56, 0.62);
    filter: drop-shadow(0 0 18px rgba(255, 180, 60, 0.9)) drop-shadow(0 0 58px rgba(255, 130, 25, 0.5));
}
.landing-arc-1 { width: 132%; height: 196%; left: -20%; top: 20%; transform: rotate(-12deg); }
.landing-arc-2 { width: 104%; height: 148%; left: -3%; top: 40%; transform: rotate(-6deg); opacity: 0.8; border-width: 4px; }
/* A third, tighter ribbon hugging the lower-left, as in the reference. */
.landing-arc-3 { width: 76%; height: 106%; left: -14%; top: 50%; transform: rotate(-4deg); opacity: 0.9; border-width: 3px; }
.landing-glow { position: absolute; border-radius: 50%; filter: blur(60px); }
.landing-glow-gold { width: 42%; height: 55%; right: 6%; top: 6%; background: rgba(232, 188, 92, 0.34); }
.landing-glow-purple { width: 46%; height: 60%; left: -8%; bottom: -14%; background: rgba(139, 92, 246, 0.34); }
/* Star field painted with repeating radial gradients — no image request. */
.landing-stars {
    position: absolute; inset: 0; opacity: 0.5;
    background-image:
        radial-gradient(1.5px 1.5px at 12% 18%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 78% 12%, #ffe9b0, transparent),
        radial-gradient(1px 1px at 42% 32%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 88% 52%, #bfe9ff, transparent),
        radial-gradient(1px 1px at 26% 66%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 62% 78%, #ffe9b0, transparent),
        radial-gradient(1px 1px at 8% 86%, #fff, transparent);
}

.landing-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: 1.6rem;
    align-items: center;
}

/* --- Left column: portrait + headline --- */
.landing-main { display: flex; flex-direction: column; align-items: center; text-align: center; }
.landing-portrait { position: relative; margin-bottom: 0.6rem; }
.landing-portrait img {
    display: block;
    width: min(320px, 62vw);
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: top center;
    border-radius: 50%;
    border: 3px solid rgba(232, 188, 92, 0.75);
    box-shadow: 0 0 0 8px rgba(109, 40, 217, 0.22), 0 18px 48px rgba(0, 0, 0, 0.5), 0 0 46px var(--glow-gold);
}
/* The headline sits over the bright sunburst, so gold-on-gold would lose
   contrast. A soft dark bed keeps it legible without a hard visible box. */
.landing-copy { position: relative; }
.landing-copy::before {
    content: '';
    position: absolute;
    inset: -1.4rem -2.5rem -1rem;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(ellipse at 50% 46%, rgba(16, 7, 40, 0.78) 0%, rgba(16, 7, 40, 0.5) 48%, transparent 76%);
    pointer-events: none;
}
.landing-title {
    margin: 0.2rem 0 0.35rem;
    font-family: 'Goldman', 'Poppins', sans-serif;
    font-size: clamp(1.7rem, 4.6vw, 2.9rem);
    font-weight: 700;
    line-height: 1.12;
    background: linear-gradient(92deg, #f4d98b, #e8bc5c 45%, #d4a437);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 30px rgba(212, 164, 55, 0.28);
}
.landing-subtitle {
    margin: 0 0 1.1rem;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(0.9rem, 1.6vw, 1.02rem);
    letter-spacing: 0.02em;
}
.landing-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; justify-content: center; }
.landing-welcome { margin: 0.9rem 0 0; color: rgba(255, 255, 255, 0.75); font-size: 0.9rem; }

/* Landing buttons — flatter and wider than the app's pill .btn */
.btn-landing {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 158px;
    padding: 0.72rem 1.6rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.98rem;
    color: #2a1259;
    text-shadow: none;
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn-landing:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn-landing-gold {
    background: linear-gradient(135deg, #f0c76a, #d4a437);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 0 22px var(--glow-gold);
}
.btn-landing-gold:hover { color: #2a1259; }
.btn-landing-cyan {
    background: linear-gradient(135deg, #4cc9f0, #1a8fd0);
    color: #06263a;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 0 22px var(--glow-cyan);
}
.btn-landing-cyan:hover { color: #06263a; }

/* --- Panels (right rail + bottom row) --- */
.landing-rail { display: flex; flex-direction: column; gap: 1.1rem; }
.panel {
    position: relative;
    border-radius: 12px;
    padding: 1.1rem 1.2rem 1.2rem;
    background: linear-gradient(155deg, rgba(58, 26, 110, 0.86), rgba(30, 13, 62, 0.9));
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.panel-gold { border: 1.5px solid rgba(232, 188, 92, 0.65); box-shadow: 0 0 22px rgba(212, 164, 55, 0.22), inset 0 0 30px rgba(109, 40, 217, 0.18); }
.panel-purple { border: 1.5px solid rgba(167, 139, 250, 0.7); box-shadow: 0 0 22px rgba(109, 40, 217, 0.3), inset 0 0 30px rgba(109, 40, 217, 0.18); }
.panel-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin: 0 0 0.85rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1.02rem;
    font-weight: 700;
    color: #f4d98b;
    text-align: center;
}
.panel-title .icon { width: 1rem; height: 1rem; color: var(--knms-accent); filter: drop-shadow(0 0 5px var(--glow-gold)); }
.panel-empty { color: rgba(255, 255, 255, 0.72); font-size: 0.88rem; margin: 0 0 0.9rem; text-align: center; }

.panel-row-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.55rem 0 0.5rem;
    padding-top: 0.55rem;
    border-top: 1px dashed rgba(232, 188, 92, 0.28);
    color: #fff;
    font-weight: 600;
    font-size: 0.92rem;
}
.panel-row-label .icon { width: 0.95rem; height: 0.95rem; color: var(--gloss-cyan-light); }
.panel-row-label:first-of-type { border-top: none; padding-top: 0; }

.celebrant-strip { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; margin-bottom: 0.4rem; }
.celebrant { display: inline-flex; align-items: center; gap: 0.45rem; color: #fff; font-size: 0.92rem; font-weight: 600; }
.celebrant-photo {
    width: 2.5rem; height: 2.5rem; border-radius: 50%; object-fit: cover;
    border: 2px solid rgba(232, 188, 92, 0.8);
    box-shadow: 0 0 12px var(--glow-gold);
}
.celebrant .avatar { width: 2.5rem; height: 2.5rem; font-size: 0.8rem; box-shadow: 0 0 0 2px rgba(232,188,92,0.6), 0 0 12px var(--glow-gold); }
.celebrant-name { color: #f4d98b; }
.celebrant-more { align-self: center; color: rgba(255,255,255,0.75); font-size: 0.85rem; }

.event-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px dashed rgba(232, 188, 92, 0.22);
    color: #fff;
    font-size: 0.9rem;
}
.event-line:last-of-type { border-bottom: none; }
.event-line:hover { color: #f4d98b; }
.event-line .icon { width: 1rem; height: 1rem; color: var(--gloss-cyan-light); flex-shrink: 0; }
.event-line-title { font-weight: 600; }
.event-line-when { margin-left: auto; color: rgba(255, 255, 255, 0.7); font-size: 0.78rem; white-space: nowrap; }

.panel-btn {
    display: block;
    width: fit-content;
    margin: 0.9rem auto 0;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.88rem;
    text-align: center;
    transition: transform 0.15s ease, filter 0.2s ease;
}
.panel-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.panel-btn-gold { background: linear-gradient(135deg, #f0c76a, #d4a437); color: #2a1259; box-shadow: 0 0 16px var(--glow-gold); }
.panel-btn-gold:hover { color: #2a1259; }
.panel-btn-cyan { background: linear-gradient(135deg, #4cc9f0, #1a8fd0); color: #06263a; box-shadow: 0 0 16px var(--glow-cyan); }
.panel-btn-cyan:hover { color: #06263a; }
.panel-btn-blue { background: linear-gradient(135deg, #6d8ff0, #3b5bd9); color: #fff; box-shadow: 0 0 16px rgba(109, 40, 217, 0.6); }
.panel-btn-blue:hover { color: #fff; }

/* --- Bottom row --- */
.landing-bottom {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr);
    gap: 1.1rem;
    margin-top: 1.5rem;
}
.landing-about { display: flex; flex-direction: column; }
.landing-about .panel-title { justify-content: flex-start; color: #f0c76a; }
.landing-about-body { color: rgba(255, 255, 255, 0.86); font-size: 0.92rem; line-height: 1.6; margin: 0 0 0.4rem; }
.landing-about .panel-btn { margin-left: auto; margin-right: 0; }

.landing-gallery .panel-title { justify-content: flex-start; color: #f0c76a; }
.landing-gallery-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; }
.landing-gallery-item { display: block; border-radius: 8px; overflow: hidden; border: 1px solid rgba(232, 188, 92, 0.4); }
.landing-gallery-item img { width: 100%; height: 92px; object-fit: cover; display: block; transition: transform 0.25s ease; }
.landing-gallery-item:hover img { transform: scale(1.06); }
.landing-quicklinks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin-top: 0.9rem; }
.landing-quicklinks .panel-btn { width: 100%; margin: 0; }

/* --- Mobile: single column, portrait shrinks, rail stacks under --- */
@media (max-width: 860px) {
    .landing-grid { grid-template-columns: 1fr; gap: 1.3rem; }
    .landing-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .landing { margin-top: -1rem; padding: 1.6rem 1rem 1.5rem; }
    /* NOTE: portrait sizing for small screens lives in the late media block at
       the end of this file — a later unscoped rule redefines the same
       selector, so an override here would be dead. */
    .btn-landing { min-width: 0; flex: 1 1 44%; padding: 0.68rem 1rem; }
    .landing-gallery-item img { height: 74px; }
    .landing-quicklinks { grid-template-columns: 1fr; }
    .landing-quicklinks .panel-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .btn-landing:hover, .panel-btn:hover, .landing-gallery-item:hover img { transform: none; }
}

/* --- Top bar treatment to match the landing design: gold wordmark and a
   filled gold pill on the active nav item. --- */
.topbar { background: linear-gradient(135deg, rgba(42,18,89,0.94) 0%, rgba(26,11,61,0.96) 100%); }
.brand span:last-child {
    background: linear-gradient(92deg, #f4d98b, #e8bc5c 50%, #d4a437);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.topnav a.is-active {
    background: linear-gradient(135deg, #f0c76a, #d4a437);
    color: #2a1259;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    font-weight: 700;
    box-shadow: 0 0 16px var(--glow-gold);
}
/* The gradient underline is redundant once the pill is filled. */
.topnav a.is-active::after { display: none; }

/* ===============================================================
   Royal gold-on-purple treatment (matching the reference design):
   gold-framed panels, starfield, gold arcs, star ornaments.
   =============================================================== */

/* (No global starfield here on purpose — the landing hero already renders one
   via .landing-sky/.landing-stars. Adding a second, page-wide layer would
   double the stars on the homepage and cost paint time on every other page.) */

/* Gentle twinkle for the existing landing starfield. */
.landing-stars { animation: star-twinkle 7s ease-in-out infinite; }
@keyframes star-twinkle {
    0%, 100% { opacity: 0.38; }
    50% { opacity: 0.68; }
}
@media (prefers-reduced-motion: reduce) {
    .landing-stars { animation: none; }
}

/* --- Gold-framed panels --------------------------------------- */
.card {
    border: 1px solid var(--knms-frame);
    box-shadow:
        var(--shadow-sm),
        inset 0 0 0 1px rgba(255, 185, 46, 0.10),
        0 0 18px rgba(255, 185, 46, 0.12);
}
.card:hover {
    border-color: rgba(255, 185, 46, 0.85);
    box-shadow:
        var(--shadow-md),
        inset 0 0 0 1px rgba(255, 185, 46, 0.20),
        0 0 30px rgba(255, 185, 46, 0.28);
}

/* Panel headings: gold, with the ✦ star ornaments either side. */
.card h3 {
    color: var(--knms-accent);
    text-shadow: 0 0 16px rgba(255, 185, 46, 0.45);
    letter-spacing: 0.01em;
}
/* Replace the old gradient dot with a gold star ornament. */
.card h3::before {
    content: '\2726';
    width: auto;
    height: auto;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: var(--knms-accent);
    font-size: 0.85em;
    filter: drop-shadow(0 0 6px var(--glow-gold));
}
.card h3::after {
    content: '\2726';
    margin-left: auto;
    color: var(--knms-accent);
    font-size: 0.85em;
    opacity: 0.75;
    filter: drop-shadow(0 0 6px var(--glow-gold));
}

/* Headings elsewhere follow the gold identity too. */
h1, h2 { color: var(--knms-heading); }

/* --- Buttons: gold primary, cyan secondary (as in the reference) --- */
.btn {
    background: linear-gradient(135deg, var(--knms-accent), var(--knms-accent-deep));
    color: #2a1a02;
    font-weight: 700;
    text-shadow: none;
    box-shadow: var(--shadow-sm), 0 0 14px rgba(255, 185, 46, 0.35);
}
.btn:hover { color: #2a1a02; box-shadow: var(--shadow-md), 0 0 24px var(--glow-gold); }
.btn-accent {
    background: linear-gradient(135deg, var(--knms-accent), var(--knms-accent-light));
    color: #2a1a02;
    text-shadow: none;
}
/* Cyan "Join Now"-style secondary action. */
.btn-cyan {
    background: linear-gradient(135deg, #22a6e0, #38d0f5);
    color: #04222e;
    box-shadow: var(--shadow-sm), 0 0 14px var(--glow-cyan);
}
.btn-cyan:hover { color: #04222e; box-shadow: var(--shadow-md), 0 0 26px var(--glow-cyan); }
.btn-secondary {
    background: rgba(45, 26, 92, 0.85);
    color: var(--knms-text);
    border: 1px solid var(--knms-frame);
    text-shadow: none;
}
.btn-secondary:hover { color: var(--knms-accent-light); border-color: var(--knms-accent); box-shadow: 0 0 16px var(--glow-gold); }

/* Top bar + footer gain the royal purple + gold rule. */
.topbar { background: linear-gradient(135deg, rgba(59,31,110,0.92) 0%, rgba(35,18,74,0.94) 100%); }
.topbar::after { box-shadow: 0 0 14px var(--glow-gold), 0 0 10px var(--glow-purple); }
.footer-nav { background: rgba(29, 15, 61, 0.92); border-top: 1px solid var(--knms-frame); }
.footer-link.is-active { color: var(--knms-accent-light); }

/* Stat tiles + news cards inherit the gold frame. */
.stat-tile, .news-card { border-color: var(--knms-frame); }
.stat-tile .value { color: var(--knms-accent); text-shadow: 0 0 14px rgba(255,185,46,0.35); }

/* Links read gold-warm on the royal purple. */
a { color: var(--knms-accent-light); }
a:hover { color: #fff3d6; }

/* Avatars ringed in gold, as the celebration portraits are in the reference. */
.avatar { box-shadow: 0 0 0 2px var(--knms-accent), 0 0 14px var(--glow-gold); }

/* --- Uploaded site logo in the top bar --- */
.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(232, 188, 92, 0.85);
    box-shadow: 0 0 12px var(--glow-gold);
}

/* --- Landing portrait: large, soft-edged, not a hard circle --- */
.landing-portrait img {
    width: min(400px, 74vw);
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: top center;
    border-radius: 18px;
    border: none;
    /* Feather the lower edge so the portrait melts into the cosmic backdrop. */
    -webkit-mask-image: linear-gradient(180deg, #000 62%, rgba(0, 0, 0, 0.35) 86%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 62%, rgba(0, 0, 0, 0.35) 86%, transparent 100%);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55);
}
.landing-portrait-empty a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: min(300px, 68vw);
    aspect-ratio: 4 / 5;
    border-radius: 18px;
    border: 2px dashed rgba(232, 188, 92, 0.5);
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.86rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
}
.landing-portrait-empty .icon { width: 2.2rem; height: 2.2rem; color: var(--knms-accent-light); }

/* Celebrant pairs sit side by side with a divider, as in the design */
.celebrant-strip { gap: 0; }
.celebrant { padding: 0 0.85rem; }
.celebrant + .celebrant { border-left: 1px solid rgba(232, 188, 92, 0.3); }

/* Check-box markers in the panels */
.panel-row-label .icon,
.event-line .icon { color: var(--gloss-cyan-light); }

/* --- Member directory --- */
.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.9rem;
}
.directory-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    text-align: center;
    padding: 1rem 0.8rem;
    border: 1px solid var(--knms-border);
    border-radius: var(--radius);
    background: var(--knms-surface);
    box-shadow: var(--shadow-sm), 0 0 0 1px rgba(109, 40, 217, 0.05);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.directory-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md), 0 0 18px rgba(109, 40, 217, 0.14); }
.directory-card strong { color: var(--knms-primary); font-family: 'Poppins', sans-serif; font-size: 0.92rem; }
.directory-photo {
    width: 3.4rem; height: 3.4rem; border-radius: 50%; object-fit: cover;
    box-shadow: 0 0 0 2px var(--knms-surface), 0 0 10px var(--glow-purple);
}
.directory-meta { color: var(--knms-muted); font-size: 0.78rem; }

/* ===============================================================
   Landing decor: glossy spheres + gold bokeh
   Reuses the .orb glossy-sphere system from the hero cards and adds
   the gold variant plus a soft bokeh layer, matching the artwork.
   =============================================================== */

/* Gold glossy sphere — the dominant sphere colour in the design. */
.orb-gold {
    --orb-glow: var(--glow-gold);
    background: radial-gradient(circle at 32% 28%, #fff 0%, #ffe9b0 16%, var(--knms-accent) 52%, #8a6410 100%);
}
/* Amber/ember sphere for depth variation against the purple field. */
.orb-ember {
    --orb-glow: rgba(255, 138, 40, 0.55);
    background: radial-gradient(circle at 32% 28%, #fff 0%, #ffc98a 16%, #f08a2c 55%, #7a3908 100%);
}

/* Spheres sit above the sky wash but strictly BEHIND the content (z-index 0 vs
   the grid's 1), and are softened so they read as depth-of-field bokeh rather
   than solid balls sitting on top of the text. */
.landing-orbs { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.landing-orbs .orb {
    animation: orb-drift 11s ease-in-out infinite;
    opacity: 0.42;
    filter: blur(2px);
    /* Drop the heavy inset shading that made them look like plastic marbles;
       keep a soft outer bloom so they still glow. */
    box-shadow: inset -6px -8px 20px rgba(0, 0, 0, 0.22), inset 4px 5px 14px rgba(255, 255, 255, 0.3), 0 0 34px var(--orb-glow, transparent);
}
.landing-orbs .orb-gold, .landing-orbs .orb-ember { opacity: 0.5; }
@keyframes orb-drift {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50%      { transform: translate3d(6px, -16px, 0) scale(1.04); }
}

/* Soft translucent bokeh — the out-of-focus glowing dots scattered along the
   golden arcs. Cheaper than a sphere: no inset shading, just a glow. */
.bokeh {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 236, 186, 0.95) 0%, rgba(240, 199, 106, 0.55) 40%, rgba(212, 164, 55, 0) 72%);
    filter: blur(0.4px);
    animation: bokeh-twinkle 6s ease-in-out infinite;
}
.bokeh-cyan {
    background: radial-gradient(circle at 50% 50%, rgba(214, 247, 255, 0.95) 0%, rgba(127, 233, 247, 0.5) 40%, rgba(34, 211, 238, 0) 72%);
}
@keyframes bokeh-twinkle {
    0%, 100% { opacity: 0.35; transform: scale(0.92); }
    50%      { opacity: 0.95; transform: scale(1.08); }
}

/* Subtle mode: keep the spheres, drop the motion and soften everything. */
.landing.fx-subtle .landing-orbs .orb,
.landing.fx-subtle .bokeh { animation: none; }
.landing.fx-subtle .landing-orbs { opacity: 0.5; }
.landing.fx-subtle .landing-stars { opacity: 0.28; }

@media (prefers-reduced-motion: reduce) {
    .landing-orbs .orb, .bokeh { animation: none; }
}

/* Phones: fewer, smaller spheres so the portrait and panels stay dominant. */
@media (max-width: 600px) {
    .landing-orbs .orb { transform: scale(0.65); }
    .landing-orbs .orb-hide-sm, .bokeh-hide-sm { display: none; }
}

/* --- CMS hero crop tool ---------------------------------------- */
.crop-stage {
    position: relative;
    width: 100%;
    max-width: 340px;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: var(--radius-sm);
    border: 1px solid var(--knms-frame);
    box-shadow: 0 0 18px rgba(255, 185, 46, 0.18);
    cursor: crosshair;
    background: var(--knms-bg-elev);
    touch-action: none;
}
.crop-stage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform-origin: center;
    user-select: none;
    -webkit-user-drag: none;
}
.crop-crosshair {
    position: absolute;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border-radius: 50%;
    border: 2px solid var(--knms-accent);
    box-shadow: 0 0 10px var(--glow-gold), inset 0 0 6px rgba(255,255,255,0.5);
    pointer-events: none;
}
.crop-controls { margin-top: 0.7rem; max-width: 340px; }
.crop-controls input[type="range"] { width: 100%; accent-color: var(--knms-accent); }

/* Zoomed hero portraits must be clipped to their frame, otherwise a scaled
   image spills past the rounded edge (transform doesn't affect layout box). */
.landing-portrait { overflow: hidden; border-radius: 18px; }
.landing-portrait img { transform-origin: center; }

/* --- Glossy spheres: restore the reference artwork's luminosity ------
   They were rendering at 0.42 opacity with a 2px blur, which flattened them
   into faint smudges. Bring back the glass highlight and outer bloom so they
   read as the glossy orbs in the design. */
.landing-orbs .orb {
    opacity: 0.92;
    filter: blur(0.4px);
    box-shadow:
        inset -8px -10px 22px rgba(0, 0, 0, 0.30),
        inset 6px 7px 16px rgba(255, 255, 255, 0.42),
        0 10px 26px rgba(0, 0, 0, 0.35),
        0 0 46px var(--orb-glow, transparent);
}
/* Specular highlight — the small bright spot that sells a sphere as glass. */
.landing-orbs .orb::after {
    content: '';
    position: absolute;
    top: 14%;
    left: 20%;
    width: 30%;
    height: 22%;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.92), transparent 70%);
    filter: blur(1px);
    pointer-events: none;
}
.landing-orbs .bokeh { opacity: 0.62; }

/* Keep the portrait and panels legible: soften spheres only where they'd sit
   directly behind the text column. */
@media (min-width: 981px) {
    .landing-orbs { mask-image: radial-gradient(ellipse 62% 70% at 34% 52%, rgba(0,0,0,0.55), #000 62%); }
}

/* ---------------------------------------------------------------
   Responsive portrait sizing — MUST stay last in the file.
   `.landing-portrait img` is redefined further up without a media
   query, so any earlier small-screen override loses the cascade.
   --------------------------------------------------------------- */
@media (max-width: 860px) {
    .landing-portrait img { width: min(320px, 66vw); }
    .landing-portrait-empty a { width: min(280px, 62vw); }
}
@media (max-width: 600px) {
    .landing-portrait img { width: min(240px, 60vw); }
    .landing-portrait-empty a { width: min(220px, 56vw); }
}

/* ===============================================================
   Visual match pass — amber sunset bloom, brighter arcs, warmer
   sparkle field. Presentation only: no layout/structure changes.
   =============================================================== */

/* The reference's defining feature is a large warm sunset bloom behind the
   portrait. The previous flat 34%-alpha wash was far too small and cool. */
.landing-glow-gold {
    width: 88%;
    height: 92%;
    right: -6%;
    top: -10%;
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 214, 130, 0.55) 0%,
                        rgba(255, 160, 45, 0.38) 26%,
                        rgba(214, 96, 20, 0.20) 48%,
                        transparent 70%);
    filter: blur(6px);
}
.landing-glow-purple {
    width: 78%;
    height: 88%;
    left: -14%;
    bottom: -18%;
    background:
        radial-gradient(circle at 50% 50%, rgba(150, 90, 255, 0.42) 0%,
                        rgba(96, 48, 190, 0.26) 42%,
                        transparent 72%);
    filter: blur(8px);
}

/* Arcs: thicker and hotter so they read as the glowing gold sweeps. */
.landing-arc {
    border-width: 4px;
    border-top-color: rgba(255, 219, 140, 0.98);
    border-right-color: rgba(255, 178, 62, 0.72);
    filter:
        drop-shadow(0 0 10px rgba(255, 208, 110, 0.95))
        drop-shadow(0 0 30px rgba(255, 165, 45, 0.75))
        drop-shadow(0 0 70px rgba(255, 120, 20, 0.45));
}

/* Warmer, denser sparkle field to match the ember-lit backdrop. */
.landing-stars {
    opacity: 0.72;
    background-image:
        radial-gradient(1.6px 1.6px at 12% 18%, #fff, transparent),
        radial-gradient(1.8px 1.8px at 78% 12%, #ffd98f, transparent),
        radial-gradient(1.2px 1.2px at 42% 32%, #fff, transparent),
        radial-gradient(1.6px 1.6px at 88% 52%, #ffe3a8, transparent),
        radial-gradient(1.2px 1.2px at 26% 66%, #fff, transparent),
        radial-gradient(1.8px 1.8px at 62% 78%, #ffcf7a, transparent),
        radial-gradient(1.3px 1.3px at 8% 86%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 34% 8%, #ffdca0, transparent),
        radial-gradient(1.4px 1.4px at 68% 42%, #fff, transparent),
        radial-gradient(1.7px 1.7px at 94% 30%, #ffc978, transparent),
        radial-gradient(1.2px 1.2px at 52% 92%, #ffe9c4, transparent),
        radial-gradient(1.5px 1.5px at 18% 46%, #fff, transparent);
}

/* Gold panel frames a touch hotter, matching the crisp borders in the art. */
.card { border-color: rgba(255, 198, 74, 0.62); }

/* ---------------------------------------------------------------
   Mobile: keep the same look, scaled — the glow and gradients must
   survive on phones rather than being switched off.
   --------------------------------------------------------------- */
@media (max-width: 600px) {
    .landing-glow-gold { width: 130%; height: 62%; right: -22%; top: -6%; }
    .landing-glow-purple { width: 120%; height: 58%; left: -26%; bottom: -12%; }
    .landing-arc { border-width: 3px; }
    /* Spheres stay glossy on phones — only their scale changes. */
    .landing-orbs .orb { opacity: 0.88; }
    .landing-stars { opacity: 0.6; }
}
@media (max-width: 380px) {
    .landing-stars { opacity: 0.5; }
}

/* ===============================================================
   Landing gap-fill: sunburst core, silhouette backdrop, sparkles,
   nav separators and panel detailing — to match the reference art.
   =============================================================== */

/* --- Bright burst core: a small white-hot centre inside the amber glow --- */
.landing-burst {
    position: absolute;
    left: 47%;
    top: 58%;
    width: 30%;
    height: 22%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 245, 0.95) 0%, rgba(255, 231, 170, 0.6) 22%, rgba(255, 186, 76, 0.28) 46%, transparent 72%);
    filter: blur(6px);
    pointer-events: none;
}

/* --- Optional silhouette band (skyline / crowd) uploaded via the CMS.
   Sits along the horizon, tinted and faded so it reads as a backdrop. --- */
.landing-backdrop {
    position: absolute;
    left: 0; right: 0;
    bottom: 18%;
    height: 46%;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0.42;
    mix-blend-mode: screen;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 42%, #000 78%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 42%, #000 78%, transparent 100%);
    pointer-events: none;
}

/* --- Sparkle glints: fine 4-point stars, distinct from the soft bokeh --- */
.sparkle {
    position: absolute;
    pointer-events: none;
    animation: sparkle-pulse 4.5s ease-in-out infinite;
}
.sparkle::before, .sparkle::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(currentColor, currentColor) center/100% 1.5px no-repeat,
                linear-gradient(currentColor, currentColor) center/1.5px 100% no-repeat;
    filter: drop-shadow(0 0 4px currentColor);
}
.sparkle::after { transform: rotate(45deg); opacity: 0.55; }
.sparkle-gold { color: rgba(255, 226, 160, 0.95); }
.sparkle-cyan { color: rgba(190, 240, 255, 0.9); }
@keyframes sparkle-pulse {
    0%, 100% { opacity: 0.25; transform: scale(0.7); }
    50%      { opacity: 1;    transform: scale(1); }
}
.landing.fx-subtle .sparkle { animation: none; opacity: 0.6; }
@media (prefers-reduced-motion: reduce) { .sparkle { animation: none; } }

/* --- Headline: sized so the reference wording fits on a single line inside
   the left column at desktop widths (a longer custom title still wraps). --- */
.landing-title { font-size: clamp(1.2rem, 2.5vw, 1.9rem); letter-spacing: 0.01em; }

/* --- Nav separators, as in the reference --- */
.topnav a + a::before {
    content: '';
    position: absolute;
    left: -0.75rem;
    top: 50%;
    width: 5px;
    height: 1px;
    background: rgba(255, 255, 255, 0.32);
}
.topnav a.is-active::before, .topnav a.is-active + a::before { display: none; }

/* --- Panel detailing: dashed rules under the title and above the action --- */
.panel-title {
    padding-bottom: 0.6rem;
    border-bottom: 1px dashed rgba(232, 188, 92, 0.32);
}
.panel-btn { border-top: none; }
.panel .panel-btn { margin-top: 1rem; }
.panel-gold .panel-btn::before { content: none; }

/* View All / Read More sit at the right edge of their panel in the design. */
.landing-rail .panel:last-child .panel-btn-gold,
.landing-about .panel-btn { margin-left: auto; margin-right: 0; }

/* Gold corner ticks — the small bracket accents on the reference panels. */
.panel-gold::before, .panel-gold::after {
    content: '';
    position: absolute;
    width: 14px; height: 14px;
    border-color: rgba(255, 214, 130, 0.85);
    border-style: solid;
    pointer-events: none;
}
.panel-gold::before { top: 6px; left: 6px; border-width: 2px 0 0 2px; border-radius: 4px 0 0 0; }
.panel-gold::after  { bottom: 6px; right: 6px; border-width: 0 2px 2px 0; border-radius: 0 0 4px 0; }

@media (max-width: 600px) {
    .sparkle-hide-sm { display: none; }
    .landing-backdrop { bottom: 26%; height: 38%; opacity: 0.3; }
}

/* ===============================================================
   Hero backdrop: closer match to the painted reference.
   Adds the warm horizon band, a silhouetted skyline suggestion, and
   an edge vignette. Presentation only — no markup or layout change.
   =============================================================== */
.landing {
    background:
        /* Bright sun core, low and central — the scene's light source. */
        radial-gradient(ellipse 22% 15% at 48% 56%, rgba(255, 238, 190, 0.95) 0%, rgba(255, 198, 96, 0.55) 42%, transparent 74%),
        /* Wider amber bloom around it. */
        radial-gradient(ellipse 46% 32% at 48% 58%, rgba(252, 160, 48, 0.50) 0%, rgba(214, 96, 30, 0.22) 46%, transparent 76%),
        /* Warm horizon haze band — the lit city/temple line in the artwork. */
        linear-gradient(180deg, transparent 44%, rgba(255, 150, 50, 0.20) 53%, rgba(255, 120, 35, 0.10) 60%, transparent 68%),
        /* Skyline suggestion: soft dark uprights sitting on the horizon. */
        repeating-linear-gradient(90deg,
            transparent 0 26px,
            rgba(40, 16, 66, 0.30) 26px 32px,
            transparent 32px 58px),
        /* Purple sky masses. */
        radial-gradient(ellipse at 74% 20%, #8446cc 0%, transparent 56%),
        radial-gradient(ellipse at 10% 8%, #4c1d95 0%, transparent 60%),
        linear-gradient(160deg, #2f1463 0%, #1c0c42 48%, #12082c 100%);
    background-blend-mode: normal, normal, screen, multiply, normal, normal, normal;
}
/* Confine the skyline stripes to the horizon band only. */
.landing::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    /* Vignette: darkens the edges so the centre glow carries the composition. */
    background: radial-gradient(ellipse 78% 72% at 50% 48%, transparent 40%, rgba(10, 4, 26, 0.55) 82%, rgba(8, 3, 20, 0.82) 100%);
}

/* Spheres a touch larger so they read at a glance.
   Uses the standalone `scale` property, not `transform` — orb-drift animates
   transform, and a static transform here would simply be overridden. */
.landing-orbs .orb { scale: 1.15; }
@media (max-width: 600px) { .landing-orbs .orb { scale: 0.85; } }

/* ===============================================================
   Hero backdrop artwork.
   The sunset, temple gopurams, skyline and crowd in the reference are
   pictorial — CSS gradients can't express them. This layers a hand-authored
   SVG (decorative silhouettes only, no real likenesses) behind the existing
   glow/sphere layers. Markup and layout are unchanged.
   =============================================================== */
.landing-sky {
    /* ?v= bumped whenever the SVG changes — assets are served with a 1-year
       immutable cache, so without this an edited backdrop never reaches a
       browser that already cached the old file. */
    background-image: url("../img/hero-backdrop.svg?v=2");
    background-size: cover;
    background-position: center 46%;
    background-repeat: no-repeat;
}
/* The SVG now supplies sky, horizon and vignette, so drop the CSS stand-ins
   that were approximating them (they'd double-darken the artwork). */
.landing { background: #150a2e; }
.landing::before { display: none; }
/* Keep the animated glows/arcs/spheres on top of the artwork. */
.landing-glow-gold { opacity: 0.55; }
.landing-glow-purple { opacity: 0.5; }

@media (max-width: 600px) {
    /* Keep the sun and horizon in frame when the hero gets tall and narrow. */
    .landing-sky { background-position: 54% 42%; background-size: cover; }
}

/* Warm halo behind the emblem medallion so it sits in the scene's light,
   like the reference portrait's rim glow. */
.landing-portrait img {
    filter: drop-shadow(0 0 34px rgba(255, 190, 80, 0.55)) drop-shadow(0 0 90px rgba(255, 150, 40, 0.30));
}

/* ===============================================================
   Portal-wide cosmic ambience.
   Interior pages (auth, forum, events, admin) previously sat on a flat
   dark background while only the landing carried the reference artwork's
   atmosphere. This adds a QUIET version everywhere: faint starfield +
   one soft arc. Deliberately subtle so tables and forms stay readable.
   The landing's own sky sits on an opaque backdrop above this, so
   nothing doubles there.
   =============================================================== */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.5;
    background-image:
        radial-gradient(1.4px 1.4px at 12% 18%, rgba(255,225,170,0.8), transparent),
        radial-gradient(1.2px 1.2px at 30% 64%, rgba(255,255,255,0.55), transparent),
        radial-gradient(1.6px 1.6px at 47% 28%, rgba(255,215,150,0.7), transparent),
        radial-gradient(1.1px 1.1px at 64% 72%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1.7px 1.7px at 79% 36%, rgba(255,220,160,0.75), transparent),
        radial-gradient(1.2px 1.2px at 90% 80%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1.3px 1.3px at 8% 84%, rgba(255,215,150,0.6), transparent),
        radial-gradient(1.5px 1.5px at 56% 90%, rgba(255,235,190,0.6), transparent),
        /* one soft gold arc sweeping low across the page */
        radial-gradient(ellipse 120% 90% at 50% 130%, transparent 58%, rgba(255,185,46,0.10) 60%, rgba(255,185,46,0.16) 61%, rgba(255,185,46,0.06) 63%, transparent 66%);
}

/* ===============================================================
   Reference re-fit: no spheres, warmer horizon, taller hero.
   Appended last so these win the cascade.
   =============================================================== */

/* Spheres are not part of the reference artwork — make sure none can
   render even if markup is reintroduced elsewhere. */
.landing-orbs .orb { display: none !important; }

/* Taller hero so the portrait dominates as it does in the reference. */
.landing { padding-top: 3rem; padding-bottom: 2.6rem; }
.landing-grid { min-height: 60vh; }

/* NOTE: the hero scene comes from assets/img/hero-backdrop.svg (sun, gopurams,
   skyline, crowd) painted on .landing-sky, with .landing kept a flat dark
   colour behind it. Do NOT re-add radial-gradient backgrounds to .landing —
   they bleed through the SVG's transparency and wash the whole scene out. */

/* Denser, warmer bokeh — this is what carries the sparkle in the reference. */
.landing-orbs .bokeh { opacity: 0.72; }

/* Panels: deeper and more translucent, so the backdrop glows through them
   the way it does behind the reference's cards. */
.panel {
    background: linear-gradient(155deg, rgba(46, 20, 92, 0.72), rgba(22, 10, 48, 0.82));
}
.panel-gold { border-color: rgba(255, 205, 110, 0.8); box-shadow: 0 0 26px rgba(212, 164, 55, 0.3), inset 0 0 40px rgba(80, 30, 150, 0.24); }
.panel-purple { border-color: rgba(178, 140, 255, 0.85); box-shadow: 0 0 26px rgba(120, 60, 230, 0.38), inset 0 0 40px rgba(80, 30, 150, 0.24); }

/* Gallery thumbnails sit wider/shorter in the reference. */
.landing-gallery-item img { height: 108px; }

@media (max-width: 860px) {
    .landing-grid { min-height: 0; }
}
@media (max-width: 600px) {
    .landing { padding-top: 2rem; padding-bottom: 1.6rem; }
    .landing-gallery-item img { height: 78px; }
}

/* Headline contrast: the horizon behind it is now much brighter, so the gold
   wordmark needs a stronger dark bed plus its own shadow to stay readable. */
.landing-copy::before {
    inset: -1.8rem -3rem -1.4rem;
    background: radial-gradient(ellipse at 50% 46%, rgba(12, 5, 32, 0.88) 0%, rgba(12, 5, 32, 0.66) 44%, rgba(12, 5, 32, 0.2) 68%, transparent 82%);
}
.landing-title {
    text-shadow: 0 2px 10px rgba(10, 4, 28, 0.95), 0 0 30px rgba(212, 164, 55, 0.35);
}
.landing-subtitle {
    color: #fff;
    text-shadow: 0 1px 8px rgba(10, 4, 28, 0.95);
}

/* ---------------------------------------------------------------
   Light-source position.
   In the reference the sun sits up and to the RIGHT of the portrait,
   so the lower-left — where the headline lives — stays dark violet and
   the gold wordmark reads cleanly. Previously the hot core sat directly
   under the headline and washed it out.
   --------------------------------------------------------------- */
/* The SVG artwork already contains the sun, so the CSS burst and the
   uploaded backdrop band would double up on it. Both are suppressed while
   the SVG is in play. */
.landing-burst { display: none; }
.landing-backdrop { display: none; }

/* With the light moved away, the headline needs only a light bed. */
/* The headline lands on the SVG's brightest area (the sunset horizon), so
   gold-on-amber needs a genuinely opaque bed — earlier translucent versions
   were still unreadable. Soft-edged so it doesn't read as a box. */
.landing-copy::before {
    inset: -1.6rem -3.2rem -1.2rem;
    background: radial-gradient(ellipse at 50% 48%,
        rgba(10, 4, 26, 0.94) 0%,
        rgba(10, 4, 26, 0.88) 38%,
        rgba(10, 4, 26, 0.55) 62%,
        transparent 84%);
}

/* ===============================================================
   Gap fixes: backdrop occlusion + headline smudge + glow density
   =============================================================== */

/* The portrait (real or placeholder) was a hard rectangle blocking a large
   area of the backdrop artwork behind it — that read as "the backdrop is
   missing" even though the SVG scene was rendering underneath the whole time.
   Feathering ALL edges (not just the bottom, as before) lets the sunset/sky
   show through around the frame, so the portrait sits IN the scene. */
.landing-portrait img {
    mask-image: radial-gradient(ellipse 76% 84% at 50% 40%, #000 52%, rgba(0,0,0,0.6) 72%, transparent 94%);
    -webkit-mask-image: radial-gradient(ellipse 76% 84% at 50% 40%, #000 52%, rgba(0,0,0,0.6) 72%, transparent 94%);
    box-shadow: none;
}

/* REVERTED. Two attempts at "smoothing" this headline bed (lower opacity,
   then a wider-but-still-tweaked fade) both made the gold text harder to
   read than the original — verified by direct screenshot comparison against
   this exact rule before either edit. The original was already legible;
   whatever look prompted touching it wasn't a real legibility bug, so this
   is restored byte-for-byte rather than guessed at a third time. */

/* "HD glow" density pass: the reference has a denser field of fine light
   particles than our sparkle/bokeh counts were producing. Brighten what's
   already there rather than add more DOM nodes. */
.landing-sky .landing-stars,
.landing-orbs .sparkle-gold,
.landing-orbs .sparkle-cyan {
    filter: brightness(1.35) saturate(1.15);
}
.landing-orbs .bokeh { filter: brightness(1.25); }

/* File inputs (photo upload on registration) were rendering as the bare
   browser-default gray button — the only unstyled form control on the site,
   breaking the gold/purple theme on an otherwise fully-themed form. */
.form-group input[type="file"] {
    padding: 0.45rem;
    display: flex;
    align-items: center;
}
.form-group input[type="file"]::file-selector-button,
.form-group input[type="file"]::-webkit-file-upload-button {
    margin-right: 0.9rem;
    padding: 0.5rem 1.1rem;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--knms-accent), var(--knms-accent-deep, var(--knms-accent)));
    color: #2a1a02;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 0 10px var(--glow-gold, rgba(255,185,46,0.4));
    transition: filter 0.15s ease, box-shadow 0.15s ease;
}
.form-group input[type="file"]::file-selector-button:hover,
.form-group input[type="file"]::-webkit-file-upload-button:hover {
    filter: brightness(1.08);
    box-shadow: 0 0 16px var(--glow-gold, rgba(255,185,46,0.55));
}

/* --- Per-photo crop widget in the CMS gallery editor --- */
.photo-crop { flex-shrink: 0; width: 150px; }
.photo-crop-stage {
    position: relative;
    width: 150px;
    height: 150px;
    /* Required: a zoomed image is scaled with transform, which does not
       affect layout, so without clipping it spills over the neighbours. */
    overflow: hidden;
    border-radius: var(--radius-sm);
    border: 1px solid var(--knms-border);
    cursor: crosshair;
    background: var(--knms-bg);
    touch-action: none;
}
.photo-crop-stage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    user-select: none;
}
.photo-crop-cross {
    position: absolute;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 8px var(--glow-gold);
    pointer-events: none;
}
.photo-crop-zoom {
    display: block;
    margin-top: 0.45rem;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--knms-muted);
}
.photo-crop-zoom input[type="range"] { width: 100%; accent-color: var(--knms-accent); }

/* Gallery thumbnails must clip too, so a stored zoom stays inside its tile. */
.gallery-item, .landing-gallery-item { overflow: hidden; }

/* Header logo is the real circular Sangam emblem (as in the reference),
   not a lettermark tile. Ringed in gold so it reads on the dark bar. */
.brand-mark-emblem {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: none;
    padding: 0;
    object-fit: cover;
    box-shadow: 0 0 0 2px var(--knms-accent), 0 0 12px var(--glow-gold);
}
