/* ==========================================================================
   LYY 主题样式（覆盖在 Cartzilla theme.min.css 之上）
   主色、圆角、阴影、动画都集中在下面的变量里，改主色只需改 --lyy-primary 三行
   ========================================================================== */

:root,
[data-bs-theme=light] {
    --lyy-primary: #4f46e5;
    --lyy-primary-rgb: 79, 70, 229;
    --lyy-primary-hover: #4338ca;
    --lyy-primary-subtle: #eef2ff;
    --lyy-accent: #7c3aed;

    --lyy-page-bg: #f6f7fb;
    --lyy-surface: #ffffff;
    --lyy-surface-2: #f3f4f8;
    --lyy-line: rgba(15, 23, 42, .08);
    --lyy-text: #1f2937;
    --lyy-text-2: #6b7280;
    --lyy-glass: rgba(255, 255, 255, .72);

    --lyy-radius: 16px;
    --lyy-radius-sm: 12px;
    --lyy-radius-xs: 8px;
    --lyy-shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 2px 8px rgba(15, 23, 42, .04);
    --lyy-shadow: 0 4px 12px rgba(15, 23, 42, .06), 0 12px 32px rgba(15, 23, 42, .06);
    --lyy-shadow-lg: 0 12px 40px rgba(15, 23, 42, .12);

    --lyy-ease: cubic-bezier(.22, .61, .36, 1);
    --lyy-dur: .35s;
    --lyy-header-h: 64px;
    --lyy-bottom-nav-h: 60px;

    /* 让 Cartzilla 组件跟着主色走 */
    --cz-primary: var(--lyy-primary);
    --cz-primary-rgb: var(--lyy-primary-rgb);
    --cz-primary-text-emphasis: var(--lyy-primary-hover);
    --cz-primary-bg-subtle: var(--lyy-primary-subtle);
    --cz-primary-border-subtle: rgba(var(--lyy-primary-rgb), .25);
    --cz-link-color: var(--lyy-primary);
    --cz-link-color-rgb: var(--lyy-primary-rgb);
    --cz-link-hover-color: var(--lyy-primary-hover);
    --cz-link-hover-color-rgb: var(--lyy-primary-rgb);
    --cz-body-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, "Helvetica Neue", Arial, sans-serif;
    --cz-border-radius: var(--lyy-radius-sm);
    --cz-focus-ring-color: rgba(var(--lyy-primary-rgb), .25);
}

[data-bs-theme=dark] {
    --lyy-primary: #818cf8;
    --lyy-primary-rgb: 129, 140, 248;
    --lyy-primary-hover: #a5b4fc;
    --lyy-primary-subtle: rgba(129, 140, 248, .14);
    --lyy-accent: #a78bfa;

    --lyy-page-bg: #0f1217;
    --lyy-surface: #171b22;
    --lyy-surface-2: #1f242d;
    --lyy-line: rgba(255, 255, 255, .08);
    --lyy-text: #e5e7eb;
    --lyy-text-2: #9ca3af;
    --lyy-glass: rgba(23, 27, 34, .72);

    --lyy-shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --lyy-shadow: 0 8px 24px rgba(0, 0, 0, .35);
    --lyy-shadow-lg: 0 16px 48px rgba(0, 0, 0, .5);

    --cz-body-bg: var(--lyy-page-bg);
    --cz-body-bg-rgb: 15, 18, 23;
}

/* ---------- 基础 ---------- */

html {
    /* 旧版用 zoom:0.9 缩小整页；改为 15px 基础字号，密度相近且不影响弹窗、定位元素 */
    font-size: 93.75%;
    scroll-behavior: smooth;
}

body {
    background: var(--lyy-page-bg);
    color: var(--lyy-text);
    -webkit-font-smoothing: antialiased;
    touch-action: manipulation;
}

main.content-wrapper {
    min-height: calc(100vh - 220px);
    /* backwards：动画结束后不保留动画状态。保留的话 main 会一直是独立层叠层，
       里面的弹窗再高的 z-index 也盖不过挂在 body 上的遮罩 */
    animation: lyy-page-in .5s var(--lyy-ease) backwards;
}

/* 只做透明度：给 main 加 transform 动画会让里面 position:fixed 的元素（阅读进度条、手机购买栏）相对 main 定位 */
@keyframes lyy-page-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--lyy-text);
    letter-spacing: -.01em;
}

a { transition: color .2s; }

::selection { background: rgba(var(--lyy-primary-rgb), .18); }

.text-primary { color: var(--lyy-primary) !important; }
.bg-primary { background-color: var(--lyy-primary) !important; }
.text-secondary-2 { color: var(--lyy-text-2) !important; }

/* ---------- 按钮 ---------- */

.btn {
    --cz-btn-border-radius: var(--lyy-radius-sm);
    border-radius: var(--lyy-radius-sm);
    font-weight: 500;
    transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s, transform .15s var(--lyy-ease);
}

.btn:active:not(:disabled) { transform: scale(.97); }

.btn-primary {
    --cz-btn-bg: var(--lyy-primary);
    --cz-btn-border-color: var(--lyy-primary);
    --cz-btn-hover-bg: var(--lyy-primary-hover);
    --cz-btn-hover-border-color: var(--lyy-primary-hover);
    --cz-btn-active-bg: var(--lyy-primary-hover);
    --cz-btn-active-border-color: var(--lyy-primary-hover);
    --cz-btn-disabled-bg: var(--lyy-primary);
    --cz-btn-disabled-border-color: var(--lyy-primary);
    --cz-btn-focus-shadow-rgb: var(--lyy-primary-rgb);
    box-shadow: 0 6px 16px -6px rgba(var(--lyy-primary-rgb), .6);
}

