/* A fitted dressing room: warm wood, quiet blue controls, six visible garments. */
.dress-game {
  --dress-wood-light: #f8dfb6;
  --dress-wood-mid: #ddb47e;
  --dress-wood-edge: #b88751;
}
.dress-game .dress-wardrobe {
  position: relative;
  padding: 12px;
  border: 6px solid var(--dress-wood-mid);
  border-radius: 24px;
  background:
    linear-gradient(90deg, #b8875124, transparent 8%, transparent 92%, #b8875120),
    linear-gradient(155deg, #fff7e8, #f0dfc8);
  box-shadow:
    inset 0 2px 5px #8a593a29,
    inset 0 0 0 1px #b8875180,
    0 2px 0 #b98a59,
    0 5px 10px #46668c12;
}
.dress-game .dress-groups {
  gap: 6px;
  padding: 0 0 8px;
  margin: 0;
}
.dress-game .dress-groups button {
  min-width: 0;
  min-height: 44px;
  padding: 5px 7px;
  justify-content: center;
  gap: 5px;
  border: 1px solid #c0d1e6;
  border-bottom: 3px solid #adc4e0;
  border-radius: 12px;
  color: #355d8a;
  background: linear-gradient(145deg, #fff, #eaf2fc);
  box-shadow: inset 0 1px 0 #fff, 0 2px 3px #4e668b10;
}
.dress-game .dress-groups button[aria-pressed="true"] {
  border-color: #2d609f;
  border-bottom-color: #214c81;
  color: #fff;
  background: linear-gradient(145deg, #4c86cc, #3268ad);
  box-shadow: inset 0 1px 0 #ffffff66, 0 2px 4px #244e7d1a;
}
.dress-game .dress-groups button span {
  font-size: 12px;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: anywhere;
}
.dress-game .dress-group-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}
.dress-game .dress-items {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  align-content: stretch;
  gap: 8px;
  padding: 7px 4px 9px;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background:
    linear-gradient(180deg, transparent calc(50% - 4px), #fff3dc calc(50% - 4px), #c69c6c 50%, #b58352 calc(50% + 2px), transparent calc(50% + 4px));
  box-shadow: none;
}
.dress-game .dress-item {
  min-width: 0;
  min-height: 44px;
  padding: 7px 5px 6px;
  gap: 3px;
  border: 1px solid #c1d4e9;
  border-bottom: 3px solid #aec5df;
  border-radius: 16px;
  background: linear-gradient(150deg, #fff 15%, #f4f8fe);
  box-shadow: inset 0 1px 0 #fff, 0 3px 5px #8d674720;
  overflow: hidden;
}
.dress-game .dress-item-art {
  display: block;
  width: 100%;
  min-height: 0;
  flex: 1 1 0;
  height: auto;
  filter: drop-shadow(0 3px 2px #314d711a);
}
.dress-game .dress-item-art svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.dress-game .dress-item > span:not(.dress-item-art):not(.dress-item-check) {
  flex: 0 0 auto;
  max-width: 100%;
  color: #345a86;
  font-size: 12px;
  line-height: 1.15;
  font-weight: 750;
  text-align: center;
  overflow-wrap: anywhere;
}
.dress-game .dress-item.is-worn {
  border-color: #8eafd8;
  border-bottom-color: #648cbd;
  background: linear-gradient(150deg, #fff, #eaf3ff);
}
.dress-game .dress-item.is-selected {
  border-color: #2f70bd;
  border-bottom-color: #245897;
  background: linear-gradient(150deg, #f7fbff, #deedff);
  box-shadow: inset 0 0 0 2px #5c9ae1, 0 3px 6px #345a8626;
}
.dress-game .dress-item .dress-item-check {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid #84a6cf;
  border-radius: 50%;
  color: #fff;
  background: #356cac;
  box-shadow: inset 0 1px 0 #ffffff60, 0 1px 3px #31517025;
  font-size: 15px;
  line-height: 1;
}
.dress-game .dress-tray-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 0 0 44px;
  min-height: 44px;
  height: 44px;
  margin: 0;
}
.dress-game .dress-tray-controls button {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
  border: 1px solid #b7cce5;
  border-bottom: 3px solid #9bb7d8;
  border-radius: 13px;
  color: #3566a8;
  background: linear-gradient(145deg, #fff, #e8f1fc);
  box-shadow: inset 0 1px 0 #fff, 0 2px 4px #8b68401a;
}
.dress-game .dress-tray-controls button:last-child { flex: 0 0 44px; }
.dress-game .dress-tray-controls button svg { width: 27px; height: 27px; }
.dress-game .dress-tray-controls button:disabled { opacity: .35; box-shadow: none; }
.dress-game .dress-page-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 36px;
  min-height: 22px;
}
.dress-game .dress-page-dots > * {
  display: block;
  width: 7px;
  height: 7px;
  border: 1px solid #7f9abd;
  border-radius: 50%;
  background: #fffaf0;
}
.dress-game .dress-page-dots > .is-current,
.dress-game .dress-page-dots > [aria-current="true"],
.dress-game .dress-page-dots > [data-active="true"] {
  border-color: #3566a8;
  background: #3566a8;
}
.dress-game .dress-doll-panel {
  background: radial-gradient(ellipse at 50% 38%, #fff 15%, #f2f7ff 75%);
  border-color: #c5d8ee;
}
.dress-game .dress-stage { background: transparent; }
.dress-game .dress-person { filter: drop-shadow(0 5px 3px #3a587c14); }
.dress-game .dress-gender button {
  min-height: 44px;
  padding: 5px 10px;
}
.dress-game .dress-target {
  border: 2px dashed #337bc7;
  background: #c9e3ff40;
  box-shadow: 0 0 0 3px #ffffffa8, inset 0 0 0 1px #ffffff80;
}
.dress-game .dress-target.is-over {
  border-style: solid;
  background: #b6d8ff65;
  box-shadow: 0 0 0 4px #5698dd3d, inset 0 0 0 2px #fff;
}

/* These dimensions use the rotated game's landscape canvas, including Safari. */
.game-immersive .dress-game .dress-workspace {
  left: 12px;
  top: max(10px, var(--safe-top));
  bottom: 30px;
  grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
  gap: 12px;
}
.game-immersive .dress-game .dress-doll-panel {
  padding: 0;
  background: radial-gradient(ellipse at 50% 48%, #fff 20%, #eef5ff00 72%);
  border: 0;
}
.game-immersive .dress-game .dress-gender {
  width: calc(100% - 64px) !important;
  max-width: 212px;
  left: 64px;
  right: 0;
  top: 0;
  min-height: 48px;
  border-radius: 15px;
}
.game-immersive .dress-game .dress-gender button {
  min-height: 44px;
  padding: 4px 6px;
  font-size: 12px;
  border-radius: 11px;
}
.game-immersive .dress-game .dress-stage {
  height: calc(100% - 53px);
  margin-top: 53px;
}
.game-immersive .dress-game .dress-wardrobe {
  padding: 8px;
  border: 6px solid var(--dress-wood-mid);
  border-radius: 24px;
  gap: 6px;
  background:
    linear-gradient(90deg, #b8875124, transparent 8%, transparent 92%, #b8875120),
    linear-gradient(155deg, #fff7e8, #f0dfc8);
}
.game-immersive .dress-game .dress-groups {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  padding: 0;
  margin: 0;
}
.game-immersive .dress-game .dress-groups button {
  min-height: 44px;
  padding: 4px !important;
  gap: 4px;
  font-size: 11px !important;
}
.game-immersive .dress-game .dress-groups button span { font-size: 11px; }
.game-immersive .dress-game .dress-groups svg {
  width: 19px;
  height: 19px;
  flex-basis: 19px;
}
.game-immersive .dress-game .dress-items {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: 7px;
  padding: 5px 2px 7px;
  overflow: hidden;
}
.game-immersive .dress-game .dress-item {
  padding: 5px 3px !important;
  min-height: 44px !important;
  gap: 3px;
  border-radius: 14px;
}
.game-immersive .dress-game .dress-item-art {
  flex: 1 1 0;
  min-height: 0;
  height: auto !important;
}
.game-immersive .dress-game .dress-item > span:not(.dress-item-art):not(.dress-item-check) {
  font-size: 11px;
  line-height: 1.15;
}
.game-immersive .dress-game .dress-tray-controls {
  height: 44px;
  min-height: 44px;
  margin: 0;
  gap: 10px;
}
.game-immersive .dress-game .dress-tray-controls button {
  height: 44px;
  min-height: 44px;
  min-width: 44px;
  padding: 8px;
}
.game-immersive .dress-game .dress-message {
  left: 12px;
  right: var(--game-action-gutter);
  bottom: 4px;
  font-size: 11px;
  line-height: 1.2;
  color: #49688b;
}

/* A compact canvas still presents the whole six-piece tray and large arrows. */
.game-compact.game-immersive .dress-game .dress-workspace { gap: 8px; bottom: 26px; }
.game-compact.game-immersive .dress-game .dress-wardrobe {
  padding: 5px;
  border-width: 4px;
  border-radius: 19px;
  gap: 4px;
}
.game-compact.game-immersive .dress-game .dress-groups { gap: 4px; }
.game-compact.game-immersive .dress-game .dress-groups button {
  flex-direction: column;
  min-height: 44px;
  gap: 1px;
  padding: 2px !important;
}
.game-compact.game-immersive .dress-game .dress-groups button span {
  font-size: 9px;
  line-height: 1;
}
.game-compact.game-immersive .dress-game .dress-groups svg {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}
.game-compact.game-immersive .dress-game .dress-items { gap: 5px; padding: 3px 1px 5px; }
.game-compact.game-immersive .dress-game .dress-item { padding: 3px 2px !important; gap: 2px; border-radius: 11px; }
.game-compact.game-immersive .dress-game .dress-item > span:not(.dress-item-art):not(.dress-item-check) {
  font-size: 9px;
  line-height: 1.08;
}
.game-compact.game-immersive .dress-game .dress-item .dress-item-check {
  width: 18px;
  height: 18px;
  top: 2px;
  right: 2px;
  font-size: 12px;
}
.game-compact.game-immersive .dress-game .dress-gender button { font-size: 11px; }

.high-contrast .dress-game .dress-wardrobe {
  border-color: var(--line);
  background: var(--paper);
  box-shadow: none;
}
.high-contrast .dress-game .dress-items { background: none; }
.high-contrast .dress-game .dress-item,
.high-contrast .dress-game .dress-groups button,
.high-contrast .dress-game .dress-tray-controls button {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: none;
}
.high-contrast .dress-game .dress-item.is-selected,
.high-contrast .dress-game .dress-groups button[aria-pressed="true"] {
  outline: 2px solid var(--primary);
  outline-offset: -4px;
}
.high-contrast .dress-game .dress-groups button[aria-pressed="true"] {
  color: #fff;
  background: var(--primary);
}
@media (prefers-reduced-motion: reduce) {
  .dress-game .dress-item,
  .dress-game .dress-worn-piece,
  .dress-game .dress-target { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  .dress-game .dress-wardrobe,
  .dress-game .dress-item,
  .dress-game .dress-groups button,
  .dress-game .dress-tray-controls button { border-color: ButtonText; box-shadow: none; }
  .dress-game .dress-item.is-selected { outline: 3px solid Highlight; }
}

/* Registered worn sections stay seated while feedback is shown. */
.dress-fit-v4 .dress-worn-piece.is-settling { animation: none; }
