/* ==========================================================================
   Premenné
   ========================================================================== */

.lf {
    --lf-red: #B4121B;
    --lf-red-hover: #9A0F17;
    --lf-red-dark: #7C0E15;
    --lf-ink: #241C1A;
    --lf-text: #554945;
    --lf-muted: #867B76;
    --lf-line: #E3D3BC;
    --lf-line-soft: #EFE3D2;
    --lf-cream: #FBF4E9;
    --lf-sand: #F3E4D0;
    --lf-chip: #EFDFC8;
    --lf-white: #FFFFFF;
    --lf-green-bg: #E7F4EB;
    --lf-green-line: #BFE2CB;
    --lf-green: #14522B;
    --lf-vendor-bg: #FDF4F4;
    --lf-vendor-line: #EBC4C6;
    --lf-blue-bg: #E8EEF7;
    --lf-blue: #2B4C7E;

    --lf-font-head: 'Bitter', Georgia, serif;
    --lf-font-text: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --lf-fs-h1: calc(var(--hfs-h1, 48px) * 0.83);
    --lf-fs-h2: var(--hfs-h3, 32px);
    --lf-fs-h3: var(--hfs-h4, 24px);
    --lf-fs-box: calc(var(--hfs-text-m, 16px) * 1);
    --lf-fs-stat: var(--hfs-h4, 24px);
    --lf-fs-body: calc(var(--hfs-text-m, 16px) * 0.94);
    --lf-fs-m: var(--hfs-text-s, 14px);
    --lf-fs-s: calc(var(--hfs-text-s, 14px) * 0.92);
    --lf-fs-xs: calc(var(--hfs-text-s, 14px) * 0.86);

    --lf-r-lg: 22px;
    --lf-r-md: 16px;
    --lf-r-sm: 10px;
    --lf-gap: 44px;
    --lf-aside: 324px;

    font-family: var(--lf-font-text);
    color: var(--lf-text);
    font-size: var(--lf-fs-m);
    line-height: 1.6;
    box-sizing: border-box;
}

.lf *,
.lf *::before,
.lf *::after {
    box-sizing: inherit;
}

.lf a {
    color: inherit;
    text-decoration: none;
}

.lf [hidden] {
    display: none !important;
}

/* ==========================================================================
   Základné prvky
   ========================================================================== */

.lf-ico {
    display: inline-flex;
    width: 1em;
    height: 1em;
    flex: none;
}

.lf-ico svg {
    width: 100%;
    height: 100%;
}

.lf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 46px;
    padding: 10px 22px;
    border: 1.5px solid transparent;
    border-radius: 999px;
    font-family: var(--lf-font-text);
    font-size: var(--lf-fs-m);
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s;
    white-space: nowrap;
}

.lf .lf-btn--primary {
    background: var(--lf-red);
    border-color: var(--lf-red);
    color: var(--lf-white);
}

.lf .lf-btn--primary:hover {
    background: var(--lf-red-hover);
    border-color: var(--lf-red-hover);
    color: var(--lf-white);
}

.lf .lf-btn--primary.is-on {
    background: var(--lf-white);
    color: var(--lf-red);
}

.lf .lf-btn[data-lf-follow].is-on {
    background: var(--lf-green);
    border-color: var(--lf-green);
    color: var(--lf-white);
}

.lf .lf-btn[data-lf-follow].is-on:hover {
    background: #0E3F20;
    border-color: #0E3F20;
    color: var(--lf-white);
}

.lf .lf-btn--outline {
    background: var(--lf-white);
    border-color: var(--lf-red);
    color: var(--lf-red);
}

.lf .lf-btn--outline:hover {
    background: var(--lf-red);
    color: var(--lf-white);
}

.lf .lf-btn--ghost {
    background: var(--lf-white);
    border-color: var(--lf-line);
    color: var(--lf-ink);
}

.lf .lf-btn--ghost:hover {
    border-color: var(--lf-red);
    color: var(--lf-red);
}

.lf-btn--sm {
    min-height: 38px;
    padding: 8px 18px;
    font-size: var(--lf-fs-s);
}

.lf-btn--block {
    display: flex;
    width: 100%;
}

.lf-btn--more {
    font-family: var(--lf-font-head);
    font-weight: 700;
    min-height: 52px;
    padding: 12px 34px;
}

