.cd-design-entry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin-left: 0;
    padding: 0 18px;
    border: 1px solid #ffc106;
    border-radius: 4px;
    background: #ffc106;
    color: #111111;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cd-design-entry:hover {
    border-color: #e0ab00;
    background: #e0ab00;
    color: #111111;
}

.cd-designer-page {
    padding: 12px 20px;
    background: #ffffff;
}

.cd-designer-page__inner {
    max-width: 1480px;
    margin: 0 auto;
}

.cd-designer-body {
    margin: 0;
    background: #ffffff;
}

.cd-designer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: min(820px, calc(100vh - 24px));
    padding: 8px 0 0;
    background: #ffffff;
    overflow: hidden;
}

.cd-designer__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex: 0 0 auto;
    padding: 4px 4px 2px;
}

.cd-designer__header-main {
    display: grid;
    gap: 8px;
}

.cd-designer__header-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: #fff8da;
    color: #111111;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.cd-designer__header-copy {
    margin: 0;
    max-width: 720px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

.cd-designer__header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cd-designer__meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid #eceff4;
    border-radius: 999px;
    background: #ffffff;
    color: #374151;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.cd-designer__header-actions {
    display: flex;
    align-items: flex-start;
}

.cd-designer__product-name {
    color: #111111;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.cd-designer__back,
.cd-designer__checkout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cd-designer__back {
    border: 1px solid #d5b64b;
    background: #fff8da;
    color: #111111;
}

.cd-designer__back:hover {
    border-color: #111111;
    background: #fff3c1;
    color: #111111;
}

.cd-designer__form {
    flex: 1 1 auto;
    min-height: 0;
}

.cd-designer__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    height: 100%;
    min-height: 0;
}

.cd-designer__preview-panel,
.cd-designer__controls {
    min-height: 0;
    background: #ffffff;
}

.cd-designer__preview-panel {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto auto;
    padding: 0;
}

.cd-designer__tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 0;
    margin-top: 10px;
}

.cd-designer__tab {
    flex: 1 1 0;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background: #ffffff;
    color: #5f6368;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cd-designer__tab.is-active {
    border-color: #ffc106;
    background: #ffc106;
    color: #111111;
}

.cd-designer__section-title {
    margin: 0;
    color: #111111;
    font-size: 16px;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.cd-designer__preview {
    display: grid;
    justify-items: center;
    align-items: center;
    min-height: 0;
    overflow: hidden;
    padding: 10px 12px 6px;
    background: #ffffff;
}

.cd-designer__stage {
    display: none;
    position: relative;
    overflow: hidden;
    width: fit-content;
    max-height: 100%;
    border-radius: 4px;
    background: #ffffff;
}

.cd-designer__stage.is-active {
    display: inline-block;
    align-self: center;
}

.cd-designer__stage img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: calc(100vh - 250px);
    height: auto;
    margin: 0 auto;
}

.cd-designer__overlay {
    position: absolute;
    inset: 0;
}

.cd-designer__overlay-name,
.cd-designer__overlay-number {
    position: absolute;
    left: 50%;
    max-width: 80%;
    color: #111111;
    font-family: "Arial Black", Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    word-break: break-word;
    white-space: pre-wrap;
    text-shadow:
        -2px -2px 0 rgba(255, 255, 255, 0.98),
         2px -2px 0 rgba(255, 255, 255, 0.98),
        -2px  2px 0 rgba(255, 255, 255, 0.98),
         2px  2px 0 rgba(255, 255, 255, 0.98),
         0 3px 12px rgba(17, 24, 39, 0.12);
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.96);
    paint-order: stroke fill;
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.cd-designer__overlay-name.is-dragging,
.cd-designer__overlay-number.is-dragging {
    cursor: grabbing;
}

