:root {
    --primary: #c2185b;
    --primary-dark: #9c134a;
    --secondary: #ff5c8a;
    --accent: #ff8fb1;
    --bg: #fff5ec;
    --bg-alt: #ffe3ec;
    --text: #2a1f25;
    --text-light: #80707a;
    --white: #ffffff;
    --shadow-sm: 0 4px 14px rgba(194, 24, 91, 0.08);
    --shadow: 0 14px 38px rgba(194, 24, 91, 0.12);
    --shadow-lg: 0 26px 60px rgba(194, 24, 91, 0.18);
    --radius: 22px;
    --radius-sm: 14px;
    --gradient: linear-gradient(135deg, #ff6b9d 0%, #ff9bbb 100%);
    --gradient-strong: linear-gradient(135deg, #c2185b 0%, #ff5c8a 100%);
    --gradient-soft: linear-gradient(135deg, #fff5ec 0%, #ffe3ec 100%);
    --border: rgba(194, 24, 91, 0.10);
    --font: 'Lora', Georgia, 'Times New Roman', serif;
    --font-display: 'Lora', Georgia, 'Times New Roman', serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Native form controls/buttons don't inherit font-family — force the serif everywhere */
button, input, select, textarea, optgroup { font-family: var(--font); }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background:
        radial-gradient(900px 500px at 100% -5%, rgba(255, 143, 177, 0.20), transparent 60%),
        radial-gradient(800px 500px at -10% 10%, rgba(255, 96, 144, 0.12), transparent 60%),
        linear-gradient(180deg, #ffeef0 0%, #fff5ec 30%, #fff5ec 100%);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body > main { flex: 1 0 auto; }

/* Floating Hearts Animation (site-wide) */
.page-hearts {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}
.heart {
    position: absolute;
    bottom: -40px;
    color: #ff9bb3;
    animation: floatUp 10s linear infinite;
    opacity: 0;
}
@keyframes floatUp {
    0%   { transform: translateY(0) scale(0.5) rotate(0deg); opacity: 0; }
    15%  { opacity: 0.45; }
    85%  { opacity: 0.45; }
    100% { transform: translateY(-105vh) scale(1.4) rotate(45deg); opacity: 0; }
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

::selection { background: var(--primary); color: #fff; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--primary), var(--secondary));
    border-radius: 50px;
    border: 2px solid var(--bg-alt);
}
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    box-shadow: 0 6px 24px rgba(255, 46, 99, 0.07);
    border-bottom: 1px solid rgba(255, 46, 99, 0.07);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.01em;
}

.logo:hover { color: var(--primary); }
.logo-icon { font-size: 1.6rem; animation: pulse 2s infinite; }
.logo-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 6px;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-link {
    position: relative;
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 4px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.nav-link:hover { color: var(--primary); background: rgba(255, 51, 102, 0.06); }
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: var(--primary); font-weight: 600; }
.nav-muted { color: var(--text-light); }

.nav-divider {
    width: 1px;
    height: 24px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0 6px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    margin: 0 auto;
    border-radius: 2px;
    background: var(--primary);
    transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* User menu / dropdown */
.user-menu { position: relative; }

/* Mobile-only user links (shown inside the hamburger nav on small screens) */
.nav-user-mobile { display: none; }

.user-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 51, 102, 0.06);
    border: 1px solid rgba(255, 51, 102, 0.12);
    border-radius: 50px;
    padding: 8px 16px;
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.user-trigger:hover { background: rgba(255, 51, 102, 0.1); border-color: rgba(255, 51, 102, 0.25); }

.user-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-caret { font-size: 0.7rem; color: var(--text-light); transition: transform 0.25s; }
.user-menu.open .user-caret { transform: rotate(180deg); }

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 200px;
    background: var(--white);
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 200;
}

.user-menu.open .user-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }

.user-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 22px;
    width: 12px;
    height: 12px;
    background: var(--white);
    border-left: 1px solid rgba(0, 0, 0, 0.06);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    transform: rotate(45deg);
}

.user-dropdown a {
    display: block;
    padding: 10px 14px;
    border-radius: 9px;
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 500;
    transition: background 0.18s, color 0.18s;
}

.user-dropdown a:hover { background: var(--bg-alt); color: var(--primary); }
.user-dropdown .dropdown-danger { color: #d32f2f; }
.user-dropdown .dropdown-danger:hover { background: #fdecea; color: #c62828; }

/* Buttons */
.btn {
    position: relative;
    display: inline-block;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.01em;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s, background 0.25s, color 0.25s;
    text-align: center;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 70%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}
.btn-primary:hover::after { left: 130%; }

.btn-primary {
    background: var(--gradient-strong);
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 10px 24px rgba(255, 46, 99, 0.34);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(255, 46, 99, 0.45);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(255, 46, 99, 0.28);
}

.btn-sm { padding: 6px 16px; font-size: 0.85rem; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn-block { display: block; width: 100%; }
.btn-danger { background: #e53935; color: white; border: none; }

/* Hero */
.hero {
    background:
        radial-gradient(600px 400px at 85% 10%, rgba(255, 96, 144, 0.20), transparent 60%),
        radial-gradient(circle at top right, #ffe3ec, var(--bg));
    padding: 92px 0;
    position: relative;
    overflow: hidden;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 3.2rem;
    line-height: 1.18;
    letter-spacing: -0.015em;
    margin-bottom: 18px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p { color: var(--text-light); font-size: 1.1rem; margin-bottom: 24px; }

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

.hero-card, .calc-form-card, .calc-result-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 34px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.hero-card h3 { margin-bottom: 16px; color: var(--primary); font-family: var(--font-display); }

.quick-calc input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.quick-calc input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Sections */
.section { padding: 80px 0; }
.section-alt { background: var(--white); }

.section-title {
    position: relative;
    font-family: var(--font-display);
    font-size: 2.6rem;
    letter-spacing: -0.01em;
    text-align: center;
    margin-bottom: 50px;
    color: var(--text);
}

.section-title::after {
    content: '';
    display: block;
    width: 70px;
    height: 4px;
    margin: 16px auto 0;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

/* Page-header banner removed site-wide; heading and paragraph kept as plain text. */
.page-header {
    padding: 56px 0 0;
    text-align: center;
}
.page-header > .container { position: relative; }
.page-header h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    letter-spacing: 0.5px;
    color: var(--primary);
}
.page-header p {
    margin-top: 12px;
    font-size: 1.05rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-light);
}

/* The dashboard keeps its own hero banner (it shares the page-header element). */
.dashboard-hero {
    position: relative;
    background: linear-gradient(135deg, #ff758c 0%, #ff9bc4 55%, #ffb6d2 100%);
    color: var(--white);
    padding: 72px 0 80px;
    text-align: left;
    overflow: hidden;
    border-bottom-left-radius: 40px;
    border-bottom-right-radius: 40px;
    box-shadow: 0 12px 30px rgba(255, 126, 179, 0.25);
}
.dashboard-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.22) 1.5px, transparent 1.5px);
    background-size: 24px 24px;
    opacity: 0.6;
}
.dashboard-hero::after {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 220px;
    height: 220px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
}
.dashboard-hero > .container { z-index: 1; }
.dashboard-hero h1 {
    color: var(--white);
    text-shadow: 0 2px 8px rgba(214, 51, 108, 0.18);
}
.dashboard-hero p {
    color: var(--white);
    opacity: 0.95;
}

/* Calculator Grid */
.calc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}
@media (min-width: 650px) { .calc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .calc-grid { grid-template-columns: repeat(3, 1fr); } }

.calc-card {
    position: relative;
    background: var(--white);
    border-radius: var(--radius);
    padding: 38px 22px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.32s, border-color 0.32s;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

.calc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-strong);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.32s ease;
}

.calc-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 26px 50px rgba(255, 46, 99, 0.18);
    border-color: rgba(255, 96, 144, 0.45);
    color: var(--text);
}

.calc-card:hover::before { transform: scaleX(1); }

/* Signature pale-pink icon circle — used by every calc-card site-wide */
.calc-icon {
    width: 75px;
    height: 75px;
    margin: 0 0 20px;
    border-radius: 50%;
    background: #fff5f7;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    transition: transform 0.32s ease, background 0.32s ease;
}
.calc-card:hover .calc-icon { transform: scale(1.1) rotate(5deg); }
.calc-card h3 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 10px; color: var(--text); }
.calc-card p { color: var(--text-light); font-size: 0.95rem; line-height: 1.5; margin: 0; }

/* SVG calculator icons (home + activities) */
.calc-icon svg { width: 40px; height: 40px; fill: currentColor; }

/* Activities page cards — mirror the home page calc-card design exactly */
.activities-page .calc-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: 1fr;
}
@media (min-width: 650px) {
    .activities-page .calc-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
    .activities-page .calc-grid { grid-template-columns: repeat(3, 1fr); }
}
.activities-page .calc-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 35px 20px;
    text-align: center;
    color: var(--text);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.02);
    border: 1px solid #ffccd5;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.activities-page .calc-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(255, 51, 102, 0.15);
    border-color: #ff758c;
}
.activities-page .calc-icon {
    width: 75px;
    height: 75px;
    margin: 0 0 20px;
    border-radius: 50%;
    background: #fff5f7;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    transition: all 0.3s ease;
}
.activities-page .calc-card:hover .calc-icon {
    transform: scale(1.1) rotate(5deg);
}
.activities-page .calc-card h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin: 0 0 10px;
    color: var(--text);
}
.activities-page .calc-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

