/* ==========================================================
   RealStock Photoshoot Wizard — CSS
   Version: 1.0.0
   ========================================================== */

/* ── Hidden Attribute Override ──────────────────────────── */
/* Ensure [hidden] always wins over display:flex / display:grid etc. */
[hidden] {
  display: none !important;
}

/* ── Base Variables ─────────────────────────────────────── */
.rspw-root {
  --pw-bg: #0a0a14;
  --pw-surface: #12121f;
  --pw-surface2: #1a1a2e;
  --pw-border: rgba(255, 255, 255, 0.08);
  --pw-accent: #e879f9;
  --pw-accent2: #818cf8;
  --pw-gold: #f5c842;
  --pw-text: #f1f5f9;
  --pw-muted: rgba(241, 245, 249, 0.55);
  --pw-radius: 18px;
  --pw-radius-sm: 10px;
  --pw-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --pw-font: 'Outfit', 'Noto Sans JP', sans-serif;
  --pw-font-serif: 'Playfair Display', serif;
  font-family: var(--pw-font);
  color: var(--pw-text);
  background: var(--pw-bg);
  min-height: 100vh;
}

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

/* ── HERO ───────────────────────────────────────────────── */
.rspw-hero {
  min-height: 90vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  padding: 100px 6vw 80px;
  background: radial-gradient(ellipse at 60% 40%, rgba(129, 140, 248, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(232, 121, 249, 0.1) 0%, transparent 60%),
    var(--pw-bg);
  position: relative;
  overflow: hidden;
}

.rspw-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Ccircle cx='30' cy='30' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.rspw-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(232, 121, 249, 0.2), rgba(129, 140, 248, 0.2));
  border: 1px solid rgba(232, 121, 249, 0.3);
  border-radius: 24px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--pw-accent);
  margin-bottom: 20px;
}

.rspw-hero-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 20px;
  letter-spacing: -0.03em;
}

.rspw-hero-line {
  display: block;
}

.rspw-hero-accent {
  background: linear-gradient(135deg, var(--pw-accent), var(--pw-accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.rspw-hero-sub {
  font-size: 1.05rem;
  color: var(--pw-muted);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 500px;
}

.rspw-hero-stats {
  display: flex;
  gap: 32px;
}

.rspw-hero-stat {
  display: flex;
  flex-direction: column;
}

.rspw-hero-stat strong {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--pw-text);
  line-height: 1;
}

.rspw-hero-stat span {
  font-size: .75rem;
  color: var(--pw-muted);
  margin-top: 4px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.rspw-hero-visual {
  position: relative;
  height: 480px;
}

.rspw-hero-card {
  position: absolute;
  background: linear-gradient(135deg, var(--pw-surface2), var(--pw-surface));
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  padding: 20px;
  box-shadow: var(--pw-shadow);
}

.rspw-hero-card--1 {
  width: 200px;
  height: 280px;
  top: 0;
  left: 20px;
  background: linear-gradient(160deg, #1e1b4b, #312e81);
  transform: rotate(-5deg);
  z-index: 1;
}

.rspw-hero-card--2 {
  width: 220px;
  height: 300px;
  top: 40px;
  left: 140px;
  background: linear-gradient(160deg, #1a1a2e, #0f3460);
  z-index: 3;
}

.rspw-hero-card--3 {
  width: 180px;
  height: 260px;
  top: 20px;
  left: 300px;
  background: linear-gradient(160deg, #2d1b69, #11998e);
  transform: rotate(4deg);
  z-index: 2;
}

.rspw-hero-card-tag {
  background: rgba(255, 255, 255, .1);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .8);
  width: fit-content;
  margin-top: auto;
  position: absolute;
  bottom: 16px;
  left: 16px;
}

/* ── WIZARD ─────────────────────────────────────────────── */
.rspw-wizard {
  padding: 80px 6vw;
  background: var(--pw-bg);
}

.rspw-wizard-inner {
  max-width: 860px;
  margin: 0 auto;
}

/* ── Stepper ────────────────────────────────────────────── */
.rspw-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 56px;
  flex-wrap: wrap;
  gap: 0;
}

.rspw-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: default;
}

.rspw-step-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--pw-border);
  background: var(--pw-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--pw-muted);
  transition: all .3s ease;
}

.rspw-step.is-active .rspw-step-dot {
  border-color: var(--pw-accent);
  background: linear-gradient(135deg, rgba(232, 121, 249, .25), rgba(129, 140, 248, .25));
  color: var(--pw-accent);
  box-shadow: 0 0 16px rgba(232, 121, 249, .4);
}

.rspw-step.is-done .rspw-step-dot {
  border-color: #34d399;
  background: rgba(52, 211, 153, .15);
  color: #34d399;
}

.rspw-step-label {
  font-size: 11px;
  color: var(--pw-muted);
  font-weight: 500;
  letter-spacing: .04em;
  white-space: nowrap;
}

.rspw-step.is-active .rspw-step-label {
  color: var(--pw-accent);
}

.rspw-step.is-done .rspw-step-label {
  color: #34d399;
}

.rspw-step-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--pw-border), var(--pw-border));
  margin: 0 8px;
  min-width: 40px;
  align-self: flex-start;
  margin-top: 20px;
}

