@import url(https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400;1,600&family=Outfit:wght@300;400;500;600;700&display=swap);
*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}/*
! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
*//*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

*,
::before,
::after {
  box-sizing: border-box; /* 1 */
  border-width: 0; /* 2 */
  border-style: solid; /* 2 */
  border-color: #e5e7eb; /* 2 */
}

::before,
::after {
  --tw-content: '';
}

/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/

html,
:host {
  line-height: 1.5; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
  -moz-tab-size: 4; /* 3 */
  -o-tab-size: 4;
     tab-size: 4; /* 3 */
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */
  font-feature-settings: normal; /* 5 */
  font-variation-settings: normal; /* 6 */
  -webkit-tap-highlight-color: transparent; /* 7 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0; /* 1 */
  line-height: inherit; /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr {
  height: 0; /* 1 */
  color: inherit; /* 2 */
  border-top-width: 1px; /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

a {
  color: inherit;
  text-decoration: inherit;
}

/*
Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}

/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */
  font-feature-settings: normal; /* 2 */
  font-variation-settings: normal; /* 3 */
  font-size: 1em; /* 4 */
}

/*
Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0; /* 1 */
  border-color: inherit; /* 2 */
  border-collapse: collapse; /* 3 */
}

/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/

button,
input,
optgroup,
select,
textarea {
  font-family: inherit; /* 1 */
  font-feature-settings: inherit; /* 1 */
  font-variation-settings: inherit; /* 1 */
  font-size: 100%; /* 1 */
  font-weight: inherit; /* 1 */
  line-height: inherit; /* 1 */
  letter-spacing: inherit; /* 1 */
  color: inherit; /* 1 */
  margin: 0; /* 2 */
  padding: 0; /* 3 */
}

/*
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
  text-transform: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/

button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button; /* 1 */
  background-color: transparent; /* 2 */
  background-image: none; /* 2 */
}

/*
Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
  -webkit-appearance: textfield; /* 1 */
  outline-offset: -2px; /* 2 */
}

/*
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
  -webkit-appearance: button; /* 1 */
  font: inherit; /* 2 */
}

/*
Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
Removes the default spacing and border for appropriate elements.
*/

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
Reset default styling for dialogs.
*/
dialog {
  padding: 0;
}

/*
Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/

input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}

input::placeholder,
textarea::placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}

/*
Set the default cursor for buttons.
*/

button,
[role="button"] {
  cursor: pointer;
}

/*
Make sure disabled buttons don't get the pointer cursor.
*/
:disabled {
  cursor: default;
}

/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block; /* 1 */
  vertical-align: middle; /* 2 */
}

/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

img,
video {
  max-width: 100%;
  height: auto;
}