[data-bs-theme=dark] .btn-primary { --cz-btn-color: #0f1217; --cz-btn-hover-color: #0f1217; --cz-btn-active-color: #0f1217; }

.btn-outline-primary {
    --cz-btn-color: var(--lyy-primary);
    --cz-btn-border-color: rgba(var(--lyy-primary-rgb), .4);
    --cz-btn-hover-bg: var(--lyy-primary);
    --cz-btn-hover-border-color: var(--lyy-primary);
    --cz-btn-active-bg: var(--lyy-primary);
    --cz-btn-active-border-color: var(--lyy-primary);
}

.btn-soft {
    background: var(--lyy-surface-2);
    color: var(--lyy-text);
    border: 1px solid transparent;
}

.btn-soft:hover { background: var(--lyy-primary-subtle); color: var(--lyy-primary); }

.btn-icon-round {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--lyy-text-2);
    background: transparent;
    border: 0;
    font-size: 1.15rem;
    text-decoration: none;
}

.btn-icon-round:hover { background: var(--lyy-surface-2); color: var(--lyy-primary); }

/* ---------- 表单 ---------- */

.form-control,
.form-select {
    border-radius: var(--lyy-radius-sm);
    border-color: var(--lyy-line);
    background-color: var(--lyy-surface);
    padding: .65rem .9rem;
    transition: border-color .2s, box-shadow .2s;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(var(--lyy-primary-rgb), .6);
    box-shadow: 0 0 0 4px rgba(var(--lyy-primary-rgb), .12);
    background-color: var(--lyy-surface);
}

.form-label { font-weight: 500; color: var(--lyy-text); font-size: .9rem; margin-bottom: .4rem; }

/* iOS 输入框字号小于 16px 时聚焦会自动放大页面 */
@media (max-width: 767.98px) {
    .form-control, .form-select { font-size: 16px; }
}

/* ---------- 通用面板 / 卡片 ---------- */

.lyy-panel {
    background: var(--lyy-surface);
    border: 1px solid var(--lyy-line);
    border-radius: var(--lyy-radius);
    box-shadow: var(--lyy-shadow-sm);
}

.lyy-section-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.lyy-page-head { padding: 1.5rem 0 1rem; }
.lyy-page-head h1 { font-size: 1.6rem; font-weight: 700; margin: 0; }
.lyy-page-head p { color: var(--lyy-text-2); margin: .35rem 0 0; }

.breadcrumb { font-size: .85rem; margin-bottom: .5rem; }
.breadcrumb a { color: var(--lyy-text-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--lyy-primary); }

/* ---------- 顶部导航 ---------- */

.lyy-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--lyy-glass);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s, box-shadow .3s;
}

.lyy-header.is-scrolled {
    border-bottom-color: var(--lyy-line);
    box-shadow: 0 4px 20px rgba(15, 23, 42, .05);
}

.lyy-header-inner {
    height: var(--lyy-header-h);
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* 滚动后只加边框和阴影，不改高度：导航栏是 sticky、占文档流，高度变化会让页面跟着跳，
   在顶部附近反复触发收起/展开，造成抖动 */

.lyy-brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--lyy-text);
    text-decoration: none;
    min-width: 0;
}

.lyy-brand:hover { color: var(--lyy-text); }
.lyy-brand img { width: 2.25rem; height: 2.25rem; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.lyy-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.lyy-nav { display: flex; gap: .25rem; margin: 0 auto; }

.lyy-nav a {
    position: relative;
    padding: .45rem .9rem;
    border-radius: 999px;
    color: var(--lyy-text-2);
    font-size: .92rem;
    font-weight: 500;
    text-decoration: none;
    transition: color .2s, background-color .2s;
}

.lyy-nav a:hover { color: var(--lyy-text); background: var(--lyy-surface-2); }
.lyy-nav a.active { color: var(--lyy-primary); background: var(--lyy-primary-subtle); }

.lyy-header-actions { display: flex; align-items: center; gap: .15rem; margin-left: auto; }

@media (min-width: 992px) {
    .lyy-header-actions { margin-left: 0; }
}

/* ---------- 手机底部导航 ---------- */

.lyy-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1025;
    display: flex;
    background: var(--lyy-glass);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
    border-top: 1px solid var(--lyy-line);
    padding-bottom: env(safe-area-inset-bottom);
}

.lyy-bottom-nav a {
    flex: 1;
    height: var(--lyy-bottom-nav-h);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--lyy-text-2);
    font-size: .72rem;
    text-decoration: none;
    position: relative;
}

.lyy-bottom-nav a i { font-size: 1.3rem; transition: transform .25s var(--lyy-ease); }
.lyy-bottom-nav a.active { color: var(--lyy-primary); }
.lyy-bottom-nav a.active i { transform: translateY(-1px); }

.lyy-bottom-nav a.active::before {
    content: "";
    position: absolute;
    top: 0;
    width: 22px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--lyy-primary);
}

@media (max-width: 991.98px) {
    body { padding-bottom: calc(var(--lyy-bottom-nav-h) + env(safe-area-inset-bottom)); }
}

