@font-face {
    font-family: 'CrtOverscan';
    src: url('../assets/fonts/CrtOverscan-Regular.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Led Panel Station Off';
    src: url('../assets/fonts/Led Panel Station Off.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Blocks';
    src: url('../assets/fonts/blocks.ttf') format('truetype');
    font-display: swap;
}

:root {
    --accent-pink: #a84d6b;
    --muted-pink: #b97272;
    --deep-pink: #a27791;
    --bg-dark: #020204;
    --shadow-dark: #3d2a2f;
    --top-panel-h: 60px;
    --bottom-panel-h: 40px;
    --font-primary: 'Press Start 2P', monospace;
    --font-secondary: 'Tiny5', monospace;
    --text-primary: #a27791;
    --text-secondary: #8d8d8d;
}

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

html {
    background: var(--bg-dark);
}

body {
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-secondary);
    font-display: swap;
    min-height: 100dvh;
    /* Изменили height на min-height */
    position: relative;
    /* Удалили overflow: hidden и touch-action */
}

.text-primary {
    font-family: var(--font-primary);
    color: var(--text-primary);
    font-size: 18px;
}

.text-secondary {
    font-family: var(--font-secondary);
    color: var(--text-secondary);
}

#cosmicCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* === TOP PANEL === */
.top-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--top-panel-h);
    background: #050505;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    padding: 0 20px;
    z-index: 200;
}

.panel-left,
.panel-center,
.panel-right {
    display: flex;
    align-items: center;
    min-width: 0;
}

.panel-left {
    justify-content: flex-start;
}

.panel-center {
    justify-content: center;
}

.panel-right {
    justify-content: flex-end;
}

.panel-views {
    font-family: 'CrtOverscan', monospace;
    font-size: 18px;
    line-height: 1;
    color: var(--text-secondary);
    text-transform: lowercase;
    white-space: nowrap;
}

.panel-views-value {
    color: var(--text-primary);
}

.panel-spacer {
    width: 48px;
    height: 1px;
}

.top-panel::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #4a1515, #8B3A3A, #a84d6b, #8B3A3A, #4a1515);
}

.panel-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-family: var(--font-primary);
    font-size: 0.9rem !important;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.25);
    cursor: pointer;
    text-transform: uppercase;
    padding: 8px 0;
}

.panel-close {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

.panel-close img {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
}

.panel-close-label {
    font-size: 8px;
    margin-top: 3px;
    letter-spacing: 1px;
    text-transform: lowercase;
    font-family: var(--font-secondary);
}

/* === PINTEREST NO-LENIS PAGE === */
.journal-page[data-no-lenis="true"] .pinterest-widget-container {
    pointer-events: auto;
    touch-action: pan-y;
    overflow-y: auto;
    max-height: calc(100dvh - 200px);
}

/* Все дочерние элементы Pinterest (включая iframe который Pinterest вставляет) */
.pinterest-widget-container *,
.pinterest-widget-container iframe {
    touch-action: pan-y !important;
    pointer-events: auto !important;
}

/* === OPTIMIZATION: Disable iframe during scroll === */
.journal-wrapper.is-scrolling iframe {
    pointer-events: none !important;
}

/* Когда wrapper в режиме Pinterest — разрешаем вертикаль */
.journal-wrapper.pinterest-mode {
    touch-action: pan-y;
}

/* === WRAPPER (native scroll) === */
.journal-wrapper {
    width: 100%;
    margin-top: var(--top-panel-h);
    position: relative;
    z-index: 10;
}

.journal-vertical {
    display: block;
    width: 100%;
}

html,
body {
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.journal-vertical::-webkit-scrollbar {
    display: none;
}

.journal-page {
    width: 100%;
    display: flex;
    flex-direction: column;
    height: calc(100dvh - var(--top-panel-h));
}

.page-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 12px 12px 15px 12px;
    box-sizing: border-box;
    min-height: 0;
}

/* ================= СТРАНИЦА 1 ================= */
.page1-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 8px;
}

/* ================= SOCIAL CARDS (LINKEDIN + GITHUB) ================= */
.social-cards-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 250px;
    flex-shrink: 0;
}

.social-link {
    text-decoration: none;
    width: 100%;
}

.social-card {
    aspect-ratio: 1/1;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: inset 1px 1px 0 #000000, inset -1px -1px 0 #dfdfdf;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.social-card:hover {
    background: #a0a0a0;
    transform: translateY(-2px);
}

.social-icon {
    font-size: 48px;
    line-height: 1;
}

