/* Luna Gallery — главная (performance-first) */

/* ── Компактный dock: Общение / Новости ── */
.home-quick-dock {
    display: flex;
    gap: 8px;
    margin: 2px 0 8px;
    contain: layout style;
}

.home-quick-dock__btn {
    flex: 1 1 0;
    min-width: 0;
    height: auto;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 14px;
    overflow: visible;
    display: block;
    line-height: 0;
    position: relative;
    text-decoration: none;
    background: transparent;
    box-shadow: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.14s ease;
}

.home-quick-dock__btn:active {
    transform: scale(0.98);
}

/* index.html скрывает .home-quick-button-image глобально — переопределяем */
.home-quick-dock__img,
.home-quick-dock .home-quick-button-image {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center;
    border-radius: 14px;
    opacity: 1 !important;
    filter: none !important;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.home-quick-dock .home-quick-link .quick-unread-badge,
.home-quick-dock .home-image-link .quick-unread-badge {
    top: -6px !important;
    right: -5px !important;
    left: auto !important;
    transform: none !important;
    z-index: 10 !important;
}

/* Сброс legacy-стилей index (большие min-height / padding / фон) */
.home-quick-dock .home-quick-link,
.home-quick-dock .home-image-link {
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 14px !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.home-quick-dock .home-quick-link::before,
.home-quick-dock .home-quick-link::after,
.home-quick-dock .home-image-link::before,
.home-quick-dock .home-image-link::after {
    display: none !important;
    content: none !important;
}

/* ── Continue row ── */
.gallery-continue {
    margin: 6px 0 2px;
    contain: layout style;
}

.gallery-continue[hidden] {
    display: none !important;
}

.gallery-continue__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 2px 8px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
}

.gallery-continue__scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 10px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

.gallery-continue__scroll::-webkit-scrollbar {
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    .gallery-continue__scroll {
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
        cursor: grab;
        padding-bottom: 12px;
    }

    .gallery-continue__scroll::-webkit-scrollbar {
        display: block;
        height: 5px;
    }

    .gallery-continue__scroll::-webkit-scrollbar-thumb {
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.32);
    }

    .gallery-continue__scroll.is-dragging {
        cursor: grabbing;
        scroll-snap-type: none;
    }

    .gallery-continue__scroll.is-dragging .gallery-continue-item {
        pointer-events: none;
    }
}

.gallery-continue-item {
    flex: 0 0 auto;
    width: 68px;
    text-align: center;
    cursor: pointer;
    scroll-snap-align: start;
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font: inherit;
    touch-action: manipulation;
}

.gallery-continue-item__ring {
    width: 64px;
    height: 64px;
    margin: 0 auto 5px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(135deg, #9f6cff, #64b5f6 55%, #ffd700);
    box-shadow: 0 4px 14px rgba(159, 108, 255, 0.22);
}

.gallery-continue-item__img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    display: block;
    background: #12182a;
    border: 2px solid rgba(8, 9, 16, 0.9);
}

.gallery-continue-item__name {
    font-size: 10px;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.72);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 68px;
}

/* ── Toolbar + фильтры (все капсулы на экране) ── */
.gallery-toolbar {
    margin: 6px 0 8px;
    contain: layout style;
}

.gallery-toolbar__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.gallery-header__title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    min-width: 0;
}

.gallery-market-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(183, 148, 255, 0.38);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
        rgba(159, 108, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 12px rgba(0, 0, 0, 0.16);
    transition: background 0.14s ease, transform 0.14s ease, box-shadow 0.14s ease;
}

.gallery-market-btn:active {
    transform: scale(0.97);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)),
        rgba(159, 108, 255, 0.22);
}

.gallery-market-btn__arrow {
    color: #b794ff;
    font-size: 14px;
    line-height: 1;
}

.gallery-filters--fit {
    display: flex;
    gap: 8px;
    width: 100%;
    overflow: visible;
    padding: 0;
    align-items: stretch;
}

.gallery-filter {
    flex: 1 1 0;
    min-width: 0;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.14s ease;
}

.gallery-filter:active {
    transform: scale(0.98);
}

.gallery-filter__inner {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 204 / 82;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    border: none;
    overflow: visible;
    transition: opacity 0.22s ease, filter 0.22s ease;
}