.lf-btn .lf-ico {
    font-size: 1.15em;
}

.lf-btn[disabled],
.lf-btn.is-loading {
    opacity: .6;
    pointer-events: none;
}

.lf-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 11px 4px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: var(--lf-font-head);
    font-size: calc(var(--hfs-text-s, 14px) * 0.75);
    font-weight: 700;
    letter-spacing: .05em;
    line-height: 1.35;
    text-transform: uppercase;
    white-space: nowrap;
    vertical-align: middle;
}

.lf-badge--pin {
    background: var(--lf-chip);
    color: var(--lf-red-dark);
}

.lf-badge--solved {
    background: var(--lf-green-bg);
    border-color: var(--lf-green-line);
    color: var(--lf-green);
}

.lf-badge--vendor {
    background: var(--lf-white);
    border-color: var(--lf-red);
    color: var(--lf-red);
}

.lf-badge--none {
    background: var(--lf-blue-bg);
    border-color: #C3CDEA;
    color: var(--lf-blue);
}

.lf-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.lf-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.lf .lf-tag {
    display: inline-flex;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--lf-chip);
    color: var(--lf-red-dark);
    font-size: var(--lf-fs-xs);
    font-weight: 700;
    line-height: 1.5;
    transition: background-color .2s;
}

.lf .lf-tag:hover {
    background: #E6D1B4;
}

.lf-dot {
    margin: 0 8px;
    color: var(--lf-line);
}

.lf-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--lf-chip);
    color: var(--lf-red-dark);
    font-family: var(--lf-font-head);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    overflow: hidden;
}

.lf-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lf-avatar--sm {
    width: 36px;
    height: 36px;
    font-size: 13px;
}

.lf-avatar--lg {
    width: 48px;
    height: 48px;
    font-size: 16px;
}

.lf-avatar--vendor {
    background: var(--lf-red);
    color: var(--lf-white);
}

.lf-avatar--vendor img {
    width: 70%;
    height: 70%;
    object-fit: contain;
}

.lf-eyebrow {
    margin-bottom: 4px;
    color: var(--lf-red);
    font-size: var(--lf-fs-xs);
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.lf .lf-h2 {
    margin: 0;
    color: #000;
    text-transform: none;
    font-family: var(--lf-font-head);
    font-size: var(--lf-fs-h2);
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.2;
}

.lf-center {
    display: flex;
    justify-content: center;
    padding: 24px 0 8px;
}

.lf-empty {
    padding: 48px 24px;
    border-bottom: 1px solid var(--lf-line);
    color: var(--lf-muted);
    text-align: center;
}

.lf-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 100000;
    padding: 12px 20px;
    border-radius: 999px;
    background: var(--lf-ink, #241C1A);
    color: #fff;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    box-shadow: 0 10px 30px rgba(36, 28, 26, .25);
    transform: translate(-50%, 20px);
    opacity: 0;
    transition: opacity .25s, transform .25s;
    pointer-events: none;
}

.lf-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ==========================================================================
   Vyhľadávanie
   ========================================================================== */

.lf-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 540px;
    min-height: 56px;
    padding: 4px 4px 4px 22px;
    border: 1px solid var(--lf-line);
    border-radius: 999px;
    background: var(--lf-white);
    box-shadow: 0 6px 20px rgba(124, 14, 21, .05);
    transition: border-color .2s, box-shadow .2s;
}

.lf-search:focus-within {
    border-color: var(--lf-red);
    box-shadow: 0 0 0 4px rgba(180, 18, 27, .08);
}

.lf-search > .lf-ico {
    color: var(--lf-red);
    font-size: 16px;
}

.lf-search input[type="search"] {
    flex: 1;
    min-width: 0;
    height: 46px;
    margin: 0;
    padding: 0 12px;
    border: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
    color: var(--lf-ink);
    font-family: var(--lf-font-text);
    font-size: var(--lf-fs-m);
}

.lf-search input::placeholder {
    color: var(--lf-muted);
}

.lf-search__btn {
    height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: var(--lf-red);
    color: var(--lf-white);
    font-family: var(--lf-font-text);
    font-size: var(--lf-fs-m);
    font-weight: 600;
    cursor: pointer;
    transition: background-color .2s;
}

