/*
 * KitFolio public site (Bookmarks + Explore).
 * Background gradient and card glass are kept from the original design.
 */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #fff;
    font-family: var(--kf-font);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: hsla(0, 0%, 0%, 1);
    background-image:
        radial-gradient(at 0% 100%, hsla(299, 72%, 72%, 0.32) 0px, transparent 50%),
        radial-gradient(at 79% 99%, hsla(127, 36%, 10%, 1) 0px, transparent 50%),
        radial-gradient(at 29% 0%, hsla(240, 30%, 53%, 1) 0px, transparent 50%),
        radial-gradient(at 0% 0%, hsla(334, 0%, 0%, 1) 0px, transparent 50%);
    background-size: cover;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-position: center;
}

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

button,
input,
select,
textarea {
    font-family: inherit;
}

img {
    max-width: 100%;
}

:focus-visible {
    outline: 2px solid var(--kf-accent);
    outline-offset: 2px;
}

::selection {
    background: rgba(155, 236, 0, 0.35);
}

/* Smooth cross-page transitions (Chromium) */
@view-transition {
    navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.22s;
}

@keyframes kf-rise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
}

@keyframes kf-card-in {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
    }
}

@keyframes kf-pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.28) translateY(-2px); }
    100% { transform: scale(1); }
}

/* ======================================================================
   Header
   ====================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid transparent;
    transition: background 0.3s ease, border-color 0.3s ease, -webkit-backdrop-filter 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.is-scrolled {
    background: rgba(12, 12, 20, 0.55);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
    border-bottom-color: var(--kf-hairline);
}

.site-header__inner {
    max-width: 1148px;
    margin: 0 auto;
    padding: 14px 24px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-self: start;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.015em;
    transition: opacity 0.2s ease;
}

.brand:hover {
    opacity: 0.85;
}

.brand img {
    width: 32px;
    height: 32px;
}

.seg-nav {
    display: flex;
    gap: 2px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--kf-hairline);
    border-radius: 999px;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.seg-nav__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: 999px;
    color: var(--kf-text-2);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.25s ease, transform 0.18s var(--kf-ease-out);
}

.seg-nav__item:hover {
    color: #fff;
}

.seg-nav__item:active {
    transform: scale(0.96);
}

.seg-nav__item.is-active {
    color: #fff;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 0 0 0.5px rgba(255, 255, 255, 0.1);
}

.site-header__actions {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar-btn {
    display: block;
    padding: 0;
    border: 0;
    background: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.14);
    transition: transform 0.2s var(--kf-ease-out), box-shadow 0.2s ease;
}

.avatar-btn:hover {
    box-shadow: 0 0 0 2px var(--kf-accent);
}

.avatar-btn:active {
    transform: scale(0.94);
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    display: grid;
    place-items: center;
}

.avatar--letter,
.avatar.tool-logo--fallback {
    background: linear-gradient(135deg, #b4f53c, #6cc400);
    color: #0b1200;
    font-weight: 700;
    font-size: 14px;
}

@media (max-width: 720px) {
    .site-header__inner {
        grid-template-columns: 1fr auto;
        padding: 12px 16px 10px;
        row-gap: 10px;
    }

    .seg-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
    }

    .seg-nav__item {
        flex: 1;
    }
}

/* ======================================================================
   Page layout
   ====================================================================== */
.page {
    flex: 1;
    width: 100%;
    max-width: 1148px;
    margin: 0 auto;
    padding: 12px 24px 64px;
}

.page-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    margin: 28px 0 26px;
    animation: kf-rise 0.6s var(--kf-ease-spring) both;
}

.page-hero h1 {
    font-size: clamp(26px, 4vw, 34px);
    line-height: 1.12;
    font-weight: 700;
    letter-spacing: -0.028em;
}

.page-hero p {
    margin-top: 8px;
    color: var(--kf-text-2);
    font-size: 15px;
    max-width: 560px;
}

.page-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 640px) {
    .page {
        padding: 4px 16px 48px;
    }

    .page-hero {
        margin: 18px 0 20px;
    }

    .page-hero__actions {
        width: 100%;
    }

    .page-hero__actions .btn {
        flex: 1;
    }
}

