#club.wardrobe-open .club-card {
  width: min(940px, 100%);
  padding: 20px 24px 12px;
}
.wardrobe-open .club-top h2 { font-weight: normal; letter-spacing: -.035em; font-size: 34px; }
.wardrobe-open .club-tabs { margin: 12px 0 16px; }
.wardrobe-open .club-status { min-height: 0; margin: 0; }
.wardrobe-open .club-status:not(:empty) { margin-top: 7px; }
.wd-form { --wd-ink: var(--village-ink); --wd-line: var(--village-edge); --wd-muted: var(--village-muted); color: var(--wd-ink); }
.wd-layout { display: grid; grid-template-columns: minmax(0, .74fr) minmax(0, 1fr); gap: 20px; }
.wd-stage {
  position: relative; overflow: hidden; isolation: isolate; min-height: 260px;
  background: var(--village-mint); border: 1px solid #bdc8b7; border-radius: 48% 48% 15px 15px / 17% 17% 15px 15px;
}
.wd-backdrop, .wd-backdrop svg, #avatar-preview { position: absolute; inset: 0; width: 100%; height: 100%; }
.wd-backdrop svg { display: block; opacity: .84; }
.wd-stage::before {
  content: ""; position: absolute; z-index: 1; pointer-events: none; inset: 0;
  background: radial-gradient(ellipse at 40% 24%, #fff8df55, transparent 62%), linear-gradient(to top, #40553a20, transparent 27%);
}
.wd-arch {
  position: absolute; inset: 8px; z-index: 1; pointer-events: none;
  border: 1px solid #fffcdfc9; border-radius: 47% 47% 9px 9px / 16% 16% 9px 9px;
}
#avatar-preview { z-index: 2; bottom: 42px; height: auto; outline-offset: -5px; }
#avatar-preview > svg { display: block; width: 100%; height: 86%; margin: 5% auto 0; }
.wd-rotation {
  position: absolute; z-index: 3; bottom: 12px; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 3px;
  background: #fffaf0f0; border: 1px solid #acae95; border-radius: 100px;
  box-shadow: 0 2px 6px #30402b19; color: #35523d; white-space: nowrap;
}
.wd-rotation span { font-size: 13px; font-weight: 650; }
.wd-rotation button {
  display: grid; place-items: center; width: 38px; height: 36px; border: 0; border-radius: 50%; background: transparent;
}
.wd-rotation svg { width: 19px; height: 19px; }
.wd-rotation [data-turn="45"] svg { transform: scaleX(-1); }
.wd-rotation button:hover:enabled { background: #e8ebd9; }
.wd-catalog { display: flex; flex-direction: column; min-width: 0; }
.wd-categories { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; padding-bottom: 12px; border-bottom: 1px solid var(--wd-line); }
.wd-categories button {
  display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 0; min-height: 37px;
  padding: 6px 4px; background: #f0eee3; border: 1px solid #d5d3c1; border-radius: 8px;
  color: #4a604b; font-size: 14px; font-weight: 650;
}
.wd-categories button svg { width: 20px; height: 20px; flex: none; }
.wd-categories button[aria-pressed=true] { border-color: #315b44; background: #305740; color: #fff9e6; }
.wd-categories button:hover:enabled:not([aria-pressed=true]) { background: #e5e9d8; }
.wd-shelf { display: flex; flex-direction: column; min-height: 0; }
.wd-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 1px 9px; }
.wd-heading h3 { margin: 0; font: normal 26px/1.1 Georgia,serif; letter-spacing: -.035em; }
.wd-wallet {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 4px; border-radius: 20px;
  border: 1px solid #ddc797; background: var(--village-gold-paper); color: #67522d; font-size: 13px; font-weight: 700;
}
.wd-coin { display: inline-block; flex: none; width: 18px; height: 18px; vertical-align: middle; }
#wardrobe-items {
  display: grid; align-content: start; grid-template-columns: repeat(3,minmax(0,1fr)); grid-auto-rows: max-content; gap: 7px;
  height: clamp(185px, 36dvh, 302px); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin;
  scrollbar-color: #9ba78d transparent; padding: 3px; margin: -3px;
}
.wd-item {
  position: relative; min-width: 0; overflow: hidden; display: flex; flex-direction: column; align-items: stretch;
  padding: 0; border: 1px solid var(--village-edge); border-radius: 11px; background: var(--village-snow); text-align: left;
}
.wd-item:hover:enabled { border-color: #93a186; }
.wd-item[aria-pressed=true] { border-color: var(--village-spruce); box-shadow: inset 0 0 0 1px var(--village-spruce); }
.wd-item[aria-pressed=true] .wd-art { background-color: var(--village-mint); }
.wd-art {
  display: grid; place-items: center; height: clamp(48px, 9.5dvh, 83px); margin: 2px 2px 0; border-radius: 8px 8px 2px 2px;
  background: radial-gradient(ellipse at center, #fffdfa 1%, transparent 75%), var(--village-mist);
}
.wd-art svg { width: min(100%, 88px); height: 94%; }
.wd-marker {
  position: absolute; right: 6px; top: 6px; display: grid; place-items: center; width: 18px; height: 18px;
  border-radius: 50%; color: #826536; background: #fff8e4ed;
}
.wd-marker:empty { display: none; }
.wd-marker svg { width: 13px; height: 13px; stroke-width: 2.2; }
.wd-item[aria-pressed=true] .wd-marker { background: var(--village-spruce); color: #fff9e5; }
.wd-caption { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 43px; padding: 5px 8px 6px; }
.wd-item-name { font-size: 14px; font-weight: 650; line-height: 1.15; overflow-wrap: anywhere; }
.wd-caption small { display: flex; align-items: center; gap: 4px; font-weight: 650; font-size: 12px; line-height: 1.05; color: #725d31; }
.wd-caption small:empty { display: none; }
.wd-caption .wd-coin { width: 14px; height: 14px; }
.wd-try {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px;
  padding: 7px 9px; border: 1px solid #dec99c; background: var(--village-gold-paper); border-radius: 9px;
}
.wd-try[hidden] { display: none; }
.wd-try-copy { display: flex; flex: 1; flex-direction: column; gap: 2px; }
.wd-try .wd-undo { min-height: 35px; padding: 3px; border: 0; background: transparent; color: #665735; text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }
.wd-try-copy strong { font-size: 14px; line-height: 1.2; }
.wd-try-copy small { font-size: 13px; color: #685838; line-height: 1.15; }
#wardrobe-unlock {
  display: inline-flex; align-items: center; justify-content: center; flex: none; gap: 4px; min-height: 35px;
  padding: 6px 10px; border-radius: 20px; border: 1px solid #997a38; background: #ffe6a4; color: #584423; font-size: 14px; font-weight: 700;
}
#wardrobe-unlock:disabled { background: #f2e6c8; border-color: #cabb94; color: #75684e; }
.wd-footer {
  display: flex; gap: 10px; align-items: center; padding-top: 13px; margin-top: 13px; border-top: 1px solid var(--wd-line);
}
.wd-footer label { font-size: 14px; font-weight: 650; }
.wd-footer input {
  width: 180px; min-width: 0; height: 38px; padding: 5px 10px; border: 1px solid #bbc5ae;
  border-radius: 8px; color: var(--wd-ink); background: var(--village-snow); font: inherit; font-size: 16px;
}
.wd-footer .club-primary { margin: 0 0 0 auto; padding: 9px 17px; font-weight: 650; }

@media(max-width: 650px) {
  #club.wardrobe-open { padding: 5px; }
  #club.wardrobe-open .club-card { display: flex; flex-direction: column; max-height: calc(100dvh - 10px); padding: 12px 10px 10px; border-radius: 15px; }
  .wardrobe-open .club-top { flex: none; }
  .wardrobe-open .club-top h2 { font-size: 27px; }
  .wardrobe-open .club-close { width: 34px; height: 34px; }
  .wardrobe-open .club-tabs { flex: none; display: flex; gap: 4px; margin: 8px 0 10px; }
  .wardrobe-open .club-tabs button { flex: auto; min-height: 34px; padding: 4px; white-space: normal; font-size: 13px; }
  .wd-layout { grid-template-columns: 1fr; gap: 9px; }
  .wd-stage { min-height: 0; height: clamp(130px, 26dvh, 230px); border-radius: 36px 36px 11px 11px; }
  .wd-arch { inset: 5px; border-radius: 32px 32px 6px 6px; }
  #avatar-preview { bottom: 0; }
  .wd-rotation { left: auto; bottom: 8px; right: 9px; transform: none; gap: 0; padding: 0; flex-wrap: wrap; width: 74px; justify-content: center; border-radius: 12px; }
  .wd-rotation span { order: -1; flex: 1 0 100%; padding: 4px 3px 0; font-size: 11px; text-align: center; }
  .wd-rotation button { width: 34px; height: 32px; }
  .wd-categories { gap: 4px; padding-bottom: 0; border: none; }
  .wd-categories button { min-height: 33px; font-size: 13px; gap: 5px; }
  .wd-categories button svg { width: 17px; height: 17px; }
  .wd-heading { padding: 8px 0 6px; }
  .wd-heading h3 { font-size: 23px; }
  .wd-art { height: clamp(37px,7.8dvh,65px); }
  #wardrobe-items { height: clamp(99px, calc(67dvh - 268px), 250px); gap: 5px; }
  .wd-item-name { font-size: 13px; }
  .wd-caption { min-height: 35px; padding: 3px 6px 4px; }
  .wd-footer { flex-wrap: wrap; gap: 5px 8px; margin-top: 9px; padding-top: 8px; }
  .wd-footer label { font-size: 13px; }
  .wd-footer input { flex: 1; width: 60px; }
  .wd-footer .club-primary { min-height: 38px; padding: 6px 12px; font-size: 14px; }
}
@media(min-width: 651px) and (max-height: 650px) {
  #club.wardrobe-open .club-card { padding: 10px 18px; max-height: calc(100dvh - 12px); }
  .wardrobe-open .club-tabs { margin: 6px 0 8px; }
  .wd-categories button { min-height: 29px; padding: 3px; }
  #wardrobe-items { height: clamp(95px, calc(100dvh - 320px), 192px); }
  .wd-stage { min-height: 200px; }
  .wd-try { margin-top: 5px; }
  .wd-footer { margin-top: 8px; padding-top: 8px; }
}
@media(max-width: 650px) and (max-height: 700px) {
  #club.wardrobe-open .club-card { padding: 8px; }
  .wardrobe-open .club-top h2 { font-size: 24px; }
  .wardrobe-open .club-tabs { margin: 4px 0 6px; }
  .wardrobe-open .club-tabs button { font-size: 12px; }
  .wd-stage { height: clamp(100px, 21dvh, 145px); }
  .wd-layout { gap: 6px; }
  .wd-categories button { min-height: 30px; padding: 3px; }
  .wd-heading { padding: 5px 0; }
  #wardrobe-items {
    grid-auto-flow: column; grid-auto-columns: max(86px, 29%); grid-template-columns: none;
    grid-template-rows: max-content; height: auto; overflow-x: auto; overflow-y: hidden;
  }
  .wd-art { height: 40px; }
  .wd-caption { min-height: 38px; }
  .wd-try { margin-top: 5px; padding: 5px; gap: 5px; }
}
@media(max-width: 350px) {
  .wd-categories button svg { display: none; }
  .wd-footer label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .wd-try { display: grid; grid-template-columns: 1fr auto; gap: 2px 6px; }
  .wd-try-copy { grid-row: span 2; }
  .wd-try .wd-undo { justify-self: end; min-height: 24px; }
  #wardrobe-unlock { min-height: 30px; padding-block: 4px; }
}