/* ── Panels ──────────────────────────────────────────────── */
.rspw-panel {
  display: none;
  animation: rspwFadeIn .35s ease;
}

.rspw-panel.is-active {
  display: block;
}

@keyframes rspwFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rspw-panel-head {
  text-align: center;
  margin-bottom: 40px;
}

.rspw-panel-eyebrow {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--pw-accent);
  font-weight: 600;
  margin-bottom: 10px;
}

.rspw-panel-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.rspw-panel-desc {
  color: var(--pw-muted);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 560px;
  margin: 0 auto;
}

/* ── Category Grid ───────────────────────────────────────── */
.rspw-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

.rspw-cat-card {
  background: var(--pw-surface);
  border: 1.5px solid var(--pw-border);
  border-radius: var(--pw-radius-sm);
  padding: 20px 12px 16px;
  cursor: pointer;
  transition: all .2s ease;
  text-align: center;
  color: var(--pw-text);
  font-family: var(--pw-font);
}

.rspw-cat-card:hover {
  border-color: rgba(232, 121, 249, .4);
  background: rgba(232, 121, 249, .05);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}

.rspw-cat-card.is-selected {
  border-color: var(--pw-accent);
  background: linear-gradient(135deg, rgba(232, 121, 249, .15), rgba(129, 140, 248, .15));
  box-shadow: 0 0 20px rgba(232, 121, 249, .3);
}

.rspw-cat-card-emoji {
  font-size: 2rem;
  margin-bottom: 8px;
  display: block;
}

.rspw-cat-card-label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 2px;
}

.rspw-cat-card-en {
  font-size: 10px;
  color: var(--pw-muted);
  letter-spacing: .04em;
}

/* ── Card Row (Purpose etc) ──────────────────────────────── */
.rspw-card-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 32px;
}

.rspw-card-item {
  min-width: 120px;
  background: var(--pw-surface);
  border: 1.5px solid var(--pw-border);
  border-radius: var(--pw-radius-sm);
  padding: 20px 24px;
  cursor: pointer;
  transition: all .2s ease;
  text-align: center;
  color: var(--pw-text);
  font-family: var(--pw-font);
}

.rspw-card-item:hover,
.rspw-card-item.is-selected {
  border-color: var(--pw-accent);
  background: linear-gradient(135deg, rgba(232, 121, 249, .12), rgba(129, 140, 248, .12));
}

.rspw-card-item-emoji {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 8px;
}

.rspw-card-item-label {
  font-size: 13px;
  font-weight: 600;
}

/* ── Vibe Grid ───────────────────────────────────────────── */
.rspw-vibe-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.rspw-vibe-card {
  background: var(--pw-surface);
  border: 1.5px solid var(--pw-border);
  border-radius: var(--pw-radius-sm);
  padding: 20px 16px;
  cursor: pointer;
  transition: all .2s ease;
  text-align: center;
  color: var(--pw-text);
  font-family: var(--pw-font);
}

.rspw-vibe-card:hover {
  transform: translateY(-2px);
  border-color: rgba(129, 140, 248, .4);
}

.rspw-vibe-card.is-selected {
  border-color: var(--pw-accent2);
  background: linear-gradient(135deg, rgba(129, 140, 248, .15), rgba(232, 121, 249, .1));
}

.rspw-vibe-card-label {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.rspw-vibe-card-desc {
  font-size: 11px;
  color: var(--pw-muted);
}

/* ── Output Settings ─────────────────────────────────────── */
.rspw-settings-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-bottom: 28px;
}

.rspw-setting-block {}

.rspw-setting-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--pw-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.rspw-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.rspw-chip {
  background: var(--pw-surface);
  border: 1.5px solid var(--pw-border);
  border-radius: var(--pw-radius-sm);
  padding: 10px 16px;
  cursor: pointer;
  color: var(--pw-text);
  font-family: var(--pw-font);
  text-align: left;
  transition: all .2s ease;
  line-height: 1.4;
}

.rspw-chip strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
}

