/* ════════════════════════════════════════════════════════════════════════════
   Wardrobe Department v2 — Styles
   ════════════════════════════════════════════════════════════════════════════ */

/* Override the old wardrobe app layout to use the new flex shell */
#wardrobe-app.wdb-app {
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  height: calc(100vh - 100px) !important;
  max-height: calc(100vh - 100px) !important;
  overflow: hidden !important;
  background: #f6f3ef !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

.wdp2-shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: 100%;
  overflow: hidden;
  gap: 0;
}

/* ── Sidebar ─────────────────────────────────────────────────────────── */
.wdp2-sidebar {
  background: #fff;
  border-right: 1px solid #e5e0d8;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.wdp2-sidebar-head {
  padding: 18px 18px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #efeae2;
  background: linear-gradient(180deg, #fdfbf7, #fff);
}

.wdp2-sidebar-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #2c1a0a;
}

.wdp2-char-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.wdp2-char-card {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  margin-bottom: 6px;
  transition: all 0.15s;
  background: #fff;
  position: relative;
}
.wdp2-char-card:hover {
  background: #fef9f1;
  border-color: #efe4cf;
}
.wdp2-char-card.active {
  background: linear-gradient(135deg, #fff5e1 0%, #fef3e7 100%);
  border-color: #d4a660;
  box-shadow: 0 2px 8px rgba(180, 140, 80, 0.12);
}

.wdp2-char-thumb {
  width: 56px;
  height: 84px;
  border-radius: 8px;
  background: #f1ece4;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5dfd4;
}
.wdp2-char-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.wdp2-thumb-loading, .wdp2-thumb-placeholder {
  font-size: 1.2rem;
  color: #b0a595;
  font-weight: 800;
}

.wdp2-char-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wdp2-char-name {
  border: none;
  background: transparent;
  font-size: 0.92rem;
  font-weight: 700;
  color: #2c1a0a;
  padding: 2px 4px;
  border-radius: 4px;
  width: 100%;
  min-width: 0;
  outline: none;
}
.wdp2-char-name:focus {
  background: #fff;
  border: 1px solid #d4a660;
}

.wdp2-char-meta {
  font-size: 0.72rem;
  color: #8b7456;
  font-weight: 500;
}

.wdp2-char-cost {
  font-size: 0.78rem;
  color: #3a2a14;
  font-weight: 800;
}

.wdp2-char-del {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #b0a595;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  opacity: 0;
  transition: all 0.15s;
}
.wdp2-char-card:hover .wdp2-char-del {
  opacity: 1;
}
.wdp2-char-del:hover {
  background: #fee2e2;
  color: #dc2626;
}

.wdp2-sidebar-foot {
  padding: 14px 18px;
  border-top: 1px solid #efeae2;
  background: #fdfbf7;
}

.wdp2-project-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0 12px;
  border-bottom: 1px solid #efeae2;
  margin-bottom: 10px;
}
.wdp2-project-total span {
  font-size: 0.72rem;
  color: #8b7456;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.wdp2-project-total strong {
  font-size: 1.2rem;
  color: #2c1a0a;
  font-weight: 900;
}

/* ── Main ──────────────────────────────────────────────────────────────── */
.wdp2-main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.wdp2-main-head {
  padding: 14px 22px;
  background: #fff;
  border-bottom: 1px solid #efeae2;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wdp2-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 14px;
}

.wdp2-topbar-left {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.wdp2-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid #efeae2;
  padding-bottom: 0;
  margin-bottom: 0;
}
.wdp2-tab {
  border: none;
  background: transparent;
  padding: 10px 16px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #8b7456;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
}
.wdp2-tab:hover {
  color: #3a2a14;
}
.wdp2-tab.active {
  color: #d4a660;
  border-bottom-color: #d4a660;
}

.wdp2-topbar-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.wdp2-topbar-actions {
  justify-content: flex-end;
  align-self: flex-start;
  max-width: none;
  flex: 0 0 auto;
}

.wdp2-topbar-pills-inline {
  grid-column: 1;
  justify-self: start;
}

