.rps-plugin,
.rps-plugin *,
.rps-plugin *::before,
.rps-plugin *::after {
  box-sizing: border-box;
}

.rps-plugin {
  --rps-accent: #15ff00;
  --rps-height: 100vh;
  --rps-panel-width: 340px;
  --rps-ui-scale: 1;
  --rps-ui-width: 100vw;
  --rps-ui-height: var(--rps-height);
  position: relative !important;
  z-index: 1;
  inset: auto !important;
  left: auto !important;
  width: 100vw !important;
  max-width: 100vw !important;
  height: var(--rps-ui-height) !important;
  min-height: var(--rps-ui-height) !important;
  max-height: none !important;
  margin: 0 !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  isolation: isolate;
  transform: scale(var(--rps-ui-scale));
  transform-origin: 0 0;
  background: #0b1220;
  color: #e5eef7;
  font-family: "Inter", Arial, sans-serif;
}
.rps-help,
.rps-help-small,
.rps-title,
.rps-control,
.rps-shape-meta,
.rps-background-panel,
.rps-toolbar {
    font-family: inherit;
}

.rps-panel {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  width: var(--rps-panel-width);
  max-width: calc(100% - 44px);
  height: 100%;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: auto;
  scrollbar-gutter: stable;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));
  background: rgba(16, 24, 39, 0.94);
  border-right: 1px solid rgba(255,255,255,0.12);
  box-shadow: 10px 0 26px rgba(0,0,0,0.22);
  transition: transform .25s ease;
}

.rps-panel-toggle {
  position: absolute;
  z-index: 6;
  top: 50%;
  left: var(--rps-panel-width);
  transform: translateY(-50%);
  width: 28px;
  height: 54px;
  border: 0;
  border-radius: 0 10px 10px 0;
  color: #111827;
  background: rgba(255,255,255,0.96);
  box-shadow: 3px 0 12px rgba(0,0,0,.22);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: left .25s ease;
}

.rps-panel-hidden .rps-panel {
  transform: translateX(-100%);
}

.rps-panel-hidden .rps-panel-toggle {
  left: 0;
}

.rps-toggle-closed {
  display: none;
}

.rps-panel-hidden .rps-toggle-open {
  display: none;
}

.rps-panel-hidden .rps-toggle-closed {
  display: inline;
}

.rps-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 12px;
}

.rps-help {
  color: #9fb1c1;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 14px;
}

.rps-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.rps-shape-meta {
  color: #d8e3ec;
  font-size: 13px;
  margin-bottom: 12px;
}

.rps-control {
  display: grid;
  gap: 7px;
  margin: 14px 0;
  color: #e5eef7;
  font-size: 13px;
}

.rps-control input[type="range"],
.rps-control input[type="text"],
.rps-control select {
  width: 100%;
}

.rps-control select {
  min-height: 42px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 8px 10px;
  color: #e5eef7;
  background: rgba(0,0,0,0.28);
}

.rps-control input[type="text"] {
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 10px 12px;
  color: #e5eef7;
  background: rgba(0,0,0,0.28);
}

.rps-button {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  margin: 6px 0;
  color: #061014;
  background: var(--rps-accent);
  font-weight: 700;
  cursor: pointer;
}

.rps-button-small {
  margin: 0;
  padding: 10px 10px;
  font-size: 13px;
}

.rps-button-secondary {
  color: #e5eef7;
  background: rgba(255,255,255,0.12);
}

.rps-button:disabled {
  opacity: .6;
  cursor: not-allowed;
}


.rps-export-guide {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  color: #cbd5e1;
  background: rgba(255,255,255,0.06);
  font-size: 13px;
  line-height: 1.45;
}

.rps-export-guide strong {
  color: #f8fafc;
  font-size: 14px;
}

.rps-copy-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.rps-copy-actions .rps-button {
  margin: 0;
}

.rps-panel textarea {
  width: 100%;
  min-height: 190px;
  margin-top: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 10px;
  color: #e5eef7;
  background: rgba(0,0,0,0.28);
  font-family: Consolas, Monaco, monospace;
  font-size: 11px;
  resize: vertical;
}

