/* ═══════════════════════════════════════════════════════════════
   JOURNAL.CSS — Breathtaking Premium Reflection Workspace
   ═══════════════════════════════════════════════════════════════ */

/* ─── Ambient Background ─── */
.journal-ambient {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.j-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.15;
}
.j-orb-1 {
    width: 750px;
    height: 750px;
    top: -200px;
    left: -150px;
    background: radial-gradient(circle, var(--accent-blue), transparent 70%);
    animation: orbFloat1 22s ease-in-out infinite;
}
.j-orb-2 {
    width: 650px;
    height: 650px;
    bottom: -150px;
    right: -100px;
    background: radial-gradient(circle, var(--accent-purple), transparent 70%);
    animation: orbFloat2 26s ease-in-out infinite;
}
@keyframes orbFloat1 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(80px, -60px); } }
@keyframes orbFloat2 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-60px, 70px); } }
#journal-particles { position: absolute; width: 100%; height: 100%; }

/* ─── Top Prompt Banner ─── */
.prompt-banner-panel {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(21, 128, 61, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), inset 0 0 30px rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    padding: 2rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
}
.prompt-banner-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple), var(--accent-cyan));
}
.prompt-banner-left {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}
.prompt-icon-wrap {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--accent-gold);
    flex-shrink: 0;
    box-shadow: 0 10px 25px rgba(251, 191, 36, 0.2);
    animation: promptSparkle 4s ease-in-out infinite;
}
@keyframes promptSparkle { 0%, 100% { transform: scale(1) rotate(0deg); } 50% { transform: scale(1.15) rotate(12deg); } }
.prompt-meta {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.prompt-question {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 1.6rem;
    color: var(--text-main);
    line-height: 1.4;
    font-weight: 400;
}
.prompt-banner-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}
.action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 0.8rem 1.4rem;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}
.new-entry-btn {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: #fff;
    border: none;
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.3);
}
.new-entry-btn:hover {
    background: linear-gradient(135deg, #4ade80, #166534);
    box-shadow: 0 15px 35px rgba(34, 197, 94, 0.4);
}

/* ─── Main Workspace Grid ─── */
.journal-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2.5rem;
    align-items: start;
}

/* ─── Left: Main Editor Panel ─── */
.editor-panel {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4), inset 0 0 40px rgba(255, 255, 255, 0.02);
    border-radius: 24px;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.editor-header {
    padding: 2rem 2.5rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.2);
}
.editor-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.entry-title-input {
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--text-main);
    flex: 1;
    min-width: 250px;
}
.entry-title-input::placeholder { color: rgba(255, 255, 255, 0.2); }

