/* 幸运大转盘 luckySpin —— 样式部分（作用域限定在 .ls-wrap 内，避免污染站点全局） */
.tool-content {
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    border-radius: .6em;
    position: relative;
    display: flex;
    padding: 1em;
}

.ls-wrap {
    --red: #d62828;
    --red-deep: #a4161a;
    --red-light: #ff5a5f;
    --gold: #f5a623;
    --gold-light: #ffd166;
    --ink: #3d211c;
    --ink-soft: #8a6a5e;
    --paper: #fffdf9;
    --line: #f0dccf;
    --shadow: 0 12px 34px rgba(150, 60, 40, .12);
    width: 100%;
}

.ls-wrap, .ls-wrap * {
    box-sizing: border-box;
}

.ls-wrap button, .ls-wrap input {
    font-family: inherit;
}

.ls-wrap button {
    cursor: pointer;
}

.ls-wrap button:disabled {
    cursor: not-allowed;
}

.ls-wrap .btn {
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    padding: 9px 15px;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 600;
    transition: transform .15s, box-shadow .15s, background .15s;
    box-shadow: 0 3px 10px rgba(150, 60, 40, .06);
}

.ls-wrap .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 16px rgba(150, 60, 40, .14);
}

.ls-wrap .btn-primary {
    border: none;
    color: #fff;
    background: linear-gradient(135deg, #ff6b5e, var(--red));
    box-shadow: 0 8px 20px rgba(214, 40, 40, .28);
}

.ls-wrap .btn-primary:hover {
    box-shadow: 0 11px 24px rgba(214, 40, 40, .36);
}

.ls-wrap .btn-sm {
    padding: 6px 11px;
    font-size: 12px;
    border-radius: 9px;
}

.ls-wrap .app {
    max-width: none;
    margin: 0;
    padding: 0;
}

.ls-wrap .layout {
    display: grid;
    grid-template-columns: 1.5fr .9fr;
    gap: 1em;
    align-items: start;
}

/* ---------- 转盘主面板 ---------- */
.ls-wrap .board-panel {
    position: relative;
    border-radius: 20px;
    padding: 32px 26px 26px;
    background: radial-gradient(120% 90% at 50% 0%, rgba(255, 190, 120, .35), transparent 60%),
    linear-gradient(160deg, #e63946 0%, #c1121f 55%, #900b16 100%);
    box-shadow: 0 22px 50px rgba(160, 25, 30, .3), inset 0 1px 0 rgba(255, 255, 255, .25);
    overflow: hidden;
}

.ls-wrap .board-panel::before {
    content: "";
    position: absolute;
    width: 440px;
    height: 440px;
    border-radius: 50%;
    left: 50%;
    top: 52%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255, 215, 130, .22), transparent 65%);
    pointer-events: none;
}

.ls-wrap .board-head {
    position: relative;
    text-align: center;
    color: #fff4dc;
    margin-bottom: 30px;
}

.ls-wrap .board-head strong {
    font-size: 21px;
    letter-spacing: 2px;
}

.ls-wrap .board-head span {
    display: block;
    font-size: 12px;
    opacity: .78;
    margin-top: 5px;
    letter-spacing: 1px;
}

/* 转盘舞台：正方形，灯泡环绕在外 */
.ls-wrap .wheel-stage {
    position: relative;
    width: 100%;
    max-width: 450px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    display: grid;
    place-items: center;
}

/* 圆周灯泡环 */
.ls-wrap .lights-ring {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    pointer-events: none;
}

.ls-wrap .lights-ring .light {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffe9a8;
    box-shadow: 0 0 10px 3px rgba(255, 220, 130, .9), inset 0 -2px 3px rgba(200, 120, 0, .35);
    transform: translate(-50%, -50%);
    animation: ls-twinkle .9s ease-in-out infinite alternate;
}

.ls-wrap .lights-ring .light:nth-child(2n) {
    animation-delay: .45s;
}