.section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 30px 0 12px;
    color: var(--kf-text-2);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.section-label .count {
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--kf-fill);
    color: var(--kf-text-2);
    letter-spacing: 0;
    font-size: 11px;
}

/* Glass card shared by folders, unsorted bookmarks and empty states */
.glass {
    background: rgb(0 0 0 / 16%);
    border-radius: 20px;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Search field */
.search-field {
    position: relative;
    flex: 1;
    min-width: 0;
}

.search-field svg {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--kf-text-3);
    pointer-events: none;
}

.search-field input {
    width: 100%;
    height: 42px;
    padding: 0 38px 0 38px;
    border: 1px solid var(--kf-hairline);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    font-size: 14px;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.search-field input::placeholder {
    color: var(--kf-text-3);
}

.search-field input::-webkit-search-cancel-button {
    display: none;
}

.search-field input:focus {
    outline: none;
    border-color: var(--kf-accent);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 4px var(--kf-accent-soft);
}

.search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%) scale(0.6);
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: var(--kf-fill-strong);
    color: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.25s var(--kf-ease-spring);
}

.search-field.has-value .search-clear {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) scale(1);
}

/* Small icon buttons */
.icon-btn {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--kf-text-2);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.18s var(--kf-ease-out);
}

.icon-btn:hover {
    background: var(--kf-fill-hover);
    color: #fff;
}

.icon-btn:active {
    transform: scale(0.9);
}

.icon-btn--danger:hover {
    background: var(--kf-danger-soft);
    color: var(--kf-danger);
}

.icon-btn.is-saved {
    color: var(--kf-accent);
}

.icon-btn.is-saved path {
    fill: currentColor;
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 56px 24px;
    animation: kf-rise 0.5s var(--kf-ease-spring) both;
}

.empty-state__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: var(--kf-fill);
    color: var(--kf-accent);
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 650;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}

.empty-state p {
    max-width: 420px;
    margin: 0 auto;
    color: var(--kf-text-2);
}

.empty-state__actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

/* ======================================================================
   Bookmarks
   ====================================================================== */
.bm-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.bm-toolbar .search-field {
    max-width: 360px;
}

.bm-toolbar__hint {
    margin-left: auto;
    color: var(--kf-text-3);
    font-size: 12px;
}

@media (max-width: 720px) {
    .bm-toolbar__hint {
        display: none;
    }

    .bm-toolbar .search-field {
        max-width: none;
    }
}

.folders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

@media (max-width: 640px) {
    .folders-grid {
        grid-template-columns: 1fr;
    }
}

.folder {
    position: relative;
    padding: 14px 14px 12px 18px;
    border: 1px solid transparent;
    background: rgb(0 0 0 / 16%);
    border-radius: 20px;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.45s var(--kf-ease-spring), background 0.25s ease, box-shadow 0.3s ease, border-color 0.2s ease;
    animation: kf-card-in 0.5s var(--kf-ease-spring) both;
    animation-delay: calc(var(--i, 0) * 40ms);
}

.folder:hover {
    background: rgb(0 0 0 / 30%);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.folder.is-drop-target,
.bookmarks-list.is-drop-target {
    border-color: var(--kf-accent);
    background: rgba(155, 236, 0, 0.08);
    transform: scale(1.01);
}

.folder-header {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 34px;
    margin-bottom: 8px;
}

.folder-dot {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.folder-name {
    flex: 1;
    min-width: 0;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: rgba(255, 255, 255, 0.95);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-count {
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--kf-fill);
    color: var(--kf-text-2);
    font-size: 12px;
    font-weight: 500;
}

.folder-actions {
    display: flex;
    gap: 2px;
    opacity: 0.55;
    transition: opacity 0.2s ease;
}

.folder:hover .folder-actions,
.folder:focus-within .folder-actions {
    opacity: 1;
}

.folder-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    min-height: 96px;
}

.folder-empty {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 96px;
    border: 1.5px dashed var(--kf-hairline);
    border-radius: 14px;
    color: var(--kf-text-3);
    font-size: 13px;
}

.bookmarks-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 4px;
    min-height: 120px;
    padding: 10px;
    border: 1px solid transparent;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.3s var(--kf-ease-spring);
}

