/* ============================================================
   Лист «Календарь» — стили исходника (st.css основного сайта),
   переведённые в em и привязанные к ширине экрана.
   Значения 1:1 из исходника: цвета ячеек, рамки, шрифты, пропорции.
   Контейнер резиновый: базовый размер --fs растёт вместе с шириной окна,
   всё остальное (ячейки, подписи, карточки) задано в em и масштабируется вместе с ним.
   ============================================================ */

/* Как в исходнике: Gilroy «Light» под именем с одним начертанием — жирный получается синтетическим */
@font-face {
    font-family: "GilroyO";
    src: url("fonts/Gilroy-Light.woff") format("woff"), url("fonts/Gilroy-Light.ttf") format("truetype");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

.sheet {
    --fs: clamp(14px, calc(6px + .62vw), 28px);   /* 1200px → 14px, 1920px → 18px, 2560px → 22px */
    --rowh: calc(var(--fs) * 2.9);                  /* высота строки дней в режиме «по месяцам» */
    --line: #c9c3c3;
    --hi: #6A82FF;
    --gold: #d1ab2c;
    --pink: #FF3E6C;
    --green: #169975;
    --ice: #c1eaff;

    max-width: none;
    width: 100%;
    padding: clamp(10px, 2vw, 30px) clamp(10px, 2.4vw, 64px) 5em;
    font-family: "GilroyO", "Gilroy", "Segoe UI", system-ui, sans-serif;
    font-size: var(--fs);
    font-weight: 400;
    line-height: 1.3;
}
.sheet .kos { color: var(--gold); }

/* ---------- заголовок (h1 и .h1 исходника) ---------- */
.sheet .h1 { display: flex; justify-content: center; margin: clamp(1.4em, 4vw, 4.3em) 0; }
.sheet .h1 h1 {
    max-width: 43.5em;
    margin: 0;
    color: #fff;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 0 21px rgba(77, 192, 255, .81);
    font-size: 1.64em;
    font-weight: 400;
    line-height: 1;
    letter-spacing: .28em;
}
.sheet .h1 h1 span { letter-spacing: inherit; }
/* демонстрационный календарь Асгардии: длинный заголовок — мельче и с умеренным разрядом */
.sheet .h1 h1.asg-h1 { max-width: 52em; font-size: 1.3em; line-height: 1.25; letter-spacing: .16em; }
@media (max-width: 700px) { .sheet .h1 h1 { font-size: 1.05em; line-height: 1.15; letter-spacing: .12em; } .sheet .h1 h1.asg-h1 { font-size: .92em; line-height: 1.25; letter-spacing: .08em; } }

/* ---------- блоки = вкладки исходника (.tab) ---------- */
.sheet .blocktools { display: flex; flex-wrap: wrap; justify-content: center; gap: .6em; margin: 0 0 1.6em; }
.sheet .blocktools[hidden] { display: none; }
.sheet .blk { margin: 0 0 2.4em; }
.sheet .blk > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    max-width: 100%;
    min-width: 14em;
    height: 5em;
    margin: 0 auto;
    padding: 0 1.6em;
    color: #fff;
    font-size: .857em;                 /* 12px */
    line-height: 1.3;
    text-align: center;
    cursor: pointer;
    list-style: none;
    border: 2px solid #fff;
}
.sheet .blk > summary::-webkit-details-marker { display: none; }
.sheet .blk > summary:hover { background: rgba(106, 130, 255, .3); }
.sheet .blk[open] > summary { background: var(--hi); }
.sheet .blk > summary:focus-visible, .sheet a:focus-visible, .sheet button:focus-visible, .sheet input:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}
.sheet .blk-body { padding-top: 2em; }

/* ---------- кнопки как в исходнике (button) ---------- */
.sheet button, .sheet .gtoday {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.86em;
    padding: 0 1.2em;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: .95em;
    line-height: 1.2;
    text-decoration: none;
    background: rgba(0, 8, 35, .25);
    border: 2px outset #8a8a8a;
    cursor: pointer;
}
.sheet button:hover, .sheet .gtoday:hover { background: rgba(255, 255, 255, .12); }

