:root {
    color-scheme: light;
    --ink: #302031;
    --muted: #665265;
    --accent: #a72361;
    --paper: #fff5f9ed;
    --edge: #a84e7455;
    --bg: #f7e2ec;
    --chip: #f6dce8;
    --card: #fff9fc;
    --selected: #a72361;
    --on-selected: #fff;
}
:root[data-theme="hell"] {
    color-scheme: dark;
    --ink: #fff0f8;
    --muted: #dec0d3;
    --accent: #ffacd2;
    --paper: #281a2eed;
    --edge: #f3a6d14d;
    --bg: #170f21;
    --chip: #43283e;
    --card: #342237;
    --selected: #a83f72;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 15px/1.5 system-ui, sans-serif;
}
a { color: inherit; }
main { width: min(1440px, calc(100% - 42px)); margin-inline: auto; }
.hero { text-align: center; padding: clamp(28px, 6vw, 78px) 0 28px; }
h1, h2, p { margin: 0; }
h1, .calendar h2 { font-family: Georgia, serif; font-weight: 500; }
h1 { font-size: clamp(2.5rem, 6.3vw, 6rem); line-height: 1.05; font-style: italic; }
[data-theme="hell"] .hero { text-shadow: 0 2px 12px #160b22; }
.eyebrow { margin-top: 15px; color: var(--accent); font-size: .82rem; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; }
.toolbar { max-width: 820px; margin: 0 auto 24px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; }
.year, .search input { border: 1px solid var(--edge); background: var(--paper); border-radius: 999px; padding: 8px 16px; }
.year select { margin-inline-start: 8px; }
.search input { height: 100%; width: 100%; }
.search input::placeholder { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.columns { display: grid; grid-template-columns: minmax(215px, 1fr) minmax(300px, 3.55fr); gap: 12px; margin-bottom: 26px; align-items: start; }
.panel, dialog { background: var(--paper); border: 1px solid var(--edge); border-radius: 18px; padding: 16px; box-shadow: 0 12px 35px #170d2426; }
h2 { font-size: 1.3rem; line-height: 1.2; margin-bottom: 8px; }
.calendar h2 { font-size: 1.75rem; }
.subtitle, small, .empty { color: var(--muted); }
button, input, select { font: inherit; color: inherit; }
button, select { border: 1px solid var(--edge); background: var(--chip); border-radius: 10px; padding: .35rem .62rem; cursor: pointer; }
button[aria-pressed=true] { background: var(--selected); color: var(--on-selected); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.months { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-block: 15px; }
.months button, .days button { min-width: 0; padding-inline: 0; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; padding: 6px; margin-bottom: 12px; border: 1px solid var(--edge); border-radius: 12px; text-align: center; }
.days button:disabled { background: transparent; border-color: transparent; color: var(--muted); cursor: default; }
.days .weekday { padding-block: 4px; font-size: .73rem; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--edge); border-radius: 12px; background: var(--card); padding: 9px; margin-top: 8px; }
.row img { width: clamp(55px, 8vw, 116px); aspect-ratio: 16/10; object-fit: cover; border-radius: 8px; }
.row strong { display: block; }
dialog { max-width: min(90vw, 430px); color: var(--ink); }
dialog::backdrop { background: #1f1021aa; }
dialog a { display: block; margin: 12px 0; color: var(--accent); }
@media (max-width: 850px) {
    .columns { grid-template-columns: minmax(190px, 1fr) minmax(0, 1.6fr); }
}
@media (max-width: 570px) {
    main { width: calc(100% - 20px); }
    .columns { grid-template-columns: minmax(0, 1fr); }
    .toolbar { gap: 6px; margin-bottom: 12px; }
    .year, .search input { padding-inline: 8px; }
}

/* Illustrated album */
:root {
    --glow: #fff7ec;
    --panel-top: #fff8f3f2;
    --panel-end: #f9e4eff0;
    --card-top: #fffcf8;
    --card-end: #f9edf5;
    --shine: #fff9;
    --action-top: #bc477e;
    --action-end: #90305d;
}
:root[data-theme="hell"] {
    --glow: #fce1f0;
    --panel-top: #38243be8;
    --panel-end: #1f152beF;
    --card-top: #412c43;
    --card-end: #2c1c34;
    --shine: #ffd0e71c;
    --action-top: #c16d96;
    --action-end: #87385e;
}
body {
    min-height: 100vh;
    background: var(--bg);
}

.archive-meta, main {
    width: min(1440px, calc(100% - 44px));
    margin-inline: auto;
}
.archive-meta {
    display: flex;
    gap: 16px;
    color: var(--muted);
    font-size: .8rem;
}
.archive-meta span + span { border-inline-start: 1px solid var(--edge); padding-inline-start: 16px; }
.hero { padding: clamp(20px, 3.1vw, 48px) 0 22px; }
h1 { font-size: clamp(2.65rem, 5.5vw, 5.6rem); }
[data-theme="hell"] h1 { color: var(--glow); text-shadow: 0 3px 17px #140920; }
.hero .eyebrow {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
}
.hero .eyebrow::before, .hero .eyebrow::after {
    content: "";
    width: clamp(18px, 6vw, 75px);
    height: 1px;
    background: var(--accent);
    opacity: .55;
}
.toolbar { gap: 16px; margin-bottom: 19px; }
.year, .search input {
    box-shadow: inset 0 1px var(--shine), 0 5px 20px #170d2420;
}
.panel {
    background: linear-gradient(145deg, var(--panel-top), var(--panel-end));
    box-shadow: inset 0 1px var(--shine), 0 14px 36px #160b243a;
}
.panel h2 { letter-spacing: -.02em; }
.calendar h2 { color: var(--accent); }
.panel-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--edge);
}
.result-count { color: var(--muted); font-size: .8rem; }
.days { background: var(--card-end); }
.days button:not(:disabled) { box-shadow: inset 0 -2px var(--accent); }
.filters button, .months button { font-size: .8rem; }
.row {
    background: linear-gradient(135deg, var(--card-top), var(--card-end));
    box-shadow: inset 0 1px var(--shine);
}
.row { display: grid; grid-template-columns: clamp(65px, 8vw, 115px) minmax(0,1fr); width: 100%; text-align: left; cursor: pointer; }
.row strong { line-height: 1.27; }
.row small { font-size: .76rem; }
.row-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.record-tag { color: var(--ink); border: 1px solid var(--edge); background: var(--chip); border-radius: 999px; padding: 1px 6px; font-size: .67rem; }
[data-kind="f"], [data-kind="s"] { border-color: #dfab596e; }
[data-kind="a"] { border-color: #b49bf58a; }
[data-kind="g"] { border-color: #e780b396; }
[data-kind="i"] { border-color: #79bcab80; }
.cover {
    display: block;
    width: 100%;
    aspect-ratio: 16/11;
    border-radius: 8px;
    background: var(--chip) url(album-art.png) 0 0 / 200% 200% no-repeat;
    box-shadow: inset 0 0 0 1px #fff2;
}
.cover[data-art=holiday] { background-position: 100% 0; }
.cover[data-art=game] { background-position: 0 100%; }
.cover[data-art=live] { background-position: 100% 100%; }
.cover { overflow: hidden; }
.cover img { display: block; width: 100%; height: 100%; border-radius: 0; }
.archive-ui .panel::before, .archive-ui .panel::after { content: none; }
.row:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 1050px) and (min-width: 851px) {
    .row { grid-template-columns: 62px minmax(0,1fr); }
}
@media (max-width: 670px) {
    .archive-meta, main { width: calc(100% - 24px); }
    .columns { grid-template-columns: minmax(0,1fr); }
    .hero { padding-block: 26px 18px; }
    .toolbar { gap: 6px; }
    .row { grid-template-columns: 72px minmax(0,1fr); }
}

.sitebar {
    --nav-surface: #fff9fdef;
    --nav-border: #ffffffbd;
    --nav-text: #392a38;
    --nav-active: #302031;
    display: flex;
    align-items: center;
    gap: clamp(8px, 1.35vw, 20px);
    width: min(1440px, calc(100% - 44px));
    margin: 0 auto;
    padding: 17px 0 8px;
    position: relative;
    z-index: 2;
}
[data-theme="hell"] .sitebar {
    --nav-surface: #24182beF;
    --nav-border: #f6d2e654;
    --nav-text: #f9e8f4;
    --nav-active: #74415f;
}
.site-brand {
    flex: none;
    text-decoration: none;
    color: var(--ink);
    font-size: clamp(1.15rem, 2vw, 1.6rem);
    font-weight: 950;
    line-height: 1.05;
}
.site-brand span { color: #f64b80; }
.site-brand small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: .6rem;
    font-weight: 650;
    letter-spacing: .26em;
}
.site-nav, .site-theme, .site-menu {
    background: var(--nav-surface);
    color: var(--nav-text);
    border: 1px solid var(--nav-border);
    box-shadow: 0 6px 20px #2a13261a;
    border-radius: 18px;
    backdrop-filter: blur(12px);
}
.site-nav { display: flex; align-items: center; justify-content: space-between; flex: 1; padding: 4px; }
.site-nav a, .site-theme > span {
    padding: .56rem clamp(.4rem, .9vw, .88rem);
    border-radius: 13px;
    white-space: nowrap;
    font-size: .85rem;
    font-weight: 750;
}
.site-nav a { text-decoration: none; }
.site-nav a:hover { background: var(--chip); }
.site-nav [aria-current=page] { background: var(--nav-active); color: #fff; }
.site-theme { display: flex; gap: 2px; padding: 4px; }
.site-theme > span { padding-inline: .7rem; }
.site-theme > span:first-child, [data-theme="hell"] .site-theme > span:last-child {
    background: linear-gradient(135deg, #ff638d, #e92d65);
    color: #27111e;
}
[data-theme="hell"] .site-theme > span:first-child { background: transparent; color: inherit; }
.site-menu { display: none; font-size: 1.12rem; }
@media (max-width: 1080px) {
    .site-brand { margin-inline-end: auto; }
    .site-menu { display: block; }
    .site-nav {
        display: none;
        position: absolute;
        inset: calc(100% + 4px) 0 auto auto;
        width: min(100%, 300px);
        flex-direction: column;
        align-items: stretch;
    }
    .site-menu[aria-expanded=true] + .site-nav { display: flex; }
}
@media (max-width: 570px) {
    .sitebar { width: calc(100% - 24px); padding-top: 12px; gap: 6px; }
    .site-theme > span { padding-inline: .38rem; font-size: .74rem; }
    .site-brand small { font-size: .48rem; letter-spacing: .19em; }
}

@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/cormorant-garamond-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+2000-206F; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/cormorant-garamond-cyrillic-600-normal.woff2) format('woff2'); unicode-range: U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 600; font-display: swap; src: url(fonts/cormorant-garamond-latin-600-italic.woff2) format('woff2'); unicode-range: U+0000-00FF,U+2000-206F; }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 600; font-display: swap; src: url(fonts/cormorant-garamond-cyrillic-600-italic.woff2) format('woff2'); unicode-range: U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/onest-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+2000-206F; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/onest-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/onest-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+2000-206F; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/onest-cyrillic-600-normal.woff2) format('woff2'); unicode-range: U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/onest-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+2000-206F; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/onest-cyrillic-700-normal.woff2) format('woff2'); unicode-range: U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }

:root {
    --album-serif: "Cormorant Garamond", Georgia, serif;
    --lit-edge: #ba487a;
    --lit-halo: #c3407860;
    --lit-fill: #f5c8dc;
    --lit-top: #f19abf;
    --lit-bottom: #c85b8b;
    --lit-text: #301020;
}
:root[data-theme="hell"] {
    --lit-edge: #f58ab8;
    --lit-halo: #ed5e9c8c;
    --lit-fill: #6f2c51;
    --lit-top: #d37aa4;
    --lit-bottom: #8f3c68;
    --lit-text: #fff3f9;
}
body { font-family: Onest, system-ui, sans-serif; }
h1, .calendar h2 { font-family: var(--album-serif); font-weight: 600; }
h1 { font-style: italic; letter-spacing: .005em; }
.row strong { font-weight: 600; }
.subtitle, .row small { font-weight: 400; }
.site-nav [aria-current=page],
.site-theme > span:first-child,
[data-theme="hell"] .site-theme > span:last-child,
.months button[aria-pressed=true],
.filters button[aria-pressed=true] {
    border: 1px solid var(--lit-edge);
    background: linear-gradient(180deg, var(--lit-top), var(--lit-bottom));
    color: var(--lit-text);
    box-shadow: inset 0 1px 5px #ffd7e880, 0 0 11px var(--lit-halo);
}
[data-theme="hell"] .site-theme > span:first-child { border-color: transparent; box-shadow: none; }
.site-theme > span { border: 1px solid transparent; }
.days button, .days button:not(:disabled) {
    width: min(100%, 2.1rem);
    aspect-ratio: 1;
    justify-self: center;
    padding: 0;
    border-radius: 50%;
    box-shadow: none;
}
.days button:not(:disabled):not([aria-pressed=true]):not([aria-current=date]) {
    border-color: transparent;
    background: transparent;
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-underline-offset: 3px;
}
.days button[aria-pressed=true],
.days button[aria-current=date],
.days button[aria-pressed=true]:not(:disabled) {
    border-color: var(--lit-edge);
    color: var(--ink);
    background: var(--lit-fill);
    box-shadow: inset 0 0 6px var(--lit-halo), 0 0 10px var(--lit-halo);
}
.days button[aria-pressed=true][aria-current=date] { outline: 1px solid var(--lit-edge); outline-offset: 2px; }

/* Keep the album spread as wide as the available window. */
main, .archive-meta, .sitebar {
    width: auto;
    margin-inline: clamp(10px, 1.15vw, 24px);
}
.toolbar {
    width: min(100%, 1080px);
    max-width: none;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr);
    gap: clamp(12px, 3.5vw, 52px);
}
.year-strip {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 5px;
    padding: 4px;
    border: 1px solid var(--edge);
    border-radius: 999px;
    background: var(--paper);
    box-shadow: inset 0 1px var(--shine), 0 5px 20px #170d2420;
}
.years {
    position: relative;
    display: flex;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 4px;
    gap: 4px;
}
.year-strip button {
    background: transparent;
    border-color: transparent;
    border-radius: 999px;
    line-height: 1.25;
}
.year-strip > button { flex: none; font-size: 1.3rem; padding: .25rem .65rem; }
.year-strip > button:disabled { opacity: .38; cursor: default; }
.years button { flex: 1 0 4.15rem; padding: .36rem .62rem; }
.years button[aria-pressed=true] {
    border-color: var(--lit-edge);
    background: linear-gradient(180deg, var(--lit-top), var(--lit-bottom));
    color: var(--lit-text);
    box-shadow: inset 0 1px 5px #ffd7e880, 0 0 8px var(--lit-halo);
}
@media (min-width: 851px) {
    .columns { grid-template-columns: minmax(205px, 21fr) minmax(0, 77fr); }
}
@media (max-width: 670px) {
    .toolbar { grid-template-columns: minmax(0,1fr); gap: 8px; }
    .search input { min-height: 42px; }
}

/* Sakura palette and header measurements from the published site. */
:root {
    --bg: #fff5f7;
    --ink: #2b1d2a;
    --muted: #5e4a5c;
    --accent: #ec3f68;
    --paper: #ffffffd1;
    --edge: #a03c5f24;
    --chip: #ff6f9124;
    --panel-top: #ffffffbd;
    --panel-end: #ffffffbd;
    --card-top: #fffafc;
    --card-end: #fff5f7;
    --lit-edge: #ec3f68;
    --lit-top: #ff6a8c;
    --lit-bottom: #f4476f;
    --lit-text: #fff;
    --lit-fill: #ffe3ea;
    --lit-halo: #f03c6970;
    --site-shadow: 0 .7rem 1.6rem -.8rem #f03c69bf;
}
:root[data-theme="hell"] {
    --bg: #0d0a1c;
    --ink: #f6ecf7;
    --muted: #cfc1de;
    --accent: #ff6f91;
    --paper: #1c1636c7;
    --edge: #ffa0c32e;
    --chip: #ff6f9126;
    --panel-top: #1a1434bd;
    --panel-end: #1a1434bd;
    --card-top: #211935;
    --card-end: #17122d;
    --lit-edge: #ff8fab;
    --lit-top: #ff7a9b;
    --lit-bottom: #ff5c86;
    --lit-text: #fff;
    --lit-fill: #9b2c55;
    --lit-halo: #ff5a8c70;
    --site-shadow: 0 .7rem 1.6rem -.8rem #ff5a8ccc;
}
.panel { border-radius: 24px; backdrop-filter: blur(14px) saturate(1.3); }
.sitebar {
    --nav-surface: var(--paper);
    --nav-border: #ffffffe6;
    --nav-text: var(--muted);
    margin-inline: clamp(16px, 3vw, 48px);
    padding-top: clamp(14px, 2.6vh, 26px);
    gap: 20px;
}
[data-theme="hell"] .sitebar { --nav-surface: var(--paper); --nav-border: var(--edge); --nav-text: var(--muted); }
.site-brand { font-size: clamp(22px, 1.75vw, 28px); font-weight: 800; letter-spacing: .01em; }
.site-brand span { color: var(--accent); }
.site-brand small { margin-top: 7px; font-size: 11px; letter-spacing: .42em; }
.site-nav { gap: 4px; justify-content: flex-start; flex: 0 1 auto; margin-inline-start: auto; overflow-x: auto; scrollbar-width: none; }
.site-nav a, .site-theme > span {
    flex: none;
    display: inline-flex;
    align-items: center;
    height: 38px;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 700;
}
.site-theme { flex: none; }
.site-theme > span { gap: 6px; font-weight: 800; }
.site-nav [aria-current=page] { background: #2b1d2a; border: 0; color: #fff; box-shadow: none; }
[data-theme="hell"] .site-nav [aria-current=page],
.site-theme > span:first-child,
[data-theme="hell"] .site-theme > span:last-child,
.months button[aria-pressed=true],
.filters button[aria-pressed=true],
.years button[aria-pressed=true] {
    background: linear-gradient(180deg, var(--lit-top), var(--lit-bottom));
    color: var(--lit-text);
    box-shadow: var(--site-shadow);
}
@media (max-width: 1240px) {
    .site-brand small { display: none; }
    .site-nav a { padding-inline: 11px; font-size: 13.5px; }
}
/* 9.11.2026: разделов 11 (добавлена «Предложка») — плотнее до 1600 px, как шапка остальных страниц (base.css) */
@media (min-width: 1081px) and (max-width: 1600px) {
    .site-brand small { display: none; }
    .site-nav a { padding-inline: 10px; font-size: 13.5px; }
}
@media (min-width: 1081px) and (max-width: 1440px) {
    .sitebar { gap: 14px; }
    .site-nav { gap: 2px; }
    .site-nav a { padding-inline: 8px; font-size: 13px; }
}
@media (max-width: 1080px) {
    .sitebar { gap: 10px; }
    .site-menu { width: 46px; height: 46px; padding: 0; border-radius: 15px; }
    .site-nav a { height: 44px; font-size: 15px; }
}
@media (max-width: 480px) {
    .sitebar { margin-inline: 12px; gap: 6px; }
    .site-brand { font-size: clamp(16px, 5vw, 22px); }
    .site-theme > span { padding-inline: 8px; font-size: 12px; }
}


:root {
    --ease-out: cubic-bezier(.2,.7,.2,1);
}
main, .archive-meta { position: relative; z-index: 1; }
.row { animation: archive-in .4s var(--ease-out) both; }
@keyframes archive-in { from { opacity: 0; transform: translateY(8px); } }
.is-lite .row { animation: none; }
.is-lite :is(.panel, .site-nav, .site-theme, .site-menu) { backdrop-filter: none; }
.site-theme.is-busy { animation: theme-busy .8s ease-in-out infinite alternate; }
@keyframes theme-busy { to { opacity: .65; } }


/* Separate the archive from the composited background and particle canvases. */
body { isolation: isolate; }
body > .scene { z-index: -1; }
.archive-ui { position: relative; isolation: isolate; z-index: 10; }

/* 5.11.2026 — удобство: записи по дням, кнопка «▶ Смотреть», стрелки месяцев, числа у фильтров и месяцев,
   точки видов у дней календаря, свёрнутый календарь на телефоне. */
:root {
    --k-g: #d6457f; --k-f: #c4861b; --k-s: #d4632a; --k-a: #7a5ad8; --k-i: #1f8d74; --k-c: #3b74c4;
}
:root[data-theme="hell"] {
    --k-g: #ff7fb4; --k-f: #f2c158; --k-s: #ff9a5c; --k-a: #b9a3ff; --k-i: #5fd6b8; --k-c: #85b5ff;
}
[data-kind="g"] { --kc: var(--k-g); }
[data-kind="f"] { --kc: var(--k-f); }
[data-kind="s"] { --kc: var(--k-s); }
[data-kind="a"] { --kc: var(--k-a); }
[data-kind="i"] { --kc: var(--k-i); }
[data-kind="c"] { --kc: var(--k-c); }

/* Шапка списка: ← месяц · название и итог · месяц → */
.records .panel-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 12px;
}
.ph-main { grid-column: 2; text-align: center; min-width: 0; }
.ph-main h2 { margin: 0; font-family: var(--album-serif); font-size: clamp(1.45rem, 2.2vw, 1.95rem); font-weight: 600; letter-spacing: 0; }
.records .result-count { display: block; margin-top: 2px; font-size: .84rem; }
.month-step {
    grid-row: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: .45rem .95rem;
    border-radius: 999px;
    background: var(--paper);
    font-size: .86rem;
    font-weight: 600;
    white-space: nowrap;
}
#monthPrev { grid-column: 1; justify-self: start; }
#monthNext { grid-column: 3; justify-self: end; }
.month-step__t { overflow: hidden; text-overflow: ellipsis; }
.month-step__arrow { color: var(--accent); font-size: 1.05rem; line-height: 1; }
.month-step:hover:not(:disabled) { border-color: var(--lit-edge); background: var(--chip); }
.month-step:disabled { opacity: .42; cursor: default; font-weight: 400; }
.month-step[hidden] { display: none; }

/* Фильтры с числом и цветной точкой вида */
.filters button { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: .32rem .75rem; }
.filters small { font-size: .72rem; color: var(--muted); }
.filters button[aria-pressed=true] small { color: inherit; opacity: .85; }
.kdot { width: 8px; height: 8px; border-radius: 50%; background: var(--kc); flex: none; }
.filters button[aria-pressed=true] .kdot { box-shadow: 0 0 0 1.5px #fff; }

/* Заголовок дня (в поиске — месяца) */
.day-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 20px 2px 0;
    padding-bottom: 5px;
    border-bottom: 1px dashed var(--edge);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}
#records > .day-head:first-child { margin-top: 2px; }
.day-head__name::first-letter { color: var(--accent); }
.day-head__sum { color: var(--muted); font-size: .8rem; font-weight: 400; white-space: nowrap; }

/* Строка записи: обложка · текст · кнопка */
#records .row {
    grid-template-columns: 104px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 7px 12px 7px 7px;
    margin-top: 7px;
    color: var(--ink);
    text-decoration: none;
}
#records .row .cover { aspect-ratio: 16 / 10; border-radius: 9px; }
.row-body { min-width: 0; }
.row-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: .97rem;
}
.row-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px 0;
    margin-top: 3px;
    color: var(--muted);
    font-size: .79rem;
}
.row-meta__bit + .row-meta__bit::before { content: "·"; margin-inline: 7px; opacity: .7; }
.row-meta .row-tags { margin: 0 0 0 10px; }
.row-go {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: .45rem 1rem;
    border: 1px solid var(--lit-edge);
    border-radius: 999px;
    background: var(--chip);
    color: var(--accent);
    font-size: .84rem;
    font-weight: 700;
    white-space: nowrap;
    transition: background .2s, color .2s;
}
.row-go b { font-size: .78rem; }
a.row:hover .row-go, a.row:focus-visible .row-go {
    background: linear-gradient(180deg, var(--lit-top), var(--lit-bottom));
    color: var(--lit-text);
}
button.row .row-go { border-color: var(--edge); color: var(--muted); font-weight: 600; }
#records > .more {
    display: block;
    margin: 16px auto 2px;
    padding: .55rem 1.4rem;
    border-radius: 999px;
    font-weight: 600;
}

