:root {
    --nav-height: 84px;
    --tool-bg: #f5f7fb;
    --tool-ink: #172033;
    --tool-muted: #66758b;
    --tool-line: #dfe9f5;
    --tool-blue: #2f7df6;
    --tool-blue-dark: #176de5;
    --tool-green: #13866c;
    --tool-warn: #b45309;
}

.sakurairo-custom-beian {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.sakurairo-custom-beian a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sakurairo-custom-beian img {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

.sakurairo-custom-footer-beian {
    width: 100%;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    text-align: center;
    color: rgba(73, 80, 94, 0.72);
    font-size: 14px;
    line-height: 1.8;
}

.sakurairo-custom-footer-beian .sakurairo-custom-beian {
    justify-content: center;
}

.sakurairo-tool-standalone {
    min-height: 100vh;
    margin: 0;
    background: var(--tool-bg);
    color: var(--tool-ink);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.sakurairo-tool-standalone * {
    box-sizing: border-box;
}

.sakurairo-tool-standalone .tool-library {
    padding-top: calc(var(--nav-height) + 36px);
    padding-bottom: 56px;
}

.tool-library {
    min-height: 100vh;
    padding: calc(var(--nav-height) + 44px) max(20px, 4vw) 78px;
    background: var(--tool-bg);
    color: var(--tool-ink);
}

.tool-library a {
    text-decoration: none;
}

.tool-library__hero,
.tool-library__tabs,
.tool-library__filters,
.tool-library__layout {
    width: min(1360px, 100%);
    margin-right: auto;
    margin-left: auto;
}

.tool-library__hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.tool-library__hero p {
    margin: 0 0 6px;
    color: #1f78d4;
    font-size: 13px;
    font-weight: 900;
}

.tool-library__hero h1 {
    margin: 0;
    color: var(--tool-ink);
    font-size: 34px;
    line-height: 1.16;
}

.tool-library__hero span {
    display: block;
    margin-top: 8px;
    color: var(--tool-muted);
    font-size: 14px;
    font-weight: 700;
}

.tool-library__workbench {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid #dce6f2;
    border-radius: 8px;
    background: #ffffff;
    color: #2f4058;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(24, 39, 75, .06);
}

.tool-library__tabs {
    display: flex;
    gap: 18px;
    margin-bottom: 12px;
    overflow-x: auto;
    border-bottom: 1px solid #dfe7f2;
}

.tool-library__tabs button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 48px;
    padding: 0 2px;
    border: 0;
    background: transparent;
    color: #5c687a;
    cursor: pointer;
    font-size: 14px;
    font-weight: 900;
    white-space: nowrap;
}

.tool-library__tabs button:after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 3px;
    border-radius: 999px 999px 0 0;
    background: transparent;
    content: "";
}

.tool-library__tabs button.is-active {
    color: var(--tool-blue-dark);
}

.tool-library__tabs button.is-active:after {
    background: var(--tool-blue);
}

.tool-library__tabs span {
    color: #9aa6b6;
    font-size: 11px;
    font-weight: 900;
}

@media (min-width: 981px) {
    .sakurairo-tool-library-page .tool-library__tabs {
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        min-height: auto;
        margin-bottom: 14px;
        padding: 0;
        overflow: visible;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .sakurairo-tool-library-page .tool-library__tabs button {
        min-height: 42px;
        padding: 0 16px;
        gap: 8px;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, .76);
        border-radius: 999px;
        background:
            linear-gradient(145deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .46)),
            rgba(255, 255, 255, .42);
        color: rgba(70, 82, 104, .82);
        font-weight: var(--global-font-weight, 900);
        box-shadow: 0 4px 12px rgba(0, 0, 0, .06), inset 0 1px 0 rgba(255, 255, 255, .72);
        -webkit-backdrop-filter: saturate(180%) blur(10px);
        backdrop-filter: saturate(180%) blur(10px);
        transition: color .22s ease, background .22s ease, border-color .22s ease, box-shadow .22s ease, transform .22s ease;
    }

    .sakurairo-tool-library-page .tool-library__tabs button:after {
        right: 18px;
        bottom: 6px;
        left: 18px;
        height: 3px;
        border-radius: 999px;
        background: linear-gradient(90deg, var(--theme-skin-matching, var(--tool-blue)), rgba(255, 183, 202, .88));
        opacity: 0;
        transform: translateY(5px) scaleX(.45);
        transform-origin: center;
        transition: opacity .22s ease, transform .22s ease;
    }

    .sakurairo-tool-library-page .tool-library__tabs button:hover {
        color: #4e6a8a;
        background:
            linear-gradient(145deg, rgba(255, 255, 255, .88), rgba(255, 246, 250, .66)),
            rgba(255, 255, 255, .62);
        border-color: rgba(255, 255, 255, .92);
        box-shadow: 0 8px 20px rgba(24, 39, 75, .08), inset 0 1px 0 rgba(255, 255, 255, .9);
        transform: translateY(-1px);
    }

    .sakurairo-tool-library-page .tool-library__tabs button.is-active {
        color: #426489;
        border-color: color-mix(in srgb, var(--theme-skin-matching, #8ab7e8) 36%, rgba(255, 255, 255, .92));
        background:
            radial-gradient(circle at 18% 16%, rgba(255, 222, 232, .66), transparent 36%),
            linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(255, 248, 252, .78)),
            rgba(255, 255, 255, .76);
        box-shadow:
            0 1px 20px -9px var(--theme-skin-matching, rgba(47, 125, 246, .72)),
            0 8px 18px rgba(24, 39, 75, .07),
            inset 0 1px 0 rgba(255, 255, 255, .96);
        transform: translateY(-1px);
    }

    .sakurairo-tool-library-page .tool-library__tabs button.is-active:after {
        opacity: .95;
        transform: translateY(0) scaleX(1);
    }

    .sakurairo-tool-library-page .tool-library__tabs span {
        display: inline-flex;
        min-width: 22px;
        height: 20px;
        align-items: center;
        justify-content: center;
        padding: 0 6px;
        border: 1px solid rgba(255, 255, 255, .74);
        border-radius: 999px;
        background: rgba(255, 255, 255, .58);
        color: rgba(124, 139, 163, .82);
        font-size: 11px;
        line-height: 1;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .64);
    }

    .sakurairo-tool-library-page .tool-library__tabs button.is-active span {
        color: #426489;
        background: rgba(255, 255, 255, .82);
    }
}