/* ---------- «сегодня» (#dataShapka: .d3c1bf, .c8f45b, .e923ee) ---------- */
.sheet .today { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2em 5.8em; }
.sheet .tcol { display: flex; flex-direction: column; align-items: center; color: #fff; }
.sheet .tcol.kos { color: var(--gold); }
.sheet .tcol h3 {
    width: 16.7em;
    max-width: 100%;
    margin: 0;
    font-size: 1.714em;
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: .25em;
    text-align: center;
}
.sheet .trow { display: flex; align-items: center; justify-content: space-between; gap: 1.3em; margin-top: .65em; text-align: center; font-variant-numeric: tabular-nums; }
.sheet .t1, .sheet .t3 { display: flex; flex-direction: column; min-width: 2.4em; font-size: 2.286em; line-height: 1.25; }
.sheet .t2 { font-size: 4.286em; line-height: 1; }
@media (max-width: 700px) {
    .sheet .today { gap: 1.6em; }
    .sheet .tcol h3 { font-size: 1.05em; letter-spacing: .14em; }
    .sheet .t1, .sheet .t3 { font-size: 1.55em; }
    .sheet .t2 { font-size: 3.2em; }
    .sheet .trow { gap: .8em; }
}

/* ---------- выбор года (.sgod, .god, .a09901) и «как читать ячейку» (.cda262) ---------- */
.sheet .sgod { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-evenly; gap: 1.6em 2em; margin: 0 0 2.4em; }
.sheet .god { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0; background: rgba(0, 8, 35, .2); }
.sheet .gbtn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.3em;
    height: 4.3em;
    background: rgba(0, 8, 35, .25);
    border: 3px outset #8a8a8a;
}
.sheet .gbtn:hover { background: rgba(255, 255, 255, .12); }
.sheet .gbtn svg { width: 1.86em; height: 1.86em; }
.sheet .gbox { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 7.3em; height: 4.3em; }
.sheet .gbox b, .sheet .gbox input { font-family: inherit; font-size: 1.286em; font-weight: 500; line-height: 1.2; font-variant-numeric: tabular-nums; }
.sheet .gcos b { color: var(--ice); font-weight: 700; }
.sheet .gbox span, .sheet .gbox label { font-size: .714em; line-height: 1.1; text-align: center; }
.sheet .gbox input { width: 5.4em; padding: 0; color: #fff; text-align: center; background: transparent; border: 0; border-bottom: 1px solid transparent; -moz-appearance: textfield; }
.sheet .gbox input::-webkit-outer-spin-button, .sheet .gbox input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sheet .gbox input:focus { border-bottom-color: #fff; outline: none; }
.sheet .gline { align-self: center; width: 2px; height: 1.86em; margin: 0 .3em; background: #fff; }
.sheet .gact { display: flex; align-items: center; gap: .6em; margin-left: 1em; }
@media (max-width: 480px) {
    .sheet .gbtn { width: 3.1em; }
    .sheet .gbox { width: 6em; }
    .sheet .gact { width: 100%; margin: .7em 0 0; padding: 0; justify-content: center; }
}
.sheet .cellkey { margin: 0; width: min(100%, 28em); }
.sheet .cellkey svg { display: block; width: 100%; height: auto; font-family: inherit; }

/* обозначения цветов (дополнение к исходнику, мелко под сеткой) */
.sheet .key { display: flex; flex-wrap: wrap; justify-content: center; gap: .5em 1.6em; margin: 0 0 1.6em; padding: 0; list-style: none; font-size: .857em; }
.sheet .key li { display: inline-flex; align-items: center; gap: .5em; }
.sheet .sw { display: inline-block; flex: none; width: 1.1em; height: 1.1em; border: .5px solid var(--line); }
.sheet .calnote { max-width: 80ch; margin: 1.6em auto 0; color: rgba(255, 255, 255, .8); font-size: .857em; line-height: 1.45; text-align: center; }
.sheet .calnote a { color: #fff; text-underline-offset: 3px; }
.sheet .calnote a:hover { color: var(--gold); }

/* ---------- цвета ячеек: 1:1 из st.css ---------- */
.sheet .cell.k-plain, .sheet .sw.k-plain { background: rgba(255, 255, 255, .15); }
.sheet .cell.k-weekend, .sheet .sw.k-weekend { background: rgba(255, 255, 255, .45); }
.sheet .cell.k-primary, .sheet .cell.k-extra, .sheet .sw.k-primary, .sheet .sw.k-extra { background: var(--pink); border: 1px solid #ffcc00; color: #fff; }
.sheet .cell.k-secondary, .sheet .sw.k-secondary { background: var(--gold); border: 1px solid var(--pink); color: #58268D; font-weight: 900; }
.sheet .cell.k-equinox, .sheet .sw.k-equinox { background: var(--green); border: 1px solid #ffcc00; color: #fff; }
.sheet .cell.k-white, .sheet .sw.k-white { background: #fff; border: 1px solid #fff; color: #000; }
.sheet .cell.k-white b, .sheet .cell.k-white i, .sheet .cell.k-white span { color: #000; }
.sheet .cell.now, .sheet .sw.now { background: var(--hi); }
.sheet .cell.k-primary b, .sheet .cell.k-extra b, .sheet .cell.k-equinox b { color: #fff; }
.sheet .cell.k-secondary b, .sheet .cell.k-secondary i { color: #58268D; font-weight: 900; }

/* ---------- сетка года (.table-cell*, .tableContainer) ---------- */
.sheet .ycal-box { overflow: visible; }
.sheet .ycal { display: grid; gap: 1.4em; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20em), 1fr)); }
.sheet .yhead { display: none; }
.sheet .mrow { min-width: 0; margin: 0; }
.sheet .mname { margin: 0 0 .7em; font-size: 1.1em; font-weight: 400; line-height: 1.2; text-align: center; color: var(--ice); }
.sheet .mname .no { font-size: .64em; color: #fff; }
.sheet .mname .nm { margin-left: .3em; }
.sheet .mname.cur .nm { text-decoration: underline; text-decoration-color: var(--hi); text-decoration-thickness: .2em; text-underline-offset: .25em; }
.sheet .whead, .sheet .days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; }
.sheet .days { position: relative; grid-auto-rows: var(--rowh); }
.sheet .hd {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 2.5em;
    color: var(--ice);
    text-align: center;
    line-height: 1.3;
    background: rgba(0, 8, 35, .3);
    border: .5px solid var(--line);
}
.sheet .hd b { font-weight: 400; }
.sheet .hd i { color: #fff; font-size: .714em; font-style: normal; line-height: 1; }
.sheet .hd.now { background: var(--hi); }
.sheet .cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    color: var(--ice);
    text-align: center;
    text-decoration: none;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
    border: .5px solid var(--line);
}
.sheet .cell + .cell { margin-top: 0; }   /* у «Лунного времени» тоже есть класс .cell с отступом между соседями */
.sheet .cell b { font-weight: 400; font-size: 1em; }
.sheet .cell i { color: #fff; font-size: .714em; font-style: normal; line-height: 1; white-space: nowrap; }
.sheet a.cell:hover { outline: 2px solid #fff; outline-offset: -2px; }
.sheet a.cell:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.sheet .mx .days { grid-template-columns: repeat(7, minmax(0, 1fr)); }
@media (max-width: 359px) { .sheet .cell i { font-size: .64em; } .sheet .hd i { font-size: .64em; } }

/* большие экраны: все 28 дней месяца в одной строке, ячейки квадратные */
@media (min-width: 1100px) {
    .sheet .view-year .ycal { display: block; }
    .sheet .view-year .yhead, .sheet .view-year .mrow { display: grid; grid-template-columns: 8em minmax(0, 1fr); align-items: stretch; margin: 0; }
    .sheet .view-year .ycorner {
        display: flex;
        align-items: center;
        justify-content: center;
        padding-left: .3em;
        font-size: 2.571em;
        line-height: 1;
        border: 1px solid #fff;
    }
    .sheet .view-year .hds, .sheet .view-year .days { display: grid; grid-template-columns: repeat(28, minmax(0, 1fr)); grid-auto-rows: auto; gap: 0; }
    .sheet .view-year .whead { display: none; }
    .sheet .view-year .yhead { display: grid; }
    .sheet .view-year .hd, .sheet .view-year .cell { aspect-ratio: 1 / 1; min-height: 0; }
    .sheet .view-year .mname {
        display: flex;
        flex-direction: column;
        justify-content: center;
        margin: 0;
        padding-left: .714em;
        color: var(--ice);
        font-size: 1em;
        text-align: left;
        background: rgba(255, 255, 255, .2);
        border: .5px solid var(--line);
    }
    .sheet .view-year .mname .no { display: block; padding-top: .28em; font-size: .714em; line-height: 1; }
    .sheet .view-year .mname .nm { margin: 0; }
    .sheet .view-year .mname.cur { background: var(--hi); }
    .sheet .view-year .mname.cur .nm { text-decoration: none; }
    .sheet .view-year .mx .days { grid-template-columns: repeat(28, minmax(0, 1fr)); }
}

/* ---------- всплывающее описание праздника ---------- */
.sheet .tip {
    position: absolute;
    z-index: 40;
    left: 0;
    right: 0;
    top: calc((var(--r, 0) + 1) * var(--rowh) + 4px);
    display: none;
    padding: .8em 1em 1em;
    color: #fff;
    text-align: left;
    background: #0a1a42;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 4px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .5);
    font-weight: 400;
    font-size: .95em;
    line-height: 1.35;
    pointer-events: none;
}
.sheet .tip .tn { display: block; font-size: 1.15em; font-weight: 400; line-height: 1.25; color: #fff; }
.sheet .tip .td { display: block; margin: .25em 0 .55em; color: var(--gold); font-size: .85em; font-style: normal; }
.sheet .tip .tt { display: block; white-space: pre-line; color: rgba(255, 255, 255, .92); }
.sheet .cell.k-white .tip { color: #000; background: #fff; border-color: #000; }
.sheet .cell.k-white .tip .tn, .sheet .cell.k-white .tip .tt { color: #000; }
.sheet .cell.k-white .tip .td { color: #444; }
@media (hover: hover) and (pointer: fine) { .sheet a.cell:hover .tip { display: block; } }
.sheet a.cell:focus-visible .tip { display: block; }
@media (min-width: 1100px) {
    .sheet .view-year .tip { width: 24em; right: auto; top: calc(100% + .4em); left: clamp(0px, calc((var(--c, 1) - .5) / 28 * 100% - 12em), calc(100% - 24em)); }
    .sheet .view-year .cell.up .tip { top: auto; bottom: calc(100% + .4em); }
}

/* ---------- карточки праздников (.ec9fcb, .c3f2a9, .d5ddb3, .a4743f, .bcd83c) ---------- */
.sheet .hsec + .hsec { margin-top: 2.4em; }
.sheet .hsec h3 { margin: 0; font-size: 1.43em; font-weight: 600; line-height: 1.2; }   /* #pgod: 20px / 600 */
.sheet .hcards { display: grid; gap: 0 2.6em; margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fill, minmax(min(100%, 21em), 1fr)); }
.sheet .hcard { display: flex; margin-top: 1.43em; scroll-margin-top: 2em; }
.sheet .badge {
    display: flex;
    flex: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 2.857em;
    height: 2.857em;
    margin-right: .714em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.sheet .badge b { margin-bottom: .28em; font-size: 1.286em; font-weight: 600; line-height: .9; }
.sheet .badge i { font-size: .714em; font-style: normal; font-weight: 500; line-height: 1; white-space: nowrap; }
.sheet .hcard.k-primary .badge, .sheet .hcard.k-extra .badge { background: var(--pink); color: #fff; }
.sheet .hcard.k-secondary .badge { background: var(--gold); color: #58268D; }
.sheet .hcard.k-equinox .badge { background: var(--green); color: #fff; }
/* белый квадрат с чёрными буквами — как цветные квадраты других праздников (карточка обычная) */
.sheet .hcard.k-white .badge { color: #000; background: #fff; }
.sheet .htxt { display: flex; flex-direction: column; gap: .2em; min-width: 0; margin-left: .6em; }
.sheet .hdate { font-size: .857em; line-height: 1.1; }
.sheet .hdate span { color: var(--gold); }
.sheet .hname { font-size: 1.286em; font-weight: 500; line-height: 1.1; overflow-wrap: anywhere; }
.sheet .hdesc { white-space: pre-line; margin-top: .3em; color: rgba(255, 255, 255, .85); font-size: .857em; line-height: 1.4; }
@media (hover: hover) and (pointer: fine) { .sheet .hdesc { display: none; } }   /* на ПК описание — во всплывающей подсказке */
.sheet .hcard:target .htxt { outline: 2px solid var(--gold); outline-offset: 4px; }

/* ---------- описание (.bea659, .b86463, .adebe4) ---------- */
.sheet .desc-box { padding: clamp(1em, 3.6vw, 3.57em); border: 1px solid var(--line); }
.sheet .dh { margin: 0 0 .3em; font-size: 1.43em; font-weight: 600; line-height: 1.2; }
.sheet .desc { column-width: 26em; column-gap: 2.4em; font-size: 1em; line-height: 1.5; }
.sheet .desc p { margin: 0; overflow-wrap: anywhere; }
.sheet .desc .d-lead { margin-bottom: .2em; font-weight: 600; }
.sheet .desc .d-link { margin-bottom: .8em; }
.sheet .desc a { color: #fff; text-decoration: underline; }
.sheet .desc a:hover { color: var(--gold); }

/* ---------- эпохи (.copyK, .metkaData, .sEpoh, .copyButton) ---------- */
.sheet .eprow { display: flex; align-items: center; gap: 1em; margin: 1.43em 0; }
.sheet .eprow:first-child { margin-top: 0; }
.sheet .eptx { flex: 1; min-width: 0; font-size: 1.286em; line-height: 1.3; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sheet .epn { display: inline-block; min-width: 11.1em; }
.sheet .epcopy { flex: none; width: 11.4em; height: 2.86em; padding: 0; }
@media (max-width: 700px) {
    .sheet .eprow { flex-direction: column; align-items: flex-start; gap: .6em; }
    .sheet .eptx { font-size: 1.1em; }
    /* подпись / число / единица — каждая на своей строке: высота строки не зависит от длины числа */
    .sheet .epl, .sheet .epu { display: block; }
    .sheet .epn { min-width: 0; display: inline-block; }
}

/* ============================================================
   Вкладки листа и их содержимое
   ============================================================ */
.sheet .epoh { max-width: 72em; margin: 0 auto; }
.sheet .epoh .eprow { margin: 1.1em 0; }
.sheet .today { margin-bottom: 3em; }
.sheet .today h2 { margin: 0; font-size: 1.714em; font-weight: 500; line-height: 1.08; letter-spacing: .25em; text-align: center; width: 16.7em; max-width: 100%; }
@media (max-width: 700px) { .sheet .today h2 { font-size: 1.05em; letter-spacing: .14em; } }

/* .tab исходника: 168×60, рамка 2px, активная — #6A82FF */
.sheet .tabs { display: flex; flex-wrap: wrap; justify-content: center; margin: 0 auto 2.4em; max-width: 90em; }
.sheet .tab {
    display: flex;
    flex: 0 1 14em;
    align-items: center;
    justify-content: center;
    min-width: 8.5em;
    height: 5em;
    padding: 0 .8em;
    color: #fff;
    font-size: .857em;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    border: 2px solid #fff;
    margin: 0 0 -2px -2px;
}
.sheet .tab:hover { background: rgba(106, 130, 255, .3); }
.sheet .tab.on { background: var(--hi); }
.sheet .panel { scroll-margin-top: 1em; }
.sheet .tabs { scroll-margin-top: 1em; }
.sheet .panel > .blk { margin-top: 3em; }

/* таблица года */
.sheet .ytab-wrap { overflow-x: auto; padding-bottom: .4em; }
.sheet .ytab { min-width: 52em; max-width: 100em; margin: 0 auto; }
.sheet .yt-row { display: grid; grid-template-columns: 8em repeat(14, minmax(0, 1fr)); }
.sheet .yt-group { margin-bottom: .8em; }
.sheet .yt-head .ycorner { display: flex; align-items: center; justify-content: center; font-size: 2.571em; line-height: 1; border: 1px solid #fff; padding: .1em 0; }
.sheet .yt-h { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: .3em 0; color: var(--ice); line-height: 1.2; background: rgba(255, 255, 255, .2); border: .5px solid var(--line); }
.sheet .yt-h i { color: #fff; font-size: .64em; font-style: normal; }
.sheet .yt-h b { font-weight: 400; font-size: 1.05em; }
.sheet .yt-h.now { background: var(--hi); }
.sheet .yt-l { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ice); background: rgba(0, 8, 35, .3); border: .5px solid var(--line); line-height: 1.2; }
.sheet .yt-l b { font-weight: 400; font-size: 1.15em; }
.sheet .yt-l i { color: #fff; font-size: .64em; font-style: normal; }
.sheet .yt-l.now { background: var(--hi); }
.sheet .ytab .cell { height: 2.7em; padding: 0; }
.sheet .ytab .cell.k-void { background: none; border: 0; }
.sheet .ytab .cell i { font-size: .64em; }
.sheet .ytab .tip { display: none !important; }

/* циклы */
.sheet .cyctl { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .8em 2em; max-width: 46em; margin: 0 auto 1.4em; }
.sheet .cystep { display: flex; align-items: center; background: rgba(0, 8, 35, .2); }
.sheet .cystep .gbtn { width: 4em; height: 4em; }
.sheet .cystep .gbtn svg { width: 1.6em; height: 1.6em; }
.sheet .cystep .gbox { width: 5.5em; height: 4em; }
.sheet .cystep .gbox b { font-weight: 600; }
.sheet .cytxt { font-size: 1.05em; line-height: 1.3; }
.sheet .cykey { display: flex; flex-wrap: wrap; justify-content: center; gap: .4em 2em; margin: 0 0 1.4em; padding: 0; list-style: none; font-size: 1.05em; }
.sheet .cykey li { display: inline-flex; align-items: center; gap: .6em; }
.sheet .dot { display: inline-block; flex: none; width: .5em; height: .5em; border-radius: 50%; margin-left: .15em; vertical-align: top; }
.sheet .cykey .dot { width: 1em; height: 1em; margin: 0; vertical-align: baseline; }
.sheet .dot.leap { background: #ffdd00; }
.sheet .dot.skip { background: #ff2a2a; }
.sheet .cygrid { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); max-width: 80em; margin: 0 auto 3em; }
.sheet .cy {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: .55em 0;
    color: #fff;
    line-height: 1.25;
    text-decoration: none;
    background: rgba(255, 255, 255, .15);
    border: .5px solid var(--line);
    font-variant-numeric: tabular-nums;
}
.sheet .cy b { color: var(--ice); font-size: 1em; font-weight: 600; }
.sheet .cy span { font-size: .714em; }
.sheet .cy:hover { background: rgba(255, 255, 255, .3); }
.sheet .cy.now { background: var(--hi); }
.sheet .cy.sel { outline: 2px solid #fff; outline-offset: -2px; }
@media (max-width: 800px) { .sheet .cygrid { grid-template-columns: repeat(8, minmax(0, 1fr)); } .sheet .cyctl { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; } }

/* временная метка */
.sheet .mtable { max-width: 80em; margin: 0 auto 2.4em; border: 1px solid #fff; padding: 1em .4em 1em; }
.sheet .mt-h, .sheet .mt-b { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); }
.sheet .mt-c { padding: 0 .3em; text-align: center; }
.sheet .mt-c .g { display: block; font-size: 2.2em; line-height: 1.1; }
.sheet .mt-c .cap { display: block; font-size: 1.1em; line-height: 1.2; }
.sheet .mcap { display: none; }
.sheet .mt-b { margin-top: .9em; align-items: start; }
.sheet .mt-v { margin-bottom: .5em; }
.sheet .mt-v .lb { display: block; font-size: .78em; line-height: 1.2; }
.sheet .mt-v b { display: block; font-size: 1.9em; font-weight: 400; line-height: 1.15; font-variant-numeric: tabular-nums; }
.sheet .mt-v b small { margin-right: .15em; font-size: .35em; vertical-align: super; }
.sheet .mt-v b.clk { font-size: 1.05em; }
.sheet .mt-z .zonepick { margin-top: 1.3em; }
.sheet .mt-z .zonepick .short { font-size: .95em; }
@media (max-width: 1000px) {
    .sheet .mt-h { display: none; }
    .sheet .mt-b { grid-template-columns: repeat(auto-fill, minmax(11em, 1fr)); gap: 1.2em .6em; margin-top: 0; }
    .sheet .mcap { display: block; margin-bottom: .4em; }
    .sheet .mcap .g { font-size: 1.8em; }
    .sheet .mcap .cap { font-size: .95em; }
}
.sheet .stamps { max-width: 80em; margin: 0 auto; }
.sheet .stcap { margin: 1.2em 0 0; text-align: center; font-size: 1.05em; }
.sheet .eprow.stamp .eptx { font-size: 1.05em; }

/* конвертация даты */
.sheet .conv { display: grid; grid-template-columns: repeat(2, minmax(0, 24em)); justify-content: center; gap: 2em 6em; }
.sheet .cvcol { text-align: center; }
.sheet .cvt { font-size: 1.5em; line-height: 1.1; color: var(--ice); }
.sheet .cvcol.kosc .cvt { color: var(--ice); }
.sheet .cvrow { margin-top: .9em; }
.sheet .cvl { font-size: .95em; line-height: 1.2; color: var(--ice); }
.sheet .cvs { display: flex; align-items: center; justify-content: center; }
.sheet .cvs .gbtn { width: 3em; height: 3em; }
.sheet .cvs .gbtn svg { width: 1.4em; height: 1.4em; }
.sheet .cvv { min-width: 5.4em; font-size: 1.15em; color: var(--ice); font-variant-numeric: tabular-nums; }
.sheet .cvv small { margin-right: .25em; font-size: .5em; vertical-align: super; color: var(--gold); }
.sheet .cvmonth select {
    min-width: 12em;
    padding: .5em 1em;
    color: var(--ice);
    font: inherit;
    font-size: 1.1em;
    text-align: center;
    background: transparent;
    border: 0;
    cursor: pointer;
}
.sheet .cvmonth select option { background: #0b1c45; color: #fff; }
.sheet .conv-tz { margin-top: 2em; text-align: center; }
@media (max-width: 700px) { .sheet .conv { grid-template-columns: minmax(0, 1fr); gap: 2.4em; } }

/* день */
.sheet .dayp { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: 2.4em 3em; margin-top: 1em; }
.sheet .dp-left { width: 22em; max-width: 100%; }
.sheet .dp-right { flex: 1 1 28em; max-width: 44em; min-width: 0; }
.sheet .dp-nav { display: flex; align-items: center; justify-content: center; gap: 1.6em; margin-bottom: .8em; color: var(--gold); font-size: 1.1em; }
.sheet .dp-nav a { color: #fff; text-decoration: none; padding: 0 .5em; }
.sheet .dp-nav a:hover { color: var(--gold); }
.sheet .dp-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.sheet .dp-month .cell { aspect-ratio: 1 / 1; }
.sheet .dp-month .cell.sel, .sheet .dp-week .dpd.sel { background: var(--hi); }
.sheet .dp-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.sheet .dpd { display: flex; flex-direction: column; min-width: 0; color: var(--ice); text-align: center; text-decoration: none; border: .5px solid var(--line); background: rgba(255, 255, 255, .15); }
.sheet .dpd .dh1, .sheet .dpd .dh2 { display: flex; flex-direction: column; align-items: center; padding: .25em 0; line-height: 1.2; }
.sheet .dpd .dh1 { background: rgba(0, 8, 35, .3); }
.sheet .dpd b { font-weight: 400; }
.sheet .dpd i { color: #fff; font-size: .714em; font-style: normal; }
.sheet .dp-sel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8em; margin: 1.4em 0 .8em; }
.sheet .dp-sel span { font-size: 1.1em; }
.sheet .dp-hours { display: grid; grid-template-columns: minmax(0, 1fr); gap: .3em; }
.sheet .dp-hours label { display: flex; align-items: baseline; gap: .6em; min-width: 0; }
.sheet .dp-hours label span { flex: none; width: 9.4em; }
.sheet .dp-hours input { flex: 1; width: 0; min-width: 0; padding: .1em .3em; color: #fff; font: inherit; background: transparent; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .45); }
.sheet .dp-hours input:focus { outline: none; border-bottom-color: #fff; }
.sheet .dp-msg { min-height: 1.4em; margin-top: .6em; color: var(--gold); }

/* ---------- справочные карточки: ссылки на основной календарь ---------- */

/* ---------- общая полировка листа ---------- */
.sheet ::selection { background: var(--hi); color: #fff; }
.sheet .tab, .sheet .blk > summary, .sheet .gbtn, .sheet button, .sheet .gtoday, .sheet .cy { transition: background-color .18s ease, border-color .18s ease, color .18s ease; }
.sheet .tabs { margin-bottom: 3em; }
.sheet .today { padding-bottom: 1.6em; border-bottom: 1px solid rgba(201, 195, 195, .2); margin-bottom: 2.6em; }
.sheet .panel { animation: panelIn .3s ease both; }
@keyframes panelIn { from { opacity: 0; transform: translateY(.5em); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sheet .panel { animation: none; }  }
.sheet .blk { margin-bottom: 2em; }
.sheet .desc-box, .sheet .ycal-box .mrow { border-radius: 0; }
.sheet .hcard .htxt { transition: outline-color .2s ease; }

/* ---------- карточка «мобильные версии»: основная ссылка + «оригинал» ---------- */

/* ---------- навигатор (хронос / часы) ---------- */
.sheet .navt { margin: 0 0 1.6em; text-align: center; font-size: 1.2em; font-weight: 400; letter-spacing: .3em; }
.sheet .navds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6em; max-width: 72em; margin: 0 auto; }
.sheet .navd { padding: 1.2em 1em 1.6em; border: 1px solid rgba(201, 195, 195, .6); scroll-margin-top: 1em; }
.sheet .navd h2 { margin: 0 0 .8em; text-align: center; font-size: 1.1em; font-weight: 400; letter-spacing: .05em; }
.sheet .navcols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1em; }
.sheet .navcols .cvcol { text-align: center; }
.sheet .navreset { margin: 1.6em 0; text-align: center; }
.sheet .navres { max-width: 72em; margin: 0 auto; }
.sheet .navres .eprow { margin: 0; padding: .7em 0; border-top: 1px solid rgba(201, 195, 195, .25); }
.sheet .navres .eprow:first-child { border-top: 0; }
.sheet .navres .eptx { font-size: 1.05em; line-height: 1.35; }
@media (max-width: 900px) { .sheet .navds { grid-template-columns: minmax(0, 1fr); max-width: 34em; } }
/* телефон: два столбца (космический | григорианский) остаются рядом, элементы уплотнены */
.sheet .navcols .cvv { min-width: 3em; }
.sheet .navcols .cvmonth select { min-width: 0; width: 100%; max-width: 100%; padding: .4em 0; font-size: 1em; text-overflow: ellipsis; }
@media (max-width: 520px) {
    .sheet .navd { padding: 1em .5em 1.4em; }
    .sheet .navcols { gap: .5em; }
    .sheet .navcols .cvt { font-size: 1.15em; }
    .sheet .navcols .cvl { font-size: .8em; }
    .sheet .navcols .cvs .gbtn { width: 2.4em; height: 2.4em; border-width: 2px; }
    .sheet .navcols .cvs .gbtn svg { width: 1.1em; height: 1.1em; }
    .sheet .navcols .cvv { min-width: 2.6em; font-size: 1em; }
}

/* ---------- исходники ---------- */

/* ---- AJAX-подгрузка: панель слегка гаснет, пока грузится новая; на шагах (+/−) без анимации появления ---- */
.ajax-busy .sheet [data-region="panel"] { opacity: .55; transition: opacity .15s ease; }
.sheet.ajax-same .panel { animation: none; }

/* ---- Навигатор: переключатель единиц времени (хроносы / часы) ---- */
.sheet .navmode { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 12px; margin: 0 0 22px; }
.sheet .navmode-l { margin-right: 4px; color: #c1eaff; font-size: 15px; }
.sheet .navmode a, .sheet .navmode button { padding: 10px 22px; font-family: inherit; background: transparent; cursor: pointer; color: #fff; font-size: 16px; line-height: 1.2; text-decoration: none; border: 1px solid rgba(255, 255, 255, .45); transition: background-color .15s ease, color .15s ease; }
.sheet .navmode > :nth-child(2) { border-radius: 8px 0 0 8px; margin-right: -12px; }
.sheet .navmode > :nth-child(3) { border-radius: 0 8px 8px 0; }
.sheet .navmode a:hover, .sheet .navmode button:hover { background: rgba(255, 255, 255, .12); }
.sheet .navmode a.on, .sheet .navmode button.on { color: #10275c; background: #fff; border-color: #fff; }

/* ---- состояние инструментов отправляется POST-формой: форма-носитель невидима, кнопки «+/−» — обычные кнопки ---- */
.sheet .stf { display: none; }
.sheet button.gbtn { padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; -webkit-appearance: none; appearance: none; }