.rspw-chip small {
  display: block;
  font-size: 11px;
  color: var(--pw-muted);
  margin-top: 2px;
}

.rspw-chip.is-active {
  border-color: var(--pw-accent);
  background: linear-gradient(135deg, rgba(232, 121, 249, .15), rgba(129, 140, 248, .1));
}

.rspw-chip:hover:not(.is-active) {
  border-color: rgba(255, 255, 255, .2);
}

.rspw-count-control {
  display: flex;
  align-items: center;
  gap: 16px;
}

.rspw-count-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--pw-border);
  background: var(--pw-surface);
  color: var(--pw-text);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
}

.rspw-count-btn:hover {
  border-color: var(--pw-accent);
  background: rgba(232, 121, 249, .1);
}

.rspw-count-val {
  font-size: 2rem;
  font-weight: 700;
  min-width: 40px;
  text-align: center;
}

.rspw-count-hint {
  font-size: 12px;
  color: var(--pw-muted);
}

/* ── Credit Preview ──────────────────────────────────────── */
.rspw-credit-preview {
  background: var(--pw-surface2);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius-sm);
  padding: 16px 20px;
  margin-bottom: 28px;
}

.rspw-credit-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
  color: var(--pw-muted);
  border-bottom: 1px solid rgba(255, 255, 255, .04);
}

.rspw-credit-row:last-child {
  border-bottom: none;
}

.rspw-credit-row span:last-child {
  color: var(--pw-text);
  font-weight: 600;
}

/* ── Elis Voice ──────────────────────────────────────────── */
.rspw-elis-voice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(129, 140, 248, .06);
  border: 1px solid rgba(129, 140, 248, .2);
  border-radius: var(--pw-radius-sm);
  padding: 16px;
  margin-bottom: 28px;
}

.rspw-elis-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pw-accent), var(--pw-accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.rspw-elis-bubble {
  font-size: 13px;
  line-height: 1.6;
  color: var(--pw-muted);
  flex: 1;
}

/* ── Form ───────────────────────────────────────────────── */
.rspw-form-body {
  margin-bottom: 28px;
}

.rspw-form-group {
  margin-bottom: 20px;
}

.rspw-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--pw-text);
}

.rspw-form-hint {
  font-size: 11px;
  color: var(--pw-muted);
  font-weight: 400;
  margin-left: 6px;
}

.rspw-form-textarea,
.rspw-form-input {
  width: 100%;
  background: var(--pw-surface);
  border: 1.5px solid var(--pw-border);
  border-radius: var(--pw-radius-sm);
  padding: 12px 14px;
  color: var(--pw-text);
  font-family: var(--pw-font);
  font-size: 14px;
  line-height: 1.5;
  transition: border-color .2s ease;
  resize: vertical;
}

.rspw-form-textarea:focus,
.rspw-form-input:focus {
  outline: none;
  border-color: var(--pw-accent2);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, .15);
}

.rspw-elis-brief {
  display: flex;
  gap: 12px;
  background: linear-gradient(135deg, rgba(232, 121, 249, .06), rgba(129, 140, 248, .06));
  border: 1px solid rgba(232, 121, 249, .2);
  border-radius: var(--pw-radius-sm);
  padding: 16px;
  margin-top: 20px;
}

.rspw-elis-brief-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pw-accent), var(--pw-accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}

.rspw-elis-brief-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--pw-accent);
  font-weight: 600;
  margin-bottom: 8px;
}

.rspw-brief-line {
  font-size: 13px;
  color: var(--pw-muted);
  padding: 2px 0;
}

/* ── Nav ────────────────────────────────────────────────── */
.rspw-nav {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--pw-border);
}

.rspw-nav--generate {
  justify-content: space-between;
}

.rspw-btn-back,
.rspw-btn-next {
  padding: 12px 24px;
  border-radius: var(--pw-radius-sm);
  font-family: var(--pw-font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  border: none;
}

.rspw-btn-back {
  background: transparent;
  border: 1.5px solid var(--pw-border);
  color: var(--pw-muted);
}

.rspw-btn-back:hover {
  border-color: rgba(255, 255, 255, .3);
  color: var(--pw-text);
}

.rspw-btn-next {
  background: linear-gradient(135deg, var(--pw-accent), var(--pw-accent2));
  color: #fff;
  box-shadow: 0 4px 16px rgba(232, 121, 249, .3);
}

.rspw-btn-next:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(232, 121, 249, .4);
}

.rspw-btn-next:disabled {
  opacity: .35;
  cursor: not-allowed;
  transform: none;
}

