
/* preview stage */
.stage{
  min-height: 520px;
  padding:14px;
  background:
    radial-gradient(900px 450px at 70% 30%, rgba(113,215,255,0.18), transparent 60%),
    radial-gradient(900px 600px at 35% 70%, rgba(255,92,207,0.14), transparent 60%),
    rgba(255,255,255,.65);
  border:3px solid #000;
  border-radius:14px;
  box-shadow:6px 6px 0 #000;
  position:relative;
  overflow:hidden;
}
.popup-host{
  position:relative;
  width:100%;
  height:100%;
  min-height: 440px;
}

/* ==== POPUP (theme vars) ==== */
.cute-popup{
  --win-w: 340px;
  --win-radius: 10px;

  --win-border: #000;
  --win-shadow: 4px 4px 0 #000;

  --title-g1: #2b67ff;
  --title-g2: #0b2b7a;
  --title-solid: #2b67ff;
  --title-text: #ffffff;

  --body-bg: rgba(255,255,255,.95);
  --body-text: #111;

  --inner-border: rgba(0,0,0,.20);

  --btn-bg: #efefef;
  --btn-text: #111;
  --btn-border: #000;

  --font: Tahoma, Verdana, Arial, sans-serif;

  width: var(--win-w);
  border: 2px solid var(--win-border);
  border-radius: var(--win-radius);
  background: var(--body-bg);
  color: var(--body-text);
  box-shadow: var(--win-shadow);
  position:absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font);
  user-select:none;
  overflow:hidden;
}

.style-square{
  --win-radius: 2px;
  --win-shadow: 3px 3px 0 #000;
}
.style-soft{
  --win-radius: 10px;
  --win-shadow: 4px 6px 0 rgba(0,0,0,.35);
  border-width: 1px;
}

.popup-titlebar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 7px 8px;
  border-bottom: 1px solid var(--inner-border);
  cursor: grab;
}
.popup-titlebar:active{ cursor: grabbing; }

.titlebar-fill.gradient{ background: linear-gradient(90deg, var(--title-g1), var(--title-g2)); }
.titlebar-fill.solid{ background: var(--title-solid); }

.popup-title{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight: 900;
  font-size: 12px;
  color: var(--title-text);
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  min-width:0;
}
.popup-winbtns{ display:flex; gap:6px; flex:0 0 auto; }
.winbtn{
  width: 18px;
  height: 18px;
  border: 1px solid rgba(0,0,0,.65);
  background: rgba(255,255,255,.85);
  border-radius: 4px;
  display:grid;
  place-items:center;
  font-weight: 1000;
  font-size: 12px;
  line-height: 1;
  color:#111;
  box-shadow: 1px 1px 0 rgba(0,0,0,.35);
  cursor:pointer;
}
.style-square .winbtn{ border-radius: 2px; }
.winbtn:active{ transform: translate(1px,1px); box-shadow: 0 0 0 rgba(0,0,0,.35); }

.popup-body{
  padding: 12px;
  display:grid;
  grid-template-columns: 46px 1fr;
  gap:10px;
  align-items:start;
}
.popup-icon{
  width: 46px;
  height: 46px;
  border: 1px solid var(--inner-border);
  border-radius: 12px;
  background: rgba(255,255,255,.7);
  display:grid;
  place-items:center;
  font-size: 26px;
  line-height:1;
}
.style-square .popup-icon{ border-radius: 2px; }

.popup-msg{
  font-size: 12px;
  line-height: 1.25;
  white-space: pre-wrap;
}

.popup-actions{
  padding: 0 12px 12px;
  display:flex;
  justify-content:flex-end;
  gap:8px;
}
.popup-action-btn{
  border: 2px solid var(--btn-border);
  border-radius: 10px;
  padding: 7px 12px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 1000;
  box-shadow: 2px 2px 0 #000;
  cursor:pointer;
}
.style-square .popup-action-btn{ border-radius: 2px; }
.popup-action-btn:active{ transform: translate(2px,2px); box-shadow: 0 0 0 #000; }

@keyframes popIn{
  0% { transform: translate(-50%,-50%) scale(.82); opacity:0; }
  70%{ transform: translate(-50%,-50%) scale(1.04); opacity:1; }
  100%{ transform: translate(-50%,-50%) scale(1); }
}
.animate-pop{ animation: popIn .22s ease-out both; }

/* sidebar textarea focus (ease copy) */
.codeOut:focus{ outline: 4px solid rgba(255,92,207,.25); }

/* tiny click-target shown only when click trigger is used */
.clickTarget{
  position:absolute;
  right:12px;
  bottom:12px;
  border:2px solid #000;
  border-radius:999px;
  background: rgba(255,255,255,.85);
  box-shadow: 2px 2px 0 #000;
  padding: 7px 10px;
  font-weight:1000;
  cursor:pointer;
  display:none;
}
.clickTarget:active{ transform: translate(2px,2px); box-shadow:0 0 0 #000; }

/* subheads in sidebar */
.subhead{
  margin:0 -12px 0;
  padding:10px 12px;
  border-bottom:2px dashed rgba(0,0,0,.35);
  font-weight:1000;
  font-size:13px;
}
.subhead--preset{
  background:linear-gradient(90deg, rgba(255,230,110,.35), rgba(201,179,255,.35));
  border-top:0;
}
.subhead--divider{
  background: linear-gradient(90deg, rgba(201,179,255,.35), rgba(255,230,110,.35));
  border-top:2px dashed rgba(0,0,0,.35);
}

/* copy row */
.copyRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

/* tiny utilities */
.mt8{ margin-top:8px; }
.mt10{ margin-top:10px; }
.mt12{ margin-top:12px; }
.mt14{ margin-top:14px; }
.padtop10{ padding-top:10px; }




.stage{ position:relative; overflow:hidden; min-height:520px; }
.popup-host{ position:relative; width:100%; height:100%; min-height:440px; }
.cute-popup{ position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); }
