footer {
    overflow: hidden;
    clear: both;
    padding: 30px 0;
    border-top: 1px solid #e5e6eb;
}

.footer-content .copy {
    display: block;
    opacity: 0.7;
    color: #3a3c40;
    font-size: 14px;
    font-weight: 400;
    line-height: 30px;
    margin-bottom: 15px;
}

.footer-content p {
    color: #838992;
    font-size: 12px;
    font-weight: 400;
    margin-bottom: 15px;
}

.footer-content p:last-child {
    margin-bottom: 0;
}

.footer-menu {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    padding: 0;
    margin: 0 0 0px 0;
    list-style: none;
}
.footer-menu.dbl { margin-bottom: 30px;}

@media (max-width: 767px) {
    .footer-menu {
        margin-bottom: 15px;
    }
}

.footer-menu li {
    font-size: 12px;
    color: #838992;
    font-weight: 600;
    margin-right: 5px;
    white-space: nowrap;
    margin-bottom: 10px;
}

.footer-menu a {
    font-size: 13px;
    color: #838992;
    font-weight: 600;
    margin-right: 5px;
}

* {
    outline: none
}

.confirm-account {
    height: 40px;
    background-color: yellow;
    color: #00abeb;
    text-align: center;
    line-height: 40px;
}

#down img {
    transform: rotate(180deg);
}

/* ============================================================
   Бейдж «18+» — современный компактный значок в стиле проекта Novels:
   маленький красный скруглённый бейдж с белым текстом «18+» в правом
   верхнем углу обложки. Реализован чистым CSS (без картинки /img/18.png),
   текст выводится через ::before, поэтому разметку вьюх
   (пустой <span class="adult-icon"> / <span class="adult-icon-mini">)
   менять не нужно — значок обновляется централизованно по всему сайту.
   ============================================================ */

/* Контейнер иконок накладываем поверх обложки в правый верхний угол.
   .images > .icons (стр. книги) и .book-thumbnail .icons уже позиционируются
   в других css — повторяем те же значения (top/right:0), плюс включаем
   .bimg > .icons (лента главной), где иначе значок уезжал под обложку и
   обрезался overflow:hidden. */
.bimg > .icons,
.images > .icons,
.book-thumbnail .icons {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 4px;
    padding: 0;
}

.adult-icon,
.adult-icon-mini {
    background-image: none;
    background-color: #ef4444;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: auto;
    height: auto;
    color: #fff;
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .3px;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}
.adult-icon::before,
.adult-icon-mini::before {
    content: "18+";
}
/* Значок на странице книги (крупная обложка 200×300) */
.adult-icon {
    font-size: 12px;
    padding: 3px 7px;
    margin: 6px;
}
/* Значок на мини-обложках (слайдеры/анонсы/списки/лента главной) */
.adult-icon-mini {
    font-size: 10px;
    padding: 2px 5px;
    margin: 4px;
    border-radius: 5px;
}

/* Тёмная тема: красный бейдж контрастен и так — оставляем тот же красный,
   лишь усиливаем тень для отделения от обложки. Прописано тут же
   (css/dark-theme.css не трогаем). */
body.dark-theme .adult-icon,
body.dark-theme .adult-icon-mini {
    background-color: #ef4444;
    color: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .65);
}

/* Мобайл: чуть компактнее, чтобы значок не закрывал обложку */
@media (max-width: 600px) {
    .adult-icon {
        font-size: 11px;
        padding: 2px 6px;
        margin: 5px;
    }
    .adult-icon-mini {
        font-size: 9px;
        padding: 2px 5px;
        margin: 3px;
    }
}

/* Иконка скидки/распродажи. Редизайн 2026-06-06: вместо жёлтого PNG-«звезды»
   со знаком «%» (/img/discount.png) — тонкий line-SVG МОЛНИИ (lightning bolt)
   в едином стиле иконок шапки (луна/закладка/подарок): fill:none, stroke,
   скруглённые концы, stroke-width 2, viewBox 0 0 24 24.
   SVG задан как mask-image, цвет глифа = background-color (т.е. currentColor),
   поэтому тёмная тема работает через color (ниже body.dark-theme), а тонкая
   линия остаётся читаемой на обложке за счёт мягкой тени (drop-shadow).
   Разметку вьюх (<span class="discount-icon">/<span class="discount-icon-mini">)
   менять не нужно — иконка обновляется централизованно везде. */
/* Глобальная переменная с line-SVG молнии — переиспользуется и классом
   .discount-icon, и инлайн-бейджами скидки в шаблонах (см. ниже комментарий). */
