/* Zobrazenie podľa šírky: desktop od 960 px, pod tým mobil so spodnou lištou. */
@media (max-width: 959px) {
    .hv-only-desktop {
        display: none !important;
    }
}

@media (min-width: 960px) {
    .hv-only-mobile {
        display: none !important;
    }
}

/* ---------- Rámec aplikácie ---------- */
.hv-shell {
    min-height: 100vh;
}

@media (min-width: 960px) {
    .hv-shell {
        display: grid;
        grid-template-columns: var(--hv-sidebar) minmax(0, 1fr);
    }
}

.hv-main {
    min-width: 0;
    padding: var(--hv-space-5) var(--hv-space-4) calc(var(--hv-tabbar) + var(--hv-space-6));
}

@media (min-width: 960px) {
    .hv-main {
        padding: var(--hv-space-8) var(--hv-space-10) 48px;
    }
}

.hv-page {
    display: flex;
    flex-direction: column;
    gap: var(--hv-space-5);
    max-width: 1160px;
    margin: 0 auto;
}

.hv-page--narrow {
    max-width: 860px;
}

.hv-page--section-gap {
    gap: var(--hv-space-6);
}

/* ---------- Bočný panel (desktop) ---------- */
.hv-side {
    display: none;
}

@media (min-width: 960px) {
    .hv-side {
        position: sticky;
        top: 0;
        display: flex;
        flex-direction: column;
        gap: var(--hv-space-5);
        height: 100vh;
        padding: var(--hv-space-5) var(--hv-space-4);
        border-right: 1px solid var(--hv-line);
        background: var(--hv-surface);
        overflow-y: auto;
    }
}

.hv-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px var(--hv-space-2);
    color: var(--hv-ink);
    font-size: 1.1875rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.hv a.hv-brand:hover {
    color: var(--hv-ink);
}

.hv-side__nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hv-side__link {
    display: flex;
    align-items: center;
    gap: var(--hv-space-3);
    height: 40px;
    padding: 0 var(--hv-space-3);
    border-radius: var(--hv-radius-sm);
    color: var(--hv-ink-muted);
    font-weight: 500;
    text-decoration: none;
}

.hv a.hv-side__link {
    color: var(--hv-ink-muted);
}

.hv a.hv-side__link:hover {
    background: var(--hv-stone-50);
    color: var(--hv-ink);
}

.hv a.hv-side__link[aria-current='page'] {
    background: var(--hv-fill);
    color: var(--hv-ink);
    font-weight: 600;
}

.hv-side__link[aria-current='page'] .hv-icon {
    color: var(--hv-amber-500);
}

.hv-side__foot {
    margin-top: auto;
    padding: var(--hv-space-2);
    color: var(--hv-ink-subtle);
    font-size: var(--hv-text-xs);
}

.hv-side__foot p {
    margin: 0 0 var(--hv-space-2);
}

/* Language switch in the sidebar footer */
.hv-lang {
    display: flex;
    gap: var(--hv-space-2);
}

.hv-lang a {
    padding: var(--hv-space-1) var(--hv-space-2);
    border-radius: var(--hv-radius-sm);
    color: var(--hv-ink-muted);
    font-weight: 600;
    text-decoration: none;
}

.hv-lang a[aria-current] {
    background: var(--hv-amber-100);
    color: var(--hv-ink);
}

/* ---------- Spodná lišta (mobil) ---------- */
.hv-tabbar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: start;
    height: var(--hv-tabbar);
    padding-top: var(--hv-space-2);
    border-top: 1px solid var(--hv-line);
    background: var(--hv-surface);
}

@media (min-width: 960px) {
    .hv-tabbar {
        display: none;
    }
}

.hv-tabbar__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-height: 48px;
    color: var(--hv-ink-muted);
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
}

.hv a.hv-tabbar__link {
    color: var(--hv-ink-muted);
}

.hv a.hv-tabbar__link[aria-current='page'] {
    color: var(--hv-ink);
    font-weight: 700;
}

.hv-tabbar__link[aria-current='page'] .hv-icon {
    color: var(--hv-amber-500);
}

.hv-tabbar__voice {
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    width: 72px;
    height: 80px;
    margin-top: -32px;
    background: var(--hv-accent);
    clip-path: var(--hv-hex-clip);
    color: var(--hv-ink);
}

