@font-face {
  font-family: 'HarmonyHeiTi';
  src: url('./ttf/HarmonyHeiTi.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'HarmonyHeiTi-Medium';
  src: url('./ttf/HarmonyHeiTi-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body.gradient {
  background: linear-gradient(180deg, rgba(26,128,204,1) 0%, rgba(77,179,255,1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'HarmonyHeiTi', system-ui, -apple-system, sans-serif;
}
.container { width: 100%; max-width: 480px; padding: 24px; text-align: center; }
.title { color: #fff; font-size: 28px; margin: 16px 0 24px; font-weight: 700; }
.actions { display: flex; flex-direction: column; gap: 16px; align-items: center; }
.btn {
  width: 200px; height: 50px; border: none; border-radius: 25px;
  background: #fff; color: rgb(26,128,204); font-size: 16px; font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3); cursor: pointer;
}
.box { width: 300px; height: 400px; margin: 0 auto 16px; position: relative; }
.preview-image { width: 100%; height: 100%; object-fit: contain; display: block; }
.text-overlay {
  position: absolute; left: 6px; width: calc(100% - 8px);
  height: 131.2px; bottom: 0;
  background: transparent; color: #fff; border: none; resize: none;
  font-family: 'HarmonyHeiTi-Medium', 'HarmonyHeiTi', sans-serif; font-size: 11.2px; line-height: 1.36;
  text-shadow: 0 0 1.2px rgba(0,0,0,1);
  letter-spacing: 0.4px;
  cursor: pointer;
}
.text-overlay:focus { outline: none; }
.text-overlay.focus-top { bottom: auto; top: 0; height: 139px; }

.hidden { display: none !important; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 1000; }
.modal-content { background: #fff; border-radius: 12px; width: 100%; max-width: 480px; padding: 16px; z-index: 1001; }
.modal-title { margin: 0 0 8px; font-size: 18px; color: #333; }
.modal-textarea { width: 100%; height: 180px; resize: vertical; font-family: 'HarmonyHeiTi-Medium', 'HarmonyHeiTi', sans-serif; font-size: 13px; line-height: 1.4; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 12px; }
.btn.secondary { background: #e6f2fb; color: rgb(26,128,204); }
