.cn-purchase-options { align-items: end; }
.cn-purchase-size { display: grid; min-width: 0; gap: 8px; }
.cn-purchase-size-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 7px; }
.cn-purchase-size-heading label { display: inline; }
.cn-size-guide-trigger {
    display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 1px 0;
    border: 0; border-radius: 0; background: none; color: var(--cn-blue, #1926d5);
    text-decoration: underline; text-underline-offset: 3px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
}
.cn-size-guide-trigger .app-icon, .cn-size-guide-full .app-icon { height: 13px; width: 13px; flex: 0 0 13px; }
.cn-size-guide-trigger:disabled { cursor: default; opacity: .65; }
.cn-size-guide-standalone { margin-top: 14px; }
.cn-size-guide-dialog {
    inset: 0; margin: auto; width: min(640px, calc(100% - 24px)); max-width: none; max-height: calc(100dvh - 24px);
    padding: 0; overflow: auto; border: 2px solid #141722; border-radius: 6px; background: #fff;
    color: #11182b; box-shadow: 5px 5px 0 var(--cn-blue, #1926d5); overscroll-behavior: contain;
}
.cn-size-guide-dialog::backdrop { background: rgb(12 16 29 / .64); }
.cn-size-guide-dialog > header {
    position: sticky; z-index: 1; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 14px; border-bottom: 2px solid #141722; background: #fff980;
}
.cn-size-guide-dialog > header h2 { margin: 0; font-size: 24px; line-height: 1.15; overflow-wrap: anywhere; }
.cn-size-guide-dialog > header form { flex: 0 0 auto; margin: 0; }
.cn-size-guide-close {
    display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
    border: 1px solid #151722; background: #fff; color: #151722; cursor: pointer;
}
.cn-size-guide-close .app-icon { width: 18px; height: 18px; }
.cn-size-guide-body { display: grid; gap: 10px; padding: 12px; }
.cn-size-guide-body > img { display: block; width: 100%; height: auto; border: 1px solid #d5d8e0; }
.cn-size-guide-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cn-size-guide-tabs button {
    min-height: 40px; padding: 5px; border: 1px solid #191b30; background: #fff; color: #151722;
    font: inherit; font-weight: 700; cursor: pointer;
}
.cn-size-guide-tabs [aria-pressed="true"] { background: var(--cn-blue, #1926d5); color: #fff; }
.cn-size-guide-choice { display: grid; gap: 4px; font-size: 13px; font-weight: 700; }
.cn-size-guide-choice select { min-width: 0; min-height: 40px; }
.cn-size-guide-full { display: inline-flex; align-items: center; gap: 6px; justify-self: end; font-size: 13px; font-weight: 700; color: #1926d5; }
.sg-admin .workspace-header { align-items: end; }
.sg-admin .catalog-button, .sg-admin .catalog-icon-button { font: inherit; font-size: 12px; font-weight: 700; }
.sg-admin .app-icon { width: 15px; height: 15px; }
.sg-layout { display: grid; grid-template-columns: minmax(215px, 1fr) minmax(0, 2.5fr); gap: 18px; align-items: start; }
.sg-list, .sg-editor { min-width: 0; border-block: 1px solid #d5dfed; background: #fff; }
.sg-list h2, .sg-editor > header h2 { margin: 0; font-size: 17px; overflow-wrap: anywhere; }
.sg-list h2 { padding: 13px 12px; }
.sg-list h2 small { margin-left: 4px; color: #566b89; font-size: 12px; }
.sg-list-item {
    width: 100%; display: grid; grid-template-columns: 42px minmax(0, 1fr) 14px; gap: 9px; align-items: center;
    padding: 8px 12px; text-align: left; border: 0; border-top: 1px solid #e0e7f1;
    background: #fff; color: #182945; font: inherit; font-size: 13px; cursor: pointer;
}
.sg-list-item:hover, .sg-list-item[aria-pressed="true"] { background: #edf3ff; color: #233cba; }
.sg-list-item img { width: 42px; height: 54px; object-fit: contain; background: #f5f7fb; }
.sg-list-item span { display: grid; gap: 3px; overflow-wrap: anywhere; }
.sg-list-item small { color: #556984; font-size: 11px; }
.sg-editor { padding: 14px; }
.sg-editor > header, .sg-editor > footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.sg-editor > footer { justify-content: end; margin-top: 14px; padding-top: 12px; border-top: 1px solid #dce5f2; }
.sg-editor fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.sg-editor-fields, .sg-rule-grid, .sg-media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.sg-editor-fields { align-items: end; }
.sg-editor-fields label { display: grid; gap: 5px; font-size: 12px; font-weight: 700; }
.sg-editor-fields input:not([type="checkbox"]) {
    width: 100%; min-height: 40px; padding: 6px 9px; border: 1px solid #c5d3e7; border-radius: 6px; background: #fff; color: #182945;
}
.sg-editor label.sg-check { display: flex; min-height: 32px; align-items: center; gap: 7px; font-size: 12px; overflow-wrap: anywhere; }
.sg-check input { flex: 0 0 auto; width: 16px; height: 16px; accent-color: #233cba; }
.sg-rule-grid fieldset legend { float: none; margin: 0 0 5px; padding: 0; font-size: 13px; font-weight: 700; }
.sg-rule-list { max-height: 158px; overflow: auto; padding: 3px 8px; border: 1px solid #d5dfed; border-radius: 6px; }
.sg-selection-note { margin: 8px 0 0; font-size: 12px; color: #526480; }
.sg-media { min-width: 0; border-top: 1px solid #dce5f2; padding-top: 10px; }
.sg-media h3 { margin: 0 0 7px; font-size: 14px; }
.sg-media h3 small { margin-inline-start: 6px; color: #526480; font-size: 11px; font-weight: 500; }
.sg-media-preview { display: grid; place-items: center; min-height: 145px; height: 180px; background: #f1f4fa; border: 1px solid #d5dfed; overflow: hidden; }
.sg-media-preview img { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.sg-media-preview > span { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #526480; }
.sg-media-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sg-upload.catalog-replace { position: relative; display: inline-flex; height: auto; cursor: pointer; }
.sg-upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.sg-upload:focus-within { outline: 2px solid #233cba; outline-offset: 2px; }
.sg-message { margin: 8px 0 14px; padding: 9px 12px; background: #e6f6ec; color: #17583b; border-radius: 6px; font-size: 13px; }
.sg-error { background: #fcecea; color: #972c25; }
@media (max-width: 760px) {
    .sg-layout { grid-template-columns: minmax(0, 1fr); gap: 13px; }
    .sg-list { max-height: 235px; overflow: auto; }
}
@media (max-width: 460px) {
    .cn-size-guide-trigger { min-height: 36px; }
    .cn-size-guide-dialog > header { padding: 8px 10px; }
    .cn-size-guide-dialog > header h2 { font-size: 21px; }
    .cn-size-guide-body { padding: 8px; }
    .sg-editor { padding: 12px; }
    .sg-editor-fields { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .sg-media-preview { min-height: 120px; height: 145px; }
}
