.hcvc-draw-compare {
    --hcvc-draw-ink: #172033;
    --hcvc-draw-muted: #64748b;
    --hcvc-draw-line: #dbe3ef;
    --hcvc-draw-panel: #ffffff;
    --hcvc-draw-soft: #f6f8fb;
    --hcvc-draw-primary: #2563eb;
    --hcvc-draw-primary-dark: #1d4ed8;
    width: 100%;
    max-width: none;
    color: var(--hcvc-draw-ink);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body:not(.wp-admin) .hcvc-draw-compare {
    position: relative;
    left: 50%;
    right: 50%;
    width: 100vw;
    max-width: 100vw;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 0 clamp(14px, 3vw, 42px);
}

.hcvc-draw-shell {
    display: flex !important;
    flex-direction: column !important;
    gap: 22px;
    align-items: stretch;
    width: 100%;
    max-width: none;
}

.hcvc-draw-panel {
    width: 100%;
    max-width: none;
    min-width: 0;
    flex: 0 0 100%;
    background: var(--hcvc-draw-panel);
    border: 1px solid var(--hcvc-draw-line);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.hcvc-draw-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    padding: 18px 20px;
    border-bottom: 1px solid var(--hcvc-draw-line);
    background: #fbfdff;
}

.hcvc-draw-panel-head h2 {
    margin: 0 0 4px !important;
    font-size: 18px !important;
    color: var(--hcvc-draw-ink);
}

.hcvc-draw-panel-head p {
    margin: 0;
    color: var(--hcvc-draw-muted);
    font-size: 13px;
}

.hcvc-draw-icon-btn,
.hcvc-draw-tool,
.hcvc-draw-push {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--hcvc-draw-line);
    background: #ffffff;
    color: var(--hcvc-draw-ink);
    border-radius: 7px;
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.hcvc-draw-icon-btn {
    width: 38px;
    padding: 0;
}

.hcvc-draw-icon-btn:hover,
.hcvc-draw-tool:hover {
    border-color: #b8c5d8;
    background: #f8fafc;
}

.hcvc-draw-tool.active,
.hcvc-draw-push {
    border-color: var(--hcvc-draw-primary);
    background: var(--hcvc-draw-primary);
    color: #ffffff;
}

.hcvc-draw-push:hover {
    background: var(--hcvc-draw-primary-dark);
}

.hcvc-draw-canvas-wrap {
    position: relative;
    margin: 18px;
    height: 520px;
    overflow: hidden;
    border: 1px solid var(--hcvc-draw-line);
    border-radius: 8px;
    background:
        linear-gradient(#eef2f7 1px, transparent 1px),
        linear-gradient(90deg, #eef2f7 1px, transparent 1px),
        #ffffff;
    background-size: 28px 28px;
    touch-action: none;
}

.hcvc-draw-canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: none;
}

.hcvc-draw-cursor {
    position: absolute;
    left: -100px;
    top: -100px;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(37, 99, 235, 0.8);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    background: rgba(37, 99, 235, 0.08);
}

.hcvc-draw-toolbar,
.hcvc-draw-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 18px 18px;
    align-items: end;
}

.hcvc-draw-toolbar label,
.hcvc-draw-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 110px;
    color: var(--hcvc-draw-muted);
    font-size: 12px;
    font-weight: 700;
}

.hcvc-draw-toolbar input[type="range"] {
    width: 130px;
}

.hcvc-draw-toolbar input[type="color"] {
    width: 42px !important;
    height: 38px !important;
    border: 1px solid var(--hcvc-draw-line) !important;
    border-radius: 7px;
    background: #fff;
}

.hcvc-draw-form input,
.hcvc-draw-form select {
    min-height: 38px;
    border: 1px solid var(--hcvc-draw-line);
    border-radius: 7px;
    padding: 7px 10px;
    color: var(--hcvc-draw-ink);
    background: #ffffff;
}

.hcvc-draw-form label:first-child {
    flex: 1 1 180px;
}

.hcvc-draw-form label:nth-child(2) {
    min-width: 150px;
}