/* Make elements with the HTML hidden attribute stay hidden by default */
[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}
.container {
  width: 100%;
}
@media (min-width: 640px) {

  .container {
    max-width: 640px;
  }
}
@media (min-width: 768px) {

  .container {
    max-width: 768px;
  }
}
@media (min-width: 1024px) {

  .container {
    max-width: 1024px;
  }
}
@media (min-width: 1280px) {

  .container {
    max-width: 1280px;
  }
}
@media (min-width: 1536px) {

  .container {
    max-width: 1536px;
  }
}
.visible {
  visibility: visible;
}
.fixed {
  position: fixed;
}
.absolute {
  position: absolute;
}
.relative {
  position: relative;
}
.block {
  display: block;
}
.inline-block {
  display: inline-block;
}
.flex {
  display: flex;
}
.inline-flex {
  display: inline-flex;
}
.table {
  display: table;
}
.grid {
  display: grid;
}
.hidden {
  display: none;
}
.transform {
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.resize {
  resize: both;
}
.border {
  border-width: 1px;
}
.uppercase {
  text-transform: uppercase;
}
.lowercase {
  text-transform: lowercase;
}
.italic {
  font-style: italic;
}
.tabular-nums {
  --tw-numeric-spacing: tabular-nums;
  font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
}
.underline {
  text-decoration-line: underline;
}
.line-through {
  text-decoration-line: line-through;
}
.outline {
  outline-style: solid;
}
.filter {
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.transition {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.ease-in-out {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════════════════════
   My Future Self — "Parchemin Alchimique"  v1.9.0
   Aesthetic: crème/cuivre/or × chaleur alchimique
   ═══════════════════════════════════════════════════════ */

:root {
  /* ── Core palette — Parchemin Alchimique ── */
  --cj-ink:        #f7f3ed;
  --cj-void:       #f2ece3;
  --cj-deep:       #ece5d8;
  --cj-surface:    #e5dccf;
  --cj-mist:       #d5c9b8;
  --cj-parchment:  #f0e9df;

  --cj-teal:       #b5651d;   /* cuivre principal */
  --cj-emerald:    #8b6914;   /* or foncé */
  --cj-aqua:       #7c5cbf;   /* améthyste */
  --cj-sage:       #5a7a3a;   /* olive foncé */
  --cj-glow:       #9b4a1e;   /* cuivre profond */

  /* Legacy mapped — keeps all JSX working */
  --cj-warm:       #b5651d;
  --cj-amber:      #c17f3c;
  --cj-terracotta: #b5541a;
  --cj-gold:       #8b6914;
  --cj-slate:      #8a7a6a;

  /* Functional tokens */
  --cj-card:       #ece5d8;
  --cj-border:     rgba(181, 101, 29, 0.15);
  --cj-text:       #2d1f0e;
  --cj-text-muted: #7a6450;
  --cj-accent:     var(--cj-teal);
  --cj-success:    #5a7a3a;
  --cj-danger:     #c0392b;
  --cj-cream:      var(--cj-void);

  /* Typography — esoteric serif × geometric sans */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing rhythm */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* Shadows — ton chaud */
  --shadow-sm:   0 1px 4px rgba(45, 20, 5, 0.08);
  --shadow-md:   0 4px 20px rgba(45, 20, 5, 0.12);
  --shadow-lg:   0 12px 48px rgba(45, 20, 5, 0.18);
  --shadow-glow: 0 0 0 2px rgba(181, 101, 29, 0.2);
  --shadow-teal: 0 0 24px rgba(181, 101, 29, 0.1);
}

/* ─── Base ─────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  background: var(--cj-void);
  color: var(--cj-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* Subtle noise grain — ton parchemin */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox=%270 0 256 256%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cfilter id=%27noise%27%3E%3CfeTurbulence type=%27fractalNoise%27 baseFrequency=%270.9%27 numOctaves=%274%27 stitchTiles=%27stitch%27/%3E%3C/filter%3E%3Crect width=%27100%25%27 height=%27100%25%27 filter=%27url%28%23noise%29%27/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* ─── Typography ───────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: #2d1f0e;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

/* ─── Components ───────────────────────────────────── */

.cj-card {
  background: var(--cj-card);
  border: 1px solid var(--cj-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.cj-card:hover {
  box-shadow: var(--shadow-md), var(--shadow-teal);
  border-color: rgba(181, 101, 29, 0.25);
}

.cj-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: #f7f3ed;
  background: var(--cj-teal);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 0 20px rgba(181, 101, 29, 0.2);
  transition: all 0.25s ease;
}

.cj-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 32px rgba(181, 101, 29, 0.35);
  filter: brightness(1.08);
}

.cj-button:active {
  transform: translateY(0);
  box-shadow: 0 0 12px rgba(181, 101, 29, 0.2);
}

.cj-button--ghost {
  background: transparent;
  color: var(--cj-text-muted);
  box-shadow: none;
  border: 1px solid var(--cj-border);
}

.cj-button--ghost:hover {
  background: rgba(181, 101, 29, 0.06);
  color: var(--cj-teal);
  border-color: rgba(181, 101, 29, 0.3);
}

/* ─── Sidebar ──────────────────────────────────────── */

.cj-sidebar {
  background: var(--cj-void);
  border-right: 1px solid rgba(181, 101, 29, 0.08);
  color: var(--cj-text-muted);
  display: flex;
  flex-direction: column;
  width: 240px;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Subtle teal glow on right edge */
.cj-sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg,
    transparent,
    rgba(181, 101, 29, 0.4) 30%,
    rgba(139, 105, 20, 0.4) 60%,
    transparent
  );
}

.cj-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  font-weight: 400;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  color: var(--cj-text-muted);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  position: relative;
  background: none;
}

.cj-nav-item:hover {
  color: var(--cj-text);
  background: rgba(181, 101, 29, 0.06);
}

.cj-nav-item--active {
  color: var(--cj-teal) !important;
  background: rgba(181, 101, 29, 0.08) !important;
  border-color: rgba(181, 101, 29, 0.15) !important;
}

.cj-nav-item--active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 55%;
  background: var(--cj-teal);
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px var(--cj-teal);
}

/* ─── Textarea ─────────────────────────────────────── */

.cj-textarea {
  width: 100%;
  min-height: 340px;
  padding: 1.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.85;
  color: var(--cj-text);
  background: var(--cj-deep);
  border: 1px solid var(--cj-border);
  border-radius: var(--radius-lg);
  resize: vertical;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  /* Subtle ruled lines */
  background-image: repeating-linear-gradient(
    transparent,
    transparent 1.85rem,
    rgba(181, 101, 29, 0.04) 1.85rem,
    rgba(181, 101, 29, 0.04) 1.87rem
  );
  background-position: 0 1.5rem;
}

.cj-textarea::-moz-placeholder {
  color: var(--cj-text-muted);
  font-style: italic;
  opacity: 0.5;
}

.cj-textarea::placeholder {
  color: var(--cj-text-muted);
  font-style: italic;
  opacity: 0.5;
}

.cj-textarea:focus {
  outline: none;
  border-color: rgba(181, 101, 29, 0.4);
  box-shadow: var(--shadow-glow), 0 0 0 1px rgba(181, 101, 29, 0.1);
  background-color: var(--cj-deep);
}

/* ─── Status Badges ────────────────────────────────── */

.cj-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.2rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
}