.bookmarks-list .folder-empty {
    min-height: 100px;
}

.bookmark-item {
    position: relative;
    min-width: 0;
    border-radius: 14px;
    color: #fff;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s ease, transform 0.2s var(--kf-ease-out), opacity 0.2s ease;
}

.bookmark-link,
.bookmark-item--more {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    padding: 14px 6px 10px;
    border-radius: 14px;
    color: inherit;
}

.bookmark-item[draggable="true"] {
    cursor: grab;
}

.bookmark-link:focus-visible {
    outline: 2px solid var(--kf-accent);
    outline-offset: -2px;
}

.bookmark-item:hover {
    background: rgba(255, 255, 255, 0.07);
}

.bookmark-item:active {
    transform: scale(0.95);
}

.bookmark-item.is-new {
    animation: kf-card-in 0.55s var(--kf-ease-spring) both;
}

.bookmark-item.is-dragging {
    opacity: 0.35;
}

.bookmark-favicon {
    width: 44px;
    height: 44px;
    padding: 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    object-fit: contain;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    transition: transform 0.3s var(--kf-ease-spring);
}

.bookmark-item:hover .bookmark-favicon {
    transform: translateY(-2px);
}

.bookmark-favicon.tool-logo--fallback {
    display: grid;
    place-items: center;
    padding: 0;
    background: linear-gradient(135deg, #3b3b55, #23232f);
    color: #fff;
    font-weight: 700;
    font-size: 18px;
}

.bookmark-title {
    width: 100%;
    font-size: 12px;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.88);
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bookmark-more {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(20, 20, 24, 0.7);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: #fff;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.2s ease, transform 0.25s var(--kf-ease-spring), background 0.2s ease;
}

.bookmark-item:hover .bookmark-more,
.bookmark-item:focus-within .bookmark-more {
    opacity: 1;
    transform: scale(1);
}

.bookmark-more:hover {
    background: rgba(40, 40, 46, 0.95);
}

@media (hover: none) {
    .bookmark-more {
        opacity: 0.9;
        transform: scale(1);
    }

    .folder-actions {
        opacity: 1;
    }
}

.bookmark-item--more .more-bubble {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--kf-fill-hover);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
}

.bookmark-item--more {
    cursor: pointer;
    border: 0;
    background: transparent;
    font: inherit;
}

.no-results {
    padding: 40px 20px;
    text-align: center;
    color: var(--kf-text-2);
}

/* Folder contents modal grid */
.modal-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 4px;
    margin-top: 16px;
}

/* Guest welcome */
.welcome {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    align-items: center;
    padding: 40px;
    animation: kf-rise 0.6s var(--kf-ease-spring) both;
}

.welcome h2 {
    font-size: clamp(24px, 3.4vw, 32px);
    line-height: 1.15;
    letter-spacing: -0.025em;
    font-weight: 700;
}

.welcome p {
    margin-top: 10px;
    color: var(--kf-text-2);
    font-size: 15px;
}

.welcome__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.welcome__features {
    display: grid;
    gap: 10px;
}

.feature {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--kf-hairline);
}

.feature__icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--kf-accent-soft);
    color: var(--kf-accent);
}

.feature strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

.feature span {
    color: var(--kf-text-2);
    font-size: 13px;
}

@media (max-width: 820px) {
    .welcome {
        grid-template-columns: 1fr;
        padding: 26px 20px;
    }
}

/* Action sheet (bookmark options) */
.action-sheet {
    max-width: 380px;
    padding: 22px 16px 16px;
}

.action-sheet__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 40px 12px 6px;
    min-width: 0;
}

.action-sheet__head .bookmark-favicon {
    width: 40px;
    height: 40px;
    padding: 7px;
    flex-shrink: 0;
}