.lf-search__btn:hover {
    background: var(--lf-red-hover);
}

/* ==========================================================================
   Archív – lišta s filtrami
   ========================================================================== */

.lf-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--lf-line);
    margin-bottom: 28px;
}

.lf-tabs {
    display: flex;
    flex: 1;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.lf-tabs::-webkit-scrollbar {
    display: none;
}

.lf .lf-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: none;
    padding: 9px 18px;
    border: 1px solid var(--lf-line);
    border-radius: 999px;
    background: var(--lf-white);
    color: var(--lf-ink);
    font-size: var(--lf-fs-m);
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    transition: border-color .2s, background-color .2s, color .2s;
}

.lf .lf-tab:hover {
    border-color: var(--lf-red);
    color: var(--lf-red);
}

.lf .lf-tab.is-active {
    background: var(--lf-red);
    border-color: var(--lf-red);
    color: var(--lf-white);
}

.lf-tab__count {
    color: var(--lf-muted);
    font-size: .9em;
}

.lf-tab.is-active .lf-tab__count {
    color: rgba(255, 255, 255, .8);
}

.lf-toolbar__count {
    flex: none;
    color: var(--lf-muted);
    font-size: var(--lf-fs-s);
}

.lf-toolbar__count strong {
    color: var(--lf-ink);
}

.lf-drawer-toggle {
    display: none;
    align-items: center;
    gap: 6px;
    flex: none;
    padding: 8px 14px;
    border: 1px solid var(--lf-line);
    border-radius: 999px;
    background: var(--lf-cream);
    color: var(--lf-ink);
    font-family: var(--lf-font-text);
    font-size: var(--lf-fs-s);
    font-weight: 600;
    cursor: pointer;
}

/* ==========================================================================
   Archív – rozloženie a boxy
   ========================================================================== */

.lf-layout {
    display: grid;
    grid-template-columns: var(--lf-aside) minmax(0, 1fr);
    gap: var(--lf-gap);
    align-items: start;
}

.lf-aside {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.lf-aside > * {
    flex: none;
}

.lf-aside__bar,
.lf-overlay {
    display: none;
}

.lf-box {
    border: 1px solid var(--lf-line);
    border-radius: var(--lf-r-lg);
    background: var(--lf-white);
    overflow: hidden;
}

.lf .lf-box__head {
    padding: 14px 18px;
    background: var(--lf-sand);
    color: var(--lf-ink);
    font-family: var(--lf-font-head);
    font-size: var(--lf-fs-box);
    font-weight: 700;
    line-height: 1.5;
}

.lf-box--plain {
    padding: 20px;
}

.lf .lf-box__title {
    margin: 0 0 14px;
    color: var(--lf-ink);
    font-family: var(--lf-font-head);
    font-size: var(--lf-fs-box);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.5;
    text-transform: none;
}

.lf-cats,
.lf-users,
.lf-rules,
.lf-similar {
    margin: 0;
    padding: 0;
    list-style: none;
}

.lf-cats {
    padding: 9px;
}

.lf .lf-cat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    transition: background-color .2s;
}

.lf .lf-cat:hover,
.lf .lf-cat.is-active {
    background: var(--lf-cream);
}

.lf-cat__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--lf-chip);
    font-size: 16px;
    line-height: 1;
}

.lf-cat__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.lf-cat__name {
    color: var(--lf-ink);
    font-size: var(--lf-fs-m);
    font-weight: 600;
    line-height: 1.3;
}

.lf-cat.is-active .lf-cat__name {
    color: var(--lf-red);
}

.lf-cat__sub {
    color: var(--lf-muted);
    font-size: var(--lf-fs-xs);
    line-height: 1.35;
}

.lf-rules li {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--lf-text);
    font-size: calc(var(--hfs-text-s, 14px) * .96);
    line-height: 1.5;
}

.lf-rules__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    border-radius: 50%;
    background: var(--lf-chip);
    color: var(--lf-red-dark);
    font-size: 10px;
    font-weight: 700;
}

.lf-note {
    margin: 14px 0 0;
    padding: 12px;
    border-radius: 8px;
    background: var(--lf-cream);
    color: var(--lf-muted);
    font-size: var(--lf-fs-xs);
    line-height: 1.5;
}

.lf-users {
    padding: 8px;
}