/* Calculator Layout */
.calc-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: stretch;
    max-width: 980px;
}

/* Result card centers its content (placeholder or result) and matches the form height */
.calc-result-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 360px;
    scroll-margin-top: 88px; /* clears the sticky header when auto-scrolled on mobile */
}

/* Forms */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 7px; font-size: 0.9rem; color: var(--text); }

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 13px 16px;
    background: #fbf7f9;
    border: 1.5px solid #efe3e9;
    border-radius: 12px;
    font-size: 1rem;
    font-family: var(--font);
    color: var(--text);
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: #b9a9b1; }

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover { border-color: #e3c9d5; }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 51, 102, 0.12);
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
    background: #f3f3f5;
    color: var(--text-light);
    cursor: not-allowed;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Date input fallback icon (used only if JS hasn't enhanced the field yet) */
.form-group input[type="date"] { cursor: pointer; }
.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(36%) sepia(82%) saturate(2992%) hue-rotate(323deg) brightness(101%) contrast(101%);
}

/* ===== Custom date picker ===== */
.dp { position: relative; }
.dp-display { padding-right: 44px !important; cursor: pointer; }
.dp-icon {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    pointer-events: auto;
}
.dp-icon svg { width: 100%; height: 100%; }
.dp.open .dp-display { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255, 51, 102, 0.12); background: #fff; }
.dp-invalid .dp-display { border-color: #e3354f; box-shadow: 0 0 0 3px rgba(227, 53, 79, 0.14); }

.dp-pop {
    position: absolute;
    z-index: 60;
    top: calc(100% + 10px);
    left: 0;
    width: 300px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 20px 48px rgba(255, 51, 102, 0.2);
    padding: 14px;
    animation: dpIn 0.16s ease;
}
@keyframes dpIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 6px; }
.dp-title {
    flex: 1;
    border: none;
    background: none;
    font-family: var(--font-display);
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    padding: 7px 10px;
    border-radius: 10px;
    transition: background 0.15s, color 0.15s;
}
.dp-title:hover { background: rgba(255, 51, 102, 0.08); color: var(--primary); }
.dp-title-static { cursor: default; }
.dp-title-static:hover { background: none; color: var(--text); }
.dp-nav {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    border-radius: 10px;
    color: var(--primary);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.dp-nav:hover:not(:disabled) { background: rgba(255, 51, 102, 0.1); }
.dp-nav:disabled { color: #ddccd3; cursor: not-allowed; }

.dp-week, .dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.dp-week { margin-bottom: 4px; }
.dp-wd { text-align: center; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text-light); padding: 4px 0; }

.dp-day {
    aspect-ratio: 1 / 1;
    border: none;
    background: none;
    border-radius: 10px;
    font-family: var(--font);
    font-size: 0.92rem;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.dp-day:hover:not(:disabled):not(.is-selected) { background: rgba(255, 51, 102, 0.1); color: var(--primary); }
.dp-day.is-other { color: #cbbac1; }
.dp-day.is-today:not(.is-selected) { box-shadow: inset 0 0 0 1.5px var(--primary); color: var(--primary); font-weight: 700; }
.dp-day.is-selected { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; font-weight: 700; }
.dp-day:disabled { color: #e6d8dd; cursor: not-allowed; }

.dp-mgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dp-ygrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-height: 248px; overflow-y: auto; padding-right: 2px; }
.dp-cell {
    border: none;
    background: #faf2f5;
    border-radius: 10px;
    padding: 12px 4px;
    font-family: var(--font);
    font-size: 0.9rem;
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.dp-cell:hover:not(:disabled):not(.is-selected) { background: rgba(255, 51, 102, 0.12); color: var(--primary); }
.dp-cell.is-selected { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; font-weight: 700; }
.dp-cell:disabled { color: #d9c5cd; background: #f5eef1; cursor: not-allowed; }

/* Keep the popup from spilling off-screen for right-column fields */
.form-row .form-group:last-child .dp-pop { left: auto; right: 0; }

/* Score Ring */
.score-ring {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 20px;
}

.score-ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }

.ring-bg { fill: none; stroke: #fce4ec; stroke-width: 8; }
.ring-fill {
    fill: none;
    stroke: url(#gradient);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transition: stroke-dashoffset 1.5s ease;
}

.score-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-number { font-size: 2.5rem; font-weight: 700; color: var(--primary); }
.score-percent { font-size: 1.2rem; color: var(--text-light); }

.result-display { text-align: center; }
.result-display h2 { color: var(--primary); margin-bottom: 8px; }
.result-names { font-weight: 600; margin-bottom: 12px; }
.zodiac-insight { font-style: italic; color: var(--secondary); margin-top: 12px; }

.result-placeholder { text-align: center; padding: 40px; color: var(--text-light); }
.placeholder-heart { font-size: 4rem; opacity: 0.3; animation: pulse 2s infinite; }

.flames-result .flames-letter {
    font-size: 5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
}

.animate-in { animation: fadeInUp 0.6s ease; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Share */
.share-buttons { margin-top: 20px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; align-items: center; }
.share-btn {
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    color: white;
}
.share-btn.whatsapp { background: #25d366; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.copy { background: var(--secondary); }

/* Steps */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step-card { text-align: center; padding: 24px; }
.step-card span {
    display: inline-flex;
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 12px;
}

/* Blog */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }

.blog-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 42px rgba(255, 46, 99, 0.14);
    border-color: rgba(255, 96, 144, 0.4);
}

.blog-card h2, .blog-card h3 { margin-bottom: 10px; line-height: 1.4; }
.blog-card h2 a, .blog-card h3 a { color: var(--text); transition: color 0.3s ease; }
.blog-card h2 a:hover, .blog-card h3 a:hover { color: var(--primary); }
.blog-tag {
    display: inline-block;
    background: var(--bg-alt);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}
.blog-meta { color: var(--text-light); font-size: 0.85rem; margin: 10px 0; }
.read-more { font-weight: 600; }

.article-container { max-width: 800px; }
.article-content { margin-top: 24px; line-height: 1.8; }
.article-content p { margin-bottom: 16px; }
.article-content img { max-width: 100%; height: auto; border-radius: 14px; }
.article-content img.article-hero { display: block; width: 100%; max-width: 100%; height: 360px; object-fit: cover; border-radius: 14px; margin: 0 auto 28px; }

/* FAQ */
.faq-wrap { max-width: 820px; }

.faq-group { margin-bottom: 38px; }
.faq-group:last-of-type { margin-bottom: 0; }
.faq-group-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 18px;
    padding-left: 16px;
    position: relative;
    line-height: 1.3;
}
.faq-group-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 1.05em;
    border-radius: 4px;
    background: var(--gradient-strong);
}

.faq-list { display: flex; flex-direction: column; gap: 14px; }

.faq-item {
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: box-shadow 0.25s, border-color 0.25s, transform 0.25s;
}
.faq-item:hover { border-color: rgba(255, 96, 144, 0.35); }
.faq-item[open] {
    box-shadow: var(--shadow);
    border-color: rgba(255, 96, 144, 0.45);
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-weight: 600;
    font-size: 1.02rem;
    cursor: pointer;
    color: var(--text);
    list-style: none;
    padding: 18px 22px;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.faq-item summary:hover { color: var(--primary); }
.faq-item[open] summary { color: var(--primary); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: -2px;
    border-radius: var(--radius-sm);
}

.faq-q { flex: 1; }

.faq-icon {
    flex-shrink: 0;
    position: relative;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--gradient-soft);
    border: 1px solid var(--border);
    transition: transform 0.3s ease, background 0.3s;
}
.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background: var(--primary);
    border-radius: 2px;
    transition: transform 0.3s ease, background 0.3s;
}
.faq-icon::before { width: 11px; height: 2px; transform: translate(-50%, -50%); }
.faq-icon::after  { width: 2px; height: 11px; transform: translate(-50%, -50%); }
.faq-item[open] .faq-icon {
    background: var(--gradient-strong);
    transform: rotate(180deg);
}
.faq-item[open] .faq-icon::before,
.faq-item[open] .faq-icon::after { background: var(--white); }
.faq-item[open] .faq-icon::after { transform: translate(-50%, -50%) scaleY(0); }

/* Smooth open/close animation */
.faq-answer {
    overflow: hidden;
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
}
.faq-answer > p {
    min-height: 0;
    margin: 0;
    padding: 0 22px;
    color: var(--text-light);
    opacity: 0;
    transition: opacity 0.3s ease, padding 0.3s ease;
}
.faq-item[open] .faq-answer { grid-template-rows: 1fr; }
.faq-item[open] .faq-answer > p { opacity: 1; padding: 0 22px 20px; }

.faq-cta {
    text-align: center;
    margin-top: 46px;
    padding: 32px 24px;
    background: var(--gradient-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.faq-cta p { margin-bottom: 16px; color: var(--text-light); font-weight: 500; }

.faq-empty { text-align: center; color: var(--text-light); padding: 40px 0; }

@media (max-width: 600px) {
    .faq-group-title { font-size: 1.25rem; }
    .faq-item summary { padding: 15px 16px; font-size: 0.96rem; gap: 12px; }
    .faq-icon { width: 23px; height: 23px; }
    .faq-answer > p { padding: 0 16px; }
    .faq-item[open] .faq-answer > p { padding: 0 16px 16px; }
    .faq-cta { padding: 26px 18px; }
}

/* ===== Terms / legal (always-open cards) ===== */
.terms-wrap { max-width: 820px; }

.terms-cards { display: flex; flex-direction: column; gap: 18px; }

.terms-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    padding: 26px 30px;
    scroll-margin-top: 90px;
    transition: box-shadow 0.25s, border-color 0.25s, transform 0.25s;
}
.terms-card:hover {
    box-shadow: var(--shadow);
    border-color: rgba(255, 96, 144, 0.32);
    transform: translateY(-2px);
}

.terms-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}
.terms-card-head h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--text);
    line-height: 1.25;
}
.terms-card p { color: var(--text-light); margin-bottom: 12px; line-height: 1.78; }
.terms-card p:last-child { margin-bottom: 0; }
.terms-card strong { color: var(--text); font-weight: 600; }

.terms-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 6px 0 0;
    padding: 0;
}
.terms-card ul li {
    position: relative;
    padding-left: 28px;
    color: var(--text-light);
    line-height: 1.65;
}
.terms-card ul li::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 0.62em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gradient-strong);
    box-shadow: 0 0 0 4px rgba(255, 46, 99, 0.1);
}

