.task-checkin-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 31, 24, 0.42);
  backdrop-filter: blur(10px);
}

.task-checkin-dialog {
  position: relative;
  isolation: isolate;
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid rgba(18, 125, 83, 0.12);
  border-radius: 36px;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 245, 204, 0.72), transparent 34%),
    radial-gradient(circle at 88% 88%, rgba(214, 247, 226, 0.86), transparent 36%),
    linear-gradient(145deg, #fffef8 0%, #fbfff8 54%, #effbf3 100%);
  box-shadow: 0 30px 84px rgba(17, 57, 43, 0.3);
  color: var(--ink, #102d24);
}

.task-checkin-dialog::before {
  position: absolute;
  z-index: -1;
  top: 0;
  right: 0;
  width: 176px;
  height: 148px;
  border-bottom-left-radius: 100%;
  background: linear-gradient(145deg, #e1f6f8 0%, #cceff4 100%);
  content: '';
  pointer-events: none;
}

.task-checkin-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 30px 32px 18px;
}

.task-checkin-kicker {
  margin: 0 0 8px;
  color: var(--leaf, #007f5f);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.task-checkin-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
}

.task-checkin-goal {
  margin: 10px 0 0;
  color: var(--muted, #54706a);
  font-size: 16px;
  line-height: 1.5;
}

.task-checkin-close {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(18, 125, 83, 0.08);
  border-radius: 50%;
  background: rgba(190, 231, 226, 0.82);
  box-shadow: 0 8px 18px rgba(27, 106, 83, 0.08);
  color: var(--leaf-deep, #0b3a2c);
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
  transition: transform 160ms ease, background-color 160ms ease;
}

.task-checkin-close:hover {
  background: rgba(171, 222, 215, 0.96);
  transform: translateY(-1px);
}

.task-checkin-body {
  position: relative;
  z-index: 1;
  padding: 0 32px 30px;
}

.task-checkin-rewards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.task-checkin-reward {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(18, 125, 83, 0.12);
  border-radius: 999px;
  background: rgba(225, 245, 237, 0.62);
  color: var(--leaf-deep, #0b3a2c);
  font-weight: 800;
}

.task-checkin-reward img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.task-checkin-field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.task-checkin-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--leaf-deep, #0b3a2c);
  font-size: 15px;
  font-weight: 800;
}

.task-checkin-hint {
  color: var(--muted, #54706a);
  font-size: 13px;
  font-weight: 600;
}

.task-checkin-textarea {
  width: 100%;
  min-height: 124px;
  box-sizing: border-box;
  resize: vertical;
  border: 1px solid rgba(18, 125, 83, 0.18);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink, #102d24);
  font: inherit;
  font-size: 16px;
  line-height: 1.55;
  outline: none;
}

.task-checkin-textarea:focus {
  border-color: rgba(18, 125, 83, 0.46);
  box-shadow: 0 0 0 4px rgba(18, 125, 83, 0.1);
}

.task-checkin-upload {
  display: flex;
  align-items: center;
  gap: 12px;
}

.task-checkin-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.task-checkin-file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(18, 125, 83, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--leaf, #007f5f);
  cursor: pointer;
  font-weight: 800;
}

.task-checkin-preview {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
}

.task-checkin-media {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(18, 125, 83, 0.12);
  border-radius: 12px;
  background: rgba(248, 253, 250, 0.9);
}

.task-checkin-media-preview {
  width: 72px;
  height: 54px;
  flex: 0 0 72px;
  border-radius: 9px;
  object-fit: cover;
  background: #173d35;
}

.task-checkin-media strong {
  display: block;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-checkin-media span {
  color: var(--muted, #54706a);
  font-size: 12px;
}

.task-checkin-media button {
  border: 0;
  background: transparent;
  color: var(--leaf, #007f5f);
  cursor: pointer;
  font-weight: 800;
}

.task-checkin-error {
  min-height: 20px;
  margin: 0 0 12px;
  color: #b42318;
  font-size: 14px;
  font-weight: 700;
}

.task-checkin-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.task-checkin-secondary,
.task-checkin-primary {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 900;
}

.task-checkin-secondary {
  border: 1px solid rgba(18, 125, 83, 0.16);
  background: rgba(255, 255, 255, 0.8);
  color: var(--leaf, #007f5f);
}

.task-checkin-primary {
  border: 0;
  background: linear-gradient(135deg, #168554, #35a36d);
  box-shadow: 0 14px 28px rgba(22, 133, 84, 0.18);
  color: #fff;
}

.task-checkin-primary:disabled,
.task-checkin-secondary:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

@media (max-width: 640px) {
  .task-checkin-overlay {
    align-items: end;
    padding: 12px;
  }

  .task-checkin-dialog {
    max-height: calc(100vh - 24px);
    border-radius: 28px;
  }

  .task-checkin-dialog::before {
    width: 138px;
    height: 116px;
  }

  .task-checkin-head,
  .task-checkin-body {
    padding-left: 22px;
    padding-right: 22px;
  }
}