.lf-user {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    padding: 8px 10px;
}

.lf-user .lf-avatar {
    margin-right: 4px;
}

.lf-user__name {
    color: var(--lf-ink);
    font-size: var(--lf-fs-m);
    font-weight: 600;
}

.lf-user__meta {
    color: var(--lf-muted);
    font-size: var(--lf-fs-xs);
}

.lf-user--empty {
    color: var(--lf-muted);
    font-size: var(--lf-fs-s);
}

/* ==========================================================================
   Archív – zoznam tém
   ========================================================================== */

.lf-main__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--lf-line);
}

.lf-main__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.lf-select {
    position: relative;
}

.lf-select::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 18px;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid var(--lf-ink);
    border-bottom: 1.5px solid var(--lf-ink);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.lf-select select {
    height: 46px;
    margin: 0;
    padding: 0 42px 0 20px;
    border: 1px solid var(--lf-line);
    border-radius: 999px;
    background: var(--lf-white);
    color: var(--lf-ink);
    font-family: var(--lf-font-text);
    font-size: var(--lf-fs-m);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.lf-topics {
    transition: opacity .2s;
}

.lf-archive.is-loading .lf-topics {
    opacity: .45;
    pointer-events: none;
}

.lf-topic {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 16px;
    padding: 24px 0 24px 4px;
    border-bottom: 1px solid var(--lf-line);
}

.lf .lf-topic__title {
    display: -webkit-box;
    margin: 0;
    color: var(--lf-ink);
    font-family: var(--lf-font-head);
    font-size: var(--lf-fs-h3);
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.3;
    text-transform: none;
    overflow: hidden;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.lf-topic__title .lf-badge {
    margin: -2px 6px 0 0;
}

.lf .lf-topic__title a {
    color: var(--lf-ink);
    transition: color .2s;
}

.lf .lf-topic__title a:hover {
    color: var(--lf-red);
}

.lf-topic__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 8px;
    color: var(--lf-muted);
    font-size: var(--lf-fs-s);
    line-height: 1.6;
}

.lf-topic__meta .lf-dot {
    margin: 0 8px;
}

.lf .lf-topic__meta a:hover {
    color: var(--lf-red);
}

.lf-topic__meta strong {
    color: var(--lf-ink);
    font-weight: 600;
}

.lf-topic__stats {
    display: flex;
    gap: 20px;
    padding-top: 2px;
}

.lf-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
    text-align: center;
}

.lf-stat strong {
    color: var(--lf-ink);
    font-family: var(--lf-font-head);
    font-size: var(--lf-fs-stat);
    font-weight: 700;
    line-height: 1.1;
}

.lf-stat span {
    margin-top: 6px;
    color: var(--lf-muted);
    font-size: calc(var(--hfs-text-s, 14px) * .82);
    line-height: 1.3;
}

.lf-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-top: 24px;
}

.lf-more__info {
    color: var(--lf-muted);
    font-size: var(--lf-fs-xs);
}

/* ==========================================================================
   Detail – hlavička
   ========================================================================== */

.lf-head {
    width: 100%;
}

.lf .lf-head__title {
    margin: 0 0 20px;
    color: var(--lf-red-dark);
    font-size: var(--lf-fs-h1);
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.lf-head__row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px 40px;
}

.lf-head__info {
    flex: 1 1 360px;
    min-width: 0;
}

.lf-head__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 4px;
    color: var(--lf-muted);
    font-size: var(--lf-fs-s);
}

.lf-head__meta .lf-dot {
    margin: 0 10px;
}

.lf-head .lf-tags {
    margin-top: 18px;
}

.lf-head__meta strong {
    color: var(--lf-ink);
    font-weight: 600;
}

.lf-head__side {
    flex: 0 1 auto;
}

.lf-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.lf-actions__note {
    margin: 10px 0 0;
    color: var(--lf-muted);
    font-size: var(--lf-fs-xs);
    text-align: right;
}

/* ==========================================================================
   Detail – vlákno
   ========================================================================== */

