.dbc-customizer {
    --dbc-gold: #d9a267;
    --dbc-gold-dark: #b67a3e;
    --dbc-line: #ece7e0;
    --dbc-text: #46392d;
    --dbc-muted: #a99785;
    --dbc-soft: #fbf8f3;
    --dbc-track-scale: 1;
    display: grid;
    grid-template-columns: minmax(230px, 285px) minmax(560px, 1fr) minmax(150px, 190px);
    gap: 20px;
    width: min(1220px, calc(100vw - 48px));
    min-height: 650px;
    margin: 18px auto 36px;
    color: var(--dbc-text);
    font-family: inherit;
}

.dbc-left-panel,
.dbc-stage-panel,
.dbc-right-panel {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #eee5db;
    box-shadow: 0 18px 46px rgba(80, 55, 30, 0.08);
}

.dbc-left-panel {
    border-radius: 8px;
    padding: 14px;
    max-height: 650px;
    overflow-y: auto;
}

.dbc-search {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 28px;
    border: 1px solid #eadfD2;
    border-radius: 999px;
    padding: 0 9px;
    margin-bottom: 10px;
    background: #fff;
}

.dbc-search span {
    font-size: 12px;
}

.dbc-search input {
    width: 100%;
    border: 0;
    outline: 0;
    box-shadow: none;
    min-height: 0;
    padding: 0;
    font-size: 12px;
    background: transparent;
}

.dbc-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.dbc-categories button {
    border: 1px solid var(--dbc-line);
    background: #fff;
    color: #8c7663;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 12px;
    cursor: pointer;
}

.dbc-categories button.is-active {
    border-color: var(--dbc-gold);
    background: var(--dbc-gold);
    color: #fff;
}

.dbc-bead-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.dbc-bead-card {
    display: grid;
    justify-items: center;
    gap: 5px;
    min-height: 112px;
    border: 1px solid #eee3d8;
    border-radius: 8px;
    background: linear-gradient(180deg, #fff 0%, #fff 64%, #fff9f1 100%);
    color: #7a6049;
    padding: 8px 4px;
    cursor: grab;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.dbc-bead-card:hover {
    border-color: var(--dbc-gold);
    box-shadow: 0 12px 24px rgba(180, 124, 66, 0.18);
    transform: translateY(-1px);
}

.dbc-thumb,
.dbc-canvas-bead-visual {
    display: block;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: inset -7px -8px 10px rgba(0, 0, 0, 0.28), inset 5px 5px 9px rgba(255, 255, 255, 0.42), 0 4px 8px rgba(45, 31, 18, 0.18);
}

.dbc-thumb::after,
.dbc-canvas-bead-visual::after {
    content: "";
    position: absolute;
    display: block;
    width: 34%;
    height: 34%;
    left: 20%;
    top: 18%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.58);
    filter: blur(1px);
    pointer-events: none;
}

.dbc-thumb {
    position: relative;
    width: 54px;
    height: 54px;
}

.dbc-thumb img,
.dbc-canvas-bead-visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.dbc-bead-name,
.dbc-bead-meta {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dbc-bead-name {
    font-size: 12px;
    line-height: 1.2;
}

.dbc-bead-meta {
    color: var(--dbc-gold-dark);
    font-size: 11px;
}

.dbc-stage-panel {
    display: grid;
    grid-template-rows: 1fr auto;
    border-radius: 8px;
    min-height: 650px;
    padding: 22px;
}

.dbc-canvas {
    position: relative;
    overflow: hidden;
    min-height: 590px;
    border-radius: 8px;
    background:
        radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.98) 0 42%, rgba(251, 248, 243, 0.96) 73%, #f7f3ee 100%);
    touch-action: none;
}

.dbc-canvas::before {
    content: "";
    position: absolute;
    inset: 22px;
    border-radius: 8px;
    background: radial-gradient(circle at 50% 50%, rgba(217, 162, 103, 0.06), transparent 54%);
    pointer-events: none;
}

.dbc-guide-circle {
    position: absolute;
    width: min(calc(58% * var(--dbc-track-scale)), calc(70% * var(--dbc-track-scale)), calc(420px * var(--dbc-track-scale)));
    aspect-ratio: 1 / 1;
    left: 50%;
    top: 50%;
    border: 2px dashed #e2d4c4;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.dbc-canvas-items {
    position: absolute;
    inset: 0;
}

.dbc-canvas-bead {
    position: absolute;
    border: 0;
    border-radius: 50%;
    background: transparent;
    transform: translate(-50%, -50%);
    cursor: move;
    padding: 0;
    touch-action: none;
    filter: drop-shadow(0 10px 10px rgba(65, 42, 22, 0.16));
}

.dbc-canvas-bead-visual {
    position: relative;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.dbc-canvas-tools {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    color: #b8aa9c;
    font-size: 12px;
    min-height: 46px;
}

.dbc-icon-button {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 2px solid #e85b4f;
    border-radius: 12px;
    background: #fff5f3;
    color: #c7271e;
    font-size: 18px;
    box-shadow: 0 10px 20px rgba(199, 39, 30, 0.14);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.dbc-icon-button:hover {
    background: #e85b4f;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(199, 39, 30, 0.2);
}

.dbc-right-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-radius: 8px;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.dbc-summary-card {
    display: grid;
    place-items: center;
    min-height: 86px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(76, 61, 45, 0.09);
}

.dbc-summary-card span {
    color: #c0ac98;
    font-size: 12px;
}

.dbc-summary-card strong {
    color: var(--dbc-gold-dark);
    font-size: 28px;
    line-height: 1.15;
}

.dbc-outline-button,
.dbc-primary-button {
    width: 100%;
    min-height: 44px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}

.dbc-outline-button {
    border: 2px solid var(--dbc-gold);
    color: var(--dbc-gold-dark);
    background: #fff;
}

.dbc-primary-button {
    border: 0;
    color: #fff;
    background: var(--dbc-gold);
}

.dbc-message {
    min-height: 22px;
    margin: 0;
    color: #a33b2f;
    font-size: 12px;
    text-align: center;
}

.dbc-message.is-good {
    color: #2c7b45;
}

@media (max-width: 900px) {
    .dbc-customizer {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .dbc-left-panel {
        max-height: none;
    }

    .dbc-stage-panel {
        min-height: 430px;
    }

    .dbc-canvas {
        min-height: 360px;
    }

    .dbc-right-panel {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dbc-outline-button,
    .dbc-primary-button,
    .dbc-message {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {
    .dbc-bead-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dbc-stage-panel {
        padding: 12px;
    }
}