/* 回到顶部 */
.lyy-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.5rem;
    z-index: 1020;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    border: 1px solid var(--lyy-line);
    background: var(--lyy-surface);
    color: var(--lyy-text);
    box-shadow: var(--lyy-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    text-decoration: none;
    transition: opacity .3s, transform .3s var(--lyy-ease), color .2s;
}

.lyy-to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.lyy-to-top:hover { color: var(--lyy-primary); }

@media (max-width: 991.98px) {
    .lyy-to-top { bottom: calc(var(--lyy-bottom-nav-h) + env(safe-area-inset-bottom) + .9rem); right: .9rem; }
}

/* ---------- 页脚 ---------- */

.lyy-footer {
    margin-top: 3rem;
    padding: 1.75rem 0 2rem;
    border-top: 1px solid var(--lyy-line);
    color: var(--lyy-text-2);
    font-size: .82rem;
    text-align: center;
}

.lyy-footer a { color: var(--lyy-text-2); }
.lyy-footer a:hover { color: var(--lyy-primary); }

/* ---------- 首页轮播 ---------- */

.lyy-banner {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: var(--lyy-surface-2);
    box-shadow: var(--lyy-shadow-sm);
    isolation: isolate;
}

.lyy-banner .swiper-slide {
    aspect-ratio: 4 / 1;
    max-height: 260px;
    /* 图片有 1.04 倍的放大过渡，不裁剪的话相邻那张会从边上露出来 */
    overflow: hidden;
}

.lyy-banner .swiper-slide > a,
.lyy-banner .swiper-slide > div,
.lyy-banner picture,
.lyy-banner img {
    display: block;
    width: 100%;
    height: 100%;
}

.lyy-banner img {
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 6s linear;
}

.lyy-banner .swiper-slide-active img { transform: scale(1); }

.lyy-banner-caption {
    position: absolute;
    inset: auto 0 0 0;
    padding: 2.5rem 1.75rem 1.4rem;
    background: linear-gradient(to top, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0));
    color: #fff;
    pointer-events: none;
}

.lyy-banner-caption h2 {
    color: #fff;
    font-size: clamp(1.05rem, 2.2vw, 1.6rem);
    font-weight: 700;
    margin: 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .6s .15s, transform .6s .15s var(--lyy-ease);
}

.lyy-banner-caption p {
    margin: .3rem 0 0;
    font-size: clamp(.8rem, 1.4vw, .95rem);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .6s .3s, transform .6s .3s var(--lyy-ease);
}

.lyy-banner .swiper-slide-active .lyy-banner-caption h2,
.lyy-banner .swiper-slide-active .lyy-banner-caption p { opacity: 1; transform: none; }

.lyy-banner .swiper-pagination { bottom: .8rem !important; text-align: right; padding-right: 1.25rem; }

.lyy-banner .swiper-pagination-bullet {
    width: 7px;
    height: 7px;
    background: #fff;
    opacity: .55;
    border-radius: 999px;
    transition: width .35s var(--lyy-ease), opacity .35s;
}

.lyy-banner .swiper-pagination-bullet-active { width: 22px; opacity: 1; }

@media (max-width: 767.98px) {
    .lyy-banner { border-radius: var(--lyy-radius); }
    .lyy-banner .swiper-slide { aspect-ratio: 16 / 9; max-height: none; }
    .lyy-banner-caption { padding: 2rem 1rem 1rem; }
    .lyy-banner .swiper-pagination { text-align: center; padding-right: 0; bottom: .5rem !important; }
}

/* ---------- 首页工具栏：分类 + 搜索 ---------- */

.lyy-toolbar {
    position: sticky;
    top: var(--lyy-header-h);
    z-index: 1010;
    margin: 0 -.75rem;
    padding: .75rem;
    background: linear-gradient(var(--lyy-page-bg) 70%, rgba(0, 0, 0, 0));
    display: flex;
    gap: .75rem;
    align-items: center;
}

.lyy-chips {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    flex: 1;
    min-width: 0;
    padding: 2px;
    /* 只在右侧渐隐，提示还能往右滑；左侧不加，避免裁掉第一个选中的标签 */
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
    mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
}

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

.lyy-chip {
    flex-shrink: 0;
    scroll-snap-align: start;
    padding: .45rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--lyy-line);
    background: var(--lyy-surface);
    color: var(--lyy-text-2);
    font-size: .88rem;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: all .25s var(--lyy-ease);
}

.lyy-chip:hover { color: var(--lyy-primary); border-color: rgba(var(--lyy-primary-rgb), .35); }

.lyy-chip.active {
    background: var(--lyy-primary);
    border-color: var(--lyy-primary);
    color: #fff;
    box-shadow: 0 6px 16px -8px rgba(var(--lyy-primary-rgb), .8);
}

[data-bs-theme=dark] .lyy-chip.active { color: #0f1217; }

.lyy-chip .count { opacity: .7; font-size: .8em; margin-left: .25rem; }

.lyy-search { position: relative; flex: 0 0 280px; }

.lyy-search i.ci-search {
    position: absolute;
    left: .9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--lyy-text-2);
    pointer-events: none;
}

.lyy-search input {
    border-radius: 999px;
    padding-left: 2.4rem;
    padding-right: 2.2rem;
    height: 2.5rem;
}

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

.lyy-search .clear {
    position: absolute;
    right: .5rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--lyy-text-2);
    padding: .25rem;
    display: none;
}

.lyy-search.has-value .clear { display: block; }

