/* journal.css — 第 7 步：拾光记书架 / 日记本页、写一页、心动收藏、票根。颜色都走令牌，深浅色自动跟随 */

html:not(.jn-on) .me-row[data-act="saves"] { display: none; }

/* ---------- 拼贴页顶部书架 ---------- */
.jn-slot { margin: 0 0 18px; }
.jn-slot[hidden] { display: none; }
.jn-shelf-head { display: flex; align-items: baseline; gap: 10px; padding: 0 6px 10px; }
.jn-shelf-t { font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: 1px; color: var(--ink); }
.jn-shelf-s { font-size: 12px; color: var(--muted); }
.jn-shelf { display: flex; gap: 14px; overflow-x: auto; margin: 0 -14px; padding: 4px 20px 12px; scroll-padding: 0 20px; scroll-snap-type: x proximity; scrollbar-width: none; }
.jn-shelf::-webkit-scrollbar { display: none; }
.jn-book { flex: none; width: 104px; display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; scroll-snap-align: start; transition: transform .2s; }
.jn-book:active { transform: scale(.97); }
.jn-cover { position: relative; display: grid; place-items: center; width: 104px; height: 128px; border-radius: 3px 10px 10px 3px; overflow: hidden; background: var(--surface);
  box-shadow: 0 6px 16px rgba(90, 60, 30, .10), 0 0 0 1px var(--line); }
.jn-cover::before { content: ""; position: absolute; z-index: 1; left: 0; top: 0; bottom: 0; width: 7px; background: var(--line); box-shadow: 1px 0 0 rgba(0, 0, 0, .05); }
.jn-book.is-couple .jn-cover::before { background: var(--clay); }
.jn-cover img { width: 100%; height: 100%; object-fit: cover; }
.jn-cover-t { font-family: var(--font-char); font-size: 38px; color: var(--clay-d); opacity: .75; }
.jn-new .jn-cover { background: none; box-shadow: none; border: 1.5px dashed var(--line); color: var(--muted); }
.jn-new .jn-cover::before { display: none; }
.jn-name { font-family: var(--font-display); font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jn-meta { display: flex; align-items: center; justify-content: space-between; gap: 4px; font-size: 11px; color: var(--muted); }
.jn-chars { display: inline-flex; align-items: flex-end; }
.jn-chars i { font-style: normal; font-family: var(--font-char); font-size: 13px; line-height: 1.1; margin-right: 3px; padding-bottom: 2px; border-bottom: 2px solid var(--c-soft); color: var(--ink); }

/* ---------- 一本日记：按天拼成拼贴 ---------- */
.jn-page { padding: 2px 2px 40px; }
.jn-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.jn-chars-top { gap: 1px; }
.jn-chars-top span { margin-left: 6px; font-size: 12px; color: var(--muted); }
.ui-btn.jn-write { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 19px; background: var(--clay); color: #fff; font-size: 14px; }
.jn-day { margin-top: 22px; }
.jn-day-t { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-family: var(--font-display); font-size: 14px; font-weight: 600; letter-spacing: 1px; color: var(--clay-d); }
.jn-day-t::after { content: ""; flex: 1; height: 1px; background: repeating-linear-gradient(90deg, var(--line) 0 4px, transparent 4px 8px); }
.jn-collage, .jn-slist { columns: 2 150px; column-gap: 12px; }
.jn-entry { position: relative; display: inline-block; width: 100%; margin: 6px 0 12px; padding: 10px 10px 4px; border-radius: 6px; background: var(--surface); break-inside: avoid;
  box-shadow: 0 4px 14px rgba(90, 60, 30, .08), 0 0 0 1px var(--line); transform: rotate(var(--rot, 0deg)); }
.jn-entry::before { content: ""; position: absolute; top: -7px; left: 50%; width: 42px; height: 13px; margin-left: -21px; background: color-mix(in srgb, var(--c-soft) 60%, transparent); transform: rotate(-4deg); opacity: .85; }
.jn-scard::before { display: none; }
.jn-phs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; margin-bottom: 8px; }
.jn-phs.n1 { grid-template-columns: 1fr; }
.jn-ph { display: block; width: 100%; padding: 0; border: 0; border-radius: 3px; overflow: hidden; background: var(--surface-2); aspect-ratio: 1; cursor: zoom-in; }
.jn-ph.is-first { grid-column: 1 / -1; aspect-ratio: 4 / 3; margin-bottom: 8px; }
.jn-phs .jn-ph.is-first { margin-bottom: 0; }
.jn-ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.jn-text { margin: 0 0 6px; font-family: var(--font-display); font-size: 14px; line-height: 1.7; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.jn-entry footer { display: flex; align-items: center; gap: 3px; min-height: 30px; font-size: 11px; color: var(--muted); }
.jn-entry footer .ui-avatar-xs > .ui-char { --size: 16px; }
.jn-who { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jn-del { width: 26px; height: 26px; color: var(--muted); }
.jn-empty { padding: 56px 12px; font-family: var(--font-display); font-size: 14px; line-height: 1.9; color: var(--muted); text-align: center; }
.jn-more { display: block; margin: 8px auto 0; height: 36px; padding: 0 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); font-size: 13px; cursor: pointer; }
.jn-more[hidden] { display: none; }

/* ---------- 心动按钮（拼贴卡片 + 日记） ---------- */
.mo-act.mo-save { margin-left: auto; }
.jn-save { display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-width: 26px; height: 28px; padding: 0 4px; border: 0; background: none; color: var(--muted); font-size: 11px; cursor: pointer; }
.jn-save[aria-pressed="true"], .mo-save[aria-pressed="true"] { color: var(--clay-d); }
.jn-save[aria-pressed="true"] svg, .mo-save[aria-pressed="true"] svg { fill: currentColor; }

/* ---------- 票根 ---------- */
.jn-stub { position: relative; display: flex; margin: 0 0 8px; border-radius: 6px; background: color-mix(in srgb, var(--clay-soft) 78%, var(--surface)); color: var(--clay-d); }
.mo-post .jn-stub { margin: 0; max-width: 320px; }
.jn-stub-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 10px 10px 10px 12px; }
.jn-stub-k { font-size: 10px; letter-spacing: 2px; opacity: .85; }
.jn-stub-t { font-family: var(--font-display); font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--ink); overflow-wrap: anywhere; }
.jn-stub-p { font-size: 11px; color: var(--ink-2); }
.jn-stub-side { position: relative; flex: none; width: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-left: 1.5px dashed color-mix(in srgb, var(--clay) 45%, transparent); }
.jn-stub-side b { font-family: var(--font-display); font-size: 15px; font-weight: 600; }
.jn-stub-side small { font-size: 10px; opacity: .75; }
.jn-stub-side::before, .jn-stub-side::after { content: ""; position: absolute; left: -7px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); }
.jn-stub-side::before { top: -6px; }
.jn-stub-side::after { bottom: -6px; }