.action-sheet__title {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.action-sheet__sub {
    font-size: 12px;
    color: var(--kf-text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.action-list {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 14px;
    background: var(--kf-fill);
}

.action-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 13px 14px;
    border: 0;
    background: transparent;
    color: var(--kf-text);
    font: 500 15px/1.2 var(--kf-font);
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease;
}

.action-row + .action-row {
    border-top: 1px solid var(--kf-hairline);
}

.action-row:hover,
.action-row:focus-visible {
    background: var(--kf-fill-hover);
    outline: none;
}

.action-row svg {
    width: 18px;
    height: 18px;
    opacity: 0.8;
    flex-shrink: 0;
}

.action-row--danger {
    color: var(--kf-danger);
}

/* ======================================================================
   Explore (all tools)
   ====================================================================== */
.filters {
    position: sticky;
    top: 62px;
    z-index: 50;
    margin: 0 -24px 6px;
    padding: 10px 24px 12px;
    border-bottom: 1px solid transparent;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.filters.is-stuck {
    background: rgba(12, 12, 20, 0.55);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
    border-bottom-color: var(--kf-hairline);
}

.filters__row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filters__row .search-field {
    max-width: 440px;
}

.sort-control {
    display: flex;
    margin-left: auto;
    padding: 3px;
    gap: 2px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--kf-hairline);
}

.sort-control button {
    height: 34px;
    padding: 0 14px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--kf-text-2);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.25s ease, color 0.2s ease, box-shadow 0.25s ease;
}

.sort-control button:hover {
    color: #fff;
}

.sort-control button.is-active {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.chips {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 32px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 32px), transparent 100%);
    padding: 2px 16px;
    margin-left: -16px;
    margin-right: -16px;
}

.chips::-webkit-scrollbar {
    display: none;
}

.chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 14px;
    border: 1px solid var(--kf-hairline);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--kf-text-2);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    scroll-snap-align: start;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.18s var(--kf-ease-out);
}

.chip:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.chip:active {
    transform: scale(0.95);
}

.chip.is-active {
    background: #fff;
    border-color: #fff;
    color: #000;
}

.chip__count {
    font-size: 11px;
    opacity: 0.55;
}

.results-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 32px;
    margin: 14px 0 12px;
    color: var(--kf-text-2);
    font-size: 13px;
}

.results-meta strong {
    color: #fff;
    font-weight: 600;
}

.link-btn {
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--kf-accent);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.link-btn:hover {
    text-decoration: underline;
}

@media (max-width: 720px) {
    .filters {
        top: 104px;
        margin: 0 -16px 6px;
        padding: 10px 16px 12px;
    }

    .filters__row {
        flex-wrap: wrap;
    }

    .filters__row .search-field {
        max-width: none;
        flex-basis: 100%;
    }

    .sort-control {
        margin-left: 0;
        width: 100%;
    }

    .sort-control button {
        flex: 1;
    }
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
}

@media (max-width: 560px) {
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.tool-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 18px;
    background: #00000059;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.45s var(--kf-ease-spring), background 0.25s ease, border-color 0.25s ease, box-shadow 0.35s ease;
    animation: kf-card-in 0.55s var(--kf-ease-spring) both;
    animation-delay: calc(var(--i, 0) * 28ms);
}

.tool-card:hover {
    transform: translateY(-3px);
    background: rgba(0, 0, 0, 0.45);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.tool-card:active {
    transform: scale(0.985);
}

.tool-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.tool-logo {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.12), 0 4px 12px rgba(0, 0, 0, 0.25);
}

.tool-logo--fallback {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #3b3b55, #23232f);
    color: #fff;
    font-weight: 700;
    font-size: 18px;
}

.tool-card__titles {
    min-width: 0;
}

.tool-card__name {
    font-size: 15px;
    font-weight: 650;
    letter-spacing: -0.01em;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-card__category {
    display: block;
    color: var(--kf-text-2);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-card__desc {
    flex: 1;
    min-height: 4.2em;
    color: #d6d6d6;
    font-size: 13.5px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tool-card__actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.upvote-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--kf-hairline);
    border-radius: 999px;
    background: var(--kf-fill);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.18s var(--kf-ease-out);
}

.upvote-btn:hover {
    border-color: rgba(155, 236, 0, 0.55);
}

.upvote-btn:active {
    transform: scale(0.93);
}

.upvote-btn.is-active {
    background: var(--kf-accent);
    border-color: var(--kf-accent);
    color: var(--kf-on-accent);
}

.upvote-btn.is-bumping svg {
    animation: kf-pop 0.5s var(--kf-ease-spring);
}

.upvote-btn.is-busy {
    pointer-events: none;
    opacity: 0.7;
}

.visit-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    background: #fff;
    color: #000;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.18s var(--kf-ease-out);
}