.rspw-btn-generate {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: var(--pw-radius-sm);
  background: linear-gradient(135deg, #e879f9, #818cf8);
  color: #fff;
  font-family: var(--pw-font);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all .2s ease;
  box-shadow: 0 8px 32px rgba(232, 121, 249, .4);
}

.rspw-btn-generate:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(232, 121, 249, .5);
}

.rspw-btn-generate-icon {
  font-size: 1.3rem;
}

.rspw-btn-generate-label {
  flex: 1;
}

.rspw-btn-generate-cost {
  font-size: 12px;
  background: rgba(255, 255, 255, .2);
  padding: 3px 8px;
  border-radius: 6px;
}

/* ── Generating ──────────────────────────────────────────── */
.rspw-generating {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 80px 6vw;
}

.rspw-generating-inner {
  text-align: center;
  max-width: 400px;
}

.rspw-elis-pulse {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 32px;
}

.rspw-elis-pulse-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pw-accent), var(--pw-accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  position: relative;
  z-index: 2;
  margin: 10px auto 0;
}

.rspw-elis-pulse-rings {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--pw-accent);
  animation: rspwPulse 2s infinite ease-out;
}

.rspw-elis-pulse-rings::before,
.rspw-elis-pulse-rings::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1.5px solid rgba(232, 121, 249, .4);
  animation: rspwPulse 2s infinite ease-out;
}

.rspw-elis-pulse-rings::before {
  animation-delay: .5s;
}

.rspw-elis-pulse-rings::after {
  animation-delay: 1s;
  inset: -24px;
  border-color: rgba(232, 121, 249, .2);
}

@keyframes rspwPulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.rspw-generating-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.rspw-generating-sub {
  font-size: 14px;
  color: var(--pw-muted);
  margin-bottom: 28px;
  min-height: 20px;
}

.rspw-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, .1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.rspw-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pw-accent), var(--pw-accent2));
  border-radius: 4px;
  transition: width .5s ease;
}

.rspw-progress-label {
  font-size: 12px;
  color: var(--pw-muted);
}

/* ── Results ─────────────────────────────────────────────── */
.rspw-results {
  padding: 80px 6vw;
  background: var(--pw-bg);
}

.rspw-results-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.rspw-results-head {
  text-align: center;
  margin-bottom: 48px;
}

.rspw-results-title {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.rspw-results-sub {
  color: var(--pw-muted);
  font-size: 1.05rem;
  margin-bottom: 24px;
}

.rspw-results-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.rspw-btn-retry {
  padding: 12px 24px;
  border: 1.5px solid var(--pw-border);
  border-radius: var(--pw-radius-sm);
  background: transparent;
  color: var(--pw-text);
  font-family: var(--pw-font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
}

.rspw-btn-retry:hover {
  border-color: var(--pw-accent);
  color: var(--pw-accent);
}

/* ── Stylist Note ────────────────────────────────────────── */
.rspw-stylist-note {
  display: flex;
  gap: 14px;
  background: linear-gradient(135deg, rgba(232, 121, 249, .08), rgba(129, 140, 248, .08));
  border: 1px solid rgba(232, 121, 249, .2);
  border-radius: var(--pw-radius-sm);
  padding: 20px;
  margin-bottom: 40px;
}

.rspw-stylist-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pw-accent), var(--pw-accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  flex-shrink: 0;
}

.rspw-stylist-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--pw-muted);
  flex: 1;
}

/* ── Results Grid ────────────────────────────────────────── */
.rspw-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.rspw-result-card {
  border-radius: var(--pw-radius);
  overflow: hidden;
  border: 1px solid var(--pw-border);
  background: var(--pw-surface);
  transition: all .3s ease;
}

.rspw-result-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .5);
  border-color: rgba(232, 121, 249, .3);
}

.rspw-result-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2/3;
}

.rspw-result-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}

.rspw-result-card:hover .rspw-result-img {
  transform: scale(1.03);
}

.rspw-result-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .8) 0%, transparent 50%);
  opacity: 0;
  transition: opacity .25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 16px;
  gap: 8px;
}

.rspw-result-card:hover .rspw-result-overlay {
  opacity: 1;
}

.rspw-result-btn {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: none;
  font-family: var(--pw-font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
}

.rspw-result-btn--dl {
  background: rgba(255, 255, 255, .9);
  color: #0a0a14;
}

.rspw-result-btn--dl:hover {
  background: #fff;
}

.rspw-result-btn--text {
  background: linear-gradient(135deg, var(--pw-accent), var(--pw-accent2));
  color: #fff;
}

.rspw-result-btn--text:hover {
  box-shadow: 0 4px 16px rgba(232, 121, 249, .4);
}

.rspw-result-meta {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rspw-result-shot {
  font-size: 12px;
  color: var(--pw-muted);
  font-weight: 500;
}

/* ── Text Editor Modal ───────────────────────────────────── */
.rste-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .85);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.rste-modal {
  background: #12121f;
  border: 1px solid var(--pw-border);
  border-radius: 20px;
  width: 100%;
  max-width: 1000px;
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .8);
}

