/* ============================================================
   Personal navigation · light gradient theme
   ============================================================ */

:root {
    color-scheme: light;
    --font-sans: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI",
        "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;

    --bg: #f7fbfa;
    --text: #162824;
    --text-soft: #5c726c;
    --text-faint: #748a83;

    --accent: #0f9b86;
    --accent-strong: #0b8270;
    --accent-contrast: #ffffff;
    --accent-soft: rgba(15, 155, 134, 0.10);
    --accent-soft-hover: rgba(15, 155, 134, 0.15);
    --accent-border: rgba(15, 155, 134, 0.24);
    --accent-count-bg: rgba(255, 255, 255, 0.20);
    --accent-count-color: #ffffff;

    --danger: #d14b4b;
    --danger-text: #a95050;
    --danger-solid: #d14b4b;
    --danger-contrast: #ffffff;
    --danger-soft: rgba(209, 75, 75, 0.09);

    --surface: rgba(255, 255, 255, 0.74);
    --surface-strong: rgba(255, 255, 255, 0.90);
    --surface-solid: #ffffff;
    --border: rgba(22, 40, 36, 0.08);
    --border-strong: rgba(22, 40, 36, 0.14);

    --header-bg: rgba(249, 253, 251, 0.76);
    --header-bg-scrolled: rgba(249, 253, 251, 0.90);
    --header-shadow: 0 12px 34px -28px rgba(13, 60, 52, 0.50);
    --search-bg: rgba(255, 255, 255, 0.78);
    --search-bg-focus: rgba(255, 255, 255, 0.94);
    --button-bg: rgba(255, 255, 255, 0.62);
    --button-bg-hover: rgba(255, 255, 255, 0.90);
    --button-solid: #ffffff;
    --button-text: #5c726c;
    --tab-bg: rgba(255, 255, 255, 0.54);
    --tab-bg-hover: rgba(255, 255, 255, 0.82);
    --tab-border: rgba(22, 40, 36, 0.07);
    --card-bg-1: rgba(255, 255, 255, 0.86);
    --card-bg-2: rgba(255, 255, 255, 0.67);
    --card-border: rgba(255, 255, 255, 0.90);
    --icon-bg: #ffffff;
    --icon-border: rgba(22, 40, 36, 0.055);
    --icon-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 4px 10px -8px rgba(13, 60, 52, 0.3);
    --action-bg: rgba(255, 255, 255, 0.88);
    --action-border: rgba(255, 255, 255, 0.70);
    --hover: rgba(22, 40, 36, 0.05);
    --hover-strong: rgba(22, 40, 36, 0.065);
    --code-bg: rgba(22, 40, 36, 0.055);
    --count-bg: rgba(255, 255, 255, 0.62);
    --count-color: #748a83;
    --add-bg: rgba(255, 255, 255, 0.26);
    --add-bg-hover: rgba(255, 255, 255, 0.58);
    --empty-bg: rgba(255, 255, 255, 0.65);
    --dialog-bg: rgba(251, 254, 253, 0.98);
    --dialog-backdrop: rgba(10, 30, 25, 0.25);
    --input-bg: #ffffff;
    --input-placeholder: #a3b3ae;
    --toast-bg: rgba(22, 40, 36, 0.92);
    --toast-text: #f4fbf8;
    --toast-border: transparent;
    --scroll-thumb: rgba(22, 40, 36, 0.18);
    --scroll-thumb-hover: rgba(22, 40, 36, 0.30);
    --selection: rgba(15, 155, 134, 0.20);

    --shadow-sm: 0 1px 2px rgba(13, 60, 52, 0.03), 0 6px 18px -14px rgba(13, 60, 52, 0.20);
    --shadow-md: 0 14px 34px -22px rgba(13, 60, 52, 0.34), 0 2px 6px -3px rgba(13, 60, 52, 0.06);
    --shadow-lg: 0 28px 70px -36px rgba(13, 60, 52, 0.40);

    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;

    --content-w: 1240px;
}