@media (max-width: 767.98px) {
    .lyy-toolbar { flex-direction: column-reverse; align-items: stretch; gap: .6rem; }
    .lyy-search { flex: none; }
}

/* ---------- 商品网格与卡片 ---------- */

.lyy-goods-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

@media (min-width: 768px) { .lyy-goods-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; } }
@media (min-width: 992px) { .lyy-goods-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; } }
@media (min-width: 1200px) { .lyy-goods-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.lyy-goods-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--lyy-surface);
    border: 1px solid var(--lyy-line);
    border-radius: var(--lyy-radius);
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    transition: transform var(--lyy-dur) var(--lyy-ease), box-shadow var(--lyy-dur) var(--lyy-ease), border-color .3s;
}

.lyy-goods-card:hover {
    color: inherit;
    transform: translateY(-4px);
    box-shadow: var(--lyy-shadow);
    border-color: rgba(var(--lyy-primary-rgb), .25);
}

.lyy-goods-media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--lyy-surface-2);
    overflow: hidden;
}

.lyy-goods-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12%;
    transition: transform .6s var(--lyy-ease), opacity .4s;
}

.lyy-goods-card:hover .lyy-goods-media img { transform: scale(1.06); }

.lyy-goods-tag {
    position: absolute;
    top: .6rem;
    left: .6rem;
    z-index: 2;
    padding: .2rem .55rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 600;
    background: rgba(255, 255, 255, .9);
    color: #059669;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.lyy-goods-tag.is-manual { color: #d97706; }
[data-bs-theme=dark] .lyy-goods-tag { background: rgba(15, 18, 23, .75); color: #34d399; }
[data-bs-theme=dark] .lyy-goods-tag.is-manual { color: #fbbf24; }
.lyy-goods-tag.is-free,
[data-bs-theme=dark] .lyy-goods-tag.is-free { color: var(--lyy-primary); }

.lyy-goods-body { display: flex; flex-direction: column; flex: 1; padding: .8rem .9rem .9rem; gap: .35rem; }

.lyy-goods-title {
    font-size: .92rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--lyy-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
    margin: 0;
}

.lyy-goods-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: .5rem; }

.lyy-price { color: var(--lyy-primary); font-weight: 700; font-size: 1.1rem; line-height: 1.1; white-space: nowrap; }
.lyy-price small { font-size: .7em; font-weight: 600; margin-right: 1px; }
.lyy-price del { color: var(--lyy-text-2); font-size: .7em; font-weight: 400; margin-left: .3rem; }

.lyy-stock { font-size: .72rem; color: var(--lyy-text-2); white-space: nowrap; }
.lyy-stock.is-low { color: #dc2626; font-weight: 600; }

.lyy-goods-card.is-soldout .lyy-goods-media img { filter: grayscale(1); opacity: .5; }

.lyy-goods-card.is-soldout .lyy-goods-media::after {
    content: attr(data-soldout);
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    transform: translate(-50%, -50%);
    padding: .3rem .9rem;
    border-radius: 999px;
    background: rgba(17, 24, 39, .72);
    color: #fff;
    font-weight: 600;
    letter-spacing: .1em;
    font-size: .82rem;
    white-space: nowrap;
}

.lyy-goods-card.is-soldout:hover { transform: none; box-shadow: none; }

@media (max-width: 575.98px) {
    .lyy-goods-body { padding: .65rem .7rem .75rem; }
    .lyy-goods-title { font-size: .86rem; }
    .lyy-price { font-size: 1rem; }
}

/* 图片加载前的骨架闪光（lyy.js 在图片加载后加 .is-loaded） */
.lyy-skeleton { position: relative; }

.lyy-skeleton::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .5) 50%, transparent 80%) var(--lyy-surface-2);
    background-size: 200% 100%;
    animation: lyy-shimmer 1.4s infinite linear;
    transition: opacity .4s;
}

[data-bs-theme=dark] .lyy-skeleton::before {
    background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .05) 50%, transparent 80%) var(--lyy-surface-2);
    background-size: 200% 100%;
}

.lyy-skeleton.is-loaded::before { opacity: 0; pointer-events: none; animation: none; }

@keyframes lyy-shimmer { to { background-position: -200% 0; } }

/* 分类切换淡入 */
.lyy-pane { display: none; }
.lyy-pane.active { display: block; animation: lyy-fade-up .4s var(--lyy-ease) both; }

@keyframes lyy-fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

/* 滚动入场：只有 lyy.js 正常运行（html 上有 .lyy-js）时才先隐藏，脚本出错也不会让内容一直不可见 */
.lyy-js [data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .55s var(--lyy-ease), transform .55s var(--lyy-ease);
    transition-delay: var(--reveal-delay, 0s);
}

.lyy-js [data-reveal].is-visible { opacity: 1; transform: none; }

/* 空状态 */
.lyy-empty { text-align: center; padding: 3.5rem 1rem; color: var(--lyy-text-2); }

.lyy-empty-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lyy-primary-subtle);
    color: var(--lyy-primary);
    font-size: 1.6rem;
}

/* ---------- 购买页 ---------- */

.lyy-buy-media {
    display: block;
    aspect-ratio: 4 / 3;
    max-height: 340px;
    width: 100%;
    background: var(--lyy-surface-2);
    border-radius: var(--lyy-radius-sm);
    overflow: hidden;
}