.hv a.hv-tabbar__voice,
.hv a.hv-tabbar__voice:hover {
    color: var(--hv-ink);
}

/* ---------- Hlasový tok (celá obrazovka) ---------- */
.hv-voice {
    display: flex;
    flex-direction: column;
    gap: var(--hv-space-4);
    min-height: 100vh;
    max-width: 440px;
    margin: 0 auto;
    padding: var(--hv-space-4) var(--hv-space-4) 28px;
}

.hv-voice__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--hv-space-2);
    min-height: 48px;
}

.hv-voice__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-left: -8px;
    border-radius: var(--hv-radius-lg);
    color: var(--hv-ink);
}

.hv a.hv-voice__close,
.hv a.hv-voice__close:hover {
    color: var(--hv-ink);
}

.hv-voice__title {
    font-size: var(--hv-text-lg);
    font-weight: 700;
}

.hv-voice__hive-chip {
    display: flex;
    align-items: center;
    gap: var(--hv-space-3);
    padding: 10px 10px 10px 14px;
    border-radius: var(--hv-radius-xl);
    background: var(--hv-surface);
    box-shadow: var(--hv-shadow-card);
}

.hv-voice__hive-chip-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    line-height: 1.3;
}

.hv-voice__center {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    text-align: center;
}

.hv-voice__headline {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hv-voice__hint {
    color: var(--hv-ink-muted);
    font-size: 1rem;
}

.hv-voice__panel {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px var(--hv-space-4);
    border-radius: var(--hv-radius-xl);
    background: var(--hv-surface);
    box-shadow: var(--hv-ring);
}

.hv-voice__spacer {
    flex: 1;
}

.hv-rec-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 168px;
    height: 188px;
}

.hv-rec-btn__pulse,
.hv-rec-btn__core {
    position: absolute;
    inset: 0;
    background: var(--hv-rec);
    clip-path: var(--hv-hex-clip);
}

.hv-rec-btn__pulse {
    animation: hv-pulse 1.6s ease-out infinite;
}

.hv-rec-btn__core {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hv-rec-btn__stop {
    width: 48px;
    height: 48px;
    border-radius: var(--hv-radius-sm);
    background: #fff;
}

.hv-rec-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--hv-space-2);
    height: 36px;
    padding: 0 var(--hv-space-3);
    border-radius: 18px;
    background: var(--hv-rec);
    color: #fff;
    font-weight: 700;
}

.hv-rec-chip__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    animation: hv-blink 1s ease-in-out infinite;
}

.hv-timer {
    font-size: 4rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    line-height: 1;
}

.hv-wave {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 72px;
}

.hv-wave__bar {
    width: 5px;
    height: var(--h);
    border-radius: 3px;
    background: var(--hv-ink);
    transform-origin: center;
    animation: hv-wave var(--dur) ease-in-out var(--delay) infinite;
}

.hv-wave__bar--idle {
    background: var(--hv-stone-300);
}

.hv-steps {
    padding: 4px var(--hv-space-4);
    border-radius: var(--hv-radius-xl);
    background: var(--hv-surface);
    box-shadow: var(--hv-ring);
}

.hv-steps__item {
    display: flex;
    align-items: center;
    gap: var(--hv-space-3);
    min-height: 52px;
    border-bottom: 1px solid var(--hv-line-soft);
}

.hv-steps__item:last-child {
    border-bottom: 0;
}

.hv-steps__item--current {
    font-weight: 700;
}

.hv-steps__item--todo {
    color: var(--hv-ink-subtle);
}

.hv-spin {
    animation: hv-spin 1s linear infinite;
}

@keyframes hv-wave {
    0%,
    100% {
        transform: scaleY(0.35);
    }

    50% {
        transform: scaleY(1);
    }
}

@keyframes hv-pulse {
    0% {
        opacity: 0.55;
        transform: scale(0.92);
    }

    100% {
        opacity: 0;
        transform: scale(1.14);
    }
}

@keyframes hv-blink {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.25;
    }
}

@keyframes hv-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hv-wave__bar,
    .hv-rec-btn__pulse,
    .hv-rec-chip__dot,
    .hv-spin {
        animation: none;
    }
}