.lf-thread {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.lf-post {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 0 16px;
    padding: 22px 0;
    border-bottom: 1px solid var(--lf-line);
    scroll-margin-top: 120px;
}

.lf-post--question,
.lf-post--best,
.lf-post--vendor {
    padding: 24px;
    border: 1px solid var(--lf-line);
    border-radius: var(--lf-r-md);
}

.lf-post--question {
    background: var(--lf-cream);
}

.lf-post--best {
    background: var(--lf-green-bg);
    border-color: var(--lf-green-line);
}

.lf-post--vendor {
    background: var(--lf-vendor-bg);
    border-color: var(--lf-vendor-line);
}

.lf-post--question.lf-post--vendor {
    background: var(--lf-vendor-bg);
}

.lf-post:target {
    animation: lf-flash 1.6s ease;
}

@keyframes lf-flash {
    0%, 30% { box-shadow: 0 0 0 4px rgba(180, 18, 27, .18); }
    100% { box-shadow: 0 0 0 0 rgba(180, 18, 27, 0); }
}

.lf-post__label {
    display: flex;
    align-items: center;
    gap: 6px;
    grid-column: 1 / -1;
    margin: -4px 0 16px;
    color: var(--lf-green);
    font-size: var(--lf-fs-xs);
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.lf-post__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    margin-bottom: 8px;
}

.lf-post__name {
    color: var(--lf-ink);
    font-size: var(--lf-fs-m);
    font-weight: 700;
}

.lf-post__role {
    color: var(--lf-muted);
    font-size: var(--lf-fs-xs);
}

.lf-post__date {
    margin-left: auto;
    color: var(--lf-muted);
    font-size: var(--lf-fs-xs);
    white-space: nowrap;
}

.lf-post__content {
    color: var(--lf-text);
    font-size: var(--lf-fs-body);
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.lf-post__content p {
    margin: 0 0 12px;
}

.lf-post__content p:last-child {
    margin-bottom: 0;
}

.lf-post__content strong {
    color: var(--lf-ink);
    font-weight: 700;
}

.lf .lf-post__content a {
    color: var(--lf-red);
    text-decoration: underline;
}

.lf-post--best .lf-post__content {
    color: var(--lf-green);
}

.lf-quote {
    margin: 0 0 12px;
    padding: 10px 14px;
    border-left: 3px solid var(--lf-line);
    border-radius: 0 8px 8px 0;
    background: rgba(255, 255, 255, .6);
    color: var(--lf-muted);
    font-size: .95em;
}

.lf-post__tools {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    margin-top: 14px;
}

.lf-tool {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 0;
    border: 0;
    background: none;
    color: var(--lf-muted);
    font-family: var(--lf-font-text);
    font-size: var(--lf-fs-xs);
    font-weight: 500;
    cursor: pointer;
    transition: color .2s;
}

.lf-tool:hover {
    color: var(--lf-red);
}

.lf-tool .lf-ico {
    font-size: 14px;
}

.lf-tool--vote .lf-ico {
    color: #D9A21B;
}

.lf-tool--vote.is-on {
    color: var(--lf-red);
    font-weight: 700;
}

.lf-tool--best {
    color: var(--lf-green);
    font-weight: 600;
}

.lf-tool--best.is-on {
    color: var(--lf-muted);
}

.lf-children {
    margin: -18px 0 0 64px;
}

.lf-post--child {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 18px 0 18px 20px;
    border-left: 1px solid var(--lf-line);
    border-bottom-left-radius: var(--lf-r-md);
}

.lf-replies {
    display: flex;
    flex-direction: column;
}

.lf-reply-group .lf-children {
    margin-top: 0;
}

/* ==========================================================================
   Detail – produktová karta
   ========================================================================== */

.lf-product {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    padding: 14px;
    border: 1px solid var(--lf-line);
    border-radius: 14px;
    background: var(--lf-white);
}

.lf-product__img {
    display: block;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--lf-cream);
}

.lf-product__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lf-product__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.lf .lf-product__name {
    color: var(--lf-ink);
    font-family: var(--lf-font-head);
    font-size: var(--lf-fs-m);
    font-weight: 700;
    line-height: 1.35;
}

.lf-product__meta {
    color: var(--lf-muted);
    font-size: var(--lf-fs-xs);
}

.lf-product__buy {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.lf-product__price {
    color: var(--lf-ink);
    font-family: var(--lf-font-head);
    font-size: var(--lf-fs-stat);
    font-weight: 700;
    line-height: 1.1;
}

.lf-product__price del {
    color: var(--lf-muted);
    font-size: .7em;
    font-weight: 400;
}

.lf-product__price ins {
    text-decoration: none;
}

.lf-product .added_to_cart {
    font-size: var(--lf-fs-xs);
    color: var(--lf-red);
}

/* ==========================================================================
   Formuláre
   ========================================================================== */

.lf-thread .lf-form-card {
    margin-top: 28px;
}

.lf-form-card {
    padding: 24px;
    border: 1.5px solid var(--lf-red);
    border-radius: var(--lf-r-md);
    background: var(--lf-white);
    scroll-margin-top: 120px;
}

.lf-form-card--center {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
}

.lf .lf-form-card__title {
    letter-spacing: 0;
    text-transform: none;
    margin: 0 0 14px;
    color: var(--lf-ink);
    font-family: var(--lf-font-head);
    font-size: var(--lf-fs-h3);
    font-weight: 700;
}

.lf-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.lf-field {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lf-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--lf-ink);
    font-size: var(--lf-fs-m);
    font-weight: 600;
}

.lf-label span {
    color: var(--lf-muted);
    font-size: var(--lf-fs-xs);
    font-weight: 400;
}

.lf .lf-input,
.lf-tag-input {
    width: 100%;
    margin: 0;
    padding: 12px 16px;
    border: 1px solid var(--lf-line);
    border-radius: 12px;
    background: var(--lf-white);
    box-shadow: none;
    color: var(--lf-ink);
    font-family: var(--lf-font-text);
    font-size: var(--lf-fs-m);
    line-height: 1.5;
    transition: border-color .2s, box-shadow .2s;
}

.lf .lf-input:focus,
.lf-tag-input:focus-within {
    border-color: var(--lf-red);
    outline: 0;
    box-shadow: 0 0 0 4px rgba(180, 18, 27, .08);
}

.lf-textarea {
    min-height: 140px;
    resize: vertical;
}

.lf-form__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}