.cj-badge--success {
  background: rgba(52, 211, 153, 0.1);
  color: var(--cj-emerald);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.cj-badge--warning {
  background: rgba(181, 101, 29, 0.1);
  color: var(--cj-teal);
  border: 1px solid rgba(181, 101, 29, 0.2);
}

.cj-badge--danger {
  background: rgba(248, 113, 113, 0.1);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.2);
}

/* ─── Alert banners ────────────────────────────────── */

.cj-alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  border-left: 2px solid;
}

.cj-alert--success {
  background: rgba(52, 211, 153, 0.07);
  border-color: var(--cj-emerald);
  color: #6ee7b7;
}

.cj-alert--error {
  background: rgba(248, 113, 113, 0.07);
  border-color: #f87171;
  color: #fca5a5;
}

/* ─── Bar chart ────────────────────────────────────── */

.cj-bar {
  border-radius: 6px 6px 2px 2px;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  cursor: pointer;
}

.cj-bar:hover {
  filter: brightness(1.1);
  transform: scaleY(1.03);
  transform-origin: bottom;
}

.cj-bar__tooltip {
  position: absolute;
  top: -2.25rem;
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  background: var(--cj-ink);
  color: #e8ddd0;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cj-bar:hover .cj-bar__tooltip {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* ─── Animations ───────────────────────────────────── */

@keyframes cj-fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cj-scale-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes cj-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes cj-pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(181, 101, 29, 0.3); }
  70% { box-shadow: 0 0 0 8px rgba(181, 101, 29, 0); }
  100% { box-shadow: 0 0 0 0 rgba(181, 101, 29, 0); }
}

.cj-animate-in {
  animation: cj-fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cj-animate-in-delayed {
  animation: cj-fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.cj-shimmer {
  background: linear-gradient(90deg, var(--cj-deep) 25%, rgba(181, 101, 29, 0.05) 50%, var(--cj-deep) 75%);
  background-size: 200% 100%;
  animation: cj-shimmer 1.8s infinite;
  border-radius: var(--radius-md);
}

/* ─── Scrollbar ────────────────────────────────────── */

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(181, 101, 29, 0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(181, 101, 29, 0.3);
}

/* ─── App Layout ──────────────────────────────────── */

.cj-app-layout {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--cj-void);
}

.cj-main-content {
  flex: 1;
  padding: 2.5rem 3rem;
  overflow-y: auto;
  max-height: 100vh;
  max-height: 100dvh;
}

.cj-persona-banner {
  display: flex;
  align-items: stretch;
  gap: 1.5rem;
  padding: 1.25rem 1.75rem;
  margin-bottom: 2rem;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(4px);
}

.cj-persona-badge-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  flex-wrap: wrap;
}

.cj-persona-motto {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--cj-text);
  margin: 0;
  max-width: 520px;
}

.cj-coaching-badge {
  align-self: flex-start;
  flex-shrink: 0;
}

.cj-login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  background: radial-gradient(ellipse at 30% 60%, rgba(181, 101, 29, 0.06) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 20%, rgba(139, 105, 20, 0.05) 0%, transparent 55%),
              var(--cj-void);
  padding: 2rem;
}

