/* ============================================================================
   self-care-jar.css  —  🕯️ The Self-Care Jar engine styling (.scj-*)
   A cozy evening scene: warm fairy lights, a glass mason jar of folded pastel
   notes, and one note that floats up and unfolds. Self-contained; reads on any
   site theme. The calm opposite of a spinning wheel.
   ============================================================================ */
.scj-stage {
    position: relative; border-radius: 20px; overflow: hidden; height: 430px;
    background: linear-gradient(180deg, #3b2a4d 0%, #5b4368 26%, #8a6a86 52%, #d9b3ba 78%, #f4e3d6 100%);
    box-shadow: 0 22px 55px -20px rgba(120, 80, 140, .5);
}

/* ── warm fairy lights strung across the top ── */
.scj-lights { position: absolute; left: 0; right: 0; top: 0; height: 120px; pointer-events: none; }
.scj-lights svg { width: 100%; height: 100%; display: block; }
.scj-bulb { transform-box: fill-box; transform-origin: center; animation: scjTwinkle 4s ease-in-out infinite; }
.scj-bulb:nth-of-type(2n) { animation-delay: -1.3s; }
.scj-bulb:nth-of-type(3n) { animation-delay: -2.4s; }
@keyframes scjTwinkle { 0%, 100% { opacity: .78; } 50% { opacity: 1; } }

/* ── the jar ── */
.scj-jar { position: absolute; left: 50%; bottom: 30px; width: 228px; height: 316px; transform: translateX(-50%); }
.scj-jar svg { width: 100%; height: 100%; overflow: visible; }
.scj-jarglow {
    position: absolute; left: 50%; bottom: 72px; width: 320px; height: 300px; transform: translateX(-50%);
    border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, rgba(255, 233, 194, .55) 0%, rgba(255, 210, 138, .22) 52%, transparent 70%);
    animation: scjJarGlow 6s ease-in-out infinite;
}
@keyframes scjJarGlow { 0%, 100% { opacity: .82; } 50% { opacity: 1; } }
.scj-shelf { position: absolute; left: 0; right: 0; bottom: 0; height: 42px; background: linear-gradient(180deg, #b98d7f, #a67c72); }
.scj-shelf::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: rgba(255, 235, 220, .35); }

/* a livelier shake — the jar rocks on its base and the notes rattle, decaying to rest */
.scj-stage.scj-shaking .scj-jar { animation: scjShake .72s cubic-bezier(.36, .07, .19, .97) both; transform-origin: 50% 82%; }
@keyframes scjShake {
    0%   { transform: translateX(-50%) rotate(0); }
    10%  { transform: translateX(-52.6%) rotate(-4.4deg); }
    23%  { transform: translateX(-47.6%) rotate(4deg); }
    37%  { transform: translateX(-51.6%) rotate(-3.2deg); }
    51%  { transform: translateX(-48.6%) rotate(2.8deg); }
    65%  { transform: translateX(-50.7%) rotate(-1.9deg); }
    79%  { transform: translateX(-49.5%) rotate(1.3deg); }
    100% { transform: translateX(-50%) rotate(0); }
}
/* one note in the pile lifts above the others — "this one is chosen" (pure translate → safe on an SVG <g> with no transform attribute) */
.scj-picknote { transition: transform .5s cubic-bezier(.2, .85, .3, 1), filter .4s ease; }
.scj-stage.scj-lifting .scj-picknote, .scj-stage.scj-revealed .scj-picknote { transform: translateY(-34px); filter: drop-shadow(0 7px 9px rgba(110, 60, 100, .45)) brightness(1.08); }

/* ── cue chip ── */
.scj-cue {
    position: absolute; top: 96px; left: 50%; transform: translateX(-50%); z-index: 4;
    font-size: 12px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; color: #4a2f52;
    background: rgba(255, 246, 224, .66); padding: 5px 16px; border-radius: 20px; transition: opacity .3s ease;
}
.scj-cue.scj-held { background: rgba(255, 246, 224, .9); color: #3a1f42; }
.scj-stage.scj-revealed .scj-cue { opacity: 0; }

/* ── the floating, unfolding note ── */
.scj-note {
    position: absolute; left: 50%; top: 20%; z-index: 5; width: 272px;
    transform: translate(-50%, 96px) scale(.32); opacity: 0; transform-origin: center bottom;
    transition: transform .62s cubic-bezier(.2, .7, .3, 1), opacity .5s ease;
}
.scj-note.scj-rising { opacity: 1; transform: translate(-50%, 22px) scale(.46); }
.scj-note.scj-open  { opacity: 1; transform: translate(-50%, 0) scale(1); transition: transform .6s cubic-bezier(.34, 1.3, .5, 1), opacity .4s ease; }
.scj-note-inner {
    position: relative; border-radius: 12px; padding: 20px 22px 18px; text-align: center;
    background: linear-gradient(180deg, #fffaf3, #fdeede); border: 1.5px solid #f0dcc6;
    box-shadow: 0 18px 34px -14px rgba(70, 35, 60, .5);
}
/* fold creases — visible while folded/rising, fade out as it opens */
.scj-note-inner::before, .scj-note-inner::after {
    content: ''; position: absolute; left: 10px; right: 10px; height: 0;
    border-top: 1.5px dashed #e7d3bd; opacity: .0; transition: opacity .4s ease;
}
.scj-note-inner::before { top: 33%; } .scj-note-inner::after { top: 66%; }
.scj-note.scj-rising .scj-note-inner::before, .scj-note.scj-rising .scj-note-inner::after { opacity: .85; }
/* once unfolded, the note smooths flat — creases relax away so they don't cross the text */
.scj-note.scj-open .scj-note-inner::before, .scj-note.scj-open .scj-note-inner::after { opacity: 0; }
/* content fades in only when the note has opened */
.scj-note .scj-note-kicker, .scj-note .scj-note-name, .scj-note .scj-note-aff, .scj-note .scj-note-time { opacity: 0; transition: opacity .45s ease .12s; }
.scj-note.scj-open .scj-note-kicker, .scj-note.scj-open .scj-note-name, .scj-note.scj-open .scj-note-aff, .scj-note.scj-open .scj-note-time { opacity: 1; }
.scj-note-kicker { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: 2.4px; text-transform: uppercase; color: #9c4f88; }
.scj-note-name { display: block; margin-top: 8px; font-family: Georgia, 'Times New Roman', serif; font-size: 27px; font-weight: 700; line-height: 1.12; color: #3a2440; }
.scj-note-aff { display: block; margin-top: 9px; font-family: Georgia, serif; font-style: italic; font-size: 15.5px; line-height: 1.4; color: #7a5570; }
.scj-note-time { display: block; margin-top: 11px; font-size: 12.5px; color: #a98bb0; }

/* rising sparkles (decorative) */
.scj-sparkle { position: absolute; z-index: 3; width: 6px; height: 6px; border-radius: 50%; background: #fff2c8; opacity: 0; }
.scj-stage.scj-revealed .scj-sparkle { animation: scjSpark 1.5s ease-out; }
.scj-sparkle.s1 { left: 34%; top: 44%; animation-delay: .05s; }
.scj-sparkle.s2 { left: 63%; top: 40%; animation-delay: .2s; }
.scj-sparkle.s3 { left: 45%; top: 34%; animation-delay: .12s; }
.scj-sparkle.s4 { left: 58%; top: 50%; animation-delay: .28s; }
@keyframes scjSpark { 0% { opacity: 0; transform: translateY(6px) scale(.4); } 40% { opacity: .95; } 100% { opacity: 0; transform: translateY(-26px) scale(1); } }

/* ── pick button + time knob + effects ── */
.scj-pickbtn-wrap { text-align: center; }
.scj-pickbtn-main {
    display: inline-flex; align-items: center; gap: 8px; margin: 16px auto 0; font-size: 15px; font-weight: 800; color: #fff;
    padding: 12px 32px; border-radius: 24px; border: 0; cursor: pointer; letter-spacing: .4px;
    background: linear-gradient(135deg, var(--scj-grad-a, #b79bdd), var(--scj-grad-b, #e0a0b4)); box-shadow: 0 8px 22px -6px rgba(150, 110, 180, .6);
}
.scj-time-row { margin-top: 16px; }
.scj-time-row label { font-size: 13px; font-weight: 600; color: var(--theme-text, #1a1a2e); display: flex; align-items: center; gap: 8px; }
.scj-time-row .scj-time-val { color: var(--scj-accent, #8e5aa8); font-weight: 800; }
.scj-time-row input[type=range] { width: 100%; margin-top: 8px; accent-color: var(--scj-accent, #8e5aa8); }
.scj-effects { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: 13px; color: var(--theme-text, #1a1a2e); }
.scj-effects label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.scj-items-ta { width: 100%; min-height: 220px; font-family: monospace; font-size: .9rem; border-radius: 10px; border: 1px solid var(--theme-border, #d7dbe0); background: var(--theme-bg, #fff); color: var(--theme-text, #1a1a2e); padding: 10px 12px; resize: vertical; }

.page-scj-scope {
    --wsp-result-accent: #8e5aa8;
    --wsp-result-grad: linear-gradient(135deg, #b79bdd, #e0a0b4);
    --wsp-result-plate: rgba(142, 90, 168, .10);
}

@media (max-width: 575.98px) {
    .scj-stage { height: 380px; }
    .scj-jar { width: 188px; height: 262px; bottom: 24px; }
    .scj-note { width: 240px; }
    .scj-note-name { font-size: 23px; }
}

/* ── SEO content (.scj-content) — type scale from .content-guide; colour only ── */
.scj-content { color: var(--theme-text, #1a1a2e); background: var(--theme-bg, #fff); padding: 3.25rem 0 3.5rem; margin-top: 1rem; border-top: 1px solid var(--theme-border, #e9ecef); }
.scj-inner { max-width: 860px; margin: 0 auto; padding: 0 1rem; }
.scj-content h2, .scj-content h3 { color: var(--theme-text, #1a1a2e); }
.scj-content p, .scj-content li { color: var(--theme-muted, #5b6470); }
.scj-content strong { color: var(--theme-text, #1a1a2e); }
.scj-content a { color: #8e5aa8; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.scj-kicker { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #fff; background: linear-gradient(135deg, #b79bdd, #e0a0b4); border-radius: 999px; padding: .3rem .85rem; margin-bottom: .95rem; }
.scj-content .scj-lead { font-size: 1.2rem; line-height: 1.7; color: var(--theme-text, #1a1a2e); margin-bottom: 1.25rem; }
.scj-section { margin-top: 2.9rem; }
.scj-content .table { font-size: 1rem; }
.scj-content .table thead th { text-transform: uppercase; letter-spacing: .05em; font-size: .74rem; font-weight: 800; color: #fff; background: #8e5aa8; padding: .7rem 1rem; }
.scj-content .table tbody td { padding: .6rem 1rem; border-bottom: 1px solid var(--theme-border, #e9ecef); vertical-align: top; }
.scj-content .table tbody td:first-child { font-weight: 700; color: var(--theme-text, #1a1a2e); white-space: nowrap; }
.scj-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; }
.scj-pair-card { background: var(--theme-surface, #f8f9fa); border: 1px solid var(--theme-border, #e9ecef); border-radius: 12px; padding: 1rem 1.1rem; border-top: 3px solid #b79bdd; }
.scj-pair-card h3 { margin-top: 0 !important; font-size: 1.02rem !important; } .scj-pair-card p:last-child { margin-bottom: 0; font-size: .92rem; }
.scj-faq { margin-top: 1.4rem; }
.scj-faq .accordion-item { background: transparent; border: 0; border-bottom: 1px solid var(--theme-border, #e9ecef); }
.scj-faq .accordion-button { background: transparent; color: var(--theme-text, #1a1a2e); font-weight: 600; padding-left: 0; padding-right: 2.5rem; box-shadow: none; }
.scj-faq .accordion-button:not(.collapsed) { color: #8e5aa8; background: transparent; }
.scj-faq .accordion-button:focus { box-shadow: none; }
.scj-faq .accordion-body { padding-left: 0; color: var(--theme-muted, #5b6470); }
@media (max-width: 767.98px) { .scj-pair { grid-template-columns: 1fr; } }
body[data-theme="high-contrast"] .scj-content p, body[data-theme="high-contrast"] .scj-content li, body[data-theme="high-contrast"] .scj-content .scj-lead { color: rgba(255,255,255,.84); }
body[data-theme="high-contrast"] .scj-content h2, body[data-theme="high-contrast"] .scj-content h3 { color: #fff; }
