:root {
  --ink: #291e3b;
  --muted: #766c84;
  --cream: #fffaf1;
  --paper: rgba(255, 252, 247, .88);
  --violet: #6132b9;
  --violet-dark: #40217e;
  --lavender: #eee5ff;
  --pink: #ff6e9d;
  --peach: #ffc36c;
  --mint: #77d9b5;
  --line: #dacfe7;
  --shadow: 0 18px 50px rgba(64, 33, 126, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--cream); color: var(--ink); font-family: "DM Sans", sans-serif; }
body.locked main, body.locked .site-header { filter: blur(9px); pointer-events: none; user-select: none; }
button, input, textarea, select { font: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.aurora { position: fixed; border-radius: 50%; filter: blur(3px); opacity: .33; pointer-events: none; z-index: -1; }
.aurora-one { width: 42rem; height: 42rem; background: #e5ceff; top: -23rem; left: -15rem; }
.aurora-two { width: 33rem; height: 33rem; background: #ffd8a4; top: 24rem; right: -16rem; }
.site-header { height: 72px; padding: 0 clamp(20px, 5vw, 78px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(89, 59, 128, .12); background: rgba(255, 250, 241, .72); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 20; }
.brand { display: inline-flex; gap: 9px; align-items: center; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -.02em; }
.brand-mark { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; background: var(--violet); color: white; font-size: 14px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.text-button, .clear-button { border: 0; color: var(--violet); background: transparent; font-weight: 600; padding: 9px 11px; border-radius: 8px; }
.text-button:hover, .clear-button:hover { background: rgba(97, 50, 185, .08); }
.icon-button { width: 35px; height: 35px; border-radius: 50%; border: 1px solid #d8cbe7; color: var(--violet); display: grid; place-items: center; background: #fffdf9; font-size: 19px; line-height: 1; }
.icon-button:hover { border-color: var(--violet); background: var(--lavender); }
.import-label input { display: none; }
.primary-button { border: 0; padding: 12px 17px; background: var(--violet); border-radius: 10px; color: white; font-weight: 700; box-shadow: 0 8px 18px rgba(97, 50, 185, .2); transition: transform .16s ease, background .16s ease; }
.primary-button:hover { background: var(--violet-dark); transform: translateY(-1px); }
.primary-button span { font-size: 18px; margin-right: 4px; line-height: 0; }
.primary-button.compact { padding: 10px 13px; }
.hero { padding: clamp(54px, 8vw, 110px) clamp(20px, 8vw, 144px) 43px; max-width: 1480px; margin: auto; }
.eyebrow { color: var(--violet); letter-spacing: .14em; font-family: "DM Mono", monospace; font-size: .68rem; font-weight: 500; margin: 0 0 10px; }
.hero-copy { display: flex; align-items: end; justify-content: space-between; gap: 35px; }
h1, h2 { letter-spacing: -.055em; margin: 0; }
h1 { font-family: "Playfair Display", serif; font-size: clamp(3rem, 7.4vw, 6.7rem); font-weight: 600; line-height: .94; }
h1 em { color: var(--violet); }
.intro { font-size: clamp(1rem, 1.55vw, 1.2rem); color: var(--muted); max-width: 520px; line-height: 1.55; margin: 26px 0 0; }
.hero-stat { border-left: 2px solid var(--pink); padding: 8px 0 8px 16px; min-width: 155px; margin-bottom: 9px; }
.hero-stat strong { display: block; font-family: "Playfair Display", serif; color: var(--violet); font-size: 3rem; line-height: .9; }
.hero-stat span { font-size: .8rem; color: var(--muted); }
.mode-switch { margin-top: 42px; background: rgba(255,255,255,.65); padding: 5px; display: inline-flex; gap: 3px; border: 1px solid #e2d8ec; border-radius: 12px; align-items: center; box-shadow: 0 6px 18px rgba(54,28,104,.04); }
.mode-switch > span { font-size: .77rem; color: var(--muted); padding: 0 9px; }
.mode-button { border: 0; background: transparent; color: var(--muted); padding: 8px 11px; border-radius: 8px; font-size: .79rem; font-weight: 600; }
.mode-button.active { background: var(--violet); color: white; }
.workspace { max-width: 1480px; margin: 0 auto 76px; padding: 0 clamp(20px, 5vw, 78px); display: grid; grid-template-columns: 265px minmax(0, 1fr); gap: clamp(25px, 5vw, 72px); align-items: start; }
.filters-panel { position: sticky; top: 95px; border-radius: 18px; background: rgba(255,255,255,.64); border: 1px solid rgba(104,70,154,.13); padding: 22px 19px; box-shadow: 0 12px 35px rgba(62,28,122,.06); }
.filter-heading { display: flex; justify-content: space-between; align-items: flex-start; }
.filter-heading h2, .timeline-head h2 { font-size: 1.38rem; }
.clear-button { padding: 3px; font-size: .74rem; }
.search-field { border-radius: 10px; background: #fbf9fd; border: 1px solid #ddd2e7; display: flex; align-items: center; gap: 7px; padding: 0 10px; margin: 21px 0; color: var(--muted); }
.search-field:focus-within { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(97,50,185,.1); }
.search-field input { border: 0; outline: 0; width: 100%; padding: 10px 0; background: transparent; font-size: .86rem; }
.filter-section { border-top: 1px solid #e8e0ee; padding-top: 18px; margin-top: 16px; }
.filter-label, .field-label { display: block; font-size: .76rem; font-weight: 700; color: var(--ink); margin: 0 0 10px; }
.feeling-filter-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.feeling-filter { background: #fffdfa; border: 1px solid #e0d5e9; padding: 6px 7px; border-radius: 100px; font-size: .71rem; color: #5c536a; }
.feeling-filter.selected { color: var(--violet-dark); border-color: var(--violet); background: var(--lavender); font-weight: 700; }
select { border-radius: 9px; padding: 9px; width: 100%; background: white; border: 1px solid #ded3e7; color: var(--ink); font-size: .84rem; outline: none; }
.filter-note { font-size: .74rem; line-height: 1.45; border-top: 1px solid #e8e0ee; margin-top: 21px; padding-top: 16px; color: var(--muted); }
.filter-note span { color: var(--violet); padding-right: 4px; }
.timeline-panel { min-width: 0; }
.timeline-head { display: flex; justify-content: space-between; align-items: end; gap: 15px; margin-top: 5px; }
.results-count { margin: 0; color: var(--muted); font-size: .82rem; text-align: right; }
.timeline-legend { color: var(--muted); font-size: .74rem; margin-top: 13px; }
.legend-dot { display: inline-block; width: 7px; height: 7px; background: var(--pink); border-radius: 50%; vertical-align: middle; margin-right: 4px; }
.timeline-scroll { margin-top: 22px; border: 1px solid rgba(104,70,154,.13); background: rgba(255,255,255,.55); border-radius: 18px; overflow: auto; box-shadow: var(--shadow); }
.timeline { position: relative; width: 100%; min-width: 620px; min-height: 650px; padding: 0 33px; }
.timeline-axis { position: absolute; width: 2px; top: 37px; bottom: 37px; left: 50%; transform: translateX(-50%); background: linear-gradient(to bottom, var(--violet), var(--pink), var(--peach)); opacity: .8; }
.timeline-node { position: absolute; width: calc(50% - 35px); z-index: 2; text-align: right; transform: translateY(-50%); }
.timeline-node.right { left: calc(50% + 35px); text-align: left; }
.timeline-node.left { right: calc(50% + 35px); }
.timeline-node::after { content: ""; position: absolute; width: 11px; height: 11px; border-radius: 50%; top: calc(50% - 5px); background: var(--node-color, var(--pink)); border: 3px solid var(--cream); box-shadow: 0 0 0 2px var(--node-color, var(--pink)); }
.timeline-node.left::after { right: -41px; }
.timeline-node.right::after { left: -41px; }
.node-card { display: inline-flex; max-width: 100%; gap: 11px; align-items: center; border: 0; padding: 12px 14px; border-radius: 12px; color: var(--ink); background: #fffdfa; box-shadow: 0 5px 13px rgba(48,26,88,.075); text-align: left; transition: transform .16s ease, box-shadow .16s ease; }
.timeline-node.left .node-card { text-align: right; flex-direction: row-reverse; }
.node-card:hover, .node-card:focus-visible { transform: translateY(-2px); outline: none; box-shadow: 0 9px 20px rgba(61,30,113,.17); }
.node-card:focus-visible { box-shadow: 0 0 0 3px rgba(97,50,185,.25); }
.node-feelings { flex: 0 0 auto; font-size: 1.09rem; letter-spacing: -5px; padding-right: 4px; }
.timeline-node.left .node-feelings { padding: 0 0 0 4px; }
.node-text { min-width: 0; }.node-date { font-family: "DM Mono", monospace; color: var(--violet); font-size: .64rem; text-transform: uppercase; white-space: nowrap; }.node-title { display: block; max-width: 220px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin-top: 3px; font-weight: 700; font-size: .89rem; }
.timeline-anchor { position: absolute; left: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 8px; color: var(--ink); font-family: "DM Mono", monospace; font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; white-space: nowrap; z-index: 3; }
.timeline-anchor::before { content: ""; width: 13px; height: 13px; border-radius: 50%; border: 3px solid var(--cream); background: var(--violet); box-shadow: 0 0 0 2px var(--violet); }.timeline-anchor.now::before { background: var(--pink); box-shadow: 0 0 0 2px var(--pink); }
.timeline-anchor.bottom { flex-direction: row-reverse; }.timeline-empty { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(320px, 80%); text-align: center; color: var(--muted); }.timeline-empty div { font-size: 2rem; color: var(--violet); }.timeline-empty p { line-height: 1.5; font-size: .9rem; }.timeline-empty button { margin-top: 8px; }
.modal { border: 0; padding: 0; max-width: min(660px, calc(100vw - 28px)); width: 100%; max-height: min(865px, calc(100vh - 30px)); overflow: auto; border-radius: 19px; background: #fffcf7; color: var(--ink); box-shadow: 0 25px 70px rgba(35,19,66,.28); }.modal::backdrop { background: rgba(34,21,61,.42); backdrop-filter: blur(3px); }.modal form, .detail-modal > div, .detail-modal > .modal-head { padding-left: clamp(21px, 4vw, 34px); padding-right: clamp(21px, 4vw, 34px); }.modal form { padding-top: 29px; padding-bottom: 25px; }.modal-head { padding-top: 27px; display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }.modal-head h2 { font-family: "Playfair Display", serif; font-size: 2rem; line-height: 1.02; }.close-button { flex: 0 0 auto; border: 1px solid #ded3e7; border-radius: 50%; background: white; color: var(--violet); width: 32px; height: 32px; font-size: 24px; line-height: 22px; }.close-button:hover { background: var(--lavender); }.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }.date-grid { align-items: end; }.precision-fieldset { grid-column: 1 / -1; border: 0; padding: 0; margin: 0; }.precision-fieldset legend, .feelings-fieldset legend { font-size: .76rem; font-weight: 700; margin-bottom: 9px; }.segmented-control { display: inline-flex; border: 1px solid #ddd2e7; border-radius: 9px; overflow: hidden; }.segmented-control label { cursor: pointer; padding: 7px 10px; font-size: .78rem; border-right: 1px solid #ddd2e7; }.segmented-control label:last-child { border: 0; }.segmented-control label:has(input:checked) { color: white; background: var(--violet); font-weight: 700; }.segmented-control input { position: absolute; opacity: 0; }.form-field { display: block; color: var(--ink); font-size: .77rem; font-weight: 700; margin-top: 19px; }.form-field input, .form-field textarea { margin-top: 7px; border: 1px solid #d9cfe4; border-radius: 9px; outline: none; width: 100%; padding: 10px 11px; color: var(--ink); background: white; font-weight: 400; font-size: .9rem; }.form-field textarea { resize: vertical; min-height: 95px; line-height: 1.45; }.form-field input:focus, .form-field textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(97,50,185,.1); }.optional { color: var(--muted); font-size: .7rem; font-weight: 400; }.hidden { display: none; }.feelings-fieldset { border: 0; padding: 0; margin: 20px 0 0; }.feelings-fieldset > p { margin: -2px 0 10px; color: var(--muted); font-size: .77rem; }.feeling-selector { display: flex; flex-wrap: wrap; gap: 7px; }.feeling-option { border: 1px solid #dfd5e7; border-radius: 100px; color: var(--ink); background: white; padding: 7px 9px; font-size: .78rem; }.feeling-option.selected { background: var(--lavender); border-color: var(--violet); color: var(--violet-dark); font-weight: 700; }.intensity-row { margin-top: 22px; padding: 15px; border-radius: 11px; background: #f4eeff; display: flex; align-items: center; justify-content: space-between; gap: 18px; }.intensity-row .field-label { margin-bottom: 2px; }.intensity-row span { font-size: .75rem; color: var(--muted); }.intensity-control { display: flex; gap: 6px; align-items: center; }.intensity-control input { accent-color: var(--violet); width: 105px; }.intensity-control output { display: grid; place-items: center; background: var(--violet); color: white; font-weight: 700; font-size: .75rem; width: 23px; height: 23px; border-radius: 50%; }.attachment-section { margin-top: 22px; padding-top: 19px; border-top: 1px solid #e4dce9; }.attachment-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }.attachment-help { margin: -4px 0 0; color: var(--muted); font-size: .72rem; max-width: 330px; line-height: 1.4; }.secondary-button, .danger-button { border-radius: 9px; background: white; border: 1px solid #cfc1df; padding: 9px 12px; color: var(--violet); font-size: .8rem; font-weight: 700; white-space: nowrap; }.secondary-button:hover { background: var(--lavender); }.attachment-heading .secondary-button { cursor: pointer; }.attachment-heading input { display: none; }.attachment-list { list-style: none; padding: 0; margin: 13px 0 0; }.attachment-item { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-top: 1px solid #eee8f2; font-size: .78rem; }.attachment-icon { font-size: 1.1rem; }.attachment-name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.attachment-size { color: var(--muted); font-size: .7rem; }.attachment-remove { color: #b33864; border: 0; background: transparent; font-size: .72rem; padding: 4px; }.form-error { color: #b32459; font-size: .8rem; min-height: 1.15em; margin: 15px 0 0; }.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 9px; border-top: 1px solid #e7e0eb; margin-top: 19px; padding-top: 18px; }.detail-modal { padding-bottom: 26px; }.detail-modal #detail-content { padding-top: 23px; }.detail-description { white-space: pre-wrap; color: #4f445c; line-height: 1.65; margin: 0; }.detail-feelings { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 19px; }.detail-feeling { background: var(--lavender); color: var(--violet-dark); border-radius: 100px; padding: 6px 9px; font-size: .76rem; font-weight: 700; }.detail-intensity { font-size: .8rem; color: var(--muted); margin: 0 0 19px; }.detail-intensity strong { color: var(--violet); letter-spacing: 2px; }.detail-attachments { border-top: 1px solid #e7e0eb; margin-top: 21px; padding-top: 17px; }.detail-attachments h3 { font-size: .87rem; margin: 0 0 10px; }.detail-attachments ul { padding: 0; list-style: none; margin: 0; }.detail-attachments a { color: var(--violet); display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: .84rem; font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 3px; }.detail-actions { padding-top: 24px; display: flex; justify-content: space-between; margin-top: 24px; border-top: 1px solid #e7e0eb; }.danger-button { color: #b32459; border-color: #f0b4c7; }.danger-button:hover { background: #fff0f4; }.settings-modal form { padding-top: 29px; }.settings-copy { color: var(--muted); line-height: 1.55; font-size: .88rem; margin: 18px 0 0; }.welcome-modal { max-width: 480px; padding: 38px; text-align: center; }.welcome-star { font-size: 2.7rem; color: var(--violet); }.welcome-modal h2 { font-family: "Playfair Display", serif; font-size: 2.3rem; line-height: 1.05; }.welcome-modal > p:not(.eyebrow):not(.privacy-reminder) { color: var(--muted); line-height: 1.55; }.full-button { width: 100%; margin-top: 10px; }.privacy-reminder { margin: 17px 0 0; font-size: .71rem; line-height: 1.4; color: var(--muted); }.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 100px); background: var(--ink); color: white; padding: 11px 15px; border-radius: 10px; font-size: .82rem; box-shadow: 0 12px 28px rgba(25,14,43,.2); z-index: 40; opacity: 0; transition: transform .25s ease, opacity .25s ease; }.toast.visible { transform: translate(-50%, 0); opacity: 1; }
@media (max-width: 830px) { .site-header { height: 64px; padding: 0 16px; }.site-header .text-button { display: none; }.brand { font-size: .9rem; }.header-actions { gap: 5px; }.primary-button.compact { font-size: .75rem; padding: 9px 10px; }.hero { padding: 56px 22px 35px; }.hero-copy { align-items: flex-start; flex-direction: column; gap: 25px; }.hero-stat { margin: 0; }.mode-switch { margin-top: 30px; flex-wrap: wrap; }.workspace { display: block; padding: 0 16px; }.filters-panel { position: static; margin-bottom: 26px; }.timeline { min-width: 560px; }.timeline-panel { overflow: visible; } }
@media (max-width: 540px) { .icon-button { display: none; }.hero { padding-top: 45px; }.mode-switch > span { width: 100%; }.mode-button { font-size: .72rem; }.form-grid { grid-template-columns: 1fr; }.timeline-scroll { margin-left: -16px; margin-right: -16px; border-radius: 12px; }.timeline { min-width: 500px; }.node-card { padding: 10px; }.node-title { max-width: 145px; }.modal-head h2 { font-size: 1.65rem; }.welcome-modal { padding: 30px 23px; } }

.auth-modal { max-width: 460px; padding: 38px; text-align: center; }
.auth-modal h2 { font-family: "Playfair Display", serif; font-size: 2.3rem; line-height: 1.05; }
.auth-modal > p:not(.eyebrow):not(.privacy-reminder) { color: var(--muted); line-height: 1.55; }
.auth-modal form { padding: 0; text-align: left; }
.auth-modal .form-field { text-align: left; }
.auth-modal .full-button, .auth-modal .form-error { text-align: center; }
