/* Косынка VK Mini App — зелёное сукно, золото. Тема единая (тёмная). */
:root {
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --bg-0: #0f4a34;
    --bg-1: #06231a;
    --felt: radial-gradient(120% 70% at 50% -10%, rgba(40, 160, 110, .28), transparent 60%),
            radial-gradient(90% 60% at 50% 115%, rgba(20, 110, 80, .22), transparent 60%),
            linear-gradient(180deg, var(--bg-0), var(--bg-1) 72%);

    --text: #eefff5;
    --text-dim: #8fc7ab;

    --gold-1: #f6df9c;
    --gold-2: #d4a941;
    --gold-3: #9c7420;

    --panel: rgba(10, 46, 32, .6);
    --panel-border: rgba(120, 220, 170, .28);
    --panel-glow: 0 0 18px rgba(30, 160, 100, .18), inset 0 1px 0 rgba(255,255,255,.05);

    --red: #d23b4a;
    --black: #16233a;
    --accent: #3fbf7d;
    --success: #63d99a;
    --coach-bg: #0b3526;
    --coach-border: rgba(246, 223, 156, .72);

    --card-w: clamp(36px, 12.4vw, 60px);
    --card-h: calc(var(--card-w) * 1.423);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
html, body { height: 100%; min-height: 100%; overscroll-behavior: none; overflow-x: hidden; }
body {
    font-family: var(--font); color: var(--text); font-size: 15px; line-height: 1.45;
    -webkit-font-smoothing: antialiased; background: var(--felt); background-attachment: fixed;
    touch-action: none;
}
.hidden { display: none !important; }
[hidden] { display: none !important; }
#app { min-height: 100%; min-height: 100dvh; display: flex; flex-direction: column; }
.screen { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }

/* ---------- Меню ---------- */
#screen-menu { align-items: center; justify-content: safe center; gap: 6px; overflow-y: auto; touch-action: pan-y; }
.brand { text-align: center; margin-bottom: 10px; }
.brand-suits { font-size: 30px; letter-spacing: 6px; margin-bottom: 4px; }
.brand-suits .red { color: var(--red); } .brand-suits .blk { color: var(--gold-1); }
.menu-title {
    font-size: 48px; font-weight: 800; letter-spacing: 1px;
    background: linear-gradient(180deg, var(--gold-1) 20%, var(--gold-2) 62%, var(--gold-3));
    -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 3px 12px rgba(212, 169, 65, .35));
}
.menu-subtitle { font-size: 12px; font-weight: 700; letter-spacing: 2.4px; text-transform: uppercase; color: var(--text-dim); margin: -2px 0 18px; }