.wdp2-char-header {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr);
  align-items: start;
  gap: 12px 18px;
  padding-top: 8px;
}
.wdp2-char-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.wdp2-char-title > span {
  font-size: 1.3rem;
  font-weight: 900;
  color: #2c1a0a;
}
.wdp2-char-title > small {
  color: #8b7456;
  font-size: 0.78rem;
  line-height: 1.4;
}
.wdp2-char-note {
  grid-column: 1 / -1;
  max-width: none;
  width: 100%;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #775e42;
  background: linear-gradient(180deg, #fffaf1, #fff5e7);
  border: 1px solid #ead8bb;
  border-radius: 14px;
  padding: 10px 14px;
}
.wdp2-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}
.wdp2-field-pill {
  display: grid;
  gap: 6px;
  padding: 9px 12px;
  border: 1px solid #eadcc4;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffaf2, #fff6ea);
  min-width: 148px;
  box-shadow: 0 6px 14px rgba(78, 50, 16, 0.06);
}
.wdp2-field-pill > span {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8f6838;
}
.wdp2-char-header select {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #d9c8af;
  border-radius: 10px;
  font-size: 0.82rem;
  background: #fffdf9;
  color: #3a2a14;
  font-weight: 700;
  min-width: 138px;
}

/* ── Body (scrolls) ────────────────────────────────────────────────────── */
.wdp2-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  min-height: 0;
}

/* ── Builder view ──────────────────────────────────────────────────────── */
.wdp2-builder {
  display: grid;
  grid-template-columns: 410px 1fr;
  height: 100%;
  gap: 0;
}

.wdp2-stage-wrap {
  background: linear-gradient(180deg, #faf7f1 0%, #f0ebe1 100%);
  border-right: 1px solid #efeae2;
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  gap: 12px;
}

.wdp2-stage {
  position: relative;
  width: 100%;
  max-width: 350px;
  aspect-ratio: 614 / 2048;
  background: transparent;
  overflow: hidden;
  filter: drop-shadow(0 10px 20px rgba(44, 26, 10, 0.15));
}

.wdp2-rail {
  overflow-y: auto;
  padding: 18px 18px 26px;
  background:
    linear-gradient(180deg, rgba(255,250,243,.98), rgba(247,240,228,.98));
}

.wdp2-rail-group {
  background: rgba(255,255,255,.72);
  border: 1px solid #eadcc4;
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 10px 22px rgba(65, 39, 12, 0.05);
}

.wdp2-rail-group + .wdp2-rail-group {
  margin-top: 14px;
}

.wdp2-rail-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: -12px -12px 10px;
  padding: 12px 12px 10px;
  background: linear-gradient(180deg, rgba(255,248,234,.96), rgba(255,252,247,.92));
  border-bottom: 1px solid rgba(218, 199, 169, 0.8);
  border-radius: 18px 18px 0 0;
  font-weight: 800;
  color: #6f4d26;
}

.wdp2-rail-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 12px;
}

.wdp2-rail-item {
  min-height: 140px;
  border-radius: 16px;
  border: 1px solid #ead9bd;
  background: linear-gradient(180deg, #fffdfa, #fff7ea);
  box-shadow: 0 10px 18px rgba(48, 30, 12, 0.05);
}

.wdp2-rail-item img {
  max-height: 88px;
  object-fit: contain;
}

.wdp2-rail-item span {
  font-size: 0.82rem;
  font-weight: 700;
  color: #3f2a18;
}

.wdp2-rail-item.selected {
  border-color: #d7a055;
  box-shadow: 0 16px 26px rgba(178, 123, 45, 0.18);
}

.wdp2-stage-caption {
  margin-top: 16px;
  font-size: 0.78rem;
  color: #8b7456;
  text-align: center;
  font-style: italic;
  max-width: 280px;
}

/* Engine-rendered layers */
.pde2-stage { transition: none; }
.pde2-layer { transition: opacity 0.2s ease; }

/* ── Rail (garment picker) ─────────────────────────────────────────────── */
.wdp2-rail {
  overflow-y: auto;
  padding: 16px 20px;
  background: #fff;
}

.wdp2-rail-group {
  margin-bottom: 20px;
}

.wdp2-rail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 900;
  color: #3a2a14;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-bottom: 6px;
  border-bottom: 1px solid #efeae2;
  margin-bottom: 10px;
}

.wdp2-rail-clear {
  border: none;
  background: #fee2e2;
  color: #dc2626;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  font-size: 0.7rem;
  cursor: pointer;
  font-weight: 800;
}

.wdp2-rail-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
}