/* ---------- 写一页 / 新建 / 收藏集 ---------- */
.jn-form { display: flex; flex-direction: column; gap: 12px; }
.jn-ta { width: 100%; min-height: 110px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-family: var(--font-display); font-size: 16px; line-height: 1.6; color: var(--ink); resize: vertical; }
.jn-ta:focus { outline: none; border-color: var(--clay); }
.jn-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.jn-thumbs:empty { display: none; }
.jn-thumb { position: relative; width: 64px; height: 64px; padding: 0; border: 0; border-radius: 8px; overflow: hidden; cursor: pointer; }
.jn-thumb img { width: 100%; height: 100%; object-fit: cover; }
.jn-thumb svg { position: absolute; top: 3px; right: 3px; padding: 2px; border-radius: 4px; background: rgba(0, 0, 0, .45); color: #fff; }
.jn-tools, .jn-kinds, .jn-pick, .jn-target { display: flex; flex-wrap: wrap; gap: 8px; }
.jn-tool { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 17px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; }
.jn-tool[aria-pressed="true"] { border-color: color-mix(in srgb, var(--clay) 45%, transparent); background: color-mix(in srgb, var(--clay-soft) 70%, transparent); color: var(--clay-d); }
.jn-stubf { display: flex; flex-direction: column; gap: 10px; min-width: 0; margin: 0; padding: 12px; border: 1px dashed color-mix(in srgb, var(--clay) 40%, transparent); border-radius: 12px; }
.jn-stubf[hidden] { display: none; }
.jn-row { display: flex; gap: 8px; }
.jn-row .pp-in { flex: 1; min-width: 0; }
.jn-form .pp-in { width: 100%; box-sizing: border-box; }
.jn-lab { width: 100%; font-size: 12.5px; color: var(--muted); }
.jn-none { margin: 0; font-size: 13px; color: var(--muted); }
.jn-tabs { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.jn-tabs [role="tab"] { height: 32px; padding: 0 14px; border-radius: 16px; border: 1px solid var(--line); background: none; color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; }
.jn-tabs [aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.jn-new-stub { margin-left: auto; }

/* ---------- 日记：喜欢 / 评论 / 视频 ---------- */
.jn-like, .jn-cmt { display: inline-flex; align-items: center; justify-content: center; gap: 1px; min-width: 24px; height: 28px; padding: 0 2px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 11px; cursor: pointer; }
.jn-like[aria-pressed="true"] { color: var(--clay-d); }
.jn-vid { margin-bottom: 8px; border-radius: 3px; overflow: hidden; background: #2A2723; }
.jn-vid video { display: block; width: 100%; max-height: 320px; }
.jn-cms { display: flex; flex-direction: column; gap: 12px; }
.jn-cml { display: flex; flex-direction: column; gap: 12px; max-height: 50vh; overflow: auto; }
.jn-cm { display: flex; align-items: flex-start; gap: 8px; }
.jn-cm .ui-avatar-xs > .ui-char { --size: 18px; }
.jn-cm p { flex: 1; min-width: 0; margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.jn-cm b { margin-right: 6px; font-weight: 600; }
.jn-cm small { display: block; font-size: 11px; color: var(--muted); }
.jn-cmd { width: 28px; height: 28px; color: var(--muted); }
.jn-cmf { display: flex; gap: 8px; }
.jn-cmf .pp-in { flex: 1; min-width: 0; }
.jn-cmf .pp-ok { margin-top: 0; padding: 0 16px; }

.jn-entry { -webkit-touch-callout: none; }
.jn-who { font-variant-numeric: tabular-nums; }
