  /* =======================================================================
     JOURNALS — daily journal entries + mood/cortisol/habit tracking.
     Reuses the .tc-* button/empty/chip primitives; jr-* for layout specifics.
     ======================================================================= */
  .journal-panel{
    grid-column:1;grid-row:3;
    display:none;flex-direction:column;min-height:0;overflow:hidden;
  }
  .journal-panel.visible{display:flex;}

  .prod-journal-divider{display:none;}
  .prod-panel .prod-journal-divider{
    display:flex;align-items:center;gap:16px;margin:12px 0 2px;
    color:var(--text);font-size:12px;font-weight:800;
    letter-spacing:1.8px;text-transform:uppercase;
  }
  .prod-panel .prod-journal-divider span{
    height:2px;flex:1;background:linear-gradient(90deg,transparent,var(--line-bright),transparent);
  }
  .prod-panel .prod-journal-divider strong{
    padding:8px 14px;border:1px solid var(--line-bright);
    background:rgba(var(--text-rgb),.055);font:inherit;color:inherit;
  }
  .prod-panel .journal-panel.prod-journal-section{
    grid-column:auto;grid-row:auto;display:flex;
    min-height:auto;overflow:visible;background:transparent;
  }
  .prod-panel .prod-journal-section .jr-subnav{
    background:var(--card);border:1px solid var(--line);
    border-radius:var(--r-lg);margin-bottom:12px;
  }
  .prod-panel .prod-journal-section .jr-scroll{
    flex:0 0 auto;min-height:auto;overflow:visible;padding:0 0 12px;
  }

  .jr-subnav{
    flex:0 0 auto;display:flex;align-items:center;gap:10px;
    padding:14px 24px 12px;flex-wrap:wrap;
    border-bottom:1px solid var(--line-soft);
    background:linear-gradient(180deg,rgba(var(--bg-rgb),.6),rgba(var(--bg-rgb),0));
  }
  .jr-title{
    font-size:var(--fs-page-title);font-weight:800;color:var(--text);
    margin:0;letter-spacing:.2px;display:flex;align-items:center;gap:9px;
  }
  .jr-title .jr-logo{
    width:30px;height:30px;border-radius:9px;flex:0 0 auto;
    background:var(--accent);
    display:flex;align-items:center;justify-content:center;color:#fff;
    box-shadow:var(--glow-accent);
  }
  .jr-title .jr-logo svg{width:17px;height:17px;}
  .jr-subnav-spacer{flex:1;}
  /* thin separator between the habit actions and the journal-entry actions */
  .jr-subnav-div{width:1px;align-self:stretch;margin:2px 4px;background:var(--line);flex:0 0 auto;}
  .jr-scroll{flex:1;min-height:0;overflow-y:auto;padding:22px 24px 48px;}
  .jr-view{display:none;flex-direction:column;gap:16px;}
  .jr-view.visible{display:flex;}

  /* ---- Entry list ---- */
  .jr-cards{display:flex;flex-direction:column;gap:11px;}
  .jr-card{
    background:linear-gradient(160deg,var(--card),var(--card-2));border:1px solid var(--line);
    border-radius:14px;padding:14px 16px;display:flex;align-items:flex-start;gap:14px;
    cursor:pointer;transition:border-color .15s,transform .1s;
  }
  .jr-card:hover{border-color:var(--line-bright);transform:translateY(-1px);box-shadow:var(--sh-2);}
  .jr-card-date{
    flex:0 0 auto;text-align:center;width:54px;
    display:flex;flex-direction:column;align-items:center;justify-content:center;
    background:var(--bg);border:1px solid var(--line);border-radius:11px;padding:8px 4px;
  }
  .jr-card-day{font-size:20px;font-weight:800;color:var(--text);line-height:1;font-variant-numeric:tabular-nums;}
  .jr-card-mon{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:var(--accent2-soft);margin-top:3px;}
  .jr-card-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:7px;}
  .jr-card-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
  .jr-card-title{font-size:var(--fs-content);font-weight:700;color:var(--text);}
  .jr-card-snip{font-size:13px;color:var(--muted);line-height:1.5;overflow:hidden;
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;}
  .jr-card-meta{display:flex;align-items:center;gap:6px;flex-wrap:wrap;}
  .jr-card-actions{flex:0 0 auto;display:flex;align-items:center;gap:5px;}

  /* day-grouped list: one card per day; journal-entry icons + habit buttons
     share a single row (.jr-glyphs). */
  .jr-day-card{cursor:default;}
  .jr-day-card:hover{transform:none;border-color:var(--line);}
  /* today's card gets the same accent halo the habits timeline used */
  .jr-day-card.is-today{
    border-color:rgba(var(--accent-rgb),.55);
    box-shadow:0 0 0 1px rgba(var(--accent-rgb),.25), 0 6px 20px rgba(var(--accent-rgb),.12);
  }
  .jr-day-count{font-size:11.5px;font-weight:650;color:var(--faint);margin-left:auto;}
  .jr-day-card.is-today .jr-day-count{color:var(--accent-soft);}
  .jr-glyphs{display:flex;align-items:center;gap:9px;flex-wrap:wrap;}
  .jr-glyph{
    width:40px;height:40px;border-radius:var(--r-md);flex:0 0 auto;
    display:inline-flex;align-items:center;justify-content:center;color:#fff;
    border:1px solid rgba(255,255,255,.16);cursor:pointer;padding:0;
    transition:transform var(--t-base) var(--ease),box-shadow var(--t-base) var(--ease);
  }
  .jr-glyph svg{width:19px;height:19px;}
  .jr-glyph:hover{transform:translateY(-2px);box-shadow:var(--sh-2);}

  /* a habit toggle button: two emoji, no text. Coloured when done for the day,
     a faded ghost outline when not. Sized to sit beside .jr-glyph in the row. */
  .jr-habit{
    height:40px;min-width:40px;padding:0 9px;border-radius:var(--r-md);flex:0 0 auto;
    display:inline-flex;align-items:center;justify-content:center;
    background:var(--accent);color:#fff;border:1px solid rgba(255,255,255,.16);
    cursor:pointer;font-family:inherit;
    transition:transform var(--t-base) var(--ease),box-shadow var(--t-base) var(--ease),filter var(--t-base) var(--ease);
  }
  .jr-habit:hover{transform:translateY(-2px);box-shadow:var(--sh-2);}
  .jr-habit:active{transform:scale(.96);}
  .jr-habit-emoji{font-size:16px;line-height:1;display:flex;gap:1px;}
  .jr-habit.ghost{
    background:var(--bg);border-color:var(--line);
    box-shadow:inset 0 0 0 1px rgba(var(--text-rgb),.02);
  }
  .jr-habit.ghost:hover{border-color:var(--line-bright);}
  .jr-habit.ghost .jr-habit-emoji{filter:grayscale(.6) opacity(.5);}

  /* shadow-work split editor */
  .jr-sw-edit{max-width:1180px;}
  .jr-sw-split{display:grid;grid-template-columns:1fr 340px;gap:18px;align-items:start;}
  .jr-sw-write{display:flex;flex-direction:column;gap:8px;min-width:0;}
  .jr-sw-textarea{min-height:460px;}
  .jr-sw-cat{
    background:var(--card-2);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--sh-1);
    padding:14px 15px;display:flex;flex-direction:column;gap:14px;
    position:sticky;top:0;max-height:calc(100vh - 150px);overflow-y:auto;
  }
  .jr-sw-cat-head{
    display:flex;align-items:center;gap:8px;font-size:11px;text-transform:uppercase;
    letter-spacing:1.4px;color:var(--accent2-soft);font-weight:750;
  }
  .jr-sw-cat-head svg{width:14px;height:14px;}
  .jr-sw-cat-group{display:flex;flex-direction:column;gap:7px;}
  .jr-sw-cat-title{font-size:12px;font-weight:750;color:var(--muted);letter-spacing:.2px;}
  .jr-sw-prompt{
    text-align:left;width:100%;background:var(--card);border:1px solid var(--line);
    border-radius:10px;padding:9px 11px;color:var(--text);font-family:inherit;
    font-size:12.5px;line-height:1.45;cursor:pointer;transition:border-color .15s,background .15s;
  }
  .jr-sw-prompt:hover{border-color:var(--line-bright);background:var(--card-hover);}
  @media (max-width:760px){ .jr-sw-split{grid-template-columns:1fr;} .jr-sw-cat{position:static;} }

  /* ---- Editor ---- */
  .jr-edit{display:flex;flex-direction:column;gap:18px;max-width:880px;}
  .jr-props{
    background:var(--card-2);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--sh-1);
    padding:6px 16px;display:flex;flex-direction:column;
  }
  .jr-prop{
    display:grid;grid-template-columns:188px 1fr;align-items:center;gap:14px;
    padding:9px 2px;border-bottom:1px solid var(--line-soft);min-height:30px;
  }
  .jr-prop:last-child{border-bottom:none;}
  .jr-prop-label{display:flex;align-items:center;gap:9px;color:var(--muted);font-size:13px;font-weight:600;}
  .jr-prop-label svg{width:15px;height:15px;color:var(--faint);flex:0 0 auto;}
  .jr-prop-val{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0;}
  .jr-num{
    width:84px;background:var(--bg);border:1px solid var(--line);border-radius:8px;
    color:var(--text);font-family:inherit;font-size:13px;font-weight:650;padding:5px 9px;outline:none;
  }
  .jr-num:focus{border-color:var(--accent);}
  .jr-date-input{
    background:var(--bg);border:1px solid var(--line);border-radius:8px;color:var(--text);
    font-family:inherit;font-size:13px;font-weight:650;padding:5px 9px;outline:none;cursor:pointer;
  }
  .jr-date-input::-webkit-calendar-picker-indicator{filter:invert(.7);cursor:pointer;}
  .jr-date-input:focus{border-color:var(--accent);}
  .jr-meter{font-size:12px;color:var(--faint);font-weight:600;}

  /* tap-to-pick 0–10 scale (mood / cortisol) — replaces the old number field */
  .jr-scale{display:flex;gap:5px;flex-wrap:wrap;}
  .jr-scale-btn{
    width:30px;height:30px;border-radius:8px;padding:0;flex:0 0 auto;
    background:var(--bg);border:1px solid var(--line);color:var(--muted);
    font-family:inherit;font-size:12.5px;font-weight:700;font-variant-numeric:tabular-nums;
    display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:all .12s;
  }
  .jr-scale-btn:hover{border-color:var(--line-bright);color:var(--text);}
  .jr-scale-btn.on{color:#fff;border-color:transparent;background:var(--accent);}
  .jr-scale.good .jr-scale-btn.on{background:var(--good);}
  .jr-scale.bad .jr-scale-btn.on{background:var(--danger);}

  /* dropdown selects (single + habit picker) */
  .jr-select{
    background:var(--bg);border:1px solid var(--line);border-radius:8px;color:var(--text);
    font-family:inherit;font-size:13px;font-weight:650;padding:5px 30px 5px 10px;outline:none;cursor:pointer;
    appearance:none;-webkit-appearance:none;min-width:150px;max-width:100%;
    background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8ca8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
    background-repeat:no-repeat;background-position:right 9px center;
  }
  .jr-select:focus{border-color:var(--accent);}
  .jr-select option{background:var(--card-2);color:var(--text);}
  /* selected-habit tags shown beneath the habit dropdown */
  .jr-tags{display:flex;align-items:center;gap:6px;flex-wrap:wrap;}
  .jr-tag{
    display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:650;
    border-radius:8px;padding:4px 6px 4px 10px;color:#fff;border:1px solid transparent;white-space:nowrap;
  }
  .jr-tag .jr-odot{width:7px;height:7px;border-radius:50%;flex:0 0 auto;background:rgba(255,255,255,.85);}
  .jr-tag-x{
    display:inline-flex;align-items:center;justify-content:center;width:15px;height:15px;border-radius:5px;
    cursor:pointer;color:rgba(255,255,255,.85);background:rgba(255,255,255,.16);
  }
  .jr-tag-x:hover{background:rgba(255,255,255,.3);color:#fff;}
  .jr-tag-x svg{width:10px;height:10px;}

  /* selectable habit / option chips (multi + single select) */
  .jr-opt{
    display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:650;
    border-radius:8px;padding:4px 10px;border:1px solid var(--line);background:var(--card);
    color:var(--muted);cursor:pointer;font-family:inherit;transition:all .13s;white-space:nowrap;
  }
  .jr-opt:hover{color:var(--text);border-color:var(--line-bright);}
  .jr-opt .jr-odot{width:7px;height:7px;border-radius:50%;flex:0 0 auto;background:var(--faint);}
  .jr-opt.on{color:#fff;border-color:transparent;}
  .jr-opt.on .jr-odot{background:rgba(255,255,255,.85);}

  /* long-form sections */
  .jr-section{display:flex;flex-direction:column;gap:8px;}
  .jr-sec-head{display:flex;flex-direction:column;gap:2px;}
  .jr-sec-title{font-size:var(--fs-section);font-weight:800;color:var(--text);margin:0;display:flex;align-items:center;gap:8px;}
  .jr-sec-title svg{width:16px;height:16px;color:var(--accent2-soft);}
  .jr-sec-hint{font-size:12.5px;color:var(--faint);font-weight:500;line-height:1.45;margin:0;}
  .jr-sec-note{
    font-size:12.5px;color:var(--accent2-soft);font-weight:500;line-height:1.5;margin:0;
    background:rgba(var(--accent2-rgb),.08);border-left:2px solid rgba(var(--accent2-rgb),.4);
    border-radius:0 8px 8px 0;padding:8px 12px;
  }
  .jr-textarea{
    width:100%;background:var(--card-2);border:1px solid var(--line);border-radius:12px;
    color:var(--text);font-family:inherit;font-size:14px;line-height:1.6;padding:13px 15px;
    outline:none;resize:none;overflow:hidden;min-height:64px;transition:border-color .15s;
  }
  .jr-textarea:focus{border-color:var(--accent);background:var(--bg);}
  .jr-textarea::placeholder{color:var(--faint);}

  /* limiting beliefs */
  .jr-beliefs{display:flex;flex-direction:column;gap:11px;}
  .jr-belief{
    background:linear-gradient(160deg,var(--card),var(--card-2));border:1px solid var(--line);
    border-radius:var(--r-lg);padding:13px 15px;display:flex;flex-direction:column;gap:9px;box-shadow:var(--sh-1);
  }
  .jr-belief-q{font-size:13.5px;font-weight:700;color:var(--text);line-height:1.45;display:flex;gap:9px;align-items:flex-start;}
  .jr-belief-q .jr-belief-x{
    flex:0 0 auto;width:19px;height:19px;border-radius:6px;margin-top:1px;
    display:flex;align-items:center;justify-content:center;
    background:rgba(var(--danger-rgb),.14);color:var(--danger-soft);font-size:12px;
  }
  .jr-belief-q .jr-belief-x svg{width:12px;height:12px;}

  /* plan for tomorrow */
  .jr-plan{
    background:linear-gradient(160deg,rgba(var(--accent-rgb),.07),var(--card-2));
    border:1px solid var(--line);border-radius:15px;padding:16px 17px;display:flex;flex-direction:column;gap:14px;
  }
  .jr-tasks{display:flex;flex-direction:column;gap:7px;}
  .jr-task{display:flex;align-items:center;gap:10px;}
  .jr-task-bullet{width:6px;height:6px;border-radius:50%;background:var(--accent);flex:0 0 auto;}
  .jr-task input{
    flex:1;background:var(--bg);border:1px solid var(--line);border-radius:9px;color:var(--text);
    font-family:inherit;font-size:13.5px;padding:8px 11px;outline:none;min-width:0;transition:border-color .15s;
  }
  .jr-task input:focus{border-color:var(--accent);}
  .jr-task input::placeholder{color:var(--faint);}

  /* =======================================================================
     DYSREGULATION JOURNAL — flashback / daydream / urge templates
     ======================================================================= */
  .jr-quote{
    position:relative;
    background:var(--card-subtle);
    border:1px solid var(--line-soft);border-left:3px solid var(--accent);
    border-radius:0;padding:13px 16px;
    font-size:14px;font-weight:650;color:var(--text);line-height:1.5;font-style:normal;
  }
  .jr-quote::before{
    content:"REGULATION PROTOCOL //";
    display:block;margin-bottom:6px;
    font-family:var(--font-mono);font-size:10px;font-weight:750;
    letter-spacing:var(--tracking-label);text-transform:uppercase;
    color:var(--accent);
  }
  .jr-opts-wrap{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
  .jr-ref{
    background:var(--card-2);border:1px solid var(--line);border-radius:13px;
    padding:15px 17px;display:flex;flex-direction:column;gap:7px;
  }
  .jr-ref-title{
    font-size:11px;text-transform:uppercase;letter-spacing:1.4px;color:var(--accent2-soft);
    font-weight:750;margin:0;display:flex;align-items:center;gap:8px;
  }
  .jr-ref-title svg{width:14px;height:14px;}
  .jr-ref-body{font-size:13px;color:var(--muted);line-height:1.6;}
  .jr-ref-flow{
    display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:12.5px;
    font-weight:650;color:var(--text);
  }
  .jr-ref-flow span{
    background:var(--bg);border:1px solid var(--line);border-radius:7px;padding:4px 9px;white-space:nowrap;
  }
  .jr-ref-flow i{color:var(--accent2-soft);font-style:normal;font-weight:800;}
  .jr-ref-divider{border:none;border-top:1px solid var(--line-soft);margin:18px 0 2px;}