.wdp2-rail-item {
  border: 1px solid #efeae2;
  background: #faf7f1;
  border-radius: 10px;
  padding: 8px 4px 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
  overflow: hidden;
}
.wdp2-rail-item:hover {
  border-color: #d4a660;
  background: #fff5e1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(180, 140, 80, 0.15);
}
.wdp2-rail-item.selected {
  border-color: #d4a660;
  background: linear-gradient(135deg, #fff5e1, #fef3e7);
  box-shadow: 0 2px 8px rgba(180, 140, 80, 0.2);
}
.wdp2-rail-item img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
}
.wdp2-rail-item span {
  font-size: 0.68rem;
  color: #3a2a14;
  font-weight: 600;
  text-align: center;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

/* ── Scenes view ──────────────────────────────────────────────────────── */
.wdp2-scenes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  padding: 20px;
}

.wdp2-scenes-intro {
  margin: 20px 20px 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff7e7, #f7ecda);
  border: 1px solid #ecd8b8;
  color: #5b3b18;
}
.wdp2-scenes-intro strong {
  display: block;
  font-size: 0.86rem;
  margin-bottom: 4px;
}
.wdp2-scenes-intro span {
  display: block;
  font-size: 0.76rem;
  line-height: 1.45;
}

.wdp2-scene-card {
  background: #fff;
  border: 1px solid #efeae2;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.15s;
}
.wdp2-scene-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(44, 26, 10, 0.1);
}
.wdp2-scene-card.override {
  border-color: #d4a660;
  background: linear-gradient(180deg, #fff5e1, #fff);
}

.wdp2-scene-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #efeae2;
  background: #faf7f1;
}
.wdp2-scene-num {
  font-size: 0.7rem;
  font-weight: 900;
  color: #fff;
  background: #3a2a14;
  padding: 2px 7px;
  border-radius: 10px;
}
.wdp2-scene-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #2c1a0a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wdp2-scene-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 614 / 2048;
  background: linear-gradient(180deg, #faf7f1, #f0ebe1);
  padding: 0 40px;
  margin: 0 auto;
  max-width: 180px;
}

.wdp2-scene-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 12px;
  border-top: 1px solid #efeae2;
}

.wdp2-scene-cost {
  font-size: 0.82rem;
  font-weight: 800;
  color: #2c1a0a;
  margin-left: auto;
}

/* ── Costs view ───────────────────────────────────────────────────────── */
.wdp2-costs {
  padding: 20px;
}

.wdp2-costs-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.wdp2-costs-summary > div {
  background: #fff;
  border: 1px solid #efeae2;
  border-radius: 10px;
  padding: 12px 14px;
}
.wdp2-costs-summary span {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #8b7456;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.wdp2-costs-summary strong {
  font-size: 1.2rem;
  font-weight: 900;
  color: #2c1a0a;
}
.wdp2-costs-summary .total {
  background: linear-gradient(135deg, #2c1a0a, #3a2a14);
  color: #fff;
  border: none;
}
.wdp2-costs-summary .total span { color: #d4a660; }
.wdp2-costs-summary .total strong { color: #fff; }

.wdp2-costs-table {
  width: 100%;
  background: #fff;
  border: 1px solid #efeae2;
  border-radius: 12px;
  overflow: hidden;
  border-collapse: collapse;
}
.wdp2-costs-table th {
  background: #faf7f1;
  padding: 10px 12px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 800;
  color: #3a2a14;
  text-align: left;
  border-bottom: 1px solid #efeae2;
}
.wdp2-costs-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f5f1ea;
  font-size: 0.82rem;
  vertical-align: middle;
}
.wdp2-cost-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wdp2-cost-item img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  background: #faf7f1;
  border-radius: 6px;
}
.wdp2-cost-cat {
  font-size: 0.68rem;
  color: #8b7456;
  text-transform: capitalize;
  margin-top: 1px;
}
.wdp2-costs-table input {
  width: 80px;
  padding: 5px 7px;
  border: 1px solid #efeae2;
  border-radius: 5px;
  font-size: 0.8rem;
  background: #fff;
}
.wdp2-costs-table input[type="text"] {
  width: 160px;
}
.wdp2-cost-total {
  font-weight: 800;
  color: #2c1a0a;
  white-space: nowrap;
}

/* ── Continuity view ──────────────────────────────────────────────────── */
.wdp2-continuity {
  padding: 20px;
}

.wdp2-continuity-head {
  background: #fef3e7;
  border: 1px solid #f5d094;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.wdp2-continuity-head strong {
  color: #92400e;
  font-weight: 800;
}
.wdp2-continuity-head span {
  color: #8b7456;
  font-size: 0.82rem;
}

.wdp2-warn {
  background: #fff;
  border: 1px solid #efeae2;
  border-left: 3px solid #f59e0b;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 8px;
  display: grid;
  grid-template-columns: 180px 180px 1fr;
  gap: 16px;
  align-items: center;
}
.wdp2-warn-char {
  font-weight: 800;
  color: #2c1a0a;
}
.wdp2-warn-flow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #8b7456;
}
.wdp2-warn-arrow {
  color: #d4a660;
  font-weight: 800;
}
.wdp2-warn-changed {
  font-size: 0.82rem;
  color: #3a2a14;
}
.wdp2-warn-chip {
  display: inline-block;
  background: #fef3e7;
  color: #92400e;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-right: 4px;
}