.cj-login-box {
  width: 100%;
  max-width: 420px;
  text-align: center;
}

/* Sidebar nav area */
.cj-sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

/* Sidebar user card at bottom */
.cj-sidebar-user {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(181, 101, 29, 0.1);
}

/* Stats grid */
.cj-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

/* Objectives grid */
.cj-objectives-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* Journal form wrapper */
.cj-journal-wrapper {
  max-width: 760px;
  margin: 0 auto;
}

/* Journal form header */
.cj-journal-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Journal form footer */
.cj-journal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  border-top: 1px solid var(--cj-border);
  gap: 1rem;
}

/* Chart container */
.cj-chart-bars {
  height: 220px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 0.5rem;
  position: relative;
}

/* Shimmer loading grid */
.cj-shimmer-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* Page header */
.cj-page-header {
  margin-bottom: 2rem;
}

/* ─── Mobile menu (hidden on desktop) ─────────────── */

.cj-mobile-menu-toggle {
  display: none;
}

.cj-mobile-overlay {
  display: none;
}

/* ─── Responsive ───────────────────────────────────── */

/* Tablet */
@media (max-width: 1024px) {
  .cj-main-content {
    padding: 2rem;
  }
}

/* Mobile */
@media (max-width: 768px) {
  /* Layout: switch to column, sidebar becomes bottom nav */
  .cj-app-layout {
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
  }

  /* Sidebar → slide-in drawer from left */
  .cj-sidebar {
    width: 280px;
    min-height: 100vh;
    min-height: 100dvh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    padding: 2rem 1.25rem !important;
  }

  .cj-sidebar--open {
    transform: translateX(0);
  }

  .cj-sidebar::after {
    display: none;
  }

  /* Show brand in mobile drawer */
  .cj-sidebar-brand {
    display: flex;
  }

  /* Nav stays vertical in drawer */
  .cj-sidebar-nav {
    flex-direction: column;
    flex: 1;
    gap: 0.375rem;
  }

  /* Nav items: full labels in drawer */
  .cj-nav-item {
    flex-direction: row;
    padding: 0.875rem 1.25rem;
    font-size: 0.9rem;
    gap: 0.75rem;
    border-radius: var(--radius-md);
    text-align: left;
    justify-content: flex-start;
    min-width: 0;
  }

  /* Show user card in drawer */
  .cj-sidebar-user {
    display: block;
  }

  /* Mobile menu toggle button */
  .cj-mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1002;
    width: 44px;
    height: 44px;
    background: var(--cj-void);
    color: var(--cj-teal);
    border: 1px solid rgba(181, 101, 29, 0.15);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: background 0.2s ease;
  }

  .cj-mobile-menu-toggle:active {
    background: var(--cj-deep);
  }

  /* Overlay backdrop */
  .cj-mobile-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(45, 20, 5, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }

  /* Main content adjustments */
  .cj-main-content {
    order: 1;
    padding: 1.25rem 1rem;
    padding-top: 4.5rem; /* Space for hamburger button */
    max-height: none;
    overflow-y: visible;
  }

  /* Persona banner: stack vertically */
  .cj-persona-banner {
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
  }

  .cj-persona-motto {
    font-size: 0.9rem;
    max-width: none;
  }

  .cj-coaching-badge {
    align-self: flex-start;
  }

  /* Show mobile user bar */
  .cj-mobile-user-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: var(--cj-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--cj-border);
  }

  /* Typography scale down */
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.125rem; }

  .cj-card {
    padding: var(--space-lg);
    border-radius: var(--radius-md);
  }

  /* Stats grid: stack on mobile */
  .cj-stats-grid {
    grid-template-columns: 1fr;
  }

  /* Objectives: single column */
  .cj-objectives-grid {
    grid-template-columns: 1fr;
  }

  /* Journal form */
  .cj-journal-header {
    flex-wrap: wrap;
  }

  .cj-journal-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .cj-journal-footer .cj-button {
    width: 100%;
    justify-content: center;
  }

  .cj-textarea {
    min-height: 240px;
    font-size: 1rem;
    padding: 1rem;
  }

  /* Chart */
  .cj-chart-bars {
    height: 180px;
    gap: 0.375rem;
    padding: 0;
  }

  .cj-bar {
    max-width: 36px !important;
  }

  /* Shimmer loading */
  .cj-shimmer-stats {
    grid-template-columns: 1fr;
  }

  /* Login screen */
  .cj-login-screen {
    padding: 1.25rem;
  }

  .cj-login-box {
    max-width: 100%;
  }
}