.editor-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
/* Mood Picker */
.mood-picker { position: relative; }
.current-mood {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}
.mood-growth   { background: rgba(34, 197, 94, 0.15); color: #4ade80; border-color: rgba(34, 197, 94, 0.3); }
.mood-clarity  { background: rgba(34, 197, 94, 0.15); color: #4ade80; border-color: rgba(34, 197, 94, 0.3); }
.mood-struggle { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border-color: rgba(245, 158, 11, 0.3); }
.mood-neutral  { background: rgba(148, 163, 184, 0.15); color: #94a3b8; border-color: rgba(148, 163, 184, 0.3); }

.mood-options-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 0.5rem;
    min-width: 160px;
    display: none;
    flex-direction: column;
    gap: 0.3rem;
    backdrop-filter: blur(25px);
    z-index: 100;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6);
}
.mood-picker:hover .mood-options-dropdown { display: flex; }
.mood-opt {
    padding: 0.6rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}
.mood-opt:hover { background: rgba(255, 255, 255, 0.08); transform: translateX(3px); }

.icon-action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    width: 42px; height: 42px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 1.1rem; transition: all 0.3s;
}
.icon-action-btn:hover { background: rgba(255, 255, 255, 0.12); color: #fff; transform: translateY(-2px); }

.save-entry-btn {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #93c5fd;
    padding: 0.6rem 1.4rem;
    border-radius: 12px;
    font-family: var(--font-body); font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: all 0.3s;
    display: flex; align-items: center; gap: 0.5rem;
}
.save-entry-btn:hover {
    background: rgba(34, 197, 94, 0.35);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(34, 197, 94, 0.3);
}

/* Format Bar */
.editor-format-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.format-group { display: flex; align-items: center; gap: 0.4rem; }
.fmt-btn {
    background: none; border: none; color: var(--text-muted);
    padding: 0.4rem 0.6rem; border-radius: 8px; cursor: pointer;
    font-size: 1.05rem; transition: all 0.2s;
}
.fmt-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.fmt-divider { width: 1px; height: 1.4rem; background: rgba(255, 255, 255, 0.1); margin: 0 0.4rem; }

.editor-stats { display: flex; align-items: center; gap: 0.8rem; font-size: 0.85rem; color: var(--text-muted); }
.stats-dot { color: rgba(255, 255, 255, 0.2); }

/* Editor Body */
.editor-body-container {
    padding: 3rem 2.5rem;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}
.rich-text-editor {
    flex: 1;
    font-family: 'Lora', serif;
    font-size: 1.25rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.92);
    outline: none;
    white-space: pre-wrap;
    caret-color: var(--accent-blue);
}
.rich-text-editor:empty::before {
    content: attr(data-placeholder);
    color: rgba(255, 255, 255, 0.22);
    pointer-events: none;
    font-style: italic;
}
.rich-text-editor h3 { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 300; margin: 2rem 0 1rem; color: #fff; }
.rich-text-editor blockquote {
    border-left: 3px solid var(--accent-blue); margin: 1.8rem 0; padding-left: 1.8rem;
    color: rgba(255, 255, 255, 0.65); font-style: italic;
}

/* Editor Footer */
.editor-footer {
    padding: 1.5rem 2.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.tags-container { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.journal-tag {
    background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted); padding: 0.4rem 0.8rem; border-radius: 100px;
    font-size: 0.8rem; font-weight: 500; transition: all 0.2s;
}
.journal-tag:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.add-tag-btn {
    background: transparent; border: 1px dashed rgba(255, 255, 255, 0.2);
    color: var(--text-muted); padding: 0.4rem 0.8rem; border-radius: 100px;
    font-size: 0.8rem; font-weight: 500; cursor: pointer; transition: all 0.2s;
    display: flex; align-items: center; gap: 0.3rem;
}
.add-tag-btn:hover { border-color: rgba(255, 255, 255, 0.4); color: #fff; background: rgba(255, 255, 255, 0.05); }

.last-saved-time { font-size: 0.8rem; color: rgba(255, 255, 255, 0.25); }

/* ─── Right: Insights & History Sidebar ─── */
.journal-side-panels {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.side-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3), inset 0 0 30px rgba(255, 255, 255, 0.02);
    border-radius: 24px;
    padding: 2rem;
    transition: all 0.3s ease;
}
.side-card:hover { border-color: rgba(255, 255, 255, 0.15); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4); }

.side-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.side-card-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    font-weight: 600;
    display: flex; align-items: center; gap: 0.5rem;
}
.side-card-subtitle { font-size: 0.8rem; color: rgba(255, 255, 255, 0.3); }
.side-card-badge {
    background: rgba(22, 101, 52, 0.15); border: 1px solid rgba(22, 101, 52, 0.3);
    color: #c084fc; font-size: 0.7rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 100px;
}

/* Mood Orb Container */
.mood-orb-container {
    display: flex; align-items: center; justify-content: center;
    margin: 1rem 0 2rem;
}
.mood-orb {
    width: 110px; height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(16, 185, 129, 0.25), rgba(16, 185, 129, 0.05));
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.2), inset 0 0 25px rgba(16, 185, 129, 0.1);
    display: flex; align-items: center; justify-content: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.orb-liquid-wave {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}
