.wd-main { padding-top: 26px; padding-bottom: 60px; }

.wd-hero {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  padding: 28px; margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(91,94,245,.10), rgba(91,94,245,.025) 58%, transparent);
  border: 1px solid var(--border); border-radius: 12px;
}
.wd-hero-text { min-width: 0; max-width: 720px; }
.wd-eyebrow { margin: 0 0 8px !important; color: var(--primary) !important; font-size: 12px !important; font-weight: 700; }
.wd-hero h1 { margin: 0 0 9px; font-size: 34px; line-height: 1.25; letter-spacing: 0; }
.wd-hero h1 span::before { content: ' · '; }
.wd-hero p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.wd-stats { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 16px; }
.wd-stats span {
  display: inline-flex; align-items: baseline; gap: 5px; padding: 6px 10px;
  border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--muted); font-size: 12px;
}
.wd-stats strong { color: var(--text); font-size: 15px; }
.wd-hero-side { flex: 0 0 270px; display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.wd-hero-side p { font-size: 12px; line-height: 1.65; }
.wd-badge {
  display: inline-block; padding: 5px 11px; border-radius: 6px; font-size: 12px; font-weight: 700;
  background: var(--primary); color: var(--on-primary);
}

.wd-collections { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.wd-collection {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto;
  column-gap: 12px; align-items: center; min-height: 74px; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text);
  text-align: left; cursor: pointer; transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.wd-collection:hover { border-color: var(--primary); transform: translateY(-1px); }
.wd-collection.active { border-color: var(--primary); background: rgba(91,94,245,.07); box-shadow: inset 3px 0 0 var(--primary); }
.wd-collection:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.wd-collection-main { font-size: 16px; font-weight: 700; letter-spacing: 0; }
.wd-collection-sub { grid-column: 1; font-size: 12px; color: var(--muted); margin-top: 3px; }
.wd-collection strong { grid-column: 2; grid-row: 1 / span 2; font-size: 22px; color: var(--primary); font-variant-numeric: tabular-nums; }

.wd-external-link {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  gap: 6px 16px; margin-bottom: 18px; padding: 13px 46px 13px 16px; border: 1px solid var(--border);
  border-radius: 9px; background: linear-gradient(90deg, rgba(63,143,139,.08), transparent 62%);
  color: var(--text); text-decoration: none;
}
.wd-external-link:hover { border-color: #3f8f8b; }
.wd-external-link:focus-visible { outline: 2px solid #3f8f8b; outline-offset: 2px; }
.wd-external-kicker { grid-row: 1 / span 2; font-size: 11px; font-weight: 700; color: #3f8f8b; }
.wd-external-link strong { min-width: 0; font-size: 14px; }
.wd-external-link > span:not(.wd-external-kicker):not(.wd-external-arrow) { grid-column: 2; font-size: 12px; color: var(--muted); line-height: 1.5; }
.wd-external-arrow { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: #3f8f8b; font-size: 20px; }

.wd-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.wd-toolbar .chips { flex: 1 1 auto; min-width: 0; }
.wd-toolbar .search-box { width: 320px; max-width: 100%; }
.wd-chip-count { margin-left: 5px; opacity: .58; font-size: 11px; }

.wd-count { font-size: 13px; color: var(--muted); margin: 0 0 12px; }

.wd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 16px; }
.wd-card {
  display: block; padding: 0; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); overflow: hidden; cursor: zoom-in; text-align: left;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.wd-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(20,30,60,.12); border-color: var(--primary); }
.wd-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.wd-thumb-wrap { position: relative; display: block; }
.wd-thumb { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; background: var(--surface-2); }
.wd-thumb-pose { aspect-ratio: 4 / 5; object-fit: contain; background: #f4f6fa; }
.wd-ai-badge {
  position: absolute; top: 8px; left: 8px; padding: 4px 7px; border-radius: 5px;
  background: rgba(15,18,28,.78); color: #fff; font-size: 10px; font-weight: 700;
  backdrop-filter: blur(5px); pointer-events: none;
}
.wd-card-meta { display: block; padding: 9px 11px 11px; }
.wd-card-cat { display: block; font-size: 11px; color: var(--primary); font-weight: 700; letter-spacing: 0; }
.wd-card-tags {
  display: -webkit-box; margin-top: 4px; font-size: 12px; color: var(--muted); line-height: 1.45;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.wd-empty { padding: 40px 0; text-align: center; color: var(--muted); }
.wd-note { margin: 28px 0 0; padding-top: 18px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); line-height: 1.8; }
.wd-note a { color: var(--primary); text-decoration: none; }
.wd-note a:hover { text-decoration: underline; }

.wd-modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 24px; }
.wd-modal[hidden], .wd-side [hidden] { display: none !important; }
.wd-mask { position: absolute; inset: 0; background: rgba(8,12,22,.62); backdrop-filter: blur(3px); }
.wd-panel {
  position: relative; z-index: 1; width: min(1080px, 100%); max-height: 90vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,.34);
}
.wd-close {
  position: absolute; top: 10px; right: 12px; z-index: 2; width: 38px; height: 38px;
  border: 0; border-radius: 50%; background: rgba(0,0,0,.42); color: #fff;
  font-size: 24px; line-height: 1; cursor: pointer;
}
.wd-close:hover { background: rgba(0,0,0,.62); }
.wd-close:focus { outline: none; }
.wd-close:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.wd-panel-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); }

.wd-figure { position: relative; min-height: 520px; background: var(--surface-2); display: flex; flex-direction: column; }
.wd-figure img { width: 100%; height: 100%; max-height: 82vh; object-fit: contain; display: block; }
.wd-figure-label {
  position: absolute; top: 12px; left: 12px; z-index: 1; padding: 5px 8px; border-radius: 5px;
  background: rgba(8,12,22,.72); color: #fff; font-size: 11px; font-weight: 700; backdrop-filter: blur(5px);
}
.wd-nav {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  display: flex; align-items: center; justify-content: space-between; pointer-events: none;
}
.wd-nav button {
  pointer-events: auto; width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.45); color: #fff; font-size: 24px; line-height: 1; cursor: pointer;
}
.wd-nav button:hover { background: rgba(0,0,0,.68); }
.wd-nav span { pointer-events: auto; padding: 6px 10px; border-radius: 999px; background: rgba(0,0,0,.45); color: #fff; font-size: 12px; }

.wd-side { padding: 24px; display: flex; flex-direction: column; gap: 13px; }
.wd-side-cat { font-size: 15px; font-weight: 700; color: var(--primary); line-height: 1.4; }
.wd-description { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.wd-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.wd-tag { padding: 4px 9px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; color: var(--text); }
.wd-tag-muted { opacity: .68; }

.wd-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 12px; border-radius: 7px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 13px; text-decoration: none; cursor: pointer;
}
.wd-btn:hover { border-color: var(--primary); color: var(--primary); }
.wd-btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.wd-btn-primary:hover { color: var(--on-primary); filter: brightness(1.06); }
.wd-actions .wd-btn-primary { grid-column: 1 / -1; }
.wd-disclaimer { margin: 0; padding: 10px 11px; border-radius: 7px; background: var(--surface-2); color: var(--muted); font-size: 11px; line-height: 1.65; }

.wd-tryon { margin-top: 2px; padding-top: 15px; border-top: 1px dashed var(--border); }
.wd-tryon h3 { margin: 0 0 6px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.wd-tag-exp { font-size: 10px; font-weight: 500; padding: 2px 7px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.wd-tryon p { margin: 0 0 10px; font-size: 12px; color: var(--muted); line-height: 1.65; }
.wd-input {
  width: 100%; box-sizing: border-box; margin-bottom: 8px; padding: 9px 11px;
  border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--text); font-size: 13px;
}
.wd-input:focus { outline: none; border-color: var(--primary); }
.wd-upload {
  display: block; margin-bottom: 8px; padding: 9px 11px; text-align: center; cursor: pointer;
  border: 1px dashed var(--border); border-radius: 7px; font-size: 13px; color: var(--muted);
}
.wd-upload:hover { border-color: var(--primary); color: var(--primary); }
.wd-run { width: 100%; }
.wd-status { margin-top: 8px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.wd-status.err { color: #d9534f; }
.wd-result { margin-top: 10px; width: 100%; border-radius: 8px; border: 1px solid var(--border); }

@media (max-width: 900px) {
  .wd-hero { align-items: flex-start; }
  .wd-hero-side { flex-basis: 230px; }
  .wd-collections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wd-panel-body { grid-template-columns: 1fr; }
  .wd-figure { min-height: 0; }
  .wd-figure img { max-height: 58vh; }
}
@media (max-width: 640px) {
  .wd-main { padding-top: 18px; }
  .wd-hero { flex-direction: column; gap: 16px; padding: 20px; }
  .wd-hero h1 { font-size: 26px; }
  .wd-hero h1 span { display: block; }
  .wd-hero h1 span::before { content: ''; }
  .wd-hero-side { flex-basis: auto; }
  .wd-collections { grid-template-columns: 1fr; }
  .wd-collection { min-height: 66px; }
  .wd-external-link { grid-template-columns: 1fr; padding: 14px 40px 14px 14px; }
  .wd-external-kicker { grid-row: auto; }
  .wd-external-link > span:not(.wd-external-kicker):not(.wd-external-arrow) { grid-column: 1; }
  .wd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .wd-toolbar .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .wd-toolbar .chips::-webkit-scrollbar { display: none; }
  .wd-toolbar .chips .chip { flex: 0 0 auto; }
  .wd-card-meta { padding: 7px 8px 9px; }
  .wd-card-tags { font-size: 11px; }
  .wd-modal { padding: 0; }
  .wd-panel { max-height: 100vh; height: 100%; border-radius: 0; }
  .wd-side { padding: 18px; }
  .wd-toolbar .search-box { width: 100%; }
}
