/* mark · the journal, read on the web
 *
 * v3 · 2026-09-25 · built around days (the redesign Mark approved on the
 * canvas "Mark web journal redesign"). The phone app's language, at desk size:
 * hearth's warm near-black, the system sans for everything you read, mono for
 * facts, ONE ember accent, and the display serif (Instrument Serif, the phone's
 * own) only on the date that is the page's subject — the month on the month,
 * the day on the day (Mark: "too much serif. Use it sparingly").
 */

.is-away { display: none !important; }

html[data-textsize="s"] { font-size: 15px; }
html[data-textsize="m"] { font-size: 16px; }
html[data-textsize="l"] { font-size: 17.5px; }
html[data-textsize="xl"] { font-size: 19px; }

body.in-journal {
  --bg: #0A0B0C;
  --card: #141517;
  --card2: #0E0F10;
  --ink: #F4F1EC;
  --ink2: #B3ADA6;
  --ink3: #8C877F;
  --ink4: #5F5B57;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.11);
  --accent-soft: rgba(226, 114, 76, 0.14);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, "IBM Plex Mono", monospace;
  background: var(--bg);
}
body.in-journal .page, body.in-journal .rail { font-family: var(--sans); }
/* The display voice follows the phone's own choice (Settings › appearance ›
   type style, sent in the meta record as `type`; 2026-09-25, Mark: "It
   doesn't look the same as the app"). Editorial — Instrument Serif ITALIC —
   is the app's default, so it is the web's default too. */
:root { --dface: "Instrument Serif", Georgia, serif; --dstyle: italic; --dweight: 400; --dtrack: -0.01em; }
html[data-display="classic"] { --dface: ui-serif, "New York", Georgia, serif; --dstyle: normal; --dweight: 400; --dtrack: -0.015em; }
html[data-display="modern"] { --dface: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif; --dstyle: normal; --dweight: 600; --dtrack: -0.035em; }
:root { --display: var(--dface); }
.jserif { font-family: var(--dface); font-style: var(--dstyle); font-weight: var(--dweight); letter-spacing: var(--dtrack); }
.jmono { font-family: var(--mono); font-size: 0.78rem; color: var(--ink3); letter-spacing: 0.01em; }
.jeyebrow {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.17em; text-transform: uppercase; color: var(--ink3);
}
.jeyebrow--accent { color: var(--ember); }