@keyframes ls-twinkle {
    from {
        opacity: .3;
        transform: translate(-50%, -50%) scale(.7);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

/* 金色外圈 + 盘面 */
.ls-wrap .wheel-rim {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    padding: 12px;
    background: conic-gradient(from 0deg, #ffe9a8, #f5a623 12%, #fff3c4 25%, #f5a623 37%, #ffe9a8 50%, #f5a623 62%, #fff3c4 75%, #f5a623 87%, #ffe9a8);
    box-shadow: 0 0 0 5px #b00f1d, 0 0 0 8px rgba(255, 220, 130, .7), 0 18px 40px rgba(70, 5, 10, .45), inset 0 0 14px rgba(140, 70, 0, .4);
}

.ls-wrap #wheel {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #fff8ec;
    box-shadow: inset 0 0 22px rgba(150, 60, 20, .28);
}

/* 顶部指针 */
.ls-wrap .wheel-pointer {
    position: absolute;
    top: -16px;
    left: 50%;
    z-index: 6;
    width: 0;
    height: 0;
    transform: translateX(-50%);
    border-left: 16px solid transparent;
    border-right: 16px solid transparent;
    border-top: 34px solid #fff3c4;
    filter: drop-shadow(0 5px 8px rgba(90, 10, 10, .55));
}

.ls-wrap .wheel-pointer::after {
    content: "";
    position: absolute;
    left: -11px;
    top: -34px;
    border-left: 11px solid transparent;
    border-right: 11px solid transparent;
    border-top: 24px solid var(--red);
}

/* 中心开始按钮 */
.ls-wrap .wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 5;
    width: 96px;
    height: 96px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 5px solid #fff3c4;
    color: #fff;
    background: radial-gradient(circle at 38% 32%, #ff8a5b, #ef3b36 48%, #b00f1d);
    box-shadow: 0 0 0 3px #b00f1d, 0 8px 20px rgba(90, 5, 10, .5), inset 0 2px 0 rgba(255, 255, 255, .4);
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 2px;
    line-height: 1.3;
    text-shadow: 0 2px 6px rgba(100, 10, 10, .5);
    overflow: hidden;
    transition: transform .15s, filter .15s;
}

.ls-wrap .wheel-center::before {
    content: "";
    position: absolute;
    inset: -60%;
    background: conic-gradient(transparent 0deg, rgba(255, 235, 170, .5) 40deg, transparent 90deg);
    animation: ls-sweep 3.2s linear infinite;
}

@keyframes ls-sweep {
    to {
        transform: rotate(360deg);
    }
}

.ls-wrap .wheel-center span {
    position: relative;
    display: block;
}

.ls-wrap .wheel-center small {
    display: block;
    font-size: 9px;
    letter-spacing: 1px;
    font-weight: 600;
    opacity: .85;
    margin-top: 2px;
}

.ls-wrap .wheel-center:hover:not(:disabled) {
    transform: translate(-50%, -50%) scale(1.06);
    filter: brightness(1.07);
}

.ls-wrap .wheel-center:active:not(:disabled) {
    transform: translate(-50%, -50%) scale(.96);
}

.ls-wrap .wheel-center:disabled {
    filter: grayscale(.55) brightness(.85);
}

.ls-wrap .board-foot {
    position: relative;
    text-align: center;
    color: rgba(255, 244, 220, .8);
    font-size: 12px;
    margin-top: 35px;
    letter-spacing: .5px;
}

/* ---------- 侧栏卡片 ---------- */
.ls-wrap .side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ls-wrap .card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: var(--shadow);
}

.ls-wrap .card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1em;
    margin-bottom: 13px;
}

.ls-wrap .card-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1em;
}

.ls-wrap .card-head h3 {
    margin: 0;
    font-size: 15px;
    letter-spacing: .5px;
}

.ls-wrap .card-head .sub {
    font-size: 11px;
    color: var(--ink-soft);
}

.ls-wrap .chances-wrap {
    display: flex;
    align-items: baseline;
    gap: 9px;
}

.ls-wrap .chances-num {
    font-size: 40px;
    font-weight: 900;
    line-height: 1;
    color: var(--red);
    font-variant-numeric: tabular-nums;
}

.ls-wrap .chances-unit {
    font-size: 13px;
    color: var(--ink-soft);
    font-weight: 600;
}

.ls-wrap .bar {
    height: 8px;
    border-radius: 99px;
    background: #f7e9df;
    overflow: hidden;
    margin-top: 14px;
}

.ls-wrap .bar > i {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #ffb84d, #ef3b36);
    transition: width .35s ease;
}