/* ─── WeeklyJournal mobile fixes ────────────────── */

@media (max-width: 768px) {
  /* Week nav header: keep row but tighter */
  .cj-week-nav {
    padding: 0.75rem 0.5rem !important;
    gap: 0.25rem;
  }

  .cj-week-nav .cj-font-display {
    font-size: 0.9rem !important;
  }

  /* Bigger touch targets for nav arrows */
  .cj-week-nav > button {
    min-width: 44px !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Day cards: stack content vertically */
  .cj-day-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
  }

  .cj-day-header > div:first-child {
    flex-direction: column !important;
    align-items: flex-start !important;
    width: 100%;
    gap: 0.375rem !important;
  }

  /* Content preview: full width, allow wrapping */
  .cj-day-preview {
    white-space: normal !important;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: initial !important;
    -webkit-line-clamp: 2;
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
  }

  /* Action button: full width on mobile, bigger touch target */
  .cj-day-action {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.625rem 1rem !important;
    font-size: 0.8rem !important;
    min-height: 44px;
    border-radius: var(--radius-md) !important;
  }

  /* Pending analysis alert */
  .cj-pending-alert {
    font-size: 0.75rem !important;
    padding: 0.625rem 0.75rem !important;
  }

  /* Week summary footer */
  .cj-week-footer {
    flex-direction: column !important;
    gap: 0.25rem !important;
    text-align: center;
  }

  .cj-week-footer > span:nth-child(2) {
    display: none; /* Hide pipe separator */
  }

  /* Save button row in editor: full width */
  .cj-day-save {
    justify-content: stretch !important;
  }

  .cj-day-save .cj-button {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }
}

/* Small phones */
@media (max-width: 400px) {
  .cj-main-content {
    padding: 1rem 0.75rem;
    padding-top: 4.5rem;
  }

  .cj-persona-banner {
    padding: 1rem;
  }

  .cj-sidebar {
    width: 260px;
  }
}

/* ─── Mobile user bar ─────────────────────────────── */

.cj-mobile-user-bar {
  display: none; /* Hidden on desktop */
}

/* ─── Utility ──────────────────────────────────────── */

.cj-text-muted { color: var(--cj-text-muted); }
.cj-text-accent { color: var(--cj-accent); }
.cj-text-success { color: var(--cj-sage); }
.cj-text-danger { color: var(--cj-terracotta); }
.cj-font-display { font-family: var(--font-display); }

/* ═══════════════════════════════════════════════════════════════════════
   FAMILY DASHBOARD (v1.5.0)
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── Leaderboard grid ─────────────────────── */
.cj-family-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.cj-family-card {
    background: var(--cj-card);
    border: 1px solid var(--cj-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cj-family-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

.cj-family-card--self {
    border: 2px solid var(--cj-amber);
    background: linear-gradient(180deg, rgba(212, 136, 62, 0.04), transparent);
}

.cj-family-card--top {
    box-shadow: 0 0 0 1px rgba(212, 136, 62, 0.3), 0 8px 24px rgba(212, 136, 62, 0.12);
}

.cj-family-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.cj-family-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}
.cj-family-name {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--cj-text);
    line-height: 1.1;
}
.cj-family-archetype {
    font-size: 0.7rem;
    color: var(--cj-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cj-family-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0.5rem 0;
    font-size: 0.85rem;
}
.cj-family-stat-label {
    color: var(--cj-text-muted);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.cj-family-stat-value {
    font-weight: 700;
    color: var(--cj-text);
}

.cj-streak-flame {
    display: inline-block;
    animation: cj-flame-pulse 1.6s ease-in-out infinite;
    transform-origin: center bottom;
}
@keyframes cj-flame-pulse {
    0%, 100% { transform: scale(1) rotate(-2deg); filter: brightness(1); }
    50%      { transform: scale(1.15) rotate(2deg); filter: brightness(1.2); }
}

.cj-progress-mini {
    height: 6px;
    background: var(--cj-mist);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.25rem;
}
.cj-progress-mini-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cj-sage), var(--cj-amber));
    border-radius: 3px;
    transition: width 0.4s ease;
}