.tool-library__filters {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 190px 170px auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
    padding: 10px;
    border: 1px solid var(--tool-line);
    border-radius: 10px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 12px 30px rgba(37, 56, 88, .07);
}

.tool-library__search {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid #d8e4f1;
    border-radius: 8px;
    background: #ffffff;
    color: #8b99aa;
}

.tool-library__search input,
.tool-library__filters select {
    width: 100%;
    height: 38px;
    border: 1px solid #d8e4f1;
    border-radius: 8px;
    background: #ffffff;
    color: #2f4058;
    font-size: 13px;
    font-weight: 800;
}

.tool-library__search input {
    border: 0;
    background: transparent;
    outline: none;
}

.tool-library__filters-side span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 38px;
    padding: 0 10px;
    border-radius: 8px;
    background: #f3f7fc;
    color: #50627a;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.tool-library__layout {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.tool-library__sidebar {
    position: sticky;
    top: calc(var(--nav-height) + 18px);
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--tool-line);
    border-radius: 10px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 12px 30px rgba(37, 56, 88, .06);
}

.tool-library__sidebar-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 4px 8px;
    color: #758399;
    font-size: 12px;
    font-weight: 900;
}

.tool-library__category-list {
    display: grid;
    gap: 6px;
}

.tool-library__sidebar button {
    display: flex;
    min-height: 34px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #4c5c70;
    cursor: pointer;
    font-size: 13px;
    font-weight: 850;
}

.tool-library__sidebar button:hover,
.tool-library__sidebar button.is-active {
    background: #eef5ff;
    color: var(--tool-blue-dark);
}