:root {
    --sale-bolt-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M13%202%20L4%2014%20H11%20L11%2022%20L20%2010%20H13%20Z'/%3E%3C/svg%3E");
}
.discount-icon,
.discount-icon-mini {
    background-image: none;
    background-color: currentColor;
    color: #e8590c;
    -webkit-mask: var(--sale-bolt-mask) center / contain no-repeat;
    mask: var(--sale-bolt-mask) center / contain no-repeat;
    display: inline-block;
    position: relative;
    filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .45));
}
/* Утилита для инлайн-бейджей скидки в шаблонах, где раньше был
   background-image: url('/img/discount.png'). Цвет/тень — те же, что у
   .discount-icon. Размер берётся из inline width/height (mask contain). */
.sale-bolt-badge {
    background-image: none !important;
    background-color: #e8590c;
    -webkit-mask: var(--sale-bolt-mask) center / contain no-repeat;
    mask: var(--sale-bolt-mask) center / contain no-repeat;
    display: inline-block;
    filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .45));
}
body.dark-theme .sale-bolt-badge {
    background-color: #ff922b;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .7));
}
.discount-icon {
    width: 50px;
    height: 50px;
    -webkit-mask-size: 34px 34px;
    mask-size: 34px 34px;
}
.discount-icon-mini {
    width: 20px;
    height: 20px;
    -webkit-mask-size: 20px 20px;
    mask-size: 20px 20px;
}

/* Тёмная тема: тот же глиф, но цвет светлее для контраста с тёмной обложкой.
   Прописано тут же (css/dark-theme.css не трогаем), по образцу .adult-icon. */
body.dark-theme .discount-icon,
body.dark-theme .discount-icon-mini {
    color: #ff922b;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .7));
}

.post-image {
    margin: 10px 0;
}

.nobr {
    white-space: nowrap;
}

a.hashtag-item {
    font-size: 10px;
    text-decoration: none;
    font-weight: 700;
    transition: 0.3s ease-in-out;
}

a.hashtag-item:hover {
    color: #0088cc;
}

.character-items {
    display: flex;
    gap: 4px;
}

.character-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px;
    border-radius: 6px;
    box-shadow: #3333 4px 4px 4px;
    position: relative;
    overflow: hidden;
    align-items: center;
    width: 150px;
    box-sizing: border-box;
    border-top: 2px solid #3333;
    border-left: 2px solid #3333;
}

.character-item * {
    box-sizing: border-box;
}


.character-item > picture {
    width: 100px;
    aspect-ratio: 2/3;
    overflow: hidden;
    transition: 0.15s ease-in-out;
}

.character-item > picture > img {
    object-fit: cover;
    height: 100%;
    width: 100%;
    
}

.character-item > p.character-title {
    transition: 0.15s ease-in-out;
}

.character-item > a {
    position: absolute;
    top: 0;
    left: 0;
}

.character-item > a:hover ~ p.character-title, .character-item-create > button[data-dialog-target]:hover ~ p.character-title {
    color: #00abeb;
}

.character-item-create > button[data-dialog-target] {
    position: absolute;
    top: 0;
    left: 0;
    border: none;
    background-color: transparent;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.character-item-create > picture {
    filter: grayscale(1);
    transition: 0.2s ease-in-out;
}

.character-item-create > button[data-dialog-target]:hover ~ picture {
    filter: none;
}

.character-item > a:hover ~ picture, .character-item-create > button[data-dialog-target]:hover ~ picture{
    transform: scale(1.05);
}

.character-add {
    box-sizing: border-box;
}

.character-add * {
    box-sizing: border-box !important;
}

.character-add-results {
    display: flex;
    gap: 4px;
    flex-direction: column;
}

.character-add-results button[name="action"][value="drop"]::after {
    content: "Отвязать";
}

.character-add-results button[name="action"][value="link"]::after {
    content: "Привязать";
}

.character-add-result {
    display: flex;
    gap: 4px;
}

.character-add-result > a {
    max-width: 70ch;
    text-overflow: ellipsis;
    overflow: hidden;
}

.character-line {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: #f5f5f5;
    border-radius: 4px;
    margin-top: 4px;
}

.character-line > img  {
    width: 75px;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 4px;
    overflow: hidden;
}

.character-line-description {
    width: 100%;
}

.upic-avatar, .upic-avatar * {
	box-sizing: border-box;
}

.upic-avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	position: relative;
	max-width: 100%;
	max-height: 100%;
	border-radius: 4px;
	padding: 10%;
	object-fit: contain;
	aspect-ratio: 1;
}

.upic-avatar > img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	aspect-ratio: 1;
}

.upic-avatar::after {
	content: "";
	position: absolute;
	background-image: var(--frameSource);
	background-size: cover;
	pointer-events: none;
	animation: spin 4s linear infinite;
	width: 100%;
	height: 100%;
}

.upic-avatar-empty {
	background-color: var(--secondary-color);
	padding: 10%;
	overflow: hidden;
}