.lw-hidden {
    display: none !important;
}

.lw-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9990;
    background: #b31217;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 12px 14px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.22);
    cursor: pointer;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.lw-fab:hover {
    filter: brightness(0.95);
}

.lw-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.lw-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
}

.lw-dialog {
    position: relative;
    max-width: 980px;
    width: calc(100% - 28px);
    margin: 42px auto;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0,0,0,0.32);
    border: 1px solid rgba(0,0,0,0.08);
}

.lw-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    color: #111;
    position: relative;
}

.lw-header::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 8px;
    background: linear-gradient(90deg, #b31217, #ff7b25);
}

.lw-title {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.2px;
    padding-top: 6px;
}

.lw-close {
    border: none;
    background: #fff;
    color: #333;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,0,0,0.10);
    margin-top: 6px;
}

.lw-close:hover {
    background: rgba(0,0,0,0.03);
}

.lw-body {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 0;
}

@media (max-width: 860px) {
    .lw-body {
        grid-template-columns: 1fr;
    }
}

.lw-wheel-area {
    padding: 20px 18px;
    background: #f1f2f4;
    border-right: 1px solid rgba(0,0,0,0.08);
}

@media (max-width: 860px) {
    .lw-wheel-area {
        border-right: none;
        border-bottom: 1px solid #ffe2d1;
    }
}

.lw-wheel-wrap {
    position: relative;
    width: clamp(220px, 78vw, 360px);
    aspect-ratio: 1 / 1;
    max-width: 100%;
    margin: 0 auto;
}

.lw-pointer {
    position: absolute;
    top: 50%;
    right: -18px;
    transform: translateY(-50%);
    width: 54px;
    height: 34px;
    background: #fff;
    border-radius: 0 18px 18px 0;
    box-shadow: 0 10px 24px rgba(0,0,0,0.20);
    z-index: 2;
}

.lw-pointer::before {
    content: '';
    position: absolute;
    left: -18px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 17px solid transparent;
    border-bottom: 17px solid transparent;
    border-right: 18px solid #fff;
}

.lw-pointer::after {
    content: '';
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #bdbdbd;
}

.lw-wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: transparent;
    border: 0;
    box-shadow: 0 18px 40px rgba(0,0,0,0.18);
    overflow: visible;
    position: relative;
    z-index: 1;
}

.lw-wheel canvas {
    width: 100%;
    height: 100%;
    display: block;
    transition: transform 4.2s cubic-bezier(0.2, 0.9, 0.25, 1);
}

.lw-wheel-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fff;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: transparent;
    z-index: 3;
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
    cursor: pointer;
    font-size: 12px;
}

@media (max-width: 576px) {
    .lw-dialog {
        width: calc(100% - 16px);
        margin: 10px auto;
    }

    .lw-wheel-area {
        padding: 14px 12px;
    }

    .lw-panel {
        padding: 16px 12px;
    }

    .lw-actions {
        justify-content: center;
    }

    .lw-pointer {
        right: -14px;
        width: 46px;
        height: 30px;
        border-radius: 0 16px 16px 0;
    }

    .lw-pointer::before {
        left: -16px;
        border-top-width: 15px;
        border-bottom-width: 15px;
        border-right-width: 16px;
    }
}

.lw-panel {
    padding: 20px 18px;
}

.lw-row {
    display: grid;
    gap: 10px;
}

.lw-field label {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    display: block;
    margin-bottom: 6px;
}

.lw-field input {
    width: 100%;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid #ddd;
    font-size: 14px;
}

.lw-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.lw-btn {
    border: none;
    border-radius: 8px;
    padding: 12px 14px;
    font-weight: 800;
    cursor: pointer;
}

.lw-btn-primary {
    background: #b31217;
    color: #fff;
}

.lw-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.lw-btn-outline {
    background: #fff;
    border: 1px solid #b31217;
    color: #b31217;
}

.lw-btn-outline:hover {
    background: rgba(179, 18, 23, 0.06);
}

.lw-msg {
    margin-top: 10px;
    font-size: 13px;
    color: #333;
}

.lw-msg.lw-error {
    color: #b31217;
}

.lw-result {
    margin-top: 16px;
    padding: 14px;
    border: 1px solid #eee;
    border-radius: 14px;
    background: #fafafa;
}

.lw-code {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-weight: 900;
    letter-spacing: 0.6px;
    font-size: 18px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 2px dashed #ff7b25;
    background: #fff;
    color: #ff7b25;
}

.lw-hint {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}