.lyy-buy-media img { width: 100%; height: 100%; object-fit: contain; padding: 6%; transition: transform .5s var(--lyy-ease); }
.lyy-buy-media:hover img { transform: scale(1.03); }

.lyy-buy-title { font-size: 1.35rem; font-weight: 700; line-height: 1.35; margin-bottom: .75rem; }

.lyy-pill {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .28rem .7rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 500;
    background: var(--lyy-surface-2);
    color: var(--lyy-text-2);
}

.lyy-pill.is-success { background: rgba(16, 185, 129, .12); color: #059669; }
.lyy-pill.is-primary { background: var(--lyy-primary-subtle); color: var(--lyy-primary); }
.lyy-pill.is-warning { background: rgba(245, 158, 11, .14); color: #b45309; }
[data-bs-theme=dark] .lyy-pill.is-success { color: #34d399; }
[data-bs-theme=dark] .lyy-pill.is-warning { color: #fbbf24; }

.lyy-buy-price {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    padding: 1rem 1.1rem;
    margin: 1rem 0 1.25rem;
    border-radius: var(--lyy-radius-sm);
    background: linear-gradient(120deg, var(--lyy-primary-subtle), rgba(var(--lyy-primary-rgb), .02));
}

.lyy-buy-price .now { font-size: 1.9rem; font-weight: 800; color: var(--lyy-primary); line-height: 1; }
.lyy-buy-price .now small { font-size: .55em; margin-right: 2px; }
.lyy-buy-price del { color: var(--lyy-text-2); }

.lyy-wholesale { font-size: .82rem; color: var(--lyy-text-2); display: flex; flex-wrap: wrap; gap: .4rem; margin: -.5rem 0 1.25rem; }
.lyy-wholesale span { background: var(--lyy-surface-2); border-radius: 999px; padding: .2rem .65rem; }

/* 支付方式卡片（.payments / data-type / .paymentsvg 给 paysvg.js 填图标用） */
.lyy-pay-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
@media (min-width: 576px) { .lyy-pay-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 992px) { .lyy-pay-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1400px) { .lyy-pay-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.lyy-pay {
    position: relative;
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .7rem .8rem;
    border: 1.5px solid var(--lyy-line);
    border-radius: var(--lyy-radius-sm);
    background: var(--lyy-surface);
    cursor: pointer;
    user-select: none;
    font-size: .88rem;
    font-weight: 500;
    transition: border-color .2s, background-color .2s, transform .15s var(--lyy-ease);
}

.lyy-pay:hover { border-color: rgba(var(--lyy-primary-rgb), .4); }
.lyy-pay:active { transform: scale(.98); }
.lyy-pay.active { border-color: var(--lyy-primary); background: var(--lyy-primary-subtle); }

.lyy-pay .paymentsvg { width: 26px; height: 26px; flex-shrink: 0; display: inline-flex; }
.lyy-pay .paymentsvg svg { width: 26px !important; height: 26px !important; border-radius: 6px; }
.lyy-pay .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.lyy-pay .check {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--lyy-primary);
    color: #fff;
    font-size: .7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0);
    transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
}

.lyy-pay.active .check { transform: scale(1); }

.lyy-pay .rate { margin-left: auto; font-size: .72rem; color: var(--lyy-text-2); font-weight: 400; flex-shrink: 0; }

/* 数量步进器 */
.count-input {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--lyy-line);
    border-radius: 999px;
    background: var(--lyy-surface);
    overflow: hidden;
    height: 2.9rem;
}

.count-input button {
    width: 2.6rem;
    height: 100%;
    border: 0;
    background: transparent;
    color: var(--lyy-text);
    font-size: 1rem;
    transition: background-color .2s, color .2s;
}

.count-input button:hover { background: var(--lyy-surface-2); color: var(--lyy-primary); }

.count-input input {
    width: 3rem;
    border: 0;
    text-align: center;
    background: transparent;
    font-weight: 600;
    -moz-appearance: textfield;
    padding: 0;
    box-shadow: none !important;
}

.count-input input::-webkit-outer-spin-button,
.count-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.lyy-buy-submit { height: 2.9rem; border-radius: 999px; font-weight: 600; }

.lyy-tabs { display: flex; gap: .25rem; padding: .25rem; background: var(--lyy-surface-2); border-radius: 999px; width: fit-content; max-width: 100%; margin-bottom: 1.25rem; }

.lyy-tabs button,
.lyy-tabs a {
    border: 0;
    background: transparent;
    padding: .45rem 1.1rem;
    border-radius: 999px;
    font-size: .88rem;
    font-weight: 500;
    color: var(--lyy-text-2);
    white-space: nowrap;
    text-decoration: none;
    transition: background-color .25s, color .25s, box-shadow .25s;
}

.lyy-tabs .active {
    background: var(--lyy-surface);
    color: var(--lyy-text);
    box-shadow: var(--lyy-shadow-sm);
}

.lyy-tabs.is-fill { width: 100%; }
.lyy-tabs.is-fill > * { flex: 1; }

/* 手机端购买页底部固定栏 */
.lyy-buybar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--lyy-bottom-nav-h) + env(safe-area-inset-bottom));
    z-index: 1024;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem .9rem;
    background: var(--lyy-glass);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
    border-top: 1px solid var(--lyy-line);
    /* 收起时完全移出屏幕并隐藏（只平移自身高度会停在底部导航上方） */
    transform: translateY(calc(100% + var(--lyy-bottom-nav-h) + env(safe-area-inset-bottom)));
    opacity: 0;
    visibility: hidden;
    transition: transform .35s var(--lyy-ease), opacity .25s, visibility 0s .35s;
}