.hcvc-draw-message {
    flex: 1 1 100%;
    min-height: 18px;
    color: var(--hcvc-draw-muted);
    font-size: 12px;
    font-weight: 700;
}

.hcvc-draw-message.is-error {
    color: #b91c1c;
}

.hcvc-draw-message.is-success {
    color: #047857;
}

.hcvc-draw-chart {
    position: relative;
    height: 620px;
    margin: 18px;
    border: 1px solid var(--hcvc-draw-line);
    border-radius: 8px;
    overflow: hidden;
    background:
        linear-gradient(to top, rgba(37, 99, 235, 0.11) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.14) 1px, transparent 1px),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    background-size: 100% 64px, 64px 100%, 100% 100%;
}

.hcvc-draw-axis {
    position: absolute;
    left: 54px;
    top: 20px;
    bottom: 42px;
    width: 2px;
    background: #94a3b8;
    z-index: 1;
}

.hcvc-draw-axis-labels {
    position: absolute;
    left: 8px;
    top: 20px;
    bottom: 42px;
    width: 48px;
    z-index: 2;
    pointer-events: none;
}

.hcvc-draw-axis-labels span {
    position: absolute;
    right: 0;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.hcvc-draw-stage {
    position: absolute;
    left: 74px;
    right: 18px;
    top: 20px;
    bottom: 42px;
    display: flex;
    align-items: flex-end;
    gap: 22px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 6px;
}

.hcvc-draw-empty {
    margin: auto;
    color: #94a3b8;
    font-weight: 700;
    text-align: center;
}

.hcvc-draw-item {
    position: relative;
    flex: 0 0 92px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}

.hcvc-draw-item-visual {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 18px;
    border-bottom: 3px solid rgba(23, 32, 51, 0.5);
}

.hcvc-draw-item-visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom center;
    filter: drop-shadow(0 8px 10px rgba(15, 23, 42, 0.15));
}

.hcvc-draw-item-label {
    width: 112px;
    margin-top: 8px;
    text-align: center;
    color: var(--hcvc-draw-ink);
    font-size: 12px;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.hcvc-draw-item-meta {
    display: block;
    color: var(--hcvc-draw-muted);
    font-size: 11px;
    font-weight: 650;
}

.hcvc-draw-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px 18px;
}

.hcvc-draw-summary {
    margin: 0 18px 12px;
    padding: 10px 12px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #f8fbff;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.hcvc-draw-list-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--hcvc-draw-line);
    border-radius: 999px;
    padding: 6px 10px;
    background: var(--hcvc-draw-soft);
    color: var(--hcvc-draw-ink);
    font-size: 12px;
    font-weight: 700;
}

.hcvc-draw-admin-wrap > p {
    max-width: 860px;
    color: #475569;
}

.hcvc-draw-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 16px;
    max-width: 980px;
    margin: 18px 0 24px;
}

.hcvc-draw-admin-panel {
    background: #fff;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    padding: 18px;
}

.hcvc-draw-admin-panel h2 {
    margin-top: 0;
}

@media (max-width: 980px) {
    .hcvc-draw-admin-grid {
        grid-template-columns: 1fr;
    }

    .hcvc-draw-chart {
        height: 500px;
    }
}

@media (max-width: 600px) {
    .hcvc-draw-panel-head {
        padding: 15px;
    }

    .hcvc-draw-canvas-wrap,
    .hcvc-draw-chart {
        margin: 12px;
    }

    .hcvc-draw-canvas-wrap {
        height: 360px;
    }

    .hcvc-draw-toolbar,
    .hcvc-draw-form,
    .hcvc-draw-list {
        padding: 0 12px 12px;
    }

    .hcvc-draw-summary {
        margin: 0 12px 12px;
    }

    .hcvc-draw-form label,
    .hcvc-draw-push {
        width: 100%;
    }

    .hcvc-draw-stage {
        left: 56px;
        gap: 14px;
    }

    .hcvc-draw-axis {
        left: 40px;
    }
}
