/* ── раскладка: шапка / полка / статус / панель / прогресс ───── */

.app {
    height: 100svh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto auto;
    /* minmax(0, …): иначе колонка растягивается под собственную ширину
       поля поиска, и страница уезжает вбок */
    grid-template-columns: minmax(0, 1fr);

    padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
    overflow: hidden;
}

.topbar {
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 8px 0 16px;
}

.wordmark {
    font-size: 13px;
    font-weight: var(--font-weight-light);
    letter-spacing: .32em;
    text-transform: lowercase;
    color: var(--muted);
    user-select: none;
}

.main {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Сцена — плоский контейнер: от её размера считается --vinyl-size
   (container query), она ловит касания. Внутри две части: 3D-полка
   (.stage) и слой размытия поверх неё (.shelf-blur). Слой нельзя
   класть в 3D: там он встал бы плоскостью между конвертами, и
   выступающие корешки оказались бы перед ним. */
.scene {
    position: relative;
    height: 94%;
    width: 100%;

    container-type: size;
    touch-action: none;
}

.stage {
    position: absolute;
    inset: 0;

    display: flex;
    justify-content: center;

    perspective: var(--perspective);

    /* звено цепочки 3D-контекста. Chrome обходится без него,
       WebKit теряет перспективу, если хоть одно звено плоское */
    transform-style: preserve-3d;
}

/* ── пустая полка ─────────────────────────────────────────── */
.empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 24px;
    text-align: center;
}

.empty__disc {
    width: 120px;
    height: 120px;
    fill: none;
    stroke: var(--line);
    stroke-width: 1;
    margin-bottom: 6px;
}

.empty__title {
    font-size: 20px;
    font-weight: 400;
}

.empty__hint,
.empty__install {
    max-width: 30ch;
    font-size: 14px;
    line-height: 1.45;
    color: var(--muted);
}

.empty__install {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
}

/* ── перетаскивание файлов на окно ───────────────────────────── */
.dropzone {
    position: absolute;
    inset: 12px;
    z-index: 30;
    display: grid;
    place-items: center;

    border: 1px dashed var(--line-strong);
    border-radius: 24px;
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    font-size: 15px;

    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-fast) var(--ease-out);
}
.is-dropping .dropzone { opacity: 1; }

/* ── строка статуса ───────────────────────────────────────────── */
.status {
    min-height: 1.4em;
    padding: 0 16px 2px;
    text-align: center;
    font-size: 12px;
    color: var(--muted);

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