[data-theme="dark"] {
    color-scheme: dark;

    --bg: #0b1417;
    --text: #e8f1ee;
    --text-soft: #a1b4af;
    --text-faint: #829792;

    --accent: #5ee0c8;
    --accent-strong: #8af0dd;
    --accent-contrast: #06231f;
    --accent-soft: rgba(94, 224, 200, 0.12);
    --accent-soft-hover: rgba(94, 224, 200, 0.18);
    --accent-border: rgba(94, 224, 200, 0.30);
    --accent-count-bg: rgba(6, 35, 31, 0.14);
    --accent-count-color: #06231f;

    --danger: #ff9a9a;
    --danger-text: #ff9a9a;
    --danger-solid: #c94a4a;
    --danger-contrast: #ffffff;
    --danger-soft: rgba(255, 120, 120, 0.12);

    --surface: rgba(17, 29, 32, 0.74);
    --surface-strong: rgba(18, 33, 36, 0.94);
    --surface-solid: #111d20;
    --border: rgba(232, 241, 238, 0.10);
    --border-strong: rgba(232, 241, 238, 0.18);

    --header-bg: rgba(10, 20, 23, 0.76);
    --header-bg-scrolled: rgba(10, 20, 23, 0.92);
    --header-shadow: 0 12px 34px -28px rgba(0, 0, 0, 0.80);
    --search-bg: rgba(18, 32, 35, 0.78);
    --search-bg-focus: rgba(23, 41, 44, 0.96);
    --button-bg: rgba(24, 40, 43, 0.68);
    --button-bg-hover: rgba(31, 51, 54, 0.94);
    --button-solid: #17272a;
    --button-text: #c2d3ce;
    --tab-bg: rgba(20, 34, 37, 0.66);
    --tab-bg-hover: rgba(29, 48, 51, 0.92);
    --tab-border: rgba(232, 241, 238, 0.09);
    --card-bg-1: rgba(24, 41, 44, 0.92);
    --card-bg-2: rgba(15, 28, 31, 0.88);
    --card-border: rgba(232, 241, 238, 0.08);
    --icon-bg: #f5faf8;
    --icon-border: rgba(255, 255, 255, 0.10);
    --icon-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 4px 12px -8px rgba(0, 0, 0, 0.75);
    --action-bg: rgba(27, 45, 48, 0.95);
    --action-border: rgba(232, 241, 238, 0.10);
    --hover: rgba(232, 241, 238, 0.06);
    --hover-strong: rgba(232, 241, 238, 0.09);
    --code-bg: rgba(232, 241, 238, 0.08);
    --count-bg: rgba(255, 255, 255, 0.06);
    --count-color: #a1b4af;
    --add-bg: rgba(94, 224, 200, 0.035);
    --add-bg-hover: rgba(94, 224, 200, 0.08);
    --empty-bg: rgba(17, 30, 33, 0.66);
    --dialog-bg: rgba(13, 25, 28, 0.98);
    --dialog-backdrop: rgba(0, 0, 0, 0.55);
    --input-bg: #0d191c;
    --input-placeholder: #758b85;
    --toast-bg: rgba(29, 48, 52, 0.96);
    --toast-text: #eef9f5;
    --toast-border: rgba(232, 241, 238, 0.12);
    --scroll-thumb: rgba(232, 241, 238, 0.18);
    --scroll-thumb-hover: rgba(232, 241, 238, 0.30);
    --selection: rgba(94, 224, 200, 0.24);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25), 0 8px 20px -16px rgba(0, 0, 0, 0.60);
    --shadow-md: 0 16px 40px -26px rgba(0, 0, 0, 0.75), 0 2px 8px -4px rgba(0, 0, 0, 0.40);
    --shadow-lg: 0 30px 80px -40px rgba(0, 0, 0, 0.85);
}

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

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

body {
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.7s ease, color 0.4s ease;
}

body.is-locked {
    overflow: hidden;
}

[hidden] {
    display: none !important;
}

::selection {
    background: var(--selection);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: var(--scroll-thumb);
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scroll-thumb-hover);
    background-clip: padding-box;
}

button,
input,
select {
    font: inherit;
}

button {
    color: inherit;
}

a {
    color: inherit;
}

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