.lf-form__buttons {
    display: flex;
    gap: 10px;
}

.lf-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--lf-text);
    font-size: var(--lf-fs-s);
    cursor: pointer;
}

.lf-check input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--lf-red);
}

.lf-hint {
    margin: -8px 0 0;
    color: var(--lf-muted);
    font-size: var(--lf-fs-xs);
}

.lf-field .lf-hint {
    margin: 0;
}

.lf-error {
    padding: 12px 16px;
    border: 1px solid var(--lf-vendor-line);
    border-radius: 10px;
    background: var(--lf-vendor-bg);
    color: var(--lf-red-dark);
    font-size: var(--lf-fs-s);
}

.lf-replying {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--lf-cream);
    color: var(--lf-text);
    font-size: var(--lf-fs-s);
}

.lf-replying strong {
    color: var(--lf-ink);
}

.lf-link {
    margin-left: auto;
    padding: 0;
    border: 0;
    background: none;
    color: var(--lf-red);
    font-family: var(--lf-font-text);
    font-size: var(--lf-fs-s);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.lf-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.lf-picker__results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 30;
    max-height: 320px;
    margin: 6px 0 0;
    padding: 6px;
    border: 1px solid var(--lf-line);
    border-radius: 12px;
    background: var(--lf-white);
    box-shadow: 0 12px 30px rgba(36, 28, 26, .12);
    list-style: none;
    overflow-y: auto;
}

.lf-picker__results li {
    margin: 0;
}

.lf-picker__results button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--lf-ink);
    font-family: var(--lf-font-text);
    font-size: var(--lf-fs-s);
    text-align: left;
    cursor: pointer;
}

.lf-picker__results button:hover,
.lf-picker__results button.is-active {
    background: var(--lf-cream);
}

.lf-picker__results img {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
}

.lf-picker__results small {
    margin-left: auto;
    color: var(--lf-muted);
}

.lf-picker__selected {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--lf-vendor-line);
    border-radius: 12px;
    background: var(--lf-vendor-bg);
    color: var(--lf-ink);
    font-size: var(--lf-fs-s);
    font-weight: 600;
}

.lf-picker__selected img {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
}

.lf-picker__selected .lf-link {
    margin-left: auto;
}

/* ==========================================================================
   Nová téma
   ========================================================================== */

.lf-new__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 32px;
    align-items: start;
}

.lf-new__body {
    padding: 24px;
}