.visit-btn:hover {
    background: var(--kf-accent);
}

.visit-btn:active {
    transform: scale(0.95);
}

.tool-card__titles {
    flex: 1;
}

.tool-card__badge {
    align-self: flex-start;
    flex-shrink: 0;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--kf-fill);
    color: var(--kf-text-2);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.tool-card__badge.is-new {
    background: var(--kf-accent-soft);
    color: var(--kf-accent);
}

/* ======================================================================
   New arrivals carousel
   ====================================================================== */
.arrivals {
    margin: 26px 0 6px;
    animation: kf-rise 0.6s var(--kf-ease-spring) both;
}

.arrivals__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 14px;
}

.arrivals__head h2 {
    margin-top: 6px;
    font-size: clamp(22px, 3vw, 28px);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.arrivals__head p {
    margin-top: 4px;
    color: var(--kf-text-2);
    font-size: 14px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--kf-accent);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.eyebrow__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--kf-accent);
    animation: kf-pulse 2.2s ease-out infinite;
}

@keyframes kf-pulse {
    0% { box-shadow: 0 0 0 0 rgba(155, 236, 0, 0.55); }
    70%, 100% { box-shadow: 0 0 0 8px rgba(155, 236, 0, 0); }
}

.arrivals__controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.carousel-btn {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--kf-hairline);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    cursor: pointer;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    transition: background 0.2s ease, opacity 0.2s ease, transform 0.18s var(--kf-ease-out);
}

.carousel-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.14);
}

.carousel-btn:active:not(:disabled) {
    transform: scale(0.9);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

@media (hover: none) {
    .carousel-btn {
        display: none;
    }
}

.carousel {
    --fade-l: 0px;
    --fade-r: 0px;
    position: relative;
    margin: 0 -24px;
}

.carousel:not(.at-start) {
    --fade-l: 36px;
}

.carousel:not(.at-end) {
    --fade-r: 36px;
}

.carousel__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 3 * 14px) / 4);
    gap: 14px;
    padding: 8px 24px 16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 24px;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent 100%);
}

.carousel__track::-webkit-scrollbar {
    display: none;
}

.carousel__track:focus-visible {
    outline: none;
}

.carousel__slide {
    min-width: 0;
    scroll-snap-align: start;
}

.carousel.is-dragging .carousel__track {
    scroll-snap-type: none;
    cursor: grabbing;
    user-select: none;
}

.carousel.is-dragging .tool-card {
    transform: none;
}

.carousel__dots {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin-top: 2px;
}

.carousel__dot {
    padding: 8px 3px;
    border: 0;
    background: none;
    cursor: pointer;
}

.carousel__dot span {
    position: relative;
    display: block;
    width: 7px;
    height: 7px;
    overflow: hidden;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.25);
    transition: width 0.45s var(--kf-ease-spring), background 0.3s ease;
}

.carousel__dot:hover span {
    background: rgba(255, 255, 255, 0.45);
}

.carousel__dot.is-active span {
    width: 26px;
    background: rgba(255, 255, 255, 0.3);
}

.carousel__dot.is-active span::after {
    content: "";
    position: absolute;
    inset: 0;
    background: #fff;
    border-radius: inherit;
    transform-origin: left center;
}

.carousel.is-playing + .carousel__dots .carousel__dot.is-active span::after {
    animation: kf-progress var(--kf-autoplay, 5000ms) linear both;
}

@keyframes kf-progress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@media (max-width: 1000px) {
    .carousel__track {
        grid-auto-columns: calc((100% - 2 * 14px) / 3);
    }
}

@media (max-width: 760px) {
    .carousel__track {
        grid-auto-columns: 46%;
    }
}

