* { box-sizing: border-box; }
body { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial; margin: 24px; background:#f7f7f7; color:#222 }
.container { max-width: 880px; margin: 0 auto; background: white; padding: 20px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,0.06) }
.controls { display:flex; flex-direction:column; gap:12px; align-items:stretch }
.controls label { display:flex; gap:8px; align-items:center; width:100% }
.controls label.rainbow-toggle { gap:6px; width:auto }
.controls label.rainbow-toggle input[type="checkbox"] { width:18px; height:18px; cursor:pointer }
.controls .text-input { flex: 1; padding:6px 8px; border:1px solid #ddd; border-radius:4px; min-width:260px }
.controls .text-input:disabled { background:#f5f5f5; color:#999; cursor:not-allowed }
.controls .hex-input { padding:6px 8px; border:1px solid #ddd; border-radius:4px; width:92px; max-width:40% }
.controls input:disabled { opacity:0.6; cursor:not-allowed }
.preview .rendered { padding:10px; min-height:48px; border:1px dashed #eee; background:linear-gradient(90deg, rgba(255,255,255,0.8), rgba(255,255,255,0.9)); white-space:pre-wrap; font-size:20px }
.char { font-weight:600 }
.output textarea { width:100%; padding:8px; border:1px solid #ddd; border-radius:6px; font-family: monospace; font-size:14px }
.limit-warning { padding:8px 12px; background:#fff3cd; border:1px solid #ffc107; border-radius:4px; color:#856404; margin-bottom:8px; font-weight:600 }
.actions { margin-top:8px; display:flex; gap:8px; align-items:center }
.actions button { padding:8px 12px; border-radius:6px; border:none; background:#2b6cb0; color:white; cursor:pointer }
.actions button:active { transform: translateY(1px) }
.status { color: #2f855a; font-weight:600 }
footer { margin-top:12px; color:#666 }