.rps-stage-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  overscroll-behavior: auto;
  background: #0b1220;
}

.rps-background-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #0b1220;
}

.rps-background-pan {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.rps-background-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.rps-background-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform-origin: center center;
  will-change: transform;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.rps-stage-surface {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  transform-origin: 0 0;
  will-change: transform;
  background: linear-gradient(rgba(0,0,0,.08), rgba(0,0,0,.08)), #1c5f58;
  background-size: cover;
  background-position: center;
}

.rps-stage-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .45;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="900" height="620" viewBox="0 0 900 620"><rect width="900" height="620" fill="%231c5f58"/><g opacity="0.8"><rect x="50" y="60" width="150" height="90" rx="6" fill="%23082935"/><rect x="270" y="40" width="160" height="100" rx="6" fill="%23082935"/><rect x="540" y="80" width="170" height="110" rx="6" fill="%23082935"/><rect x="90" y="250" width="165" height="110" rx="6" fill="%23082935"/><rect x="350" y="250" width="180" height="115" rx="6" fill="%23082935"/><rect x="650" y="300" width="160" height="115" rx="6" fill="%23082935"/><path d="M0 190 C160 150 250 175 375 150 C500 125 620 160 900 120" fill="none" stroke="%2328241a" stroke-width="52"/><path d="M0 190 C160 150 250 175 375 150 C500 125 620 160 900 120" fill="none" stroke="white" stroke-width="3" stroke-dasharray="20 28"/><path d="M170 0 L170 620" fill="none" stroke="%2328241a" stroke-width="54"/><path d="M170 0 L170 620" fill="none" stroke="white" stroke-width="3" stroke-dasharray="20 28"/></g></svg>');
  background-size: cover;
  background-position: center;
  pointer-events: none;
}

.rps-zoom-controls {
  position: absolute;
  z-index: 7;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 11px;
  background: rgba(11,18,32,.88);
  box-shadow: 0 8px 24px rgba(0,0,0,.24);
  backdrop-filter: blur(6px);
}

.rps-zoom-controls button {
  min-width: 42px;
  height: 40px;
  border: 0;
  border-right: 1px solid rgba(255,255,255,.14);
  padding: 0 12px;
  color: #f8fafc;
  background: transparent;
  font: inherit;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
}

.rps-zoom-controls button:last-child {
  border-right: 0;
}

.rps-zoom-controls button:hover,
.rps-zoom-controls button:focus-visible {
  background: rgba(255,255,255,.13);
  outline: none;
}

.rps-zoom-controls .rps-zoom-value {
  min-width: 68px;
  font-size: 13px;
  font-weight: 700;
}

.rps-stage-gesture-hint {
  position: absolute;
  z-index: 6;
  right: 14px;
  bottom: 20px;
  max-width: calc(100% - 28px);
  padding: 7px 10px;
  border-radius: 9px;
  color: rgba(255,255,255,.84);
  background: rgba(11,18,32,.7);
  font-size: 11px;
  line-height: 1.25;
  pointer-events: none;
}

.rps-height-resize-handle {
  position: absolute;
  z-index: 9;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14px;
  cursor: ns-resize;
  touch-action: none;
}

.rps-height-resize-handle span {
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 78px;
  height: 4px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: rgba(255,255,255,.72);
  box-shadow: 0 1px 5px rgba(0,0,0,.35);
}

.rps-height-resize-handle:hover span,
.rps-height-resize-handle:focus-visible span,
.rps-plugin.rps-is-height-resizing .rps-height-resize-handle span {
  background: var(--rps-accent);
}

.rps-height-resize-handle:focus-visible {
  outline: 2px solid var(--rps-accent);
  outline-offset: -2px;
}

.rps-plugin.rps-space-pan .rps-stage,
.rps-plugin.rps-is-panning .rps-stage {
  cursor: grab;
}

.rps-plugin.rps-is-panning .rps-stage {
  cursor: grabbing;
}