.menu-actions { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 10px; }
.mode-card { display: flex; align-items: center; gap: 14px; text-align: left; font-family: var(--font); color: var(--text); cursor: pointer; background: var(--panel); border: 1.5px solid var(--panel-border); border-radius: 16px; padding: 14px 15px; box-shadow: var(--panel-glow); transition: transform .07s ease; position: relative; }
.mode-card:active { transform: scale(.98); }
.mode-card-primary { border-color: rgba(120, 220, 170, .6); box-shadow: 0 0 26px rgba(50, 180, 120, .32), inset 0 1px 0 rgba(255,255,255,.08); background: linear-gradient(165deg, rgba(30, 120, 80, .5), rgba(10, 46, 32, .7)); }
.daily-card { border-color: rgba(212,169,65,.55); background: linear-gradient(145deg, rgba(156,116,32,.22), rgba(10,46,32,.72)); }
.daily-card.done { border-color: rgba(63,191,125,.65); }
.daily-icon { background: rgba(90,65,12,.35); }
.daily-check { margin-left: auto; width: 25px; height: 25px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--accent); color: #063; font-weight: 900; }
.journey-card { border-color: rgba(145,120,235,.55); background: linear-gradient(145deg, rgba(83,55,145,.25), rgba(10,46,32,.72)); }
.journey-icon { background: rgba(55,36,100,.4); }
.level-badge { margin-left: auto; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 15px; display: flex; align-items: center; justify-content: center; background: linear-gradient(145deg, var(--gold-1), var(--gold-2)); color: #503600; font-size: 13px; font-weight: 900; box-shadow: 0 2px 10px rgba(212,169,65,.25); }
.mode-icon { flex: none; width: 48px; height: 48px; border-radius: 13px; font-size: 24px; background: rgba(6, 30, 20, .6); border: 1px solid var(--panel-border); display: flex; align-items: center; justify-content: center; }
.mode-name { display: block; font-size: 16.5px; font-weight: 800; }
.mode-sub { display: block; font-size: 12.5px; color: var(--text-dim); margin-top: 1px; }

.opt-block { width: 100%; max-width: 400px; margin-top: 16px; }
.opt-label { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-dim); margin-bottom: 8px; text-align: center; }
.seg { display: flex; gap: 5px; background: var(--panel); border: 1.5px solid var(--panel-border); border-radius: 14px; padding: 5px; box-shadow: var(--panel-glow); }
.seg-btn { flex: 1; padding: 10px 4px; border: none; border-radius: 10px; cursor: pointer; background: transparent; color: var(--text-dim); font-family: var(--font); }
.seg-btn b { font-size: 13px; font-weight: 700; }
.seg-btn.active { background: linear-gradient(165deg, rgba(212,169,65,.28), rgba(156,116,32,.2)); color: var(--gold-1); box-shadow: inset 0 0 0 1px rgba(212,169,65,.4); }
.btn-play { width: 100%; margin-top: 12px; }

.menu-stats { display: flex; align-items: stretch; gap: 4px; margin-top: 18px; width: 100%; max-width: 400px; background: var(--panel); border: 1.5px solid var(--panel-border); border-radius: 14px; padding: 12px 8px; box-shadow: var(--panel-glow); }
.stat-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stat-item b { font-size: 20px; font-weight: 800; color: var(--gold-1); }
.stat-item span { font-size: 10.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .4px; text-align: center; }
.stat-sep { width: 1px; background: var(--panel-border); }
.rules-link { min-height: 44px; padding: 10px 12px; margin-top: 8px; background: none; border: none; cursor: pointer; color: var(--text-dim); font-family: var(--font); font-size: 14px; font-weight: 600; text-decoration: underline; }

/* ---------- Путь игрока ---------- */
.journey-panel { width: min(460px, 100%); text-align: left; gap: 14px; }
.journey-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; width: 100%; }
.journey-head .overlay-title, .journey-head .overlay-sub { text-align: left; }
.journey-head .icon-btn { font-size: 24px; }
.journey-section { width: 100%; }
.journey-section h2 { margin-bottom: 8px; color: var(--gold-1); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }
.mission-list { display: grid; gap: 8px; }
.mission-item { padding: 10px 11px; border: 1px solid var(--panel-border); border-radius: 11px; background: rgba(0,0,0,.14); }
.mission-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 700; }
.mission-xp { color: var(--gold-1); white-space: nowrap; }
.progress-track { height: 6px; margin-top: 7px; overflow: hidden; border-radius: 3px; background: rgba(255,255,255,.1); }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--gold-2)); }
.mission-item.done { border-color: rgba(63,191,125,.55); }
.achievement-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.achievement-item { min-height: 72px; padding: 8px 5px; border: 1px solid var(--panel-border); border-radius: 10px; background: rgba(0,0,0,.13); color: var(--text-dim); text-align: center; font-size: 10px; line-height: 1.2; }
.achievement-item.locked { filter: grayscale(1); opacity: .48; }
.achievement-icon { display: block; margin-bottom: 3px; font-size: 20px; }
.rating-seg { margin-bottom: 9px; }
.rating-status { padding: 10px; color: var(--text-dim); font-size: 12px; text-align: center; }
.rating-list { list-style: none; display: grid; gap: 4px; }
.rating-row { display: grid; grid-template-columns: 28px 1fr auto; gap: 7px; align-items: center; padding: 7px 8px; border-radius: 8px; background: rgba(0,0,0,.13); font-size: 12px; }
.rating-row.you { background: rgba(212,169,65,.17); box-shadow: inset 0 0 0 1px rgba(212,169,65,.38); }
.rating-rank { color: var(--gold-1); font-weight: 900; }
.rating-value { color: var(--text-dim); font-size: 10.5px; white-space: nowrap; }

