/* 工具商店 /console —— 全局样式（不依赖 Blazor 作用域 CSS，避免部署后哈希不匹配导致样式丢失） */
.ts-store {
    box-sizing: border-box;
    max-width: 1080px;
    margin: 0 auto;
    padding: 16px 16px 40px;
}
.ts-store * {
    box-sizing: border-box;
}

/* 头部 */
.ts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #ff9a3c 0%, #f97316 100%);
    border-radius: 18px;
    padding: 20px 22px;
    box-shadow: 0 10px 26px rgba(249, 115, 22, .22);
}
.ts-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}
.ts-sub {
    font-size: 12.5px;
    color: rgba(255, 255, 255, .88);
    margin-top: 4px;
}
.ts-coin {
    background: rgba(255, 255, 255, .94);
    border-radius: 16px;
    padding: 13px 16px;
    min-width: 230px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
}
.ts-coin-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ts-coin-left {
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.ts-coin-label {
    font-size: 12px;
    color: #b9764a;
}
.ts-coin-num {
    font-size: 26px;
    font-weight: 800;
    color: #f97316;
    line-height: 1;
}
.ts-coin-unit {
    font-size: 12px;
    color: #f97316;
}
.ts-coin-btn {
    background: linear-gradient(135deg, #ff9a3c, #f97316);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    border: none;
}
.ts-coin-btn:hover {
    opacity: .92;
}

/* 余额拆分（充值余额 / 套餐额度） */
.ts-coin-split {
    margin-top: 11px;
    padding-top: 10px;
    border-top: 1px dashed #f1d8c4;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.ts-split-row {
    display: flex;
    align-items: center;
    font-size: 12px;
}
.ts-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 7px;
    flex-shrink: 0;
}
.ts-dot.dot-charge {
    background: #f97316;
}
.ts-dot.dot-sub {
    background: #34c38f;
}
.ts-split-k {
    color: #999;
}
.ts-split-v {
    margin-left: auto;
    color: #444;
    font-weight: 700;
}
.ts-split-tip {
    margin-left: 8px;
    color: #bbb;
    font-size: 11px;
    font-weight: 400;
}

/* 区块标题 */
.ts-sec {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 22px 4px 12px;
}
.ts-sec-title {
    font-size: 16px;
    font-weight: 700;
    color: #222;
}
.ts-sec-sub {
    font-size: 12px;
    color: #aaa;
}

.ts-loading, .ts-empty {
    padding: 50px 0;
    text-align: center;
    color: #bbb;
    font-size: 13px;
}
.ts-empty-ic {
    font-size: 42px;
    margin-bottom: 10px;
}

/* 工具网格 */
.ts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}
.ts-tool {
    background: #fff;
    border: 1px solid #ffe9d8;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .05);
    display: flex;
    flex-direction: column;
}
.ts-tool-top {
    display: flex;
    align-items: flex-start;
}
.ts-tool-ic {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #fff3e6, #ffe4cc);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    overflow: hidden;
}
.ts-tool-ic-img {
    width: 34px;
    height: 34px;
}
.ts-tool-info {
    flex: 1;
    min-width: 0;
    margin-left: 13px;
}
.ts-name-row {
    display: flex;
    align-items: center;
}
.ts-name {
    font-size: 17px;
    font-weight: 700;
    color: #222;
}
.ts-badge {
    margin-left: 8px;
    font-size: 10px;
    color: #fff;
    padding: 2px 8px;
    border-radius: 8px;
    background: linear-gradient(135deg, #ff7a45, #f5222d);
}
.ts-desc {
    font-size: 12px;
    color: #999;
    line-height: 1.55;
    margin-top: 5px;
}

.ts-feats {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}
.ts-feat {
    font-size: 11px;
    color: #b9764a;
    background: #fff5ec;
    border: 1px solid #ffe4cd;
    padding: 3px 10px;
    border-radius: 11px;
}

/* 价格方案（月/季/年） */
.ts-plans {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.ts-plan {
    flex: 1;
    min-width: 0;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 8px 5px;
    background: #fafafa;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: all .15s ease;
}
.ts-plan:hover {
    border-color: #ffd2ad;
}
.ts-plan.on {
    border-color: #f97316;
    background: #fff7ef;
    box-shadow: 0 4px 12px rgba(249, 115, 22, .12);
}
.ts-plan-row1 {
    display: flex;
    align-items: center;
    justify-content: center;
}
.ts-plan-label {
    font-size: 13px;
    font-weight: 700;
    color: #444;
}
.ts-plan.on .ts-plan-label {
    color: #f97316;
}
.ts-plan-badge {
    font-size: 9px;
    color: #fff;
    padding: 1px 4px;
    border-radius: 6px;
    margin-left: 3px;
    background: linear-gradient(135deg, #ff7a45, #f5222d);
    white-space: nowrap;
}
.ts-plan-price {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #f97316;
    margin-top: 4px;
}
.ts-plan-days {
    display: block;
    font-size: 10.5px;
    color: #aaa;
    margin-top: 2px;
}

/* 底部：价格 + 操作 */
.ts-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px dashed #f2f2f2;
}
.ts-price-box {
    flex: 1;
    min-width: 0;
}
.ts-price-line {
    display: flex;
    align-items: baseline;
}
.ts-price-num {
    font-size: 22px;
    font-weight: 700;
    color: #f97316;
    line-height: 1;
}
.ts-price-unit {
    font-size: 11px;
    color: #f97316;
    margin-left: 3px;
}
.ts-price-old {
    font-size: 11px;
    color: #c9c9c9;
    text-decoration: line-through;
    margin-left: 7px;
}
.ts-price-sub {
    display: block;
    font-size: 11px;
    color: #aaa;
    margin-top: 5px;
}
.ts-owned {
    font-size: 15px;
    font-weight: 700;
    color: #22a06b;
}
.ts-owned.soon {
    color: #b0b0b0;
}

.ts-btn {
    margin: 0;
    height: 38px;
    line-height: 38px;
    padding: 0 20px;
    border-radius: 20px;
    font-size: 13.5px;
    font-weight: 600;
    color: #fff;
    border: none;
    flex-shrink: 0;
    cursor: pointer;
    background: linear-gradient(135deg, #ff9a3c, #f97316);
    box-shadow: 0 6px 14px rgba(249, 115, 22, .26);
    transition: opacity .15s ease;
}
.ts-btn.on {
    background: linear-gradient(135deg, #34c38f, #22a06b);
    box-shadow: 0 6px 14px rgba(34, 160, 107, .24);
}
.ts-btn.soon {
    background: #d9d9d9;
    color: #fff;
    box-shadow: none;
    cursor: not-allowed;
}
.ts-btn.ghost {
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
    box-shadow: none;
}
.ts-btn[disabled] {
    opacity: .6;
    cursor: not-allowed;
}
.ts-btn:hover:not([disabled]) {
    opacity: .94;
}

.ts-tip {
    font-size: 11.5px;
    color: #bbb;
    line-height: 1.6;
    margin: 12px 4px 0;
    text-align: center;
}

/* 弹窗 */
.ts-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.ts-modal {
    width: 360px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border-radius: 16px;
    padding: 22px 22px 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
.ts-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #222;
}
.ts-modal-body {
    margin: 14px 0 18px;
    font-size: 13.5px;
    color: #555;
    line-height: 1.9;
}
.ts-modal-body b {
    color: #f97316;
}
.ts-modal-renew {
    color: #b9764a;
}
.ts-modal-bal {
    color: #999;
}
.ts-modal-err {
    margin-top: 8px;
    background: #fff1f0;
    border: 1px solid #ffccc7;
    color: #cf1322;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.6;
}
.ts-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.ts-modal-foot .ts-btn {
    flex: 0 0 auto;
}

/* 窄屏适配 */
@media (max-width: 640px) {
    .ts-grid {
        grid-template-columns: 1fr;
    }
    .ts-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .ts-coin {
        align-self: stretch;
        justify-content: space-between;
    }
    .ts-plans {
        flex-wrap: wrap;
    }
    .ts-plan {
        flex: 1 1 30%;
    }
}