/* Календарь: месяцы с числом, дни с записями — кружок и точки видов */
.months button { display: flex; flex-direction: column; align-items: center; line-height: 1.15; padding: .32rem 0 .28rem; }
.months small { font-size: .66rem; color: var(--muted); }
.months button[aria-pressed=true] small { color: inherit; opacity: .85; }
.months button:disabled { opacity: .4; cursor: default; background: transparent; }
.days button { position: relative; }
.days button:not(:disabled):not([aria-pressed=true]):not([aria-current=date]) {
    text-decoration: none;
    background: var(--chip);
    border-color: transparent;
    font-weight: 600;
}
.days button:not(:disabled):hover { border-color: var(--lit-edge); }
.ddots {
    position: absolute;
    left: 50%;
    bottom: 3px;
    display: flex;
    gap: 2px;
    transform: translateX(-50%);
}
.ddots i { width: 4px; height: 4px; border-radius: 50%; background: var(--kc); }
.days button > span:first-child { position: relative; top: -2px; }
.calendar .subtitle { font-size: .86rem; }
.calendar.is-search .subtitle { color: var(--accent); }
.calendar.is-search :is(.months, .days) { opacity: .5; }
.cal-toggle { display: none; }

/* Полоса годов: края гаснут, если она листается */
.years.is-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 18px); mask-image: linear-gradient(90deg, transparent, #000 18px); }
.years.is-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent); }
.years.is-l.is-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent); }
.years button { flex: 1 0 3.6rem; }