.cd-designer__overlay-name {
    top: 26%;
    transform: translate(-50%, -50%);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cd-designer__overlay-number {
    top: 54%;
    transform: translate(-50%, -50%);
    font-weight: 900;
    letter-spacing: 0.04em;
}

.cd-designer__controls {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    padding-left: 0;
    background: #ffffff;
    border: 1px solid #eceff4;
    border-radius: 20px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}

.cd-designer__controls-scroll {
    display: grid;
    gap: 16px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 22px 22px 20px;
}

.cd-designer__controls-scroll > * {
    min-width: 0;
}

.cd-designer__panel-intro {
    display: grid;
    gap: 4px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eceff4;
}

.cd-designer__panel-kicker,
.cd-designer__section-kicker {
    color: #111111;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.cd-designer__panel-title {
    margin: 0;
    color: #111111;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.cd-designer__panel-copy,
.cd-designer__section-copy {
    margin: 0;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.5;
}

.cd-designer__palette-bar {
    display: grid;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eceff4;
}

.cd-designer__palette-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    min-width: 0;
}

.cd-designer__palette-kicker {
    color: #111111;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cd-designer__palette-copy {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.4;
    min-width: 0;
}

.cd-designer__palette-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cd-designer__palette-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #eceff4;
    border-radius: 999px;
    background: #ffffff;
    color: #111111;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.cd-designer__palette-option:hover {
    border-color: #ffc106;
    background: #fffdf5;
}

.cd-designer__palette-option:focus {
    outline: none;
    border-color: #ffc106;
    box-shadow: 0 0 0 4px rgba(255, 193, 6, 0.16);
}

.cd-designer__palette-swatch {
    width: 14px;
    min-width: 14px;
    height: 14px;
    border: 1px solid rgba(17, 24, 39, 0.1);
    border-radius: 999px;
}

.cd-designer__palette-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cd-designer__section {
    display: grid;
    gap: 8px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.cd-designer__section + .cd-designer__section {
    padding-top: 12px;
    border-top: 1px solid #eceff4;
}

.cd-designer__section-head {
    display: flex;
    align-items: center;
    padding-bottom: 0;
}

.cd-designer__section-title {
    margin: 0;
    color: #111111;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cd-designer__field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
}

.cd-designer__field-grid--inline {
    grid-template-columns: minmax(0, 236px) 112px 118px;
    align-items: end;
    justify-content: start;
    max-width: 100%;
}

.cd-designer__field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 0;
    min-width: 0;
    color: #111111;
    font-size: 14px;
    font-weight: 600;
}

.cd-designer__field > span {
    color: #4b5563;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cd-designer__field .cd-designer__input,
.cd-designer__field .cd-designer__select,
.cd-designer__field .cd-designer__color {
    width: 100%;
}

.cd-designer__field .cd-designer__input,
.cd-designer__field .cd-designer__select {
    box-sizing: border-box;
    height: 46px;
    padding: 0 14px;
    border: 1px solid #d9dee7;
    border-radius: 12px;
    background: #ffffff;
    color: #111111;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.cd-designer__field .cd-designer__select {
    appearance: none;
    padding-right: 40px;
    background-image:
        linear-gradient(45deg, transparent 50%, #6b7280 50%),
        linear-gradient(135deg, #6b7280 50%, transparent 50%);
    background-position:
        calc(100% - 16px) calc(50% - 1px),
        calc(100% - 11px) calc(50% - 1px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.cd-designer__color-picker {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid #d9dee7;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.cd-designer__color-picker:focus-within {
    border-color: #ffc106;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(255, 193, 6, 0.16);
}

.cd-designer__field .cd-designer__input:focus,
.cd-designer__field .cd-designer__select:focus {
    outline: none;
    border-color: #ffc106;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(255, 193, 6, 0.16);
}

.cd-designer__color {
    position: absolute;
    inset: 0;
    width: 100%;
    min-width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
    overflow: hidden;
    cursor: pointer;
    opacity: 0;
}

.cd-designer__color::-webkit-color-swatch-wrapper {
    padding: 0;
}

.cd-designer__color::-webkit-color-swatch {
    border: 2px solid rgba(17, 24, 39, 0.08);
    border-radius: 999px;
}

.cd-designer__color::-moz-color-swatch {
    border: 2px solid rgba(17, 24, 39, 0.08);
    border-radius: 999px;
}

.cd-designer__color:focus {
    outline: none;
}

.cd-designer__color-chip {
    width: 18px;
    min-width: 18px;
    height: 18px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 999px;
    background: #111111;
}

.cd-designer__color-value {
    color: #111111;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cd-designer__field--color {
    min-width: 0;
}

.cd-designer__field input[type="number"]::-webkit-outer-spin-button,
.cd-designer__field input[type="number"]::-webkit-inner-spin-button {
    margin: 0;
}

.cd-designer__field input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.cd-designer__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    flex: 0 0 auto;
    padding: 18px 22px 22px;
    border-top: 1px solid #eceff4;
    background: #ffffff;
    position: sticky;
    bottom: 0;
    z-index: 4;
    box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.05);
}

.cd-designer__action-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.82fr);
    gap: 16px;
    align-items: end;
}

.cd-designer__price-block {
    display: grid;
    gap: 5px;
    padding: 14px 16px;
    border: 1px solid #eceff4;
    border-radius: 16px;
    background: #ffffff;
}

.cd-designer__price-label {
    color: #6b7280;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.cd-designer__price-value {
    color: #111111;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
}

.cd-designer__price-value ins {
    text-decoration: none;
}

.cd-designer__price-note {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.5;
}

.cd-designer__action-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #eceff4;
    border-radius: 16px;
    background: #ffffff;
}