.gallery-filter[data-filter="all"] .gallery-filter__inner {
    background-image: url('Все.svg');
}

.gallery-filter[data-filter="mine"] .gallery-filter__inner {
    background-image: url('Мои.svg');
}

.gallery-filter[data-filter="purchased"] .gallery-filter__inner {
    background-image: url('Куплено.svg');
}

.gallery-filter:not(.is-active) .gallery-filter__inner {
    opacity: 0.52;
    filter: saturate(0.75) brightness(0.88);
}

.gallery-filter.is-active .gallery-filter__inner {
    opacity: 1;
    filter: none;
}

.gallery-filter__content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 12px 2px;
    pointer-events: none;
}

.gallery-filter__label {
    font-size: clamp(10px, 2.85vw, 12px);
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
    transition: color 0.2s ease;
}

.gallery-filter__count {
    font-size: clamp(12px, 3.2vw, 14px);
    font-weight: 800;
    line-height: 1;
    color: rgba(255, 255, 255, 0.38);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
    transition: color 0.2s ease;
}

.gallery-filter.is-active .gallery-filter__label {
    color: rgba(255, 255, 255, 0.98);
}

.gallery-filter.is-active .gallery-filter__count {
    color: #ffb800;
}

/* ── Gallery grid ── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    contain: layout style;
}

@media (min-width: 520px) {
    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.gallery-card {
    position: relative;
    border-radius: 14px;
    overflow: visible;
    aspect-ratio: 3 / 4;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(13, 17, 29, 0.92);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
    cursor: pointer;
    content-visibility: auto;
    contain-intrinsic-size: auto 220px;
    transform: translateZ(0);
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

.gallery-card.is-holding {
    touch-action: none;
}

.gallery-card.is-holding .gallery-card__inner {
    transform: scale(0.985);
    transition: transform 0.18s ease;
}

.gallery-card.is-hold-complete .gallery-card__hold-frame {
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(159, 108, 255, 0.55));
}

.gallery-card__hold-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 7;
    opacity: 0;
    border-radius: inherit;
    overflow: visible;
    transition: opacity 0.12s ease, filter 0.18s ease;
}

.gallery-card.is-holding .gallery-card__hold-frame {
    opacity: 1;
}

.gallery-card__hold-path {
    fill: none;
    stroke: url(#galleryHoldStroke);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.gallery-card__inner {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    transition: transform 0.18s ease;
}

/* Модалка действий по long-press */
.gallery-card-action-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    background: rgba(4, 6, 14, 0.62);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.gallery-card-action-modal.is-open {
    display: flex;
}

.gallery-card-action-modal__sheet {
    width: min(100%, 360px);
    border-radius: 20px;
    padding: 10px;
    background: linear-gradient(160deg, rgba(18, 22, 38, 0.98), rgba(10, 12, 24, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    animation: galleryActionSheetIn 0.24s ease;
}

@keyframes galleryActionSheetIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.gallery-card-action-modal__title {
    padding: 8px 12px 10px;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.72);
    text-align: center;
}

.gallery-card-action-modal__item,
.gallery-card-action-modal__cancel {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 12px 16px;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.gallery-card-action-modal__item {
    color: #fff;
    background: linear-gradient(135deg, rgba(159, 108, 255, 0.35), rgba(100, 181, 246, 0.28));
    border: 1px solid rgba(159, 108, 255, 0.35);
    gap: 10px;
}

.gallery-card-action-modal__item + .gallery-card-action-modal__item {
    margin-top: 8px;
}

.gallery-card-action-modal__item--details {
    background: linear-gradient(135deg, rgba(201, 162, 77, 0.28), rgba(139, 94, 52, 0.22));
    border-color: rgba(201, 162, 77, 0.45);
}

.gallery-card-action-modal__item-icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.gallery-card-action-modal__item-icon svg {
    width: 100%;
    height: 100%;
}

.gallery-card-action-modal__cancel {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.06);
}

.gallery-card .gallery-card__menu,
.gallery-card.character-card > .character-menu-button.gallery-card__menu {
    display: none !important;
}

.gallery-card .gallery-card__menu-dropdown {
    display: none !important;
}

.gallery-card__badge {
    position: absolute;
    top: 8px;
    right: 8px;
    left: auto;
    z-index: 4;
    max-width: calc(100% - 16px);
    min-height: 22px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.94);
    background: rgba(8, 10, 18, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.gallery-card__media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    opacity: 0;
    transition: opacity 0.22s ease;
    pointer-events: none;
    -webkit-touch-callout: none;
    touch-callout: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

.gallery-card__media--bg {
    background-image: var(--gallery-media-url);
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
}

.gallery-card__media.is-loaded {
    opacity: 1;
}

.gallery-card__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 35%, rgba(0, 0, 0, 0.72) 100%);
    pointer-events: none;
    z-index: 1;
}