/* ── the rail ──────────────────────────────────────────────────────────── */
.jlock {
  width: 32px; height: 32px; margin-left: auto; margin-right: 6px; border-radius: 9px;
  border: 1px solid var(--line); color: var(--ink3); display: grid; place-items: center;
}
.jlock[hidden] { display: none; }
.jlock:hover { color: var(--ink); border-color: var(--line-strong); }
.jtojournal {
  display: flex; align-items: center; gap: 9px; width: calc(100% - 32px); height: 38px;
  margin: 0 16px 12px; padding: 0 12px; border-radius: 10px;
  background: rgba(226, 114, 76, 0.14); color: var(--ink); font-size: 0.88rem; font-weight: 600;
}
.jtojournal[hidden] { display: none; }
.jtojournal svg { color: var(--ember); }
.jrail { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 0 16px 16px; gap: 14px; }
.jrail[hidden] { display: none; }
.jwrite {
  height: 42px; border-radius: 21px; background: var(--ember); color: #1A0F0A; flex: none;
  font-size: 0.92rem; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.jwrite:hover { filter: brightness(1.06); }
.jsearch {
  height: 38px; border-radius: 10px; background: #131416; border: 1px solid var(--line); flex: none;
  display: flex; align-items: center; gap: 9px; padding: 0 12px; color: var(--ink3);
}
.jsearch:focus-within { border-color: rgba(226, 114, 76, 0.5); }
.jsearch input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--ink); font-size: 0.86rem; font-family: inherit; }
.jsearch input::placeholder { color: var(--ink4); }
.jsearch kbd { font-family: var(--mono); font-size: 0.66rem; color: var(--ink4); }
.jnav { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin: 0 -4px; padding: 0 4px; }
.jnav__i {
  display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 12px; border-radius: 10px;
  color: var(--ink2); font-size: 0.9rem; text-decoration: none; flex: none;
}
.jnav__i svg { color: var(--ink3); flex: none; }
.jnav__i:hover { background: rgba(255, 255, 255, 0.04); color: var(--ink); }
.jnav__i[aria-current] { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.jnav__i[aria-current] svg { color: var(--ember); }
.jnav__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jnav__n { font-family: var(--mono); font-size: 0.68rem; color: var(--ink3); font-weight: 400; }
.jnav__label { margin: 14px 12px 4px; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.17em; text-transform: uppercase; color: var(--ink3); }
.jnav__cover { width: 24px; height: 24px; border-radius: 6px; flex: none; background: #1D1E20 center / cover no-repeat; }
.jnav__cover--none { background: #26272A; }
.jfoot { display: flex; flex-direction: column; gap: 8px; flex: none; }
.jsync { padding: 12px; border-radius: 12px; background: #121315; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.jsync__line { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--ink2); }
.jsync__dot { width: 7px; height: 7px; border-radius: 4px; background: #6FBF8E; flex: none; }
.jsync__dot.is-busy { background: var(--ink4); animation: jpulse 1.4s ease-in-out infinite; }
.jsync__meta { font-family: var(--mono); font-size: 0.68rem; color: var(--ink3); }
.jsync__bar { height: 3px; border-radius: 2px; background: var(--line-strong); overflow: hidden; }
.jsync__bar span { display: block; height: 100%; background: var(--ink3); }
.jsync__hint { font-size: 0.72rem; line-height: 1.4; color: var(--ink3); }
@keyframes jpulse { 50% { opacity: 0.35; } }

/* ── the page ──────────────────────────────────────────────────────────── */
.journal { flex: 1; min-height: 0; display: flex; }
.journal[hidden] { display: none; }
.jview { flex: 1; min-width: 0; overflow-y: auto; }
.jnone { color: var(--ink3); padding: 24px 0; }
.jempty { max-width: 34rem; margin: 18vh auto; padding: 0 24px; }
.jempty__eyebrow { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.17em; text-transform: uppercase; color: var(--ember); }
.jempty h2 { font-size: 1.6rem; margin: 12px 0; letter-spacing: -0.015em; }
.jempty p { color: var(--ink2); line-height: 1.6; }

.jround {
  width: 34px; height: 34px; border-radius: 17px; border: 1px solid var(--line-strong);
  display: grid; place-items: center; color: var(--ink2); text-decoration: none;
}
.jround:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.2); }
.jround.is-off { color: var(--ink4); border-color: var(--line); }
.jseg { display: flex; padding: 3px; border-radius: 12px; background: #131416; border: 1px solid var(--line); }
.jseg__b {
  height: 30px; padding: 0 13px; border-radius: 9px; color: var(--ink3); font-size: 0.8rem;
  display: flex; align-items: center; gap: 7px; text-decoration: none;
}
.jseg__b:hover { color: var(--ink); }
.jseg__b.is-on { background: #232426; color: var(--ink); font-weight: 600; }
.jseg--small .jseg__b { height: 28px; padding: 0 12px; }
.jchips { display: flex; gap: 8px; flex-wrap: wrap; }
.jchip {
  height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03); color: var(--ink2); font-size: 0.86rem; font-weight: 500;
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
}
.jchip svg { color: var(--ink3); }
.jchip--more { color: var(--ink3); cursor: pointer; }
.jchip:hover { color: var(--ink); }
.jchip.is-on { background: var(--accent-soft); border-color: rgba(226, 114, 76, 0.55); color: var(--ink); font-weight: 600; }
.jchip.is-on svg { color: var(--ember); }
.jcard { border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.jbtn {
  height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid var(--line-strong);
  color: var(--ink); font-size: 0.84rem; white-space: nowrap; display: inline-flex; align-items: center; text-decoration: none;
}
.jbtn:hover { background: rgba(255, 255, 255, 0.05); }
.jbtn--accent { background: var(--ember); border-color: var(--ember); color: #1A0F0A; font-weight: 600; }
.jbtn--danger { color: #F08A66; }

/* Photos the phone hasn't sent yet: a quiet shimmer, never a black hole. */
.is-pending {
  background-color: #1B1C1E !important;
  background-image: linear-gradient(110deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0) 70%) !important;
  background-size: 220% 100% !important;
  animation: jshimmer 1.8s linear infinite;
}
@keyframes jshimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@media (prefers-reduced-motion: reduce) { .is-pending, .jsync__dot.is-busy { animation: none; } }

/* ── the month ─────────────────────────────────────────────────────────── */
.jmonth { padding: 36px var(--gutter) 48px; display: flex; flex-direction: column; gap: 20px; }
.jmonth__head { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.jmonth__title { margin: 0; display: flex; align-items: baseline; gap: 12px; font-weight: 400; }
.jmonth__title .jserif { font-size: 3.5rem; line-height: 0.9; }
.jmonth__year { font-size: 1.35rem; color: var(--ink3); font-weight: 500; }
.jmonth__nav { display: flex; gap: 6px; margin-bottom: 6px; }
.jmonth__head .jseg { margin-left: auto; margin-bottom: 6px; }
.jmonth__body { display: grid; grid-template-columns: minmax(0, 760px) minmax(240px, 320px); gap: 48px; align-items: start; }
.jgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.jgrid--heads { margin-bottom: 8px; }
.jgrid--heads span { text-align: center; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; color: var(--ink3); }
.jday {
  position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; text-decoration: none;
  background: #101113; transition: opacity 220ms ease;
}
.jday--written { background: #1F2022; }
.jday__img { position: absolute; inset: 0; background: #1A1B1D center / cover no-repeat; }
.jday--photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0) 55%); pointer-events: none; }
.jday__lines { position: absolute; left: 12%; right: 12%; top: 16%; display: flex; flex-direction: column; gap: 5px; }
.jday__lines i { display: block; height: 2px; background: rgba(244, 241, 236, 0.22); }
.jday__lines i:nth-child(2) { margin-right: 10%; background: rgba(244, 241, 236, 0.16); }
.jday__lines i:nth-child(3) { margin-right: 32%; background: rgba(244, 241, 236, 0.11); }
.jday__n { position: absolute; left: 9px; bottom: 7px; z-index: 1; font-size: 0.86rem; font-weight: 600; color: var(--ink); }
.jday--photo .jday__n { color: #fff; }
.jday--empty .jday__n { color: var(--ink4); font-weight: 400; }
.jday__dot { position: absolute; top: 7px; right: 7px; z-index: 1; width: 6px; height: 6px; border-radius: 3px; background: var(--ember); }
.jday.is-today { box-shadow: inset 0 0 0 2px var(--ember); }
.jday.is-future .jday__n { color: #3D3B39; }
.jday.is-washed { opacity: 0.16; }
a.jday:hover { outline: 2px solid rgba(255, 255, 255, 0.35); outline-offset: -2px; }
.jlens { margin: 14px 0 0; font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-size: 1.2rem; color: var(--ink2); }
.jlens b { font-weight: 400; color: var(--ember); }
.jlegend { display: flex; gap: 20px; padding-top: 14px; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink3); }
.jlegend span { display: flex; align-items: center; gap: 7px; }
.jlegend i { display: block; width: 10px; height: 10px; }
.jlegend__photo { background: #8A7560; }
.jlegend__written { background: #26272A; }
.jlegend__dot { width: 6px !important; height: 6px !important; border-radius: 3px; background: var(--ember); }
.jmonth__side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.jremember { position: relative; display: block; height: 250px; border-radius: 18px; overflow: hidden; color: #fff; text-decoration: none; background: var(--card); }
.jremember__img { position: absolute; inset: 0; background: #1A1B1D center / cover no-repeat; transition: transform 600ms ease; }
.jremember:hover .jremember__img { transform: scale(1.03); }
.jremember::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0) 62%); }
.jremember__text { position: absolute; z-index: 1; left: 20px; right: 20px; bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.jremember__eyebrow { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.17em; text-transform: uppercase; color: #F3B79F; }
.jremember__t { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em; }
.jremember__x { font-size: 0.86rem; line-height: 1.45; color: rgba(255, 255, 255, 0.8); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jremember--words { height: auto; border: 1px solid var(--line); }
.jremember--words::after { display: none; }
.jremember--words .jremember__text { position: static; padding: 18px 20px; }
.jremember--words .jremember__eyebrow { color: var(--ember); }
.jremember--words .jremember__t { color: var(--ink); }
.jremember--words .jremember__x { color: var(--ink2); }

.jrowlink { display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: var(--ink); text-decoration: none; }
.jrowlink:hover { border-color: var(--line-strong); background: #17181A; }
.jrowlink__img { width: 48px; height: 48px; border-radius: 12px; flex: none; background: #1D1E20 center / cover no-repeat; }
.jrowlink__img--none { display: grid; place-items: center; color: var(--ember); background: var(--accent-soft); }
.jrowlink__icon { color: var(--ember); display: flex; }
.jrowlink__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.jrowlink__t { font-size: 1rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jrowlink__sub { font-size: 0.78rem; color: var(--ink3); }
.jrowlink__go { color: var(--ink3); display: flex; }
.jrowlink__pics { display: flex; gap: 4px; }
.jrowlink__pics span { width: 34px; height: 34px; border-radius: 8px; background: #1D1E20 center / cover no-repeat; }
.jstats { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.jstats__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.jstats__grid div { display: flex; flex-direction: column; gap: 2px; }
.jstats__grid b { font-size: 1.5rem; font-weight: 600; }
.jstats__grid span { font-size: 0.78rem; color: var(--ink3); }

/* ── a day ─────────────────────────────────────────────────────────────── */
.jtopbar {
  position: sticky; top: 0; z-index: 3; height: 60px; display: flex; align-items: center; gap: 14px; padding: 0 var(--gutter);
  background: rgba(10, 11, 12, 0.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.jback { display: flex; align-items: center; gap: 6px; color: var(--ink2); font-size: 0.88rem; text-decoration: none; }
.jback:hover { color: var(--ink); }
.jdaynav { display: flex; align-items: center; gap: 4px; margin-left: 18px; }
.jdaynav a, .jdaynav span {
  height: 32px; padding: 0 10px; border-radius: 16px; display: flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 0.8rem; color: var(--ink3); text-decoration: none;
}
.jdaynav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.04); }
.jdaynav .is-here { background: #1A1B1D; color: var(--ink); }
.jdaynav .is-off { color: #3D3B39; }
.jtopbar__keys { margin-left: auto; font-family: var(--mono); font-size: 0.7rem; color: var(--ink4); }
.jday-body { padding: 36px var(--gutter) 80px; display: grid; grid-template-columns: minmax(0, 760px) minmax(240px, 320px); gap: 48px; }
.jday-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.jday-head { display: flex; flex-direction: column; gap: 10px; }
.jday-head__wd { font-size: 0.74rem; }
.jday-head__date { margin: 0; font-size: 5.5rem; line-height: 0.85; letter-spacing: -0.01em; }
.jday-head__date span { color: var(--ember); }
.jday-head__year { font-size: 1.1rem; color: var(--ink3); font-weight: 500; }
.jday-head__facts { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

.jmosaic { display: grid; gap: 6px; border-radius: 18px; overflow: hidden; margin-top: 6px; }
.jmosaic__i { position: relative; background: #1A1B1D center / cover no-repeat; min-height: 0; cursor: zoom-in; border: 0; padding: 0; }
.jmosaic--1 { grid-template-columns: 1fr; }
.jmosaic--1 .jmosaic__i { aspect-ratio: 16 / 10; }
.jmosaic--2 { grid-template-columns: 1fr 1fr; }
.jmosaic--2 .jmosaic__i { aspect-ratio: 4 / 5; }
.jmosaic--3 { grid-template-columns: 2fr 1fr; grid-template-rows: 170px 170px; }
.jmosaic--3 .jmosaic__i:first-child { grid-row: span 2; }
.jmosaic--4, .jmosaic--5 { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: 170px 170px; }
.jmosaic--4 .jmosaic__i:first-child, .jmosaic--5 .jmosaic__i:first-child { grid-column: span 2; grid-row: span 2; }
.jmosaic--4 .jmosaic__i:last-child { grid-column: span 2; }
.jmosaic__more { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); display: grid; place-items: center; color: #fff; font-size: 0.95rem; font-weight: 600; }

.jtimeline { display: flex; flex-direction: column; }
.jpart { display: flex; align-items: center; gap: 14px; margin: 22px 0 6px; }
.jpart span { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink3); }
.jpart::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.jritual { display: flex; align-items: center; gap: 14px; min-height: 44px; padding: 0 4px; scroll-margin-top: 80px; }
.jritual__icon { color: var(--ink3); display: flex; }
.jritual__name { font-size: 0.97rem; color: var(--ink); }
.jritual__time { margin-left: auto; }
.jritual__check { width: 30px; height: 30px; border-radius: 15px; background: var(--accent-soft); color: var(--ember); display: grid; place-items: center; }
.jmoment { display: flex; flex-direction: column; gap: 12px; padding: 16px 0 10px; scroll-margin-top: 80px; }
.jmoment__eyebrow { display: flex; align-items: center; gap: 6px; }
.jmoment__fav { color: var(--ember); display: inline-flex; }
.jmoment__prompt { margin: 0; padding-left: 14px; border-left: 2px solid var(--ember); color: var(--ink3); font-size: 0.95rem; line-height: 1.5; }
.jmoment__t { margin: 0; font-size: 1.6rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
.jmoment__body { font-size: 1.12rem; line-height: 1.65; color: var(--ink2); white-space: pre-wrap; max-width: 42rem; overflow-wrap: anywhere; }
.jmoment__cap { margin: 0; font-size: 0.86rem; color: var(--ink3); }
.jmoment__ctx { margin: 0; font-size: 0.86rem; color: var(--ink3); }
.jlink { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(226, 114, 76, 0.6); text-underline-offset: 3px; }
.jlink--host { display: inline-flex; padding: 1px 9px; border-radius: 10px; background: rgba(255, 255, 255, 0.06); text-decoration: none; font-family: var(--mono); font-size: 0.82em; }
.jstrip { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.jstrip__i { aspect-ratio: 1 / 1; border-radius: 10px; background: #1A1B1D center / cover no-repeat; cursor: zoom-in; border: 0; padding: 0; }
.jvoice { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); color: var(--ember); }
.jvoice audio { flex: 1; height: 36px; min-width: 0; }
/* link previews — the phone's LPLinkView at desk size: the picture, then
   the site in mono, the title, one line of what it is. */
.jlinks { display: flex; flex-direction: column; gap: 10px; }
.jlinkcard { display: flex; flex-direction: column; max-width: 560px; border-radius: 14px; overflow: hidden; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color 140ms ease; }
.jlinkcard:hover { border-color: var(--line-strong); }
/* A page is a row — words left, its picture a square on the right — so two
   links don't bury the day; a video gets the big frame, since the frame IS it. */
.jlinkcard:not(.jlinkcard--video) { flex-direction: row-reverse; align-items: stretch; }
.jlinkcard__img { display: none; position: relative; flex: none; width: 112px; min-height: 96px; background: #1A1B1D center / cover no-repeat; }
.jlinkcard.has-img .jlinkcard__img { display: block; }
.jlinkcard--video .jlinkcard__img { width: auto; min-height: 0; aspect-ratio: 16 / 9; }
.jlinkcard:not(.jlinkcard--video) .jlinkcard__text { flex: 1; justify-content: center; }
.jlinkcard__play { display: none; position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 29px; background: rgba(10, 11, 12, 0.72); color: #fff; align-items: center; justify-content: center; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.jlinkcard--video .jlinkcard__play { display: flex; }
.jlinkcard--video .jlinkcard__play svg { margin-left: 3px; }
.jlinkcard__text { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px 14px; min-width: 0; }
.jlinkcard__site { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; color: var(--ink3); }
.jlinkcard__site span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jlinkcard__t { font-size: 0.98rem; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.jlinkcard__d { font-size: 0.86rem; line-height: 1.45; color: var(--ink2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jlinkcard__d:empty { display: none; }
.jlinkcard.is-loading .jlinkcard__t { color: var(--ink3); }
.jlinkcard.is-bare .jlinkcard__t { font-family: var(--mono); font-size: 0.82rem; font-weight: 400; color: var(--ink2); }
/* a place, as the phone drew it — dark tile, ember pin — with its name under */
.jmap { display: flex; flex-direction: column; max-width: 560px; border-radius: 14px; overflow: hidden; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.jmap:hover { border-color: var(--line-strong); }
.jmap__img { display: block; aspect-ratio: 560 / 240; background: #15171A center / cover no-repeat; }
.jmap__foot { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 0.88rem; color: var(--ember); }
.jmap__name { color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jmap__open { margin-left: auto; flex: none; font-size: 0.8rem; color: var(--ink3); }
.jmap:hover .jmap__open { color: var(--ink); }
.jplace { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 0.88rem; color: var(--ink); width: fit-content; max-width: 100%; }
.jplace svg { color: var(--ember); flex: none; }
.jplace a { margin-left: 8px; font-size: 0.82rem; color: var(--ink3); text-decoration: none; }
.jplace a:hover { color: var(--ink); }
.jtags { display: flex; gap: 8px; flex-wrap: wrap; }
.jtag {
  height: 30px; padding: 0 12px; border-radius: 15px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-strong);
  color: var(--ink); font-size: 0.8rem; display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
}
.jtag svg { color: var(--ember); }
.jtag:hover { background: rgba(255, 255, 255, 0.08); }

.jday-side { display: flex; flex-direction: column; gap: 14px; padding-top: 30px; position: sticky; top: 76px; align-self: start; }
.jside-label { margin: 8px 4px 0; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.17em; text-transform: uppercase; color: var(--ink3); }
.jmini { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.jmini__head { display: flex; align-items: center; font-size: 0.88rem; font-weight: 600; }
.jmini__head a { margin-left: auto; font-size: 0.78rem; font-weight: 400; color: var(--ember); text-decoration: none; }
.jmini__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.jmini__d { height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 0.74rem; color: var(--ink4); text-decoration: none; }
.jmini__d.has { color: var(--ink); background: rgba(255, 255, 255, 0.04); }
a.jmini__d:hover { background: rgba(255, 255, 255, 0.1); }
.jmini__d.is-here { background: var(--ember); color: #1A0F0A; font-weight: 700; }
.jmini__d.is-future { color: #3D3B39; }
.jchapter { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.jchapter__head { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; font-weight: 600; }
.jchapter__head svg { color: var(--ember); }
.jchapter__head .jmono { margin-left: auto; font-weight: 400; font-size: 0.7rem; }
.jchapter__pics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.jchapter__pics span { aspect-ratio: 1 / 1; border-radius: 8px; background: #1D1E20 center / cover no-repeat; }

/* ── lists and photos ──────────────────────────────────────────────────── */
.jlist { padding: 36px var(--gutter) 60px; }
.jlist > * { max-width: 980px; }
.jlist__head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.jlist__head h1 { margin: 0; font-size: 1.9rem; font-weight: 650; letter-spacing: -0.02em; }
.jlist__head .jseg { margin-left: auto; }
.jlist__month { margin: 28px 0 8px; font-size: 0.95rem; font-weight: 600; color: var(--ink2); }
.jrow {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 14px; align-items: start;
  padding: 14px 12px; border-radius: 14px; color: var(--ink); text-decoration: none;
}
.jrow:hover { background: var(--card); }
.jrow__date { display: flex; flex-direction: column; align-items: center; }
.jrow__date span { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink3); }
.jrow__date b { font-size: 1.5rem; font-weight: 600; line-height: 1.1; }
.jrow__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.jrow__t { font-size: 1.02rem; font-weight: 600; }
.jrow__fav { color: var(--ember); display: inline-flex; vertical-align: middle; }
.jrow__x { font-size: 0.9rem; line-height: 1.5; color: var(--ink2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jrow__img { position: relative; width: 84px; height: 84px; border-radius: 12px; background: #1D1E20 center / cover no-repeat; }
.jrow__img span { position: absolute; right: 5px; bottom: 5px; padding: 1px 6px; border-radius: 8px; background: rgba(0, 0, 0, 0.65); font-family: var(--mono); font-size: 0.64rem; color: #fff; }
.jmore { padding: 24px; text-align: center; color: var(--ink3); }
.jwall { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; }
.jwall__i { position: relative; aspect-ratio: 1 / 1; background: #1A1B1D center / cover no-repeat; text-decoration: none; }
.jwall__i span { position: absolute; left: 8px; bottom: 6px; font-family: var(--mono); font-size: 0.66rem; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8); opacity: 0; transition: opacity 150ms ease; }
.jwall__i:hover span { opacity: 1; }

/* ── a thread ──────────────────────────────────────────────────────────── */
.jthread__head { position: relative; min-height: 300px; display: flex; align-items: flex-end; }
.jthread__head--plain { min-height: 0; padding-top: 34px; }
.jthread__cover { position: absolute; inset: 0; background: #1A1B1D center / cover no-repeat; }
.jthread__head:not(.jthread__head--plain)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--bg), rgba(10, 11, 12, 0.15) 72%); }
.jthread__text { position: relative; z-index: 1; padding: 0 var(--gutter) 26px; display: flex; flex-direction: column; gap: 10px; }
.jthread__eyebrow { display: flex; align-items: center; gap: 8px; color: #F3B79F; }
.jthread__head--plain .jthread__eyebrow { color: var(--ember); }
.jthread__text h1 { margin: 0; font-size: 2.75rem; font-weight: 650; letter-spacing: -0.02em; }
.jthread__text p { margin: 0; font-size: 1rem; color: var(--ink2); max-width: 40rem; }
.jthread__body { padding: 8px var(--gutter) 60px; }
.jcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.jentry { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.jentry:hover { border-color: var(--line-strong); }
.jentry__img { height: 190px; background: #1A1B1D center / cover no-repeat; }
.jentry__text { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.jentry__t { font-size: 1.05rem; font-weight: 600; }
.jentry__x { font-size: 0.88rem; line-height: 1.5; color: var(--ink2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ── settings ──────────────────────────────────────────────────────────── */
.jsettings { padding: 36px var(--gutter) 80px; display: grid; grid-template-columns: 220px minmax(0, 720px); gap: 40px; }
.jsettings__nav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 40px; align-self: start; }
.jsettings__nav h1 { margin: 0 0 18px; padding: 0 12px; font-size: 1.9rem; font-weight: 650; letter-spacing: -0.02em; }
.jsettings__nav a { display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 12px; border-radius: 10px; color: var(--ink2); font-size: 0.88rem; text-decoration: none; }
.jsettings__nav a svg { color: var(--ink3); }
.jsettings__nav a:hover { background: rgba(255, 255, 255, 0.04); color: var(--ink); }
.jsettings__nav a[aria-current] { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.jsettings__nav a[aria-current] svg { color: var(--ember); }
.jsettings__body { display: flex; flex-direction: column; gap: 30px; padding-top: 62px; }
.jset { display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 30px; }
.jset h2 { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 1.05rem; font-weight: 600; }
.jset h2 svg { color: var(--ember); }
.jset__card { border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.jset__row { display: flex; align-items: center; gap: 20px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.jset__row:last-child { border-bottom: 0; }
.jset__text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.jset__t { font-size: 0.97rem; color: var(--ink); }
.jset__s { font-size: 0.84rem; line-height: 1.45; color: var(--ink3); }
.jset__note { margin: 0; padding: 0 4px; font-size: 0.8rem; line-height: 1.5; color: var(--ink3); }
.jset__ok { color: #6FBF8E; display: flex; }
.jset__icon { color: var(--ink3); display: flex; }
.jset__meter { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.jset__meter span { color: var(--ink2); }
.jset__meter i { display: block; width: min(360px, 100%); height: 6px; border-radius: 3px; background: #2A2B2E; overflow: hidden; }
.jset__meter b { display: block; height: 100%; background: var(--ember); }
.jset__pin { display: flex; align-items: center; gap: 10px; padding: 0 20px 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.jset__pin[hidden] { display: none; }
.jset__pin input {
  width: 130px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: #1A1B1D; color: var(--ink); font-family: var(--mono); letter-spacing: 0.3em; font-size: 0.9rem;
}
.jset__err { color: #F08A66; font-size: 0.82rem; }
.jtoggle { position: relative; width: 44px; height: 26px; border-radius: 13px; background: #2A2B2E; flex: none; transition: background 160ms ease; border: 0; padding: 0; }
.jtoggle span { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 11px; background: #fff; transition: transform 160ms ease; }
.jtoggle[aria-checked="true"] { background: var(--ember); }
.jtoggle[aria-checked="true"] span { transform: translateX(18px); }
.jtoggle:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── the lightbox ──────────────────────────────────────────────────────── */
.jlight { position: fixed; inset: 0; z-index: 50; background: rgba(5, 5, 6, 0.94); display: grid; place-items: center; }
.jlight[hidden] { display: none; }
.jlight__img { max-width: min(92vw, 1600px); max-height: 88vh; object-fit: contain; border-radius: 6px; }
.jlight__x, .jlight__nav { position: absolute; width: 44px; height: 44px; border-radius: 22px; background: rgba(255, 255, 255, 0.08); color: #fff; display: grid; place-items: center; }
.jlight__x { top: 20px; right: 20px; }
.jlight__nav--l { left: 20px; top: calc(50% - 22px); }
.jlight__nav--r { right: 20px; top: calc(50% - 22px); }
.jlight__x:hover, .jlight__nav:hover { background: rgba(255, 255, 255, 0.16); }
.jlight__n { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, 0.7); }

/* ── narrower screens ──────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .jmonth__body { grid-template-columns: 1fr; }
  .jmonth__side { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .jday-body { grid-template-columns: 1fr; }
  .jday-side { position: static; padding-top: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .jside-label { grid-column: 1 / -1; }
  .jsettings { grid-template-columns: 1fr; }
  .jsettings__nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .jsettings__nav h1 { width: 100%; }
  .jsettings__body { padding-top: 0; }
}
@media (max-width: 860px) {
  .jmonth, .jlist, .jsettings { padding: 24px 16px 60px; }
  .jday-body { padding: 24px 16px 60px; }
  .jtopbar { padding: 0 16px; }
  .jtopbar__keys { display: none; }
  .jthread__text, .jthread__body { padding-left: 16px; padding-right: 16px; }
  .jmonth__title .jserif { font-size: 2.6rem; }
  .jday-head__date { font-size: 4rem; }
  .jmonth__head .jseg { margin-left: 0; }
  .jgrid { gap: 2px; }
  .jday__n { font-size: 0.72rem; left: 5px; bottom: 4px; }
}

/* ── one frame: the write page wears the journal's ────────────────────────
 * 2026-09-25 · Mark: the write page and the journal "layout isn't the same".
 * Same top bar (60px, the gutter), same banner edge, same masthead (Instrument
 * Serif, the day in ember) — so switching between them moves nothing. */
.page__bar { height: 60px; padding: 0 var(--gutter); flex: 0 0 auto; }
.firstrun { justify-content: flex-start; padding: 14px var(--gutter) 0; }
.firstrun__inner { max-width: var(--frame); }
.hero__weekday { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.17em; margin-bottom: 10px; }
.hero__date, button.hero__date {
  font-family: var(--dface); font-style: var(--dstyle); font-weight: var(--dweight);
  font-size: 5.5rem; line-height: 0.85; letter-spacing: var(--dtrack);
}
.hero__date span { color: var(--ember); }
.hero__hint { margin-top: 16px; }
@media (max-width: 860px) {
  .page__bar, .sheet { padding-left: 16px; padding-right: 16px; }
  .firstrun { padding: 14px 16px 0; }
  .hero__date, button.hero__date { font-size: 4rem; }
}
