.ad-center {
    text-align: center;
}

.ad-spacing-md {
    margin-bottom: 20px;
}

.ad-spacing-lg {
    margin-bottom: 30px;
}

.ad-slot-banner {
    display: inline-block;
    width: 728px;
    max-width: 100%;
    height: 90px;
}

.ad-slot-block {
    display: block;
}

.lic-badge {
    background-color: #6b7280;
}

.preview-text-display {
    color: #333;
}

.font-content-display {
    line-height: 2;
}

.intro {
    font-size: 16px;
}

.intro ul {
    margin: 15px 0 15px 20px;
}

.intro ul li {
    list-style: disc;
}

.layui-layer-page {
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.error-page {
    font-size: 30px;
    margin: 100px auto;
    color: #bbc8d4;
}

.error-page__content {
    max-width: 300px;
    margin: 0 auto;
    text-align: center;
}

.error-page img {
    max-width: 100%;
    height: auto;
}

.cat-items2 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    justify-content: space-between;
}

.cat-items2 .item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 50px 8px 40px;
    text-align: center;
}

.cat-items2 .item a span {
    display: block;
    font-size: 18px;
    line-height: 1.4;
    color: #333;
}

.cat-items2 .item.active a,
.cat-items2 .item a:hover {
    background: #c73230;
}

.cat-items2 .item a:hover span,
.cat-items2 .item.active a span {
    color: #fff;
}

.cat-items2 .item a:hover img,
.cat-items2 .item.active a img {
    filter: brightness(10);
}

.home-font-list {
    border: 1px solid #e5e7eb;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.home-font-list:hover {
    transform: translateY(-2px);
    border-color: #d1d5db;
}

.font-card__content,
.home-font-list__content {
    min-width: 0;
}

.font-card__link,
.home-font-list__link {
    display: block;
    min-width: 0;
    flex: 1 1 auto;
}

.font-card__preview,
.home-font-list__preview {
    display: flex;
    height: 128px;
    box-sizing: border-box;
    align-items: center;
    padding: 13px 24px 13px 0;
    overflow: hidden;
}

.single-font-preview__preview {
    height: 176px;
    align-items: center;
    padding-top: 10px;
    padding-bottom: 10px;
    padding-right: 0;
}

.preview-box__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.preview-box__field {
    flex: 1 1 320px;
    min-width: 0;
}

.preview-box__size-control {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 340px;
    min-width: 340px;
    padding: 0 8px;
    color: #374151;
}

.preview-box__size-control input[type="range"] {
    flex: 1 1 auto;
    min-width: 220px;
}

.preview-box__size-button {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #f3f4f6;
    color: #111827;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
}

.preview-box__size-button:hover {
    background: #e5e7eb;
}

.preview-box__size-button--small {
    font-size: 12px;
}

.preview-box__size-button--large {
    font-size: 18px;
}

.character-map-layer {
    padding: 16px;
}

.character-map-modal {
    display: grid;
    gap: 16px;
}

.character-map-modal__section {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    padding: 14px 16px;
}

.character-map-modal__label {
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
}

.character-map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
    gap: 10px;
    color: #111827;
}

.character-map-grid__cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    padding: 8px 6px;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.character-map-grid__cell:hover {
    border-color: #cbd5e1;
    background: #f3f4f6;
}

.character-map-grid__glyph {
    font-size: 28px;
    line-height: 1;
}

.character-map-grid__unicode {
    margin-top: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 10px;
    line-height: 1.2;
    color: #6b7280;
    text-align: center;
    word-break: break-word;
}

.font-card__preview-text,
.home-font-list__preview-text {
    display: block;
    width: 100%;
    max-width: 100%;
    color: #111827;
    font-size: 37px;
    line-height: 1.15;
    padding: 0.08em 0;
    text-align: left;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip !important;
    -o-text-overflow: clip;
}

.font-card__actions,
.home-font-list__actions {
    flex: 0 0 auto;
    min-width: fit-content;
    padding-left: 24px;
}

@media (max-width: 767px) {
    .cat-items2 {
        grid-template-columns: repeat(3, 1fr);
    }

    .cat-items2 .item a {
        gap: 10px;
        padding: 20px 5px 10px;
    }

    .cat-items2 .item a span {
        font-size: 12px;
        line-height: 1.2;
    }

    .cat-items2 .item a img {
        width: 35px;
    }

    .font-card__preview,
    .home-font-list__preview {
        height: 102px;
        padding: 11px 0;
    }

    .single-font-preview__preview {
        height: 138px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .preview-box__size-control {
        width: 100%;
        min-width: 0;
        flex-basis: 100%;
        padding: 4px 0 0;
    }

    .preview-box__size-control input[type="range"] {
        min-width: 0;
    }

    .character-map-grid {
        grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
        gap: 8px;
    }

    .character-map-grid__cell {
        min-height: 48px;
    }

    .character-map-grid__glyph {
        font-size: 24px;
    }

    .font-card__preview-text,
    .home-font-list__preview-text {
        font-size: 24px;
        line-height: 1.15;
    }
}