@media (max-width: 600px) {
    .terms-card { padding: 22px 20px; }
    .terms-card-head h3 { font-size: 1.15rem; }
}

/* ===== Terms / legal accordion ===== */

.terms-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 16px auto 0;
    padding: 7px 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--primary-dark);
}
.terms-badge svg { width: 15px; height: 15px; fill: var(--primary); }

.terms-intro {
    background: var(--gradient-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-bottom: 28px;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.75;
}
.terms-intro strong { color: var(--primary-dark); }

.terms-list { display: flex; flex-direction: column; gap: 14px; }

.terms-item {
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    scroll-margin-top: 90px;
    transition: box-shadow 0.25s, border-color 0.25s;
}
.terms-item:hover { border-color: rgba(255, 96, 144, 0.35); }
.terms-item[open] {
    box-shadow: var(--shadow);
    border-color: rgba(255, 96, 144, 0.45);
}

.terms-item summary {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    color: var(--text);
    list-style: none;
    padding: 18px 22px;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.terms-item summary:hover,
.terms-item[open] summary { color: var(--primary); }
.terms-item summary::-webkit-details-marker { display: none; }
.terms-item summary:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: -2px;
    border-radius: var(--radius-sm);
}

.terms-num {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: var(--gradient-soft);
    border: 1px solid var(--border);
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 700;
    transition: background 0.3s, color 0.3s;
}
.terms-item[open] .terms-num { background: var(--gradient-strong); color: #fff; }

.terms-q { flex: 1; }

.terms-icon {
    flex-shrink: 0;
    position: relative;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--gradient-soft);
    border: 1px solid var(--border);
    transition: transform 0.3s ease, background 0.3s;
}
.terms-icon::before,
.terms-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background: var(--primary);
    border-radius: 2px;
    transition: transform 0.3s ease, background 0.3s;
}
.terms-icon::before { width: 11px; height: 2px; transform: translate(-50%, -50%); }
.terms-icon::after  { width: 2px; height: 11px; transform: translate(-50%, -50%); }
.terms-item[open] .terms-icon { background: var(--gradient-strong); transform: rotate(180deg); }
.terms-item[open] .terms-icon::before,
.terms-item[open] .terms-icon::after { background: var(--white); }
.terms-item[open] .terms-icon::after { transform: translate(-50%, -50%) scaleY(0); }