@media (max-width: 640px) {
    .carousel {
        margin: 0 -16px;
    }

    .carousel__track {
        grid-auto-columns: 84%;
        gap: 10px;
        padding: 6px 16px 14px;
        scroll-padding: 0 16px;
    }

    .arrivals__head p {
        display: none;
    }
}

/* Compact variant: a slim strip that doesn't push the page content down */
.arrivals--compact {
    margin: 18px 0 0;
}

.arrivals--compact .arrivals__head {
    align-items: center;
    flex-wrap: nowrap;
    margin-bottom: 8px;
}

.arrivals--compact .arrivals__head h2 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    font-size: 15px;
    font-weight: 650;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.arrivals--compact .arrivals__controls {
    gap: 6px;
}

.arrivals__all {
    margin-right: 4px;
    color: var(--kf-text-2);
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.arrivals__all:hover {
    color: #fff;
}

.arrivals--compact .carousel-btn {
    width: 28px;
    height: 28px;
}

.arrivals--compact .carousel-btn svg {
    width: 13px;
    height: 13px;
}

.arrivals--compact .carousel__track {
    grid-auto-columns: calc((100% - 4 * 10px) / 5);
    gap: 10px;
    padding-top: 4px;
    padding-bottom: 8px;
}

.tool-card--compact {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 10px 10px 12px;
    border-radius: 14px;
}

.tool-card--compact:hover {
    transform: translateY(-2px);
}

.tool-card--compact .tool-card__head {
    flex: 1;
    gap: 10px;
}

.tool-card--compact .tool-logo {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    font-size: 14px;
}

.tool-card--compact .tool-card__name {
    font-size: 13.5px;
}

.tool-card--compact .tool-card__category {
    font-size: 11.5px;
}

.tool-card--compact .tool-card__date {
    display: none;
}

.tool-card--compact .tool-card__badge {
    align-self: center;
    padding: 2px 6px;
    font-size: 10px;
}

.tool-card--compact .tool-card__desc,
.tool-card--compact .tool-card__actions {
    display: none;
}

.tool-card--compact .tool-card__foot {
    flex-shrink: 0;
}

.tool-card--compact .upvote-btn {
    height: 28px;
    padding: 0 9px;
    gap: 4px;
    font-size: 12px;
}

@media (max-width: 1180px) {
    .arrivals--compact .carousel__track {
        grid-auto-columns: calc((100% - 3 * 10px) / 4);
    }
}

@media (max-width: 900px) {
    .arrivals--compact .carousel__track {
        grid-auto-columns: calc((100% - 2 * 10px) / 3);
    }
}

@media (max-width: 760px) {
    .arrivals--compact .carousel__track {
        grid-auto-columns: 44%;
    }
}

@media (max-width: 640px) {
    .arrivals--compact {
        margin-top: 12px;
    }

    .arrivals--compact .carousel__track {
        grid-auto-columns: 72%;
        gap: 8px;
    }
}

/* Skeleton cards */
.tool-card.is-skeleton {
    cursor: default;
    pointer-events: none;
}

.tool-card.is-skeleton .sk-logo { width: 44px; height: 44px; border-radius: 12px; }
.tool-card.is-skeleton .sk-line { height: 11px; border-radius: 6px; }
.tool-card.is-skeleton .sk-pill { width: 64px; height: 32px; border-radius: 999px; }

.load-more {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    min-height: 90px;
    color: var(--kf-text-3);
    font-size: 13px;
}

.load-more .spinner {
    color: var(--kf-text-2);
}

/* Tool detail sheet */
.tool-detail__head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-right: 36px;
}

.tool-detail__head .tool-logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    font-size: 26px;
}

.tool-detail__name {
    font-size: 22px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.tool-detail__category {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--kf-accent-soft);
    color: var(--kf-accent);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 0;
}

.tool-detail__desc {
    margin: 20px 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    line-height: 1.6;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.tool-detail__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 12px 0;
    border-top: 1px solid var(--kf-hairline);
    border-bottom: 1px solid var(--kf-hairline);
    color: var(--kf-text-2);
    font-size: 13px;
}

