        :root {
            --sky-top: #7fc9f0;
            --sky-bottom: #ffe4a0;
            --grass: #8fce5c;
            --grass-dark: #5fa838;
            --wood: #96693d;
            --wood-dark: #6e4a29;
            --parchment: #fdf3d8;
            --parchment-dark: #f2dfae;
            --soil: #8a6033;
            --soil-dark: #5f4021;
            --leaf: #64b544;
            --leaf-dark: #3f8a29;
            --gold: #f5b93c;
            --gold-dark: #d3941a;
            --red: #e3634a;
            --red-dark: #b9432d;
            --purple: #a074d6;
            --purple-dark: #7047a8;
            --ink: #5a3d22;
        }

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

        html {
            max-width: 100%;
        }
        html, body {
            /* Три захода подряд (16.09.2026) через overflow-x:hidden на html/body ломали
               колесо мыши на ПК по-разному — overflow превращает элемент в отдельный
               скролл-контейнер и конфликтует с тем, как браузер маршрутизирует wheel/
               scroll-события. Изначальная жалоба ("экран можно утащить пальцем вбок")
               была про touch-жест на телефоне, а не про мышь — для него есть отдельное,
               куда более безопасное свойство: overscroll-behavior-x гасит именно
               "растягивание"/bounce за край при драге, не трогая обычную прокрутку и не
               создавая новый скролл-контейнер. overflow-x здесь больше не трогаем.
               overscroll-behavior-y:none уже стоял раньше (против того же на вертикали). */
            overscroll-behavior-x: none;
            overscroll-behavior-y: none;
        }
        body {
            font-family: 'Baloo 2', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            color: var(--ink);
            min-height: 100vh;
            width: 100%;
            padding: calc(14px + max(env(safe-area-inset-top, 0px), var(--tg-safe-top, 0px))) 12px calc(24px + 70px + env(safe-area-inset-bottom, 0px));
            position: relative;
            /* Долгий тап по странице раньше вызывал системную лупу выделения текста iOS —
               отключаем выделение/колл-аут глобально, кроме реальных полей ввода (см. ниже). */
            -webkit-user-select: none;
            user-select: none;
            -webkit-touch-callout: none;
        }
        input, textarea, [contenteditable="true"] {
            -webkit-user-select: text;
            user-select: text;
            -webkit-touch-callout: default;
        }

        /* Задний фон вынесен из `background-attachment: fixed` на body в отдельный
           position:fixed элемент — на iOS/WKWebView (в т.ч. внутри Telegram) фон с
           background-attachment:fixed известно дёргается/съезжает при скролле и резиновом
           оттяге, а настоящий position:fixed элемент держится на месте без глюков. */
        .bg-fixed {
            position: fixed;
            inset: 0;
            z-index: 0;
            pointer-events: none;
            background:
                radial-gradient(circle 90px at calc(100% - 0px) 0px, #fff6c9 0%, #ffe27a 55%, rgba(255,226,122,0) 75%),
                linear-gradient(to bottom, var(--sky-top) 0%, var(--sky-bottom) 42%, var(--grass) 43%, var(--grass-dark) 100%);
        }

        /* ─── Плывущие облака ─── */
        .cloud {
            position: fixed;
            top: 40px;
            font-size: 38px;
            opacity: 0.55;
            filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05));
            pointer-events: none;
            z-index: 0;
            animation: drift linear infinite;
        }

        @keyframes drift {
            from { transform: translateX(-60px); }
            to { transform: translateX(calc(100vw + 60px)); }
        }

        .container { max-width: 600px; margin: 0 auto; position: relative; z-index: 1; }

        /* ─── Летающие частицы (листья/пыльца) ─── */
        .particles {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            overflow: hidden;
            pointer-events: none;
            z-index: 0;
        }

        .particle {
            position: absolute;
            top: -30px;
            font-size: 16px;
            opacity: 0.75;
            animation: fall linear infinite;
            will-change: transform;
        }

        @keyframes fall {
            0% { transform: translateY(-30px) translateX(0) rotate(0deg); opacity: 0; }
            10% { opacity: 0.8; }
            90% { opacity: 0.8; }
            100% { transform: translateY(110vh) translateX(30px) rotate(360deg); opacity: 0; }
        }

        /* ─── Top bar with dropdown menu ─── */
        .topbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            margin-bottom: 12px;
        }

        .menu-btn { display: none; }
        .back-btn {
            display: none;
            background: linear-gradient(180deg, var(--wood) 0%, var(--wood-dark) 100%);
            border: none;
            color: #fff8e0;
            height: 36px;
            border-radius: 10px;
            box-shadow: 0 3px 0 var(--wood-dark);
            font-size: 13px;
            font-weight: 800;
            cursor: pointer;
            flex-shrink: 0;
            padding: 0 12px;
            font-family: inherit;
        }
        .back-btn.visible { display: flex; align-items: center; gap: 4px; }
        .back-btn:active { transform: translateY(2px); box-shadow: none; }

        .topbar-title {
            flex: 1;
            text-align: center;
            font-size: 18px;
            font-weight: 800;
            color: #fff;
            text-shadow: 0 2px 0 var(--wood-dark), 0 3px 6px rgba(0,0,0,0.25);
            letter-spacing: 0.3px;
        }

        .topbar-pills { display: flex; gap: 6px; flex-shrink: 0; }
        .pill {
            background: linear-gradient(180deg, var(--parchment) 0%, var(--parchment-dark) 100%);
            border: 2px solid var(--wood);
            border-radius: 10px;
            box-shadow: 0 2px 0 var(--wood-dark);
            padding: 4px 8px;
            font-size: 13px;
            font-weight: 800;
            white-space: nowrap;
        }
        .pill-pop { animation: pillPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
        @keyframes pillPop {
            0% { transform: scale(1); }
            40% { transform: scale(1.22); background: linear-gradient(180deg, #fff3c4 0%, #ffd97a 100%); }
            100% { transform: scale(1); }
        }
        @media (prefers-reduced-motion: reduce) {
            .pill-pop { animation: none; }
        }

        /* ─── More panel (slide-up sheet) ─── */
        @keyframes slideUp {
            from { transform: translateY(100%); }
            to   { transform: translateY(0); }
        }
        .more-overlay {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(30,18,6,0.5);
            z-index: 400;
        }
        .more-overlay.active { display: block; }
        .more-panel {
            display: none;
            position: fixed;
            bottom: 0; left: 0; right: 0;
            background: linear-gradient(180deg, var(--parchment) 0%, var(--parchment-dark) 100%);
            border-top: 3px solid var(--wood);
            border-radius: 20px 20px 0 0;
            padding: 16px 16px 8px;
            z-index: 401;
        }
        .more-panel.active {
            display: block;
            animation: slideUp 0.22s cubic-bezier(.32,1,.46,1) forwards;
        }
        .more-panel-title {
            text-align: center;
            font-size: 13px;
            font-weight: 700;
            color: var(--wood);
            margin-bottom: 12px;
            opacity: 0.7;
        }
        .more-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
            margin-bottom: 8px;
        }
        .more-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 5px;
            padding: 12px 6px;
            background: rgba(150,105,61,0.08);
            border-radius: 14px;
            cursor: pointer;
            border: 1.5px solid rgba(150,105,61,0.15);
            font-family: inherit;
            color: var(--ink);
        }
        .more-item:active { background: rgba(150,105,61,0.2); }
        .more-item-icon { font-size: 26px; }
        .more-item-label { font-size: 13px; font-weight: 700; }

        .hero-banner {
            position: relative;
            height: 130px;
            border-radius: 18px;
            overflow: hidden;
            margin-bottom: 14px;
            border: 3px solid var(--wood);
            box-shadow: 0 5px 0 var(--wood-dark), 0 8px 16px rgba(0,0,0,0.2);
            background-size: cover;
            background-position: center;
            transition: background-image 0.6s ease;
        }
        .hero-banner::after {
            content: "";
            position: absolute;
            inset: 0;
            background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.45) 100%);
        }
        .hero-caption {
            position: absolute;
            left: 14px; bottom: 10px;
            color: #fff;
            font-weight: 800;
            font-size: 13px;
            text-shadow: 0 2px 4px rgba(0,0,0,0.6);
            z-index: 2;
        }

        .weather-banner {
            display: none;
            text-align: center;
            background: linear-gradient(180deg, #b586f0 0%, var(--purple) 100%);
            color: #fff;
            font-weight: 700;
            font-size: 13px;
            padding: 8px 10px;
            border-radius: 14px;
            border: 2px solid var(--purple-dark);
            box-shadow: 0 3px 0 var(--purple-dark);
            margin-bottom: 14px;
        }
        .weather-banner.active { display: block; }
        /* Дебафы (засуха/заморозки) — тёплый/холодный оттенок вместо фиолетового "бафа",
           чтобы с первого взгляда было видно: это не подарок, а неприятность. */
        .weather-banner.debuff {
            background: linear-gradient(180deg, #f0a586 0%, #c2410c 100%);
            border-color: #7c2d12;
            box-shadow: 0 3px 0 #7c2d12;
        }

        .stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
            gap: 8px;
            margin-bottom: 16px;
        }

        .stat-box {
            background: linear-gradient(180deg, var(--parchment) 0%, var(--parchment-dark) 100%);
            border: 2px solid var(--wood);
            border-radius: 14px;
            box-shadow: 0 3px 0 var(--wood-dark);
            padding: 8px 4px;
            text-align: center;
        }

        .stat-value { font-size: 15px; font-weight: 800; }
        .stat-label { font-size: 12px; opacity: 0.75; font-weight: 500; }

        .xp-bar-wrap {
            background: linear-gradient(180deg, var(--parchment) 0%, var(--parchment-dark) 100%);
            border: 2px solid var(--wood);
            border-radius: 14px;
            box-shadow: 0 3px 0 var(--wood-dark);
            padding: 10px 12px;
            margin-bottom: 16px;
        }
        .xp-bar-head {
            display: flex;
            justify-content: space-between;
            font-size: 13px;
            font-weight: 700;
            margin-bottom: 6px;
            opacity: 0.85;
        }
        .xp-bar-track {
            height: 10px;
            background: rgba(90, 61, 34, 0.15);
            border-radius: 6px;
            overflow: hidden;
        }
        .xp-bar-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--purple) 0%, #c9a0f0 100%);
            border-radius: 6px;
            transition: width 0.5s ease;
            box-shadow: 0 0 8px rgba(160, 116, 214, 0.6);
        }

        .section {
            background: linear-gradient(180deg, var(--parchment) 0%, var(--parchment-dark) 100%);
            border: 3px solid var(--wood);
            border-radius: 20px;
            box-shadow: 0 5px 0 var(--wood-dark), 0 8px 16px rgba(0,0,0,0.15);
            padding: 16px 14px 18px;
            margin-bottom: 18px;
        }

        /* Фото грядки владельца — теперь фон СЕТКИ плиток (.plots), а не всей карточки
           (той, что заодно включала кнопки "Собрать всё" и т.д.): картинка растягивается
           точно под область тайлов, так что её деревянная рамка ложится по краю сетки,
           а не обрезается где попало на высокой карточке. Кнопки под сеткой остаются на
           обычном пергаменте секции — не участвуют в "фото-рамке". */
        .section-plots .plots {
            background-image:
                linear-gradient(180deg, rgba(255,248,224,0.28) 0%, rgba(255,248,224,0.2) 100%),
                url('img/farm_plots_bg.jpg');
            background-size: cover;
            background-position: center;
            padding: 8% 9%;
            border-radius: 10px;
            border: 2px solid var(--wood-dark);
            /* Высота сетки фиксирована — иначе при разном числе грядок картинка кроилась
               по-разному (то ровно по рамке, то с обрезанным/повторяющимся куском земли
               без рамки). С фикс-высотой кроп всегда один и тот же, подогнанный один раз
               под рамку; если грядок больше, чем видно — прокрутка внутри рамки. */
            max-height: 480px;
            overflow-y: auto;
        }

        /* Сами плитки — полупрозрачные "клетки" внутри изгороди вместо непрозрачных
           карточек поверх неё, так грядки читаются как разметка одной большой грядки.
           Размер/пропорции — как были у обычных плиток (Теплица), это только цвет/фон. */
        .section-plots .plot,
        .section-plots div.plot {
            background: rgba(58, 33, 18, 0.4);
            border: 1px solid rgba(255,255,255,0.3);
            box-shadow: none;
        }
        /* Только у модалки "Грядки" (не у Теплицы) — 2 в ряд и повыше, чтобы поместиться
           в узкую портретную рамку фона без наложения плиток друг на друга. */
        .section-plots .plots.plots-modal > .plot,
        .section-plots .plots.plots-modal > div.plot {
            flex: 1 1 calc(50% - 5px);
            min-width: calc(50% - 5px);
            min-height: 110px;
            justify-content: center;
        }
        .section-plots .plot::after { display: none; }
        .section-plots .plot.ready { background: rgba(217, 155, 15, 0.55); }
        .section-plots .plot.growing { background: rgba(33, 82, 38, 0.42); }
        .section-plots .plot.empty { background: rgba(0, 0, 0, 0.18); }
        .section-plots .plot .plot-name,
        .section-plots .plot .plot-timer,
        .section-plots .plot .plot-emoji {
            text-shadow: 0 1px 3px rgba(0,0,0,0.85);
        }
        .section-plots .plot.selected {
            outline: 3px solid #fff8e0;
            outline-offset: -3px;
        }

        /* Панель управления выбранной грядкой — вынесена из тесной плитки под общую
           сетку: тут кнопки полноразмерные, ничего не жмётся. */
        .plot-action-panel {
            background: rgba(255, 248, 224, 0.95);
            border: 2px solid var(--wood);
            border-radius: 14px;
            padding: 10px;
            margin-top: 12px;
        }
        .plot-action-panel-head {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-weight: 800;
            font-size: 13px;
            color: var(--ink);
            margin-bottom: 8px;
        }
        .plot-action-panel-close {
            background: var(--red);
            color: #fff;
            border: none;
            border-radius: 50%;
            width: 24px; height: 24px;
            font-size: 15px;
            line-height: 1;
            cursor: pointer;
        }
        .plot-action-panel-buttons {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 8px;
        }

        .section-title {
            display: inline-block;
            background: var(--wood);
            color: #fff8e0;
            font-weight: 800;
            font-size: 15px;
            padding: 6px 16px;
            border-radius: 10px;
            box-shadow: 0 2px 0 var(--wood-dark);
            margin-bottom: 14px;
        }

        /* Подзаголовок внутри объединённой секции (напр. "Двор" + "Амулеты" в одной
           карточке) — легче основного .section-title, без фона, просто разделитель. */
        .subsection-label {
            font-weight: 800;
            font-size: 13px;
            color: var(--wood-dark);
            margin: 12px 2px 8px;
        }
        .subsection-label:first-of-type { margin-top: 0; }
        .subsection-label span {
            font-size: 11px;
            opacity: .7;
            font-weight: 400;
        }

        /* Сворачиваемая секция (напр. Хлев на Ферме — дублирует отдельную вкладку) —
           тот же .section-title, но как <summary> с кликом и своей стрелкой вместо
           нативного треугольника браузера. */
        details.section > summary.section-title {
            cursor: pointer;
            list-style: none;
            user-select: none;
        }
        details.section > summary.section-title::-webkit-details-marker { display: none; }
        details.section > summary.section-title::after {
            content: '▾';
            float: right;
            margin-left: 8px;
            transition: transform 0.2s;
        }
        details.section[open] > summary.section-title::after {
            transform: rotate(180deg);
        }

        .plots {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }
        /* flex-basis ~третья часть ширины с учётом отступов; flex-grow позволяет
           последней неполной строке растянуться и заполнить ряд ровно, без дыр */
        .plots > .plot, .plots > div.plot {
            flex: 1 1 calc(33.333% - 7px);
            min-width: calc(33.333% - 7px);
        }

        .plot {
            background: linear-gradient(180deg, var(--soil) 0%, var(--soil-dark) 100%);
            border: 2px solid var(--soil-dark);
            border-radius: 14px;
            text-align: center;
            cursor: pointer;
            transition: transform 0.15s;
            padding: 12px 4px 10px;
            position: relative;
            color: #fff;
            display: flex;
            flex-direction: column;
            align-items: center;
            box-shadow: 0 3px 0 rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.15);
        }
        /* Лёгкая "земляная" зернистость поверх плоского градиента — крошечные тёмные
           и светлые крапинки вместо однотонной заливки, чтобы плитка читалась как
           грунт, а не просто цветной прямоугольник. Чисто CSS, без новых картинок. */
        .plot::after {
            content: '';
            position: absolute; inset: 0;
            border-radius: 12px;
            pointer-events: none;
            background-image:
                radial-gradient(circle at 15% 20%, rgba(0,0,0,0.12) 0 3px, transparent 3px),
                radial-gradient(circle at 70% 15%, rgba(255,255,255,0.10) 0 2px, transparent 2px),
                radial-gradient(circle at 40% 70%, rgba(0,0,0,0.10) 0 3px, transparent 3px),
                radial-gradient(circle at 85% 65%, rgba(0,0,0,0.12) 0 2px, transparent 2px),
                radial-gradient(circle at 25% 90%, rgba(255,255,255,0.08) 0 2px, transparent 2px),
                radial-gradient(circle at 60% 40%, rgba(0,0,0,0.08) 0 2px, transparent 2px);
        }

        .plot:active { transform: scale(0.94); }

        /* Компактные плитки — мини-хлев внутри вкладки "Ферма" */
        .plots-mini { grid-template-columns: repeat(4, 1fr); }
        .plots-mini .plot { padding: 8px 2px 6px; aspect-ratio: 1; justify-content: center; }
        .plots-mini .plot-emoji { font-size: 22px; }
        .plots-mini .plot-name { font-size: 13px; margin-top: 2px; }
        .plots-mini .plot-timer { font-size: 8px; }

        .plot.empty {
            background: repeating-linear-gradient(45deg, var(--soil) 0 10px, var(--soil-dark) 10px 20px);
            border-style: dashed;
            border-color: rgba(255,255,255,0.4);
        }
        .plot.empty::after { display: none; }

        .plot.growing {
            background: linear-gradient(180deg, var(--grass) 0%, var(--grass-dark) 100%);
            border-color: var(--grass-dark);
        }
        /* На растущей грядке крапинки читаются как травинки — светлее и гуще. */
        .plot.growing::after {
            background-image:
                radial-gradient(circle at 20% 25%, rgba(255,255,255,0.16) 0 2px, transparent 2px),
                radial-gradient(circle at 75% 20%, rgba(255,255,255,0.14) 0 2px, transparent 2px),
                radial-gradient(circle at 45% 75%, rgba(0,0,0,0.10) 0 2px, transparent 2px),
                radial-gradient(circle at 80% 70%, rgba(255,255,255,0.14) 0 2px, transparent 2px),
                radial-gradient(circle at 30% 85%, rgba(255,255,255,0.12) 0 2px, transparent 2px),
                radial-gradient(circle at 60% 45%, rgba(0,0,0,0.08) 0 2px, transparent 2px);
        }

        .plot.ready {
            background: linear-gradient(180deg, #ffe27a 0%, var(--gold) 100%);
            border-color: var(--gold-dark);
            color: #fff;
            animation: glow 1.4s infinite;
        }
        /* На готовой грядке крапинки — тёплые блики, будто урожай подсвечен солнцем. */
        .plot.ready::after {
            background-image:
                radial-gradient(circle at 20% 22%, rgba(255,255,255,0.35) 0 3px, transparent 3px),
                radial-gradient(circle at 78% 18%, rgba(255,255,255,0.25) 0 2px, transparent 2px),
                radial-gradient(circle at 42% 78%, rgba(255,255,255,0.20) 0 2px, transparent 2px),
                radial-gradient(circle at 85% 68%, rgba(255,255,255,0.28) 0 2px, transparent 2px),
                radial-gradient(circle at 22% 88%, rgba(255,255,255,0.18) 0 2px, transparent 2px);
        }
        .plot.ready .plot-name, .plot.ready .plot-timer {
            text-shadow: 0 1px 2px rgba(0,0,0,0.8);
        }

        @keyframes glow {
            0%, 100% { box-shadow: 0 0 0 0 rgba(245, 185, 60, 0.6); }
            50% { box-shadow: 0 0 0 8px rgba(245, 185, 60, 0); }
        }

        @keyframes float-up {
            0% { transform: translateY(0) scale(1); opacity: 1; }
            100% { transform: translateY(-80px) scale(0.8); opacity: 0; }
        }

        @keyframes breathe {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.05); }
        }

        @keyframes shimmer {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.7; }
        }

        @keyframes bounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-8px); }
        }

        .plot.growing { animation: breathe 2.5s infinite; }
        .plot.ready { animation: glow 1.4s infinite, bounce 0.8s infinite; }

        .plot.has-img {
            background-size: cover !important;
            background-position: center !important;
            background-repeat: no-repeat !important;
        }
        .plot.has-img::before {
            content: '';
            position: absolute; inset: 0;
            background: linear-gradient(180deg, rgba(0,0,0,0.22) 0%, rgba(0,0,0,0.05) 28%, rgba(0,0,0,0.35) 65%, rgba(0,0,0,0.8) 100%);
            border-radius: 12px;
            pointer-events: none;
        }
        .plot.has-img .plot-emoji { display: none; }
        .plot.has-img .plot-name, .plot.has-img .plot-timer {
            position: relative; z-index: 1;
            text-shadow: 0 1px 2px rgba(0,0,0,0.8);
        }
        .plot.has-img .plot-name { font-weight: 800; }
        .stat-value { animation: shimmer 1.5s infinite; }

        .floating-number {
            position: fixed;
            font-weight: 800;
            font-size: 20px;
            pointer-events: none;
            z-index: 999;
            animation: float-up 2s ease-out forwards;
        }

        /* ─── Toasts ─── */
        .toast-stack {
            position: fixed;
            top: 14px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 2000;
            display: flex;
            flex-direction: column;
            gap: 8px;
            width: min(340px, calc(100vw - 24px));
            pointer-events: none;
        }
        .toast {
            background: linear-gradient(180deg, #fff8e6 0%, #fff1d0 100%);
            border: 2px solid var(--wood);
            border-radius: 14px;
            box-shadow: 0 4px 0 var(--wood-dark), 0 8px 16px rgba(0,0,0,0.2);
            padding: 10px 14px;
            font-size: 13px;
            font-weight: 700;
            color: var(--ink);
            display: flex;
            align-items: center;
            gap: 8px;
            animation: toastIn 0.25s cubic-bezier(.34,1.56,.64,1) forwards, toastOut 0.25s ease-in forwards 2.6s;
            pointer-events: auto;
        }
        .toast.error { border-color: var(--red); background: linear-gradient(180deg, #fff0ed 0%, #ffe0d8 100%); }
        .toast.success { border-color: var(--leaf-dark); background: linear-gradient(180deg, #f0ffe8 0%, #e2ffd4 100%); }
        .toast-icon { font-size: 18px; flex-shrink: 0; }
        @keyframes toastIn {
            from { transform: translateY(-16px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }
        @keyframes toastOut {
            from { transform: translateY(0); opacity: 1; }
            to { transform: translateY(-16px); opacity: 0; }
        }

        /* ─── Skeleton loaders ─── */
        .skeleton { position: relative; overflow: hidden; background: rgba(150,105,61,0.12); border-radius: 14px; }
        .skeleton::after {
            content: '';
            position: absolute; inset: 0;
            background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.5) 50%, transparent 100%);
            animation: skeletonShine 1.3s infinite;
        }
        @keyframes skeletonShine {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }
        .skel-tile { height: 90px; margin-bottom: 10px; }
        .skel-line { height: 14px; margin-bottom: 8px; border-radius: 8px; }
        .skel-row { height: 56px; margin-bottom: 10px; }

        .plot-emoji { font-size: 34px; line-height: 1.1; text-shadow: none; }
        /* Стадия роста (картинка) вместо эмодзи — те же размеры/отступ, чтобы карточка
           не прыгала при переключении между культурами с картинками и без. */
        .plot-stage-img { width: 44px; height: 44px; object-fit: contain; position: relative; z-index: 1;
            filter: drop-shadow(0 2px 3px rgba(0,0,0,0.35)); }
        .plot-name { font-size: 13px; font-weight: 700; margin-top: 4px; }
        .plot-timer { font-size: 12px; opacity: 0.9; margin-top: 2px; }
        .plot-progress {
            width: 100%;
            height: 5px;
            background: rgba(0,0,0,0.25);
            border-radius: 3px;
            margin-top: 6px;
            overflow: hidden;
        }
        .plot-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #ffe27a 0%, var(--gold) 100%);
            border-radius: 3px;
            transition: width 1s linear;
        }
        .plot.has-img .plot-progress { background: rgba(0,0,0,0.4); }

        /* Настроение животных (тамагочи) — маленький бейдж в углу тайла, показывается
           только когда есть за что переживать (mood < 70), чтобы не засорять весёлых. */
        .mood-badge {
            position: absolute;
            top: 4px;
            right: 4px;
            font-size: 13px;
            background: rgba(0,0,0,0.45);
            border-radius: 50%;
            width: 20px;
            height: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
        }

        /* Амулет на грядке (позиционный декор) — та же плашка, что у mood-badge, но
           top-left, чтобы не конфликтовать с будущими правоугловыми индикаторами. */
        .charm-badge {
            position: absolute;
            top: 4px;
            left: 4px;
            font-size: 14px;
            background: rgba(109, 40, 217, 0.75);
            border-radius: 50%;
            width: 22px;
            height: 22px;
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
            cursor: pointer;
            z-index: 2;
        }

        .plot.expand-slot, .plot.barn-expand {
            background: transparent;
            border: 2px dashed var(--gold-dark);
            color: var(--ink);
        }

        .actions {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
            margin-top: 14px;
        }

        .top-actions {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
            margin-bottom: 16px;
        }

        .top-actions .button {
            padding: 11px 6px;
            font-size: 13px;
        }

        .button {
            border: none;
            color: #fff;
            padding: 13px 8px;
            border-radius: 14px;
            font-family: inherit;
            font-size: 14px;
            font-weight: 700;
            cursor: pointer;
            background: linear-gradient(180deg, var(--leaf) 0%, var(--leaf-dark) 100%);
            box-shadow: 0 4px 0 #2c661b;
            transition: transform 0.08s, box-shadow 0.08s;
        }

        .button:active {
            transform: translateY(3px);
            box-shadow: 0 1px 0 #2c661b;
        }

        .button.secondary {
            background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
            box-shadow: 0 4px 0 #a8730f;
        }
        .button.secondary:active { box-shadow: 0 1px 0 #a8730f; }

        .button.purple {
            background: linear-gradient(180deg, var(--purple) 0%, var(--purple-dark) 100%);
            box-shadow: 0 4px 0 #4f3178;
        }
        .button.purple:active { box-shadow: 0 1px 0 #4f3178; }

        .button:disabled {
            opacity: 0.45;
            cursor: not-allowed;
            transform: none !important;
        }

        .modal {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(50, 30, 10, 0.55);
            z-index: 1000;
            align-items: center;
            justify-content: center;
            padding: 20px;
            opacity: 0;
            transition: opacity 0.2s ease;
        }

        .modal.active { display: flex; opacity: 1; }

        .modal-content {
            background: linear-gradient(180deg, var(--parchment) 0%, var(--parchment-dark) 100%);
            border: 3px solid var(--wood);
            border-radius: 22px;
            box-shadow: 0 8px 0 var(--wood-dark), 0 14px 30px rgba(0,0,0,0.35);
            padding: 20px;
            max-width: 480px;
            width: 100%;
            max-height: 80vh;
            overflow-y: auto;
            color: var(--ink);
            transform: scale(0.9) translateY(20px);
            transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .modal.active .modal-content {
            transform: scale(1) translateY(0);
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }

        .modal-header h2 { font-size: 20px; font-weight: 800; }

        .close-btn {
            background: var(--red);
            border: none;
            color: #fff;
            width: 32px; height: 32px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 18px;
            box-shadow: 0 3px 0 var(--red-dark);
            font-weight: 800;
        }
        .close-btn:active { transform: translateY(2px); box-shadow: none; }

        .seed-item, .animal-pick {
            background: #fff8e6;
            border: 2px solid var(--parchment-dark);
            padding: 12px;
            border-radius: 14px;
            margin-bottom: 10px;
            cursor: pointer;
            transition: transform 0.1s;
        }

        .seed-item:active, .animal-pick:active { transform: scale(0.97); }
        .animal-pick.disabled { opacity: 0.4; pointer-events: none; }

        .seed-info { display: flex; justify-content: space-between; align-items: center; }
        .seed-left { display: flex; align-items: center; gap: 12px; }
        .seed-emoji { font-size: 32px; }
        .seed-name { font-size: 15px; font-weight: 700; }
        .seed-amount { font-size: 12px; opacity: 0.75; }

        .loading, .error {
            text-align: center;
            padding: 50px 16px;
            font-size: 16px;
            font-weight: 700;
            color: var(--ink);
        }

        .error {
            background: #ffd9d0;
            border: 2px solid var(--red);
            border-radius: 14px;
        }

        .inventory {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
        }

        .inventory-item {
            background: #fff8e6;
            border: 2px solid var(--parchment-dark);
            padding: 10px 4px;
            border-radius: 12px;
            text-align: center;
        }

        .inventory-emoji { font-size: 24px; }
        .inventory-name { font-size: 12px; margin: 2px 0; font-weight: 600; }
        .inventory-amount { font-size: 12px; font-weight: 800; }

        /* ─── Компактный список инвентаря ─── */
        .inv-list {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }
        .inv-row {
            display: flex;
            align-items: center;
            gap: 10px;
            background: #fff8e6;
            border: 2px solid var(--parchment-dark);
            border-radius: 12px;
            padding: 8px 12px;
        }
        .inv-row-emoji { font-size: 22px; flex-shrink: 0; }
        .inv-row-info { flex: 1; min-width: 0; }
        .inv-row-name { font-size: 13px; font-weight: 700; }
        .inv-row-amount { font-size: 13px; opacity: 0.65; font-weight: 600; }
        .inv-row-value { font-size: 12px; font-weight: 800; color: var(--gold-dark); flex-shrink: 0; }
        .inv-group-total {
            text-align: right;
            font-size: 12px;
            font-weight: 800;
            margin: 6px 2px 14px;
            opacity: 0.85;
        }
        .inv-tabs {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 6px;
            margin-bottom: 14px;
        }
        .inv-capacity {
            background: rgba(0,0,0,0.15);
            border-radius: 12px;
            padding: 8px 10px;
            margin-bottom: 10px;
        }
        .inv-capacity-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 12px;
            font-weight: 700;
            margin-bottom: 5px;
        }
        .inv-capacity-bar {
            width: 100%;
            height: 5px;
            background: rgba(0,0,0,0.25);
            border-radius: 3px;
            overflow: hidden;
        }
        .inv-capacity-fill {
            height: 100%;
            background: linear-gradient(90deg, #ffe27a 0%, var(--gold) 100%);
            border-radius: 3px;
            transition: width 0.3s ease;
        }
        .inv-capacity.full .inv-capacity-fill { background: linear-gradient(90deg, #f0a586 0%, #c2410c 100%); }
        .inv-expand-btn {
            background: var(--gold);
            border: none;
            border-radius: 8px;
            padding: 4px 8px;
            font-size: 13px;
            font-weight: 800;
            color: #4a2c00;
            cursor: pointer;
        }
        .inv-tab {
            background: linear-gradient(180deg, var(--parchment) 0%, var(--parchment-dark) 100%);
            border: 2px solid var(--wood);
            border-radius: 12px;
            box-shadow: 0 3px 0 var(--wood-dark);
            padding: 8px 4px;
            text-align: center;
            cursor: pointer;
            font-size: 13px;
            font-weight: 700;
        }
        .inv-tab.active {
            background: linear-gradient(180deg, var(--leaf) 0%, var(--leaf-dark) 100%);
            color: #fff;
            box-shadow: 0 3px 0 #2c661b;
        }
        .inv-tab-value { font-size: 15px; font-weight: 800; display: block; }

        .shop-item, .order-item, .craft-item, .quest-item, .decor-item {
            background: #fff8e6;
            border: 2px solid var(--parchment-dark);
            padding: 13px;
            border-radius: 14px;
            margin-bottom: 10px;
        }

        .shop-item-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }

        .shop-buy-row {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 6px;
        }

        .shop-buy-btn {
            padding: 8px 4px;
            border-radius: 10px;
            border: none;
            background: linear-gradient(180deg, var(--leaf) 0%, var(--leaf-dark) 100%);
            box-shadow: 0 3px 0 #2c661b;
            color: #fff;
            font-family: inherit;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
        }
        .shop-buy-btn:active { transform: translateY(2px); box-shadow: none; }
        .shop-buy-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

        .order-progress { font-size: 12px; opacity: 0.8; margin-top: 2px; font-weight: 600; }
        .order-progress.insufficient { color: var(--red-dark); }
        .order-reward { font-size: 12px; opacity: 0.9; margin: 8px 0; font-weight: 700; }

        .btn-full {
            width: 100%;
            padding: 10px;
            border-radius: 12px;
            border: none;
            background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
            box-shadow: 0 3px 0 #a8730f;
            color: var(--ink);
            font-family: inherit;
            font-size: 13px;
            font-weight: 800;
            cursor: pointer;
        }
        .btn-full:active { transform: translateY(2px); box-shadow: none; }
        .btn-full:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

        .text-input {
            padding: 10px 12px;
            border-radius: 12px;
            border: 2px solid var(--parchment-dark);
            background: #fff;
            font-family: inherit;
            font-size: 13px;
            font-weight: 700;
            color: var(--ink);
            box-sizing: border-box;
        }
        .text-input:focus { outline: none; border-color: var(--gold-dark); }

        .btn-tab {
            padding: 9px;
            border-radius: 12px;
            border: 2px solid var(--parchment-dark);
            background: #fff8e6;
            font-family: inherit;
            font-size: 12px;
            font-weight: 800;
            color: var(--ink);
            cursor: pointer;
            opacity: 0.6;
        }
        .btn-tab.active { opacity: 1; border-color: var(--gold-dark); background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%); }

        .plot.barn-empty {
            background: repeating-linear-gradient(45deg, var(--soil) 0 10px, var(--soil-dark) 10px 20px);
            border-style: dashed;
            border-color: rgba(255,255,255,0.4);
        }

        .plot.barn-unfed {
            background: linear-gradient(180deg, #ffcf7a 0%, var(--gold-dark) 100%);
        }

        .empty-note {
            text-align: center;
            opacity: 0.6;
            font-weight: 600;
            padding: 10px 0;
            grid-column: 1 / -1;
        }

        /* ─── Views (tabs) ─── */
        .view { display: none; }
        .view.active {
            display: block;
            animation: viewIn 0.28s cubic-bezier(.32,1,.46,1) both;
        }
        @keyframes viewIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        @media (prefers-reduced-motion: reduce) {
            .view.active { animation: none; }
        }

        /* ─── Bottom Navigation ─── */
        /* ─── Нижняя навигация — плавающий полупрозрачный «остров» из пилюль ───
           Раньше сплошная деревянная панель на всю ширину экрана впритык к краю.
           Теперь отступает от края, стеклянный блюр за фоном, каждый пункт — своя
           капсула, активная подсвечена золотом (по мотивам стиля соседнего проекта). */
        .bottom-nav {
            position: fixed;
            bottom: calc(10px + env(safe-area-inset-bottom, 0px));
            left: 12px; right: 12px;
            height: 60px;
            background: rgba(253,243,216,0.68);
            -webkit-backdrop-filter: blur(16px) saturate(1.4);
            backdrop-filter: blur(16px) saturate(1.4);
            border: 2px solid rgba(255,255,255,0.5);
            border-radius: 30px;
            display: flex;
            align-items: stretch;
            gap: 2px;
            padding: 5px;
            z-index: 200;
            box-shadow: 0 8px 24px rgba(90,61,34,0.28), inset 0 1px 0 rgba(255,255,255,0.6);
        }
        .bn-item {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 1px;
            cursor: pointer;
            transition: background 0.18s, transform 0.12s;
            border: none;
            background: transparent;
            border-radius: 22px;
            padding: 4px 2px;
            font-family: inherit;
            color: var(--wood);
            position: relative;
            z-index: 1;
        }
        .bn-item.active {
            background: linear-gradient(180deg, rgba(245,185,60,0.9) 0%, rgba(211,148,26,0.9) 100%);
            color: #fff8e6;
            box-shadow: 0 3px 8px rgba(211,148,26,0.45);
        }
        .bn-item:active { transform: scale(0.93); }
        .bn-icon { font-size: 23px; line-height: 1; }
        .bn-label { font-size: 13px; font-weight: 700; letter-spacing: 0.01em; }
        .bn-badge {
            position: absolute;
            top: 4px; right: calc(50% - 18px);
            background: var(--red);
            color: #fff;
            font-size: 13px;
            font-weight: 800;
            min-width: 16px;
            height: 16px;
            border-radius: 8px;
            display: flex; align-items: center; justify-content: center;
            padding: 0 4px;
            border: 1.5px solid #fff;
            pointer-events: none;
            animation: bnBadgePulse 1.6s ease-in-out infinite;
        }
        @keyframes bnBadgePulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.18); }
        }

        /* ─── Onboarding: tutorial + hints ─── */
        .tutorial-banner-slim {
            background: linear-gradient(135deg, #2d1060 0%, #7c3aed 60%, #a855f7 100%);
            border-radius: 12px;
            padding: 10px 14px;
            margin-bottom: 12px;
            color: #fff;
            font-size: 12px;
            font-weight: 800;
            text-align: center;
            cursor: pointer;
        }
        .tutorial-banner-slim.tutorial-complete {
            background: linear-gradient(135deg, #b45309 0%, #f59e0b 60%, #fbbf24 100%);
        }
        .onboarding-intro { text-align: center; }
        .onboarding-title { font-weight: 800; font-size: 18px; margin-bottom: 6px; }
        .onboarding-sub { font-size: 13px; opacity: 0.85; font-weight: 600; }
        .onboarding-cta { margin-top: 18px; }
        .tutorial-steps { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; text-align: left; }
        .tutorial-step { display: flex; align-items: flex-start; gap: 8px; opacity: 0.6; }
        .tutorial-step.done { opacity: 1; }
        .tutorial-step-emoji { font-size: 18px; line-height: 1.3; }
        .tutorial-step-title { font-weight: 800; font-size: 12px; }
        .tutorial-step-desc { font-size: 13px; opacity: 0.85; font-weight: 600; margin-top: 1px; }

        .starter-pack-banner {
            background: linear-gradient(180deg, #fde68a 0%, #f59e0b 100%);
            border: 3px solid #b45309;
            border-radius: 16px;
            padding: 12px 14px;
            margin-bottom: 12px;
            box-shadow: 0 4px 0 #92400e, 0 8px 16px rgba(0,0,0,0.2);
            text-align: center;
            color: #451a03;
        }
        .starter-pack-banner .spb-title { font-size: 15px; font-weight: 800; }
        .starter-pack-banner .spb-contents { font-size: 12px; margin-top: 4px; opacity: 0.85; }
        .starter-pack-banner .spb-timer { font-size: 13px; font-weight: 700; margin-top: 4px; color: #7c2d12; }
        .starter-pack-banner .spb-btn {
            margin-top: 8px;
            width: 100%;
            border: none;
            border-radius: 10px;
            padding: 10px;
            font-weight: 800;
            font-size: 14px;
            background: linear-gradient(180deg, #fff 0%, #fde68a 100%);
            color: #92400e;
            box-shadow: 0 3px 0 #92400e;
            cursor: pointer;
        }
        .starter-pack-banner .spb-btn:active { transform: translateY(2px); box-shadow: none; }

        .hint-banner {
            display: flex;
            align-items: center;
            gap: 8px;
            background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
            border: 2px solid #d97706;
            border-radius: 12px;
            padding: 10px 12px;
            margin-bottom: 12px;
        }
        .hint-banner-text { flex: 1; font-size: 12px; font-weight: 700; color: #78350f; }
        .hint-banner-close {
            border: none;
            background: none;
            font-size: 18px;
            font-weight: 800;
            color: #78350f;
            cursor: pointer;
            padding: 0 4px;
            line-height: 1;
        }

        /* ─── Home Tiles ─── */
        /* ─── Home tiles (full-bleed image style) ─── */
        .home-tiles {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-bottom: 16px;
        }

        /* ─── Сцена «Двор фермы» — Главная вкладка ───
           Вместо стопки плиток — одна декоративная сцена с кликабельными точками
           поверх (тот же приём, что в дружественном проекте: одна картинка-фон +
           spot'ы по координатам, вместо растущего списка карточек).
           img/home_scene.jpg — готовая иллюстрация (11.09.2026, сгенерирована владельцем,
           водяной знак генератора вычищен клон-штампом, ужата 6МБ→~400КБ под мобильный
           трафик). Лежит ПЕРВЫМ слоем фона, ниже — градиент-заглушка на случай, если
           картинку когда-нибудь уберут (404 на первом слое прозрачный, градиент виден).
           Класс .scene.has-art (уже стоит) прячет CSS-заглушку забора — на реальной
           иллюстрации свой забор нарисован. (Был ещё видео-вариант через <video
           class="scene-video"> — файлов home_scene.webm/mp4 не существовало вообще, на
           части телефонов это висело сломанным плеером со значком ▶ поверх сцены;
           убрали и разметку, и эти правила 16.09.2026.) */
        .scene {
            position: relative;
            width: 100%;
            aspect-ratio: 3 / 4;
            border-radius: 22px;
            overflow: hidden;
            margin-bottom: 16px;
            box-shadow: 0 8px 20px rgba(0,0,0,0.25), inset 0 0 0 3px rgba(255,255,255,0.15);
            background-image: url('img/home_scene.jpg'),
                radial-gradient(circle at 80% 8%, rgba(255,244,200,0.9) 0%, rgba(255,244,200,0) 16%),
                linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 38%, var(--grass) 42%, var(--grass-dark) 100%);
            background-size: cover, cover, cover;
            background-position: center, center, center;
        }
        /* Ферма — свой фон (не повтор Дома), тот же приём наложений поверх. */
        /* Зум + сдвиг вверх — обрезаем нарисованные грядки в самом низу картинки:
           под сценой и так идёт настоящая рабочая сетка грядок, а нарисованные
           рядом с ней выглядели как дублирующий "пустой" огород. */
        .scene-farmbg {
            background-image: url('img/farm_scene.jpg'),
                radial-gradient(circle at 80% 8%, rgba(255,244,200,0.9) 0%, rgba(255,244,200,0) 16%),
                linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 38%, var(--grass) 42%, var(--grass-dark) 100%);
            background-size: 145%, cover, cover;
            background-position: center 69%, center, center;
        }
        /* Короткая горизонтальная сцена-полоса — для вкладок, где сама сцена не
           главное (Хлев: под ней сразу должна идти сетка животных, во весь рост
           вход-в-разделы там неуместен). Тот же приём "объекты на фоне", но
           компактнее. img/barn_scene.jpg — целиком опционален, пока его нет —
           виден травяной градиент-заглушка. */
        .scene-strip {
            aspect-ratio: auto;
            height: 148px;
            background-image: url('img/barn_scene.jpg'),
                linear-gradient(180deg, var(--grass) 0%, var(--grass-dark) 100%);
        }
        .scene-strip .scene-spot-obj { width: 50px; height: 50px; }
        .scene-strip .scene-spot-badge { width: 44px; height: 44px; }
        .scene-strip .scene-spot-label { font-size: 10px; padding: 2px 7px; }
        .scene-strip .scene-spot-hint { font-size: 9px; padding: 0 6px; }
        .scene-strip .scene-spot { gap: 2px; }

        /* ─── Хлев: панель Питомец/Скрещивание/Петухи/Выгул — веер карточек ───
           Раньше была плоская полоса-сцена (.scene-strip) с четырьмя точками — владелец
           попросил заменить на "веер карточек" (16.09.2026): центральная карточка
           крупная и анфас, соседние — уменьшены и развёрнуты в перспективе по бокам,
           четвёртая (противоположная по кругу) спрятана точно за центром. Листается
           по кругу (после последней снова первая). Своя реализация (не hscroll.js) —
           там обычная overflow-x прокрутка полосы, здесь же карточки НЕ скроллятся,
           а перекладываются transform'ом между 4 фиксированными позициями. */
        .fan-carousel {
            position: relative;
            height: 210px;
            margin-bottom: 16px;
            perspective: 900px;
            touch-action: pan-y;
            user-select: none;
        }
        .fan-track {
            position: relative;
            width: 100%;
            height: 178px;
            transform-style: preserve-3d;
        }
        .fan-card {
            position: absolute;
            top: 0;
            left: 50%;
            width: 124px;
            height: 178px;
            margin-left: -62px;
            border-radius: 16px;
            background-size: cover;
            background-position: center;
            border: 3px solid var(--wood);
            box-shadow: 0 8px 18px rgba(0,0,0,0.4);
            cursor: pointer;
            overflow: hidden;
            transition: transform 0.35s cubic-bezier(0.22, 0.85, 0.32, 1), opacity 0.35s, box-shadow 0.35s;
            will-change: transform;
        }
        .fan-card.is-dragging { transition: none; }
        .fan-card-shade {
            position: absolute;
            inset: 0;
            background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,0.75) 100%);
        }
        .fan-card-label {
            position: absolute;
            left: 8px; right: 8px; bottom: 8px;
            color: #fff8e0;
            font-weight: 800;
            font-size: 13px;
            text-shadow: 0 1px 3px rgba(0,0,0,0.8);
        }
        .fan-card-hint {
            position: absolute;
            left: 8px; right: 8px; bottom: 26px;
            color: #fff8e0;
            font-weight: 600;
            font-size: 10px;
            opacity: 0.85;
            text-shadow: 0 1px 3px rgba(0,0,0,0.8);
        }
        .fan-card.is-center { box-shadow: 0 12px 24px rgba(0,0,0,0.5), 0 0 0 3px var(--gold); }
        .fan-dots {
            display: flex;
            justify-content: center;
            gap: 7px;
            margin-top: 8px;
        }
        .fan-dot {
            width: 7px; height: 7px;
            border-radius: 50%;
            background: rgba(0,0,0,0.18);
            cursor: pointer;
            transition: background 0.25s, transform 0.25s;
        }
        .fan-dot.is-active { background: var(--wood); transform: scale(1.3); }
        .scene-cloud {
            position: absolute;
            z-index: 1;
            background: rgba(255,255,255,0.85);
            border-radius: 50%;
            filter: blur(0.5px);
            animation: sceneCloudDrift 40s linear infinite;
        }
        @keyframes sceneCloudDrift {
            from { transform: translateX(-10%); }
            to { transform: translateX(120%); }
        }
        /* Нарисованный CSS-забор — часть заглушки-градиента. Если в готовом фоне
           (картинке/видео) уже есть свой забор/линия горизонта — просто добавь классу
           .scene модификатор "has-art" (в разметке), он скрывает эту полосу. */
        .scene-fence {
            position: absolute;
            z-index: 1;
            left: 0; right: 0; bottom: 40%;
            height: 6%;
            background: repeating-linear-gradient(90deg, var(--wood) 0 6%, transparent 6% 10%);
            opacity: 0.55;
        }
        .scene.has-art .scene-fence { display: none; }
        .scene-spot {
            position: absolute;
            z-index: 2;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            transform: translate(-50%, -50%);
            cursor: pointer;
        }
        /* Тележка декора медленно катается туда-сюда по своему пятачку — она с
           колёсами, ей и положено ехать. Остальные объекты (Рыбалка/Задания/...)
           раньше покачивались, но владелец решил, что стоящие на месте смотрятся
           лучше — покачивание убрано по умолчанию. Топ — исключение, ему оставили
           покачивание через .scene-spot-bob. */
        .scene-spot-drift {
            animation: sceneCartDrift 16s ease-in-out infinite;
        }
        .scene-spot-bob {
            animation: sceneSpotBob 3.4s ease-in-out infinite;
        }
        @keyframes sceneCartDrift {
            0%, 100% { margin-left: -20px; }
            50% { margin-left: 20px; }
        }
        @keyframes sceneSpotBob {
            0%, 100% { transform: translate(-50%, -50%); }
            50% { transform: translate(-50%, calc(-50% - 5px)); }
        }
        .scene-spot:active .scene-spot-badge,
        .scene-spot:active .scene-spot-obj { transform: scale(0.92); }
        /* Чисто декоративные объекты сцены (мельница/колодец/чучело) — не кликабельны,
           без подписи и без покачивания, просто оживляют фон. */
        .scene-decor {
            position: absolute;
            z-index: 1;
            transform: translate(-50%, -50%);
            pointer-events: none;
            filter: drop-shadow(0 6px 8px rgba(0,0,0,0.3));
        }
        /* Настоящий предмет-объект (прозрачный PNG: пруд/доска/кубок/лоток/ларёк) —
           стоит прямо на земле, без кружка-рамки. Пока файла нет — onerror в разметке
           прячет img и показывает соседний .scene-spot-badge (текущий вид с фото-кружком),
           так что ничего не ломается, пока владелец не подкинет картинки объектов. */
        .scene-spot-obj {
            width: 84px;
            height: 84px;
            object-fit: contain;
            filter: drop-shadow(0 8px 10px rgba(0,0,0,0.35));
            transition: transform 0.12s;
        }
        .scene-spot-badge {
            width: 66px; height: 66px;
            border-radius: 50%;
            background-size: cover;
            background-position: center;
            border: 3px solid #fff;
            box-shadow: 0 6px 14px rgba(0,0,0,0.35), 0 0 0 3px var(--gold);
            transition: transform 0.12s;
            position: relative;
        }
        .scene-spot-badge.has-ready::after {
            content: '';
            position: absolute; top: -3px; right: -3px;
            width: 16px; height: 16px; border-radius: 50%;
            background: var(--red); border: 2px solid #fff;
        }
        /* Тот же красный дот готовности, но на весь .scene-spot (плитки Фермы —
           мастерская/заказы/лаборатория), а не только на .scene-spot-badge. */
        .scene-spot.has-ready::after {
            content: '';
            position: absolute; top: 2px; right: 18%;
            width: 14px; height: 14px; border-radius: 50%;
            background: var(--red); border: 2px solid #fff;
            z-index: 3;
        }
        /* Деревянная табличка вместо тёмной полупрозрачной плашки — тот же приём,
           что у .section-title по всему приложению, чтобы подпись читалась как
           часть игры, а не как техническая подложка поверх картинки. Используется
           там, где подпись — текст (например, полоса Хлева). */
        .scene-spot-label {
            font-size: 12px;
            font-weight: 800;
            color: #fff8e0;
            white-space: nowrap;
            background: linear-gradient(180deg, var(--wood) 0%, var(--wood-dark) 100%);
            padding: 3px 11px;
            border-radius: 9px;
            border: 1px solid rgba(255,255,255,0.25);
            box-shadow: 0 2px 0 rgba(0,0,0,0.22), 0 4px 8px rgba(0,0,0,0.3);
            letter-spacing: 0.01em;
        }
        /* Сцена Дома: подписи-слова захламляли экран ("надписи заполнили экран") —
           вместо них маленький кружок с одним эмодзи, компактно и не спорит с
           картинкой самого объекта. Отдельный класс, чтобы не задевать .scene-spot-label
           там, где подпись всё ещё текстовая (полоса Хлева). */
        .scene-spot-emoji {
            width: 26px; height: 26px;
            display: flex; align-items: center; justify-content: center;
            font-size: 14px;
            border-radius: 50%;
            background: linear-gradient(180deg, var(--wood) 0%, var(--wood-dark) 100%);
            border: 1.5px solid rgba(255,255,255,0.4);
            box-shadow: 0 2px 0 rgba(0,0,0,0.22), 0 3px 6px rgba(0,0,0,0.3);
            margin-top: -4px;
        }
        .scene-spot-hint {
            font-size: 10px;
            font-weight: 700;
            color: var(--wood-dark);
            white-space: nowrap;
            background: rgba(255,248,224,0.92);
            padding: 1px 8px;
            border-radius: 7px;
            margin-top: 2px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }
        /* Объекты стоят на месте (владелец против покачивания), но должны читаться
           как кликабельные — вместо движения лёгкое пульсирующее свечение силуэта. */
        @keyframes spotGlow {
            0%, 100% { filter: drop-shadow(0 8px 10px rgba(0,0,0,0.35)) drop-shadow(0 0 0 rgba(120,200,255,0)); }
            50% { filter: drop-shadow(0 8px 10px rgba(0,0,0,0.35)) drop-shadow(0 0 10px rgba(120,200,255,0.95)); }
        }
        .scene-spot .scene-spot-obj { animation: spotGlow 2.6s ease-in-out infinite; }
        .scene-spot:nth-child(3n) .scene-spot-obj { animation-delay: -0.9s; }
        .scene-spot:nth-child(3n+1) .scene-spot-obj { animation-delay: -1.8s; }
        @media (prefers-reduced-motion: reduce) {
            .scene-spot { animation: none; }
            .scene-spot .scene-spot-obj { animation: none; }
            .scene-cloud { animation: none; }
        }
        .tile-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }
        .tile-wide {
            width: 100%;
            height: 158px;
            border-radius: 20px;
            background-size: cover;
            background-position: center;
            position: relative;
            overflow: hidden;
            cursor: pointer;
            transition: transform 0.12s;
            box-shadow: 0 6px 18px rgba(0,0,0,0.28);
        }
        .tile-wide:active { transform: scale(0.97); }
        .tile-sq {
            aspect-ratio: 1;
            border-radius: 18px;
            background-size: cover;
            background-position: center;
            position: relative;
            overflow: hidden;
            cursor: pointer;
            transition: transform 0.12s;
            box-shadow: 0 4px 14px rgba(0,0,0,0.24);
        }
        .tile-sq:active { transform: scale(0.96); }
        /* ─── Лента второстепенных разделов (заказы/лаборатория/рыбалка/петухи) ───
           Раньше это были 4 плитки во всю ширину друг под другом — при каждой новой
           фиче список рос вниз бесконечно. Горизонтальная лента держит их в одну
           строку с прокруткой, независимо от того, сколько таких разделов появится. */
        .quick-carousel {
            display: flex;
            gap: 10px;
            overflow-x: auto;
            padding: 2px 2px 12px;
            margin-bottom: 2px;
            scroll-snap-type: x proximity;
        }
        .quick-card {
            flex: 0 0 132px;
            height: 132px;
            border-radius: 18px;
            background-size: cover;
            background-position: center;
            position: relative;
            overflow: hidden;
            cursor: pointer;
            transition: transform 0.12s;
            box-shadow: 0 4px 14px rgba(0,0,0,0.24);
            scroll-snap-align: start;
        }
        .quick-card:active { transform: scale(0.96); }
        .tile-wide::after, .tile-sq::after, .quick-card::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.18) 55%, transparent 100%);
        }
        /* Медленный «блик» по крупным плиткам — оживляет статичную картинку, не отвлекая. */
        .tile-wide::before {
            content: '';
            position: absolute;
            top: 0; left: -60%;
            width: 40%; height: 100%;
            background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,0.28) 50%, transparent 100%);
            transform: skewX(-18deg);
            animation: tileGlint 7s ease-in-out infinite;
            z-index: 1;
            pointer-events: none;
        }
        @keyframes tileGlint {
            0%, 72%, 100% { left: -60%; }
            85% { left: 130%; }
        }
        @media (prefers-reduced-motion: reduce) {
            .tile-wide::before { display: none; }
        }
        .tile-body {
            position: absolute;
            bottom: 12px;
            left: 14px;
            right: 14px;
            z-index: 2;
        }
        .tile-name {
            font-size: 17px;
            font-weight: 800;
            color: #fff;
            text-shadow: 0 2px 6px rgba(0,0,0,0.6);
            margin-bottom: 2px;
            line-height: 1.2;
        }
        .tile-sq .tile-name { font-size: 14px; }
        .tile-hint {
            font-size: 12px;
            font-weight: 600;
            color: rgba(255,255,255,0.82);
            text-shadow: 0 1px 4px rgba(0,0,0,0.55);
            line-height: 1.3;
        }
        .tile-sq .tile-hint { font-size: 13px; }
        .tile-badge {
            position: absolute;
            top: 11px;
            right: 11px;
            z-index: 2;
            background: var(--red);
            color: #fff;
            font-size: 13px;
            font-weight: 800;
            padding: 3px 9px;
            border-radius: 12px;
            border: 1.5px solid rgba(255,255,255,0.45);
            white-space: nowrap;
            animation: badgePulse 1.4s infinite;
        }
        @keyframes badgePulse {
            0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(227,99,74,0.6); }
            50% { transform: scale(1.08); box-shadow: 0 0 0 6px rgba(227,99,74,0); }
        }
        .tile-wide.has-ready, .tile-sq.has-ready, .quick-card.has-ready {
            box-shadow: 0 0 0 3px var(--gold), 0 6px 18px rgba(0,0,0,0.28);
        }
        .quick-card .tile-name { font-size: 13px; }
        .quick-card .tile-hint { font-size: 12px; }
        .quick-card .tile-body { bottom: 9px; left: 10px; right: 10px; }

        /* ─── Craft / cauldron ─── */
        .cauldron-box {
            background: linear-gradient(180deg, #6a4b8a 0%, #453064 100%);
            border: 2px solid #2f2148;
            border-radius: 16px;
            padding: 16px;
            text-align: center;
            color: #fff;
            margin-bottom: 14px;
        }

        .cauldron-emoji { font-size: 42px; }

        .cauldron-img {
            width: 100px;
            height: 100px;
            object-fit: cover;
            border-radius: 14px;
            border: 2px solid rgba(255,255,255,0.25);
            margin: 0 auto;
            display: block;
        }

        .section-icon {
            width: 26px;
            height: 26px;
            object-fit: cover;
            border-radius: 6px;
            vertical-align: -6px;
            margin-right: 4px;
        }

        .profile-avatar-wrap {
            position: relative;
            width: 84px;
            margin: 0 auto;
        }
        .profile-avatar-img {
            width: 84px;
            height: 84px;
            object-fit: cover;
            object-position: center;
            border-radius: 50%;
            border: 3px solid var(--wood);
            box-shadow: 0 3px 0 var(--wood-dark);
            background: #fff;
            display: block;
            cursor: pointer;
        }
        .profile-avatar-edit {
            position: absolute;
            right: -4px;
            bottom: -2px;
            width: 26px;
            height: 26px;
            border-radius: 50%;
            background: linear-gradient(180deg, var(--purple) 0%, var(--purple-dark) 100%);
            border: 2px solid #fff;
            box-shadow: 0 2px 0 rgba(0,0,0,0.25);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 13px;
            cursor: pointer;
        }
        .avatar-pick-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 10px;
        }
        .avatar-pick-item {
            border: 3px solid transparent;
            border-radius: 50%;
            overflow: hidden;
            cursor: pointer;
            aspect-ratio: 1;
            background: #fff;
        }
        .avatar-pick-item.selected { border-color: var(--purple); }
        .avatar-pick-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

        /* ─── Quest ─── */
        .quest-item.done { opacity: 0.6; }
        .quest-reward { font-size: 12px; font-weight: 700; margin: 6px 0; opacity: 0.9; }

        /* ─── Top list ─── */
        .top-row {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 8px;
            border-radius: 12px;
            margin-bottom: 6px;
            background: #fff8e6;
            border: 2px solid var(--parchment-dark);
        }
        .top-row.me { border-color: var(--gold-dark); background: #fff1c9; }
        .top-rank { font-size: 15px; font-weight: 800; width: 26px; text-align: center; }
        .top-name { font-size: 13px; font-weight: 700; flex: 1; }
        .top-meta { font-size: 13px; opacity: 0.75; font-weight: 600; }

        /* ─── Profile ─── */
        .profile-head {
            text-align: center;
            margin-bottom: 14px;
        }
        .profile-avatar { font-size: 46px; }
        .profile-name { font-size: 18px; font-weight: 800; }
        .ach-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 8px;
        }
        .ach-item {
            text-align: center;
            padding: 10px 4px;
            border-radius: 12px;
            background: #fff8e6;
            border: 2px solid var(--parchment-dark);
        }
        .ach-item.locked { opacity: 0.35; }
        .ach-emoji { font-size: 22px; }
        .ach-name { font-size: 13px; font-weight: 700; margin-top: 2px; }

        /* ─── Decor ─── */
        .decor-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
        }
        .decor-tile {
            background: #fff8e6;
            border: 2px solid var(--parchment-dark);
            border-radius: 14px;
            text-align: center;
            padding: 10px 4px;
        }
        .decor-tile.owned { border-color: var(--leaf-dark); background: #eaffe0; }
        .decor-tile.placed { border-color: #d97706; background: #fff3d6; box-shadow: 0 0 0 2px #fbbf2455; }
        .decor-emoji { font-size: 28px; }
        .decor-img {
            width: 100%;
            aspect-ratio: 1;
            object-fit: cover;
            border-radius: 8px;
            display: block;
            margin-bottom: 2px;
        }
        .decor-name { font-size: 12px; font-weight: 700; margin: 3px 0; }

        /* ─── Чат товарищества ─── */
        .guild-chat-log {
            display: flex;
            flex-direction: column;
            gap: 10px;
            max-height: 48vh;
            min-height: 120px;
            overflow-y: auto;
            padding: 8px 4px;
            background: rgba(0,0,0,0.03);
            border-radius: 12px;
        }
        .guild-chat-row {
            display: flex;
            gap: 6px;
            max-width: 84%;
            align-self: flex-start;
        }
        .guild-chat-row.me { align-self: flex-end; flex-direction: row-reverse; }
        .guild-chat-avatar {
            flex: 0 0 auto;
            width: 26px; height: 26px;
            border-radius: 50%;
            background: #fff8e6;
            border: 2px solid var(--parchment-dark);
            display: flex; align-items: center; justify-content: center;
            font-size: 14px;
        }
        .guild-chat-body { min-width: 0; }
        .guild-chat-meta {
            font-size: 12px;
            font-weight: 700;
            opacity: 0.7;
            margin-bottom: 2px;
            display: flex;
            gap: 4px;
            align-items: center;
        }
        .guild-chat-row.me .guild-chat-meta { justify-content: flex-end; }
        .guild-chat-rank {
            font-size: 13px;
            font-weight: 800;
            color: var(--gold-dark);
            background: rgba(212,160,23,0.15);
            border-radius: 6px;
            padding: 0 4px;
        }
        .guild-chat-bubble {
            background: #fff8e6;
            border: 2px solid var(--parchment-dark);
            border-radius: 12px;
            padding: 7px 11px;
            font-size: 13px;
            line-height: 1.35;
            word-break: break-word;
        }
        .guild-chat-row.me .guild-chat-bubble { background: #eaffe0; border-color: var(--leaf-dark); }
        .guild-chat-time { font-size: 13px; opacity: 0.5; margin-top: 2px; }
        .guild-chat-row.me .guild-chat-time { text-align: right; }
        .guild-chat-emojis {
            display: flex;
            gap: 6px;
            overflow-x: auto;
            padding: 8px 2px 0;
        }
        .guild-chat-emojis button {
            flex: 0 0 auto;
            width: 30px; height: 30px;
            border-radius: 8px;
            border: 2px solid var(--parchment-dark);
            background: #fff8e6;
            font-size: 16px;
            line-height: 1;
            cursor: pointer;
        }
        .guild-chat-emojis button:active { transform: translateY(1px); }
        .guild-chat-input-row {
            display: flex;
            gap: 8px;
            margin-top: 8px;
        }
        .guild-chat-input-row input {
            flex: 1;
            min-width: 0;
            border: 2px solid var(--parchment-dark);
            border-radius: 10px;
            padding: 10px;
            font-family: inherit;
            font-size: 13px;
        }
        .guild-chat-send {
            flex: 0 0 auto;
            width: 44px;
            border-radius: 10px;
            border: none;
            background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
            box-shadow: 0 3px 0 #a8730f;
            color: var(--ink);
            font-size: 16px;
            font-weight: 800;
            cursor: pointer;
        }
        .guild-chat-send:active { transform: translateY(2px); box-shadow: none; }

        /* ─── Рыбалка: фото на всё окно (третий заход) ───
           Было: фон на весь модал (проблема — плохой контраст на светлых участках фото).
           Стало: банер 9:16 сверху (проблема — занимает место в потоке документа, из-за
           этого приходилось скроллить, чтобы дойти до выбора наживки).
           Теперь: фото снова на весь фон modal-content — background НЕ занимает место в
           раскладке (в отличие от баннера-элемента), так что скроллить не нужно, а сами
           фото теперь нативно портретные (9:16 из коробки, без кропа) — ложатся в окно
           куда органичнее, чем растянутый landscape в первой попытке. Контраст текста
           решаем плотными непрозрачными панелями + тенью текста (см. ниже), а не отказом
           от фото. */
        #fishingModal .modal-content {
            background:
                linear-gradient(180deg, rgba(6,20,26,0.62) 0%, rgba(6,20,26,0.32) 35%, rgba(6,20,26,0.78) 100%),
                url('img/fishing_pond_bg.jpg') center/cover no-repeat;
            color: #fff;
            text-shadow: 0 1px 3px rgba(0,0,0,0.7);
            overflow-x: hidden;
            overflow-y: auto;
            overscroll-behavior: contain;
            position: relative;
        }
        #fishingModal.loc-river .modal-content { background-image:
            linear-gradient(180deg, rgba(8,18,8,0.62) 0%, rgba(8,18,8,0.32) 35%, rgba(8,18,8,0.78) 100%),
            url('img/fishing_river_bg.jpg'); }
        #fishingModal.loc-sea .modal-content { background-image:
            linear-gradient(180deg, rgba(4,14,26,0.62) 0%, rgba(4,14,26,0.32) 35%, rgba(4,14,26,0.78) 100%),
            url('img/fishing_sea_bg.jpg'); }
        #fishingModal .modal-header h2 { color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.6); }
        #fishingModal .decor-tile,
        #fishingModal .wheel-winners-row,
        #fishingModal .fishing-rod-row,
        #fishingModal .fishing-catch-card {
            background: rgba(255,255,255,0.94);
            color: var(--ink);
            text-shadow: none;
        }
        #fishingModal .empty-note { opacity: 1; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.6); }
        /* Кнопки наживки — раньше сливались с пёстрым фоном фото, теперь настоящая
           деревянная табличка-кнопка (арт), чтобы читались как явный call-to-action. */
        #fishingModal .decor-grid .decor-tile {
            background: url('img/fishing_bait_btn_bg.png') center/100% 100% no-repeat;
            border: none;
            box-shadow: 0 4px 10px rgba(0,0,0,0.35);
            aspect-ratio: 1;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            overflow: hidden;
        }
        #fishingModal .decor-grid .decor-tile:active { transform: scale(0.95); }
        /* Наживка — картинка кнопки уже сама по себе понятна (плашка+иконка),
           имя и текст плохо влезали в нарисованную рамку и вылезали за неё —
           убрали название, оставили только счётчик мелким бейджем в углу. */
        #fishingModal .decor-grid .decor-emoji {
            font-size: 24px;
            line-height: 1;
        }
        #fishingModal .decor-grid .decor-name { display: none; }
        #fishingModal .decor-grid .seed-amount {
            position: absolute;
            bottom: 3px;
            right: 5px;
            font-size: 13px;
            font-weight: 800;
            opacity: 1;
            color: #fff;
            text-shadow: 0 1px 2px rgba(0,0,0,0.8);
        }
        /* ─── Бои петухов: фон арены за QTE и экраном результата ─── */
        .battle-arena-panel {
            position: relative;
            border-radius: 16px;
            background:
                linear-gradient(180deg, rgba(20,10,4,0.72) 0%, rgba(20,10,4,0.55) 40%, rgba(20,10,4,0.85) 100%),
                url('img/rooster_arena_bg.jpg') center/cover no-repeat;
            color: #fff;
            text-shadow: 0 1px 3px rgba(0,0,0,0.65);
            padding: 14px;
        }
        .battle-arena-panel .fishing-catch-bonus {
            background: rgba(10,6,2,0.62);
            color: #fde68a;
            text-shadow: 0 1px 3px rgba(0,0,0,0.8);
        }
        /* Исход боя — раньше текст лежал прямо на фото (на светлых/тёплых участках арены
           почти сливался с фоном, особенно при поражении). Теперь под ним всегда своя
           непрозрачная тёмная плашка — контраст гарантирован независимо от того, что на фото. */
        #battleOutcome {
            background: rgba(10,6,2,0.62);
            border-radius: 12px;
            padding: 14px 10px;
        }

        .fishing-loc-tabs {
            display: flex;
            gap: 6px;
            overflow-x: auto;
            margin-bottom: 10px;
            padding-bottom: 2px;
        }
        .fishing-loc-tab {
            flex: 0 0 auto;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
            background: rgba(8,18,24,0.6);
            border: 1px solid rgba(255,255,255,0.3);
            border-radius: 10px;
            padding: 6px 12px;
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
            white-space: nowrap;
        }
        .fishing-loc-tab.active { background: rgba(255,255,255,0.92); color: var(--ink); text-shadow: none; box-shadow: 0 0 0 2px var(--gold); }
        .fishing-loc-tab.locked { opacity: 0.75; }
        .fishing-loc-lock { font-size: 12px; opacity: 0.85; }

        .fishing-rod-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: rgba(8,18,24,0.6);
            border: 1px solid rgba(255,255,255,0.3);
            border-radius: 10px;
            padding: 8px 12px;
            font-size: 12px;
            cursor: pointer;
        }
        .fishing-rod-toggle { opacity: 0.85; font-size: 13px; }
        .fishing-rod-list {
            display: flex;
            flex-direction: column;
            gap: 6px;
            margin-top: 8px;
        }
        .fishing-rod-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            background: rgba(255,255,255,0.92);
            color: var(--ink);
            border-radius: 10px;
            padding: 8px 10px;
            font-size: 12px;
        }
        .fishing-rod-row.equipped { box-shadow: 0 0 0 2px #4ade80; }
        .fishing-rod-note { font-size: 12px; opacity: 0.65; font-weight: 600; }
        .fishing-nft-note {
            margin-top: 6px;
            font-size: 13px;
            line-height: 1.4;
            padding: 8px 10px;
            border-radius: 10px;
            background: rgba(139,69,19,0.12);
            border: 1px dashed #b45309;
        }
        #fishingModal .fishing-nft-note { background: rgba(0,0,0,0.35); color: #fde68a; border-color: #fbbf24; }
        .fishing-rod-btn {
            flex: 0 0 auto;
            border: none;
            border-radius: 8px;
            padding: 8px 10px;
            font-size: 13px;
            font-weight: 800;
            background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
            color: var(--ink);
            cursor: pointer;
        }

        .fishing-catch-inv {
            margin-top: 12px;
            background: rgba(8,18,24,0.6);
            border: 1px solid rgba(255,255,255,0.3);
            border-radius: 12px;
            padding: 10px 12px;
        }
        .fishing-catch-inv-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 12px;
            font-weight: 800;
            margin-bottom: 8px;
        }
        .fishing-catch-inv-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 12px;
            padding: 6px 0;
            border-top: 1px solid rgba(255,255,255,0.15);
            cursor: pointer;
        }
        .fishing-catch-inv-row:first-of-type { border-top: none; }
        .fishing-catch-inv-row:active { opacity: 0.7; }

        @keyframes fishingBite {
            0%, 100% { transform: translateY(0) rotate(0deg); }
            50% { transform: translateY(-4px) rotate(-2deg); }
        }

        .fishing-catch-card {
            text-align: center;
            background: rgba(255,255,255,0.95);
            color: var(--ink);
            border-radius: 16px;
            padding: 18px 14px;
            animation: fishingCatchPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        @keyframes fishingCatchPop {
            0% { transform: scale(0.6); opacity: 0; }
            100% { transform: scale(1); opacity: 1; }
        }
        .fishing-catch-emoji { font-size: 52px; line-height: 1; margin-bottom: 6px; }
        .fishing-catch-name { font-size: 17px; font-weight: 800; margin-bottom: 2px; }
        .fishing-catch-price { font-size: 13px; opacity: 0.75; font-weight: 700; margin-bottom: 14px; }
        .fishing-catch-actions { display: flex; gap: 8px; }
        .fishing-catch-actions .btn-full { margin: 0; }
        .fishing-catch-bonus {
            font-size: 12px; font-weight: 700; color: #b45309;
            background: rgba(251,191,36,0.18); border-radius: 8px;
            padding: 5px 8px; margin-top: 6px;
        }
        .fishing-collection-link {
            text-decoration: underline; cursor: pointer; font-weight: 700;
        }
        .fishing-splash-wrap {
            position: relative; height: 60px; display: flex; align-items: center; justify-content: center;
        }
        .fishing-splash-emoji { font-size: 30px; z-index: 2; }
        .fishing-ripple {
            position: absolute; border: 2px solid rgba(255,255,255,0.8); border-radius: 50%;
            animation: fishingRipple 1.2s ease-out infinite;
        }
        @keyframes fishingRipple {
            0% { transform: scale(0.3); opacity: 0.9; }
            100% { transform: scale(1.3); opacity: 0; }
        }
        .fishing-collection-loc { margin-bottom: 14px; }
        .fishing-collection-loc-head {
            display: flex; justify-content: space-between; align-items: center;
            font-size: 13px; font-weight: 800; margin-bottom: 4px;
        }
        .fishing-collection-grid {
            display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 6px;
        }
        .fishing-collection-cell {
            background: rgba(255,255,255,0.92); color: var(--ink); text-shadow: none;
            border-radius: 10px; padding: 8px 4px; text-align: center;
        }
        .fishing-collection-cell.undiscovered { opacity: 0.5; }
        .fishing-collection-emoji { font-size: 22px; }
        .fishing-collection-name { font-size: 13px; font-weight: 700; margin-top: 2px; line-height: 1.2; }

        /* ─── Рыбалка: мини-игра подсечки (Stardew-style) ─── */
        /* Мини-игра подсечки: держим палец на #fishingActions целиком (не только на узкой
           полосе-баре) — раньше ловилась только 90px-полоса, промах на пару мм давал
           странное поведение (тач уходил в скролл/выделение текста модалки под пальцем). */
        #fishingActions {
            touch-action: none;
            -webkit-user-select: none; user-select: none;
            -webkit-touch-callout: none;
            -webkit-tap-highlight-color: transparent;
            overscroll-behavior: contain;
        }
        .sw-track {
            position: relative;
            width: 90px;
            height: 240px;
            margin: 0 auto 12px;
            background: linear-gradient(180deg, #2d6a8f 0%, #164a63 100%);
            border: 3px solid rgba(255,255,255,0.45);
            border-radius: 14px;
            box-shadow: inset 0 2px 10px rgba(0,0,0,0.4);
            overflow: hidden;
            touch-action: none;
            cursor: pointer;
            user-select: none;
            -webkit-user-select: none;
            -webkit-touch-callout: none;
            -webkit-tap-highlight-color: transparent;
        }
        .sw-fish {
            position: absolute;
            left: 50%;
            top: 50%;
            font-size: 24px;
            line-height: 1;
            transform: translate(-50%, -50%);
            filter: drop-shadow(0 0 4px rgba(0,0,0,0.6));
            z-index: 2;
            pointer-events: none;
        }
        /* Сундук — решён на сервере при забросе, тут просто декоративный маячок в углу
           дорожки (не мешает рыбке/бегунку, не двигается — награда выдаётся при улове). */
        .sw-treasure {
            position: absolute;
            right: 6px;
            bottom: 6px;
            font-size: 18px;
            line-height: 1;
            filter: drop-shadow(0 0 4px rgba(0,0,0,0.7));
            z-index: 1;
            pointer-events: none;
            animation: fishingBite 1.6s ease-in-out infinite;
        }
        .sw-catchbar {
            position: absolute;
            left: 3px; right: 3px;
            height: 26%;
            top: 50%;
            background: rgba(74, 222, 128, 0.35);
            border: 2px solid rgba(74, 222, 128, 0.8);
            border-radius: 8px;
            transition: background 0.1s, border-color 0.1s;
            pointer-events: none;
        }
        .sw-catchbar.sw-hit {
            background: rgba(74, 222, 128, 0.65);
            border-color: #4ade80;
            box-shadow: 0 0 14px rgba(74, 222, 128, 0.8);
        }
        .sw-countdown {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 44px;
            font-weight: 800;
            color: #fff;
            text-shadow: 0 2px 8px rgba(0,0,0,0.7);
            z-index: 3;
            pointer-events: none;
        }
        .hook-progress {
            width: 100%;
            height: 12px;
            background: rgba(0,0,0,0.25);
            border: 1px solid rgba(255,255,255,0.25);
            border-radius: 6px;
            overflow: hidden;
            margin-bottom: 12px;
        }
        .hook-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #4ade80, #16a34a);
            transition: width 0.2s ease;
        }

        /* ─── Колесо Фортуны ─── */
        .wheel-prize-photo {
            display: block;
            width: 100%;
            max-width: 280px;
            max-height: 200px;
            object-fit: cover;
            border-radius: 12px;
            border: 2px solid var(--parchment-dark);
            margin: 0 auto 8px;
        }
        .wheel-prize {
            text-align: center;
            font-size: 14px;
            background: #fff3d6;
            border: 2px solid var(--parchment-dark);
            border-radius: 12px;
            padding: 8px 10px;
            margin-bottom: 10px;
        }
        #wheelModal .modal-content {
            /* Дощатая стена амбара вместо обычного пергамента — колесо висит "на стене",
               а не лежит на бумаге. Диагональные полосы + вертикальные доски. */
            background:
                repeating-linear-gradient(90deg, rgba(0,0,0,0.05) 0 2px, transparent 2px 38px),
                linear-gradient(180deg, var(--wood) 0%, var(--wood-dark) 100%);
            color: var(--parchment);
        }
        #wheelModal .modal-header h2 { color: var(--parchment); }
        #wheelModal .wheel-prize,
        #wheelModal .wheel-winners-row,
        #wheelModal .empty-note {
            background: var(--parchment);
            color: var(--ink);
            border-radius: 12px;
        }
        #wheelModal .empty-note { padding: 10px; opacity: 1; }
        .wheel-stage {
            width: 100%;
            max-width: 320px;
            aspect-ratio: 1;
            margin: 0 auto 10px;
            padding: 10px;
            border-radius: 50%;
            overflow: hidden;
            background: radial-gradient(circle, #fff3d6 0%, var(--parchment) 70%, var(--parchment-dark) 100%);
            box-shadow: 0 4px 0 var(--wood-dark), inset 0 0 0 3px var(--wood), 0 0 0 6px var(--wood-dark);
        }
        .wheel-stage canvas { width: 100%; height: 100%; display: block; border-radius: 50%; }
        .wheel-winners-list {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }
        .wheel-winners-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            background: #fff8e6;
            border: 2px solid var(--parchment-dark);
            border-radius: 10px;
            padding: 8px 12px;
            font-size: 12px;
        }
        .wheel-winners-row b { flex: 1; text-align: left; font-size: 13px; }
        .wheel-info {
            text-align: center;
            font-size: 12px;
            opacity: 0.85;
            display: flex;
            flex-direction: column;
            gap: 2px;
            margin-bottom: 10px;
        }

        /* ─── Двор фермы (размещённый декор) ─── */
        .yard-strip {
            display: flex;
            gap: 8px;
            overflow-x: auto;
            padding: 4px 2px 8px;
        }
        .yard-item {
            flex: 0 0 auto;
            width: 64px; height: 64px;
            background: #fff8e6;
            border: 2px solid var(--parchment-dark);
            border-radius: 12px;
            display: flex; align-items: center; justify-content: center;
            overflow: hidden;
        }
        .yard-img { width: 100%; height: 100%; object-fit: cover; }
        .yard-emoji { font-size: 28px; }
        .yard-add { border-style: dashed; opacity: 0.7; cursor: pointer; }
        .yard-add:active { opacity: 1; }

        /* ─── Живой рынок ─── */
        .market-ticker {
            background: linear-gradient(135deg, #1a0a2e 0%, #2d1060 50%, #1a0a2e 100%);
            border: 2px solid #7c3aed;
            border-radius: 16px;
            padding: 12px 14px;
            margin-bottom: 16px;
            overflow: hidden;
            position: relative;
        }
        .market-ticker::before {
            content: '';
            position: absolute;
            top: 0; left: -100%;
            width: 50%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(139,92,246,0.15), transparent);
            animation: shine 3s infinite;
        }
        @keyframes shine {
            0% { left: -100%; }
            100% { left: 200%; }
        }
        .market-ticker-title {
            color: #c4b5fd;
            font-size: 13px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1.5px;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .ticker-dot {
            width: 6px; height: 6px;
            background: #22c55e;
            border-radius: 50%;
            animation: blink 1.5s infinite;
        }
        @keyframes blink {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.2; }
        }
        .ticker-scroll {
            display: flex;
            gap: 12px;
            overflow-x: auto;
            padding-bottom: 4px;
            scrollbar-width: none;
        }
        .ticker-scroll::-webkit-scrollbar { display: none; }
        .ticker-pill {
            display: flex;
            align-items: center;
            gap: 6px;
            background: rgba(255,255,255,0.08);
            border: 1px solid rgba(255,255,255,0.12);
            border-radius: 10px;
            padding: 6px 10px;
            white-space: nowrap;
            flex-shrink: 0;
            cursor: pointer;
            transition: background 0.2s;
        }
        .ticker-pill:active { background: rgba(255,255,255,0.15); }
        .ticker-emoji { font-size: 18px; }
        .ticker-info {}
        .ticker-name { font-size: 12px; color: rgba(255,255,255,0.6); font-weight: 600; }
        .ticker-price { font-size: 13px; color: #fff; font-weight: 800; }
        .ticker-change {
            font-size: 12px;
            font-weight: 700;
            padding: 2px 5px;
            border-radius: 6px;
        }
        .ticker-change.up { background: rgba(34,197,94,0.2); color: #4ade80; }
        .ticker-change.down { background: rgba(239,68,68,0.2); color: #f87171; }
        .ticker-change.stable { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.5); }

        .market-card {
            background: #fff8e6;
            border: 2px solid var(--parchment-dark);
            border-radius: 16px;
            padding: 14px;
            margin-bottom: 10px;
            transition: transform 0.1s;
        }
        .market-card:active { transform: scale(0.98); }
        .market-card-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 10px;
        }
        .market-card-emoji { font-size: 36px; }
        .market-card-info { flex: 1; }
        .market-card-name { font-size: 14px; font-weight: 800; }
        .market-card-stock { font-size: 13px; opacity: 0.65; font-weight: 600; margin-top: 2px; }
        .market-price-badge {
            text-align: right;
        }
        .market-price-current {
            font-size: 18px;
            font-weight: 800;
            color: var(--gold-dark);
        }
        .market-price-base {
            font-size: 12px;
            opacity: 0.55;
            font-weight: 600;
        }
        .market-price-trend {
            font-size: 13px;
            font-weight: 700;
            padding: 2px 6px;
            border-radius: 8px;
            display: inline-block;
            margin-top: 2px;
        }
        .market-price-trend.up { background: rgba(34,197,94,0.15); color: #16a34a; }
        .market-price-trend.down { background: rgba(239,68,68,0.12); color: #dc2626; }
        .market-price-trend.stable { background: rgba(90,61,34,0.08); color: var(--ink); opacity: 0.6; }

        .price-list-toggle {
            display: flex; align-items: center; justify-content: space-between;
            background: #fff8e6; border: 2px solid var(--parchment-dark); border-radius: 14px;
            padding: 12px 14px; margin-top: 18px; cursor: pointer; user-select: none;
        }
        .price-list-toggle-title { font-size: 13px; font-weight: 800; }
        .price-list-toggle-arrow { font-size: 12px; opacity: 0.6; transition: transform 0.2s; }
        .price-list-toggle.open .price-list-toggle-arrow { transform: rotate(180deg); }
        .price-list-grid {
            display: none; grid-template-columns: repeat(2, 1fr); gap: 8px;
            margin-top: 8px; margin-bottom: 16px;
        }
        .price-list-grid.open { display: grid; }
        .price-list-item {
            background: #fff8e6; border: 2px solid var(--parchment-dark); border-radius: 12px;
            padding: 10px 12px; display: flex; align-items: center; gap: 10px;
        }
        .price-list-emoji { font-size: 24px; }
        .price-list-name { font-size: 12px; font-weight: 700; }
        .price-list-base { font-size: 12px; opacity: 0.6; }
        .price-list-right { text-align: right; margin-left: auto; }
        .price-list-current { font-size: 14px; font-weight: 800; color: var(--gold-dark); }
        .price-list-change { font-size: 12px; font-weight: 700; }
        .price-list-change.up { color: #16a34a; }
        .price-list-change.down { color: #dc2626; }
        .price-list-change.stable { color: #888; }

        .market-sell-row {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 6px;
        }
        .price-history-toggle {
            margin-top: 8px;
            font-size: 13px;
            font-weight: 700;
            opacity: 0.75;
            cursor: pointer;
            text-align: center;
        }
        .price-history-box {
            margin-top: 6px;
            padding: 8px 4px 2px;
            background: rgba(0,0,0,0.04);
            border-radius: 10px;
        }
        .price-history-bars {
            display: flex;
            align-items: flex-end;
            height: 64px;
            gap: 4px;
        }
        .price-history-bar-col {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-end;
            height: 100%;
        }
        .price-history-bar {
            width: 100%;
            max-width: 18px;
            border-radius: 4px 4px 0 0;
            background: linear-gradient(180deg, var(--purple) 0%, var(--purple-dark) 100%);
        }
        .price-history-bar-label {
            font-size: 13px;
            opacity: 0.7;
            margin-top: 3px;
        }
        .market-sell-btn {
            padding: 8px 4px;
            border-radius: 10px;
            border: none;
            background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
            box-shadow: 0 3px 0 #a8730f;
            color: var(--ink);
            font-family: inherit;
            font-size: 13px;
            font-weight: 800;
            cursor: pointer;
        }
        .market-sell-btn:active { transform: translateY(2px); box-shadow: none; }
        .market-sell-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

        .market-total-bar {
            background: linear-gradient(135deg, #2d5a1e 0%, #1a3a10 100%);
            border: 2px solid #4a9a2e;
            border-radius: 14px;
            padding: 14px 16px;
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .market-total-label { color: rgba(255,255,255,0.7); font-size: 12px; font-weight: 700; }
        .market-total-value { color: #86efac; font-size: 20px; font-weight: 800; }

        .market-mode-tabs {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            margin-bottom: 14px;
        }
        .market-mode-tab {
            background: linear-gradient(180deg, var(--parchment) 0%, var(--parchment-dark) 100%);
            border: 2px solid var(--wood);
            border-radius: 12px;
            box-shadow: 0 3px 0 var(--wood-dark);
            padding: 10px 4px;
            text-align: center;
            cursor: pointer;
            font-size: 13px;
            font-weight: 800;
            color: var(--ink);
        }
        .p2p-filter-tabs {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 6px;
        }
        .p2p-filter-tabs .market-mode-tab {
            padding: 7px 2px;
            font-size: 12px;
            border-radius: 9px;
        }
        .market-mode-tab.active {
            background: linear-gradient(180deg, var(--purple) 0%, var(--purple-dark) 100%);
            color: #fff;
            box-shadow: 0 3px 0 #4f3178;
        }
        .p2p-lot {
            background: #fff8e6;
            border: 2px solid var(--parchment-dark);
            border-radius: 14px;
            padding: 12px 14px;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .p2p-lot-emoji { font-size: 28px; }
        .p2p-lot-info { flex: 1; min-width: 0; }
        .p2p-lot-name { font-size: 14px; font-weight: 700; }
        .p2p-lot-meta { font-size: 13px; opacity: 0.7; font-weight: 600; margin-top: 2px; }
        .p2p-lot-seller { font-size: 12px; opacity: 0.55; font-weight: 600; }
        .p2p-lot-price { font-size: 14px; font-weight: 800; color: var(--gold-dark); text-align: right; }
        .p2p-buy-btn, .p2p-cancel-btn {
            border: none;
            border-radius: 10px;
            padding: 8px 12px;
            font-family: inherit;
            font-size: 13px;
            font-weight: 800;
            cursor: pointer;
            white-space: nowrap;
        }
        .p2p-buy-btn { background: linear-gradient(180deg, var(--leaf) 0%, var(--leaf-dark) 100%); color:#fff; box-shadow: 0 3px 0 #2c661b; }
        .p2p-buy-btn:active { transform: translateY(2px); box-shadow: none; }
        .p2p-cancel-btn { background: linear-gradient(180deg, var(--red) 0%, var(--red-dark) 100%); color:#fff; box-shadow: 0 3px 0 #8f3220; }
        .p2p-cancel-btn:active { transform: translateY(2px); box-shadow: none; }
        .p2p-pick-item {
            background: #fff8e6;
            border: 2px solid var(--parchment-dark);
            border-radius: 12px;
            padding: 10px 12px;
            margin-bottom: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .p2p-pick-item.selected { border-color: var(--purple); background: #f3ecff; }
        .p2p-form-row { display: flex; gap: 8px; margin: 12px 0; }
        .skip-btn {
            margin-top: 4px;
            width: 100%;
            background: linear-gradient(180deg, #a78bfa 0%, #7c3aed 100%);
            border: none;
            border-radius: 8px;
            color: #fff;
            font-family: inherit;
            font-size: 12px;
            font-weight: 800;
            padding: 4px 6px;
            cursor: pointer;
            box-shadow: 0 2px 0 #4f2d99;
        }
        .skip-btn:active { transform: translateY(2px); box-shadow: none; }
        .sell-btn {
            margin-top: 4px;
            width: 100%;
            background: linear-gradient(180deg, #fbbf24 0%, #b45309 100%);
            border: none;
            border-radius: 8px;
            color: #fff;
            font-family: inherit;
            font-size: 12px;
            font-weight: 800;
            padding: 4px 6px;
            cursor: pointer;
            box-shadow: 0 2px 0 #7c3a05;
        }
        .sell-btn:active { transform: translateY(2px); box-shadow: none; }

        /* Внутри плитки грядки/животного — ряд компактных кнопок снизу,
           а не полноширинные блоки, иначе они закрывают собой картинку. */
        .plot-actions {
            position: relative;
            width: 100%;
            margin-top: auto;
            padding-top: 6px;
            display: flex;
            gap: 3px;
            z-index: 2;
        }
        .plot-actions .skip-btn, .plot-actions .sell-btn {
            flex: 1;
            width: auto;
            min-width: 0;
            margin-top: 0;
            padding: 4px 3px;
            font-size: 13px;
            line-height: 1.3;
            border-radius: 7px;
            box-shadow: 0 2px 0 rgba(0,0,0,0.35);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .stars-tile {
            background: linear-gradient(135deg, #2d1060 0%, #7c3aed 50%, #c084fc 100%);
            border-radius: 20px;
            padding: 16px;
            margin-bottom: 16px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 12px;
            box-shadow: 0 6px 18px rgba(124,58,237,0.35);
            border: 2px solid rgba(255,255,255,0.25);
            transition: transform 0.12s ease, box-shadow 0.12s ease;
        }
        .stars-tile:active { transform: scale(0.95); box-shadow: 0 2px 8px rgba(124,58,237,0.35); }
        .stars-tile-icon { font-size: 34px; }
        .stars-tile-name { font-size: 15px; font-weight: 800; color: #fff; }
        .stars-tile-hint { font-size: 13px; color: rgba(255,255,255,0.8); font-weight: 600; margin-top: 2px; }

        /* ─── Компактная сетка плиток профиля (2 колонки вместо разрастающегося столбца) ─── */
        .stars-tile-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin-bottom: 16px;
        }
        .stars-tile.compact {
            flex-direction: column;
            align-items: flex-start;
            padding: 12px;
            margin-bottom: 0;
            gap: 6px;
            animation: tileFadeIn 0.35s ease backwards;
        }
        .stars-tile-grid .stars-tile.compact:nth-child(1) { animation-delay: 0.02s; }
        .stars-tile-grid .stars-tile.compact:nth-child(2) { animation-delay: 0.06s; }
        .stars-tile-grid .stars-tile.compact:nth-child(3) { animation-delay: 0.10s; }
        .stars-tile-grid .stars-tile.compact:nth-child(4) { animation-delay: 0.14s; }
        .stars-tile-grid .stars-tile.compact:nth-child(5) { animation-delay: 0.18s; }
        .stars-tile-grid .stars-tile.compact:nth-child(6) { animation-delay: 0.22s; }
        @keyframes tileFadeIn {
            from { opacity: 0; transform: translateY(6px) scale(0.96); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }
        .stars-tile.compact .stars-tile-icon { font-size: 26px; }
        .stars-tile.compact .stars-tile-name { font-size: 13px; }
        .stars-tile.compact .stars-tile-hint { font-size: 12px; line-height: 1.3; }

        .stars-item {
            background: #fff8e6;
            border: 2px solid var(--parchment-dark);
            border-radius: 14px;
            padding: 12px;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .stars-item-emoji { font-size: 30px; }
        .stars-item-info { flex: 1; min-width: 0; }
        .stars-item-name { font-size: 13px; font-weight: 700; }
        .stars-item-desc { font-size: 13px; opacity: 0.65; font-weight: 600; margin-top: 2px; }
        .stars-buy-btn {
            background: linear-gradient(180deg, #a78bfa 0%, #7c3aed 100%);
            border: none;
            border-radius: 10px;
            color: #fff;
            font-family: inherit;
            font-size: 12px;
            font-weight: 800;
            padding: 8px 12px;
            cursor: pointer;
            box-shadow: 0 3px 0 #4f2d99;
            white-space: nowrap;
        }
        .stars-buy-btn:active { transform: translateY(2px); box-shadow: none; }

        .p2p-form-row input {
            flex: 1;
            border: 2px solid var(--parchment-dark);
            border-radius: 10px;
            padding: 10px;
            font-family: inherit;
            font-size: 14px;
            font-weight: 700;
            text-align: center;
        }
        .market-sell-all-btn {
            background: linear-gradient(180deg, #4ade80 0%, #16a34a 100%);
            border: none;
            border-radius: 12px;
            box-shadow: 0 4px 0 #14532d;
            color: #fff;
            font-family: inherit;
            font-size: 14px;
            font-weight: 800;
            padding: 10px 18px;
            cursor: pointer;
        }
        .market-sell-all-btn:active { transform: translateY(3px); box-shadow: none; }

        /* ─────────────────────── ПЕТУШИНЫЕ БОИ — ГЛАВНОЕ МЕНЮ ─────────────────────── */
        .rooster-menu-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
            margin-bottom: 12px;
        }
        .rooster-menu-tile {
            background: linear-gradient(180deg, var(--parchment) 0%, var(--parchment-dark) 100%);
            border: 2px solid var(--wood);
            border-radius: 16px;
            box-shadow: 0 3px 0 var(--wood-dark);
            padding: 14px 8px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            font-family: inherit;
            color: var(--wood-dark);
            font-weight: 700;
            font-size: 13px;
            cursor: pointer;
            text-align: center;
        }
        .rooster-menu-tile:active { transform: translateY(2px); box-shadow: none; }
        .rooster-menu-emoji { font-size: 26px; }
        .rooster-menu-hint { font-size: 12px; font-weight: 600; opacity: 0.65; }

        /* ─────────────────────── ЧТО НОВОГО (свайп-обучалка) ─────────────────────── */
        .whatsnew-content {
            padding: 0;
            max-width: 420px;
            overflow: hidden;
            max-height: 86vh;
            display: flex;
            flex-direction: column;
        }
        .whatsnew-track {
            display: flex;
            overflow-x: auto;
            scroll-snap-type: x mandatory;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
        }
        .whatsnew-track::-webkit-scrollbar { display: none; }
        .whatsnew-slide {
            flex: 0 0 100%;
            scroll-snap-align: center;
            padding: 26px 22px 10px;
            text-align: center;
            box-sizing: border-box;
        }
        .whatsnew-emoji {
            font-size: 52px;
            line-height: 1;
            margin-bottom: 14px;
            filter: drop-shadow(0 3px 0 rgba(0,0,0,0.15));
        }
        .whatsnew-title {
            font-size: 19px;
            font-weight: 800;
            color: var(--wood-dark);
            margin-bottom: 10px;
        }
        .whatsnew-body {
            font-size: 13.5px;
            line-height: 1.55;
            color: var(--ink);
            opacity: 0.85;
        }
        .whatsnew-body b { color: var(--wood-dark); }
        .whatsnew-list {
            text-align: left;
            margin-top: 12px;
            padding: 0;
            list-style: none;
        }
        .whatsnew-list li {
            font-size: 13px;
            padding: 7px 0 7px 26px;
            position: relative;
            border-bottom: 1px solid rgba(0,0,0,0.06);
        }
        .whatsnew-list li:last-child { border-bottom: none; }
        .whatsnew-list li::before {
            content: attr(data-emoji);
            position: absolute;
            left: 0;
            top: 6px;
            font-size: 14px;
        }
        .whatsnew-dots {
            display: flex;
            justify-content: center;
            gap: 7px;
            padding: 14px 0 4px;
        }
        .whatsnew-dot {
            width: 7px; height: 7px;
            border-radius: 50%;
            background: var(--parchment-dark);
            border: 1px solid var(--wood);
            transition: transform 0.2s, background 0.2s;
        }
        .whatsnew-dot.active {
            background: var(--gold);
            transform: scale(1.3);
        }
        .whatsnew-footer {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 20px 20px;
        }
        .whatsnew-skip {
            background: none;
            border: none;
            color: var(--wood-dark);
            opacity: 0.6;
            font-weight: 700;
            font-size: 12px;
            font-family: inherit;
            cursor: pointer;
            padding: 8px;
            flex-shrink: 0;
        }
        .whatsnew-next { flex: 1; margin: 0; }

        /* ==================== ⏳ ЭКРАН ЗАГРУЗКИ ==================== */
        /* Разметку кладёт js/splash.js. Фон непрозрачный, в цвет страницы —
           шторка должна читаться как "приложение ещё собирается", а не
           всплывающее окно поверх готового экрана. */
        .splash {
            position: fixed; inset: 0; z-index: 999;
            display: flex; flex-direction: column;
            align-items: center; justify-content: center; gap: 18px;
            background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 100%);
            opacity: 1;
            transition: opacity 0.32s ease;
        }
        .splash.gone { opacity: 0; pointer-events: none; }
        .splash-art { position: relative; width: 92px; height: 92px; }
        .splash-ring {
            position: absolute; inset: 0;
            border-radius: 50%;
            border: 4px solid rgba(255,255,255,0.55);
            border-top-color: var(--gold-dark);
            animation: splash-spin 1s linear infinite;
        }
        .splash-em {
            position: absolute; inset: 0;
            display: flex; align-items: center; justify-content: center;
            font-size: 40px;
            animation: splash-sway 2.4s ease-in-out infinite;
        }
        .splash-name {
            font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em;
            color: var(--ink);
            text-shadow: 0 1px 2px rgba(255,255,255,0.5);
        }
        .splash-bar {
            width: 160px; height: 5px; border-radius: 999px;
            background: rgba(90,61,34,0.18); overflow: hidden;
        }
        .splash-bar i {
            display: block; width: 40%; height: 100%; border-radius: inherit;
            background: var(--gold-dark);
            animation: splash-run 1.1s ease-in-out infinite;
        }
        @keyframes splash-spin { to { transform: rotate(360deg); } }
        @keyframes splash-sway {
            0%, 100% { transform: rotate(-8deg); }
            50% { transform: rotate(8deg); }
        }
        @keyframes splash-run {
            from { transform: translateX(-110%); }
            to   { transform: translateX(260%); }
        }
        @media (prefers-reduced-motion: reduce) {
            .splash-ring, .splash-bar i, .splash-em { animation: none; }
        }