.svg-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.icon {
    width: 18px;
    height: 18px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon--star {
    fill: currentColor;
    stroke: none;
}

.icon--down {
    transform: rotate(180deg);
}

.icon--chevron {
    width: 14px;
    height: 14px;
}

/* ============================================================
   Background
   ============================================================ */

.page-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.page-bg::before,
.page-bg::after {
    content: "";
    position: absolute;
    inset: -12vmax;
    opacity: 0;
    transition: opacity 0.8s ease;
    will-change: opacity, transform;
    animation: bg-drift 48s ease-in-out infinite alternate;
}

.page-bg::before {
    opacity: 1;
    background:
        radial-gradient(46vmax 46vmax at 12% 8%, rgba(126, 231, 199, 0.55), transparent 65%),
        radial-gradient(42vmax 42vmax at 88% 6%, rgba(154, 202, 255, 0.46), transparent 66%),
        radial-gradient(52vmax 52vmax at 60% 110%, rgba(255, 207, 178, 0.42), transparent 68%),
        linear-gradient(170deg, #fcfefd 0%, #f4fbf8 46%, #edf7f4 100%);
}

.page-bg::after {
    background:
        radial-gradient(46vmax 46vmax at 12% 8%, rgba(52, 211, 184, 0.18), transparent 65%),
        radial-gradient(42vmax 42vmax at 88% 6%, rgba(96, 165, 250, 0.16), transparent 66%),
        radial-gradient(52vmax 52vmax at 60% 110%, rgba(244, 162, 97, 0.10), transparent 68%),
        linear-gradient(170deg, #0e1a1d 0%, #0b1417 48%, #091115 100%);
}

[data-theme="dark"] .page-bg::before {
    opacity: 0;
}

[data-theme="dark"] .page-bg::after {
    opacity: 1;
}

@keyframes bg-drift {
    from {
        transform: translate3d(-1.5vmax, 1vmax, 0) scale(1);
    }
    to {
        transform: translate3d(2vmax, -1.5vmax, 0) scale(1.06);
    }
}

/* ============================================================
   Top bar
   ============================================================ */

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    -webkit-backdrop-filter: blur(18px) saturate(1.15);
    backdrop-filter: blur(18px) saturate(1.15);
    transition: box-shadow 0.25s ease, background-color 0.7s ease, border-color 0.5s ease;
}

.topbar.is-scrolled {
    background: var(--header-bg-scrolled);
    box-shadow: var(--header-shadow);
}

.topbar__inner {
    width: 100%;
    max-width: var(--content-w);
    min-height: 72px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(320px, 620px) minmax(180px, 1fr);
    align-items: center;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    justify-self: start;
    min-width: 0;
    text-decoration: none;
    border-radius: 12px;
}

.brand__mark {
    width: 38px;
    height: 38px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(145deg, #23c69f 0%, #0d9488 100%);
    box-shadow: 0 8px 22px -12px rgba(13, 148, 136, 0.65);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.brand__mark .icon {
    width: 19px;
    height: 19px;
}

.brand:hover .brand__mark {
    transform: translateY(-1px) rotate(-5deg);
    box-shadow: 0 12px 26px -12px rgba(13, 148, 136, 0.75);
}

.brand__text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.brand__title {
    overflow: hidden;
    color: var(--text);
    font-size: 1rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    line-height: 1.25;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.brand__sub {
    overflow: hidden;
    color: var(--text-faint);
    font-size: 0.67rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    line-height: 1.3;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Search */

.search {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 46px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--search-bg);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.6s ease;
}

.search:focus-within {
    border-color: var(--accent-border);
    background: var(--search-bg-focus);
    box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-md);
}

.engine {
    position: relative;
    height: 100%;
    flex: none;
}

.engine__btn {
    height: 100%;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 10px 0 12px;
    border: 0;
    border-radius: 14px 0 0 14px;
    background: transparent;
    color: var(--text-soft);
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.engine__btn:hover {
    color: var(--accent);
    background: var(--accent-soft);
}

.engine__badge {
    width: 22px;
    height: 22px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: var(--badge-bg, var(--accent-soft));
    color: var(--badge, var(--accent));
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
}

.engine__label {
    font-size: 0.8rem;
    font-weight: 550;
    white-space: nowrap;
}

.engine__btn .icon--chevron {
    opacity: 0.55;
}

.search__divider {
    width: 1px;
    height: 20px;
    flex: none;
    background: var(--border);
}

.search__input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 10px;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 0.88rem;
    outline: none;
}

.search__input::placeholder {
    color: var(--text-faint);
}

.search__input::-webkit-search-cancel-button {
    appearance: none;
}

.search__clear {
    width: 28px;
    height: 28px;
    flex: none;
    display: grid;
    place-items: center;
    margin-right: 2px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-faint);
    cursor: pointer;
    transition: color 0.18s ease, background-color 0.18s ease;
}

.search__clear:hover {
    color: var(--text);
    background: var(--hover);
}

.search__clear .icon {
    width: 15px;
    height: 15px;
}

.search__submit {
    width: 34px;
    height: 34px;
    flex: none;
    display: grid;
    place-items: center;
    margin-right: 5px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: var(--accent);
    color: var(--accent-contrast);
    cursor: pointer;
    box-shadow: 0 6px 14px -9px rgba(15, 155, 134, 0.8);
    transition: background-color 0.18s ease, transform 0.18s ease, color 0.4s ease;
}

.search__submit:hover {
    background: var(--accent-strong);
}

.search__submit:active {
    transform: scale(0.96);
}

.search__submit .icon {
    width: 17px;
    height: 17px;
    stroke-width: 2.1;
}

/* Engine dropdown */

.engine__menu {
    position: absolute;
    top: calc(100% + 9px);
    left: 0;
    z-index: 80;
    width: 190px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface-strong);
    box-shadow: var(--shadow-md);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    animation: menu-in 0.16s ease both;
}

.engine-item {
    width: 100%;
    height: 38px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 9px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-soft);
    font-size: 0.8rem;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.engine-item:hover {
    color: var(--text);
    background: var(--hover);
}

.engine-item.is-active {
    color: var(--accent);
    background: var(--accent-soft);
}

.engine-item__badge {
    width: 23px;
    height: 23px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: var(--badge-bg, var(--accent-soft));
    color: var(--badge, var(--accent));
    font-size: 0.7rem;
    font-weight: 700;
}

.engine-item__label {
    flex: 1;
    font-weight: 550;
}

.engine-item .icon {
    width: 15px;
    height: 15px;
    opacity: 0;
}

.engine-item.is-active .icon {
    opacity: 1;
}

/* Header actions */

.top-actions {
    display: flex;
    align-items: center;
    justify-self: end;
    gap: 8px;
}

.btn-edit,
.btn-icon {
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: var(--button-bg);
    color: var(--text-soft);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition:
        color 0.18s ease,
        background-color 0.6s ease,
        border-color 0.5s ease,
        transform 0.18s ease,
        box-shadow 0.5s ease;
}

.btn-edit {
    gap: 7px;
    padding: 0 14px;
    border-radius: 13px;
    font-size: 0.8rem;
    font-weight: 600;
}

.btn-edit .icon {
    width: 16px;
    height: 16px;
}

.btn-edit:hover,
.btn-icon:hover {
    color: var(--accent);
    border-color: var(--accent-border);
    background: var(--button-bg-hover);
    box-shadow: var(--shadow-md);
}

.btn-icon {
    width: 42px;
    padding: 0;
    border-radius: 50%;
}

.btn-icon .icon {
    width: 19px;
    height: 19px;
}

.theme-toggle {
    position: relative;
}

.theme-toggle .icon {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 19px;
    height: 19px;
    transition: opacity 0.35s ease, transform 0.5s cubic-bezier(0.22, 0.8, 0.28, 1);
}

.theme-toggle .icon--sun {
    opacity: 1;
    transform: rotate(0) scale(1);
}

.theme-toggle .icon--moon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.45);
}

