/* ===== 20-layout.css — компоновка сцены, панели, вкладок ===== */

/* Масштабируемые контейнеры (сцена центрируется по X, якорь — снизу) */
.scalable,
#mainMenu,
.game {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    transform-origin: bottom center;
    z-index: 1;
}

/* Базовый размер сцены (масштабируется JS) */
#mainMenu,
.game {
    width: 400px;
    height: 600px;
}

/* Привязки по высоте (зависят от масштаба) */
.menu-panel {
    height: calc(70px * var(--ui-scale)) !important;
}

.menu-content {
    bottom: calc(150px * var(--ui-scale)) !important;
}

.menu-content.compact {
    bottom: calc(70px * var(--ui-scale)) !important;
}

.toast-wrap {
    bottom: calc(80px * var(--ui-scale)) !important;
}

/* Нижняя панель (табы) — по умолчанию внутри сцены у её низа */
.menu-panel {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    background: #0d1b33;
    border-top: 2px solid #243b6b;
    display: none;
    justify-content: stretch;
    align-items: center;
    box-sizing: border-box;
    z-index: 20;
}

.menu-panel.show {
    display: flex;
}

.menu-panel .slot {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Press Start 2P', monospace;
    font-size: 22px;
    color: #d9d9d9;
    cursor: pointer;
    background: linear-gradient(180deg, #2a3b5c 0%, #1b273f 100%);
    border-right: 1px solid #142033;
    box-shadow: var(--shadow-inner);
    transition: flex .25s, background .25s, color .25s;
}

.menu-panel .slot:last-child {
    border-right: none;
}

.menu-panel .slot.focused {
    flex: 1.4;
    background: linear-gradient(180deg, #ffd84a 0%, #e6a800 100%);
    color: #2b1d00;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, .55);
    box-shadow: var(--shadow-inner), var(--shadow-1);
}

/* Область контента вкладок (над сценой) */
.menu-content {
    position: absolute;
    top: 16px;
    left: 12px;
    right: 12px;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    text-align: center;
    padding: 16px;
    overflow: hidden;
    /* скроллим не её, а внутренние области (например, #shopInline) */
}

.menu-content .tab {
    display: none;
}

.menu-content .tab.active {
    display: block;
}