* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  margin: 0;
  padding: 1rem;
  background: #fafafa;
  color: #222;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.description {
  max-width: 600px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
  color: #555;
  line-height: 1.6;
}

input[type="text"] {
  width: 100%;
  max-width: 400px;
  padding: 0.7rem 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  outline: none;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 0.5rem;
}

.emoji-item {
  font-size: 1.8rem;
  padding: 0.6rem;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: background 0.15s ease;
  position: relative;
}

.emoji-item:hover {
  background: #f0f0f0;
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  font-size: 0.95rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 999;
}

.toast.show {
  opacity: 1;
}

.toast.hidden {
  opacity: 0;
}

.var-box {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.3rem;
  flex-wrap: wrap;
  justify-content: center;
}

.variation-button {
  font-size: 1.4rem;
  padding: 0.3rem 0.5rem;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.variation-button:hover {
  background: #f3f3f3;
}

.emoji-item.has-variations::after {
  content: "🎨";
  position: absolute;
  right: 2px;
  bottom: 2px;
  font-size: 0.55em;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.emoji-item.has-variations:hover::after {
  opacity: 0.4;
}