.ls-wrap .chances-tip {
    font-size: 12px;
    color: var(--ink-soft);
    margin: 10px 0 0;
}

.ls-wrap .prize-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 262px;
    overflow-y: auto;
}

.ls-wrap .prize-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 4px;
    border-bottom: 1px dashed #f3e6dc;
    font-size: 13px;
}

.ls-wrap .prize-row:last-child {
    border-bottom: none;
}

.ls-wrap .prize-row .ico {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    background: #fff3e6;
    border-radius: 9px;
    font-size: 16px;
}

.ls-wrap .prize-row .swatch {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    flex: none;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}

.ls-wrap .prize-row .nm {
    flex: 1;
    font-weight: 600;
    color: #5b382e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ls-wrap .prize-row .rate {
    font-size: 12px;
    color: var(--red);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.ls-wrap .records {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 190px;
    overflow-y: auto;
}

.ls-wrap .record {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12.5px;
    padding: 7px 10px;
    background: #fff7ef;
    border-radius: 10px;
}

.ls-wrap .record .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
    flex: none;
}

.ls-wrap .record.win .dot {
    background: var(--red);
}

.ls-wrap .record .txt {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ls-wrap .record .time {
    color: #b39a8b;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.ls-wrap .empty {
    font-size: 12.5px;
    color: #b39a8b;
    text-align: center;
    padding: 18px 0;
}

/* ---------- 遮罩 / 抽屉 / 弹窗 / 选择器 ---------- */
.ls-wrap .overlay {
    position: fixed;
    inset: 0;
    background: rgba(60, 15, 15, .42);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
    z-index: 40;
}

.ls-wrap .overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.ls-wrap .drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(390px, 92vw);
    z-index: 50;
    background: var(--paper);
    box-shadow: -14px 0 40px rgba(70, 20, 15, .2);
    transform: translateX(105%);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
    display: flex;
    flex-direction: column;
}

.ls-wrap .drawer.open {
    transform: translateX(0);
}

.ls-wrap .drawer-head {
    padding: 22px 22px 16px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ls-wrap .drawer-head h3 {
    margin: 0;
    font-size: 17px;
}

.ls-wrap .drawer-head p {
    margin: 5px 0 0;
    font-size: 12px;
    color: var(--ink-soft);
}

.ls-wrap .drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 22px;
}

.ls-wrap .edit-row {
    display: grid;
    grid-template-columns: 34px 1fr 72px;
    gap: 9px;
    align-items: center;
    margin-bottom: 11px;
}

.ls-wrap .edit-row .idx {
    position: relative;
    width: 36px;
    height: 36px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px dashed #e9b98c;
    border-radius: 10px;
    background: #fff1e3;
    font-size: 19px;
    transition: transform .15s, background .15s, border-color .15s;
}

.ls-wrap .edit-row .idx:hover {
    transform: scale(1.12) rotate(-6deg);
    background: #ffe0bb;
    border-color: var(--gold);
}

.ls-wrap .edit-row .idx::after {
    content: "✎";
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 9px;
    color: #fff;
    background: var(--red);
    border-radius: 50%;
    width: 14px;
    height: 14px;
    line-height: 14px;
}

.ls-wrap .edit-row input {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 9px;
    padding: 8px 10px;
    font-size: 13px;
    color: var(--ink);
    outline: none;
}

.ls-wrap .edit-row input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, .15);
}

.ls-wrap .edit-row label {
    font-size: 11px;
    color: var(--ink-soft);
    display: block;
    margin-bottom: 3px;
}

.ls-wrap .drawer-foot {
    padding: 16px 22px 22px;
    border-top: 1px solid var(--line);
    display: flex;
    gap: 10px;
}

.ls-wrap .drawer-foot .btn {
    flex: 1;
}

