/* --- GLOBAL VARIABLES --- */
:root {
    /* Standard (Cosmic) Variables */
    --bg-gradient: linear-gradient(135deg, #2b1055 0%, #7597de 100%);
    --heartbeat-gradient: linear-gradient(90deg, #ff5f6d 0%, #ffc371 50%, #23d5ab 100%);
    --btn-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --btn-sleep: linear-gradient(135deg, #2c3e50 0%, #4ca1af 100%);
    --btn-fitness: linear-gradient(135deg, #d53369 0%, #daae51 100%);
    
    /* Landing Page Variables */
    --space-dark: #0f0c29;
    --cosmic-purple: #2b1055;
    --kind-blue: #7597de;
    --glass: rgba(255, 255, 255, 0.05);
    
    --text-dark: #2d3748;
    --card-radius: 24px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    transition: background 0.3s ease; /* Smooth transition when toggling */
}

/* --- DYNAMIC BACKGROUNDS --- */
body.view-landing { background: var(--space-dark); color: white; }
body.view-app { background: var(--bg-gradient); background-attachment: fixed; color: var(--text-dark); }

/* --- SENSORY FRIENDLY / CALM MODE --- */
body.sensory-mode {
    /* 1. Flat, Matte Backgrounds (Sage/Slate tone) */
    --bg-gradient: #e2e8f0; 
    --space-dark: #2d3748; 
    
    /* 2. Solid Borders (No Neon) */
    --heartbeat-gradient: #718096;
    
    /* 3. Solid Buttons (No Gradients) */
    --btn-primary: #5a67d8;
    --btn-sleep: #2c5282;
    --btn-fitness: #b83280;
    
    /* 4. Opaque Cards (No Glassmorphism) */
    --glass: rgba(255, 255, 255, 0.15);
}

/* Stop Animation in Sensory Mode */
body.sensory-mode .marquee {
    animation: none;
    transform: none;
    text-align: center;
    white-space: normal;
    font-size: 0.75rem;
    padding: 5px;
}

/* --- LANDING PAGE STYLES --- */
.announcement-bar {
    background: var(--heartbeat-gradient); color: #0f0c29; overflow: hidden; white-space: nowrap;
    padding: 10px 0; font-weight: 800; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px;
    position: sticky; top: 0; z-index: 1100;
}
.marquee { display: inline-block; animation: marquee 25s linear infinite; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

nav {
    display: flex; justify-content: space-between; align-items: center; padding: 20px 8%;
    position: sticky; top: 38px; background: rgba(15, 12, 41, 0.95); backdrop-filter: blur(15px);
    z-index: 1000; border-bottom: 1px solid rgba(255,255,255,0.05);
}
body.sensory-mode nav { background: #1a202c; border-bottom: 1px solid #4a5568; }

.logo { font-size: 1.6rem; font-weight: 800; letter-spacing: -1px; }
.logo span { color: #23d5ab; }
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a { color: white; text-decoration: none; font-size: 0.85rem; font-weight: 500; opacity: 0.8; transition: 0.2s; cursor: pointer;}
.nav-links a:hover { opacity: 1; color: #23d5ab; }

.hero { padding: 140px 10% 100px; text-align: center; background: radial-gradient(circle at center, var(--cosmic-purple) 0%, var(--space-dark) 80%); }
body.sensory-mode .hero { background: var(--space-dark); } 

h1.hero-title { font-size: 4.5rem; margin: 0; letter-spacing: -3px; line-height: 1; }
.tagline { font-size: 1.6rem; color: var(--kind-blue); margin: 20px 0 40px; font-weight: 300; }

.method { padding: 80px 10%; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.f-card { background: var(--glass); border: 1px solid rgba(255, 255, 255, 0.1); padding: 40px; border-radius: 30px; }
.vault { margin: 0 10% 100px; padding: 80px 40px; background: rgba(255,255,255,0.02); border-radius: 40px; text-align: center; border: 1px solid rgba(255, 255, 255, 0.05); }
.security-grid { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; margin-top: 40px; }
.sec-item { background: rgba(255,255,255,0.08); padding: 20px 30px; border-radius: 20px; font-weight: 700; color: #23d5ab; }
footer { padding: 80px 8% 40px; text-align: center; border-top: 1px solid var(--glass); opacity: 0.7; }

/* --- PRICING SECTION --- */
.pricing {
    padding: 80px 10%;
    text-align: center;
}
.pricing h2 { font-size: 2.4rem; margin: 0 0 12px; }
.pricing-subtitle { color: rgba(255,255,255,0.65); font-size: 1.05rem; margin: 0 0 50px; }
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
    max-width: 1000px;
    margin: 0 auto 30px;
}
.pricing-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 28px;
    padding: 36px 28px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}
.pricing-card-featured {
    background: rgba(102,126,234,0.18);
    border-color: rgba(102,126,234,0.6);
    transform: scale(1.03);
}
.pricing-badge {
    position: absolute;
    top: -13px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.pricing-icon { font-size: 2.4rem; margin-bottom: 10px; }
.pricing-card h3 { font-size: 1.3rem; margin: 0 0 6px; }
.pricing-price { font-size: 2.4rem; font-weight: 800; margin: 10px 0 20px; }
.pricing-price span { font-size: 1rem; font-weight: 400; opacity: 0.65; }
.pricing-features {
    list-style: none;
    padding: 0; margin: 0 0 28px;
    text-align: left;
    width: 100%;
    font-size: 0.88rem;
    color: rgba(255,255,255,0.75);
}
.pricing-features li { padding: 5px 0; }
.pricing-cta { width: 100%; font-size: 0.95rem; padding: 14px 20px; margin-top: auto; }
.pricing-trial-note { color: rgba(255,255,255,0.45); font-size: 0.82rem; margin-top: 0; }

/* Sensory mode pricing */
body.sensory-mode .pricing-card { background: rgba(255,255,255,0.08); border-color: #4a5568; }
body.sensory-mode .pricing-card-featured { background: #3c366b; border-color: #667eea; }
body.sensory-mode .pricing-features { color: rgba(255,255,255,0.8); }

/* --- AUTH TABS (Login / Sign Up) --- */
.auth-tabs {
    display: flex;
    gap: 4px;
    background: #f0f4f8;
    border-radius: 12px;
    padding: 4px;
}
.auth-tab {
    border: none;
    background: transparent;
    padding: 7px 18px;
    border-radius: 9px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #718096;
    cursor: pointer;
    transition: 0.15s;
}
.auth-tab-active {
    background: white;
    color: #2d3748;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

/* Signup plan picker in modal */
.signup-plan-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
.signup-plan-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 6px;
    text-align: center;
    cursor: pointer;
    transition: 0.15s;
    background: #f7fafc;
}
.signup-plan-card:hover { border-color: #667eea; }
.signup-plan-selected { border-color: #667eea; background: #ebf4ff; }
.splan-name { font-size: 0.78rem; font-weight: 700; color: #2d3748; margin: 4px 0 2px; }
.splan-price { font-size: 0.72rem; color: #718096; }

/* --- APP & AUTH STYLES --- */
.container { max-width: 1100px; margin: 0 auto; padding: 20px; }
.card { 
    background: rgba(255, 255, 255, 0.96); padding: 30px; border-radius: var(--card-radius); 
    box-shadow: 0 15px 35px rgba(0,0,0,0.2); margin-bottom: 25px; position: relative; overflow: hidden; color: var(--text-dark);
}
.card::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 6px; background: var(--heartbeat-gradient); }

/* Auth Views */
.auth-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 12, 41, 0.85); backdrop-filter: blur(8px);
    z-index: 2000; align-items: center; justify-content: center; flex-direction: column;
}
.login-box { 
    width: 90%; max-width: 360px; background: white; padding: 40px 30px; 
    border-radius: var(--card-radius); box-shadow: 0 20px 40px rgba(0,0,0,0.4); color: var(--text-dark);
}

/* Inputs & Buttons */
.login-input { 
    width: 100%; padding: 14px; margin-bottom: 15px; border: 2px solid #e2e8f0; border-radius: 12px; 
    background: #f7fafc; font-size: 16px; box-sizing: border-box; transition: 0.2s; color: #333;
}
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.full-width { grid-column: 1 / -1; }
input, select, textarea { width: 100%; padding: 12px 15px; border: 2px solid #e2e8f0; border-radius: 12px; box-sizing: border-box; }

.btn { border: none; padding: 12px 24px; border-radius: 50px; font-weight: 700; cursor: pointer; color: white; transition: transform 0.1s; }
.btn:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-primary { background: var(--btn-primary); }
.btn-sleep { background: var(--btn-sleep); }
.btn-fitness { background: var(--btn-fitness); }
.btn-success { background: #28a745; }
.btn-secondary { background: #718096; }
.btn-google { background: #db4437; width: 100%; margin-top: 15px; }
.btn-danger { background: #e53e3e; }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-outline { border: 1px solid rgba(255,255,255,0.3); padding: 8px 18px; border-radius: 50px; background: transparent; color: white; }
.btn-outline:hover { background: rgba(255,255,255,0.1); }

/* --- LABELED SENSORY BUTTON --- */
.btn-sensory {
    background: transparent; 
    border: 1px solid rgba(255,255,255,0.3); 
    color: white;
    border-radius: 20px; 
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer; 
    transition: 0.2s;
    display: inline-flex; align-items: center; gap: 6px;
}
.btn-sensory:hover { background: rgba(255,255,255,0.1); }

/* Dark Version for inside White Cards/Headers */
.btn-sensory.dark { 
    color: #4a5568; 
    border-color: #cbd5e0;
}
.btn-sensory.dark:hover { background: #edf2f7; }

.cta-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white; padding: 18px 45px; border-radius: 50px; cursor: pointer;
    text-decoration: none; font-weight: 700; font-size: 1.1rem; border: none;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4); transition: 0.3s;
}

/* Utils */
.password-toggle { display: flex; align-items: center; font-size: 0.9rem; color: #4a5568; margin-bottom: 20px;}
.app-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; background: white; padding: 15px 25px; border-radius: 50px; box-shadow: 0 5px 15px rgba(0,0,0,0.15); }
.file-upload-wrapper { background: #ebf4ff; border: 2px dashed #4299e1; border-radius: 16px; padding: 20px; text-align: center; }
.gallery-thumb { width: 70px; height: 70px; object-fit: cover; border-radius: 12px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 15px; font-size: 0.9rem; }
th { text-align: left; padding: 15px; border-bottom: 2px solid #e2e8f0; cursor: pointer; }
td { padding: 15px; border-bottom: 1px solid #edf2f7; vertical-align: top; }
.severity-badge { padding: 4px 10px; border-radius: 20px; font-weight: 700; font-size: 0.75rem; color: white; }
.sev-1, .sev-2 { background: #48bb78; } .sev-3 { background: #ecc94b; color: #333; } .sev-4, .sev-5 { background: #f56565; }

/* Camera Modal */
.camera-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); z-index: 9999; flex-direction: column; align-items: center; justify-content: center; }
.camera-view { width: 90%; max-width: 600px; border-radius: 20px; border: 4px solid white; background: #000; }
.camera-controls { margin-top: 25px; display: flex; gap: 20px; }

/* --- COMMUNITY EDIT/DELETE STYLES --- */
.post-actions {
    font-size: 0.8rem;
    display: flex;
    gap: 10px;
}

.action-link {
    background: none;
    border: 2px solid;
    border-radius: 20px;
    cursor: pointer;
    padding: 4px 14px;
    font-weight: 700;
    font-size: 0.8rem;
    opacity: 1;
    transition: background 0.2s, color 0.2s;
}
.action-edit  { color: #b7791f; border-color: #b7791f; } /* Bold Amber */
.action-delete { color: #c53030; border-color: #c53030; } /* Bold Red */
.action-edit:hover  { background: #b7791f; color: white; }
.action-delete:hover { background: #c53030; color: white; }

/* Edit Mode Textarea */
.edit-textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #cbd5e0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 10px;
    box-sizing: border-box;
}

/* =============================================
   ACCOUNT TYPE SELECTION SCREEN
   ============================================= */
.at-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
}

.at-header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.at-header h2 {
    font-size: 1.8rem;
    margin: 15px 0 10px;
    font-weight: 800;
}

.at-header p {
    opacity: 0.75;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

.at-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    max-width: 780px;
    width: 100%;
}

.at-card {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, border-color 0.2s;
    color: white;
}

.at-card:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.3);
}

.at-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.at-card h3 {
    font-size: 1.3rem;
    margin: 0 0 6px;
    font-weight: 800;
}

.at-card p {
    font-size: 0.9rem;
    opacity: 0.75;
    flex: 1;
    margin-bottom: 20px;
    line-height: 1.5;
}

.at-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #23d5ab;
    margin-bottom: 10px;
}

.at-trial-note {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    margin-top: 24px;
    text-align: center;
}

body.sensory-mode .at-container {
    background: #e2e8f0;
}

body.sensory-mode .at-card {
    background: white;
    border-color: #cbd5e0;
    color: #2d3748;
}

body.sensory-mode .at-card:hover {
    background: #f7fafc;
    border-color: #a0aec0;
}

body.sensory-mode .at-header,
body.sensory-mode .at-header h2 {
    color: #2d3748;
}

body.sensory-mode .at-trial-note {
    color: #718096;
}

/* =============================================
   FAMILY MANAGEMENT PAGE
   ============================================= */

.family-member-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    flex-wrap: wrap;
}

.family-member-row:last-child { border-bottom: none; }

.fm-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.child-avatar { background: rgba(128,90,213,0.2); }
.adult-avatar { background: rgba(43,108,176,0.2); }

.fm-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.fm-name   { font-weight: 700; font-size: 1rem; color: #e2e8f0; }
.fm-meta   { font-size: 0.8rem; color: #718096; }

.fm-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    align-self: flex-start;
}

.child-badge { background: rgba(128,90,213,0.25); color: #b794f4; }
.adult-badge { background: rgba(43,108,176,0.25); color: #90cdf4; }

.fm-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* Access matrix */
.access-matrix-grid {
    display: grid;
    gap: 1px;
    margin-bottom: 1px;
}

.access-header-cell {
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(255,255,255,0.04);
}

.access-cell {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.02);
}

.access-cell:first-child {
    font-weight: 600;
    color: #e2e8f0;
    font-size: 0.95rem;
}

.access-toggle-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    gap: 6px;
}

.lookup-result-card {
    padding: 14px;
    background: rgba(72,187,120,0.08);
    border: 1px solid rgba(72,187,120,0.3);
    border-radius: 10px;
    margin-top: 12px;
    color: #e2e8f0;
}

/* Sensory mode overrides */
body.sensory-mode .family-member-row  { border-bottom-color: #e2e8f0; }
body.sensory-mode .fm-name            { color: #2d3748; }
body.sensory-mode .access-header-cell,
body.sensory-mode .access-cell        { background: #f7fafc; color: #2d3748; }
body.sensory-mode .access-cell:first-child { color: #2d3748; }
body.sensory-mode .lookup-result-card { background: #f0fff4; border-color: #68d391; color: #2d3748; }

/* =============================================
   FAMILY EXPLAINER SECTION
   ============================================= */

.family-explainer {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 20px;
    padding: 28px 32px;
    margin-bottom: 25px;
}

.family-explainer-header {
    margin-bottom: 24px;
}

.family-explainer-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e2e8f0;
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.family-explainer-intro {
    color: #a0aec0;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

.family-explainer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.family-explainer-block {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 18px 16px;
}

.feb-icon  { font-size: 1.5rem; margin-bottom: 8px; line-height: 1; }
.feb-label { font-size: 0.85rem; font-weight: 700; color: #e2e8f0; margin-bottom: 6px; }
.feb-desc  { font-size: 0.8rem; color: #718096; line-height: 1.5; }

/* Sensory mode overrides */
body.sensory-mode .family-explainer        { background: #f7fafc; border-color: #e2e8f0; }
body.sensory-mode .family-explainer-title  { color: #2d3748; }
body.sensory-mode .family-explainer-intro  { color: #718096; }
body.sensory-mode .family-explainer-block  { background: white; border-color: #e2e8f0; }
body.sensory-mode .feb-label               { color: #2d3748; }
body.sensory-mode .feb-desc                { color: #718096; }

/* =============================================
   SHARE CODES (dashboard)
   ============================================= */

.share-code-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    flex-wrap: wrap;
}

.share-code-row:last-child { border-bottom: none; }

.share-code-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.share-code-value {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: #23d5ab;
}

.share-code-meta {
    font-size: 0.8rem;
    color: #718096;
}

.share-code-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* =============================================
   SHARED VIEW PAGE
   ============================================= */

.shared-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.shared-stat-card {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
}

.stat-num {
    font-size: 2rem;
    font-weight: 900;
    color: #23d5ab;
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 0.78rem;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Sensory mode */
body.sensory-mode .share-code-row   { border-bottom-color: #e2e8f0; }
body.sensory-mode .share-code-value { color: #276749; }
body.sensory-mode .shared-stat-card { background: white; border-color: #e2e8f0; }
body.sensory-mode .stat-num         { color: #276749; }
body.sensory-mode .stat-label       { color: #718096; }

/* =============================================
   ACCOUNT SELECTOR (context picker)
   ============================================= */

.ctx-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.ctx-card {
    background: rgba(255,255,255,0.06);
    border: 2px solid rgba(255,255,255,0.12);
    border-radius: 18px;
    padding: 28px 20px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s, transform 0.18s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.ctx-card:hover {
    border-color: #667eea;
    background: rgba(102,126,234,0.12);
    transform: translateY(-3px);
}
.ctx-icon  { font-size: 2.4rem; }
.ctx-label { font-size: 1.05rem; font-weight: 700; color: #e2e8f0; }
.ctx-sub   { font-size: 0.82rem; color: #a0aec0; }

body.sensory-mode .ctx-card        { background: white; border-color: #e2e8f0; }
body.sensory-mode .ctx-card:hover  { border-color: #667eea; background: #f0f4ff; }
body.sensory-mode .ctx-label       { color: #2d3748; }
body.sensory-mode .ctx-sub         { color: #718096; }

/* =============================================
   WELLNESS GROUP
   ============================================= */

.wg-code-chip {
    display: inline-block;
    font-family: monospace;
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    color: #f6ad55;
    background: rgba(246,173,85,0.12);
    border: 1px solid rgba(246,173,85,0.35);
    border-radius: 8px;
    padding: 2px 12px;
}

/* Sensory mode */
body.sensory-mode .wg-code-chip { color: #c05621; background: #fff3cd; border-color: #f6ad55; }

/* =============================================
   PARENT NOTES (family.html)
   ============================================= */

.parent-note-row {
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
}
.parent-note-row:last-child { border-bottom: none; }

.parent-note-meta {
    font-size: 0.75rem;
    color: #a0aec0;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.parent-note-content {
    font-size: 0.92rem;
    color: #e2e8f0;
    line-height: 1.55;
    white-space: pre-wrap;
    padding-right: 60px;
}

.parent-note-delete {
    position: absolute;
    right: 0;
    top: 10px;
    font-size: 0.75rem;
    padding: 3px 10px;
}

/* Sensory mode */
body.sensory-mode .parent-note-row     { border-bottom-color: #e2e8f0; }
body.sensory-mode .parent-note-meta    { color: #718096; }
body.sensory-mode .parent-note-content { color: #2d3748; }