:root {
  --bg: #ffffff;
  --ink: #16181d;
  --muted: #5b6270;
  --line: #d5d9e2;
  --line-soft: #e6e8ee;
  --accent: #2447d6;
  --accent-ink: #ffffff;
  --accent-soft: #e8edfc;
  --accent-soft-ink: #1a35a8;
  --chip-on: #16181d;
  --chip-on-ink: #ffffff;
  --logo-accent: #e8432e;
  --logo-accent-ink: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111318;
    --ink: #eceef3;
    --muted: #a3aab8;
    --line: #353a47;
    --line-soft: #262a34;
    --accent: #8ea6ff;
    --accent-ink: #0d1330;
    --accent-soft: #1d2647;
    --accent-soft-ink: #c3d0ff;
    --chip-on: #eceef3;
    --chip-on-ink: #111318;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 16px; padding-bottom: 40px; min-height: 70vh; }
.muted { color: var(--muted); }

/* Шапка и подвал */
.top { border-bottom: 1px solid var(--line-soft); }
.top__in { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
.logo { display: flex; align-items: center; min-height: 44px; font-size: 20px; font-weight: 700; color: var(--ink); }
.logo__img { display: block; height: 40px; width: auto; }
.logo:hover { text-decoration: none; }
.top__nav { display: flex; align-items: center; gap: 4px; }
.top__nav a { display: flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--ink); font-size: 15px; }
.foot { border-top: 1px solid var(--line-soft); padding: 20px 0; color: var(--muted); font-size: 14px; }

/* Заголовки */
.h1 { margin: 12px 0 16px; font-size: 26px; line-height: 1.2; }
.h1--home { font-size: 28px; margin-top: 24px; }
.h2 { margin: 0 0 12px; font-size: 20px; line-height: 1.25; }
.label { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.block { margin-top: 28px; }
.intro { margin-bottom: 16px; color: var(--muted); }

/* Хлебные крошки */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); }

/* Чипы-фильтры */
.chips { display: flex; gap: 8px; margin: 0 -16px 8px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips--wrap { flex-wrap: wrap; overflow: visible; margin-left: 0; margin-right: 0; padding: 0; }
.chip {
  flex-shrink: 0; display: flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 22px; color: var(--ink); font-size: 15px;
}
.chip:hover { text-decoration: none; border-color: var(--ink); }
.chip.is-active { background: var(--chip-on); border-color: var(--chip-on); color: var(--chip-on-ink); font-weight: 500; }
.chips--flat .chip { border-color: transparent; border-radius: 10px; padding: 0 14px; font-size: 14px; }
.chips--flat .chip.is-active { background: var(--accent-soft); color: var(--accent-soft-ink); font-weight: 600; }

/* Карточки поздравлений */
.cards { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.card { border: 1px solid var(--line); border-radius: 16px; padding: 20px 16px 12px; }
.card__img { display: block; width: 100%; height: auto; border-radius: 10px; margin-bottom: 16px; }
.card__text { margin: 0 0 16px; font-size: 18px; line-height: 1.55; }
.card__actions { display: flex; align-items: center; gap: 4px; }
.card__from { margin: -8px 0 12px; font-size: 14px; }
.foot__social { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 8px; }
.foot__social a { color: var(--muted); }
.card__actions .btn { flex-grow: 1; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px;
  border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-ink);
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn--wide { display: flex; width: 100%; min-height: 48px; margin-top: 24px; font-size: 16px; }
.btn.is-done { background: var(--accent-soft); color: var(--accent-soft-ink); }
.icon-btn {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer;
}
.icon-btn[aria-pressed="true"] { color: var(--accent); }
.icon-btn[aria-pressed="true"] svg { fill: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Списки и плитки */
.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 14px; min-height: 52px; border-bottom: 1px solid var(--line-soft); color: var(--ink); }
.row__date { flex: 0 0 96px; font-size: 14px; font-weight: 600; color: var(--accent); }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tiles--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile {
  display: flex; align-items: center; min-height: 52px; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: 12px; color: var(--ink); font-size: 15px; font-weight: 500;
}
.tile:hover { text-decoration: none; border-color: var(--ink); }
.tile.is-active { background: var(--accent-soft); border-color: transparent; color: var(--accent-soft-ink); }

/* Календарь */
.days { display: flex; flex-direction: column; }
.day { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.day__date { flex: 0 0 104px; margin: 0; font-size: 15px; font-weight: 600; }
.day__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }

/* Листалка */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 24px; }
.pager__nums { display: flex; align-items: center; gap: 4px; }
.pager__num, .pager__step {
  display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font-size: 15px; font-weight: 500;
}
.pager__num:hover, .pager__step:hover { text-decoration: none; border-color: var(--ink); }
.pager__num.is-active { background: var(--chip-on); border-color: var(--chip-on); color: var(--chip-on-ink); }
.pager__step--next { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.pager__step.is-off { visibility: hidden; }
.pager__gap { color: var(--muted); }
@media (max-width: 420px) { .pager__num:not(.is-active) { display: none; } .pager__gap { display: none; } }

/* Похожие разделы, ссылка «все» */
.more { margin: 10px 0 0; font-size: 15px; }
.drawer__title a { color: inherit; }

/* Реклама: место зарезервировано заранее (min-height), чтобы страница не прыгала */
.ad { display: flex; align-items: center; justify-content: center; margin: 16px 0; overflow: hidden; }
.cards .ad { margin: 0; }

/* Сценарии */
.row--tall { padding: 12px 0; align-items: flex-start; }
.note { padding: 10px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-soft-ink); font-size: 14px; }
.article__meta { margin: -6px 0 14px; font-size: 14px; color: var(--muted); }
.article__lead { font-size: 18px; line-height: 1.55; }
.toc { margin: 20px 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; }
.toc__title { margin: 0 0 6px; font-weight: 700; }
.toc ol { margin: 0; padding-left: 22px; }
.toc li { margin: 6px 0; }
.article__body { font-size: 17px; line-height: 1.65; }
.article__body h2 { margin: 34px 0 10px; font-size: 22px; line-height: 1.25; scroll-margin-top: 16px; }
.article__body h3 { margin: 24px 0 8px; font-size: 18px; }
.article__body p { margin: 0 0 14px; }
.article__body ul, .article__body ol { margin: 0 0 14px; padding-left: 22px; }
.article__body li { margin: 4px 0; }
.article__body .role { padding-left: 12px; border-left: 3px solid var(--accent-soft); }
.article__body .role b { color: var(--accent); }
.verse { margin: 0 0 16px; padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); font-style: italic; }
.verse p { margin: 0; }

/* Поиск */
.search { margin: 0 0 8px; }
.search__label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.search__row { display: flex; gap: 8px; }
.search__input {
  flex: 1; min-width: 0; height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--ink); font: inherit;
}
.search__row .btn { min-height: 48px; border-radius: 12px; }