/* Smooth open/close for rich content */
.terms-body {
    overflow: hidden;
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
}
.terms-body-inner {
    min-height: 0;
    padding: 0 22px;
    color: var(--text-light);
    opacity: 0;
    transition: opacity 0.3s ease, padding 0.3s ease;
}
.terms-item[open] .terms-body { grid-template-rows: 1fr; }
.terms-item[open] .terms-body-inner { opacity: 1; padding: 4px 22px 22px 70px; }

.terms-body-inner p { margin: 0 0 12px; line-height: 1.75; }
.terms-body-inner p:last-child { margin-bottom: 0; }
.terms-body-inner strong { color: var(--text); font-weight: 600; }

.terms-body-inner ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 4px 0 0;
    padding: 0;
}
.terms-body-inner ul li {
    position: relative;
    padding-left: 26px;
    line-height: 1.65;
}
.terms-body-inner ul li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 0.6em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gradient-strong);
    box-shadow: 0 0 0 4px rgba(255, 46, 99, 0.1);
}

.terms-callout {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: linear-gradient(135deg, #fff, #fff6f9);
    border: 1px solid rgba(255, 96, 144, 0.32);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    margin-top: 16px;
}
.terms-callout svg { width: 24px; height: 24px; fill: var(--primary); flex-shrink: 0; margin-top: 1px; }
.terms-callout p { margin: 0 !important; color: var(--text); font-weight: 500; }

@media (max-width: 600px) {
    .terms-item summary { padding: 15px 16px; font-size: 0.97rem; gap: 12px; }
    .terms-num { width: 30px; height: 30px; font-size: 0.88rem; }
    .terms-icon { width: 23px; height: 23px; }
    .terms-body-inner { padding: 0 16px; }
    .terms-item[open] .terms-body-inner { padding: 4px 16px 18px; }
    .terms-intro { padding: 20px 18px; }
}

/* Quote */
.daily-quote {
    position: relative;
    background: var(--gradient);
    color: #fff;
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(255, 117, 140, 0.3);
    margin: 0;
}
.daily-quote p {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    font-style: italic;
    line-height: 1.6;
    margin: 0 0 20px;
}
.daily-quote.large p { font-size: clamp(1.5rem, 4vw, 2rem); }
.daily-quote cite { display: block; font-size: 1.1rem; font-weight: 600; opacity: 0.9; }

/* Footer */
.site-footer {
    position: relative;
    background: radial-gradient(1200px 400px at 20% -20%, rgba(255, 92, 138, 0.22), transparent 60%), #4a0e1f;
    color: #c9c2c6;
    padding: 64px 0 24px;
    margin-top: 80px;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
@media (max-width: 860px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-heart { color: var(--accent); animation: pulse 2s infinite; }
.footer-brand > p { max-width: 280px; }
.footer-note { color: #8f868c; font-size: 0.85rem; margin-top: 10px; }

.site-footer h3, .site-footer h4 { color: #fff; margin-bottom: 16px; }
.footer-col h4 { font-size: 0.95rem; letter-spacing: 0.04em; text-transform: uppercase; }

.footer-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-col a {
    position: relative;
    color: #c9c2c6;
    display: block;
    width: fit-content;
    margin-bottom: 12px;
    font-size: 0.9rem;
    transition: color 0.2s, transform 0.2s, padding-left 0.2s;
}
.footer-col a:last-child { margin-bottom: 0; }
.footer-col a:hover { color: #fff; padding-left: 6px; }
.footer-col a::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0;
    transform: translateY(-50%);
    transition: opacity 0.2s;
}
.footer-col a:hover::before { opacity: 1; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
}
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { color: #c9c2c6; }
.footer-legal a:hover { color: var(--accent); }

.disclaimer { opacity: 0.55; font-size: 0.8rem; }

/* Alerts */
.alert {
    padding: 14px 20px;
    border-radius: 10px;
    margin: 16px auto;
    max-width: 1200px;
    font-weight: 500;
}

.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.alert-error { background: #fce4ec; color: #c62828; border: 1px solid #ef9a9a; }

/* Auth */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(700px 500px at 80% 0%, rgba(255, 96, 144, 0.18), transparent 60%),
        linear-gradient(135deg, #fff5f8, #ffe7ef);
}

.auth-wrapper { width: 100%; max-width: 440px; padding: 20px; }
.auth-logo { display: block; text-align: center; font-family: var(--font-display); font-size: 1.5rem; color: var(--primary); margin-bottom: 24px; font-weight: 700; }

.auth-card {
    background: white;
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow);
}

.auth-card h1 { font-family: var(--font-display); margin-bottom: 8px; }
.auth-card > p { color: var(--text-light); margin-bottom: 24px; }
.auth-links { text-align: center; margin-top: 16px; font-size: 0.9rem; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; background: white; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); }
.data-table th, .data-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid #f6eaf0; }
.data-table th { background: var(--bg-alt); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--primary-dark); }
.data-table tbody tr { transition: background 0.18s; }
.data-table tbody tr:hover { background: #fff6f9; }
.table-responsive { overflow-x: auto; }
.data-table td .muted { color: var(--text-light); }
.muted { color: var(--text-light); }
.muted--sm { font-size: 0.8rem; margin-top: 2px; }

/* ===== Admin panel ===== */
/* Standalone admin shell — separate from the public site (its own top bar, no site header/footer) */
.admin-app { background: var(--bg); min-height: 100vh; }
.admin-topbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
}
.admin-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 14px;
    padding-bottom: 14px;
}
.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-dark);
}
.admin-brand-icon { color: var(--primary); }
.admin-brand-badge {
    padding: 3px 10px;
    border-radius: 50px;
    background: rgba(156, 39, 176, 0.12);
    color: #8e24aa;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.admin-topbar-user {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}
.admin-topbar-link {
    padding: 7px 16px;
    border-radius: 50px;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-light);
    transition: background 0.2s, color 0.2s;
}
.admin-topbar-link:hover { background: var(--bg-alt); color: var(--primary-dark); }
.admin-topbar-link--out { color: #c62828; }
.admin-topbar-link--out:hover { background: rgba(229, 57, 53, 0.1); color: #c62828; }

.admin-wrap { padding-top: 40px; }

/* Tab bar */
.admin-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 32px;
    background: var(--white);
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}
.admin-nav-link {
    padding: 9px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-light);
    white-space: nowrap;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.admin-nav-link:hover { background: var(--bg-alt); color: var(--primary-dark); }
.admin-nav-link.active {
    background: var(--gradient-strong);
    color: #fff;
    box-shadow: 0 6px 16px rgba(194, 24, 91, 0.28);
}
.admin-nav-link--new {
    margin-left: auto;
    color: #fff;
    background: var(--primary);
}
.admin-nav-link--new:hover { background: var(--primary-dark); color: #fff; }
.admin-nav-link--out { color: #c62828; }
.admin-nav-link--out:hover { background: rgba(229, 57, 53, 0.1); color: #c62828; }

/* Admin login */
.auth-card--admin { border-top: 4px solid var(--primary); }
.admin-login-badge {
    display: inline-block;
    margin-bottom: 14px;
    padding: 5px 14px;
    border-radius: 50px;
    background: rgba(156, 39, 176, 0.12);
    color: #8e24aa;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Stat grid — 6 cards sit evenly as 3 × 2 on the admin overview */
.admin-stats {
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 40px;
}
/* Clickable stat cards open their own detail page */
.stat-card--link { cursor: pointer; text-decoration: none; color: inherit; }
.stat-card--link:hover { color: inherit; }
.stat-card--link:hover .stat-label { color: var(--primary); }

/* Cards/tables sit on a soft card so the table never floats alone */
.admin-wrap .table-responsive {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.admin-wrap .data-table { box-shadow: none; border-radius: 0; }
.admin-wrap .data-table th { white-space: nowrap; }
.admin-wrap .data-table td { vertical-align: middle; }
.admin-wrap .data-table tbody tr:last-child td { border-bottom: none; }

/* Badges & pills */
.role-badge,
.status-pill {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 50px;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.5;
}
.role-badge {
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.role-badge--admin { background: rgba(156, 39, 176, 0.14); color: #8e24aa; }
.role-badge--user  { background: var(--bg-alt); color: var(--primary-dark); }
.status-pill--on    { background: rgba(46, 160, 91, 0.14); color: #2e7d4f; }
.status-pill--off   { background: rgba(229, 57, 53, 0.12); color: #c62828; }
.status-pill--draft { background: rgba(255, 171, 64, 0.18); color: #b26a00; }

/* Internal-scroll table so long lists don't push the page down */
/* Scoped under .admin-wrap so it overrides .admin-wrap .table-responsive { overflow: hidden } */
.admin-wrap .table-scroll { max-height: 62vh; overflow-y: auto; }
/* thead stays fixed; only tbody scrolls */
.table-scroll .data-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bg-alt);
    box-shadow: inset 0 -1px 0 var(--border);
}

/* Keep the action buttons on a single line */
.col-actions { white-space: nowrap; width: 1%; }
.row-actions { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.row-actions form { margin: 0; }
.row-btn { white-space: nowrap; }
.row-btn {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-light);
    cursor: pointer;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.row-btn:hover { background: var(--bg-alt); color: var(--primary-dark); border-color: #e3c9d5; }
.row-btn--edit { color: var(--primary); }
.row-btn--delete { color: #c62828; }
.row-btn--delete:hover { background: rgba(229, 57, 53, 0.1); color: #c62828; border-color: rgba(229, 57, 53, 0.3); }

/* Blog editor */
.admin-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 26px;
    align-items: start;
}
.admin-form-main {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
}
.admin-form-main .form-group:last-child { margin-bottom: 0; }
.admin-form-side { position: sticky; top: 24px; }
.admin-form-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 22px;
}
.admin-form-box:last-child { margin-bottom: 0; }
.admin-box-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.admin-form-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.admin-form textarea { resize: vertical; line-height: 1.6; }
.field-hint { display: block; margin-top: 6px; font-size: 0.8rem; color: var(--text-light); }
.field-hint code { background: var(--bg-alt); padding: 1px 6px; border-radius: 6px; }

/* Rich-text content editor */
.rte {
    border: 1.5px solid #f1dbe4;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--white);
}
.rte-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    background: var(--bg);
    border-bottom: 1px solid #f1dbe4;
}
.rte-btn {
    min-width: 34px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    color: var(--text);
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.rte-btn:hover { background: var(--bg-alt); border-color: #e3c9d5; color: var(--primary-dark); }
.rte-btn--clear { margin-left: auto; color: var(--text-light); }
.rte-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.rte-editor {
    min-height: 320px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 18px 20px;
    line-height: 1.7;
    outline: none;
}
.rte-editor:focus { box-shadow: inset 0 0 0 2px rgba(194, 24, 91, 0.12); }
.rte-editor p { margin: 0 0 14px; }
.rte-editor h2 { font-size: 1.5rem; margin: 18px 0 10px; }
.rte-editor h3 { font-size: 1.2rem; margin: 16px 0 8px; }
.rte-editor ul, .rte-editor ol { margin: 0 0 14px 22px; }
.rte-editor:empty::before {
    content: 'Start writing your post…';
    color: #b9a9b1;
}

/* Featured image field */
.img-preview {
    border: 1.5px dashed #e7c8d6;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 12px;
    background: var(--bg);
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.img-preview img { width: 100%; height: auto; display: block; }
.img-preview.is-empty { min-height: 120px; }
.img-preview-empty { color: var(--text-light); font-size: 0.9rem; }
.img-pick { margin-bottom: 0; cursor: pointer; }

/* Activity list cell + form checkbox */
.act-cell { display: flex; align-items: center; gap: 12px; }
.act-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    border-radius: 12px;
    background: var(--bg-alt);
}
.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 18px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}
.check-row input { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }

/* Automatic SEO preview */
.seo-note { font-size: 0.82rem; color: var(--text-light); margin-bottom: 14px; }
.seo-preview {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
}
.seo-preview-url { font-size: 0.78rem; color: #3a8a3a; word-break: break-all; }
.seo-preview-title { font-size: 1.02rem; font-weight: 600; color: #1a4fa0; line-height: 1.3; }
.seo-preview-desc { font-size: 0.85rem; color: var(--text-light); line-height: 1.45; }

/* Blog post images (public) */
.blog-card-media {
    display: block;
    margin: -4px -4px 14px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 16 / 9;
}
.blog-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.blog-card--img:hover .blog-card-media img { transform: scale(1.05); }
.article-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 18px 0 8px;
    box-shadow: var(--shadow);
}

@media (max-width: 992px) {
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
    .admin-form-grid { grid-template-columns: 1fr; }
    .admin-form-side { position: static; }
    .admin-nav-link--new { margin-left: 0; }
}
@media (max-width: 560px) {
    .admin-stats { grid-template-columns: 1fr; }
    .admin-nav { gap: 4px; }
    .admin-nav-link { padding: 8px 14px; font-size: 0.85rem; }
}

.stats-row { display: flex; gap: 20px; margin-bottom: 30px; }
.stat-card { background: white; padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; flex: 1; }
.stat-card span { font-size: 2rem; font-weight: 700; color: var(--primary); display: block; }

/* Quiz */
.quiz-question h3 { margin-bottom: 16px; }
.quiz-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    border: 2px solid #f1e2e9;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.quiz-option:hover { border-color: var(--primary); background: #fff6f9; transform: translateX(4px); box-shadow: var(--shadow-sm); }
.quiz-option input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.quiz-option span { flex: 1; }
.quiz-option:has(input:checked) {
    border-color: var(--primary);
    background: #ffeaf2;
    box-shadow: var(--shadow-sm);
}
.quiz-step { color: var(--text-light); font-size: 0.85rem; margin-bottom: 8px; }
.quiz-nav { display: flex; gap: 12px; margin-top: 20px; justify-content: flex-end; }

/* Search */
.search-form { display: flex; gap: 10px; }
.search-form input { flex: 1; padding: 12px 16px; border: 2px solid #eee; border-radius: 10px; font-size: 1rem; }
.search-result { padding: 16px 0; border-bottom: 1px solid #eee; }

/* Utilities */
.text-center { text-align: center; }
.mt-2 { margin-top: 24px; }
.mb-2 { margin-bottom: 24px; }
.mb-1 { margin-bottom: 12px; }

/* Responsive */
@media (max-width: 992px) {
    .hero-inner { grid-template-columns: 1fr; }
    .calc-layout { grid-template-columns: 1fr; max-width: 560px; }
    .calc-result-card { min-height: 280px; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .steps-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .main-nav {
        display: flex;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 16px 20px 24px;
        box-shadow: 0 12px 24px rgba(255, 51, 102, 0.12);
        border-bottom: 1px solid rgba(255, 51, 102, 0.08);
        max-height: 0;
        overflow: hidden;
        padding-top: 0;
        padding-bottom: 0;
        opacity: 0;
        transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.3s ease;
    }
    .main-nav.open {
        max-height: 720px;
        opacity: 1;
        padding-top: 16px;
        padding-bottom: 24px;
    }
    .nav-link { padding: 12px 14px; }
    .nav-link::after { display: none; }
    .nav-link.active { background: rgba(255, 51, 102, 0.08); }
    .nav-divider { display: none; }
    .main-nav .btn { margin-top: 6px; }

    /* Move the user menu inside the hamburger nav */
    .user-menu { display: none; }
    .nav-user-mobile {
        display: flex;
        flex-direction: column;
        gap: 4px;
        margin-top: 8px;
        padding-top: 12px;
        border-top: 1px solid rgba(255, 51, 102, 0.12);
    }
    .nav-user-label {
        padding: 6px 14px;
        font-size: 0.78rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--text-light);
    }
    .nav-link-danger { color: #d32f2f; }
    .nav-link-danger:hover { background: #fdecea; color: #c62828; }
    .hero h1 { font-size: 2rem; }
    .hero { padding: 50px 0; }
    .form-row { grid-template-columns: 1fr; }
    .calc-form-card, .calc-result-card { padding: 24px; }
    .calc-result-card { min-height: 240px; }
    .result-placeholder { padding: 20px; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .footer-legal { justify-content: center; }
}

/* Result card + share buttons fine-tuning for small phones */
@media (max-width: 600px) {
    .calc-result-card { padding: 22px 18px; }
    .score-ring { width: 140px; height: 140px; margin-bottom: 16px; }
    .score-number { font-size: 2.2rem; }
    .result-display h2 { font-size: 1.45rem; }
    .result-display p { font-size: 0.95rem; }
    .fun-details { margin-top: 14px; }
    .fun-details li { font-size: 0.9rem; padding: 8px 0; }

    .share-buttons {
        flex-direction: column;
        gap: 12px;
        margin-top: 22px;
    }
    .share-buttons span { font-size: 0.95rem; }
    .share-buttons .share-btn {
        width: 100%;
        max-width: 280px;
        padding: 12px 16px;
        font-size: 0.95rem;
        text-align: center;
    }
}

/* ===== Profile Page (site theme) ===== */
.profile-page { padding: 40px 0 64px; }
.profile-page .container { max-width: 1040px; }

/* Hero */
.pf-hero {
    display: flex;
    align-items: center;
    gap: 22px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius);
    padding: 28px 34px;
    margin-bottom: 28px;
    box-shadow: 0 16px 40px rgba(255, 51, 102, 0.22);
}
.pf-hero-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.55);
    font-family: var(--font-display);
    font-size: 2.1rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.pf-hero h1 { color: #fff; font-family: var(--font-display); font-size: 1.9rem; line-height: 1.15; margin-bottom: 4px; }
.pf-hero p { color: rgba(255, 255, 255, 0.9); font-size: 0.95rem; }

/* Grid */
.pf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
    align-items: start;
}

/* Cards */
.pf-card {
    background: var(--white);
    border: 1px solid rgba(255, 51, 102, 0.08);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.pf-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 24px;
    background: var(--bg-alt);
    border-bottom: 1px solid rgba(255, 51, 102, 0.08);
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 700;
}
.pf-card-head svg { width: 20px; height: 20px; fill: var(--primary); flex-shrink: 0; }
.pf-card-body { padding: 22px 24px 26px; }

/* Read-only info rows */
.pf-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #f1e6ec;
}
.pf-row:last-child { border-bottom: none; }
.pf-row-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.pf-row-label svg { width: 16px; height: 16px; fill: var(--primary); }
.pf-row-value { color: var(--text); font-weight: 600; font-size: 0.95rem; text-align: right; }
.pf-pass-value { display: inline-flex; align-items: center; gap: 10px; }
.pf-dots { letter-spacing: 2px; }
.pf-eye {
    display: inline-flex;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    color: var(--text-light);
}
.pf-eye svg { width: 18px; height: 18px; fill: currentColor; }
.pf-eye:hover { color: var(--primary); }

/* Change password form */
.pf-field { margin-bottom: 18px; }
.pf-field label {
    display: block;
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
}
.pf-input { position: relative; }
.pf-input-icon {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--bg-alt);
}
.pf-input-icon svg { width: 17px; height: 17px; fill: var(--primary); }
.pf-input input {
    width: 100%;
    padding: 13px 16px 13px 54px;
    background: #fbf7f9;
    border: 1.5px solid #efe3e9;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: var(--font);
    color: var(--text);
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.pf-input input::placeholder { color: #b9a9b1; }
.pf-input input:focus {
    outline: none;
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 51, 102, 0.12);
}

.pf-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 6px;
    padding: 14px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-size: 0.98rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.pf-btn svg { width: 17px; height: 17px; fill: #fff; }
.pf-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(255, 51, 102, 0.35);
}

@media (max-width: 768px) {
    .pf-grid { grid-template-columns: 1fr; }
    .pf-hero { flex-direction: column; text-align: center; padding: 26px 20px; }
    .pf-hero h1 { font-size: 1.6rem; }
}

/* ===== Dashboard ===== */
.dashboard-header { text-align: left; }
.dashboard-header h1,
.dashboard-header p { margin-left: 0; margin-right: 0; }
.dashboard-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.dashboard-eyebrow {
    display: inline-block;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 8px;
}
.dashboard-hero-cta { flex-shrink: 0; }

.dashboard { padding-top: 48px; }

/* Stat cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 48px;
}
.stats-grid .stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
    padding: 22px 24px;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 51, 102, 0.07);
    box-shadow: 0 8px 28px rgba(255, 51, 102, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stats-grid .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(255, 51, 102, 0.16);
}
.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.stat-icon--pink   { background: rgba(255, 51, 102, 0.12); }
.stat-icon--purple { background: rgba(156, 39, 176, 0.12); }
.stat-icon--rose   { background: rgba(255, 64, 129, 0.14); }
.stat-icon--amber  { background: rgba(255, 171, 64, 0.16); }
.stat-meta { min-width: 0; }
.stat-value {
    display: block;
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--primary);
}
.stat-value--sm { font-size: 1rem; color: var(--text); white-space: nowrap; }
.stat-label {
    font-size: 0.82rem;
    color: var(--text-light);
    margin-top: 2px;
}

/* Activity header */
.activity-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.activity-title {
    font-family: var(--font-display);
    font-size: 1.55rem;
    color: var(--text);
}
.activity-sub { color: var(--text-light); font-size: 0.9rem; margin-top: 2px; }

/* Activity list — show ~6-7 rows, then scroll inside the list */
.activity-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 640px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 12px 4px 4px;
    margin-right: -8px;
    scrollbar-width: thin;
    scrollbar-color: var(--secondary) transparent;
}
.activity-list::-webkit-scrollbar { width: 8px; }
.activity-list::-webkit-scrollbar-track { background: transparent; margin: 4px 0; }
.activity-list::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--primary), var(--secondary));
    border-radius: 50px;
    border: none;
}
.activity-list::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }
.activity-item {
    display: flex;
    align-items: center;
    gap: 18px;
    background: var(--white);
    border-radius: 14px;
    padding: 16px 20px;
    border: 1px solid rgba(255, 51, 102, 0.07);
    box-shadow: 0 6px 22px rgba(255, 51, 102, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.activity-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(255, 51, 102, 0.12);
}
.activity-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--bg-alt), #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.activity-info { flex: 1; min-width: 0; }
.activity-info-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.activity-type { font-weight: 600; color: var(--text); font-size: 0.98rem; }
.activity-score {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
}
.activity-score--label {
    background: var(--bg-alt);
    color: var(--primary-dark);
}
.activity-names { color: var(--text-light); font-size: 0.9rem; margin: 4px 0 2px; }
.activity-date { font-size: 0.78rem; color: var(--text-light); opacity: 0.85; }

/* Activity actions */
.activity-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.activity-delete-form { margin: 0; }
.activity-btn {
    font-size: 0.82rem;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 999px;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.18s ease;
    font-family: var(--font);
}
.activity-btn--view {
    color: var(--primary);
    border-color: rgba(255, 51, 102, 0.3);
    background: transparent;
}
.activity-btn--view:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.activity-btn--delete {
    color: #e53935;
    border-color: rgba(229, 57, 53, 0.28);
    background: transparent;
}
.activity-btn--delete:hover { background: #e53935; color: #fff; border-color: #e53935; }

/* Empty state */
.activity-empty {
    text-align: center;
    background: var(--white);
    border-radius: var(--radius);
    padding: 56px 24px;
    border: 1px dashed rgba(255, 51, 102, 0.2);
    box-shadow: var(--shadow);
}
.activity-empty-icon { font-size: 2.6rem; margin-bottom: 12px; }
.activity-empty h3 { font-family: var(--font-display); margin-bottom: 6px; }
.activity-empty p { color: var(--text-light); margin-bottom: 20px; }

@media (max-width: 992px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Legal / Policy pages (Privacy, Terms) ===== */
.legal-page { padding: 40px 0 72px; }
.legal-wrap { max-width: 820px; }

/* "Last updated" pill under the page header */
.legal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 16px auto 0;
    padding: 7px 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--primary-dark);
}
.legal-badge svg { width: 15px; height: 15px; fill: var(--primary); flex-shrink: 0; }

/* Intro panel above the sections */
.legal-intro {
    background: var(--gradient-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px 30px;
    margin-bottom: 28px;
    color: var(--text);
    font-size: 1.02rem;
    line-height: 1.75;
}
.legal-intro p { margin: 0; }
.legal-intro strong { color: var(--primary-dark); }

/* Static section cards — all details visible */
.legal-sections { display: flex; flex-direction: column; gap: 18px; }

.legal-section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 28px 32px;
    transition: box-shadow 0.25s, border-color 0.25s, transform 0.25s;
}
.legal-section:hover {
    box-shadow: var(--shadow);
    border-color: rgba(255, 96, 144, 0.32);
    transform: translateY(-3px);
}

.legal-section-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}
.legal-section-head h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--text);
    line-height: 1.25;
    margin: 0;
}

/* Numbered badge */
.legal-num {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--gradient-strong);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(255, 46, 99, 0.28);
}

.legal-section p { color: var(--text-light); line-height: 1.75; margin-bottom: 12px; }
.legal-section p:last-child { margin-bottom: 0; }
.legal-section strong { color: var(--text); font-weight: 600; }

/* Bulleted list inside a section */
.legal-list { list-style: none; display: flex; flex-direction: column; gap: 11px; margin: 4px 0 0; padding: 0; }
.legal-list li {
    position: relative;
    padding-left: 28px;
    color: var(--text-light);
    line-height: 1.7;
}
.legal-list li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0.62em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gradient-strong);
    box-shadow: 0 0 0 4px rgba(255, 46, 99, 0.1);
}
.legal-list li strong { color: var(--text); }

/* Highlight / callout */
.legal-highlight {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: linear-gradient(135deg, #fff, #fff6f9);
    border: 1px solid rgba(255, 96, 144, 0.32);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    margin-top: 16px;
}
.legal-highlight svg { width: 24px; height: 24px; fill: var(--primary); flex-shrink: 0; margin-top: 1px; }
.legal-highlight p { margin: 0; color: var(--text); font-weight: 500; }

/* Contact CTA */
.legal-contact {
    text-align: center;
    background: var(--gradient-strong);
    color: #fff;
    border-radius: var(--radius);
    padding: 40px 28px;
    box-shadow: 0 18px 40px rgba(255, 46, 99, 0.28);
    margin-top: 46px;
}
.legal-contact h3 { font-family: var(--font-display); font-size: 1.7rem; color: #fff; margin-bottom: 8px; }
.legal-contact p { color: rgba(255, 255, 255, 0.92); margin-bottom: 20px; max-width: 520px; margin-left: auto; margin-right: auto; }
.legal-contact .btn { background: #fff; color: var(--primary); border-color: #fff; }
.legal-contact .btn:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

@media (max-width: 600px) {
    .legal-intro { padding: 22px 20px; }
    .legal-section { padding: 24px 20px; }
    .legal-num { width: 34px; height: 34px; font-size: 0.92rem; }
    .legal-section-head h3 { font-size: 1.15rem; }
}

.calc-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary, #ff3366);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 999px;
    line-height: 1.4;
}

/* ===== Generic Fun / result tools ===== */
.fun-result-big { font-size: 2.4rem; font-weight: 800; color: var(--primary, #ff3366); margin: 6px 0 4px; word-break: break-word; }
.fun-result-emoji { font-size: 2.4rem; letter-spacing: 4px; line-height: 1.7; margin: 10px 0; color: #ff7aa2; }
.fun-details { list-style: none; padding: 0; margin: 18px 0 0; text-align: left; }
.fun-details li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed #ffccd5; font-size: 0.95rem; }
.fun-details li:last-child { border-bottom: none; }
.fun-details .k { color: var(--text-light, #777); flex-shrink: 0; }
.fun-details .v { font-weight: 700; color: var(--text, #222); text-align: right; word-break: break-word; }

/* Long sentence values (e.g. "You asked") stack and read left-to-right */
.fun-details li.is-stacked { flex-direction: column; align-items: stretch; gap: 4px; }
.fun-details li.is-stacked .k { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }
.fun-details li.is-stacked .v { text-align: left; line-height: 1.5; }
.fun-letter { white-space: pre-wrap; text-align: left; line-height: 1.8; font-size: 1rem; color: var(--text, #333); background: #fff8fa; border: 1px solid #ffccd5; border-radius: 14px; padding: 24px 26px; margin-top: 20px; box-shadow: inset 0 1px 0 #fff; max-height: 420px; overflow-y: auto; }
.fun-swatch { display: inline-block; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #ddd; vertical-align: middle; margin-right: 6px; }
.player-tag { display: inline-block; background: #fff5f7; border: 1px solid #ffccd5; border-radius: 999px; padding: 4px 14px; font-weight: 700; color: var(--primary, #ff3366); margin-bottom: 14px; }

/* ===== About Page (Split / Magazine) ===== */
.about-page .section { padding: 64px 0; }

.about-eyebrow {
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--bg-alt);
    padding: 5px 14px;
    border-radius: 999px;
    margin-bottom: 14px;
}

/* Magazine alternating blocks */
.mag-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}
.mag-reverse .mag-text { order: 2; }
.mag-reverse .mag-visual { order: 1; }
.mag-num {
    display: block;
    font-family: var(--font-display);
    font-size: 3.4rem;
    font-weight: 700;
    line-height: 1;
    color: var(--bg-alt);
    -webkit-text-stroke: 1px var(--accent);
    margin-bottom: 6px;
}
.mag-text h2 {
    font-family: var(--font-display);
    font-size: 2.1rem;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
    color: var(--text);
}
.mag-text > p { color: var(--text-light); font-size: 1.05rem; margin-bottom: 16px; }
.mag-text .btn { margin-top: 8px; }

.mag-bullets { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 14px; }
.mag-bullets li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.5;
}
.mag-bullets li span:first-child {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    border-radius: 50%;
    background: var(--bg-alt);
}
.mag-bullets li strong { color: var(--text); }

/* Visual panels */
.mag-visual { display: flex; justify-content: center; }
.mag-panel {
    position: relative;
    width: 100%;
    max-width: 380px;
    aspect-ratio: 1 / 1;
    border-radius: 32px;
    background: var(--gradient);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.mag-panel::after {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.35), transparent 45%);
}
.mag-panel-alt { background: linear-gradient(135deg, #ff8fb1 0%, #ffb6d2 100%); }
.mag-panel-soft { background: linear-gradient(135deg, #ffa8c5 0%, #ff7aa2 100%); }
.mag-panel-emoji { position: relative; z-index: 1; font-size: 5.5rem; filter: drop-shadow(0 8px 16px rgba(0,0,0,0.18)); }
.mag-chip {
    position: absolute;
    z-index: 2;
    background: var(--white);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 999px;
    box-shadow: var(--shadow);
    white-space: nowrap;
}
.mag-chip-tl { top: 22px; left: 18px; }
.mag-chip-br { bottom: 22px; right: 18px; }
.mag-chip-tr { top: 22px; right: 18px; }
.mag-chip-bl { bottom: 22px; left: 18px; }

/* Values row */
.mag-values {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.mag-value {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px 24px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.mag-value:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.mag-value-icon {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    border-radius: 50%;
    background: var(--bg-alt);
}
.mag-value h3 { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 6px; color: var(--text); }
.mag-value p { color: var(--text-light); font-size: 0.95rem; line-height: 1.55; margin: 0; }

/* CTA */
.about-cta {
    background: var(--gradient-strong);
    border-radius: var(--radius);
    padding: 56px 40px;
    text-align: center;
    color: var(--white);
    box-shadow: var(--shadow-lg);
}
.about-cta h2 { font-family: var(--font-display); font-size: 2rem; margin-bottom: 12px; color: var(--white); }
.about-cta p { color: rgba(255, 255, 255, 0.92); font-size: 1.08rem; margin-bottom: 26px; }
.about-cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.about-cta .btn-primary { background: var(--white); color: var(--primary); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16); }
.about-cta .btn-primary:hover { color: var(--primary-dark); }
.about-cta .btn-outline { border-color: var(--white); color: var(--white); }
.about-cta .btn-outline:hover { background: var(--white); color: var(--primary); }

/* Responsive */
@media (max-width: 860px) {
    .mag-block { grid-template-columns: 1fr; gap: 32px; }
    .mag-reverse .mag-text { order: 2; }
    .mag-reverse .mag-visual { order: 1; }
    .mag-values { grid-template-columns: 1fr; }
    .mag-text h2 { font-size: 1.8rem; }
}
@media (max-width: 480px) {
    .mag-panel { max-width: 300px; }
    .mag-panel-emoji { font-size: 4.5rem; }
    .about-cta { padding: 40px 22px; }
    .about-cta h2 { font-size: 1.6rem; }
}

/* Cookie consent banner */
.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1000;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 16px 20px;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 720px;
    margin: 0 auto;
}
.cookie-banner.show { opacity: 1; transform: translateY(0); }
.cookie-banner-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: center;
}
.cookie-banner-text {
    flex: 1 1 320px;
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--text);
}
.cookie-banner-emoji { margin-right: 4px; }
.cookie-banner-text a { color: var(--primary); font-weight: 600; }
.cookie-banner-btn { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 480px) {
    .cookie-banner-inner { flex-direction: column; align-items: stretch; }
    .cookie-banner-btn { width: 100%; }
}

/* ============================================================
   404 error page
   ============================================================ */
.error-page { padding-top: 40px; padding-bottom: 60px; }
.error-card {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 48px 32px 40px;
}
.error-illustration {
    position: relative;
    display: inline-block;
    margin-bottom: 18px;
}
.error-code {
    font-family: var(--font-display);
    font-size: 6rem;
    font-weight: 700;
    line-height: 1;
    background: var(--gradient-strong);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
@keyframes errorFloat {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50% { transform: translateY(-8px) rotate(4deg); }
}
.error-heart { position: absolute; animation: errorFloat 4s ease-in-out infinite; }
.error-heart-1 { top: -10px; left: -26px; font-size: 1.6rem; animation-delay: 0s; }
.error-heart-2 { bottom: -6px; right: -22px; font-size: 1.3rem; color: var(--primary); animation-delay: 1.2s; }
.error-heart-3 { top: -16px; right: 30px; font-size: 1.1rem; animation-delay: 0.6s; }
.error-card h1 { font-family: var(--font-display); font-size: 1.9rem; margin-bottom: 12px; color: var(--text); }
.error-card > p { color: var(--text-light); max-width: 460px; margin: 0 auto 26px; line-height: 1.7; }
.error-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.error-links {
    border-top: 1px solid var(--bg-alt);
    padding-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 0.9rem;
}
.error-links span { color: var(--text-light); font-weight: 600; }
.error-links a { color: var(--primary); }
.error-links a:hover { text-decoration: underline; }
@media (max-width: 480px) {
    .error-code { font-size: 4.5rem; }
    .error-card { padding: 36px 20px 30px; }
    .error-actions .btn { width: 100%; }
}

/* ===== Tool/calculator SEO content + on-page FAQ ===== */
.tool-content { padding-top: 8px; }
.tool-content-inner { max-width: 820px; }
.tool-content-inner h2 {
    font-size: 1.5rem;
    margin: 32px 0 14px;
    color: var(--text, #2b2b3a);
}
.tool-content .tool-intro {
    font-size: 1.08rem;
    line-height: 1.75;
}
.tool-content p { line-height: 1.75; margin-bottom: 14px; }
.tool-steps {
    margin: 0 0 8px;
    padding-left: 22px;
    line-height: 1.7;
}
.tool-steps li { margin-bottom: 8px; }
.tool-faqs { margin-top: 8px; }