.lyy-buybar.is-visible { transform: none; opacity: 1; visibility: visible; transition: transform .35s var(--lyy-ease), opacity .25s; }
.lyy-buybar .lyy-price { font-size: 1.2rem; }
.lyy-buybar .btn { margin-left: auto; border-radius: 999px; padding-left: 1.5rem; padding-right: 1.5rem; }

@media (max-width: 991.98px) {
    body.has-buybar { padding-bottom: calc(var(--lyy-bottom-nav-h) + 64px + env(safe-area-inset-bottom)); }
}

@media (min-width: 992px) {
    .lyy-buybar { display: none !important; }
    .lyy-sticky { position: sticky; top: calc(var(--lyy-header-h) + 1rem); }
}

/* 商品描述 / 文章正文排版 */
.lyy-prose { line-height: 1.85; word-break: break-word; color: var(--lyy-text); }
.lyy-prose > *:first-child { margin-top: 0; }
.lyy-prose img { max-width: 100%; height: auto; border-radius: var(--lyy-radius-xs); }
.lyy-prose a { color: var(--lyy-primary); }
.lyy-prose h1, .lyy-prose h2, .lyy-prose h3, .lyy-prose h4 { margin: 1.6em 0 .6em; font-weight: 700; line-height: 1.35; }
.lyy-prose h1 { font-size: 1.5rem; }
.lyy-prose h2 { font-size: 1.3rem; }
.lyy-prose h3 { font-size: 1.12rem; }
.lyy-prose p, .lyy-prose ul, .lyy-prose ol { margin-bottom: 1em; }
.lyy-prose blockquote { margin: 1.2em 0; padding: .6em 1em; border-left: 3px solid var(--lyy-primary); background: var(--lyy-surface-2); border-radius: 0 var(--lyy-radius-xs) var(--lyy-radius-xs) 0; color: var(--lyy-text-2); }
.lyy-prose code { background: var(--lyy-surface-2); padding: .1em .4em; border-radius: 4px; font-size: .9em; color: inherit; }
.lyy-prose pre { background: var(--lyy-surface-2); padding: 1em; border-radius: var(--lyy-radius-xs); overflow-x: auto; }
.lyy-prose pre code { background: none; padding: 0; }
.lyy-prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin-bottom: 1em; }
.lyy-prose th, .lyy-prose td { border: 1px solid var(--lyy-line); padding: .45em .75em; }
.lyy-prose hr { margin: 2em 0; }

/* 后台富文本编辑器（Filament）产生的格式 */
.lyy-prose .color { color: var(--color); }
[data-bs-theme=dark] .lyy-prose .color { color: var(--dark-color, var(--color)); }
.lyy-prose mark { padding: .05em .2em; border-radius: 3px; background-color: #fef08a; color: inherit; }
.lyy-prose .lead { font-size: 1.15em; color: var(--lyy-text-2); line-height: 1.7; }
.lyy-prose small { font-size: .85em; }
.lyy-prose img[width] { height: auto; }
.lyy-prose p[style*="text-align"] img { display: inline-block; }
.lyy-prose .grid-layout { display: grid; grid-template-columns: var(--cols, 1fr); gap: 1rem; margin-bottom: 1em; }
.lyy-prose .grid-layout-col { grid-column: var(--col-span, auto); min-width: 0; }
.lyy-prose .grid-layout-col > *:last-child { margin-bottom: 0; }
@media (max-width: 575.98px) {
    /* 手机上分栏改成上下排列 */
    .lyy-prose .grid-layout { grid-template-columns: 1fr; }
    .lyy-prose .grid-layout-col { grid-column: auto; }
}
.lyy-prose details { margin: 1em 0; padding: .6em 1em; border: 1px solid var(--lyy-line); border-radius: var(--lyy-radius-xs); background: var(--lyy-surface); }
.lyy-prose details > summary { cursor: pointer; font-weight: 600; list-style: revert; }
.lyy-prose details[open] > summary { margin-bottom: .5em; }
.lyy-prose details > div > *:last-child { margin-bottom: 0; }

/* ---------- 结算 / 订单 ---------- */

.lyy-steps { display: flex; align-items: center; gap: .5rem; margin-bottom: 1.5rem; }

.lyy-step { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--lyy-text-2); white-space: nowrap; }

.lyy-step .dot {
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    font-weight: 600;
    background: var(--lyy-surface-2);
    color: var(--lyy-text-2);
    flex-shrink: 0;
}