/* Видео в карточке */
.card__video { position: relative; display: block; margin-bottom: 16px; border-radius: 10px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.card__video img, .card__video iframe { display: block; width: 100%; height: 100%; object-fit: cover; border: 0; }
.card__play { position: absolute; left: 50%; top: 50%; width: 64px; height: 44px; margin: -22px 0 0 -32px; border-radius: 12px; background: rgba(0, 0, 0, .7); }
.card__play::after { content: ""; position: absolute; left: 26px; top: 12px; border-left: 16px solid #fff; border-top: 10px solid transparent; border-bottom: 10px solid transparent; }

/* Меню разделов. Без скрипта это обычный блок ссылок внизу страницы, со скриптом — выезжающая панель. */
.top__l { display: flex; align-items: center; gap: 4px; }
.menu-btn { display: none; margin-left: -10px; }
.drawer { border-top: 1px solid var(--line-soft); }
.drawer__in { max-width: 720px; margin: 0 auto; padding: 8px 16px 24px; }
.drawer__close { display: none; }
.drawer__sec { margin-top: 20px; }
.drawer__title { margin: 0 0 10px; font-size: 18px; }
.drawer .chips { margin: 0; padding: 0; }
.shade { display: none; }
.js .menu-btn { display: flex; }
.js .drawer {
  position: fixed; z-index: 20; top: 0; left: 0; bottom: 0; width: min(88vw, 380px);
  background: var(--bg); border: 0; border-right: 1px solid var(--line);
  overflow-y: auto; overscroll-behavior: contain;
  transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility .2s;
}
.js .drawer.is-open { transform: none; visibility: visible; }
.js .drawer__in { padding: 8px 16px 32px; }
.js .drawer__close { display: flex; margin-left: auto; }
.js .drawer__sec:first-of-type { margin-top: 0; }
.js .shade { display: block; position: fixed; z-index: 19; inset: 0; background: rgba(0, 0, 0, .45); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.js .drawer.is-open + .shade { opacity: 1; visibility: visible; }
@media (prefers-reduced-motion: reduce) { .js .drawer, .js .shade { transition: none; } }

@media (min-width: 720px) {
  .h1 { font-size: 32px; }
  .h1--home { font-size: 36px; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiles--3 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .chips { flex-wrap: wrap; overflow: visible; }
}

/* Текст для поисковиков и экранных дикторов, на экране не виден */
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Главная: подбор, витрина разделов, именины, блоки в цветах логотипа */
:root { --box-1: #fdebe8; --box-1-ink: #c8321e; --box-2: #e8edfc; --box-2-ink: #1a35a8; --box-3: #fff4d1; --box-3-ink: #8a5a00; }
@media (prefers-color-scheme: dark) {
  :root { --box-1: #3a211d; --box-1-ink: #ffab9b; --box-2: #1d2647; --box-2-ink: #c3d0ff; --box-3: #362c12; --box-3-ink: #ffd36b; }
}
.picker { margin-top: 20px; padding: 18px; border: 2px solid var(--logo-accent); border-radius: 20px; }
.picker__title { margin: 0 0 12px; font-size: 20px; font-weight: 700; }
.picker__grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 560px) { .picker__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.picker__field { display: flex; flex-direction: column; gap: 4px; }
.picker__label { font-size: 13px; font-weight: 600; color: var(--muted); }
.picker select { width: 100%; min-height: 48px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; }
.picker__go { margin-top: 14px; }
.picker__alt { margin: 10px 0 0; text-align: center; font-size: 14px; }
.hubs { display: grid; grid-template-columns: 1fr; gap: 18px 28px; }
@media (min-width: 560px) { .hubs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hub__title { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.hub__title a { color: var(--ink); }
.chip--more { color: var(--muted); }
.row--today { background: var(--accent-soft); margin: 0 -10px; padding: 0 10px; border-radius: 10px; }
.namedays { margin: 0 0 10px; line-height: 1.8; }
.namedays a:not(.namedays__when):not(:last-child)::after { content: ","; color: var(--muted); }
.namedays__when { display: inline-block; margin-right: 6px; font-weight: 600; color: var(--muted); }
.namedays__when.is-today { color: var(--accent); }
.boxes { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 560px) { .boxes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.box { padding: 18px 20px; border-radius: 18px; background: var(--box-1); }
.box--2 { background: var(--box-2); }
.box--3 { background: var(--box-3); }
.box__title { margin: 0 0 6px; font-size: 18px; font-weight: 700; color: var(--box-1-ink); }
.box--2 .box__title { color: var(--box-2-ink); }
.box--3 .box__title { color: var(--box-3-ink); }
.box__link { display: block; padding: 5px 0; color: var(--ink); }
.box__link:hover { text-decoration: underline; }
.card__copied { color: var(--muted); }

/* Карточка: кнопка «Скопировать» небольшая и спокойная, значки рядом с ней */
.card__actions .btn { flex-grow: 0; min-height: 40px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 600; background: transparent; color: var(--accent); border: 1px solid var(--line); }
.card__actions .btn:hover { border-color: var(--accent); filter: none; }
.card__actions .btn.is-done { background: var(--accent-soft); color: var(--accent-soft-ink); border-color: transparent; }
.card__actions { gap: 6px; }

/* Сообщаем браузеру, что тёмный режим у сайта свой: полосы прокрутки и поля становятся тёмными, а «принудительное затемнение» не портит цвета кнопок */
:root { color-scheme: light dark; }
.drawer { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }

/* Окно с открыткой на компьютере */
.cardview { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(10, 12, 24, .72); }
.cardview__in { display: flex; flex-direction: column; gap: 12px; max-height: 100%; padding: 14px; border-radius: 18px; background: var(--bg); }
.cardview__img { display: block; width: auto; height: auto; max-width: min(70vh, 100%); max-height: calc(100vh - 230px); border-radius: 12px; aspect-ratio: 1 / 1; background: var(--line); }
.cardview__bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.cardview__bar .btn { flex: 0 0 auto; min-height: 42px; padding: 0 18px; }
.cardview__in { max-width: 100%; overflow: auto; }
.cardview__to { display: flex; gap: 8px; }
.cardview__to input { flex: 1 1 auto; min-width: 0; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; }
.cardview__to .btn { flex: 0 0 auto; min-height: 42px; padding: 0 16px; }
.cardview__note { margin: 0; font-size: 14px; color: var(--muted); text-align: center; }
.cardview.is-loading .cardview__img { opacity: .5; }
.informer__form { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-bottom: 22px; }
.informer__form label { display: flex; min-width: 0; max-width: 100%; align-items: center; gap: 8px; }
.informer__form select { max-width: 100%; min-width: 0; min-height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; }
.informer__form input[type=color] { width: 46px; height: 36px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.informer__preview { margin-bottom: 22px; padding: 18px; border: 1px dashed var(--line); border-radius: 14px; }
.informer__preview.is-dark { background: #0f1117; }
.informer__code { display: block; box-sizing: border-box; width: 100%; margin-bottom: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: 13px/1.5 ui-monospace, Menlo, Consolas, monospace; resize: vertical; }
.foot__links { margin-top: 6px; font-size: 14px; }
.salute__sky { position: fixed; inset: 0; z-index: 5; width: 100%; height: 100%; pointer-events: none; }
.salute { max-width: 620px; margin: 28px auto 40px; padding: 30px 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--card, var(--bg)); text-align: center; }
.salute__holiday { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.salute__title { margin: 0 0 18px; font-size: 30px; line-height: 1.2; color: var(--accent); }
.salute__text { margin: 0 0 18px; font-size: 19px; line-height: 1.6; }
.salute__from { margin: 0 0 22px; font-size: 18px; font-style: italic; color: var(--muted); }
.salute__from::before { content: "— "; }
.salute__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.saluteview { width: 420px; }
.saluteview__title { margin: 0; font-size: 19px; font-weight: 700; text-align: center; }
.saluteview__fields { display: flex; flex-direction: column; gap: 8px; }
.saluteview__fields input { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; }
.salute--cake .salute__text, .salute--cake .salute__from, .salute--cake .salute__actions { display: none; }
.salute__text, .salute__from { animation: salute-in .6s ease both; }
@keyframes salute-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.cake { margin: 0 0 8px; }
.cake__wish { margin: 0 0 6px; font-size: 18px; font-weight: 600; }
.cake__pic svg { display: block; width: 100%; max-width: 340px; height: auto; margin: 0 auto; }
.cake__candle { cursor: pointer; }
.cake__flame { transform-box: fill-box; transform-origin: 50% 100%; animation: cake-flick .18s ease-in-out infinite alternate; transition: opacity .3s; }
.cake__candle:nth-child(odd) .cake__flame { animation-duration: .23s; }
.cake__wind { transition: transform .08s; }
.cake__candle.is-out .cake__flame { opacity: 0; animation: none; }
@keyframes cake-flick { from { transform: scale(1, 1) rotate(-2deg); } to { transform: scale(.92, 1.08) rotate(2deg); } }
.cake__smoke circle { transform-box: fill-box; transform-origin: center; animation: cake-smoke 1.6s ease-out forwards; opacity: 0; }
@keyframes cake-smoke { 0% { opacity: .8; transform: translate(0, 0) scale(.6); } 100% { opacity: 0; transform: translate(6px, -46px) scale(2.4); } }
.cake__actions { margin: 10px 0 6px; }
.cake__hint { margin: 0 auto; max-width: 420px; font-size: 14px; color: var(--muted); }
.cake__hint.is-warn { color: var(--ink); }
.cake__skip { margin: 10px 0 0; }
.linkish { padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }
.salute__sound { margin: 14px 0 0; }
.salute--cake .salute__sound { display: none; }
.cakepick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.cakepick__item { -webkit-tap-highlight-color: transparent; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 6px 2px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--muted); font: inherit; font-size: 11px; line-height: 1.2; cursor: pointer; }
.cakepick__item svg { display: block; width: 100%; max-width: 64px; height: 40px; }
.cakepick__item[aria-checked="true"] { border-color: var(--accent); color: var(--ink); box-shadow: 0 0 0 1px var(--accent) inset; }
.cakepick__any { display: flex; align-items: center; justify-content: center; height: 40px; font-size: 22px; font-weight: 700; color: var(--accent); }
.cakepick__item span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dand__head { cursor: pointer; transition: transform .1s; }
.dand__seed { transform-box: fill-box; transform-origin: center; transition: transform 1.8s cubic-bezier(.2,.7,.3,1), opacity 1.8s ease-in; }
.dand__cl.is-out .dand__seed { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; }
.intro--clamped { position: relative; max-height: 4.7em; overflow: hidden; margin-bottom: 4px; }
.intro--clamped::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2em; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.intro__more { display: block; margin: 0 0 18px; }
.chips--sm { gap: 6px; }
.chips--sm .chip { min-height: 36px; padding: 0 13px; border-radius: 18px; font-size: 14px; }
.today { display: flex; align-items: stretch; gap: 14px; margin: 4px 0 18px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--card, var(--bg)); }
.today__sheet { flex: 0 0 74px; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; border-radius: 12px; background: var(--accent); color: #fff; text-decoration: none; box-shadow: 0 2px 0 rgba(0,0,0,.08); }
.today__sheet:hover { text-decoration: none; }
.today__d { font-size: 34px; font-weight: 800; line-height: 1; }
.today__m { margin-top: 3px; font-size: 13px; font-weight: 600; text-transform: lowercase; opacity: .92; }
.today__info { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.today__wd { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.today__hol { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.3; }
.today__hol a { color: var(--ink); }
.today__hol a + a::before { content: " · "; color: var(--muted); font-weight: 400; }
.today__hol--none { font-weight: 400; font-size: 15px; color: var(--muted); }
.today__names { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.4; }
.today__names a + a::before { content: ", "; color: var(--muted); }
.today__names .today__more::before, .today__hol .today__more::before { content: " · "; }
.today__more { color: var(--muted); font-weight: 400; }
.picker--names { border-width: 1px; border-color: var(--line); }
.navrow { margin: 0 0 12px; }
.navrow__label { display: block; margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.navrow .chips { margin-bottom: 0; }
.chip[hidden] { display: none; }
.chip--more { background: none; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.chips--seg .chip { border-color: var(--line); }
.chips--sm .chip.is-active { background: var(--chip-on); border-color: var(--chip-on); color: var(--chip-on-ink); font-weight: 600; }
.chips--seg .chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.navrow + .cards, .navrow + .ad { margin-top: 18px; }

/* Подбор: раздел → праздник (4 поля) */
@media (min-width: 560px) { .picker--sec .picker__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .picker--sec .picker__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Отсчёт до Нового года в шапке «Сегодня» (показывает тема «Тёплая бумага») */
.today__count { display: none; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; padding: 10px 14px; border-radius: 14px; background: #221e2b; color: #f5efe6; text-decoration: none; }
.today__count:hover { text-decoration: none; opacity: .92; }
.today__count-l { font-size: 13px; opacity: .85; }
.today__count strong { font-size: 20px; }

/* Отсчёт до Нового года — праздничная плашка во всех темах (обновление 33) */
.today__count { display: flex; position: relative; overflow: hidden; background: linear-gradient(135deg, #b3261e 0%, #d8432e 55%, #e9a23b 100%); color: #fff; box-shadow: 0 4px 14px rgba(179, 38, 30, .25); }
.today__count::before { content: "✦"; position: absolute; right: 12px; top: 4px; font-size: 14px; color: #ffe6a6; animation: p24-twinkle 2.4s ease-in-out infinite; }
.today__count::after { content: "✦"; position: absolute; right: 34px; bottom: 3px; font-size: 9px; color: #fff4d6; animation: p24-twinkle 2.4s ease-in-out 1.2s infinite; }
.today__count-l { opacity: .95; font-weight: 600; }
.today__count strong { color: #fff; margin-right: 34px; }
@keyframes p24-twinkle { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .today__count::before, .today__count::after { animation: none; opacity: .8; } }
@media (prefers-color-scheme: dark) { .today__count { box-shadow: none; } }

/* Снежный шар на личной странице (обновление 34) */
.globe { margin: 0 0 8px; }
.globe__pic { display: flex; justify-content: center; }
.globe__canvas { display: block; width: 100%; max-width: 320px; height: auto; aspect-ratio: 320 / 360; cursor: pointer; touch-action: manipulation; filter: drop-shadow(0 10px 18px rgba(20, 30, 70, .25)); }
.cakepick--globe .cakepick__item canvas { display: block; width: 100% !important; max-width: 56px; height: auto !important; margin: 0 auto 2px; }

/* Плашка отсчёта с кнопкой снежного шара и подсказка «Новинка» над текстами (обновление 34) */
.today__count { padding: 0; gap: 0; align-items: stretch; }
.today__count-main { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; color: #fff; text-decoration: none; min-width: 0; }
.today__count-main:hover { text-decoration: none; }
.today__count strong { margin-right: 0; }
.today__count::before { right: auto; left: 46%; }
.today__count::after { right: auto; left: 54%; }
.today__globe { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 6px 12px; border-left: 1px solid rgba(255,255,255,.35); color: #fff; font-size: 11px; font-weight: 700; text-decoration: none; }
.today__globe:hover { background: rgba(255,255,255,.12); text-decoration: none; }
.today__globe svg { animation: p24-sway 3s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes p24-sway { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .today__globe svg { animation: none; } }
.fxhint { margin: 0 0 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card, var(--bg)); font-size: 14px; color: var(--muted); }
.fxhint a { white-space: nowrap; font-weight: 600; }
.fxhint__new { display: inline-block; margin-right: 4px; padding: 1px 8px; border-radius: 999px; background: linear-gradient(135deg, #b3261e, #e9a23b); color: #fff; font-size: 12px; font-weight: 700; }

.today__count::before, .today__count::after { content: none; }
.today__count-main { position: relative; }
.today__count-main::before { content: "✦"; position: absolute; right: 6px; top: 3px; font-size: 12px; color: #ffe6a6; animation: p24-twinkle 2.4s ease-in-out infinite; }
.today__count-main::after { content: "✦"; position: absolute; right: 20px; bottom: 2px; font-size: 8px; color: #fff4d6; animation: p24-twinkle 2.4s ease-in-out 1.2s infinite; }
.today__count-l, .today__count strong { white-space: nowrap; }
.today__count-l { font-size: 13px; }
.today__count strong { font-size: 19px; margin-right: 14px; }
@media (prefers-reduced-motion: reduce) { .today__count-main::before, .today__count-main::after { animation: none; opacity: .8; } }

.today__globe { padding: 4px 9px; }
.today__globe svg { width: 22px; height: 22px; }
@media (max-width: 380px) { .today__count-main { padding: 9px 10px; } .today__count-l { font-size: 12px; } .today__count strong { font-size: 17px; margin-right: 10px; } }

/* Пазл на личной странице и выбор «Как открыть» в окне отправки (обновление 35) */
.puzzle { margin: 0 0 8px; }
.puzzle__board { position: relative; width: 100%; max-width: 360px; aspect-ratio: 1 / 1; margin: 6px auto 10px; border-radius: 14px; background: var(--soft, rgba(127,127,127,.15)); overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.puzzle__piece { position: absolute; box-sizing: border-box; border: 1px solid rgba(255,255,255,.55); border-radius: 4px; background-repeat: no-repeat; cursor: grab; transition: left .25s ease, top .25s ease, box-shadow .2s, border-color .3s; touch-action: none; }
.puzzle__piece.is-drag { z-index: 5; cursor: grabbing; transition: none; box-shadow: 0 10px 24px rgba(0,0,0,.35); }
.puzzle__piece.is-sel { z-index: 3; border: 3px solid var(--accent); box-shadow: 0 0 0 3px rgba(255,255,255,.6); }
.puzzle__piece.is-ok { cursor: default; border-color: transparent; }
.puzzle__piece.is-snap { animation: puzzle-snap .35s ease; }
@keyframes puzzle-snap { 0% { filter: brightness(1.6); } 100% { filter: none; } }
.puzzle__board.is-done .puzzle__piece { border: 0; border-radius: 0; }
.puzzle__peek { position: absolute; inset: 0; background-size: 100% 100%; opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 8; }
.puzzle__board.is-peek .puzzle__peek { opacity: .85; }
.puzzle__tools { margin: 4px 0 0; display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; }
.saluteview__mode { margin: 0 0 10px; }
.saluteview__mode .chips { justify-content: center; margin: 0 0 6px; }
@media (prefers-reduced-motion: reduce) { .puzzle__piece { transition: none; } .puzzle__piece.is-snap { animation: none; } }
.cakepick[hidden], .saluteview__sizes[hidden], .puzzle__tools[hidden], .saluteview__mode [hidden] { display: none !important; }

/* Страница «Связаться с нами» (обновление 35) */
.contact { display: grid; gap: 12px; max-width: 560px; margin: 8px 0 24px; }
.contact__field { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.contact__field input, .contact__field textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--card, var(--bg)); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.contact__field textarea { resize: vertical; min-height: 120px; }
.contact__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact__ok { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: #e6f4ea; color: #1e5e2f; }
.contact__err { margin: 0; padding: 10px 12px; border-radius: 12px; background: #fdecea; color: #8a1c13; }
@media (prefers-color-scheme: dark) { .contact__ok { background: #1d3524; color: #b9e4c4; } .contact__err { background: #3a1d1a; color: #f3b8b0; } }
.contact .btn { justify-self: start; }

/* Полоска «Установить на телефон» (PWA, обновление 35) */
.installbar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; display: flex; align-items: center; gap: 10px; max-width: 520px; margin: 0 auto; padding: 10px 10px 10px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--card, var(--bg)); color: var(--ink); box-shadow: 0 8px 28px rgba(0,0,0,.18); animation: installbar-in .35s ease; }
.installbar img { flex: 0 0 auto; border-radius: 10px; }
.installbar__text { flex: 1; margin: 0; font-size: 14px; line-height: 1.35; }
.installbar__go { flex: 0 0 auto; padding: 8px 14px; min-height: 0; }
.installbar__x { flex: 0 0 auto; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.installbar__x:hover { background: var(--soft, rgba(127,127,127,.15)); }
@keyframes installbar-in { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .installbar { animation: none; } }

/* Логотип крупнее (обновление 35) */
.logo__img { height: 40px; }
@media (min-width: 720px) { .top__in { min-height: 76px; } .logo__img { height: 58px; } }

/* На узких телефонах «Календарь» — значком, чтобы шапка помещалась вместе с крупным логотипом */
.top__cal { display: none; }
@media (max-width: 480px) { .top__cal { display: block; } .top__caltext { display: none; } .top__nav a { padding: 0 8px; } }
@media (max-width: 719px) { .logo__img { height: 46px; } } @media (max-width: 380px) { .logo__img { height: 42px; } }

/* Личная страница: поздравление «письмом», слова проявляются по одному, кнопка «Назад» (обновление 35) */
.salute { position: relative; }
.salute__back { position: absolute; left: 14px; top: 14px; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 10px 0 6px; border-radius: 999px; color: var(--muted); font-size: 14px; text-decoration: none; }
.salute__back:hover { background: var(--soft, rgba(127,127,127,.12)); color: var(--ink); text-decoration: none; }
.salute__letter { position: relative; margin: 6px 0 18px; padding: 22px 20px 18px; border-radius: 16px; background: linear-gradient(180deg, rgba(255,214,140,.16), rgba(255,214,140,.05)); border: 1px solid rgba(220,170,90,.28); }
.salute__letter::before { content: "\201C"; position: absolute; left: 12px; top: -8px; font: 700 64px/1 Georgia, "Times New Roman", serif; color: rgba(220,140,60,.45); }
.salute__text { margin: 0; font-family: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif; font-style: italic; font-size: 21px; line-height: 1.65; color: var(--ink); }
@media (min-width: 720px) { .salute__text { font-size: 23px; } }
.salute__from { font-family: Georgia, "Times New Roman", serif; }
.salute--reveal .salute__text { animation: none; }
.salute__text .sw { display: inline-block; opacity: 0; transform: translateY(10px); filter: blur(5px); animation: sw-in .7s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes sw-in { to { opacity: 1; transform: none; filter: none; } }
.salute--reveal .salute__letter { animation: letter-in .6s ease both; }
@keyframes letter-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-color-scheme: dark) { .salute__letter { background: linear-gradient(180deg, rgba(255,200,120,.10), rgba(255,200,120,.03)); border-color: rgba(255,200,120,.22); } }
@media (prefers-reduced-motion: reduce) { .salute__text .sw { opacity: 1; transform: none; filter: none; animation: none; } }
.salute--cake .salute__letter { display: none; }
@media (max-width: 480px) { .salute__text { font-size: 19px; } .salute__letter { padding: 20px 14px 16px; } }

/* Готовые ответы на личной странице (обновление 35) */
.reply { margin: 22px 0 6px; padding-top: 18px; border-top: 1px solid var(--line); text-align: left; animation: letter-in .4s ease both; }
.reply__title { margin: 0 0 4px; font-size: 20px; text-align: center; }
.reply__hint { margin: 0 0 14px; color: var(--muted); font-size: 14px; text-align: center; }
.reply__item { margin: 0 0 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.reply__text { margin: 0 0 10px; font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 17px; line-height: 1.55; }
.reply__btns { display: flex; gap: 8px; flex-wrap: wrap; }
.reply__more { margin: 6px 0 0; text-align: center; }

/* «Назад» отдельной строкой над названием праздника — длинные названия больше не наезжают (обновление 36) */
.salute__back { position: static; display: flex; width: max-content; margin: -14px 0 6px -10px; }
.salute--assembled .salute__letter { display: none; }

/* Новогоднее оформление: гирлянда, снег, шапка на логотипе (включается по датам из настроек, обновление 37) */
.ny-garland { position: relative; z-index: 31; display: flex; justify-content: space-between; height: 22px; padding: 0 2%; overflow: hidden; pointer-events: none; background: transparent; }
.ny-garland::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 22px; border-bottom: 2px solid rgba(60,70,60,.55); border-radius: 0 0 50% 50% / 0 0 100% 100%; }
.ny-garland i { position: relative; top: 5px; width: 8px; height: 12px; border-radius: 50% 50% 45% 45%; box-shadow: 0 0 8px 2px currentColor; animation: ny-blink 2.1s ease-in-out infinite; }
.ny-garland i::before { content: ""; position: absolute; left: 1px; top: -3px; width: 6px; height: 4px; border-radius: 1px; background: #556; }
.ny-garland i:nth-child(even) { top: 9px; }
.ny-garland i:nth-child(4n+3) { top: 11px; }
@keyframes ny-blink { 0%, 100% { opacity: 1; box-shadow: 0 0 9px 2px currentColor; } 50% { opacity: .35; box-shadow: none; } }
.ny-garland i:nth-child(1) { background: #ff4d4d; color: #ff4d4d; animation-delay: 0.0s; }
.ny-garland i:nth-child(2) { background: #ffd23f; color: #ffd23f; animation-delay: 0.35s; }
.ny-garland i:nth-child(3) { background: #4fc3ff; color: #4fc3ff; animation-delay: 0.7s; }
.ny-garland i:nth-child(4) { background: #7cff7a; color: #7cff7a; animation-delay: 1.05s; }
.ny-garland i:nth-child(5) { background: #ff8ad8; color: #ff8ad8; animation-delay: 1.4s; }
.ny-garland i:nth-child(6) { background: #ffa23f; color: #ffa23f; animation-delay: 1.75s; }
.ny-garland i:nth-child(7) { background: #ff4d4d; color: #ff4d4d; animation-delay: 0.0s; }
.ny-garland i:nth-child(8) { background: #ffd23f; color: #ffd23f; animation-delay: 0.35s; }
.ny-garland i:nth-child(9) { background: #4fc3ff; color: #4fc3ff; animation-delay: 0.7s; }
.ny-garland i:nth-child(10) { background: #7cff7a; color: #7cff7a; animation-delay: 1.05s; }
.ny-garland i:nth-child(11) { background: #ff8ad8; color: #ff8ad8; animation-delay: 1.4s; }
.ny-garland i:nth-child(12) { background: #ffa23f; color: #ffa23f; animation-delay: 1.75s; }
.ny-garland i:nth-child(13) { background: #ff4d4d; color: #ff4d4d; animation-delay: 0.0s; }
.ny-garland i:nth-child(14) { background: #ffd23f; color: #ffd23f; animation-delay: 0.35s; }
.ny-garland i:nth-child(15) { background: #4fc3ff; color: #4fc3ff; animation-delay: 0.7s; }
.ny-garland i:nth-child(16) { background: #7cff7a; color: #7cff7a; animation-delay: 1.05s; }
.ny-garland i:nth-child(17) { background: #ff8ad8; color: #ff8ad8; animation-delay: 1.4s; }
.ny-garland i:nth-child(18) { background: #ffa23f; color: #ffa23f; animation-delay: 1.75s; }
.ny-garland i:nth-child(19) { background: #ff4d4d; color: #ff4d4d; animation-delay: 0.0s; }
.ny-garland i:nth-child(20) { background: #ffd23f; color: #ffd23f; animation-delay: 0.35s; }
.ny-garland i:nth-child(21) { background: #4fc3ff; color: #4fc3ff; animation-delay: 0.7s; }
.ny-garland i:nth-child(22) { background: #7cff7a; color: #7cff7a; animation-delay: 1.05s; }
.ny-garland i:nth-child(23) { background: #ff8ad8; color: #ff8ad8; animation-delay: 1.4s; }
.ny-garland i:nth-child(24) { background: #ffa23f; color: #ffa23f; animation-delay: 1.75s; }
@media (max-width: 480px) { .ny-garland i:nth-child(n+15) { display: none; } }
.ny-snow { position: fixed; inset: 0; z-index: 4; overflow: hidden; pointer-events: none; }
.ny-snow i { position: absolute; top: -24px; font-style: normal; line-height: 1; color: #9cc4ff; opacity: .7; animation: ny-fall 15s linear infinite; }
@media (prefers-color-scheme: dark) { .ny-snow i { color: #ffffff; opacity: .55; } .ny-garland::before { border-bottom-color: rgba(200,210,200,.35); } }
@keyframes ny-fall { 0% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(var(--drift, 20px), 52vh) rotate(180deg); } 100% { transform: translate(0, 106vh) rotate(360deg); } }
.ny-snow i:nth-child(1) { left: 2.9%; font-size: 11px; animation-duration: 12.2s; animation-delay: -11.7s; --drift: -30px; }
.ny-snow i:nth-child(2) { left: 11.2%; font-size: 10px; animation-duration: 11.5s; animation-delay: -9.1s; --drift: 30px; }
.ny-snow i:nth-child(3) { left: 19.5%; font-size: 10px; animation-duration: 12.9s; animation-delay: -9.9s; --drift: -30px; }
.ny-snow i:nth-child(4) { left: 30.7%; font-size: 10px; animation-duration: 16.0s; animation-delay: -10.5s; --drift: 30px; }
.ny-snow i:nth-child(5) { left: 33.3%; font-size: 11px; animation-duration: 12.8s; animation-delay: -10.0s; --drift: 30px; }
.ny-snow i:nth-child(6) { left: 41.9%; font-size: 16px; animation-duration: 11.9s; animation-delay: -5.6s; --drift: -18px; }
.ny-snow i:nth-child(7) { left: 49.6%; font-size: 11px; animation-duration: 15.6s; animation-delay: -3.4s; --drift: -30px; }
.ny-snow i:nth-child(8) { left: 60.4%; font-size: 14px; animation-duration: 16.0s; animation-delay: -8.9s; --drift: 18px; }
.ny-snow i:nth-child(9) { left: 67.8%; font-size: 12px; animation-duration: 18.4s; animation-delay: -6.5s; --drift: -18px; }
.ny-snow i:nth-child(10) { left: 77.2%; font-size: 14px; animation-duration: 13.0s; animation-delay: -10.3s; --drift: 18px; }
.ny-snow i:nth-child(11) { left: 85.4%; font-size: 11px; animation-duration: 13.3s; animation-delay: -17.6s; --drift: 30px; }
.ny-snow i:nth-child(12) { left: 90.0%; font-size: 13px; animation-duration: 13.7s; animation-delay: -16.8s; --drift: -30px; }
.logo { position: relative; }
.ny-hat { position: absolute; right: -1%; top: -12%; width: 17%; height: auto; transform: rotate(18deg); pointer-events: none; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
@media (prefers-reduced-motion: reduce) { .ny-snow { display: none; } .ny-garland i { animation: none; } }

/* Значки счётчиков (LiveInternet и т.п.) — в подвале, аккуратно и неярко */
.foot__counters { margin-top: 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; line-height: 0; }
.foot__counters img { max-height: 31px; width: auto; opacity: .55; transition: opacity .2s; }
.foot__counters a:hover img { opacity: 1; }

/* Пианино на личной странице (обновление 43): клавиши прилипают к низу экрана, слова проявляются по нотам */
.piano { margin: 0 -24px; padding: 12px 14px 12px; }
.salute--play .piano { position: sticky; bottom: 0; z-index: 6; background: var(--card, var(--bg)); border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; box-shadow: 0 -10px 24px rgba(0, 0, 0, .12); }
.piano__wish { margin: 0 0 8px; font-size: 16px; font-weight: 600; }
.piano__bar { height: 4px; max-width: 460px; margin: 0 auto 8px; border-radius: 4px; background: var(--line-soft, var(--line)); overflow: hidden; }
.piano__bar i { display: block; width: 0; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #e9a23b, #e8432e); transition: width .25s ease; }
.piano__keys { position: relative; width: 100%; max-width: 460px; height: 150px; margin: 0 auto 8px; border-radius: 0 0 10px 10px; border-top: 5px solid #7a1f1a; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.piano__key { position: absolute; top: 0; height: 100%; margin: 0; padding: 0; border: 1px solid #b9bcc6; border-top: 0; border-radius: 0 0 7px 7px; background: linear-gradient(180deg, #ffffff 0%, #f1f2f6 82%, #dfe1e8 100%); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .06); cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: transform .06s, background .12s, box-shadow .12s; transform-origin: 50% 0; }
.piano__key--black { z-index: 2; height: 60%; border: 0; border-radius: 0 0 5px 5px; background: linear-gradient(180deg, #2b2d36, #0c0d12); box-shadow: inset 0 -5px 0 rgba(255, 255, 255, .12), 0 2px 4px rgba(0, 0, 0, .45); }
.piano__key.is-next { background: linear-gradient(180deg, #fff6d8 0%, #ffd66b 100%); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .06), 0 0 14px rgba(255, 190, 60, .75); animation: piano-next 1.1s ease-in-out infinite; }
.piano__key--black.is-next { background: linear-gradient(180deg, #a5701a, #e9a23b); }
.piano__key.is-down { transform: scaleY(.97); background: linear-gradient(180deg, #ffe3a0, #ffb84d); animation: none; }
.piano__key--black.is-down { background: linear-gradient(180deg, #c98a22, #ffb84d); }
.piano__key:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
@keyframes piano-next { 50% { filter: brightness(.9); } }
.piano__tools { margin: 4px 0 0; display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; }
.piano__tools .btn { min-height: 38px; padding: 0 16px; }
.piano[hidden], .piano__tools[hidden] { display: none !important; }
.salute--play .salute__from, .salute--play .salute__actions { display: none; }
.salute--piano .salute__letter { min-height: 90px; }
.salute__text .pw { display: inline-block; opacity: .07; filter: blur(4px); transform: translateY(6px); transition: opacity .45s ease, filter .45s ease, transform .45s cubic-bezier(.2, .7, .2, 1); }
.salute__text .pw.is-on { opacity: 1; filter: none; transform: none; }
.salute--played .piano__bar { display: none; }
.fxhint__also { white-space: nowrap; }
.fxhint__also::before { content: "· "; }
@media (max-width: 480px) { .piano { margin: 0 -24px; padding: 10px 8px; } .piano__keys { height: 132px; } .piano__wish { font-size: 15px; } }
@media (max-height: 560px) { .piano__keys { height: 104px; } }
@media (prefers-reduced-motion: reduce) { .salute__text .pw { transition: none; transform: none; filter: none; } .piano__key.is-next { animation: none; } }

/* Помощница (обновление 43): кнопка в углу и облачко-приветствие. Само окно — в mia.css, грузится по нажатию */
.mia__btn { position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 40; width: 66px; height: 66px; padding: 4px; border: 2px solid var(--ink); border-radius: 50%; background: var(--card, var(--bg)); box-shadow: 3px 4px 0 rgba(0, 0, 0, .18), 0 8px 22px rgba(0, 0, 0, .22); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .15s; }
.mia__btn img { display: block; width: 100%; height: 100%; object-fit: contain; }
.mia__btn:hover { transform: scale(1.07) rotate(-4deg); }
.mia__btn:active { transform: scale(.95); }
.mia__btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.mia__btn[hidden], .mia.is-open .mia__btn, .mia.is-open .mia__hi { display: none; }
.mia.is-wait .mia__btn { animation: mia-wait .6s ease-in-out infinite alternate; }
@keyframes mia-wait { to { transform: translateY(-6px); } }
.mia__hi { position: fixed; right: 88px; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 40; max-width: min(260px, calc(100vw - 110px)); padding: 10px 34px 10px 14px; border: 2px solid var(--ink); border-radius: 18px; background: var(--bg); color: var(--ink); font-size: 14.5px; line-height: 1.35; font-weight: 600; box-shadow: 3px 4px 0 rgba(0, 0, 0, .16); cursor: pointer; animation: mia-hi .35s cubic-bezier(.2, .9, .3, 1.3); }
.mia__hi::before, .mia__hi::after { content: ""; position: absolute; bottom: 16px; border-style: solid; border-color: transparent; }
.mia__hi::before { right: -12px; border-width: 7px 0 7px 12px; border-left-color: var(--ink); }
.mia__hi::after { right: -8px; border-width: 7px 0 7px 12px; border-left-color: var(--bg); }
.mia__hi-x { position: absolute; right: 4px; top: 4px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
@keyframes mia-hi { from { opacity: 0; transform: translateX(14px) scale(.9); } to { opacity: 1; transform: none; } }
body:has(.installbar) .mia__btn { bottom: 92px; }
body:has(.installbar) .mia__hi { bottom: 100px; }
.miahi { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 0 14px; }
.miahi__pic { flex: 0 0 auto; width: 76px; height: 76px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .2)); }
.miahi__say { position: relative; margin: 0; padding: 9px 14px; border: 2px solid var(--ink); border-radius: 16px; background: var(--bg); font-size: 15px; font-weight: 600; text-align: left; }
.miahi__say::before, .miahi__say::after { content: ""; position: absolute; top: 50%; margin-top: -7px; border-style: solid; border-color: transparent; }
.miahi__say::before { left: -12px; border-width: 7px 12px 7px 0; border-right-color: var(--ink); }
.miahi__say::after { left: -8px; border-width: 7px 12px 7px 0; border-right-color: var(--bg); }
.salute--cake .miahi, .salute--play .miahi { display: none; }
.reply__more .btn { margin: 0 0 12px; }
@media (max-width: 480px) { .mia__btn { width: 58px; height: 58px; right: 10px; } .mia__hi { right: 76px; } }
@media (prefers-reduced-motion: reduce) { .mia__hi, .mia.is-wait .mia__btn { animation: none; } }
@media print { .mia { display: none; } }
/* Новогодняя шапочка на кнопке помощницы — в сезон новогоднего оформления */
.mia__hat { position: absolute; left: 2px; top: -13px; width: 34px; height: auto; transform: rotate(-20deg); pointer-events: none; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .3)); }

/* Переключатель языка в шапке (появляется, когда включён второй язык) */
.langsw { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; line-height: 1; }
.langsw a, .langsw b { display: inline-flex; align-items: center; min-height: 28px; padding: 0 9px; border-radius: 999px; color: var(--muted); font-weight: 600; text-decoration: none; }
.langsw b { background: var(--chip-on); color: var(--chip-on-ink); }
.langsw a:hover { color: var(--ink); text-decoration: none; }
/* На телефоне в шапке тесно: показываем одну кнопку — язык, на который можно переключиться */
@media (max-width: 480px) { .langsw { padding: 0; border: 0; } .langsw b { display: none; } .langsw a { min-height: 30px; padding: 0 8px; border: 1px solid var(--line); font-size: 12px; } }

/* Новогоднее оформление (обновление 45): снег включается и выключается снежинкой вверху справа; шапка Деда Мороза — круглая, с опушкой */
.ny-snow { display: none; }
html.ny-snow-on .ny-snow { display: block; }
.ny-garland { padding-right: 40px; }
.ny-flake { position: absolute; top: 1px; right: 6px; z-index: 32; width: 30px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); color: #4a90e2; font-size: 17px; line-height: 1; cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); -webkit-tap-highlight-color: transparent; }
.ny-flake[hidden] { display: none; }
.ny-flake[aria-pressed="false"] { color: var(--muted); opacity: .75; }
.ny-flake[aria-pressed="false"]::after { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; border-top: 2px solid currentColor; transform: rotate(-45deg); }
.ny-flake:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
body.ny { position: relative; }
.ny-hat { right: -4.5%; top: -34%; width: 19%; transform: rotate(16deg); }
.mia__hat { left: 12px; top: -12px; width: 34px; transform: rotate(-8deg); }
@media (min-width: 900px) { .ny-flake { top: 4px; right: 14px; width: 38px; height: 38px; font-size: 22px; } .ny-flake[aria-pressed="false"]::after { left: 8px; right: 8px; } }

/* Подборки открыток (/otkrytki/): сетка картинок, на телефоне в два столбца */
.gal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
@media (min-width: 720px) { .gal { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
.gal__item { margin: 0; }
.gal__item a, .gal__hub { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--card, var(--bg)); transition: transform .15s, box-shadow .15s; }
.gal__item a:hover, .gal__hub:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, .14); text-decoration: none; }
.gal img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.gal__hint { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.gal__hub { color: var(--ink); }
.gal__name { display: block; padding: 9px 10px 11px; font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.gal__blank { display: block; aspect-ratio: 1 / 1; background: linear-gradient(135deg, var(--line), transparent); }

/* Помощница «живая»: дышит, иногда подпрыгивает, машет и подмигивает; подпись «Помощь» и подсказки показывают, что на неё можно нажать */
.mia__btn::after { content: attr(data-tag); position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); padding: 1px 9px 2px; border: 2px solid var(--bg); border-radius: 10px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 1.3; white-space: nowrap; pointer-events: none; }
.mia__btn img { transform-origin: 50% 100%; animation: mia-breathe 3.2s ease-in-out infinite; }
@keyframes mia-breathe { 50% { transform: scale(1.04, .96); } }
.mia__btn.is-hop { animation: mia-hop .7s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes mia-hop { 0% { transform: none; } 30% { transform: translateY(-14px) scale(.96, 1.05); } 60% { transform: translateY(0) scale(1.06, .94); } 100% { transform: none; } }
.mia__btn.is-wave { animation: mia-wave .9s ease-in-out; }
@keyframes mia-wave { 20% { transform: rotate(-10deg); } 40% { transform: rotate(9deg); } 60% { transform: rotate(-7deg); } 80% { transform: rotate(5deg); } }
.mia__btn.is-peek { animation: mia-peek .8s ease-in-out; }
@keyframes mia-peek { 50% { transform: scale(1.14); } }
.mia__btn.is-ring { box-shadow: 0 0 0 0 rgba(232, 67, 46, .55), 3px 4px 0 rgba(0, 0, 0, .18); animation: mia-ring 1.6s ease-out 3; }
@keyframes mia-ring { to { box-shadow: 0 0 0 16px rgba(232, 67, 46, 0), 3px 4px 0 rgba(0, 0, 0, .18); } }
.mia__tip { position: fixed; right: 88px; bottom: calc(30px + env(safe-area-inset-bottom)); z-index: 40; padding: 7px 13px; border: 2px solid var(--ink); border-radius: 16px; background: var(--bg); color: var(--ink); font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; box-shadow: 2px 3px 0 rgba(0, 0, 0, .15); animation: mia-hi .3s cubic-bezier(.2, .9, .3, 1.3); }
.mia__tip::after { content: ""; position: absolute; right: -9px; bottom: 9px; border: 6px solid transparent; border-left-color: var(--ink); border-right-width: 0; }
.mia.is-open .mia__tip { display: none; }
body:has(.installbar) .mia__tip { bottom: 108px; }
@media (max-width: 480px) { .mia__tip { right: 76px; font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .mia__btn img, .mia__btn.is-hop, .mia__btn.is-wave, .mia__btn.is-peek, .mia__btn.is-ring, .mia__tip { animation: none; } }

/* Партнёрский блок «Поздравление голосом» под списком текстов */
.voice { position: relative; display: flex; align-items: center; gap: 14px; margin: 16px 0 4px; padding: 16px 18px 20px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(135deg, rgba(232, 67, 46, .09), rgba(36, 71, 214, .08)); }
.voice__ico { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 50%; background: #e8432e; color: #fff; }
.voice__main { flex: 1 1 auto; min-width: 0; }
.voice__t { margin: 0 0 3px; font-size: 17px; font-weight: 700; line-height: 1.25; }
.voice__d { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.4; }
.voice__go, .voice__go:hover { flex: 0 0 auto; white-space: nowrap; border-color: #e8432e; background: #e8432e; color: #fff; text-decoration: none; }
.voice__go:hover { filter: brightness(1.08); }
.voice__ad { position: absolute; right: 14px; bottom: 4px; color: var(--muted); font-size: 11px; opacity: .8; }
@media (max-width: 640px) { .voice { flex-wrap: wrap; padding-bottom: 24px; } .voice__main { flex-basis: calc(100% - 70px); } .voice__go { width: 100%; text-align: center; justify-content: center; } }

/* Помощницу спрятали: на её месте маленькая ссылка, чтобы позвать обратно */
.mia__back { position: fixed; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 40; padding: 5px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer; opacity: .85; }
.mia__back:hover { color: var(--ink); opacity: 1; }
.mia.is-open .mia__back { display: none; }

/* Дополнения (обновление 75): имя получателя над списком, вопросы и ответы, меню «отправить» на компьютере */
.namebar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px 0 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--card, var(--bg)); }
.namebar__label { font-size: 14px; font-weight: 600; }
.namebar__input { flex: 1 1 180px; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; }
.namebar__hint { flex: 1 1 100%; font-size: 13px; color: var(--muted); }
.card__name { font-weight: 600; color: var(--accent); }
.card--poem .card__name { display: block; }
.faq { margin: 28px 0 8px; }
.faq__item { border-bottom: 1px solid var(--line-soft); }
.faq__item summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
.faq__item p { margin: 0 0 14px; color: var(--muted); }
.sharemenu { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.sharemenu__item { display: flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 20px; color: var(--ink); font-size: 14px; }
.sharemenu__item:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }

/* Светлый вид «поживее» (обновление 73): мягкий цветной фон страницы, блоки — белые «листы» с тенью,
   даты и кнопки с цветом. Только для светлой схемы и только в этой теме: у «Праздничной» и «Тёплой бумаги» свой вид. */
@media (prefers-color-scheme: light) {
  :root { --page: #f4f6fc; --card: #ffffff; --sheet-line: #e2e6f0; --sheet-shadow: 0 1px 2px rgba(22,24,29,.05), 0 8px 22px rgba(36,71,214,.07); }
  body {
    background-color: var(--page);
    background-image: radial-gradient(900px 420px at 8% -120px, #dfe7ff 0, rgba(223,231,255,0) 70%), radial-gradient(760px 380px at 100% -60px, #ffe6df 0, rgba(255,230,223,0) 70%);
    background-repeat: no-repeat;
  }
  .top { background: rgba(255,255,255,.86); }
  .foot { background: #ffffff; }
  .intro--clamped::after { background: linear-gradient(rgba(244,246,252,0), var(--page)); }
  .card, .today, .picker, .fxhint, .voice, .rows { background: #ffffff; border-color: var(--sheet-line); box-shadow: var(--sheet-shadow); }
  .picker { border-color: var(--logo-accent); }
  .picker--names { border-color: var(--sheet-line); }
  .card { transition: box-shadow .18s ease, transform .18s ease; }
  .card:hover { box-shadow: 0 2px 4px rgba(22,24,29,.06), 0 14px 30px rgba(36,71,214,.12); transform: translateY(-1px); }
  .rows { border: 1px solid var(--sheet-line); border-radius: 16px; padding: 2px 14px; }
  .row:last-child { border-bottom: 0; }
  .row:hover { text-decoration: none; color: var(--accent); }
  .row__date { flex: 0 0 auto; min-width: 92px; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-soft-ink); text-align: center; font-size: 13px; }
  .chip { background: #ffffff; border-color: var(--sheet-line); box-shadow: 0 1px 2px rgba(22,24,29,.05); }
  .chip:hover { border-color: var(--accent); color: var(--accent); }
  .chip.is-active:hover { color: var(--chip-on-ink); border-color: var(--chip-on); }
  .chips--flat .chip, .chip--more { background: none; box-shadow: none; }
  .block > .chips--sm .chip:nth-child(4n+1) { background: #eef2ff; border-color: #d9e1ff; }
  .block > .chips--sm .chip:nth-child(4n+2) { background: #fff1ec; border-color: #ffdccf; }
  .block > .chips--sm .chip:nth-child(4n+3) { background: #ecf8ef; border-color: #cfead6; }
  .block > .chips--sm .chip:nth-child(4n+4) { background: #fff7e0; border-color: #f6e4a8; }
  .label::before { content: ""; display: inline-block; width: 14px; height: 3px; margin-right: 8px; border-radius: 2px; background: var(--logo-accent); vertical-align: middle; position: relative; top: -1px; }
  .gal__item a, .gal__hub { box-shadow: var(--sheet-shadow); border-color: var(--sheet-line); }
}
@media (prefers-color-scheme: light) and (prefers-reduced-motion: reduce) { .card, .card:hover { transition: none; transform: none; } }