.liquid-wave-svg {
    width: 200%;
    height: 100%;
    position: absolute;
    bottom: -35px;
    left: 0;
    transition: bottom 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.liquid-wave-svg path {
    animation: liquidWaveScroll 5s linear infinite;
    transform-origin: center;
}
.liquid-wave-svg path:nth-child(2) {
    animation: liquidWaveScrollReverse 7s linear infinite;
}
.orb-content { 
    position: relative; 
    z-index: 2; 
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.orb-emoji { font-size: 2.2rem; line-height: 1; margin-bottom: 0.2rem; }
.orb-label { font-size: 0.8rem; font-weight: 600; color: #4ade80; transition: color 0.4s; }

/* Energy Metrics */
.energy-metrics { display: flex; flex-direction: column; gap: 1rem; }
.metric-row { display: flex; flex-direction: column; gap: 0.4rem; }
.metric-label { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.metric-val { color: #fff; font-weight: 600; }
.metric-bar-bg { height: 6px; background: rgba(255, 255, 255, 0.06); border-radius: 100px; overflow: hidden; }
.metric-bar-fill { height: 100%; border-radius: 100px; transition: width 1.5s cubic-bezier(0.2, 0.8, 0.2, 1); }

/* AI Insight Box */
.ai-insight-box { display: flex; flex-direction: column; gap: 1.5rem; }
#ai-insight-text { font-size: 0.95rem; color: rgba(255, 255, 255, 0.8); line-height: 1.7; }
#ai-insight-text strong { color: #c084fc; font-weight: 600; }

.ai-actions { display: flex; gap: 0.8rem; }
.ai-action-btn {
    flex: 1; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted); padding: 0.7rem 0.5rem; border-radius: 12px;
    font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; cursor: pointer;
    transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 0.4rem;
}
.ai-action-btn:hover { background: rgba(22, 101, 52, 0.15); border-color: rgba(22, 101, 52, 0.3); color: #c084fc; transform: translateY(-2px); }

/* ─── 3D Card Flipping past reflections ─── */
.history-list { display: flex; flex-direction: column; gap: 0.8rem; }
.history-card {
    perspective: 1000px;
    height: 135px;
    margin-bottom: 0.2rem;
    position: relative;
}
.history-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}
.history-card:hover .history-card-inner,
.history-card.flipped .history-card-inner {
    transform: rotateY(180deg);
}
.history-card-front, .history-card-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: 16px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}
.history-card-front {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    z-index: 2;
    transform: rotateY(0deg);
    transition: all 0.3s;
}
.history-card-front:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}
.history-card.active .history-card-front {
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.3);
}
.history-card-back {
    background: rgba(10, 15, 30, 0.95);
    border: 1px solid rgba(16, 185, 129, 0.3);
    transform: rotateY(180deg);
    z-index: 1;
    backdrop-filter: blur(15px);
    cursor: pointer;
}
.history-back-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 0.4rem;
}
.back-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
}
.back-metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin: 0.5rem 0;
}
.back-metric {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.75);
}
.back-metric i {
    color: #10B981;
}
.back-action-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 0.4rem;
}

