:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #333;
  --accent: #6c63ff;
  --shadow: 0 16px 30px rgba(46, 62, 77, 0.2);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #e9efff 0%, #f4f6ff 100%);
  color: var(--text);
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.plushie-page {
  width: min(100%, 520px);
}

.plushie-card {
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid #dbe1f0;
}

.plushie-figure {
  position: relative;
  margin: 0;
  width: 100%;
  overflow: hidden;
}

.plushie-img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background-color: #f0f4ff;
}

.plushie-overlay {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 92%;
  max-height: 160px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 16px;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(108, 99, 255, 0.25);
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  color: #2e3d4d;
  min-height: 48px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  white-space: pre-wrap;
  word-break: break-word;
}

.plushie-overlay::-webkit-scrollbar {
  width: 7px;
}

.plushie-overlay::-webkit-scrollbar-thumb {
  background: rgba(108, 99, 255, 0.35);
  border-radius: 999px;
}

.plushie-overlay::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
}

.plushie-overlay::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 10px 10px 0 10px;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.92) transparent transparent transparent;
}

.plushie-overlay::before {
  content: '';
  position: absolute;
  bottom: -11px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 11px 11px 0 11px;
  border-style: solid;
  border-color: rgba(108, 99, 255, 0.25) transparent transparent transparent;
}

.bubble-buttons {
  padding: 0.9rem 1.1rem 1.1rem;
  display: flex;
  gap: 0.8rem;
  justify-content: center;
}

.bubble-btn {
  border: 1px solid #6c63ff;
  border-radius: 10px;
  background: #fff;
  color: #4a4f63;
  padding: 0.6rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.bubble-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(108, 99, 255, 0.18);
}

.bubble-btn:active {
  transform: translateY(0);
}

.back-container {
  padding: 0.6rem 1.1rem 1.1rem;
  display: flex;
  justify-content: center;
}

.back-btn {
  border: 1px solid #8f8fbd;
  border-radius: 10px;
  background: #f2f2ff;
  color: #484a71;
  padding: 0.68rem 0.96rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.back-btn:hover {
  background: #e6e6ff;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(52, 56, 123, 0.18);
}

.back-btn:active {
  transform: translateY(0);
}


.text-box textarea {
  width: 100%;
  border: 1px solid #cfd6ec;
  border-radius: 10px;
  padding: 0.75rem;
  font-size: 0.98rem;
  font-family: inherit;
  resize: vertical;
  min-height: 86px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.text-box textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

.hint {
  margin-top: 0.4rem;
  font-size: 0.82rem;
  color: #6f7790;
}

@media (max-width: 500px) {
  .plushie-overlay {
    bottom: 8px;
    width: 92%;
    font-size: 0.95rem;
  }
}
