Kintsugi-Garden / frontend /journal.css
ai-sherpa's picture
Journal: center mandala in reading column
b7f84ac verified
Raw
History Blame Contribute Delete
27.1 kB
/* journal.css β€” sidebar-layout journal styles.
*
* The --kg-* kintsugi palette tokens are declared here directly. The
* mounted Gradio Blocks UI at /app/ has its own copy in kintsugi.css;
* keep the two in sync when palette values change.
*/
:root {
--kg-gold: #BF953F;
--kg-gold-deep: #8C6A1F;
--kg-paper: #F4EFE4;
--kg-paper-deep: #EAE2D0;
--kg-paper-deeper: #DDD3BD;
--kg-ink: #2B2622;
--kg-ink-soft: #6F6558;
--kg-crack: #D9C99A;
color-scheme: light;
}
/* Belt-and-braces: HTML5 [hidden] should map to display:none, but flex
* and grid containers can ignore that on some engines. Force it. */
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html, body {
margin: 0; background: var(--kg-paper); color: var(--kg-ink);
font-family: "Iowan Old Style", Georgia, "Times New Roman", serif;
font-size: 16px; line-height: 1.55;
}
/* ── Top band ──────────────────────────────────────────────── */
.j-band {
display: flex; align-items: center; gap: 14px;
padding: 14px 22px;
background: var(--kg-paper);
border-bottom: 1px solid var(--kg-crack);
position: sticky; top: 0; z-index: 10;
}
.j-band::after {
content: ""; position: absolute; left: 0; bottom: -1px;
width: 120px; height: 2px; background: var(--kg-gold);
}
.j-mark { flex: 0 0 36px; }
.j-mark svg { display: block; width: 100%; height: auto; }
.j-title h1 {
font-size: 1.2rem; font-weight: 500; margin: 0; letter-spacing: -0.01em;
}
.j-title p {
margin: 0; font-style: italic; font-size: 0.78rem; color: var(--kg-ink-soft);
}
/* ── Three-column layout ───────────────────────────────────── */
.j-shell {
display: grid;
grid-template-columns: minmax(0, 260px) minmax(0, 1fr) minmax(0, 280px);
min-height: calc(100vh - 64px);
}
.j-sidebar {
background: var(--kg-paper-deep);
border-right: 1px solid var(--kg-crack);
padding: 18px 0;
overflow-y: auto;
}
.j-main {
padding: 28px 36px 60px;
}
/* Centre the compose form + reading panel as one balanced column within
* the (full-width) grid cell, instead of letting them sit flush-left.
* Both are direct children of .j-main; sharing a max-width + auto margins
* keeps the entry field, controls, and streamed reading vertically aligned. */
#j-compose,
#j-reading-panel {
max-width: 720px;
margin-inline: auto;
}
.j-soulmap {
border-left: 1px solid var(--kg-crack);
background: var(--kg-paper-deep);
}
/* Sticky rail: stays in view as the reading scrolls. The 64px offset
* matches the .j-band sticky header (14px padding + ~36px svg). */
.j-soulmap-inner {
position: sticky;
top: 64px;
padding: 22px 18px 28px;
max-height: calc(100vh - 64px);
overflow-y: auto;
}
/* ── Sidebar: entries list ─────────────────────────────────── */
.j-side-action {
padding: 0 18px 14px;
border-bottom: 1px solid var(--kg-crack);
margin-bottom: 14px;
}
.j-side-action button {
width: 100%; background: var(--kg-gold); color: var(--kg-paper);
border: none; padding: 9px 14px; font-family: inherit;
font-size: 0.92rem; letter-spacing: 0.02em; cursor: pointer;
box-shadow: 0 1px 0 var(--kg-gold-deep);
}
.j-side-action button:hover { background: var(--kg-gold-deep); }
.j-day-label {
font-family: "SF Mono", "JetBrains Mono", ui-monospace, monospace;
font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase;
color: var(--kg-ink-soft); padding: 10px 18px 4px;
}
.j-entry {
display: block; width: 100%;
padding: 13px 18px 14px; /* was: 10px 18px */
cursor: pointer;
background: transparent; border: none; text-align: left;
border-left: 3px solid transparent;
font-family: inherit; color: var(--kg-ink);
transition: background 0.12s, border-color 0.12s;
}
.j-entry:hover { background: var(--kg-paper-deeper); }
.j-entry.is-active {
background: var(--kg-paper-deeper);
border-left-color: var(--kg-gold);
}
.j-entry-row {
display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px;
}
.j-entry-time {
font-family: "SF Mono", monospace; font-size: 0.72rem;
color: var(--kg-ink-soft); flex: 0 0 auto;
}
.j-entry-chip {
font-family: "SF Mono", monospace; font-size: 0.62rem;
letter-spacing: 0.04em; color: var(--kg-gold-deep);
border: 1px solid var(--kg-crack); padding: 0 5px; border-radius: 2px;
background: var(--kg-paper);
}
.j-entry-preview {
font-size: 0.86rem; color: var(--kg-ink);
display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
overflow: hidden; line-height: 1.4;
}
.j-empty {
padding: 36px 22px; text-align: center;
color: var(--kg-ink-soft); font-style: italic; font-size: 0.86rem;
}
/* ── Sidebar footer (export) ────────────────────────────────── */
.j-side-footer {
padding: 14px 18px; border-top: 1px solid var(--kg-crack);
margin-top: 14px;
}
.j-side-footer button {
width: 100%; background: transparent; color: var(--kg-ink-soft);
border: 1px solid var(--kg-crack); padding: 6px 8px;
font-family: "SF Mono", monospace; font-size: 0.72rem;
letter-spacing: 0.04em; cursor: pointer;
}
.j-side-footer button:hover { color: var(--kg-ink); border-color: var(--kg-gold); }
.j-side-footer .j-footer-note {
font-size: 0.66rem; color: var(--kg-ink-soft);
font-style: italic; margin-top: 8px; line-height: 1.4;
}
/* ── Sidebar: About the Garden (framing material) ────────────
* The "Why this exists" paragraphs in journal.html are the in-app
* surface of WHY.md at the repo root. The 60px gold accent +
* monospace caps heading echo the section-divider signature used
* elsewhere; right-flush chevron uses CSS-only rotation on [open].
*/
.j-about {
padding: 18px 18px 22px;
margin-top: 14px;
border-top: 1px solid var(--kg-crack);
position: relative;
}
.j-about::before {
content: "";
position: absolute;
top: -1px; left: 0;
width: 60px; height: 2px;
background: var(--kg-gold);
}
.j-about h2 {
font-family: "SF Mono", "JetBrains Mono", ui-monospace, monospace;
font-size: 0.68rem;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--kg-ink-soft);
font-weight: 500;
margin: 0 0 6px;
}
.j-about-item {
border-bottom: 1px solid var(--kg-crack);
}
.j-about-item:last-of-type {
border-bottom: none;
}
.j-about-item summary {
list-style: none;
cursor: pointer;
padding: 10px 0;
font-size: 0.86rem;
color: var(--kg-ink);
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.j-about-item summary::-webkit-details-marker { display: none; }
.j-about-item summary::after {
content: "β—€";
color: var(--kg-ink-soft);
font-size: 0.72rem;
transition: transform 0.18s ease;
flex: 0 0 auto;
}
.j-about-item[open] summary::after {
transform: rotate(-90deg);
}
.j-about-item summary:hover { color: var(--kg-gold-deep); }
.j-about-item summary:focus-visible {
outline: 2px solid var(--kg-gold);
outline-offset: 2px;
}
.j-about-body {
padding: 2px 0 14px;
font-size: 0.8rem;
line-height: 1.55;
color: var(--kg-ink);
}
.j-about-body p { margin: 0 0 0.7em; }
.j-about-body p:last-child { margin-bottom: 0; }
/* Inline demo video β€” compact, sits in the sidebar's About panel. */
.j-demo-video {
display: block;
width: 100%;
margin-top: 8px;
border-radius: 4px;
background: var(--kg-ink);
box-shadow: 0 1px 3px rgba(43, 38, 34, 0.18);
cursor: pointer;
}
/* Lightbox dialog. Native <dialog> handles ESC + backdrop focus. */
.j-demo-dialog {
border: none;
padding: 0;
background: var(--kg-paper);
color: var(--kg-ink);
border-radius: 6px;
box-shadow: 0 18px 48px rgba(43, 38, 34, 0.45);
width: 60vw;
max-width: 1100px;
/* Keep room for browser controls + a bit of breathing room. */
max-height: 80vh;
/* Position via margin auto inside fixed; modern browsers center
* dialogs by default once .showModal() is called. */
}
.j-demo-dialog::backdrop {
background: rgba(43, 38, 34, 0.62);
backdrop-filter: blur(2px);
}
.j-demo-dialog video {
display: block;
width: 100%;
height: auto;
max-height: 78vh;
background: var(--kg-ink);
border-radius: 6px;
}
.j-demo-close {
position: absolute;
top: 8px;
right: 10px;
width: 32px;
height: 32px;
border: none;
border-radius: 50%;
background: var(--kg-paper-deep);
color: var(--kg-ink);
font-size: 1.4rem;
line-height: 1;
cursor: pointer;
z-index: 2;
box-shadow: 0 1px 4px rgba(43, 38, 34, 0.3);
}
.j-demo-close:hover {
background: var(--kg-gold);
color: var(--kg-paper);
}
.j-demo-close:focus-visible {
outline: 2px solid var(--kg-gold);
outline-offset: 2px;
}
@media (max-width: 720px) {
.j-demo-dialog {
width: 94vw;
max-height: 76vh;
}
.j-demo-dialog video {
max-height: 70vh;
}
}
/* ── Archetype glossary: clickable token + lightbox ────────── */
/* Archetype names in the Soul Map become buttons. They inherit the
* surrounding text style (serif theme rows, italic sublabels) and add a
* dotted-underline affordance that gilds on hover/focus. */
.j-arch {
font: inherit;
color: inherit;
background: none;
border: none;
padding: 0;
margin: 0;
vertical-align: baseline;
cursor: pointer;
border-bottom: 1px dotted var(--kg-crack);
transition: color 160ms ease, border-color 160ms ease;
}
.j-arch:hover { color: var(--kg-gold-deep); border-bottom-color: var(--kg-gold); }
.j-arch:focus-visible {
outline: 2px solid var(--kg-gold);
outline-offset: 2px;
border-radius: 2px;
}
.j-glossary-dialog {
border: none;
padding: 0;
background: var(--kg-paper);
color: var(--kg-ink);
border-radius: 6px;
box-shadow: 0 18px 48px rgba(43, 38, 34, 0.45);
width: 52vw;
max-width: 720px;
max-height: 86vh;
}
.j-glossary-dialog::backdrop {
background: rgba(43, 38, 34, 0.62);
backdrop-filter: blur(2px);
}
.j-gloss-inner {
padding: 30px 34px 28px;
overflow-y: auto;
max-height: 86vh;
}
.j-gloss-title {
font-family: Georgia, "Times New Roman", serif;
font-size: 1.9rem;
font-weight: 600;
color: var(--kg-ink);
margin: 0 0 10px;
}
.j-gloss-badge {
display: inline-block;
font-family: "SF Mono", "JetBrains Mono", ui-monospace, monospace;
font-size: 0.62rem;
letter-spacing: 0.08em;
text-transform: uppercase;
padding: 3px 9px;
border-radius: 3px;
margin-bottom: 16px;
border: 1px solid var(--kg-crack);
color: var(--kg-ink-soft);
background: var(--kg-paper-deep);
}
/* Genuine-Jung archetypes get the gold badge; everything else stays
* muted β€” the UI is honest about provenance. */
.j-gloss-badge.prov-jung,
.j-gloss-badge.prov-dual {
color: var(--kg-paper);
background: var(--kg-gold-deep);
border-color: var(--kg-gold-deep);
}
.j-gloss-def {
font-size: 1.02rem;
line-height: 1.6;
color: var(--kg-ink);
margin: 0 0 18px;
}
.j-gloss-video-wrap { margin: 0 0 18px; }
.j-gloss-video-wrap video {
display: block;
width: 100%;
height: auto;
background: var(--kg-ink);
border-radius: 6px;
}
.j-gloss-cite {
font-size: 0.78rem;
font-style: italic;
color: var(--kg-ink-soft);
margin: 0;
padding-top: 12px;
border-top: 1px solid var(--kg-crack);
}
@media (max-width: 720px) {
.j-glossary-dialog { width: 94vw; max-width: none; }
.j-gloss-inner { padding: 24px 20px 22px; }
.j-gloss-title { font-size: 1.6rem; }
}
/* ── Soul Map overlay dialog ───────────────────────────────── */
.j-soulmap-dialog {
border: none;
padding: 0;
background: var(--kg-paper);
color: var(--kg-ink);
border-radius: 6px;
box-shadow: 0 18px 48px rgba(43, 38, 34, 0.45);
width: 70vw;
max-width: 760px;
max-height: 90vh;
}
.j-soulmap-dialog::backdrop {
background: rgba(43, 38, 34, 0.62);
backdrop-filter: blur(2px);
}
.j-soulmap-dialog-inner {
padding: 30px 34px 28px;
overflow-y: auto;
max-height: 90vh;
}
.j-soulmap-dialog-title {
font-family: Georgia, "Times New Roman", serif;
font-size: 1.7rem;
font-weight: 600;
color: var(--kg-ink);
margin: 0 0 16px;
text-align: center;
}
.j-soulmap-overlay-star {
max-width: 520px;
margin: 0 auto 20px;
}
.j-star-label-fo { overflow: visible; }
.j-star-label-wrap {
font-family: Georgia, "Times New Roman", serif;
font-size: 0.78rem;
color: var(--kg-ink);
line-height: 1.2;
}
.j-soulmap-dialog-lists { margin-top: 18px; }
@media (max-width: 720px) {
.j-soulmap-dialog { width: 94vw; max-width: none; }
}
/* ── Right rail: Soul Map ────────────────────────────────────
* Mirrors the kg-soul-acc Accordion at /app/ (app.py). Symbol +
* theme rows are derived client-side from localStorage entries by
* journal.js: buildSoulMapData(). When extract_symbols' return
* shape changes in app.py, the buildSoulMapData reducer needs to
* change in step.
*/
.j-soulmap-heading {
font-family: "SF Mono", "JetBrains Mono", ui-monospace, monospace;
font-size: 0.7rem;
letter-spacing: 0.14em;
text-transform: uppercase;
color: var(--kg-ink-soft);
font-weight: 500;
margin: 0 0 4px;
padding-top: 12px;
position: relative;
}
.j-soulmap-heading::before {
content: "";
position: absolute;
top: 0; left: 0;
width: 48px; height: 2px;
background: var(--kg-gold);
}
.j-soulmap-intro {
font-size: 0.74rem;
color: var(--kg-ink-soft);
font-style: italic;
line-height: 1.5;
margin: 0 0 18px;
}
.j-soulmap-sub {
font-family: "SF Mono", "JetBrains Mono", ui-monospace, monospace;
font-size: 0.66rem;
letter-spacing: 0.10em;
text-transform: uppercase;
color: var(--kg-gold-deep);
font-weight: 500;
margin: 18px 0 6px;
padding-bottom: 4px;
border-bottom: 1px solid var(--kg-crack);
}
.j-soulmap-section { font-size: 0.82rem; }
.j-soulmap-empty {
color: var(--kg-ink-soft);
font-style: italic;
font-size: 0.78rem;
margin: 6px 0 0;
}
/* Symbol/theme rows (Direction A + B): the name leads, a row of small gold
* tally marks encodes how many entries it appeared in, the archetype subline
* (symbols only) sits beneath, and a gold "kintsugi seam" gilds part of the
* dotted crack at the row's foot β€” wider the more the symbol has returned.
* The seam width is set per-row via the inline --fill var in journal.js
* renderSoulMap(); the dotted border below is the unfilled remainder of the
* crack. */
.j-soulmap-row {
position: relative;
padding: 8px 0 11px;
border-bottom: 1px dotted var(--kg-crack);
}
.j-soulmap-row:last-child { border-bottom: none; }
.j-soulmap-row::after {
content: "";
position: absolute;
left: 0; bottom: -1px;
height: 2px;
width: var(--fill, 0%);
background: linear-gradient(90deg, var(--kg-gold-deep), var(--kg-gold));
border-radius: 1px;
transition: width 700ms ease;
}
.j-soulmap-head {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 10px;
}
.j-soulmap-name {
color: var(--kg-ink);
line-height: 1.35;
}
/* Gold tally marks β€” small, restrained, never wrapping. */
.j-soulmap-marks {
flex: 0 0 auto;
color: var(--kg-gold);
font-size: 0.62rem;
letter-spacing: 2px;
line-height: 1;
white-space: nowrap;
}
.j-soulmap-over {
color: var(--kg-gold-deep);
font-style: italic;
font-size: 0.62rem;
letter-spacing: 0;
margin-left: 4px;
}
.j-soulmap-themes {
display: block;
font-size: 0.7rem;
color: var(--kg-ink-soft);
font-style: italic;
margin-top: 3px;
line-height: 1.35;
}
/* Screen-reader-only exact count (the marks above are decorative). */
.visually-hidden {
position: absolute !important;
width: 1px; height: 1px;
padding: 0; margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
/* ── Soul Map star: signature (rail) + shared star primitives ──────
* Colors derive from --kg-* tokens via color-mix() keyed to a per-element
* --t custom property (0..1 intensity, set inline by journal.js). No JS
* branching is needed for the four data-phase themes β€” color-mix resolves
* against whatever --kg-gold / --kg-gold-deep the active phase defines. */
.j-soulmap-signature {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
width: 100%;
background: none;
border: 1px solid transparent;
border-radius: 6px;
padding: 12px 8px;
cursor: pointer;
font: inherit;
color: inherit;
}
.j-soulmap-signature:hover { border-color: var(--kg-crack); }
.j-soulmap-signature:focus-visible {
outline: 2px solid var(--kg-gold);
outline-offset: 2px;
}
.j-soulmap-sig-svg { display: block; width: 100%; max-width: 220px; }
.j-soulmap-caption {
font-size: 0.74rem;
color: var(--kg-ink-soft);
font-style: italic;
text-align: center;
line-height: 1.4;
}
.j-soulmap-expand {
font-family: "SF Mono", "JetBrains Mono", ui-monospace, monospace;
font-size: 0.62rem;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--kg-gold-deep);
}
.j-star-svg { width: 100%; height: auto; display: block; overflow: visible; }
.j-star-ring {
fill: none;
stroke: var(--kg-crack);
stroke-width: 0.6;
stroke-dasharray: 2 4;
opacity: 0.6;
}
.j-star-spoke {
/* count -> intensity ramp: lighter crack at low --t, deep gold at high. */
stroke: color-mix(in srgb, var(--kg-gold-deep) calc(var(--t, 0) * 100%), var(--kg-crack));
stroke-width: calc(1 + var(--t, 0) * 1.4);
stroke-linecap: round;
}
.j-star-tip {
fill: color-mix(in srgb, var(--kg-gold-deep) calc(var(--t, 0) * 100%), var(--kg-gold));
}
.j-star-symbol {
fill: var(--kg-paper);
stroke: color-mix(in srgb, var(--kg-gold-deep) calc(var(--t, 0) * 100%), var(--kg-gold));
stroke-width: 1;
}
.j-star-core { fill: var(--kg-gold); }
/* Overlay labels are HTML inside <foreignObject>, so the count tints with
* `color`, not the SVG `fill`. */
.j-star-count { color: var(--kg-gold-deep); }
@media (prefers-reduced-motion: reduce) {
.j-soulmap-row::after { transition: none; }
.j-star-svg, .j-star-symbol, .j-star-spoke { animation: none !important; }
}
/* ── Main column: compose form (visible only in compose mode) ─ */
#j-compose { margin-bottom: 28px; }
.j-field-label {
display: inline-block; font-family: "SF Mono", monospace;
font-size: 0.68rem; letter-spacing: 0.04em; color: var(--kg-ink-soft);
margin-bottom: 4px;
}
#j-entry-text {
width: 100%; background: var(--kg-paper-deep);
border: 1px solid var(--kg-crack); padding: 12px;
font-family: inherit; font-size: 1rem; color: var(--kg-ink);
line-height: 1.55; min-height: 110px;
}
#j-entry-text:focus { outline: 2px solid var(--kg-gold); outline-offset: 1px; }
.j-controls {
display: grid; gap: 12px; align-items: end; margin-top: 12px;
/* Two checkbox columns get more room; Type/Depth stay compact; button
sits at the end. Below 980px we collapse to two columns. */
grid-template-columns: minmax(0, auto) minmax(0, auto) minmax(0, 1fr) minmax(0, 1fr) auto;
}
@media (max-width: 980px) {
.j-controls {
grid-template-columns: 1fr 1fr;
}
.j-controls .j-primary { grid-column: 1 / -1; justify-self: end; }
}
.j-controls > label { display: flex; flex-direction: column; }
.j-controls select, .j-controls input[type="range"] {
background: var(--kg-paper-deep); border: 1px solid var(--kg-crack);
padding: 6px; font-family: inherit; font-size: 0.92rem; color: var(--kg-ink);
}
.j-checkbox { flex-direction: row !important; align-items: center; gap: 6px; font-size: 0.86rem; }
.j-primary {
background: var(--kg-gold); color: var(--kg-paper);
border: none; padding: 9px 26px; font-family: inherit;
font-size: 0.96rem; letter-spacing: 0.02em; cursor: pointer;
box-shadow: 0 1px 0 var(--kg-gold-deep);
}
.j-primary:hover { background: var(--kg-gold-deep); }
.j-primary:disabled { opacity: 0.6; cursor: progress; }
.j-hint {
font-family: "SF Mono", monospace; font-size: 0.68rem;
color: var(--kg-ink-soft); margin-top: 6px;
}
/* ── Main column: reading panel (visible always) ───────────── */
#j-reading-panel {
border-top: 1px solid var(--kg-crack); padding-top: 24px;
}
.j-reading-head {
display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px;
}
.j-reading-date {
font-family: "SF Mono", monospace; font-size: 0.78rem;
color: var(--kg-ink-soft); letter-spacing: 0.04em;
}
.j-reading-back {
margin-left: auto; background: transparent; border: none;
color: var(--kg-gold-deep); cursor: pointer;
font-family: "SF Mono", monospace; font-size: 0.78rem;
text-decoration: underline; padding: 0;
}
.j-reading-back:hover { color: var(--kg-ink); }
.j-reading-back[hidden] { display: none; }
.j-quoted {
background: var(--kg-paper-deep);
border-left: 2px solid var(--kg-gold);
padding: 10px 14px;
margin-bottom: 22px;
font-style: italic; color: var(--kg-ink);
white-space: pre-wrap;
}
.j-section {
border-left: 2px solid var(--kg-gold);
padding: 0 0 0 14px; margin-bottom: 16px;
}
.j-section h2 {
font-size: 1.05rem; font-weight: 500; color: var(--kg-gold-deep);
letter-spacing: 0.02em; margin: 0 0 6px;
}
.j-section-body { font-size: 0.96rem; line-height: 1.7; }
.j-section-body p { margin: 0 0 0.6em; }
.j-section[hidden] { display: none; }
#j-mandala-wrap {
margin-top: 22px; max-width: 320px;
margin-inline: auto;
border: 1px solid var(--kg-crack); padding: 10px;
background: var(--kg-paper);
box-shadow: 0 0 0 6px var(--kg-paper), 0 0 0 7px var(--kg-gold);
}
#j-mandala { display: block; width: 100%; margin-inline: auto; }
#j-mandala-wrap[hidden] { display: none; }
#j-mandala-wrap figcaption {
font-family: "SF Mono", monospace; font-size: 0.66rem;
color: var(--kg-ink-soft); text-align: center; margin-top: 6px;
}
.j-error {
margin: 14px 0; padding: 10px 14px;
background: var(--kg-paper-deep);
border-left: 2px solid var(--kg-gold-deep);
color: var(--kg-ink); font-style: italic;
}
.j-error[hidden] { display: none; }
.j-placeholder {
color: var(--kg-ink-soft); font-style: italic; text-align: center;
padding: 60px 0;
}
/* ── Tablet: drop the right rail below the main column ─────── */
@media (max-width: 1040px) {
.j-shell {
grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
grid-template-areas:
"sidebar main"
"sidebar soulmap";
}
.j-sidebar { grid-area: sidebar; }
.j-main { grid-area: main; }
.j-soulmap {
grid-area: soulmap;
border-left: none;
border-top: 1px solid var(--kg-crack);
}
.j-soulmap-inner {
position: static;
max-height: none;
}
}
/* ── Mobile: full single-column stack ─────────────────────── */
@media (max-width: 720px) {
.j-shell {
grid-template-columns: 1fr;
grid-template-areas:
"sidebar"
"main"
"soulmap";
}
.j-sidebar {
border-right: none;
border-bottom: 1px solid var(--kg-crack);
max-height: 220px;
}
.j-main { padding: 20px 18px 48px; }
.j-controls { grid-template-columns: 1fr 1fr; }
.j-soulmap-inner { padding: 18px 18px 28px; }
}
/* ────────────────────────────────────────────────────────────────
* XS+S visual pass β€” five treatments targeting the journal's
* pre-allocated .j-section slots.
* ──────────────────────────────────────────────────────────────── */
/* Treatment #1 β€” Drop cap on Mirror's first paragraph. */
.j-section[data-heading="Mirror"] .j-section-body p:first-child::first-letter {
initial-letter: 3 2;
-webkit-initial-letter: 3 2;
color: var(--kg-gold-deep);
font-style: italic;
font-family: "Iowan Old Style", Georgia, serif;
font-weight: 500;
margin-right: 0.10em;
padding-right: 0.06em;
line-height: 0.9;
}
/* Treatment #5 β€” Paper-grain texture overlay. */
body::before {
content: "";
position: fixed; inset: 0; pointer-events: none; z-index: 100;
background-image:
url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.07 0 0 0 0 0.05 0 0 0 0 0.02 0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
opacity: var(--kg-noise-opacity, 0.05);
mix-blend-mode: multiply;
}
/* Treatment #3 β€” Gold-seam decoration between consecutive sections. */
.j-section + .j-section {
position: relative;
margin-top: 14px;
}
.j-section + .j-section::before {
content: "";
display: block;
height: 14px;
margin: 0 0 14px;
margin-left: -14px; /* extend past the section's left padding */
background-image:
url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 12' preserveAspectRatio='none'><path d='M0,7 C140,3 280,10 420,5 S680,9 800,6' stroke='%23BF953F' stroke-width='1.2' fill='none' stroke-linecap='round' opacity='0.7'/></svg>");
background-repeat: no-repeat;
background-size: 100% 100%;
}
/* Treatment #7 β€” Per-section terminator glyphs. */
.j-section-body::after {
content: "⁂";
display: block;
text-align: center;
color: var(--kg-gold);
opacity: 0.45;
letter-spacing: 0.4em;
margin: 1.2em 0 0;
font-size: 0.85em;
}
.j-section[data-heading="Key Symbols"] .j-section-body::after,
.j-section[data-heading="Archetypal Themes"] .j-section-body::after {
content: "βΈ™";
letter-spacing: 0.2em;
}
.j-section[data-heading="Gentle Question"] .j-section-body::after {
content: "✦";
letter-spacing: 0;
opacity: 0.55;
}
/* Treatment #8 β€” Time-of-day adaptive palette.
* Phase detector lives in journal.js. */
:root, :root[data-phase="day"] {
--kg-noise-opacity: 0.05;
}
:root[data-phase="dawn"] {
--kg-paper: #F7EDDC;
--kg-paper-deep: #EFE0C4;
--kg-paper-deeper: #E4D3B2;
--kg-ink: #3A2D24;
--kg-ink-soft: #816E5A;
--kg-gold: #C9A055;
--kg-gold-deep: #94701F;
--kg-crack: #DEC79A;
--kg-noise-opacity: 0.05;
}
:root[data-phase="dusk"] {
--kg-paper: #EFE2C2;
--kg-paper-deep: #E2D1AA;
--kg-paper-deeper: #D5C397;
--kg-ink: #2F2519;
--kg-ink-soft: #6D5E48;
--kg-gold: #B68837;
--kg-gold-deep: #82601A;
--kg-crack: #C7AE7B;
--kg-noise-opacity: 0.06;
}
:root[data-phase="night"] {
--kg-paper: #1F1812;
--kg-paper-deep: #2A211A;
--kg-paper-deeper: #372C22;
--kg-ink: #E8DCC4;
--kg-ink-soft: #A8997D;
--kg-gold: #D4A857;
--kg-gold-deep: #B5893F;
--kg-crack: #5C4934;
--kg-noise-opacity: 0.07;
color-scheme: dark;
}
:root[data-phase="night"] body::before {
mix-blend-mode: screen;
}
html, body {
transition: background-color 400ms ease, color 400ms ease;
}