/* rex-wardrobe.css — гардероб Рекса (rex-wardrobe.js). */
.rw-btn { margin-top: var(--s2, 8px); }
.rw-btn-bones { font-weight: 700; font-variant-numeric: tabular-nums; }
.rw-note { margin: var(--s2, 8px) 0 0; font-size: .875rem; font-weight: 600; }
.rw-dialog {
  width: min(100vw - 24px, 720px); max-width: none; max-height: calc(100dvh - 24px);
  padding: 0; border: 0; border-radius: var(--r-lg, 16px);
  background: var(--surface, #fff); color: var(--ink); overflow: auto;
}
.rw-dialog::backdrop { background: rgba(20, 21, 26, .55); }
@media (max-width: 560px) {
  .rw-dialog { width: 100vw; height: 100dvh; max-height: none; margin: 0; border-radius: 0; }
  .rw-head { padding-top: calc(var(--s3, 12px) + env(safe-area-inset-top, 0px)); }
  .rw-foot { padding-bottom: calc(var(--s4, 16px) + env(safe-area-inset-bottom, 0px)); }
}
.rw-head {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: var(--s2, 8px);
  padding: var(--s3, 12px) var(--s4, 16px); background: var(--surface, #fff); border-bottom: 1px solid var(--line, #e7e1d6);
}
.rw-head h2 { flex: 1; margin: 0; font-size: 1.125rem; }
.rw-bones { font-size: 1.125rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rw-head .btn { min-width: 44px; min-height: 44px; }
.rw-tabs { display: flex; gap: var(--s2, 8px); flex-wrap: wrap; padding: var(--s3, 12px) var(--s4, 16px) 0; }
.rw-tab {
  min-height: 44px; padding: 0 var(--s3, 12px); border: 1px solid var(--line, #e7e1d6); border-radius: 999px;
  background: var(--surface, #fff); color: inherit; font: inherit; font-weight: 600; cursor: pointer;
}
.rw-tab[aria-pressed="true"] { background: var(--ink, #1f1d1a); border-color: var(--ink, #1f1d1a); color: var(--surface, #fff); }
.rw-status { margin: var(--s2, 8px) var(--s4, 16px) 0; font-weight: 600; color: var(--danger, #a81c24); }
.rw-status:empty { display: none; }
.rw-list { padding: 0 var(--s4, 16px) var(--s3, 12px); }
/* Общий стиль сайта даёт section большие поля — в окне они не нужны. */
.rw-stage { padding: 0; margin: 0; }
.rw-stage h3 { margin: var(--s4, 16px) 0 var(--s2, 8px); font-size: 1rem; }
.rw-stage h3 small { font-weight: 400; color: var(--muted, #6b645a); }
.rw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: var(--s2, 8px); }
.rw-look {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; min-height: 44px;
  padding: 6px; border: 2px solid var(--line, #e7e1d6); border-radius: var(--r-md, 12px);
  background: var(--surface, #fff); color: inherit; font: inherit; font-size: .8125rem; line-height: 1.2;
  text-align: center; cursor: pointer;
}
.rw-look img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.rw-look b { font-weight: 600; overflow-wrap: break-word; }
.rw-st { font-size: .75rem; color: var(--muted, #6b645a); font-variant-numeric: tabular-nums; }
.rw-look:hover:not(:disabled) { border-color: var(--accent, #b85a1c); }
.rw-look:focus-visible { outline: 3px solid var(--accent, #b85a1c); outline-offset: 2px; }
.rw-look.is-pick { border-color: var(--accent, #b85a1c); background: color-mix(in srgb, var(--accent, #b85a1c) 10%, var(--surface, #fff)); }
.rw-look.is-poor .rw-st { color: var(--danger, #a81c24); }
.rw-look.is-soon .rw-st { color: #9a6200; font-weight: 700; }
.rw-tag {
  position: absolute; top: 6px; left: 6px; padding: 1px 6px; border-radius: 999px;
  background: var(--accent, #b85a1c); color: #fff; font-size: .6875rem; font-weight: 700;
}
.rw-look:disabled { cursor: not-allowed; }
.rw-stage.is-locked .rw-look img { filter: grayscale(1) brightness(.95); opacity: .45; }
.rw-stage.is-locked .rw-look b, .rw-stage.is-locked .rw-st { color: var(--muted, #6b645a); }
.rw-empty { margin: var(--s4, 16px) 0; color: var(--muted, #6b645a); }
.rw-foot {
  position: sticky; bottom: 0; z-index: 2; padding: var(--s3, 12px) var(--s4, 16px) var(--s4, 16px);
  background: var(--surface, #fff); border-top: 1px solid var(--line, #e7e1d6);
}
.rw-sel { margin: 0 0 var(--s2, 8px); line-height: 1.35; }
.rw-sel:empty { display: none; }
.rw-acts { display: flex; flex-wrap: wrap; gap: var(--s2, 8px); }
.rw-acts:empty { display: none; }
.rw-acts .btn { flex: 1 1 14rem; min-height: 48px; }
.rw-how { margin-top: var(--s2, 8px); font-size: .875rem; }
.rw-how summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
.rw-how ul { margin: var(--s1, 4px) 0 0; padding-left: 18px; line-height: 1.5; }
.rw-more {
  display: flex; align-items: center; justify-content: center; min-height: 104px; padding: 6px; text-align: center;
  border: 2px dashed var(--line, #e7e1d6); border-radius: var(--r-md, 12px); color: var(--muted, #6b645a); font-size: .8125rem;
}
.rw-look img.rw-lazy { background: color-mix(in srgb, var(--line, #e7e1d6) 40%, transparent); border-radius: 8px; }