.tool-detail__meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tool-detail__actions {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    margin-top: 20px;
}

.tool-detail__actions .upvote-btn {
    height: 40px;
    padding: 0 16px;
    font-size: 14px;
}

/* ======================================================================
   Sign-in sheet
   ====================================================================== */
.auth-sheet {
    max-width: 400px;
    text-align: center;
    padding-top: 34px;
}

.auth-sheet .modal-title {
    margin: 0 0 8px;
    font-size: 22px;
}

.auth-sheet__logo {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--kf-hairline);
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 50px;
    margin-top: 6px;
    border: 0;
    border-radius: 14px;
    background: #fff;
    color: #1f1f1f;
    font: 600 15px/1 var(--kf-font);
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    transition: background 0.2s ease, transform 0.18s var(--kf-ease-out), opacity 0.2s ease;
}

.google-btn:hover {
    background: #f1f1f1;
}

.google-btn:active {
    transform: scale(0.98);
}

.google-btn.is-loading {
    opacity: 0.75;
    pointer-events: none;
}

.google-btn .spinner {
    color: #1f1f1f;
}

.auth-error {
    display: none;
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--kf-danger-soft);
    color: #ff8a80;
    font-size: 13px;
    text-align: left;
}

.auth-error.is-visible {
    display: block;
    animation: kf-rise 0.3s var(--kf-ease-out) both;
}

.permission-text {
    margin-top: 16px;
    color: var(--kf-text-3);
    font-size: 12px;
    line-height: 1.5;
}

/* Multi-view auth sheet */
.auth-sheet {
    max-width: 420px;
    padding-top: 30px;
}

.auth-sheet .auth-sheet__logo {
    width: 60px;
    height: 60px;
    margin-bottom: 16px;
    border-radius: 18px;
}

.auth-sheet .modal-title {
    margin: 0 0 6px;
    font-size: 21px;
}

@media (max-height: 780px) {
    .auth-sheet .auth-sheet__logo {
        display: none;
    }

    .auth-sheet {
        padding-top: 24px;
    }
}

.auth-sheet .modal-description {
    margin-bottom: 18px;
}

.auth-sheet .form-group {
    text-align: left;
    margin-bottom: 14px;
}

.auth-sheet .auth-error {
    margin: 0 0 14px;
}

.auth-tabs {
    display: flex;
    padding: 3px;
    gap: 2px;
    margin: 0 auto 18px;
    max-width: 280px;
    border-radius: 12px;
    background: var(--kf-fill);
    border: 1px solid var(--kf-hairline);
}

.auth-tabs__item {
    flex: 1;
    height: 32px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--kf-text-2);
    font: 500 13px/1 var(--kf-font);
    cursor: pointer;
    transition: background 0.25s ease, color 0.2s ease, box-shadow 0.25s ease;
}

.auth-tabs__item:hover {
    color: #fff;
}

.auth-tabs__item.is-active {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.auth-sheet[data-view="forgot"] .auth-tabs,
.auth-sheet[data-view="sent"] .auth-tabs,
.auth-sheet[data-view="sent"] .auth-sheet__logo {
    display: none;
}

.auth-views.is-animating {
    overflow: hidden;
    transition: height 0.45s var(--kf-ease-spring);
}

.auth-view.is-entering {
    animation: kf-view-in 0.45s var(--kf-ease-spring) both;
}

@keyframes kf-view-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.985);
    }
}

.auth-view--center .btn-block + .btn-block {
    margin-top: 8px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: var(--kf-text-3);
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--kf-hairline);
}

.auth-sheet .google-btn {
    margin-top: 0;
}

.label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 7px;
}

.label-row label {
    margin: 0 !important;
}

.text-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--kf-accent);
    font: 500 13px/1.3 var(--kf-font);
    cursor: pointer;
}

.text-link:hover {
    text-decoration: underline;
}

.auth-switch {
    margin-top: 18px;
    color: var(--kf-text-2);
    font-size: 13px;
    text-align: center;
}