.cd-designer__action-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.cd-designer__submit,
.cd-designer__checkout {
    min-height: 48px;
    padding: 0 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cd-designer__submit {
    border: 1px solid #ffc106;
    background: #ffffff;
    color: #111111;
    box-shadow: none;
}

.cd-designer__submit:hover {
    border-color: #e0ab00;
    background: #fff9db;
    transform: translateY(-1px);
}

.cd-designer__checkout {
    border: 1px solid #ffc106;
    background: #ffc106;
    color: #111111;
    box-shadow: none;
}

.cd-designer__checkout:hover {
    border-color: #e0ab00;
    background: #e0ab00;
    transform: translateY(-1px);
}

.cd-designer__submit:focus,
.cd-designer__checkout:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 193, 6, 0.16);
}

@media (max-width: 1100px) {
    .cd-designer {
        height: auto;
        min-height: calc(100vh - 24px);
    }

    .cd-designer__layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .cd-designer__preview-panel {
        min-height: 520px;
    }

    .cd-designer__controls {
        padding-top: 14px;
    }

    .cd-designer__action-bar {
        grid-template-columns: 1fr;
    }

    .cd-designer__field-grid--inline {
        grid-template-columns: minmax(0, 1fr) 108px 112px;
    }
}

@media (max-width: 1280px) {
    .cd-designer__field-grid--inline {
        grid-template-columns: minmax(0, 1fr) 108px 112px;
    }
}

@media (max-width: 640px) {
    .cd-design-entry {
        margin-top: 12px;
        margin-left: 0;
    }

    .cd-designer-page {
        padding: 10px 12px;
    }

    .cd-designer {
        height: auto;
        min-height: calc(100vh - 20px);
        padding: 4px 0 0;
    }

    .cd-designer__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .cd-designer__header-main,
    .cd-designer__header-actions {
        width: 100%;
    }

    .cd-designer__palette-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .cd-designer__product-name {
        font-size: 22px;
    }

    .cd-designer__tabs {
        flex-wrap: wrap;
    }

    .cd-designer__tab {
        flex-basis: calc(50% - 4px);
    }

    .cd-designer__preview {
        padding: 10px;
    }

    .cd-designer__actions {
        padding: 18px 16px 18px;
    }

    .cd-designer__action-meta,
    .cd-designer__action-buttons {
        grid-template-columns: 1fr;
    }

    .cd-designer__field-grid,
    .cd-designer__field-grid--inline {
        grid-template-columns: 1fr;
    }

    .cd-designer__submit,
    .cd-designer__checkout,
    .cd-designer__back {
        width: 100%;
    }
}
