@charset "UTF-8";

/* Музей пограничной славы — информационный киоск. Референс: пример.css — светлая тема, без подчёркиваний. */

:root {
    --bg: #f2efe9;
    --bg-card: #ffffff;
    --bg-header: #1b3d2f;
    --bg-footer: #252a2e;
    --border: #ddd9d2;
    --border-strong: #2d5a47;
    --accent: #2d5a47;
    --accent-hover: #3d7058;
    --accent-soft: rgba(45, 90, 71, 0.12);
    --gold: #a67c52;
    --gold-soft: rgba(166, 124, 82, 0.15);
    --text: #1a1a1a;
    --text-soft: #5a5a5a;
    --text-on-dark: #f0f0f0;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --touch-min: 56px;
    --header-h: 100px;
    --footer-h: 64px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    overscroll-behavior: none;
}

html, body {
    width: 1920px;
    height: 1080px;
    overflow: hidden;
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    font-size: 20px;
    touch-action: manipulation;
}

.kiosk {
    display: flex;
    flex-direction: column;
    width: 1920px;
    height: 1080px;
    max-width: 100vw;
    max-height: 100vh;
    user-select: none;
    -webkit-user-select: none;
}
.kiosk--hidden {
    display: none !important;
}

/* ——— Экран блокировки (слайд-шоу) ——— */
.lock-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #0a0a0a;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.lock-screen--hidden {
    display: none !important;
}
.lock-screen-slideshow {
    position: absolute;
    inset: 0;
}
.lock-screen-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}
.lock-screen-slide--current {
    opacity: 1;
    z-index: 1;
}
.lock-screen-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 40%);
    pointer-events: none;
    z-index: 2;
}
.lock-screen-hint {
    position: absolute;
    bottom: 56px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
    font-size: 24px;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
    z-index: 3;
}
.lock-screen-hint--visible {
    opacity: 1;
}

/* Масштабирование под экран киоска 1920×1080 */
@media (max-width: 1920px), (max-height: 1080px) {
    html, body { transform-origin: 0 0; }
    .kiosk { transform-origin: 0 0; }
}
@media (min-width: 1921px) and (min-height: 1081px) {
    body { margin: auto; box-shadow: 0 0 0 2px var(--border); }
}

/* ——— Шапка (как в пример.css: тёмная полоса) ——— */
.header {
    height: var(--header-h);
    min-height: var(--header-h);
    flex-shrink: 0;
    background: var(--bg-header);
    color: var(--text-on-dark);
    border-bottom: none;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 32px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.35);
    position: relative;
    flex-shrink: 0;
}
.brand-mark::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 14px;
    margin: -7px 0 0 -4px;
    border-left: 2px solid rgba(255, 255, 255, 0.9);
    border-bottom: 2px solid rgba(255, 255, 255, 0.9);
    transform: rotate(-45deg);
}
.brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.logo {
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 0.02em;
    color: var(--text-on-dark);
}
.brand-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 400;
}
.nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.nav-btn {
    min-height: 56px;
    min-width: 100px;
    padding: 12px 20px;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-on-dark);
    background: transparent;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}
.nav-btn.active {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
}
.nav-btn:active {
    background: rgba(255, 255, 255, 0.22);
}

/* ——— Основной контент ——— */
.main {
    flex: 1;
    overflow: hidden;
    padding: 24px 32px;
    background: var(--bg);
}

.screen {
    display: none;
    height: 100%;
    overflow: auto;
}
.screen.active {
    display: block;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.screen-title {
    font-size: 30px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}
.screen-subtitle {
    font-size: 17px;
    color: var(--text-soft);
    margin-bottom: 20px;
}

/* ——— Главная: герой + сетка плиток (как в пример.css) ——— */
.welcome {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: stretch;
    padding: 0;
    text-align: left;
}
.welcome-hero {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px 28px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.welcome-text {
    font-size: 24px;
    line-height: 1.5;
    color: var(--text-soft);
    margin: 0 0 24px;
}
.welcome-blocks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 0;
}
.welcome-block {
    min-height: 110px;
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}
.welcome-block:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-hover);
    background: var(--bg-card);
}
.welcome-block:active {
    transform: scale(0.99);
}
.welcome-block-icon {
    font-size: 36px;
    line-height: 1;
}
.welcome-block[data-screen="halls"],
.welcome-block[data-screen="memory"],
.welcome-block[data-screen="cards"] {
    border: 2px solid var(--accent);
}
.welcome-block[data-screen="honor"] {
    border: 2px solid var(--gold);
}

