/* Design Brain UI V0.1.3 calibration */

.search-wrap { position: relative; }
.search { padding-right: 5px; }
.search kbd { margin-left: 4px; }
.visual-search-button { display: grid; place-items: center; flex: 0 0 auto; width: 27px; height: 27px; margin-left: 5px; padding: 0; border: 0; border-left: 1px solid var(--line); border-radius: 0 5px 5px 0; background: transparent; color: #737371; cursor: pointer; }
.visual-search-button:hover, .visual-search-button[aria-expanded="true"] { color: #1d1d1f; background: rgba(0,0,0,.045); }
.visual-search-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
.visual-search-popover { top: 41px; right: 0; width: 300px; padding: 18px; }
.visual-search-popover > header { margin-bottom: 14px; }
.visual-search-popover > header b { display: block; color: #2f3a4c; font-size: 14px; font-weight: 650; }
.visual-search-popover > header p { margin: 4px 0 0; color: #748095; font-size: 11px; line-height: 1.45; }
.visual-search-dropzone { display: grid; place-items: center; width: 100%; min-height: 128px; padding: 18px; border: 1px dashed rgba(91,112,151,.38); border-radius: 14px; background: rgba(246,249,253,.42); color: #46546b; text-align: center; cursor: pointer; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.visual-search-dropzone > i { display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 9px; border-radius: 50%; background: rgba(255,255,255,.72); color: #60728f; font-size: 21px; font-style: normal; box-shadow: inset 0 1px rgba(255,255,255,.92), 0 4px 12px rgba(48,65,95,.08); }
.visual-search-dropzone > span { display: grid; gap: 4px; }
.visual-search-dropzone > span b { font-size: 12px; font-weight: 590; }
.visual-search-dropzone > span small { color: #8691a3; font-size: 10px; }
.visual-search-dropzone:hover,
.visual-search-dropzone.is-dragging { border-color: rgba(76,105,164,.64); background: rgba(237,244,253,.72); box-shadow: inset 0 0 0 1px rgba(255,255,255,.58), 0 9px 24px rgba(56,76,112,.08); }
.visual-query-range { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.visual-query-range > span { color: #778397; font-size: 10px; }
.visual-query-range > div { display: flex; padding: 2px; border-radius: 999px; background: rgba(219,227,239,.56); }
.visual-query-range button { min-width: 48px; height: 26px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: #69768a; font-size: 10px; }
.visual-query-range button.active { background: rgba(255,255,255,.86); color: #34435b; box-shadow: 0 2px 7px rgba(46,61,88,.08); }
.visual-library-source { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 12px; padding: 10px 2px 2px; border: 0; background: transparent; color: #536176; font-size: 11px; text-align: left; cursor: pointer; }
.visual-library-source i { color: #8a95a5; font-size: 17px; font-style: normal; }

.asset-card { position: relative; }
.card-meta { position: absolute; z-index: 4; right: 8px; bottom: 8px; left: 8px; min-width: 0; padding: 7px 8px; border-radius: 6px; background: rgba(25,25,24,.82); color: #fff; opacity: 0; transform: translateY(3px); pointer-events: none; transition: opacity .14s ease, transform .14s ease; }
.card-meta span { color: #fff; }
.card-meta i { display: none; }
.asset-card:hover .card-meta, .asset-card.selected .card-meta, .asset-card:focus-visible .card-meta { opacity: 1; transform: translateY(0); }
.asset-card.identity-important .card-meta { opacity: .82; transform: none; }
.asset-card.identity-important:hover .card-meta, .asset-card.identity-important.selected .card-meta { opacity: 1; }
.masonry.density-compact .card-meta { display: none; }
.find-similar { position: absolute; z-index: 5; top: 9px; right: 9px; display: flex; align-items: center; gap: 5px; padding: 6px 8px; border: 0; border-radius: 6px; background: rgba(255,255,255,.93); color: #30302f; box-shadow: 0 2px 7px rgba(0,0,0,.12); opacity: 0; transform: translateY(-2px); cursor: pointer; font-size: 10px; transition: opacity .14s ease, transform .14s ease; }
.find-similar span { font-size: 13px; transform: rotate(-12deg); }
.asset-card:hover .find-similar, .asset-card.selected .find-similar, .asset-card:focus-within .find-similar { opacity: 1; transform: none; }
.find-similar:hover { background: #fff; color: #000; }

.preview-stage:hover .inspector-similar, .inspector-similar:focus-visible { opacity: 1; transform: none; }
.inspector-similar { position: absolute; z-index: 4; top: 10px; right: 10px; display: flex; align-items: center; gap: 5px; padding: 7px 9px; border: 0; border-radius: 6px; background: rgba(255,255,255,.94); color: #30302f; box-shadow: 0 2px 8px rgba(0,0,0,.12); opacity: 0; transform: translateY(-2px); cursor: pointer; font-size: 10px; transition: opacity .14s ease, transform .14s ease; }
.inspector-similar span { font-size: 14px; transform: rotate(-12deg); }

.understanding-heading { margin-bottom: 15px; }
.feature-section { padding-top: 22px; }
.facet-list { display: block; }
.understanding-primary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 22px; }
.understanding-term { display: inline-flex; align-items: center; gap: 5px; margin: 2px 5px 2px 0; padding: 2px 1px; border: 0; border-bottom: 1px solid transparent; background: transparent; color: #5c5c59; cursor: pointer; font-size: 10px; line-height: 1.45; text-align: left; }
.understanding-term:hover { border-bottom-color: #aaa; color: #1d1d1f; }
.understanding-term.primary-term { margin: 0; color: #20201f; font-size: 13px; font-weight: 570; letter-spacing: -.15px; }
.term-separator { color: #b1b1ad; font-size: 12px; font-style: normal; }
.understanding-narrative { display: grid; gap: 8px; margin-top: 14px; padding: 12px 0 1px; border-top: 1px solid var(--line); }
.understanding-line { display: grid; grid-template-columns: 8px minmax(0,1fr); align-items: start; gap: 5px; }
.understanding-line > i { width: 3px; height: 3px; margin-top: 9px; border-radius: 50%; background: #aaa; }
.understanding-line > div { display: flex; flex-wrap: wrap; column-gap: 9px; }
.understanding-term.suggested { color: #777; border-bottom-color: #aaa; border-bottom-style: dashed; }
.understanding-term small { color: #8e8e8b; font-size: 8px; }
.understanding-term .suggestion-dot { width: 4px; height: 4px; border-radius: 50%; background: #777; }

.judgment-section { padding-top: 22px; padding-bottom: 23px; }
.judgment-heading h3 { font-size: 13px; }
.judgment-heading p { color: #676765; }
.judgment-value { min-height: 46px; padding: 11px 12px 11px 14px; border-left: 2px solid #363634; background: #f1f1ef; color: #242423; font-size: 12px; line-height: 1.7; letter-spacing: -.05px; }
.judgment-value:hover { background: #ededeb; }
.judgment-value.empty { border-left-color: #c8c8c4; color: #969693; }
.learning-row b { font-size: 11px; font-weight: 600; }

.similar-sheet { position: fixed; z-index: 800; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(232,232,229,.82); }
.similar-panel { width: min(470px, calc(100vw - 48px)); overflow: hidden; border: 1px solid rgba(0,0,0,.13); border-radius: 12px; background: #fbfbfa; box-shadow: 0 22px 70px rgba(0,0,0,.2), 0 3px 10px rgba(0,0,0,.08); }
.similar-panel > header { display: flex; align-items: flex-start; justify-content: space-between; padding: 17px 18px 14px; border-bottom: 1px solid var(--line); }
.similar-panel > header > div { display: flex; align-items: center; gap: 10px; }
.similar-panel h2 { margin: 0; font-size: 14px; }
.similar-panel header p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.similar-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 7px; background: #242423; color: #fff; font-size: 16px; transform: rotate(-8deg); }
.similar-panel header > button { width: 26px; height: 26px; border: 0; border-radius: 6px; background: transparent; color: #777; font-size: 19px; }
.similar-panel header > button:hover { background: #ececea; color: #222; }
.similar-source { display: grid; grid-template-columns: 96px minmax(0,1fr); align-items: center; gap: 13px; padding: 16px 18px 13px; }
.similar-preview { position: relative; display: grid; place-items: center; width: 96px; aspect-ratio: 4 / 3; overflow: hidden; background: #e9e9e6; }
.similar-preview img { width: 100%; height: 100%; object-fit: contain; }
.similar-preview .source-placeholder, .similar-preview .prompt-preview { width: 100%; height: 100%; }
.similar-preview.crop-mode:after { content: ""; position: absolute; inset: 24% 20% 20% 28%; border: 1.5px solid #fff; box-shadow: 0 0 0 999px rgba(0,0,0,.36), 0 0 0 1px rgba(0,0,0,.25); }
.empty-visual-source { color: #8d8d89; font-size: 10px; }
.similar-source > div:last-child { display: grid; min-width: 0; gap: 4px; }
.similar-source span { color: var(--muted); font-size: 9px; }
.similar-source b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 560; }
.similar-source small { color: #777; font-size: 9px; }
.similar-modes { display: grid; grid-template-columns: 1fr 1fr; margin: 0 18px 14px; padding: 2px; border-radius: 7px; background: #eeeeec; }
.similar-modes button { padding: 7px; border: 0; border-radius: 5px; background: transparent; color: #6c6c69; font-size: 10px; }
.similar-modes button.active { background: #fff; color: #222; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.similar-text { display: grid; gap: 7px; padding: 0 18px; }
.similar-text > span { color: #444; font-size: 10px; }
.similar-text > span small { color: #999; }
.similar-text input { height: 36px; padding: 0 10px; border: 1px solid #cececa; border-radius: 7px; outline: 0; background: #fff; font-size: 11px; }
.similar-text input:focus { border-color: #888; box-shadow: 0 0 0 3px rgba(0,0,0,.06); }
.similar-notice { margin: 10px 18px 15px; color: #8b8b87; font-size: 9px; line-height: 1.45; }
.similar-panel > footer { display: flex; justify-content: flex-end; gap: 7px; padding: 11px 18px; border-top: 1px solid var(--line); }
.similar-panel > footer button { padding: 7px 11px; border: 0; border-radius: 6px; background: #ececea; font-size: 10px; }
.similar-panel > footer .primary { background: #242423; color: #fff; }

@media (max-width: 1180px) {
  .visual-search-popover { right: -42px; }
}
