/* Every selector is scoped to .rp-a1; no body, :root or generic host resets. */
.rp-a1 { color-scheme: light; box-sizing: border-box; width: min(960px, calc(100vw - 48px)); max-width: none; max-height: calc(100dvh - 48px); margin: auto; padding: 0; border: 1px solid #e9e9ec; border-radius: 26px; background: #fff; color: #202124; font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; box-shadow: 0 24px 90px #20212424; overflow: hidden; }
.rp-a1[open] { display: flex; flex-direction: column; }
.rp-a1::backdrop { background: #d5d7dcad; }
.rp-a1 *, .rp-a1 *::before, .rp-a1 *::after { box-sizing: border-box; }
.rp-a1 [hidden] { display: none !important; }
.rp-a1 button, .rp-a1 input { font: inherit; }
.rp-a1 button { cursor: pointer; color: inherit; border: 0; background: none; margin: 0; text-transform: none; letter-spacing: normal; }
.rp-a1 button:disabled { cursor: not-allowed; opacity: .36; }
.rp-a1 button:focus-visible, .rp-a1 input:focus-visible, .rp-a1 [tabindex]:focus-visible { outline: 2px solid #202124; outline-offset: 3px; }
.rp-a1 .rp-a1-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 27px 30px 18px; flex-shrink: 0; }
.rp-a1 .rp-a1-title { font-size: 23px; line-height: 1.35; font-weight: 650; margin: 0; overflow-wrap: anywhere; }
.rp-a1 .rp-a1-close { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; font-size: 27px; line-height: 1; font-weight: 300; }
.rp-a1 .rp-a1-close:hover { background: #f2f2f4; }
.rp-a1 .rp-a1-navigation { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 30px; flex-shrink: 0; }
.rp-a1 .rp-a1-tabs { display: flex; gap: 27px; }
.rp-a1 .rp-a1-tab { padding: 10px 0 12px; border-bottom: 2px solid transparent; color: #73757a; font-size: 15px; white-space: nowrap; }
.rp-a1 .rp-a1-tab[aria-selected="true"] { color: #191a1c; border-bottom-color: #191a1c; font-weight: 650; }
.rp-a1 .rp-a1-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rp-a1 .rp-a1-tool { padding: 7px 11px; border-radius: 8px; white-space: nowrap; }
.rp-a1 .rp-a1-tool:hover, .rp-a1 .rp-a1-tool[aria-expanded="true"] { background: #f3f3f5; }
.rp-a1 .rp-a1-prototype { font-size: 10px; color: #888a90; border: 1px solid #e6e6e9; border-radius: 4px; padding: 1px 4px; }
.rp-a1 .rp-a1-dropdown { position: relative; }
.rp-a1 .rp-a1-popover { position: absolute; right: 0; top: calc(100% + 6px); z-index: 3; width: 212px; padding: 6px; background: white; border: 1px solid #e8e8eb; border-radius: 12px; box-shadow: 0 8px 28px #2021241a; }
.rp-a1 .rp-a1-option { display: block; width: 100%; padding: 9px 10px; border-radius: 7px; text-align: left; overflow-wrap: anywhere; }
.rp-a1 .rp-a1-option:hover { background: #f5f5f7; }
.rp-a1 .rp-a1-popover-note { padding: 7px 8px; margin: 0; font-size: 12px; line-height: 1.7; color: #72747a; }
.rp-a1 .rp-a1-search-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 21px 30px 20px; flex-shrink: 0; }
.rp-a1 .rp-a1-search-box { display: flex; align-items: center; width: 300px; max-width: 100%; border: 1px solid #e8e8eb; border-radius: 10px; background: #fafafb; }
.rp-a1 .rp-a1-search { appearance: none; min-width: 0; width: 100%; height: 39px; padding: 8px 13px; border: none; background: transparent; border-radius: 9px; color: #202124; }
.rp-a1 .rp-a1-search::-webkit-search-cancel-button { appearance: none; }
.rp-a1 .rp-a1-search::placeholder { color: #93959b; }
.rp-a1 .rp-a1-clear { width: 33px; height: 33px; flex-shrink: 0; margin-right: 3px; font-size: 21px; border-radius: 7px; color: #73757a; }
.rp-a1 .rp-a1-results { color: #8b8d93; font-size: 12px; white-space: nowrap; }
.rp-a1 .rp-a1-panel { min-height: 0; height: 370px; overflow: auto; padding: 0 30px 24px; overscroll-behavior: contain; }
.rp-a1 .rp-a1-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 18px; }
.rp-a1 .rp-a1-card { min-width: 0; position: relative; }
.rp-a1 .rp-a1-card-label { display: block; position: relative; cursor: pointer; }
.rp-a1 .rp-a1-picture { position: relative; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 13px; background: #f0f0f2; isolation: isolate; }
.rp-a1 .rp-a1-selected .rp-a1-card-label .rp-a1-picture { outline: 2px solid #242527; outline-offset: -2px; }
.rp-a1 .rp-a1-placeholder { position: absolute; inset: 0; overflow: hidden; display: flex; justify-content: center; align-items: flex-end; background: radial-gradient(ellipse at 60% 15%, #f7efdf, #e6dbca); }
.rp-a1 .rp-a1-placeholder[data-tone="1"] { background: radial-gradient(ellipse at 60% 15%, #edf2f0, #d5dfdc); }
.rp-a1 .rp-a1-placeholder[data-tone="2"] { background: radial-gradient(ellipse at 60% 15%, #f2eaf0, #e0d3df); }
.rp-a1 .rp-a1-silhouette { position: absolute; width: 76%; height: 65%; bottom: -7%; border-radius: 46% 46% 0 0; background: #a8978280; }
.rp-a1 .rp-a1-silhouette::before { content: ""; display: block; position: absolute; width: 48%; height: 48%; left: 26%; top: -41%; border-radius: 48% 48% 46% 46%; background: #ab9787; box-shadow: inset -10px 0 #ffffff15; }
.rp-a1 .rp-a1-placeholder[data-tone="1"] .rp-a1-silhouette { background: #81999380; }
.rp-a1 .rp-a1-placeholder[data-tone="1"] .rp-a1-silhouette::before { background: #899f99; }
.rp-a1 .rp-a1-placeholder[data-tone="2"] .rp-a1-silhouette { background: #9e889e80; }
.rp-a1 .rp-a1-placeholder[data-tone="2"] .rp-a1-silhouette::before { background: #a891a6; }
.rp-a1 .rp-a1-placeholder-label { position: relative; margin-bottom: 13px; font-size: 10px; letter-spacing: 1px; padding: 3px 8px; background: #ffffffcc; color: #62616a; border-radius: 20px; }
.rp-a1 .rp-a1-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rp-a1 .rp-a1-checkbox { appearance: auto; accent-color: #171719; position: absolute; top: 10px; left: 10px; width: 19px; height: 19px; margin: 0; cursor: pointer; z-index: 1; }
.rp-a1 .rp-a1-name { display: block; margin: 10px 0 3px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-a1 .rp-a1-preview-button { padding: 2px 0; font-size: 12px; color: #7b7d83; text-align: left; }
.rp-a1 .rp-a1-preview-button:hover { color: #171719; text-decoration: underline; }
.rp-a1 .rp-a1-empty { grid-column: 1 / -1; min-height: 255px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #5b5d63; }
.rp-a1 .rp-a1-empty strong { font-size: 15px; font-weight: 550; }
.rp-a1 .rp-a1-empty p { margin: 9px 0 0; font-size: 12px; color: #92949a; }
.rp-a1 .rp-a1-status { margin: 0; padding: 0 30px; font-size: 12px; color: #a04438; flex-shrink: 0; }
.rp-a1 .rp-a1-status:empty { display: none; }
.rp-a1 .rp-a1-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-shrink: 0; padding: 20px 30px; border-top: 1px solid #eeeeef; }
.rp-a1 .rp-a1-count, .rp-a1 .rp-a1-preview-note { font-size: 12px; color: #81838a; }
.rp-a1 .rp-a1-actions { display: flex; gap: 10px; }
.rp-a1 .rp-a1-button { min-height: 39px; min-width: 86px; padding: 9px 22px; border: 1px solid #e5e5e9; border-radius: 10px; background: white; }
.rp-a1 .rp-a1-button:hover { background: #f5f5f7; }
.rp-a1 .rp-a1-primary { background: #19191b; border-color: #19191b; color: white; }
.rp-a1 .rp-a1-primary:hover { background: #323236; }
.rp-a1.rp-a1-preview { width: min(490px, calc(100vw - 32px)); }
.rp-a1.rp-a1-preview .rp-a1-title { font-size: 18px; }
.rp-a1 .rp-a1-preview-body { padding: 0 30px 22px; overflow: auto; min-height: 0; }
.rp-a1 .rp-a1-preview-body .rp-a1-picture { max-height: 56dvh; margin: auto; }
@media (max-width: 680px) {
  .rp-a1 { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); border-radius: 20px; }
  .rp-a1 .rp-a1-header { padding: 19px 18px 12px; }
  .rp-a1 .rp-a1-navigation { padding: 0 18px; align-items: flex-start; flex-direction: column; gap: 8px; }
  .rp-a1 .rp-a1-tools { align-self: flex-end; }
  .rp-a1 .rp-a1-search-row { padding: 15px 18px; }
  .rp-a1 .rp-a1-search-box { width: 240px; }
  .rp-a1 .rp-a1-panel { padding: 0 18px 18px; }
  .rp-a1 .rp-a1-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .rp-a1 .rp-a1-footer { padding: 16px 18px; gap: 8px; }
  .rp-a1 .rp-a1-button { min-width: 68px; padding: 9px 14px; }
  .rp-a1 .rp-a1-status { padding: 0 18px; }
  .rp-a1 .rp-a1-preview-body { padding: 0 18px 18px; }
}

/* UI-A1-R2 local creation structure; all rules remain scoped. */
.rp-a1.rp-a1-create { width: min(590px, calc(100vw - 24px)); }
.rp-a1 .rp-a1-create-body { padding: 0 24px 20px; min-height: 0; overflow: auto; }
.rp-a1 .rp-a1-local-note { font-size: 12px; color: #777981; background: #f5f5f7; padding: 12px; border-radius: 10px; }
.rp-a1 .rp-a1-create-modes { display: flex; gap: 10px; margin: 18px 0; }
.rp-a1 .rp-a1-create-modes [aria-pressed="true"] { border-color: #19191b; background: #f3f3f5; }
.rp-a1 .rp-a1-field { display: grid; gap: 7px; margin: 14px 0; }
.rp-a1 .rp-a1-prompt, .rp-a1 .rp-a1-style { width: 100%; padding: 10px; border: 1px solid #dddde2; border-radius: 8px; background: #fff; color: #202124; font: inherit; }
.rp-a1 .rp-a1-prompt { resize: vertical; }
.rp-a1 textarea:focus-visible { outline: 2px solid #202124; outline-offset: 2px; }
.rp-a1 .rp-a1-create-output { max-width: 160px; margin: 16px auto; }
.rp-a1 .rp-a1-create-message { font-size: 12px; color: #74767c; }
.rp-a1 .rp-a1-agreement { display: flex; align-items: flex-start; gap: 8px; margin-top: 20px; color: #85878d; font-size: 12px; }