.lyy-step.done .dot { background: var(--lyy-primary); color: #fff; }
.lyy-step.current { color: var(--lyy-text); font-weight: 600; }
.lyy-step.current .dot { background: var(--lyy-primary-subtle); color: var(--lyy-primary); box-shadow: 0 0 0 4px rgba(var(--lyy-primary-rgb), .12); }
.lyy-step-line { flex: 1; height: 2px; min-width: 1rem; background: var(--lyy-line); border-radius: 2px; }
.lyy-step-line.done { background: var(--lyy-primary); }

.lyy-kv { margin: 0; }

.lyy-kv > div {
    display: flex;
    gap: 1rem;
    padding: .8rem 0;
    border-bottom: 1px dashed var(--lyy-line);
    font-size: .92rem;
}

.lyy-kv > div:last-child { border-bottom: 0; }
.lyy-kv dt { width: 6.5rem; flex-shrink: 0; font-weight: 400; color: var(--lyy-text-2); }
.lyy-kv dd { margin: 0; min-width: 0; word-break: break-all; color: var(--lyy-text); }

@media (max-width: 575.98px) {
    .lyy-kv > div { flex-direction: column; gap: .15rem; padding: .65rem 0; }
    .lyy-kv dt { width: auto; font-size: .8rem; }
}

.lyy-total { display: flex; justify-content: space-between; align-items: baseline; margin: 1rem 0 1.25rem; }
.lyy-total .amount { font-size: 1.8rem; font-weight: 800; color: var(--lyy-primary); }

.lyy-status { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.lyy-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.lyy-status.is-success { background: rgba(16, 185, 129, .12); color: #059669; }
.lyy-status.is-warning { background: rgba(245, 158, 11, .14); color: #b45309; }
.lyy-status.is-info { background: rgba(59, 130, 246, .12); color: #2563eb; }
.lyy-status.is-primary { background: var(--lyy-primary-subtle); color: var(--lyy-primary); }
.lyy-status.is-danger { background: rgba(239, 68, 68, .12); color: #dc2626; }
.lyy-status.is-muted { background: var(--lyy-surface-2); color: var(--lyy-text-2); }
.lyy-status.is-warning::before { animation: lyy-blink 1.4s infinite; }
[data-bs-theme=dark] .lyy-status.is-success { color: #34d399; }
[data-bs-theme=dark] .lyy-status.is-warning { color: #fbbf24; }
[data-bs-theme=dark] .lyy-status.is-info { color: #60a5fa; }
[data-bs-theme=dark] .lyy-status.is-danger { color: #f87171; }

@keyframes lyy-blink { 50% { opacity: .3; } }

.lyy-carmi {
    position: relative;
    background: var(--lyy-surface-2);
    border-radius: var(--lyy-radius-sm);
    padding: 1rem 1rem 3.2rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: .88rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 320px;
    overflow: auto;
    color: var(--lyy-text);
}

.lyy-carmi-copy { position: absolute; right: .75rem; bottom: .75rem; white-space: nowrap; font-family: var(--cz-body-font-family); }

/* ---------- 扫码支付 ---------- */

.lyy-qr {
    position: relative;
    width: 232px;
    height: 232px;
    margin: 0 auto;
    padding: 16px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--lyy-shadow);
}

.lyy-qr img { width: 100%; height: 100%; display: block; }

.lyy-qr::before,
.lyy-qr::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 24px;
    border: 2px solid rgba(var(--lyy-primary-rgb), .35);
    animation: lyy-ripple 2.4s infinite var(--lyy-ease);
    pointer-events: none;
}

.lyy-qr::after { animation-delay: 1.2s; }

@keyframes lyy-ripple {
    from { opacity: .9; transform: scale(1); }
    to { opacity: 0; transform: scale(1.12); }
}

.lyy-qr.is-paid::before,
.lyy-qr.is-paid::after { display: none; }

.lyy-qr-done {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: rgba(255, 255, 255, .94);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .3s;
}

.lyy-qr.is-paid .lyy-qr-done { opacity: 1; }
.lyy-qr-done svg { width: 84px; height: 84px; }
.lyy-qr-done circle { fill: none; stroke: #10b981; stroke-width: 4; stroke-dasharray: 166; stroke-dashoffset: 166; }
.lyy-qr-done path { fill: none; stroke: #10b981; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 48; stroke-dashoffset: 48; }
.lyy-qr.is-paid .lyy-qr-done circle { animation: lyy-draw .6s .1s var(--lyy-ease) forwards; }
.lyy-qr.is-paid .lyy-qr-done path { animation: lyy-draw .4s .6s var(--lyy-ease) forwards; }

@keyframes lyy-draw { to { stroke-dashoffset: 0; } }

.lyy-waiting { display: inline-flex; align-items: center; gap: .5rem; color: var(--lyy-text-2); font-size: .9rem; }
.lyy-waiting i { width: 8px; height: 8px; border-radius: 50%; background: var(--lyy-primary); animation: lyy-blink 1.2s infinite; }

/* ---------- 文章 ---------- */

.lyy-article-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 768px) { .lyy-article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; } }
@media (min-width: 1200px) { .lyy-article-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.lyy-article-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--lyy-surface);
    border: 1px solid var(--lyy-line);
    border-radius: var(--lyy-radius);
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    transition: transform var(--lyy-dur) var(--lyy-ease), box-shadow var(--lyy-dur) var(--lyy-ease);
}

.lyy-article-card:hover { color: inherit; transform: translateY(-4px); box-shadow: var(--lyy-shadow); }

.lyy-article-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; flex-shrink: 0; background: var(--lyy-surface-2); }
.lyy-article-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--lyy-ease); }
.lyy-article-card:hover .lyy-article-cover img { transform: scale(1.05); }

.lyy-article-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(var(--lyy-primary-rgb), .9), var(--lyy-accent));
    color: rgba(255, 255, 255, .92);
    font-size: 2.6rem;
    font-weight: 800;
}

.lyy-article-placeholder::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, .25), transparent 55%);
}

.lyy-article-body { display: flex; flex-direction: column; flex: 1; padding: 1rem 1.1rem 1.1rem; gap: .45rem; min-width: 0; }

.lyy-article-title {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .2s;
}