.history-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; }
.history-title { font-size: 0.95rem; font-weight: 600; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.history-mood { font-size: 0.7rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 100px; }
.history-date { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.6rem; }
.history-preview { font-size: 0.85rem; color: rgba(255, 255, 255, 0.5); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Prompt Chips List */
.prompt-chips-list { display: flex; flex-direction: column; gap: 0.6rem; }
.prompt-chip {
    background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px; padding: 0.8rem 1rem; font-size: 0.85rem; color: rgba(255, 255, 255, 0.7);
    cursor: pointer; transition: all 0.2s; line-height: 1.4;
}
.prompt-chip:hover {
    background: rgba(16, 185, 129, 0.08); border-color: rgba(16, 185, 129, 0.3);
    color: #67e8f9; transform: translateX(4px);
}

/* ─── Focus Mode Overlay ─── */
.focus-mode-overlay {
    position: fixed; inset: 0; z-index: 2000;
    background: #05070f;
    display: none; flex-direction: column; align-items: center; justify-content: center;
    padding: 4rem; backdrop-filter: blur(30px);
}
.focus-mode-overlay.active { display: flex; }
.focus-overlay-container { width: 100%; max-width: 800px; display: flex; flex-direction: column; align-items: center; }
.focus-prompt-header {
    font-family: 'Lora', serif; font-style: italic; font-size: 1.4rem; color: rgba(255, 255, 255, 0.4);
    margin-bottom: 3rem; text-align: center; line-height: 1.5;
}
.focus-editor-area {
    width: 100%; min-height: 400px; font-family: 'Lora', serif; font-size: 1.4rem; line-height: 2;
    color: rgba(255, 255, 255, 0.95); outline: none; caret-color: var(--accent-blue); text-align: center;
}
.focus-overlay-footer { position: fixed; bottom: 3rem; display: flex; align-items: center; gap: 3rem; }
.focus-stats { color: rgba(255, 255, 255, 0.3); font-size: 0.95rem; }
.exit-focus-btn {
    background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.6); padding: 0.7rem 1.6rem; border-radius: 100px; font-size: 0.95rem; font-weight: 600;
    cursor: pointer; transition: all 0.3s; display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-body);
}
.exit-focus-btn:hover { background: rgba(255, 255, 255, 0.15); color: #fff; transform: translateY(-2px); }

/* ─── Save Toast Notification ─── */
.j-save-toast {
    position: fixed; bottom: 2.5rem; right: 2.5rem; z-index: 5000;
    background: rgba(34, 197, 94, 0.18); border: 1px solid rgba(34, 197, 94, 0.35);
    color: #4ade80; padding: 0.8rem 1.6rem; border-radius: 100px; font-size: 0.9rem; font-weight: 600;
    backdrop-filter: blur(25px); display: flex; align-items: center; gap: 0.6rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    transform: translateY(100px); opacity: 0; pointer-events: none; transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.j-save-toast.show { transform: translateY(0); opacity: 1; }

/* ─── Responsive Adjustments ─── */
@media (max-width: 1200px) {
    .journal-grid { grid-template-columns: 1fr 340px; gap: 2rem; }
}
@media (max-width: 1024px) {
    .journal-grid { grid-template-columns: 1fr; }
    .prompt-banner-panel { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
    .prompt-banner-right { align-self: flex-end; }
}

/* ─── Entrance Animation ─── */
.js-reveal { opacity: 0; transform: translateY(30px); }

/* ─── Liquid Wave Scrolling Animations ─── */
@keyframes liquidWaveScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
@keyframes liquidWaveScrollReverse {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* ─── Cognitive Reframing Progress Indicator ─── */
.reframe-steps-indicator {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.rf-step {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.rf-step.active {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: #4ade80;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.25);
}
.rf-step.completed {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
    color: #10B981;
}
.rf-step-line {
    width: 15px;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.distortion-card.selected {
    border-color: rgba(16, 185, 129, 0.55) !important;
    background: rgba(16, 185, 129, 0.12) !important;
    box-shadow: 0 18px 34px rgba(16, 185, 129, 0.14);
}

@media (max-width: 760px) {
    .prompt-banner-panel {
        padding: 1rem;
        border-radius: 16px;
        margin-bottom: 1rem;
    }

    #prompt-view-container {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1rem !important;
    }

    .prompt-banner-left {
        gap: 0.85rem !important;
    }

    .prompt-icon-wrap {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        font-size: 1.35rem;
    }

    .prompt-meta {
        font-size: 0.68rem;
        line-height: 1.4;
    }

    .prompt-question {
        font-size: 1.08rem;
        line-height: 1.45;
    }

    .prompt-banner-right,
    .reframe-btn-row,
    .ai-actions,
    .editor-actions,
    .editor-stats {
        width: 100% !important;
        flex-wrap: wrap !important;
        justify-content: stretch !important;
        align-self: stretch !important;
    }

    .prompt-banner-right .action-btn,
    .reframe-btn-row .action-btn,
    .ai-action-btn,
    .save-entry-btn,
    .current-mood {
        flex: 1 1 100%;
        justify-content: center;
        min-width: 0;
    }

    .reframe-wizard-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem;
    }

    .reframe-steps-indicator {
        width: 100%;
        overflow-x: auto;
        gap: 0.35rem !important;
        padding-bottom: 0.2rem;
    }

    .rf-step {
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .distortion-grid {
        grid-template-columns: 1fr !important;
    }

    .reframe-summary-box > div {
        grid-template-columns: 1fr !important;
    }

    .sum-arrow {
        transform: rotate(90deg);
        justify-self: center;
    }

    .journal-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .editor-header,
    .editor-body-container,
    .editor-footer,
    .side-card {
        padding: 1rem;
    }

    .editor-title-row,
    .editor-format-bar,
    .editor-footer,
    .side-card-header {
        align-items: stretch;
        flex-direction: column;
    }

    .entry-title-input {
        min-width: 0;
        width: 100%;
        font-size: 1.35rem;
    }

    .format-group {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.15rem;
    }

    .rich-text-editor {
        min-height: 280px;
        font-size: 1.05rem;
        line-height: 1.75;
    }

    .history-card {
        height: 150px;
    }

    .history-title {
        max-width: 165px;
    }

    .focus-mode-overlay {
        padding: 1.25rem;
        justify-content: flex-start;
        overflow-y: auto;
    }

    .focus-prompt-header {
        font-size: 1rem;
        margin: 2rem 0 1.5rem;
    }

    .focus-editor-area {
        min-height: 320px;
        font-size: 1.05rem;
        line-height: 1.7;
        text-align: left;
    }

    .focus-overlay-footer {
        position: static;
        margin-top: 1.25rem;
        gap: 1rem;
        flex-direction: column;
    }
}

@media (max-width: 420px) {
    .prompt-banner-panel,
    .editor-panel,
    .side-card {
        border-radius: 14px;
    }

    .history-item-header {
        align-items: flex-start;
        gap: 0.5rem;
    }

    .history-title {
        white-space: normal;
        max-width: 100%;
    }
}

/* ─── Dropdown Mood Waves ─── */
.dropdown-wave-bg {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}
.dropdown-wave-svg {
    width: 200%;
    height: 100%;
    position: absolute;
    bottom: -20px;
    left: 0;
}
.dropdown-wave-svg path {
    animation: liquidWaveScroll 7s linear infinite;
    transition: fill 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.dropdown-wave-svg path:nth-child(2) {
    animation: liquidWaveScrollReverse 9s linear infinite;
}