.tool-library__sidebar strong {
    color: #9aa6b6;
    font-size: 11px;
    font-weight: 900;
}

.tool-library__grid {
    display: grid;
    width: 100%;
    margin: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.library-card {
    position: relative;
    display: grid;
    min-width: 0;
    align-content: start;
    overflow: hidden;
    border: 1px solid var(--tool-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(38, 55, 86, .07);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.library-card[hidden] {
    display: none;
}

.library-card:hover {
    border-color: #c8d9ed;
    box-shadow: 0 16px 34px rgba(38, 55, 86, .1);
    transform: translateY(-2px);
}

.library-card.is-locked {
    background: linear-gradient(180deg, #ffffff, #f7f9fc);
}

.library-card__cover {
    position: relative;
    display: grid;
    width: 100%;
    aspect-ratio: 1240 / 644;
    overflow: hidden;
    place-items: center;
    background: linear-gradient(180deg, rgba(230, 243, 255, .98), rgba(212, 226, 244, .95));
}

.library-card__cover:after {
    position: absolute;
    inset: auto 0 0;
    height: 48%;
    background: linear-gradient(180deg, transparent, rgba(34, 61, 98, .12));
    content: "";
    pointer-events: none;
}

.library-card.is-locked .library-card__cover {
    filter: saturate(.72);
}

.library-card__shot,
.library-card__protected-cover,
.library-card__tool-placeholder,
.library-card__service-preview {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    place-items: center;
}

.library-card__shot {
    background: #eef6ff;
}

.library-card__shot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: 50% 50%;
}

.library-card__protected-cover,
.library-card__tool-placeholder {
    align-content: center;
    justify-items: center;
    gap: 7px;
    padding: 20px;
    text-align: center;
}

.library-card__protected-cover {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .72), transparent 36%),
        radial-gradient(circle at 20% 18%, rgba(47, 125, 246, .18), transparent 30%),
        radial-gradient(circle at 82% 22%, rgba(19, 134, 108, .15), transparent 28%),
        linear-gradient(135deg, #f7fbff 0%, #edf4fb 58%, #f9fcff 100%);
    color: #27364a;
}

.library-card__tool-placeholder {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .74), transparent 38%),
        radial-gradient(circle at 22% 20%, rgba(47, 125, 246, .14), transparent 30%),
        radial-gradient(circle at 82% 20%, rgba(19, 134, 108, .12), transparent 28%),
        linear-gradient(135deg, #f8fbff 0%, #eef5fd 52%, #f9fcff 100%);
    color: #2d6fd5;
}

.library-card__protected-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid rgba(47, 125, 246, .22);
    border-radius: 999px;
    background: rgba(255, 255, 255, .82);
    color: #256fe8;
    box-shadow: 0 12px 28px rgba(47, 125, 246, .12);
}

.library-card__protected-cover strong,
.library-card__tool-placeholder strong {
    position: relative;
    z-index: 1;
    color: #203047;
    font-size: 14px;
    font-weight: 950;
}

.library-card__protected-cover small,
.library-card__tool-placeholder small {
    position: relative;
    z-index: 1;
    max-width: 190px;
    color: #6d7d91;
    font-size: 11px;
    font-weight: 850;
    line-height: 1.55;
}

.library-card__service-preview {
    padding: 24px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .64), transparent 36%),
        radial-gradient(circle at 20% 20%, rgba(47, 125, 246, .2), transparent 30%),
        radial-gradient(circle at 82% 18%, rgba(19, 134, 108, .15), transparent 28%),
        linear-gradient(135deg, #edf7ff 0%, #dcecff 56%, #f7fbff 100%);
}

.library-card__service-window {
    display: grid;
    width: min(86%, 260px);
    overflow: hidden;
    border: 1px solid rgba(185, 205, 231, .8);
    border-radius: 10px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 18px 34px rgba(47, 93, 151, .14);
}

.library-card__service-bar {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 10px;
    border-bottom: 1px solid #e4edf8;
    background: #f8fbff;
}