.ls-wrap .modal {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 55;
    transform: translate(-50%, -46%) scale(.86);
    opacity: 0;
    pointer-events: none;
    width: min(360px, 88vw);
    padding: 30px 26px 26px;
    text-align: center;
    background: linear-gradient(170deg, #fffdf9, #fff2e4);
    border-radius: 26px;
    border: 2px solid #fff;
    box-shadow: 0 26px 60px rgba(90, 20, 15, .32);
    transition: transform .32s cubic-bezier(.2, 1.3, .4, 1), opacity .25s;
}

.ls-wrap .modal.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.ls-wrap .modal .big {
    font-size: 62px;
    line-height: 1;
    margin-bottom: 12px;
    animation: ls-pop .5s cubic-bezier(.2, 1.4, .4, 1);
}

@keyframes ls-pop {
    from {
        transform: scale(.3) rotate(-18deg);
    }
    to {
        transform: scale(1) rotate(0);
    }
}

.ls-wrap .modal h3 {
    margin: 0 0 8px;
    font-size: 22px;
    color: var(--red);
    letter-spacing: 1px;
}

.ls-wrap .modal .prize-name {
    font-size: 17px;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 8px;
}

.ls-wrap .modal .tip {
    font-size: 12.5px;
    color: var(--ink-soft);
    line-height: 1.7;
    margin: 0 0 22px;
}

.ls-wrap .modal .btn {
    width: 100%;
    padding: 12px;
    font-size: 14px;
}

.ls-wrap #confetti {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 60;
}

.ls-wrap .toast {
    position: fixed;
    left: 50%;
    bottom: 34px;
    transform: translate(-50%, 18px);
    z-index: 70;
    background: rgba(52, 22, 18, .92);
    color: #fff;
    padding: 11px 20px;
    border-radius: 99px;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s, transform .25s;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .2);
}

.ls-wrap .toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.ls-wrap .picker-mask {
    position: fixed;
    inset: 0;
    z-index: 62;
    background: rgba(60, 15, 15, .38);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}

.ls-wrap .picker-mask.show {
    opacity: 1;
    pointer-events: auto;
}

.ls-wrap .picker {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 63;
    width: min(430px, 92vw);
    transform: translate(-50%, -46%) scale(.9);
    opacity: 0;
    pointer-events: none;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(80, 20, 15, .3);
    padding: 20px;
    transition: transform .26s cubic-bezier(.2, 1.2, .4, 1), opacity .2s;
}

.ls-wrap .picker.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.ls-wrap .picker-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.ls-wrap .picker-head h3 {
    margin: 0;
    font-size: 17px;
}

.ls-wrap .picker-head p {
    margin: 5px 0 0;
    font-size: 12px;
    color: var(--ink-soft);
}

.ls-wrap .picker-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 15px 0 12px;
}

.ls-wrap .picker-tab {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink-soft);
    padding: 6px 11px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
}

.ls-wrap .picker-tab.active {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.ls-wrap .picker-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 6px;
    max-height: 210px;
    overflow-y: auto;
    padding: 3px;
}

.ls-wrap .picker-grid button {
    aspect-ratio: 1 / 1;
    padding: 0;
    border: 1px solid transparent;
    background: #fff5ea;
    border-radius: 10px;
    font-size: 22px;
    display: grid;
    place-items: center;
    transition: transform .12s, background .12s, border-color .12s;
}

.ls-wrap .picker-grid button:hover {
    transform: scale(1.15);
    background: #ffe1bb;
    border-color: var(--gold);
}

.ls-wrap .picker-grid button.current {
    border-color: var(--red);
    background: #ffe9e5;
}

.ls-wrap .picker-custom {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.ls-wrap .picker-custom input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 9px;
    padding: 8px 10px;
    font-size: 13px;
    color: var(--ink);
    outline: none;
}

.ls-wrap .picker-custom input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, .15);
}

.ls-wrap .picker-hint {
    font-size: 11.5px;
    color: var(--ink-soft);
    line-height: 1.65;
    margin: 10px 0 0;
}

@media (max-width: 880px) {
    .ls-wrap .layout {
        grid-template-columns: 1fr;
    }

    .ls-wrap .board-panel {
        padding: 30px 22px 22px;
    }

    .ls-wrap .wheel-stage {
        max-width: 380px;
    }
}

@media (max-width: 480px) {
    .ls-wrap .picker-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .ls-wrap .wheel-stage {
        max-width: 320px;
    }

    .ls-wrap .wheel-center {
        width: 78px;
        height: 78px;
        font-size: 15px;
    }

    .ls-wrap .lights-ring .light {
        width: 8px;
        height: 8px;
    }
}
