:root {
  color-scheme: light;
  font-family: 'PingFang SC', 'Microsoft YaHei UI', 'Noto Sans CJK SC', system-ui, sans-serif;
  color: #20183c;
  background: #f5f3fe;
  font-synthesis: none;
}

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

body {
  min-block-size: 100svh;
  display: grid;
  place-items: center;
  margin: 0;
  padding: clamp(16px, 5vw, 60px);
  background:
    radial-gradient(ellipse at 12% 80%, #e9e5ff 0, transparent 50%),
    radial-gradient(ellipse at 93% 4%, #fff0de 0, transparent 37%),
    #f5f3fe;
}

.hello-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  width: min(100%, 970px);
  padding: 12px;
  background: #fff;
  border: 1px solid #e8e3f4;
  border-radius: 32px;
  box-shadow: 0 25px 70px #45347619, 0 2px 6px #4534760a;
}

.prompt {
  min-width: 0;
  padding: clamp(28px, 4vw, 60px) clamp(20px, 4vw, 52px);
}

.mark {
  position: relative;
  display: block;
  width: 44px;
  height: 44px;
  margin-bottom: 26px;
  border-radius: 15px;
  background: #eae3ff;
}

.mark i {
  position: absolute;
  top: 13px;
  left: 11px;
  width: 15px;
  height: 15px;
  transform: rotate(-12deg);
  border-radius: 6px 6px 6px 2px;
  background: #6342c3;
}

.mark i + i {
  top: 18px;
  left: 19px;
  transform: rotate(10deg);
  background: #8f72e3;
  border: 2px solid #eae3ff;
}

h1, h2, p { margin: 0; }

h1 {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.13;
  letter-spacing: -0.055em;
  font-weight: 800;
}

.intro {
  margin-top: 14px;
  color: #625a72;
  font-size: clamp(15px, 2vw, 17px);
  line-height: 1.65;
}

form { margin-top: 32px; }
button, input { font: inherit; }

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

input {
  min-width: 0;
  min-height: 54px;
  padding: 0 14px;
  color: #20183c;
  background: #fbfaff;
  border: 1px solid #ddd6ee;
  border-radius: 13px;
  font-size: 16px;
}

input::placeholder { color: #736b82; }
input[aria-invalid='true'] { border-color: #ac3150; }

button { cursor: pointer; }

.submit {
  min-height: 54px;
  padding: 0 14px;
  color: #fff;
  background: #5939b5;
  border: 1px solid transparent;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.submit:hover { background: #472991; }
.submit span { margin-inline-start: 4px; }

:is(input, button):focus-visible {
  outline: 3px solid #7755ce;
  outline-offset: 3px;
}

.error {
  margin-top: 10px;
  color: #a02b47;
  font-size: 14px;
}

.examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 17px;
  color: #665d78;
  font-size: 13px;
}

.examples button {
  min-height: 34px;
  padding: 4px 12px;
  border: 1px solid #e8e1f7;
  border-radius: 999px;
  background: #f8f5ff;
  color: #523895;
}

.examples button:hover { background: #eae2ff; }

.privacy {
  margin-top: 32px;
  color: #6d647c;
  font-size: 12px;
  line-height: 1.5;
}

.reply-panel {
  --wash: #eae3ff;
  --tint: #f5f0ff;
  --deep: #573a98;
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 26px;
  min-width: 0;
  min-height: 310px;
  padding: 36px 26px;
  overflow: hidden;
  border-radius: 23px;
  background: radial-gradient(ellipse at 50% 37%, var(--tint), transparent 65%), var(--wash);
  text-align: center;
  transition: background-color 200ms ease;
}

.reply-panel[data-mood='peach'] { --wash: #fbe6d1; --tint: #fff3e7; --deep: #8a482d; }
.reply-panel[data-mood='rose'] { --wash: #f9e2ed; --tint: #fff1f7; --deep: #87385e; }
.reply-panel[data-mood='mint'] { --wash: #dceee5; --tint: #f1faf4; --deep: #2c6751; }

.reply-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 126px;
  height: 126px;
  border: 1px solid #fff9;
  border-radius: 50%;
  background: #ffffff63;
  color: var(--deep);
}

.bubble {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 74px;
  height: 55px;
  transform: rotate(-9deg);
  margin-bottom: 6px;
  border-radius: 22px;
  background: currentColor;
  box-shadow: 0 8px 14px #21183920;
}

.bubble::after {
  content: '';
  position: absolute;
  inset: auto auto -8px 15px;
  width: 18px;
  height: 17px;
  background: currentColor;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.bubble span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

.spark { position: absolute; line-height: 1; }
.spark-top { top: 10px; right: -6px; font-size: 25px; }
.spark-bottom { bottom: 10px; left: -3px; font-size: 22px; }

.reply { width: min(100%, 305px); overflow-wrap: anywhere; }
.reply h2 { font-size: clamp(24px, 3vw, 34px); line-height: 1.25; font-weight: 800; }
.reply p { margin-top: 10px; color: var(--deep); font-size: 15px; line-height: 1.7; }
.reply p:empty { display: none; }

@media (max-width: 720px) {
  .hello-card { grid-template-columns: minmax(0, 1fr); width: min(100%, 480px); }
  .reply-panel { min-height: 244px; padding: 25px 18px; gap: 18px; }
  .reply-art { width: 102px; height: 102px; }
  .bubble { scale: 0.83; }
  .mark { margin-bottom: 20px; }
  .privacy { margin-top: 21px; }
}

@media (max-width: 355px) {
  .input-row { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
