:root {
  --g1: #4f46e5;
  --g2: #06b6d4;
  --ink: #15131f;
  --muted: #6b6880;
  --card: #ffffff;
  --field: #eef0ff;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(160deg, var(--g1) 0%, #7c3aed 45%, var(--g2) 100%);
  background-attachment: fixed;
  color: #fff;
  font: 16px/1.45 "Inter", system-ui, -apple-system, sans-serif;
  display: flex;
  justify-content: center;
  padding: max(40px, env(safe-area-inset-top)) 16px 40px;
}
.wrap { width: 100%; max-width: 460px; }
.hidden { display: none !important; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.ask-card {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(20, 10, 60, .35);
}
.ask-head {
  background: var(--card);
  color: var(--ink);
  display: flex; gap: 12px; align-items: center;
  padding: 18px 20px;
}
.avatar {
  flex: none;
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  color: #fff; font-weight: 800; font-size: 20px;
  display: grid; place-items: center;
  text-transform: uppercase;
}
.handle { font-size: 14px; color: var(--muted); }
.prompt { font-weight: 800; font-size: 18px; line-height: 1.25; overflow-wrap: anywhere; }

.ask-body {
  position: relative;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(8px);
}
textarea {
  display: block;
  width: 100%;
  min-height: 170px;
  font: 600 20px/1.4 "Inter", system-ui, sans-serif;
  color: var(--ink);
  background: transparent;
  border: none; outline: none; resize: none;
  padding: 20px 20px 56px;
}
textarea::placeholder { color: #8a87a3; }
.dice {
  position: absolute; right: 14px; bottom: 12px;
  width: 40px; height: 40px; border-radius: 50%;
  border: none; cursor: pointer;
  background: #fff; color: var(--g1);
  box-shadow: 0 2px 8px rgba(30, 20, 80, .18);
  display: grid; place-items: center;
}
.dice svg { width: 22px; height: 22px; }
.dice:active { transform: rotate(25deg) scale(.95); }

.lock {
  display: flex; justify-content: center; align-items: center; gap: 6px;
  margin: 16px 0; font-weight: 600; font-size: 14px; opacity: .9;
}
.lock svg { width: 14px; height: 14px; }

.send-btn {
  width: 100%;
  font: 800 18px "Inter", system-ui, sans-serif;
  color: #fff; background: var(--ink);
  border: none; border-radius: 999px;
  padding: 17px; cursor: pointer;
  transition: transform .1s;
}
.send-btn:active { transform: scale(.98); }
.send-btn:disabled { opacity: .45; cursor: default; }

.status { min-height: 22px; margin-top: 12px; text-align: center; font-weight: 600; }

.promise { margin-top: 24px; font-size: 14px; opacity: .92; }
.promise summary { cursor: pointer; text-align: center; font-weight: 600; list-style: none; }
.promise summary::-webkit-details-marker { display: none; }
.promise ul { margin: 12px auto 0; padding: 14px 18px 14px 34px; background: rgba(255,255,255,.14); border-radius: 16px; }

.sent { text-align: center; padding-top: 12vh; }
.sent h1 { font-size: 40px; margin: 18px 0 6px; font-weight: 800; }
.sent p { margin: 0 0 32px; opacity: .9; }
.check {
  width: 88px; height: 88px; margin: 0 auto; border-radius: 50%;
  background: #fff; color: var(--g1);
  display: grid; place-items: center;
  animation: pop .35s cubic-bezier(.2, 1.6, .4, 1);
}
.check svg { width: 46px; height: 46px; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