.gallery-card__badge--free {
    background: rgba(76, 175, 80, 0.35);
}

.gallery-card__badge--custom {
    background: rgba(156, 39, 176, 0.4);
}

.gallery-card__badge--purchased {
    background: rgba(255, 193, 7, 0.35);
}

.gallery-card__name {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    line-height: 1.25;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.gallery-card__skeleton {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, #141a2a 8%, #1c2438 18%, #141a2a 33%);
    background-size: 200% 100%;
    animation: gallery-shimmer 1.4s ease-in-out infinite;
}

@keyframes gallery-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.gallery-sentinel {
    height: 1px;
    width: 100%;
    pointer-events: none;
    visibility: hidden;
}

.gallery-loading-more {
    grid-column: 1 / -1;
    text-align: center;
    padding: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
}

.gallery-grid .character-card:not(.gallery-card) {
    grid-column: span 1;
}

.gallery-grid .character-card:not(.gallery-card) .character-image-container {
    height: auto;
    aspect-ratio: 3 / 4;
}

.gallery-grid .character-card .character-image,
.gallery-grid .character-card video.character-image {
    object-fit: cover;
    object-position: top center;
}

/* ——— Досье персонажа (модалка «Подробнее») ——— */
.gallery-dossier-modal {
    position: fixed;
    inset: 0;
    z-index: 12500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
}

.gallery-dossier-modal.is-open {
    display: flex;
}

.gallery-dossier-modal__backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(159, 108, 255, 0.18), transparent 55%),
        rgba(6, 8, 16, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.gallery-dossier-modal__wrap {
    position: relative;
    width: min(100%, 440px);
    max-height: min(92vh, 780px);
    animation: dossierIn 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes dossierIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.96) rotateX(4deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0);
    }
}

.gallery-dossier-modal__close {
    position: absolute;
    top: -6px;
    right: -2px;
    z-index: 3;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(20, 16, 12, 0.85);
    color: #f5e6c8;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.gallery-dossier-modal__folder {
    position: relative;
    border-radius: 4px 14px 14px 14px;
    background: linear-gradient(165deg, #c9a24d 0%, #a67c3d 38%, #8b5e34 100%);
    padding: 0 10px 10px;
    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.gallery-dossier-modal__tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 78%;
    margin-top: -8px;
    margin-left: 4px;
    padding: 10px 18px 8px;
    border-radius: 10px 10px 0 0;
    background: linear-gradient(180deg, #ddb96a, #c9a24d);
    color: #3d2814;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.12);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-dossier-modal__tab-icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.75;
}

.gallery-dossier-modal__tab-icon svg {
    width: 100%;
    height: 100%;
}

.gallery-dossier-modal__paper {
    position: relative;
    max-height: min(78vh, 680px);
    overflow: auto;
    border-radius: 8px;
    padding: 18px 16px 14px;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 27px,
            rgba(139, 94, 52, 0.06) 27px,
            rgba(139, 94, 52, 0.06) 28px
        ),
        linear-gradient(180deg, #faf6ee 0%, #f0e8d8 48%, #ebe2d0 100%);
    color: #2c2418;
    box-shadow: inset 0 0 0 1px rgba(139, 94, 52, 0.12);
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 94, 52, 0.35) transparent;
}

.gallery-dossier-modal__paper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(180, 50, 50, 0.35), transparent);
    pointer-events: none;
}

.gallery-dossier-modal__loading,
.gallery-dossier-modal__error {
    text-align: center;
    padding: 40px 16px;
    font-size: 14px;
    color: #5c4a32;
}

.gallery-dossier-modal__spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    border: 2px solid rgba(92, 74, 50, 0.2);
    border-top-color: #8b5e34;
    border-radius: 50%;
    vertical-align: -3px;
    animation: dossierSpin 0.7s linear infinite;
}