[data-theme="dark"] .theme-toggle .icon--sun {
    opacity: 0;
    transform: rotate(90deg) scale(0.45);
}

[data-theme="dark"] .theme-toggle .icon--moon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

.btn-edit[aria-pressed="true"] {
    color: var(--accent-contrast);
    border-color: transparent;
    background: var(--accent);
    box-shadow: 0 10px 22px -14px rgba(15, 155, 134, 0.9);
}

.btn-edit[aria-pressed="true"]:hover {
    color: var(--accent-contrast);
    background: var(--accent-strong);
}

.menu-wrap {
    position: relative;
}

.menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 80;
    width: 276px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface-strong);
    box-shadow: var(--shadow-md);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    animation: menu-in 0.16s ease both;
}

@keyframes menu-in {
    from {
        opacity: 0;
        transform: translateY(-5px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.menu__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 9px 9px;
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.mode-pill {
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.menu__item {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-soft);
    font-size: 0.81rem;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.menu__item .icon {
    width: 16px;
    height: 16px;
    color: var(--text-faint);
    transition: color 0.15s ease;
}

.menu__item:hover {
    color: var(--text);
    background: var(--hover);
}

.menu__item:hover .icon {
    color: var(--accent);
}

.menu__item--danger {
    color: var(--danger-text);
}

.menu__item--danger .icon {
    color: var(--danger-text);
}

.menu__item--danger:hover {
    color: var(--danger);
    background: var(--danger-soft);
}

.menu__item--danger:hover .icon {
    color: var(--danger);
}

.menu__divider {
    height: 1px;
    margin: 6px 9px;
    background: var(--border);
}

.menu__note {
    margin: 3px 9px 6px;
    color: var(--text-faint);
    font-size: 0.67rem;
    line-height: 1.6;
}

.menu__note code {
    padding: 1px 4px;
    border-radius: 5px;
    background: var(--code-bg);
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.95em;
}

/* ============================================================
   Page / toolbar
   ============================================================ */

.page {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--content-w);
    margin: 0 auto;
    padding: 28px 24px 56px;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px 20px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.tabs {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    overflow-x: auto;
    padding: 2px 1px;
    scrollbar-width: none;
}

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

.tab {
    height: 36px;
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 14px;
    border: 1px solid var(--tab-border);
    border-radius: 999px;
    background: var(--tab-bg);
    color: var(--text-soft);
    font-size: 0.8rem;
    font-weight: 550;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 2px 8px -7px rgba(13, 60, 52, 0.2);
    transition:
        color 0.18s ease,
        background-color 0.6s ease,
        border-color 0.5s ease,
        box-shadow 0.5s ease;
}

.tab:hover {
    color: var(--accent);
    border-color: var(--accent-border);
    background: var(--tab-bg-hover);
}

.tab.is-active {
    color: var(--accent-contrast);
    border-color: transparent;
    background: var(--accent);
    box-shadow: 0 8px 20px -14px rgba(15, 155, 134, 0.9);
}

.tab__count {
    min-width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--hover-strong);
    color: var(--text-faint);
    font-size: 0.64rem;
    font-weight: 600;
    line-height: 1;
}

.tab.is-active .tab__count {
    background: var(--accent-count-bg);
    color: var(--accent-count-color);
}

.tab--add {
    color: var(--accent);
    border-style: dashed;
    border-color: var(--accent-border);
    background: var(--accent-soft);
}

.tab--add:hover {
    background: var(--accent-soft-hover);
}

.stats {
    margin: 0 0 0 auto;
    color: var(--text-faint);
    font-size: 0.73rem;
    white-space: nowrap;
}

/* ============================================================
   Sections and cards
   ============================================================ */

.sections {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.section {
    scroll-margin-top: 100px;
}

.section__head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 30px;
    margin-bottom: 11px;
}

.section__title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.section__title h2 {
    margin: 0;
    color: var(--text);
    font-size: 0.98rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    line-height: 1.3;
}

.section__count {
    min-width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--count-bg);
    border: 1px solid var(--border);
    color: var(--count-color);
    font-size: 0.65rem;
    font-weight: 600;
}

.section__line {
    flex: 1;
    height: 1px;
    min-width: 12px;
    background: linear-gradient(90deg, var(--border), transparent);
}

.section__actions {
    display: none;
    align-items: center;
    gap: 3px;
}

.is-editing .section__actions {
    display: flex;
}

.icon-btn {
    width: 27px;
    height: 27px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text-faint);
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover {
    color: var(--accent);
    border-color: var(--border);
    background: var(--button-bg);
}

.icon-btn:disabled {
    opacity: 0.32;
    pointer-events: none;
    cursor: default;
}

.icon-btn--danger:hover {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: rgba(209, 75, 75, 0.15);
}

.icon-btn .icon {
    width: 14px;
    height: 14px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 13px;
}

.card {
    position: relative;
    min-width: 0;
    min-height: 82px;
    display: flex;
    align-items: stretch;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, var(--card-bg-1) 0%, var(--card-bg-2) 100%);
    box-shadow: var(--shadow-sm);
    transition:
        transform 0.2s cubic-bezier(0.2, 0.7, 0.2, 1),
        box-shadow 0.5s ease,
        border-color 0.5s ease,
        background-color 0.6s ease;
}

.card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-border);
    box-shadow: var(--shadow-md);
}