.rste-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--pw-border);
  flex-shrink: 0;
}

.rste-modal-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.rste-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rste-btn {
  padding: 9px 16px;
  border-radius: 8px;
  font-family: var(--pw-font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s ease;
}

.rste-btn--export {
  background: linear-gradient(135deg, var(--pw-accent), var(--pw-accent2));
  color: #fff;
}

.rste-btn--save-server {
  background: var(--pw-surface2);
  color: var(--pw-text);
  border: 1px solid var(--pw-border);
}

.rste-btn--add {
  background: var(--pw-accent2);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  width: 100%;
  margin-top: 8px;
}

.rste-btn--delete {
  background: rgba(239, 68, 68, .1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, .3);
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--pw-font);
}

.rste-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--pw-border);
  background: transparent;
  color: var(--pw-muted);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
}

.rste-close-btn:hover {
  background: rgba(255, 255, 255, .1);
  color: var(--pw-text);
}

.rste-modal-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.rste-canvas-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: auto;
  padding: 20px;
}

.rste-canvas-wrap canvas {
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .6);
}

.rste-props {
  width: 260px;
  flex-shrink: 0;
  border-left: 1px solid var(--pw-border);
  overflow-y: auto;
  padding: 16px;
}

.rste-props-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--pw-border);
}

.rste-props-section:last-child {
  border-bottom: none;
}

.rste-props-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--pw-muted);
  font-weight: 600;
  margin-bottom: 12px;
}

.rste-prop-label {
  display: block;
  font-size: 12px;
  color: var(--pw-muted);
  margin-bottom: 6px;
  margin-top: 14px;
}

.rste-input {
  width: 100%;
  background: var(--pw-surface2);
  border: 1.5px solid var(--pw-border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--pw-text);
  font-family: var(--pw-font);
  font-size: 13px;
}

.rste-input:focus {
  outline: none;
  border-color: var(--pw-accent2);
}

.rste-select {
  width: 100%;
  background: var(--pw-surface2);
  border: 1.5px solid var(--pw-border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--pw-text);
  font-family: var(--pw-font);
  font-size: 13px;
}

.rste-size-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rste-range {
  flex: 1;
  accent-color: var(--pw-accent);
}

.rste-color-input {
  width: 100%;
  height: 40px;
  background: none;
  border: 1.5px solid var(--pw-border);
  border-radius: 8px;
  cursor: pointer;
  padding: 2px;
}

.rste-chip-row-small {
  display: flex;
  gap: 6px;
}

.rste-chip-sm {
  flex: 1;
  padding: 7px 4px;
  border-radius: 6px;
  border: 1.5px solid var(--pw-border);
  background: var(--pw-surface);
  color: var(--pw-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  font-family: var(--pw-font);
}

.rste-chip-sm.is-active {
  border-color: var(--pw-accent2);
  color: var(--pw-accent2);
  background: rgba(129, 140, 248, .15);
}

.rste-hints {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
  color: var(--pw-muted);
  line-height: 1.8;
}

.rste-hints li::before {
  content: '•  ';
  color: var(--pw-accent);
}

/* ── Add Text Form ───────────────────────────────────────── */
.rste-add-text-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Errors ──────────────────────────────────────────────── */
.rspw-errors {
  background: rgba(239, 68, 68, .08);
  border: 1px solid rgba(239, 68, 68, .2);
  border-radius: var(--pw-radius-sm);
  padding: 20px;
  margin-top: 24px;
}

.rspw-errors h3 {
  margin: 0 0 12px;
  font-size: 15px;
  color: #f87171;
}

.rspw-errors ul {
  margin: 0;
  padding: 0 0 0 20px;
  font-size: 13px;
  color: var(--pw-muted);
}

/* ── Loading cats ────────────────────────────────────────── */
.rspw-loading-cats {
  grid-column: 1/-1;
  text-align: center;
  color: var(--pw-muted);
  padding: 40px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .rspw-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 80px 20px 60px;
  }

  .rspw-hero-visual {
    display: none;
  }

  .rspw-vibe-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .rspw-stepper {
    gap: 0;
  }

  .rspw-step-label {
    display: none;
  }

  .rste-modal-body {
    flex-direction: column;
  }

  .rste-props {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--pw-border);
  }

  .rspw-results-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