.rps-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  cursor: default;
  user-select: none;
  touch-action: none;
}

.rps-shape-group {
  cursor: pointer;
}

.rps-shape {
  fill: var(--rps-shape-fill, rgba(0, 180, 200, 0.25));
  stroke: var(--rps-shape-stroke, var(--rps-accent));
  stroke-linejoin: round;
  stroke-linecap: round;
  transition: fill 0.25s ease, stroke 0.25s ease, opacity 0.25s ease;
  cursor: move;
}

.rps-shape-group:not(.rps-active) .rps-shape {
  opacity: .86;
}

.rps-shape-group.rps-active .rps-shape {
  opacity: 1;
}

.rps-shape-group .rps-shape:not(.rps-hover-disabled):hover {
  fill: var(--rps-shape-fill-hover, rgba(0, 110, 130, 0.4));
  stroke: var(--rps-shape-stroke-hover, #006e82) !important;
}

.rps-mist {
  fill: #fff;
  pointer-events: none;
}

@keyframes rps-mist {
  0%, 100% { opacity: 0; }
  50% { opacity: .16; }
}

.rps-label {
  font-weight: 400;
  pointer-events: auto;
  cursor: move;
}

.rps-text-box {
  fill: none;
  stroke: rgba(255, 236, 112, .95);
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
  pointer-events: none;
}

.rps-text-rotate-line {
  stroke: rgba(255, 236, 112, .95);
  stroke-width: 1.5;
  pointer-events: none;
}

.rps-text-rotate-handle {
  fill: #ffffff;
  stroke: #111827;
  stroke-width: 1.8;
  cursor: crosshair;
}

.rps-text-resize-handle {
  fill: #ffec70;
  stroke: #111827;
  stroke-width: 1.8;
  cursor: nwse-resize;
}

.rps-anchor {
  fill: #fff;
  stroke: #111827;
  stroke-width: 1.6;
  cursor: grab;
}

.rps-anchor:active {
  cursor: grabbing;
}

.rps-radius-handle {
  fill: #ffec70;
  stroke: #111827;
  stroke-width: 1.6;
  cursor: ew-resize;
}

.rps-helper-line {
  stroke: rgba(255,255,255,.45);
  stroke-width: 1.5;
  stroke-dasharray: 4 5;
  pointer-events: none;
}

.rps-plugin.rps-has-custom-background .rps-stage-surface {
  background: transparent;
}

.rps-plugin.rps-is-background-zooming .rps-stage-wrap {
  cursor: ns-resize;
}

.rps-plugin.rps-has-custom-background .rps-stage-surface::before {
  display: none;
}

@media (max-width: 760px) {
  .rps-plugin {
    --rps-panel-width: min(340px, calc(100vw - 44px));
  }

  .rps-panel {
    max-width: calc(100vw - 44px);
  }

  .rps-toolbar {
    grid-template-columns: 1fr;
  }

  .rps-copy-actions {
    grid-template-columns: 1fr;
  }

  .rps-stage-gesture-hint {
    display: none;
  }
}

.rps-help-small {
  font-size: 12px;
  margin-top: -6px;
  margin-bottom: 12px;
}


.rps-color-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.rps-color-field {
  display: grid;
  gap: 7px;
  font-size: 13px;
}

.rps-color-field input[type="color"] {
  width: 100%;
  height: 42px;
  padding: 4px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  background: rgba(0,0,0,0.28);
}


.rps-section-title {
  margin: 18px 0 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.12);
  color: #e5eef7;
  font-weight: 700;
  font-size: 14px;
}

.rps-color-field-full {
  margin: 14px 0;
}


.rps-range-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 10px;
  align-items: center;
}

.rps-number-input {
  width: 76px;
  min-height: 36px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 6px 8px;
  color: #e5eef7;
  background: rgba(0,0,0,0.28);
  font: inherit;
}

.rps-number-input:disabled {
  opacity: .55;
  cursor: not-allowed;
}