.card-link {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: inherit;
    text-decoration: none;
}

.card__icon {
    position: relative;
    width: 46px;
    height: 46px;
    flex: none;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--icon-border);
    border-radius: 13px;
    background: var(--icon-bg);
    box-shadow: var(--icon-shadow);
    transition: background-color 0.6s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.card__icon img {
    width: 27px;
    height: 27px;
    display: none;
    object-fit: contain;
}

.card__icon.is-loaded img {
    display: block;
}

.card__fallback {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--tile-1, #d1fae5), var(--tile-2, #a7f3d0));
    color: var(--tile-fg, #047857);
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.card__icon.is-loaded .card__fallback {
    display: none;
}

.card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
}

.card__name {
    overflow: hidden;
    color: var(--text);
    font-size: 0.93rem;
    font-weight: 620;
    letter-spacing: 0.005em;
    line-height: 1.35;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.card__desc {
    display: -webkit-box;
    overflow: hidden;
    color: var(--text-faint);
    font-size: 0.72rem;
    line-height: 1.45;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.card__arrow {
    width: 15px;
    height: 15px;
    flex: none;
    color: var(--text-faint);
    opacity: 0.45;
    transform: translate(-2px, 2px);
    transition: opacity 0.18s ease, transform 0.18s ease, color 0.18s ease;
}

.card:hover .card__arrow {
    color: var(--accent);
    opacity: 1;
    transform: translate(0, 0);
}

.card__actions {
    position: absolute;
    top: 7px;
    right: 7px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 2px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-2px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.is-editing .card__actions {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.card__actions .icon-btn {
    width: 25px;
    height: 25px;
    border-color: var(--action-border);
    background: var(--action-bg);
    box-shadow: 0 3px 8px -5px rgba(0, 0, 0, 0.35);
}

.is-editing .card-link {
    padding-left: 29px;
    padding-right: 46px;
    cursor: default;
}

.is-editing .card__arrow {
    display: none;
}

.is-editing .card:hover {
    transform: none;
}

.drag-handle {
    position: absolute;
    top: 50%;
    left: 7px;
    z-index: 2;
    width: 19px;
    height: 32px;
    display: none;
    place-items: center;
    border-radius: 6px;
    color: var(--text-faint);
    cursor: grab;
    transform: translateY(-50%);
}

.is-editing .drag-handle {
    display: grid;
}

.drag-handle:hover {
    color: var(--accent);
    background: var(--hover);
}

.drag-handle:active {
    cursor: grabbing;
}

.drag-handle .icon {
    width: 14px;
    height: 14px;
}

.card.is-dragging {
    opacity: 0.32;
}

.card.drop-before::before,
.card.drop-after::after {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    width: 2px;
    border-radius: 2px;
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(15, 155, 134, 0.12);
    z-index: 3;
}

.card.drop-before::before {
    left: -6px;
}

.card.drop-after::after {
    right: -6px;
}

.card-grid.drop-end {
    outline: 2px dashed rgba(15, 155, 134, 0.35);
    outline-offset: 5px;
    border-radius: 16px;
}

.add-row {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 10px;
    padding: 0 12px;
    border: 1.5px dashed var(--accent-border);
    border-radius: 13px;
    background: var(--add-bg);
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.add-row:hover {
    border-color: var(--accent);
    background: var(--add-bg-hover);
}

.add-row .icon {
    width: 15px;
    height: 15px;
}

.section-empty {
    padding: 18px 20px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    color: var(--text-faint);
    font-size: 0.76rem;
    text-align: center;
}

/* Empty search result */

.empty {
    max-width: 480px;
    margin: 8vh auto 0;
    padding: 42px 28px;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    background: var(--empty-bg);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.empty__icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
    border-radius: 16px;
    background: var(--accent-soft);
    color: var(--accent);
}

.empty__icon .icon {
    width: 23px;
    height: 23px;
}

.empty h2 {
    margin: 0 0 7px;
    font-size: 1rem;
    font-weight: 650;
}

.empty p {
    margin: 0 0 20px;
    color: var(--text-faint);
    font-size: 0.78rem;
}

/* ============================================================
   Footer / back to top / toast
   ============================================================ */

.footer {
    position: relative;
    z-index: 1;
    margin-top: 18px;
    border-top: 1px solid var(--border);
}

.footer__inner {
    width: 100%;
    max-width: var(--content-w);
    margin: 0 auto;
    padding: 20px 24px 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px 10px;
    flex-wrap: wrap;
    color: var(--text-faint);
    font-size: 0.72rem;
    text-align: center;
}

.footer__inner p {
    margin: 0;
}

.footer__dot {
    opacity: 0.55;
}

.footer a {
    color: var(--text-faint);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.18s ease, border-color 0.18s ease;
}

.footer a:hover {
    color: var(--accent);
    border-color: var(--accent-border);
}

.back-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 40;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface-strong);
    color: var(--text-soft);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease,
        color 0.18s ease,
        background-color 0.6s ease,
        border-color 0.18s ease;
}

.back-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-top:hover {
    color: var(--accent);
    border-color: var(--accent-border);
}

.back-top .icon {
    width: 18px;
    height: 18px;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 26px;
    z-index: 120;
    max-width: calc(100vw - 32px);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 10px 13px;
    border-radius: 999px;
    background: var(--toast-bg);
    border: 1px solid var(--toast-border);
    color: var(--toast-text);
    font-size: 0.78rem;
    line-height: 1.4;
    box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 10px);
    transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease;
}

.toast::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: none;
    border-radius: 50%;
    background: var(--accent);
}

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

.toast[data-type="error"]::before {
    background: #ff9a9a;
}

/* ============================================================
   Dialogs
   ============================================================ */

.dialog {
    width: min(540px, calc(100vw - 32px));
    max-width: 540px;
    max-height: 90vh;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    overflow: visible;
}

#categoryDialog,
#confirmDialog,
#passwordDialog {
    width: min(430px, calc(100vw - 32px));
    max-width: 430px;
}

.dialog::backdrop {
    background: var(--dialog-backdrop);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.dialog-card {
    width: 100%;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--card-border);
    border-radius: 22px;
    background: var(--dialog-bg);
    box-shadow: var(--shadow-lg);
    animation: dialog-in 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes dialog-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dialog__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px 14px;
    border-bottom: 1px solid var(--border);
}

.dialog__kicker {
    margin: 0 0 3px;
    color: var(--accent);
    font-size: 0.65rem;
    font-weight: 650;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.dialog__head h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 650;
    letter-spacing: 0.01em;
}

.dialog__close {
    width: 32px;
    height: 32px;
    flex: none;
    display: grid;
    place-items: center;
    margin-top: 1px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 50%;
    background: transparent;
    color: var(--text-faint);
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.dialog__close:hover {
    color: var(--text);
    background: var(--hover);
}

.dialog__close .icon {
    width: 16px;
    height: 16px;
}

.dialog__body {
    display: flex;
    flex-direction: column;
    gap: 13px;
    padding: 18px 22px;
    overflow-y: auto;
}

.dialog__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 22px 18px;
    border-top: 1px solid var(--border);
}

.dialog__foot-left,
.dialog__foot-right {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.field-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 12px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.field__label {
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 600;
}

.field__label em {
    color: var(--accent);
    font-style: normal;
}

.field__label small {
    margin-left: 3px;
    color: var(--text-faint);
    font-size: 0.65rem;
    font-weight: 400;
}

.input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--input-bg);
    color: var(--text);
    font-size: 0.84rem;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.6s ease;
}

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