.archive-more { margin: 0 0 32px; text-align: center; }
.archive-more a {
    display: inline-flex;
    gap: 8px;
    padding: .6rem 1.3rem;
    border: 1px solid var(--edge);
    border-radius: 999px;
    background: var(--paper);
    font-weight: 600;
    text-decoration: none;
    backdrop-filter: blur(10px);
}
.archive-more a:hover { border-color: var(--lit-edge); color: var(--accent); }

@media (max-width: 1050px) and (min-width: 671px) {
    #records .row { grid-template-columns: 80px minmax(0, 1fr) auto; }
    .row-go__t { display: none; }
    .row-go { padding: .5rem .7rem; }
}
@media (max-width: 670px) {
    .hero { padding-block: 16px 12px; }
    .calendar { padding: 8px; border-radius: 18px; }
    .cal-toggle {
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: .7rem .9rem;
        border: 0;
        border-radius: 13px;
        background: var(--chip);
        font-weight: 700;
        text-align: left;
    }
    .cal-toggle__more { color: var(--accent); font-size: .82rem; font-weight: 600; white-space: nowrap; }
    .cal-toggle[aria-expanded=true] .cal-toggle__more span { display: inline-block; transform: rotate(180deg); }
    .cal-body { display: none; padding: 12px 8px 6px; }
    .calendar.is-open .cal-body { display: block; }
    .records .panel-heading { grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; }
    .month-step { padding: .5rem .7rem; }
    .month-step__t { display: none; }
    .ph-main h2 { font-size: 1.4rem; }
    .filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        margin-inline: -16px;
        padding: 2px 16px 4px;
    }
    .filters button { flex: none; }
    #records .row { grid-template-columns: 70px minmax(0, 1fr) auto; gap: 10px; padding: 6px 8px 6px 6px; }
    .row-title { font-size: .92rem; }
    .row-meta { font-size: .75rem; gap: 1px 10px; }
    .row-meta__bit + .row-meta__bit::before { content: none; }
    .row-meta .row-tags { margin-left: 0; width: 100%; margin-top: 2px; }
    .row-go { width: 38px; height: 38px; padding: 0; justify-content: center; }
    .row-go__t { display: none; }
    button.row .row-go::before { content: "i"; font-style: italic; font-family: Georgia, serif; }
    .day-head { margin-top: 16px; font-size: .95rem; }
}

/* Diagnostic mode for browsers that lose the UI during scene compositing. */
.safe-preview body {
    background: var(--bg) url(site-effects/bg-heaven.jpg) center top / cover fixed no-repeat;
    isolation: auto;
}
.safe-preview[data-theme="hell"] body { background-image: url(site-effects/bg-hell.jpg); }
.safe-preview .archive-ui, .safe-preview main, .safe-preview .archive-meta { z-index: auto; }
.safe-preview .panel { background: #fff8fb; }
.safe-preview[data-theme="hell"] .panel { background: #1a1434; }

