.writing-user-shell .question-block {
  margin: 18px 0;
  padding: 16px 14px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(20,40,60,0.08);
  box-sizing: border-box;
}

.writing-user-shell .question-number {
  text-align: left;
  font-weight: 800;
}

.writing-user-shell .writing-task-instruction {
  font-family: Nunito, Manrope, system-ui, -apple-system, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  color: #607080;
  font-weight: 700;
  margin-bottom: 8px;
}

.writing-user-shell .writing-task-question {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15.5px;
  line-height: 1.7;
  margin-bottom: 10px;
  text-align: left;
}

.writing-task-image-wrap {
  margin-bottom: 10px;
}

.writing-answer-box {
  border: 1px solid rgba(20,40,60,0.12);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.writing-answer-text {
  width: 100%;
  border: 0;
  border-radius: 0;
  padding: 10px;
  box-sizing: border-box;
  resize: vertical;
  min-height: 170px;
  font-size: 15px;
  line-height: 1.5;
  font-family: Georgia, "Times New Roman", serif;
}

.writing-answer-preview-inline {
  min-height: 170px;
  max-height: 360px;
  padding: 8px;
  box-sizing: border-box;
  background: #fff;
}

.writing-answer-inline-image {
  width: 100%;
  height: 100%;
  min-height: 154px;
  max-height: 344px;
  object-fit: contain;
  border-radius: 8px;
}

.writing-answer-box.image-mode .writing-answer-text {
  display: none;
}

.writing-answer-upload {
  border-top: 1px solid rgba(20,40,60,0.10);
  padding: 8px 10px 12px;
  text-align: center;
}

.writing-answer-upload-hint {
  font-size: 11.5px;
  line-height: 1.35;
  color: #607080;
  margin-bottom: 8px;
}

.writing-answer-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 132px;
  height: 34px;
  border: 0;
  border-radius: 14px;
  background: #00BAFF;
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(20,40,60,0.08);
  cursor: pointer;
  margin: 0 auto;
  padding: 0 14px;
}

.writing-zoomable-image {
  width: 100%;
  border-radius: 10px;
  cursor: zoom-in;
}

.writing-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.writing-image-viewer.open {
  display: block;
}

.writing-image-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
}

.writing-image-viewer-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 14px;
}

.writing-image-viewer-close {
  align-self: flex-end;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  margin-bottom: 8px;
  cursor: pointer;
}

.writing-image-viewer-scroll {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.writing-image-viewer-img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  transition: width 0.2s ease;
  cursor: zoom-in;
  margin: auto;
}

.writing-image-viewer-img.zoomed {
  width: 180%;
  max-width: none;
  max-height: none;
  cursor: zoom-out;
  margin: 0;
}

@keyframes writing-check-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