.input:focus {
    border-color: var(--accent-border);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.select {
    appearance: none;
    padding-right: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237f948e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
}

.form-error {
    margin: 0;
    padding: 8px 10px;
    border-radius: 9px;
    background: var(--danger-soft);
    color: var(--danger);
    font-size: 0.74rem;
}

.form-hint {
    margin: 0;
    padding: 7px 10px;
    border-radius: 9px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.73rem;
}

.password-note {
    margin: 0;
    color: var(--text-faint);
    font-size: 0.76rem;
    line-height: 1.7;
}

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    20% {
        transform: translateX(-5px);
    }
    40% {
        transform: translateX(5px);
    }
    60% {
        transform: translateX(-3px);
    }
    80% {
        transform: translateX(3px);
    }
}

.dialog-card.shake {
    animation: shake 0.32s ease;
}

.confirm-message {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.84rem;
    line-height: 1.7;
}

.btn {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 14px;
    border: 1px solid var(--border-strong);
    border-radius: 11px;
    background: var(--button-solid);
    color: var(--button-text);
    font-size: 0.79rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition:
        color 0.16s ease,
        background-color 0.5s ease,
        border-color 0.4s ease,
        box-shadow 0.4s ease;
}

.btn:hover {
    color: var(--text);
    border-color: var(--border-strong);
    box-shadow: 0 4px 10px -8px rgba(13, 60, 52, 0.3);
}