.lf-new__side {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.lf-cat-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 8px;
}

.lf-cat-option {
    position: relative;
    cursor: pointer;
}

.lf-cat-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.lf-cat-option__box {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
    padding: 8px 12px 8px 8px;
    border: 1px solid var(--lf-line);
    border-radius: 12px;
    background: var(--lf-white);
    transition: border-color .2s, background-color .2s, box-shadow .2s;
}

.lf-cat-option:hover .lf-cat-option__box {
    background: var(--lf-cream);
}

.lf-cat-option input:checked + .lf-cat-option__box {
    border-color: var(--lf-red);
    background: var(--lf-cream);
    box-shadow: 0 0 0 1px var(--lf-red);
}

.lf-cat-option input:focus-visible + .lf-cat-option__box {
    box-shadow: 0 0 0 4px rgba(180, 18, 27, .15);
}

.lf-cat-option__name {
    color: var(--lf-ink);
    font-size: var(--lf-fs-s);
    font-weight: 600;
    line-height: 1.3;
}

.lf-cat-option input:checked + .lf-cat-option__box .lf-cat-option__name {
    color: var(--lf-red);
}

.lf-tag-input {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
}

.lf-tag-input__chips {
    display: contents;
}

.lf-tag-input input {
    flex: 1;
    min-width: 140px;
    height: 32px;
    margin: 0;
    padding: 0 6px;
    border: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
    color: var(--lf-ink);
    font-family: var(--lf-font-text);
    font-size: var(--lf-fs-m);
}

.lf-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px 4px 11px;
    border-radius: 999px;
    background: var(--lf-chip);
    color: var(--lf-red-dark);
    font-size: var(--lf-fs-xs);
    font-weight: 600;
}

.lf-chip button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--lf-red-dark);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

.lf-chip button:hover {
    background: rgba(124, 14, 21, .1);
}

[data-lf-counter] {
    font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Detail – bočný panel
   ========================================================================== */

.lf-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lf-side-box {
    padding: 20px;
    border: 1px solid var(--lf-line);
    border-radius: var(--lf-r-md);
    background: var(--lf-white);
}

.lf-side-box--cream {
    background: var(--lf-cream);
}

.lf .lf-side-box__title {
    letter-spacing: 0;
    text-transform: none;
    margin: 0 0 14px;
    color: var(--lf-ink);
    font-family: var(--lf-font-head);
    font-size: var(--lf-fs-m);
    font-weight: 700;
    line-height: 1.3;
}

.lf-side-box p {
    margin: 0 0 14px;
    color: var(--lf-text);
    font-size: var(--lf-fs-s);
    line-height: 1.55;
}

.lf-info {
    margin: 0;
}

.lf-info__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--lf-line-soft);
    font-size: var(--lf-fs-s);
}

.lf-info__row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.lf-info dt {
    color: var(--lf-muted);
}

.lf-info dd {
    margin: 0;
    color: var(--lf-ink);
    font-weight: 600;
    text-align: right;
}

.lf .lf-info dd a:hover {
    color: var(--lf-red);
}

.lf-status--solved {
    color: var(--lf-green);
}

.lf .lf-mini-product {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.lf-mini-product__img {
    flex: none;
    width: 52px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--lf-cream);
}

.lf-mini-product__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lf-mini-product__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lf-mini-product__name {
    color: var(--lf-ink);
    font-family: var(--lf-font-head);
    font-size: var(--lf-fs-s);
    font-weight: 700;
    line-height: 1.35;
}

.lf-mini-product__price {
    color: var(--lf-muted);
    font-size: var(--lf-fs-xs);
}

.lf-similar li {
    padding: 10px 0;
    border-bottom: 1px solid var(--lf-line-soft);
}

.lf-similar li:first-child {
    padding-top: 0;
}

.lf-similar li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.lf .lf-similar a {
    display: block;
    color: var(--lf-ink);
    font-size: var(--lf-fs-s);
    font-weight: 600;
    line-height: 1.4;
    transition: color .2s;
}

.lf .lf-similar a:hover {
    color: var(--lf-red);
}

.lf-similar span {
    display: block;
    margin-top: 3px;
    color: var(--lf-muted);
    font-size: var(--lf-fs-xs);
}

