.mood-form-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  align-items: end;
  padding: 16px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 89, 21, 0.24), transparent 34%),
    rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(16px);
  animation: moodOverlayIn 0.18s ease both;
}

.mood-form-sheet {
  width: min(100%, 430px);
  margin: 0 auto max(10px, env(safe-area-inset-bottom));
  overflow: hidden;
  border: 1px solid rgba(255, 117, 54, 0.42);
  border-radius: 30px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.018)),
    radial-gradient(circle at 85% 4%, rgba(255, 104, 28, 0.28), transparent 32%),
    linear-gradient(160deg, rgba(48, 9, 7, 0.96), rgba(9, 1, 1, 0.98));
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.68),
    0 0 52px rgba(255, 63, 22, 0.26),
    inset 0 0 0 1px rgba(255, 213, 169, 0.06);
  animation: moodSheetIn 0.26s cubic-bezier(.2,.8,.2,1) both;
}

.mood-form-head {
  position: relative;
  min-height: 168px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(7, 1, 1, 0.14), rgba(7, 1, 1, 0.88)),
    radial-gradient(circle at 70% 52%, rgba(255, 87, 26, 0.52), transparent 34%),
    linear-gradient(135deg, #2d0505, #070101);
}

body[data-user="fox"] .mood-form-head {
  background:
    linear-gradient(180deg, rgba(7, 1, 1, 0.08), rgba(7, 1, 1, 0.9)),
    url("./assets/hero-devil.png") right bottom / 62% auto no-repeat,
    url("./assets/devil.svg") right bottom / 58% auto no-repeat,
    radial-gradient(circle at 74% 50%, rgba(255, 87, 26, 0.45), transparent 34%),
    linear-gradient(135deg, #2d0505, #070101);
}

body[data-user="devil"] .mood-form-head {
  background:
    linear-gradient(180deg, rgba(7, 1, 1, 0.08), rgba(7, 1, 1, 0.9)),
    url("./assets/hero-fox.png") right bottom / 62% auto no-repeat,
    url("./assets/fox.svg") right bottom / 58% auto no-repeat,
    radial-gradient(circle at 74% 50%, rgba(255, 87, 26, 0.45), transparent 34%),
    linear-gradient(135deg, #2d0505, #070101);
}

.mood-form-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 125, 67, 0.32);
  border-radius: 999px;
  background: rgba(9, 2, 2, 0.72);
  color: #fff0e8;
  font-size: 22px;
  box-shadow: 0 0 22px rgba(255, 63, 22, 0.18);
}

.mood-form-title {
  position: relative;
  z-index: 1;
  width: 70%;
}

.mood-form-title h3 {
  margin: 6px 0 8px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 31px;
  line-height: 1;
  letter-spacing: -0.035em;
  text-shadow: 0 0 30px rgba(255, 75, 30, 0.48), 0 3px 20px rgba(0,0,0,.65);
}

.mood-form-body {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.mood-field {
  display: grid;
  gap: 8px;
}

.mood-field label {
  color: #ffd0bd;
  font-size: 13px;
  font-weight: 850;
}

.mood-input,
.mood-textarea {
  width: 100%;
  border: 1px solid rgba(255, 120, 54, 0.28);
  border-radius: 17px;
  background: rgba(8, 2, 2, 0.62);
  color: #fff1e8;
  outline: none;
  box-shadow: inset 0 0 20px rgba(255, 65, 25, 0.06);
}

.mood-input {
  min-height: 52px;
  padding: 0 14px;
}

.mood-textarea {
  min-height: 98px;
  padding: 13px 14px;
  resize: vertical;
}

.mood-input:focus,
.mood-textarea:focus {
  border-color: rgba(255, 138, 38, 0.88);
  box-shadow: 0 0 26px rgba(255, 74, 24, 0.18), inset 0 0 18px rgba(255, 65, 25, 0.08);
}

.mood-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mood-chip {
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 120, 54, 0.28);
  border-radius: 999px;
  background: rgba(255, 67, 30, 0.1);
  color: #ffd6c4;
  font-size: 12px;
  font-weight: 850;
}

.mood-chip.active {
  border-color: rgba(255, 138, 38, 0.92);
  background: linear-gradient(180deg, rgba(255, 91, 42, 0.44), rgba(125, 16, 10, 0.82));
  box-shadow: 0 0 24px rgba(255, 62, 26, 0.28);
}

.mood-form-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
}

.mood-form-actions button {
  min-height: 52px;
  border-radius: 18px;
  font-weight: 900;
}

.mood-form-cancel {
  border: 1px solid rgba(255, 120, 54, 0.26);
  background: rgba(28, 8, 7, 0.88);
  color: #ffd6c4;
}

.mood-form-submit {
  background: linear-gradient(180deg, #ff6f35, #d91e12 72%, #83100b);
  color: #fff8f2;
  box-shadow: 0 0 38px rgba(255, 62, 26, 0.4), inset 0 1px 0 rgba(255,255,255,.16);
}

.mood-form-submit:disabled {
  cursor: wait;
  opacity: 0.72;
}

.mood-form-error {
  display: none;
  padding: 10px 12px;
  border: 1px solid rgba(255, 52, 52, 0.46);
  border-radius: 15px;
  background: rgba(255, 42, 42, 0.13);
  color: #ffd0c9;
  font-size: 13px;
  line-height: 1.35;
}

.mood-form-error.visible {
  display: block;
}

@keyframes moodOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes moodSheetIn {
  from { opacity: 0; transform: translateY(26px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