.btn:disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: default;
}

.btn--primary {
    border-color: transparent;
    background: var(--accent);
    color: var(--accent-contrast);
    box-shadow: 0 8px 18px -12px rgba(15, 155, 134, 0.8);
}

.btn--primary:hover {
    color: var(--accent-contrast);
    border-color: transparent;
    background: var(--accent-strong);
}

.btn--danger {
    border-color: transparent;
    background: var(--danger-solid);
    color: var(--danger-contrast);
}

.btn--danger:hover {
    background: #b83f3f;
    color: var(--danger-contrast);
}

.btn--ghost {
    border-color: transparent;
    background: transparent;
    color: var(--text-soft);
}

.btn--ghost:hover {
    border-color: transparent;
    background: var(--hover);
    box-shadow: none;
}

.btn--danger-ghost {
    border-color: transparent;
    background: transparent;
    color: var(--danger-text);
}

.btn--danger-ghost:hover {
    border-color: transparent;
    background: var(--danger-soft);
    color: var(--danger);
    box-shadow: none;
}

.btn--small {
    min-height: 32px;
    padding: 0 9px;
    font-size: 0.72rem;
    border-radius: 9px;
}

.btn--small .icon {
    width: 14px;
    height: 14px;
}

/* Loading / error states */

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12vh 20px;
    color: var(--text-faint);
    font-size: 0.82rem;
}