.cj-family-today-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cj-sage);
    box-shadow: 0 0 0 3px rgba(107, 143, 113, 0.2);
    display: inline-block;
}

/* ─── Family stats banner ──────────────────── */
.cj-family-stats-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    background: var(--cj-card);
    border: 1px solid var(--cj-border);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}
.cj-family-stat-item {
    text-align: center;
}
.cj-family-stat-big {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--cj-amber);
    line-height: 1;
}
.cj-family-stat-caption {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cj-text-muted);
    margin-top: 0.375rem;
}

/* ─── Feed timeline ────────────────────────── */
.cj-feed-timeline {
    position: relative;
    padding-left: 1.5rem;
}
.cj-feed-timeline::before {
    content: '';
    position: absolute;
    left: 22px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--cj-border);
}

.cj-feed-item {
    position: relative;
    background: var(--cj-card);
    border: 1px solid var(--cj-border);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    margin-left: 1.5rem;
}
.cj-feed-item--mine {
    border-left: 3px solid var(--cj-amber);
}

.cj-feed-avatar {
    position: absolute;
    left: -2.75rem;
    top: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 0 0 4px var(--cj-surface);
    z-index: 1;
}

.cj-feed-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}
.cj-feed-author {
    font-weight: 700;
    color: var(--cj-text);
    font-size: 0.95rem;
}
.cj-feed-timestamp {
    font-size: 0.75rem;
    color: var(--cj-text-muted);
}
.cj-feed-badge {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: rgba(181, 101, 29, 0.1);
    color: var(--cj-teal);
    font-weight: 600;
    border: 1px solid rgba(181, 101, 29, 0.15);
}
.cj-feed-content {
    color: var(--cj-text);
    line-height: 1.5;
    margin: 0.5rem 0 0.75rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.cj-feed-delete-btn {
    background: none;
    border: none;
    color: var(--cj-text-muted);
    cursor: pointer;
    font-size: 0.75rem;
    margin-left: auto;
    padding: 0.25rem;
    opacity: 0.6;
    transition: opacity 0.2s, color 0.2s;
}
.cj-feed-delete-btn:hover {
    opacity: 1;
    color: var(--cj-terracotta);
}

/* ─── Reactions bar ────────────────────────── */
.cj-reactions-bar {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}
.cj-reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--cj-border);
    background: var(--cj-parchment);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.15s ease;
    font-family: var(--font-body);
}
.cj-reaction-btn:hover {
    border-color: var(--cj-amber);
    transform: scale(1.05);
}
.cj-reaction-btn--active {
    background: rgba(212, 136, 62, 0.15);
    border-color: var(--cj-amber);
    color: var(--cj-amber);
    font-weight: 700;
}
.cj-reaction-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--cj-text-muted);
}
.cj-reaction-btn--active .cj-reaction-count {
    color: var(--cj-amber);
}

/* ─── Comments ─────────────────────────────── */
.cj-feed-comments {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--cj-border);
}
.cj-comment {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    line-height: 1.4;
}
.cj-comment-author {
    font-weight: 700;
    color: var(--cj-text);
    flex-shrink: 0;
}
.cj-comment-content {
    color: var(--cj-text);
    word-wrap: break-word;
    flex: 1;
}
.cj-comment-delete {
    background: none;
    border: none;
    color: var(--cj-text-muted);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0;
    opacity: 0;
    transition: opacity 0.2s;
}
.cj-comment:hover .cj-comment-delete {
    opacity: 0.6;
}
.cj-comment:hover .cj-comment-delete:hover {
    opacity: 1;
    color: var(--cj-terracotta);
}

.cj-comment-input-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.cj-comment-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--cj-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.85rem;
    background: var(--cj-parchment);
    outline: none;
}
.cj-comment-input:focus {
    border-color: var(--cj-amber);
}