@keyframes dossierSpin {
    to { transform: rotate(360deg); }
}

.gallery-dossier-modal__header {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px dashed rgba(139, 94, 52, 0.35);
}

.gallery-dossier-modal__portrait-wrap {
    position: relative;
}

.gallery-dossier-modal__portrait {
    width: 96px;
    height: 120px;
    object-fit: cover;
    object-position: top center;
    border-radius: 4px;
    border: 2px solid #8b5e34;
    box-shadow: 2px 4px 12px rgba(44, 36, 24, 0.25);
    background: #ddd5c8;
}

.gallery-dossier-modal__portrait--empty {
    display: grid;
    place-items: center;
    color: #8b5e34;
    opacity: 0.5;
}

.gallery-dossier-modal__portrait--empty svg {
    width: 36px;
    height: 36px;
}

.gallery-dossier-modal__file-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b5740;
}

.gallery-dossier-modal__file-id {
    font-weight: 700;
    color: #3d2814;
}

.gallery-dossier-modal__stamp {
    margin-left: auto;
    padding: 2px 6px;
    border: 1.5px solid rgba(180, 50, 50, 0.55);
    color: rgba(180, 50, 50, 0.75);
    font-size: 9px;
    font-weight: 800;
    transform: rotate(-8deg);
    border-radius: 2px;
}

.gallery-dossier-modal__name {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.15;
    color: #1f1810;
    font-family: Georgia, 'Times New Roman', serif;
}

.gallery-dossier-modal__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gallery-dossier-modal__chip {
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(139, 94, 52, 0.12);
    color: #5c4028;
    border: 1px solid rgba(139, 94, 52, 0.2);
}

.gallery-dossier-modal__section {
    margin-bottom: 16px;
}

.gallery-dossier-modal__section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.gallery-dossier-modal__section-head h3 {
    margin: 0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6b5740;
}

.gallery-dossier-modal__section-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    color: #8b5e34;
    flex-shrink: 0;
}

.gallery-dossier-modal__section-icon svg {
    width: 100%;
    height: 100%;
}

.gallery-dossier-modal__section-body {
    font-size: 14px;
    line-height: 1.55;
    color: #2c2418;
}

.gallery-dossier-modal__muted {
    color: #8a7968;
    font-style: italic;
}

.gallery-dossier-modal__quote {
    margin: 0;
    padding: 10px 12px 10px 14px;
    border-left: 3px solid #c9a24d;
    background: rgba(201, 162, 77, 0.12);
    border-radius: 0 6px 6px 0;
    font-style: italic;
    font-size: 13px;
    color: #3d3020;
}

.gallery-dossier-modal__section--memory {
    margin-top: 4px;
    padding: 12px;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 248, 235, 0.9), rgba(245, 232, 210, 0.95));
    border: 1px solid rgba(139, 94, 52, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.gallery-dossier-modal__memory-stats {
    font-size: 11px;
    color: #6b5740;
    margin-bottom: 8px;
}

.gallery-dossier-modal__memory-hint {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.45;
    color: #6b5740;
    font-style: italic;
}

.gallery-dossier-modal__memory-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.gallery-dossier-modal__memory-item {
    display: grid;
    grid-template-columns: 18px 1fr auto;
    gap: 8px;
    align-items: start;
    padding: 8px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(139, 94, 52, 0.12);
    font-size: 13px;
    line-height: 1.4;
}

.gallery-dossier-modal__memory-item.is-pinned {
    border-color: rgba(201, 162, 77, 0.45);
    background: rgba(255, 252, 245, 0.85);
}

.gallery-dossier-modal__memory-pin {
    text-align: center;
    opacity: 0.7;
}

.gallery-dossier-modal__memory-src {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #9a8468;
    white-space: nowrap;
    padding-top: 2px;
}

.gallery-dossier-modal__footer {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px dashed rgba(139, 94, 52, 0.25);
    text-align: center;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #9a8468;
}

@media (max-width: 400px) {
    .gallery-dossier-modal__header {
        grid-template-columns: 80px 1fr;
    }

    .gallery-dossier-modal__portrait {
        width: 80px;
        height: 100px;
    }

    .gallery-dossier-modal__name {
        font-size: 19px;
    }
}