.library-card__service-bar i {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #b7c8de;
}

.library-card__service-content {
    display: grid;
    gap: 8px;
    padding: 13px 14px 14px;
}

.library-card__service-content strong,
.library-card__service-content small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.library-card__service-content strong {
    color: #1f3554;
    font-size: 14px;
    font-weight: 950;
}

.library-card__service-content small {
    color: #6f8096;
    font-size: 11px;
    font-weight: 850;
}

.library-card__service-content span {
    display: grid;
    gap: 6px;
}

.library-card__service-content span i {
    display: block;
    height: 7px;
    border-radius: 999px;
    background: #e8f0fb;
}

.library-card__service-content span i:first-child {
    width: 82%;
    background: #cfe0f7;
}

.library-card__service-content span i:nth-child(2) {
    width: 64%;
}

.library-card__service-content span i:nth-child(3) {
    width: 72%;
}

.library-card__cover-lock {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(24, 34, 48, .74);
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.library-card__body {
    display: grid;
    gap: 8px;
    padding: 12px;
}

.library-card__title-row {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: start;
}

.library-card h2 {
    display: -webkit-box;
    min-height: 22px;
    margin: 0;
    overflow: hidden;
    color: #182235;
    font-size: 16px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.library-card__badges {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.library-card__badges span {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #edf5ff;
    color: #1d6fd1;
    font-size: 11px;
    font-weight: 900;
}

.library-card__badges span:nth-child(2) {
    background: #edfdf8;
    color: var(--tool-green);
}

.library-card__badges span.is-warning {
    background: #fff7ed;
    color: var(--tool-warn);
}

.library-card p {
    display: -webkit-box;
    min-height: 38px;
    margin: 0;
    overflow: hidden;
    color: #64758a;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.library-card__owner {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
    color: #7a8798;
}

.library-card__owner img,
.library-card__avatar-fallback {
    width: 22px;
    height: 22px;
    border: 1px solid #eef3f8;
    border-radius: 999px;
    background: linear-gradient(135deg, #dbeafe, #f0f9ff);
    object-fit: cover;
}

.library-card__owner small {
    overflow: hidden;
    color: #7a8798;
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.library-card__meta {
    display: flex;
    min-width: 0;
    overflow: hidden;
    align-items: center;
    gap: 6px 9px;
    white-space: nowrap;
}

.library-card__meta span {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 4px;
    color: #6d7d91;
    font-size: 11px;
    font-weight: 850;
}

.library-card__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 88px 78px;
    gap: 8px;
    margin-top: 2px;
}

.library-card__actions--single {
    grid-template-columns: 1fr;
}

.library-card__actions a,
.library-card__actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
}

.library-card__actions a:first-child {
    background: var(--tool-blue);
    color: #ffffff;
}

.library-card__actions a:last-child {
    border: 1px solid #dbe6f2;
    background: #ffffff;
    color: #3b4d64;
}

.library-card__actions--single a:last-child {
    border: 0;
    background: var(--tool-blue);
    color: #ffffff;
}

.library-card__actions button {
    background: #e8edf4;
    color: #8a96a6;
    cursor: not-allowed;
}

.library-card__actions .library-card__favorite-inline {
    border: 1px solid #dbe6f2;
    background: #ffffff;
    color: #3b4d64;
    cursor: pointer;
}

.library-card__actions .library-card__favorite-inline:hover,
.library-card__actions .library-card__favorite-inline.is-active {
    border-color: rgba(47, 125, 246, .35);
    background: #f3f8ff;
    color: #256fe8;
}

.tool-library__empty {
    display: grid;
    min-height: 220px;
    grid-column: 1 / -1;
    place-items: center;
    gap: 8px;
    padding: 28px;
    border: 1px solid var(--tool-line);
    border-radius: 10px;
    background: #ffffff;
    color: #6a7789;
    text-align: center;
}

.tool-library__empty[hidden] {
    display: none;
}

.tool-library__empty strong {
    color: #243246;
    font-size: 18px;
}

.tool-library__empty span {
    display: block;
}

.tool-library__notice {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 20;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    background: rgba(24, 34, 48, .88);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .18);
    backdrop-filter: blur(12px);
}

.tool-library__notice:empty {
    display: none;
}

@media (max-width: 1280px) {
    .tool-library__layout {
        grid-template-columns: 168px minmax(0, 1fr);
    }

    .tool-library__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .tool-library {
        padding: calc(var(--nav-height) + 26px) 16px 56px;
    }

    .tool-library__hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .tool-library__filters {
        grid-template-columns: 1fr;
    }

    .tool-library__layout {
        grid-template-columns: 1fr;
    }

    .tool-library__sidebar {
        position: static;
        display: flex;
        overflow-x: auto;
    }

    .tool-library__sidebar-title {
        flex: 0 0 auto;
        align-self: center;
        padding: 0 8px 0 0;
    }

    .tool-library__category-list {
        display: flex;
        gap: 6px;
    }

    .tool-library__sidebar button {
        flex: 0 0 auto;
        width: auto;
        min-width: 112px;
    }

    .tool-library__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .tool-library__tabs {
        gap: 14px;
    }

    .library-card__title-row {
        grid-template-columns: 1fr;
    }

    .library-card__badges {
        justify-content: flex-start;
    }
}

/* Desktop SaaS shell for /aitools: full-width, left-aligned, and PJAX-safe. */
body.sai-page .site-content,
.sakurairo-tool-library-page .site-content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.sai-page #content.site-content,
.sakurairo-tool-library-page #content.site-content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.sai-page .tool-library,
.sakurairo-tool-library-page .tool-library {
    width: 100% !important;
}

@media (min-width: 981px) {
    body.sai-page .tool-library,
    body.sakurairo-tool-library-page .tool-library {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: calc(var(--nav-height) + 28px) clamp(24px, 2.8vw, 44px) 72px !important;
    }

    body.sai-page .tool-library__hero,
    body.sai-page .tool-library__tabs,
    body.sai-page .tool-library__filters,
    body.sai-page .tool-library__layout,
    body.sakurairo-tool-library-page .tool-library__hero,
    body.sakurairo-tool-library-page .tool-library__tabs,
    body.sakurairo-tool-library-page .tool-library__filters,
    body.sakurairo-tool-library-page .tool-library__layout {
        width: 100% !important;
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    body.sai-page .tool-library__hero,
    body.sakurairo-tool-library-page .tool-library__hero {
        gap: 20px;
        padding: 0 2px;
    }

    body.sai-page .tool-library__hero > div,
    body.sakurairo-tool-library-page .tool-library__hero > div {
        max-width: 940px;
    }

    body.sai-page .tool-library__tabs,
    body.sakurairo-tool-library-page .tool-library__tabs {
        justify-content: flex-start;
        gap: 12px;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    body.sai-page .tool-library__filters,
    body.sakurairo-tool-library-page .tool-library__filters {
        grid-template-columns: minmax(360px, 1.35fr) 220px 220px auto;
        gap: 12px;
        padding: 14px 16px;
        border-radius: 16px;
    }

    body.sai-page .tool-library__layout,
    body.sakurairo-tool-library-page .tool-library__layout {
        grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
        gap: 20px;
        align-items: start;
    }

    body.sai-page .tool-library__sidebar,
    body.sakurairo-tool-library-page .tool-library__sidebar {
        top: calc(var(--nav-height) + 20px);
        padding: 16px;
    }

    body.sai-page .tool-library__grid,
    body.sakurairo-tool-library-page .tool-library__grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }

    body.sai-page .library-card,
    body.sakurairo-tool-library-page .library-card {
        min-height: 0;
    }

    body.sai-page .library-card__actions,
    body.sakurairo-tool-library-page .library-card__actions {
        grid-template-columns: minmax(0, 1fr) 96px 84px;
    }

    body.sai-page .library-card__actions--single,
    body.sakurairo-tool-library-page .library-card__actions--single {
        grid-template-columns: 1fr;
    }
}
