.pyscasso-wp-root {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 340px;
  max-height: 76vh;
  background: #0c0e13;
  border-radius: 12px;
  overflow: hidden;
  margin: 1.25em 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #f3f4f6;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
}

.pyscasso-wp-root:fullscreen {
  max-height: none;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  margin: 0;
}

.pyscasso-wp-root * {
  box-sizing: border-box;
}

.pyscasso-wp-root .ps-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

.pyscasso-wp-root .ps-canvas.ps-drag {
  cursor: grabbing;
}

.pyscasso-wp-root .ps-hs-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 4;
}

.pyscasso-wp-root .ps-hs {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(14, 16, 22, 0.88);
  border: 1.5px solid #e5a84b;
  color: #fff;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.pyscasso-wp-root .ps-hs::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e5a84b;
}

.pyscasso-wp-root .ps-hs:hover {
  background: #e5a84b;
  color: #111;
}

.pyscasso-wp-root .ps-top {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 8;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
}

.pyscasso-wp-root .ps-title-box {
  pointer-events: auto;
  background: rgba(14, 16, 22, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 10px;
  padding: 7px 11px;
  max-width: 62%;
}

.pyscasso-wp-root .ps-title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}

.pyscasso-wp-root .ps-sub {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.3;
  color: rgba(243, 244, 246, 0.78);
}

.pyscasso-wp-root .ps-ctrls {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.pyscasso-wp-root .ps-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(14, 16, 22, 0.76);
  color: #f3f4f6;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 5px 9px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  margin: 0;
}

.pyscasso-wp-root .ps-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.pyscasso-wp-root .ps-btn.ps-on {
  background: #e5a84b;
  border-color: #e5a84b;
  color: #111;
}

.pyscasso-wp-root .ps-bot {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  z-index: 8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.pyscasso-wp-root .ps-pill {
  background: rgba(14, 16, 22, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  color: rgba(243, 244, 246, 0.85);
  line-height: 1.2;
}

.pyscasso-wp-root .ps-tel {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.pyscasso-wp-root .ps-status {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  font-size: 13px;
  color: #e5e7eb;
  pointer-events: none;
}

.pyscasso-wp-root .ps-status.ps-err {
  color: #fca5a5;
  background: rgba(30, 10, 14, 0.72);
}

.pyscasso-wp-root .ps-modal {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(6, 8, 12, 0.82);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.pyscasso-wp-root .ps-hidden {
  display: none !important;
}

.pyscasso-wp-root .ps-modal-card {
  background: #141822;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  max-width: min(520px, 94%);
  max-height: 90%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: #eef1f6;
}

.pyscasso-wp-root .ps-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
}

.pyscasso-wp-root .ps-modal-body {
  padding: 12px 14px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.5;
}

.pyscasso-wp-root .ps-modal-body img {
  display: block;
  max-width: 100%;
  max-height: 55vh;
  margin: 0 auto;
  border-radius: 6px;
}

.pyscasso-wp-root .ps-x {
  background: transparent;
  border: none;
  color: #ccc;
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

@media (max-width: 600px) {
  .pyscasso-wp-root {
    aspect-ratio: 4 / 3;
    min-height: 290px;
  }
  .pyscasso-wp-root .ps-hint {
    display: none;
  }
}