/* ==========================================================================
   Responzivita
   ========================================================================== */

@media (max-width: 1199px) {
    .lf {
        --lf-aside: 280px;
        --lf-gap: 28px;
    }
}

@media (max-width: 991px) {
    .lf-drawer-toggle {
        display: inline-flex;
    }

    .lf-toolbar__count {
        display: none;
    }

    .lf-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .lf-aside {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 99999;
        width: min(360px, 88vw);
        padding: 0 16px 24px;
        background: var(--lf-white);
        box-shadow: 10px 0 40px rgba(36, 28, 26, .18);
        overflow-y: auto;
        transform: translateX(-105%);
        transition: transform .3s ease;
    }

    .lf-aside__bar {
        position: sticky;
        top: 0;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin: 0 -16px;
        padding: 16px;
        background: var(--lf-white);
        border-bottom: 1px solid var(--lf-line);
        color: var(--lf-ink);
        font-family: var(--lf-font-head);
        font-size: var(--lf-fs-box);
        font-weight: 700;
    }

    .lf-aside__close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        padding: 0;
        border: 1px solid var(--lf-line);
        border-radius: 50%;
        background: var(--lf-white);
        color: var(--lf-ink);
        font-size: 16px;
        cursor: pointer;
    }

    .lf-overlay {
        position: fixed;
        inset: 0;
        z-index: 99998;
        display: block;
        background: rgba(36, 28, 26, .45);
        opacity: 0;
        visibility: hidden;
        transition: opacity .3s, visibility .3s;
    }

    .lf-archive.is-drawer-open .lf-aside {
        transform: none;
    }

    .lf-archive.is-drawer-open .lf-overlay {
        opacity: 1;
        visibility: visible;
    }

    .lf-new__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .lf-head__row {
        align-items: flex-start;
    }

    .lf-actions {
        justify-content: flex-start;
    }

    .lf-actions__note {
        text-align: left;
    }
}

@media (max-width: 640px) {
    .lf .lf-topic__title {
        -webkit-line-clamp: 4;
        line-clamp: 4;
    }

    .lf-toolbar {
        margin-bottom: 20px;
        padding: 14px 0;
        gap: 10px;
    }

    .lf-main__head {
        align-items: flex-start;
    }

    .lf-main__actions,
    .lf-main__actions .lf-btn,
    .lf-select,
    .lf-select select {
        width: 100%;
    }

    .lf-topic {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 12px;
        padding-left: 0;
    }

    .lf-topic .lf-avatar--lg {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .lf-topic__stats {
        grid-column: 2;
        gap: 16px;
        padding-top: 0;
    }

    .lf-stat {
        flex-direction: row;
        align-items: baseline;
        gap: 4px;
        min-width: 0;
    }

    .lf-stat strong {
        font-size: var(--lf-fs-m);
    }

    .lf-stat span {
        margin: 0;
    }

    .lf-post,
    .lf-post--question,
    .lf-post--best,
    .lf-post--vendor,
    .lf-post--child {
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 0 12px;
    }

    .lf-post .lf-avatar {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .lf-post__main {
        display: contents;
    }

    .lf-post__head {
        grid-column: 2;
        align-self: center;
        margin-bottom: 0;
    }

    .lf-post__content,
    .lf-post__tools,
    .lf-post .lf-product {
        grid-column: 1 / -1;
    }

    .lf-post__content {
        margin-top: 12px;
    }

    .lf-post--question,
    .lf-post--best,
    .lf-post--vendor {
        padding: 18px;
    }

    .lf-post__date {
        margin-left: 0;
        width: 100%;
    }

    .lf-children {
        margin-left: 12px;
    }

    .lf-post--child {
        padding-left: 14px;
    }

    .lf-product {
        grid-template-columns: 56px minmax(0, 1fr);
    }

    .lf-product__img {
        width: 56px;
        height: 56px;
    }

    .lf-product__buy {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .lf-form-card,
    .lf-new__body {
        padding: 18px;
    }

    .lf-form__footer,
    .lf-form__buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .lf-form__footer .lf-btn {
        width: 100%;
    }

    .lf-search {
        padding-left: 16px;
    }

    .lf-search__btn {
        padding: 0 16px;
    }

    .lf-cat-picker {
        grid-template-columns: minmax(0, 1fr);
    }
}
