/* zsgr.org — /gaming/wdoin interactive skin. Theme lives in core.css. */

.wd { display: flex; flex-direction: column; gap: 0; padding: 0; }
.wd > * + * { margin-top: 0; }

.wd-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 14px clamp(14px, 2.4vw, 22px);
  border-bottom: 1px solid var(--line-2);
}
.wd-seg, .wd-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.wd-anims {
  padding: 10px clamp(14px, 2.4vw, 22px);
  border-bottom: 1px solid var(--line);
}
.wd-anims[hidden] { display: none; }

.wd-btn {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  background: #000;
  color: var(--dim);
  font: 600 11px var(--f-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.wd-btn:hover { color: var(--ink); border-color: var(--v); }
.wd-btn[aria-pressed="true"] { background: var(--v); border-color: var(--v); color: #000; box-shadow: 0 0 18px var(--v-glow); }
.wd-btn:focus-visible { outline: 2px solid var(--v-hi); outline-offset: 2px; }
.wd-icon { width: 36px; padding: 0; font-size: 16px; }

.wd-stage {
  position: relative;
  height: clamp(420px, 72vh, 760px);
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  background:
    radial-gradient(closest-side at 50% 46%, rgba(154, 77, 255, 0.22), transparent 80%),
    radial-gradient(ellipse 60% 12% at 50% 90%, rgba(154, 77, 255, 0.18), transparent 100%);
}
.wd-flat {
  height: 70%;
  width: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.7));
  transition: opacity 0.5s;
}
.wd-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  cursor: grab;
  transition: opacity 0.6s;
}
.wd-stage.is-3d .wd-canvas { opacity: 1; pointer-events: auto; }
.wd-stage.is-3d .wd-flat { opacity: 0; }
.wd-stage.is-over-part .wd-canvas { cursor: pointer; }
.wd-stage[data-mode="ragdoll"].is-over-part .wd-canvas { cursor: grab; }
.wd-stage.is-grabbing .wd-canvas, .wd-canvas:active { cursor: grabbing; }

.wd-nogl { display: none; position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; font-size: 11px; }
.wd-stage.is-nogl .wd-nogl { display: block; }

.wd-stage::after {
  content: attr(data-mode);
  position: absolute;
  top: 12px; left: 14px;
  padding: 4px 8px;
  border: 1px solid var(--line-2);
  font: 500 10px var(--f-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  pointer-events: none;
}
.wd-stage[data-mode="locked"]::after { content: "Locked"; }
.wd-stage[data-mode="pose"]::after { content: "Unlocked"; color: var(--v-hi); border-color: var(--v-lo); }
.wd-stage[data-mode="ragdoll"]::after { content: "Ragdoll"; color: #000; background: var(--v); border-color: var(--v); }

.wd-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding: 14px clamp(14px, 2.4vw, 22px);
  border-top: 1px solid var(--line-2);
}
.wd-hint { margin: 0; font-size: 11.5px; letter-spacing: 0.06em; color: var(--v-hi); min-height: 1.4em; }
.wd-keys { margin: 0; font-size: 10.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.wd-keys kbd {
  display: inline-grid;
  place-items: center;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  border: 1px solid var(--line-2);
  font: 600 10px var(--f-mono);
  color: var(--dim);
}
.wd-keys kbd:not(:first-child) { margin-left: 8px; }
@media (hover: none) { .wd-keys { display: none; } }
@media (max-width: 600px) {
  .wd-bar { flex-direction: column; align-items: stretch; }
  .wd-seg .wd-btn { flex: 1; }
  .wd-stage { height: clamp(380px, 62vh, 560px); }
}