.rps-toolbar-extended {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rps-shape-no-fill {
  fill: none !important;
  stroke-linejoin: round;
  stroke-linecap: round;
}


.rps-help-small {
  color: #9fb1c1;
  font-size: 12px;
  line-height: 1.45;
  margin: 6px 0 10px;
}

.rps-section-title {
  margin: 18px 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: #e5eef7;
}

.rps-color-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.rps-color-field {
  display: grid;
  gap: 7px;
  font-size: 13px;
}

.rps-color-field input[type="color"] {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 4px;
  background: rgba(0,0,0,0.28);
}

.rps-color-field-full {
  margin: 12px 0;
}

.rps-range-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 94px;
  gap: 10px;
  align-items: center;
}

.rps-number-input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 8px 10px;
  color: #e5eef7;
  background: rgba(0,0,0,0.28);
}

.rps-palette-builder {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px;
  align-items: end;
  margin: 10px 0;
}

.rps-palette-actions {
  margin-bottom: 10px;
}

.rps-palette-section {
  margin: 10px 0 14px;
}

.rps-palette-label {
  font-size: 12px;
  color: #9fb1c1;
  margin-bottom: 8px;
}

.rps-palette-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.rps-palette-item {
  position: relative;
}

.rps-palette-swatch {
  position: relative;
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15);
}

.rps-palette-swatch span {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-family: Consolas, Monaco, monospace;
  color: rgba(255,255,255,0.96);
  text-shadow: 0 1px 2px rgba(0,0,0,0.55);
}

.rps-palette-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(0,0,0,0.78);
  color: #fff;
  cursor: pointer;
  line-height: 1;
  font-size: 14px;
}

.rps-palette-empty {
  grid-column: 1 / -1;
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: 10px;
  padding: 10px;
  font-size: 12px;
  color: #9fb1c1;
  text-align: center;
}


.rps-toolbar .rps-button[data-rps-delete-point] {
  font-size: 12px;
}

.rps-anchor.is-selected {
  fill: #15ff00;
  stroke: #08131a;
  stroke-width: 2;
}

.rps-radius-handle.is-selected {
  fill: #ffd94d;
  stroke: #08131a;
  stroke-width: 2;
}

.rps-helper-line.is-selected {
  stroke: rgba(255, 217, 77, 0.9);
}

.rps-background-panel {
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
}

.rps-background-panel .rps-section-title {
  margin-top: 0;
}

.rps-background-status {
  margin-top: 8px;
  color: #9fb1c1;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}


.rps-ui-zoom-indicator {
  position: absolute;
  z-index: 20;
  left: 50%;
  top: 18px;
  min-width: 76px;
  padding: 9px 14px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  transform: translateX(-50%);
  color: #f8fafc;
  background: rgba(11,18,32,.9);
  box-shadow: 0 8px 24px rgba(0,0,0,.26);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .16s ease;
}

.rps-ui-zoom-indicator.is-visible {
  opacity: 1;
}


/* Fullscreen layout: editor height is always the viewport height. */
.rps-height-resize-handle {
  display: none !important;
}


.rps-fragment-placeholder{min-height:320px;display:flex;align-items:center;justify-content:center}.rps-fragment-loading,.rps-fragment-error{padding:16px 20px;border-radius:12px;background:rgba(11,18,32,.82);color:#e5eef7;font:600 16px/1.4 Inter,Arial,sans-serif;text-align:center}.rps-fragment-error{background:#4b1f24}


html body .rps-plugin { clear: both; }

.rps-stage,
.rps-stage-surface,
.rps-shapes,
.rps-helpers,
.rps-handles,
.rps-shape-group {
  transform: none !important;
}

.rps-shape,
.rps-helper-line {
  vector-effect: non-scaling-stroke;
}


.rps-range-row.has-unit {
  grid-template-columns: minmax(0, 1fr) 76px 76px;
}

.rps-unit-input {
  min-height: 36px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 6px 8px;
  color: #e5eef7;
  background: rgba(0,0,0,0.28);
  font: inherit;
}

.rps-unit-input:disabled {
  opacity: .55;
  cursor: not-allowed;
}