/* ─── Share modal ──────────────────────────── */
.cj-share-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}
.cj-share-modal {
    background: var(--cj-card);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.cj-share-modal-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--cj-text);
}
.cj-share-modal-textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    border: 2px solid var(--cj-border);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: var(--cj-parchment);
    box-sizing: border-box;
    resize: vertical;
    outline: none;
}
.cj-share-modal-textarea:focus {
    border-color: var(--cj-amber);
}
.cj-share-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.cj-share-button {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.4rem 0.75rem;
    background: transparent;
    border: 1px solid var(--cj-border);
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-family: var(--font-body);
    color: var(--cj-text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}
.cj-share-button:hover {
    border-color: var(--cj-amber);
    color: var(--cj-amber);
}
.cj-share-button--shared {
    color: var(--cj-sage);
    border-color: var(--cj-sage);
}

/* ─── Toggle switch (settings) ─────────────── */
.cj-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--cj-border);
}
.cj-toggle-row:last-child { border-bottom: none; }
.cj-toggle-label {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.cj-toggle-title {
    font-weight: 600;
    color: var(--cj-text);
    font-size: 0.9rem;
}
.cj-toggle-desc {
    font-size: 0.75rem;
    color: var(--cj-text-muted);
}
.cj-toggle-switch {
    position: relative;
    width: 42px;
    height: 24px;
    background: var(--cj-deep);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease;
    border: none;
    flex-shrink: 0;
}
.cj-toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.cj-toggle-switch--on {
    background: var(--cj-teal);
    box-shadow: 0 0 12px rgba(181, 101, 29, 0.25);
}
.cj-toggle-switch--on::after {
    transform: translateX(18px);
}

/* ─── Notification badge on tab ────────────── */
.cj-nav-item-with-badge {
    position: relative;
}
.cj-notif-badge {
    position: absolute;
    top: 8px;
    right: 12px;
    width: 8px;
    height: 8px;
    background: var(--cj-teal);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--cj-void);
    animation: cj-pulse-ring 2s ease-in-out infinite;
}

/* ─── Empty state ──────────────────────────── */
.cj-feed-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--cj-text-muted);
}
.cj-feed-empty-icon {
    margin: 0 auto 1rem;
    color: var(--cj-teal);
    opacity: 0.5;
}

/* ─── Family cards accent update ──────────── */
.cj-family-card--self {
    border: 1px solid rgba(181, 101, 29, 0.3) !important;
    background: linear-gradient(180deg, rgba(181, 101, 29, 0.04), transparent) !important;
}
.cj-family-card--top {
    box-shadow: 0 0 0 1px rgba(181, 101, 29, 0.2), 0 8px 24px rgba(181, 101, 29, 0.08) !important;
}
.cj-family-stat-big {
    color: var(--cj-teal) !important;
}
.cj-feed-item--mine {
    border-left: 2px solid var(--cj-teal) !important;
}
.cj-progress-mini-fill {
    background: linear-gradient(90deg, var(--cj-teal), var(--cj-emerald)) !important;
}

/* ═══════════════════════════════════════════════════════════════════════
   FUTURE SELF WELCOME SCREEN (v1.7.0)
   Full-page esoteric portal — first thing seen after login
   ═══════════════════════════════════════════════════════════════════════ */

@keyframes cj-future-breathe {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%       { opacity: 0.7; transform: scale(1.08); }
}

@keyframes cj-future-orb-drift {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(20px, -30px) scale(1.05); }
  66%  { transform: translate(-15px, 20px) scale(0.95); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes cj-future-reveal {
  from {
    opacity: 0;
    transform: translateY(24px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes cj-future-dissolve {
  from {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
  to {
    opacity: 0;
    transform: scale(1.02);
    filter: blur(8px);
  }
}

@keyframes cj-glyph-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes cj-glyph-counter {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}

@keyframes cj-cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.cj-future-screen {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: var(--cj-void);
  padding: 2rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), filter 0.8s ease;
}

.cj-future-screen--dissolving {
  opacity: 0;
  filter: blur(8px);
  pointer-events: none;
}

/* Background atmospheric orbs */
.cj-future-screen::before {
  content: '';
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(45, 212, 191, 0.07) 0%, transparent 70%);
  top: 0;
  left: 0;
  transform: translate(-20%, -20%);
  animation: cj-future-orb-drift 18s ease-in-out infinite;
  pointer-events: none;
}

.cj-future-screen::after {
  content: '';
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(52, 211, 153, 0.05) 0%, transparent 70%);
  bottom: 0;
  right: 0;
  animation: cj-future-orb-drift 24s ease-in-out infinite reverse;
  pointer-events: none;
}

.cj-future-container {
  position: relative;
  z-index: 1;
  max-width: 640px;
  width: 100%;
  text-align: center;
  /* Centrage vertical sur grands écrans, scroll naturel sur petits */
  margin: auto;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

/* Esoteric glyph ring */
.cj-future-glyph {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 2.5rem;
}

.cj-future-glyph-outer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(181, 101, 29, 0.2);
  animation: cj-glyph-rotate 20s linear infinite;
}

.cj-future-glyph-outer::before,
.cj-future-glyph-outer::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--cj-teal);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--cj-teal);
}
.cj-future-glyph-outer::before { top: -3px; left: 50%; transform: translateX(-50%); }
.cj-future-glyph-outer::after  { bottom: -3px; left: 50%; transform: translateX(-50%); }

