.frame-create-panel,
.frame-selection-card,
.frame-collection-panel { padding: 12px 14px; border: 1px solid #dbe2ec; border-radius: 8px; background: #fff; }
.frame-create-panel { border-color: #ef9dc7; background: #fff8fc; }
.frame-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.frame-section-heading h3, .frame-section-heading p { margin: 0; }
.frame-section-heading h3 { color: #202635; font-size: 13px; font-weight: 700; line-height: 1.3; }
.frame-section-heading p { margin-top: 3px; color: #7c8798; font-size: 9px; line-height: 1.45; }
.frame-section-heading > span, .frame-section-heading div > span { color: #75839a; font-size: 9px; font-weight: 700; }

.frame-placement-control { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 6px 0 11px; }
.frame-placement-control button { display: grid; grid-template-columns: 38px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 8px; min-width: 0; min-height: 54px; padding: 7px 8px; border: 1px solid #d8e0ea; border-radius: 7px; color: #18263a; background: #fff; text-align: left; }
.frame-placement-control button:hover, .frame-placement-control button.is-active { border-color: #ec168c; background: #fff2f8; }
.frame-placement-control strong, .frame-placement-control small { grid-column: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frame-placement-control strong { font-size: 10px; line-height: 1.3; }
.frame-placement-control small { color: #78869a; font-size: 8px; line-height: 1.3; }
.frame-placement-visual { position: relative; grid-row: 1 / 3; display: flex; align-items: center; align-self: stretch; gap: 2px; width: 36px; min-height: 36px; padding: 4px; border-radius: 5px; background: #edf4fc; }
.frame-placement-visual i { flex: 1; height: 2px; background: #7893b3; }
.frame-placement-visual b { display: grid; width: 15px; height: 18px; place-items: center; border: 1px solid #ec168c; border-radius: 2px; color: #a50e61; background: #fff; font-size: 6px; }
.frame-placement-visual--anchored b { position: absolute; right: 4px; top: 5px; width: 20px; height: 25px; background: #fff0f7; box-shadow: 0 3px 6px rgba(26, 40, 61, .15); }
.frame-create-panel > .demo-field-label { display: grid; gap: 5px; }
.frame-size-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 9px 0 11px; }
.frame-size-row label { display: grid; gap: 4px; }
.frame-size-row span { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px; color: #6f7e92; font-size: 8px; }
.frame-size-row input { min-width: 0; width: 100%; height: 30px; padding: 4px 7px; border: 1px solid #d8e0ea; border-radius: 6px; color: #18263a; background: #fff; font: inherit; }

.frame-selection-card { min-height: 92px; overflow: hidden; }
.frame-selection-card:not(.is-empty) { border-color: #f06aaa; box-shadow: 0 10px 30px rgba(26, 40, 61, .08); }
.frame-selection-empty { display: flex; align-items: center; gap: 10px; min-height: 62px; }
.frame-selection-empty div { display: grid; gap: 2px; }
.frame-selection-empty strong { font-size: 11px; }
.frame-selection-empty div span { color: #77859a; font-size: 9px; line-height: 1.4; }
.frame-empty-visual { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; border: 1px dashed #7292b5; border-radius: 6px; color: #a70f62; background: #f3f7fc; font-size: 10px; font-weight: 700; }
.frame-section-heading--selected { align-items: center; }
.frame-section-heading--selected h3 { margin-top: 2px; overflow-wrap: anywhere; font-size: 15px; }
.frame-mode-badge { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; color: #275a91 !important; background: #e9f2fc; font-size: 9px !important; }

.frame-object-visual { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-height: 72px; margin-bottom: 10px; padding: 9px 10px; border-radius: 6px; background: repeating-linear-gradient(#f4f7fb 0 20px, #fff 20px 21px); }
.frame-object-visual > i { width: 18%; height: 3px; background: #afbdce; }
.frame-object-visual > b { display: grid; width: 42px; height: 29px; place-items: center; border: 2px solid #ec168c; border-radius: 3px; color: #a70f62; background: var(--frame-color, #fff0f7); font-size: 8px; box-shadow: 0 4px 8px rgba(26, 40, 61, .1); opacity: var(--frame-opacity, 1); }
.frame-object-visual[data-mode="anchored"] > b { position: absolute; top: 8px; left: 52%; width: 50px; height: 40px; }
.frame-object-visual small { flex-basis: 100%; color: #748299; font-size: 8px; }
.frame-property-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid #e0e6ef; border-radius: 6px; background: #e0e6ef; }
.frame-property-grid div { display: grid; min-width: 0; gap: 2px; padding: 7px 9px; background: #f9fbfd; }
.frame-property-grid span { color: #78869a; font-size: 8px; }
.frame-property-grid strong { overflow: hidden; font-size: 9px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.frame-format-controls { display: grid; gap: 9px; margin-top: 11px; padding-top: 11px; border-top: 1px solid #e4e9f0; }
.frame-format-controls > label { display: grid; gap: 5px; }
.frame-color-control { display: grid; grid-template-columns: repeat(5, 27px); gap: 6px; }
.frame-color-control button { width: 27px; height: 27px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: var(--swatch); box-shadow: 0 0 0 1px #cbd6e3; }
.frame-color-control button:nth-child(1) { --swatch: #fff; }
.frame-color-control button:nth-child(2) { --swatch: #fff0f7; }
.frame-color-control button:nth-child(3) { --swatch: #eaf3fc; }
.frame-color-control button:nth-child(4) { --swatch: #eaf8f2; }
.frame-color-control button:nth-child(5) { --swatch: #263850; }
.frame-color-control button:hover, .frame-color-control button.is-active { box-shadow: 0 0 0 2px #ec168c; }
.frame-transparency-control span { display: grid; grid-template-columns: 1fr 38px; align-items: center; gap: 8px; }
.frame-transparency-control input { accent-color: #ec168c; }
.frame-transparency-control output { color: #17283e; font-size: 9px; font-weight: 700; }
.frame-alignment-control { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; border: 1px solid #d8e0ea; border-radius: 999px; }
.frame-alignment-control button { min-width: 0; min-height: 30px; padding: 6px 4px; border: 0; border-right: 1px solid #d8e0ea; color: #53647b; background: #fff; font: inherit; font-size: 9px; font-weight: 650; }
.frame-alignment-control button:last-child { border-right: 0; }
.frame-alignment-control button:hover:not(:disabled), .frame-alignment-control button.is-active { color: #fff; background: #ec168c; }
.frame-alignment-control button:disabled { color: #aeb8c6; background: #f5f7fa; }
.frame-control-hint { margin-top: -5px; color: #7b889b; font-size: 8px; }
.frame-behavior-control { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.frame-behavior-control label { display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 8px; border: 1px solid #dce3ec; border-radius: 6px; color: #506178; background: #f9fbfd; font-size: 8px; }
.frame-behavior-control input { accent-color: #ec168c; }
.frame-selection-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.frame-selection-actions .btn { min-width: 0; padding-inline: 10px; font-size: 9px; }

.frame-collection-list { display: grid; gap: 6px; }
.frame-collection-list > p { margin: 0; color: #7b889b; font-size: 9px; }
.frame-collection-item { position: relative; display: grid; gap: 2px; width: 100%; min-height: 45px; padding: 7px 10px 7px 38px; border: 1px solid #e1e7ef; border-radius: 6px; color: #18263a; background: #f9fbfd; text-align: left; }
.frame-collection-item:hover, .frame-collection-item.is-active { border-color: #ec168c; background: #fff4fa; }
.frame-collection-item::before { content: "Aa"; position: absolute; left: 9px; top: 50%; display: grid; width: 20px; height: 24px; place-items: center; border: 1px solid #5187b8; border-radius: 3px; color: #386d9e; background: #fff; font-size: 6px; font-weight: 700; transform: translateY(-50%); }
.frame-collection-item strong, .frame-collection-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frame-collection-item strong { font-size: 10px; }
.frame-collection-item span { color: #77859a; font-size: 8px; }

@media (max-width: 620px) {
    .frame-placement-control, .frame-property-grid, .frame-behavior-control, .frame-selection-actions { grid-template-columns: 1fr; }
}