/* ── Empty states ─────────────────────────────────────────────────────── */
.wdp2-empty {
  padding: 60px 30px;
  text-align: center;
  color: #8b7456;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */
.wdp2-btn {
  border: 1px solid transparent;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  white-space: nowrap;
}
.wdp2-btn-primary {
  background: linear-gradient(135deg, #d4a660, #c19048);
  color: #fff;
  box-shadow: 0 2px 4px rgba(180, 140, 80, 0.2);
}
.wdp2-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(180, 140, 80, 0.3);
}
.wdp2-btn-ghost {
  background: #fff;
  color: #3a2a14;
  border-color: #e5dfd4;
}
.wdp2-btn-ghost:hover {
  background: #faf7f1;
  border-color: #d4a660;
}

/* ── Steal Look modal ─────────────────────────────────────────────────── */
.wdp2-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(30, 20, 10, 0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.wdp2-modal {
  background: #fff;
  border-radius: 16px;
  width: min(600px, 92vw);
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.wdp2-modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid #efeae2;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.wdp2-modal-head h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: #2c1a0a;
}
.wdp2-modal-head button {
  border: none;
  background: transparent;
  font-size: 1.2rem;
  color: #8b7456;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 6px;
}
.wdp2-modal-head button:hover {
  background: #faf7f1;
}
.wdp2-modal-body {
  padding: 20px;
  overflow-y: auto;
}
.wdp2-steal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.wdp2-steal-item {
  border: 1px solid #efeae2;
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}
.wdp2-steal-item:hover {
  border-color: #d4a660;
  background: #fff5e1;
  transform: translateY(-2px);
}
.wdp2-steal-thumb {
  width: 80px;
  height: 120px;
  background: #faf7f1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.wdp2-steal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .wdp2-char-header { grid-template-columns: 1fr; }
  .wdp2-builder { grid-template-columns: 1fr; }
  .wdp2-stage-wrap { padding: 16px; }
  .wdp2-stage { max-width: 240px; }
}
@media (max-width: 768px) {
  .wdp2-shell { grid-template-columns: 1fr; }
  .wdp2-sidebar { max-height: 200px; }
  .wdp2-costs-summary { grid-template-columns: repeat(2, 1fr); }
  .wdp2-warn { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .wdp2-main {
    overflow: visible;
  }

  .wdp2-main-head {
    position: relative;
    z-index: 1;
    padding: 10px 12px;
    gap: 8px;
  }

  .wdp2-topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .wdp2-tabs {
    gap: 2px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .wdp2-tab {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 10px;
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .wdp2-char-header {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-top: 0;
  }

  .wdp2-char-title > span {
    font-size: 1rem;
  }

  .wdp2-char-title > small,
  .wdp2-char-note {
    display: none;
  }

  .wdp2-topbar-pills,
  .wdp2-action-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .wdp2-field-pill {
    min-width: 0;
    padding: 7px 8px;
  }

  .wdp2-char-header select,
  .wdp2-btn {
    min-height: 40px;
    width: 100%;
  }

  .wdp2-body {
    overflow-y: auto;
    min-height: 0;
  }

  .wdp2-builder {
    display: grid;
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }

  .wdp2-stage-wrap {
    min-height: 0;
    max-height: 390px;
    padding: 12px 12px 10px;
    border-right: 0;
    border-bottom: 1px solid #efeae2;
    overflow: hidden;
  }

  .wdp2-stage {
    width: 112px !important;
    height: 370px !important;
    max-width: 112px !important;
  }

  .wdp2-rail {
    overflow: visible;
    padding: 12px 12px 84px;
  }

  .wdp2-rail-head {
    position: sticky;
    top: 0;
    z-index: 3;
  }

  .wdp2-rail-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .wdp2-rail-item {
    min-height: 112px;
    padding: 10px 6px 8px;
  }

  .wdp2-rail-item img {
    width: 68px;
    height: 68px;
    max-height: 68px;
  }
}