.cj-future-glyph-inner {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 1px solid rgba(52, 211, 153, 0.15);
  animation: cj-glyph-counter 14s linear infinite;
}

.cj-future-glyph-core {
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(181, 101, 29, 0.15) 0%, transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: cj-future-breathe 4s ease-in-out infinite;
}

.cj-future-label {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--cj-teal);
  margin-bottom: 1.25rem;
  opacity: 0.7;
  animation: cj-future-reveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

.cj-future-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #2d1f0e;
  margin-bottom: 0.5rem;
  animation: cj-future-reveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}

.cj-future-title em {
  font-style: italic;
  color: var(--cj-teal);
  font-weight: 300;
}

.cj-future-divider {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cj-teal), transparent);
  margin: 1.75rem auto;
  animation: cj-future-reveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.7s both;
}

/* Message card */
.cj-future-message-card {
  background: rgba(236, 229, 216, 0.9);
  border: 1px solid rgba(45, 212, 191, 0.2);
  border-radius: 16px;
  padding: 2rem 2.25rem;
  margin-bottom: 2.5rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(45, 212, 191, 0.1);
  animation: cj-future-reveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.9s both;
}

.cj-future-message-type {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cj-teal);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.cj-future-message-type::before,
.cj-future-message-type::after {
  content: '';
  flex: 1;
  max-width: 40px;
  height: 1px;
  background: rgba(45, 212, 191, 0.35);
}

.cj-future-message-text {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.85;
  color: var(--cj-text);
  white-space: pre-wrap;
}

.cj-future-typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--cj-teal);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: cj-cursor-blink 1.2s step-end infinite;
  border-radius: 1px;
}

/* Intro (no message yet) */
.cj-future-intro-text {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--cj-text-muted);
  margin-bottom: 2rem;
  animation: cj-future-reveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.9s both;
}

.cj-future-intro-points {
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
  animation: cj-future-reveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) 1.1s both;
}

.cj-future-intro-points li {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  font-size: 0.9rem;
  color: var(--cj-text-muted);
  line-height: 1.6;
}

.cj-future-intro-points li::before {
  content: '◈';
  color: var(--cj-teal);
  opacity: 0.6;
  flex-shrink: 0;
  margin-top: 0.1rem;
  font-size: 0.75rem;
}

/* CTA button */
.cj-future-cta {
  animation: cj-future-reveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) 1.2s both;
}

.cj-future-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 2.25rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cj-void);
  background: var(--cj-teal);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 0 32px rgba(181, 101, 29, 0.25);
  transition: all 0.3s ease;
}

.cj-future-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 48px rgba(181, 101, 29, 0.4);
  background: #c97725;
}

.cj-future-btn:active {
  transform: translateY(0);
}

.cj-future-skip {
  display: block;
  margin-top: 1.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--cj-text-muted);
  cursor: pointer;
  background: none;
  border: none;
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.cj-future-skip:hover { opacity: 1; }

/* Score badges */
.cj-future-scores {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.cj-future-score-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  background: rgba(45, 212, 191, 0.07);
  border: 1px solid rgba(45, 212, 191, 0.15);
  border-radius: 8px;
}

.cj-future-score-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--cj-teal);
  line-height: 1;
}

.cj-future-score-label {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cj-text-muted);
}

/* Loading state */
.cj-future-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 3rem 0;
  animation: cj-future-reveal 0.5s ease both;
}

.cj-future-loader {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(45, 212, 191, 0.15);
  border-top-color: var(--cj-teal);
  border-radius: 50%;
  animation: cj-glyph-rotate 1s linear infinite;
}

.cj-future-loader-text {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cj-text-muted);
}

/* Mobile */
@media (max-width: 768px) {
  .cj-future-message-card {
    padding: 1.5rem;
  }
  .cj-future-glyph {
    width: 72px;
    height: 72px;
    margin-bottom: 2rem;
  }
  .cj-future-glyph-inner { inset: 10px; }
  .cj-future-glyph-core  { inset: 20px; }
}