/* ——— Поиск на главной ——— */
.home-search-row {
    margin-top: 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.home-search-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    flex-shrink: 0;
}
.home-search-wrap {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 0;
}
.home-search-input {
    flex: 1;
    min-height: 48px;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
}
.home-search-input:focus {
    outline: none;
    border-color: var(--accent);
}
.home-search-input::placeholder {
    color: var(--text-soft);
}
.home-search-btn {
    min-height: 48px;
    padding: 12px 24px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease;
}
.home-search-btn:hover {
    background: var(--accent-hover);
}
.search-results {
    margin-bottom: 20px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.search-results.hidden {
    display: none !important;
}
.search-results-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}
.search-results-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.search-results-list li {
    margin-bottom: 6px;
}
.search-results-list button,
.search-results-list .search-result-item {
    display: block;
    width: 100%;
    padding: 10px 12px;
    text-align: left;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.search-results-list button:hover,
.search-result-item:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
}
.search-result-type {
    font-size: 12px;
    color: var(--text-soft);
    margin-left: 8px;
}

/* ——— Карусели на главной (одна под другой, во всю ширину) ——— */
.home-carousels {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 24px;
}
.home-carousel-section {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 16px;
}
.home-carousel-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 14px 10px;
}
.carousel-wrapper {
    position: relative;
    padding: 0 48px;
}
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.carousel-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.carousel-prev { left: 0; }
.carousel-next { right: 0; }
.carousel-inner {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.carousel-inner::-webkit-scrollbar {
    display: none;
    height: 0;
}
.carousel-card {
    flex: 0 0 280px;
    min-width: 280px;
    min-height: 100px;
    padding: 18px 18px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    gap: 14px;
    overflow: hidden;
}
.carousel-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-hover);
}
.carousel-card--memory {
    border-left: 4px solid var(--accent);
}
.carousel-card--honor {
    border-left: 4px solid var(--gold);
}
.carousel-card .carousel-card-photo {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--border);
    flex-shrink: 0;
}
.carousel-card .carousel-card-no-photo {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    background: var(--gold-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--gold);
    flex-shrink: 0;
}
.carousel-card-text {
    min-width: 0;
    flex: 1;
    overflow: hidden;
}
.carousel-card h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.carousel-card .carousel-card-sub {
    font-size: 14px;
    color: var(--text-soft);
    display: block;
    margin-bottom: 2px;
    line-height: 1.35;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.carousel-card .carousel-card-sub:last-child {
    margin-bottom: 0;
}

/* ——— Залы: карточки в стиле пример.css ——— */
.halls-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
}
.hall-card {
    min-height: 120px;
    padding: 22px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 4px solid var(--accent);
}
.hall-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-hover);
}
.hall-card:active {
    transform: scale(0.99);
}
.hall-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}
.hall-card p {
    font-size: 15px;
    color: var(--text-soft);
    line-height: 1.4;
}
.hall-card .hall-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

/* Детальные экраны и кнопка «Назад» */
.hall-detail, .exhibit-detail, .book-detail, .card-detail {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: var(--footer-h);
    padding: 24px 32px;
    background: var(--bg);
    overflow: auto;
}
.back-btn {
    min-height: var(--touch-min);
    padding: 14px 26px;
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 600;
    background: transparent;
    border: 2px solid var(--accent);
    border-radius: var(--radius);
    color: var(--accent);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}
.back-btn:hover {
    background: var(--accent-soft);
}
.back-btn:active {
    transform: scale(0.98);
}
.hall-detail-content h2,
.exhibit-detail-content h2,
.book-detail-content h2,
.card-detail-content h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}
.hall-detail-content .img-wrap,
.exhibit-detail-content .img-wrap,
.book-detail-content .img-wrap,
.card-detail-content .img-wrap {
    max-width: 500px;
    margin-bottom: 20px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.detail-video {
    margin-bottom: 20px;
    max-width: 720px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    background: #000;
}
.detail-video--native video {
    display: block;
    width: 100%;
    max-height: 400px;
}

/* Кнопка «Смотреть видео» в карточках */
.video-btn-wrap {
    margin-bottom: 16px;
}
.btn-watch-video {
    min-height: 52px;
    padding: 14px 28px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 18px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-watch-video:hover {
    background: var(--accent-hover);
}
.btn-watch-video:active {
    transform: scale(0.98);
}

/* Модальное окно для видео */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.video-modal.hidden {
    display: none !important;
}
.video-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    cursor: pointer;
}
.video-modal-box {
    position: relative;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    overflow: hidden;
}
.video-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}
.video-modal-close:hover {
    background: rgba(0, 0, 0, 0.85);
}
.video-modal-body {
    padding: 0;
    min-height: 200px;
}
.video-modal-body .detail-video {
    margin: 0;
    max-width: 100%;
}
.video-modal-body .detail-video--native video {
    max-height: 70vh;
}
.hall-detail-content .img-wrap img,
.exhibit-detail-content .img-wrap img,
.book-detail-content .img-wrap img,
.card-detail-content .img-wrap img {
    width: 100%;
    display: block;
}
.hall-detail-content p,
.exhibit-detail-content p,
.book-detail-content p,
.card-detail-content p {
    line-height: 1.55;
    margin-bottom: 12px;
    max-width: 900px;
    font-size: 16px;
    color: var(--text);
}
.exhibit-detail-content .year {
    color: var(--text-soft);
    font-size: 16px;
}
.book-detail-content .meta,
.card-detail-content .meta {
    color: var(--text-soft);
    font-size: 16px;
    margin-bottom: 4px;
    display: block;
}
.book-detail-content .meta:last-child,
.card-detail-content .meta:last-child {
    margin-bottom: 16px;
}