/* ---------- Шапка игры ---------- */
.game-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.icon-btn { flex: none; width: 38px; height: 38px; border-radius: 12px; cursor: pointer; background: var(--panel); border: 1.5px solid var(--panel-border); color: var(--text); font-size: 18px; display: flex; align-items: center; justify-content: center; font-family: var(--font); }
.icon-btn:active { transform: scale(.94); }
.hud { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; }
.hud-item { display: flex; align-items: center; gap: 4px; font-weight: 700; font-size: 12.5px; color: var(--text); background: var(--panel); border: 1.5px solid var(--panel-border); border-radius: 10px; padding: 6px 9px; }
.hud-ico { font-size: 11px; }
.daily-chip { align-self: center; margin: -2px 0 7px; padding: 4px 10px; border: 1px solid rgba(212,169,65,.5); border-radius: 999px; background: rgba(90,65,12,.28); color: var(--gold-1); font-size: 10.5px; font-weight: 800; letter-spacing: .3px; }

/* ---------- Стол ---------- */
.table-wrap { flex: 1; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.top-row { display: flex; justify-content: space-between; gap: 6px; }
.stock-waste { display: flex; gap: calc(var(--card-w) * .18); }
.foundations { display: flex; gap: calc(var(--card-w) * .12); }
.pile { width: var(--card-w); height: var(--card-h); border-radius: 7px; position: relative; }
.pile-stock, .pile-waste, .pile-foundation {
    border: 1.5px dashed rgba(255,255,255,.22); background: rgba(0,0,0,.14);
}
.pile.is-empty.pile-foundation::after { content: attr(data-suit-ico); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: calc(var(--card-w) * .5); color: rgba(255,255,255,.28); }
.pile.is-empty.pile-foundation[data-suit="H"]::after, .pile.is-empty.pile-foundation[data-suit="D"]::after { color: rgba(210,59,74,.35); }
.pile-stock.is-empty::after { content: '↺'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: calc(var(--card-w) * .42); color: rgba(255,255,255,.35); }

.tableau-row { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: calc(var(--card-w) * .1); min-height: 0; overflow-y: auto; overflow-x: hidden; padding-bottom: 12px; }
.pile-tableau { width: 100%; height: var(--card-h); justify-self: center; max-width: var(--card-w); border: 1.5px dashed rgba(255,255,255,.14); border-radius: 7px; }
/* Карты каскада ровно по ширине колонки — не вылезают за край на узких экранах. */
.pile-tableau .card { width: 100%; }

/* ---------- Карты ---------- */
.card { width: var(--card-w); height: var(--card-h); border-radius: calc(var(--card-w) * .13); user-select: none; flex: none; transition: box-shadow .1s; touch-action: none; }
.card.face {
    background: linear-gradient(160deg, #ffffff, #eef1f6);
    border: 1px solid rgba(0,0,0,.28);
    box-shadow: 0 2px 5px rgba(0,0,0,.35);
    color: var(--black);
}
.card.face.red { color: var(--red); }
.card.selected { box-shadow: 0 0 0 3px var(--gold-1), 0 4px 10px rgba(0,0,0,.4); }
.card .corner { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: .92; font-weight: 800; }
.card .corner.tl { left: calc(var(--card-w) * .08); top: calc(var(--card-w) * .05); }
.card .corner.br { right: calc(var(--card-w) * .08); bottom: calc(var(--card-w) * .05); transform: rotate(180deg); }
.card .c-rank { font-size: calc(var(--card-w) * .24); }
.card .c-suit { font-size: calc(var(--card-w) * .2); }
.card .center { position: absolute; inset: calc(var(--card-w) * .26) calc(var(--card-w) * .11); }
.card .pip { position: absolute; transform: translate(-50%, -50%); font-size: calc(var(--card-w) * .26); }
.card .pip.flip { transform: translate(-50%, -50%) rotate(180deg); }
.card .ace { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: calc(var(--card-w) * .58); }
.card .court { position: absolute; inset: 0; border: 1.5px solid currentColor; border-radius: 4px; opacity: .92; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.card .court b { font-size: calc(var(--card-w) * .42); font-weight: 800; line-height: 1; }
.card .court i { font-size: calc(var(--card-w) * .3); font-style: normal; }
.card.back { background: repeating-linear-gradient(48deg,#2f5c9b 0 7px,#22467a 7px 14px); border: 1.5px solid rgba(255,255,255,.42); box-shadow: 0 2px 5px rgba(0,0,0,.3), inset 0 0 0 3px rgba(255,255,255,.1); }
.card.back .back-pattern { position: absolute; inset: 6px; border-radius: 4px; border: 1px solid rgba(255,255,255,.28); background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.12), transparent 60%); }
.drag-ghost .card { box-shadow: 0 10px 26px rgba(0,0,0,.5); }
.hint-flash { animation: hintFlash .9s ease; border-radius: 7px; }
@keyframes hintFlash { 0%, 100% { box-shadow: none; } 40% { box-shadow: 0 0 0 3px var(--gold-1), 0 0 18px rgba(246,223,156,.7); } }

/* ---------- Инструменты ---------- */
.tools { display: flex; gap: 6px; justify-content: center; margin: 8px auto 0; width: 100%; }
.tool { flex: 1; max-width: 100px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px; border: 1.5px solid var(--panel-border); border-radius: 12px; background: var(--panel); color: var(--text-dim); font-family: var(--font); font-size: 10.5px; font-weight: 600; cursor: pointer; position: relative; }
.tool:active { transform: scale(.95); }
.tool:disabled { opacity: .4; }
.tool-ico { font-size: 18px; }
.count-badge { position: absolute; top: 3px; right: 5px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; background: var(--accent); color: #063; font-size: 9px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
#sound-row { display: flex; justify-content: center; margin-top: 8px; }

/* ---------- Кнопки ---------- */
.btn { font-family: var(--font); font-weight: 800; font-size: 16px; border: none; border-radius: 14px; padding: 14px 22px; cursor: pointer; color: #063; transition: transform .07s ease; }
.btn:active { transform: scale(.97); }
button:focus-visible, .card:focus-visible, .pile:focus-visible {
    outline: 3px solid var(--gold-1);
    outline-offset: 3px;
}
.btn-primary { background: linear-gradient(165deg, #f6df9c, #d4a941); box-shadow: 0 6px 18px rgba(180,140,40,.4), inset 0 1px 0 rgba(255,255,255,.35); color: #3a2a05; }
.btn-secondary { background: var(--panel); border: 1.5px solid var(--panel-border); font-size: 14px; padding: 11px 16px; color: var(--text); }
.btn-ghost { background: none; color: var(--text-dim); font-weight: 700; font-size: 14px; padding: 8px; }

/* ---------- Интерактивное обучение ---------- */
.tutorial-coach {
    position: fixed; z-index: 42; left: 50%; bottom: calc(82px + env(safe-area-inset-bottom));
    width: min(360px, calc(100vw - 24px)); transform: translateX(-50%);
    padding: 14px 15px; border: 1.5px solid var(--coach-border); border-radius: 16px;
    background: linear-gradient(165deg, rgba(18,70,49,.98), rgba(6,32,23,.98));
    box-shadow: 0 14px 36px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.08);
}
.tutorial-kicker { color: var(--gold-1); font-size: 10px; font-weight: 900; letter-spacing: 1.4px; text-transform: uppercase; }
.tutorial-title { margin-top: 2px; color: var(--text); font-size: 17px; font-weight: 850; }
.tutorial-text { margin-top: 3px; color: var(--text-dim); font-size: 13px; line-height: 1.35; }
.tutorial-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.tutorial-actions button { min-height: 44px; padding: 0 14px; border-radius: 10px; font: 800 13px var(--font); cursor: pointer; }
.tutorial-skip { border: 1px solid var(--panel-border); background: transparent; color: var(--text-dim); }
.tutorial-next { border: 0; background: var(--gold-1); color: #3a2a05; }
.tutorial-target { outline: 3px solid var(--gold-1) !important; outline-offset: 4px; animation: tutorialPulse 1.4s ease-in-out infinite; }
@keyframes tutorialPulse { 50% { filter: drop-shadow(0 0 9px rgba(246,223,156,.65)); } }

/* ---------- Оверлеи ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(4, 20, 12, .9); backdrop-filter: blur(6px); animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.overlay-card { width: 100%; max-width: 360px; max-height: calc(100dvh - 40px); overflow-y: auto; touch-action: pan-y; background: linear-gradient(180deg, #123f2c, #082018); border: 1.5px solid var(--panel-border); border-radius: 22px; padding: 26px 22px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.6); display: flex; flex-direction: column; gap: 12px; }
.overlay-emoji { font-size: 60px; }
.overlay-title { font-size: 24px; font-weight: 800; color: var(--gold-1); }
.overlay-time { font-size: 28px; font-weight: 800; color: var(--text); }
.overlay-record { font-size: 14px; font-weight: 800; color: #34c471; }
.overlay-daily { font-size: 14px; font-weight: 800; color: var(--gold-1); }
.share-row { display: flex; gap: 8px; }
.share-row .btn { flex: 1; }
.result-card { max-width: 420px; gap: 11px; border-color: rgba(212,169,65,.5); }
.result-mark { width: 48px; height: 48px; margin: 0 auto -3px; fill: var(--gold-1); filter: drop-shadow(0 4px 12px rgba(212,169,65,.3)); }
.result-score { display: flex; flex-direction: column; gap: 0; padding: 10px; border-block: 1px solid rgba(212,169,65,.25); }
.result-score span, .result-metrics span { color: var(--text-dim); font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.result-score strong { color: var(--gold-1); font-size: 34px; line-height: 1.08; }
.result-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.result-metrics > div { min-width: 0; padding: 8px 5px; border: 1px solid var(--panel-border); border-radius: 10px; background: rgba(0,0,0,.14); }
.result-metrics span, .result-metrics strong { display: block; }
.result-metrics strong { margin-top: 2px; overflow: hidden; color: var(--text); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.result-progress { padding: 10px 11px; border: 1px solid var(--panel-border); border-radius: 11px; background: rgba(0,0,0,.13); text-align: left; }
.result-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-dim); font-size: 11.5px; }
.result-progress-head strong { color: var(--success); text-align: right; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.result-actions .btn { min-height: 46px; padding: 10px 12px; }
.result-actions .btn-primary { grid-column: 1 / -1; }
.result-card > .btn-ghost { min-height: 44px; }
.rules-card { text-align: left; }
.rules-card .overlay-title { text-align: center; }
.rules-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.rules-list li { position: relative; padding-left: 26px; font-size: 14px; }
.rules-list li::before { content: '♠'; position: absolute; left: 0; top: 0; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: rgba(6, 30, 20, .95); border: 1.5px solid var(--panel-border); color: var(--text); padding: 11px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; z-index: 60; box-shadow: 0 8px 24px rgba(0,0,0,.4); max-width: 90%; text-align: center; }

@media (max-height: 700px) { .menu-title { font-size: 40px; } }
@media (max-width: 380px) {
    body.draw-three { --card-w: clamp(34px, 11vw, 44px); }
    .result-card { padding-inline: 15px; }
}
@media (max-height: 500px) and (min-width: 600px) {
    body.tutorial-active #screen-game {
        padding-right: calc(324px + max(12px, env(safe-area-inset-right)));
        --card-w: clamp(36px, 6.6vw, 54px);
    }
    .tutorial-coach { left: auto; right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); width: 300px; transform: none; }
    .tutorial-text { font-size: 12px; }
}
/* В широком VK-фрейме держим стол собранным и увеличиваем карты: без этого
   семь каскадов разъезжаются по всей ширине 1280px и теряют визуальную связь. */
@media (min-width: 800px) {
    #screen-game { width: min(100%, 960px); margin-inline: auto; --card-w: 72px; --card-h: calc(72px * 1.423); }
    .journey-panel {
        width: min(760px, 100%); max-width: 760px;
        display: grid; grid-template-columns: 1fr 1fr;
        grid-template-areas: "head head" "missions achievements" "rating rating";
        align-items: start; column-gap: 14px; row-gap: 10px;
    }
    .journey-panel > .journey-head { grid-area: head; }
    .journey-panel > .journey-section:nth-of-type(1) { grid-area: missions; }
    .journey-panel > .journey-section:nth-of-type(2) { grid-area: achievements; }
    .journey-panel > .journey-section:nth-of-type(3) { grid-area: rating; }
}
@media (min-width: 800px) and (max-height: 760px) {
    #screen-menu { gap: 3px; }
    .brand { margin-bottom: 0; }
    .brand-suits { font-size: 22px; margin-bottom: 0; }
    .menu-title { font-size: 36px; }
    .menu-subtitle { font-size: 10px; margin: -2px 0 6px; }
    .menu-actions { gap: 6px; }
    .mode-card { padding: 8px 12px; }
    .mode-icon { width: 40px; height: 40px; font-size: 20px; }
    .mode-name { font-size: 15px; }
    .mode-sub { font-size: 11.5px; }
    .opt-block { margin-top: 7px; }
    .opt-label { margin-bottom: 4px; }
    .seg-btn { padding: 7px 4px; }
    .rules-link, .cross-promo { margin-top: 7px; }
    .promo-label { margin-bottom: 4px; }
    .promo-card { padding: 7px 10px; }
}

/* ---------- Доработки качества: скролл каскадов, подсветка целей, тряска, сплэш ---------- */
.tableau-row { touch-action: pan-y; -webkit-overflow-scrolling: touch; }
.pile.drop-target { outline: 2px dashed var(--accent); outline-offset: 2px; box-shadow: 0 0 16px -2px var(--accent), inset 0 0 12px -4px var(--accent); }
.shake { animation: shake .34s cubic-bezier(.36,.07,.19,.97); }
@keyframes shake { 10%,90%{transform:translateX(-2px)} 20%,80%{transform:translateX(3px)} 30%,50%,70%{transform:translateX(-5px)} 40%,60%{transform:translateX(5px)} }
#splash { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: var(--felt); background-attachment: fixed; transition: opacity .35s ease; }
#splash.hide { opacity: 0; pointer-events: none; }
.splash-logo { font-size: 42px; letter-spacing: 8px; }
.splash-logo .red { color: var(--red); }
.splash-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.18); border-top-color: var(--gold-1); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.overlay-sub { font-size: 14px; color: var(--text-dim); margin-top: -2px; }

/* ---------- Кросс-промо (другие наши пасьянсы) ---------- */
.cross-promo { width: 100%; max-width: 400px; margin-top: 20px; }
.promo-label { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-dim); margin-bottom: 8px; text-align: center; }
.promo-row { display: flex; gap: 8px; }
.promo-card { flex: 1; display: flex; align-items: center; gap: 9px; padding: 11px 12px; border: 1.5px solid var(--panel-border); border-radius: 13px; background: var(--panel); box-shadow: var(--panel-glow); color: var(--text); font-family: var(--font); cursor: pointer; text-align: left; transition: transform .07s ease; }
.promo-card:active { transform: scale(.97); }
.promo-ico { flex: none; width: 30px; height: 30px; border-radius: 9px; font-size: 16px; background: rgba(0,0,0,.22); border: 1px solid var(--panel-border); display: flex; align-items: center; justify-content: center; }
.promo-name { font-size: 12.5px; font-weight: 700; line-height: 1.15; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