.loading__spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--accent-border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.fatal {
    max-width: 520px;
    margin: 10vh auto 0;
    padding: 30px;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    background: var(--empty-bg);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.fatal h2 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.fatal p {
    margin: 0 0 16px;
    color: var(--text-faint);
    font-size: 0.78rem;
    line-height: 1.7;
}

.noscript {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 200;
    transform: translateX(-50%);
    padding: 12px 18px;
    border-radius: 12px;
    background: var(--toast-bg);
    color: var(--toast-text);
    font-size: 0.8rem;
    box-shadow: var(--shadow-md);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 980px) {
    .topbar__inner {
        min-height: 0;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px 14px;
        padding-top: 13px;
        padding-bottom: 13px;
    }

    .brand {
        grid-column: 1;
        grid-row: 1;
    }

    .top-actions {
        grid-column: 2;
        grid-row: 1;
    }

    .search {
        grid-column: 1 / -1;
        grid-row: 2;
        height: 44px;
    }

    .section {
        scroll-margin-top: 130px;
    }
}

@media (max-width: 760px) {
    .page {
        padding: 22px 18px 42px;
    }

    .toolbar {
        gap: 10px 12px;
        margin-bottom: 20px;
    }

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

    .sections {
        gap: 26px;
    }

    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .card {
        min-height: 76px;
        border-radius: 16px;
    }

    .card-link {
        gap: 10px;
        padding: 12px;
    }

    .card__icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .card__icon img {
        width: 25px;
        height: 25px;
    }

    .card__name {
        font-size: 0.84rem;
    }

    .card__desc {
        font-size: 0.67rem;
    }

    .add-row {
        min-height: 38px;
        margin-top: 9px;
        font-size: 0.72rem;
    }

    .footer__inner {
        padding: 18px 18px 26px;
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }

    .footer__dot {
        display: none;
    }

    .back-top {
        right: 16px;
        bottom: 16px;
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 640px) {
    .topbar__inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    .brand__mark {
        width: 36px;
        height: 36px;
        border-radius: 11px;
    }

    .brand__title {
        font-size: 0.95rem;
    }

    .brand__sub {
        font-size: 0.62rem;
    }

    .btn-edit {
        width: 42px;
        padding: 0;
        border-radius: 50%;
    }

    .btn-edit span {
        display: none;
    }

    .menu {
        width: 270px;
    }

    .search__input {
        font-size: 0.82rem;
    }

    .engine__label {
        display: none;
    }

    .engine__btn {
        gap: 4px;
        padding-right: 8px;
    }

    .engine__badge {
        width: 23px;
        height: 23px;
    }

    .tab {
        height: 34px;
        padding: 0 12px;
        font-size: 0.77rem;
    }

    .section__head {
        flex-wrap: wrap;
        row-gap: 4px;
    }

    .section__line {
        min-width: 6px;
    }

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

    .dialog__head {
        padding: 18px 18px 13px;
    }

    .dialog__body {
        padding: 16px 18px;
    }

    .dialog__foot {
        padding: 13px 18px 16px;
    }

    .dialog__foot-left:empty {
        display: none;
    }

    .dialog__foot-right {
        margin-left: auto;
    }
}

@media (max-width: 420px) {
    .page {
        padding-left: 16px;
        padding-right: 16px;
    }

    .card__icon {
        width: 38px;
        height: 38px;
        border-radius: 11px;
    }

    .card__icon img {
        width: 23px;
        height: 23px;
    }

    .card-link {
        gap: 9px;
        padding: 11px;
    }

    .card__name {
        font-size: 0.8rem;
    }

    .card__desc {
        font-size: 0.64rem;
    }

    .is-editing .card-link {
        padding-left: 14px;
        padding-right: 14px;
    }

    .is-editing .card__actions {
        display: none;
    }

    .section__actions .icon-btn {
        width: 25px;
        height: 25px;
    }

    .footer__inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    .dialog {
        width: calc(100vw - 20px);
    }

    #categoryDialog,
    #confirmDialog,
    #passwordDialog {
        width: calc(100vw - 20px);
    }
}

@media (max-width: 350px) {
    .card-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .card__desc {
        display: none;
    }

    .card {
        min-height: 66px;
    }

    .brand__sub {
        display: none;
    }
}

@media (pointer: coarse) {
    .drag-handle {
        display: none !important;
    }

    .is-editing .card-link {
        padding-left: 14px;
        padding-right: 14px;
    }

    .is-editing .card__actions {
        display: none;
    }

    .section__actions .icon-btn {
        width: 32px;
        height: 32px;
    }

    .section__actions .icon-btn .icon {
        width: 15px;
        height: 15px;
    }
}

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