.auth-sheet .auth-submit {
    margin-top: 6px;
    min-height: 46px;
    font-size: 15px;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 46px !important;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    width: 34px;
    height: 34px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--kf-text-3);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.password-toggle::before {
    content: "";
    position: absolute;
    inset: 8px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.password-toggle.is-visible::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.6 5.1A10.8 10.8 0 0 1 12 5c6.4 0 10 7 10 7a17 17 0 0 1-3.2 4M6.6 6.6A17 17 0 0 0 2 12s3.6 7 10 7a9.7 9.7 0 0 0 5.4-1.6M3 3l18 18M9.9 9.9a3 3 0 0 0 4.2 4.2'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.6 5.1A10.8 10.8 0 0 1 12 5c6.4 0 10 7 10 7a17 17 0 0 1-3.2 4M6.6 6.6A17 17 0 0 0 2 12s3.6 7 10 7a9.7 9.7 0 0 0 5.4-1.6M3 3l18 18M9.9 9.9a3 3 0 0 0 4.2 4.2'/%3E%3C/svg%3E");
}

.password-toggle:hover {
    background: var(--kf-fill);
    color: var(--kf-text);
}

/* Password strength meter */
.strength {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
}

.strength span {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--kf-fill-strong);
    transition: background 0.3s ease;
}

.strength em {
    min-width: 46px;
    color: var(--kf-text-3);
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
    text-align: right;
}

.strength[data-score="1"] span:nth-child(-n+1) { background: #ff453a; }
.strength[data-score="2"] span:nth-child(-n+2) { background: #ff9f0a; }
.strength[data-score="3"] span:nth-child(-n+3) { background: #ffd60a; }
.strength[data-score="4"] span:nth-child(-n+4) { background: var(--kf-accent); }

.sent-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: var(--kf-accent-soft);
    color: var(--kf-accent);
    animation: kf-pop 0.6s var(--kf-ease-spring) 0.1s both;
}

.auth-view--center .modal-description strong,
.auth-card p strong {
    color: #fff;
    font-weight: 600;
}

/* Standalone auth pages (verify email / reset password) */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 260px);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    margin: 40px 0;
    padding: 36px 30px 30px;
    text-align: center;
    animation: kf-rise 0.6s var(--kf-ease-spring) both;
}

.auth-card h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.auth-card > p {
    color: var(--kf-text-2);
    font-size: 15px;
    margin-bottom: 22px;
}

.auth-card__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: var(--kf-accent-soft);
    color: var(--kf-accent);
}

.auth-card__icon--warn {
    background: rgba(255, 159, 10, 0.14);
    color: #ff9f0a;
}

.auth-card__form {
    text-align: left;
}

.auth-card__form .btn-block {
    min-height: 46px;
    margin-top: 4px;
}

.auth-card__actions {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

/* ======================================================================
   Footer
   ====================================================================== */
.site-footer {
    margin-top: 32px;
    border-top: 1px solid var(--kf-hairline);
    background: rgba(0, 0, 0, 0.22);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.site-footer__inner {
    max-width: 1148px;
    margin: 0 auto;
    padding: 40px 24px 28px;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 32px;
}

.site-footer__brand p {
    margin-top: 12px;
    max-width: 380px;
    color: var(--kf-text-2);
    font-size: 13px;
}

.site-footer__brand .brand {
    font-size: 16px;
}

.site-footer__brand .brand img {
    width: 28px;
    height: 28px;
}

.site-footer__links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.site-footer__links h4 {
    margin-bottom: 12px;
    color: var(--kf-text-3);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-footer__links a {
    display: block;
    width: fit-content;
    padding: 4px 0;
    color: var(--kf-text-2);
    font-size: 14px;
    transition: color 0.2s ease;
}

.site-footer__links a:hover {
    color: #fff;
}

.site-footer__bottom {
    max-width: 1148px;
    margin: 0 auto;
    padding: 16px 24px calc(18px + env(safe-area-inset-bottom));
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px solid var(--kf-hairline);
    color: var(--kf-text-3);
    font-size: 12px;
}

@media (max-width: 640px) {
    .site-footer__inner {
        grid-template-columns: 1fr;
        padding: 32px 16px 20px;
    }

    .site-footer__bottom {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
