/* =====================================================
   ИСТОРИИ — готический глэм: чёрный, кровь, роза, кость
   Всё лимитировано #storiesView / body.view-stories,
   остальные вкладки остаются как были.
===================================================== */

/* ---------- фон при открытой вкладке ---------- */
html:has(body.view-stories), body.view-stories {
    background: radial-gradient(circle at 18% 0, #2b0711 0, #0d0509 42%, #050203 100%);
}
body.view-stories .orb-1 { background: #c3112f; opacity: .22; }
body.view-stories .orb-2 { background: #ff3d81; opacity: .15; }
body.view-stories .orb-3 { background: #5c0a1b; opacity: .3; }

#storiesView {
    --nl-fs: 19px;
    --nl-black: #060307;
    --nl-ink: #0d0709;
    --nl-bone: #efe6dc;
    --nl-silver: #b9b0bd;
    --ac: #e11d3f;
    --ac2: #6d0b1b;
    font-family: 'Lora', Georgia, serif;
}
#storiesView ::selection { background: var(--ac); color: #0a0508; }

/* акценты обложек */
.t-blood { --ac: #e11d3f; --ac2: #6d0b1b; }
.t-rose  { --ac: #ff4f93; --ac2: #7a1646; }
.t-noir  { --ac: #cfc9d6; --ac2: #2a2630; }
.t-bone  { --ac: #efe6dc; --ac2: #6b5a4a; }

/* ---------- общие элементы ---------- */
.nl-eyebrow {
    font: 500 10px 'IBM Plex Mono', monospace;
    letter-spacing: .28em; text-transform: uppercase; color: var(--ac);
}
.nl-btn {
    appearance: none; border: 1px solid color-mix(in srgb, var(--ac) 70%, #fff 0%);
    cursor: pointer; color: #fff; white-space: nowrap;
    font: 600 12px 'IBM Plex Mono', monospace; letter-spacing: .08em; text-transform: uppercase;
    padding: 13px 20px; border-radius: 4px;
    background: linear-gradient(135deg, #c3112f, #7d0c1f);
    box-shadow: 0 0 0 3px rgba(225, 29, 63, .12), 0 14px 34px rgba(195, 17, 47, .35);
    transition: transform .15s, box-shadow .15s, filter .15s;
}
.nl-btn:hover { transform: translateY(-2px); filter: brightness(1.12); box-shadow: 0 0 0 3px rgba(255, 79, 147, .2), 0 18px 40px rgba(255, 61, 129, .3); }
.nl-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.nl-btn.small { padding: 9px 14px; font-size: 11px; }
.nl-chip-btn {
    appearance: none; cursor: pointer; color: var(--nl-bone);
    font: 500 11px 'IBM Plex Mono', monospace; letter-spacing: .06em;
    padding: 9px 12px; border-radius: 4px;
    background: rgba(255, 255, 255, .03); border: 1px solid rgba(239, 230, 220, .16);
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nl-chip-btn:hover:not(:disabled) { border-color: var(--ac); color: #fff; background: color-mix(in srgb, var(--ac) 14%, transparent); }
.nl-chip-btn:disabled { opacity: .35; cursor: default; }

/* ---------- hero ---------- */
.nl-hero {
    position: relative; overflow: hidden; isolation: isolate;
    display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
    padding: clamp(24px, 4vw, 44px);
    background:
        radial-gradient(520px 260px at 92% -10%, rgba(225, 29, 63, .55), transparent 70%),
        radial-gradient(380px 220px at 0% 120%, rgba(255, 61, 129, .22), transparent 70%),
        linear-gradient(160deg, #14070c, #060307 70%);
    border: 1px solid rgba(225, 29, 63, .45);
    border-radius: 6px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .55), inset 0 0 80px rgba(0, 0, 0, .6);
}
.nl-hero::before {          /* внутренняя рамка */
    content: ""; position: absolute; inset: 9px; z-index: -1; pointer-events: none;
    border: 1px solid rgba(239, 230, 220, .13); border-radius: 3px;
}
.nl-hero::after {           /* большое сердце-водяной знак */
    content: "♥"; position: absolute; right: 4%; top: -18%; z-index: -1; pointer-events: none;
    font: 900 clamp(180px, 28vw, 340px)/1 'Playfair Display', serif;
    color: rgba(225, 29, 63, .09);
}
.nl-hero h2 {
    margin: 10px 0 0;
    font: italic 900 clamp(46px, 8vw, 92px)/.95 'Playfair Display', Georgia, serif;
    letter-spacing: -.02em; color: var(--nl-bone);
    text-shadow: 0 0 34px rgba(225, 29, 63, .55), 3px 3px 0 rgba(109, 11, 27, .8);
}
.nl-hero h2 span { color: #ff4f93; }
.nl-hero p { max-width: 560px; margin: 16px 0 0; color: var(--nl-silver); font-size: 15px; line-height: 1.7; font-style: italic; }

/* бегущая строка */
.nl-marquee {
    margin-top: 14px; overflow: hidden; white-space: nowrap;
    background: #c3112f; color: #0a0508;
    border-block: 2px solid #0a0508; transform: rotate(-.6deg);
    box-shadow: 0 8px 26px rgba(195, 17, 47, .3);
}
.nl-marquee-track { display: inline-flex; min-width: 200%; animation: nl-slide 26s linear infinite; }
.nl-marquee-track span { padding: 7px 0; font: 600 12px 'IBM Plex Mono', monospace; letter-spacing: .3em; text-transform: uppercase; }
@keyframes nl-slide { to { transform: translateX(-50%); } }

.nl-head h3 { font-family: 'Playfair Display', serif; font-style: italic; font-weight: 800; font-size: 26px; color: var(--nl-bone); }
.nl-head span { font-family: 'IBM Plex Mono', monospace; letter-spacing: .1em; color: #8a7d86; }
#storiesView .search-input, #storiesView .toolbar select {
    border-radius: 4px; border-color: rgba(239, 230, 220, .16); background: rgba(255, 255, 255, .03);
    font-family: 'IBM Plex Mono', monospace;
}
#storiesView .search-input:focus, #storiesView .toolbar select:focus { border-color: #e11d3f; box-shadow: 0 0 0 3px rgba(225, 29, 63, .15); }

/* ---------- обложки в библиотеке ---------- */
.nl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 22px; padding-top: 6px; }
.nl-card {
    position: relative; min-height: 340px; padding: 30px 22px 22px;
    display: flex; flex-direction: column; align-items: center; text-align: center; cursor: pointer; outline: none;
    background:
        radial-gradient(260px 200px at 50% 0, color-mix(in srgb, var(--ac) 26%, transparent), transparent 75%),
        linear-gradient(170deg, color-mix(in srgb, var(--ac2) 55%, #0a0508), #060307 62%);
    border: 1px solid color-mix(in srgb, var(--ac) 55%, #000);
    border-radius: 6px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
    transition: transform .22s ease, box-shadow .22s ease;
}
.nl-card::before {      /* двойная рамка */
    content: ""; position: absolute; inset: 9px; pointer-events: none; border-radius: 3px;
    border: 1px solid color-mix(in srgb, var(--ac) 38%, transparent);
}
.nl-card::after {       /* уголки */
    content: "❦"; position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
    color: color-mix(in srgb, var(--ac) 70%, transparent); font-size: 15px;
}
.nl-card:hover, .nl-card:focus-visible {
    transform: translateY(-8px) rotate(-.7deg);
    box-shadow: 0 30px 70px rgba(0, 0, 0, .6), 0 0 0 1px var(--ac), 0 0 46px color-mix(in srgb, var(--ac) 35%, transparent);
}
.nl-card:nth-child(even):hover { transform: translateY(-8px) rotate(.7deg); }
.nl-card-symbol {
    width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; margin: 8px 0 20px;
    font: 400 32px/1 'Playfair Display', serif; color: var(--ac);
    border: 1px solid color-mix(in srgb, var(--ac) 65%, transparent);
    background: radial-gradient(circle, color-mix(in srgb, var(--ac) 20%, transparent), transparent 70%);
    text-shadow: 0 0 18px var(--ac);
}
.nl-card h4 {
    margin: 0 0 10px; font: italic 800 24px/1.15 'Playfair Display', serif; color: var(--nl-bone);
    overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.nl-card-tag { margin: 0; font-size: 13px; line-height: 1.55; color: var(--nl-silver); font-style: italic; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nl-card-meta {
    margin-top: auto; padding: 0 0 20px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px;
    font: 500 10px 'IBM Plex Mono', monospace; letter-spacing: .08em; text-transform: uppercase; color: #8d8089;
}
.nl-pin {
    position: absolute; left: 14px; top: 12px; z-index: 2; border: 0; background: transparent; cursor: pointer;
    font-size: 17px; color: rgba(239, 230, 220, .22); padding: 4px 6px; border-radius: 6px; line-height: 1;
}
.nl-pin:hover { color: #ff4f93; }
.nl-pin.active { color: #ff4f93; text-shadow: 0 0 12px #ff4f93; }
.nl-stamp {
    position: absolute; right: 12px; top: 16px; transform: rotate(6deg);
    font: 600 9px 'IBM Plex Mono', monospace; letter-spacing: .14em; text-transform: uppercase;
    padding: 4px 7px; border: 1.5px solid currentColor; border-radius: 3px; color: var(--ac); opacity: .9;
}
.nl-stamp.st-done { color: #ff4f93; }
.nl-stamp.st-draft { color: var(--nl-silver); border-style: dashed; }

.nl-empty { border-color: rgba(225, 29, 63, .35); border-radius: 6px; background: rgba(10, 5, 8, .5); }
.nl-empty h4 { font: italic 800 26px 'Playfair Display', serif; color: var(--nl-bone); }
.nl-empty p { font-size: 13px; color: var(--nl-silver); font-style: italic; }
.nl-empty-symbol { font: 400 48px/1 'Playfair Display', serif; color: #e11d3f; text-shadow: 0 0 24px #e11d3f; margin-bottom: 12px; }
.nl-none { padding: 40px 0; text-align: center; color: #8a7d86; font: 500 12px 'IBM Plex Mono', monospace; letter-spacing: .1em; }

/* ---------- книга: верхняя полка ---------- */
.nl-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; min-width: 0; }
.nl-bar > .nl-chip-btn { flex: none; }
.nl-shelf { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; scrollbar-color: #5c0a1b transparent; min-width: 0; }
.nl-spine {
    flex: none; appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
    max-width: 210px; padding: 8px 14px 8px 10px; border-radius: 4px;
    background: rgba(255, 255, 255, .03); color: var(--nl-silver);
    border: 1px solid rgba(239, 230, 220, .14); border-bottom: 3px solid color-mix(in srgb, var(--ac) 70%, #000);
    font: 600 12px 'Lora', serif;
}
.nl-spine span { color: var(--ac); font-size: 15px; }
.nl-spine b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nl-spine:hover { color: #fff; border-color: var(--ac); }
.nl-spine.active {
    color: #fff; background: color-mix(in srgb, var(--ac) 18%, #0a0508);
    border-color: var(--ac); box-shadow: 0 0 22px color-mix(in srgb, var(--ac) 35%, transparent);
}
.nl-spine-add { border-bottom-color: rgba(239, 230, 220, .25); padding: 8px 14px; }
.nl-spine-add span { color: var(--nl-bone); font-size: 14px; }

/* ---------- шапка книги ---------- */
.nl-bookhead {
    position: relative; overflow: hidden; isolation: isolate;
    display: flex; align-items: center; gap: 22px; padding: clamp(18px, 3vw, 30px);
    background:
        radial-gradient(420px 220px at 100% 0, color-mix(in srgb, var(--ac) 32%, transparent), transparent 70%),
        linear-gradient(160deg, color-mix(in srgb, var(--ac2) 55%, #0a0508), #060307 75%);
    border: 1px solid color-mix(in srgb, var(--ac) 50%, #000); border-radius: 6px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, .5);
}
.nl-bookhead::before { content: ""; position: absolute; inset: 8px; z-index: -1; pointer-events: none; border: 1px solid color-mix(in srgb, var(--ac) 30%, transparent); border-radius: 3px; }
.nl-bookhead-symbol {
    flex: none; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center;
    font: 400 34px/1 'Playfair Display', serif; color: var(--ac); text-shadow: 0 0 18px var(--ac);
    border: 1px solid color-mix(in srgb, var(--ac) 65%, transparent);
    background: radial-gradient(circle, color-mix(in srgb, var(--ac) 22%, transparent), transparent 70%);
}
.nl-bookhead-text { min-width: 0; flex: 1; }
.nl-bookhead h2 { margin: 6px 0 0; font: italic 900 clamp(28px, 4.6vw, 48px)/1.05 'Playfair Display', serif; color: var(--nl-bone); text-shadow: 0 0 26px color-mix(in srgb, var(--ac) 45%, transparent); overflow-wrap: anywhere; }
.nl-bookhead p { margin: 10px 0 0; color: var(--nl-silver); font-style: italic; font-size: 15px; line-height: 1.6; }
.nl-bookhead-meta { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; font: 500 10px 'IBM Plex Mono', monospace; letter-spacing: .1em; text-transform: uppercase; color: #94868f; }

/* ---------- раскладка ---------- */
.nl-book { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 22px; }
.nl-toc {
    position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow: auto; padding: 18px 14px;
    background: rgba(8, 4, 6, .78); border: 1px solid rgba(239, 230, 220, .12); border-radius: 6px;
    backdrop-filter: blur(10px);
}
.nl-toc-head { font: 500 10px 'IBM Plex Mono', monospace; letter-spacing: .28em; text-transform: uppercase; color: var(--ac); padding: 2px 8px 12px; }
.nl-toc-list { display: grid; gap: 4px; }
.nl-toc-item {
    appearance: none; cursor: pointer; text-align: left; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: baseline; gap: 6px;
    padding: 10px 8px; border-radius: 4px; border: 1px solid transparent; background: transparent; color: var(--nl-silver); font: 500 13px 'Lora', serif;
}
.nl-roman { font: 600 11px 'IBM Plex Mono', monospace; color: color-mix(in srgb, var(--ac) 75%, #fff 0%); letter-spacing: .04em; }
.nl-toc-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nl-toc-item small { font: 400 9px 'IBM Plex Mono', monospace; color: #7d7078; }
.nl-toc-item:hover { background: rgba(255, 255, 255, .04); color: #fff; }
.nl-toc-item.active { color: #fff; background: color-mix(in srgb, var(--ac) 16%, transparent); border-color: color-mix(in srgb, var(--ac) 55%, transparent); }
.nl-toc-item.active .nl-toc-title::before { content: "♥ "; color: var(--ac); }
.nl-toc-empty { padding: 12px 8px; color: #7d7078; font: 400 12px 'IBM Plex Mono', monospace; }
.nl-toc-add { width: 100%; margin-top: 12px; text-align: center; border-style: dashed; }

.nl-stage { min-width: 0; }
.nl-tools { position: sticky; top: 10px; z-index: 6; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 8px; border-radius: 6px; background: rgba(8, 4, 6, .82); border: 1px solid rgba(239, 230, 220, .1); backdrop-filter: blur(10px); }
.nl-tools-gap, .nl-fmt-gap { flex: 1; }
.nl-toc-toggle { display: none; }

/* ---------- страница ---------- */
.nl-page {
    position: relative; max-width: 820px; margin: 0 auto; padding: clamp(24px, 6vw, 72px) clamp(20px, 6vw, 76px);
    background:
        radial-gradient(600px 300px at 50% -5%, color-mix(in srgb, var(--ac) 12%, transparent), transparent 70%),
        linear-gradient(180deg, #0f080b, #08040a);
    border: 1px solid color-mix(in srgb, var(--ac) 28%, #000); border-radius: 4px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .55), inset 0 0 90px rgba(0, 0, 0, .5);
}
.nl-page::before { content: ""; position: absolute; inset: 10px; pointer-events: none; border: 1px solid rgba(239, 230, 220, .07); border-radius: 2px; }

.nl-chap-head { text-align: center; margin-bottom: 38px; }
.nl-chap-no { font: 500 11px 'IBM Plex Mono', monospace; letter-spacing: .34em; text-transform: uppercase; color: var(--ac); }
.nl-chap-head h3 { margin: 14px 0 18px; font: italic 900 clamp(30px, 5vw, 52px)/1.1 'Playfair Display', serif; color: var(--nl-bone); text-shadow: 0 0 30px color-mix(in srgb, var(--ac) 40%, transparent); overflow-wrap: anywhere; }
.nl-orn, .nl-sep { display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--ac); font-size: 13px; }
.nl-orn::before, .nl-orn::after, .nl-sep::before, .nl-sep::after { content: ""; height: 1px; flex: 0 1 90px; background: linear-gradient(90deg, transparent, var(--ac)); }
.nl-orn::after, .nl-sep::after { transform: scaleX(-1); }
.nl-sep { margin: 2.2em 0; }

.nl-prose { font-size: var(--nl-fs); line-height: 1.85; color: #e8ded5; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; }
.nl-prose p { margin: 0 0 .9em; text-indent: 1.5em; }
.nl-prose p.first { text-indent: 0; display: flow-root; }
.nl-prose p.first::first-letter {
    float: left; font: 900 4.1em/.78 'Playfair Display', serif; color: var(--ac);
    padding: .09em .1em 0 0; text-shadow: 0 0 22px color-mix(in srgb, var(--ac) 60%, transparent);
}
.nl-prose strong { color: #fff; font-weight: 600; }
.nl-prose em { color: #ffd6e3; }
.nl-prose blockquote { margin: 1.6em 0; padding: .3em 0 .3em 1.3em; border-left: 2px solid var(--ac); color: var(--nl-silver); font-style: italic; }
.nl-sub { margin: 2em 0 .8em; font: italic 800 1.35em 'Playfair Display', serif; color: var(--nl-bone); }
.nl-placeholder { color: #7d7078; font-style: italic; text-indent: 0 !important; text-align: center; }

.nl-chap-foot { margin-top: 56px; text-align: center; }
.nl-chap-stats { margin: 18px 0 24px; font: 500 10px 'IBM Plex Mono', monospace; letter-spacing: .12em; text-transform: uppercase; color: #8d8089; }
.nl-pager { display: flex; justify-content: space-between; gap: 10px; }
.nl-pager .nl-chip-btn { flex: 1 1 0; min-width: 0; padding: 12px; }

.nl-blank { text-align: center; padding: 40px 0; }
.nl-blank-symbol { font: 400 54px/1 'Playfair Display', serif; color: var(--ac); text-shadow: 0 0 26px var(--ac); }
.nl-blank h3 { margin: 18px 0 8px; font: italic 800 28px 'Playfair Display', serif; color: var(--nl-bone); }
.nl-blank p { margin: 0 0 22px; color: var(--nl-silver); font-style: italic; }

/* ---------- редактор ---------- */
.nl-title-input {
    width: 100%; border: 0; border-bottom: 1px dashed color-mix(in srgb, var(--ac) 55%, transparent); border-radius: 0; background: transparent; box-shadow: none !important;
    padding: 4px 0 14px; color: var(--nl-bone); outline: none;
    font: italic 900 clamp(26px, 4.4vw, 44px)/1.15 'Playfair Display', serif; text-align: center; caret-color: var(--ac);
}
.nl-title-input::placeholder { color: #5f5058; }
.nl-fmt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 16px 0; }
.nl-fmt button {
    appearance: none; cursor: pointer; min-width: 36px; height: 34px; padding: 0 10px; border-radius: 4px;
    border: 1px solid rgba(239, 230, 220, .16); background: rgba(255, 255, 255, .03); color: var(--nl-bone);
    font: 600 12px 'IBM Plex Mono', monospace;
}
.nl-fmt button:hover { border-color: var(--ac); background: color-mix(in srgb, var(--ac) 14%, transparent); }
.nl-fmt button.danger { color: #ff8fa8; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
#chapTextarea {
    display: block; width: 100%; height: clamp(420px, 68vh, 760px); resize: vertical;
    padding: clamp(14px, 3vw, 28px); border-radius: 4px; outline: none; caret-color: var(--ac);
    border: 1px solid color-mix(in srgb, var(--ac) 35%, transparent);
    background: repeating-linear-gradient(transparent 0, transparent calc(var(--nl-fs) * 1.85 - 1px), rgba(239, 230, 220, .035) calc(var(--nl-fs) * 1.85 - 1px), rgba(239, 230, 220, .035) calc(var(--nl-fs) * 1.85)), rgba(0, 0, 0, .35);
    background-attachment: local;
    color: #eee4db; font: 400 max(16px, var(--nl-fs))/1.85 'Lora', Georgia, serif;
}
#chapTextarea:focus { border-color: var(--ac); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac) 16%, transparent); }
#chapTextarea::placeholder { color: #5f5058; font-style: italic; }
.nl-edit-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; font: 500 10px 'IBM Plex Mono', monospace; letter-spacing: .1em; text-transform: uppercase; color: #94868f; }
.nl-status.pending { color: #ffbd66; }
.nl-status.ok { color: #ff4f93; }
.nl-status.bad { color: #ff6b81; }
.nl-hintline { margin-top: 14px; font: 400 11px/1.7 'IBM Plex Mono', monospace; color: #74676f; }

/* ---------- прогресс чтения ---------- */
.nl-progress { position: fixed; z-index: 90; left: 0; top: 0; height: 3px; width: var(--p, 0%); background: linear-gradient(90deg, #6d0b1b, #e11d3f, #ff4f93); box-shadow: 0 0 14px #e11d3f; transition: width .12s linear; pointer-events: none; }

/* ---------- модалка ---------- */
#storyModal { border-radius: 6px; border-color: rgba(225, 29, 63, .4); background: #0b0609; }
#storyModal .modal-head h3 { font: italic 800 26px 'Playfair Display', serif; }
#storyModal .eyebrow { color: #e11d3f; font-family: 'IBM Plex Mono', monospace; }
.nl-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.nl-pick-item {
    appearance: none; cursor: pointer; min-width: 46px; height: 42px; padding: 0 12px; border-radius: 4px;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 1px solid rgba(239, 230, 220, .16); background: rgba(255, 255, 255, .03); color: var(--nl-bone);
    font: 400 20px 'Playfair Display', serif;
}
.nl-pick-item:hover { border-color: #e11d3f; }
.nl-pick-item.active { border-color: #ff4f93; background: rgba(225, 29, 63, .18); box-shadow: 0 0 0 2px rgba(255, 79, 147, .25); }
.nl-pick-theme { font: 500 11px 'IBM Plex Mono', monospace; letter-spacing: .06em; text-transform: uppercase; }
.nl-pick-theme i { width: 14px; height: 14px; border-radius: 50%; background: var(--ac); box-shadow: 0 0 10px var(--ac); }

/* ---------- мобильные ---------- */
@media (max-width: 980px) {
    .nl-book { grid-template-columns: 1fr; }
    .nl-toc { display: none; position: static; max-height: 50vh; }
    .nl-bookwrap.toc-open .nl-toc { display: block; }
    .nl-toc-toggle { display: inline-block; }
}
@media (max-width: 860px) {
    .nl-tools { position: static; }
    .nl-hero { flex-direction: column; align-items: stretch; }
    .nl-hero .nl-btn { width: 100%; }
    .nl-bookhead { flex-direction: column; align-items: flex-start; gap: 14px; }
    .nl-bookhead-symbol { width: 62px; height: 62px; font-size: 28px; }
    .nl-bookhead .nl-chip-btn { align-self: stretch; text-align: center; }
    .nl-bar { flex-direction: column; align-items: stretch; gap: 8px; }
    .nl-page::before { inset: 6px; }
    .nl-prose { text-align: left; }
}
@media (max-width: 560px) {
    .nl-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .nl-card { min-height: 270px; padding: 26px 12px 14px; }
    .nl-card-symbol { width: 56px; height: 56px; font-size: 24px; margin-bottom: 12px; }
    .nl-card h4 { font-size: 18px; }
    .nl-card-tag { font-size: 11px; -webkit-line-clamp: 2; }
    .nl-card-meta { font-size: 9px; padding-bottom: 18px; }
    .nl-stamp { font-size: 8px; right: 8px; top: 12px; }
    .nl-pager { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
    .nl-marquee-track { animation: none; }
    .nl-card, .nl-btn { transition: none; }
}

/* ---------- режим «Читать»: всё для письма скрыто и недоступно ---------- */
.nl-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; position: relative; z-index: 1; }
.nl-reading .nl-write-only { display: none !important; }
.nl-reading .nl-pin { pointer-events: none; }
.nl-reading .nl-pin:not(.active) { display: none; }
@media (max-width: 860px) {
    .nl-hero-actions { flex-direction: column; align-items: stretch; }
    .nl-hero-actions .nl-btn { width: 100%; }
}