.lyy-article-card:hover .lyy-article-title { color: var(--lyy-primary); }

.lyy-article-summary {
    margin: 0;
    font-size: .86rem;
    color: var(--lyy-text-2);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lyy-article-meta { margin-top: auto; padding-top: .35rem; display: flex; align-items: center; gap: .4rem; font-size: .78rem; color: var(--lyy-text-2); }
.lyy-article-meta .cat { color: var(--lyy-primary); font-weight: 500; }

@media (max-width: 767.98px) {
    /* 手机端：左图右文 */
    .lyy-article-card { flex-direction: row; }
    .lyy-article-cover { width: 34%; aspect-ratio: auto; min-height: 100%; }
    .lyy-article-placeholder { font-size: 1.6rem; }
    .lyy-article-body { padding: .8rem .9rem; }
    .lyy-article-title { font-size: .95rem; }
    .lyy-article-summary { font-size: .8rem; }
}

.lyy-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    z-index: 1040;
    background: linear-gradient(90deg, var(--lyy-primary), var(--lyy-accent));
    transform-origin: 0 50%;
    transform: scaleX(0);
}

.lyy-article-hero { aspect-ratio: 21 / 9; max-height: 380px; width: 100%; border-radius: var(--lyy-radius); overflow: hidden; margin-bottom: 1.5rem; }
.lyy-article-hero img { width: 100%; height: 100%; object-fit: cover; }
.lyy-article-wrap { max-width: 760px; margin: 0 auto; }
.lyy-article-h1 { font-size: clamp(1.4rem, 3.2vw, 2rem); font-weight: 800; line-height: 1.3; margin: .25rem 0 .75rem; }

.lyy-prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: 2rem; }

.lyy-prevnext a {
    display: block;
    padding: .9rem 1rem;
    border-radius: var(--lyy-radius-sm);
    border: 1px solid var(--lyy-line);
    background: var(--lyy-surface);
    text-decoration: none;
    color: var(--lyy-text);
    min-width: 0;
    transition: border-color .2s, transform .25s var(--lyy-ease);
}

.lyy-prevnext a:hover { border-color: rgba(var(--lyy-primary-rgb), .4); transform: translateY(-2px); }
.lyy-prevnext small { display: block; color: var(--lyy-text-2); font-size: .75rem; margin-bottom: .2rem; }
.lyy-prevnext span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.lyy-prevnext .next { text-align: right; grid-column: 2; }

/* 分页 */
.pagination { gap: .35rem; flex-wrap: wrap; justify-content: center; }
.pagination .page-link { border-radius: 10px !important; border: 1px solid var(--lyy-line); background: var(--lyy-surface); color: var(--lyy-text); min-width: 2.4rem; text-align: center; }
.pagination .page-link:hover { color: var(--lyy-primary); border-color: rgba(var(--lyy-primary-rgb), .35); }
.pagination .page-item.active .page-link { background: var(--lyy-primary); border-color: var(--lyy-primary); color: #fff; }
.pagination .page-item.disabled .page-link { opacity: .5; }

/* ---------- 提示消息 ---------- */

.lyy-toasts {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    width: min(92vw, 380px);
    pointer-events: none;
}

.lyy-toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .8rem 1rem;
    border-radius: var(--lyy-radius-sm);
    background: var(--lyy-surface);
    border: 1px solid var(--lyy-line);
    box-shadow: var(--lyy-shadow-lg);
    font-size: .9rem;
    color: var(--lyy-text);
    animation: lyy-toast-in .4s cubic-bezier(.34, 1.56, .64, 1) both;
}

.lyy-toast.is-leaving { animation: lyy-toast-out .3s var(--lyy-ease) forwards; }
.lyy-toast i { font-size: 1.1rem; flex-shrink: 0; }
.lyy-toast.is-error i { color: #ef4444; }
.lyy-toast.is-success i { color: #10b981; }
.lyy-toast.is-info i, .lyy-toast.is-warning i { color: var(--lyy-primary); }

@keyframes lyy-toast-in { from { opacity: 0; transform: translateY(-14px) scale(.96); } }
@keyframes lyy-toast-out { to { opacity: 0; transform: translateY(-10px) scale(.96); } }

/* ---------- 弹窗 / 侧边菜单 ---------- */

.modal-content { border: 0; border-radius: var(--lyy-radius); background: var(--lyy-surface); box-shadow: var(--lyy-shadow-lg); }
.modal-header, .modal-footer { border-color: var(--lyy-line); }
.modal.fade .modal-dialog { transform: translateY(16px) scale(.98); transition: transform .35s var(--lyy-ease); }
.modal.show .modal-dialog { transform: none; }
.offcanvas { background: var(--lyy-surface); }

.lyy-offcanvas-nav a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1rem;
    border-radius: var(--lyy-radius-sm);
    color: var(--lyy-text);
    text-decoration: none;
    font-weight: 500;
}

.lyy-offcanvas-nav a.active,
.lyy-offcanvas-nav a:hover { background: var(--lyy-primary-subtle); color: var(--lyy-primary); }

/* ---------- 极验 / 验证码 ---------- */

.buy-captcha { height: calc(1.5em + 1.3rem + 2px); }
.buy-captcha img { height: 100%; }
.geetest_holder { width: 100% !important; }

/* ---------- 减少动画 ---------- */

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

    .lyy-js [data-reveal] { opacity: 1; transform: none; }
}