/* Кнопки экспонатов в зале */
.exhibits-in-hall {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}
.exhibits-in-hall .nav-btn {
    min-height: 48px;
    padding: 10px 18px;
    font-size: 16px;
    color: var(--accent);
    background: transparent;
    border: 2px solid var(--accent);
    border-radius: var(--radius-sm);
}
.exhibits-in-hall .nav-btn:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

/* ——— Книга памяти / Книга почёта: карточки персон ——— */
.book-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}
.book-card {
    min-height: 140px;
    padding: 20px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    gap: 16px;
}
.book-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-hover);
}
.book-card:active {
    transform: scale(0.99);
}
#honoredList .book-card {
    border-left: 4px solid var(--gold);
}
#heroesList .book-card {
    border-left: 4px solid var(--accent);
}
.book-card .photo {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    object-position: center;
    background: var(--border);
    flex-shrink: 0;
}
.book-card .no-photo {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    background: var(--gold-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--gold);
    flex-shrink: 0;
}
.book-card h3 {
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.book-card .sub {
    font-size: 15px;
    color: var(--text-soft);
    display: block;
    margin-bottom: 2px;
}
.book-card .sub:last-child {
    margin-bottom: 0;
}

/* ——— Картотека: карточки событий/личностей ——— */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}
.card-entry {
    min-height: 160px;
    padding: 22px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
    position: relative;
    overflow: hidden;
    border-left: 4px solid var(--accent);
}
.card-entry:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}
.card-entry:active {
    transform: translateY(0) scale(0.99);
}
.card-entry .card-type {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: 8px;
    font-weight: 600;
}
.card-entry h3 {
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}
.card-entry .date {
    font-size: 15px;
    color: var(--text-soft);
}

/* Анимация появления карточек картотеки */
.card-animate {
    opacity: 0;
    animation: cardAppear 0.5s ease forwards;
}
@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.card-entry:nth-child(1) { animation-delay: 0.05s; }
.card-entry:nth-child(2) { animation-delay: 0.1s; }
.card-entry:nth-child(3) { animation-delay: 0.15s; }
.card-entry:nth-child(4) { animation-delay: 0.2s; }
.card-entry:nth-child(5) { animation-delay: 0.25s; }
.card-entry:nth-child(6) { animation-delay: 0.3s; }
.card-entry:nth-child(7) { animation-delay: 0.35s; }
.card-entry:nth-child(8) { animation-delay: 0.4s; }
.card-entry:nth-child(9) { animation-delay: 0.45s; }
.card-entry:nth-child(n+10) { animation-delay: 0.5s; }

/* ——— Подвал (как в пример.css) ——— */
.footer {
    height: var(--footer-h);
    min-height: var(--footer-h);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    background: var(--bg-footer);
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
}
.footer .btn-home {
    min-height: 56px;
    padding: 14px 28px;
    border-radius: var(--radius);
    background: var(--accent);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}
.footer .btn-home:hover {
    background: var(--accent-hover);
}
.footer .btn-home:active {
    transform: scale(0.98);
}

/* Scrollbar — единый стиль на всех страницах (.screen и детальные экраны) */
.screen,
.hall-detail,
.exhibit-detail,
.book-detail,
.card-detail {
    scrollbar-width: auto;
    scrollbar-color: var(--border) var(--bg);
}
.screen::-webkit-scrollbar,
.hall-detail::-webkit-scrollbar,
.exhibit-detail::-webkit-scrollbar,
.book-detail::-webkit-scrollbar,
.card-detail::-webkit-scrollbar {
    width: 18px;
    height: 18px;
}
.screen::-webkit-scrollbar-track,
.hall-detail::-webkit-scrollbar-track,
.exhibit-detail::-webkit-scrollbar-track,
.book-detail::-webkit-scrollbar-track,
.card-detail::-webkit-scrollbar-track {
    background: var(--bg);
}
.screen::-webkit-scrollbar-thumb,
.hall-detail::-webkit-scrollbar-thumb,
.exhibit-detail::-webkit-scrollbar-thumb,
.book-detail::-webkit-scrollbar-thumb,
.card-detail::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 6px;
}
.screen::-webkit-scrollbar-thumb:hover,
.hall-detail::-webkit-scrollbar-thumb:hover,
.exhibit-detail::-webkit-scrollbar-thumb:hover,
.book-detail::-webkit-scrollbar-thumb:hover,
.card-detail::-webkit-scrollbar-thumb:hover {
    background: var(--text-soft);
}

@media (hover: none) {
    .nav-btn, .welcome-block, .hall-card, .book-card, .card-entry, .back-btn, .btn-home {
        touch-action: manipulation;
    }
}