.social-name {
    color: #000;
    font-family: 'Tiny5', monospace;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ================= СТРАНИЦА 2: CAROUSEL + TWITTER ================= */
.journal-page[data-page="2"] .page-content {
    justify-content: center;
    gap: 8px;
    padding: 12px 12px 12px 12px;
}

.ticker-wrapper {
    flex-shrink: 0;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    padding: 5px 0;
    position: relative;
    z-index: 5;
    pointer-events: auto;
}

.ticker {
    display: inline-block;
    font-size: 20px;
    color: var(--text-secondary);
    font-family: 'Led Panel Station Off', monospace;
    text-shadow: 1px 1px 0 #2e2e2e, 2px 2px 0 #3d2a2f !important;
    animation: scrollTicker 150s linear infinite;
    pointer-events: auto;
}

.ticker-link {
    color: inherit;
    text-decoration: none;
    pointer-events: auto;
    cursor: pointer;
}

.ticker-link:hover {
    text-decoration: underline;
}

.ticker-wrapper:hover .ticker,
.ticker-wrapper.is-paused .ticker {
    animation-play-state: paused;
}

@keyframes scrollTicker {
    0% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Десктоп: арт‑блок ~60%, архив ~20% → соотношение около 3:1 */
.art-archive-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(12px, 2vw, 24px);
    margin: 4px 0 6px;
    flex-shrink: 1;
}

.art-block {
    flex: 0 1 clamp(320px, 46vw, 560px);
    width: clamp(320px, 46vw, 560px);
    max-height: calc(100dvh - 280px);
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.art-block img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

.archive-block {
    flex: 0 0 clamp(140px, 18vw, 220px);
    width: clamp(140px, 18vw, 220px);
    aspect-ratio: 1/1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    gap: 8px;
}

.archive-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    image-rendering: pixelated;
}

.archive-label {
    color: var(--text-primary);
    font-size: 20px;
    text-transform: uppercase;
    font-family: var(--font-primary);
}

/* Строка для Paint (десктоп) */
.paint-row {
    display: flex;
    justify-content: center;
    margin-top: 6px;
}

.page1-controls-row {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 22px;
}

.paint-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.paint-trigger-img {
    width: 64px;
    height: 64px;
    image-rendering: pixelated;
    cursor: pointer;
}

/* Нижняя строка с mood (десктоп) */
.bottom-row {
    display: flex;
    justify-content: center;
    margin-top: 6px;
}

.bottom-cell {
    display: flex;
    justify-content: center;
}

.mood-trigger {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.mood-img-large {
    width: 52px;
    height: 52px;
    image-rendering: pixelated;
}

.mood-label {
    font-family: var(--font-primary);
    font-size: 20px;
    color: var(--text-primary);
    margin-top: 5px;
    text-transform: lowercase;
}

.control-label,
.twitter-label {
    font-family: var(--font-primary);
    font-size: 20px;
    margin-top: 4px;
    text-transform: lowercase;
    letter-spacing: 1px;
}

.twitter-section {
    flex-direction: column;
}

@media (min-width: 769px) {
    .page1-layout {
        justify-content: flex-start;
    }

    .page1-controls-row {
        display: grid;
        grid-template-columns: clamp(320px, 46vw, 560px) clamp(120px, 16vw, 190px);
        column-gap: clamp(12px, 2vw, 24px);
        justify-content: center;
        align-items: start;
        width: 100%;
        margin: 2px auto 0;
    }

    .page1-controls-row .paint-row,
    .page1-controls-row .bottom-row {
        margin-top: 0;
        justify-content: center;
    }

    .page1-controls-row .mood-label {
        margin-top: 4px;
        font-size: 20px;
    }
}

/* ================= СТРАНИЦА 2: TWITTER ================= */
.carousel-section {
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 0;
    gap: 3px;
    padding: 0;
}

.carousel {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.carousel img {
    max-width: 100%;
    max-height: 35vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.carousel img:not(.active) {
    display: none;
}

.hashtag-row {
    flex-shrink: 0;
    text-align: center;
    padding: 2px 0 0 0;
    margin: 0;
}

.hashtag {
    font-size: 16px;
    color: var(--text-secondary);
    font-family: var(--font-secondary);
    text-shadow: 1px 1px 0 #4b3d3d, 2px 2px 0 #3d2a2f !important;
}

.twitter-section {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 2px;
    gap: 3px;
}

.x-btn-img {
    width: 44px;
    cursor: pointer;
}

.twitter-label {
    font-size: 14px;
}

/* ================= СТРАНИЦА 3: BEHANCE + FONTS ================= */
.behance-styler-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding-top: 10px;
    justify-content: center;
}

.behance-styler-layout .behance-card {
    width: clamp(150px, 30vw, 300px);
    /* Narrower */
}

/* ================= СТРАНИЦА 4: FONTS ================= */
.fonts-layout {
    justify-content: flex-start;
    padding-top: 10px;
    gap: 15px;
}

.mx-narrow-image {
    width: min(100%, 1016px);
    aspect-ratio: 1016 / 379;
    overflow: hidden;
    border: none;
    background: transparent;
}

.mx-narrow-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mx-description {
    font-size: 20px;
    color: var(--text-secondary);
    margin: 5px 0;
    text-align: center;
}

.styler-embedded {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.styler-input {
    width: 100%;
    background: #000;
    color: #fff;
    padding: 10px 15px;
    font-family: var(--font-secondary);
    border: 2px solid transparent;
    border-image: linear-gradient(90deg, #4a1515, #8B3A3A, #a84d6b, #8B3A3A, #4a1515) 1;
    text-align: center;
    font-size: 20px;
}

.styler-preview {
    background: #000;
    padding: 12px;
    font-size: 20px;
    text-align: center;
    cursor: pointer;
    font-family: 'Arial', 'Helvetica', sans-serif;
    word-break: break-all;
    border: 2px solid transparent;
    border-image: linear-gradient(90deg, #4a1515, #8B3A3A, #a84d6b, #8B3A3A, #4a1515) 1;
    color: #888888;
}

/* ================= СТРАНИЦА 4: SOUND ================= */
.sound-layout {
    justify-content: space-evenly;
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    gap: clamp(18px, 3vh, 40px);
    padding: clamp(10px, 2vh, 24px) 0;
}

.text-synth-embedded {
    width: min(92%, 820px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.text-synth-embedded h4 {
    font-family: var(--font-primary);
    font-size: 20px;
    color: var(--text-primary);
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.sound-layout .styler-input {
    width: 100%;
    max-width: 820px;
    min-height: 46px;
    font-size: 20px;
    border: 2px solid transparent;
    border-image: linear-gradient(90deg, #4a1515, #8B3A3A, #a84d6b, #8B3A3A, #4a1515) 1;
}

#ttsSpeakBtn {
    margin-top: 2px;
}

#ttsStatus {
    min-height: 18px;
    font-family: var(--font-secondary);
    color: var(--text-secondary);
    font-size: 13px;
}

.spotify-icon {
    color: #1DB954;
    cursor: pointer;
    padding: 10px;
    font-size: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.radio-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    image-rendering: pixelated;
}

.radio-img-small {
    width: 24px;
    height: 24px;
    object-fit: contain;
    image-rendering: pixelated;
    vertical-align: middle;
}

.spotify-label {
    font-family: var(--font-primary);
    font-size: 20px;
    color: var(--text-primary);
    margin-top: 8px;
    text-transform: uppercase;
}

/* ================= СТРАНИЦА 4: PINTEREST ================= */
.pinterest-layout {
    justify-content: center;
    gap: 20px;
}

.pinterest-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.pinterest-nav-btn {
    background: #79434a;
    color: #fff;
    border: 2px solid #000;
    padding: 10px 15px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 2px 2px 0 #000;
    font-family: var(--font-primary);
}

.pinterest-nav-btn:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}

.pinterest-widget-container {
    max-width: 400px;
    width: 100%;
}

/* ================= СТРАНИЦА 5: TOP + TETRIS ================= */
.top-tetris-layout {
    justify-content: center;
    gap: 15px;
}

.top-title {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-align: center;
    font-family: 'Blocks', monospace;
}

.top-players-framed {
    max-width: 400px;
    width: 80%;
    margin: 0 auto;
    border: 2px solid transparent;
    border-image: linear-gradient(90deg, #4a1515, #8B3A3A, #a84d6b, #8B3A3A, #4a1515) 1;
    padding: 12px;
    background: #000;
}

.top-players-list {
    font-size: 16px;
    color: var(--text-secondary);
    font-family: var(--font-secondary);
    line-height: 1.4;
}

.top-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-family: var(--font-secondary);
}

.tetris-big {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

.tetris-big img {
    width: 110px;
    image-rendering: pixelated;
}

.tetris-big span {
    font-size: 20px;
    color: var(--text-primary);
    font-family: 'Blocks', monospace;
    margin-top: 25px;
}

/* ================= СТРАНИЦА 6: FORUM + SUPPORT ================= */
.forum-section-title {
    font-size: 10px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-primary);
    font-family: var(--font-primary);
    text-align: center;
    flex-shrink: 0;
}

.forum-support-layout {
    padding: 20px 15px;
    justify-content: flex-start;
    gap: 15px;
}

.forum-embedded {
    display: flex;
    width: 100%;
    flex: 0 0 auto;
}

.forum-tabs-panel-embedded {
    width: 55px;
    background: transparent;
    display: flex;
    flex-direction: column;
    padding: 5px 0;
}

.forum-tab {
    padding: 8px 4px;
    text-align: center;
    cursor: pointer;
    border-bottom: 1px solid #3d2a2f;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-left-color 0.15s, background 0.15s;
}

.forum-tab img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: brightness(0.45) sepia(1) hue-rotate(300deg) saturate(1.5);
    transition: filter 0.15s;
    display: block;
}

.forum-tab:hover img {
    filter: brightness(0.7) sepia(1) hue-rotate(300deg) saturate(2);
}

.forum-tab.active {
    border-left: 3px solid #a27791;
    background: rgba(162, 119, 145, 0.06);
}

.forum-tab.active img {
    filter: brightness(1) sepia(0.2) hue-rotate(300deg) saturate(1.2) drop-shadow(0 0 4px #a27791);
}

.forum-content-embedded {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    color: var(--text-secondary);
    font-family: var(--font-secondary);
}

.forum-content-embedded h3 {
    font-size: 11px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.forum-content-embedded p {
    font-size: 15px;
    font-family: var(--font-secondary);
}

.forum-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 10px;
}

/* ================= УНИВЕРСАЛЬНАЯ КНОПКА ================= */
.universal-btn {
    cursor: pointer;
    border: 2px solid #000;
    background: #565656;
    padding: 0 0 3px 0;
    display: inline-block;
    text-decoration: none;
    user-select: none;
    appearance: none;
    -webkit-appearance: none;
    border-radius: 0;
}

.universal-btn .btn-inner {
    display: block;
    background: #fff;
    border: 2px solid #a0a0a0;
    padding: 4px 12px;
    transform: translateY(-3px);
    transition: transform 0.08s;
}

.universal-btn .btn-inner span {
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    letter-spacing: 0.5px;
    color: #000;
    text-transform: uppercase;
}

.universal-btn:active .btn-inner {
    transform: translateY(0);
}

/* ================= МОДАЛКИ ================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 20000;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #000;
    border: 4px solid transparent;
    border-image: linear-gradient(90deg, #4a1515, #8B3A3A, #a84d6b, #8B3A3A, #4a1515) 1;
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-header {
    background: #000;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #000;
}

.modal-title-text {
    font-size: 20px;
    color: var(--text-primary);
    text-shadow: 2px 2px 0 #000;
    font-family: var(--font-primary);
}

.modal-close-btn {
    background: #fff;
    color: #000;
    border: 2px solid #b97272;
    width: 32px;
    height: 32px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-primary);
}

.modal-inner {
    padding: 20px;
    background: #000;
    color: var(--text-secondary);
    font-family: var(--font-secondary);
}

.modal-inner p {
    font-family: var(--font-secondary);
    color: var(--text-secondary);
    font-size: 20px !important;
    line-height: 1.4;
}

.modal-inner iframe {
    width: 100%;
    border: 0;
}

.support-modal-inner {
    min-height: 500px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 10px;
}

.feed-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px 2px 10px;
    min-height: 146px;
}

.feed-item {
    flex: 0 0 auto;
    width: 130px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.feed-thumb {
    width: 130px;
    height: 130px;
    object-fit: cover;
    image-rendering: pixelated;
    border: 2px solid transparent;
    border-image: linear-gradient(90deg, #4a1515, #8B3A3A, #a84d6b, #8B3A3A, #4a1515) 1;
    background: #050505;
}

.feed-meta {
    font-size: 11px;
    color: var(--text-secondary);
    font-family: var(--font-secondary);
    line-height: 1.2;
}

.feed-preview-inner {
    display: flex;
    justify-content: center;
    align-items: center;
}

#feedPreviewImage {
    width: min(88vw, 700px);
    max-height: 72vh;
    object-fit: contain;
    image-rendering: pixelated;
}

.contents-item {
    padding: 12px;
    font-size: 13px;
    border-bottom: 1px solid #79434a;
    cursor: pointer;
    color: var(--text-secondary) !important;
    text-shadow: 1px 1px 0 #aaa;
    font-family: var(--font-secondary);
    position: relative;
    overflow: hidden;
}

.contents-item pixel-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contents-item:hover pixel-canvas {
    opacity: 1;
}

.contents-item:hover {
    background: #1a1a2a;
    color: #fff !important;
}

/* ================= BOTTOM PANEL ================= */
.bottom-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    background: #050505;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    overflow: hidden;
}

.page-indicator {
    display: none;
    justify-content: center;
    gap: 0;
    align-items: center;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: inset 1px 1px 0 #000000, inset -1px -1px 0 #dfdfdf;
    padding: 2px;
    height: 20px;
}

.dot {
    width: 12px;
    height: 14px;
    background: #c0c0c0;
    border: 1px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    margin: 0 1px;
    transition: none;
    cursor: pointer;
}

.dot.active {
    width: 12px;
    background: #000080;
    border-color: #000040 #0000a0 #0000a0 #000040;
    position: relative;
}

.dot.active::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: repeating-linear-gradient(90deg,
            #000080 0px,
            #000080 2px,
            #0000a0 2px,
            #0000a0 4px);
}

.dot:hover {
    background: #a0a0a0;
}

.dot.active:hover {
    background: #000080;
}

/* ================= АДАПТИВНОСТЬ (МОБИЛЬНЫЕ) ================= */
@media (max-width: 768px) {
    :root {
        --top-panel-h: 50px;
    }

    .top-panel {
        height: 50px;
        padding: 0 12px;
    }

    .panel-views {
        font-size: 14px;
    }

    .panel-spacer {
        width: 40px;
    }

    .panel-btn {
        font-size: 0.7rem;
    }

    .panel-close img {
        width: 28px;
        height: 28px;
    }

    .bottom-panel {
        height: 35px;
    }

    .page-indicator {
        height: 16px;
        padding: 1px;
    }

    .dot {
        width: 10px;
        height: 12px;
        margin: 0 1px;
    }

    .dot.active {
        width: 10px;
    }

    /* Мобильные: арт‑блок 60%, архив 20% */
    .art-archive-row {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin: 8px 0;
        padding: 0 8px;
    }

    .art-block {
        flex: 0 0 60%;
        aspect-ratio: 1/1;
        background: #000;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .art-block img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        image-rendering: pixelated;
    }

    .archive-block {
        flex: 0 0 18%;
        aspect-ratio: 1/1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        gap: 4px;
    }

    .archive-img {
        width: 35px;
        height: 35px;
    }

    .archive-label {
        color: var(--text-primary);
        font-size: 16px;
        text-transform: uppercase;
    }

    /* Paint — слева */
    .page1-controls-row {
        display: block;
        width: 100%;
    }

    .paint-row {
        display: flex;
        justify-content: flex-start;
        margin-top: 8px;
        padding-left: 30px;
    }

    .paint-cell {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }

    .paint-trigger-img {
        width: 48px;
        height: 48px;
    }

    .control-label {
        font-size: 22px;
    }

    /* Mood — справа */
    .bottom-row {
        display: flex;
        justify-content: flex-end;
        margin-top: 10px;
        padding-right: 15px;
    }

    .bottom-cell {
        display: flex;
        justify-content: flex-end;
    }

    .mood-img-large {
        width: 48px;
        height: 48px;
    }

    .mx-narrow-image {
        width: 100%;
        aspect-ratio: 1016 / 379;
    }

    .ticker {
        font-size: 20px;
    }

    .ticker {
        animation-duration: 180s;
    }

    .hashtag {
        font-size: 20px;
    }

    .x-btn-img {
        width: 40px;
    }

    .universal-btn {
        background: #565656 !important;
        color: inherit;
    }

    .universal-btn .btn-inner {
        background: #fff !important;
        border-color: #a0a0a0 !important;
    }

    .universal-btn .btn-inner span {
        color: #000 !important;
    }

    .sound-layout {
        justify-content: center;
        gap: 24px;
        padding: 8px 0 16px;
    }

    .text-synth-embedded {
        width: 100%;
        gap: 10px;
    }

    .sound-layout .styler-input {
        min-height: 42px;
        font-size: 20px;
    }

    .modal-content {
        max-width: 100%;
        width: 100%;
        margin: 0;
        border-radius: 0;
    }

    .feed-item,
    .feed-thumb {
        width: 104px;
        height: 104px;
    }

    .feed-meta {
        font-size: 10px;
    }

    .support-modal-inner {
        min-height: 70vh;
        max-height: 80vh;
        padding: 5px;
    }

    .support-modal-inner iframe {
        min-height: 65vh;
    }

    .pinterest-nav {
        gap: 10px;
    }

    .pinterest-nav-btn {
        padding: 8px 12px;
        font-size: 16px;
    }

    .pinterest-widget-container {
        max-width: 280px;
    }
}

/* GSAP ScrollTrigger scroller */
.journal-wrapper {
    height: 100vh;
    overflow-y: scroll;
    scroll-behavior: smooth;
}

.journal-page {
    height: 100vh;
    display: flex;
    flex-direction: column;
}